UNPKG

carbon-components-angular

Version:
2 lines 128 kB
/*! For license information please see 7019.b8944046.iframe.bundle.js.LICENSE.txt */ "use strict";(self.webpackChunkcarbon_components_angular=self.webpackChunkcarbon_components_angular||[]).push([[7019],{"./node_modules/@angular/forms/fesm2020/forms.mjs":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{JU:()=>NG_VALUE_ACCESSOR,NI:()=>FormControl,UX:()=>ReactiveFormsModule,cw:()=>FormGroup,kI:()=>Validators,qu:()=>FormBuilder,u5:()=>FormsModule});var _angular_core__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/@angular/core/fesm2020/core.mjs"),_angular_common__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/@angular/common/fesm2020/common.mjs"),rxjs__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/rxjs/dist/esm5/internal/observable/from.js"),rxjs__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./node_modules/rxjs/dist/esm5/internal/observable/forkJoin.js"),rxjs_operators__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./node_modules/rxjs/dist/esm5/internal/operators/map.js");class BaseControlValueAccessor{constructor(_renderer,_elementRef){this._renderer=_renderer,this._elementRef=_elementRef,this.onChange=_=>{},this.onTouched=()=>{}}setProperty(key,value){this._renderer.setProperty(this._elementRef.nativeElement,key,value)}registerOnTouched(fn){this.onTouched=fn}registerOnChange(fn){this.onChange=fn}setDisabledState(isDisabled){this.setProperty("disabled",isDisabled)}}BaseControlValueAccessor.ɵfac=function BaseControlValueAccessor_Factory(t){return new(t||BaseControlValueAccessor)(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_0__.Renderer2),_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_0__.ElementRef))},BaseControlValueAccessor.ɵdir=_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineDirective"]({type:BaseControlValueAccessor}),("undefined"==typeof ngDevMode||ngDevMode)&&_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](BaseControlValueAccessor,[{type:_angular_core__WEBPACK_IMPORTED_MODULE_0__.Directive}],(function(){return[{type:_angular_core__WEBPACK_IMPORTED_MODULE_0__.Renderer2},{type:_angular_core__WEBPACK_IMPORTED_MODULE_0__.ElementRef}]}),null);class BuiltInControlValueAccessor extends BaseControlValueAccessor{}BuiltInControlValueAccessor.ɵfac=function(){let ɵBuiltInControlValueAccessor_BaseFactory;return function BuiltInControlValueAccessor_Factory(t){return(ɵBuiltInControlValueAccessor_BaseFactory||(ɵBuiltInControlValueAccessor_BaseFactory=_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵgetInheritedFactory"](BuiltInControlValueAccessor)))(t||BuiltInControlValueAccessor)}}(),BuiltInControlValueAccessor.ɵdir=_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineDirective"]({type:BuiltInControlValueAccessor,features:[_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵInheritDefinitionFeature"]]}),("undefined"==typeof ngDevMode||ngDevMode)&&_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](BuiltInControlValueAccessor,[{type:_angular_core__WEBPACK_IMPORTED_MODULE_0__.Directive}],null,null);const NG_VALUE_ACCESSOR=new _angular_core__WEBPACK_IMPORTED_MODULE_0__.InjectionToken("NgValueAccessor"),CHECKBOX_VALUE_ACCESSOR={provide:NG_VALUE_ACCESSOR,useExisting:(0,_angular_core__WEBPACK_IMPORTED_MODULE_0__.forwardRef)((()=>CheckboxControlValueAccessor)),multi:!0};class CheckboxControlValueAccessor extends BuiltInControlValueAccessor{writeValue(value){this.setProperty("checked",value)}}CheckboxControlValueAccessor.ɵfac=function(){let ɵCheckboxControlValueAccessor_BaseFactory;return function CheckboxControlValueAccessor_Factory(t){return(ɵCheckboxControlValueAccessor_BaseFactory||(ɵCheckboxControlValueAccessor_BaseFactory=_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵgetInheritedFactory"](CheckboxControlValueAccessor)))(t||CheckboxControlValueAccessor)}}(),CheckboxControlValueAccessor.ɵdir=_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineDirective"]({type:CheckboxControlValueAccessor,selectors:[["input","type","checkbox","formControlName",""],["input","type","checkbox","formControl",""],["input","type","checkbox","ngModel",""]],hostBindings:function CheckboxControlValueAccessor_HostBindings(rf,ctx){1&rf&&_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵlistener"]("change",(function CheckboxControlValueAccessor_change_HostBindingHandler($event){return ctx.onChange($event.target.checked)}))("blur",(function CheckboxControlValueAccessor_blur_HostBindingHandler(){return ctx.onTouched()}))},features:[_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵProvidersFeature"]([CHECKBOX_VALUE_ACCESSOR]),_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵInheritDefinitionFeature"]]}),("undefined"==typeof ngDevMode||ngDevMode)&&_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](CheckboxControlValueAccessor,[{type:_angular_core__WEBPACK_IMPORTED_MODULE_0__.Directive,args:[{selector:"input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]",host:{"(change)":"onChange($event.target.checked)","(blur)":"onTouched()"},providers:[CHECKBOX_VALUE_ACCESSOR]}]}],null,null);const DEFAULT_VALUE_ACCESSOR={provide:NG_VALUE_ACCESSOR,useExisting:(0,_angular_core__WEBPACK_IMPORTED_MODULE_0__.forwardRef)((()=>DefaultValueAccessor)),multi:!0};const COMPOSITION_BUFFER_MODE=new _angular_core__WEBPACK_IMPORTED_MODULE_0__.InjectionToken("CompositionEventMode");class DefaultValueAccessor extends BaseControlValueAccessor{constructor(renderer,elementRef,_compositionMode){super(renderer,elementRef),this._compositionMode=_compositionMode,this._composing=!1,null==this._compositionMode&&(this._compositionMode=!function _isAndroid(){const userAgent=(0,_angular_common__WEBPACK_IMPORTED_MODULE_1__["ɵgetDOM"])()?(0,_angular_common__WEBPACK_IMPORTED_MODULE_1__["ɵgetDOM"])().getUserAgent():"";return/android (\d+)/.test(userAgent.toLowerCase())}())}writeValue(value){const normalizedValue=null==value?"":value;this.setProperty("value",normalizedValue)}_handleInput(value){(!this._compositionMode||this._compositionMode&&!this._composing)&&this.onChange(value)}_compositionStart(){this._composing=!0}_compositionEnd(value){this._composing=!1,this._compositionMode&&this.onChange(value)}}DefaultValueAccessor.ɵfac=function DefaultValueAccessor_Factory(t){return new(t||DefaultValueAccessor)(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_0__.Renderer2),_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_0__.ElementRef),_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](COMPOSITION_BUFFER_MODE,8))},DefaultValueAccessor.ɵdir=_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineDirective"]({type:DefaultValueAccessor,selectors:[["input","formControlName","",3,"type","checkbox"],["textarea","formControlName",""],["input","formControl","",3,"type","checkbox"],["textarea","formControl",""],["input","ngModel","",3,"type","checkbox"],["textarea","ngModel",""],["","ngDefaultControl",""]],hostBindings:function DefaultValueAccessor_HostBindings(rf,ctx){1&rf&&_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵlistener"]("input",(function DefaultValueAccessor_input_HostBindingHandler($event){return ctx._handleInput($event.target.value)}))("blur",(function DefaultValueAccessor_blur_HostBindingHandler(){return ctx.onTouched()}))("compositionstart",(function DefaultValueAccessor_compositionstart_HostBindingHandler(){return ctx._compositionStart()}))("compositionend",(function DefaultValueAccessor_compositionend_HostBindingHandler($event){return ctx._compositionEnd($event.target.value)}))},features:[_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵProvidersFeature"]([DEFAULT_VALUE_ACCESSOR]),_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵInheritDefinitionFeature"]]}),("undefined"==typeof ngDevMode||ngDevMode)&&_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](DefaultValueAccessor,[{type:_angular_core__WEBPACK_IMPORTED_MODULE_0__.Directive,args:[{selector:"input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]",host:{"(input)":"$any(this)._handleInput($event.target.value)","(blur)":"onTouched()","(compositionstart)":"$any(this)._compositionStart()","(compositionend)":"$any(this)._compositionEnd($event.target.value)"},providers:[DEFAULT_VALUE_ACCESSOR]}]}],(function(){return[{type:_angular_core__WEBPACK_IMPORTED_MODULE_0__.Renderer2},{type:_angular_core__WEBPACK_IMPORTED_MODULE_0__.ElementRef},{type:void 0,decorators:[{type:_angular_core__WEBPACK_IMPORTED_MODULE_0__.Optional},{type:_angular_core__WEBPACK_IMPORTED_MODULE_0__.Inject,args:[COMPOSITION_BUFFER_MODE]}]}]}),null);const NG_DEV_MODE$1="undefined"==typeof ngDevMode||!!ngDevMode;function isEmptyInputValue(value){return null==value||("string"==typeof value||Array.isArray(value))&&0===value.length}function hasValidLength(value){return null!=value&&"number"==typeof value.length}const NG_VALIDATORS=new _angular_core__WEBPACK_IMPORTED_MODULE_0__.InjectionToken("NgValidators"),NG_ASYNC_VALIDATORS=new _angular_core__WEBPACK_IMPORTED_MODULE_0__.InjectionToken("NgAsyncValidators"),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])?)*$/;class Validators{static min(min){return minValidator(min)}static max(max){return maxValidator(max)}static required(control){return requiredValidator(control)}static requiredTrue(control){return requiredTrueValidator(control)}static email(control){return emailValidator(control)}static minLength(minLength){return minLengthValidator(minLength)}static maxLength(maxLength){return maxLengthValidator(maxLength)}static pattern(pattern){return patternValidator(pattern)}static nullValidator(control){return null}static compose(validators){return compose(validators)}static composeAsync(validators){return composeAsync(validators)}}function minValidator(min){return control=>{if(isEmptyInputValue(control.value)||isEmptyInputValue(min))return null;const value=parseFloat(control.value);return!isNaN(value)&&value<min?{min:{min,actual:control.value}}:null}}function maxValidator(max){return control=>{if(isEmptyInputValue(control.value)||isEmptyInputValue(max))return null;const value=parseFloat(control.value);return!isNaN(value)&&value>max?{max:{max,actual:control.value}}:null}}function requiredValidator(control){return isEmptyInputValue(control.value)?{required:!0}:null}function requiredTrueValidator(control){return!0===control.value?null:{required:!0}}function emailValidator(control){return isEmptyInputValue(control.value)||EMAIL_REGEXP.test(control.value)?null:{email:!0}}function minLengthValidator(minLength){return control=>isEmptyInputValue(control.value)||!hasValidLength(control.value)?null:control.value.length<minLength?{minlength:{requiredLength:minLength,actualLength:control.value.length}}:null}function maxLengthValidator(maxLength){return control=>hasValidLength(control.value)&&control.value.length>maxLength?{maxlength:{requiredLength:maxLength,actualLength:control.value.length}}:null}function patternValidator(pattern){if(!pattern)return nullValidator;let regex,regexStr;return"string"==typeof pattern?(regexStr="","^"!==pattern.charAt(0)&&(regexStr+="^"),regexStr+=pattern,"$"!==pattern.charAt(pattern.length-1)&&(regexStr+="$"),regex=new RegExp(regexStr)):(regexStr=pattern.toString(),regex=pattern),control=>{if(isEmptyInputValue(control.value))return null;const value=control.value;return regex.test(value)?null:{pattern:{requiredPattern:regexStr,actualValue:value}}}}function nullValidator(control){return null}function isPresent(o){return null!=o}function toObservable(value){const obs=(0,_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵisPromise"])(value)?(0,rxjs__WEBPACK_IMPORTED_MODULE_2__.D)(value):value;if(NG_DEV_MODE$1&&!(0,_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵisObservable"])(obs)){let errorMessage="Expected async validator to return Promise or Observable.";throw"object"==typeof value&&(errorMessage+=" Are you using a synchronous validator where an async validator is expected?"),new _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵRuntimeError"](-1101,errorMessage)}return obs}function mergeErrors(arrayOfErrors){let res={};return arrayOfErrors.forEach((errors=>{res=null!=errors?{...res,...errors}:res})),0===Object.keys(res).length?null:res}function executeValidators(control,validators){return validators.map((validator=>validator(control)))}function normalizeValidators(validators){return validators.map((validator=>function isValidatorFn(validator){return!validator.validate}(validator)?validator:c=>validator.validate(c)))}function compose(validators){if(!validators)return null;const presentValidators=validators.filter(isPresent);return 0==presentValidators.length?null:function(control){return mergeErrors(executeValidators(control,presentValidators))}}function composeValidators(validators){return null!=validators?compose(normalizeValidators(validators)):null}function composeAsync(validators){if(!validators)return null;const presentValidators=validators.filter(isPresent);return 0==presentValidators.length?null:function(control){const observables=executeValidators(control,presentValidators).map(toObservable);return(0,rxjs__WEBPACK_IMPORTED_MODULE_3__.D)(observables).pipe((0,rxjs_operators__WEBPACK_IMPORTED_MODULE_4__.U)(mergeErrors))}}function composeAsyncValidators(validators){return null!=validators?composeAsync(normalizeValidators(validators)):null}function mergeValidators(controlValidators,dirValidator){return null===controlValidators?[dirValidator]:Array.isArray(controlValidators)?[...controlValidators,dirValidator]:[controlValidators,dirValidator]}function getControlValidators(control){return control._rawValidators}function getControlAsyncValidators(control){return control._rawAsyncValidators}function makeValidatorsArray(validators){return validators?Array.isArray(validators)?validators:[validators]:[]}function hasValidator(validators,validator){return Array.isArray(validators)?validators.includes(validator):validators===validator}function addValidators(validators,currentValidators){const current=makeValidatorsArray(currentValidators);return makeValidatorsArray(validators).forEach((v=>{hasValidator(current,v)||current.push(v)})),current}function removeValidators(validators,currentValidators){return makeValidatorsArray(currentValidators).filter((v=>!hasValidator(validators,v)))}class AbstractControlDirective{constructor(){this._rawValidators=[],this._rawAsyncValidators=[],this._onDestroyCallbacks=[]}get value(){return this.control?this.control.value:null}get valid(){return this.control?this.control.valid:null}get invalid(){return this.control?this.control.invalid:null}get pending(){return this.control?this.control.pending:null}get disabled(){return this.control?this.control.disabled:null}get enabled(){return this.control?this.control.enabled:null}get errors(){return this.control?this.control.errors:null}get pristine(){return this.control?this.control.pristine:null}get dirty(){return this.control?this.control.dirty:null}get touched(){return this.control?this.control.touched:null}get status(){return this.control?this.control.status:null}get untouched(){return this.control?this.control.untouched:null}get statusChanges(){return this.control?this.control.statusChanges:null}get valueChanges(){return this.control?this.control.valueChanges:null}get path(){return null}_setValidators(validators){this._rawValidators=validators||[],this._composedValidatorFn=composeValidators(this._rawValidators)}_setAsyncValidators(validators){this._rawAsyncValidators=validators||[],this._composedAsyncValidatorFn=composeAsyncValidators(this._rawAsyncValidators)}get validator(){return this._composedValidatorFn||null}get asyncValidator(){return this._composedAsyncValidatorFn||null}_registerOnDestroy(fn){this._onDestroyCallbacks.push(fn)}_invokeOnDestroyCallbacks(){this._onDestroyCallbacks.forEach((fn=>fn())),this._onDestroyCallbacks=[]}reset(value){this.control&&this.control.reset(value)}hasError(errorCode,path){return!!this.control&&this.control.hasError(errorCode,path)}getError(errorCode,path){return this.control?this.control.getError(errorCode,path):null}}class ControlContainer extends AbstractControlDirective{get formDirective(){return null}get path(){return null}}class NgControl extends AbstractControlDirective{constructor(){super(...arguments),this._parent=null,this.name=null,this.valueAccessor=null}}class AbstractControlStatus{constructor(cd){this._cd=cd}get isTouched(){return!!this._cd?.control?.touched}get isUntouched(){return!!this._cd?.control?.untouched}get isPristine(){return!!this._cd?.control?.pristine}get isDirty(){return!!this._cd?.control?.dirty}get isValid(){return!!this._cd?.control?.valid}get isInvalid(){return!!this._cd?.control?.invalid}get isPending(){return!!this._cd?.control?.pending}get isSubmitted(){return!!this._cd?.submitted}}const ngControlStatusHost={"[class.ng-untouched]":"isUntouched","[class.ng-touched]":"isTouched","[class.ng-pristine]":"isPristine","[class.ng-dirty]":"isDirty","[class.ng-valid]":"isValid","[class.ng-invalid]":"isInvalid","[class.ng-pending]":"isPending"},ngGroupStatusHost={...ngControlStatusHost,"[class.ng-submitted]":"isSubmitted"};class NgControlStatus extends AbstractControlStatus{constructor(cd){super(cd)}}NgControlStatus.ɵfac=function NgControlStatus_Factory(t){return new(t||NgControlStatus)(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](NgControl,2))},NgControlStatus.ɵdir=_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineDirective"]({type:NgControlStatus,selectors:[["","formControlName",""],["","ngModel",""],["","formControl",""]],hostVars:14,hostBindings:function NgControlStatus_HostBindings(rf,ctx){2&rf&&_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵclassProp"]("ng-untouched",ctx.isUntouched)("ng-touched",ctx.isTouched)("ng-pristine",ctx.isPristine)("ng-dirty",ctx.isDirty)("ng-valid",ctx.isValid)("ng-invalid",ctx.isInvalid)("ng-pending",ctx.isPending)},features:[_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵInheritDefinitionFeature"]]}),("undefined"==typeof ngDevMode||ngDevMode)&&_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](NgControlStatus,[{type:_angular_core__WEBPACK_IMPORTED_MODULE_0__.Directive,args:[{selector:"[formControlName],[ngModel],[formControl]",host:ngControlStatusHost}]}],(function(){return[{type:NgControl,decorators:[{type:_angular_core__WEBPACK_IMPORTED_MODULE_0__.Self}]}]}),null);class NgControlStatusGroup extends AbstractControlStatus{constructor(cd){super(cd)}}NgControlStatusGroup.ɵfac=function NgControlStatusGroup_Factory(t){return new(t||NgControlStatusGroup)(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](ControlContainer,10))},NgControlStatusGroup.ɵdir=_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineDirective"]({type:NgControlStatusGroup,selectors:[["","formGroupName",""],["","formArrayName",""],["","ngModelGroup",""],["","formGroup",""],["form",3,"ngNoForm",""],["","ngForm",""]],hostVars:16,hostBindings:function NgControlStatusGroup_HostBindings(rf,ctx){2&rf&&_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵclassProp"]("ng-untouched",ctx.isUntouched)("ng-touched",ctx.isTouched)("ng-pristine",ctx.isPristine)("ng-dirty",ctx.isDirty)("ng-valid",ctx.isValid)("ng-invalid",ctx.isInvalid)("ng-pending",ctx.isPending)("ng-submitted",ctx.isSubmitted)},features:[_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵInheritDefinitionFeature"]]}),("undefined"==typeof ngDevMode||ngDevMode)&&_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](NgControlStatusGroup,[{type:_angular_core__WEBPACK_IMPORTED_MODULE_0__.Directive,args:[{selector:"[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]",host:ngGroupStatusHost}]}],(function(){return[{type:ControlContainer,decorators:[{type:_angular_core__WEBPACK_IMPORTED_MODULE_0__.Optional},{type:_angular_core__WEBPACK_IMPORTED_MODULE_0__.Self}]}]}),null);const 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 });',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 });',ngModelGroupExample='\n <form>\n <div ngModelGroup="person">\n <input [(ngModel)]="person.name" name="firstName">\n </div>\n </form>';const 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 // Specify the `disabled` property at control creation time:\n form = new FormGroup({\n first: new FormControl({value: 'Nancy', disabled: true}, Validators.required),\n last: new FormControl('Drew', Validators.required)\n });\n\n // Controls can also be enabled/disabled after creation:\n form.get('first')?.enable();\n form.get('last')?.disable();\n";function describeKey(isFormGroup,key){return isFormGroup?`with name: '${key}'`:`at index: ${key}`}const NG_DEV_MODE="undefined"==typeof ngDevMode||!!ngDevMode;function pickValidators(validatorOrOpts){return(isOptionsObj(validatorOrOpts)?validatorOrOpts.validators:validatorOrOpts)||null}function coerceToValidator(validator){return Array.isArray(validator)?composeValidators(validator):validator||null}function pickAsyncValidators(asyncValidator,validatorOrOpts){return("undefined"==typeof ngDevMode||ngDevMode)&&isOptionsObj(validatorOrOpts)&&asyncValidator&&console.warn("\n It looks like you're constructing using a FormControl with both an options argument and an\n async validators argument. Mixing these arguments will cause your async validators to be dropped.\n You should either put all your validators in the options object, or in separate validators\n arguments. For example:\n\n // Using validators arguments\n fc = new FormControl(42, Validators.required, myAsyncValidator);\n\n // Using AbstractControlOptions\n fc = new FormControl(42, {validators: Validators.required, asyncValidators: myAV});\n\n // Do NOT mix them: async validators will be dropped!\n fc = new FormControl(42, {validators: Validators.required}, /* Oops! */ myAsyncValidator);\n"),(isOptionsObj(validatorOrOpts)?validatorOrOpts.asyncValidators:asyncValidator)||null}function coerceToAsyncValidator(asyncValidator){return Array.isArray(asyncValidator)?composeAsyncValidators(asyncValidator):asyncValidator||null}function isOptionsObj(validatorOrOpts){return null!=validatorOrOpts&&!Array.isArray(validatorOrOpts)&&"object"==typeof validatorOrOpts}function assertControlPresent(parent,isGroup,key){const controls=parent.controls;if(!(isGroup?Object.keys(controls):controls).length)throw new _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵRuntimeError"](1e3,NG_DEV_MODE?function noControlsError(isFormGroup){return`\n There are no form controls registered with this ${isFormGroup?"group":"array"} yet. If you're using ngModel,\n you may want to check next tick (e.g. use setTimeout).\n `}(isGroup):"");if(!controls[key])throw new _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵRuntimeError"](1001,NG_DEV_MODE?function missingControlError(isFormGroup,key){return`Cannot find form control ${describeKey(isFormGroup,key)}`}(isGroup,key):"")}function assertAllValuesPresent(control,isGroup,value){control._forEachChild(((_,key)=>{if(void 0===value[key])throw new _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵRuntimeError"](1002,NG_DEV_MODE?function missingControlValueError(isFormGroup,key){return`Must supply a value for form control ${describeKey(isFormGroup,key)}`}(isGroup,key):"")}))}class AbstractControl{constructor(validators,asyncValidators){this._pendingDirty=!1,this._hasOwnPendingAsyncValidator=!1,this._pendingTouched=!1,this._onCollectionChange=()=>{},this._parent=null,this.pristine=!0,this.touched=!1,this._onDisabledChange=[],this._rawValidators=validators,this._rawAsyncValidators=asyncValidators,this._composedValidatorFn=coerceToValidator(this._rawValidators),this._composedAsyncValidatorFn=coerceToAsyncValidator(this._rawAsyncValidators)}get validator(){return this._composedValidatorFn}set validator(validatorFn){this._rawValidators=this._composedValidatorFn=validatorFn}get asyncValidator(){return this._composedAsyncValidatorFn}set asyncValidator(asyncValidatorFn){this._rawAsyncValidators=this._composedAsyncValidatorFn=asyncValidatorFn}get parent(){return this._parent}get valid(){return"VALID"===this.status}get invalid(){return"INVALID"===this.status}get pending(){return"PENDING"==this.status}get disabled(){return"DISABLED"===this.status}get enabled(){return"DISABLED"!==this.status}get dirty(){return!this.pristine}get untouched(){return!this.touched}get updateOn(){return this._updateOn?this._updateOn:this.parent?this.parent.updateOn:"change"}setValidators(validators){this._rawValidators=validators,this._composedValidatorFn=coerceToValidator(validators)}setAsyncValidators(validators){this._rawAsyncValidators=validators,this._composedAsyncValidatorFn=coerceToAsyncValidator(validators)}addValidators(validators){this.setValidators(addValidators(validators,this._rawValidators))}addAsyncValidators(validators){this.setAsyncValidators(addValidators(validators,this._rawAsyncValidators))}removeValidators(validators){this.setValidators(removeValidators(validators,this._rawValidators))}removeAsyncValidators(validators){this.setAsyncValidators(removeValidators(validators,this._rawAsyncValidators))}hasValidator(validator){return hasValidator(this._rawValidators,validator)}hasAsyncValidator(validator){return hasValidator(this._rawAsyncValidators,validator)}clearValidators(){this.validator=null}clearAsyncValidators(){this.asyncValidator=null}markAsTouched(opts={}){this.touched=!0,this._parent&&!opts.onlySelf&&this._parent.markAsTouched(opts)}markAllAsTouched(){this.markAsTouched({onlySelf:!0}),this._forEachChild((control=>control.markAllAsTouched()))}markAsUntouched(opts={}){this.touched=!1,this._pendingTouched=!1,this._forEachChild((control=>{control.markAsUntouched({onlySelf:!0})})),this._parent&&!opts.onlySelf&&this._parent._updateTouched(opts)}markAsDirty(opts={}){this.pristine=!1,this._parent&&!opts.onlySelf&&this._parent.markAsDirty(opts)}markAsPristine(opts={}){this.pristine=!0,this._pendingDirty=!1,this._forEachChild((control=>{control.markAsPristine({onlySelf:!0})})),this._parent&&!opts.onlySelf&&this._parent._updatePristine(opts)}markAsPending(opts={}){this.status="PENDING",!1!==opts.emitEvent&&this.statusChanges.emit(this.status),this._parent&&!opts.onlySelf&&this._parent.markAsPending(opts)}disable(opts={}){const skipPristineCheck=this._parentMarkedDirty(opts.onlySelf);this.status="DISABLED",this.errors=null,this._forEachChild((control=>{control.disable({...opts,onlySelf:!0})})),this._updateValue(),!1!==opts.emitEvent&&(this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._updateAncestors({...opts,skipPristineCheck}),this._onDisabledChange.forEach((changeFn=>changeFn(!0)))}enable(opts={}){const skipPristineCheck=this._parentMarkedDirty(opts.onlySelf);this.status="VALID",this._forEachChild((control=>{control.enable({...opts,onlySelf:!0})})),this.updateValueAndValidity({onlySelf:!0,emitEvent:opts.emitEvent}),this._updateAncestors({...opts,skipPristineCheck}),this._onDisabledChange.forEach((changeFn=>changeFn(!1)))}_updateAncestors(opts){this._parent&&!opts.onlySelf&&(this._parent.updateValueAndValidity(opts),opts.skipPristineCheck||this._parent._updatePristine(),this._parent._updateTouched())}setParent(parent){this._parent=parent}getRawValue(){return this.value}updateValueAndValidity(opts={}){this._setInitialStatus(),this._updateValue(),this.enabled&&(this._cancelExistingSubscription(),this.errors=this._runValidator(),this.status=this._calculateStatus(),"VALID"!==this.status&&"PENDING"!==this.status||this._runAsyncValidator(opts.emitEvent)),!1!==opts.emitEvent&&(this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._parent&&!opts.onlySelf&&this._parent.updateValueAndValidity(opts)}_updateTreeValidity(opts={emitEvent:!0}){this._forEachChild((ctrl=>ctrl._updateTreeValidity(opts))),this.updateValueAndValidity({onlySelf:!0,emitEvent:opts.emitEvent})}_setInitialStatus(){this.status=this._allControlsDisabled()?"DISABLED":"VALID"}_runValidator(){return this.validator?this.validator(this):null}_runAsyncValidator(emitEvent){if(this.asyncValidator){this.status="PENDING",this._hasOwnPendingAsyncValidator=!0;const obs=toObservable(this.asyncValidator(this));this._asyncValidationSubscription=obs.subscribe((errors=>{this._hasOwnPendingAsyncValidator=!1,this.setErrors(errors,{emitEvent})}))}}_cancelExistingSubscription(){this._asyncValidationSubscription&&(this._asyncValidationSubscription.unsubscribe(),this._hasOwnPendingAsyncValidator=!1)}setErrors(errors,opts={}){this.errors=errors,this._updateControlsErrors(!1!==opts.emitEvent)}get(path){let currPath=path;return null==currPath?null:(Array.isArray(currPath)||(currPath=currPath.split(".")),0===currPath.length?null:currPath.reduce(((control,name)=>control&&control._find(name)),this))}getError(errorCode,path){const control=path?this.get(path):this;return control&&control.errors?control.errors[errorCode]:null}hasError(errorCode,path){return!!this.getError(errorCode,path)}get root(){let x=this;for(;x._parent;)x=x._parent;return x}_updateControlsErrors(emitEvent){this.status=this._calculateStatus(),emitEvent&&this.statusChanges.emit(this.status),this._parent&&this._parent._updateControlsErrors(emitEvent)}_initObservables(){this.valueChanges=new _angular_core__WEBPACK_IMPORTED_MODULE_0__.EventEmitter,this.statusChanges=new _angular_core__WEBPACK_IMPORTED_MODULE_0__.EventEmitter}_calculateStatus(){return this._allControlsDisabled()?"DISABLED":this.errors?"INVALID":this._hasOwnPendingAsyncValidator||this._anyControlsHaveStatus("PENDING")?"PENDING":this._anyControlsHaveStatus("INVALID")?"INVALID":"VALID"}_anyControlsHaveStatus(status){return this._anyControls((control=>control.status===status))}_anyControlsDirty(){return this._anyControls((control=>control.dirty))}_anyControlsTouched(){return this._anyControls((control=>control.touched))}_updatePristine(opts={}){this.pristine=!this._anyControlsDirty(),this._parent&&!opts.onlySelf&&this._parent._updatePristine(opts)}_updateTouched(opts={}){this.touched=this._anyControlsTouched(),this._parent&&!opts.onlySelf&&this._parent._updateTouched(opts)}_registerOnCollectionChange(fn){this._onCollectionChange=fn}_setUpdateStrategy(opts){isOptionsObj(opts)&&null!=opts.updateOn&&(this._updateOn=opts.updateOn)}_parentMarkedDirty(onlySelf){const parentDirty=this._parent&&this._parent.dirty;return!onlySelf&&!!parentDirty&&!this._parent._anyControlsDirty()}_find(name){return null}}class FormGroup extends AbstractControl{constructor(controls,validatorOrOpts,asyncValidator){super(pickValidators(validatorOrOpts),pickAsyncValidators(asyncValidator,validatorOrOpts)),this.controls=controls,this._initObservables(),this._setUpdateStrategy(validatorOrOpts),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator})}registerControl(name,control){return this.controls[name]?this.controls[name]:(this.controls[name]=control,control.setParent(this),control._registerOnCollectionChange(this._onCollectionChange),control)}addControl(name,control,options={}){this.registerControl(name,control),this.updateValueAndValidity({emitEvent:options.emitEvent}),this._onCollectionChange()}removeControl(name,options={}){this.controls[name]&&this.controls[name]._registerOnCollectionChange((()=>{})),delete this.controls[name],this.updateValueAndValidity({emitEvent:options.emitEvent}),this._onCollectionChange()}setControl(name,control,options={}){this.controls[name]&&this.controls[name]._registerOnCollectionChange((()=>{})),delete this.controls[name],control&&this.registerControl(name,control),this.updateValueAndValidity({emitEvent:options.emitEvent}),this._onCollectionChange()}contains(controlName){return this.controls.hasOwnProperty(controlName)&&this.controls[controlName].enabled}setValue(value,options={}){assertAllValuesPresent(this,!0,value),Object.keys(value).forEach((name=>{assertControlPresent(this,!0,name),this.controls[name].setValue(value[name],{onlySelf:!0,emitEvent:options.emitEvent})})),this.updateValueAndValidity(options)}patchValue(value,options={}){null!=value&&(Object.keys(value).forEach((name=>{const control=this.controls[name];control&&control.patchValue(value[name],{onlySelf:!0,emitEvent:options.emitEvent})})),this.updateValueAndValidity(options))}reset(value={},options={}){this._forEachChild(((control,name)=>{control.reset(value[name],{onlySelf:!0,emitEvent:options.emitEvent})})),this._updatePristine(options),this._updateTouched(options),this.updateValueAndValidity(options)}getRawValue(){return this._reduceChildren({},((acc,control,name)=>(acc[name]=control.getRawValue(),acc)))}_syncPendingControls(){let subtreeUpdated=this._reduceChildren(!1,((updated,child)=>!!child._syncPendingControls()||updated));return subtreeUpdated&&this.updateValueAndValidity({onlySelf:!0}),subtreeUpdated}_forEachChild(cb){Object.keys(this.controls).forEach((key=>{const control=this.controls[key];control&&cb(control,key)}))}_setUpControls(){this._forEachChild((control=>{control.setParent(this),control._registerOnCollectionChange(this._onCollectionChange)}))}_updateValue(){this.value=this._reduceValue()}_anyControls(condition){for(const[controlName,control]of Object.entries(this.controls))if(this.contains(controlName)&&condition(control))return!0;return!1}_reduceValue(){return this._reduceChildren({},((acc,control,name)=>((control.enabled||this.disabled)&&(acc[name]=control.value),acc)))}_reduceChildren(initValue,fn){let res=initValue;return this._forEachChild(((control,name)=>{res=fn(res,control,name)})),res}_allControlsDisabled(){for(const controlName of Object.keys(this.controls))if(this.controls[controlName].enabled)return!1;return Object.keys(this.controls).length>0||this.disabled}_find(name){return this.controls.hasOwnProperty(name)?this.controls[name]:null}}class FormRecord extends FormGroup{}function controlPath(name,parent){return[...parent.path,name]}function setUpControl(control,dir){("undefined"==typeof ngDevMode||ngDevMode)&&(control||_throwError(dir,"Cannot find control with"),dir.valueAccessor||_throwError(dir,"No value accessor for form control with")),setUpValidators(control,dir),dir.valueAccessor.writeValue(control.value),control.disabled&&dir.valueAccessor.setDisabledState?.(!0),function setUpViewChangePipeline(control,dir){dir.valueAccessor.registerOnChange((newValue=>{control._pendingValue=newValue,control._pendingChange=!0,control._pendingDirty=!0,"change"===control.updateOn&&updateControl(control,dir)}))}(control,dir),function setUpModelChangePipeline(control,dir){const onChange=(newValue,emitModelEvent)=>{dir.valueAccessor.writeValue(newValue),emitModelEvent&&dir.viewToModelUpdate(newValue)};control.registerOnChange(onChange),dir._registerOnDestroy((()=>{control._unregisterOnChange(onChange)}))}(control,dir),function setUpBlurPipeline(control,dir){dir.valueAccessor.registerOnTouched((()=>{control._pendingTouched=!0,"blur"===control.updateOn&&control._pendingChange&&updateControl(control,dir),"submit"!==control.updateOn&&control.markAsTouched()}))}(control,dir),function setUpDisabledChangeHandler(control,dir){if(dir.valueAccessor.setDisabledState){const onDisabledChange=isDisabled=>{dir.valueAccessor.setDisabledState(isDisabled)};control.registerOnDisabledChange(onDisabledChange),dir._registerOnDestroy((()=>{control._unregisterOnDisabledChange(onDisabledChange)}))}}(control,dir)}function cleanUpControl(control,dir,validateControlPresenceOnChange=!0){const noop=()=>{validateControlPresenceOnChange&&("undefined"==typeof ngDevMode||ngDevMode)&&function _noControlError(dir){return _throwError(dir,"There is no FormControl instance attached to form control element with")}(dir)};dir.valueAccessor&&(dir.valueAccessor.registerOnChange(noop),dir.valueAccessor.registerOnTouched(noop)),cleanUpValidators(control,dir),control&&(dir._invokeOnDestroyCallbacks(),control._registerOnCollectionChange((()=>{})))}function registerOnValidatorChange(validators,onChange){validators.forEach((validator=>{validator.registerOnValidatorChange&&validator.registerOnValidatorChange(onChange)}))}function setUpValidators(control,dir){const validators=getControlValidators(control);null!==dir.validator?control.setValidators(mergeValidators(validators,dir.validator)):"function"==typeof validators&&control.setValidators([validators]);const asyncValidators=getControlAsyncValidators(control);null!==dir.asyncValidator?control.setAsyncValidators(mergeValidators(asyncValidators,dir.asyncValidator)):"function"==typeof asyncValidators&&control.setAsyncValidators([asyncValidators]);const onValidatorChange=()=>control.updateValueAndValidity();registerOnValidatorChange(dir._rawValidators,onValidatorChange),registerOnValidatorChange(dir._rawAsyncValidators,onValidatorChange)}function cleanUpValidators(control,dir){let isControlUpdated=!1;if(null!==control){if(null!==dir.validator){const validators=getControlValidators(control);if(Array.isArray(validators)&&validators.length>0){const updatedValidators=validators.filter((validator=>validator!==dir.validator));updatedValidators.length!==validators.length&&(isControlUpdated=!0,control.setValidators(updatedValidators))}}if(null!==dir.asyncValidator){const asyncValidators=getControlAsyncValidators(control);if(Array.isArray(asyncValidators)&&asyncValidators.length>0){const updatedAsyncValidators=asyncValidators.filter((asyncValidator=>asyncValidator!==dir.asyncValidator));updatedAsyncValidators.length!==asyncValidators.length&&(isControlUpdated=!0,control.setAsyncValidators(updatedAsyncValidators))}}}const noop=()=>{};return registerOnValidatorChange(dir._rawValidators,noop),registerOnValidatorChange(dir._rawAsyncValidators,noop),isControlUpdated}function updateControl(control,dir){control._pendingDirty&&control.markAsDirty(),control.setValue(control._pendingValue,{emitModelToViewChange:!1}),dir.viewToModelUpdate(control._pendingValue),control._pendingChange=!1}function setUpFormContainer(control,dir){null!=control||"undefined"!=typeof ngDevMode&&!ngDevMode||_throwError(dir,"Cannot find control with"),setUpValidators(control,dir)}function _throwError(dir,message){const messageEnd=_describeControlLocation(dir);throw new Error(`${message} ${messageEnd}`)}function _describeControlLocation(dir){const path=dir.path;return path&&path.length>1?`path: '${path.join(" -> ")}'`:path?.[0]?`name: '${path}'`:"unspecified name attribute"}function isPropertyUpdated(changes,viewModel){if(!changes.hasOwnProperty("model"))return!1;const change=changes.model;return!!change.isFirstChange()||!Object.is(viewModel,change.currentValue)}function syncPendingControls(form,directives){form._syncPendingControls(),directives.forEach((dir=>{const control=dir.control;"submit"===control.updateOn&&control._pendingChange&&(dir.viewToModelUpdate(control._pendingValue),control._pendingChange=!1)}))}function selectValueAccessor(dir,valueAccessors){if(!valueAccessors)return null;let defaultAccessor,builtinAccessor,customAccessor;return Array.isArray(valueAccessors)||"undefined"!=typeof ngDevMode&&!ngDevMode||function _throwInvalidValueAccessorError(dir){const loc=_describeControlLocation(dir);throw new _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵRuntimeError"](1200,`Value accessor was not provided as an array for form control with ${loc}. Check that the \`NG_VALUE_ACCESSOR\` token is configured as a \`multi: true\` provider.`)}(dir),valueAccessors.forEach((v=>{v.constructor===DefaultValueAccessor?defaultAccessor=v:!function isBuiltInAccessor(valueAccessor){return Object.getPrototypeOf(valueAccessor.constructor)===BuiltInControlValueAccessor}(v)?(customAccessor&&("undefined"==typeof ngDevMode||ngDevMode)&&_throwError(dir,"More than one custom value accessor matches form control with"),customAccessor=v):(builtinAccessor&&("undefined"==typeof ngDevMode||ngDevMode)&&_throwError(dir,"More than one built-in value accessor matches form control with"),builtinAccessor=v)})),customAccessor||(builtinAccessor||(defaultAccessor||(("undefined"==typeof ngDevMode||ngDevMode)&&_throwError(dir,"No valid value accessor for form control with"),null)))}function _ngModelWarning(name,type,instance,warningConfig){"never"!==warningConfig&&((null!==warningConfig&&"once"!==warningConfig||type._ngModelWarningSentOnce)&&("always"!==warningConfig||instance._ngModelWarningSent)||(console.warn(function ngModelWarning(directiveName){return`\n It looks like you're using ngModel on the same form field as ${directiveName}.\n Support for using the ngModel input property and ngModelChange event with\n reactive form directives has been deprecated in Angular v6 and will be removed\n in a future version of Angular.\n\n For more information on this, see our API docs here:\n https://angular.io/api/forms/${"formControl"===directiveName?"FormControlDirective":"FormControlName"}#use-with-ngmodel\n `}(name)),type._ngModelWarningSentOnce=!0,instance._ngModelWarningSent=!0))}const formDirectiveProvider$1={provide:ControlContainer,useExisting:(0,_angular_core__WEBPACK_IMPORTED_MODULE_0__.forwardRef)((()=>NgForm))},resolvedPromise$1=Promise.resolve();class NgForm extends ControlContainer{constructor(validators,asyncValidators){super(),this.submitted=!1,this._directives=new Set,this.ngSubmit=new _angular_core__WEBPACK_IMPORTED_MODULE_0__.EventEmitter,this.form=new FormGroup({},composeValidators(validators),composeAsyncValidators(asyncValidators))}ngAfterViewInit(){this._setUpdateStrategy()}get formDirective(){return this}get control(){return this.form}get path(){return[]}get controls(){return this.form.controls}addControl(dir){resolvedPromise$1.then((()=>{const container=this._findContainer(dir.path);dir.control=container.registerControl(dir.name,dir.control),setUpControl(dir.control,dir),dir.control.updateValueAndValidity({emitEvent:!1}),this._directives.add(dir)}))}getControl(dir){return this.form.get(dir.path)}removeControl(dir){resolvedPromise$1.then((()=>{const container=this._findContainer(dir.path);container&&container.removeControl(dir.name),this._directives.delete(dir)}))}addFormGroup(dir){resolvedPromise$1.then((()=>{const container=this._findContainer(dir.path),group=new FormGroup({});setUpFormContainer(group,dir),container.registerControl(dir.name,group),group.updateValueAndValidity({emitEvent:!1})}))}removeFormGroup(dir){resolvedPromise$1.then((()=>{const container=this._findContainer(dir.path);container&&container.removeControl(dir.name)}))}getFormGroup(dir){return this.form.get(dir.path)}updateModel(dir,value){resolvedPromise$1.then((()=>{this.form.get(dir.path).setValue(value)}))}setValue(value){this.control.setValue(value)}onSubmit($event){return this.submitted=!0,syncPendingControls(this.form,this._directives),this.ngSubmit.emit($event),"dialog"===$event?.target?.method}onReset(){this.resetForm()}resetForm(value){this.form.reset(value),this.submitted=!1}_setUpdateStrategy(){this.options&&null!=this.options.updateOn&&(this.form._updateOn=this.options.updateOn)}_findContainer(path){return path.pop(),path.length?this.form.get(path):this.form}}function removeListItem(list,el){const index=list.indexOf(el);index>-1&&list.splice(index,1)}function isFormControlState(formState){return"object"==typeof formState&&null!==formState&&2===Object.keys(formState).length&&"value"in formState&&"disabled"in formState}NgForm.ɵfac=function NgForm_Factory(t){return new(t||NgForm)(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](NG_VALIDATORS,10),_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](NG_ASYNC_VALIDATORS,10))},NgForm.ɵdir=_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineDirective"]({type:NgForm,selectors:[["form",3,"ngNoForm","",3,"formGroup",""],["ng-form"],["","ngForm",""]],hostBindings:function NgForm_HostBindings(rf,ctx){1&rf&&_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵlistener"]("submit",(function NgForm_submit_HostBindingHandler($event){return ctx.onSubmit($event)}))("reset",(function NgForm_reset_HostBindingHandler(){return ctx.onReset()}))},inputs:{options:["ngFormOptions","options"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],features:[_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵProvidersFeature"]([formDirectiveProvider$1]),_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵInheritDefinitionFeature"]]}),("undefined"==typeof ngDevMode||ngDevMode)&&_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](NgForm,[{type:_angular_core__WEBPACK_IMPORTED_MODULE_0__.Directive,args:[{selector:"form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]",providers:[formDirectiveProvider$1],host:{"(submit)":"onSubmit($event)","(reset)":"onReset()"},outputs:["ngSubmit"],exportAs:"ngForm"}]}],(function(){return[{type:void 0,decorators:[{type:_angular_core__WEBPACK_IMPORTED_MODULE_0__.Optional},{type:_angular_core__WEBPACK_IMPORTED_MODULE_0__.Self},{type:_angular_core__WEBPACK_IMPORTED_MODULE_0__.Inject,args:[NG_VALIDATORS]}]},{type:void 0,decorators:[{type:_angular_core__WEBPACK_IMPORTED_MODULE_0__.Optional},{type:_angular_core__WEBPACK_IMPORTED_MODULE_0__.Self},{type:_angular_core__WEBPACK_IMPORTED_MODULE_0__.Inject,args:[NG_ASYNC_VALIDATORS]}]}]}),{options:[{type:_angular_core__WEBPACK_IMPORTED_MODULE_0__.Input,args:["ngFormOptions"]}]});const FormControl=class FormControl extends AbstractControl{constructor(formState=null,validatorOrOpts,asyncValidator){super(pickValidators(validatorOrOpts),pickAsyncValidators(asyncValidator,validatorOrOpts)),this.defaultValue=null,this._onChange=[],this._pendingChange=!1,this._applyFormState(formState),this._setUpdateStrategy(validatorOrOpts),this._initObservables(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator}),isOptionsObj(validatorOrOpts)&&(validatorOrOpts.nonNullable||validatorOrOpts.initialValueIsDefault)&&(isFormControlState(formState)?this.defaultValue=formState.value:this.defaultValue=formState)}setValue(value,options={}){this.value=this._pendingValue=value,this._onChange.length&&!1!==options.emitModelToViewChange&&this._onChange.forEach((changeFn=>changeFn(this.value,!1!==options.emitViewToModelChange))),this.updateValueAndValidity(options)}patchValue(value,options={}){this.setValue(value,options)}reset(formState=this.defaultValue,options={}){this._applyFormState(formState),this.markAsPristine(options),this.markAsUntouched(options),this.setValue(this.value,options),this._pendingChange=!1}_updateValue(){}_anyControls(condition){return!1}_allControlsDisabled(){return this.disabled}registerOnChange(fn){this._onChange.push(fn)}_unregisterOnChange(fn){removeListItem(this._onChange,fn)}registerOnDisabledChange(fn){this._onDisabledChange.push(fn)}_unregisterOnDisabledChange(fn){removeListItem(this._onDisabledChange,fn)}_forEachChild(cb){}_syncPendingControls(){return!("submit"!==this.updateOn||(this._pendingDirty&&this.markAsDirty(),this._pendingTouched&&this.markAsTouched(),!this._pendingChange))&&(this.setValue(this._pendingValue,{onlySelf:!0,emitModelToViewChange:!1}),!0)}_applyFormState(formState){isFormControlState(formState)?(this.value=this._pendingValue=formState.value,formState.disabled?this.disable({onlySelf:!0,emitEvent:!1}):this.enable({onlySelf:!0,emitEvent:!1})):this.value=this._pendingValue=formState}};class AbstractFormGroupDirective extends ControlContainer{ngOnInit(){this._checkParentType(),this.formDirective.addFormGroup(this)}ngOnDestroy(){this.formDirective&&this.formDirective.removeFormGroup(this)}get control(){return this.formDirective.getFormGroup(this)}get path(){return controlPath(null==this.name?this.name:this.name.toString(),this._parent)}get formDirective(){return this._parent?this._parent.formDirective:null}_checkParentType(){}}AbstractFormGroupDirective.ɵfac=function(){let ɵAbstractFormGroupDirective_BaseFactory;return function AbstractFormGroupDirective_Factory(t){return(ɵAbstractFormGroupDirective_BaseFactory||(ɵAbstractFormGroupDirective_BaseFactory=_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵgetInheritedFactory"](AbstractFormGroupDirective)))(t||AbstractFormGroupDirective)}}(),AbstractFormGroupDirective.ɵdir=_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineDirective"]({type:AbstractFormGroupDirective,features:[_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵInheritDefinitionFeature"]]}),("undefined"==typeof ngDevMode||ngDevMode)&&_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](AbstractFormGroupDirective,[{type:_angular_core__WEBPACK_IMPORTED_MODULE_0__.Directive}],null,null);const modelGroupProvider={provide:ControlContainer,useExisting:(0,_angular_core__WEBPACK_IMPORTED_MODULE_0__.forwardRef)((()=>NgModelGroup))};class NgModelGroup extends AbstractFormGroupDirective{constructor(parent,validators,asyncValidators){super(),this._parent=parent,this._setValidators(validators),this._setAsyncValidators(asyncValidators)}_checkParentType(){if(!(this._parent instanceof NgModelGroup)&&!(this._parent instanceof NgForm)&&("undefined"==typeof ngDevMode||ngDevMode))throw function modelGroupParentException(){return new _angular_core__W