-
Notifications
You must be signed in to change notification settings - Fork 0
/
7-es2015.22ed501f017500834045.js
1 lines (1 loc) · 54.6 KB
/
7-es2015.22ed501f017500834045.js
1
(window.webpackJsonp=window.webpackJsonp||[]).push([[7],{"5ZVp":function(t,e,n){"use strict";n.r(e),n.d(e,"SignupModule",(function(){return It}));var r=n("ofXK"),o=n("tyNb"),i=n("fXoL"),s=n("HDdC"),a=n("DH7j"),l=n("lJxs"),c=n("XoHu"),u=n("Cfvw");function h(t,e){return new s.a(n=>{const r=t.length;if(0===r)return void n.complete();const o=new Array(r);let i=0,s=0;for(let a=0;a<r;a++){const l=Object(u.a)(t[a]);let c=!1;n.add(l.subscribe({next:t=>{c||(c=!0,s++),o[a]=t},error:t=>n.error(t),complete:()=>{i++,i!==r&&c||(s===r&&n.next(e?e.reduce((t,e,n)=>(t[e]=o[n],t),{}):o),n.complete())}}))}})}const d=new i.q("NgValueAccessor"),g={provide:d,useExisting:Object(i.S)(()=>p),multi:!0};let p=(()=>{class t{constructor(t,e){this._renderer=t,this._elementRef=e,this.onChange=t=>{},this.onTouched=()=>{}}writeValue(t){this._renderer.setProperty(this._elementRef.nativeElement,"checked",t)}registerOnChange(t){this.onChange=t}registerOnTouched(t){this.onTouched=t}setDisabledState(t){this._renderer.setProperty(this._elementRef.nativeElement,"disabled",t)}}return t.\u0275fac=function(e){return new(e||t)(i.Jb(i.D),i.Jb(i.l))},t.\u0275dir=i.Eb({type:t,selectors:[["input","type","checkbox","formControlName",""],["input","type","checkbox","formControl",""],["input","type","checkbox","ngModel",""]],hostBindings:function(t,e){1&t&&i.Vb("change",(function(t){return e.onChange(t.target.checked)}))("blur",(function(){return e.onTouched()}))},features:[i.yb([g])]}),t})();const m={provide:d,useExisting:Object(i.S)(()=>_),multi:!0},f=new i.q("CompositionEventMode");let _=(()=>{class t{constructor(t,e,n){this._renderer=t,this._elementRef=e,this._compositionMode=n,this.onChange=t=>{},this.onTouched=()=>{},this._composing=!1,null==this._compositionMode&&(this._compositionMode=!function(){const t=Object(r.t)()?Object(r.t)().getUserAgent():"";return/android (\d+)/.test(t.toLowerCase())}())}writeValue(t){this._renderer.setProperty(this._elementRef.nativeElement,"value",null==t?"":t)}registerOnChange(t){this.onChange=t}registerOnTouched(t){this.onTouched=t}setDisabledState(t){this._renderer.setProperty(this._elementRef.nativeElement,"disabled",t)}_handleInput(t){(!this._compositionMode||this._compositionMode&&!this._composing)&&this.onChange(t)}_compositionStart(){this._composing=!0}_compositionEnd(t){this._composing=!1,this._compositionMode&&this.onChange(t)}}return t.\u0275fac=function(e){return new(e||t)(i.Jb(i.D),i.Jb(i.l),i.Jb(f,8))},t.\u0275dir=i.Eb({type:t,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(t,e){1&t&&i.Vb("input",(function(t){return e._handleInput(t.target.value)}))("blur",(function(){return e.onTouched()}))("compositionstart",(function(){return e._compositionStart()}))("compositionend",(function(t){return e._compositionEnd(t.target.value)}))},features:[i.yb([m])]}),t})(),b=(()=>{class t{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}reset(t){this.control&&this.control.reset(t)}hasError(t,e){return!!this.control&&this.control.hasError(t,e)}getError(t,e){return this.control?this.control.getError(t,e):null}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=i.Eb({type:t}),t})(),C=(()=>{class t extends b{get formDirective(){return null}get path(){return null}}return t.\u0275fac=function(e){return y(e||t)},t.\u0275dir=i.Eb({type:t,features:[i.wb]}),t})();const y=i.Ob(C);function v(){throw new Error("unimplemented")}class O extends b{constructor(){super(...arguments),this._parent=null,this.name=null,this.valueAccessor=null,this._rawValidators=[],this._rawAsyncValidators=[]}get validator(){return v()}get asyncValidator(){return v()}}class w{constructor(t){this._cd=t}get ngClassUntouched(){return!!this._cd.control&&this._cd.control.untouched}get ngClassTouched(){return!!this._cd.control&&this._cd.control.touched}get ngClassPristine(){return!!this._cd.control&&this._cd.control.pristine}get ngClassDirty(){return!!this._cd.control&&this._cd.control.dirty}get ngClassValid(){return!!this._cd.control&&this._cd.control.valid}get ngClassInvalid(){return!!this._cd.control&&this._cd.control.invalid}get ngClassPending(){return!!this._cd.control&&this._cd.control.pending}}let M=(()=>{class t extends w{constructor(t){super(t)}}return t.\u0275fac=function(e){return new(e||t)(i.Jb(O,2))},t.\u0275dir=i.Eb({type:t,selectors:[["","formControlName",""],["","ngModel",""],["","formControl",""]],hostVars:14,hostBindings:function(t,e){2&t&&i.Bb("ng-untouched",e.ngClassUntouched)("ng-touched",e.ngClassTouched)("ng-pristine",e.ngClassPristine)("ng-dirty",e.ngClassDirty)("ng-valid",e.ngClassValid)("ng-invalid",e.ngClassInvalid)("ng-pending",e.ngClassPending)},features:[i.wb]}),t})(),V=(()=>{class t extends w{constructor(t){super(t)}}return t.\u0275fac=function(e){return new(e||t)(i.Jb(C,2))},t.\u0275dir=i.Eb({type:t,selectors:[["","formGroupName",""],["","formArrayName",""],["","ngModelGroup",""],["","formGroup",""],["form",3,"ngNoForm",""],["","ngForm",""]],hostVars:14,hostBindings:function(t,e){2&t&&i.Bb("ng-untouched",e.ngClassUntouched)("ng-touched",e.ngClassTouched)("ng-pristine",e.ngClassPristine)("ng-dirty",e.ngClassDirty)("ng-valid",e.ngClassValid)("ng-invalid",e.ngClassInvalid)("ng-pending",e.ngClassPending)},features:[i.wb]}),t})();function P(t){return null==t||0===t.length}const E=new i.q("NgValidators"),A=new i.q("NgAsyncValidators"),x=/^(?=.{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 S{static min(t){return e=>{if(P(e.value)||P(t))return null;const n=parseFloat(e.value);return!isNaN(n)&&n<t?{min:{min:t,actual:e.value}}:null}}static max(t){return e=>{if(P(e.value)||P(t))return null;const n=parseFloat(e.value);return!isNaN(n)&&n>t?{max:{max:t,actual:e.value}}:null}}static required(t){return P(t.value)?{required:!0}:null}static requiredTrue(t){return!0===t.value?null:{required:!0}}static email(t){return P(t.value)||x.test(t.value)?null:{email:!0}}static minLength(t){return e=>{if(P(e.value))return null;const n=e.value?e.value.length:0;return n<t?{minlength:{requiredLength:t,actualLength:n}}:null}}static maxLength(t){return e=>{const n=e.value?e.value.length:0;return n>t?{maxlength:{requiredLength:t,actualLength:n}}:null}}static pattern(t){if(!t)return S.nullValidator;let e,n;return"string"==typeof t?(n="","^"!==t.charAt(0)&&(n+="^"),n+=t,"$"!==t.charAt(t.length-1)&&(n+="$"),e=new RegExp(n)):(n=t.toString(),e=t),t=>{if(P(t.value))return null;const r=t.value;return e.test(r)?null:{pattern:{requiredPattern:n,actualValue:r}}}}static nullValidator(t){return null}static compose(t){if(!t)return null;const e=t.filter(k);return 0==e.length?null:function(t){return N(function(t,e){return e.map(e=>e(t))}(t,e))}}static composeAsync(t){if(!t)return null;const e=t.filter(k);return 0==e.length?null:function(t){return function(...t){if(1===t.length){const e=t[0];if(Object(a.a)(e))return h(e,null);if(Object(c.a)(e)&&Object.getPrototypeOf(e)===Object.prototype){const t=Object.keys(e);return h(t.map(t=>e[t]),t)}}if("function"==typeof t[t.length-1]){const e=t.pop();return h(t=1===t.length&&Object(a.a)(t[0])?t[0]:t,null).pipe(Object(l.a)(t=>e(...t)))}return h(t,null)}(function(t,e){return e.map(e=>e(t))}(t,e).map(D)).pipe(Object(l.a)(N))}}}function k(t){return null!=t}function D(t){const e=Object(i.qb)(t)?Object(u.a)(t):t;if(!Object(i.pb)(e))throw new Error("Expected validator to return Promise or Observable.");return e}function N(t){let e={};return t.forEach(t=>{e=null!=t?Object.assign(Object.assign({},e),t):e}),0===Object.keys(e).length?null:e}function T(t){return t.validate?e=>t.validate(e):t}function F(t){return t.validate?e=>t.validate(e):t}const G={provide:d,useExisting:Object(i.S)(()=>j),multi:!0};let j=(()=>{class t{constructor(t,e){this._renderer=t,this._elementRef=e,this.onChange=t=>{},this.onTouched=()=>{}}writeValue(t){this._renderer.setProperty(this._elementRef.nativeElement,"value",null==t?"":t)}registerOnChange(t){this.onChange=e=>{t(""==e?null:parseFloat(e))}}registerOnTouched(t){this.onTouched=t}setDisabledState(t){this._renderer.setProperty(this._elementRef.nativeElement,"disabled",t)}}return t.\u0275fac=function(e){return new(e||t)(i.Jb(i.D),i.Jb(i.l))},t.\u0275dir=i.Eb({type:t,selectors:[["input","type","number","formControlName",""],["input","type","number","formControl",""],["input","type","number","ngModel",""]],hostBindings:function(t,e){1&t&&i.Vb("change",(function(t){return e.onChange(t.target.value)}))("input",(function(t){return e.onChange(t.target.value)}))("blur",(function(){return e.onTouched()}))},features:[i.yb([G])]}),t})();const I={provide:d,useExisting:Object(i.S)(()=>R),multi:!0};let L=(()=>{class t{constructor(){this._accessors=[]}add(t,e){this._accessors.push([t,e])}remove(t){for(let e=this._accessors.length-1;e>=0;--e)if(this._accessors[e][1]===t)return void this._accessors.splice(e,1)}select(t){this._accessors.forEach(e=>{this._isSameGroup(e,t)&&e[1]!==t&&e[1].fireUncheck(t.value)})}_isSameGroup(t,e){return!!t[0].control&&t[0]._parent===e._control._parent&&t[1].name===e.name}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=i.Fb({token:t,factory:t.\u0275fac}),t})(),R=(()=>{class t{constructor(t,e,n,r){this._renderer=t,this._elementRef=e,this._registry=n,this._injector=r,this.onChange=()=>{},this.onTouched=()=>{}}ngOnInit(){this._control=this._injector.get(O),this._checkName(),this._registry.add(this._control,this)}ngOnDestroy(){this._registry.remove(this)}writeValue(t){this._state=t===this.value,this._renderer.setProperty(this._elementRef.nativeElement,"checked",this._state)}registerOnChange(t){this._fn=t,this.onChange=()=>{t(this.value),this._registry.select(this)}}fireUncheck(t){this.writeValue(t)}registerOnTouched(t){this.onTouched=t}setDisabledState(t){this._renderer.setProperty(this._elementRef.nativeElement,"disabled",t)}_checkName(){this.name&&this.formControlName&&this.name!==this.formControlName&&this._throwNameError(),!this.name&&this.formControlName&&(this.name=this.formControlName)}_throwNameError(){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 ')}}return t.\u0275fac=function(e){return new(e||t)(i.Jb(i.D),i.Jb(i.l),i.Jb(L),i.Jb(i.r))},t.\u0275dir=i.Eb({type:t,selectors:[["input","type","radio","formControlName",""],["input","type","radio","formControl",""],["input","type","radio","ngModel",""]],hostBindings:function(t,e){1&t&&i.Vb("change",(function(){return e.onChange()}))("blur",(function(){return e.onTouched()}))},inputs:{name:"name",formControlName:"formControlName",value:"value"},features:[i.yb([I])]}),t})();const J={provide:d,useExisting:Object(i.S)(()=>q),multi:!0};let q=(()=>{class t{constructor(t,e){this._renderer=t,this._elementRef=e,this.onChange=t=>{},this.onTouched=()=>{}}writeValue(t){this._renderer.setProperty(this._elementRef.nativeElement,"value",parseFloat(t))}registerOnChange(t){this.onChange=e=>{t(""==e?null:parseFloat(e))}}registerOnTouched(t){this.onTouched=t}setDisabledState(t){this._renderer.setProperty(this._elementRef.nativeElement,"disabled",t)}}return t.\u0275fac=function(e){return new(e||t)(i.Jb(i.D),i.Jb(i.l))},t.\u0275dir=i.Eb({type:t,selectors:[["input","type","range","formControlName",""],["input","type","range","formControl",""],["input","type","range","ngModel",""]],hostBindings:function(t,e){1&t&&i.Vb("change",(function(t){return e.onChange(t.target.value)}))("input",(function(t){return e.onChange(t.target.value)}))("blur",(function(){return e.onTouched()}))},features:[i.yb([J])]}),t})();const U='\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 });',W='\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 });';class z{static controlParentException(){throw 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 "+U)}static ngModelGroupException(){throw 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 ${W}\n\n Option 2: Use ngModel instead of formControlName (template-driven strategy)\n\n \n <form>\n <div ngModelGroup="person">\n <input [(ngModel)]="person.name" name="firstName">\n </div>\n </form>`)}static missingFormException(){throw new Error("formGroup expects a FormGroup instance. Please pass one in.\n\n Example:\n\n "+U)}static groupParentException(){throw 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 "+W)}static arrayParentException(){throw 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 \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 });')}static disabledAttrWarning(){console.warn("\n It looks like you're using the disabled attribute with a reactive form directive. If you set disabled to true\n when you set up this control in your component class, the disabled attribute will actually be set in the DOM for\n you. We recommend using this approach to avoid 'changed after checked' errors.\n \n Example: \n form = new FormGroup({\n first: new FormControl({value: 'Nancy', disabled: true}, Validators.required),\n last: new FormControl('Drew', Validators.required)\n });\n ")}static ngModelWarning(t){console.warn(`\n It looks like you're using ngModel on the same form field as ${t}. \n Support for using the ngModel input property and ngModelChange event with \n reactive form directives has been deprecated in Angular v6 and will be removed \n in Angular v7.\n \n For more information on this, see our API docs here:\n https://angular.io/api/forms/${"formControl"===t?"FormControlDirective":"FormControlName"}#use-with-ngmodel\n `)}}const B={provide:d,useExisting:Object(i.S)(()=>$),multi:!0};let $=(()=>{class t{constructor(t,e){this._renderer=t,this._elementRef=e,this._optionMap=new Map,this._idCounter=0,this.onChange=t=>{},this.onTouched=()=>{},this._compareWith=i.rb}set compareWith(t){if("function"!=typeof t)throw new Error("compareWith must be a function, but received "+JSON.stringify(t));this._compareWith=t}writeValue(t){this.value=t;const e=this._getOptionId(t);null==e&&this._renderer.setProperty(this._elementRef.nativeElement,"selectedIndex",-1);const n=function(t,e){return null==t?""+e:(e&&"object"==typeof e&&(e="Object"),`${t}: ${e}`.slice(0,50))}(e,t);this._renderer.setProperty(this._elementRef.nativeElement,"value",n)}registerOnChange(t){this.onChange=e=>{this.value=this._getOptionValue(e),t(this.value)}}registerOnTouched(t){this.onTouched=t}setDisabledState(t){this._renderer.setProperty(this._elementRef.nativeElement,"disabled",t)}_registerOption(){return(this._idCounter++).toString()}_getOptionId(t){for(const e of Array.from(this._optionMap.keys()))if(this._compareWith(this._optionMap.get(e),t))return e;return null}_getOptionValue(t){const e=function(t){return t.split(":")[0]}(t);return this._optionMap.has(e)?this._optionMap.get(e):t}}return t.\u0275fac=function(e){return new(e||t)(i.Jb(i.D),i.Jb(i.l))},t.\u0275dir=i.Eb({type:t,selectors:[["select","formControlName","",3,"multiple",""],["select","formControl","",3,"multiple",""],["select","ngModel","",3,"multiple",""]],hostBindings:function(t,e){1&t&&i.Vb("change",(function(t){return e.onChange(t.target.value)}))("blur",(function(){return e.onTouched()}))},inputs:{compareWith:"compareWith"},features:[i.yb([B])]}),t})();const H={provide:d,useExisting:Object(i.S)(()=>Z),multi:!0};let Z=(()=>{class t{constructor(t,e){this._renderer=t,this._elementRef=e,this._optionMap=new Map,this._idCounter=0,this.onChange=t=>{},this.onTouched=()=>{},this._compareWith=i.rb}set compareWith(t){if("function"!=typeof t)throw new Error("compareWith must be a function, but received "+JSON.stringify(t));this._compareWith=t}writeValue(t){let e;if(this.value=t,Array.isArray(t)){const n=t.map(t=>this._getOptionId(t));e=(t,e)=>{t._setSelected(n.indexOf(e.toString())>-1)}}else e=(t,e)=>{t._setSelected(!1)};this._optionMap.forEach(e)}registerOnChange(t){this.onChange=e=>{const n=[];if(e.hasOwnProperty("selectedOptions")){const t=e.selectedOptions;for(let e=0;e<t.length;e++){const r=t.item(e),o=this._getOptionValue(r.value);n.push(o)}}else{const t=e.options;for(let e=0;e<t.length;e++){const r=t.item(e);if(r.selected){const t=this._getOptionValue(r.value);n.push(t)}}}this.value=n,t(n)}}registerOnTouched(t){this.onTouched=t}setDisabledState(t){this._renderer.setProperty(this._elementRef.nativeElement,"disabled",t)}_registerOption(t){const e=(this._idCounter++).toString();return this._optionMap.set(e,t),e}_getOptionId(t){for(const e of Array.from(this._optionMap.keys()))if(this._compareWith(this._optionMap.get(e)._value,t))return e;return null}_getOptionValue(t){const e=function(t){return t.split(":")[0]}(t);return this._optionMap.has(e)?this._optionMap.get(e)._value:t}}return t.\u0275fac=function(e){return new(e||t)(i.Jb(i.D),i.Jb(i.l))},t.\u0275dir=i.Eb({type:t,selectors:[["select","multiple","","formControlName",""],["select","multiple","","formControl",""],["select","multiple","","ngModel",""]],hostBindings:function(t,e){1&t&&i.Vb("change",(function(t){return e.onChange(t.target)}))("blur",(function(){return e.onTouched()}))},inputs:{compareWith:"compareWith"},features:[i.yb([H])]}),t})();function X(t,e){return[...e.path,t]}function Y(t,e){t||et(e,"Cannot find control with"),e.valueAccessor||et(e,"No value accessor for form control with"),t.validator=S.compose([t.validator,e.validator]),t.asyncValidator=S.composeAsync([t.asyncValidator,e.asyncValidator]),e.valueAccessor.writeValue(t.value),function(t,e){e.valueAccessor.registerOnChange(n=>{t._pendingValue=n,t._pendingChange=!0,t._pendingDirty=!0,"change"===t.updateOn&&K(t,e)})}(t,e),function(t,e){t.registerOnChange((t,n)=>{e.valueAccessor.writeValue(t),n&&e.viewToModelUpdate(t)})}(t,e),function(t,e){e.valueAccessor.registerOnTouched(()=>{t._pendingTouched=!0,"blur"===t.updateOn&&t._pendingChange&&K(t,e),"submit"!==t.updateOn&&t.markAsTouched()})}(t,e),e.valueAccessor.setDisabledState&&t.registerOnDisabledChange(t=>{e.valueAccessor.setDisabledState(t)}),e._rawValidators.forEach(e=>{e.registerOnValidatorChange&&e.registerOnValidatorChange(()=>t.updateValueAndValidity())}),e._rawAsyncValidators.forEach(e=>{e.registerOnValidatorChange&&e.registerOnValidatorChange(()=>t.updateValueAndValidity())})}function K(t,e){t._pendingDirty&&t.markAsDirty(),t.setValue(t._pendingValue,{emitModelToViewChange:!1}),e.viewToModelUpdate(t._pendingValue),t._pendingChange=!1}function Q(t,e){null==t&&et(e,"Cannot find control with"),t.validator=S.compose([t.validator,e.validator]),t.asyncValidator=S.composeAsync([t.asyncValidator,e.asyncValidator])}function tt(t){return et(t,"There is no FormControl instance attached to form control element with")}function et(t,e){let n;throw n=t.path.length>1?`path: '${t.path.join(" -> ")}'`:t.path[0]?`name: '${t.path}'`:"unspecified name attribute",new Error(`${e} ${n}`)}function nt(t){return null!=t?S.compose(t.map(T)):null}function rt(t){return null!=t?S.composeAsync(t.map(F)):null}const ot=[p,q,j,$,Z,R];function it(t){const e=at(t)?t.validators:t;return Array.isArray(e)?nt(e):e||null}function st(t,e){const n=at(e)?e.asyncValidators:t;return Array.isArray(n)?rt(n):n||null}function at(t){return null!=t&&!Array.isArray(t)&&"object"==typeof t}class lt{constructor(t,e){this.validator=t,this.asyncValidator=e,this._onCollectionChange=()=>{},this.pristine=!0,this.touched=!1,this._onDisabledChange=[]}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(t){this.validator=it(t)}setAsyncValidators(t){this.asyncValidator=st(t)}clearValidators(){this.validator=null}clearAsyncValidators(){this.asyncValidator=null}markAsTouched(t={}){this.touched=!0,this._parent&&!t.onlySelf&&this._parent.markAsTouched(t)}markAllAsTouched(){this.markAsTouched({onlySelf:!0}),this._forEachChild(t=>t.markAllAsTouched())}markAsUntouched(t={}){this.touched=!1,this._pendingTouched=!1,this._forEachChild(t=>{t.markAsUntouched({onlySelf:!0})}),this._parent&&!t.onlySelf&&this._parent._updateTouched(t)}markAsDirty(t={}){this.pristine=!1,this._parent&&!t.onlySelf&&this._parent.markAsDirty(t)}markAsPristine(t={}){this.pristine=!0,this._pendingDirty=!1,this._forEachChild(t=>{t.markAsPristine({onlySelf:!0})}),this._parent&&!t.onlySelf&&this._parent._updatePristine(t)}markAsPending(t={}){this.status="PENDING",!1!==t.emitEvent&&this.statusChanges.emit(this.status),this._parent&&!t.onlySelf&&this._parent.markAsPending(t)}disable(t={}){const e=this._parentMarkedDirty(t.onlySelf);this.status="DISABLED",this.errors=null,this._forEachChild(e=>{e.disable(Object.assign(Object.assign({},t),{onlySelf:!0}))}),this._updateValue(),!1!==t.emitEvent&&(this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._updateAncestors(Object.assign(Object.assign({},t),{skipPristineCheck:e})),this._onDisabledChange.forEach(t=>t(!0))}enable(t={}){const e=this._parentMarkedDirty(t.onlySelf);this.status="VALID",this._forEachChild(e=>{e.enable(Object.assign(Object.assign({},t),{onlySelf:!0}))}),this.updateValueAndValidity({onlySelf:!0,emitEvent:t.emitEvent}),this._updateAncestors(Object.assign(Object.assign({},t),{skipPristineCheck:e})),this._onDisabledChange.forEach(t=>t(!1))}_updateAncestors(t){this._parent&&!t.onlySelf&&(this._parent.updateValueAndValidity(t),t.skipPristineCheck||this._parent._updatePristine(),this._parent._updateTouched())}setParent(t){this._parent=t}updateValueAndValidity(t={}){this._setInitialStatus(),this._updateValue(),this.enabled&&(this._cancelExistingSubscription(),this.errors=this._runValidator(),this.status=this._calculateStatus(),"VALID"!==this.status&&"PENDING"!==this.status||this._runAsyncValidator(t.emitEvent)),!1!==t.emitEvent&&(this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._parent&&!t.onlySelf&&this._parent.updateValueAndValidity(t)}_updateTreeValidity(t={emitEvent:!0}){this._forEachChild(e=>e._updateTreeValidity(t)),this.updateValueAndValidity({onlySelf:!0,emitEvent:t.emitEvent})}_setInitialStatus(){this.status=this._allControlsDisabled()?"DISABLED":"VALID"}_runValidator(){return this.validator?this.validator(this):null}_runAsyncValidator(t){if(this.asyncValidator){this.status="PENDING";const e=D(this.asyncValidator(this));this._asyncValidationSubscription=e.subscribe(e=>this.setErrors(e,{emitEvent:t}))}}_cancelExistingSubscription(){this._asyncValidationSubscription&&this._asyncValidationSubscription.unsubscribe()}setErrors(t,e={}){this.errors=t,this._updateControlsErrors(!1!==e.emitEvent)}get(t){return function(t,e,n){if(null==e)return null;if(Array.isArray(e)||(e=e.split(".")),Array.isArray(e)&&0===e.length)return null;let r=t;return e.forEach(t=>{r=r instanceof ut?r.controls.hasOwnProperty(t)?r.controls[t]:null:r instanceof ht&&r.at(t)||null}),r}(this,t)}getError(t,e){const n=e?this.get(e):this;return n&&n.errors?n.errors[t]:null}hasError(t,e){return!!this.getError(t,e)}get root(){let t=this;for(;t._parent;)t=t._parent;return t}_updateControlsErrors(t){this.status=this._calculateStatus(),t&&this.statusChanges.emit(this.status),this._parent&&this._parent._updateControlsErrors(t)}_initObservables(){this.valueChanges=new i.n,this.statusChanges=new i.n}_calculateStatus(){return this._allControlsDisabled()?"DISABLED":this.errors?"INVALID":this._anyControlsHaveStatus("PENDING")?"PENDING":this._anyControlsHaveStatus("INVALID")?"INVALID":"VALID"}_anyControlsHaveStatus(t){return this._anyControls(e=>e.status===t)}_anyControlsDirty(){return this._anyControls(t=>t.dirty)}_anyControlsTouched(){return this._anyControls(t=>t.touched)}_updatePristine(t={}){this.pristine=!this._anyControlsDirty(),this._parent&&!t.onlySelf&&this._parent._updatePristine(t)}_updateTouched(t={}){this.touched=this._anyControlsTouched(),this._parent&&!t.onlySelf&&this._parent._updateTouched(t)}_isBoxedValue(t){return"object"==typeof t&&null!==t&&2===Object.keys(t).length&&"value"in t&&"disabled"in t}_registerOnCollectionChange(t){this._onCollectionChange=t}_setUpdateStrategy(t){at(t)&&null!=t.updateOn&&(this._updateOn=t.updateOn)}_parentMarkedDirty(t){return!t&&this._parent&&this._parent.dirty&&!this._parent._anyControlsDirty()}}class ct extends lt{constructor(t=null,e,n){super(it(e),st(n,e)),this._onChange=[],this._applyFormState(t),this._setUpdateStrategy(e),this.updateValueAndValidity({onlySelf:!0,emitEvent:!1}),this._initObservables()}setValue(t,e={}){this.value=this._pendingValue=t,this._onChange.length&&!1!==e.emitModelToViewChange&&this._onChange.forEach(t=>t(this.value,!1!==e.emitViewToModelChange)),this.updateValueAndValidity(e)}patchValue(t,e={}){this.setValue(t,e)}reset(t=null,e={}){this._applyFormState(t),this.markAsPristine(e),this.markAsUntouched(e),this.setValue(this.value,e),this._pendingChange=!1}_updateValue(){}_anyControls(t){return!1}_allControlsDisabled(){return this.disabled}registerOnChange(t){this._onChange.push(t)}_clearChangeFns(){this._onChange=[],this._onDisabledChange=[],this._onCollectionChange=()=>{}}registerOnDisabledChange(t){this._onDisabledChange.push(t)}_forEachChild(t){}_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(t){this._isBoxedValue(t)?(this.value=this._pendingValue=t.value,t.disabled?this.disable({onlySelf:!0,emitEvent:!1}):this.enable({onlySelf:!0,emitEvent:!1})):this.value=this._pendingValue=t}}class ut extends lt{constructor(t,e,n){super(it(e),st(n,e)),this.controls=t,this._initObservables(),this._setUpdateStrategy(e),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!1})}registerControl(t,e){return this.controls[t]?this.controls[t]:(this.controls[t]=e,e.setParent(this),e._registerOnCollectionChange(this._onCollectionChange),e)}addControl(t,e){this.registerControl(t,e),this.updateValueAndValidity(),this._onCollectionChange()}removeControl(t){this.controls[t]&&this.controls[t]._registerOnCollectionChange(()=>{}),delete this.controls[t],this.updateValueAndValidity(),this._onCollectionChange()}setControl(t,e){this.controls[t]&&this.controls[t]._registerOnCollectionChange(()=>{}),delete this.controls[t],e&&this.registerControl(t,e),this.updateValueAndValidity(),this._onCollectionChange()}contains(t){return this.controls.hasOwnProperty(t)&&this.controls[t].enabled}setValue(t,e={}){this._checkAllValuesPresent(t),Object.keys(t).forEach(n=>{this._throwIfControlMissing(n),this.controls[n].setValue(t[n],{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e)}patchValue(t,e={}){Object.keys(t).forEach(n=>{this.controls[n]&&this.controls[n].patchValue(t[n],{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e)}reset(t={},e={}){this._forEachChild((n,r)=>{n.reset(t[r],{onlySelf:!0,emitEvent:e.emitEvent})}),this._updatePristine(e),this._updateTouched(e),this.updateValueAndValidity(e)}getRawValue(){return this._reduceChildren({},(t,e,n)=>(t[n]=e instanceof ct?e.value:e.getRawValue(),t))}_syncPendingControls(){let t=this._reduceChildren(!1,(t,e)=>!!e._syncPendingControls()||t);return t&&this.updateValueAndValidity({onlySelf:!0}),t}_throwIfControlMissing(t){if(!Object.keys(this.controls).length)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 ");if(!this.controls[t])throw new Error(`Cannot find form control with name: ${t}.`)}_forEachChild(t){Object.keys(this.controls).forEach(e=>t(this.controls[e],e))}_setUpControls(){this._forEachChild(t=>{t.setParent(this),t._registerOnCollectionChange(this._onCollectionChange)})}_updateValue(){this.value=this._reduceValue()}_anyControls(t){let e=!1;return this._forEachChild((n,r)=>{e=e||this.contains(r)&&t(n)}),e}_reduceValue(){return this._reduceChildren({},(t,e,n)=>((e.enabled||this.disabled)&&(t[n]=e.value),t))}_reduceChildren(t,e){let n=t;return this._forEachChild((t,r)=>{n=e(n,t,r)}),n}_allControlsDisabled(){for(const t of Object.keys(this.controls))if(this.controls[t].enabled)return!1;return Object.keys(this.controls).length>0||this.disabled}_checkAllValuesPresent(t){this._forEachChild((e,n)=>{if(void 0===t[n])throw new Error(`Must supply a value for form control with name: '${n}'.`)})}}class ht extends lt{constructor(t,e,n){super(it(e),st(n,e)),this.controls=t,this._initObservables(),this._setUpdateStrategy(e),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!1})}at(t){return this.controls[t]}push(t){this.controls.push(t),this._registerControl(t),this.updateValueAndValidity(),this._onCollectionChange()}insert(t,e){this.controls.splice(t,0,e),this._registerControl(e),this.updateValueAndValidity()}removeAt(t){this.controls[t]&&this.controls[t]._registerOnCollectionChange(()=>{}),this.controls.splice(t,1),this.updateValueAndValidity()}setControl(t,e){this.controls[t]&&this.controls[t]._registerOnCollectionChange(()=>{}),this.controls.splice(t,1),e&&(this.controls.splice(t,0,e),this._registerControl(e)),this.updateValueAndValidity(),this._onCollectionChange()}get length(){return this.controls.length}setValue(t,e={}){this._checkAllValuesPresent(t),t.forEach((t,n)=>{this._throwIfControlMissing(n),this.at(n).setValue(t,{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e)}patchValue(t,e={}){t.forEach((t,n)=>{this.at(n)&&this.at(n).patchValue(t,{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e)}reset(t=[],e={}){this._forEachChild((n,r)=>{n.reset(t[r],{onlySelf:!0,emitEvent:e.emitEvent})}),this._updatePristine(e),this._updateTouched(e),this.updateValueAndValidity(e)}getRawValue(){return this.controls.map(t=>t instanceof ct?t.value:t.getRawValue())}clear(){this.controls.length<1||(this._forEachChild(t=>t._registerOnCollectionChange(()=>{})),this.controls.splice(0),this.updateValueAndValidity())}_syncPendingControls(){let t=this.controls.reduce((t,e)=>!!e._syncPendingControls()||t,!1);return t&&this.updateValueAndValidity({onlySelf:!0}),t}_throwIfControlMissing(t){if(!this.controls.length)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 ");if(!this.at(t))throw new Error("Cannot find form control at index "+t)}_forEachChild(t){this.controls.forEach((e,n)=>{t(e,n)})}_updateValue(){this.value=this.controls.filter(t=>t.enabled||this.disabled).map(t=>t.value)}_anyControls(t){return this.controls.some(e=>e.enabled&&t(e))}_setUpControls(){this._forEachChild(t=>this._registerControl(t))}_checkAllValuesPresent(t){this._forEachChild((e,n)=>{if(void 0===t[n])throw new Error(`Must supply a value for form control at index: ${n}.`)})}_allControlsDisabled(){for(const t of this.controls)if(t.enabled)return!1;return this.controls.length>0||this.disabled}_registerControl(t){t.setParent(this),t._registerOnCollectionChange(this._onCollectionChange)}}let dt=(()=>{class t extends C{ngOnInit(){this._checkParentType(),this.formDirective.addFormGroup(this)}ngOnDestroy(){this.formDirective&&this.formDirective.removeFormGroup(this)}get control(){return this.formDirective.getFormGroup(this)}get path(){return X(null==this.name?this.name:this.name.toString(),this._parent)}get formDirective(){return this._parent?this._parent.formDirective:null}get validator(){return nt(this._validators)}get asyncValidator(){return rt(this._asyncValidators)}_checkParentType(){}}return t.\u0275fac=function(e){return gt(e||t)},t.\u0275dir=i.Eb({type:t,features:[i.wb]}),t})();const gt=i.Ob(dt);let pt=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=i.Eb({type:t,selectors:[["form",3,"ngNoForm","",3,"ngNativeValidate",""]],hostAttrs:["novalidate",""]}),t})();const mt=new i.q("NgModelWithFormControlWarning"),ft={provide:C,useExisting:Object(i.S)(()=>_t)};let _t=(()=>{class t extends C{constructor(t,e){super(),this._validators=t,this._asyncValidators=e,this.submitted=!1,this.directives=[],this.form=null,this.ngSubmit=new i.n}ngOnChanges(t){this._checkFormPresent(),t.hasOwnProperty("form")&&(this._updateValidators(),this._updateDomValue(),this._updateRegistrations())}get formDirective(){return this}get control(){return this.form}get path(){return[]}addControl(t){const e=this.form.get(t.path);return Y(e,t),e.updateValueAndValidity({emitEvent:!1}),this.directives.push(t),e}getControl(t){return this.form.get(t.path)}removeControl(t){!function(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}(this.directives,t)}addFormGroup(t){const e=this.form.get(t.path);Q(e,t),e.updateValueAndValidity({emitEvent:!1})}removeFormGroup(t){}getFormGroup(t){return this.form.get(t.path)}addFormArray(t){const e=this.form.get(t.path);Q(e,t),e.updateValueAndValidity({emitEvent:!1})}removeFormArray(t){}getFormArray(t){return this.form.get(t.path)}updateModel(t,e){this.form.get(t.path).setValue(e)}onSubmit(t){return this.submitted=!0,e=this.directives,this.form._syncPendingControls(),e.forEach(t=>{const e=t.control;"submit"===e.updateOn&&e._pendingChange&&(t.viewToModelUpdate(e._pendingValue),e._pendingChange=!1)}),this.ngSubmit.emit(t),!1;var e}onReset(){this.resetForm()}resetForm(t){this.form.reset(t),this.submitted=!1}_updateDomValue(){this.directives.forEach(t=>{const e=this.form.get(t.path);t.control!==e&&(function(t,e){e.valueAccessor.registerOnChange(()=>tt(e)),e.valueAccessor.registerOnTouched(()=>tt(e)),e._rawValidators.forEach(t=>{t.registerOnValidatorChange&&t.registerOnValidatorChange(null)}),e._rawAsyncValidators.forEach(t=>{t.registerOnValidatorChange&&t.registerOnValidatorChange(null)}),t&&t._clearChangeFns()}(t.control,t),e&&Y(e,t),t.control=e)}),this.form._updateTreeValidity({emitEvent:!1})}_updateRegistrations(){this.form._registerOnCollectionChange(()=>this._updateDomValue()),this._oldForm&&this._oldForm._registerOnCollectionChange(()=>{}),this._oldForm=this.form}_updateValidators(){const t=nt(this._validators);this.form.validator=S.compose([this.form.validator,t]);const e=rt(this._asyncValidators);this.form.asyncValidator=S.composeAsync([this.form.asyncValidator,e])}_checkFormPresent(){this.form||z.missingFormException()}}return t.\u0275fac=function(e){return new(e||t)(i.Jb(E,10),i.Jb(A,10))},t.\u0275dir=i.Eb({type:t,selectors:[["","formGroup",""]],hostBindings:function(t,e){1&t&&i.Vb("submit",(function(t){return e.onSubmit(t)}))("reset",(function(){return e.onReset()}))},inputs:{form:["formGroup","form"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],features:[i.yb([ft]),i.wb,i.xb]}),t})();const bt={provide:C,useExisting:Object(i.S)(()=>Ct)};let Ct=(()=>{class t extends dt{constructor(t,e,n){super(),this._parent=t,this._validators=e,this._asyncValidators=n}_checkParentType(){Ot(this._parent)&&z.groupParentException()}}return t.\u0275fac=function(e){return new(e||t)(i.Jb(C,13),i.Jb(E,10),i.Jb(A,10))},t.\u0275dir=i.Eb({type:t,selectors:[["","formGroupName",""]],inputs:{name:["formGroupName","name"]},features:[i.yb([bt]),i.wb]}),t})();const yt={provide:C,useExisting:Object(i.S)(()=>vt)};let vt=(()=>{class t extends C{constructor(t,e,n){super(),this._parent=t,this._validators=e,this._asyncValidators=n}ngOnInit(){this._checkParentType(),this.formDirective.addFormArray(this)}ngOnDestroy(){this.formDirective&&this.formDirective.removeFormArray(this)}get control(){return this.formDirective.getFormArray(this)}get formDirective(){return this._parent?this._parent.formDirective:null}get path(){return X(null==this.name?this.name:this.name.toString(),this._parent)}get validator(){return nt(this._validators)}get asyncValidator(){return rt(this._asyncValidators)}_checkParentType(){Ot(this._parent)&&z.arrayParentException()}}return t.\u0275fac=function(e){return new(e||t)(i.Jb(C,13),i.Jb(E,10),i.Jb(A,10))},t.\u0275dir=i.Eb({type:t,selectors:[["","formArrayName",""]],inputs:{name:["formArrayName","name"]},features:[i.yb([yt]),i.wb]}),t})();function Ot(t){return!(t instanceof Ct||t instanceof _t||t instanceof vt)}const wt={provide:O,useExisting:Object(i.S)(()=>Mt)};let Mt=(()=>{class t extends O{constructor(t,e,n,r,o){super(),this._ngModelWarningConfig=o,this._added=!1,this.update=new i.n,this._ngModelWarningSent=!1,this._parent=t,this._rawValidators=e||[],this._rawAsyncValidators=n||[],this.valueAccessor=function(t,e){if(!e)return null;Array.isArray(e)||et(t,"Value accessor was not provided as an array for form control with");let n=void 0,r=void 0,o=void 0;return e.forEach(e=>{var i;e.constructor===_?n=e:(i=e,ot.some(t=>i.constructor===t)?(r&&et(t,"More than one built-in value accessor matches form control with"),r=e):(o&&et(t,"More than one custom value accessor matches form control with"),o=e))}),o||r||n||(et(t,"No valid value accessor for form control with"),null)}(this,r)}set isDisabled(t){z.disabledAttrWarning()}ngOnChanges(e){var n,r;this._added||this._setUpControl(),function(t,e){if(!t.hasOwnProperty("model"))return!1;const n=t.model;return!!n.isFirstChange()||!Object(i.rb)(e,n.currentValue)}(e,this.viewModel)&&("formControlName",n=t,this,r=this._ngModelWarningConfig,Object(i.T)()&&"never"!==r&&((null!==r&&"once"!==r||n._ngModelWarningSentOnce)&&("always"!==r||this._ngModelWarningSent)||(z.ngModelWarning("formControlName"),n._ngModelWarningSentOnce=!0,this._ngModelWarningSent=!0)),this.viewModel=this.model,this.formDirective.updateModel(this,this.model))}ngOnDestroy(){this.formDirective&&this.formDirective.removeControl(this)}viewToModelUpdate(t){this.viewModel=t,this.update.emit(t)}get path(){return X(null==this.name?this.name:this.name.toString(),this._parent)}get formDirective(){return this._parent?this._parent.formDirective:null}get validator(){return nt(this._rawValidators)}get asyncValidator(){return rt(this._rawAsyncValidators)}_checkParentType(){!(this._parent instanceof Ct)&&this._parent instanceof dt?z.ngModelGroupException():this._parent instanceof Ct||this._parent instanceof _t||this._parent instanceof vt||z.controlParentException()}_setUpControl(){this._checkParentType(),this.control=this.formDirective.addControl(this),this.control.disabled&&this.valueAccessor.setDisabledState&&this.valueAccessor.setDisabledState(!0),this._added=!0}}return t.\u0275fac=function(e){return new(e||t)(i.Jb(C,13),i.Jb(E,10),i.Jb(A,10),i.Jb(d,10),i.Jb(mt,8))},t.\u0275dir=i.Eb({type:t,selectors:[["","formControlName",""]],inputs:{isDisabled:["disabled","isDisabled"],name:["formControlName","name"],model:["ngModel","model"]},outputs:{update:"ngModelChange"},features:[i.yb([wt]),i.wb,i.xb]}),t._ngModelWarningSentOnce=!1,t})();const Vt={provide:E,useExisting:Object(i.S)(()=>Pt),multi:!0};let Pt=(()=>{class t{get required(){return this._required}set required(t){this._required=null!=t&&!1!==t&&""+t!="false",this._onChange&&this._onChange()}validate(t){return this.required?S.required(t):null}registerOnValidatorChange(t){this._onChange=t}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=i.Eb({type:t,selectors:[["","required","","formControlName","",3,"type","checkbox"],["","required","","formControl","",3,"type","checkbox"],["","required","","ngModel","",3,"type","checkbox"]],hostVars:1,hostBindings:function(t,e){2&t&&i.Ab("required",e.required?"":null)},inputs:{required:"required"},features:[i.yb([Vt])]}),t})(),Et=(()=>{class t{}return t.\u0275mod=i.Hb({type:t}),t.\u0275inj=i.Gb({factory:function(e){return new(e||t)}}),t})(),At=(()=>{class t{group(t,e=null){const n=this._reduceControls(t);let r=null,o=null,i=void 0;return null!=e&&(function(t){return void 0!==t.asyncValidators||void 0!==t.validators||void 0!==t.updateOn}(e)?(r=null!=e.validators?e.validators:null,o=null!=e.asyncValidators?e.asyncValidators:null,i=null!=e.updateOn?e.updateOn:void 0):(r=null!=e.validator?e.validator:null,o=null!=e.asyncValidator?e.asyncValidator:null)),new ut(n,{asyncValidators:o,updateOn:i,validators:r})}control(t,e,n){return new ct(t,e,n)}array(t,e,n){const r=t.map(t=>this._createControl(t));return new ht(r,e,n)}_reduceControls(t){const e={};return Object.keys(t).forEach(n=>{e[n]=this._createControl(t[n])}),e}_createControl(t){return t instanceof ct||t instanceof ut||t instanceof ht?t:Array.isArray(t)?this.control(t[0],t.length>1?t[1]:null,t.length>2?t[2]:null):this.control(t)}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=i.Fb({token:t,factory:t.\u0275fac}),t})(),xt=(()=>{class t{}return t.\u0275mod=i.Hb({type:t}),t.\u0275inj=i.Gb({factory:function(e){return new(e||t)},providers:[L],imports:[Et]}),t})(),St=(()=>{class t{static withConfig(e){return{ngModule:t,providers:[{provide:mt,useValue:e.warnOnNgModelWithFormControl}]}}}return t.\u0275mod=i.Hb({type:t}),t.\u0275inj=i.Gb({factory:function(e){return new(e||t)},providers:[At,L],imports:[Et]}),t})();var kt=n("tk/3");let Dt=(()=>{class t{constructor(t){this.http=t,this.url="https://api.raisely.com/v3/"}HttpEventResponse(t){switch(t.type){case kt.c.Sent:case kt.c.ResponseHeader:break;case kt.c.DownloadProgress:Math.round(t.loaded/1024);break;case kt.c.Response:return t.body}}register(t){const e=new kt.d("POST",this.url+"signup",t,{reportProgress:!0});return this.http.request(e)}checkEmail(t){const e=new kt.d("POST",this.url+"check-user",t,{reportProgress:!0});return this.http.request(e)}}return t.\u0275fac=function(e){return new(e||t)(i.Rb(kt.a))},t.\u0275prov=i.Fb({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();function Nt(t,e){1&t&&i.Kb(0,"img",22)}function Tt(t,e){1&t&&i.Kb(0,"img",23)}const Ft=function(t){return{error:t}},Gt=[{path:"",component:(()=>{class t{constructor(t,e,n){this.fb=t,this.signUp=e,this.router=n,this.fName=!1,this.lName=!1,this.email=!1,this.pwd=!1,this.cpwd=!1,this.errorText="",this.show=!1,this.disabled=!1,this.buttonText="Register",this.signupForm=this.fb.group({firstName:["",S.minLength(2)],lastName:["",S.minLength(2)],email:["",S.email],password:["",S.minLength(8)]})}ngOnInit(){this.password="password"}toggle(){"password"===this.password?(this.password="text",this.show=!0):(this.password="password",this.show=!1)}validation(t){switch(t){case"lName":if(this.lName=this.signupForm.get("lastName").hasError("minlength"),this.lName)return void(this.errorText="Atleast 2 character's");this.errorText="";break;case"email":if(this.email=this.signupForm.get("email").hasError("email"),this.email)return void(this.errorText="Atleast enter a valid email");this.signUp.checkEmail({campaignUuid:"46aa3270-d2ee-11ea-a9f0-e9a68ccff42a",data:{email:this.signupForm.value.email}}).subscribe(t=>{let e=this.signUp.HttpEventResponse(t);if(4===t.type){if("EXISTS"===e.data.status)return this.email=!0,void(this.errorText="Email already exists");this.email=!1,this.errorText="Email is verified"}},t=>{alert("Please try again after some time"),console.log(t)});break;case"pwd":if(this.pwd=this.signupForm.get("password").hasError("minlength"),this.pwd)return void(this.errorText="Atleast 8 character's");this.errorText="";break;default:if(this.fName=this.signupForm.get("firstName").hasError("minlength"),this.fName)return void(this.errorText="Atleast 3 character's");this.errorText=""}}register(t){this.disabled=!0,this.buttonText="Please Wait",this.signUp.register({campaignUuid:"46aa3270-d2ee-11ea-a9f0-e9a68ccff42a",data:this.signupForm.value}).subscribe(t=>{let e=this.signUp.HttpEventResponse(t);4===t.type&&(console.log(e),this.router.navigate(["/"]))},t=>{this.disabled=!1,this.buttonText="Register",alert("Please try again after some time"),console.log(t)})}}return t.\u0275fac=function(e){return new(e||t)(i.Jb(At),i.Jb(Dt),i.Jb(o.c))},t.\u0275cmp=i.Db({type:t,selectors:[["app-signup"]],decls:53,vars:22,consts:[["role","main",1,"content"],[1,"logo"],[1,"card","highlight-card","card-small"],["id","rocket-smoke","alt","Rocket Ship Smoke","xmlns","http://www.w3.org/2000/svg","width","516.119","height","1083.632","viewBox","0 0 516.119 1083.632"],["id","Path_40","data-name","Path 40","d","M644.6,141S143.02,215.537,147.049,870.207s342.774,201.755,342.774,201.755S404.659,847.213,388.815,762.2c-27.116-145.51-11.551-384.124,271.9-609.1C671.15,139.365,644.6,141,644.6,141Z","transform","translate(-147.025 -140.939)","fill","#f5f5f5"],[1,"card-container","signup"],[1,"form"],[3,"formGroup","ngSubmit"],[1,"group",3,"ngClass"],["for","first-name"],["type","text","placeholder","Ex. Deepak","formControlName","firstName","autofocus","","required","",3,"focusout"],["for","last-name"],["type","text","placeholder","Ex. Ranolia","formControlName","lastName","autofocus","","required","",3,"focusout"],["for","email"],["type","email","placeholder","Ex. d.ranolia92@gmail.com","formControlName","email","autofocus","","required","",3,"focusout"],["for","password"],["placeholder","******","formControlName","password","autofocus","","required","",3,"type","focusout"],[1,"eye",3,"click"],["src","../assets/eye-show.svg","alt","show password eye svg icon","width","20","height","20",4,"ngIf"],["src","../assets/eye-hide.svg","alt","hide password eye svg icon","width","20","height","20",4,"ngIf"],[1,"group"],["type","submit",3,"disabled"],["src","../assets/eye-show.svg","alt","show password eye svg icon","width","20","height","20"],["src","../assets/eye-hide.svg","alt","hide password eye svg icon","width","20","height","20"]],template:function(t,e){1&t&&(i.Mb(0,"div",0),i.Mb(1,"div",1),i.lc(2,"Deepak Ranolia"),i.Lb(),i.Mb(3,"div",2),i.Mb(4,"p"),i.lc(5,"Fill the form and register with us today"),i.Lb(),i.Yb(),i.Mb(6,"svg",3),i.Kb(7,"path",4),i.Lb(),i.Lb(),i.Xb(),i.Mb(8,"div",5),i.Mb(9,"div",6),i.Mb(10,"form",7),i.Vb("ngSubmit",(function(t){return e.register(t)})),i.Mb(11,"div",8),i.Mb(12,"p"),i.Mb(13,"label",9),i.lc(14,"Enter First Name"),i.Mb(15,"sup"),i.lc(16,"*"),i.Lb(),i.Lb(),i.Mb(17,"span"),i.lc(18),i.Lb(),i.Lb(),i.Mb(19,"input",10),i.Vb("focusout",(function(){return e.validation("fName")})),i.Lb(),i.Lb(),i.Mb(20,"div",8),i.Mb(21,"p"),i.Mb(22,"label",11),i.lc(23,"Enter Last Name"),i.Mb(24,"sup"),i.lc(25,"*"),i.Lb(),i.Lb(),i.Mb(26,"span"),i.lc(27),i.Lb(),i.Lb(),i.Mb(28,"input",12),i.Vb("focusout",(function(){return e.validation("lName")})),i.Lb(),i.Lb(),i.Mb(29,"div",8),i.Mb(30,"p"),i.Mb(31,"label",13),i.lc(32,"Enter Your Email"),i.Mb(33,"sup"),i.lc(34,"*"),i.Lb(),i.Lb(),i.Mb(35,"span"),i.lc(36),i.Lb(),i.Lb(),i.Mb(37,"input",14),i.Vb("focusout",(function(){return e.validation("email")})),i.Lb(),i.Lb(),i.Mb(38,"div",8),i.Mb(39,"p"),i.Mb(40,"label",15),i.lc(41,"Password"),i.Mb(42,"sup"),i.lc(43,"*"),i.Lb(),i.Lb(),i.Mb(44,"span"),i.lc(45),i.Lb(),i.Lb(),i.Mb(46,"input",16),i.Vb("focusout",(function(){return e.validation("pwd")})),i.Lb(),i.Mb(47,"div",17),i.Vb("click",(function(){return e.toggle()})),i.kc(48,Nt,1,0,"img",18),i.kc(49,Tt,1,0,"img",19),i.Lb(),i.Lb(),i.Mb(50,"div",20),i.Mb(51,"button",21),i.lc(52),i.Lb(),i.Lb(),i.Lb(),i.Lb(),i.Lb(),i.Lb()),2&t&&(i.zb(10),i.ac("formGroup",e.signupForm),i.zb(1),i.ac("ngClass",i.dc(14,Ft,e.fName)),i.zb(7),i.mc(e.errorText),i.zb(2),i.ac("ngClass",i.dc(16,Ft,e.lName)),i.zb(7),i.mc(e.errorText),i.zb(2),i.ac("ngClass",i.dc(18,Ft,e.email)),i.zb(7),i.mc(e.errorText),i.zb(2),i.ac("ngClass",i.dc(20,Ft,e.pwd)),i.zb(7),i.mc(e.errorText),i.zb(1),i.ac("type",e.password),i.zb(2),i.ac("ngIf",!e.show),i.zb(1),i.ac("ngIf",e.show),i.zb(2),i.ac("disabled",!e.signupForm.valid||1==e.disabled),i.zb(1),i.mc(e.buttonText))},directives:[pt,V,_t,r.h,_,M,Mt,Pt,r.j],styles:[".content[_ngcontent-%COMP%]{margin-top:10px}.content[_ngcontent-%COMP%] .card.highlight-card[_ngcontent-%COMP%]{background-color:transparent;color:inherit;width:100%}.content[_ngcontent-%COMP%] .card.highlight-card[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{font-weight:300}.logo[_ngcontent-%COMP%]{border:1px solid #666;padding:5px 12px;font-size:18px;color:#666;font-weight:600;margin:10px}.card[_ngcontent-%COMP%]{margin-bottom:0;margin-top:20px;padding-bottom:0}.signup[_ngcontent-%COMP%]{margin-top:0;max-width:100%}.signup[_ngcontent-%COMP%] .form[_ngcontent-%COMP%] .group[_ngcontent-%COMP%]{margin:10px 0;padding:5px 10px;overflow:hidden;background:#f4f4f4;border:1px solid #e8e8e8;color:#373737;position:relative}.signup[_ngcontent-%COMP%] .form[_ngcontent-%COMP%] .group[_ngcontent-%COMP%] div.eye[_ngcontent-%COMP%]{position:absolute;right:11px;bottom:11px;opacity:.7}.signup[_ngcontent-%COMP%] .form[_ngcontent-%COMP%] .group[_ngcontent-%COMP%] p[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{font-weight:600}.signup[_ngcontent-%COMP%] .form[_ngcontent-%COMP%] .group[_ngcontent-%COMP%] p[_ngcontent-%COMP%] label[_ngcontent-%COMP%] sup[_ngcontent-%COMP%]{font-weight:100;color:rgba(255,0,0,.8)}.signup[_ngcontent-%COMP%] .form[_ngcontent-%COMP%] .group[_ngcontent-%COMP%] p[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{display:none;position:absolute;top:2px;right:2px;font-size:11px}.signup[_ngcontent-%COMP%] .form[_ngcontent-%COMP%] .group[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{width:360px;border:none;background:transparent;height:30px;color:#777;padding:0 10px;outline:none}.signup[_ngcontent-%COMP%] .form[_ngcontent-%COMP%] .group[_ngcontent-%COMP%] input[_ngcontent-%COMP%]:focus{outline:none}.signup[_ngcontent-%COMP%] .form[_ngcontent-%COMP%] .group.error[_ngcontent-%COMP%]{background:rgba(255,0,0,.15);border-color:rgba(255,0,0,.5);box-shadow:inset 0 1px 1px #fff;color:red}.signup[_ngcontent-%COMP%] .form[_ngcontent-%COMP%] .group.error[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{color:#565656}.signup[_ngcontent-%COMP%] .form[_ngcontent-%COMP%] .group.error[_ngcontent-%COMP%] p[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{display:inline}.signup[_ngcontent-%COMP%] .form[_ngcontent-%COMP%] .group.success[_ngcontent-%COMP%]{background:rgba(0,255,0,.15);border-color:rgba(0,255,0,.5);box-shadow:inset 0 1px 1px #fff;color:green}.signup[_ngcontent-%COMP%] .form[_ngcontent-%COMP%] .group.success[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{color:#565656}.signup[_ngcontent-%COMP%] .form[_ngcontent-%COMP%] .group.success[_ngcontent-%COMP%] p[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{display:inline}.signup[_ngcontent-%COMP%] .form[_ngcontent-%COMP%] .group[_ngcontent-%COMP%]:last-child{background:none;border:none;overflow:visible;margin:auto;text-align:center;padding:0}.signup[_ngcontent-%COMP%] .form[_ngcontent-%COMP%] .group[_ngcontent-%COMP%]:last-child button[_ngcontent-%COMP%]{transition:all 125ms ease-in-out 25ms;width:60%;margin-top:4%;padding:7px 12px;border:1px solid #ccc;outline:none;min-width:120px;height:44px;cursor:pointer}.signup[_ngcontent-%COMP%] .form[_ngcontent-%COMP%] .group[_ngcontent-%COMP%]:last-child button[_ngcontent-%COMP%]:focus, .signup[_ngcontent-%COMP%] .form[_ngcontent-%COMP%] .group[_ngcontent-%COMP%]:last-child button[_ngcontent-%COMP%]:visited{outline:none}.signup[_ngcontent-%COMP%] .form[_ngcontent-%COMP%] .group[_ngcontent-%COMP%]:last-child button[_ngcontent-%COMP%]:hover{transition:all 125ms ease-in-out 25ms;background:#fff;box-shadow:0 4px 17px rgba(0,0,0,.35)}.signup[_ngcontent-%COMP%] .form[_ngcontent-%COMP%] .group[_ngcontent-%COMP%]:last-child button[_ngcontent-%COMP%]:disabled:hover{background:inherit;box-shadow:none}@media (prefers-color-scheme:dark){.logo[_ngcontent-%COMP%]{border-color:#ccc;color:#ccc}.signup[_ngcontent-%COMP%] .form[_ngcontent-%COMP%] .group[_ngcontent-%COMP%]{background:#444;border-color:1px solid #111;color:#ccc}.signup[_ngcontent-%COMP%] .form[_ngcontent-%COMP%] .group[_ngcontent-%COMP%] p[_ngcontent-%COMP%] label[_ngcontent-%COMP%] sup[_ngcontent-%COMP%]{color:rgba(255,0,0,.8)}.signup[_ngcontent-%COMP%] .form[_ngcontent-%COMP%] .group[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{color:#ccc}.signup[_ngcontent-%COMP%] .form[_ngcontent-%COMP%] .group.error[_ngcontent-%COMP%]{background:rgba(255,0,0,.15);border-color:rgba(255,0,0,.5);box-shadow:inset 0 1px 1px #111;color:red}.signup[_ngcontent-%COMP%] .form[_ngcontent-%COMP%] .group.error[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{color:#fff}.signup[_ngcontent-%COMP%] .form[_ngcontent-%COMP%] .group.success[_ngcontent-%COMP%]{background:rgba(0,255,0,.15);border-color:rgba(0,255,0,.5);box-shadow:inset 0 1px 1px #111;color:green}.signup[_ngcontent-%COMP%] .form[_ngcontent-%COMP%] .group.success[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{color:#fff}.signup[_ngcontent-%COMP%] .form[_ngcontent-%COMP%] .group[_ngcontent-%COMP%]:last-child button[_ngcontent-%COMP%]{border-color:#111;background:#444;color:#ccc}.signup[_ngcontent-%COMP%] .form[_ngcontent-%COMP%] .group[_ngcontent-%COMP%]:last-child button[_ngcontent-%COMP%]:hover{background:#303030;box-shadow:0 4px 17px rgba(0,0,0,.35)}}"]}),t})()}];let jt=(()=>{class t{}return t.\u0275mod=i.Hb({type:t}),t.\u0275inj=i.Gb({factory:function(e){return new(e||t)},imports:[[o.f.forChild(Gt)],o.f]}),t})(),It=(()=>{class t{}return t.\u0275mod=i.Hb({type:t}),t.\u0275inj=i.Gb({factory:function(e){return new(e||t)},imports:[[r.b,jt,xt,St]]}),t})()}}]);