blob: 5e1d977c4b4c48095131bbd22c9777bddb3ffeeb [file] [log] [blame]
{"version":3,"file":"forms.js","sources":["../../../../../../packages/forms/src/directives/control_value_accessor.ts","../../../../../../packages/forms/src/directives/checkbox_value_accessor.ts","../../../../../../packages/forms/src/directives/default_value_accessor.ts","../../../../../../packages/forms/src/directives/abstract_control_directive.ts","../../../../../../packages/forms/src/directives/control_container.ts","../../../../../../packages/forms/src/directives/ng_control.ts","../../../../../../packages/forms/src/directives/ng_control_status.ts","../../../../../../packages/forms/src/validators.ts","../../../../../../packages/forms/src/directives/normalize_validator.ts","../../../../../../packages/forms/src/directives/number_value_accessor.ts","../../../../../../packages/forms/src/directives/radio_control_value_accessor.ts","../../../../../../packages/forms/src/directives/range_value_accessor.ts","../../../../../../packages/forms/src/directives/error_examples.ts","../../../../../../packages/forms/src/directives/reactive_errors.ts","../../../../../../packages/forms/src/directives/select_control_value_accessor.ts","../../../../../../packages/forms/src/directives/select_multiple_control_value_accessor.ts","../../../../../../packages/forms/src/directives/shared.ts","../../../../../../packages/forms/src/model.ts","../../../../../../packages/forms/src/directives/ng_form.ts","../../../../../../packages/forms/src/directives/template_driven_errors.ts","../../../../../../packages/forms/src/directives/ng_form_selector_warning.ts","../../../../../../packages/forms/src/directives/abstract_form_group_directive.ts","../../../../../../packages/forms/src/directives/ng_model_group.ts","../../../../../../packages/forms/src/directives/ng_model.ts","../../../../../../packages/forms/src/directives/ng_no_validate_directive.ts","../../../../../../packages/forms/src/directives/reactive_directives/form_control_directive.ts","../../../../../../packages/forms/src/directives/reactive_directives/form_group_directive.ts","../../../../../../packages/forms/src/directives/reactive_directives/form_group_name.ts","../../../../../../packages/forms/src/directives/reactive_directives/form_control_name.ts","../../../../../../packages/forms/src/directives/validators.ts","../../../../../../packages/forms/src/directives.ts","../../../../../../packages/forms/src/form_builder.ts","../../../../../../packages/forms/src/version.ts","../../../../../../packages/forms/src/form_providers.ts","../../../../../../packages/forms/src/forms.ts","../../../../../../packages/forms/public_api.ts","../../../../../../packages/forms/index.ts","../../../../../../packages/forms/forms.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {InjectionToken} from '@angular/core';\n\n/**\n * @description\n * Defines an interface that acts as a bridge between the Angular forms API and a\n * native element in the DOM.\n *\n * Implement this interface to create a custom form control directive\n * that integrates with Angular forms.\n *\n * @see DefaultValueAccessor\n *\n * @publicApi\n */\nexport interface ControlValueAccessor {\n /**\n * @description\n * Writes a new value to the element.\n *\n * This method is called by the forms API to write to the view when programmatic\n * changes from model to view are requested.\n *\n * @usageNotes\n * ### Write a value to the element\n *\n * The following example writes a value to the native DOM element.\n *\n * ```ts\n * writeValue(value: any): void {\n * this._renderer.setProperty(this._elementRef.nativeElement, 'value', value);\n * }\n * ```\n *\n * @param obj The new value for the element\n */\n writeValue(obj: any): void;\n\n /**\n * @description\n * Registers a callback function that is called when the control's value\n * changes in the UI.\n *\n * This method is called by the forms API on initialization to update the form\n * model when values propagate from the view to the model.\n *\n * When implementing the `registerOnChange` method in your own value accessor,\n * save the given function so your class calls it at the appropriate time.\n *\n * @usageNotes\n * ### Store the change function\n *\n * The following example stores the provided function as an internal method.\n *\n * ```ts\n * registerOnChange(fn: (_: any) => void): void {\n * this._onChange = fn;\n * }\n * ```\n *\n * When the value changes in the UI, call the registered\n * function to allow the forms API to update itself:\n *\n * ```ts\n * host: {\n * '(change)': '_onChange($event.target.value)'\n * }\n * ```\n *\n * @param fn The callback function to register\n */\n registerOnChange(fn: any): void;\n\n /**\n * @description\n * Registers a callback function is called by the forms API on initialization\n * to update the form model on blur.\n *\n * When implementing `registerOnTouched` in your own value accessor, save the given\n * function so your class calls it when the control should be considered\n * blurred or \"touched\".\n *\n * @usageNotes\n * ### Store the callback function\n *\n * The following example stores the provided function as an internal method.\n *\n * ```ts\n * registerOnTouched(fn: any): void {\n * this._onTouched = fn;\n * }\n * ```\n *\n * On blur (or equivalent), your class should call the registered function to allow\n * the forms API to update itself:\n *\n * ```ts\n * host: {\n * '(blur)': '_onTouched()'\n * }\n * ```\n *\n * @param fn The callback function to register\n */\n registerOnTouched(fn: any): void;\n\n /**\n * @description\n * Function that is called by the forms API when the control status changes to\n * or from 'DISABLED'. Depending on the status, it enables or disables the\n * appropriate DOM element.\n *\n * @usageNotes\n * The following is an example of writing the disabled property to a native DOM element:\n *\n * ```ts\n * setDisabledState(isDisabled: boolean): void {\n * this._renderer.setProperty(this._elementRef.nativeElement, 'disabled', isDisabled);\n * }\n * ```\n *\n * @param isDisabled The disabled status to set on the element\n */\n setDisabledState?(isDisabled: boolean): void;\n}\n\n/**\n * Used to provide a `ControlValueAccessor` for form controls.\n *\n * See `DefaultValueAccessor` for how to implement one.\n *\n * @publicApi\n */\nexport const NG_VALUE_ACCESSOR = new InjectionToken<ControlValueAccessor>('NgValueAccessor');\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Directive, ElementRef, Renderer2, forwardRef} from '@angular/core';\n\nimport {ControlValueAccessor, NG_VALUE_ACCESSOR} from './control_value_accessor';\n\nexport const CHECKBOX_VALUE_ACCESSOR: any = {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => CheckboxControlValueAccessor),\n multi: true,\n};\n\n/**\n * @description\n * A `ControlValueAccessor` for writing a value and listening to changes on a checkbox input\n * element.\n *\n * @usageNotes\n *\n * ### Using a checkbox with a reactive form.\n *\n * The following example shows how to use a checkbox with a reactive form.\n *\n * ```ts\n * const rememberLoginControl = new FormControl();\n * ```\n *\n * ```\n * <input type=\"checkbox\" [formControl]=\"rememberLoginControl\">\n * ```\n *\n * @ngModule ReactiveFormsModule\n * @ngModule FormsModule\n * @publicApi\n */\n@Directive({\n selector:\n 'input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]',\n host: {'(change)': 'onChange($event.target.checked)', '(blur)': 'onTouched()'},\n providers: [CHECKBOX_VALUE_ACCESSOR]\n})\nexport class CheckboxControlValueAccessor implements ControlValueAccessor {\n /**\n * @description\n * The registered callback function called when a change event occurs on the input element.\n */\n onChange = (_: any) => {};\n\n /**\n * @description\n * The registered callback function called when a blur event occurs on the input element.\n */\n onTouched = () => {};\n\n constructor(private _renderer: Renderer2, private _elementRef: ElementRef) {}\n\n /**\n * Sets the \"checked\" property on the input element.\n *\n * @param value The checked value\n */\n writeValue(value: any): void {\n this._renderer.setProperty(this._elementRef.nativeElement, 'checked', value);\n }\n\n /**\n * @description\n * Registers a function called when the control value changes.\n *\n * @param fn The callback function\n */\n registerOnChange(fn: (_: any) => {}): void { this.onChange = fn; }\n\n /**\n * @description\n * Registers a function called when the control is touched.\n *\n * @param fn The callback function\n */\n registerOnTouched(fn: () => {}): void { this.onTouched = fn; }\n\n /**\n * Sets the \"disabled\" property on the input element.\n *\n * @param isDisabled The disabled value\n */\n setDisabledState(isDisabled: boolean): void {\n this._renderer.setProperty(this._elementRef.nativeElement, 'disabled', isDisabled);\n }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Directive, ElementRef, Inject, InjectionToken, Optional, Renderer2, forwardRef} from '@angular/core';\nimport {ɵgetDOM as getDOM} from '@angular/platform-browser';\nimport {ControlValueAccessor, NG_VALUE_ACCESSOR} from './control_value_accessor';\n\nexport const DEFAULT_VALUE_ACCESSOR: any = {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => DefaultValueAccessor),\n multi: true\n};\n\n/**\n * We must check whether the agent is Android because composition events\n * behave differently between iOS and Android.\n */\nfunction _isAndroid(): boolean {\n const userAgent = getDOM() ? getDOM().getUserAgent() : '';\n return /android (\\d+)/.test(userAgent.toLowerCase());\n}\n\n/**\n * @description\n * Provide this token to control if form directives buffer IME input until\n * the \"compositionend\" event occurs.\n * @publicApi\n */\nexport const COMPOSITION_BUFFER_MODE = new InjectionToken<boolean>('CompositionEventMode');\n\n/**\n * @description\n * The default `ControlValueAccessor` for writing a value and listening to changes on input\n * elements. The accessor is used by the `FormControlDirective`, `FormControlName`, and\n * `NgModel` directives.\n *\n * @usageNotes\n *\n * ### Using the default value accessor\n *\n * The following example shows how to use an input element that activates the default value accessor\n * (in this case, a text field).\n *\n * ```ts\n * const firstNameControl = new FormControl();\n * ```\n *\n * ```\n * <input type=\"text\" [formControl]=\"firstNameControl\">\n * ```\n *\n * @ngModule ReactiveFormsModule\n * @ngModule FormsModule\n * @publicApi\n */\n@Directive({\n selector:\n 'input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]',\n // TODO: vsavkin replace the above selector with the one below it once\n // https://github.com/angular/angular/issues/3011 is implemented\n // selector: '[ngModel],[formControl],[formControlName]',\n host: {\n '(input)': '$any(this)._handleInput($event.target.value)',\n '(blur)': 'onTouched()',\n '(compositionstart)': '$any(this)._compositionStart()',\n '(compositionend)': '$any(this)._compositionEnd($event.target.value)'\n },\n providers: [DEFAULT_VALUE_ACCESSOR]\n})\nexport class DefaultValueAccessor implements ControlValueAccessor {\n /**\n * @description\n * The registered callback function called when an input event occurs on the input element.\n */\n onChange = (_: any) => {};\n\n /**\n * @description\n * The registered callback function called when a blur event occurs on the input element.\n */\n onTouched = () => {};\n\n /** Whether the user is creating a composition string (IME events). */\n private _composing = false;\n\n constructor(\n private _renderer: Renderer2, private _elementRef: ElementRef,\n @Optional() @Inject(COMPOSITION_BUFFER_MODE) private _compositionMode: boolean) {\n if (this._compositionMode == null) {\n this._compositionMode = !_isAndroid();\n }\n }\n\n /**\n * Sets the \"value\" property on the input element.\n *\n * @param value The checked value\n */\n writeValue(value: any): void {\n const normalizedValue = value == null ? '' : value;\n this._renderer.setProperty(this._elementRef.nativeElement, 'value', normalizedValue);\n }\n\n /**\n * @description\n * Registers a function called when the control value changes.\n *\n * @param fn The callback function\n */\n registerOnChange(fn: (_: any) => void): void { this.onChange = fn; }\n\n /**\n * @description\n * Registers a function called when the control is touched.\n *\n * @param fn The callback function\n */\n registerOnTouched(fn: () => void): void { this.onTouched = fn; }\n\n /**\n * Sets the \"disabled\" property on the input element.\n *\n * @param isDisabled The disabled value\n */\n setDisabledState(isDisabled: boolean): void {\n this._renderer.setProperty(this._elementRef.nativeElement, 'disabled', isDisabled);\n }\n\n /** @internal */\n _handleInput(value: any): void {\n if (!this._compositionMode || (this._compositionMode && !this._composing)) {\n this.onChange(value);\n }\n }\n\n /** @internal */\n _compositionStart(): void { this._composing = true; }\n\n /** @internal */\n _compositionEnd(value: any): void {\n this._composing = false;\n this._compositionMode && this.onChange(value);\n }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Observable} from 'rxjs';\nimport {AbstractControl} from '../model';\nimport {ValidationErrors} from './validators';\n\n/**\n * @description\n * Base class for control directives.\n *\n * This class is only used internally in the `ReactiveFormsModule` and the `FormsModule`.\n *\n * @publicApi\n */\nexport abstract class AbstractControlDirective {\n /**\n * @description\n * A reference to the underlying control.\n *\n * @returns the control that backs this directive. Most properties fall through to that instance.\n */\n abstract get control(): AbstractControl|null;\n\n /**\n * @description\n * Reports the value of the control if it is present, otherwise null.\n */\n get value(): any { return this.control ? this.control.value : null; }\n\n /**\n * @description\n * Reports whether the control is valid. A control is considered valid if no\n * validation errors exist with the current value.\n * If the control is not present, null is returned.\n */\n get valid(): boolean|null { return this.control ? this.control.valid : null; }\n\n /**\n * @description\n * Reports whether the control is invalid, meaning that an error exists in the input value.\n * If the control is not present, null is returned.\n */\n get invalid(): boolean|null { return this.control ? this.control.invalid : null; }\n\n /**\n * @description\n * Reports whether a control is pending, meaning that that async validation is occurring and\n * errors are not yet available for the input value. If the control is not present, null is\n * returned.\n */\n get pending(): boolean|null { return this.control ? this.control.pending : null; }\n\n /**\n * @description\n * Reports whether the control is disabled, meaning that the control is disabled\n * in the UI and is exempt from validation checks and excluded from aggregate\n * values of ancestor controls. If the control is not present, null is returned.\n */\n get disabled(): boolean|null { return this.control ? this.control.disabled : null; }\n\n /**\n * @description\n * Reports whether the control is enabled, meaning that the control is included in ancestor\n * calculations of validity or value. If the control is not present, null is returned.\n */\n get enabled(): boolean|null { return this.control ? this.control.enabled : null; }\n\n /**\n * @description\n * Reports the control's validation errors. If the control is not present, null is returned.\n */\n get errors(): ValidationErrors|null { return this.control ? this.control.errors : null; }\n\n /**\n * @description\n * Reports whether the control is pristine, meaning that the user has not yet changed\n * the value in the UI. If the control is not present, null is returned.\n */\n get pristine(): boolean|null { return this.control ? this.control.pristine : null; }\n\n /**\n * @description\n * Reports whether the control is dirty, meaning that the user has changed\n * the value in the UI. If the control is not present, null is returned.\n */\n get dirty(): boolean|null { return this.control ? this.control.dirty : null; }\n\n /**\n * @description\n * Reports whether the control is touched, meaning that the user has triggered\n * a `blur` event on it. If the control is not present, null is returned.\n */\n get touched(): boolean|null { return this.control ? this.control.touched : null; }\n\n /**\n * @description\n * Reports the validation status of the control. Possible values include:\n * 'VALID', 'INVALID', 'DISABLED', and 'PENDING'.\n * If the control is not present, null is returned.\n */\n get status(): string|null { return this.control ? this.control.status : null; }\n\n /**\n * @description\n * Reports whether the control is untouched, meaning that the user has not yet triggered\n * a `blur` event on it. If the control is not present, null is returned.\n */\n get untouched(): boolean|null { return this.control ? this.control.untouched : null; }\n\n /**\n * @description\n * Returns a multicasting observable that emits a validation status whenever it is\n * calculated for the control. If the control is not present, null is returned.\n */\n get statusChanges(): Observable<any>|null {\n return this.control ? this.control.statusChanges : null;\n }\n\n /**\n * @description\n * Returns a multicasting observable of value changes for the control that emits every time the\n * value of the control changes in the UI or programmatically.\n * If the control is not present, null is returned.\n */\n get valueChanges(): Observable<any>|null {\n return this.control ? this.control.valueChanges : null;\n }\n\n /**\n * @description\n * Returns an array that represents the path from the top-level form to this control.\n * Each index is the string name of the control on that level.\n */\n get path(): string[]|null { return null; }\n\n /**\n * @description\n * Resets the control with the provided value if the control is present.\n */\n reset(value: any = undefined): void {\n if (this.control) this.control.reset(value);\n }\n\n /**\n * @description\n * Reports whether the control with the given path has the error specified.\n *\n * @param errorCode The code of the error to check\n * @param path A list of control names that designates how to move from the current control\n * to the control that should be queried for errors.\n *\n * @usageNotes\n * For example, for the following `FormGroup`:\n *\n * ```\n * form = new FormGroup({\n * address: new FormGroup({ street: new FormControl() })\n * });\n * ```\n *\n * The path to the 'street' control from the root form would be 'address' -> 'street'.\n *\n * It can be provided to this method in one of two formats:\n *\n * 1. An array of string control names, e.g. `['address', 'street']`\n * 1. A period-delimited list of control names in one string, e.g. `'address.street'`\n *\n * If no path is given, this method checks for the error on the current control.\n *\n * @returns whether the given error is present in the control at the given path.\n *\n * If the control is not present, false is returned.\n */\n hasError(errorCode: string, path?: Array<string|number>|string): boolean {\n return this.control ? this.control.hasError(errorCode, path) : false;\n }\n\n /**\n * @description\n * Reports error data for the control with the given path.\n *\n * @param errorCode The code of the error to check\n * @param path A list of control names that designates how to move from the current control\n * to the control that should be queried for errors.\n *\n * @usageNotes\n * For example, for the following `FormGroup`:\n *\n * ```\n * form = new FormGroup({\n * address: new FormGroup({ street: new FormControl() })\n * });\n * ```\n *\n * The path to the 'street' control from the root form would be 'address' -> 'street'.\n *\n * It can be provided to this method in one of two formats:\n *\n * 1. An array of string control names, e.g. `['address', 'street']`\n * 1. A period-delimited list of control names in one string, e.g. `'address.street'`\n *\n * @returns error data for that particular error. If the control or error is not present,\n * null is returned.\n */\n getError(errorCode: string, path?: Array<string|number>|string): any {\n return this.control ? this.control.getError(errorCode, path) : null;\n }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {AbstractControlDirective} from './abstract_control_directive';\nimport {Form} from './form_interface';\n\n\n/**\n * @description\n * A base class for directives that contain multiple registered instances of `NgControl`.\n * Only used by the forms module.\n *\n * @publicApi\n */\nexport abstract class ControlContainer extends AbstractControlDirective {\n /**\n * @description\n * The name for the control\n */\n // TODO(issue/24571): remove '!'.\n name !: string;\n\n /**\n * @description\n * The top-level form directive for the control.\n */\n get formDirective(): Form|null { return null; }\n\n /**\n * @description\n * The path to this group.\n */\n get path(): string[]|null { return null; }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n\nimport {AbstractControlDirective} from './abstract_control_directive';\nimport {ControlContainer} from './control_container';\nimport {ControlValueAccessor} from './control_value_accessor';\nimport {AsyncValidator, AsyncValidatorFn, Validator, ValidatorFn} from './validators';\n\nfunction unimplemented(): any {\n throw new Error('unimplemented');\n}\n\n/**\n * @description\n * A base class that all control `FormControl`-based directives extend. It binds a `FormControl`\n * object to a DOM element.\n *\n * @publicApi\n */\nexport abstract class NgControl extends AbstractControlDirective {\n /**\n * @description\n * The parent form for the control.\n *\n * @internal\n */\n _parent: ControlContainer|null = null;\n\n /**\n * @description\n * The name for the control\n */\n name: string|null = null;\n\n /**\n * @description\n * The value accessor for the control\n */\n valueAccessor: ControlValueAccessor|null = null;\n\n /**\n * @description\n * The uncomposed array of synchronous validators for the control\n *\n * @internal\n */\n _rawValidators: Array<Validator|ValidatorFn> = [];\n\n /**\n * @description\n * The uncomposed array of async validators for the control\n *\n * @internal\n */\n _rawAsyncValidators: Array<AsyncValidator|AsyncValidatorFn> = [];\n\n /**\n * @description\n * The registered synchronous validator function for the control\n *\n * @throws An exception that this method is not implemented\n */\n get validator(): ValidatorFn|null { return <ValidatorFn>unimplemented(); }\n\n /**\n * @description\n * The registered async validator function for the control\n *\n * @throws An exception that this method is not implemented\n */\n get asyncValidator(): AsyncValidatorFn|null { return <AsyncValidatorFn>unimplemented(); }\n\n /**\n * @description\n * The callback method to update the model from the view when requested\n *\n * @param newValue The new value for the view\n */\n abstract viewToModelUpdate(newValue: any): void;\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Directive, Self} from '@angular/core';\n\nimport {AbstractControlDirective} from './abstract_control_directive';\nimport {ControlContainer} from './control_container';\nimport {NgControl} from './ng_control';\n\nexport class AbstractControlStatus {\n private _cd: AbstractControlDirective;\n\n constructor(cd: AbstractControlDirective) { this._cd = cd; }\n\n get ngClassUntouched(): boolean { return this._cd.control ? this._cd.control.untouched : false; }\n get ngClassTouched(): boolean { return this._cd.control ? this._cd.control.touched : false; }\n get ngClassPristine(): boolean { return this._cd.control ? this._cd.control.pristine : false; }\n get ngClassDirty(): boolean { return this._cd.control ? this._cd.control.dirty : false; }\n get ngClassValid(): boolean { return this._cd.control ? this._cd.control.valid : false; }\n get ngClassInvalid(): boolean { return this._cd.control ? this._cd.control.invalid : false; }\n get ngClassPending(): boolean { return this._cd.control ? this._cd.control.pending : false; }\n}\n\nexport const ngControlStatusHost = {\n '[class.ng-untouched]': 'ngClassUntouched',\n '[class.ng-touched]': 'ngClassTouched',\n '[class.ng-pristine]': 'ngClassPristine',\n '[class.ng-dirty]': 'ngClassDirty',\n '[class.ng-valid]': 'ngClassValid',\n '[class.ng-invalid]': 'ngClassInvalid',\n '[class.ng-pending]': 'ngClassPending',\n};\n\n/**\n * @description\n * Directive automatically applied to Angular form controls that sets CSS classes\n * based on control status.\n *\n * @usageNotes\n *\n * ### CSS classes applied\n *\n * The following classes are applied as the properties become true:\n *\n * * ng-valid\n * * ng-invalid\n * * ng-pending\n * * ng-pristine\n * * ng-dirty\n * * ng-untouched\n * * ng-touched\n *\n * @ngModule ReactiveFormsModule\n * @ngModule FormsModule\n * @publicApi\n */\n@Directive({selector: '[formControlName],[ngModel],[formControl]', host: ngControlStatusHost})\nexport class NgControlStatus extends AbstractControlStatus {\n constructor(@Self() cd: NgControl) { super(cd); }\n}\n\n/**\n * @description\n * Directive automatically applied to Angular form groups that sets CSS classes\n * based on control status (valid/invalid/dirty/etc).\n * \n * @see `NgControlStatus`\n *\n * @ngModule ReactiveFormsModule\n * @ngModule FormsModule\n * @publicApi\n */\n@Directive({\n selector:\n '[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]',\n host: ngControlStatusHost\n})\nexport class NgControlStatusGroup extends AbstractControlStatus {\n constructor(@Self() cd: ControlContainer) { super(cd); }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {InjectionToken, ɵisObservable as isObservable, ɵisPromise as isPromise} from '@angular/core';\nimport {Observable, forkJoin, from} from 'rxjs';\nimport {map} from 'rxjs/operators';\nimport {AsyncValidatorFn, ValidationErrors, Validator, ValidatorFn} from './directives/validators';\nimport {AbstractControl, FormControl} from './model';\n\nfunction isEmptyInputValue(value: any): boolean {\n // we don't check for string here so it also works with arrays\n return value == null || value.length === 0;\n}\n\n/**\n * @description\n * An `InjectionToken` for registering additional synchronous validators used with `AbstractControl`s.\n *\n * @see `NG_ASYNC_VALIDATORS`\n *\n * @usageNotes\n *\n * ### Providing a custom validator\n *\n * The following example registers a custom validator directive. Adding the validator to the\n * existing collection of validators requires the `multi: true` option.\n *\n * ```typescript\n * @Directive({\n * selector: '[customValidator]',\n * providers: [{provide: NG_VALIDATORS, useExisting: CustomValidatorDirective, multi: true}]\n * })\n * class CustomValidatorDirective implements Validator {\n * validate(control: AbstractControl): ValidationErrors | null {\n * return { 'custom': true };\n * }\n * }\n * ```\n *\n * @publicApi\n */\nexport const NG_VALIDATORS = new InjectionToken<Array<Validator|Function>>('NgValidators');\n\n/**\n * @description\n * An `InjectionToken` for registering additional asynchronous validators used with `AbstractControl`s.\n *\n * @see `NG_VALIDATORS`\n *\n * @publicApi\n */\nexport const NG_ASYNC_VALIDATORS =\n new InjectionToken<Array<Validator|Function>>('NgAsyncValidators');\n\nconst EMAIL_REGEXP =\n /^(?=.{1,254}$)(?=.{1,64}@)[-!#$%&'*+/0-9=?A-Z^_`a-z{|}~]+(\\.[-!#$%&'*+/0-9=?A-Z^_`a-z{|}~]+)*@[A-Za-z0-9]([A-Za-z0-9-]{0,61}[A-Za-z0-9])?(\\.[A-Za-z0-9]([A-Za-z0-9-]{0,61}[A-Za-z0-9])?)*$/;\n\n/**\n * @description\n * Provides a set of built-in validators that can be used by form controls.\n *\n * A validator is a function that processes a `FormControl` or collection of\n * controls and returns an error map or null. A null map means that validation has passed.\n *\n * @see [Form Validation](/guide/form-validation)\n *\n * @publicApi\n */\nexport class Validators {\n /**\n * @description\n * Validator that requires the control's value to be greater than or equal to the provided number.\n * The validator exists only as a function and not as a directive.\n *\n * @usageNotes\n *\n * ### Validate against a minimum of 3\n *\n * ```typescript\n * const control = new FormControl(2, Validators.min(3));\n *\n * console.log(control.errors); // {min: {min: 3, actual: 2}}\n * ```\n *\n * @returns A validator function that returns an error map with the\n * `min` property if the validation check fails, otherwise `null`.\n *\n */\n static min(min: number): ValidatorFn {\n return (control: AbstractControl): ValidationErrors | null => {\n if (isEmptyInputValue(control.value) || isEmptyInputValue(min)) {\n return null; // don't validate empty values to allow optional controls\n }\n const value = parseFloat(control.value);\n // Controls with NaN values after parsing should be treated as not having a\n // minimum, per the HTML forms spec: https://www.w3.org/TR/html5/forms.html#attr-input-min\n return !isNaN(value) && value < min ? {'min': {'min': min, 'actual': control.value}} : null;\n };\n }\n\n /**\n * @description\n * Validator that requires the control's value to be less than or equal to the provided number.\n * The validator exists only as a function and not as a directive.\n *\n * @usageNotes\n *\n * ### Validate against a maximum of 15\n *\n * ```typescript\n * const control = new FormControl(16, Validators.max(15));\n *\n * console.log(control.errors); // {max: {max: 15, actual: 16}}\n * ```\n *\n * @returns A validator function that returns an error map with the\n * `max` property if the validation check fails, otherwise `null`.\n *\n */\n static max(max: number): ValidatorFn {\n return (control: AbstractControl): ValidationErrors | null => {\n if (isEmptyInputValue(control.value) || isEmptyInputValue(max)) {\n return null; // don't validate empty values to allow optional controls\n }\n const value = parseFloat(control.value);\n // Controls with NaN values after parsing should be treated as not having a\n // maximum, per the HTML forms spec: https://www.w3.org/TR/html5/forms.html#attr-input-max\n return !isNaN(value) && value > max ? {'max': {'max': max, 'actual': control.value}} : null;\n };\n }\n\n /**\n * @description\n * Validator that requires the control have a non-empty value.\n *\n * @usageNotes\n *\n * ### Validate that the field is non-empty\n *\n * ```typescript\n * const control = new FormControl('', Validators.required);\n *\n * console.log(control.errors); // {required: true}\n * ```\n *\n * @returns An error map with the `required` property\n * if the validation check fails, otherwise `null`.\n *\n */\n static required(control: AbstractControl): ValidationErrors|null {\n return isEmptyInputValue(control.value) ? {'required': true} : null;\n }\n\n /**\n * @description\n * Validator that requires the control's value be true. This validator is commonly\n * used for required checkboxes.\n *\n * @usageNotes\n *\n * ### Validate that the field value is true\n *\n * ```typescript\n * const control = new FormControl('', Validators.requiredTrue);\n *\n * console.log(control.errors); // {required: true}\n * ```\n *\n * @returns An error map that contains the `required` property\n * set to `true` if the validation check fails, otherwise `null`.\n */\n static requiredTrue(control: AbstractControl): ValidationErrors|null {\n return control.value === true ? null : {'required': true};\n }\n\n /**\n * @description\n * Validator that requires the control's value pass an email validation test.\n *\n * @usageNotes\n *\n * ### Validate that the field matches a valid email pattern\n *\n * ```typescript\n * const control = new FormControl('bad@', Validators.email);\n *\n * console.log(control.errors); // {email: true}\n * ```\n *\n * @returns An error map with the `email` property\n * if the validation check fails, otherwise `null`.\n *\n */\n static email(control: AbstractControl): ValidationErrors|null {\n if (isEmptyInputValue(control.value)) {\n return null; // don't validate empty values to allow optional controls\n }\n return EMAIL_REGEXP.test(control.value) ? null : {'email': true};\n }\n\n /**\n * @description\n * Validator that requires the length of the control's value to be greater than or equal\n * to the provided minimum length. This validator is also provided by default if you use the\n * the HTML5 `minlength` attribute.\n *\n * @usageNotes\n *\n * ### Validate that the field has a minimum of 3 characters\n *\n * ```typescript\n * const control = new FormControl('ng', Validators.minLength(3));\n *\n * console.log(control.errors); // {minlength: {requiredLength: 3, actualLength: 2}}\n * ```\n *\n * ```html\n * <input minlength=\"5\">\n * ```\n *\n * @returns A validator function that returns an error map with the\n * `minlength` if the validation check fails, otherwise `null`.\n */\n static minLength(minLength: number): ValidatorFn {\n return (control: AbstractControl): ValidationErrors | null => {\n if (isEmptyInputValue(control.value)) {\n return null; // don't validate empty values to allow optional controls\n }\n const length: number = control.value ? control.value.length : 0;\n return length < minLength ?\n {'minlength': {'requiredLength': minLength, 'actualLength': length}} :\n null;\n };\n }\n\n /**\n * @description\n * Validator that requires the length of the control's value to be less than or equal\n * to the provided maximum length. This validator is also provided by default if you use the\n * the HTML5 `maxlength` attribute.\n *\n * @usageNotes\n *\n * ### Validate that the field has maximum of 5 characters\n *\n * ```typescript\n * const control = new FormControl('Angular', Validators.maxLength(5));\n *\n * console.log(control.errors); // {maxlength: {requiredLength: 5, actualLength: 7}}\n * ```\n *\n * ```html\n * <input maxlength=\"5\">\n * ```\n *\n * @returns A validator function that returns an error map with the\n * `maxlength` property if the validation check fails, otherwise `null`.\n */\n static maxLength(maxLength: number): ValidatorFn {\n return (control: AbstractControl): ValidationErrors | null => {\n const length: number = control.value ? control.value.length : 0;\n return length > maxLength ?\n {'maxlength': {'requiredLength': maxLength, 'actualLength': length}} :\n null;\n };\n }\n\n /**\n * @description\n * Validator that requires the control's value to match a regex pattern. This validator is also\n * provided by default if you use the HTML5 `pattern` attribute.\n *\n * Note that if a Regexp is provided, the Regexp is used as is to test the values. On the other\n * hand, if a string is passed, the `^` character is prepended and the `$` character is\n * appended to the provided string (if not already present), and the resulting regular\n * expression is used to test the values.\n *\n * @usageNotes\n *\n * ### Validate that the field only contains letters or spaces\n *\n * ```typescript\n * const control = new FormControl('1', Validators.pattern('[a-zA-Z ]*'));\n *\n * console.log(control.errors); // {pattern: {requiredPattern: '^[a-zA-Z ]*$', actualValue: '1'}}\n * ```\n *\n * ```html\n * <input pattern=\"[a-zA-Z ]*\">\n * ```\n *\n * @returns A validator function that returns an error map with the\n * `pattern` property if the validation check fails, otherwise `null`.\n */\n static pattern(pattern: string|RegExp): ValidatorFn {\n if (!pattern) return Validators.nullValidator;\n let regex: RegExp;\n let regexStr: string;\n if (typeof pattern === 'string') {\n regexStr = '';\n\n if (pattern.charAt(0) !== '^') regexStr += '^';\n\n regexStr += pattern;\n\n if (pattern.charAt(pattern.length - 1) !== '$') regexStr += '$';\n\n regex = new RegExp(regexStr);\n } else {\n regexStr = pattern.toString();\n regex = pattern;\n }\n return (control: AbstractControl): ValidationErrors | null => {\n if (isEmptyInputValue(control.value)) {\n return null; // don't validate empty values to allow optional controls\n }\n const value: string = control.value;\n return regex.test(value) ? null :\n {'pattern': {'requiredPattern': regexStr, 'actualValue': value}};\n };\n }\n\n /**\n * @description\n * Validator that performs no operation.\n */\n static nullValidator(control: AbstractControl): ValidationErrors|null { return null; }\n\n /**\n * @description\n * Compose multiple validators into a single function that returns the union\n * of the individual error maps for the provided control.\n *\n * @returns A validator function that returns an error map with the\n * merged error maps of the validators if the validation check fails, otherwise `null`.\n */\n static compose(validators: null): null;\n static compose(validators: (ValidatorFn|null|undefined)[]): ValidatorFn|null;\n static compose(validators: (ValidatorFn|null|undefined)[]|null): ValidatorFn|null {\n if (!validators) return null;\n const presentValidators: ValidatorFn[] = validators.filter(isPresent) as any;\n if (presentValidators.length == 0) return null;\n\n return function(control: AbstractControl) {\n return _mergeErrors(_executeValidators(control, presentValidators));\n };\n }\n\n /**\n * @description\n * Compose multiple async validators into a single function that returns the union\n * of the individual error objects for the provided control.\n *\n * @returns A validator function that returns an error map with the\n * merged error objects of the async validators if the validation check fails, otherwise `null`.\n */\n static composeAsync(validators: (AsyncValidatorFn|null)[]): AsyncValidatorFn|null {\n if (!validators) return null;\n const presentValidators: AsyncValidatorFn[] = validators.filter(isPresent) as any;\n if (presentValidators.length == 0) return null;\n\n return function(control: AbstractControl) {\n const observables = _executeAsyncValidators(control, presentValidators).map(toObservable);\n return forkJoin(observables).pipe(map(_mergeErrors));\n };\n }\n}\n\nfunction isPresent(o: any): boolean {\n return o != null;\n}\n\nexport function toObservable(r: any): Observable<any> {\n const obs = isPromise(r) ? from(r) : r;\n if (!(isObservable(obs))) {\n throw new Error(`Expected validator to return Promise or Observable.`);\n }\n return obs;\n}\n\nfunction _executeValidators(control: AbstractControl, validators: ValidatorFn[]): any[] {\n return validators.map(v => v(control));\n}\n\nfunction _executeAsyncValidators(control: AbstractControl, validators: AsyncValidatorFn[]): any[] {\n return validators.map(v => v(control));\n}\n\nfunction _mergeErrors(arrayOfErrors: ValidationErrors[]): ValidationErrors|null {\n const res: {[key: string]: any} =\n arrayOfErrors.reduce((res: ValidationErrors | null, errors: ValidationErrors | null) => {\n return errors != null ? {...res !, ...errors} : res !;\n }, {});\n return Object.keys(res).length === 0 ? null : res;\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {AbstractControl} from '../model';\nimport {AsyncValidator, AsyncValidatorFn, Validator, ValidatorFn} from './validators';\n\nexport function normalizeValidator(validator: ValidatorFn | Validator): ValidatorFn {\n if ((<Validator>validator).validate) {\n return (c: AbstractControl) => (<Validator>validator).validate(c);\n } else {\n return <ValidatorFn>validator;\n }\n}\n\nexport function normalizeAsyncValidator(validator: AsyncValidatorFn | AsyncValidator):\n AsyncValidatorFn {\n if ((<AsyncValidator>validator).validate) {\n return (c: AbstractControl) => (<AsyncValidator>validator).validate(c);\n } else {\n return <AsyncValidatorFn>validator;\n }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Directive, ElementRef, Renderer2, forwardRef} from '@angular/core';\n\nimport {ControlValueAccessor, NG_VALUE_ACCESSOR} from './control_value_accessor';\n\nexport const NUMBER_VALUE_ACCESSOR: any = {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => NumberValueAccessor),\n multi: true\n};\n\n/**\n * @description\n * The `ControlValueAccessor` for writing a number value and listening to number input changes.\n * The value accessor is used by the `FormControlDirective`, `FormControlName`, and `NgModel`\n * directives.\n *\n * @usageNotes\n *\n * ### Using a number input with a reactive form.\n *\n * The following example shows how to use a number input with a reactive form.\n *\n * ```ts\n * const totalCountControl = new FormControl();\n * ```\n *\n * ```\n * <input type=\"number\" [formControl]=\"totalCountControl\">\n * ```\n *\n * @ngModule ReactiveFormsModule\n * @ngModule FormsModule\n * @publicApi\n */\n@Directive({\n selector:\n 'input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]',\n host: {\n '(change)': 'onChange($event.target.value)',\n '(input)': 'onChange($event.target.value)',\n '(blur)': 'onTouched()'\n },\n providers: [NUMBER_VALUE_ACCESSOR]\n})\nexport class NumberValueAccessor implements ControlValueAccessor {\n /**\n * @description\n * The registered callback function called when a change or input event occurs on the input\n * element.\n */\n onChange = (_: any) => {};\n\n /**\n * @description\n * The registered callback function called when a blur event occurs on the input element.\n */\n onTouched = () => {};\n\n constructor(private _renderer: Renderer2, private _elementRef: ElementRef) {}\n\n /**\n * Sets the \"value\" property on the input element.\n *\n * @param value The checked value\n */\n writeValue(value: number): void {\n // The value needs to be normalized for IE9, otherwise it is set to 'null' when null\n const normalizedValue = value == null ? '' : value;\n this._renderer.setProperty(this._elementRef.nativeElement, 'value', normalizedValue);\n }\n\n /**\n * @description\n * Registers a function called when the control value changes.\n *\n * @param fn The callback function\n */\n registerOnChange(fn: (_: number|null) => void): void {\n this.onChange = (value) => { fn(value == '' ? null : parseFloat(value)); };\n }\n\n /**\n * @description\n * Registers a function called when the control is touched.\n *\n * @param fn The callback function\n */\n registerOnTouched(fn: () => void): void { this.onTouched = fn; }\n\n /**\n * Sets the \"disabled\" property on the input element.\n *\n * @param isDisabled The disabled value\n */\n setDisabledState(isDisabled: boolean): void {\n this._renderer.setProperty(this._elementRef.nativeElement, 'disabled', isDisabled);\n }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Directive, ElementRef, Injectable, Injector, Input, OnDestroy, OnInit, Renderer2, forwardRef} from '@angular/core';\n\nimport {ControlValueAccessor, NG_VALUE_ACCESSOR} from './control_value_accessor';\nimport {NgControl} from './ng_control';\n\nexport const RADIO_VALUE_ACCESSOR: any = {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => RadioControlValueAccessor),\n multi: true\n};\n\n/**\n * @description\n * Class used by Angular to track radio buttons. For internal use only.\n */\n@Injectable()\nexport class RadioControlRegistry {\n private _accessors: any[] = [];\n\n /**\n * @description\n * Adds a control to the internal registry. For internal use only.\n */\n add(control: NgControl, accessor: RadioControlValueAccessor) {\n this._accessors.push([control, accessor]);\n }\n\n /**\n * @description\n * Removes a control from the internal registry. For internal use only.\n */\n remove(accessor: RadioControlValueAccessor) {\n for (let i = this._accessors.length - 1; i >= 0; --i) {\n if (this._accessors[i][1] === accessor) {\n this._accessors.splice(i, 1);\n return;\n }\n }\n }\n\n /**\n * @description\n * Selects a radio button. For internal use only.\n */\n select(accessor: RadioControlValueAccessor) {\n this._accessors.forEach((c) => {\n if (this._isSameGroup(c, accessor) && c[1] !== accessor) {\n c[1].fireUncheck(accessor.value);\n }\n });\n }\n\n private _isSameGroup(\n controlPair: [NgControl, RadioControlValueAccessor],\n accessor: RadioControlValueAccessor): boolean {\n if (!controlPair[0].control) return false;\n return controlPair[0]._parent === accessor._control._parent &&\n controlPair[1].name === accessor.name;\n }\n}\n\n/**\n * @description\n * The `ControlValueAccessor` for writing radio control values and listening to radio control\n * changes. The value accessor is used by the `FormControlDirective`, `FormControlName`, and\n * `NgModel` directives.\n *\n * @usageNotes\n *\n * ### Using radio buttons with reactive form directives\n *\n * The follow example shows how to use radio buttons in a reactive form. When using radio buttons in\n * a reactive form, radio buttons in the same group should have the same `formControlName`.\n * Providing a `name` attribute is optional.\n *\n * {@example forms/ts/reactiveRadioButtons/reactive_radio_button_example.ts region='Reactive'}\n *\n * @ngModule ReactiveFormsModule\n * @ngModule FormsModule\n * @publicApi\n */\n@Directive({\n selector:\n 'input[type=radio][formControlName],input[type=radio][formControl],input[type=radio][ngModel]',\n host: {'(change)': 'onChange()', '(blur)': 'onTouched()'},\n providers: [RADIO_VALUE_ACCESSOR]\n})\nexport class RadioControlValueAccessor implements ControlValueAccessor,\n OnDestroy, OnInit {\n /** @internal */\n // TODO(issue/24571): remove '!'.\n _state !: boolean;\n /** @internal */\n // TODO(issue/24571): remove '!'.\n _control !: NgControl;\n /** @internal */\n // TODO(issue/24571): remove '!'.\n _fn !: Function;\n\n /**\n * @description\n * The registered callback function called when a change event occurs on the input element.\n */\n onChange = () => {};\n\n /**\n * @description\n * The registered callback function called when a blur event occurs on the input element.\n */\n onTouched = () => {};\n\n /**\n * @description\n * Tracks the name of the radio input element.\n */\n // TODO(issue/24571): remove '!'.\n @Input() name !: string;\n\n /**\n * @description\n * Tracks the name of the `FormControl` bound to the directive. The name corresponds\n * to a key in the parent `FormGroup` or `FormArray`.\n */\n // TODO(issue/24571): remove '!'.\n @Input() formControlName !: string;\n\n /**\n * @description\n * Tracks the value of the radio input element\n */\n @Input() value: any;\n\n constructor(\n private _renderer: Renderer2, private _elementRef: ElementRef,\n private _registry: RadioControlRegistry, private _injector: Injector) {}\n\n /**\n * @description\n * A lifecycle method called when the directive is initialized. For internal use only.\n *\n * @param changes A object of key/value pairs for the set of changed inputs.\n */\n ngOnInit(): void {\n this._control = this._injector.get(NgControl);\n this._checkName();\n this._registry.add(this._control, this);\n }\n\n /**\n * @description\n * Lifecycle method called before the directive's instance is destroyed. For internal use only.\n *\n * @param changes A object of key/value pairs for the set of changed inputs.\n */\n ngOnDestroy(): void { this._registry.remove(this); }\n\n /**\n * @description\n * Sets the \"checked\" property value on the radio input element.\n *\n * @param value The checked value\n */\n writeValue(value: any): void {\n this._state = value === this.value;\n this._renderer.setProperty(this._elementRef.nativeElement, 'checked', this._state);\n }\n\n /**\n * @description\n * Registers a function called when the control value changes.\n *\n * @param fn The callback function\n */\n registerOnChange(fn: (_: any) => {}): void {\n this._fn = fn;\n this.onChange = () => {\n fn(this.value);\n this._registry.select(this);\n };\n }\n\n /**\n * Sets the \"value\" on the radio input element and unchecks it.\n *\n * @param value\n */\n fireUncheck(value: any): void { this.writeValue(value); }\n\n /**\n * @description\n * Registers a function called when the control is touched.\n *\n * @param fn The callback function\n */\n registerOnTouched(fn: () => {}): void { this.onTouched = fn; }\n\n /**\n * Sets the \"disabled\" property on the input element.\n *\n * @param isDisabled The disabled value\n */\n setDisabledState(isDisabled: boolean): void {\n this._renderer.setProperty(this._elementRef.nativeElement, 'disabled', isDisabled);\n }\n\n private _checkName(): void {\n if (this.name && this.formControlName && this.name !== this.formControlName) {\n this._throwNameError();\n }\n if (!this.name && this.formControlName) this.name = this.formControlName;\n }\n\n private _throwNameError(): void {\n throw new Error(`\n If you define both a name and a formControlName attribute on your radio button, their values\n must match. Ex: <input type=\"radio\" formControlName=\"food\" name=\"food\">\n `);\n }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Directive, ElementRef, Renderer2, StaticProvider, forwardRef} from '@angular/core';\n\nimport {ControlValueAccessor, NG_VALUE_ACCESSOR} from './control_value_accessor';\n\nexport const RANGE_VALUE_ACCESSOR: StaticProvider = {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => RangeValueAccessor),\n multi: true\n};\n\n/**\n * @description\n * The `ControlValueAccessor` for writing a range value and listening to range input changes.\n * The value accessor is used by the `FormControlDirective`, `FormControlName`, and `NgModel`\n * directives.\n *\n * @usageNotes\n *\n * ### Using a range input with a reactive form\n *\n * The following example shows how to use a range input with a reactive form.\n *\n * ```ts\n * const ageControl = new FormControl();\n * ```\n *\n * ```\n * <input type=\"range\" [formControl]=\"ageControl\">\n * ```\n *\n * @ngModule ReactiveFormsModule\n * @ngModule FormsModule\n * @publicApi\n */\n@Directive({\n selector:\n 'input[type=range][formControlName],input[type=range][formControl],input[type=range][ngModel]',\n host: {\n '(change)': 'onChange($event.target.value)',\n '(input)': 'onChange($event.target.value)',\n '(blur)': 'onTouched()'\n },\n providers: [RANGE_VALUE_ACCESSOR]\n})\nexport class RangeValueAccessor implements ControlValueAccessor {\n /**\n * @description\n * The registered callback function called when a change or input event occurs on the input\n * element.\n */\n onChange = (_: any) => {};\n\n /**\n * @description\n * The registered callback function called when a blur event occurs on the input element.\n */\n onTouched = () => {};\n\n constructor(private _renderer: Renderer2, private _elementRef: ElementRef) {}\n\n /**\n * Sets the \"value\" property on the input element.\n *\n * @param value The checked value\n */\n writeValue(value: any): void {\n this._renderer.setProperty(this._elementRef.nativeElement, 'value', parseFloat(value));\n }\n\n /**\n * @description\n * Registers a function called when the control value changes.\n *\n * @param fn The callback function\n */\n registerOnChange(fn: (_: number|null) => void): void {\n this.onChange = (value) => { fn(value == '' ? null : parseFloat(value)); };\n }\n\n /**\n * @description\n * Registers a function called when the control is touched.\n *\n * @param fn The callback function\n */\n registerOnTouched(fn: () => void): void { this.onTouched = fn; }\n\n /**\n * Sets the \"disabled\" property on the range input element.\n *\n * @param isDisabled The disabled value\n */\n setDisabledState(isDisabled: boolean): void {\n this._renderer.setProperty(this._elementRef.nativeElement, 'disabled', isDisabled);\n }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nexport const FormErrorExamples = {\n formControlName: `\n <div [formGroup]=\"myGroup\">\n <input formControlName=\"firstName\">\n </div>\n\n In your class:\n\n this.myGroup = new FormGroup({\n firstName: new FormControl()\n });`,\n\n formGroupName: `\n <div [formGroup]=\"myGroup\">\n <div formGroupName=\"person\">\n <input formControlName=\"firstName\">\n </div>\n </div>\n\n In your class:\n\n this.myGroup = new FormGroup({\n person: new FormGroup({ firstName: new FormControl() })\n });`,\n\n formArrayName: `\n <div [formGroup]=\"myGroup\">\n <div formArrayName=\"cities\">\n <div *ngFor=\"let city of cityArray.controls; index as i\">\n <input [formControlName]=\"i\">\n </div>\n </div>\n </div>\n\n In your class:\n\n this.cityArray = new FormArray([new FormControl('SF')]);\n this.myGroup = new FormGroup({\n cities: this.cityArray\n });`,\n\n ngModelGroup: `\n <form>\n <div ngModelGroup=\"person\">\n <input [(ngModel)]=\"person.name\" name=\"firstName\">\n </div>\n </form>`,\n\n ngModelWithFormGroup: `\n <div [formGroup]=\"myGroup\">\n <input formControlName=\"firstName\">\n <input [(ngModel)]=\"showMoreControls\" [ngModelOptions]=\"{standalone: true}\">\n </div>\n `\n};\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n\nimport {FormErrorExamples as Examples} from './error_examples';\n\nexport class ReactiveErrors {\n static controlParentException(): void {\n throw new Error(\n `formControlName must be used with a parent formGroup directive. You'll want to add a formGroup\n directive and pass it an existing FormGroup instance (you can create one in your class).\n\n Example:\n\n ${Examples.formControlName}`);\n }\n\n static ngModelGroupException(): void {\n throw new Error(\n `formControlName cannot be used with an ngModelGroup parent. It is only compatible with parents\n that also have a \"form\" prefix: formGroupName, formArrayName, or formGroup.\n\n Option 1: Update the parent to be formGroupName (reactive form strategy)\n\n ${Examples.formGroupName}\n\n Option 2: Use ngModel instead of formControlName (template-driven strategy)\n\n ${Examples.ngModelGroup}`);\n }\n static missingFormException(): void {\n throw new Error(`formGroup expects a FormGroup instance. Please pass one in.\n\n Example:\n\n ${Examples.formControlName}`);\n }\n\n static groupParentException(): void {\n throw new Error(\n `formGroupName must be used with a parent formGroup directive. You'll want to add a formGroup\n directive and pass it an existing FormGroup instance (you can create one in your class).\n\n Example:\n\n ${Examples.formGroupName}`);\n }\n\n static arrayParentException(): void {\n throw new Error(\n `formArrayName must be used with a parent formGroup directive. You'll want to add a formGroup\n directive and pass it an existing FormGroup instance (you can create one in your class).\n\n Example:\n\n ${Examples.formArrayName}`);\n }\n\n static disabledAttrWarning(): void {\n console.warn(`\n It looks like you're using the disabled attribute with a reactive form directive. If you set disabled to true\n when you set up this control in your component class, the disabled attribute will actually be set in the DOM for\n you. We recommend using this approach to avoid 'changed after checked' errors.\n \n Example: \n form = new FormGroup({\n first: new FormControl({value: 'Nancy', disabled: true}, Validators.required),\n last: new FormControl('Drew', Validators.required)\n });\n `);\n }\n\n static ngModelWarning(directiveName: string): void {\n console.warn(`\n It looks like you're using ngModel on the same form field as ${directiveName}. \n Support for using the ngModel input property and ngModelChange event with \n reactive form directives has been deprecated in Angular v6 and will be removed \n in Angular v7.\n \n For more information on this, see our API docs here:\n https://angular.io/api/forms/${directiveName === 'formControl' ? 'FormControlDirective' \n : 'FormControlName'}#use-with-ngmodel\n `);\n }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Directive, ElementRef, Host, Input, OnDestroy, Optional, Renderer2, StaticProvider, forwardRef, ɵlooseIdentical as looseIdentical} from '@angular/core';\n\nimport {ControlValueAccessor, NG_VALUE_ACCESSOR} from './control_value_accessor';\n\nexport const SELECT_VALUE_ACCESSOR: StaticProvider = {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => SelectControlValueAccessor),\n multi: true\n};\n\nfunction _buildValueString(id: string | null, value: any): string {\n if (id == null) return `${value}`;\n if (value && typeof value === 'object') value = 'Object';\n return `${id}: ${value}`.slice(0, 50);\n}\n\nfunction _extractId(valueString: string): string {\n return valueString.split(':')[0];\n}\n\n/**\n * @description\n * The `ControlValueAccessor` for writing select control values and listening to select control\n * changes. The value accessor is used by the `FormControlDirective`, `FormControlName`, and\n * `NgModel` directives.\n *\n * @usageNotes\n *\n * ### Using select controls in a reactive form\n *\n * The following examples show how to use a select control in a reactive form.\n *\n * {@example forms/ts/reactiveSelectControl/reactive_select_control_example.ts region='Component'}\n *\n * ### Using select controls in a template-driven form\n *\n * To use a select in a template-driven form, simply add an `ngModel` and a `name`\n * attribute to the main `<select>` tag.\n *\n * {@example forms/ts/selectControl/select_control_example.ts region='Component'}\n *\n * ### Customizing option selection\n *\n * Angular uses object identity to select option. It's possible for the identities of items\n * to change while the data does not. This can happen, for example, if the items are produced\n * from an RPC to the server, and that RPC is re-run. Even if the data hasn't changed, the\n * second response will produce objects with different identities.\n *\n * To customize the default option comparison algorithm, `<select>` supports `compareWith` input.\n * `compareWith` takes a **function** which has two arguments: `option1` and `option2`.\n * If `compareWith` is given, Angular selects option by the return value of the function.\n *\n * ```ts\n * const selectedCountriesControl = new FormControl();\n * ```\n *\n * ```\n * <select [compareWith]=\"compareFn\" [formControl]=\"selectedCountriesControl\">\n * <option *ngFor=\"let country of countries\" [ngValue]=\"country\">\n * {{country.name}}\n * </option>\n * </select>\n *\n * compareFn(c1: Country, c2: Country): boolean {\n * return c1 && c2 ? c1.id === c2.id : c1 === c2;\n * }\n * ```\n *\n * **Note:** We listen to the 'change' event because 'input' events aren't fired\n * for selects in Firefox and IE:\n * https://bugzilla.mozilla.org/show_bug.cgi?id=1024350\n * https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/4660045/\n *\n * @ngModule ReactiveFormsModule\n * @ngModule FormsModule\n * @publicApi\n */\n@Directive({\n selector:\n 'select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]',\n host: {'(change)': 'onChange($event.target.value)', '(blur)': 'onTouched()'},\n providers: [SELECT_VALUE_ACCESSOR]\n})\nexport class SelectControlValueAccessor implements ControlValueAccessor {\n value: any;\n /** @internal */\n _optionMap: Map<string, any> = new Map<string, any>();\n /** @internal */\n _idCounter: number = 0;\n\n /**\n * @description\n * The registered callback function called when a change event occurs on the input element.\n */\n onChange = (_: any) => {};\n\n /**\n * @description\n * The registered callback function called when a blur event occurs on the input element.\n */\n onTouched = () => {};\n\n /**\n * @description\n * Tracks the option comparison algorithm for tracking identities when\n * checking for changes.\n */\n @Input()\n set compareWith(fn: (o1: any, o2: any) => boolean) {\n if (typeof fn !== 'function') {\n throw new Error(`compareWith must be a function, but received ${JSON.stringify(fn)}`);\n }\n this._compareWith = fn;\n }\n\n private _compareWith: (o1: any, o2: any) => boolean = looseIdentical;\n\n constructor(private _renderer: Renderer2, private _elementRef: ElementRef) {}\n\n /**\n * Sets the \"value\" property on the input element. The \"selectedIndex\"\n * property is also set if an ID is provided on the option element.\n *\n * @param value The checked value\n */\n writeValue(value: any): void {\n this.value = value;\n const id: string|null = this._getOptionId(value);\n if (id == null) {\n this._renderer.setProperty(this._elementRef.nativeElement, 'selectedIndex', -1);\n }\n const valueString = _buildValueString(id, value);\n this._renderer.setProperty(this._elementRef.nativeElement, 'value', valueString);\n }\n\n /**\n * @description\n * Registers a function called when the control value changes.\n *\n * @param fn The callback function\n */\n registerOnChange(fn: (value: any) => any): void {\n this.onChange = (valueString: string) => {\n this.value = this._getOptionValue(valueString);\n fn(this.value);\n };\n }\n\n /**\n * @description\n * Registers a function called when the control is touched.\n *\n * @param fn The callback function\n */\n registerOnTouched(fn: () => any): void { this.onTouched = fn; }\n\n /**\n * Sets the \"disabled\" property on the select input element.\n *\n * @param isDisabled The disabled value\n */\n setDisabledState(isDisabled: boolean): void {\n this._renderer.setProperty(this._elementRef.nativeElement, 'disabled', isDisabled);\n }\n\n /** @internal */\n _registerOption(): string { return (this._idCounter++).toString(); }\n\n /** @internal */\n _getOptionId(value: any): string|null {\n for (const id of Array.from(this._optionMap.keys())) {\n if (this._compareWith(this._optionMap.get(id), value)) return id;\n }\n return null;\n }\n\n /** @internal */\n _getOptionValue(valueString: string): any {\n const id: string = _extractId(valueString);\n return this._optionMap.has(id) ? this._optionMap.get(id) : valueString;\n }\n}\n\n/**\n * @description\n * Marks `<option>` as dynamic, so Angular can be notified when options change.\n *\n * @see `SelectControlValueAccessor`\n *\n * @ngModule ReactiveFormsModule\n * @ngModule FormsModule\n * @publicApi\n */\n@Directive({selector: 'option'})\nexport class NgSelectOption implements OnDestroy {\n /**\n * @description\n * ID of the option element\n */\n // TODO(issue/24571): remove '!'.\n id !: string;\n\n constructor(\n private _element: ElementRef, private _renderer: Renderer2,\n @Optional() @Host() private _select: SelectControlValueAccessor) {\n if (this._select) this.id = this._select._registerOption();\n }\n\n /**\n * @description\n * Tracks the value bound to the option element. Unlike the value binding,\n * ngValue supports binding to objects.\n */\n @Input('ngValue')\n set ngValue(value: any) {\n if (this._select == null) return;\n this._select._optionMap.set(this.id, value);\n this._setElementValue(_buildValueString(this.id, value));\n this._select.writeValue(this._select.value);\n }\n\n /**\n * @description\n * Tracks simple string values bound to the option element.\n * For objects, use the `ngValue` input binding.\n */\n @Input('value')\n set value(value: any) {\n this._setElementValue(value);\n if (this._select) this._select.writeValue(this._select.value);\n }\n\n /** @internal */\n _setElementValue(value: string): void {\n this._renderer.setProperty(this._element.nativeElement, 'value', value);\n }\n\n /**\n * @description\n * Lifecycle method called before the directive's instance is destroyed. For internal use only.\n */\n ngOnDestroy(): void {\n if (this._select) {\n this._select._optionMap.delete(this.id);\n this._select.writeValue(this._select.value);\n }\n }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Directive, ElementRef, Host, Input, OnDestroy, Optional, Renderer2, StaticProvider, forwardRef, ɵlooseIdentical as looseIdentical} from '@angular/core';\n\nimport {ControlValueAccessor, NG_VALUE_ACCESSOR} from './control_value_accessor';\n\nexport const SELECT_MULTIPLE_VALUE_ACCESSOR: StaticProvider = {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => SelectMultipleControlValueAccessor),\n multi: true\n};\n\nfunction _buildValueString(id: string, value: any): string {\n if (id == null) return `${value}`;\n if (typeof value === 'string') value = `'${value}'`;\n if (value && typeof value === 'object') value = 'Object';\n return `${id}: ${value}`.slice(0, 50);\n}\n\nfunction _extractId(valueString: string): string {\n return valueString.split(':')[0];\n}\n\n/** Mock interface for HTML Options */\ninterface HTMLOption {\n value: string;\n selected: boolean;\n}\n\n/** Mock interface for HTMLCollection */\nabstract class HTMLCollection {\n // TODO(issue/24571): remove '!'.\n length !: number;\n abstract item(_: number): HTMLOption;\n}\n\n/**\n * @description\n * The `ControlValueAccessor` for writing multi-select control values and listening to multi-select control\n * changes. The value accessor is used by the `FormControlDirective`, `FormControlName`, and `NgModel`\n * directives.\n * \n * @see `SelectControlValueAccessor`\n *\n * @usageNotes\n * \n * ### Using a multi-select control\n * \n * The follow example shows you how to use a multi-select control with a reactive form.\n * \n * ```ts\n * const countryControl = new FormControl();\n * ```\n *\n * ```\n * <select multiple name=\"countries\" [formControl]=\"countryControl\">\n * <option *ngFor=\"let country of countries\" [ngValue]=\"country\">\n * {{ country.name }}\n * </option>\n * </select>\n * ```\n * \n * ### Customizing option selection\n * \n * To customize the default option comparison algorithm, `<select>` supports `compareWith` input.\n * See the `SelectControlValueAccessor` for usage.\n *\n * @ngModule ReactiveFormsModule\n * @ngModule FormsModule\n * @publicApi\n */\n@Directive({\n selector:\n 'select[multiple][formControlName],select[multiple][formControl],select[multiple][ngModel]',\n host: {'(change)': 'onChange($event.target)', '(blur)': 'onTouched()'},\n providers: [SELECT_MULTIPLE_VALUE_ACCESSOR]\n})\nexport class SelectMultipleControlValueAccessor implements ControlValueAccessor {\n /**\n * @description\n * The current value\n */\n value: any;\n\n /** @internal */\n _optionMap: Map<string, ɵNgSelectMultipleOption> = new Map<string, ɵNgSelectMultipleOption>();\n /** @internal */\n _idCounter: number = 0;\n\n /**\n * @description\n * The registered callback function called when a change event occurs on the input element.\n */\n onChange = (_: any) => {};\n\n /**\n * @description\n * The registered callback function called when a blur event occurs on the input element.\n */\n onTouched = () => {};\n\n /**\n * @description\n * Tracks the option comparison algorithm for tracking identities when\n * checking for changes.\n */\n @Input()\n set compareWith(fn: (o1: any, o2: any) => boolean) {\n if (typeof fn !== 'function') {\n throw new Error(`compareWith must be a function, but received ${JSON.stringify(fn)}`);\n }\n this._compareWith = fn;\n }\n\n private _compareWith: (o1: any, o2: any) => boolean = looseIdentical;\n\n constructor(private _renderer: Renderer2, private _elementRef: ElementRef) {}\n\n /**\n * @description\n * Sets the \"value\" property on one or of more\n * of the select's options.\n *\n * @param value The value\n */\n writeValue(value: any): void {\n this.value = value;\n let optionSelectedStateSetter: (opt: ɵNgSelectMultipleOption, o: any) => void;\n if (Array.isArray(value)) {\n // convert values to ids\n const ids = value.map((v) => this._getOptionId(v));\n optionSelectedStateSetter = (opt, o) => { opt._setSelected(ids.indexOf(o.toString()) > -1); };\n } else {\n optionSelectedStateSetter = (opt, o) => { opt._setSelected(false); };\n }\n this._optionMap.forEach(optionSelectedStateSetter);\n }\n\n /**\n * @description\n * Registers a function called when the control value changes\n * and writes an array of the selected options.\n *\n * @param fn The callback function\n */\n registerOnChange(fn: (value: any) => any): void {\n this.onChange = (_: any) => {\n const selected: Array<any> = [];\n if (_.hasOwnProperty('selectedOptions')) {\n const options: HTMLCollection = _.selectedOptions;\n for (let i = 0; i < options.length; i++) {\n const opt: any = options.item(i);\n const val: any = this._getOptionValue(opt.value);\n selected.push(val);\n }\n }\n // Degrade on IE\n else {\n const options: HTMLCollection = <HTMLCollection>_.options;\n for (let i = 0; i < options.length; i++) {\n const opt: HTMLOption = options.item(i);\n if (opt.selected) {\n const val: any = this._getOptionValue(opt.value);\n selected.push(val);\n }\n }\n }\n this.value = selected;\n fn(selected);\n };\n }\n\n /**\n * @description\n * Registers a function called when the control is touched.\n *\n * @param fn The callback function\n */\n registerOnTouched(fn: () => any): void { this.onTouched = fn; }\n\n /**\n * Sets the \"disabled\" property on the select input element.\n *\n * @param isDisabled The disabled value\n */\n setDisabledState(isDisabled: boolean): void {\n this._renderer.setProperty(this._elementRef.nativeElement, 'disabled', isDisabled);\n }\n\n /** @internal */\n _registerOption(value: ɵNgSelectMultipleOption): string {\n const id: string = (this._idCounter++).toString();\n this._optionMap.set(id, value);\n return id;\n }\n\n /** @internal */\n _getOptionId(value: any): string|null {\n for (const id of Array.from(this._optionMap.keys())) {\n if (this._compareWith(this._optionMap.get(id) !._value, value)) return id;\n }\n return null;\n }\n\n /** @internal */\n _getOptionValue(valueString: string): any {\n const id: string = _extractId(valueString);\n return this._optionMap.has(id) ? this._optionMap.get(id) !._value : valueString;\n }\n}\n\n/**\n * @description\n * Marks `<option>` as dynamic, so Angular can be notified when options change.\n *\n * @see `SelectMultipleControlValueAccessor`\n *\n * @ngModule ReactiveFormsModule\n * @ngModule FormsModule\n * @publicApi\n */\n@Directive({selector: 'option'})\nexport class ɵNgSelectMultipleOption implements OnDestroy {\n // TODO(issue/24571): remove '!'.\n id !: string;\n /** @internal */\n _value: any;\n\n constructor(\n private _element: ElementRef, private _renderer: Renderer2,\n @Optional() @Host() private _select: SelectMultipleControlValueAccessor) {\n if (this._select) {\n this.id = this._select._registerOption(this);\n }\n }\n\n /**\n * @description\n * Tracks the value bound to the option element. Unlike the value binding,\n * ngValue supports binding to objects.\n */\n @Input('ngValue')\n set ngValue(value: any) {\n if (this._select == null) return;\n this._value = value;\n this._setElementValue(_buildValueString(this.id, value));\n this._select.writeValue(this._select.value);\n }\n\n /**\n * @description\n * Tracks simple string values bound to the option element.\n * For objects, use the `ngValue` input binding.\n */\n @Input('value')\n set value(value: any) {\n if (this._select) {\n this._value = value;\n this._setElementValue(_buildValueString(this.id, value));\n this._select.writeValue(this._select.value);\n } else {\n this._setElementValue(value);\n }\n }\n\n /** @internal */\n _setElementValue(value: string): void {\n this._renderer.setProperty(this._element.nativeElement, 'value', value);\n }\n\n /** @internal */\n _setSelected(selected: boolean) {\n this._renderer.setProperty(this._element.nativeElement, 'selected', selected);\n }\n\n /**\n * @description\n * Lifecycle method called before the directive's instance is destroyed. For internal use only.\n */\n ngOnDestroy(): void {\n if (this._select) {\n this._select._optionMap.delete(this.id);\n this._select.writeValue(this._select.value);\n }\n }\n}\n\nexport {ɵNgSelectMultipleOption as NgSelectMultipleOption};\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {isDevMode, ɵlooseIdentical as looseIdentical} from '@angular/core';\n\nimport {FormArray, FormControl, FormGroup} from '../model';\nimport {Validators} from '../validators';\nimport {AbstractControlDirective} from './abstract_control_directive';\nimport {AbstractFormGroupDirective} from './abstract_form_group_directive';\nimport {CheckboxControlValueAccessor} from './checkbox_value_accessor';\nimport {ControlContainer} from './control_container';\nimport {ControlValueAccessor} from './control_value_accessor';\nimport {DefaultValueAccessor} from './default_value_accessor';\nimport {NgControl} from './ng_control';\nimport {normalizeAsyncValidator, normalizeValidator} from './normalize_validator';\nimport {NumberValueAccessor} from './number_value_accessor';\nimport {RadioControlValueAccessor} from './radio_control_value_accessor';\nimport {RangeValueAccessor} from './range_value_accessor';\nimport {FormArrayName} from './reactive_directives/form_group_name';\nimport {ReactiveErrors} from './reactive_errors';\nimport {SelectControlValueAccessor} from './select_control_value_accessor';\nimport {SelectMultipleControlValueAccessor} from './select_multiple_control_value_accessor';\nimport {AsyncValidator, AsyncValidatorFn, Validator, ValidatorFn} from './validators';\n\n\nexport function controlPath(name: string, parent: ControlContainer): string[] {\n return [...parent.path !, name];\n}\n\nexport function setUpControl(control: FormControl, dir: NgControl): void {\n if (!control) _throwError(dir, 'Cannot find control with');\n if (!dir.valueAccessor) _throwError(dir, 'No value accessor for form control with');\n\n control.validator = Validators.compose([control.validator !, dir.validator]);\n control.asyncValidator = Validators.composeAsync([control.asyncValidator !, dir.asyncValidator]);\n dir.valueAccessor !.writeValue(control.value);\n\n setUpViewChangePipeline(control, dir);\n setUpModelChangePipeline(control, dir);\n\n setUpBlurPipeline(control, dir);\n\n if (dir.valueAccessor !.setDisabledState) {\n control.registerOnDisabledChange(\n (isDisabled: boolean) => { dir.valueAccessor !.setDisabledState !(isDisabled); });\n }\n\n // re-run validation when validator binding changes, e.g. minlength=3 -> minlength=4\n dir._rawValidators.forEach((validator: Validator | ValidatorFn) => {\n if ((<Validator>validator).registerOnValidatorChange)\n (<Validator>validator).registerOnValidatorChange !(() => control.updateValueAndValidity());\n });\n\n dir._rawAsyncValidators.forEach((validator: AsyncValidator | AsyncValidatorFn) => {\n if ((<Validator>validator).registerOnValidatorChange)\n (<Validator>validator).registerOnValidatorChange !(() => control.updateValueAndValidity());\n });\n}\n\nexport function cleanUpControl(control: FormControl, dir: NgControl) {\n dir.valueAccessor !.registerOnChange(() => _noControlError(dir));\n dir.valueAccessor !.registerOnTouched(() => _noControlError(dir));\n\n dir._rawValidators.forEach((validator: any) => {\n if (validator.registerOnValidatorChange) {\n validator.registerOnValidatorChange(null);\n }\n });\n\n dir._rawAsyncValidators.forEach((validator: any) => {\n if (validator.registerOnValidatorChange) {\n validator.registerOnValidatorChange(null);\n }\n });\n\n if (control) control._clearChangeFns();\n}\n\nfunction setUpViewChangePipeline(control: FormControl, dir: NgControl): void {\n dir.valueAccessor !.registerOnChange((newValue: any) => {\n control._pendingValue = newValue;\n control._pendingChange = true;\n control._pendingDirty = true;\n\n if (control.updateOn === 'change') updateControl(control, dir);\n });\n}\n\nfunction setUpBlurPipeline(control: FormControl, dir: NgControl): void {\n dir.valueAccessor !.registerOnTouched(() => {\n control._pendingTouched = true;\n\n if (control.updateOn === 'blur' && control._pendingChange) updateControl(control, dir);\n if (control.updateOn !== 'submit') control.markAsTouched();\n });\n}\n\nfunction updateControl(control: FormControl, dir: NgControl): void {\n if (control._pendingDirty) control.markAsDirty();\n control.setValue(control._pendingValue, {emitModelToViewChange: false});\n dir.viewToModelUpdate(control._pendingValue);\n control._pendingChange = false;\n}\n\nfunction setUpModelChangePipeline(control: FormControl, dir: NgControl): void {\n control.registerOnChange((newValue: any, emitModelEvent: boolean) => {\n // control -> view\n dir.valueAccessor !.writeValue(newValue);\n\n // control -> ngModel\n if (emitModelEvent) dir.viewToModelUpdate(newValue);\n });\n}\n\nexport function setUpFormContainer(\n control: FormGroup | FormArray, dir: AbstractFormGroupDirective | FormArrayName) {\n if (control == null) _throwError(dir, 'Cannot find control with');\n control.validator = Validators.compose([control.validator, dir.validator]);\n control.asyncValidator = Validators.composeAsync([control.asyncValidator, dir.asyncValidator]);\n}\n\nfunction _noControlError(dir: NgControl) {\n return _throwError(dir, 'There is no FormControl instance attached to form control element with');\n}\n\nfunction _throwError(dir: AbstractControlDirective, message: string): void {\n let messageEnd: string;\n if (dir.path !.length > 1) {\n messageEnd = `path: '${dir.path!.join(' -> ')}'`;\n } else if (dir.path ![0]) {\n messageEnd = `name: '${dir.path}'`;\n } else {\n messageEnd = 'unspecified name attribute';\n }\n throw new Error(`${message} ${messageEnd}`);\n}\n\nexport function composeValidators(validators: Array<Validator|Function>): ValidatorFn|null {\n return validators != null ? Validators.compose(validators.map(normalizeValidator)) : null;\n}\n\nexport function composeAsyncValidators(validators: Array<Validator|Function>): AsyncValidatorFn|\n null {\n return validators != null ? Validators.composeAsync(validators.map(normalizeAsyncValidator)) :\n null;\n}\n\nexport function isPropertyUpdated(changes: {[key: string]: any}, viewModel: any): boolean {\n if (!changes.hasOwnProperty('model')) return false;\n const change = changes['model'];\n\n if (change.isFirstChange()) return true;\n return !looseIdentical(viewModel, change.currentValue);\n}\n\nconst BUILTIN_ACCESSORS = [\n CheckboxControlValueAccessor,\n RangeValueAccessor,\n NumberValueAccessor,\n SelectControlValueAccessor,\n SelectMultipleControlValueAccessor,\n RadioControlValueAccessor,\n];\n\nexport function isBuiltInAccessor(valueAccessor: ControlValueAccessor): boolean {\n return BUILTIN_ACCESSORS.some(a => valueAccessor.constructor === a);\n}\n\nexport function syncPendingControls(form: FormGroup, directives: NgControl[]): void {\n form._syncPendingControls();\n directives.forEach(dir => {\n const control = dir.control as FormControl;\n if (control.updateOn === 'submit' && control._pendingChange) {\n dir.viewToModelUpdate(control._pendingValue);\n control._pendingChange = false;\n }\n });\n}\n\n// TODO: vsavkin remove it once https://github.com/angular/angular/issues/3011 is implemented\nexport function selectValueAccessor(\n dir: NgControl, valueAccessors: ControlValueAccessor[]): ControlValueAccessor|null {\n if (!valueAccessors) return null;\n\n if (!Array.isArray(valueAccessors))\n _throwError(dir, 'Value accessor was not provided as an array for form control with');\n\n let defaultAccessor: ControlValueAccessor|undefined = undefined;\n let builtinAccessor: ControlValueAccessor|undefined = undefined;\n let customAccessor: ControlValueAccessor|undefined = undefined;\n\n valueAccessors.forEach((v: ControlValueAccessor) => {\n if (v.constructor === DefaultValueAccessor) {\n defaultAccessor = v;\n\n } else if (isBuiltInAccessor(v)) {\n if (builtinAccessor)\n _throwError(dir, 'More than one built-in value accessor matches form control with');\n builtinAccessor = v;\n\n } else {\n if (customAccessor)\n _throwError(dir, 'More than one custom value accessor matches form control with');\n customAccessor = v;\n }\n });\n\n if (customAccessor) return customAccessor;\n if (builtinAccessor) return builtinAccessor;\n if (defaultAccessor) return defaultAccessor;\n\n _throwError(dir, 'No valid value accessor for form control with');\n return null;\n}\n\nexport function removeDir<T>(list: T[], el: T): void {\n const index = list.indexOf(el);\n if (index > -1) list.splice(index, 1);\n}\n\n// TODO(kara): remove after deprecation period\nexport function _ngModelWarning(\n name: string, type: {_ngModelWarningSentOnce: boolean},\n instance: {_ngModelWarningSent: boolean}, warningConfig: string | null) {\n if (!isDevMode() || warningConfig === 'never') return;\n\n if (((warningConfig === null || warningConfig === 'once') && !type._ngModelWarningSentOnce) ||\n (warningConfig === 'always' && !instance._ngModelWarningSent)) {\n ReactiveErrors.ngModelWarning(name);\n type._ngModelWarningSentOnce = true;\n instance._ngModelWarningSent = true;\n }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {EventEmitter} from '@angular/core';\nimport {Observable} from 'rxjs';\nimport {composeAsyncValidators, composeValidators} from './directives/shared';\nimport {AsyncValidatorFn, ValidationErrors, ValidatorFn} from './directives/validators';\nimport {toObservable} from './validators';\n\n/**\n * Reports that a FormControl is valid, meaning that no errors exist in the input value.\n *\n * @see `status`\n */\nexport const VALID = 'VALID';\n\n/**\n * Reports that a FormControl is invalid, meaning that an error exists in the input value.\n *\n * @see `status`\n */\nexport const INVALID = 'INVALID';\n\n/**\n * Reports that a FormControl is pending, meaning that that async validation is occurring and\n * errors are not yet available for the input value.\n *\n * @see `markAsPending`\n * @see `status`\n */\nexport const PENDING = 'PENDING';\n\n/**\n * Reports that a FormControl is disabled, meaning that the control is exempt from ancestor\n * calculations of validity or value.\n *\n * @see `markAsDisabled`\n * @see `status`\n */\nexport const DISABLED = 'DISABLED';\n\nfunction _find(control: AbstractControl, path: Array<string|number>| string, delimiter: string) {\n if (path == null) return null;\n\n if (!(path instanceof Array)) {\n path = (<string>path).split(delimiter);\n }\n if (path instanceof Array && (path.length === 0)) return null;\n\n return (<Array<string|number>>path).reduce((v: AbstractControl, name) => {\n if (v instanceof FormGroup) {\n return v.controls.hasOwnProperty(name as string) ? v.controls[name] : null;\n }\n\n if (v instanceof FormArray) {\n return v.at(<number>name) || null;\n }\n\n return null;\n }, control);\n}\n\nfunction coerceToValidator(\n validatorOrOpts?: ValidatorFn | ValidatorFn[] | AbstractControlOptions | null): ValidatorFn|\n null {\n const validator =\n (isOptionsObj(validatorOrOpts) ? (validatorOrOpts as AbstractControlOptions).validators :\n validatorOrOpts) as ValidatorFn |\n ValidatorFn[] | null;\n\n return Array.isArray(validator) ? composeValidators(validator) : validator || null;\n}\n\nfunction coerceToAsyncValidator(\n asyncValidator?: AsyncValidatorFn | AsyncValidatorFn[] | null, validatorOrOpts?: ValidatorFn |\n ValidatorFn[] | AbstractControlOptions | null): AsyncValidatorFn|null {\n const origAsyncValidator =\n (isOptionsObj(validatorOrOpts) ? (validatorOrOpts as AbstractControlOptions).asyncValidators :\n asyncValidator) as AsyncValidatorFn |\n AsyncValidatorFn | null;\n\n return Array.isArray(origAsyncValidator) ? composeAsyncValidators(origAsyncValidator) :\n origAsyncValidator || null;\n}\n\nexport type FormHooks = 'change' | 'blur' | 'submit';\n\n/**\n * Interface for options provided to an `AbstractControl`.\n *\n * @publicApi\n */\nexport interface AbstractControlOptions {\n /**\n * @description\n * The list of validators applied to a control.\n */\n validators?: ValidatorFn|ValidatorFn[]|null;\n /**\n * @description\n * The list of async validators applied to control.\n */\n asyncValidators?: AsyncValidatorFn|AsyncValidatorFn[]|null;\n /**\n * @description\n * The event name for control to update upon.\n */\n updateOn?: 'change'|'blur'|'submit';\n}\n\n\nfunction isOptionsObj(\n validatorOrOpts?: ValidatorFn | ValidatorFn[] | AbstractControlOptions | null): boolean {\n return validatorOrOpts != null && !Array.isArray(validatorOrOpts) &&\n typeof validatorOrOpts === 'object';\n}\n\n\n/**\n * This is the base class for `FormControl`, `FormGroup`, and `FormArray`.\n *\n * It provides some of the shared behavior that all controls and groups of controls have, like\n * running validators, calculating status, and resetting state. It also defines the properties\n * that are shared between all sub-classes, like `value`, `valid`, and `dirty`. It shouldn't be\n * instantiated directly.\n *\n * @see [Forms Guide](/guide/forms)\n * @see [Reactive Forms Guide](/guide/reactive-forms)\n * @see [Dynamic Forms Guide](/guide/dynamic-form)\n *\n * @publicApi\n */\nexport abstract class AbstractControl {\n /** @internal */\n // TODO(issue/24571): remove '!'.\n _pendingDirty !: boolean;\n\n /** @internal */\n // TODO(issue/24571): remove '!'.\n _pendingTouched !: boolean;\n\n /** @internal */\n _onCollectionChange = () => {};\n\n /** @internal */\n // TODO(issue/24571): remove '!'.\n _updateOn !: FormHooks;\n\n // TODO(issue/24571): remove '!'.\n private _parent !: FormGroup | FormArray;\n private _asyncValidationSubscription: any;\n\n /**\n * The current value of the control.\n *\n * * For a `FormControl`, the current value.\n * * For an enabled `FormGroup`, the values of enabled controls as an object\n * with a key-value pair for each member of the group.\n * * For a disabled `FormGroup`, the values of all controls as an object\n * with a key-value pair for each member of the group.\n * * For a `FormArray`, the values of enabled controls as an array.\n *\n */\n public readonly value: any;\n\n /**\n * Initialize the AbstractControl instance.\n *\n * @param validator The function that determines the synchronous validity of this control.\n * @param asyncValidator The function that determines the asynchronous validity of this\n * control.\n */\n constructor(public validator: ValidatorFn|null, public asyncValidator: AsyncValidatorFn|null) {}\n\n /**\n * The parent control.\n */\n get parent(): FormGroup|FormArray { return this._parent; }\n\n /**\n * The validation status of the control. There are four possible\n * validation status values:\n *\n * * **VALID**: This control has passed all validation checks.\n * * **INVALID**: This control has failed at least one validation check.\n * * **PENDING**: This control is in the midst of conducting a validation check.\n * * **DISABLED**: This control is exempt from validation checks.\n *\n * These status values are mutually exclusive, so a control cannot be\n * both valid AND invalid or invalid AND disabled.\n */\n // TODO(issue/24571): remove '!'.\n public readonly status !: string;\n\n /**\n * A control is `valid` when its `status` is `VALID`.\n *\n * @see {@link AbstractControl.status}\n *\n * @returns True if the control has passed all of its validation tests,\n * false otherwise.\n */\n get valid(): boolean { return this.status === VALID; }\n\n /**\n * A control is `invalid` when its `status` is `INVALID`.\n *\n * @see {@link AbstractControl.status}\n *\n * @returns True if this control has failed one or more of its validation checks,\n * false otherwise.\n */\n get invalid(): boolean { return this.status === INVALID; }\n\n /**\n * A control is `pending` when its `status` is `PENDING`.\n *\n * @see {@link AbstractControl.status}\n *\n * @returns True if this control is in the process of conducting a validation check,\n * false otherwise.\n */\n get pending(): boolean { return this.status == PENDING; }\n\n /**\n * A control is `disabled` when its `status` is `DISABLED`.\n *\n * Disabled controls are exempt from validation checks and\n * are not included in the aggregate value of their ancestor\n * controls.\n *\n * @see {@link AbstractControl.status}\n *\n * @returns True if the control is disabled, false otherwise.\n */\n get disabled(): boolean { return this.status === DISABLED; }\n\n /**\n * A control is `enabled` as long as its `status` is not `DISABLED`.\n *\n * @returns True if the control has any status other than 'DISABLED',\n * false if the status is 'DISABLED'.\n *\n * @see {@link AbstractControl.status}\n *\n */\n get enabled(): boolean { return this.status !== DISABLED; }\n\n /**\n * An object containing any errors generated by failing validation,\n * or null if there are no errors.\n */\n // TODO(issue/24571): remove '!'.\n public readonly errors !: ValidationErrors | null;\n\n /**\n * A control is `pristine` if the user has not yet changed\n * the value in the UI.\n *\n * @returns True if the user has not yet changed the value in the UI; compare `dirty`.\n * Programmatic changes to a control's value do not mark it dirty.\n */\n public readonly pristine: boolean = true;\n\n /**\n * A control is `dirty` if the user has changed the value\n * in the UI.\n *\n * @returns True if the user has changed the value of this control in the UI; compare `pristine`.\n * Programmatic changes to a control's value do not mark it dirty.\n */\n get dirty(): boolean { return !this.pristine; }\n\n /**\n * True if the control is marked as `touched`.\n *\n * A control is marked `touched` once the user has triggered\n * a `blur` event on it.\n */\n public readonly touched: boolean = false;\n\n /**\n * True if the control has not been marked as touched\n *\n * A control is `untouched` if the user has not yet triggered\n * a `blur` event on it.\n */\n get untouched(): boolean { return !this.touched; }\n\n /**\n * A multicasting observable that emits an event every time the value of the control changes, in\n * the UI or programmatically.\n */\n // TODO(issue/24571): remove '!'.\n public readonly valueChanges !: Observable<any>;\n\n /**\n * A multicasting observable that emits an event every time the validation `status` of the control\n * recalculates.\n *\n * @see {@link AbstractControl.status}\n *\n */\n // TODO(issue/24571): remove '!'.\n public readonly statusChanges !: Observable<any>;\n\n /**\n * Reports the update strategy of the `AbstractControl` (meaning\n * the event on which the control updates itself).\n * Possible values: `'change'` | `'blur'` | `'submit'`\n * Default value: `'change'`\n */\n get updateOn(): FormHooks {\n return this._updateOn ? this._updateOn : (this.parent ? this.parent.updateOn : 'change');\n }\n\n /**\n * Sets the synchronous validators that are active on this control. Calling\n * this overwrites any existing sync validators.\n */\n setValidators(newValidator: ValidatorFn|ValidatorFn[]|null): void {\n this.validator = coerceToValidator(newValidator);\n }\n\n /**\n * Sets the async validators that are active on this control. Calling this\n * overwrites any existing async validators.\n */\n setAsyncValidators(newValidator: AsyncValidatorFn|AsyncValidatorFn[]|null): void {\n this.asyncValidator = coerceToAsyncValidator(newValidator);\n }\n\n /**\n * Empties out the sync validator list.\n */\n clearValidators(): void { this.validator = null; }\n\n /**\n * Empties out the async validator list.\n */\n clearAsyncValidators(): void { this.asyncValidator = null; }\n\n /**\n * Marks the control as `touched`. A control is touched by focus and\n * blur events that do not change the value.\n *\n * @see `markAsUntouched()`\n * @see `markAsDirty()`\n * @see `markAsPristine()`\n *\n * @param opts Configuration options that determine how the control propagates changes\n * and emits events events after marking is applied.\n * * `onlySelf`: When true, mark only this control. When false or not supplied,\n * marks all direct ancestors. Default is false.\n */\n markAsTouched(opts: {onlySelf?: boolean} = {}): void {\n (this as{touched: boolean}).touched = true;\n\n if (this._parent && !opts.onlySelf) {\n this._parent.markAsTouched(opts);\n }\n }\n\n /**\n * Marks the control and all its descendant controls as `touched`.\n * @see `markAsTouched()`\n */\n markAllAsTouched(): void {\n this.markAsTouched({onlySelf: true});\n\n this._forEachChild((control: AbstractControl) => control.markAllAsTouched());\n }\n\n /**\n * Marks the control as `untouched`.\n *\n * If the control has any children, also marks all children as `untouched`\n * and recalculates the `touched` status of all parent controls.\n *\n * @see `markAsTouched()`\n * @see `markAsDirty()`\n * @see `markAsPristine()`\n *\n * @param opts Configuration options that determine how the control propagates changes\n * and emits events after the marking is applied.\n * * `onlySelf`: When true, mark only this control. When false or not supplied,\n * marks all direct ancestors. Default is false.\n */\n markAsUntouched(opts: {onlySelf?: boolean} = {}): void {\n (this as{touched: boolean}).touched = false;\n this._pendingTouched = false;\n\n this._forEachChild(\n (control: AbstractControl) => { control.markAsUntouched({onlySelf: true}); });\n\n if (this._parent && !opts.onlySelf) {\n this._parent._updateTouched(opts);\n }\n }\n\n /**\n * Marks the control as `dirty`. A control becomes dirty when\n * the control's value is changed through the UI; compare `markAsTouched`.\n *\n * @see `markAsTouched()`\n * @see `markAsUntouched()`\n * @see `markAsPristine()`\n *\n * @param opts Configuration options that determine how the control propagates changes\n * and emits events after marking is applied.\n * * `onlySelf`: When true, mark only this control. When false or not supplied,\n * marks all direct ancestors. Default is false.\n */\n markAsDirty(opts: {onlySelf?: boolean} = {}): void {\n (this as{pristine: boolean}).pristine = false;\n\n if (this._parent && !opts.onlySelf) {\n this._parent.markAsDirty(opts);\n }\n }\n\n /**\n * Marks the control as `pristine`.\n *\n * If the control has any children, marks all children as `pristine`,\n * and recalculates the `pristine` status of all parent\n * controls.\n *\n * @see `markAsTouched()`\n * @see `markAsUntouched()`\n * @see `markAsDirty()`\n *\n * @param opts Configuration options that determine how the control emits events after\n * marking is applied.\n * * `onlySelf`: When true, mark only this control. When false or not supplied,\n * marks all direct ancestors. Default is false..\n */\n markAsPristine(opts: {onlySelf?: boolean} = {}): void {\n (this as{pristine: boolean}).pristine = true;\n this._pendingDirty = false;\n\n this._forEachChild((control: AbstractControl) => { control.markAsPristine({onlySelf: true}); });\n\n if (this._parent && !opts.onlySelf) {\n this._parent._updatePristine(opts);\n }\n }\n\n /**\n * Marks the control as `pending`.\n *\n * A control is pending while the control performs async validation.\n *\n * @see {@link AbstractControl.status}\n *\n * @param opts Configuration options that determine how the control propagates changes and\n * emits events after marking is applied.\n * * `onlySelf`: When true, mark only this control. When false or not supplied,\n * marks all direct ancestors. Default is false..\n * * `emitEvent`: When true or not supplied (the default), the `statusChanges`\n * observable emits an event with the latest status the control is marked pending.\n * When false, no events are emitted.\n *\n */\n markAsPending(opts: {onlySelf?: boolean, emitEvent?: boolean} = {}): void {\n (this as{status: string}).status = PENDING;\n\n if (opts.emitEvent !== false) {\n (this.statusChanges as EventEmitter<any>).emit(this.status);\n }\n\n if (this._parent && !opts.onlySelf) {\n this._parent.markAsPending(opts);\n }\n }\n\n /**\n * Disables the control. This means the control is exempt from validation checks and\n * excluded from the aggregate value of any parent. Its status is `DISABLED`.\n *\n * If the control has children, all children are also disabled.\n *\n * @see {@link AbstractControl.status}\n *\n * @param opts Configuration options that determine how the control propagates\n * changes and emits events after the control is disabled.\n * * `onlySelf`: When true, mark only this control. When false or not supplied,\n * marks all direct ancestors. Default is false..\n * * `emitEvent`: When true or not supplied (the default), both the `statusChanges` and\n * `valueChanges`\n * observables emit events with the latest status and value when the control is disabled.\n * When false, no events are emitted.\n */\n disable(opts: {onlySelf?: boolean, emitEvent?: boolean} = {}): void {\n // If parent has been marked artificially dirty we don't want to re-calculate the\n // parent's dirtiness based on the children.\n const skipPristineCheck = this._parentMarkedDirty(opts.onlySelf);\n\n (this as{status: string}).status = DISABLED;\n (this as{errors: ValidationErrors | null}).errors = null;\n this._forEachChild(\n (control: AbstractControl) => { control.disable({...opts, onlySelf: true}); });\n this._updateValue();\n\n if (opts.emitEvent !== false) {\n (this.valueChanges as EventEmitter<any>).emit(this.value);\n (this.statusChanges as EventEmitter<string>).emit(this.status);\n }\n\n this._updateAncestors({...opts, skipPristineCheck});\n this._onDisabledChange.forEach((changeFn) => changeFn(true));\n }\n\n /**\n * Enables the control. This means the control is included in validation checks and\n * the aggregate value of its parent. Its status recalculates based on its value and\n * its validators.\n *\n * By default, if the control has children, all children are enabled.\n *\n * @see {@link AbstractControl.status}\n *\n * @param opts Configure options that control how the control propagates changes and\n * emits events when marked as untouched\n * * `onlySelf`: When true, mark only this control. When false or not supplied,\n * marks all direct ancestors. Default is false..\n * * `emitEvent`: When true or not supplied (the default), both the `statusChanges` and\n * `valueChanges`\n * observables emit events with the latest status and value when the control is enabled.\n * When false, no events are emitted.\n */\n enable(opts: {onlySelf?: boolean, emitEvent?: boolean} = {}): void {\n // If parent has been marked artificially dirty we don't want to re-calculate the\n // parent's dirtiness based on the children.\n const skipPristineCheck = this._parentMarkedDirty(opts.onlySelf);\n\n (this as{status: string}).status = VALID;\n this._forEachChild(\n (control: AbstractControl) => { control.enable({...opts, onlySelf: true}); });\n this.updateValueAndValidity({onlySelf: true, emitEvent: opts.emitEvent});\n\n this._updateAncestors({...opts, skipPristineCheck});\n this._onDisabledChange.forEach((changeFn) => changeFn(false));\n }\n\n private _updateAncestors(\n opts: {onlySelf?: boolean, emitEvent?: boolean, skipPristineCheck?: boolean}) {\n if (this._parent && !opts.onlySelf) {\n this._parent.updateValueAndValidity(opts);\n if (!opts.skipPristineCheck) {\n this._parent._updatePristine();\n }\n this._parent._updateTouched();\n }\n }\n\n /**\n * @param parent Sets the parent of the control\n */\n setParent(parent: FormGroup|FormArray): void { this._parent = parent; }\n\n /**\n * Sets the value of the control. Abstract method (implemented in sub-classes).\n */\n abstract setValue(value: any, options?: Object): void;\n\n /**\n * Patches the value of the control. Abstract method (implemented in sub-classes).\n */\n abstract patchValue(value: any, options?: Object): void;\n\n /**\n * Resets the control. Abstract method (implemented in sub-classes).\n */\n abstract reset(value?: any, options?: Object): void;\n\n /**\n * Recalculates the value and validation status of the control.\n *\n * By default, it also updates the value and validity of its ancestors.\n *\n * @param opts Configuration options determine how the control propagates changes and emits events\n * after updates and validity checks are applied.\n * * `onlySelf`: When true, only update this control. When false or not supplied,\n * update all direct ancestors. Default is false..\n * * `emitEvent`: When true or not supplied (the default), both the `statusChanges` and\n * `valueChanges`\n * observables emit events with the latest status and value when the control is updated.\n * When false, no events are emitted.\n */\n updateValueAndValidity(opts: {onlySelf?: boolean, emitEvent?: boolean} = {}): void {\n this._setInitialStatus();\n this._updateValue();\n\n if (this.enabled) {\n this._cancelExistingSubscription();\n (this as{errors: ValidationErrors | null}).errors = this._runValidator();\n (this as{status: string}).status = this._calculateStatus();\n\n if (this.status === VALID || this.status === PENDING) {\n this._runAsyncValidator(opts.emitEvent);\n }\n }\n\n if (opts.emitEvent !== false) {\n (this.valueChanges as EventEmitter<any>).emit(this.value);\n (this.statusChanges as EventEmitter<string>).emit(this.status);\n }\n\n if (this._parent && !opts.onlySelf) {\n this._parent.updateValueAndValidity(opts);\n }\n }\n\n /** @internal */\n _updateTreeValidity(opts: {emitEvent?: boolean} = {emitEvent: true}) {\n this._forEachChild((ctrl: AbstractControl) => ctrl._updateTreeValidity(opts));\n this.updateValueAndValidity({onlySelf: true, emitEvent: opts.emitEvent});\n }\n\n private _setInitialStatus() {\n (this as{status: string}).status = this._allControlsDisabled() ? DISABLED : VALID;\n }\n\n private _runValidator(): ValidationErrors|null {\n return this.validator ? this.validator(this) : null;\n }\n\n private _runAsyncValidator(emitEvent?: boolean): void {\n if (this.asyncValidator) {\n (this as{status: string}).status = PENDING;\n const obs = toObservable(this.asyncValidator(this));\n this._asyncValidationSubscription =\n obs.subscribe((errors: ValidationErrors | null) => this.setErrors(errors, {emitEvent}));\n }\n }\n\n private _cancelExistingSubscription(): void {\n if (this._asyncValidationSubscription) {\n this._asyncValidationSubscription.unsubscribe();\n }\n }\n\n /**\n * Sets errors on a form control when running validations manually, rather than automatically.\n *\n * Calling `setErrors` also updates the validity of the parent control.\n *\n * @usageNotes\n * ### Manually set the errors for a control\n *\n * ```\n * const login = new FormControl('someLogin');\n * login.setErrors({\n * notUnique: true\n * });\n *\n * expect(login.valid).toEqual(false);\n * expect(login.errors).toEqual({ notUnique: true });\n *\n * login.setValue('someOtherLogin');\n *\n * expect(login.valid).toEqual(true);\n * ```\n */\n setErrors(errors: ValidationErrors|null, opts: {emitEvent?: boolean} = {}): void {\n (this as{errors: ValidationErrors | null}).errors = errors;\n this._updateControlsErrors(opts.emitEvent !== false);\n }\n\n /**\n * Retrieves a child control given the control's name or path.\n *\n * @param path A dot-delimited string or array of string/number values that define the path to the\n * control.\n *\n * @usageNotes\n * ### Retrieve a nested control\n *\n * For example, to get a `name` control nested within a `person` sub-group:\n *\n * * `this.form.get('person.name');`\n *\n * -OR-\n *\n * * `this.form.get(['person', 'name']);`\n */\n get(path: Array<string|number>|string): AbstractControl|null { return _find(this, path, '.'); }\n\n /**\n * @description\n * Reports error data for the control with the given path.\n *\n * @param errorCode The code of the error to check\n * @param path A list of control names that designates how to move from the current control\n * to the control that should be queried for errors.\n *\n * @usageNotes\n * For example, for the following `FormGroup`:\n *\n * ```\n * form = new FormGroup({\n * address: new FormGroup({ street: new FormControl() })\n * });\n * ```\n *\n * The path to the 'street' control from the root form would be 'address' -> 'street'.\n *\n * It can be provided to this method in one of two formats:\n *\n * 1. An array of string control names, e.g. `['address', 'street']`\n * 1. A period-delimited list of control names in one string, e.g. `'address.street'`\n *\n * @returns error data for that particular error. If the control or error is not present,\n * null is returned.\n */\n getError(errorCode: string, path?: Array<string|number>|string): any {\n const control = path ? this.get(path) : this;\n return control && control.errors ? control.errors[errorCode] : null;\n }\n\n /**\n * @description\n * Reports whether the control with the given path has the error specified.\n *\n * @param errorCode The code of the error to check\n * @param path A list of control names that designates how to move from the current control\n * to the control that should be queried for errors.\n *\n * @usageNotes\n * For example, for the following `FormGroup`:\n *\n * ```\n * form = new FormGroup({\n * address: new FormGroup({ street: new FormControl() })\n * });\n * ```\n *\n * The path to the 'street' control from the root form would be 'address' -> 'street'.\n *\n * It can be provided to this method in one of two formats:\n *\n * 1. An array of string control names, e.g. `['address', 'street']`\n * 1. A period-delimited list of control names in one string, e.g. `'address.street'`\n *\n * If no path is given, this method checks for the error on the current control.\n *\n * @returns whether the given error is present in the control at the given path.\n *\n * If the control is not present, false is returned.\n */\n hasError(errorCode: string, path?: Array<string|number>|string): boolean {\n return !!this.getError(errorCode, path);\n }\n\n /**\n * Retrieves the top-level ancestor of this control.\n */\n get root(): AbstractControl {\n let x: AbstractControl = this;\n\n while (x._parent) {\n x = x._parent;\n }\n\n return x;\n }\n\n /** @internal */\n _updateControlsErrors(emitEvent: boolean): void {\n (this as{status: string}).status = this._calculateStatus();\n\n if (emitEvent) {\n (this.statusChanges as EventEmitter<string>).emit(this.status);\n }\n\n if (this._parent) {\n this._parent._updateControlsErrors(emitEvent);\n }\n }\n\n /** @internal */\n _initObservables() {\n (this as{valueChanges: Observable<any>}).valueChanges = new EventEmitter();\n (this as{statusChanges: Observable<any>}).statusChanges = new EventEmitter();\n }\n\n\n private _calculateStatus(): string {\n if (this._allControlsDisabled()) return DISABLED;\n if (this.errors) return INVALID;\n if (this._anyControlsHaveStatus(PENDING)) return PENDING;\n if (this._anyControlsHaveStatus(INVALID)) return INVALID;\n return VALID;\n }\n\n /** @internal */\n abstract _updateValue(): void;\n\n /** @internal */\n abstract _forEachChild(cb: Function): void;\n\n /** @internal */\n abstract _anyControls(condition: Function): boolean;\n\n /** @internal */\n abstract _allControlsDisabled(): boolean;\n\n /** @internal */\n abstract _syncPendingControls(): boolean;\n\n /** @internal */\n _anyControlsHaveStatus(status: string): boolean {\n return this._anyControls((control: AbstractControl) => control.status === status);\n }\n\n /** @internal */\n _anyControlsDirty(): boolean {\n return this._anyControls((control: AbstractControl) => control.dirty);\n }\n\n /** @internal */\n _anyControlsTouched(): boolean {\n return this._anyControls((control: AbstractControl) => control.touched);\n }\n\n /** @internal */\n _updatePristine(opts: {onlySelf?: boolean} = {}): void {\n (this as{pristine: boolean}).pristine = !this._anyControlsDirty();\n\n if (this._parent && !opts.onlySelf) {\n this._parent._updatePristine(opts);\n }\n }\n\n /** @internal */\n _updateTouched(opts: {onlySelf?: boolean} = {}): void {\n (this as{touched: boolean}).touched = this._anyControlsTouched();\n\n if (this._parent && !opts.onlySelf) {\n this._parent._updateTouched(opts);\n }\n }\n\n /** @internal */\n _onDisabledChange: Function[] = [];\n\n /** @internal */\n _isBoxedValue(formState: any): boolean {\n return typeof formState === 'object' && formState !== null &&\n Object.keys(formState).length === 2 && 'value' in formState && 'disabled' in formState;\n }\n\n /** @internal */\n _registerOnCollectionChange(fn: () => void): void { this._onCollectionChange = fn; }\n\n /** @internal */\n _setUpdateStrategy(opts?: ValidatorFn|ValidatorFn[]|AbstractControlOptions|null): void {\n if (isOptionsObj(opts) && (opts as AbstractControlOptions).updateOn != null) {\n this._updateOn = (opts as AbstractControlOptions).updateOn !;\n }\n }\n\n /**\n * Check to see if parent has been marked artificially dirty.\n *\n * @internal\n */\n private _parentMarkedDirty(onlySelf?: boolean): boolean {\n const parentDirty = this._parent && this._parent.dirty;\n return !onlySelf && parentDirty && !this._parent._anyControlsDirty();\n }\n}\n\n/**\n * Tracks the value and validation status of an individual form control.\n *\n * This is one of the three fundamental building blocks of Angular forms, along with\n * `FormGroup` and `FormArray`. It extends the `AbstractControl` class that\n * implements most of the base functionality for accessing the value, validation status,\n * user interactions and events.\n *\n * @see `AbstractControl`\n * @see [Reactive Forms Guide](guide/reactive-forms)\n * @see [Usage Notes](#usage-notes)\n *\n * @usageNotes\n *\n * ### Initializing Form Controls\n *\n * Instantiate a `FormControl`, with an initial value.\n *\n * ```ts\n * const control = new FormControl('some value');\n * console.log(control.value); // 'some value'\n *```\n *\n * The following example initializes the control with a form state object. The `value`\n * and `disabled` keys are required in this case.\n *\n * ```ts\n * const control = new FormControl({ value: 'n/a', disabled: true });\n * console.log(control.value); // 'n/a'\n * console.log(control.status); // 'DISABLED'\n * ```\n *\n * The following example initializes the control with a sync validator.\n *\n * ```ts\n * const control = new FormControl('', Validators.required);\n * console.log(control.value); // ''\n * console.log(control.status); // 'INVALID'\n * ```\n *\n * The following example initializes the control using an options object.\n *\n * ```ts\n * const control = new FormControl('', {\n * validators: Validators.required,\n * asyncValidators: myAsyncValidator\n * });\n * ```\n *\n * ### Configure the control to update on a blur event\n *\n * Set the `updateOn` option to `'blur'` to update on the blur `event`.\n *\n * ```ts\n * const control = new FormControl('', { updateOn: 'blur' });\n * ```\n *\n * ### Configure the control to update on a submit event\n *\n * Set the `updateOn` option to `'submit'` to update on a submit `event`.\n *\n * ```ts\n * const control = new FormControl('', { updateOn: 'submit' });\n * ```\n *\n * ### Reset the control back to an initial value\n *\n * You reset to a specific form state by passing through a standalone\n * value or a form state object that contains both a value and a disabled state\n * (these are the only two properties that cannot be calculated).\n *\n * ```ts\n * const control = new FormControl('Nancy');\n *\n * console.log(control.value); // 'Nancy'\n *\n * control.reset('Drew');\n *\n * console.log(control.value); // 'Drew'\n * ```\n *\n * ### Reset the control back to an initial value and disabled\n *\n * ```\n * const control = new FormControl('Nancy');\n *\n * console.log(control.value); // 'Nancy'\n * console.log(control.status); // 'VALID'\n *\n * control.reset({ value: 'Drew', disabled: true });\n *\n * console.log(control.value); // 'Drew'\n * console.log(control.status); // 'DISABLED'\n * ```\n *\n * @publicApi\n */\nexport class FormControl extends AbstractControl {\n /** @internal */\n _onChange: Function[] = [];\n\n /** @internal */\n _pendingValue: any;\n\n /** @internal */\n _pendingChange: any;\n\n /**\n * Creates a new `FormControl` instance.\n *\n * @param formState Initializes the control with an initial value,\n * or an object that defines the initial value and disabled state.\n *\n * @param validatorOrOpts A synchronous validator function, or an array of\n * such functions, or an `AbstractControlOptions` object that contains validation functions\n * and a validation trigger.\n *\n * @param asyncValidator A single async validator or array of async validator functions\n *\n */\n constructor(\n formState: any = null,\n validatorOrOpts?: ValidatorFn|ValidatorFn[]|AbstractControlOptions|null,\n asyncValidator?: AsyncValidatorFn|AsyncValidatorFn[]|null) {\n super(\n coerceToValidator(validatorOrOpts),\n coerceToAsyncValidator(asyncValidator, validatorOrOpts));\n this._applyFormState(formState);\n this._setUpdateStrategy(validatorOrOpts);\n this.updateValueAndValidity({onlySelf: true, emitEvent: false});\n this._initObservables();\n }\n\n /**\n * Sets a new value for the form control.\n *\n * @param value The new value for the control.\n * @param options Configuration options that determine how the control propagates changes\n * and emits events when the value changes.\n * The configuration options are passed to the {@link AbstractControl#updateValueAndValidity\n * updateValueAndValidity} method.\n *\n * * `onlySelf`: When true, each change only affects this control, and not its parent. Default is\n * false.\n * * `emitEvent`: When true or not supplied (the default), both the `statusChanges` and\n * `valueChanges`\n * observables emit events with the latest status and value when the control value is updated.\n * When false, no events are emitted.\n * * `emitModelToViewChange`: When true or not supplied (the default), each change triggers an\n * `onChange` event to\n * update the view.\n * * `emitViewToModelChange`: When true or not supplied (the default), each change triggers an\n * `ngModelChange`\n * event to update the model.\n *\n */\n setValue(value: any, options: {\n onlySelf?: boolean,\n emitEvent?: boolean,\n emitModelToViewChange?: boolean,\n emitViewToModelChange?: boolean\n } = {}): void {\n (this as{value: any}).value = this._pendingValue = value;\n if (this._onChange.length && options.emitModelToViewChange !== false) {\n this._onChange.forEach(\n (changeFn) => changeFn(this.value, options.emitViewToModelChange !== false));\n }\n this.updateValueAndValidity(options);\n }\n\n /**\n * Patches the value of a control.\n *\n * This function is functionally the same as {@link FormControl#setValue setValue} at this level.\n * It exists for symmetry with {@link FormGroup#patchValue patchValue} on `FormGroups` and\n * `FormArrays`, where it does behave differently.\n *\n * @see `setValue` for options\n */\n patchValue(value: any, options: {\n onlySelf?: boolean,\n emitEvent?: boolean,\n emitModelToViewChange?: boolean,\n emitViewToModelChange?: boolean\n } = {}): void {\n this.setValue(value, options);\n }\n\n /**\n * Resets the form control, marking it `pristine` and `untouched`, and setting\n * the value to null.\n *\n * @param formState Resets the control with an initial value,\n * or an object that defines the initial value and disabled state.\n *\n * @param options Configuration options that determine how the control propagates changes\n * and emits events after the value changes.\n *\n * * `onlySelf`: When true, each change only affects this control, and not its parent. Default is\n * false.\n * * `emitEvent`: When true or not supplied (the default), both the `statusChanges` and\n * `valueChanges`\n * observables emit events with the latest status and value when the control is reset.\n * When false, no events are emitted.\n *\n */\n reset(formState: any = null, options: {onlySelf?: boolean, emitEvent?: boolean} = {}): void {\n this._applyFormState(formState);\n this.markAsPristine(options);\n this.markAsUntouched(options);\n this.setValue(this.value, options);\n this._pendingChange = false;\n }\n\n /**\n * @internal\n */\n _updateValue() {}\n\n /**\n * @internal\n */\n _anyControls(condition: Function): boolean { return false; }\n\n /**\n * @internal\n */\n _allControlsDisabled(): boolean { return this.disabled; }\n\n /**\n * Register a listener for change events.\n *\n * @param fn The method that is called when the value changes\n */\n registerOnChange(fn: Function): void { this._onChange.push(fn); }\n\n /**\n * @internal\n */\n _clearChangeFns(): void {\n this._onChange = [];\n this._onDisabledChange = [];\n this._onCollectionChange = () => {};\n }\n\n /**\n * Register a listener for disabled events.\n *\n * @param fn The method that is called when the disabled status changes.\n */\n registerOnDisabledChange(fn: (isDisabled: boolean) => void): void {\n this._onDisabledChange.push(fn);\n }\n\n /**\n * @internal\n */\n _forEachChild(cb: Function): void {}\n\n /** @internal */\n _syncPendingControls(): boolean {\n if (this.updateOn === 'submit') {\n if (this._pendingDirty) this.markAsDirty();\n if (this._pendingTouched) this.markAsTouched();\n if (this._pendingChange) {\n this.setValue(this._pendingValue, {onlySelf: true, emitModelToViewChange: false});\n return true;\n }\n }\n return false;\n }\n\n private _applyFormState(formState: any) {\n if (this._isBoxedValue(formState)) {\n (this as{value: any}).value = this._pendingValue = formState.value;\n formState.disabled ? this.disable({onlySelf: true, emitEvent: false}) :\n this.enable({onlySelf: true, emitEvent: false});\n } else {\n (this as{value: any}).value = this._pendingValue = formState;\n }\n }\n}\n\n/**\n * Tracks the value and validity state of a group of `FormControl` instances.\n *\n * A `FormGroup` aggregates the values of each child `FormControl` into one object,\n * with each control name as the key. It calculates its status by reducing the status values\n * of its children. For example, if one of the controls in a group is invalid, the entire\n * group becomes invalid.\n *\n * `FormGroup` is one of the three fundamental building blocks used to define forms in Angular,\n * along with `FormControl` and `FormArray`.\n *\n * When instantiating a `FormGroup`, pass in a collection of child controls as the first\n * argument. The key for each child registers the name for the control.\n *\n * @usageNotes\n *\n * ### Create a form group with 2 controls\n *\n * ```\n * const form = new FormGroup({\n * first: new FormControl('Nancy', Validators.minLength(2)),\n * last: new FormControl('Drew'),\n * });\n *\n * console.log(form.value); // {first: 'Nancy', last; 'Drew'}\n * console.log(form.status); // 'VALID'\n * ```\n *\n * ### Create a form group with a group-level validator\n *\n * You include group-level validators as the second arg, or group-level async\n * validators as the third arg. These come in handy when you want to perform validation\n * that considers the value of more than one child control.\n *\n * ```\n * const form = new FormGroup({\n * password: new FormControl('', Validators.minLength(2)),\n * passwordConfirm: new FormControl('', Validators.minLength(2)),\n * }, passwordMatchValidator);\n *\n *\n * function passwordMatchValidator(g: FormGroup) {\n * return g.get('password').value === g.get('passwordConfirm').value\n * ? null : {'mismatch': true};\n * }\n * ```\n *\n * Like `FormControl` instances, you choose to pass in\n * validators and async validators as part of an options object.\n *\n * ```\n * const form = new FormGroup({\n * password: new FormControl('')\n * passwordConfirm: new FormControl('')\n * }, { validators: passwordMatchValidator, asyncValidators: otherValidator });\n * ```\n *\n * ### Set the updateOn property for all controls in a form group\n *\n * The options object is used to set a default value for each child\n * control's `updateOn` property. If you set `updateOn` to `'blur'` at the\n * group level, all child controls default to 'blur', unless the child\n * has explicitly specified a different `updateOn` value.\n *\n * ```ts\n * const c = new FormGroup({\n * one: new FormControl()\n * }, { updateOn: 'blur' });\n * ```\n *\n * @publicApi\n */\nexport class FormGroup extends AbstractControl {\n /**\n * Creates a new `FormGroup` instance.\n *\n * @param controls A collection of child controls. The key for each child is the name\n * under which it is registered.\n *\n * @param validatorOrOpts A synchronous validator function, or an array of\n * such functions, or an `AbstractControlOptions` object that contains validation functions\n * and a validation trigger.\n *\n * @param asyncValidator A single async validator or array of async validator functions\n *\n */\n constructor(\n public controls: {[key: string]: AbstractControl},\n validatorOrOpts?: ValidatorFn|ValidatorFn[]|AbstractControlOptions|null,\n asyncValidator?: AsyncValidatorFn|AsyncValidatorFn[]|null) {\n super(\n coerceToValidator(validatorOrOpts),\n coerceToAsyncValidator(asyncValidator, validatorOrOpts));\n this._initObservables();\n this._setUpdateStrategy(validatorOrOpts);\n this._setUpControls();\n this.updateValueAndValidity({onlySelf: true, emitEvent: false});\n }\n\n /**\n * Registers a control with the group's list of controls.\n *\n * This method does not update the value or validity of the control.\n * Use {@link FormGroup#addControl addControl} instead.\n *\n * @param name The control name to register in the collection\n * @param control Provides the control for the given name\n */\n registerControl(name: string, control: AbstractControl): AbstractControl {\n if (this.controls[name]) return this.controls[name];\n this.controls[name] = control;\n control.setParent(this);\n control._registerOnCollectionChange(this._onCollectionChange);\n return control;\n }\n\n /**\n * Add a control to this group.\n *\n * This method also updates the value and validity of the control.\n *\n * @param name The control name to add to the collection\n * @param control Provides the control for the given name\n */\n addControl(name: string, control: AbstractControl): void {\n this.registerControl(name, control);\n this.updateValueAndValidity();\n this._onCollectionChange();\n }\n\n /**\n * Remove a control from this group.\n *\n * @param name The control name to remove from the collection\n */\n removeControl(name: string): void {\n if (this.controls[name]) this.controls[name]._registerOnCollectionChange(() => {});\n delete (this.controls[name]);\n this.updateValueAndValidity();\n this._onCollectionChange();\n }\n\n /**\n * Replace an existing control.\n *\n * @param name The control name to replace in the collection\n * @param control Provides the control for the given name\n */\n setControl(name: string, control: AbstractControl): void {\n if (this.controls[name]) this.controls[name]._registerOnCollectionChange(() => {});\n delete (this.controls[name]);\n if (control) this.registerControl(name, control);\n this.updateValueAndValidity();\n this._onCollectionChange();\n }\n\n /**\n * Check whether there is an enabled control with the given name in the group.\n *\n * Reports false for disabled controls. If you'd like to check for existence in the group\n * only, use {@link AbstractControl#get get} instead.\n *\n * @param name The control name to check for existence in the collection\n *\n * @returns false for disabled controls, true otherwise.\n */\n contains(controlName: string): boolean {\n return this.controls.hasOwnProperty(controlName) && this.controls[controlName].enabled;\n }\n\n /**\n * Sets the value of the `FormGroup`. It accepts an object that matches\n * the structure of the group, with control names as keys.\n *\n * @usageNotes\n * ### Set the complete value for the form group\n *\n * ```\n * const form = new FormGroup({\n * first: new FormControl(),\n * last: new FormControl()\n * });\n *\n * console.log(form.value); // {first: null, last: null}\n *\n * form.setValue({first: 'Nancy', last: 'Drew'});\n * console.log(form.value); // {first: 'Nancy', last: 'Drew'}\n * ```\n *\n * @throws When strict checks fail, such as setting the value of a control\n * that doesn't exist or if you excluding the value of a control.\n *\n * @param value The new value for the control that matches the structure of the group.\n * @param options Configuration options that determine how the control propagates changes\n * and emits events after the value changes.\n * The configuration options are passed to the {@link AbstractControl#updateValueAndValidity\n * updateValueAndValidity} method.\n *\n * * `onlySelf`: When true, each change only affects this control, and not its parent. Default is\n * false.\n * * `emitEvent`: When true or not supplied (the default), both the `statusChanges` and\n * `valueChanges`\n * observables emit events with the latest status and value when the control value is updated.\n * When false, no events are emitted.\n */\n setValue(value: {[key: string]: any}, options: {onlySelf?: boolean, emitEvent?: boolean} = {}):\n void {\n this._checkAllValuesPresent(value);\n Object.keys(value).forEach(name => {\n this._throwIfControlMissing(name);\n this.controls[name].setValue(value[name], {onlySelf: true, emitEvent: options.emitEvent});\n });\n this.updateValueAndValidity(options);\n }\n\n /**\n * Patches the value of the `FormGroup`. It accepts an object with control\n * names as keys, and does its best to match the values to the correct controls\n * in the group.\n *\n * It accepts both super-sets and sub-sets of the group without throwing an error.\n *\n * @usageNotes\n * ### Patch the value for a form group\n *\n * ```\n * const form = new FormGroup({\n * first: new FormControl(),\n * last: new FormControl()\n * });\n * console.log(form.value); // {first: null, last: null}\n *\n * form.patchValue({first: 'Nancy'});\n * console.log(form.value); // {first: 'Nancy', last: null}\n * ```\n *\n * @param value The object that matches the structure of the group.\n * @param options Configuration options that determine how the control propagates changes and\n * emits events after the value is patched.\n * * `onlySelf`: When true, each change only affects this control and not its parent. Default is\n * true.\n * * `emitEvent`: When true or not supplied (the default), both the `statusChanges` and\n * `valueChanges`\n * observables emit events with the latest status and value when the control value is updated.\n * When false, no events are emitted.\n * The configuration options are passed to the {@link AbstractControl#updateValueAndValidity\n * updateValueAndValidity} method.\n */\n patchValue(value: {[key: string]: any}, options: {onlySelf?: boolean, emitEvent?: boolean} = {}):\n void {\n Object.keys(value).forEach(name => {\n if (this.controls[name]) {\n this.controls[name].patchValue(value[name], {onlySelf: true, emitEvent: options.emitEvent});\n }\n });\n this.updateValueAndValidity(options);\n }\n\n /**\n * Resets the `FormGroup`, marks all descendants are marked `pristine` and `untouched`, and\n * the value of all descendants to null.\n *\n * You reset to a specific form state by passing in a map of states\n * that matches the structure of your form, with control names as keys. The state\n * is a standalone value or a form state object with both a value and a disabled\n * status.\n *\n * @param formState Resets the control with an initial value,\n * or an object that defines the initial value and disabled state.\n *\n * @param options Configuration options that determine how the control propagates changes\n * and emits events when the group is reset.\n * * `onlySelf`: When true, each change only affects this control, and not its parent. Default is\n * false.\n * * `emitEvent`: When true or not supplied (the default), both the `statusChanges` and\n * `valueChanges`\n * observables emit events with the latest status and value when the control is reset.\n * When false, no events are emitted.\n * The configuration options are passed to the {@link AbstractControl#updateValueAndValidity\n * updateValueAndValidity} method.\n *\n * @usageNotes\n *\n * ### Reset the form group values\n *\n * ```ts\n * const form = new FormGroup({\n * first: new FormControl('first name'),\n * last: new FormControl('last name')\n * });\n *\n * console.log(form.value); // {first: 'first name', last: 'last name'}\n *\n * form.reset({ first: 'name', last: 'last name' });\n *\n * console.log(form.value); // {first: 'name', last: 'last name'}\n * ```\n *\n * ### Reset the form group values and disabled status\n *\n * ```\n * const form = new FormGroup({\n * first: new FormControl('first name'),\n * last: new FormControl('last name')\n * });\n *\n * form.reset({\n * first: {value: 'name', disabled: true},\n * last: 'last'\n * });\n *\n * console.log(this.form.value); // {first: 'name', last: 'last name'}\n * console.log(this.form.get('first').status); // 'DISABLED'\n * ```\n */\n reset(value: any = {}, options: {onlySelf?: boolean, emitEvent?: boolean} = {}): void {\n this._forEachChild((control: AbstractControl, name: string) => {\n control.reset(value[name], {onlySelf: true, emitEvent: options.emitEvent});\n });\n this._updatePristine(options);\n this._updateTouched(options);\n this.updateValueAndValidity(options);\n }\n\n /**\n * The aggregate value of the `FormGroup`, including any disabled controls.\n *\n * Retrieves all values regardless of disabled status.\n * The `value` property is the best way to get the value of the group, because\n * it excludes disabled controls in the `FormGroup`.\n */\n getRawValue(): any {\n return this._reduceChildren(\n {}, (acc: {[k: string]: AbstractControl}, control: AbstractControl, name: string) => {\n acc[name] = control instanceof FormControl ? control.value : (<any>control).getRawValue();\n return acc;\n });\n }\n\n /** @internal */\n _syncPendingControls(): boolean {\n let subtreeUpdated = this._reduceChildren(false, (updated: boolean, child: AbstractControl) => {\n return child._syncPendingControls() ? true : updated;\n });\n if (subtreeUpdated) this.updateValueAndValidity({onlySelf: true});\n return subtreeUpdated;\n }\n\n /** @internal */\n _throwIfControlMissing(name: string): void {\n if (!Object.keys(this.controls).length) {\n throw new Error(`\n There are no form controls registered with this group yet. If you're using ngModel,\n you may want to check next tick (e.g. use setTimeout).\n `);\n }\n if (!this.controls[name]) {\n throw new Error(`Cannot find form control with name: ${name}.`);\n }\n }\n\n /** @internal */\n _forEachChild(cb: (v: any, k: string) => void): void {\n Object.keys(this.controls).forEach(k => cb(this.controls[k], k));\n }\n\n /** @internal */\n _setUpControls(): void {\n this._forEachChild((control: AbstractControl) => {\n control.setParent(this);\n control._registerOnCollectionChange(this._onCollectionChange);\n });\n }\n\n /** @internal */\n _updateValue(): void { (this as{value: any}).value = this._reduceValue(); }\n\n /** @internal */\n _anyControls(condition: Function): boolean {\n let res = false;\n this._forEachChild((control: AbstractControl, name: string) => {\n res = res || (this.contains(name) && condition(control));\n });\n return res;\n }\n\n /** @internal */\n _reduceValue() {\n return this._reduceChildren(\n {}, (acc: {[k: string]: AbstractControl}, control: AbstractControl, name: string) => {\n if (control.enabled || this.disabled) {\n acc[name] = control.value;\n }\n return acc;\n });\n }\n\n /** @internal */\n _reduceChildren(initValue: any, fn: Function) {\n let res = initValue;\n this._forEachChild(\n (control: AbstractControl, name: string) => { res = fn(res, control, name); });\n return res;\n }\n\n /** @internal */\n _allControlsDisabled(): boolean {\n for (const controlName of Object.keys(this.controls)) {\n if (this.controls[controlName].enabled) {\n return false;\n }\n }\n return Object.keys(this.controls).length > 0 || this.disabled;\n }\n\n /** @internal */\n _checkAllValuesPresent(value: any): void {\n this._forEachChild((control: AbstractControl, name: string) => {\n if (value[name] === undefined) {\n throw new Error(`Must supply a value for form control with name: '${name}'.`);\n }\n });\n }\n}\n\n/**\n * Tracks the value and validity state of an array of `FormControl`,\n * `FormGroup` or `FormArray` instances.\n *\n * A `FormArray` aggregates the values of each child `FormControl` into an array.\n * It calculates its status by reducing the status values of its children. For example, if one of\n * the controls in a `FormArray` is invalid, the entire array becomes invalid.\n *\n * `FormArray` is one of the three fundamental building blocks used to define forms in Angular,\n * along with `FormControl` and `FormGroup`.\n *\n * @usageNotes\n *\n * ### Create an array of form controls\n *\n * ```\n * const arr = new FormArray([\n * new FormControl('Nancy', Validators.minLength(2)),\n * new FormControl('Drew'),\n * ]);\n *\n * console.log(arr.value); // ['Nancy', 'Drew']\n * console.log(arr.status); // 'VALID'\n * ```\n *\n * ### Create a form array with array-level validators\n *\n * You include array-level validators and async validators. These come in handy\n * when you want to perform validation that considers the value of more than one child\n * control.\n *\n * The two types of validators are passed in separately as the second and third arg\n * respectively, or together as part of an options object.\n *\n * ```\n * const arr = new FormArray([\n * new FormControl('Nancy'),\n * new FormControl('Drew')\n * ], {validators: myValidator, asyncValidators: myAsyncValidator});\n * ```\n *\n * ### Set the updateOn property for all controls in a form array\n *\n * The options object is used to set a default value for each child\n * control's `updateOn` property. If you set `updateOn` to `'blur'` at the\n * array level, all child controls default to 'blur', unless the child\n * has explicitly specified a different `updateOn` value.\n *\n * ```ts\n * const arr = new FormArray([\n * new FormControl()\n * ], {updateOn: 'blur'});\n * ```\n *\n * ### Adding or removing controls from a form array\n *\n * To change the controls in the array, use the `push`, `insert`, `removeAt` or `clear` methods\n * in `FormArray` itself. These methods ensure the controls are properly tracked in the\n * form's hierarchy. Do not modify the array of `AbstractControl`s used to instantiate\n * the `FormArray` directly, as that result in strange and unexpected behavior such\n * as broken change detection.\n *\n * @publicApi\n */\nexport class FormArray extends AbstractControl {\n /**\n * Creates a new `FormArray` instance.\n *\n * @param controls An array of child controls. Each child control is given an index\n * where it is registered.\n *\n * @param validatorOrOpts A synchronous validator function, or an array of\n * such functions, or an `AbstractControlOptions` object that contains validation functions\n * and a validation trigger.\n *\n * @param asyncValidator A single async validator or array of async validator functions\n *\n */\n constructor(\n public controls: AbstractControl[],\n validatorOrOpts?: ValidatorFn|ValidatorFn[]|AbstractControlOptions|null,\n asyncValidator?: AsyncValidatorFn|AsyncValidatorFn[]|null) {\n super(\n coerceToValidator(validatorOrOpts),\n coerceToAsyncValidator(asyncValidator, validatorOrOpts));\n this._initObservables();\n this._setUpdateStrategy(validatorOrOpts);\n this._setUpControls();\n this.updateValueAndValidity({onlySelf: true, emitEvent: false});\n }\n\n /**\n * Get the `AbstractControl` at the given `index` in the array.\n *\n * @param index Index in the array to retrieve the control\n */\n at(index: number): AbstractControl { return this.controls[index]; }\n\n /**\n * Insert a new `AbstractControl` at the end of the array.\n *\n * @param control Form control to be inserted\n */\n push(control: AbstractControl): void {\n this.controls.push(control);\n this._registerControl(control);\n this.updateValueAndValidity();\n this._onCollectionChange();\n }\n\n /**\n * Insert a new `AbstractControl` at the given `index` in the array.\n *\n * @param index Index in the array to insert the control\n * @param control Form control to be inserted\n */\n insert(index: number, control: AbstractControl): void {\n this.controls.splice(index, 0, control);\n\n this._registerControl(control);\n this.updateValueAndValidity();\n }\n\n /**\n * Remove the control at the given `index` in the array.\n *\n * @param index Index in the array to remove the control\n */\n removeAt(index: number): void {\n if (this.controls[index]) this.controls[index]._registerOnCollectionChange(() => {});\n this.controls.splice(index, 1);\n this.updateValueAndValidity();\n }\n\n /**\n * Replace an existing control.\n *\n * @param index Index in the array to replace the control\n * @param control The `AbstractControl` control to replace the existing control\n */\n setControl(index: number, control: AbstractControl): void {\n if (this.controls[index]) this.controls[index]._registerOnCollectionChange(() => {});\n this.controls.splice(index, 1);\n\n if (control) {\n this.controls.splice(index, 0, control);\n this._registerControl(control);\n }\n\n this.updateValueAndValidity();\n this._onCollectionChange();\n }\n\n /**\n * Length of the control array.\n */\n get length(): number { return this.controls.length; }\n\n /**\n * Sets the value of the `FormArray`. It accepts an array that matches\n * the structure of the control.\n *\n * This method performs strict checks, and throws an error if you try\n * to set the value of a control that doesn't exist or if you exclude the\n * value of a control.\n *\n * @usageNotes\n * ### Set the values for the controls in the form array\n *\n * ```\n * const arr = new FormArray([\n * new FormControl(),\n * new FormControl()\n * ]);\n * console.log(arr.value); // [null, null]\n *\n * arr.setValue(['Nancy', 'Drew']);\n * console.log(arr.value); // ['Nancy', 'Drew']\n * ```\n *\n * @param value Array of values for the controls\n * @param options Configure options that determine how the control propagates changes and\n * emits events after the value changes\n *\n * * `onlySelf`: When true, each change only affects this control, and not its parent. Default\n * is false.\n * * `emitEvent`: When true or not supplied (the default), both the `statusChanges` and\n * `valueChanges`\n * observables emit events with the latest status and value when the control value is updated.\n * When false, no events are emitted.\n * The configuration options are passed to the {@link AbstractControl#updateValueAndValidity\n * updateValueAndValidity} method.\n */\n setValue(value: any[], options: {onlySelf?: boolean, emitEvent?: boolean} = {}): void {\n this._checkAllValuesPresent(value);\n value.forEach((newValue: any, index: number) => {\n this._throwIfControlMissing(index);\n this.at(index).setValue(newValue, {onlySelf: true, emitEvent: options.emitEvent});\n });\n this.updateValueAndValidity(options);\n }\n\n /**\n * Patches the value of the `FormArray`. It accepts an array that matches the\n * structure of the control, and does its best to match the values to the correct\n * controls in the group.\n *\n * It accepts both super-sets and sub-sets of the array without throwing an error.\n *\n * @usageNotes\n * ### Patch the values for controls in a form array\n *\n * ```\n * const arr = new FormArray([\n * new FormControl(),\n * new FormControl()\n * ]);\n * console.log(arr.value); // [null, null]\n *\n * arr.patchValue(['Nancy']);\n * console.log(arr.value); // ['Nancy', null]\n * ```\n *\n * @param value Array of latest values for the controls\n * @param options Configure options that determine how the control propagates changes and\n * emits events after the value changes\n *\n * * `onlySelf`: When true, each change only affects this control, and not its parent. Default\n * is false.\n * * `emitEvent`: When true or not supplied (the default), both the `statusChanges` and\n * `valueChanges`\n * observables emit events with the latest status and value when the control value is updated.\n * When false, no events are emitted.\n * The configuration options are passed to the {@link AbstractControl#updateValueAndValidity\n * updateValueAndValidity} method.\n */\n patchValue(value: any[], options: {onlySelf?: boolean, emitEvent?: boolean} = {}): void {\n value.forEach((newValue: any, index: number) => {\n if (this.at(index)) {\n this.at(index).patchValue(newValue, {onlySelf: true, emitEvent: options.emitEvent});\n }\n });\n this.updateValueAndValidity(options);\n }\n\n /**\n * Resets the `FormArray` and all descendants are marked `pristine` and `untouched`, and the\n * value of all descendants to null or null maps.\n *\n * You reset to a specific form state by passing in an array of states\n * that matches the structure of the control. The state is a standalone value\n * or a form state object with both a value and a disabled status.\n *\n * @usageNotes\n * ### Reset the values in a form array\n *\n * ```ts\n * const arr = new FormArray([\n * new FormControl(),\n * new FormControl()\n * ]);\n * arr.reset(['name', 'last name']);\n *\n * console.log(this.arr.value); // ['name', 'last name']\n * ```\n *\n * ### Reset the values in a form array and the disabled status for the first control\n *\n * ```\n * this.arr.reset([\n * {value: 'name', disabled: true},\n * 'last'\n * ]);\n *\n * console.log(this.arr.value); // ['name', 'last name']\n * console.log(this.arr.get(0).status); // 'DISABLED'\n * ```\n *\n * @param value Array of values for the controls\n * @param options Configure options that determine how the control propagates changes and\n * emits events after the value changes\n *\n * * `onlySelf`: When true, each change only affects this control, and not its parent. Default\n * is false.\n * * `emitEvent`: When true or not supplied (the default), both the `statusChanges` and\n * `valueChanges`\n * observables emit events with the latest status and value when the control is reset.\n * When false, no events are emitted.\n * The configuration options are passed to the {@link AbstractControl#updateValueAndValidity\n * updateValueAndValidity} method.\n */\n reset(value: any = [], options: {onlySelf?: boolean, emitEvent?: boolean} = {}): void {\n this._forEachChild((control: AbstractControl, index: number) => {\n control.reset(value[index], {onlySelf: true, emitEvent: options.emitEvent});\n });\n this._updatePristine(options);\n this._updateTouched(options);\n this.updateValueAndValidity(options);\n }\n\n /**\n * The aggregate value of the array, including any disabled controls.\n *\n * Reports all values regardless of disabled status.\n * For enabled controls only, the `value` property is the best way to get the value of the array.\n */\n getRawValue(): any[] {\n return this.controls.map((control: AbstractControl) => {\n return control instanceof FormControl ? control.value : (<any>control).getRawValue();\n });\n }\n\n /**\n * Remove all controls in the `FormArray`.\n *\n * @usageNotes\n * ### Remove all elements from a FormArray\n *\n * ```ts\n * const arr = new FormArray([\n * new FormControl(),\n * new FormControl()\n * ]);\n * console.log(arr.length); // 2\n *\n * arr.clear();\n * console.log(arr.length); // 0\n * ```\n *\n * It's a simpler and more efficient alternative to removing all elements one by one:\n *\n * ```ts\n * const arr = new FormArray([\n * new FormControl(),\n * new FormControl()\n * ]);\n *\n * while (arr.length) {\n * arr.removeAt(0);\n * }\n * ```\n */\n clear(): void {\n if (this.controls.length < 1) return;\n this._forEachChild((control: AbstractControl) => control._registerOnCollectionChange(() => {}));\n this.controls.splice(0);\n this.updateValueAndValidity();\n }\n\n /** @internal */\n _syncPendingControls(): boolean {\n let subtreeUpdated = this.controls.reduce((updated: boolean, child: AbstractControl) => {\n return child._syncPendingControls() ? true : updated;\n }, false);\n if (subtreeUpdated) this.updateValueAndValidity({onlySelf: true});\n return subtreeUpdated;\n }\n\n /** @internal */\n _throwIfControlMissing(index: number): void {\n if (!this.controls.length) {\n throw new Error(`\n There are no form controls registered with this array yet. If you're using ngModel,\n you may want to check next tick (e.g. use setTimeout).\n `);\n }\n if (!this.at(index)) {\n throw new Error(`Cannot find form control at index ${index}`);\n }\n }\n\n /** @internal */\n _forEachChild(cb: Function): void {\n this.controls.forEach((control: AbstractControl, index: number) => { cb(control, index); });\n }\n\n /** @internal */\n _updateValue(): void {\n (this as{value: any}).value =\n this.controls.filter((control) => control.enabled || this.disabled)\n .map((control) => control.value);\n }\n\n /** @internal */\n _anyControls(condition: Function): boolean {\n return this.controls.some((control: AbstractControl) => control.enabled && condition(control));\n }\n\n /** @internal */\n _setUpControls(): void {\n this._forEachChild((control: AbstractControl) => this._registerControl(control));\n }\n\n /** @internal */\n _checkAllValuesPresent(value: any): void {\n this._forEachChild((control: AbstractControl, i: number) => {\n if (value[i] === undefined) {\n throw new Error(`Must supply a value for form control at index: ${i}.`);\n }\n });\n }\n\n /** @internal */\n _allControlsDisabled(): boolean {\n for (const control of this.controls) {\n if (control.enabled) return false;\n }\n return this.controls.length > 0 || this.disabled;\n }\n\n private _registerControl(control: AbstractControl) {\n control.setParent(this);\n control._registerOnCollectionChange(this._onCollectionChange);\n }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {AfterViewInit, Directive, EventEmitter, Inject, Input, Optional, Self, forwardRef} from '@angular/core';\n\nimport {AbstractControl, FormControl, FormGroup, FormHooks} from '../model';\nimport {NG_ASYNC_VALIDATORS, NG_VALIDATORS} from '../validators';\n\nimport {ControlContainer} from './control_container';\nimport {Form} from './form_interface';\nimport {NgControl} from './ng_control';\nimport {NgModel} from './ng_model';\nimport {NgModelGroup} from './ng_model_group';\nimport {composeAsyncValidators, composeValidators, removeDir, setUpControl, setUpFormContainer, syncPendingControls} from './shared';\n\nexport const formDirectiveProvider: any = {\n provide: ControlContainer,\n useExisting: forwardRef(() => NgForm)\n};\n\nconst resolvedPromise = (() => Promise.resolve(null))();\n\n/**\n * @description\n * Creates a top-level `FormGroup` instance and binds it to a form\n * to track aggregate form value and validation status.\n *\n * As soon as you import the `FormsModule`, this directive becomes active by default on\n * all `<form>` tags. You don't need to add a special selector.\n *\n * You optionally export the directive into a local template variable using `ngForm` as the key\n * (ex: `#myForm=\"ngForm\"`). This is optional, but useful. Many properties from the underlying\n * `FormGroup` instance are duplicated on the directive itself, so a reference to it\n * gives you access to the aggregate value and validity status of the form, as well as\n * user interaction properties like `dirty` and `touched`.\n *\n * To register child controls with the form, use `NgModel` with a `name`\n * attribute. You may use `NgModelGroup` to create sub-groups within the form.\n *\n * If necessary, listen to the directive's `ngSubmit` event to be notified when the user has\n * triggered a form submission. The `ngSubmit` event emits the original form\n * submission event.\n *\n * In template driven forms, all `<form>` tags are automatically tagged as `NgForm`.\n * To import the `FormsModule` but skip its usage in some forms,\n * for example, to use native HTML5 validation, add the `ngNoForm` and the `<form>`\n * tags won't create an `NgForm` directive. In reactive forms, using `ngNoForm` is\n * unnecessary because the `<form>` tags are inert. In that case, you would\n * refrain from using the `formGroup` directive.\n *\n * @usageNotes\n *\n * ### Migrating from deprecated ngForm selector\n *\n * Support for using `ngForm` element selector has been deprecated in Angular v6 and will be removed\n * in Angular v9.\n *\n * This has been deprecated to keep selectors consistent with other core Angular selectors,\n * as element selectors are typically written in kebab-case.\n *\n * Now deprecated:\n * ```html\n * <ngForm #myForm=\"ngForm\">\n * ```\n *\n * After:\n * ```html\n * <ng-form #myForm=\"ngForm\">\n * ```\n *\n * ### Listening for form submission\n *\n * The following example shows how to capture the form values from the \"ngSubmit\" event.\n *\n * {@example forms/ts/simpleForm/simple_form_example.ts region='Component'}\n *\n * ### Setting the update options\n *\n * The following example shows you how to change the \"updateOn\" option from its default using\n * ngFormOptions.\n *\n * ```html\n * <form [ngFormOptions]=\"{updateOn: 'blur'}\">\n * <input name=\"one\" ngModel> <!-- this ngModel will update on blur -->\n * </form>\n * ```\n *\n * @ngModule FormsModule\n * @publicApi\n */\n@Directive({\n selector: 'form:not([ngNoForm]):not([formGroup]),ngForm,ng-form,[ngForm]',\n providers: [formDirectiveProvider],\n host: {'(submit)': 'onSubmit($event)', '(reset)': 'onReset()'},\n outputs: ['ngSubmit'],\n exportAs: 'ngForm'\n})\nexport class NgForm extends ControlContainer implements Form,\n AfterViewInit {\n /**\n * @description\n * Returns whether the form submission has been triggered.\n */\n public readonly submitted: boolean = false;\n\n private _directives: NgModel[] = [];\n\n /**\n * @description\n * The `FormGroup` instance created for this form.\n */\n form: FormGroup;\n\n /**\n * @description\n * Event emitter for the \"ngSubmit\" event\n */\n ngSubmit = new EventEmitter();\n\n /**\n * @description\n * Tracks options for the `NgForm` instance.\n *\n * **updateOn**: Sets the default `updateOn` value for all child `NgModels` below it\n * unless explicitly set by a child `NgModel` using `ngModelOptions`). Defaults to 'change'.\n * Possible values: `'change'` | `'blur'` | `'submit'`.\n *\n */\n // TODO(issue/24571): remove '!'.\n @Input('ngFormOptions') options !: {updateOn?: FormHooks};\n\n constructor(\n @Optional() @Self() @Inject(NG_VALIDATORS) validators: any[],\n @Optional() @Self() @Inject(NG_ASYNC_VALIDATORS) asyncValidators: any[]) {\n super();\n this.form =\n new FormGroup({}, composeValidators(validators), composeAsyncValidators(asyncValidators));\n }\n\n /**\n * @description\n * Lifecycle method called after the view is initialized. For internal use only.\n */\n ngAfterViewInit() { this._setUpdateStrategy(); }\n\n /**\n * @description\n * The directive instance.\n */\n get formDirective(): Form { return this; }\n\n /**\n * @description\n * The internal `FormGroup` instance.\n */\n get control(): FormGroup { return this.form; }\n\n /**\n * @description\n * Returns an array representing the path to this group. Because this directive\n * always lives at the top level of a form, it is always an empty array.\n */\n get path(): string[] { return []; }\n\n /**\n * @description\n * Returns a map of the controls in this group.\n */\n get controls(): {[key: string]: AbstractControl} { return this.form.controls; }\n\n /**\n * @description\n * Method that sets up the control directive in this group, re-calculates its value\n * and validity, and adds the instance to the internal list of directives.\n *\n * @param dir The `NgModel` directive instance.\n */\n addControl(dir: NgModel): void {\n resolvedPromise.then(() => {\n const container = this._findContainer(dir.path);\n (dir as{control: FormControl}).control =\n <FormControl>container.registerControl(dir.name, dir.control);\n setUpControl(dir.control, dir);\n dir.control.updateValueAndValidity({emitEvent: false});\n this._directives.push(dir);\n });\n }\n\n /**\n * @description\n * Retrieves the `FormControl` instance from the provided `NgModel` directive.\n *\n * @param dir The `NgModel` directive instance.\n */\n getControl(dir: NgModel): FormControl { return <FormControl>this.form.get(dir.path); }\n\n /**\n * @description\n * Removes the `NgModel` instance from the internal list of directives\n *\n * @param dir The `NgModel` directive instance.\n */\n removeControl(dir: NgModel): void {\n resolvedPromise.then(() => {\n const container = this._findContainer(dir.path);\n if (container) {\n container.removeControl(dir.name);\n }\n removeDir<NgModel>(this._directives, dir);\n });\n }\n\n /**\n * @description\n * Adds a new `NgModelGroup` directive instance to the form.\n *\n * @param dir The `NgModelGroup` directive instance.\n */\n addFormGroup(dir: NgModelGroup): void {\n resolvedPromise.then(() => {\n const container = this._findContainer(dir.path);\n const group = new FormGroup({});\n setUpFormContainer(group, dir);\n container.registerControl(dir.name, group);\n group.updateValueAndValidity({emitEvent: false});\n });\n }\n\n /**\n * @description\n * Removes the `NgModelGroup` directive instance from the form.\n *\n * @param dir The `NgModelGroup` directive instance.\n */\n removeFormGroup(dir: NgModelGroup): void {\n resolvedPromise.then(() => {\n const container = this._findContainer(dir.path);\n if (container) {\n container.removeControl(dir.name);\n }\n });\n }\n\n /**\n * @description\n * Retrieves the `FormGroup` for a provided `NgModelGroup` directive instance\n *\n * @param dir The `NgModelGroup` directive instance.\n */\n getFormGroup(dir: NgModelGroup): FormGroup { return <FormGroup>this.form.get(dir.path); }\n\n /**\n * Sets the new value for the provided `NgControl` directive.\n *\n * @param dir The `NgControl` directive instance.\n * @param value The new value for the directive's control.\n */\n updateModel(dir: NgControl, value: any): void {\n resolvedPromise.then(() => {\n const ctrl = <FormControl>this.form.get(dir.path !);\n ctrl.setValue(value);\n });\n }\n\n /**\n * @description\n * Sets the value for this `FormGroup`.\n *\n * @param value The new value\n */\n setValue(value: {[key: string]: any}): void { this.control.setValue(value); }\n\n /**\n * @description\n * Method called when the \"submit\" event is triggered on the form.\n * Triggers the `ngSubmit` emitter to emit the \"submit\" event as its payload.\n *\n * @param $event The \"submit\" event object\n */\n onSubmit($event: Event): boolean {\n (this as{submitted: boolean}).submitted = true;\n syncPendingControls(this.form, this._directives);\n this.ngSubmit.emit($event);\n return false;\n }\n\n /**\n * @description\n * Method called when the \"reset\" event is triggered on the form.\n */\n onReset(): void { this.resetForm(); }\n\n /**\n * @description\n * Resets the form to an initial value and resets its submitted status.\n *\n * @param value The new value for the form.\n */\n resetForm(value: any = undefined): void {\n this.form.reset(value);\n (this as{submitted: boolean}).submitted = false;\n }\n\n private _setUpdateStrategy() {\n if (this.options && this.options.updateOn != null) {\n this.form._updateOn = this.options.updateOn;\n }\n }\n\n /** @internal */\n _findContainer(path: string[]): FormGroup {\n path.pop();\n return path.length ? <FormGroup>this.form.get(path) : this.form;\n }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {FormErrorExamples as Examples} from './error_examples';\n\nexport class TemplateDrivenErrors {\n static modelParentException(): void {\n throw new Error(`\n ngModel cannot be used to register form controls with a parent formGroup directive. Try using\n formGroup's partner directive \"formControlName\" instead. Example:\n\n ${Examples.formControlName}\n\n Or, if you'd like to avoid registering this form control, indicate that it's standalone in ngModelOptions:\n\n Example:\n\n ${Examples.ngModelWithFormGroup}`);\n }\n\n static formGroupNameException(): void {\n throw new Error(`\n ngModel cannot be used to register form controls with a parent formGroupName or formArrayName directive.\n\n Option 1: Use formControlName instead of ngModel (reactive strategy):\n\n ${Examples.formGroupName}\n\n Option 2: Update ngModel's parent be ngModelGroup (template-driven strategy):\n\n ${Examples.ngModelGroup}`);\n }\n\n static missingNameException() {\n throw new Error(\n `If ngModel is used within a form tag, either the name attribute must be set or the form\n control must be defined as 'standalone' in ngModelOptions.\n\n Example 1: <input [(ngModel)]=\"person.firstName\" name=\"first\">\n Example 2: <input [(ngModel)]=\"person.firstName\" [ngModelOptions]=\"{standalone: true}\">`);\n }\n\n static modelGroupParentException() {\n throw new Error(`\n ngModelGroup cannot be used with a parent formGroup directive.\n\n Option 1: Use formGroupName instead of ngModelGroup (reactive strategy):\n\n ${Examples.formGroupName}\n\n Option 2: Use a regular form tag instead of the formGroup directive (template-driven strategy):\n\n ${Examples.ngModelGroup}`);\n }\n\n static ngFormWarning() {\n console.warn(`\n It looks like you're using 'ngForm'.\n\n Support for using the 'ngForm' element selector has been deprecated in Angular v6 and will be removed\n in Angular v9.\n\n Use 'ng-form' instead.\n\n Before:\n <ngForm #myForm=\"ngForm\">\n\n After:\n <ng-form #myForm=\"ngForm\">\n `);\n }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Directive, Inject, InjectionToken, Optional} from '@angular/core';\nimport {TemplateDrivenErrors} from './template_driven_errors';\n\n/**\n * @description\n * `InjectionToken` to provide to turn off the warning when using 'ngForm' deprecated selector.\n */\nexport const NG_FORM_SELECTOR_WARNING = new InjectionToken('NgFormSelectorWarning');\n\n/**\n * This directive is solely used to display warnings when the deprecated `ngForm` selector is used.\n *\n * @deprecated in Angular v6 and will be removed in Angular v9.\n * @ngModule FormsModule\n * @publicApi\n */\n@Directive({selector: 'ngForm'})\nexport class NgFormSelectorWarning {\n /**\n * Static property used to track whether the deprecation warning for this selector has been sent.\n * Used to support warning config of \"once\".\n *\n * @internal\n */\n static _ngFormWarning = false;\n\n constructor(@Optional() @Inject(NG_FORM_SELECTOR_WARNING) ngFormWarning: string|null) {\n if (((!ngFormWarning || ngFormWarning === 'once') && !NgFormSelectorWarning._ngFormWarning) ||\n ngFormWarning === 'always') {\n TemplateDrivenErrors.ngFormWarning();\n NgFormSelectorWarning._ngFormWarning = true;\n }\n }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {OnDestroy, OnInit} from '@angular/core';\n\nimport {FormGroup} from '../model';\n\nimport {ControlContainer} from './control_container';\nimport {Form} from './form_interface';\nimport {composeAsyncValidators, composeValidators, controlPath} from './shared';\nimport {AsyncValidatorFn, ValidatorFn} from './validators';\n\n\n\n/**\n * @description\n * A base class for code shared between the `NgModelGroup` and `FormGroupName` directives.\n *\n * @publicApi\n */\nexport class AbstractFormGroupDirective extends ControlContainer implements OnInit, OnDestroy {\n /**\n * @description\n * The parent control for the group\n *\n * @internal\n */\n // TODO(issue/24571): remove '!'.\n _parent !: ControlContainer;\n\n /**\n * @description\n * An array of synchronous validators for the group\n *\n * @internal\n */\n // TODO(issue/24571): remove '!'.\n _validators !: any[];\n\n /**\n * @description\n * An array of async validators for the group\n *\n * @internal\n */\n // TODO(issue/24571): remove '!'.\n _asyncValidators !: any[];\n\n /**\n * @description\n * An internal callback method triggered on the instance after the inputs are set.\n * Registers the group with its parent group.\n */\n ngOnInit(): void {\n this._checkParentType();\n this.formDirective !.addFormGroup(this);\n }\n\n /**\n * @description\n * An internal callback method triggered before the instance is destroyed.\n * Removes the group from its parent group.\n */\n ngOnDestroy(): void {\n if (this.formDirective) {\n this.formDirective.removeFormGroup(this);\n }\n }\n\n /**\n * @description\n * The `FormGroup` bound to this directive.\n */\n get control(): FormGroup { return this.formDirective !.getFormGroup(this); }\n\n /**\n * @description\n * The path to this group from the top-level directive.\n */\n get path(): string[] { return controlPath(this.name, this._parent); }\n\n /**\n * @description\n * The top-level directive for this group if present, otherwise null.\n */\n get formDirective(): Form|null { return this._parent ? this._parent.formDirective : null; }\n\n /**\n * @description\n * The synchronous validators registered with this group.\n */\n get validator(): ValidatorFn|null { return composeValidators(this._validators); }\n\n /**\n * @description\n * The async validators registered with this group.\n */\n get asyncValidator(): AsyncValidatorFn|null {\n return composeAsyncValidators(this._asyncValidators);\n }\n\n /** @internal */\n _checkParentType(): void {}\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Directive, Host, Inject, Input, OnDestroy, OnInit, Optional, Self, SkipSelf, forwardRef} from '@angular/core';\n\nimport {NG_ASYNC_VALIDATORS, NG_VALIDATORS} from '../validators';\n\nimport {AbstractFormGroupDirective} from './abstract_form_group_directive';\nimport {ControlContainer} from './control_container';\nimport {NgForm} from './ng_form';\nimport {TemplateDrivenErrors} from './template_driven_errors';\n\nexport const modelGroupProvider: any = {\n provide: ControlContainer,\n useExisting: forwardRef(() => NgModelGroup)\n};\n\n/**\n * @description\n * Creates and binds a `FormGroup` instance to a DOM element.\n *\n * This directive can only be used as a child of `NgForm` (within `<form>` tags).\n *\n * Use this directive to validate a sub-group of your form separately from the\n * rest of your form, or if some values in your domain model make more sense\n * to consume together in a nested object.\n *\n * Provide a name for the sub-group and it will become the key\n * for the sub-group in the form's full value. If you need direct access, export the directive into\n * a local template variable using `ngModelGroup` (ex: `#myGroup=\"ngModelGroup\"`).\n *\n * @usageNotes\n *\n * ### Consuming controls in a grouping\n *\n * The following example shows you how to combine controls together in a sub-group\n * of the form.\n *\n * {@example forms/ts/ngModelGroup/ng_model_group_example.ts region='Component'}\n *\n * @ngModule FormsModule\n * @publicApi\n */\n@Directive({selector: '[ngModelGroup]', providers: [modelGroupProvider], exportAs: 'ngModelGroup'})\nexport class NgModelGroup extends AbstractFormGroupDirective implements OnInit, OnDestroy {\n /**\n * @description\n * Tracks the name of the `NgModelGroup` bound to the directive. The name corresponds\n * to a key in the parent `NgForm`.\n */\n // TODO(issue/24571): remove '!'.\n @Input('ngModelGroup') name !: string;\n\n constructor(\n @Host() @SkipSelf() parent: ControlContainer,\n @Optional() @Self() @Inject(NG_VALIDATORS) validators: any[],\n @Optional() @Self() @Inject(NG_ASYNC_VALIDATORS) asyncValidators: any[]) {\n super();\n this._parent = parent;\n this._validators = validators;\n this._asyncValidators = asyncValidators;\n }\n\n /** @internal */\n _checkParentType(): void {\n if (!(this._parent instanceof NgModelGroup) && !(this._parent instanceof NgForm)) {\n TemplateDrivenErrors.modelGroupParentException();\n }\n }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Directive, EventEmitter, Host, Inject, Input, OnChanges, OnDestroy, Optional, Output, Self, SimpleChanges, forwardRef} from '@angular/core';\n\nimport {FormControl, FormHooks} from '../model';\nimport {NG_ASYNC_VALIDATORS, NG_VALIDATORS} from '../validators';\n\nimport {AbstractFormGroupDirective} from './abstract_form_group_directive';\nimport {ControlContainer} from './control_container';\nimport {ControlValueAccessor, NG_VALUE_ACCESSOR} from './control_value_accessor';\nimport {NgControl} from './ng_control';\nimport {NgForm} from './ng_form';\nimport {NgModelGroup} from './ng_model_group';\nimport {composeAsyncValidators, composeValidators, controlPath, isPropertyUpdated, selectValueAccessor, setUpControl} from './shared';\nimport {TemplateDrivenErrors} from './template_driven_errors';\nimport {AsyncValidator, AsyncValidatorFn, Validator, ValidatorFn} from './validators';\n\nexport const formControlBinding: any = {\n provide: NgControl,\n useExisting: forwardRef(() => NgModel)\n};\n\n/**\n * `ngModel` forces an additional change detection run when its inputs change:\n * E.g.:\n * ```\n * <div>{{myModel.valid}}</div>\n * <input [(ngModel)]=\"myValue\" #myModel=\"ngModel\">\n * ```\n * I.e. `ngModel` can export itself on the element and then be used in the template.\n * Normally, this would result in expressions before the `input` that use the exported directive\n * to have and old value as they have been\n * dirty checked before. As this is a very common case for `ngModel`, we added this second change\n * detection run.\n *\n * Notes:\n * - this is just one extra run no matter how many `ngModel` have been changed.\n * - this is a general problem when using `exportAs` for directives!\n */\nconst resolvedPromise = (() => Promise.resolve(null))();\n\n/**\n * @description\n * Creates a `FormControl` instance from a domain model and binds it\n * to a form control element.\n *\n * The `FormControl` instance tracks the value, user interaction, and\n * validation status of the control and keeps the view synced with the model. If used\n * within a parent form, the directive also registers itself with the form as a child\n * control.\n *\n * This directive is used by itself or as part of a larger form. Use the\n * `ngModel` selector to activate it.\n *\n * It accepts a domain model as an optional `Input`. If you have a one-way binding\n * to `ngModel` with `[]` syntax, changing the value of the domain model in the component\n * class sets the value in the view. If you have a two-way binding with `[()]` syntax\n * (also known as 'banana-box syntax'), the value in the UI always syncs back to\n * the domain model in your class.\n *\n * To inspect the properties of the associated `FormControl` (like validity state), \n * export the directive into a local template variable using `ngModel` as the key (ex: `#myVar=\"ngModel\"`).\n * You then access the control using the directive's `control` property, \n * but most properties used (like `valid` and `dirty`) fall through to the control anyway for direct access. \n * See a full list of properties directly available in `AbstractControlDirective`.\n *\n * @see `RadioControlValueAccessor` \n * @see `SelectControlValueAccessor`\n * \n * @usageNotes\n * \n * ### Using ngModel on a standalone control\n *\n * The following examples show a simple standalone control using `ngModel`:\n *\n * {@example forms/ts/simpleNgModel/simple_ng_model_example.ts region='Component'}\n *\n * When using the `ngModel` within `<form>` tags, you'll also need to supply a `name` attribute\n * so that the control can be registered with the parent form under that name.\n *\n * In the context of a parent form, it's often unnecessary to include one-way or two-way binding, \n * as the parent form syncs the value for you. You access its properties by exporting it into a \n * local template variable using `ngForm` such as (`#f=\"ngForm\"`). Use the variable where \n * needed on form submission.\n *\n * If you do need to populate initial values into your form, using a one-way binding for\n * `ngModel` tends to be sufficient as long as you use the exported form's value rather\n * than the domain model's value on submit.\n * \n * ### Using ngModel within a form\n *\n * The following example shows controls using `ngModel` within a form:\n *\n * {@example forms/ts/simpleForm/simple_form_example.ts region='Component'}\n * \n * ### Using a standalone ngModel within a group\n * \n * The following example shows you how to use a standalone ngModel control\n * within a form. This controls the display of the form, but doesn't contain form data.\n *\n * ```html\n * <form>\n * <input name=\"login\" ngModel placeholder=\"Login\">\n * <input type=\"checkbox\" ngModel [ngModelOptions]=\"{standalone: true}\"> Show more options?\n * </form>\n * <!-- form value: {login: ''} -->\n * ```\n * \n * ### Setting the ngModel name attribute through options\n * \n * The following example shows you an alternate way to set the name attribute. The name attribute is used\n * within a custom form component, and the name `@Input` property serves a different purpose.\n *\n * ```html\n * <form>\n * <my-person-control name=\"Nancy\" ngModel [ngModelOptions]=\"{name: 'user'}\">\n * </my-person-control>\n * </form>\n * <!-- form value: {user: ''} -->\n * ```\n *\n * @ngModule FormsModule\n * @publicApi\n */\n@Directive({\n selector: '[ngModel]:not([formControlName]):not([formControl])',\n providers: [formControlBinding],\n exportAs: 'ngModel'\n})\nexport class NgModel extends NgControl implements OnChanges,\n OnDestroy {\n public readonly control: FormControl = new FormControl();\n /** @internal */\n _registered = false;\n\n /**\n * @description\n * Internal reference to the view model value.\n */\n viewModel: any;\n\n /**\n * @description\n * Tracks the name bound to the directive. The parent form\n * uses this name as a key to retrieve this control's value.\n */\n // TODO(issue/24571): remove '!'.\n @Input() name !: string;\n\n /**\n * @description\n * Tracks whether the control is disabled.\n */\n // TODO(issue/24571): remove '!'.\n @Input('disabled') isDisabled !: boolean;\n\n /**\n * @description\n * Tracks the value bound to this directive.\n */\n @Input('ngModel') model: any;\n\n /**\n * @description\n * Tracks the configuration options for this `ngModel` instance.\n *\n * **name**: An alternative to setting the name attribute on the form control element. See\n * the [example](api/forms/NgModel#using-ngmodel-on-a-standalone-control) for using `NgModel`\n * as a standalone control.\n *\n * **standalone**: When set to true, the `ngModel` will not register itself with its parent form,\n * and acts as if it's not in the form. Defaults to false.\n *\n * **updateOn**: Defines the event upon which the form control value and validity update.\n * Defaults to 'change'. Possible values: `'change'` | `'blur'` | `'submit'`.\n *\n */\n // TODO(issue/24571): remove '!'.\n @Input('ngModelOptions')\n options !: {name?: string, standalone?: boolean, updateOn?: FormHooks};\n\n /**\n * @description\n * Event emitter for producing the `ngModelChange` event after\n * the view model updates.\n */\n @Output('ngModelChange') update = new EventEmitter();\n\n constructor(@Optional() @Host() parent: ControlContainer,\n @Optional() @Self() @Inject(NG_VALIDATORS) validators: Array<Validator|ValidatorFn>,\n @Optional() @Self() @Inject(NG_ASYNC_VALIDATORS) asyncValidators: Array<AsyncValidator|AsyncValidatorFn>,\n @Optional() @Self() @Inject(NG_VALUE_ACCESSOR)\n valueAccessors: ControlValueAccessor[]) {\n super();\n this._parent = parent;\n this._rawValidators = validators || [];\n this._rawAsyncValidators = asyncValidators || [];\n this.valueAccessor = selectValueAccessor(this, valueAccessors);\n }\n\n /**\n * @description\n * A lifecycle method called when the directive's inputs change. For internal use\n * only.\n *\n * @param changes A object of key/value pairs for the set of changed inputs.\n */\n ngOnChanges(changes: SimpleChanges) {\n this._checkForErrors();\n if (!this._registered) this._setUpControl();\n if ('isDisabled' in changes) {\n this._updateDisabled(changes);\n }\n\n if (isPropertyUpdated(changes, this.viewModel)) {\n this._updateValue(this.model);\n this.viewModel = this.model;\n }\n }\n\n /**\n * @description\n * Lifecycle method called before the directive's instance is destroyed. For internal\n * use only.\n */\n ngOnDestroy(): void { this.formDirective && this.formDirective.removeControl(this); }\n\n /**\n * @description\n * Returns an array that represents the path from the top-level form to this control.\n * Each index is the string name of the control on that level.\n */\n get path(): string[] {\n return this._parent ? controlPath(this.name, this._parent) : [this.name];\n }\n\n /**\n * @description\n * The top-level directive for this control if present, otherwise null.\n */\n get formDirective(): any { return this._parent ? this._parent.formDirective : null; }\n\n /**\n * @description\n * Synchronous validator function composed of all the synchronous validators\n * registered with this directive.\n */\n get validator(): ValidatorFn|null { return composeValidators(this._rawValidators); }\n\n /**\n * @description\n * Async validator function composed of all the async validators registered with this\n * directive.\n */\n get asyncValidator(): AsyncValidatorFn|null {\n return composeAsyncValidators(this._rawAsyncValidators);\n }\n\n /**\n * @description\n * Sets the new value for the view model and emits an `ngModelChange` event.\n *\n * @param newValue The new value emitted by `ngModelChange`.\n */\n viewToModelUpdate(newValue: any): void {\n this.viewModel = newValue;\n this.update.emit(newValue);\n }\n\n private _setUpControl(): void {\n this._setUpdateStrategy();\n this._isStandalone() ? this._setUpStandalone() :\n this.formDirective.addControl(this);\n this._registered = true;\n }\n\n private _setUpdateStrategy(): void {\n if (this.options && this.options.updateOn != null) {\n this.control._updateOn = this.options.updateOn;\n }\n }\n\n private _isStandalone(): boolean {\n return !this._parent || !!(this.options && this.options.standalone);\n }\n\n private _setUpStandalone(): void {\n setUpControl(this.control, this);\n this.control.updateValueAndValidity({emitEvent: false});\n }\n\n private _checkForErrors(): void {\n if (!this._isStandalone()) {\n this._checkParentType();\n }\n this._checkName();\n }\n\n private _checkParentType(): void {\n if (!(this._parent instanceof NgModelGroup) &&\n this._parent instanceof AbstractFormGroupDirective) {\n TemplateDrivenErrors.formGroupNameException();\n } else if (\n !(this._parent instanceof NgModelGroup) && !(this._parent instanceof NgForm)) {\n TemplateDrivenErrors.modelParentException();\n }\n }\n\n private _checkName(): void {\n if (this.options && this.options.name) this.name = this.options.name;\n\n if (!this._isStandalone() && !this.name) {\n TemplateDrivenErrors.missingNameException();\n }\n }\n\n private _updateValue(value: any): void {\n resolvedPromise.then(\n () => { this.control.setValue(value, {emitViewToModelChange: false}); });\n }\n\n private _updateDisabled(changes: SimpleChanges) {\n const disabledValue = changes['isDisabled'].currentValue;\n\n const isDisabled =\n disabledValue === '' || (disabledValue && disabledValue !== 'false');\n\n resolvedPromise.then(() => {\n if (isDisabled && !this.control.disabled) {\n this.control.disable();\n } else if (!isDisabled && this.control.disabled) {\n this.control.enable();\n }\n });\n }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Directive} from '@angular/core';\n\n/**\n * @description\n *\n * Adds `novalidate` attribute to all forms by default.\n *\n * `novalidate` is used to disable browser's native form validation.\n *\n * If you want to use native validation with Angular forms, just add `ngNativeValidate` attribute:\n *\n * ```\n * <form ngNativeValidate></form>\n * ```\n *\n * @publicApi\n * @ngModule ReactiveFormsModule\n * @ngModule FormsModule\n */\n@Directive({\n selector: 'form:not([ngNoForm]):not([ngNativeValidate])',\n host: {'novalidate': ''},\n})\nexport class ɵNgNoValidate {\n}\n\nexport {ɵNgNoValidate as NgNoValidate};\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Directive, EventEmitter, Inject, InjectionToken, Input, OnChanges, Optional, Output, Self, SimpleChanges, forwardRef} from '@angular/core';\n\nimport {FormControl} from '../../model';\nimport {NG_ASYNC_VALIDATORS, NG_VALIDATORS} from '../../validators';\nimport {ControlValueAccessor, NG_VALUE_ACCESSOR} from '../control_value_accessor';\nimport {NgControl} from '../ng_control';\nimport {ReactiveErrors} from '../reactive_errors';\nimport {_ngModelWarning, composeAsyncValidators, composeValidators, isPropertyUpdated, selectValueAccessor, setUpControl} from '../shared';\nimport {AsyncValidator, AsyncValidatorFn, Validator, ValidatorFn} from '../validators';\n\n\n/**\n * Token to provide to turn off the ngModel warning on formControl and formControlName.\n */\nexport const NG_MODEL_WITH_FORM_CONTROL_WARNING =\n new InjectionToken('NgModelWithFormControlWarning');\n\nexport const formControlBinding: any = {\n provide: NgControl,\n useExisting: forwardRef(() => FormControlDirective)\n};\n\n/**\n * @description\n * * Syncs a standalone `FormControl` instance to a form control element.\n * \n * @see [Reactive Forms Guide](guide/reactive-forms)\n * @see `FormControl`\n * @see `AbstractControl`\n *\n * @usageNotes\n *\n * ### Registering a single form control\n * \n * The following examples shows how to register a standalone control and set its value.\n *\n * {@example forms/ts/simpleFormControl/simple_form_control_example.ts region='Component'}\n *\n * ### Use with ngModel\n *\n * Support for using the `ngModel` input property and `ngModelChange` event with reactive\n * form directives has been deprecated in Angular v6 and will be removed in Angular v7.\n *\n * Now deprecated:\n *\n * ```html\n * <input [formControl]=\"control\" [(ngModel)]=\"value\">\n * ```\n *\n * ```ts\n * this.value = 'some value';\n * ```\n *\n * This has been deprecated for a few reasons. First, developers have found this pattern\n * confusing. It seems like the actual `ngModel` directive is being used, but in fact it's\n * an input/output property named `ngModel` on the reactive form directive that simply\n * approximates (some of) its behavior. Specifically, it allows getting/setting the value\n * and intercepting value events. However, some of `ngModel`'s other features - like\n * delaying updates with`ngModelOptions` or exporting the directive - simply don't work,\n * which has understandably caused some confusion.\n *\n * In addition, this pattern mixes template-driven and reactive forms strategies, which\n * we generally don't recommend because it doesn't take advantage of the full benefits of\n * either strategy. Setting the value in the template violates the template-agnostic\n * principles behind reactive forms, whereas adding a `FormControl`/`FormGroup` layer in\n * the class removes the convenience of defining forms in the template.\n *\n * To update your code before v7, you'll want to decide whether to stick with reactive form\n * directives (and get/set values using reactive forms patterns) or switch over to\n * template-driven directives.\n *\n * After (choice 1 - use reactive forms):\n *\n * ```html\n * <input [formControl]=\"control\">\n * ```\n *\n * ```ts\n * this.control.setValue('some value');\n * ```\n *\n * After (choice 2 - use template-driven forms):\n *\n * ```html\n * <input [(ngModel)]=\"value\">\n * ```\n *\n * ```ts\n * this.value = 'some value';\n * ```\n *\n * By default, when you use this pattern, you will see a deprecation warning once in dev\n * mode. You can choose to silence this warning by providing a config for\n * `ReactiveFormsModule` at import time:\n *\n * ```ts\n * imports: [\n * ReactiveFormsModule.withConfig({warnOnNgModelWithFormControl: 'never'});\n * ]\n * ```\n *\n * Alternatively, you can choose to surface a separate warning for each instance of this\n * pattern with a config value of `\"always\"`. This may help to track down where in the code\n * the pattern is being used as the code is being updated.\n *\n * @ngModule ReactiveFormsModule\n * @publicApi\n */\n@Directive({selector: '[formControl]', providers: [formControlBinding], exportAs: 'ngForm'})\n\nexport class FormControlDirective extends NgControl implements OnChanges {\n /**\n * @description\n * Internal reference to the view model value.\n */\n viewModel: any;\n\n /**\n * @description\n * Tracks the `FormControl` instance bound to the directive.\n */\n // TODO(issue/24571): remove '!'.\n @Input('formControl') form !: FormControl;\n\n /**\n * @description\n * Triggers a warning that this input should not be used with reactive forms.\n */\n @Input('disabled')\n set isDisabled(isDisabled: boolean) { ReactiveErrors.disabledAttrWarning(); }\n\n // TODO(kara): remove next 4 properties once deprecation period is over\n\n /** @deprecated as of v6 */\n @Input('ngModel') model: any;\n\n /** @deprecated as of v6 */\n @Output('ngModelChange') update = new EventEmitter();\n\n /**\n * @description\n * Static property used to track whether any ngModel warnings have been sent across\n * all instances of FormControlDirective. Used to support warning config of \"once\".\n *\n * @internal\n */\n static _ngModelWarningSentOnce = false;\n\n /**\n * @description\n * Instance property used to track whether an ngModel warning has been sent out for this\n * particular `FormControlDirective` instance. Used to support warning config of \"always\".\n *\n * @internal\n */\n _ngModelWarningSent = false;\n\n constructor(@Optional() @Self() @Inject(NG_VALIDATORS) validators: Array<Validator|ValidatorFn>,\n @Optional() @Self() @Inject(NG_ASYNC_VALIDATORS) asyncValidators: Array<AsyncValidator|AsyncValidatorFn>,\n @Optional() @Self() @Inject(NG_VALUE_ACCESSOR)\n valueAccessors: ControlValueAccessor[],\n @Optional() @Inject(NG_MODEL_WITH_FORM_CONTROL_WARNING) private _ngModelWarningConfig: string|null) {\n super();\n this._rawValidators = validators || [];\n this._rawAsyncValidators = asyncValidators || [];\n this.valueAccessor = selectValueAccessor(this, valueAccessors);\n }\n\n /**\n * @description\n * A lifecycle method called when the directive's inputs change. For internal use\n * only.\n *\n * @param changes A object of key/value pairs for the set of changed inputs.\n */\n ngOnChanges(changes: SimpleChanges): void {\n if (this._isControlChanged(changes)) {\n setUpControl(this.form, this);\n if (this.control.disabled && this.valueAccessor !.setDisabledState) {\n this.valueAccessor !.setDisabledState !(true);\n }\n this.form.updateValueAndValidity({emitEvent: false});\n }\n if (isPropertyUpdated(changes, this.viewModel)) {\n _ngModelWarning(\n 'formControl', FormControlDirective, this, this._ngModelWarningConfig);\n this.form.setValue(this.model);\n this.viewModel = this.model;\n }\n }\n\n /**\n * @description\n * Returns an array that represents the path from the top-level form to this control.\n * Each index is the string name of the control on that level.\n */\n get path(): string[] { return []; }\n\n /**\n * @description\n * Synchronous validator function composed of all the synchronous validators\n * registered with this directive.\n */\n get validator(): ValidatorFn|null { return composeValidators(this._rawValidators); }\n\n /**\n * @description\n * Async validator function composed of all the async validators registered with this\n * directive.\n */\n get asyncValidator(): AsyncValidatorFn|null {\n return composeAsyncValidators(this._rawAsyncValidators);\n }\n\n /**\n * @description\n * The `FormControl` bound to this directive.\n */\n get control(): FormControl { return this.form; }\n\n /**\n * @description\n * Sets the new value for the view model and emits an `ngModelChange` event.\n *\n * @param newValue The new value for the view model.\n */\n viewToModelUpdate(newValue: any): void {\n this.viewModel = newValue;\n this.update.emit(newValue);\n }\n\n private _isControlChanged(changes: {[key: string]: any}): boolean {\n return changes.hasOwnProperty('form');\n }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Directive, EventEmitter, Inject, Input, OnChanges, Optional, Output, Self, SimpleChanges, forwardRef} from '@angular/core';\nimport {FormArray, FormControl, FormGroup} from '../../model';\nimport {NG_ASYNC_VALIDATORS, NG_VALIDATORS, Validators} from '../../validators';\nimport {ControlContainer} from '../control_container';\nimport {Form} from '../form_interface';\nimport {ReactiveErrors} from '../reactive_errors';\nimport {cleanUpControl, composeAsyncValidators, composeValidators, removeDir, setUpControl, setUpFormContainer, syncPendingControls} from '../shared';\n\nimport {FormControlName} from './form_control_name';\nimport {FormArrayName, FormGroupName} from './form_group_name';\n\nexport const formDirectiveProvider: any = {\n provide: ControlContainer,\n useExisting: forwardRef(() => FormGroupDirective)\n};\n\n/**\n * @description\n *\n * Binds an existing `FormGroup` to a DOM element.\n *\n * This directive accepts an existing `FormGroup` instance. It will then use this\n * `FormGroup` instance to match any child `FormControl`, `FormGroup`,\n * and `FormArray` instances to child `FormControlName`, `FormGroupName`,\n * and `FormArrayName` directives.\n * \n * @see [Reactive Forms Guide](guide/reactive-forms)\n * @see `AbstractControl`\n *\n * ### Register Form Group\n *\n * The following example registers a `FormGroup` with first name and last name controls,\n * and listens for the *ngSubmit* event when the button is clicked.\n *\n * {@example forms/ts/simpleFormGroup/simple_form_group_example.ts region='Component'}\n *\n * @ngModule ReactiveFormsModule\n * @publicApi\n */\n@Directive({\n selector: '[formGroup]',\n providers: [formDirectiveProvider],\n host: {'(submit)': 'onSubmit($event)', '(reset)': 'onReset()'},\n exportAs: 'ngForm'\n})\nexport class FormGroupDirective extends ControlContainer implements Form,\n OnChanges {\n /**\n * @description\n * Reports whether the form submission has been triggered.\n */\n public readonly submitted: boolean = false;\n\n // TODO(issue/24571): remove '!'.\n private _oldForm !: FormGroup;\n\n /**\n * @description\n * Tracks the list of added `FormControlName` instances\n */\n directives: FormControlName[] = [];\n\n /**\n * @description\n * Tracks the `FormGroup` bound to this directive.\n */\n @Input('formGroup') form: FormGroup = null !;\n\n /**\n * @description\n * Emits an event when the form submission has been triggered.\n */\n @Output() ngSubmit = new EventEmitter();\n\n constructor(\n @Optional() @Self() @Inject(NG_VALIDATORS) private _validators: any[],\n @Optional() @Self() @Inject(NG_ASYNC_VALIDATORS) private _asyncValidators: any[]) {\n super();\n }\n\n /**\n * @description\n * A lifecycle method called when the directive's inputs change. For internal use only.\n *\n * @param changes A object of key/value pairs for the set of changed inputs.\n */\n ngOnChanges(changes: SimpleChanges): void {\n this._checkFormPresent();\n if (changes.hasOwnProperty('form')) {\n this._updateValidators();\n this._updateDomValue();\n this._updateRegistrations();\n }\n }\n\n /**\n * @description\n * Returns this directive's instance.\n */\n get formDirective(): Form { return this; }\n\n /**\n * @description\n * Returns the `FormGroup` bound to this directive.\n */\n get control(): FormGroup { return this.form; }\n\n /**\n * @description\n * Returns an array representing the path to this group. Because this directive\n * always lives at the top level of a form, it always an empty array.\n */\n get path(): string[] { return []; }\n\n /**\n * @description\n * Method that sets up the control directive in this group, re-calculates its value\n * and validity, and adds the instance to the internal list of directives.\n *\n * @param dir The `FormControlName` directive instance.\n */\n addControl(dir: FormControlName): FormControl {\n const ctrl: any = this.form.get(dir.path);\n setUpControl(ctrl, dir);\n ctrl.updateValueAndValidity({emitEvent: false});\n this.directives.push(dir);\n return ctrl;\n }\n\n /**\n * @description\n * Retrieves the `FormControl` instance from the provided `FormControlName` directive\n *\n * @param dir The `FormControlName` directive instance.\n */\n getControl(dir: FormControlName): FormControl { return <FormControl>this.form.get(dir.path); }\n\n /**\n * @description\n * Removes the `FormControlName` instance from the internal list of directives\n *\n * @param dir The `FormControlName` directive instance.\n */\n removeControl(dir: FormControlName): void { removeDir<FormControlName>(this.directives, dir); }\n\n /**\n * Adds a new `FormGroupName` directive instance to the form.\n *\n * @param dir The `FormGroupName` directive instance.\n */\n addFormGroup(dir: FormGroupName): void {\n const ctrl: any = this.form.get(dir.path);\n setUpFormContainer(ctrl, dir);\n ctrl.updateValueAndValidity({emitEvent: false});\n }\n\n /**\n * No-op method to remove the form group.\n *\n * @param dir The `FormGroupName` directive instance.\n */\n removeFormGroup(dir: FormGroupName): void {}\n\n /**\n * @description\n * Retrieves the `FormGroup` for a provided `FormGroupName` directive instance\n *\n * @param dir The `FormGroupName` directive instance.\n */\n getFormGroup(dir: FormGroupName): FormGroup { return <FormGroup>this.form.get(dir.path); }\n\n /**\n * Adds a new `FormArrayName` directive instance to the form.\n *\n * @param dir The `FormArrayName` directive instance.\n */\n addFormArray(dir: FormArrayName): void {\n const ctrl: any = this.form.get(dir.path);\n setUpFormContainer(ctrl, dir);\n ctrl.updateValueAndValidity({emitEvent: false});\n }\n\n /**\n * No-op method to remove the form array.\n *\n * @param dir The `FormArrayName` directive instance.\n */\n removeFormArray(dir: FormArrayName): void {}\n\n /**\n * @description\n * Retrieves the `FormArray` for a provided `FormArrayName` directive instance.\n *\n * @param dir The `FormArrayName` directive instance.\n */\n getFormArray(dir: FormArrayName): FormArray { return <FormArray>this.form.get(dir.path); }\n\n /**\n * Sets the new value for the provided `FormControlName` directive.\n *\n * @param dir The `FormControlName` directive instance.\n * @param value The new value for the directive's control.\n */\n updateModel(dir: FormControlName, value: any): void {\n const ctrl  = <FormControl>this.form.get(dir.path);\n ctrl.setValue(value);\n }\n\n /**\n * @description\n * Method called with the \"submit\" event is triggered on the form.\n * Triggers the `ngSubmit` emitter to emit the \"submit\" event as its payload.\n *\n * @param $event The \"submit\" event object\n */\n onSubmit($event: Event): boolean {\n (this as{submitted: boolean}).submitted = true;\n syncPendingControls(this.form, this.directives);\n this.ngSubmit.emit($event);\n return false;\n }\n\n /**\n * @description\n * Method called when the \"reset\" event is triggered on the form.\n */\n onReset(): void { this.resetForm(); }\n\n /**\n * @description\n * Resets the form to an initial value and resets its submitted status.\n *\n * @param value The new value for the form.\n */\n resetForm(value: any = undefined): void {\n this.form.reset(value);\n (this as{submitted: boolean}).submitted = false;\n }\n\n\n /** @internal */\n _updateDomValue() {\n this.directives.forEach(dir => {\n const newCtrl: any = this.form.get(dir.path);\n if (dir.control !== newCtrl) {\n cleanUpControl(dir.control, dir);\n if (newCtrl) setUpControl(newCtrl, dir);\n (dir as{control: FormControl}).control = newCtrl;\n }\n });\n\n this.form._updateTreeValidity({emitEvent: false});\n }\n\n private _updateRegistrations() {\n this.form._registerOnCollectionChange(() => this._updateDomValue());\n if (this._oldForm) this._oldForm._registerOnCollectionChange(() => {});\n this._oldForm = this.form;\n }\n\n private _updateValidators() {\n const sync = composeValidators(this._validators);\n this.form.validator = Validators.compose([this.form.validator !, sync !]);\n\n const async = composeAsyncValidators(this._asyncValidators);\n this.form.asyncValidator = Validators.composeAsync([this.form.asyncValidator !, async !]);\n }\n\n private _checkFormPresent() {\n if (!this.form) {\n ReactiveErrors.missingFormException();\n }\n }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Directive, Host, Inject, Input, OnDestroy, OnInit, Optional, Self, SkipSelf, forwardRef} from '@angular/core';\n\nimport {FormArray} from '../../model';\nimport {NG_ASYNC_VALIDATORS, NG_VALIDATORS} from '../../validators';\nimport {AbstractFormGroupDirective} from '../abstract_form_group_directive';\nimport {ControlContainer} from '../control_container';\nimport {ReactiveErrors} from '../reactive_errors';\nimport {composeAsyncValidators, composeValidators, controlPath} from '../shared';\nimport {AsyncValidatorFn, ValidatorFn} from '../validators';\n\nimport {FormGroupDirective} from './form_group_directive';\n\nexport const formGroupNameProvider: any = {\n provide: ControlContainer,\n useExisting: forwardRef(() => FormGroupName)\n};\n\n/**\n * @description\n *\n * Syncs a nested `FormGroup` to a DOM element.\n *\n * This directive can only be used with a parent `FormGroupDirective`.\n *\n * It accepts the string name of the nested `FormGroup` to link, and\n * looks for a `FormGroup` registered with that name in the parent\n * `FormGroup` instance you passed into `FormGroupDirective`.\n *\n * Use nested form groups to validate a sub-group of a\n * form separately from the rest or to group the values of certain\n * controls into their own nested object.\n * \n * @see [Reactive Forms Guide](guide/reactive-forms)\n *\n * @usageNotes\n * \n * ### Access the group by name\n * \n * The following example uses the {@link AbstractControl#get get} method to access the \n * associated `FormGroup`\n *\n * ```ts\n * this.form.get('name');\n * ```\n * \n * ### Access individual controls in the group\n * \n * The following example uses the {@link AbstractControl#get get} method to access \n * individual controls within the group using dot syntax.\n *\n * ```ts\n * this.form.get('name.first');\n * ```\n *\n * ### Register a nested `FormGroup`.\n * \n * The following example registers a nested *name* `FormGroup` within an existing `FormGroup`,\n * and provides methods to retrieve the nested `FormGroup` and individual controls.\n *\n * {@example forms/ts/nestedFormGroup/nested_form_group_example.ts region='Component'}\n *\n * @ngModule ReactiveFormsModule\n * @publicApi\n */\n@Directive({selector: '[formGroupName]', providers: [formGroupNameProvider]})\nexport class FormGroupName extends AbstractFormGroupDirective implements OnInit, OnDestroy {\n /**\n * @description\n * Tracks the name of the `FormGroup` bound to the directive. The name corresponds\n * to a key in the parent `FormGroup` or `FormArray`.\n */\n // TODO(issue/24571): remove '!'.\n @Input('formGroupName') name !: string;\n\n constructor(\n @Optional() @Host() @SkipSelf() parent: ControlContainer,\n @Optional() @Self() @Inject(NG_VALIDATORS) validators: any[],\n @Optional() @Self() @Inject(NG_ASYNC_VALIDATORS) asyncValidators: any[]) {\n super();\n this._parent = parent;\n this._validators = validators;\n this._asyncValidators = asyncValidators;\n }\n\n /** @internal */\n _checkParentType(): void {\n if (_hasInvalidParent(this._parent)) {\n ReactiveErrors.groupParentException();\n }\n }\n}\n\nexport const formArrayNameProvider: any = {\n provide: ControlContainer,\n useExisting: forwardRef(() => FormArrayName)\n};\n\n/**\n * @description\n *\n * Syncs a nested `FormArray` to a DOM element.\n *\n * This directive is designed to be used with a parent `FormGroupDirective` (selector:\n * `[formGroup]`).\n *\n * It accepts the string name of the nested `FormArray` you want to link, and\n * will look for a `FormArray` registered with that name in the parent\n * `FormGroup` instance you passed into `FormGroupDirective`.\n * \n * @see [Reactive Forms Guide](guide/reactive-forms)\n * @see `AbstractControl`\n *\n * @usageNotes\n *\n * ### Example\n *\n * {@example forms/ts/nestedFormArray/nested_form_array_example.ts region='Component'}\n *\n * @ngModule ReactiveFormsModule\n * @publicApi\n */\n@Directive({selector: '[formArrayName]', providers: [formArrayNameProvider]})\nexport class FormArrayName extends ControlContainer implements OnInit, OnDestroy {\n /** @internal */\n _parent: ControlContainer;\n\n /** @internal */\n _validators: any[];\n\n /** @internal */\n _asyncValidators: any[];\n\n /**\n * @description\n * Tracks the name of the `FormArray` bound to the directive. The name corresponds\n * to a key in the parent `FormGroup` or `FormArray`.\n */\n // TODO(issue/24571): remove '!'.\n @Input('formArrayName') name !: string;\n\n constructor(\n @Optional() @Host() @SkipSelf() parent: ControlContainer,\n @Optional() @Self() @Inject(NG_VALIDATORS) validators: any[],\n @Optional() @Self() @Inject(NG_ASYNC_VALIDATORS) asyncValidators: any[]) {\n super();\n this._parent = parent;\n this._validators = validators;\n this._asyncValidators = asyncValidators;\n }\n\n /**\n * @description\n * A lifecycle method called when the directive's inputs are initialized. For internal use only.\n *\n * @throws If the directive does not have a valid parent.\n */\n ngOnInit(): void {\n this._checkParentType();\n this.formDirective !.addFormArray(this);\n }\n\n /**\n * @description\n * A lifecycle method called before the directive's instance is destroyed. For internal use only.\n */\n ngOnDestroy(): void {\n if (this.formDirective) {\n this.formDirective.removeFormArray(this);\n }\n }\n\n /**\n * @description\n * The `FormArray` bound to this directive.\n */\n get control(): FormArray { return this.formDirective !.getFormArray(this); }\n\n /**\n * @description\n * The top-level directive for this group if present, otherwise null.\n */\n get formDirective(): FormGroupDirective|null {\n return this._parent ? <FormGroupDirective>this._parent.formDirective : null;\n }\n\n /**\n * @description\n * Returns an array that represents the path from the top-level form to this control.\n * Each index is the string name of the control on that level.\n */\n get path(): string[] { return controlPath(this.name, this._parent); }\n\n /**\n * @description\n * Synchronous validator function composed of all the synchronous validators registered with this\n * directive.\n */\n get validator(): ValidatorFn|null { return composeValidators(this._validators); }\n\n /**\n * @description\n * Async validator function composed of all the async validators registered with this directive.\n */\n get asyncValidator(): AsyncValidatorFn|null {\n return composeAsyncValidators(this._asyncValidators);\n }\n\n private _checkParentType(): void {\n if (_hasInvalidParent(this._parent)) {\n ReactiveErrors.arrayParentException();\n }\n }\n}\n\nfunction _hasInvalidParent(parent: ControlContainer): boolean {\n return !(parent instanceof FormGroupName) && !(parent instanceof FormGroupDirective) &&\n !(parent instanceof FormArrayName);\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Directive, EventEmitter, Host, Inject, Input, OnChanges, OnDestroy, Optional, Output, Self, SimpleChanges, SkipSelf, forwardRef} from '@angular/core';\n\nimport {FormControl} from '../../model';\nimport {NG_ASYNC_VALIDATORS, NG_VALIDATORS} from '../../validators';\nimport {AbstractFormGroupDirective} from '../abstract_form_group_directive';\nimport {ControlContainer} from '../control_container';\nimport {ControlValueAccessor, NG_VALUE_ACCESSOR} from '../control_value_accessor';\nimport {NgControl} from '../ng_control';\nimport {ReactiveErrors} from '../reactive_errors';\nimport {_ngModelWarning, composeAsyncValidators, composeValidators, controlPath, isPropertyUpdated, selectValueAccessor} from '../shared';\nimport {AsyncValidator, AsyncValidatorFn, Validator, ValidatorFn} from '../validators';\n\nimport {NG_MODEL_WITH_FORM_CONTROL_WARNING} from './form_control_directive';\nimport {FormGroupDirective} from './form_group_directive';\nimport {FormArrayName, FormGroupName} from './form_group_name';\n\nexport const controlNameBinding: any = {\n provide: NgControl,\n useExisting: forwardRef(() => FormControlName)\n};\n\n/**\n * @description\n * Syncs a `FormControl` in an existing `FormGroup` to a form control\n * element by name.\n * \n * @see [Reactive Forms Guide](guide/reactive-forms)\n * @see `FormControl`\n * @see `AbstractControl`\n *\n * @usageNotes\n * \n * ### Register `FormControl` within a group\n *\n * The following example shows how to register multiple form controls within a form group\n * and set their value.\n *\n * {@example forms/ts/simpleFormGroup/simple_form_group_example.ts region='Component'}\n *\n * To see `formControlName` examples with different form control types, see:\n *\n * * Radio buttons: `RadioControlValueAccessor`\n * * Selects: `SelectControlValueAccessor`\n *\n * ### Use with ngModel\n *\n * Support for using the `ngModel` input property and `ngModelChange` event with reactive\n * form directives has been deprecated in Angular v6 and will be removed in Angular v7.\n *\n * Now deprecated:\n *\n * ```html\n * <form [formGroup]=\"form\">\n * <input formControlName=\"first\" [(ngModel)]=\"value\">\n * </form>\n * ```\n *\n * ```ts\n * this.value = 'some value';\n * ```\n *\n * This has been deprecated for a few reasons. First, developers have found this pattern\n * confusing. It seems like the actual `ngModel` directive is being used, but in fact it's\n * an input/output property named `ngModel` on the reactive form directive that simply\n * approximates (some of) its behavior. Specifically, it allows getting/setting the value\n * and intercepting value events. However, some of `ngModel`'s other features - like\n * delaying updates with`ngModelOptions` or exporting the directive - simply don't work,\n * which has understandably caused some confusion.\n *\n * In addition, this pattern mixes template-driven and reactive forms strategies, which\n * we generally don't recommend because it doesn't take advantage of the full benefits of\n * either strategy. Setting the value in the template violates the template-agnostic\n * principles behind reactive forms, whereas adding a `FormControl`/`FormGroup` layer in\n * the class removes the convenience of defining forms in the template.\n *\n * To update your code before v7, you'll want to decide whether to stick with reactive form\n * directives (and get/set values using reactive forms patterns) or switch over to\n * template-driven directives.\n *\n * After (choice 1 - use reactive forms):\n *\n * ```html\n * <form [formGroup]=\"form\">\n * <input formControlName=\"first\">\n * </form>\n * ```\n *\n * ```ts\n * this.form.get('first').setValue('some value');\n * ```\n *\n * After (choice 2 - use template-driven forms):\n *\n * ```html\n * <input [(ngModel)]=\"value\">\n * ```\n *\n * ```ts\n * this.value = 'some value';\n * ```\n *\n * By default, when you use this pattern, you will see a deprecation warning once in dev\n * mode. You can choose to silence this warning by providing a config for\n * `ReactiveFormsModule` at import time:\n *\n * ```ts\n * imports: [\n * ReactiveFormsModule.withConfig({warnOnNgModelWithFormControl: 'never'})\n * ]\n * ```\n *\n * Alternatively, you can choose to surface a separate warning for each instance of this\n * pattern with a config value of `\"always\"`. This may help to track down where in the code\n * the pattern is being used as the code is being updated.\n *\n * @ngModule ReactiveFormsModule\n * @publicApi\n */\n@Directive({selector: '[formControlName]', providers: [controlNameBinding]})\nexport class FormControlName extends NgControl implements OnChanges, OnDestroy {\n private _added = false;\n /**\n * @description\n * Internal reference to the view model value.\n * @internal\n */\n viewModel: any;\n\n /**\n * @description\n * Tracks the `FormControl` instance bound to the directive.\n */\n // TODO(issue/24571): remove '!'.\n readonly control !: FormControl;\n\n /**\n * @description\n * Tracks the name of the `FormControl` bound to the directive. The name corresponds\n * to a key in the parent `FormGroup` or `FormArray`.\n */\n // TODO(issue/24571): remove '!'.\n @Input('formControlName') name !: string;\n\n /**\n * @description\n * Triggers a warning that this input should not be used with reactive forms.\n */\n @Input('disabled')\n set isDisabled(isDisabled: boolean) { ReactiveErrors.disabledAttrWarning(); }\n\n // TODO(kara): remove next 4 properties once deprecation period is over\n\n /** @deprecated as of v6 */\n @Input('ngModel') model: any;\n\n /** @deprecated as of v6 */\n @Output('ngModelChange') update = new EventEmitter();\n\n /**\n * @description\n * Static property used to track whether any ngModel warnings have been sent across\n * all instances of FormControlName. Used to support warning config of \"once\".\n *\n * @internal\n */\n static _ngModelWarningSentOnce = false;\n\n /**\n * @description\n * Instance property used to track whether an ngModel warning has been sent out for this\n * particular FormControlName instance. Used to support warning config of \"always\".\n *\n * @internal\n */\n _ngModelWarningSent = false;\n\n constructor(\n @Optional() @Host() @SkipSelf() parent: ControlContainer,\n @Optional() @Self() @Inject(NG_VALIDATORS) validators: Array<Validator|ValidatorFn>,\n @Optional() @Self() @Inject(NG_ASYNC_VALIDATORS) asyncValidators:\n Array<AsyncValidator|AsyncValidatorFn>,\n @Optional() @Self() @Inject(NG_VALUE_ACCESSOR) valueAccessors: ControlValueAccessor[],\n @Optional() @Inject(NG_MODEL_WITH_FORM_CONTROL_WARNING) private _ngModelWarningConfig: string|\n null) {\n super();\n this._parent = parent;\n this._rawValidators = validators || [];\n this._rawAsyncValidators = asyncValidators || [];\n this.valueAccessor = selectValueAccessor(this, valueAccessors);\n }\n\n /**\n * @description\n * A lifecycle method called when the directive's inputs change. For internal use only.\n *\n * @param changes A object of key/value pairs for the set of changed inputs.\n */\n ngOnChanges(changes: SimpleChanges) {\n if (!this._added) this._setUpControl();\n if (isPropertyUpdated(changes, this.viewModel)) {\n _ngModelWarning('formControlName', FormControlName, this, this._ngModelWarningConfig);\n this.viewModel = this.model;\n this.formDirective.updateModel(this, this.model);\n }\n }\n\n /**\n * @description\n * Lifecycle method called before the directive's instance is destroyed. For internal use only.\n */\n ngOnDestroy(): void {\n if (this.formDirective) {\n this.formDirective.removeControl(this);\n }\n }\n\n /**\n * @description\n * Sets the new value for the view model and emits an `ngModelChange` event.\n *\n * @param newValue The new value for the view model.\n */\n viewToModelUpdate(newValue: any): void {\n this.viewModel = newValue;\n this.update.emit(newValue);\n }\n\n /**\n * @description\n * Returns an array that represents the path from the top-level form to this control.\n * Each index is the string name of the control on that level.\n */\n get path(): string[] { return controlPath(this.name, this._parent !); }\n\n /**\n * @description\n * The top-level directive for this group if present, otherwise null.\n */\n get formDirective(): any { return this._parent ? this._parent.formDirective : null; }\n\n /**\n * @description\n * Synchronous validator function composed of all the synchronous validators\n * registered with this directive.\n */\n get validator(): ValidatorFn|null { return composeValidators(this._rawValidators); }\n\n /**\n * @description\n * Async validator function composed of all the async validators registered with this\n * directive.\n */\n get asyncValidator(): AsyncValidatorFn {\n return composeAsyncValidators(this._rawAsyncValidators) !;\n }\n\n private _checkParentType(): void {\n if (!(this._parent instanceof FormGroupName) &&\n this._parent instanceof AbstractFormGroupDirective) {\n ReactiveErrors.ngModelGroupException();\n } else if (\n !(this._parent instanceof FormGroupName) && !(this._parent instanceof FormGroupDirective) &&\n !(this._parent instanceof FormArrayName)) {\n ReactiveErrors.controlParentException();\n }\n }\n\n private _setUpControl() {\n this._checkParentType();\n (this as{control: FormControl}).control = this.formDirective.addControl(this);\n if (this.control.disabled && this.valueAccessor !.setDisabledState) {\n this.valueAccessor !.setDisabledState !(true);\n }\n this._added = true;\n }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Directive, Input, OnChanges, SimpleChanges, StaticProvider, forwardRef} from '@angular/core';\nimport {Observable} from 'rxjs';\n\nimport {AbstractControl} from '../model';\nimport {NG_VALIDATORS, Validators} from '../validators';\n\n\n/**\n * @description\n * Defines the map of errors returned from failed validation checks.\n *\n * @publicApi\n */\nexport type ValidationErrors = {\n [key: string]: any\n};\n\n/**\n * @description\n * An interface implemented by classes that perform synchronous validation.\n *\n * @usageNotes\n *\n * ### Provide a custom validator\n *\n * The following example implements the `Validator` interface to create a\n * validator directive with a custom error key.\n *\n * ```typescript\n * @Directive({\n * selector: '[customValidator]',\n * providers: [{provide: NG_VALIDATORS, useExisting: CustomValidatorDirective, multi: true}]\n * })\n * class CustomValidatorDirective implements Validator {\n * validate(control: AbstractControl): ValidationErrors|null {\n * return {'custom': true};\n * }\n * }\n * ```\n *\n * @publicApi\n */\nexport interface Validator {\n /**\n * @description\n * Method that performs synchronous validation against the provided control.\n *\n * @param control The control to validate against.\n *\n * @returns A map of validation errors if validation fails,\n * otherwise null.\n */\n validate(control: AbstractControl): ValidationErrors|null;\n\n /**\n * @description\n * Registers a callback function to call when the validator inputs change.\n *\n * @param fn The callback function\n */\n registerOnValidatorChange?(fn: () => void): void;\n}\n\n/**\n * @description\n * An interface implemented by classes that perform asynchronous validation.\n *\n * @usageNotes\n *\n * ### Provide a custom async validator directive\n *\n * The following example implements the `AsyncValidator` interface to create an\n * async validator directive with a custom error key.\n *\n * ```typescript\n * import { of as observableOf } from 'rxjs';\n *\n * @Directive({\n * selector: '[customAsyncValidator]',\n * providers: [{provide: NG_ASYNC_VALIDATORS, useExisting: CustomAsyncValidatorDirective, multi:\n * true}]\n * })\n * class CustomAsyncValidatorDirective implements AsyncValidator {\n * validate(control: AbstractControl): Observable<ValidationErrors|null> {\n * return observableOf({'custom': true});\n * }\n * }\n * ```\n *\n * @publicApi\n */\nexport interface AsyncValidator extends Validator {\n /**\n * @description\n * Method that performs async validation against the provided control.\n *\n * @param control The control to validate against.\n *\n * @returns A promise or observable that resolves a map of validation errors\n * if validation fails, otherwise null.\n */\n validate(control: AbstractControl):\n Promise<ValidationErrors|null>|Observable<ValidationErrors|null>;\n}\n\n/**\n * @description\n * Provider which adds `RequiredValidator` to the `NG_VALIDATORS` multi-provider list.\n */\nexport const REQUIRED_VALIDATOR: StaticProvider = {\n provide: NG_VALIDATORS,\n useExisting: forwardRef(() => RequiredValidator),\n multi: true\n};\n\n/**\n * @description\n * Provider which adds `CheckboxRequiredValidator` to the `NG_VALIDATORS` multi-provider list.\n */\nexport const CHECKBOX_REQUIRED_VALIDATOR: StaticProvider = {\n provide: NG_VALIDATORS,\n useExisting: forwardRef(() => CheckboxRequiredValidator),\n multi: true\n};\n\n\n/**\n * @description\n * A directive that adds the `required` validator to any controls marked with the\n * `required` attribute. The directive is provided with the `NG_VALIDATORS` multi-provider list.\n * \n * @see [Form Validation](guide/form-validation)\n *\n * @usageNotes\n * \n * ### Adding a required validator using template-driven forms\n *\n * ```\n * <input name=\"fullName\" ngModel required>\n * ```\n *\n * @ngModule FormsModule\n * @ngModule ReactiveFormsModule\n * @publicApi\n */\n@Directive({\n selector:\n ':not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]',\n providers: [REQUIRED_VALIDATOR],\n host: {'[attr.required]': 'required ? \"\" : null'}\n})\nexport class RequiredValidator implements Validator {\n // TODO(issue/24571): remove '!'.\n private _required !: boolean;\n // TODO(issue/24571): remove '!'.\n private _onChange !: () => void;\n\n /**\n * @description\n * Tracks changes to the required attribute bound to this directive.\n */\n @Input()\n get required(): boolean|string { return this._required; }\n\n set required(value: boolean|string) {\n this._required = value != null && value !== false && `${value}` !== 'false';\n if (this._onChange) this._onChange();\n }\n\n /**\n * @description\n * Method that validates whether the control is empty.\n * Returns the validation result if enabled, otherwise null.\n */\n validate(control: AbstractControl): ValidationErrors|null {\n return this.required ? Validators.required(control) : null;\n }\n\n /**\n * @description\n * Registers a callback function to call when the validator inputs change.\n *\n * @param fn The callback function\n */\n registerOnValidatorChange(fn: () => void): void { this._onChange = fn; }\n}\n\n\n/**\n * A Directive that adds the `required` validator to checkbox controls marked with the\n * `required` attribute. The directive is provided with the `NG_VALIDATORS` multi-provider list.\n * \n * @see [Form Validation](guide/form-validation)\n *\n * @usageNotes\n * \n * ### Adding a required checkbox validator using template-driven forms\n *\n * The following example shows how to add a checkbox required validator to an input attached to an ngModel binding.\n * \n * ```\n * <input type=\"checkbox\" name=\"active\" ngModel required>\n * ```\n *\n * @publicApi\n * @ngModule FormsModule\n * @ngModule ReactiveFormsModule\n */\n@Directive({\n selector:\n 'input[type=checkbox][required][formControlName],input[type=checkbox][required][formControl],input[type=checkbox][required][ngModel]',\n providers: [CHECKBOX_REQUIRED_VALIDATOR],\n host: {'[attr.required]': 'required ? \"\" : null'}\n})\nexport class CheckboxRequiredValidator extends RequiredValidator {\n /**\n * @description\n * Method that validates whether or not the checkbox has been checked.\n * Returns the validation result if enabled, otherwise null.\n */\n validate(control: AbstractControl): ValidationErrors|null {\n return this.required ? Validators.requiredTrue(control) : null;\n }\n}\n\n/**\n * @description\n * Provider which adds `EmailValidator` to the `NG_VALIDATORS` multi-provider list.\n */\nexport const EMAIL_VALIDATOR: any = {\n provide: NG_VALIDATORS,\n useExisting: forwardRef(() => EmailValidator),\n multi: true\n};\n\n/**\n * A directive that adds the `email` validator to controls marked with the\n * `email` attribute. The directive is provided with the `NG_VALIDATORS` multi-provider list.\n *\n * @see [Form Validation](guide/form-validation)\n *\n * @usageNotes\n * \n * ### Adding an email validator\n *\n * The following example shows how to add an email validator to an input attached to an ngModel binding.\n * \n * ```\n * <input type=\"email\" name=\"email\" ngModel email>\n * <input type=\"email\" name=\"email\" ngModel email=\"true\">\n * <input type=\"email\" name=\"email\" ngModel [email]=\"true\">\n * ```\n *\n * @publicApi\n * @ngModule FormsModule\n * @ngModule ReactiveFormsModule\n */\n@Directive({\n selector: '[email][formControlName],[email][formControl],[email][ngModel]',\n providers: [EMAIL_VALIDATOR]\n})\nexport class EmailValidator implements Validator {\n // TODO(issue/24571): remove '!'.\n private _enabled !: boolean;\n // TODO(issue/24571): remove '!'.\n private _onChange !: () => void;\n\n /**\n * @description\n * Tracks changes to the email attribute bound to this directive.\n */\n @Input()\n set email(value: boolean|string) {\n this._enabled = value === '' || value === true || value === 'true';\n if (this._onChange) this._onChange();\n }\n\n /**\n * @description\n * Method that validates whether an email address is valid.\n * Returns the validation result if enabled, otherwise null.\n */\n validate(control: AbstractControl): ValidationErrors|null {\n return this._enabled ? Validators.email(control) : null;\n }\n\n /**\n * @description\n * Registers a callback function to call when the validator inputs change.\n *\n * @param fn The callback function\n */\n registerOnValidatorChange(fn: () => void): void { this._onChange = fn; }\n}\n\n/**\n * @description\n * A function that receives a control and synchronously returns a map of\n * validation errors if present, otherwise null.\n *\n * @publicApi\n */\nexport interface ValidatorFn { (control: AbstractControl): ValidationErrors|null; }\n\n/**\n * @description\n * A function that receives a control and returns a Promise or observable\n * that emits validation errors if present, otherwise null.\n *\n * @publicApi\n */\nexport interface AsyncValidatorFn {\n (control: AbstractControl): Promise<ValidationErrors|null>|Observable<ValidationErrors|null>;\n}\n\n/**\n * @description\n * Provider which adds `MinLengthValidator` to the `NG_VALIDATORS` multi-provider list.\n */\nexport const MIN_LENGTH_VALIDATOR: any = {\n provide: NG_VALIDATORS,\n useExisting: forwardRef(() => MinLengthValidator),\n multi: true\n};\n\n/**\n * A directive that adds minimum length validation to controls marked with the\n * `minlength` attribute. The directive is provided with the `NG_VALIDATORS` mult-provider list.\n * \n * @see [Form Validation](guide/form-validation)\n *\n * @usageNotes\n *\n * ### Adding a minimum length validator\n *\n * The following example shows how to add a minimum length validator to an input attached to an\n * ngModel binding.\n *\n * ```html\n * <input name=\"firstName\" ngModel minlength=\"4\">\n * ```\n *\n * @ngModule ReactiveFormsModule\n * @ngModule FormsModule\n * @publicApi\n */\n@Directive({\n selector: '[minlength][formControlName],[minlength][formControl],[minlength][ngModel]',\n providers: [MIN_LENGTH_VALIDATOR],\n host: {'[attr.minlength]': 'minlength ? minlength : null'}\n})\nexport class MinLengthValidator implements Validator,\n OnChanges {\n // TODO(issue/24571): remove '!'.\n private _validator !: ValidatorFn;\n // TODO(issue/24571): remove '!'.\n private _onChange !: () => void;\n\n /**\n * @description\n * Tracks changes to the the minimum length bound to this directive.\n */\n // TODO(issue/24571): remove '!'.\n @Input() minlength !: string;\n\n /**\n * @description\n * A lifecycle method called when the directive's inputs change. For internal use\n * only.\n *\n * @param changes A object of key/value pairs for the set of changed inputs.\n */\n ngOnChanges(changes: SimpleChanges): void {\n if ('minlength' in changes) {\n this._createValidator();\n if (this._onChange) this._onChange();\n }\n }\n\n /**\n * @description\n * Method that validates whether the value meets a minimum length\n * requirement. Returns the validation result if enabled, otherwise null.\n */\n validate(control: AbstractControl): ValidationErrors|null {\n return this.minlength == null ? null : this._validator(control);\n }\n\n /**\n * @description\n * Registers a callback function to call when the validator inputs change.\n *\n * @param fn The callback function\n */\n registerOnValidatorChange(fn: () => void): void { this._onChange = fn; }\n\n private _createValidator(): void {\n this._validator = Validators.minLength(parseInt(this.minlength, 10));\n }\n}\n\n/**\n * @description\n * Provider which adds `MaxLengthValidator` to the `NG_VALIDATORS` multi-provider list.\n */\nexport const MAX_LENGTH_VALIDATOR: any = {\n provide: NG_VALIDATORS,\n useExisting: forwardRef(() => MaxLengthValidator),\n multi: true\n};\n\n/**\n * A directive that adds max length validation to controls marked with the\n * `maxlength` attribute. The directive is provided with the `NG_VALIDATORS` multi-provider list.\n * \n * @see [Form Validation](guide/form-validation)\n *\n * @usageNotes\n *\n * ### Adding a maximum length validator\n *\n * The following example shows how to add a maximum length validator to an input attached to an\n * ngModel binding.\n *\n * ```html\n * <input name=\"firstName\" ngModel maxlength=\"25\">\n * ```\n *\n * @ngModule ReactiveFormsModule\n * @ngModule FormsModule\n * @publicApi\n */\n@Directive({\n selector: '[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]',\n providers: [MAX_LENGTH_VALIDATOR],\n host: {'[attr.maxlength]': 'maxlength ? maxlength : null'}\n})\nexport class MaxLengthValidator implements Validator,\n OnChanges {\n // TODO(issue/24571): remove '!'.\n private _validator !: ValidatorFn;\n // TODO(issue/24571): remove '!'.\n private _onChange !: () => void;\n\n /**\n * @description\n * Tracks changes to the the maximum length bound to this directive.\n */\n // TODO(issue/24571): remove '!'.\n @Input() maxlength !: string;\n\n /**\n * @description\n * A lifecycle method called when the directive's inputs change. For internal use\n * only.\n *\n * @param changes A object of key/value pairs for the set of changed inputs.\n */\n ngOnChanges(changes: SimpleChanges): void {\n if ('maxlength' in changes) {\n this._createValidator();\n if (this._onChange) this._onChange();\n }\n }\n\n /**\n * @description\n * Method that validates whether the value exceeds\n * the maximum length requirement.\n */\n validate(control: AbstractControl): ValidationErrors|null {\n return this.maxlength != null ? this._validator(control) : null;\n }\n\n /**\n * @description\n * Registers a callback function to call when the validator inputs change.\n *\n * @param fn The callback function\n */\n registerOnValidatorChange(fn: () => void): void { this._onChange = fn; }\n\n private _createValidator(): void {\n this._validator = Validators.maxLength(parseInt(this.maxlength, 10));\n }\n}\n\n/**\n * @description\n * Provider which adds `PatternValidator` to the `NG_VALIDATORS` multi-provider list.\n */\nexport const PATTERN_VALIDATOR: any = {\n provide: NG_VALIDATORS,\n useExisting: forwardRef(() => PatternValidator),\n multi: true\n};\n\n\n/**\n * @description\n * A directive that adds regex pattern validation to controls marked with the\n * `pattern` attribute. The regex must match the entire control value.\n * The directive is provided with the `NG_VALIDATORS` multi-provider list.\n * \n * @see [Form Validation](guide/form-validation)\n *\n * @usageNotes\n *\n * ### Adding a pattern validator\n *\n * The following example shows how to add a pattern validator to an input attached to an\n * ngModel binding.\n *\n * ```html\n * <input name=\"firstName\" ngModel pattern=\"[a-zA-Z ]*\">\n * ```\n * \n * @ngModule ReactiveFormsModule\n * @ngModule FormsModule\n * @publicApi\n */\n@Directive({\n selector: '[pattern][formControlName],[pattern][formControl],[pattern][ngModel]',\n providers: [PATTERN_VALIDATOR],\n host: {'[attr.pattern]': 'pattern ? pattern : null'}\n})\nexport class PatternValidator implements Validator,\n OnChanges {\n // TODO(issue/24571): remove '!'.\n private _validator !: ValidatorFn;\n // TODO(issue/24571): remove '!'.\n private _onChange !: () => void;\n\n /**\n * @description\n * Tracks changes to the pattern bound to this directive.\n */\n // TODO(issue/24571): remove '!'.\n @Input() pattern !: string | RegExp;\n\n /**\n * @description\n * A lifecycle method called when the directive's inputs change. For internal use\n * only.\n *\n * @param changes A object of key/value pairs for the set of changed inputs.\n */\n ngOnChanges(changes: SimpleChanges): void {\n if ('pattern' in changes) {\n this._createValidator();\n if (this._onChange) this._onChange();\n }\n }\n\n /**\n * @description\n * Method that validates whether the value matches the\n * the pattern requirement.\n */\n validate(control: AbstractControl): ValidationErrors|null { return this._validator(control); }\n\n /**\n * @description\n * Registers a callback function to call when the validator inputs change.\n *\n * @param fn The callback function\n */\n registerOnValidatorChange(fn: () => void): void { this._onChange = fn; }\n\n private _createValidator(): void { this._validator = Validators.pattern(this.pattern); }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {NgModule, Type} from '@angular/core';\n\nimport {CheckboxControlValueAccessor} from './directives/checkbox_value_accessor';\nimport {DefaultValueAccessor} from './directives/default_value_accessor';\nimport {NgControlStatus, NgControlStatusGroup} from './directives/ng_control_status';\nimport {NgForm} from './directives/ng_form';\nimport {NgFormSelectorWarning} from './directives/ng_form_selector_warning';\nimport {NgModel} from './directives/ng_model';\nimport {NgModelGroup} from './directives/ng_model_group';\nimport {NgNoValidate} from './directives/ng_no_validate_directive';\nimport {NumberValueAccessor} from './directives/number_value_accessor';\nimport {RadioControlValueAccessor} from './directives/radio_control_value_accessor';\nimport {RangeValueAccessor} from './directives/range_value_accessor';\nimport {FormControlDirective} from './directives/reactive_directives/form_control_directive';\nimport {FormControlName} from './directives/reactive_directives/form_control_name';\nimport {FormGroupDirective} from './directives/reactive_directives/form_group_directive';\nimport {FormArrayName, FormGroupName} from './directives/reactive_directives/form_group_name';\nimport {NgSelectOption, SelectControlValueAccessor} from './directives/select_control_value_accessor';\nimport {NgSelectMultipleOption, SelectMultipleControlValueAccessor} from './directives/select_multiple_control_value_accessor';\nimport {CheckboxRequiredValidator, EmailValidator, MaxLengthValidator, MinLengthValidator, PatternValidator, RequiredValidator} from './directives/validators';\n\nexport {CheckboxControlValueAccessor} from './directives/checkbox_value_accessor';\nexport {ControlValueAccessor} from './directives/control_value_accessor';\nexport {DefaultValueAccessor} from './directives/default_value_accessor';\nexport {NgControl} from './directives/ng_control';\nexport {NgControlStatus, NgControlStatusGroup} from './directives/ng_control_status';\nexport {NgForm} from './directives/ng_form';\nexport {NG_FORM_SELECTOR_WARNING, NgFormSelectorWarning} from './directives/ng_form_selector_warning';\nexport {NgModel} from './directives/ng_model';\nexport {NgModelGroup} from './directives/ng_model_group';\nexport {NumberValueAccessor} from './directives/number_value_accessor';\nexport {RadioControlValueAccessor} from './directives/radio_control_value_accessor';\nexport {RangeValueAccessor} from './directives/range_value_accessor';\nexport {FormControlDirective, NG_MODEL_WITH_FORM_CONTROL_WARNING} from './directives/reactive_directives/form_control_directive';\nexport {FormControlName} from './directives/reactive_directives/form_control_name';\nexport {FormGroupDirective} from './directives/reactive_directives/form_group_directive';\nexport {FormArrayName, FormGroupName} from './directives/reactive_directives/form_group_name';\nexport {NgSelectOption, SelectControlValueAccessor} from './directives/select_control_value_accessor';\nexport {NgSelectMultipleOption, SelectMultipleControlValueAccessor} from './directives/select_multiple_control_value_accessor';\n\nexport const SHARED_FORM_DIRECTIVES: Type<any>[] = [\n NgNoValidate,\n NgSelectOption,\n NgSelectMultipleOption,\n DefaultValueAccessor,\n NumberValueAccessor,\n RangeValueAccessor,\n CheckboxControlValueAccessor,\n SelectControlValueAccessor,\n SelectMultipleControlValueAccessor,\n RadioControlValueAccessor,\n NgControlStatus,\n NgControlStatusGroup,\n RequiredValidator,\n MinLengthValidator,\n MaxLengthValidator,\n PatternValidator,\n CheckboxRequiredValidator,\n EmailValidator,\n];\n\nexport const TEMPLATE_DRIVEN_DIRECTIVES: Type<any>[] =\n [NgModel, NgModelGroup, NgForm, NgFormSelectorWarning];\n\nexport const REACTIVE_DRIVEN_DIRECTIVES: Type<any>[] =\n [FormControlDirective, FormGroupDirective, FormControlName, FormGroupName, FormArrayName];\n\n/**\n * Internal module used for sharing directives between FormsModule and ReactiveFormsModule\n */\n@NgModule({\n declarations: SHARED_FORM_DIRECTIVES,\n exports: SHARED_FORM_DIRECTIVES,\n})\nexport class ɵInternalFormsSharedModule {\n}\n\nexport {ɵInternalFormsSharedModule as InternalFormsSharedModule};\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Injectable} from '@angular/core';\n\nimport {AsyncValidatorFn, ValidatorFn} from './directives/validators';\nimport {AbstractControl, AbstractControlOptions, FormArray, FormControl, FormGroup, FormHooks} from './model';\n\nfunction isAbstractControlOptions(options: AbstractControlOptions | {[key: string]: any}):\n options is AbstractControlOptions {\n return (<AbstractControlOptions>options).asyncValidators !== undefined ||\n (<AbstractControlOptions>options).validators !== undefined ||\n (<AbstractControlOptions>options).updateOn !== undefined;\n}\n\n/**\n * @description\n * Creates an `AbstractControl` from a user-specified configuration.\n *\n * The `FormBuilder` provides syntactic sugar that shortens creating instances of a `FormControl`,\n * `FormGroup`, or `FormArray`. It reduces the amount of boilerplate needed to build complex\n * forms.\n *\n * @see [Reactive Forms Guide](/guide/reactive-forms)\n *\n * @publicApi\n */\n@Injectable()\nexport class FormBuilder {\n /**\n * @description\n * Construct a new `FormGroup` instance.\n *\n * @param controlsConfig A collection of child controls. The key for each child is the name\n * under which it is registered.\n *\n * @param options Configuration options object for the `FormGroup`. The object can\n * have two shapes:\n *\n * 1) `AbstractControlOptions` object (preferred), which consists of:\n * * `validators`: A synchronous validator function, or an array of validator functions\n * * `asyncValidators`: A single async validator or array of async validator functions\n * * `updateOn`: The event upon which the control should be updated (options: 'change' | 'blur' |\n * submit')\n *\n * 2) Legacy configuration object, which consists of:\n * * `validator`: A synchronous validator function, or an array of validator functions\n * * `asyncValidator`: A single async validator or array of async validator functions\n *\n */\n group(\n controlsConfig: {[key: string]: any},\n options: AbstractControlOptions|{[key: string]: any}|null = null): FormGroup {\n const controls = this._reduceControls(controlsConfig);\n\n let validators: ValidatorFn|ValidatorFn[]|null = null;\n let asyncValidators: AsyncValidatorFn|AsyncValidatorFn[]|null = null;\n let updateOn: FormHooks|undefined = undefined;\n\n if (options != null) {\n if (isAbstractControlOptions(options)) {\n // `options` are `AbstractControlOptions`\n validators = options.validators != null ? options.validators : null;\n asyncValidators = options.asyncValidators != null ? options.asyncValidators : null;\n updateOn = options.updateOn != null ? options.updateOn : undefined;\n } else {\n // `options` are legacy form group options\n validators = options['validator'] != null ? options['validator'] : null;\n asyncValidators = options['asyncValidator'] != null ? options['asyncValidator'] : null;\n }\n }\n\n return new FormGroup(controls, {asyncValidators, updateOn, validators});\n }\n\n /**\n * @description\n * Construct a new `FormControl` with the given state, validators and options.\n *\n * @param formState Initializes the control with an initial state value, or\n * with an object that contains both a value and a disabled status.\n *\n * @param validatorOrOpts A synchronous validator function, or an array of\n * such functions, or an `AbstractControlOptions` object that contains\n * validation functions and a validation trigger.\n *\n * @param asyncValidator A single async validator or array of async validator\n * functions.\n *\n * @usageNotes\n *\n * ### Initialize a control as disabled\n *\n * The following example returns a control with an initial value in a disabled state.\n *\n * <code-example path=\"forms/ts/formBuilder/form_builder_example.ts\"\n * linenums=\"false\" region=\"disabled-control\">\n * </code-example>\n */\n control(\n formState: any, validatorOrOpts?: ValidatorFn|ValidatorFn[]|AbstractControlOptions|null,\n asyncValidator?: AsyncValidatorFn|AsyncValidatorFn[]|null): FormControl {\n return new FormControl(formState, validatorOrOpts, asyncValidator);\n }\n\n /**\n * Constructs a new `FormArray` from the given array of configurations,\n * validators and options.\n *\n * @param controlsConfig An array of child controls or control configs. Each\n * child control is given an index when it is registered.\n *\n * @param validatorOrOpts A synchronous validator function, or an array of\n * such functions, or an `AbstractControlOptions` object that contains\n * validation functions and a validation trigger.\n *\n * @param asyncValidator A single async validator or array of async validator\n * functions.\n */\n array(\n controlsConfig: any[],\n validatorOrOpts?: ValidatorFn|ValidatorFn[]|AbstractControlOptions|null,\n asyncValidator?: AsyncValidatorFn|AsyncValidatorFn[]|null): FormArray {\n const controls = controlsConfig.map(c => this._createControl(c));\n return new FormArray(controls, validatorOrOpts, asyncValidator);\n }\n\n /** @internal */\n _reduceControls(controlsConfig: {[k: string]: any}): {[key: string]: AbstractControl} {\n const controls: {[key: string]: AbstractControl} = {};\n Object.keys(controlsConfig).forEach(controlName => {\n controls[controlName] = this._createControl(controlsConfig[controlName]);\n });\n return controls;\n }\n\n /** @internal */\n _createControl(controlConfig: any): AbstractControl {\n if (controlConfig instanceof FormControl || controlConfig instanceof FormGroup ||\n controlConfig instanceof FormArray) {\n return controlConfig;\n\n } else if (Array.isArray(controlConfig)) {\n const value = controlConfig[0];\n const validator: ValidatorFn = controlConfig.length > 1 ? controlConfig[1] : null;\n const asyncValidator: AsyncValidatorFn = controlConfig.length > 2 ? controlConfig[2] : null;\n return this.control(value, validator, asyncValidator);\n\n } else {\n return this.control(controlConfig);\n }\n }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * @module\n * @description\n * Entry point for all public APIs of the common package.\n */\n\nimport {Version} from '@angular/core';\n\n/**\n * @publicApi\n */\nexport const VERSION = new Version('8.1.1');\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {ModuleWithProviders, NgModule} from '@angular/core';\n\nimport {InternalFormsSharedModule, NG_FORM_SELECTOR_WARNING, NG_MODEL_WITH_FORM_CONTROL_WARNING, REACTIVE_DRIVEN_DIRECTIVES, TEMPLATE_DRIVEN_DIRECTIVES} from './directives';\nimport {RadioControlRegistry} from './directives/radio_control_value_accessor';\nimport {FormBuilder} from './form_builder';\n\n/**\n * Exports the required providers and directives for template-driven forms,\n * making them available for import by NgModules that import this module.\n *\n * @see [Forms Guide](/guide/forms)\n *\n * @publicApi\n */\n@NgModule({\n declarations: TEMPLATE_DRIVEN_DIRECTIVES,\n providers: [RadioControlRegistry],\n exports: [InternalFormsSharedModule, TEMPLATE_DRIVEN_DIRECTIVES]\n})\nexport class FormsModule {\n /**\n * @description\n * Provides options for configuring the template-driven forms module.\n *\n * @param opts An object of configuration options\n * * `warnOnDeprecatedNgFormSelector` Configures when to emit a warning when the deprecated\n * `ngForm` selector is used.\n */\n static withConfig(opts: {\n /** @deprecated as of v6 */ warnOnDeprecatedNgFormSelector?: 'never' | 'once' | 'always',\n }): ModuleWithProviders<FormsModule> {\n return {\n ngModule: FormsModule,\n providers:\n [{provide: NG_FORM_SELECTOR_WARNING, useValue: opts.warnOnDeprecatedNgFormSelector}]\n };\n }\n}\n\n/**\n * Exports the required infrastructure and directives for reactive forms,\n * making them available for import by NgModules that import this module.\n * @see [Forms](guide/reactive-forms)\n *\n * @see [Reactive Forms Guide](/guide/reactive-forms)\n *\n * @publicApi\n */\n@NgModule({\n declarations: [REACTIVE_DRIVEN_DIRECTIVES],\n providers: [FormBuilder, RadioControlRegistry],\n exports: [InternalFormsSharedModule, REACTIVE_DRIVEN_DIRECTIVES]\n})\nexport class ReactiveFormsModule {\n /**\n * @description\n * Provides options for configuring the reactive forms module.\n *\n * @param opts An object of configuration options\n * * `warnOnNgModelWithFormControl` Configures when to emit a warning when an `ngModel`\n * binding is used with reactive form directives.\n */\n static withConfig(opts: {\n /** @deprecated as of v6 */ warnOnNgModelWithFormControl: 'never' | 'once' | 'always'\n }): ModuleWithProviders<ReactiveFormsModule> {\n return {\n ngModule: ReactiveFormsModule,\n providers: [{\n provide: NG_MODEL_WITH_FORM_CONTROL_WARNING,\n useValue: opts.warnOnNgModelWithFormControl\n }]\n };\n }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * @module\n * @description\n * This module is used for handling user input, by defining and building a `FormGroup` that\n * consists of `FormControl` objects, and mapping them onto the DOM. `FormControl`\n * objects can then be used to read information from the form DOM elements.\n *\n * Forms providers are not included in default providers; you must import these providers\n * explicitly.\n */\n\n\nexport {ɵInternalFormsSharedModule} from './directives';\nexport {AbstractControlDirective} from './directives/abstract_control_directive';\nexport {AbstractFormGroupDirective} from './directives/abstract_form_group_directive';\nexport {CheckboxControlValueAccessor} from './directives/checkbox_value_accessor';\nexport {ControlContainer} from './directives/control_container';\nexport {ControlValueAccessor, NG_VALUE_ACCESSOR} from './directives/control_value_accessor';\nexport {COMPOSITION_BUFFER_MODE, DefaultValueAccessor} from './directives/default_value_accessor';\nexport {Form} from './directives/form_interface';\nexport {NgControl} from './directives/ng_control';\nexport {NgControlStatus, NgControlStatusGroup} from './directives/ng_control_status';\nexport {NgForm} from './directives/ng_form';\nexport {NgFormSelectorWarning} from './directives/ng_form_selector_warning';\nexport {NgModel} from './directives/ng_model';\nexport {NgModelGroup} from './directives/ng_model_group';\nexport {ɵNgNoValidate} from './directives/ng_no_validate_directive';\nexport {NumberValueAccessor} from './directives/number_value_accessor';\nexport {RadioControlValueAccessor} from './directives/radio_control_value_accessor';\nexport {RangeValueAccessor} from './directives/range_value_accessor';\nexport {FormControlDirective} from './directives/reactive_directives/form_control_directive';\nexport {FormControlName} from './directives/reactive_directives/form_control_name';\nexport {FormGroupDirective} from './directives/reactive_directives/form_group_directive';\nexport {FormArrayName} from './directives/reactive_directives/form_group_name';\nexport {FormGroupName} from './directives/reactive_directives/form_group_name';\nexport {NgSelectOption, SelectControlValueAccessor} from './directives/select_control_value_accessor';\nexport {SelectMultipleControlValueAccessor} from './directives/select_multiple_control_value_accessor';\nexport {ɵNgSelectMultipleOption} from './directives/select_multiple_control_value_accessor';\nexport {AsyncValidator, AsyncValidatorFn, CheckboxRequiredValidator, EmailValidator, MaxLengthValidator, MinLengthValidator, PatternValidator, RequiredValidator, ValidationErrors, Validator, ValidatorFn} from './directives/validators';\nexport {FormBuilder} from './form_builder';\nexport {AbstractControl, AbstractControlOptions, FormArray, FormControl, FormGroup} from './model';\nexport {NG_ASYNC_VALIDATORS, NG_VALIDATORS, Validators} from './validators';\nexport {VERSION} from './version';\n\nexport * from './form_providers';\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * @module\n * @description\n * Entry point for all public APIs of this package.\n */\nexport * from './src/forms';\n\n// This file only reexports content of the `src` folder. Keep it that way.\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n// This file is not used to build this module. It is only used during editing\n// by the TypeScript language service and during build for verification. `ngc`\n// replaces this file with production index.ts when it rewrites private symbol\n// names.\n\nexport * from './public_api';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n\nexport {InternalFormsSharedModule as ɵangular_packages_forms_forms_d,REACTIVE_DRIVEN_DIRECTIVES as ɵangular_packages_forms_forms_c,SHARED_FORM_DIRECTIVES as ɵangular_packages_forms_forms_a,TEMPLATE_DRIVEN_DIRECTIVES as ɵangular_packages_forms_forms_b} from './src/directives';\nexport {CHECKBOX_VALUE_ACCESSOR as ɵangular_packages_forms_forms_e} from './src/directives/checkbox_value_accessor';\nexport {DEFAULT_VALUE_ACCESSOR as ɵangular_packages_forms_forms_f} from './src/directives/default_value_accessor';\nexport {AbstractControlStatus as ɵangular_packages_forms_forms_g,ngControlStatusHost as ɵangular_packages_forms_forms_h} from './src/directives/ng_control_status';\nexport {formDirectiveProvider as ɵangular_packages_forms_forms_i} from './src/directives/ng_form';\nexport {NG_FORM_SELECTOR_WARNING as ɵangular_packages_forms_forms_j} from './src/directives/ng_form_selector_warning';\nexport {formControlBinding as ɵangular_packages_forms_forms_k} from './src/directives/ng_model';\nexport {modelGroupProvider as ɵangular_packages_forms_forms_l} from './src/directives/ng_model_group';\nexport {NgNoValidate as ɵangular_packages_forms_forms_z} from './src/directives/ng_no_validate_directive';\nexport {NUMBER_VALUE_ACCESSOR as ɵangular_packages_forms_forms_m} from './src/directives/number_value_accessor';\nexport {RADIO_VALUE_ACCESSOR as ɵangular_packages_forms_forms_n,RadioControlRegistry as ɵangular_packages_forms_forms_o} from './src/directives/radio_control_value_accessor';\nexport {RANGE_VALUE_ACCESSOR as ɵangular_packages_forms_forms_p} from './src/directives/range_value_accessor';\nexport {NG_MODEL_WITH_FORM_CONTROL_WARNING as ɵangular_packages_forms_forms_q,formControlBinding as ɵangular_packages_forms_forms_r} from './src/directives/reactive_directives/form_control_directive';\nexport {controlNameBinding as ɵangular_packages_forms_forms_s} from './src/directives/reactive_directives/form_control_name';\nexport {formDirectiveProvider as ɵangular_packages_forms_forms_t} from './src/directives/reactive_directives/form_group_directive';\nexport {formArrayNameProvider as ɵangular_packages_forms_forms_v,formGroupNameProvider as ɵangular_packages_forms_forms_u} from './src/directives/reactive_directives/form_group_name';\nexport {SELECT_VALUE_ACCESSOR as ɵangular_packages_forms_forms_w} from './src/directives/select_control_value_accessor';\nexport {NgSelectMultipleOption as ɵangular_packages_forms_forms_y,SELECT_MULTIPLE_VALUE_ACCESSOR as ɵangular_packages_forms_forms_x} from './src/directives/select_multiple_control_value_accessor';\nexport {CHECKBOX_REQUIRED_VALIDATOR as ɵangular_packages_forms_forms_bb,EMAIL_VALIDATOR as ɵangular_packages_forms_forms_bc,MAX_LENGTH_VALIDATOR as ɵangular_packages_forms_forms_be,MIN_LENGTH_VALIDATOR as ɵangular_packages_forms_forms_bd,PATTERN_VALIDATOR as ɵangular_packages_forms_forms_bf,REQUIRED_VALIDATOR as ɵangular_packages_forms_forms_ba} from './src/directives/validators';"],"names":["getDOM","tslib_1.__param","tslib_1.__extends","isPromise","isObservable","tslib_1.__decorate","Examples","looseIdentical","tslib_1.__values","_buildValueString","_extractId","resolvedPromise","formControlBinding","formDirectiveProvider","NgNoValidate","NgSelectMultipleOption","InternalFormsSharedModule"],"mappings":";;;;;;;;;;;;AAAA;;;;;;;AAQA,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