{"ast":null,"code":"import _assertThisInitialized from \"C:/Users/kgamal/Downloads/HijriGregorianDatepicker-master/HijriGregorianDatepicker-master/node_modules/@babel/runtime/helpers/esm/assertThisInitialized\";\nimport _createForOfIteratorHelper from \"C:/Users/kgamal/Downloads/HijriGregorianDatepicker-master/HijriGregorianDatepicker-master/node_modules/@babel/runtime/helpers/esm/createForOfIteratorHelper\";\nimport _toConsumableArray from \"C:/Users/kgamal/Downloads/HijriGregorianDatepicker-master/HijriGregorianDatepicker-master/node_modules/@babel/runtime/helpers/esm/toConsumableArray\";\nimport _inherits from \"C:/Users/kgamal/Downloads/HijriGregorianDatepicker-master/HijriGregorianDatepicker-master/node_modules/@babel/runtime/helpers/esm/inherits\";\nimport _createSuper from \"C:/Users/kgamal/Downloads/HijriGregorianDatepicker-master/HijriGregorianDatepicker-master/node_modules/@babel/runtime/helpers/esm/createSuper\";\nimport _classCallCheck from \"C:/Users/kgamal/Downloads/HijriGregorianDatepicker-master/HijriGregorianDatepicker-master/node_modules/@babel/runtime/helpers/esm/classCallCheck\";\nimport _createClass from \"C:/Users/kgamal/Downloads/HijriGregorianDatepicker-master/HijriGregorianDatepicker-master/node_modules/@babel/runtime/helpers/esm/createClass\";\n\n/**\n * @license Angular v12.2.16\n * (c) 2010-2021 Google LLC. https://angular.io/\n * License: MIT\n */\nimport { Directive, Renderer2, ElementRef, InjectionToken, forwardRef, Optional, Inject, ɵisPromise, ɵisObservable, Self, EventEmitter, Input, Host, SkipSelf, Output, NgModule, ɵɵdefineInjectable, Injectable, Injector, Version } from '@angular/core';\nimport { ɵgetDOM } from '@angular/common';\nimport { from, forkJoin } from 'rxjs';\nimport { map } from 'rxjs/operators';\n/**\n * @license\n * Copyright Google LLC 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 * Base class for all ControlValueAccessor classes defined in Forms package.\n * Contains common logic and utility functions.\n *\n * Note: this is an *internal-only* class and should not be extended or used directly in\n * applications code.\n */\n\nimport * as ɵngcc0 from '@angular/core';\n\nvar BaseControlValueAccessor = /*@__PURE__*/function () {\n  var BaseControlValueAccessor = /*#__PURE__*/function () {\n    function BaseControlValueAccessor(_renderer, _elementRef) {\n      _classCallCheck(this, BaseControlValueAccessor);\n\n      this._renderer = _renderer;\n      this._elementRef = _elementRef;\n      /**\n       * The registered callback function called when a change or input event occurs on the input\n       * element.\n       * @nodoc\n       */\n\n      this.onChange = function (_) {};\n      /**\n       * The registered callback function called when a blur event occurs on the input element.\n       * @nodoc\n       */\n\n\n      this.onTouched = function () {};\n    }\n    /**\n     * Helper method that sets a property on a target element using the current Renderer\n     * implementation.\n     * @nodoc\n     */\n\n\n    _createClass(BaseControlValueAccessor, [{\n      key: \"setProperty\",\n      value: function setProperty(key, value) {\n        this._renderer.setProperty(this._elementRef.nativeElement, key, value);\n      }\n      /**\n       * Registers a function called when the control is touched.\n       * @nodoc\n       */\n\n    }, {\n      key: \"registerOnTouched\",\n      value: function registerOnTouched(fn) {\n        this.onTouched = fn;\n      }\n      /**\n       * Registers a function called when the control value changes.\n       * @nodoc\n       */\n\n    }, {\n      key: \"registerOnChange\",\n      value: function registerOnChange(fn) {\n        this.onChange = fn;\n      }\n      /**\n       * Sets the \"disabled\" property on the range input element.\n       * @nodoc\n       */\n\n    }, {\n      key: \"setDisabledState\",\n      value: function setDisabledState(isDisabled) {\n        this.setProperty('disabled', isDisabled);\n      }\n    }]);\n\n    return BaseControlValueAccessor;\n  }();\n\n  BaseControlValueAccessor.ɵfac = function BaseControlValueAccessor_Factory(t) {\n    return new (t || BaseControlValueAccessor)(ɵngcc0.ɵɵdirectiveInject(ɵngcc0.Renderer2), ɵngcc0.ɵɵdirectiveInject(ɵngcc0.ElementRef));\n  };\n\n  BaseControlValueAccessor.ɵdir =\n  /*@__PURE__*/\n\n  /*@__PURE__*/\n  ɵngcc0.ɵɵdefineDirective({\n    type: BaseControlValueAccessor\n  });\n  return BaseControlValueAccessor;\n}();\n\nvar BuiltInControlValueAccessor = /*@__PURE__*/function () {\n  var BuiltInControlValueAccessor = /*#__PURE__*/function (_BaseControlValueAcce) {\n    _inherits(BuiltInControlValueAccessor, _BaseControlValueAcce);\n\n    var _super = _createSuper(BuiltInControlValueAccessor);\n\n    function BuiltInControlValueAccessor() {\n      _classCallCheck(this, BuiltInControlValueAccessor);\n\n      return _super.apply(this, arguments);\n    }\n\n    return _createClass(BuiltInControlValueAccessor);\n  }(BaseControlValueAccessor);\n\n  BuiltInControlValueAccessor.ɵfac =\n  /*@__PURE__*/\n\n  /*@__PURE__*/\n  function () {\n    var ɵBuiltInControlValueAccessor_BaseFactory;\n    return function BuiltInControlValueAccessor_Factory(t) {\n      return (ɵBuiltInControlValueAccessor_BaseFactory || (ɵBuiltInControlValueAccessor_BaseFactory = ɵngcc0.ɵɵgetInheritedFactory(BuiltInControlValueAccessor)))(t || BuiltInControlValueAccessor);\n    };\n  }();\n\n  BuiltInControlValueAccessor.ɵdir =\n  /*@__PURE__*/\n\n  /*@__PURE__*/\n  ɵngcc0.ɵɵdefineDirective({\n    type: BuiltInControlValueAccessor,\n    features: [ɵngcc0.ɵɵInheritDefinitionFeature]\n  });\n  return BuiltInControlValueAccessor;\n}();\n/**\n * Used to provide a `ControlValueAccessor` for form controls.\n *\n * See `DefaultValueAccessor` for how to implement one.\n *\n * @publicApi\n */\n\n\nvar NG_VALUE_ACCESSOR = /*@__PURE__*/new InjectionToken('NgValueAccessor');\n/**\n * @license\n * Copyright Google LLC 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\nvar CHECKBOX_VALUE_ACCESSOR = {\n  provide: NG_VALUE_ACCESSOR,\n  useExisting: /*@__PURE__*/forwardRef(function () {\n    return CheckboxControlValueAccessor;\n  }),\n  multi: true\n};\n\nvar CheckboxControlValueAccessor = /*@__PURE__*/function () {\n  var CheckboxControlValueAccessor = /*#__PURE__*/function (_BuiltInControlValueA) {\n    _inherits(CheckboxControlValueAccessor, _BuiltInControlValueA);\n\n    var _super2 = _createSuper(CheckboxControlValueAccessor);\n\n    function CheckboxControlValueAccessor() {\n      _classCallCheck(this, CheckboxControlValueAccessor);\n\n      return _super2.apply(this, arguments);\n    }\n\n    _createClass(CheckboxControlValueAccessor, [{\n      key: \"writeValue\",\n      value:\n      /**\n       * Sets the \"checked\" property on the input element.\n       * @nodoc\n       */\n      function writeValue(value) {\n        this.setProperty('checked', value);\n      }\n    }]);\n\n    return CheckboxControlValueAccessor;\n  }(BuiltInControlValueAccessor);\n\n  CheckboxControlValueAccessor.ɵfac =\n  /*@__PURE__*/\n\n  /*@__PURE__*/\n  function () {\n    var ɵCheckboxControlValueAccessor_BaseFactory;\n    return function CheckboxControlValueAccessor_Factory(t) {\n      return (ɵCheckboxControlValueAccessor_BaseFactory || (ɵCheckboxControlValueAccessor_BaseFactory = ɵngcc0.ɵɵgetInheritedFactory(CheckboxControlValueAccessor)))(t || CheckboxControlValueAccessor);\n    };\n  }();\n\n  CheckboxControlValueAccessor.ɵdir =\n  /*@__PURE__*/\n\n  /*@__PURE__*/\n  ɵngcc0.ɵɵdefineDirective({\n    type: CheckboxControlValueAccessor,\n    selectors: [[\"input\", \"type\", \"checkbox\", \"formControlName\", \"\"], [\"input\", \"type\", \"checkbox\", \"formControl\", \"\"], [\"input\", \"type\", \"checkbox\", \"ngModel\", \"\"]],\n    hostBindings: function CheckboxControlValueAccessor_HostBindings(rf, ctx) {\n      if (rf & 1) {\n        ɵngcc0.ɵɵlistener(\"change\", function CheckboxControlValueAccessor_change_HostBindingHandler($event) {\n          return ctx.onChange($event.target.checked);\n        })(\"blur\", function CheckboxControlValueAccessor_blur_HostBindingHandler() {\n          return ctx.onTouched();\n        });\n      }\n    },\n    features: [/*@__PURE__*/ɵngcc0.ɵɵProvidersFeature([CHECKBOX_VALUE_ACCESSOR]), ɵngcc0.ɵɵInheritDefinitionFeature]\n  });\n  return CheckboxControlValueAccessor;\n}();\n/**\n * @license\n * Copyright Google LLC 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\nvar DEFAULT_VALUE_ACCESSOR = {\n  provide: NG_VALUE_ACCESSOR,\n  useExisting: /*@__PURE__*/forwardRef(function () {\n    return DefaultValueAccessor;\n  }),\n  multi: true\n};\n/**\n * We must check whether the agent is Android because composition events\n * behave differently between iOS and Android.\n */\n\nfunction _isAndroid() {\n  var userAgent = ɵgetDOM() ? ɵgetDOM().getUserAgent() : '';\n  return /android (\\d+)/.test(userAgent.toLowerCase());\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 */\n\n\nvar COMPOSITION_BUFFER_MODE = /*@__PURE__*/new InjectionToken('CompositionEventMode');\n\nvar DefaultValueAccessor = /*@__PURE__*/function () {\n  var DefaultValueAccessor = /*#__PURE__*/function (_BaseControlValueAcce2) {\n    _inherits(DefaultValueAccessor, _BaseControlValueAcce2);\n\n    var _super3 = _createSuper(DefaultValueAccessor);\n\n    function DefaultValueAccessor(renderer, elementRef, _compositionMode) {\n      var _this;\n\n      _classCallCheck(this, DefaultValueAccessor);\n\n      _this = _super3.call(this, renderer, elementRef);\n      _this._compositionMode = _compositionMode;\n      /** Whether the user is creating a composition string (IME events). */\n\n      _this._composing = false;\n\n      if (_this._compositionMode == null) {\n        _this._compositionMode = !_isAndroid();\n      }\n\n      return _this;\n    }\n    /**\n     * Sets the \"value\" property on the input element.\n     * @nodoc\n     */\n\n\n    _createClass(DefaultValueAccessor, [{\n      key: \"writeValue\",\n      value: function writeValue(value) {\n        var normalizedValue = value == null ? '' : value;\n        this.setProperty('value', normalizedValue);\n      }\n      /** @internal */\n\n    }, {\n      key: \"_handleInput\",\n      value: function _handleInput(value) {\n        if (!this._compositionMode || this._compositionMode && !this._composing) {\n          this.onChange(value);\n        }\n      }\n      /** @internal */\n\n    }, {\n      key: \"_compositionStart\",\n      value: function _compositionStart() {\n        this._composing = true;\n      }\n      /** @internal */\n\n    }, {\n      key: \"_compositionEnd\",\n      value: function _compositionEnd(value) {\n        this._composing = false;\n        this._compositionMode && this.onChange(value);\n      }\n    }]);\n\n    return DefaultValueAccessor;\n  }(BaseControlValueAccessor);\n\n  DefaultValueAccessor.ɵfac = function DefaultValueAccessor_Factory(t) {\n    return new (t || DefaultValueAccessor)(ɵngcc0.ɵɵdirectiveInject(ɵngcc0.Renderer2), ɵngcc0.ɵɵdirectiveInject(ɵngcc0.ElementRef), ɵngcc0.ɵɵdirectiveInject(COMPOSITION_BUFFER_MODE, 8));\n  };\n\n  DefaultValueAccessor.ɵdir =\n  /*@__PURE__*/\n\n  /*@__PURE__*/\n  ɵngcc0.ɵɵdefineDirective({\n    type: DefaultValueAccessor,\n    selectors: [[\"input\", \"formControlName\", \"\", 3, \"type\", \"checkbox\"], [\"textarea\", \"formControlName\", \"\"], [\"input\", \"formControl\", \"\", 3, \"type\", \"checkbox\"], [\"textarea\", \"formControl\", \"\"], [\"input\", \"ngModel\", \"\", 3, \"type\", \"checkbox\"], [\"textarea\", \"ngModel\", \"\"], [\"\", \"ngDefaultControl\", \"\"]],\n    hostBindings: function DefaultValueAccessor_HostBindings(rf, ctx) {\n      if (rf & 1) {\n        ɵngcc0.ɵɵlistener(\"input\", function DefaultValueAccessor_input_HostBindingHandler($event) {\n          return ctx._handleInput($event.target.value);\n        })(\"blur\", function DefaultValueAccessor_blur_HostBindingHandler() {\n          return ctx.onTouched();\n        })(\"compositionstart\", function DefaultValueAccessor_compositionstart_HostBindingHandler() {\n          return ctx._compositionStart();\n        })(\"compositionend\", function DefaultValueAccessor_compositionend_HostBindingHandler($event) {\n          return ctx._compositionEnd($event.target.value);\n        });\n      }\n    },\n    features: [/*@__PURE__*/ɵngcc0.ɵɵProvidersFeature([DEFAULT_VALUE_ACCESSOR]), ɵngcc0.ɵɵInheritDefinitionFeature]\n  });\n  return DefaultValueAccessor;\n}();\n/**\n * @license\n * Copyright Google LLC 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\nfunction isEmptyInputValue(value) {\n  // we don't check for string here so it also works with arrays\n  return value == null || value.length === 0;\n}\n\nfunction hasValidLength(value) {\n  // non-strict comparison is intentional, to check for both `null` and `undefined` values\n  return value != null && typeof value.length === 'number';\n}\n/**\n * @description\n * An `InjectionToken` for registering additional synchronous validators used with\n * `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 */\n\n\nvar NG_VALIDATORS = /*@__PURE__*/new InjectionToken('NgValidators');\n/**\n * @description\n * An `InjectionToken` for registering additional asynchronous validators used with\n * `AbstractControl`s.\n *\n * @see `NG_VALIDATORS`\n *\n * @publicApi\n */\n\nvar NG_ASYNC_VALIDATORS = /*@__PURE__*/new InjectionToken('NgAsyncValidators');\n/**\n * A regular expression that matches valid e-mail addresses.\n *\n * At a high level, this regexp matches e-mail addresses of the format `local-part@tld`, where:\n * - `local-part` consists of one or more of the allowed characters (alphanumeric and some\n *   punctuation symbols).\n * - `local-part` cannot begin or end with a period (`.`).\n * - `local-part` cannot be longer than 64 characters.\n * - `tld` consists of one or more `labels` separated by periods (`.`). For example `localhost` or\n *   `foo.com`.\n * - A `label` consists of one or more of the allowed characters (alphanumeric, dashes (`-`) and\n *   periods (`.`)).\n * - A `label` cannot begin or end with a dash (`-`) or a period (`.`).\n * - A `label` cannot be longer than 63 characters.\n * - The whole address cannot be longer than 254 characters.\n *\n * ## Implementation background\n *\n * This regexp was ported over from AngularJS (see there for git history):\n * https://github.com/angular/angular.js/blob/c133ef836/src/ng/directive/input.js#L27\n * It is based on the\n * [WHATWG version](https://html.spec.whatwg.org/multipage/input.html#valid-e-mail-address) with\n * some enhancements to incorporate more RFC rules (such as rules related to domain names and the\n * lengths of different parts of the address). The main differences from the WHATWG version are:\n *   - Disallow `local-part` to begin or end with a period (`.`).\n *   - Disallow `local-part` length to exceed 64 characters.\n *   - Disallow total address length to exceed 254 characters.\n *\n * See [this commit](https://github.com/angular/angular.js/commit/f3f5cf72e) for more details.\n */\n\nvar EMAIL_REGEXP = /^(?=.{1,254}$)(?=.{1,64}@)[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+)*@[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 * @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 */\n\nvar Validators = /*#__PURE__*/function () {\n  function Validators() {\n    _classCallCheck(this, Validators);\n  }\n\n  _createClass(Validators, null, [{\n    key: \"min\",\n    value:\n    /**\n     * @description\n     * Validator that requires the control's value to be greater than or equal to the provided number.\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     * @see `updateValueAndValidity()`\n     *\n     */\n    function min(_min) {\n      return minValidator(_min);\n    }\n    /**\n     * @description\n     * Validator that requires the control's value to be less than or equal to the provided number.\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     * @see `updateValueAndValidity()`\n     *\n     */\n\n  }, {\n    key: \"max\",\n    value: function max(_max) {\n      return maxValidator(_max);\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     * @see `updateValueAndValidity()`\n     *\n     */\n\n  }, {\n    key: \"required\",\n    value: function required(control) {\n      return requiredValidator(control);\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     * @see `updateValueAndValidity()`\n     *\n     */\n\n  }, {\n    key: \"requiredTrue\",\n    value: function requiredTrue(control) {\n      return requiredTrueValidator(control);\n    }\n    /**\n     * @description\n     * Validator that requires the control's value pass an email validation test.\n     *\n     * Tests the value using a [regular\n     * expression](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions)\n     * pattern suitable for common usecases. The pattern is based on the definition of a valid email\n     * address in the [WHATWG HTML\n     * specification](https://html.spec.whatwg.org/multipage/input.html#valid-e-mail-address) with\n     * some enhancements to incorporate more RFC rules (such as rules related to domain names and the\n     * lengths of different parts of the address).\n     *\n     * The differences from the WHATWG version include:\n     * - Disallow `local-part` (the part before the `@` symbol) to begin or end with a period (`.`).\n     * - Disallow `local-part` to be longer than 64 characters.\n     * - Disallow the whole address to be longer than 254 characters.\n     *\n     * If this pattern does not satisfy your business needs, you can use `Validators.pattern()` to\n     * validate the value against a different pattern.\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     * @see `updateValueAndValidity()`\n     *\n     */\n\n  }, {\n    key: \"email\",\n    value: function email(control) {\n      return emailValidator(control);\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. Note that the `minLength` validator is intended to be used\n     * only for types that have a numeric `length` property, such as strings or arrays. The\n     * `minLength` validator logic is also not invoked for values when their `length` property is 0\n     * (for example in case of an empty string or an empty array), to support optional controls. You\n     * can use the standard `required` validator if empty values should not be considered valid.\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` property if the validation check fails, otherwise `null`.\n     *\n     * @see `updateValueAndValidity()`\n     *\n     */\n\n  }, {\n    key: \"minLength\",\n    value: function minLength(_minLength) {\n      return minLengthValidator(_minLength);\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. Note that the `maxLength` validator is intended to be used\n     * only for types that have a numeric `length` property, such as strings or arrays.\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     * @see `updateValueAndValidity()`\n     *\n     */\n\n  }, {\n    key: \"maxLength\",\n    value: function maxLength(_maxLength) {\n      return maxLengthValidator(_maxLength);\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     * @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     * ### Pattern matching with the global or sticky flag\n     *\n     * `RegExp` objects created with the `g` or `y` flags that are passed into `Validators.pattern`\n     * can produce different results on the same input when validations are run consecutively. This is\n     * due to how the behavior of `RegExp.prototype.test` is\n     * specified in [ECMA-262](https://tc39.es/ecma262/#sec-regexpbuiltinexec)\n     * (`RegExp` preserves the index of the last match when the global or sticky flag is used).\n     * Due to this behavior, it is recommended that when using\n     * `Validators.pattern` you **do not** pass in a `RegExp` object with either the global or sticky\n     * flag enabled.\n     *\n     * ```typescript\n     * // Not recommended (since the `g` flag is used)\n     * const controlOne = new FormControl('1', Validators.pattern(/foo/g));\n     *\n     * // Good\n     * const controlTwo = new FormControl('1', Validators.pattern(/foo/));\n     * ```\n     *\n     * @param pattern A regular expression to be used as is to test the values, or a string.\n     * 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     * @returns A validator function that returns an error map with the\n     * `pattern` property if the validation check fails, otherwise `null`.\n     *\n     * @see `updateValueAndValidity()`\n     *\n     */\n\n  }, {\n    key: \"pattern\",\n    value: function pattern(_pattern) {\n      return patternValidator(_pattern);\n    }\n    /**\n     * @description\n     * Validator that performs no operation.\n     *\n     * @see `updateValueAndValidity()`\n     *\n     */\n\n  }, {\n    key: \"nullValidator\",\n    value: function nullValidator(control) {\n      return _nullValidator(control);\n    }\n  }, {\n    key: \"compose\",\n    value: function compose(validators) {\n      return _compose(validators);\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     * @see `updateValueAndValidity()`\n     *\n     */\n\n  }, {\n    key: \"composeAsync\",\n    value: function composeAsync(validators) {\n      return _composeAsync(validators);\n    }\n  }]);\n\n  return Validators;\n}();\n/**\n * Validator that requires the control's value to be greater than or equal to the provided number.\n * See `Validators.min` for additional information.\n */\n\n\nfunction minValidator(min) {\n  return function (control) {\n    if (isEmptyInputValue(control.value) || isEmptyInputValue(min)) {\n      return null; // don't validate empty values to allow optional controls\n    }\n\n    var value = parseFloat(control.value); // 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\n    return !isNaN(value) && value < min ? {\n      'min': {\n        'min': min,\n        'actual': control.value\n      }\n    } : null;\n  };\n}\n/**\n * Validator that requires the control's value to be less than or equal to the provided number.\n * See `Validators.max` for additional information.\n */\n\n\nfunction maxValidator(max) {\n  return function (control) {\n    if (isEmptyInputValue(control.value) || isEmptyInputValue(max)) {\n      return null; // don't validate empty values to allow optional controls\n    }\n\n    var value = parseFloat(control.value); // 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\n    return !isNaN(value) && value > max ? {\n      'max': {\n        'max': max,\n        'actual': control.value\n      }\n    } : null;\n  };\n}\n/**\n * Validator that requires the control have a non-empty value.\n * See `Validators.required` for additional information.\n */\n\n\nfunction requiredValidator(control) {\n  return isEmptyInputValue(control.value) ? {\n    'required': true\n  } : null;\n}\n/**\n * Validator that requires the control's value be true. This validator is commonly\n * used for required checkboxes.\n * See `Validators.requiredTrue` for additional information.\n */\n\n\nfunction requiredTrueValidator(control) {\n  return control.value === true ? null : {\n    'required': true\n  };\n}\n/**\n * Validator that requires the control's value pass an email validation test.\n * See `Validators.email` for additional information.\n */\n\n\nfunction emailValidator(control) {\n  if (isEmptyInputValue(control.value)) {\n    return null; // don't validate empty values to allow optional controls\n  }\n\n  return EMAIL_REGEXP.test(control.value) ? null : {\n    'email': true\n  };\n}\n/**\n * Validator that requires the length of the control's value to be greater than or equal\n * to the provided minimum length. See `Validators.minLength` for additional information.\n */\n\n\nfunction minLengthValidator(minLength) {\n  return function (control) {\n    if (isEmptyInputValue(control.value) || !hasValidLength(control.value)) {\n      // don't validate empty values to allow optional controls\n      // don't validate values without `length` property\n      return null;\n    }\n\n    return control.value.length < minLength ? {\n      'minlength': {\n        'requiredLength': minLength,\n        'actualLength': control.value.length\n      }\n    } : null;\n  };\n}\n/**\n * Validator that requires the length of the control's value to be less than or equal\n * to the provided maximum length. See `Validators.maxLength` for additional information.\n */\n\n\nfunction maxLengthValidator(maxLength) {\n  return function (control) {\n    return hasValidLength(control.value) && control.value.length > maxLength ? {\n      'maxlength': {\n        'requiredLength': maxLength,\n        'actualLength': control.value.length\n      }\n    } : null;\n  };\n}\n/**\n * Validator that requires the control's value to match a regex pattern.\n * See `Validators.pattern` for additional information.\n */\n\n\nfunction patternValidator(pattern) {\n  if (!pattern) return _nullValidator;\n  var regex;\n  var regexStr;\n\n  if (typeof pattern === 'string') {\n    regexStr = '';\n    if (pattern.charAt(0) !== '^') regexStr += '^';\n    regexStr += pattern;\n    if (pattern.charAt(pattern.length - 1) !== '$') regexStr += '$';\n    regex = new RegExp(regexStr);\n  } else {\n    regexStr = pattern.toString();\n    regex = pattern;\n  }\n\n  return function (control) {\n    if (isEmptyInputValue(control.value)) {\n      return null; // don't validate empty values to allow optional controls\n    }\n\n    var value = control.value;\n    return regex.test(value) ? null : {\n      'pattern': {\n        'requiredPattern': regexStr,\n        'actualValue': value\n      }\n    };\n  };\n}\n/**\n * Function that has `ValidatorFn` shape, but performs no operation.\n */\n\n\nfunction _nullValidator(control) {\n  return null;\n}\n\nfunction isPresent(o) {\n  return o != null;\n}\n\nfunction toObservable(r) {\n  var obs = ɵisPromise(r) ? from(r) : r;\n\n  if (!ɵisObservable(obs) && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n    throw new Error(\"Expected validator to return Promise or Observable.\");\n  }\n\n  return obs;\n}\n\nfunction mergeErrors(arrayOfErrors) {\n  var res = {}; // Not using Array.reduce here due to a Chrome 80 bug\n  // https://bugs.chromium.org/p/chromium/issues/detail?id=1049982\n\n  arrayOfErrors.forEach(function (errors) {\n    res = errors != null ? Object.assign(Object.assign({}, res), errors) : res;\n  });\n  return Object.keys(res).length === 0 ? null : res;\n}\n\nfunction executeValidators(control, validators) {\n  return validators.map(function (validator) {\n    return validator(control);\n  });\n}\n\nfunction isValidatorFn(validator) {\n  return !validator.validate;\n}\n/**\n * Given the list of validators that may contain both functions as well as classes, return the list\n * of validator functions (convert validator classes into validator functions). This is needed to\n * have consistent structure in validators list before composing them.\n *\n * @param validators The set of validators that may contain validators both in plain function form\n *     as well as represented as a validator class.\n */\n\n\nfunction normalizeValidators(validators) {\n  return validators.map(function (validator) {\n    return isValidatorFn(validator) ? validator : function (c) {\n      return validator.validate(c);\n    };\n  });\n}\n/**\n * Merges synchronous validators into a single validator function.\n * See `Validators.compose` for additional information.\n */\n\n\nfunction _compose(validators) {\n  if (!validators) return null;\n  var presentValidators = validators.filter(isPresent);\n  if (presentValidators.length == 0) return null;\n  return function (control) {\n    return mergeErrors(executeValidators(control, presentValidators));\n  };\n}\n/**\n * Accepts a list of validators of different possible shapes (`Validator` and `ValidatorFn`),\n * normalizes the list (converts everything to `ValidatorFn`) and merges them into a single\n * validator function.\n */\n\n\nfunction composeValidators(validators) {\n  return validators != null ? _compose(normalizeValidators(validators)) : null;\n}\n/**\n * Merges asynchronous validators into a single validator function.\n * See `Validators.composeAsync` for additional information.\n */\n\n\nfunction _composeAsync(validators) {\n  if (!validators) return null;\n  var presentValidators = validators.filter(isPresent);\n  if (presentValidators.length == 0) return null;\n  return function (control) {\n    var observables = executeValidators(control, presentValidators).map(toObservable);\n    return forkJoin(observables).pipe(map(mergeErrors));\n  };\n}\n/**\n * Accepts a list of async validators of different possible shapes (`AsyncValidator` and\n * `AsyncValidatorFn`), normalizes the list (converts everything to `AsyncValidatorFn`) and merges\n * them into a single validator function.\n */\n\n\nfunction composeAsyncValidators(validators) {\n  return validators != null ? _composeAsync(normalizeValidators(validators)) : null;\n}\n/**\n * Merges raw control validators with a given directive validator and returns the combined list of\n * validators as an array.\n */\n\n\nfunction mergeValidators(controlValidators, dirValidator) {\n  if (controlValidators === null) return [dirValidator];\n  return Array.isArray(controlValidators) ? [].concat(_toConsumableArray(controlValidators), [dirValidator]) : [controlValidators, dirValidator];\n}\n/**\n * Retrieves the list of raw synchronous validators attached to a given control.\n */\n\n\nfunction getControlValidators(control) {\n  return control._rawValidators;\n}\n/**\n * Retrieves the list of raw asynchronous validators attached to a given control.\n */\n\n\nfunction getControlAsyncValidators(control) {\n  return control._rawAsyncValidators;\n}\n/**\n * Accepts a singleton validator, an array, or null, and returns an array type with the provided\n * validators.\n *\n * @param validators A validator, validators, or null.\n * @returns A validators array.\n */\n\n\nfunction makeValidatorsArray(validators) {\n  if (!validators) return [];\n  return Array.isArray(validators) ? validators : [validators];\n}\n/**\n * Determines whether a validator or validators array has a given validator.\n *\n * @param validators The validator or validators to compare against.\n * @param validator The validator to check.\n * @returns Whether the validator is present.\n */\n\n\nfunction _hasValidator(validators, validator) {\n  return Array.isArray(validators) ? validators.includes(validator) : validators === validator;\n}\n/**\n * Combines two arrays of validators into one. If duplicates are provided, only one will be added.\n *\n * @param validators The new validators.\n * @param currentValidators The base array of currrent validators.\n * @returns An array of validators.\n */\n\n\nfunction _addValidators(validators, currentValidators) {\n  var current = makeValidatorsArray(currentValidators);\n  var validatorsToAdd = makeValidatorsArray(validators);\n  validatorsToAdd.forEach(function (v) {\n    // Note: if there are duplicate entries in the new validators array,\n    // only the first one would be added to the current list of validarors.\n    // Duplicate ones would be ignored since `hasValidator` would detect\n    // the presence of a validator function and we update the current list in place.\n    if (!_hasValidator(current, v)) {\n      current.push(v);\n    }\n  });\n  return current;\n}\n\nfunction _removeValidators(validators, currentValidators) {\n  return makeValidatorsArray(currentValidators).filter(function (v) {\n    return !_hasValidator(validators, v);\n  });\n}\n\nvar AbstractControlDirective = /*@__PURE__*/function () {\n  var AbstractControlDirective = /*#__PURE__*/function () {\n    function AbstractControlDirective() {\n      _classCallCheck(this, AbstractControlDirective);\n\n      /**\n       * Set of synchronous validators as they were provided while calling `setValidators` function.\n       * @internal\n       */\n      this._rawValidators = [];\n      /**\n       * Set of asynchronous validators as they were provided while calling `setAsyncValidators`\n       * function.\n       * @internal\n       */\n\n      this._rawAsyncValidators = [];\n      /*\n       * The set of callbacks to be invoked when directive instance is being destroyed.\n       */\n\n      this._onDestroyCallbacks = [];\n    }\n    /**\n     * @description\n     * Reports the value of the control if it is present, otherwise null.\n     */\n\n\n    _createClass(AbstractControlDirective, [{\n      key: \"value\",\n      get: function get() {\n        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\n    }, {\n      key: \"valid\",\n      get: function get() {\n        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\n    }, {\n      key: \"invalid\",\n      get: function get() {\n        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\n    }, {\n      key: \"pending\",\n      get: function get() {\n        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\n    }, {\n      key: \"disabled\",\n      get: function get() {\n        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\n    }, {\n      key: \"enabled\",\n      get: function get() {\n        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\n    }, {\n      key: \"errors\",\n      get: function get() {\n        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\n    }, {\n      key: \"pristine\",\n      get: function get() {\n        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\n    }, {\n      key: \"dirty\",\n      get: function get() {\n        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\n    }, {\n      key: \"touched\",\n      get: function get() {\n        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\n    }, {\n      key: \"status\",\n      get: function get() {\n        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\n    }, {\n      key: \"untouched\",\n      get: function get() {\n        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\n    }, {\n      key: \"statusChanges\",\n      get: function get() {\n        return this.control ? this.control.statusChanges : null;\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\n    }, {\n      key: \"valueChanges\",\n      get: function get() {\n        return this.control ? this.control.valueChanges : null;\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\n    }, {\n      key: \"path\",\n      get: function get() {\n        return null;\n      }\n      /**\n       * Sets synchronous validators for this directive.\n       * @internal\n       */\n\n    }, {\n      key: \"_setValidators\",\n      value: function _setValidators(validators) {\n        this._rawValidators = validators || [];\n        this._composedValidatorFn = composeValidators(this._rawValidators);\n      }\n      /**\n       * Sets asynchronous validators for this directive.\n       * @internal\n       */\n\n    }, {\n      key: \"_setAsyncValidators\",\n      value: function _setAsyncValidators(validators) {\n        this._rawAsyncValidators = validators || [];\n        this._composedAsyncValidatorFn = composeAsyncValidators(this._rawAsyncValidators);\n      }\n      /**\n       * @description\n       * Synchronous validator function composed of all the synchronous validators registered with this\n       * directive.\n       */\n\n    }, {\n      key: \"validator\",\n      get: function get() {\n        return this._composedValidatorFn || null;\n      }\n      /**\n       * @description\n       * Asynchronous validator function composed of all the asynchronous validators registered with\n       * this directive.\n       */\n\n    }, {\n      key: \"asyncValidator\",\n      get: function get() {\n        return this._composedAsyncValidatorFn || null;\n      }\n      /**\n       * Internal function to register callbacks that should be invoked\n       * when directive instance is being destroyed.\n       * @internal\n       */\n\n    }, {\n      key: \"_registerOnDestroy\",\n      value: function _registerOnDestroy(fn) {\n        this._onDestroyCallbacks.push(fn);\n      }\n      /**\n       * Internal function to invoke all registered \"on destroy\" callbacks.\n       * Note: calling this function also clears the list of callbacks.\n       * @internal\n       */\n\n    }, {\n      key: \"_invokeOnDestroyCallbacks\",\n      value: function _invokeOnDestroyCallbacks() {\n        this._onDestroyCallbacks.forEach(function (fn) {\n          return fn();\n        });\n\n        this._onDestroyCallbacks = [];\n      }\n      /**\n       * @description\n       * Resets the control with the provided value if the control is present.\n       */\n\n    }, {\n      key: \"reset\",\n      value: function reset() {\n        var value = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : undefined;\n        if (this.control) this.control.reset(value);\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\n    }, {\n      key: \"hasError\",\n      value: function hasError(errorCode, path) {\n        return this.control ? this.control.hasError(errorCode, path) : false;\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\n    }, {\n      key: \"getError\",\n      value: function getError(errorCode, path) {\n        return this.control ? this.control.getError(errorCode, path) : null;\n      }\n    }]);\n\n    return AbstractControlDirective;\n  }();\n\n  AbstractControlDirective.ɵfac = function AbstractControlDirective_Factory(t) {\n    return new (t || AbstractControlDirective)();\n  };\n\n  AbstractControlDirective.ɵdir =\n  /*@__PURE__*/\n\n  /*@__PURE__*/\n  ɵngcc0.ɵɵdefineDirective({\n    type: AbstractControlDirective\n  });\n  return AbstractControlDirective;\n}();\n\nvar ControlContainer = /*@__PURE__*/function () {\n  var ControlContainer = /*#__PURE__*/function (_AbstractControlDirec) {\n    _inherits(ControlContainer, _AbstractControlDirec);\n\n    var _super4 = _createSuper(ControlContainer);\n\n    function ControlContainer() {\n      _classCallCheck(this, ControlContainer);\n\n      return _super4.apply(this, arguments);\n    }\n\n    _createClass(ControlContainer, [{\n      key: \"formDirective\",\n      get:\n      /**\n       * @description\n       * The top-level form directive for the control.\n       */\n      function get() {\n        return null;\n      }\n      /**\n       * @description\n       * The path to this group.\n       */\n\n    }, {\n      key: \"path\",\n      get: function get() {\n        return null;\n      }\n    }]);\n\n    return ControlContainer;\n  }(AbstractControlDirective);\n\n  ControlContainer.ɵfac =\n  /*@__PURE__*/\n\n  /*@__PURE__*/\n  function () {\n    var ɵControlContainer_BaseFactory;\n    return function ControlContainer_Factory(t) {\n      return (ɵControlContainer_BaseFactory || (ɵControlContainer_BaseFactory = ɵngcc0.ɵɵgetInheritedFactory(ControlContainer)))(t || ControlContainer);\n    };\n  }();\n\n  ControlContainer.ɵdir =\n  /*@__PURE__*/\n\n  /*@__PURE__*/\n  ɵngcc0.ɵɵdefineDirective({\n    type: ControlContainer,\n    features: [ɵngcc0.ɵɵInheritDefinitionFeature]\n  });\n  return ControlContainer;\n}();\n/**\n * @license\n * Copyright Google LLC 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 * @description\n * A base class that all `FormControl`-based directives extend. It binds a `FormControl`\n * object to a DOM element.\n *\n * @publicApi\n */\n\n\nvar NgControl = /*#__PURE__*/function (_AbstractControlDirec2) {\n  _inherits(NgControl, _AbstractControlDirec2);\n\n  var _super5 = _createSuper(NgControl);\n\n  function NgControl() {\n    var _this2;\n\n    _classCallCheck(this, NgControl);\n\n    _this2 = _super5.apply(this, arguments);\n    /**\n     * @description\n     * The parent form for the control.\n     *\n     * @internal\n     */\n\n    _this2._parent = null;\n    /**\n     * @description\n     * The name for the control\n     */\n\n    _this2.name = null;\n    /**\n     * @description\n     * The value accessor for the control\n     */\n\n    _this2.valueAccessor = null;\n    return _this2;\n  }\n\n  return _createClass(NgControl);\n}(AbstractControlDirective);\n/**\n * @license\n * Copyright Google LLC 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\nvar AbstractControlStatus = /*#__PURE__*/function () {\n  function AbstractControlStatus(cd) {\n    _classCallCheck(this, AbstractControlStatus);\n\n    this._cd = cd;\n  }\n\n  _createClass(AbstractControlStatus, [{\n    key: \"is\",\n    value: function is(status) {\n      var _a, _b, _c; // Currently with ViewEngine (in AOT mode) it's not possible to use private methods in host\n      // bindings.\n      // TODO: once ViewEngine is removed, this function should be refactored:\n      //  - make the `is` method `protected`, so it's not accessible publicly\n      //  - move the `submitted` status logic to the `NgControlStatusGroup` class\n      //    and make it `private` or `protected` too.\n\n\n      if (status === 'submitted') {\n        // We check for the `submitted` field from `NgForm` and `FormGroupDirective` classes, but\n        // we avoid instanceof checks to prevent non-tree-shakable references to those types.\n        return !!((_a = this._cd) === null || _a === void 0 ? void 0 : _a.submitted);\n      }\n\n      return !!((_c = (_b = this._cd) === null || _b === void 0 ? void 0 : _b.control) === null || _c === void 0 ? void 0 : _c[status]);\n    }\n  }]);\n\n  return AbstractControlStatus;\n}();\n\nvar ngControlStatusHost = {\n  '[class.ng-untouched]': 'is(\"untouched\")',\n  '[class.ng-touched]': 'is(\"touched\")',\n  '[class.ng-pristine]': 'is(\"pristine\")',\n  '[class.ng-dirty]': 'is(\"dirty\")',\n  '[class.ng-valid]': 'is(\"valid\")',\n  '[class.ng-invalid]': 'is(\"invalid\")',\n  '[class.ng-pending]': 'is(\"pending\")'\n};\nvar ngGroupStatusHost = {\n  '[class.ng-untouched]': 'is(\"untouched\")',\n  '[class.ng-touched]': 'is(\"touched\")',\n  '[class.ng-pristine]': 'is(\"pristine\")',\n  '[class.ng-dirty]': 'is(\"dirty\")',\n  '[class.ng-valid]': 'is(\"valid\")',\n  '[class.ng-invalid]': 'is(\"invalid\")',\n  '[class.ng-pending]': 'is(\"pending\")',\n  '[class.ng-submitted]': 'is(\"submitted\")'\n};\n\nvar NgControlStatus = /*@__PURE__*/function () {\n  var NgControlStatus = /*#__PURE__*/function (_AbstractControlStatu) {\n    _inherits(NgControlStatus, _AbstractControlStatu);\n\n    var _super6 = _createSuper(NgControlStatus);\n\n    function NgControlStatus(cd) {\n      _classCallCheck(this, NgControlStatus);\n\n      return _super6.call(this, cd);\n    }\n\n    return _createClass(NgControlStatus);\n  }(AbstractControlStatus);\n\n  NgControlStatus.ɵfac = function NgControlStatus_Factory(t) {\n    return new (t || NgControlStatus)(ɵngcc0.ɵɵdirectiveInject(NgControl, 2));\n  };\n\n  NgControlStatus.ɵdir =\n  /*@__PURE__*/\n\n  /*@__PURE__*/\n  ɵngcc0.ɵɵdefineDirective({\n    type: NgControlStatus,\n    selectors: [[\"\", \"formControlName\", \"\"], [\"\", \"ngModel\", \"\"], [\"\", \"formControl\", \"\"]],\n    hostVars: 14,\n    hostBindings: function NgControlStatus_HostBindings(rf, ctx) {\n      if (rf & 2) {\n        ɵngcc0.ɵɵclassProp(\"ng-untouched\", ctx.is(\"untouched\"))(\"ng-touched\", ctx.is(\"touched\"))(\"ng-pristine\", ctx.is(\"pristine\"))(\"ng-dirty\", ctx.is(\"dirty\"))(\"ng-valid\", ctx.is(\"valid\"))(\"ng-invalid\", ctx.is(\"invalid\"))(\"ng-pending\", ctx.is(\"pending\"));\n      }\n    },\n    features: [ɵngcc0.ɵɵInheritDefinitionFeature]\n  });\n  return NgControlStatus;\n}();\n\nvar NgControlStatusGroup = /*@__PURE__*/function () {\n  var NgControlStatusGroup = /*#__PURE__*/function (_AbstractControlStatu2) {\n    _inherits(NgControlStatusGroup, _AbstractControlStatu2);\n\n    var _super7 = _createSuper(NgControlStatusGroup);\n\n    function NgControlStatusGroup(cd) {\n      _classCallCheck(this, NgControlStatusGroup);\n\n      return _super7.call(this, cd);\n    }\n\n    return _createClass(NgControlStatusGroup);\n  }(AbstractControlStatus);\n\n  NgControlStatusGroup.ɵfac = function NgControlStatusGroup_Factory(t) {\n    return new (t || NgControlStatusGroup)(ɵngcc0.ɵɵdirectiveInject(ControlContainer, 10));\n  };\n\n  NgControlStatusGroup.ɵdir =\n  /*@__PURE__*/\n\n  /*@__PURE__*/\n  ɵngcc0.ɵɵdefineDirective({\n    type: NgControlStatusGroup,\n    selectors: [[\"\", \"formGroupName\", \"\"], [\"\", \"formArrayName\", \"\"], [\"\", \"ngModelGroup\", \"\"], [\"\", \"formGroup\", \"\"], [\"form\", 3, \"ngNoForm\", \"\"], [\"\", \"ngForm\", \"\"]],\n    hostVars: 16,\n    hostBindings: function NgControlStatusGroup_HostBindings(rf, ctx) {\n      if (rf & 2) {\n        ɵngcc0.ɵɵclassProp(\"ng-untouched\", ctx.is(\"untouched\"))(\"ng-touched\", ctx.is(\"touched\"))(\"ng-pristine\", ctx.is(\"pristine\"))(\"ng-dirty\", ctx.is(\"dirty\"))(\"ng-valid\", ctx.is(\"valid\"))(\"ng-invalid\", ctx.is(\"invalid\"))(\"ng-pending\", ctx.is(\"pending\"))(\"ng-submitted\", ctx.is(\"submitted\"));\n      }\n    },\n    features: [ɵngcc0.ɵɵInheritDefinitionFeature]\n  });\n  return NgControlStatusGroup;\n}();\n/**\n * @license\n * Copyright Google LLC 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\nvar formControlNameExample = \"\\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  });\";\nvar formGroupNameExample = \"\\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  });\";\nvar formArrayNameExample = \"\\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  });\";\nvar ngModelGroupExample = \"\\n  <form>\\n      <div ngModelGroup=\\\"person\\\">\\n        <input [(ngModel)]=\\\"person.name\\\" name=\\\"firstName\\\">\\n      </div>\\n  </form>\";\nvar ngModelWithFormGroupExample = \"\\n  <div [formGroup]=\\\"myGroup\\\">\\n      <input formControlName=\\\"firstName\\\">\\n      <input [(ngModel)]=\\\"showMoreControls\\\" [ngModelOptions]=\\\"{standalone: true}\\\">\\n  </div>\\n\";\n/**\n * @license\n * Copyright Google LLC 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\nfunction controlParentException() {\n  return new Error(\"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    \".concat(formControlNameExample));\n}\n\nfunction ngModelGroupException() {\n  return new Error(\"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      \".concat(formGroupNameExample, \"\\n\\n      Option 2: Use ngModel instead of formControlName (template-driven strategy)\\n\\n      \").concat(ngModelGroupExample));\n}\n\nfunction missingFormException() {\n  return new Error(\"formGroup expects a FormGroup instance. Please pass one in.\\n\\n      Example:\\n\\n      \".concat(formControlNameExample));\n}\n\nfunction groupParentException() {\n  return new Error(\"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    \".concat(formGroupNameExample));\n}\n\nfunction arrayParentException() {\n  return new Error(\"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      \".concat(formArrayNameExample));\n}\n\nvar disabledAttrWarning = \"\\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\nfunction ngModelWarning(directiveName) {\n  return \"\\n  It looks like you're using ngModel on the same form field as \".concat(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 a future version of Angular.\\n\\n  For more information on this, see our API docs here:\\n  https://angular.io/api/forms/\").concat(directiveName === 'formControl' ? 'FormControlDirective' : 'FormControlName', \"#use-with-ngmodel\\n  \");\n}\n/**\n * @license\n * Copyright Google LLC 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\nfunction controlPath(name, parent) {\n  return [].concat(_toConsumableArray(parent.path), [name]);\n}\n/**\n * Links a Form control and a Form directive by setting up callbacks (such as `onChange`) on both\n * instances. This function is typically invoked when form directive is being initialized.\n *\n * @param control Form control instance that should be linked.\n * @param dir Directive that should be linked with a given control.\n */\n\n\nfunction setUpControl(control, dir) {\n  if (typeof ngDevMode === 'undefined' || ngDevMode) {\n    if (!control) _throwError(dir, 'Cannot find control with');\n    if (!dir.valueAccessor) _throwError(dir, 'No value accessor for form control with');\n  }\n\n  setUpValidators(control, dir);\n  dir.valueAccessor.writeValue(control.value);\n  setUpViewChangePipeline(control, dir);\n  setUpModelChangePipeline(control, dir);\n  setUpBlurPipeline(control, dir);\n  setUpDisabledChangeHandler(control, dir);\n}\n/**\n * Reverts configuration performed by the `setUpControl` control function.\n * Effectively disconnects form control with a given form directive.\n * This function is typically invoked when corresponding form directive is being destroyed.\n *\n * @param control Form control which should be cleaned up.\n * @param dir Directive that should be disconnected from a given control.\n * @param validateControlPresenceOnChange Flag that indicates whether onChange handler should\n *     contain asserts to verify that it's not called once directive is destroyed. We need this flag\n *     to avoid potentially breaking changes caused by better control cleanup introduced in #39235.\n */\n\n\nfunction cleanUpControl(control, dir) {\n  var validateControlPresenceOnChange = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;\n\n  var noop = function noop() {\n    if (validateControlPresenceOnChange && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n      _noControlError(dir);\n    }\n  }; // The `valueAccessor` field is typically defined on FromControl and FormControlName directive\n  // instances and there is a logic in `selectValueAccessor` function that throws if it's not the\n  // case. We still check the presence of `valueAccessor` before invoking its methods to make sure\n  // that cleanup works correctly if app code or tests are setup to ignore the error thrown from\n  // `selectValueAccessor`. See https://github.com/angular/angular/issues/40521.\n\n\n  if (dir.valueAccessor) {\n    dir.valueAccessor.registerOnChange(noop);\n    dir.valueAccessor.registerOnTouched(noop);\n  }\n\n  cleanUpValidators(control, dir);\n\n  if (control) {\n    dir._invokeOnDestroyCallbacks();\n\n    control._registerOnCollectionChange(function () {});\n  }\n}\n\nfunction registerOnValidatorChange(validators, onChange) {\n  validators.forEach(function (validator) {\n    if (validator.registerOnValidatorChange) validator.registerOnValidatorChange(onChange);\n  });\n}\n/**\n * Sets up disabled change handler function on a given form control if ControlValueAccessor\n * associated with a given directive instance supports the `setDisabledState` call.\n *\n * @param control Form control where disabled change handler should be setup.\n * @param dir Corresponding directive instance associated with this control.\n */\n\n\nfunction setUpDisabledChangeHandler(control, dir) {\n  if (dir.valueAccessor.setDisabledState) {\n    var onDisabledChange = function onDisabledChange(isDisabled) {\n      dir.valueAccessor.setDisabledState(isDisabled);\n    };\n\n    control.registerOnDisabledChange(onDisabledChange); // Register a callback function to cleanup disabled change handler\n    // from a control instance when a directive is destroyed.\n\n    dir._registerOnDestroy(function () {\n      control._unregisterOnDisabledChange(onDisabledChange);\n    });\n  }\n}\n/**\n * Sets up sync and async directive validators on provided form control.\n * This function merges validators from the directive into the validators of the control.\n *\n * @param control Form control where directive validators should be setup.\n * @param dir Directive instance that contains validators to be setup.\n */\n\n\nfunction setUpValidators(control, dir) {\n  var validators = getControlValidators(control);\n\n  if (dir.validator !== null) {\n    control.setValidators(mergeValidators(validators, dir.validator));\n  } else if (typeof validators === 'function') {\n    // If sync validators are represented by a single validator function, we force the\n    // `Validators.compose` call to happen by executing the `setValidators` function with\n    // an array that contains that function. We need this to avoid possible discrepancies in\n    // validators behavior, so sync validators are always processed by the `Validators.compose`.\n    // Note: we should consider moving this logic inside the `setValidators` function itself, so we\n    // have consistent behavior on AbstractControl API level. The same applies to the async\n    // validators logic below.\n    control.setValidators([validators]);\n  }\n\n  var asyncValidators = getControlAsyncValidators(control);\n\n  if (dir.asyncValidator !== null) {\n    control.setAsyncValidators(mergeValidators(asyncValidators, dir.asyncValidator));\n  } else if (typeof asyncValidators === 'function') {\n    control.setAsyncValidators([asyncValidators]);\n  } // Re-run validation when validator binding changes, e.g. minlength=3 -> minlength=4\n\n\n  var onValidatorChange = function onValidatorChange() {\n    return control.updateValueAndValidity();\n  };\n\n  registerOnValidatorChange(dir._rawValidators, onValidatorChange);\n  registerOnValidatorChange(dir._rawAsyncValidators, onValidatorChange);\n}\n/**\n * Cleans up sync and async directive validators on provided form control.\n * This function reverts the setup performed by the `setUpValidators` function, i.e.\n * removes directive-specific validators from a given control instance.\n *\n * @param control Form control from where directive validators should be removed.\n * @param dir Directive instance that contains validators to be removed.\n * @returns true if a control was updated as a result of this action.\n */\n\n\nfunction cleanUpValidators(control, dir) {\n  var isControlUpdated = false;\n\n  if (control !== null) {\n    if (dir.validator !== null) {\n      var validators = getControlValidators(control);\n\n      if (Array.isArray(validators) && validators.length > 0) {\n        // Filter out directive validator function.\n        var updatedValidators = validators.filter(function (validator) {\n          return validator !== dir.validator;\n        });\n\n        if (updatedValidators.length !== validators.length) {\n          isControlUpdated = true;\n          control.setValidators(updatedValidators);\n        }\n      }\n    }\n\n    if (dir.asyncValidator !== null) {\n      var asyncValidators = getControlAsyncValidators(control);\n\n      if (Array.isArray(asyncValidators) && asyncValidators.length > 0) {\n        // Filter out directive async validator function.\n        var updatedAsyncValidators = asyncValidators.filter(function (asyncValidator) {\n          return asyncValidator !== dir.asyncValidator;\n        });\n\n        if (updatedAsyncValidators.length !== asyncValidators.length) {\n          isControlUpdated = true;\n          control.setAsyncValidators(updatedAsyncValidators);\n        }\n      }\n    }\n  } // Clear onValidatorChange callbacks by providing a noop function.\n\n\n  var noop = function noop() {};\n\n  registerOnValidatorChange(dir._rawValidators, noop);\n  registerOnValidatorChange(dir._rawAsyncValidators, noop);\n  return isControlUpdated;\n}\n\nfunction setUpViewChangePipeline(control, dir) {\n  dir.valueAccessor.registerOnChange(function (newValue) {\n    control._pendingValue = newValue;\n    control._pendingChange = true;\n    control._pendingDirty = true;\n    if (control.updateOn === 'change') updateControl(control, dir);\n  });\n}\n\nfunction setUpBlurPipeline(control, dir) {\n  dir.valueAccessor.registerOnTouched(function () {\n    control._pendingTouched = true;\n    if (control.updateOn === 'blur' && control._pendingChange) updateControl(control, dir);\n    if (control.updateOn !== 'submit') control.markAsTouched();\n  });\n}\n\nfunction updateControl(control, dir) {\n  if (control._pendingDirty) control.markAsDirty();\n  control.setValue(control._pendingValue, {\n    emitModelToViewChange: false\n  });\n  dir.viewToModelUpdate(control._pendingValue);\n  control._pendingChange = false;\n}\n\nfunction setUpModelChangePipeline(control, dir) {\n  var onChange = function onChange(newValue, emitModelEvent) {\n    // control -> view\n    dir.valueAccessor.writeValue(newValue); // control -> ngModel\n\n    if (emitModelEvent) dir.viewToModelUpdate(newValue);\n  };\n\n  control.registerOnChange(onChange); // Register a callback function to cleanup onChange handler\n  // from a control instance when a directive is destroyed.\n\n  dir._registerOnDestroy(function () {\n    control._unregisterOnChange(onChange);\n  });\n}\n/**\n * Links a FormGroup or FormArray instance and corresponding Form directive by setting up validators\n * present in the view.\n *\n * @param control FormGroup or FormArray instance that should be linked.\n * @param dir Directive that provides view validators.\n */\n\n\nfunction setUpFormContainer(control, dir) {\n  if (control == null && (typeof ngDevMode === 'undefined' || ngDevMode)) _throwError(dir, 'Cannot find control with');\n  setUpValidators(control, dir);\n}\n/**\n * Reverts the setup performed by the `setUpFormContainer` function.\n *\n * @param control FormGroup or FormArray instance that should be cleaned up.\n * @param dir Directive that provided view validators.\n * @returns true if a control was updated as a result of this action.\n */\n\n\nfunction cleanUpFormContainer(control, dir) {\n  return cleanUpValidators(control, dir);\n}\n\nfunction _noControlError(dir) {\n  return _throwError(dir, 'There is no FormControl instance attached to form control element with');\n}\n\nfunction _throwError(dir, message) {\n  var messageEnd;\n\n  if (dir.path.length > 1) {\n    messageEnd = \"path: '\".concat(dir.path.join(' -> '), \"'\");\n  } else if (dir.path[0]) {\n    messageEnd = \"name: '\".concat(dir.path, \"'\");\n  } else {\n    messageEnd = 'unspecified name attribute';\n  }\n\n  throw new Error(\"\".concat(message, \" \").concat(messageEnd));\n}\n\nfunction isPropertyUpdated(changes, viewModel) {\n  if (!changes.hasOwnProperty('model')) return false;\n  var change = changes['model'];\n  if (change.isFirstChange()) return true;\n  return !Object.is(viewModel, change.currentValue);\n}\n\nfunction isBuiltInAccessor(valueAccessor) {\n  // Check if a given value accessor is an instance of a class that directly extends\n  // `BuiltInControlValueAccessor` one.\n  return Object.getPrototypeOf(valueAccessor.constructor) === BuiltInControlValueAccessor;\n}\n\nfunction syncPendingControls(form, directives) {\n  form._syncPendingControls();\n\n  directives.forEach(function (dir) {\n    var control = dir.control;\n\n    if (control.updateOn === 'submit' && control._pendingChange) {\n      dir.viewToModelUpdate(control._pendingValue);\n      control._pendingChange = false;\n    }\n  });\n} // TODO: vsavkin remove it once https://github.com/angular/angular/issues/3011 is implemented\n\n\nfunction selectValueAccessor(dir, valueAccessors) {\n  if (!valueAccessors) return null;\n  if (!Array.isArray(valueAccessors) && (typeof ngDevMode === 'undefined' || ngDevMode)) _throwError(dir, 'Value accessor was not provided as an array for form control with');\n  var defaultAccessor = undefined;\n  var builtinAccessor = undefined;\n  var customAccessor = undefined;\n  valueAccessors.forEach(function (v) {\n    if (v.constructor === DefaultValueAccessor) {\n      defaultAccessor = v;\n    } else if (isBuiltInAccessor(v)) {\n      if (builtinAccessor && (typeof ngDevMode === 'undefined' || ngDevMode)) _throwError(dir, 'More than one built-in value accessor matches form control with');\n      builtinAccessor = v;\n    } else {\n      if (customAccessor && (typeof ngDevMode === 'undefined' || ngDevMode)) _throwError(dir, 'More than one custom value accessor matches form control with');\n      customAccessor = v;\n    }\n  });\n  if (customAccessor) return customAccessor;\n  if (builtinAccessor) return builtinAccessor;\n  if (defaultAccessor) return defaultAccessor;\n\n  if (typeof ngDevMode === 'undefined' || ngDevMode) {\n    _throwError(dir, 'No valid value accessor for form control with');\n  }\n\n  return null;\n}\n\nfunction removeListItem(list, el) {\n  var index = list.indexOf(el);\n  if (index > -1) list.splice(index, 1);\n} // TODO(kara): remove after deprecation period\n\n\nfunction _ngModelWarning(name, type, instance, warningConfig) {\n  if (warningConfig === 'never') return;\n\n  if ((warningConfig === null || warningConfig === 'once') && !type._ngModelWarningSentOnce || warningConfig === 'always' && !instance._ngModelWarningSent) {\n    console.warn(ngModelWarning(name));\n    type._ngModelWarningSentOnce = true;\n    instance._ngModelWarningSent = true;\n  }\n}\n/**\n * @license\n * Copyright Google LLC 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 * Reports that a FormControl is valid, meaning that no errors exist in the input value.\n *\n * @see `status`\n */\n\n\nvar VALID = 'VALID';\n/**\n * Reports that a FormControl is invalid, meaning that an error exists in the input value.\n *\n * @see `status`\n */\n\nvar INVALID = 'INVALID';\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 */\n\nvar PENDING = 'PENDING';\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 */\n\nvar DISABLED = 'DISABLED';\n\nfunction _find(control, path, delimiter) {\n  if (path == null) return null;\n\n  if (!Array.isArray(path)) {\n    path = path.split(delimiter);\n  }\n\n  if (Array.isArray(path) && path.length === 0) return null; // Not using Array.reduce here due to a Chrome 80 bug\n  // https://bugs.chromium.org/p/chromium/issues/detail?id=1049982\n\n  var controlToFind = control;\n  path.forEach(function (name) {\n    if (controlToFind instanceof FormGroup) {\n      controlToFind = controlToFind.controls.hasOwnProperty(name) ? controlToFind.controls[name] : null;\n    } else if (controlToFind instanceof FormArray) {\n      controlToFind = controlToFind.at(name) || null;\n    } else {\n      controlToFind = null;\n    }\n  });\n  return controlToFind;\n}\n/**\n * Gets validators from either an options object or given validators.\n */\n\n\nfunction pickValidators(validatorOrOpts) {\n  return (isOptionsObj(validatorOrOpts) ? validatorOrOpts.validators : validatorOrOpts) || null;\n}\n/**\n * Creates validator function by combining provided validators.\n */\n\n\nfunction coerceToValidator(validator) {\n  return Array.isArray(validator) ? composeValidators(validator) : validator || null;\n}\n/**\n * Gets async validators from either an options object or given validators.\n */\n\n\nfunction pickAsyncValidators(asyncValidator, validatorOrOpts) {\n  return (isOptionsObj(validatorOrOpts) ? validatorOrOpts.asyncValidators : asyncValidator) || null;\n}\n/**\n * Creates async validator function by combining provided async validators.\n */\n\n\nfunction coerceToAsyncValidator(asyncValidator) {\n  return Array.isArray(asyncValidator) ? composeAsyncValidators(asyncValidator) : asyncValidator || null;\n}\n\nfunction isOptionsObj(validatorOrOpts) {\n  return validatorOrOpts != null && !Array.isArray(validatorOrOpts) && typeof validatorOrOpts === 'object';\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 */\n\n\nvar AbstractControl = /*#__PURE__*/function () {\n  /**\n   * Initialize the AbstractControl instance.\n   *\n   * @param validators The function or array of functions that is used to determine the validity of\n   *     this control synchronously.\n   * @param asyncValidators The function or array of functions that is used to determine validity of\n   *     this control asynchronously.\n   */\n  function AbstractControl(validators, asyncValidators) {\n    _classCallCheck(this, AbstractControl);\n\n    /**\n     * Indicates that a control has its own pending asynchronous validation in progress.\n     *\n     * @internal\n     */\n    this._hasOwnPendingAsyncValidator = false;\n    /** @internal */\n\n    this._onCollectionChange = function () {};\n\n    this._parent = null;\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\n    this.pristine = true;\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\n    this.touched = false;\n    /** @internal */\n\n    this._onDisabledChange = [];\n    this._rawValidators = validators;\n    this._rawAsyncValidators = asyncValidators;\n    this._composedValidatorFn = coerceToValidator(this._rawValidators);\n    this._composedAsyncValidatorFn = coerceToAsyncValidator(this._rawAsyncValidators);\n  }\n  /**\n   * Returns the function that is used to determine the validity of this control synchronously.\n   * If multiple validators have been added, this will be a single composed function.\n   * See `Validators.compose()` for additional information.\n   */\n\n\n  _createClass(AbstractControl, [{\n    key: \"validator\",\n    get: function get() {\n      return this._composedValidatorFn;\n    },\n    set: function set(validatorFn) {\n      this._rawValidators = this._composedValidatorFn = validatorFn;\n    }\n    /**\n     * Returns the function that is used to determine the validity of this control asynchronously.\n     * If multiple validators have been added, this will be a single composed function.\n     * See `Validators.compose()` for additional information.\n     */\n\n  }, {\n    key: \"asyncValidator\",\n    get: function get() {\n      return this._composedAsyncValidatorFn;\n    },\n    set: function set(asyncValidatorFn) {\n      this._rawAsyncValidators = this._composedAsyncValidatorFn = asyncValidatorFn;\n    }\n    /**\n     * The parent control.\n     */\n\n  }, {\n    key: \"parent\",\n    get: function get() {\n      return this._parent;\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\n  }, {\n    key: \"valid\",\n    get: function get() {\n      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\n  }, {\n    key: \"invalid\",\n    get: function get() {\n      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\n  }, {\n    key: \"pending\",\n    get: function get() {\n      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\n  }, {\n    key: \"disabled\",\n    get: function get() {\n      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\n  }, {\n    key: \"enabled\",\n    get: function get() {\n      return this.status !== DISABLED;\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\n  }, {\n    key: \"dirty\",\n    get: function get() {\n      return !this.pristine;\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\n  }, {\n    key: \"untouched\",\n    get: function get() {\n      return !this.touched;\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\n  }, {\n    key: \"updateOn\",\n    get: function get() {\n      return this._updateOn ? this._updateOn : this.parent ? this.parent.updateOn : 'change';\n    }\n    /**\n     * Sets the synchronous validators that are active on this control.  Calling\n     * this overwrites any existing synchronous validators.\n     *\n     * When you add or remove a validator at run time, you must call\n     * `updateValueAndValidity()` for the new validation to take effect.\n     *\n     * If you want to add a new validator without affecting existing ones, consider\n     * using `addValidators()` method instead.\n     */\n\n  }, {\n    key: \"setValidators\",\n    value: function setValidators(validators) {\n      this._rawValidators = validators;\n      this._composedValidatorFn = coerceToValidator(validators);\n    }\n    /**\n     * Sets the asynchronous validators that are active on this control. Calling this\n     * overwrites any existing asynchronous validators.\n     *\n     * When you add or remove a validator at run time, you must call\n     * `updateValueAndValidity()` for the new validation to take effect.\n     *\n     * If you want to add a new validator without affecting existing ones, consider\n     * using `addAsyncValidators()` method instead.\n     */\n\n  }, {\n    key: \"setAsyncValidators\",\n    value: function setAsyncValidators(validators) {\n      this._rawAsyncValidators = validators;\n      this._composedAsyncValidatorFn = coerceToAsyncValidator(validators);\n    }\n    /**\n     * Add a synchronous validator or validators to this control, without affecting other validators.\n     *\n     * When you add or remove a validator at run time, you must call\n     * `updateValueAndValidity()` for the new validation to take effect.\n     *\n     * Adding a validator that already exists will have no effect. If duplicate validator functions\n     * are present in the `validators` array, only the first instance would be added to a form\n     * control.\n     *\n     * @param validators The new validator function or functions to add to this control.\n     */\n\n  }, {\n    key: \"addValidators\",\n    value: function addValidators(validators) {\n      this.setValidators(_addValidators(validators, this._rawValidators));\n    }\n    /**\n     * Add an asynchronous validator or validators to this control, without affecting other\n     * validators.\n     *\n     * When you add or remove a validator at run time, you must call\n     * `updateValueAndValidity()` for the new validation to take effect.\n     *\n     * Adding a validator that already exists will have no effect.\n     *\n     * @param validators The new asynchronous validator function or functions to add to this control.\n     */\n\n  }, {\n    key: \"addAsyncValidators\",\n    value: function addAsyncValidators(validators) {\n      this.setAsyncValidators(_addValidators(validators, this._rawAsyncValidators));\n    }\n    /**\n     * Remove a synchronous validator from this control, without affecting other validators.\n     * Validators are compared by function reference; you must pass a reference to the exact same\n     * validator function as the one that was originally set. If a provided validator is not found,\n     * it is ignored.\n     *\n     * When you add or remove a validator at run time, you must call\n     * `updateValueAndValidity()` for the new validation to take effect.\n     *\n     * @param validators The validator or validators to remove.\n     */\n\n  }, {\n    key: \"removeValidators\",\n    value: function removeValidators(validators) {\n      this.setValidators(_removeValidators(validators, this._rawValidators));\n    }\n    /**\n     * Remove an asynchronous validator from this control, without affecting other validators.\n     * Validators are compared by function reference; you must pass a reference to the exact same\n     * validator function as the one that was originally set. If a provided validator is not found, it\n     * is ignored.\n     *\n     * When you add or remove a validator at run time, you must call\n     * `updateValueAndValidity()` for the new validation to take effect.\n     *\n     * @param validators The asynchronous validator or validators to remove.\n     */\n\n  }, {\n    key: \"removeAsyncValidators\",\n    value: function removeAsyncValidators(validators) {\n      this.setAsyncValidators(_removeValidators(validators, this._rawAsyncValidators));\n    }\n    /**\n     * Check whether a synchronous validator function is present on this control. The provided\n     * validator must be a reference to the exact same function that was provided.\n     *\n     * @param validator The validator to check for presence. Compared by function reference.\n     * @returns Whether the provided validator was found on this control.\n     */\n\n  }, {\n    key: \"hasValidator\",\n    value: function hasValidator(validator) {\n      return _hasValidator(this._rawValidators, validator);\n    }\n    /**\n     * Check whether an asynchronous validator function is present on this control. The provided\n     * validator must be a reference to the exact same function that was provided.\n     *\n     * @param validator The asynchronous validator to check for presence. Compared by function\n     *     reference.\n     * @returns Whether the provided asynchronous validator was found on this control.\n     */\n\n  }, {\n    key: \"hasAsyncValidator\",\n    value: function hasAsyncValidator(validator) {\n      return _hasValidator(this._rawAsyncValidators, validator);\n    }\n    /**\n     * Empties out the synchronous validator list.\n     *\n     * When you add or remove a validator at run time, you must call\n     * `updateValueAndValidity()` for the new validation to take effect.\n     *\n     */\n\n  }, {\n    key: \"clearValidators\",\n    value: function clearValidators() {\n      this.validator = null;\n    }\n    /**\n     * Empties out the async validator list.\n     *\n     * When you add or remove a validator at run time, you must call\n     * `updateValueAndValidity()` for the new validation to take effect.\n     *\n     */\n\n  }, {\n    key: \"clearAsyncValidators\",\n    value: function clearAsyncValidators() {\n      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 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\n  }, {\n    key: \"markAsTouched\",\n    value: function markAsTouched() {\n      var opts = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n      this.touched = true;\n\n      if (this._parent && !opts.onlySelf) {\n        this._parent.markAsTouched(opts);\n      }\n    }\n    /**\n     * Marks the control and all its descendant controls as `touched`.\n     * @see `markAsTouched()`\n     */\n\n  }, {\n    key: \"markAllAsTouched\",\n    value: function markAllAsTouched() {\n      this.markAsTouched({\n        onlySelf: true\n      });\n\n      this._forEachChild(function (control) {\n        return 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\n  }, {\n    key: \"markAsUntouched\",\n    value: function markAsUntouched() {\n      var opts = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n      this.touched = false;\n      this._pendingTouched = false;\n\n      this._forEachChild(function (control) {\n        control.markAsUntouched({\n          onlySelf: true\n        });\n      });\n\n      if (this._parent && !opts.onlySelf) {\n        this._parent._updateTouched(opts);\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\n  }, {\n    key: \"markAsDirty\",\n    value: function markAsDirty() {\n      var opts = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n      this.pristine = false;\n\n      if (this._parent && !opts.onlySelf) {\n        this._parent.markAsDirty(opts);\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\n  }, {\n    key: \"markAsPristine\",\n    value: function markAsPristine() {\n      var opts = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n      this.pristine = true;\n      this._pendingDirty = false;\n\n      this._forEachChild(function (control) {\n        control.markAsPristine({\n          onlySelf: true\n        });\n      });\n\n      if (this._parent && !opts.onlySelf) {\n        this._parent._updatePristine(opts);\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\n  }, {\n    key: \"markAsPending\",\n    value: function markAsPending() {\n      var opts = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n      this.status = PENDING;\n\n      if (opts.emitEvent !== false) {\n        this.statusChanges.emit(this.status);\n      }\n\n      if (this._parent && !opts.onlySelf) {\n        this._parent.markAsPending(opts);\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\n  }, {\n    key: \"disable\",\n    value: function disable() {\n      var opts = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n\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      var skipPristineCheck = this._parentMarkedDirty(opts.onlySelf);\n\n      this.status = DISABLED;\n      this.errors = null;\n\n      this._forEachChild(function (control) {\n        control.disable(Object.assign(Object.assign({}, opts), {\n          onlySelf: true\n        }));\n      });\n\n      this._updateValue();\n\n      if (opts.emitEvent !== false) {\n        this.valueChanges.emit(this.value);\n        this.statusChanges.emit(this.status);\n      }\n\n      this._updateAncestors(Object.assign(Object.assign({}, opts), {\n        skipPristineCheck: skipPristineCheck\n      }));\n\n      this._onDisabledChange.forEach(function (changeFn) {\n        return 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\n  }, {\n    key: \"enable\",\n    value: function enable() {\n      var opts = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n\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      var skipPristineCheck = this._parentMarkedDirty(opts.onlySelf);\n\n      this.status = VALID;\n\n      this._forEachChild(function (control) {\n        control.enable(Object.assign(Object.assign({}, opts), {\n          onlySelf: true\n        }));\n      });\n\n      this.updateValueAndValidity({\n        onlySelf: true,\n        emitEvent: opts.emitEvent\n      });\n\n      this._updateAncestors(Object.assign(Object.assign({}, opts), {\n        skipPristineCheck: skipPristineCheck\n      }));\n\n      this._onDisabledChange.forEach(function (changeFn) {\n        return changeFn(false);\n      });\n    }\n  }, {\n    key: \"_updateAncestors\",\n    value: function _updateAncestors(opts) {\n      if (this._parent && !opts.onlySelf) {\n        this._parent.updateValueAndValidity(opts);\n\n        if (!opts.skipPristineCheck) {\n          this._parent._updatePristine();\n        }\n\n        this._parent._updateTouched();\n      }\n    }\n    /**\n     * @param parent Sets the parent of the control\n     */\n\n  }, {\n    key: \"setParent\",\n    value: function setParent(parent) {\n      this._parent = parent;\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\n  }, {\n    key: \"updateValueAndValidity\",\n    value: function updateValueAndValidity() {\n      var opts = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n\n      this._setInitialStatus();\n\n      this._updateValue();\n\n      if (this.enabled) {\n        this._cancelExistingSubscription();\n\n        this.errors = this._runValidator();\n        this.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.emit(this.value);\n        this.statusChanges.emit(this.status);\n      }\n\n      if (this._parent && !opts.onlySelf) {\n        this._parent.updateValueAndValidity(opts);\n      }\n    }\n    /** @internal */\n\n  }, {\n    key: \"_updateTreeValidity\",\n    value: function _updateTreeValidity() {\n      var opts = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {\n        emitEvent: true\n      };\n\n      this._forEachChild(function (ctrl) {\n        return ctrl._updateTreeValidity(opts);\n      });\n\n      this.updateValueAndValidity({\n        onlySelf: true,\n        emitEvent: opts.emitEvent\n      });\n    }\n  }, {\n    key: \"_setInitialStatus\",\n    value: function _setInitialStatus() {\n      this.status = this._allControlsDisabled() ? DISABLED : VALID;\n    }\n  }, {\n    key: \"_runValidator\",\n    value: function _runValidator() {\n      return this.validator ? this.validator(this) : null;\n    }\n  }, {\n    key: \"_runAsyncValidator\",\n    value: function _runAsyncValidator(emitEvent) {\n      var _this3 = this;\n\n      if (this.asyncValidator) {\n        this.status = PENDING;\n        this._hasOwnPendingAsyncValidator = true;\n        var obs = toObservable(this.asyncValidator(this));\n        this._asyncValidationSubscription = obs.subscribe(function (errors) {\n          _this3._hasOwnPendingAsyncValidator = false; // This will trigger the recalculation of the validation status, which depends on\n          // the state of the asynchronous validation (whether it is in progress or not). So, it is\n          // necessary that we have updated the `_hasOwnPendingAsyncValidator` boolean flag first.\n\n          _this3.setErrors(errors, {\n            emitEvent: emitEvent\n          });\n        });\n      }\n    }\n  }, {\n    key: \"_cancelExistingSubscription\",\n    value: function _cancelExistingSubscription() {\n      if (this._asyncValidationSubscription) {\n        this._asyncValidationSubscription.unsubscribe();\n\n        this._hasOwnPendingAsyncValidator = false;\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     *\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\n  }, {\n    key: \"setErrors\",\n    value: function setErrors(errors) {\n      var opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n      this.errors = errors;\n\n      this._updateControlsErrors(opts.emitEvent !== false);\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     * ### Retrieve a control in a FormArray\n     *\n     * When accessing an element inside a FormArray, you can use an element index.\n     * For example, to get a `price` control from the first element in an `items` array you can use:\n     *\n     * * `this.form.get('items.0.price');`\n     *\n     * -OR-\n     *\n     * * `this.form.get(['items', 0, 'price']);`\n     */\n\n  }, {\n    key: \"get\",\n    value: function get(path) {\n      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\n  }, {\n    key: \"getError\",\n    value: function getError(errorCode, path) {\n      var control = path ? this.get(path) : this;\n      return control && control.errors ? control.errors[errorCode] : null;\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\n  }, {\n    key: \"hasError\",\n    value: function hasError(errorCode, path) {\n      return !!this.getError(errorCode, path);\n    }\n    /**\n     * Retrieves the top-level ancestor of this control.\n     */\n\n  }, {\n    key: \"root\",\n    get: function get() {\n      var x = this;\n\n      while (x._parent) {\n        x = x._parent;\n      }\n\n      return x;\n    }\n    /** @internal */\n\n  }, {\n    key: \"_updateControlsErrors\",\n    value: function _updateControlsErrors(emitEvent) {\n      this.status = this._calculateStatus();\n\n      if (emitEvent) {\n        this.statusChanges.emit(this.status);\n      }\n\n      if (this._parent) {\n        this._parent._updateControlsErrors(emitEvent);\n      }\n    }\n    /** @internal */\n\n  }, {\n    key: \"_initObservables\",\n    value: function _initObservables() {\n      this.valueChanges = new EventEmitter();\n      this.statusChanges = new EventEmitter();\n    }\n  }, {\n    key: \"_calculateStatus\",\n    value: function _calculateStatus() {\n      if (this._allControlsDisabled()) return DISABLED;\n      if (this.errors) return INVALID;\n      if (this._hasOwnPendingAsyncValidator || this._anyControlsHaveStatus(PENDING)) return PENDING;\n      if (this._anyControlsHaveStatus(INVALID)) return INVALID;\n      return VALID;\n    }\n    /** @internal */\n\n  }, {\n    key: \"_anyControlsHaveStatus\",\n    value: function _anyControlsHaveStatus(status) {\n      return this._anyControls(function (control) {\n        return control.status === status;\n      });\n    }\n    /** @internal */\n\n  }, {\n    key: \"_anyControlsDirty\",\n    value: function _anyControlsDirty() {\n      return this._anyControls(function (control) {\n        return control.dirty;\n      });\n    }\n    /** @internal */\n\n  }, {\n    key: \"_anyControlsTouched\",\n    value: function _anyControlsTouched() {\n      return this._anyControls(function (control) {\n        return control.touched;\n      });\n    }\n    /** @internal */\n\n  }, {\n    key: \"_updatePristine\",\n    value: function _updatePristine() {\n      var opts = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n      this.pristine = !this._anyControlsDirty();\n\n      if (this._parent && !opts.onlySelf) {\n        this._parent._updatePristine(opts);\n      }\n    }\n    /** @internal */\n\n  }, {\n    key: \"_updateTouched\",\n    value: function _updateTouched() {\n      var opts = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n      this.touched = this._anyControlsTouched();\n\n      if (this._parent && !opts.onlySelf) {\n        this._parent._updateTouched(opts);\n      }\n    }\n    /** @internal */\n\n  }, {\n    key: \"_isBoxedValue\",\n    value: function _isBoxedValue(formState) {\n      return typeof formState === 'object' && formState !== null && Object.keys(formState).length === 2 && 'value' in formState && 'disabled' in formState;\n    }\n    /** @internal */\n\n  }, {\n    key: \"_registerOnCollectionChange\",\n    value: function _registerOnCollectionChange(fn) {\n      this._onCollectionChange = fn;\n    }\n    /** @internal */\n\n  }, {\n    key: \"_setUpdateStrategy\",\n    value: function _setUpdateStrategy(opts) {\n      if (isOptionsObj(opts) && opts.updateOn != null) {\n        this._updateOn = opts.updateOn;\n      }\n    }\n    /**\n     * Check to see if parent has been marked artificially dirty.\n     *\n     * @internal\n     */\n\n  }, {\n    key: \"_parentMarkedDirty\",\n    value: function _parentMarkedDirty(onlySelf) {\n      var parentDirty = this._parent && this._parent.dirty;\n      return !onlySelf && !!parentDirty && !this._parent._anyControlsDirty();\n    }\n  }]);\n\n  return AbstractControl;\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. See [usage examples below](#usage-notes).\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 synchronous 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 */\n\n\nvar FormControl = /*#__PURE__*/function (_AbstractControl) {\n  _inherits(FormControl, _AbstractControl);\n\n  var _super8 = _createSuper(FormControl);\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  function FormControl() {\n    var _this4;\n\n    var formState = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;\n    var validatorOrOpts = arguments.length > 1 ? arguments[1] : undefined;\n    var asyncValidator = arguments.length > 2 ? arguments[2] : undefined;\n\n    _classCallCheck(this, FormControl);\n\n    _this4 = _super8.call(this, pickValidators(validatorOrOpts), pickAsyncValidators(asyncValidator, validatorOrOpts));\n    /** @internal */\n\n    _this4._onChange = [];\n\n    _this4._applyFormState(formState);\n\n    _this4._setUpdateStrategy(validatorOrOpts);\n\n    _this4._initObservables();\n\n    _this4.updateValueAndValidity({\n      onlySelf: true,\n      // If `asyncValidator` is present, it will trigger control status change from `PENDING` to\n      // `VALID` or `INVALID`.\n      // The status should be broadcasted via the `statusChanges` observable, so we set `emitEvent`\n      // to `true` to allow that during the control creation process.\n      emitEvent: !!_this4.asyncValidator\n    });\n\n    return _this4;\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\n\n  _createClass(FormControl, [{\n    key: \"setValue\",\n    value: function setValue(value) {\n      var _this5 = this;\n\n      var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n      this.value = this._pendingValue = value;\n\n      if (this._onChange.length && options.emitModelToViewChange !== false) {\n        this._onChange.forEach(function (changeFn) {\n          return changeFn(_this5.value, options.emitViewToModelChange !== false);\n        });\n      }\n\n      this.updateValueAndValidity(options);\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\n  }, {\n    key: \"patchValue\",\n    value: function patchValue(value) {\n      var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n      this.setValue(value, options);\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\n  }, {\n    key: \"reset\",\n    value: function reset() {\n      var formState = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;\n      var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n      this._applyFormState(formState);\n\n      this.markAsPristine(options);\n      this.markAsUntouched(options);\n      this.setValue(this.value, options);\n      this._pendingChange = false;\n    }\n    /**\n     * @internal\n     */\n\n  }, {\n    key: \"_updateValue\",\n    value: function _updateValue() {}\n    /**\n     * @internal\n     */\n\n  }, {\n    key: \"_anyControls\",\n    value: function _anyControls(condition) {\n      return false;\n    }\n    /**\n     * @internal\n     */\n\n  }, {\n    key: \"_allControlsDisabled\",\n    value: function _allControlsDisabled() {\n      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\n  }, {\n    key: \"registerOnChange\",\n    value: function registerOnChange(fn) {\n      this._onChange.push(fn);\n    }\n    /**\n     * Internal function to unregister a change events listener.\n     * @internal\n     */\n\n  }, {\n    key: \"_unregisterOnChange\",\n    value: function _unregisterOnChange(fn) {\n      removeListItem(this._onChange, fn);\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\n  }, {\n    key: \"registerOnDisabledChange\",\n    value: function registerOnDisabledChange(fn) {\n      this._onDisabledChange.push(fn);\n    }\n    /**\n     * Internal function to unregister a disabled event listener.\n     * @internal\n     */\n\n  }, {\n    key: \"_unregisterOnDisabledChange\",\n    value: function _unregisterOnDisabledChange(fn) {\n      removeListItem(this._onDisabledChange, fn);\n    }\n    /**\n     * @internal\n     */\n\n  }, {\n    key: \"_forEachChild\",\n    value: function _forEachChild(cb) {}\n    /** @internal */\n\n  }, {\n    key: \"_syncPendingControls\",\n    value: function _syncPendingControls() {\n      if (this.updateOn === 'submit') {\n        if (this._pendingDirty) this.markAsDirty();\n        if (this._pendingTouched) this.markAsTouched();\n\n        if (this._pendingChange) {\n          this.setValue(this._pendingValue, {\n            onlySelf: true,\n            emitModelToViewChange: false\n          });\n          return true;\n        }\n      }\n\n      return false;\n    }\n  }, {\n    key: \"_applyFormState\",\n    value: function _applyFormState(formState) {\n      if (this._isBoxedValue(formState)) {\n        this.value = this._pendingValue = formState.value;\n        formState.disabled ? this.disable({\n          onlySelf: true,\n          emitEvent: false\n        }) : this.enable({\n          onlySelf: true,\n          emitEvent: false\n        });\n      } else {\n        this.value = this._pendingValue = formState;\n      }\n    }\n  }]);\n\n  return FormControl;\n}(AbstractControl);\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 */\n\n\nvar FormGroup = /*#__PURE__*/function (_AbstractControl2) {\n  _inherits(FormGroup, _AbstractControl2);\n\n  var _super9 = _createSuper(FormGroup);\n\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  function FormGroup(controls, validatorOrOpts, asyncValidator) {\n    var _this6;\n\n    _classCallCheck(this, FormGroup);\n\n    _this6 = _super9.call(this, pickValidators(validatorOrOpts), pickAsyncValidators(asyncValidator, validatorOrOpts));\n    _this6.controls = controls;\n\n    _this6._initObservables();\n\n    _this6._setUpdateStrategy(validatorOrOpts);\n\n    _this6._setUpControls();\n\n    _this6.updateValueAndValidity({\n      onlySelf: true,\n      // If `asyncValidator` is present, it will trigger control status change from `PENDING` to\n      // `VALID` or `INVALID`. The status should be broadcasted via the `statusChanges` observable,\n      // so we set `emitEvent` to `true` to allow that during the control creation process.\n      emitEvent: !!_this6.asyncValidator\n    });\n\n    return _this6;\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\n\n  _createClass(FormGroup, [{\n    key: \"registerControl\",\n    value: function registerControl(name, control) {\n      if (this.controls[name]) return this.controls[name];\n      this.controls[name] = control;\n      control.setParent(this);\n\n      control._registerOnCollectionChange(this._onCollectionChange);\n\n      return control;\n    }\n    /**\n     * Add a control to this group.\n     *\n     * If a control with a given name already exists, it would *not* be replaced with a new one.\n     * If you want to replace an existing control, use the {@link FormGroup#setControl setControl}\n     * method instead. 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     * @param options Specifies whether this FormGroup instance should emit events after a new\n     *     control is added.\n     * * `emitEvent`: When true or not supplied (the default), both the `statusChanges` and\n     * `valueChanges` observables emit events with the latest status and value when the control is\n     * added. When false, no events are emitted.\n     */\n\n  }, {\n    key: \"addControl\",\n    value: function addControl(name, control) {\n      var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n      this.registerControl(name, control);\n      this.updateValueAndValidity({\n        emitEvent: options.emitEvent\n      });\n\n      this._onCollectionChange();\n    }\n    /**\n     * Remove a control from this group.\n     *\n     * This method also updates the value and validity of the control.\n     *\n     * @param name The control name to remove from the collection\n     * @param options Specifies whether this FormGroup instance should emit events after a\n     *     control is removed.\n     * * `emitEvent`: When true or not supplied (the default), both the `statusChanges` and\n     * `valueChanges` observables emit events with the latest status and value when the control is\n     * removed. When false, no events are emitted.\n     */\n\n  }, {\n    key: \"removeControl\",\n    value: function removeControl(name) {\n      var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n      if (this.controls[name]) this.controls[name]._registerOnCollectionChange(function () {});\n      delete this.controls[name];\n      this.updateValueAndValidity({\n        emitEvent: options.emitEvent\n      });\n\n      this._onCollectionChange();\n    }\n    /**\n     * Replace an existing control.\n     *\n     * If a control with a given name does not exist in this `FormGroup`, it will be added.\n     *\n     * @param name The control name to replace in the collection\n     * @param control Provides the control for the given name\n     * @param options Specifies whether this FormGroup instance should emit events after an\n     *     existing control is replaced.\n     * * `emitEvent`: When true or not supplied (the default), both the `statusChanges` and\n     * `valueChanges` observables emit events with the latest status and value when the control is\n     * replaced with a new one. When false, no events are emitted.\n     */\n\n  }, {\n    key: \"setControl\",\n    value: function setControl(name, control) {\n      var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n      if (this.controls[name]) this.controls[name]._registerOnCollectionChange(function () {});\n      delete this.controls[name];\n      if (control) this.registerControl(name, control);\n      this.updateValueAndValidity({\n        emitEvent: options.emitEvent\n      });\n\n      this._onCollectionChange();\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 controlName The control name to check for existence in the collection\n     *\n     * @returns false for disabled controls, true otherwise.\n     */\n\n  }, {\n    key: \"contains\",\n    value: function contains(controlName) {\n      return this.controls.hasOwnProperty(controlName) && this.controls[controlName].enabled;\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 exclude a value of a control that does exist.\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\n  }, {\n    key: \"setValue\",\n    value: function setValue(value) {\n      var _this7 = this;\n\n      var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n      this._checkAllValuesPresent(value);\n\n      Object.keys(value).forEach(function (name) {\n        _this7._throwIfControlMissing(name);\n\n        _this7.controls[name].setValue(value[name], {\n          onlySelf: true,\n          emitEvent: options.emitEvent\n        });\n      });\n      this.updateValueAndValidity(options);\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` observables emit events with the latest status and value when the control value\n     * is updated. When false, no events are emitted. The configuration options are passed to\n     * the {@link AbstractControl#updateValueAndValidity updateValueAndValidity} method.\n     */\n\n  }, {\n    key: \"patchValue\",\n    value: function patchValue(value) {\n      var _this8 = this;\n\n      var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n      // Even though the `value` argument type doesn't allow `null` and `undefined` values, the\n      // `patchValue` can be called recursively and inner data structures might have these values, so\n      // we just ignore such cases when a field containing FormGroup instance receives `null` or\n      // `undefined` as a value.\n      if (value == null\n      /* both `null` and `undefined` */\n      ) return;\n      Object.keys(value).forEach(function (name) {\n        if (_this8.controls[name]) {\n          _this8.controls[name].patchValue(value[name], {\n            onlySelf: true,\n            emitEvent: options.emitEvent\n          });\n        }\n      });\n      this.updateValueAndValidity(options);\n    }\n    /**\n     * Resets the `FormGroup`, marks all descendants `pristine` and `untouched` and sets\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 value 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(form.value);  // {last: 'last'}\n     * console.log(form.get('first').status);  // 'DISABLED'\n     * ```\n     */\n\n  }, {\n    key: \"reset\",\n    value: function reset() {\n      var value = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n      var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n      this._forEachChild(function (control, name) {\n        control.reset(value[name], {\n          onlySelf: true,\n          emitEvent: options.emitEvent\n        });\n      });\n\n      this._updatePristine(options);\n\n      this._updateTouched(options);\n\n      this.updateValueAndValidity(options);\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\n  }, {\n    key: \"getRawValue\",\n    value: function getRawValue() {\n      return this._reduceChildren({}, function (acc, control, name) {\n        acc[name] = control instanceof FormControl ? control.value : control.getRawValue();\n        return acc;\n      });\n    }\n    /** @internal */\n\n  }, {\n    key: \"_syncPendingControls\",\n    value: function _syncPendingControls() {\n      var subtreeUpdated = this._reduceChildren(false, function (updated, child) {\n        return child._syncPendingControls() ? true : updated;\n      });\n\n      if (subtreeUpdated) this.updateValueAndValidity({\n        onlySelf: true\n      });\n      return subtreeUpdated;\n    }\n    /** @internal */\n\n  }, {\n    key: \"_throwIfControlMissing\",\n    value: function _throwIfControlMissing(name) {\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\n      if (!this.controls[name]) {\n        throw new Error(\"Cannot find form control with name: \".concat(name, \".\"));\n      }\n    }\n    /** @internal */\n\n  }, {\n    key: \"_forEachChild\",\n    value: function _forEachChild(cb) {\n      var _this9 = this;\n\n      Object.keys(this.controls).forEach(function (key) {\n        // The list of controls can change (for ex. controls might be removed) while the loop\n        // is running (as a result of invoking Forms API in `valueChanges` subscription), so we\n        // have to null check before invoking the callback.\n        var control = _this9.controls[key];\n        control && cb(control, key);\n      });\n    }\n    /** @internal */\n\n  }, {\n    key: \"_setUpControls\",\n    value: function _setUpControls() {\n      var _this10 = this;\n\n      this._forEachChild(function (control) {\n        control.setParent(_this10);\n\n        control._registerOnCollectionChange(_this10._onCollectionChange);\n      });\n    }\n    /** @internal */\n\n  }, {\n    key: \"_updateValue\",\n    value: function _updateValue() {\n      this.value = this._reduceValue();\n    }\n    /** @internal */\n\n  }, {\n    key: \"_anyControls\",\n    value: function _anyControls(condition) {\n      for (var _i = 0, _Object$keys = Object.keys(this.controls); _i < _Object$keys.length; _i++) {\n        var controlName = _Object$keys[_i];\n        var control = this.controls[controlName];\n\n        if (this.contains(controlName) && condition(control)) {\n          return true;\n        }\n      }\n\n      return false;\n    }\n    /** @internal */\n\n  }, {\n    key: \"_reduceValue\",\n    value: function _reduceValue() {\n      var _this11 = this;\n\n      return this._reduceChildren({}, function (acc, control, name) {\n        if (control.enabled || _this11.disabled) {\n          acc[name] = control.value;\n        }\n\n        return acc;\n      });\n    }\n    /** @internal */\n\n  }, {\n    key: \"_reduceChildren\",\n    value: function _reduceChildren(initValue, fn) {\n      var res = initValue;\n\n      this._forEachChild(function (control, name) {\n        res = fn(res, control, name);\n      });\n\n      return res;\n    }\n    /** @internal */\n\n  }, {\n    key: \"_allControlsDisabled\",\n    value: function _allControlsDisabled() {\n      for (var _i2 = 0, _Object$keys2 = Object.keys(this.controls); _i2 < _Object$keys2.length; _i2++) {\n        var controlName = _Object$keys2[_i2];\n\n        if (this.controls[controlName].enabled) {\n          return false;\n        }\n      }\n\n      return Object.keys(this.controls).length > 0 || this.disabled;\n    }\n    /** @internal */\n\n  }, {\n    key: \"_checkAllValuesPresent\",\n    value: function _checkAllValuesPresent(value) {\n      this._forEachChild(function (control, name) {\n        if (value[name] === undefined) {\n          throw new Error(\"Must supply a value for form control with name: '\".concat(name, \"'.\"));\n        }\n      });\n    }\n  }]);\n\n  return FormGroup;\n}(AbstractControl);\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 */\n\n\nvar FormArray = /*#__PURE__*/function (_AbstractControl3) {\n  _inherits(FormArray, _AbstractControl3);\n\n  var _super10 = _createSuper(FormArray);\n\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  function FormArray(controls, validatorOrOpts, asyncValidator) {\n    var _this12;\n\n    _classCallCheck(this, FormArray);\n\n    _this12 = _super10.call(this, pickValidators(validatorOrOpts), pickAsyncValidators(asyncValidator, validatorOrOpts));\n    _this12.controls = controls;\n\n    _this12._initObservables();\n\n    _this12._setUpdateStrategy(validatorOrOpts);\n\n    _this12._setUpControls();\n\n    _this12.updateValueAndValidity({\n      onlySelf: true,\n      // If `asyncValidator` is present, it will trigger control status change from `PENDING` to\n      // `VALID` or `INVALID`.\n      // The status should be broadcasted via the `statusChanges` observable, so we set `emitEvent`\n      // to `true` to allow that during the control creation process.\n      emitEvent: !!_this12.asyncValidator\n    });\n\n    return _this12;\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\n\n  _createClass(FormArray, [{\n    key: \"at\",\n    value: function at(index) {\n      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     * @param options Specifies whether this FormArray instance should emit events after a new\n     *     control is added.\n     * * `emitEvent`: When true or not supplied (the default), both the `statusChanges` and\n     * `valueChanges` observables emit events with the latest status and value when the control is\n     * inserted. When false, no events are emitted.\n     */\n\n  }, {\n    key: \"push\",\n    value: function push(control) {\n      var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n      this.controls.push(control);\n\n      this._registerControl(control);\n\n      this.updateValueAndValidity({\n        emitEvent: options.emitEvent\n      });\n\n      this._onCollectionChange();\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     * @param options Specifies whether this FormArray instance should emit events after a new\n     *     control is inserted.\n     * * `emitEvent`: When true or not supplied (the default), both the `statusChanges` and\n     * `valueChanges` observables emit events with the latest status and value when the control is\n     * inserted. When false, no events are emitted.\n     */\n\n  }, {\n    key: \"insert\",\n    value: function insert(index, control) {\n      var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n      this.controls.splice(index, 0, control);\n\n      this._registerControl(control);\n\n      this.updateValueAndValidity({\n        emitEvent: options.emitEvent\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     * @param options Specifies whether this FormArray instance should emit events after a\n     *     control is removed.\n     * * `emitEvent`: When true or not supplied (the default), both the `statusChanges` and\n     * `valueChanges` observables emit events with the latest status and value when the control is\n     * removed. When false, no events are emitted.\n     */\n\n  }, {\n    key: \"removeAt\",\n    value: function removeAt(index) {\n      var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n      if (this.controls[index]) this.controls[index]._registerOnCollectionChange(function () {});\n      this.controls.splice(index, 1);\n      this.updateValueAndValidity({\n        emitEvent: options.emitEvent\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     * @param options Specifies whether this FormArray instance should emit events after an\n     *     existing control is replaced with a new one.\n     * * `emitEvent`: When true or not supplied (the default), both the `statusChanges` and\n     * `valueChanges` observables emit events with the latest status and value when the control is\n     * replaced with a new one. When false, no events are emitted.\n     */\n\n  }, {\n    key: \"setControl\",\n    value: function setControl(index, control) {\n      var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n      if (this.controls[index]) this.controls[index]._registerOnCollectionChange(function () {});\n      this.controls.splice(index, 1);\n\n      if (control) {\n        this.controls.splice(index, 0, control);\n\n        this._registerControl(control);\n      }\n\n      this.updateValueAndValidity({\n        emitEvent: options.emitEvent\n      });\n\n      this._onCollectionChange();\n    }\n    /**\n     * Length of the control array.\n     */\n\n  }, {\n    key: \"length\",\n    get: function get() {\n      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\n  }, {\n    key: \"setValue\",\n    value: function setValue(value) {\n      var _this13 = this;\n\n      var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n      this._checkAllValuesPresent(value);\n\n      value.forEach(function (newValue, index) {\n        _this13._throwIfControlMissing(index);\n\n        _this13.at(index).setValue(newValue, {\n          onlySelf: true,\n          emitEvent: options.emitEvent\n        });\n      });\n      this.updateValueAndValidity(options);\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` observables emit events with the latest status and value when the control value\n     * is updated. When false, no events are emitted. The configuration options are passed to\n     * the {@link AbstractControl#updateValueAndValidity updateValueAndValidity} method.\n     */\n\n  }, {\n    key: \"patchValue\",\n    value: function patchValue(value) {\n      var _this14 = this;\n\n      var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n      // Even though the `value` argument type doesn't allow `null` and `undefined` values, the\n      // `patchValue` can be called recursively and inner data structures might have these values, so\n      // we just ignore such cases when a field containing FormArray instance receives `null` or\n      // `undefined` as a value.\n      if (value == null\n      /* both `null` and `undefined` */\n      ) return;\n      value.forEach(function (newValue, index) {\n        if (_this14.at(index)) {\n          _this14.at(index).patchValue(newValue, {\n            onlySelf: true,\n            emitEvent: options.emitEvent\n          });\n        }\n      });\n      this.updateValueAndValidity(options);\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(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     * arr.reset([\n     *   {value: 'name', disabled: true},\n     *   'last'\n     * ]);\n     *\n     * console.log(arr.value);  // ['last']\n     * console.log(arr.at(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\n  }, {\n    key: \"reset\",\n    value: function reset() {\n      var value = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];\n      var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n      this._forEachChild(function (control, index) {\n        control.reset(value[index], {\n          onlySelf: true,\n          emitEvent: options.emitEvent\n        });\n      });\n\n      this._updatePristine(options);\n\n      this._updateTouched(options);\n\n      this.updateValueAndValidity(options);\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\n  }, {\n    key: \"getRawValue\",\n    value: function getRawValue() {\n      return this.controls.map(function (control) {\n        return control instanceof FormControl ? control.value : control.getRawValue();\n      });\n    }\n    /**\n     * Remove all controls in the `FormArray`.\n     *\n     * @param options Specifies whether this FormArray instance should emit events after all\n     *     controls are removed.\n     * * `emitEvent`: When true or not supplied (the default), both the `statusChanges` and\n     * `valueChanges` observables emit events with the latest status and value when all controls\n     * in this FormArray instance are removed. When false, no events are emitted.\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\n  }, {\n    key: \"clear\",\n    value: function clear() {\n      var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n      if (this.controls.length < 1) return;\n\n      this._forEachChild(function (control) {\n        return control._registerOnCollectionChange(function () {});\n      });\n\n      this.controls.splice(0);\n      this.updateValueAndValidity({\n        emitEvent: options.emitEvent\n      });\n    }\n    /** @internal */\n\n  }, {\n    key: \"_syncPendingControls\",\n    value: function _syncPendingControls() {\n      var subtreeUpdated = this.controls.reduce(function (updated, child) {\n        return child._syncPendingControls() ? true : updated;\n      }, false);\n      if (subtreeUpdated) this.updateValueAndValidity({\n        onlySelf: true\n      });\n      return subtreeUpdated;\n    }\n    /** @internal */\n\n  }, {\n    key: \"_throwIfControlMissing\",\n    value: function _throwIfControlMissing(index) {\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\n      if (!this.at(index)) {\n        throw new Error(\"Cannot find form control at index \".concat(index));\n      }\n    }\n    /** @internal */\n\n  }, {\n    key: \"_forEachChild\",\n    value: function _forEachChild(cb) {\n      this.controls.forEach(function (control, index) {\n        cb(control, index);\n      });\n    }\n    /** @internal */\n\n  }, {\n    key: \"_updateValue\",\n    value: function _updateValue() {\n      var _this15 = this;\n\n      this.value = this.controls.filter(function (control) {\n        return control.enabled || _this15.disabled;\n      }).map(function (control) {\n        return control.value;\n      });\n    }\n    /** @internal */\n\n  }, {\n    key: \"_anyControls\",\n    value: function _anyControls(condition) {\n      return this.controls.some(function (control) {\n        return control.enabled && condition(control);\n      });\n    }\n    /** @internal */\n\n  }, {\n    key: \"_setUpControls\",\n    value: function _setUpControls() {\n      var _this16 = this;\n\n      this._forEachChild(function (control) {\n        return _this16._registerControl(control);\n      });\n    }\n    /** @internal */\n\n  }, {\n    key: \"_checkAllValuesPresent\",\n    value: function _checkAllValuesPresent(value) {\n      this._forEachChild(function (control, i) {\n        if (value[i] === undefined) {\n          throw new Error(\"Must supply a value for form control at index: \".concat(i, \".\"));\n        }\n      });\n    }\n    /** @internal */\n\n  }, {\n    key: \"_allControlsDisabled\",\n    value: function _allControlsDisabled() {\n      var _iterator = _createForOfIteratorHelper(this.controls),\n          _step;\n\n      try {\n        for (_iterator.s(); !(_step = _iterator.n()).done;) {\n          var control = _step.value;\n          if (control.enabled) return false;\n        }\n      } catch (err) {\n        _iterator.e(err);\n      } finally {\n        _iterator.f();\n      }\n\n      return this.controls.length > 0 || this.disabled;\n    }\n  }, {\n    key: \"_registerControl\",\n    value: function _registerControl(control) {\n      control.setParent(this);\n\n      control._registerOnCollectionChange(this._onCollectionChange);\n    }\n  }]);\n\n  return FormArray;\n}(AbstractControl);\n/**\n * @license\n * Copyright Google LLC 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\nvar formDirectiveProvider = {\n  provide: ControlContainer,\n  useExisting: /*@__PURE__*/forwardRef(function () {\n    return NgForm;\n  })\n};\n\nvar ɵ0 = function ɵ0() {\n  return Promise.resolve(null);\n};\n\nvar resolvedPromise = /*@__PURE__*/ɵ0();\n\nvar NgForm = /*@__PURE__*/function () {\n  var NgForm = /*#__PURE__*/function (_ControlContainer) {\n    _inherits(NgForm, _ControlContainer);\n\n    var _super11 = _createSuper(NgForm);\n\n    function NgForm(validators, asyncValidators) {\n      var _this17;\n\n      _classCallCheck(this, NgForm);\n\n      _this17 = _super11.call(this);\n      /**\n       * @description\n       * Returns whether the form submission has been triggered.\n       */\n\n      _this17.submitted = false;\n      _this17._directives = [];\n      /**\n       * @description\n       * Event emitter for the \"ngSubmit\" event\n       */\n\n      _this17.ngSubmit = new EventEmitter();\n      _this17.form = new FormGroup({}, composeValidators(validators), composeAsyncValidators(asyncValidators));\n      return _this17;\n    }\n    /** @nodoc */\n\n\n    _createClass(NgForm, [{\n      key: \"ngAfterViewInit\",\n      value: function ngAfterViewInit() {\n        this._setUpdateStrategy();\n      }\n      /**\n       * @description\n       * The directive instance.\n       */\n\n    }, {\n      key: \"formDirective\",\n      get: function get() {\n        return this;\n      }\n      /**\n       * @description\n       * The internal `FormGroup` instance.\n       */\n\n    }, {\n      key: \"control\",\n      get: function get() {\n        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\n    }, {\n      key: \"path\",\n      get: function get() {\n        return [];\n      }\n      /**\n       * @description\n       * Returns a map of the controls in this group.\n       */\n\n    }, {\n      key: \"controls\",\n      get: function get() {\n        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\n    }, {\n      key: \"addControl\",\n      value: function addControl(dir) {\n        var _this18 = this;\n\n        resolvedPromise.then(function () {\n          var container = _this18._findContainer(dir.path);\n\n          dir.control = container.registerControl(dir.name, dir.control);\n          setUpControl(dir.control, dir);\n          dir.control.updateValueAndValidity({\n            emitEvent: false\n          });\n\n          _this18._directives.push(dir);\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\n    }, {\n      key: \"getControl\",\n      value: function getControl(dir) {\n        return 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\n    }, {\n      key: \"removeControl\",\n      value: function removeControl(dir) {\n        var _this19 = this;\n\n        resolvedPromise.then(function () {\n          var container = _this19._findContainer(dir.path);\n\n          if (container) {\n            container.removeControl(dir.name);\n          }\n\n          removeListItem(_this19._directives, dir);\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\n    }, {\n      key: \"addFormGroup\",\n      value: function addFormGroup(dir) {\n        var _this20 = this;\n\n        resolvedPromise.then(function () {\n          var container = _this20._findContainer(dir.path);\n\n          var group = new FormGroup({});\n          setUpFormContainer(group, dir);\n          container.registerControl(dir.name, group);\n          group.updateValueAndValidity({\n            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\n    }, {\n      key: \"removeFormGroup\",\n      value: function removeFormGroup(dir) {\n        var _this21 = this;\n\n        resolvedPromise.then(function () {\n          var container = _this21._findContainer(dir.path);\n\n          if (container) {\n            container.removeControl(dir.name);\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\n    }, {\n      key: \"getFormGroup\",\n      value: function getFormGroup(dir) {\n        return 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\n    }, {\n      key: \"updateModel\",\n      value: function updateModel(dir, value) {\n        var _this22 = this;\n\n        resolvedPromise.then(function () {\n          var ctrl = _this22.form.get(dir.path);\n\n          ctrl.setValue(value);\n        });\n      }\n      /**\n       * @description\n       * Sets the value for this `FormGroup`.\n       *\n       * @param value The new value\n       */\n\n    }, {\n      key: \"setValue\",\n      value: function setValue(value) {\n        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\n    }, {\n      key: \"onSubmit\",\n      value: function onSubmit($event) {\n        this.submitted = true;\n        syncPendingControls(this.form, this._directives);\n        this.ngSubmit.emit($event);\n        return false;\n      }\n      /**\n       * @description\n       * Method called when the \"reset\" event is triggered on the form.\n       */\n\n    }, {\n      key: \"onReset\",\n      value: function onReset() {\n        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\n    }, {\n      key: \"resetForm\",\n      value: function resetForm() {\n        var value = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : undefined;\n        this.form.reset(value);\n        this.submitted = false;\n      }\n    }, {\n      key: \"_setUpdateStrategy\",\n      value: function _setUpdateStrategy() {\n        if (this.options && this.options.updateOn != null) {\n          this.form._updateOn = this.options.updateOn;\n        }\n      }\n      /** @internal */\n\n    }, {\n      key: \"_findContainer\",\n      value: function _findContainer(path) {\n        path.pop();\n        return path.length ? this.form.get(path) : this.form;\n      }\n    }]);\n\n    return NgForm;\n  }(ControlContainer);\n\n  NgForm.ɵfac = function NgForm_Factory(t) {\n    return new (t || NgForm)(ɵngcc0.ɵɵdirectiveInject(NG_VALIDATORS, 10), ɵngcc0.ɵɵdirectiveInject(NG_ASYNC_VALIDATORS, 10));\n  };\n\n  NgForm.ɵdir =\n  /*@__PURE__*/\n\n  /*@__PURE__*/\n  ɵngcc0.ɵɵdefineDirective({\n    type: NgForm,\n    selectors: [[\"form\", 3, \"ngNoForm\", \"\", 3, \"formGroup\", \"\"], [\"ng-form\"], [\"\", \"ngForm\", \"\"]],\n    hostBindings: function NgForm_HostBindings(rf, ctx) {\n      if (rf & 1) {\n        ɵngcc0.ɵɵlistener(\"submit\", function NgForm_submit_HostBindingHandler($event) {\n          return ctx.onSubmit($event);\n        })(\"reset\", function NgForm_reset_HostBindingHandler() {\n          return ctx.onReset();\n        });\n      }\n    },\n    inputs: {\n      options: [\"ngFormOptions\", \"options\"]\n    },\n    outputs: {\n      ngSubmit: \"ngSubmit\"\n    },\n    exportAs: [\"ngForm\"],\n    features: [/*@__PURE__*/ɵngcc0.ɵɵProvidersFeature([formDirectiveProvider]), ɵngcc0.ɵɵInheritDefinitionFeature]\n  });\n  return NgForm;\n}();\n\nvar AbstractFormGroupDirective = /*@__PURE__*/function () {\n  var AbstractFormGroupDirective = /*#__PURE__*/function (_ControlContainer2) {\n    _inherits(AbstractFormGroupDirective, _ControlContainer2);\n\n    var _super12 = _createSuper(AbstractFormGroupDirective);\n\n    function AbstractFormGroupDirective() {\n      _classCallCheck(this, AbstractFormGroupDirective);\n\n      return _super12.apply(this, arguments);\n    }\n\n    _createClass(AbstractFormGroupDirective, [{\n      key: \"ngOnInit\",\n      value:\n      /** @nodoc */\n      function ngOnInit() {\n        this._checkParentType(); // Register the group with its parent group.\n\n\n        this.formDirective.addFormGroup(this);\n      }\n      /** @nodoc */\n\n    }, {\n      key: \"ngOnDestroy\",\n      value: function ngOnDestroy() {\n        if (this.formDirective) {\n          // Remove the group from its parent group.\n          this.formDirective.removeFormGroup(this);\n        }\n      }\n      /**\n       * @description\n       * The `FormGroup` bound to this directive.\n       */\n\n    }, {\n      key: \"control\",\n      get: function get() {\n        return this.formDirective.getFormGroup(this);\n      }\n      /**\n       * @description\n       * The path to this group from the top-level directive.\n       */\n\n    }, {\n      key: \"path\",\n      get: function get() {\n        return controlPath(this.name == null ? this.name : this.name.toString(), this._parent);\n      }\n      /**\n       * @description\n       * The top-level directive for this group if present, otherwise null.\n       */\n\n    }, {\n      key: \"formDirective\",\n      get: function get() {\n        return this._parent ? this._parent.formDirective : null;\n      }\n      /** @internal */\n\n    }, {\n      key: \"_checkParentType\",\n      value: function _checkParentType() {}\n    }]);\n\n    return AbstractFormGroupDirective;\n  }(ControlContainer);\n\n  AbstractFormGroupDirective.ɵfac =\n  /*@__PURE__*/\n\n  /*@__PURE__*/\n  function () {\n    var ɵAbstractFormGroupDirective_BaseFactory;\n    return function AbstractFormGroupDirective_Factory(t) {\n      return (ɵAbstractFormGroupDirective_BaseFactory || (ɵAbstractFormGroupDirective_BaseFactory = ɵngcc0.ɵɵgetInheritedFactory(AbstractFormGroupDirective)))(t || AbstractFormGroupDirective);\n    };\n  }();\n\n  AbstractFormGroupDirective.ɵdir =\n  /*@__PURE__*/\n\n  /*@__PURE__*/\n  ɵngcc0.ɵɵdefineDirective({\n    type: AbstractFormGroupDirective,\n    features: [ɵngcc0.ɵɵInheritDefinitionFeature]\n  });\n  return AbstractFormGroupDirective;\n}();\n/**\n * @license\n * Copyright Google LLC 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\nfunction modelParentException() {\n  return 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    \".concat(formControlNameExample, \"\\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    \").concat(ngModelWithFormGroupExample));\n}\n\nfunction formGroupNameException() {\n  return 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    \".concat(formGroupNameExample, \"\\n\\n    Option 2:  Update ngModel's parent be ngModelGroup (template-driven strategy):\\n\\n    \").concat(ngModelGroupExample));\n}\n\nfunction missingNameException() {\n  return new Error(\"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\nfunction modelGroupParentException() {\n  return 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    \".concat(formGroupNameExample, \"\\n\\n    Option 2:  Use a regular form tag instead of the formGroup directive (template-driven strategy):\\n\\n    \").concat(ngModelGroupExample));\n}\n/**\n * @license\n * Copyright Google LLC 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\nvar modelGroupProvider = {\n  provide: ControlContainer,\n  useExisting: /*@__PURE__*/forwardRef(function () {\n    return NgModelGroup;\n  })\n};\n\nvar NgModelGroup = /*@__PURE__*/function () {\n  var NgModelGroup = /*#__PURE__*/function (_AbstractFormGroupDir) {\n    _inherits(NgModelGroup, _AbstractFormGroupDir);\n\n    var _super13 = _createSuper(NgModelGroup);\n\n    function NgModelGroup(parent, validators, asyncValidators) {\n      var _this23;\n\n      _classCallCheck(this, NgModelGroup);\n\n      _this23 = _super13.call(this);\n      _this23._parent = parent;\n\n      _this23._setValidators(validators);\n\n      _this23._setAsyncValidators(asyncValidators);\n\n      return _this23;\n    }\n    /** @internal */\n\n\n    _createClass(NgModelGroup, [{\n      key: \"_checkParentType\",\n      value: function _checkParentType() {\n        if (!(this._parent instanceof NgModelGroup) && !(this._parent instanceof NgForm) && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n          throw modelGroupParentException();\n        }\n      }\n    }]);\n\n    return NgModelGroup;\n  }(AbstractFormGroupDirective);\n\n  NgModelGroup.ɵfac = function NgModelGroup_Factory(t) {\n    return new (t || NgModelGroup)(ɵngcc0.ɵɵdirectiveInject(ControlContainer, 5), ɵngcc0.ɵɵdirectiveInject(NG_VALIDATORS, 10), ɵngcc0.ɵɵdirectiveInject(NG_ASYNC_VALIDATORS, 10));\n  };\n\n  NgModelGroup.ɵdir =\n  /*@__PURE__*/\n\n  /*@__PURE__*/\n  ɵngcc0.ɵɵdefineDirective({\n    type: NgModelGroup,\n    selectors: [[\"\", \"ngModelGroup\", \"\"]],\n    inputs: {\n      name: [\"ngModelGroup\", \"name\"]\n    },\n    exportAs: [\"ngModelGroup\"],\n    features: [/*@__PURE__*/ɵngcc0.ɵɵProvidersFeature([modelGroupProvider]), ɵngcc0.ɵɵInheritDefinitionFeature]\n  });\n  return NgModelGroup;\n}();\n/**\n * @license\n * Copyright Google LLC 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\nvar formControlBinding = {\n  provide: NgControl,\n  useExisting: /*@__PURE__*/forwardRef(function () {\n    return NgModel;\n  })\n};\n\nvar ɵ0$1 = function ɵ0$1() {\n  return Promise.resolve(null);\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 an 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`s have been changed.\n * - this is a general problem when using `exportAs` for directives!\n */\n\n\nvar resolvedPromise$1 = /*@__PURE__*/ɵ0$1();\n\nvar NgModel = /*@__PURE__*/function () {\n  var NgModel = /*#__PURE__*/function (_NgControl) {\n    _inherits(NgModel, _NgControl);\n\n    var _super14 = _createSuper(NgModel);\n\n    function NgModel(parent, validators, asyncValidators, valueAccessors) {\n      var _this24;\n\n      _classCallCheck(this, NgModel);\n\n      _this24 = _super14.call(this);\n      _this24.control = new FormControl();\n      /** @internal */\n\n      _this24._registered = false;\n      /**\n       * @description\n       * Event emitter for producing the `ngModelChange` event after\n       * the view model updates.\n       */\n\n      _this24.update = new EventEmitter();\n      _this24._parent = parent;\n\n      _this24._setValidators(validators);\n\n      _this24._setAsyncValidators(asyncValidators);\n\n      _this24.valueAccessor = selectValueAccessor(_assertThisInitialized(_this24), valueAccessors);\n      return _this24;\n    }\n    /** @nodoc */\n\n\n    _createClass(NgModel, [{\n      key: \"ngOnChanges\",\n      value: function ngOnChanges(changes) {\n        this._checkForErrors();\n\n        if (!this._registered) this._setUpControl();\n\n        if ('isDisabled' in changes) {\n          this._updateDisabled(changes);\n        }\n\n        if (isPropertyUpdated(changes, this.viewModel)) {\n          this._updateValue(this.model);\n\n          this.viewModel = this.model;\n        }\n      }\n      /** @nodoc */\n\n    }, {\n      key: \"ngOnDestroy\",\n      value: function ngOnDestroy() {\n        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\n    }, {\n      key: \"path\",\n      get: function get() {\n        return this._parent ? controlPath(this.name, this._parent) : [this.name];\n      }\n      /**\n       * @description\n       * The top-level directive for this control if present, otherwise null.\n       */\n\n    }, {\n      key: \"formDirective\",\n      get: function get() {\n        return this._parent ? this._parent.formDirective : null;\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\n    }, {\n      key: \"viewToModelUpdate\",\n      value: function viewToModelUpdate(newValue) {\n        this.viewModel = newValue;\n        this.update.emit(newValue);\n      }\n    }, {\n      key: \"_setUpControl\",\n      value: function _setUpControl() {\n        this._setUpdateStrategy();\n\n        this._isStandalone() ? this._setUpStandalone() : this.formDirective.addControl(this);\n        this._registered = true;\n      }\n    }, {\n      key: \"_setUpdateStrategy\",\n      value: function _setUpdateStrategy() {\n        if (this.options && this.options.updateOn != null) {\n          this.control._updateOn = this.options.updateOn;\n        }\n      }\n    }, {\n      key: \"_isStandalone\",\n      value: function _isStandalone() {\n        return !this._parent || !!(this.options && this.options.standalone);\n      }\n    }, {\n      key: \"_setUpStandalone\",\n      value: function _setUpStandalone() {\n        setUpControl(this.control, this);\n        this.control.updateValueAndValidity({\n          emitEvent: false\n        });\n      }\n    }, {\n      key: \"_checkForErrors\",\n      value: function _checkForErrors() {\n        if (!this._isStandalone()) {\n          this._checkParentType();\n        }\n\n        this._checkName();\n      }\n    }, {\n      key: \"_checkParentType\",\n      value: function _checkParentType() {\n        if (typeof ngDevMode === 'undefined' || ngDevMode) {\n          if (!(this._parent instanceof NgModelGroup) && this._parent instanceof AbstractFormGroupDirective) {\n            throw formGroupNameException();\n          } else if (!(this._parent instanceof NgModelGroup) && !(this._parent instanceof NgForm)) {\n            throw modelParentException();\n          }\n        }\n      }\n    }, {\n      key: \"_checkName\",\n      value: function _checkName() {\n        if (this.options && this.options.name) this.name = this.options.name;\n\n        if (!this._isStandalone() && !this.name && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n          throw missingNameException();\n        }\n      }\n    }, {\n      key: \"_updateValue\",\n      value: function _updateValue(value) {\n        var _this25 = this;\n\n        resolvedPromise$1.then(function () {\n          _this25.control.setValue(value, {\n            emitViewToModelChange: false\n          });\n        });\n      }\n    }, {\n      key: \"_updateDisabled\",\n      value: function _updateDisabled(changes) {\n        var _this26 = this;\n\n        var disabledValue = changes['isDisabled'].currentValue;\n        var isDisabled = disabledValue === '' || disabledValue && disabledValue !== 'false';\n        resolvedPromise$1.then(function () {\n          if (isDisabled && !_this26.control.disabled) {\n            _this26.control.disable();\n          } else if (!isDisabled && _this26.control.disabled) {\n            _this26.control.enable();\n          }\n        });\n      }\n    }]);\n\n    return NgModel;\n  }(NgControl);\n\n  NgModel.ɵfac = function NgModel_Factory(t) {\n    return new (t || NgModel)(ɵngcc0.ɵɵdirectiveInject(ControlContainer, 9), ɵngcc0.ɵɵdirectiveInject(NG_VALIDATORS, 10), ɵngcc0.ɵɵdirectiveInject(NG_ASYNC_VALIDATORS, 10), ɵngcc0.ɵɵdirectiveInject(NG_VALUE_ACCESSOR, 10));\n  };\n\n  NgModel.ɵdir =\n  /*@__PURE__*/\n\n  /*@__PURE__*/\n  ɵngcc0.ɵɵdefineDirective({\n    type: NgModel,\n    selectors: [[\"\", \"ngModel\", \"\", 3, \"formControlName\", \"\", 3, \"formControl\", \"\"]],\n    inputs: {\n      name: \"name\",\n      isDisabled: [\"disabled\", \"isDisabled\"],\n      model: [\"ngModel\", \"model\"],\n      options: [\"ngModelOptions\", \"options\"]\n    },\n    outputs: {\n      update: \"ngModelChange\"\n    },\n    exportAs: [\"ngModel\"],\n    features: [/*@__PURE__*/ɵngcc0.ɵɵProvidersFeature([formControlBinding]), ɵngcc0.ɵɵInheritDefinitionFeature, ɵngcc0.ɵɵNgOnChangesFeature]\n  });\n  return NgModel;\n}();\n\nvar ɵNgNoValidate = /*@__PURE__*/function () {\n  var ɵNgNoValidate = /*#__PURE__*/_createClass(function ɵNgNoValidate() {\n    _classCallCheck(this, ɵNgNoValidate);\n  });\n\n  ɵNgNoValidate.ɵfac = function ɵNgNoValidate_Factory(t) {\n    return new (t || ɵNgNoValidate)();\n  };\n\n  ɵNgNoValidate.ɵdir =\n  /*@__PURE__*/\n\n  /*@__PURE__*/\n  ɵngcc0.ɵɵdefineDirective({\n    type: ɵNgNoValidate,\n    selectors: [[\"form\", 3, \"ngNoForm\", \"\", 3, \"ngNativeValidate\", \"\"]],\n    hostAttrs: [\"novalidate\", \"\"]\n  });\n  return ɵNgNoValidate;\n}();\n/**\n * @license\n * Copyright Google LLC 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\nvar NUMBER_VALUE_ACCESSOR = {\n  provide: NG_VALUE_ACCESSOR,\n  useExisting: /*@__PURE__*/forwardRef(function () {\n    return NumberValueAccessor;\n  }),\n  multi: true\n};\n\nvar NumberValueAccessor = /*@__PURE__*/function () {\n  var NumberValueAccessor = /*#__PURE__*/function (_BuiltInControlValueA2) {\n    _inherits(NumberValueAccessor, _BuiltInControlValueA2);\n\n    var _super15 = _createSuper(NumberValueAccessor);\n\n    function NumberValueAccessor() {\n      _classCallCheck(this, NumberValueAccessor);\n\n      return _super15.apply(this, arguments);\n    }\n\n    _createClass(NumberValueAccessor, [{\n      key: \"writeValue\",\n      value:\n      /**\n       * Sets the \"value\" property on the input element.\n       * @nodoc\n       */\n      function writeValue(value) {\n        // The value needs to be normalized for IE9, otherwise it is set to 'null' when null\n        var normalizedValue = value == null ? '' : value;\n        this.setProperty('value', normalizedValue);\n      }\n      /**\n       * Registers a function called when the control value changes.\n       * @nodoc\n       */\n\n    }, {\n      key: \"registerOnChange\",\n      value: function registerOnChange(fn) {\n        this.onChange = function (value) {\n          fn(value == '' ? null : parseFloat(value));\n        };\n      }\n    }]);\n\n    return NumberValueAccessor;\n  }(BuiltInControlValueAccessor);\n\n  NumberValueAccessor.ɵfac =\n  /*@__PURE__*/\n\n  /*@__PURE__*/\n  function () {\n    var ɵNumberValueAccessor_BaseFactory;\n    return function NumberValueAccessor_Factory(t) {\n      return (ɵNumberValueAccessor_BaseFactory || (ɵNumberValueAccessor_BaseFactory = ɵngcc0.ɵɵgetInheritedFactory(NumberValueAccessor)))(t || NumberValueAccessor);\n    };\n  }();\n\n  NumberValueAccessor.ɵdir =\n  /*@__PURE__*/\n\n  /*@__PURE__*/\n  ɵngcc0.ɵɵdefineDirective({\n    type: NumberValueAccessor,\n    selectors: [[\"input\", \"type\", \"number\", \"formControlName\", \"\"], [\"input\", \"type\", \"number\", \"formControl\", \"\"], [\"input\", \"type\", \"number\", \"ngModel\", \"\"]],\n    hostBindings: function NumberValueAccessor_HostBindings(rf, ctx) {\n      if (rf & 1) {\n        ɵngcc0.ɵɵlistener(\"input\", function NumberValueAccessor_input_HostBindingHandler($event) {\n          return ctx.onChange($event.target.value);\n        })(\"blur\", function NumberValueAccessor_blur_HostBindingHandler() {\n          return ctx.onTouched();\n        });\n      }\n    },\n    features: [/*@__PURE__*/ɵngcc0.ɵɵProvidersFeature([NUMBER_VALUE_ACCESSOR]), ɵngcc0.ɵɵInheritDefinitionFeature]\n  });\n  return NumberValueAccessor;\n}();\n/**\n * @license\n * Copyright Google LLC 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\nvar RADIO_VALUE_ACCESSOR = {\n  provide: NG_VALUE_ACCESSOR,\n  useExisting: /*@__PURE__*/forwardRef(function () {\n    return RadioControlValueAccessor;\n  }),\n  multi: true\n};\n\nfunction throwNameError() {\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\nvar RadioControlRegistryModule = /*@__PURE__*/function () {\n  var RadioControlRegistryModule = /*#__PURE__*/_createClass(function RadioControlRegistryModule() {\n    _classCallCheck(this, RadioControlRegistryModule);\n  });\n\n  RadioControlRegistryModule.ɵfac = function RadioControlRegistryModule_Factory(t) {\n    return new (t || RadioControlRegistryModule)();\n  };\n\n  RadioControlRegistryModule.ɵmod =\n  /*@__PURE__*/\n\n  /*@__PURE__*/\n  ɵngcc0.ɵɵdefineNgModule({\n    type: RadioControlRegistryModule\n  });\n  RadioControlRegistryModule.ɵinj =\n  /*@__PURE__*/\n\n  /*@__PURE__*/\n  ɵngcc0.ɵɵdefineInjector({});\n  return RadioControlRegistryModule;\n}();\n\nvar RadioControlRegistry = /*@__PURE__*/function () {\n  var RadioControlRegistry = /*#__PURE__*/function () {\n    function RadioControlRegistry() {\n      _classCallCheck(this, RadioControlRegistry);\n\n      this._accessors = [];\n    }\n    /**\n     * @description\n     * Adds a control to the internal registry. For internal use only.\n     */\n\n\n    _createClass(RadioControlRegistry, [{\n      key: \"add\",\n      value: function add(control, accessor) {\n        this._accessors.push([control, accessor]);\n      }\n      /**\n       * @description\n       * Removes a control from the internal registry. For internal use only.\n       */\n\n    }, {\n      key: \"remove\",\n      value: function remove(accessor) {\n        for (var i = this._accessors.length - 1; i >= 0; --i) {\n          if (this._accessors[i][1] === accessor) {\n            this._accessors.splice(i, 1);\n\n            return;\n          }\n        }\n      }\n      /**\n       * @description\n       * Selects a radio button. For internal use only.\n       */\n\n    }, {\n      key: \"select\",\n      value: function select(accessor) {\n        var _this27 = this;\n\n        this._accessors.forEach(function (c) {\n          if (_this27._isSameGroup(c, accessor) && c[1] !== accessor) {\n            c[1].fireUncheck(accessor.value);\n          }\n        });\n      }\n    }, {\n      key: \"_isSameGroup\",\n      value: function _isSameGroup(controlPair, accessor) {\n        if (!controlPair[0].control) return false;\n        return controlPair[0]._parent === accessor._control._parent && controlPair[1].name === accessor.name;\n      }\n    }]);\n\n    return RadioControlRegistry;\n  }();\n\n  RadioControlRegistry.ɵfac = function RadioControlRegistry_Factory(t) {\n    return new (t || RadioControlRegistry)();\n  };\n\n  RadioControlRegistry.ɵprov = /*@__PURE__*/ɵɵdefineInjectable({\n    factory: function RadioControlRegistry_Factory() {\n      return new RadioControlRegistry();\n    },\n    token: RadioControlRegistry,\n    providedIn: RadioControlRegistryModule\n  });\n  return RadioControlRegistry;\n}();\n\nvar RadioControlValueAccessor = /*@__PURE__*/function () {\n  var RadioControlValueAccessor = /*#__PURE__*/function (_BuiltInControlValueA3) {\n    _inherits(RadioControlValueAccessor, _BuiltInControlValueA3);\n\n    var _super16 = _createSuper(RadioControlValueAccessor);\n\n    function RadioControlValueAccessor(renderer, elementRef, _registry, _injector) {\n      var _this28;\n\n      _classCallCheck(this, RadioControlValueAccessor);\n\n      _this28 = _super16.call(this, renderer, elementRef);\n      _this28._registry = _registry;\n      _this28._injector = _injector;\n      /**\n       * The registered callback function called when a change event occurs on the input element.\n       * Note: we declare `onChange` here (also used as host listener) as a function with no arguments\n       * to override the `onChange` function (which expects 1 argument) in the parent\n       * `BaseControlValueAccessor` class.\n       * @nodoc\n       */\n\n      _this28.onChange = function () {};\n\n      return _this28;\n    }\n    /** @nodoc */\n\n\n    _createClass(RadioControlValueAccessor, [{\n      key: \"ngOnInit\",\n      value: function ngOnInit() {\n        this._control = this._injector.get(NgControl);\n\n        this._checkName();\n\n        this._registry.add(this._control, this);\n      }\n      /** @nodoc */\n\n    }, {\n      key: \"ngOnDestroy\",\n      value: function ngOnDestroy() {\n        this._registry.remove(this);\n      }\n      /**\n       * Sets the \"checked\" property value on the radio input element.\n       * @nodoc\n       */\n\n    }, {\n      key: \"writeValue\",\n      value: function writeValue(value) {\n        this._state = value === this.value;\n        this.setProperty('checked', this._state);\n      }\n      /**\n       * Registers a function called when the control value changes.\n       * @nodoc\n       */\n\n    }, {\n      key: \"registerOnChange\",\n      value: function registerOnChange(fn) {\n        var _this29 = this;\n\n        this._fn = fn;\n\n        this.onChange = function () {\n          fn(_this29.value);\n\n          _this29._registry.select(_this29);\n        };\n      }\n      /**\n       * Sets the \"value\" on the radio input element and unchecks it.\n       *\n       * @param value\n       */\n\n    }, {\n      key: \"fireUncheck\",\n      value: function fireUncheck(value) {\n        this.writeValue(value);\n      }\n    }, {\n      key: \"_checkName\",\n      value: function _checkName() {\n        if (this.name && this.formControlName && this.name !== this.formControlName && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n          throwNameError();\n        }\n\n        if (!this.name && this.formControlName) this.name = this.formControlName;\n      }\n    }]);\n\n    return RadioControlValueAccessor;\n  }(BuiltInControlValueAccessor);\n\n  RadioControlValueAccessor.ɵfac = function RadioControlValueAccessor_Factory(t) {\n    return new (t || RadioControlValueAccessor)(ɵngcc0.ɵɵdirectiveInject(ɵngcc0.Renderer2), ɵngcc0.ɵɵdirectiveInject(ɵngcc0.ElementRef), ɵngcc0.ɵɵdirectiveInject(RadioControlRegistry), ɵngcc0.ɵɵdirectiveInject(ɵngcc0.Injector));\n  };\n\n  RadioControlValueAccessor.ɵdir =\n  /*@__PURE__*/\n\n  /*@__PURE__*/\n  ɵngcc0.ɵɵdefineDirective({\n    type: RadioControlValueAccessor,\n    selectors: [[\"input\", \"type\", \"radio\", \"formControlName\", \"\"], [\"input\", \"type\", \"radio\", \"formControl\", \"\"], [\"input\", \"type\", \"radio\", \"ngModel\", \"\"]],\n    hostBindings: function RadioControlValueAccessor_HostBindings(rf, ctx) {\n      if (rf & 1) {\n        ɵngcc0.ɵɵlistener(\"change\", function RadioControlValueAccessor_change_HostBindingHandler() {\n          return ctx.onChange();\n        })(\"blur\", function RadioControlValueAccessor_blur_HostBindingHandler() {\n          return ctx.onTouched();\n        });\n      }\n    },\n    inputs: {\n      name: \"name\",\n      formControlName: \"formControlName\",\n      value: \"value\"\n    },\n    features: [/*@__PURE__*/ɵngcc0.ɵɵProvidersFeature([RADIO_VALUE_ACCESSOR]), ɵngcc0.ɵɵInheritDefinitionFeature]\n  });\n  return RadioControlValueAccessor;\n}();\n/**\n * @license\n * Copyright Google LLC 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\nvar RANGE_VALUE_ACCESSOR = {\n  provide: NG_VALUE_ACCESSOR,\n  useExisting: /*@__PURE__*/forwardRef(function () {\n    return RangeValueAccessor;\n  }),\n  multi: true\n};\n\nvar RangeValueAccessor = /*@__PURE__*/function () {\n  var RangeValueAccessor = /*#__PURE__*/function (_BuiltInControlValueA4) {\n    _inherits(RangeValueAccessor, _BuiltInControlValueA4);\n\n    var _super17 = _createSuper(RangeValueAccessor);\n\n    function RangeValueAccessor() {\n      _classCallCheck(this, RangeValueAccessor);\n\n      return _super17.apply(this, arguments);\n    }\n\n    _createClass(RangeValueAccessor, [{\n      key: \"writeValue\",\n      value:\n      /**\n       * Sets the \"value\" property on the input element.\n       * @nodoc\n       */\n      function writeValue(value) {\n        this.setProperty('value', parseFloat(value));\n      }\n      /**\n       * Registers a function called when the control value changes.\n       * @nodoc\n       */\n\n    }, {\n      key: \"registerOnChange\",\n      value: function registerOnChange(fn) {\n        this.onChange = function (value) {\n          fn(value == '' ? null : parseFloat(value));\n        };\n      }\n    }]);\n\n    return RangeValueAccessor;\n  }(BuiltInControlValueAccessor);\n\n  RangeValueAccessor.ɵfac =\n  /*@__PURE__*/\n\n  /*@__PURE__*/\n  function () {\n    var ɵRangeValueAccessor_BaseFactory;\n    return function RangeValueAccessor_Factory(t) {\n      return (ɵRangeValueAccessor_BaseFactory || (ɵRangeValueAccessor_BaseFactory = ɵngcc0.ɵɵgetInheritedFactory(RangeValueAccessor)))(t || RangeValueAccessor);\n    };\n  }();\n\n  RangeValueAccessor.ɵdir =\n  /*@__PURE__*/\n\n  /*@__PURE__*/\n  ɵngcc0.ɵɵdefineDirective({\n    type: RangeValueAccessor,\n    selectors: [[\"input\", \"type\", \"range\", \"formControlName\", \"\"], [\"input\", \"type\", \"range\", \"formControl\", \"\"], [\"input\", \"type\", \"range\", \"ngModel\", \"\"]],\n    hostBindings: function RangeValueAccessor_HostBindings(rf, ctx) {\n      if (rf & 1) {\n        ɵngcc0.ɵɵlistener(\"change\", function RangeValueAccessor_change_HostBindingHandler($event) {\n          return ctx.onChange($event.target.value);\n        })(\"input\", function RangeValueAccessor_input_HostBindingHandler($event) {\n          return ctx.onChange($event.target.value);\n        })(\"blur\", function RangeValueAccessor_blur_HostBindingHandler() {\n          return ctx.onTouched();\n        });\n      }\n    },\n    features: [/*@__PURE__*/ɵngcc0.ɵɵProvidersFeature([RANGE_VALUE_ACCESSOR]), ɵngcc0.ɵɵInheritDefinitionFeature]\n  });\n  return RangeValueAccessor;\n}();\n/**\n * @license\n * Copyright Google LLC 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 * Token to provide to turn off the ngModel warning on formControl and formControlName.\n */\n\n\nvar NG_MODEL_WITH_FORM_CONTROL_WARNING = /*@__PURE__*/new InjectionToken('NgModelWithFormControlWarning');\nvar formControlBinding$1 = {\n  provide: NgControl,\n  useExisting: /*@__PURE__*/forwardRef(function () {\n    return FormControlDirective;\n  })\n};\n\nvar FormControlDirective = /*@__PURE__*/function () {\n  var FormControlDirective = /*#__PURE__*/function (_NgControl2) {\n    _inherits(FormControlDirective, _NgControl2);\n\n    var _super18 = _createSuper(FormControlDirective);\n\n    function FormControlDirective(validators, asyncValidators, valueAccessors, _ngModelWarningConfig) {\n      var _this30;\n\n      _classCallCheck(this, FormControlDirective);\n\n      _this30 = _super18.call(this);\n      _this30._ngModelWarningConfig = _ngModelWarningConfig;\n      /** @deprecated as of v6 */\n\n      _this30.update = new EventEmitter();\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\n      _this30._ngModelWarningSent = false;\n\n      _this30._setValidators(validators);\n\n      _this30._setAsyncValidators(asyncValidators);\n\n      _this30.valueAccessor = selectValueAccessor(_assertThisInitialized(_this30), valueAccessors);\n      return _this30;\n    }\n    /**\n     * @description\n     * Triggers a warning in dev mode that this input should not be used with reactive forms.\n     */\n\n\n    _createClass(FormControlDirective, [{\n      key: \"isDisabled\",\n      set: function set(isDisabled) {\n        if (typeof ngDevMode === 'undefined' || ngDevMode) {\n          console.warn(disabledAttrWarning);\n        }\n      }\n      /** @nodoc */\n\n    }, {\n      key: \"ngOnChanges\",\n      value: function ngOnChanges(changes) {\n        if (this._isControlChanged(changes)) {\n          var previousForm = changes['form'].previousValue;\n\n          if (previousForm) {\n            cleanUpControl(previousForm, this,\n            /* validateControlPresenceOnChange */\n            false);\n          }\n\n          setUpControl(this.form, this);\n\n          if (this.control.disabled && this.valueAccessor.setDisabledState) {\n            this.valueAccessor.setDisabledState(true);\n          }\n\n          this.form.updateValueAndValidity({\n            emitEvent: false\n          });\n        }\n\n        if (isPropertyUpdated(changes, this.viewModel)) {\n          if (typeof ngDevMode === 'undefined' || ngDevMode) {\n            _ngModelWarning('formControl', FormControlDirective, this, this._ngModelWarningConfig);\n          }\n\n          this.form.setValue(this.model);\n          this.viewModel = this.model;\n        }\n      }\n      /** @nodoc */\n\n    }, {\n      key: \"ngOnDestroy\",\n      value: function ngOnDestroy() {\n        if (this.form) {\n          cleanUpControl(this.form, this,\n          /* validateControlPresenceOnChange */\n          false);\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\n    }, {\n      key: \"path\",\n      get: function get() {\n        return [];\n      }\n      /**\n       * @description\n       * The `FormControl` bound to this directive.\n       */\n\n    }, {\n      key: \"control\",\n      get: function get() {\n        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\n    }, {\n      key: \"viewToModelUpdate\",\n      value: function viewToModelUpdate(newValue) {\n        this.viewModel = newValue;\n        this.update.emit(newValue);\n      }\n    }, {\n      key: \"_isControlChanged\",\n      value: function _isControlChanged(changes) {\n        return changes.hasOwnProperty('form');\n      }\n    }]);\n\n    return FormControlDirective;\n  }(NgControl);\n\n  FormControlDirective.ɵfac = function FormControlDirective_Factory(t) {\n    return new (t || FormControlDirective)(ɵngcc0.ɵɵdirectiveInject(NG_VALIDATORS, 10), ɵngcc0.ɵɵdirectiveInject(NG_ASYNC_VALIDATORS, 10), ɵngcc0.ɵɵdirectiveInject(NG_VALUE_ACCESSOR, 10), ɵngcc0.ɵɵdirectiveInject(NG_MODEL_WITH_FORM_CONTROL_WARNING, 8));\n  };\n\n  FormControlDirective.ɵdir =\n  /*@__PURE__*/\n\n  /*@__PURE__*/\n  ɵngcc0.ɵɵdefineDirective({\n    type: FormControlDirective,\n    selectors: [[\"\", \"formControl\", \"\"]],\n    inputs: {\n      isDisabled: [\"disabled\", \"isDisabled\"],\n      form: [\"formControl\", \"form\"],\n      model: [\"ngModel\", \"model\"]\n    },\n    outputs: {\n      update: \"ngModelChange\"\n    },\n    exportAs: [\"ngForm\"],\n    features: [/*@__PURE__*/ɵngcc0.ɵɵProvidersFeature([formControlBinding$1]), ɵngcc0.ɵɵInheritDefinitionFeature, ɵngcc0.ɵɵNgOnChangesFeature]\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\n  FormControlDirective._ngModelWarningSentOnce = false;\n  return FormControlDirective;\n}();\n/**\n * @license\n * Copyright Google LLC 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\nvar formDirectiveProvider$1 = {\n  provide: ControlContainer,\n  useExisting: /*@__PURE__*/forwardRef(function () {\n    return FormGroupDirective;\n  })\n};\n\nvar FormGroupDirective = /*@__PURE__*/function () {\n  var FormGroupDirective = /*#__PURE__*/function (_ControlContainer3) {\n    _inherits(FormGroupDirective, _ControlContainer3);\n\n    var _super19 = _createSuper(FormGroupDirective);\n\n    function FormGroupDirective(validators, asyncValidators) {\n      var _this31;\n\n      _classCallCheck(this, FormGroupDirective);\n\n      _this31 = _super19.call(this);\n      _this31.validators = validators;\n      _this31.asyncValidators = asyncValidators;\n      /**\n       * @description\n       * Reports whether the form submission has been triggered.\n       */\n\n      _this31.submitted = false;\n      /**\n       * Callback that should be invoked when controls in FormGroup or FormArray collection change\n       * (added or removed). This callback triggers corresponding DOM updates.\n       */\n\n      _this31._onCollectionChange = function () {\n        return _this31._updateDomValue();\n      };\n      /**\n       * @description\n       * Tracks the list of added `FormControlName` instances\n       */\n\n\n      _this31.directives = [];\n      /**\n       * @description\n       * Tracks the `FormGroup` bound to this directive.\n       */\n\n      _this31.form = null;\n      /**\n       * @description\n       * Emits an event when the form submission has been triggered.\n       */\n\n      _this31.ngSubmit = new EventEmitter();\n\n      _this31._setValidators(validators);\n\n      _this31._setAsyncValidators(asyncValidators);\n\n      return _this31;\n    }\n    /** @nodoc */\n\n\n    _createClass(FormGroupDirective, [{\n      key: \"ngOnChanges\",\n      value: function ngOnChanges(changes) {\n        this._checkFormPresent();\n\n        if (changes.hasOwnProperty('form')) {\n          this._updateValidators();\n\n          this._updateDomValue();\n\n          this._updateRegistrations();\n\n          this._oldForm = this.form;\n        }\n      }\n      /** @nodoc */\n\n    }, {\n      key: \"ngOnDestroy\",\n      value: function ngOnDestroy() {\n        if (this.form) {\n          cleanUpValidators(this.form, this); // Currently the `onCollectionChange` callback is rewritten each time the\n          // `_registerOnCollectionChange` function is invoked. The implication is that cleanup should\n          // happen *only* when the `onCollectionChange` callback was set by this directive instance.\n          // Otherwise it might cause overriding a callback of some other directive instances. We should\n          // consider updating this logic later to make it similar to how `onChange` callbacks are\n          // handled, see https://github.com/angular/angular/issues/39732 for additional info.\n\n          if (this.form._onCollectionChange === this._onCollectionChange) {\n            this.form._registerOnCollectionChange(function () {});\n          }\n        }\n      }\n      /**\n       * @description\n       * Returns this directive's instance.\n       */\n\n    }, {\n      key: \"formDirective\",\n      get: function get() {\n        return this;\n      }\n      /**\n       * @description\n       * Returns the `FormGroup` bound to this directive.\n       */\n\n    }, {\n      key: \"control\",\n      get: function get() {\n        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\n    }, {\n      key: \"path\",\n      get: function get() {\n        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\n    }, {\n      key: \"addControl\",\n      value: function addControl(dir) {\n        var ctrl = this.form.get(dir.path);\n        setUpControl(ctrl, dir);\n        ctrl.updateValueAndValidity({\n          emitEvent: false\n        });\n        this.directives.push(dir);\n        return ctrl;\n      }\n      /**\n       * @description\n       * Retrieves the `FormControl` instance from the provided `FormControlName` directive\n       *\n       * @param dir The `FormControlName` directive instance.\n       */\n\n    }, {\n      key: \"getControl\",\n      value: function getControl(dir) {\n        return 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\n    }, {\n      key: \"removeControl\",\n      value: function removeControl(dir) {\n        cleanUpControl(dir.control || null, dir,\n        /* validateControlPresenceOnChange */\n        false);\n        removeListItem(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\n    }, {\n      key: \"addFormGroup\",\n      value: function addFormGroup(dir) {\n        this._setUpFormContainer(dir);\n      }\n      /**\n       * Performs the necessary cleanup when a `FormGroupName` directive instance is removed from the\n       * view.\n       *\n       * @param dir The `FormGroupName` directive instance.\n       */\n\n    }, {\n      key: \"removeFormGroup\",\n      value: function removeFormGroup(dir) {\n        this._cleanUpFormContainer(dir);\n      }\n      /**\n       * @description\n       * Retrieves the `FormGroup` for a provided `FormGroupName` directive instance\n       *\n       * @param dir The `FormGroupName` directive instance.\n       */\n\n    }, {\n      key: \"getFormGroup\",\n      value: function getFormGroup(dir) {\n        return this.form.get(dir.path);\n      }\n      /**\n       * Performs the necessary setup when a `FormArrayName` directive instance is added to the view.\n       *\n       * @param dir The `FormArrayName` directive instance.\n       */\n\n    }, {\n      key: \"addFormArray\",\n      value: function addFormArray(dir) {\n        this._setUpFormContainer(dir);\n      }\n      /**\n       * Performs the necessary cleanup when a `FormArrayName` directive instance is removed from the\n       * view.\n       *\n       * @param dir The `FormArrayName` directive instance.\n       */\n\n    }, {\n      key: \"removeFormArray\",\n      value: function removeFormArray(dir) {\n        this._cleanUpFormContainer(dir);\n      }\n      /**\n       * @description\n       * Retrieves the `FormArray` for a provided `FormArrayName` directive instance.\n       *\n       * @param dir The `FormArrayName` directive instance.\n       */\n\n    }, {\n      key: \"getFormArray\",\n      value: function getFormArray(dir) {\n        return 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\n    }, {\n      key: \"updateModel\",\n      value: function updateModel(dir, value) {\n        var ctrl = this.form.get(dir.path);\n        ctrl.setValue(value);\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\n    }, {\n      key: \"onSubmit\",\n      value: function onSubmit($event) {\n        this.submitted = true;\n        syncPendingControls(this.form, this.directives);\n        this.ngSubmit.emit($event);\n        return false;\n      }\n      /**\n       * @description\n       * Method called when the \"reset\" event is triggered on the form.\n       */\n\n    }, {\n      key: \"onReset\",\n      value: function onReset() {\n        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\n    }, {\n      key: \"resetForm\",\n      value: function resetForm() {\n        var value = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : undefined;\n        this.form.reset(value);\n        this.submitted = false;\n      }\n      /** @internal */\n\n    }, {\n      key: \"_updateDomValue\",\n      value: function _updateDomValue() {\n        var _this32 = this;\n\n        this.directives.forEach(function (dir) {\n          var oldCtrl = dir.control;\n\n          var newCtrl = _this32.form.get(dir.path);\n\n          if (oldCtrl !== newCtrl) {\n            // Note: the value of the `dir.control` may not be defined, for example when it's a first\n            // `FormControl` that is added to a `FormGroup` instance (via `addControl` call).\n            cleanUpControl(oldCtrl || null, dir); // Check whether new control at the same location inside the corresponding `FormGroup` is an\n            // instance of `FormControl` and perform control setup only if that's the case.\n            // Note: we don't need to clear the list of directives (`this.directives`) here, it would be\n            // taken care of in the `removeControl` method invoked when corresponding `formControlName`\n            // directive instance is being removed (invoked from `FormControlName.ngOnDestroy`).\n\n            if (newCtrl instanceof FormControl) {\n              setUpControl(newCtrl, dir);\n              dir.control = newCtrl;\n            }\n          }\n        });\n\n        this.form._updateTreeValidity({\n          emitEvent: false\n        });\n      }\n    }, {\n      key: \"_setUpFormContainer\",\n      value: function _setUpFormContainer(dir) {\n        var ctrl = this.form.get(dir.path);\n        setUpFormContainer(ctrl, dir); // NOTE: this operation looks unnecessary in case no new validators were added in\n        // `setUpFormContainer` call. Consider updating this code to match the logic in\n        // `_cleanUpFormContainer` function.\n\n        ctrl.updateValueAndValidity({\n          emitEvent: false\n        });\n      }\n    }, {\n      key: \"_cleanUpFormContainer\",\n      value: function _cleanUpFormContainer(dir) {\n        if (this.form) {\n          var ctrl = this.form.get(dir.path);\n\n          if (ctrl) {\n            var isControlUpdated = cleanUpFormContainer(ctrl, dir);\n\n            if (isControlUpdated) {\n              // Run validity check only in case a control was updated (i.e. view validators were\n              // removed) as removing view validators might cause validity to change.\n              ctrl.updateValueAndValidity({\n                emitEvent: false\n              });\n            }\n          }\n        }\n      }\n    }, {\n      key: \"_updateRegistrations\",\n      value: function _updateRegistrations() {\n        this.form._registerOnCollectionChange(this._onCollectionChange);\n\n        if (this._oldForm) {\n          this._oldForm._registerOnCollectionChange(function () {});\n        }\n      }\n    }, {\n      key: \"_updateValidators\",\n      value: function _updateValidators() {\n        setUpValidators(this.form, this);\n\n        if (this._oldForm) {\n          cleanUpValidators(this._oldForm, this);\n        }\n      }\n    }, {\n      key: \"_checkFormPresent\",\n      value: function _checkFormPresent() {\n        if (!this.form && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n          throw missingFormException();\n        }\n      }\n    }]);\n\n    return FormGroupDirective;\n  }(ControlContainer);\n\n  FormGroupDirective.ɵfac = function FormGroupDirective_Factory(t) {\n    return new (t || FormGroupDirective)(ɵngcc0.ɵɵdirectiveInject(NG_VALIDATORS, 10), ɵngcc0.ɵɵdirectiveInject(NG_ASYNC_VALIDATORS, 10));\n  };\n\n  FormGroupDirective.ɵdir =\n  /*@__PURE__*/\n\n  /*@__PURE__*/\n  ɵngcc0.ɵɵdefineDirective({\n    type: FormGroupDirective,\n    selectors: [[\"\", \"formGroup\", \"\"]],\n    hostBindings: function FormGroupDirective_HostBindings(rf, ctx) {\n      if (rf & 1) {\n        ɵngcc0.ɵɵlistener(\"submit\", function FormGroupDirective_submit_HostBindingHandler($event) {\n          return ctx.onSubmit($event);\n        })(\"reset\", function FormGroupDirective_reset_HostBindingHandler() {\n          return ctx.onReset();\n        });\n      }\n    },\n    inputs: {\n      form: [\"formGroup\", \"form\"]\n    },\n    outputs: {\n      ngSubmit: \"ngSubmit\"\n    },\n    exportAs: [\"ngForm\"],\n    features: [/*@__PURE__*/ɵngcc0.ɵɵProvidersFeature([formDirectiveProvider$1]), ɵngcc0.ɵɵInheritDefinitionFeature, ɵngcc0.ɵɵNgOnChangesFeature]\n  });\n  return FormGroupDirective;\n}();\n/**\n * @license\n * Copyright Google LLC 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\nvar formGroupNameProvider = {\n  provide: ControlContainer,\n  useExisting: /*@__PURE__*/forwardRef(function () {\n    return FormGroupName;\n  })\n};\n\nvar FormGroupName = /*@__PURE__*/function () {\n  var FormGroupName = /*#__PURE__*/function (_AbstractFormGroupDir2) {\n    _inherits(FormGroupName, _AbstractFormGroupDir2);\n\n    var _super20 = _createSuper(FormGroupName);\n\n    function FormGroupName(parent, validators, asyncValidators) {\n      var _this33;\n\n      _classCallCheck(this, FormGroupName);\n\n      _this33 = _super20.call(this);\n      _this33._parent = parent;\n\n      _this33._setValidators(validators);\n\n      _this33._setAsyncValidators(asyncValidators);\n\n      return _this33;\n    }\n    /** @internal */\n\n\n    _createClass(FormGroupName, [{\n      key: \"_checkParentType\",\n      value: function _checkParentType() {\n        if (_hasInvalidParent(this._parent) && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n          throw groupParentException();\n        }\n      }\n    }]);\n\n    return FormGroupName;\n  }(AbstractFormGroupDirective);\n\n  FormGroupName.ɵfac = function FormGroupName_Factory(t) {\n    return new (t || FormGroupName)(ɵngcc0.ɵɵdirectiveInject(ControlContainer, 13), ɵngcc0.ɵɵdirectiveInject(NG_VALIDATORS, 10), ɵngcc0.ɵɵdirectiveInject(NG_ASYNC_VALIDATORS, 10));\n  };\n\n  FormGroupName.ɵdir =\n  /*@__PURE__*/\n\n  /*@__PURE__*/\n  ɵngcc0.ɵɵdefineDirective({\n    type: FormGroupName,\n    selectors: [[\"\", \"formGroupName\", \"\"]],\n    inputs: {\n      name: [\"formGroupName\", \"name\"]\n    },\n    features: [/*@__PURE__*/ɵngcc0.ɵɵProvidersFeature([formGroupNameProvider]), ɵngcc0.ɵɵInheritDefinitionFeature]\n  });\n  return FormGroupName;\n}();\n\nvar formArrayNameProvider = {\n  provide: ControlContainer,\n  useExisting: /*@__PURE__*/forwardRef(function () {\n    return FormArrayName;\n  })\n};\n\nvar FormArrayName = /*@__PURE__*/function () {\n  var FormArrayName = /*#__PURE__*/function (_ControlContainer4) {\n    _inherits(FormArrayName, _ControlContainer4);\n\n    var _super21 = _createSuper(FormArrayName);\n\n    function FormArrayName(parent, validators, asyncValidators) {\n      var _this34;\n\n      _classCallCheck(this, FormArrayName);\n\n      _this34 = _super21.call(this);\n      _this34._parent = parent;\n\n      _this34._setValidators(validators);\n\n      _this34._setAsyncValidators(asyncValidators);\n\n      return _this34;\n    }\n    /**\n     * A lifecycle method called when the directive's inputs are initialized. For internal use only.\n     * @throws If the directive does not have a valid parent.\n     * @nodoc\n     */\n\n\n    _createClass(FormArrayName, [{\n      key: \"ngOnInit\",\n      value: function ngOnInit() {\n        this._checkParentType();\n\n        this.formDirective.addFormArray(this);\n      }\n      /**\n       * A lifecycle method called before the directive's instance is destroyed. For internal use only.\n       * @nodoc\n       */\n\n    }, {\n      key: \"ngOnDestroy\",\n      value: function ngOnDestroy() {\n        if (this.formDirective) {\n          this.formDirective.removeFormArray(this);\n        }\n      }\n      /**\n       * @description\n       * The `FormArray` bound to this directive.\n       */\n\n    }, {\n      key: \"control\",\n      get: function get() {\n        return this.formDirective.getFormArray(this);\n      }\n      /**\n       * @description\n       * The top-level directive for this group if present, otherwise null.\n       */\n\n    }, {\n      key: \"formDirective\",\n      get: function get() {\n        return this._parent ? this._parent.formDirective : null;\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\n    }, {\n      key: \"path\",\n      get: function get() {\n        return controlPath(this.name == null ? this.name : this.name.toString(), this._parent);\n      }\n    }, {\n      key: \"_checkParentType\",\n      value: function _checkParentType() {\n        if (_hasInvalidParent(this._parent) && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n          throw arrayParentException();\n        }\n      }\n    }]);\n\n    return FormArrayName;\n  }(ControlContainer);\n\n  FormArrayName.ɵfac = function FormArrayName_Factory(t) {\n    return new (t || FormArrayName)(ɵngcc0.ɵɵdirectiveInject(ControlContainer, 13), ɵngcc0.ɵɵdirectiveInject(NG_VALIDATORS, 10), ɵngcc0.ɵɵdirectiveInject(NG_ASYNC_VALIDATORS, 10));\n  };\n\n  FormArrayName.ɵdir =\n  /*@__PURE__*/\n\n  /*@__PURE__*/\n  ɵngcc0.ɵɵdefineDirective({\n    type: FormArrayName,\n    selectors: [[\"\", \"formArrayName\", \"\"]],\n    inputs: {\n      name: [\"formArrayName\", \"name\"]\n    },\n    features: [/*@__PURE__*/ɵngcc0.ɵɵProvidersFeature([formArrayNameProvider]), ɵngcc0.ɵɵInheritDefinitionFeature]\n  });\n  return FormArrayName;\n}();\n\nfunction _hasInvalidParent(parent) {\n  return !(parent instanceof FormGroupName) && !(parent instanceof FormGroupDirective) && !(parent instanceof FormArrayName);\n}\n/**\n * @license\n * Copyright Google LLC 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\nvar controlNameBinding = {\n  provide: NgControl,\n  useExisting: /*@__PURE__*/forwardRef(function () {\n    return FormControlName;\n  })\n};\n\nvar FormControlName = /*@__PURE__*/function () {\n  var FormControlName = /*#__PURE__*/function (_NgControl3) {\n    _inherits(FormControlName, _NgControl3);\n\n    var _super22 = _createSuper(FormControlName);\n\n    function FormControlName(parent, validators, asyncValidators, valueAccessors, _ngModelWarningConfig) {\n      var _this35;\n\n      _classCallCheck(this, FormControlName);\n\n      _this35 = _super22.call(this);\n      _this35._ngModelWarningConfig = _ngModelWarningConfig;\n      _this35._added = false;\n      /** @deprecated as of v6 */\n\n      _this35.update = new EventEmitter();\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\n      _this35._ngModelWarningSent = false;\n      _this35._parent = parent;\n\n      _this35._setValidators(validators);\n\n      _this35._setAsyncValidators(asyncValidators);\n\n      _this35.valueAccessor = selectValueAccessor(_assertThisInitialized(_this35), valueAccessors);\n      return _this35;\n    }\n    /**\n     * @description\n     * Triggers a warning in dev mode that this input should not be used with reactive forms.\n     */\n\n\n    _createClass(FormControlName, [{\n      key: \"isDisabled\",\n      set: function set(isDisabled) {\n        if (typeof ngDevMode === 'undefined' || ngDevMode) {\n          console.warn(disabledAttrWarning);\n        }\n      }\n      /** @nodoc */\n\n    }, {\n      key: \"ngOnChanges\",\n      value: function ngOnChanges(changes) {\n        if (!this._added) this._setUpControl();\n\n        if (isPropertyUpdated(changes, this.viewModel)) {\n          if (typeof ngDevMode === 'undefined' || ngDevMode) {\n            _ngModelWarning('formControlName', FormControlName, this, this._ngModelWarningConfig);\n          }\n\n          this.viewModel = this.model;\n          this.formDirective.updateModel(this, this.model);\n        }\n      }\n      /** @nodoc */\n\n    }, {\n      key: \"ngOnDestroy\",\n      value: function ngOnDestroy() {\n        if (this.formDirective) {\n          this.formDirective.removeControl(this);\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\n    }, {\n      key: \"viewToModelUpdate\",\n      value: function viewToModelUpdate(newValue) {\n        this.viewModel = newValue;\n        this.update.emit(newValue);\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\n    }, {\n      key: \"path\",\n      get: function get() {\n        return controlPath(this.name == null ? this.name : this.name.toString(), this._parent);\n      }\n      /**\n       * @description\n       * The top-level directive for this group if present, otherwise null.\n       */\n\n    }, {\n      key: \"formDirective\",\n      get: function get() {\n        return this._parent ? this._parent.formDirective : null;\n      }\n    }, {\n      key: \"_checkParentType\",\n      value: function _checkParentType() {\n        if (typeof ngDevMode === 'undefined' || ngDevMode) {\n          if (!(this._parent instanceof FormGroupName) && this._parent instanceof AbstractFormGroupDirective) {\n            throw ngModelGroupException();\n          } else if (!(this._parent instanceof FormGroupName) && !(this._parent instanceof FormGroupDirective) && !(this._parent instanceof FormArrayName)) {\n            throw controlParentException();\n          }\n        }\n      }\n    }, {\n      key: \"_setUpControl\",\n      value: function _setUpControl() {\n        this._checkParentType();\n\n        this.control = this.formDirective.addControl(this);\n\n        if (this.control.disabled && this.valueAccessor.setDisabledState) {\n          this.valueAccessor.setDisabledState(true);\n        }\n\n        this._added = true;\n      }\n    }]);\n\n    return FormControlName;\n  }(NgControl);\n\n  FormControlName.ɵfac = function FormControlName_Factory(t) {\n    return new (t || FormControlName)(ɵngcc0.ɵɵdirectiveInject(ControlContainer, 13), ɵngcc0.ɵɵdirectiveInject(NG_VALIDATORS, 10), ɵngcc0.ɵɵdirectiveInject(NG_ASYNC_VALIDATORS, 10), ɵngcc0.ɵɵdirectiveInject(NG_VALUE_ACCESSOR, 10), ɵngcc0.ɵɵdirectiveInject(NG_MODEL_WITH_FORM_CONTROL_WARNING, 8));\n  };\n\n  FormControlName.ɵdir =\n  /*@__PURE__*/\n\n  /*@__PURE__*/\n  ɵngcc0.ɵɵdefineDirective({\n    type: FormControlName,\n    selectors: [[\"\", \"formControlName\", \"\"]],\n    inputs: {\n      isDisabled: [\"disabled\", \"isDisabled\"],\n      name: [\"formControlName\", \"name\"],\n      model: [\"ngModel\", \"model\"]\n    },\n    outputs: {\n      update: \"ngModelChange\"\n    },\n    features: [/*@__PURE__*/ɵngcc0.ɵɵProvidersFeature([controlNameBinding]), ɵngcc0.ɵɵInheritDefinitionFeature, ɵngcc0.ɵɵNgOnChangesFeature]\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\n  FormControlName._ngModelWarningSentOnce = false;\n  return FormControlName;\n}();\n/**\n * @license\n * Copyright Google LLC 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\nvar SELECT_VALUE_ACCESSOR = {\n  provide: NG_VALUE_ACCESSOR,\n  useExisting: /*@__PURE__*/forwardRef(function () {\n    return SelectControlValueAccessor;\n  }),\n  multi: true\n};\n\nfunction _buildValueString(id, value) {\n  if (id == null) return \"\".concat(value);\n  if (value && typeof value === 'object') value = 'Object';\n  return \"\".concat(id, \": \").concat(value).slice(0, 50);\n}\n\nfunction _extractId(valueString) {\n  return valueString.split(':')[0];\n}\n\nvar SelectControlValueAccessor = /*@__PURE__*/function () {\n  var SelectControlValueAccessor = /*#__PURE__*/function (_BuiltInControlValueA5) {\n    _inherits(SelectControlValueAccessor, _BuiltInControlValueA5);\n\n    var _super23 = _createSuper(SelectControlValueAccessor);\n\n    function SelectControlValueAccessor() {\n      var _this36;\n\n      _classCallCheck(this, SelectControlValueAccessor);\n\n      _this36 = _super23.apply(this, arguments);\n      /** @internal */\n\n      _this36._optionMap = new Map();\n      /** @internal */\n\n      _this36._idCounter = 0;\n      _this36._compareWith = Object.is;\n      return _this36;\n    }\n    /**\n     * @description\n     * Tracks the option comparison algorithm for tracking identities when\n     * checking for changes.\n     */\n\n\n    _createClass(SelectControlValueAccessor, [{\n      key: \"compareWith\",\n      set: function set(fn) {\n        if (typeof fn !== 'function' && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n          throw new Error(\"compareWith must be a function, but received \".concat(JSON.stringify(fn)));\n        }\n\n        this._compareWith = fn;\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       * @nodoc\n       */\n\n    }, {\n      key: \"writeValue\",\n      value: function writeValue(value) {\n        this.value = value;\n\n        var id = this._getOptionId(value);\n\n        if (id == null) {\n          this.setProperty('selectedIndex', -1);\n        }\n\n        var valueString = _buildValueString(id, value);\n\n        this.setProperty('value', valueString);\n      }\n      /**\n       * Registers a function called when the control value changes.\n       * @nodoc\n       */\n\n    }, {\n      key: \"registerOnChange\",\n      value: function registerOnChange(fn) {\n        var _this37 = this;\n\n        this.onChange = function (valueString) {\n          _this37.value = _this37._getOptionValue(valueString);\n          fn(_this37.value);\n        };\n      }\n      /** @internal */\n\n    }, {\n      key: \"_registerOption\",\n      value: function _registerOption() {\n        return (this._idCounter++).toString();\n      }\n      /** @internal */\n\n    }, {\n      key: \"_getOptionId\",\n      value: function _getOptionId(value) {\n        for (var _i3 = 0, _Array$from = Array.from(this._optionMap.keys()); _i3 < _Array$from.length; _i3++) {\n          var id = _Array$from[_i3];\n          if (this._compareWith(this._optionMap.get(id), value)) return id;\n        }\n\n        return null;\n      }\n      /** @internal */\n\n    }, {\n      key: \"_getOptionValue\",\n      value: function _getOptionValue(valueString) {\n        var id = _extractId(valueString);\n\n        return this._optionMap.has(id) ? this._optionMap.get(id) : valueString;\n      }\n    }]);\n\n    return SelectControlValueAccessor;\n  }(BuiltInControlValueAccessor);\n\n  SelectControlValueAccessor.ɵfac =\n  /*@__PURE__*/\n\n  /*@__PURE__*/\n  function () {\n    var ɵSelectControlValueAccessor_BaseFactory;\n    return function SelectControlValueAccessor_Factory(t) {\n      return (ɵSelectControlValueAccessor_BaseFactory || (ɵSelectControlValueAccessor_BaseFactory = ɵngcc0.ɵɵgetInheritedFactory(SelectControlValueAccessor)))(t || SelectControlValueAccessor);\n    };\n  }();\n\n  SelectControlValueAccessor.ɵdir =\n  /*@__PURE__*/\n\n  /*@__PURE__*/\n  ɵngcc0.ɵɵdefineDirective({\n    type: SelectControlValueAccessor,\n    selectors: [[\"select\", \"formControlName\", \"\", 3, \"multiple\", \"\"], [\"select\", \"formControl\", \"\", 3, \"multiple\", \"\"], [\"select\", \"ngModel\", \"\", 3, \"multiple\", \"\"]],\n    hostBindings: function SelectControlValueAccessor_HostBindings(rf, ctx) {\n      if (rf & 1) {\n        ɵngcc0.ɵɵlistener(\"change\", function SelectControlValueAccessor_change_HostBindingHandler($event) {\n          return ctx.onChange($event.target.value);\n        })(\"blur\", function SelectControlValueAccessor_blur_HostBindingHandler() {\n          return ctx.onTouched();\n        });\n      }\n    },\n    inputs: {\n      compareWith: \"compareWith\"\n    },\n    features: [/*@__PURE__*/ɵngcc0.ɵɵProvidersFeature([SELECT_VALUE_ACCESSOR]), ɵngcc0.ɵɵInheritDefinitionFeature]\n  });\n  return SelectControlValueAccessor;\n}();\n\nvar NgSelectOption = /*@__PURE__*/function () {\n  var NgSelectOption = /*#__PURE__*/function () {\n    function NgSelectOption(_element, _renderer, _select) {\n      _classCallCheck(this, NgSelectOption);\n\n      this._element = _element;\n      this._renderer = _renderer;\n      this._select = _select;\n      if (this._select) this.id = this._select._registerOption();\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\n\n    _createClass(NgSelectOption, [{\n      key: \"ngValue\",\n      set: function set(value) {\n        if (this._select == null) return;\n\n        this._select._optionMap.set(this.id, value);\n\n        this._setElementValue(_buildValueString(this.id, value));\n\n        this._select.writeValue(this._select.value);\n      }\n      /**\n       * @description\n       * Tracks simple string values bound to the option element.\n       * For objects, use the `ngValue` input binding.\n       */\n\n    }, {\n      key: \"value\",\n      set: function set(value) {\n        this._setElementValue(value);\n\n        if (this._select) this._select.writeValue(this._select.value);\n      }\n      /** @internal */\n\n    }, {\n      key: \"_setElementValue\",\n      value: function _setElementValue(value) {\n        this._renderer.setProperty(this._element.nativeElement, 'value', value);\n      }\n      /** @nodoc */\n\n    }, {\n      key: \"ngOnDestroy\",\n      value: function ngOnDestroy() {\n        if (this._select) {\n          this._select._optionMap.delete(this.id);\n\n          this._select.writeValue(this._select.value);\n        }\n      }\n    }]);\n\n    return NgSelectOption;\n  }();\n\n  NgSelectOption.ɵfac = function NgSelectOption_Factory(t) {\n    return new (t || NgSelectOption)(ɵngcc0.ɵɵdirectiveInject(ɵngcc0.ElementRef), ɵngcc0.ɵɵdirectiveInject(ɵngcc0.Renderer2), ɵngcc0.ɵɵdirectiveInject(SelectControlValueAccessor, 9));\n  };\n\n  NgSelectOption.ɵdir =\n  /*@__PURE__*/\n\n  /*@__PURE__*/\n  ɵngcc0.ɵɵdefineDirective({\n    type: NgSelectOption,\n    selectors: [[\"option\"]],\n    inputs: {\n      ngValue: \"ngValue\",\n      value: \"value\"\n    }\n  });\n  return NgSelectOption;\n}();\n/**\n * @license\n * Copyright Google LLC 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\nvar SELECT_MULTIPLE_VALUE_ACCESSOR = {\n  provide: NG_VALUE_ACCESSOR,\n  useExisting: /*@__PURE__*/forwardRef(function () {\n    return SelectMultipleControlValueAccessor;\n  }),\n  multi: true\n};\n\nfunction _buildValueString$1(id, value) {\n  if (id == null) return \"\".concat(value);\n  if (typeof value === 'string') value = \"'\".concat(value, \"'\");\n  if (value && typeof value === 'object') value = 'Object';\n  return \"\".concat(id, \": \").concat(value).slice(0, 50);\n}\n\nfunction _extractId$1(valueString) {\n  return valueString.split(':')[0];\n}\n/** Mock interface for HTMLCollection */\n\n\nvar HTMLCollection = /*#__PURE__*/_createClass(function HTMLCollection() {\n  _classCallCheck(this, HTMLCollection);\n});\n\nvar SelectMultipleControlValueAccessor = /*@__PURE__*/function () {\n  var SelectMultipleControlValueAccessor = /*#__PURE__*/function (_BuiltInControlValueA6) {\n    _inherits(SelectMultipleControlValueAccessor, _BuiltInControlValueA6);\n\n    var _super24 = _createSuper(SelectMultipleControlValueAccessor);\n\n    function SelectMultipleControlValueAccessor() {\n      var _this38;\n\n      _classCallCheck(this, SelectMultipleControlValueAccessor);\n\n      _this38 = _super24.apply(this, arguments);\n      /** @internal */\n\n      _this38._optionMap = new Map();\n      /** @internal */\n\n      _this38._idCounter = 0;\n      _this38._compareWith = Object.is;\n      return _this38;\n    }\n    /**\n     * @description\n     * Tracks the option comparison algorithm for tracking identities when\n     * checking for changes.\n     */\n\n\n    _createClass(SelectMultipleControlValueAccessor, [{\n      key: \"compareWith\",\n      set: function set(fn) {\n        if (typeof fn !== 'function' && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n          throw new Error(\"compareWith must be a function, but received \".concat(JSON.stringify(fn)));\n        }\n\n        this._compareWith = fn;\n      }\n      /**\n       * Sets the \"value\" property on one or of more of the select's options.\n       * @nodoc\n       */\n\n    }, {\n      key: \"writeValue\",\n      value: function writeValue(value) {\n        var _this39 = this;\n\n        this.value = value;\n        var optionSelectedStateSetter;\n\n        if (Array.isArray(value)) {\n          // convert values to ids\n          var ids = value.map(function (v) {\n            return _this39._getOptionId(v);\n          });\n\n          optionSelectedStateSetter = function optionSelectedStateSetter(opt, o) {\n            opt._setSelected(ids.indexOf(o.toString()) > -1);\n          };\n        } else {\n          optionSelectedStateSetter = function optionSelectedStateSetter(opt, o) {\n            opt._setSelected(false);\n          };\n        }\n\n        this._optionMap.forEach(optionSelectedStateSetter);\n      }\n      /**\n       * Registers a function called when the control value changes\n       * and writes an array of the selected options.\n       * @nodoc\n       */\n\n    }, {\n      key: \"registerOnChange\",\n      value: function registerOnChange(fn) {\n        var _this40 = this;\n\n        this.onChange = function (_) {\n          var selected = [];\n\n          if (_.selectedOptions !== undefined) {\n            var options = _.selectedOptions;\n\n            for (var i = 0; i < options.length; i++) {\n              var opt = options.item(i);\n\n              var val = _this40._getOptionValue(opt.value);\n\n              selected.push(val);\n            }\n          } // Degrade on IE\n          else {\n            var _options = _.options;\n\n            for (var _i4 = 0; _i4 < _options.length; _i4++) {\n              var _opt = _options.item(_i4);\n\n              if (_opt.selected) {\n                var _val = _this40._getOptionValue(_opt.value);\n\n                selected.push(_val);\n              }\n            }\n          }\n\n          _this40.value = selected;\n          fn(selected);\n        };\n      }\n      /** @internal */\n\n    }, {\n      key: \"_registerOption\",\n      value: function _registerOption(value) {\n        var id = (this._idCounter++).toString();\n\n        this._optionMap.set(id, value);\n\n        return id;\n      }\n      /** @internal */\n\n    }, {\n      key: \"_getOptionId\",\n      value: function _getOptionId(value) {\n        for (var _i5 = 0, _Array$from2 = Array.from(this._optionMap.keys()); _i5 < _Array$from2.length; _i5++) {\n          var id = _Array$from2[_i5];\n          if (this._compareWith(this._optionMap.get(id)._value, value)) return id;\n        }\n\n        return null;\n      }\n      /** @internal */\n\n    }, {\n      key: \"_getOptionValue\",\n      value: function _getOptionValue(valueString) {\n        var id = _extractId$1(valueString);\n\n        return this._optionMap.has(id) ? this._optionMap.get(id)._value : valueString;\n      }\n    }]);\n\n    return SelectMultipleControlValueAccessor;\n  }(BuiltInControlValueAccessor);\n\n  SelectMultipleControlValueAccessor.ɵfac =\n  /*@__PURE__*/\n\n  /*@__PURE__*/\n  function () {\n    var ɵSelectMultipleControlValueAccessor_BaseFactory;\n    return function SelectMultipleControlValueAccessor_Factory(t) {\n      return (ɵSelectMultipleControlValueAccessor_BaseFactory || (ɵSelectMultipleControlValueAccessor_BaseFactory = ɵngcc0.ɵɵgetInheritedFactory(SelectMultipleControlValueAccessor)))(t || SelectMultipleControlValueAccessor);\n    };\n  }();\n\n  SelectMultipleControlValueAccessor.ɵdir =\n  /*@__PURE__*/\n\n  /*@__PURE__*/\n  ɵngcc0.ɵɵdefineDirective({\n    type: SelectMultipleControlValueAccessor,\n    selectors: [[\"select\", \"multiple\", \"\", \"formControlName\", \"\"], [\"select\", \"multiple\", \"\", \"formControl\", \"\"], [\"select\", \"multiple\", \"\", \"ngModel\", \"\"]],\n    hostBindings: function SelectMultipleControlValueAccessor_HostBindings(rf, ctx) {\n      if (rf & 1) {\n        ɵngcc0.ɵɵlistener(\"change\", function SelectMultipleControlValueAccessor_change_HostBindingHandler($event) {\n          return ctx.onChange($event.target);\n        })(\"blur\", function SelectMultipleControlValueAccessor_blur_HostBindingHandler() {\n          return ctx.onTouched();\n        });\n      }\n    },\n    inputs: {\n      compareWith: \"compareWith\"\n    },\n    features: [/*@__PURE__*/ɵngcc0.ɵɵProvidersFeature([SELECT_MULTIPLE_VALUE_ACCESSOR]), ɵngcc0.ɵɵInheritDefinitionFeature]\n  });\n  return SelectMultipleControlValueAccessor;\n}();\n\nvar ɵNgSelectMultipleOption = /*@__PURE__*/function () {\n  var ɵNgSelectMultipleOption = /*#__PURE__*/function () {\n    function ɵNgSelectMultipleOption(_element, _renderer, _select) {\n      _classCallCheck(this, ɵNgSelectMultipleOption);\n\n      this._element = _element;\n      this._renderer = _renderer;\n      this._select = _select;\n\n      if (this._select) {\n        this.id = this._select._registerOption(this);\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\n\n    _createClass(ɵNgSelectMultipleOption, [{\n      key: \"ngValue\",\n      set: function set(value) {\n        if (this._select == null) return;\n        this._value = value;\n\n        this._setElementValue(_buildValueString$1(this.id, value));\n\n        this._select.writeValue(this._select.value);\n      }\n      /**\n       * @description\n       * Tracks simple string values bound to the option element.\n       * For objects, use the `ngValue` input binding.\n       */\n\n    }, {\n      key: \"value\",\n      set: function set(value) {\n        if (this._select) {\n          this._value = value;\n\n          this._setElementValue(_buildValueString$1(this.id, value));\n\n          this._select.writeValue(this._select.value);\n        } else {\n          this._setElementValue(value);\n        }\n      }\n      /** @internal */\n\n    }, {\n      key: \"_setElementValue\",\n      value: function _setElementValue(value) {\n        this._renderer.setProperty(this._element.nativeElement, 'value', value);\n      }\n      /** @internal */\n\n    }, {\n      key: \"_setSelected\",\n      value: function _setSelected(selected) {\n        this._renderer.setProperty(this._element.nativeElement, 'selected', selected);\n      }\n      /** @nodoc */\n\n    }, {\n      key: \"ngOnDestroy\",\n      value: function ngOnDestroy() {\n        if (this._select) {\n          this._select._optionMap.delete(this.id);\n\n          this._select.writeValue(this._select.value);\n        }\n      }\n    }]);\n\n    return ɵNgSelectMultipleOption;\n  }();\n\n  ɵNgSelectMultipleOption.ɵfac = function ɵNgSelectMultipleOption_Factory(t) {\n    return new (t || ɵNgSelectMultipleOption)(ɵngcc0.ɵɵdirectiveInject(ɵngcc0.ElementRef), ɵngcc0.ɵɵdirectiveInject(ɵngcc0.Renderer2), ɵngcc0.ɵɵdirectiveInject(SelectMultipleControlValueAccessor, 9));\n  };\n\n  ɵNgSelectMultipleOption.ɵdir =\n  /*@__PURE__*/\n\n  /*@__PURE__*/\n  ɵngcc0.ɵɵdefineDirective({\n    type: ɵNgSelectMultipleOption,\n    selectors: [[\"option\"]],\n    inputs: {\n      ngValue: \"ngValue\",\n      value: \"value\"\n    }\n  });\n  return ɵNgSelectMultipleOption;\n}();\n/**\n * @license\n * Copyright Google LLC 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 * @description\n * Method that updates string to integer if not alread a number\n *\n * @param value The value to convert to integer\n * @returns value of parameter in number or integer.\n */\n\n\nfunction toNumber(value) {\n  return typeof value === 'number' ? value : parseInt(value, 10);\n}\n\nvar AbstractValidatorDirective = /*@__PURE__*/function () {\n  var AbstractValidatorDirective = /*#__PURE__*/function () {\n    function AbstractValidatorDirective() {\n      _classCallCheck(this, AbstractValidatorDirective);\n\n      this._validator = _nullValidator;\n    }\n    /**\n     * Helper function invoked from child classes to process changes (from `ngOnChanges` hook).\n     * @nodoc\n     */\n\n\n    _createClass(AbstractValidatorDirective, [{\n      key: \"handleChanges\",\n      value: function handleChanges(changes) {\n        if (this.inputName in changes) {\n          var input = this.normalizeInput(changes[this.inputName].currentValue);\n          this._validator = this.createValidator(input);\n\n          if (this._onChange) {\n            this._onChange();\n          }\n        }\n      }\n      /** @nodoc */\n\n    }, {\n      key: \"validate\",\n      value: function validate(control) {\n        return this._validator(control);\n      }\n      /** @nodoc */\n\n    }, {\n      key: \"registerOnValidatorChange\",\n      value: function registerOnValidatorChange(fn) {\n        this._onChange = fn;\n      }\n    }]);\n\n    return AbstractValidatorDirective;\n  }();\n\n  AbstractValidatorDirective.ɵfac = function AbstractValidatorDirective_Factory(t) {\n    return new (t || AbstractValidatorDirective)();\n  };\n\n  AbstractValidatorDirective.ɵdir =\n  /*@__PURE__*/\n\n  /*@__PURE__*/\n  ɵngcc0.ɵɵdefineDirective({\n    type: AbstractValidatorDirective\n  });\n  return AbstractValidatorDirective;\n}();\n/**\n * @description\n * Provider which adds `MaxValidator` to the `NG_VALIDATORS` multi-provider list.\n */\n\n\nvar MAX_VALIDATOR = {\n  provide: NG_VALIDATORS,\n  useExisting: /*@__PURE__*/forwardRef(function () {\n    return MaxValidator;\n  }),\n  multi: true\n};\n\nvar MaxValidator = /*@__PURE__*/function () {\n  var MaxValidator = /*#__PURE__*/function (_AbstractValidatorDir) {\n    _inherits(MaxValidator, _AbstractValidatorDir);\n\n    var _super25 = _createSuper(MaxValidator);\n\n    function MaxValidator() {\n      var _this41;\n\n      _classCallCheck(this, MaxValidator);\n\n      _this41 = _super25.apply(this, arguments);\n      /** @internal */\n\n      _this41.inputName = 'max';\n      /** @internal */\n\n      _this41.normalizeInput = function (input) {\n        return parseFloat(input);\n      };\n      /** @internal */\n\n\n      _this41.createValidator = function (max) {\n        return maxValidator(max);\n      };\n\n      return _this41;\n    }\n    /**\n     * Declare `ngOnChanges` lifecycle hook at the main directive level (vs keeping it in base class)\n     * to avoid differences in handling inheritance of lifecycle hooks between Ivy and ViewEngine in\n     * AOT mode. This could be refactored once ViewEngine is removed.\n     * @nodoc\n     */\n\n\n    _createClass(MaxValidator, [{\n      key: \"ngOnChanges\",\n      value: function ngOnChanges(changes) {\n        this.handleChanges(changes);\n      }\n    }]);\n\n    return MaxValidator;\n  }(AbstractValidatorDirective);\n\n  MaxValidator.ɵfac =\n  /*@__PURE__*/\n\n  /*@__PURE__*/\n  function () {\n    var ɵMaxValidator_BaseFactory;\n    return function MaxValidator_Factory(t) {\n      return (ɵMaxValidator_BaseFactory || (ɵMaxValidator_BaseFactory = ɵngcc0.ɵɵgetInheritedFactory(MaxValidator)))(t || MaxValidator);\n    };\n  }();\n\n  MaxValidator.ɵdir =\n  /*@__PURE__*/\n\n  /*@__PURE__*/\n  ɵngcc0.ɵɵdefineDirective({\n    type: MaxValidator,\n    selectors: [[\"input\", \"type\", \"number\", \"max\", \"\", \"formControlName\", \"\"], [\"input\", \"type\", \"number\", \"max\", \"\", \"formControl\", \"\"], [\"input\", \"type\", \"number\", \"max\", \"\", \"ngModel\", \"\"]],\n    hostVars: 1,\n    hostBindings: function MaxValidator_HostBindings(rf, ctx) {\n      if (rf & 2) {\n        var tmp_b_0;\n        ɵngcc0.ɵɵattribute(\"max\", (tmp_b_0 = ctx.max) !== null && tmp_b_0 !== undefined ? tmp_b_0 : null);\n      }\n    },\n    inputs: {\n      max: \"max\"\n    },\n    features: [/*@__PURE__*/ɵngcc0.ɵɵProvidersFeature([MAX_VALIDATOR]), ɵngcc0.ɵɵInheritDefinitionFeature, ɵngcc0.ɵɵNgOnChangesFeature]\n  });\n  return MaxValidator;\n}();\n/**\n * @description\n * Provider which adds `MinValidator` to the `NG_VALIDATORS` multi-provider list.\n */\n\n\nvar MIN_VALIDATOR = {\n  provide: NG_VALIDATORS,\n  useExisting: /*@__PURE__*/forwardRef(function () {\n    return MinValidator;\n  }),\n  multi: true\n};\n\nvar MinValidator = /*@__PURE__*/function () {\n  var MinValidator = /*#__PURE__*/function (_AbstractValidatorDir2) {\n    _inherits(MinValidator, _AbstractValidatorDir2);\n\n    var _super26 = _createSuper(MinValidator);\n\n    function MinValidator() {\n      var _this42;\n\n      _classCallCheck(this, MinValidator);\n\n      _this42 = _super26.apply(this, arguments);\n      /** @internal */\n\n      _this42.inputName = 'min';\n      /** @internal */\n\n      _this42.normalizeInput = function (input) {\n        return parseFloat(input);\n      };\n      /** @internal */\n\n\n      _this42.createValidator = function (min) {\n        return minValidator(min);\n      };\n\n      return _this42;\n    }\n    /**\n     * Declare `ngOnChanges` lifecycle hook at the main directive level (vs keeping it in base class)\n     * to avoid differences in handling inheritance of lifecycle hooks between Ivy and ViewEngine in\n     * AOT mode. This could be refactored once ViewEngine is removed.\n     * @nodoc\n     */\n\n\n    _createClass(MinValidator, [{\n      key: \"ngOnChanges\",\n      value: function ngOnChanges(changes) {\n        this.handleChanges(changes);\n      }\n    }]);\n\n    return MinValidator;\n  }(AbstractValidatorDirective);\n\n  MinValidator.ɵfac =\n  /*@__PURE__*/\n\n  /*@__PURE__*/\n  function () {\n    var ɵMinValidator_BaseFactory;\n    return function MinValidator_Factory(t) {\n      return (ɵMinValidator_BaseFactory || (ɵMinValidator_BaseFactory = ɵngcc0.ɵɵgetInheritedFactory(MinValidator)))(t || MinValidator);\n    };\n  }();\n\n  MinValidator.ɵdir =\n  /*@__PURE__*/\n\n  /*@__PURE__*/\n  ɵngcc0.ɵɵdefineDirective({\n    type: MinValidator,\n    selectors: [[\"input\", \"type\", \"number\", \"min\", \"\", \"formControlName\", \"\"], [\"input\", \"type\", \"number\", \"min\", \"\", \"formControl\", \"\"], [\"input\", \"type\", \"number\", \"min\", \"\", \"ngModel\", \"\"]],\n    hostVars: 1,\n    hostBindings: function MinValidator_HostBindings(rf, ctx) {\n      if (rf & 2) {\n        var tmp_b_0;\n        ɵngcc0.ɵɵattribute(\"min\", (tmp_b_0 = ctx.min) !== null && tmp_b_0 !== undefined ? tmp_b_0 : null);\n      }\n    },\n    inputs: {\n      min: \"min\"\n    },\n    features: [/*@__PURE__*/ɵngcc0.ɵɵProvidersFeature([MIN_VALIDATOR]), ɵngcc0.ɵɵInheritDefinitionFeature, ɵngcc0.ɵɵNgOnChangesFeature]\n  });\n  return MinValidator;\n}();\n/**\n * @description\n * Provider which adds `RequiredValidator` to the `NG_VALIDATORS` multi-provider list.\n */\n\n\nvar REQUIRED_VALIDATOR = {\n  provide: NG_VALIDATORS,\n  useExisting: /*@__PURE__*/forwardRef(function () {\n    return RequiredValidator;\n  }),\n  multi: true\n};\n/**\n * @description\n * Provider which adds `CheckboxRequiredValidator` to the `NG_VALIDATORS` multi-provider list.\n */\n\nvar CHECKBOX_REQUIRED_VALIDATOR = {\n  provide: NG_VALIDATORS,\n  useExisting: /*@__PURE__*/forwardRef(function () {\n    return CheckboxRequiredValidator;\n  }),\n  multi: true\n};\n\nvar RequiredValidator = /*@__PURE__*/function () {\n  var RequiredValidator = /*#__PURE__*/function () {\n    function RequiredValidator() {\n      _classCallCheck(this, RequiredValidator);\n\n      this._required = false;\n    }\n    /**\n     * @description\n     * Tracks changes to the required attribute bound to this directive.\n     */\n\n\n    _createClass(RequiredValidator, [{\n      key: \"required\",\n      get: function get() {\n        return this._required;\n      },\n      set: function set(value) {\n        this._required = value != null && value !== false && \"\".concat(value) !== 'false';\n        if (this._onChange) this._onChange();\n      }\n      /**\n       * Method that validates whether the control is empty.\n       * Returns the validation result if enabled, otherwise null.\n       * @nodoc\n       */\n\n    }, {\n      key: \"validate\",\n      value: function validate(control) {\n        return this.required ? requiredValidator(control) : null;\n      }\n      /**\n       * Registers a callback function to call when the validator inputs change.\n       * @nodoc\n       */\n\n    }, {\n      key: \"registerOnValidatorChange\",\n      value: function registerOnValidatorChange(fn) {\n        this._onChange = fn;\n      }\n    }]);\n\n    return RequiredValidator;\n  }();\n\n  RequiredValidator.ɵfac = function RequiredValidator_Factory(t) {\n    return new (t || RequiredValidator)();\n  };\n\n  RequiredValidator.ɵdir =\n  /*@__PURE__*/\n\n  /*@__PURE__*/\n  ɵngcc0.ɵɵdefineDirective({\n    type: RequiredValidator,\n    selectors: [[\"\", \"required\", \"\", \"formControlName\", \"\", 3, \"type\", \"checkbox\"], [\"\", \"required\", \"\", \"formControl\", \"\", 3, \"type\", \"checkbox\"], [\"\", \"required\", \"\", \"ngModel\", \"\", 3, \"type\", \"checkbox\"]],\n    hostVars: 1,\n    hostBindings: function RequiredValidator_HostBindings(rf, ctx) {\n      if (rf & 2) {\n        ɵngcc0.ɵɵattribute(\"required\", ctx.required ? \"\" : null);\n      }\n    },\n    inputs: {\n      required: \"required\"\n    },\n    features: [/*@__PURE__*/ɵngcc0.ɵɵProvidersFeature([REQUIRED_VALIDATOR])]\n  });\n  return RequiredValidator;\n}();\n\nvar CheckboxRequiredValidator = /*@__PURE__*/function () {\n  var CheckboxRequiredValidator = /*#__PURE__*/function (_RequiredValidator) {\n    _inherits(CheckboxRequiredValidator, _RequiredValidator);\n\n    var _super27 = _createSuper(CheckboxRequiredValidator);\n\n    function CheckboxRequiredValidator() {\n      _classCallCheck(this, CheckboxRequiredValidator);\n\n      return _super27.apply(this, arguments);\n    }\n\n    _createClass(CheckboxRequiredValidator, [{\n      key: \"validate\",\n      value:\n      /**\n       * Method that validates whether or not the checkbox has been checked.\n       * Returns the validation result if enabled, otherwise null.\n       * @nodoc\n       */\n      function validate(control) {\n        return this.required ? requiredTrueValidator(control) : null;\n      }\n    }]);\n\n    return CheckboxRequiredValidator;\n  }(RequiredValidator);\n\n  CheckboxRequiredValidator.ɵfac =\n  /*@__PURE__*/\n\n  /*@__PURE__*/\n  function () {\n    var ɵCheckboxRequiredValidator_BaseFactory;\n    return function CheckboxRequiredValidator_Factory(t) {\n      return (ɵCheckboxRequiredValidator_BaseFactory || (ɵCheckboxRequiredValidator_BaseFactory = ɵngcc0.ɵɵgetInheritedFactory(CheckboxRequiredValidator)))(t || CheckboxRequiredValidator);\n    };\n  }();\n\n  CheckboxRequiredValidator.ɵdir =\n  /*@__PURE__*/\n\n  /*@__PURE__*/\n  ɵngcc0.ɵɵdefineDirective({\n    type: CheckboxRequiredValidator,\n    selectors: [[\"input\", \"type\", \"checkbox\", \"required\", \"\", \"formControlName\", \"\"], [\"input\", \"type\", \"checkbox\", \"required\", \"\", \"formControl\", \"\"], [\"input\", \"type\", \"checkbox\", \"required\", \"\", \"ngModel\", \"\"]],\n    hostVars: 1,\n    hostBindings: function CheckboxRequiredValidator_HostBindings(rf, ctx) {\n      if (rf & 2) {\n        ɵngcc0.ɵɵattribute(\"required\", ctx.required ? \"\" : null);\n      }\n    },\n    features: [/*@__PURE__*/ɵngcc0.ɵɵProvidersFeature([CHECKBOX_REQUIRED_VALIDATOR]), ɵngcc0.ɵɵInheritDefinitionFeature]\n  });\n  return CheckboxRequiredValidator;\n}();\n/**\n * @description\n * Provider which adds `EmailValidator` to the `NG_VALIDATORS` multi-provider list.\n */\n\n\nvar EMAIL_VALIDATOR = {\n  provide: NG_VALIDATORS,\n  useExisting: /*@__PURE__*/forwardRef(function () {\n    return EmailValidator;\n  }),\n  multi: true\n};\n\nvar EmailValidator = /*@__PURE__*/function () {\n  var EmailValidator = /*#__PURE__*/function () {\n    function EmailValidator() {\n      _classCallCheck(this, EmailValidator);\n\n      this._enabled = false;\n    }\n    /**\n     * @description\n     * Tracks changes to the email attribute bound to this directive.\n     */\n\n\n    _createClass(EmailValidator, [{\n      key: \"email\",\n      set: function set(value) {\n        this._enabled = value === '' || value === true || value === 'true';\n        if (this._onChange) this._onChange();\n      }\n      /**\n       * Method that validates whether an email address is valid.\n       * Returns the validation result if enabled, otherwise null.\n       * @nodoc\n       */\n\n    }, {\n      key: \"validate\",\n      value: function validate(control) {\n        return this._enabled ? emailValidator(control) : null;\n      }\n      /**\n       * Registers a callback function to call when the validator inputs change.\n       * @nodoc\n       */\n\n    }, {\n      key: \"registerOnValidatorChange\",\n      value: function registerOnValidatorChange(fn) {\n        this._onChange = fn;\n      }\n    }]);\n\n    return EmailValidator;\n  }();\n\n  EmailValidator.ɵfac = function EmailValidator_Factory(t) {\n    return new (t || EmailValidator)();\n  };\n\n  EmailValidator.ɵdir =\n  /*@__PURE__*/\n\n  /*@__PURE__*/\n  ɵngcc0.ɵɵdefineDirective({\n    type: EmailValidator,\n    selectors: [[\"\", \"email\", \"\", \"formControlName\", \"\"], [\"\", \"email\", \"\", \"formControl\", \"\"], [\"\", \"email\", \"\", \"ngModel\", \"\"]],\n    inputs: {\n      email: \"email\"\n    },\n    features: [/*@__PURE__*/ɵngcc0.ɵɵProvidersFeature([EMAIL_VALIDATOR])]\n  });\n  return EmailValidator;\n}();\n/**\n * @description\n * Provider which adds `MinLengthValidator` to the `NG_VALIDATORS` multi-provider list.\n */\n\n\nvar MIN_LENGTH_VALIDATOR = {\n  provide: NG_VALIDATORS,\n  useExisting: /*@__PURE__*/forwardRef(function () {\n    return MinLengthValidator;\n  }),\n  multi: true\n};\n\nvar MinLengthValidator = /*@__PURE__*/function () {\n  var MinLengthValidator = /*#__PURE__*/function () {\n    function MinLengthValidator() {\n      _classCallCheck(this, MinLengthValidator);\n\n      this._validator = _nullValidator;\n    }\n    /** @nodoc */\n\n\n    _createClass(MinLengthValidator, [{\n      key: \"ngOnChanges\",\n      value: function ngOnChanges(changes) {\n        if ('minlength' in changes) {\n          this._createValidator();\n\n          if (this._onChange) this._onChange();\n        }\n      }\n      /**\n       * Method that validates whether the value meets a minimum length requirement.\n       * Returns the validation result if enabled, otherwise null.\n       * @nodoc\n       */\n\n    }, {\n      key: \"validate\",\n      value: function validate(control) {\n        return this.enabled() ? this._validator(control) : null;\n      }\n      /**\n       * Registers a callback function to call when the validator inputs change.\n       * @nodoc\n       */\n\n    }, {\n      key: \"registerOnValidatorChange\",\n      value: function registerOnValidatorChange(fn) {\n        this._onChange = fn;\n      }\n    }, {\n      key: \"_createValidator\",\n      value: function _createValidator() {\n        this._validator = this.enabled() ? minLengthValidator(toNumber(this.minlength)) : _nullValidator;\n      }\n      /** @nodoc */\n\n    }, {\n      key: \"enabled\",\n      value: function enabled() {\n        return this.minlength != null\n        /* both `null` and `undefined` */\n        ;\n      }\n    }]);\n\n    return MinLengthValidator;\n  }();\n\n  MinLengthValidator.ɵfac = function MinLengthValidator_Factory(t) {\n    return new (t || MinLengthValidator)();\n  };\n\n  MinLengthValidator.ɵdir =\n  /*@__PURE__*/\n\n  /*@__PURE__*/\n  ɵngcc0.ɵɵdefineDirective({\n    type: MinLengthValidator,\n    selectors: [[\"\", \"minlength\", \"\", \"formControlName\", \"\"], [\"\", \"minlength\", \"\", \"formControl\", \"\"], [\"\", \"minlength\", \"\", \"ngModel\", \"\"]],\n    hostVars: 1,\n    hostBindings: function MinLengthValidator_HostBindings(rf, ctx) {\n      if (rf & 2) {\n        ɵngcc0.ɵɵattribute(\"minlength\", ctx.enabled() ? ctx.minlength : null);\n      }\n    },\n    inputs: {\n      minlength: \"minlength\"\n    },\n    features: [/*@__PURE__*/ɵngcc0.ɵɵProvidersFeature([MIN_LENGTH_VALIDATOR]), ɵngcc0.ɵɵNgOnChangesFeature]\n  });\n  return MinLengthValidator;\n}();\n/**\n * @description\n * Provider which adds `MaxLengthValidator` to the `NG_VALIDATORS` multi-provider list.\n */\n\n\nvar MAX_LENGTH_VALIDATOR = {\n  provide: NG_VALIDATORS,\n  useExisting: /*@__PURE__*/forwardRef(function () {\n    return MaxLengthValidator;\n  }),\n  multi: true\n};\n\nvar MaxLengthValidator = /*@__PURE__*/function () {\n  var MaxLengthValidator = /*#__PURE__*/function () {\n    function MaxLengthValidator() {\n      _classCallCheck(this, MaxLengthValidator);\n\n      this._validator = _nullValidator;\n    }\n    /** @nodoc */\n\n\n    _createClass(MaxLengthValidator, [{\n      key: \"ngOnChanges\",\n      value: function ngOnChanges(changes) {\n        if ('maxlength' in changes) {\n          this._createValidator();\n\n          if (this._onChange) this._onChange();\n        }\n      }\n      /**\n       * Method that validates whether the value exceeds the maximum length requirement.\n       * @nodoc\n       */\n\n    }, {\n      key: \"validate\",\n      value: function validate(control) {\n        return this.enabled() ? this._validator(control) : null;\n      }\n      /**\n       * Registers a callback function to call when the validator inputs change.\n       * @nodoc\n       */\n\n    }, {\n      key: \"registerOnValidatorChange\",\n      value: function registerOnValidatorChange(fn) {\n        this._onChange = fn;\n      }\n    }, {\n      key: \"_createValidator\",\n      value: function _createValidator() {\n        this._validator = this.enabled() ? maxLengthValidator(toNumber(this.maxlength)) : _nullValidator;\n      }\n      /** @nodoc */\n\n    }, {\n      key: \"enabled\",\n      value: function enabled() {\n        return this.maxlength != null\n        /* both `null` and `undefined` */\n        ;\n      }\n    }]);\n\n    return MaxLengthValidator;\n  }();\n\n  MaxLengthValidator.ɵfac = function MaxLengthValidator_Factory(t) {\n    return new (t || MaxLengthValidator)();\n  };\n\n  MaxLengthValidator.ɵdir =\n  /*@__PURE__*/\n\n  /*@__PURE__*/\n  ɵngcc0.ɵɵdefineDirective({\n    type: MaxLengthValidator,\n    selectors: [[\"\", \"maxlength\", \"\", \"formControlName\", \"\"], [\"\", \"maxlength\", \"\", \"formControl\", \"\"], [\"\", \"maxlength\", \"\", \"ngModel\", \"\"]],\n    hostVars: 1,\n    hostBindings: function MaxLengthValidator_HostBindings(rf, ctx) {\n      if (rf & 2) {\n        ɵngcc0.ɵɵattribute(\"maxlength\", ctx.enabled() ? ctx.maxlength : null);\n      }\n    },\n    inputs: {\n      maxlength: \"maxlength\"\n    },\n    features: [/*@__PURE__*/ɵngcc0.ɵɵProvidersFeature([MAX_LENGTH_VALIDATOR]), ɵngcc0.ɵɵNgOnChangesFeature]\n  });\n  return MaxLengthValidator;\n}();\n/**\n * @description\n * Provider which adds `PatternValidator` to the `NG_VALIDATORS` multi-provider list.\n */\n\n\nvar PATTERN_VALIDATOR = {\n  provide: NG_VALIDATORS,\n  useExisting: /*@__PURE__*/forwardRef(function () {\n    return PatternValidator;\n  }),\n  multi: true\n};\n\nvar PatternValidator = /*@__PURE__*/function () {\n  var PatternValidator = /*#__PURE__*/function () {\n    function PatternValidator() {\n      _classCallCheck(this, PatternValidator);\n\n      this._validator = _nullValidator;\n    }\n    /** @nodoc */\n\n\n    _createClass(PatternValidator, [{\n      key: \"ngOnChanges\",\n      value: function ngOnChanges(changes) {\n        if ('pattern' in changes) {\n          this._createValidator();\n\n          if (this._onChange) this._onChange();\n        }\n      }\n      /**\n       * Method that validates whether the value matches the pattern requirement.\n       * @nodoc\n       */\n\n    }, {\n      key: \"validate\",\n      value: function validate(control) {\n        return this._validator(control);\n      }\n      /**\n       * Registers a callback function to call when the validator inputs change.\n       * @nodoc\n       */\n\n    }, {\n      key: \"registerOnValidatorChange\",\n      value: function registerOnValidatorChange(fn) {\n        this._onChange = fn;\n      }\n    }, {\n      key: \"_createValidator\",\n      value: function _createValidator() {\n        this._validator = patternValidator(this.pattern);\n      }\n    }]);\n\n    return PatternValidator;\n  }();\n\n  PatternValidator.ɵfac = function PatternValidator_Factory(t) {\n    return new (t || PatternValidator)();\n  };\n\n  PatternValidator.ɵdir =\n  /*@__PURE__*/\n\n  /*@__PURE__*/\n  ɵngcc0.ɵɵdefineDirective({\n    type: PatternValidator,\n    selectors: [[\"\", \"pattern\", \"\", \"formControlName\", \"\"], [\"\", \"pattern\", \"\", \"formControl\", \"\"], [\"\", \"pattern\", \"\", \"ngModel\", \"\"]],\n    hostVars: 1,\n    hostBindings: function PatternValidator_HostBindings(rf, ctx) {\n      if (rf & 2) {\n        ɵngcc0.ɵɵattribute(\"pattern\", ctx.pattern ? ctx.pattern : null);\n      }\n    },\n    inputs: {\n      pattern: \"pattern\"\n    },\n    features: [/*@__PURE__*/ɵngcc0.ɵɵProvidersFeature([PATTERN_VALIDATOR]), ɵngcc0.ɵɵNgOnChangesFeature]\n  });\n  return PatternValidator;\n}();\n/**\n * @license\n * Copyright Google LLC 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\nvar SHARED_FORM_DIRECTIVES = [ɵNgNoValidate, NgSelectOption, ɵNgSelectMultipleOption, DefaultValueAccessor, NumberValueAccessor, RangeValueAccessor, CheckboxControlValueAccessor, SelectControlValueAccessor, SelectMultipleControlValueAccessor, RadioControlValueAccessor, NgControlStatus, NgControlStatusGroup, RequiredValidator, MinLengthValidator, MaxLengthValidator, PatternValidator, CheckboxRequiredValidator, EmailValidator, MinValidator, MaxValidator];\nvar TEMPLATE_DRIVEN_DIRECTIVES = [NgModel, NgModelGroup, NgForm];\nvar REACTIVE_DRIVEN_DIRECTIVES = [FormControlDirective, FormGroupDirective, FormControlName, FormGroupName, FormArrayName];\n\nvar ɵInternalFormsSharedModule = /*@__PURE__*/function () {\n  var ɵInternalFormsSharedModule = /*#__PURE__*/_createClass(function ɵInternalFormsSharedModule() {\n    _classCallCheck(this, ɵInternalFormsSharedModule);\n  });\n\n  ɵInternalFormsSharedModule.ɵfac = function ɵInternalFormsSharedModule_Factory(t) {\n    return new (t || ɵInternalFormsSharedModule)();\n  };\n\n  ɵInternalFormsSharedModule.ɵmod =\n  /*@__PURE__*/\n\n  /*@__PURE__*/\n  ɵngcc0.ɵɵdefineNgModule({\n    type: ɵInternalFormsSharedModule\n  });\n  ɵInternalFormsSharedModule.ɵinj =\n  /*@__PURE__*/\n\n  /*@__PURE__*/\n  ɵngcc0.ɵɵdefineInjector({\n    imports: [[RadioControlRegistryModule]]\n  });\n  return ɵInternalFormsSharedModule;\n}();\n/*@__PURE__*/\n\n\n(function () {\n  (typeof ngJitMode === \"undefined\" || ngJitMode) && ɵngcc0.ɵɵsetNgModuleScope(ɵInternalFormsSharedModule, {\n    declarations: [ɵNgNoValidate, NgSelectOption, ɵNgSelectMultipleOption, DefaultValueAccessor, NumberValueAccessor, RangeValueAccessor, CheckboxControlValueAccessor, SelectControlValueAccessor, SelectMultipleControlValueAccessor, RadioControlValueAccessor, NgControlStatus, NgControlStatusGroup, RequiredValidator, MinLengthValidator, MaxLengthValidator, PatternValidator, CheckboxRequiredValidator, EmailValidator, MinValidator, MaxValidator],\n    imports: [RadioControlRegistryModule],\n    exports: [ɵNgNoValidate, NgSelectOption, ɵNgSelectMultipleOption, DefaultValueAccessor, NumberValueAccessor, RangeValueAccessor, CheckboxControlValueAccessor, SelectControlValueAccessor, SelectMultipleControlValueAccessor, RadioControlValueAccessor, NgControlStatus, NgControlStatusGroup, RequiredValidator, MinLengthValidator, MaxLengthValidator, PatternValidator, CheckboxRequiredValidator, EmailValidator, MinValidator, MaxValidator]\n  });\n})();\n\nvar FormsModule = /*@__PURE__*/function () {\n  var FormsModule = /*#__PURE__*/_createClass(function FormsModule() {\n    _classCallCheck(this, FormsModule);\n  });\n\n  FormsModule.ɵfac = function FormsModule_Factory(t) {\n    return new (t || FormsModule)();\n  };\n\n  FormsModule.ɵmod =\n  /*@__PURE__*/\n\n  /*@__PURE__*/\n  ɵngcc0.ɵɵdefineNgModule({\n    type: FormsModule\n  });\n  FormsModule.ɵinj =\n  /*@__PURE__*/\n\n  /*@__PURE__*/\n  ɵngcc0.ɵɵdefineInjector({\n    imports: [ɵInternalFormsSharedModule]\n  });\n  return FormsModule;\n}();\n/*@__PURE__*/\n\n\n(function () {\n  (typeof ngJitMode === \"undefined\" || ngJitMode) && ɵngcc0.ɵɵsetNgModuleScope(FormsModule, {\n    declarations: [NgModel, NgModelGroup, NgForm],\n    exports: [ɵInternalFormsSharedModule, NgModel, NgModelGroup, NgForm]\n  });\n})();\n\nvar ReactiveFormsModule = /*@__PURE__*/function () {\n  var ReactiveFormsModule = /*#__PURE__*/function () {\n    function ReactiveFormsModule() {\n      _classCallCheck(this, ReactiveFormsModule);\n    }\n\n    _createClass(ReactiveFormsModule, null, [{\n      key: \"withConfig\",\n      value:\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      function withConfig(opts) {\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    return ReactiveFormsModule;\n  }();\n\n  ReactiveFormsModule.ɵfac = function ReactiveFormsModule_Factory(t) {\n    return new (t || ReactiveFormsModule)();\n  };\n\n  ReactiveFormsModule.ɵmod =\n  /*@__PURE__*/\n\n  /*@__PURE__*/\n  ɵngcc0.ɵɵdefineNgModule({\n    type: ReactiveFormsModule\n  });\n  ReactiveFormsModule.ɵinj =\n  /*@__PURE__*/\n\n  /*@__PURE__*/\n  ɵngcc0.ɵɵdefineInjector({\n    imports: [ɵInternalFormsSharedModule]\n  });\n  return ReactiveFormsModule;\n}();\n/*@__PURE__*/\n\n\n(function () {\n  (typeof ngJitMode === \"undefined\" || ngJitMode) && ɵngcc0.ɵɵsetNgModuleScope(ReactiveFormsModule, {\n    declarations: [FormControlDirective, FormGroupDirective, FormControlName, FormGroupName, FormArrayName],\n    exports: [ɵInternalFormsSharedModule, FormControlDirective, FormGroupDirective, FormControlName, FormGroupName, FormArrayName]\n  });\n})();\n/**\n * @license\n * Copyright Google LLC 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\nfunction isAbstractControlOptions(options) {\n  return options.asyncValidators !== undefined || options.validators !== undefined || options.updateOn !== undefined;\n}\n\nvar FormBuilder = /*@__PURE__*/function () {\n  var FormBuilder = /*#__PURE__*/function () {\n    function FormBuilder() {\n      _classCallCheck(this, FormBuilder);\n    }\n\n    _createClass(FormBuilder, [{\n      key: \"group\",\n      value: function group(controlsConfig) {\n        var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;\n\n        var controls = this._reduceControls(controlsConfig);\n\n        var validators = null;\n        var asyncValidators = null;\n        var updateOn = 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, {\n          asyncValidators: asyncValidators,\n          updateOn: updateOn,\n          validators: 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\" region=\"disabled-control\">\n       * </code-example>\n       */\n\n    }, {\n      key: \"control\",\n      value: function control(formState, validatorOrOpts, asyncValidator) {\n        return new FormControl(formState, validatorOrOpts, asyncValidator);\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\n    }, {\n      key: \"array\",\n      value: function array(controlsConfig, validatorOrOpts, asyncValidator) {\n        var _this43 = this;\n\n        var controls = controlsConfig.map(function (c) {\n          return _this43._createControl(c);\n        });\n        return new FormArray(controls, validatorOrOpts, asyncValidator);\n      }\n      /** @internal */\n\n    }, {\n      key: \"_reduceControls\",\n      value: function _reduceControls(controlsConfig) {\n        var _this44 = this;\n\n        var controls = {};\n        Object.keys(controlsConfig).forEach(function (controlName) {\n          controls[controlName] = _this44._createControl(controlsConfig[controlName]);\n        });\n        return controls;\n      }\n      /** @internal */\n\n    }, {\n      key: \"_createControl\",\n      value: function _createControl(controlConfig) {\n        if (controlConfig instanceof FormControl || controlConfig instanceof FormGroup || controlConfig instanceof FormArray) {\n          return controlConfig;\n        } else if (Array.isArray(controlConfig)) {\n          var value = controlConfig[0];\n          var validator = controlConfig.length > 1 ? controlConfig[1] : null;\n          var asyncValidator = controlConfig.length > 2 ? controlConfig[2] : null;\n          return this.control(value, validator, asyncValidator);\n        } else {\n          return this.control(controlConfig);\n        }\n      }\n    }]);\n\n    return FormBuilder;\n  }();\n\n  FormBuilder.ɵfac = function FormBuilder_Factory(t) {\n    return new (t || FormBuilder)();\n  };\n\n  FormBuilder.ɵprov = /*@__PURE__*/ɵɵdefineInjectable({\n    factory: function FormBuilder_Factory() {\n      return new FormBuilder();\n    },\n    token: FormBuilder,\n    providedIn: ReactiveFormsModule\n  });\n  return FormBuilder;\n}();\n/**\n * @license\n * Copyright Google LLC 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 * @publicApi\n */\n\n\nvar VERSION = /*@__PURE__*/new Version('12.2.16');\n/**\n * @license\n * Copyright Google LLC 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 * @license\n * Copyright Google LLC 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// This file only reexports content of the `src` folder. Keep it that way.\n\n/**\n * @license\n * Copyright Google LLC 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 * Generated bundle index. Do not edit.\n */\n\nexport { AbstractControl, AbstractControlDirective, AbstractFormGroupDirective, COMPOSITION_BUFFER_MODE, CheckboxControlValueAccessor, CheckboxRequiredValidator, ControlContainer, DefaultValueAccessor, EmailValidator, FormArray, FormArrayName, FormBuilder, FormControl, FormControlDirective, FormControlName, FormGroup, FormGroupDirective, FormGroupName, FormsModule, MaxLengthValidator, MaxValidator, MinLengthValidator, MinValidator, NG_ASYNC_VALIDATORS, NG_VALIDATORS, NG_VALUE_ACCESSOR, NgControl, NgControlStatus, NgControlStatusGroup, NgForm, NgModel, NgModelGroup, NgSelectOption, NumberValueAccessor, PatternValidator, RadioControlValueAccessor, RangeValueAccessor, ReactiveFormsModule, RequiredValidator, SelectControlValueAccessor, SelectMultipleControlValueAccessor, VERSION, Validators, ɵInternalFormsSharedModule, ɵNgNoValidate, ɵNgSelectMultipleOption, SHARED_FORM_DIRECTIVES as ɵangular_packages_forms_forms_a, TEMPLATE_DRIVEN_DIRECTIVES as ɵangular_packages_forms_forms_b, SELECT_MULTIPLE_VALUE_ACCESSOR as ɵangular_packages_forms_forms_ba, ɵNgSelectMultipleOption as ɵangular_packages_forms_forms_bb, ɵNgNoValidate as ɵangular_packages_forms_forms_bc, MAX_VALIDATOR as ɵangular_packages_forms_forms_bd, MIN_VALIDATOR as ɵangular_packages_forms_forms_be, REQUIRED_VALIDATOR as ɵangular_packages_forms_forms_bf, CHECKBOX_REQUIRED_VALIDATOR as ɵangular_packages_forms_forms_bg, EMAIL_VALIDATOR as ɵangular_packages_forms_forms_bh, MIN_LENGTH_VALIDATOR as ɵangular_packages_forms_forms_bi, MAX_LENGTH_VALIDATOR as ɵangular_packages_forms_forms_bj, PATTERN_VALIDATOR as ɵangular_packages_forms_forms_bk, minValidator as ɵangular_packages_forms_forms_bl, maxValidator as ɵangular_packages_forms_forms_bm, requiredValidator as ɵangular_packages_forms_forms_bn, requiredTrueValidator as ɵangular_packages_forms_forms_bo, emailValidator as ɵangular_packages_forms_forms_bp, minLengthValidator as ɵangular_packages_forms_forms_bq, maxLengthValidator as ɵangular_packages_forms_forms_br, patternValidator as ɵangular_packages_forms_forms_bs, _nullValidator as ɵangular_packages_forms_forms_bt, REACTIVE_DRIVEN_DIRECTIVES as ɵangular_packages_forms_forms_c, ɵInternalFormsSharedModule as ɵangular_packages_forms_forms_d, CHECKBOX_VALUE_ACCESSOR as ɵangular_packages_forms_forms_e, BaseControlValueAccessor as ɵangular_packages_forms_forms_f, BuiltInControlValueAccessor as ɵangular_packages_forms_forms_g, DEFAULT_VALUE_ACCESSOR as ɵangular_packages_forms_forms_h, AbstractControlStatus as ɵangular_packages_forms_forms_i, ngControlStatusHost as ɵangular_packages_forms_forms_j, ngGroupStatusHost as ɵangular_packages_forms_forms_k, formDirectiveProvider as ɵangular_packages_forms_forms_l, formControlBinding as ɵangular_packages_forms_forms_m, modelGroupProvider as ɵangular_packages_forms_forms_n, NUMBER_VALUE_ACCESSOR as ɵangular_packages_forms_forms_o, RADIO_VALUE_ACCESSOR as ɵangular_packages_forms_forms_p, RadioControlRegistryModule as ɵangular_packages_forms_forms_q, RadioControlRegistry as ɵangular_packages_forms_forms_r, RANGE_VALUE_ACCESSOR as ɵangular_packages_forms_forms_s, NG_MODEL_WITH_FORM_CONTROL_WARNING as ɵangular_packages_forms_forms_t, formControlBinding$1 as ɵangular_packages_forms_forms_u, controlNameBinding as ɵangular_packages_forms_forms_v, formDirectiveProvider$1 as ɵangular_packages_forms_forms_w, formGroupNameProvider as ɵangular_packages_forms_forms_x, formArrayNameProvider as ɵangular_packages_forms_forms_y, SELECT_VALUE_ACCESSOR as ɵangular_packages_forms_forms_z }; //# sourceMappingURL=forms.js.map","map":null,"metadata":{},"sourceType":"module"}