!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core"),require("@angular/forms"),require("@angular/common"),require("@angular/common/http"),require("@angular/flex-layout"),require("@angular/material"),require("@ngx-translate/core"),require("pip-webui2-layouts")):"function"==typeof define&&define.amd?define("pip-webui2-entry",["exports","@angular/core","@angular/forms","@angular/common","@angular/common/http","@angular/flex-layout","@angular/material","@ngx-translate/core","pip-webui2-layouts"],t):t(e["pip-webui2-entry"]={},e.ng.core,e.ng.forms,e.ng.common,e.ng.common.http,e.ng["flex-layout"],e.ng.material,e["^11"][0][1],e["^1"][1][21])}(this,function(e,t,r,n,a,i,o,p,s){"use strict";var l="^(?:(?:http(?:s)?|ftp)://)(?:\\S+(?::(?:\\S)*)?@)?(?:(?:[a-z0-9¡-￿](?:-)*)*(?:[a-z0-9¡-￿])+)(?:\\.(?:[a-z0-9¡-￿](?:-)*)*(?:[a-z0-9¡-￿])+)*(?:\\.(?:[a-z0-9¡-￿]){2,})(?::(?:\\d){2,5})?(?:/(?:\\S)*)?$",u="^([a-z0-9_\\.-]+)@([\\da-z\\.-]+).([a-z\\.]{2,6})$",d="^(?=.*\\d)(?=.*[a-z])(?=.*[A-Z])(?!.*\\s).{6,}$",m="^\\+[0-9]{10,15}$",c="^([a-zA-Z0-9_-]){3,12}$",h=function(){function e(e){this.fb=e,this.changeUrl=!1,this.isLoading=!1,this.title="Sign in",this.changeServerUrlName="Change server",this.showUrl=!0,this.serverUrlName="Server URL",this.serverUrlRequired="Server URL is required",this.serverUrlInvalid="Server URL is invalid",this.emailName="Email",this.emailRequired="Email is required",this.emailInvalid="Email URL is invalid",this.passwordName="Password",this.passwordRequired="Password is required",this.passwordInvalid="Password doesn't match the pattern. 6 letters and numbers in mixed case.",this.forgotTitle="Forgot password? ",this.signupText="Not a member? ",this.signupLinkText="Sign up here",this.signinName="SIGNIN",this.signinButtonColor="accent",this.abortName="ABORT",this.isTransparent=!1,this.submit=new t.EventEmitter,this.abort=new t.EventEmitter,this.forgot=new t.EventEmitter,this.signup=new t.EventEmitter,this.form=this.fb.group({url:[""],email:["",[r.Validators.required,r.Validators.pattern(u)]],password:["",[r.Validators.required]]})}return Object.defineProperty(e.prototype,"serverUrl",{set:function(e){this.form.get("url").setValue(e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"serverUrlPattern",{set:function(e){e&&(this.form.get("url").setValidators([r.Validators.required,r.Validators.pattern(e)]),this.form.get("url").updateValueAndValidity())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"email",{set:function(e){this.form.get("email").setValue(e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"emailPattern",{set:function(e){e&&(this.form.get("email").setValidators([r.Validators.required,r.Validators.pattern(e)]),this.form.get("email").updateValueAndValidity())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"password",{set:function(e){this.form.get("password").setValue(e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"passwordPattern",{set:function(e){e&&(this.form.get("password").setValidators([r.Validators.required,r.Validators.pattern(e)]),this.form.get("password").updateValueAndValidity())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"loading",{set:function(e){(this.isLoading=e)?this.form.disable():this.form.enable()},enumerable:!0,configurable:!0}),e.prototype.onSubmit=function(){this.form.updateValueAndValidity(),this.form.invalid||this.submit.emit({serverUrl:this.form.get("url").value,email:this.form.get("email").value,password:this.form.get("password").value})},e.prototype.onAbort=function(){this.abort.emit()},e.prototype.onForgot=function(){this.forgot.emit()},e.prototype.onSignup=function(){this.signup.emit()},e.prototype.toogleChangeUrl=function(){this.changeUrl=!0,this.form.get("url").setValidators([r.Validators.required,r.Validators.pattern(l)])},e.prototype.hasError=function(e,t){return this.form.get(e).getError(t)&&this.form.get(e).touched},e.decorators=[{type:t.Component,args:[{selector:"pip-signin",template:'<pip-shadow visible="true" attachmentSide="top"></pip-shadow>\r\n<pip-shadow visible="true" attachmentSide="left"></pip-shadow>\r\n<pip-shadow visible="true" attachmentSide="right"></pip-shadow>\r\n<pip-card-layout fxFlex="fill" [transparent]="isTransparent">\r\n    <mat-card>\r\n        <mat-card-content>\r\n            <mat-progress-bar mode="indeterminate" class="pip-loading" *ngIf="isLoading"></mat-progress-bar>\r\n            <div style="text-align: center">\r\n                <img class="pip-pic" src="{{ imageUrl }}" *ngIf="imageUrl">\r\n            </div>\r\n            <h2 class="pip-title">{{title | translate}}</h2>\r\n            <h4 class="pip-subtitle" [innerHTML]="subtitle" *ngIf="subtitle"></h4>\r\n\r\n            <p *ngIf="error" class="pip-error">\r\n                {{error.message || error}}\r\n            </p>\r\n            <form fxLayout="column" fxLayoutGap="16px" [formGroup]="form" (submit)="onSubmit()" (keyup.enter)="onSubmit()">\r\n                <div fxLayout="column" fxLayoutGap="8px">\r\n\r\n                    <a *ngIf="showUrl && !changeUrl" (click)="toogleChangeUrl()" class="pip-link pip-server">{{changeServerUrlName | translate}}</a>\r\n                    <mat-form-field *ngIf="showUrl && changeUrl">\r\n                        <input matInput [placeholder]="serverUrlName" type="url" id="serverUrl" name="serverUrl"\r\n                               formControlName="url" autocomplete="server-url" />\r\n                        <mat-error *ngIf="hasError(\'url\', \'required\')">{{serverUrlRequired | translate}}</mat-error>\r\n                        <mat-error *ngIf="hasError(\'url\', \'pattern\')">{{serverUrlInvalid | translate}}</mat-error>\r\n                    </mat-form-field>\r\n                    <mat-form-field>\r\n                        <input matInput [placeholder]="emailName" type="email" id="email" name="email" formControlName="email" autocomplete="email" />\r\n                        <mat-error *ngIf="hasError(\'email\', \'required\')">{{emailRequired | translate}}</mat-error>\r\n                        <mat-error *ngIf="hasError(\'email\', \'pattern\')">{{emailInvalid | translate}}</mat-error>\r\n                    </mat-form-field>\r\n                    <mat-form-field>\r\n                        <input matInput [placeholder]="passwordName" type="password" id="password" name="password"\r\n                               formControlName="password" autocomplete="current-password" />\r\n                        <mat-error *ngIf="hasError(\'password\', \'required\')">{{passwordRequired | translate}}</mat-error>\r\n                        <mat-error *ngIf="hasError(\'password\', \'pattern\')">{{passwordInvalid | translate}}</mat-error>\r\n                    </mat-form-field>\r\n\r\n                    <a (click)="onForgot()" *ngIf="forgotTitle && forgot" class="pip-link">{{forgotTitle | translate}}</a>\r\n\r\n                    <div fxLayout="row" fxLayoutAlign="center center" class="pip-footer">\r\n                        <button mat-raised-button *ngIf="!isLoading" type="button" fxFlex="100" [color]="signinButtonColor" [disabled]="form.invalid"\r\n                                (click)="onSubmit()">{{signinName | translate}}</button>\r\n                        <button mat-raised-button *ngIf="isLoading" type="button" fxFlex="100" color="warn" (click)="onAbort()">\r\n                            {{abortName | translate}} </button>\r\n                    </div>\r\n                    <p *ngIf="signupText && signupLinkText && signup" class="pip-footer-text">\r\n                        {{signupText | translate}} <a (click)="onSignup()" class="pip-link">{{signupLinkText | translate}}</a>\r\n                    </p>\r\n                </div>\r\n            </form>\r\n        </mat-card-content>\r\n    </mat-card>\r\n</pip-card-layout>',changeDetection:t.ChangeDetectionStrategy.OnPush,styles:[":host{position:relative;flex:1 1 100%;box-sizing:border-box;display:flex;flex-direction:column}.pip-subtitle{opacity:.54;font-weight:400}.pip-title{font-weight:500;font-size:20px;margin-top:0}.pip-footer{margin-top:8px;margin-bottom:4px!important}.pip-footer-text{margin-bottom:0}.pip-loading{position:absolute;width:100%;left:0;top:1px}.pip-pic{max-height:100px}"]}]}],e.ctorParameters=function(){return[{type:r.FormBuilder}]},e.propDecorators={title:[{type:t.Input}],subtitle:[{type:t.Input}],changeServerUrlName:[{type:t.Input}],showUrl:[{type:t.Input}],serverUrlName:[{type:t.Input}],serverUrl:[{type:t.Input}],imageUrl:[{type:t.Input}],serverUrlPattern:[{type:t.Input}],serverUrlRequired:[{type:t.Input}],serverUrlInvalid:[{type:t.Input}],emailName:[{type:t.Input}],email:[{type:t.Input}],emailPattern:[{type:t.Input}],emailRequired:[{type:t.Input}],emailInvalid:[{type:t.Input}],passwordName:[{type:t.Input}],password:[{type:t.Input}],passwordPattern:[{type:t.Input}],passwordRequired:[{type:t.Input}],passwordInvalid:[{type:t.Input}],forgotTitle:[{type:t.Input}],signupText:[{type:t.Input}],signupLinkText:[{type:t.Input}],error:[{type:t.Input}],loading:[{type:t.Input}],signinName:[{type:t.Input}],signinButtonColor:[{type:t.Input}],abortName:[{type:t.Input}],isTransparent:[{type:t.Input}],submit:[{type:t.Output}],abort:[{type:t.Output}],forgot:[{type:t.Output}],signup:[{type:t.Output}]},e}(),f=function(){function e(){}return e.decorators=[{type:t.NgModule,args:[{declarations:[h],imports:[s.PipCardLayoutModule,s.PipShadowModule,n.CommonModule,i.FlexLayoutModule,r.FormsModule,r.ReactiveFormsModule,a.HttpClientModule,p.TranslateModule,o.MatIconModule,o.MatButtonModule,o.MatCardModule,o.MatMenuModule,o.MatInputModule,o.MatSelectModule,o.MatProgressBarModule],exports:[h],providers:[]}]}],e}(),g=function(){function e(){this.changeUrl=!1,this.title="Sign up",this.changeServerUrlName="Change server",this.showUrl=!0,this.serverUrlName="Server URL",this.serverUrlPattern=l,this.serverUrlRequired="Server URL is required",this.serverUrlInvalid="Server URL is invalid",this.emailName="Email",this.emailPattern=u,this.emailRequired="Email is required",this.emailInvalid="Email URL is invalid",this.showName=!0,this.nameName="Full name",this.nameRequired="Name is required",this.passwordName="Password",this.passwordPattern=d,this.passwordRequired="Password is required",this.passwordInvalid="Must be at least 3 symbols",this.signinText="Do you have an account? ",this.signinLinkText="Sign in here",this.signupName="SIGNUP",this.abortName="ABORT",this.isTransparent=!1,this.signupButtonColor="accent",this.submit=new t.EventEmitter,this.abort=new t.EventEmitter,this.signin=new t.EventEmitter}return e.prototype.onSubmit=function(){this.submit.emit({serverUrl:this.serverUrl,email:this.email,password:this.password,name:this.name})},e.prototype.onAbort=function(){this.abort.emit()},e.prototype.onSignin=function(){this.signin.emit()},e.decorators=[{type:t.Component,args:[{selector:"pip-signup",template:'<pip-shadow visible="true" attachmentSide="top"></pip-shadow>\r\n<pip-shadow visible="true" attachmentSide="left"></pip-shadow>\r\n<pip-shadow visible="true" attachmentSide="right"></pip-shadow>\r\n<pip-card-layout fxFlex="fill" [transparent]="isTransparent">\r\n    <mat-card>\r\n        <mat-card-content>\r\n            <mat-progress-bar mode="indeterminate" class="pip-loading" *ngIf="loading"></mat-progress-bar>\r\n            <div style="text-align: center">\r\n                <img class="pip-pic" src="{{ imageUrl }}" *ngIf="imageUrl">\r\n            </div>\r\n            <h2 class="pip-title">{{title}}</h2>\r\n            <h4 class="pip-subtitle" [innerHTML]="subtitle" *ngIf="subtitle"></h4>\r\n\r\n            <p *ngIf="error" class="pip-error">\r\n                {{error.message || error}}\r\n            </p>\r\n            <form #_signupForm="ngForm" fxLayout="column" fxLayoutGap="16px">\r\n                <div fxLayout="column" fxLayoutGap="8px">\r\n\r\n                    <a *ngIf="showUrl && !changeUrl" (click)="changeUrl = true" class="pip-link pip-server">{{changeServerUrlName}}</a>\r\n                    <mat-form-field *ngIf="showUrl && changeUrl">\r\n                        <input matInput [placeholder]="serverUrlName" type="url" id="serverUrl" name="serverUrl"\r\n                               [(ngModel)]="serverUrl" #_serverUrl="ngModel" required [pattern]="serverUrlPattern" autocomplete="server-url" />\r\n                        <mat-error *ngIf="_serverUrl.errors?.required">{{serverUrlRequired}}</mat-error>\r\n                        <mat-error *ngIf="_serverUrl.errors?.pattern">{{serverUrlInvalid}}</mat-error>\r\n                    </mat-form-field>\r\n                    <mat-form-field *ngIf="showName">\r\n                        <input matInput [placeholder]="nameName" type="text" id="name" name="name" [(ngModel)]="name"\r\n                               #_name="ngModel" required autocomplete="name" />\r\n                        <mat-error *ngIf="_name.errors?.required && nameRequired">{{nameRequired}}</mat-error>\r\n                    </mat-form-field>\r\n                    <mat-form-field>\r\n                        <input matInput [placeholder]="emailName" type="email" id="email" name="email" [(ngModel)]="email"\r\n                               #_email="ngModel" required [pattern]="emailPattern" autocomplete="email" />\r\n                        <mat-error *ngIf="_email.errors?.required">{{emailRequired}}</mat-error>\r\n                        <mat-error *ngIf="_email.errors?.pattern">{{emailInvalid}}</mat-error>\r\n                    </mat-form-field>\r\n                    <mat-form-field>\r\n                        <input matInput [placeholder]="passwordName" type="password" id="password" name="password"\r\n                               [(ngModel)]="password" #_password="ngModel" required pattern="^\\w{3,}$" autocomplete="current-password" />\r\n                        <mat-error *ngIf="_password.errors?.required">{{passwordRequired}}</mat-error>\r\n                        <mat-error *ngIf="_password.errors?.pattern">{{passwordInvalid}}</mat-error>\r\n                    </mat-form-field>\r\n\r\n                    <p [innerHtml]="privacyLink" *ngIf="privacyLink"></p>\r\n\r\n                    <div fxLayout="row" fxLayoutAlign="center center" class="pip-footer">\r\n                        <button mat-raised-button *ngIf="!loading" type="button" fxFlex="100" [color]="signupButtonColor" [disabled]="!_signupForm.form.valid"\r\n                                (click)="onSubmit()">{{signupName}}</button>\r\n                        <button mat-raised-button *ngIf="loading" type="button" fxFlex="100" color="warn" (click)="onAbort()">\r\n                            {{abortName}} </button>\r\n                    </div>\r\n\r\n                    <p *ngIf="signinText && signinLinkText && signin" class="pip-footer-text">\r\n                        {{ signinText }} <a (click)="onSignin()" class="pip-link">{{ signinLinkText }}</a>\r\n                    </p>\r\n                </div>\r\n            </form>\r\n        </mat-card-content>\r\n    </mat-card>\r\n</pip-card-layout>',changeDetection:t.ChangeDetectionStrategy.OnPush,styles:[":host{display:block;position:relative;flex:1 1 100%;box-sizing:border-box;display:flex;flex-direction:column}.pip-subtitle{opacity:.54;font-weight:400}.pip-title{font-weight:500;font-size:20px;margin-top:0}.pip-footer{margin-top:8px;margin-bottom:4px!important}.pip-footer-text{margin-bottom:0}.pip-loading{position:absolute;width:100%;left:0;top:1px}.pip-pic{max-height:100px}"]}]}],e.ctorParameters=function(){return[]},e.propDecorators={title:[{type:t.Input}],subtitle:[{type:t.Input}],changeServerUrlName:[{type:t.Input}],showUrl:[{type:t.Input}],serverUrlName:[{type:t.Input}],serverUrl:[{type:t.Input}],serverUrlPattern:[{type:t.Input}],serverUrlRequired:[{type:t.Input}],serverUrlInvalid:[{type:t.Input}],imageUrl:[{type:t.Input}],emailName:[{type:t.Input}],email:[{type:t.Input}],emailPattern:[{type:t.Input}],emailRequired:[{type:t.Input}],emailInvalid:[{type:t.Input}],showName:[{type:t.Input}],nameName:[{type:t.Input}],name:[{type:t.Input}],nameRequired:[{type:t.Input}],passwordName:[{type:t.Input}],password:[{type:t.Input}],passwordPattern:[{type:t.Input}],passwordRequired:[{type:t.Input}],passwordInvalid:[{type:t.Input}],privacyLink:[{type:t.Input}],signinText:[{type:t.Input}],signinLinkText:[{type:t.Input}],error:[{type:t.Input}],loading:[{type:t.Input}],signupName:[{type:t.Input}],abortName:[{type:t.Input}],isTransparent:[{type:t.Input}],signupButtonColor:[{type:t.Input}],submit:[{type:t.Output}],abort:[{type:t.Output}],signin:[{type:t.Output}]},e}(),y=function(){function e(){}return e.decorators=[{type:t.NgModule,args:[{declarations:[g],imports:[s.PipCardLayoutModule,s.PipShadowModule,i.FlexLayoutModule,r.FormsModule,a.HttpClientModule,n.CommonModule,o.MatIconModule,o.MatButtonModule,o.MatCardModule,o.MatMenuModule,o.MatInputModule,o.MatSelectModule,o.MatProgressBarModule],exports:[g],providers:[]}]}],e}(),I=function(){function e(){this.changeUrl=!1,this.title="Reset",this.subtitle="Enter the email address together with the reset code you received in email from PipLife. Remember the code is only active for 24 hours.",this.changeServerUrlName="Change server",this.showUrl=!0,this.serverUrlName="Server URL",this.serverUrlPattern=l,this.serverUrlRequired="Server URL is required",this.serverUrlInvalid="Server URL is invalid",this.emailName="Email",this.emailPattern=u,this.emailRequired="Email is required",this.emailInvalid="Email URL is invalid",this.codeName="Reset code",this.codeRequired="Code is required",this.passwordName="Password",this.passwordPattern=d,this.passwordRequired="Password is required",this.passwordInvalid="Must be at least 3 symbols",this.cancelName="CANCEL",this.resetName="RESET",this.abortName="ABORT",this.isTransparent=!1,this.submit=new t.EventEmitter,this.abort=new t.EventEmitter,this.cancel=new t.EventEmitter}return e.prototype.onSubmit=function(){this.submit.emit({serverUrl:this.serverUrl,email:this.email,password:this.password,code:this.code})},e.prototype.onAbort=function(){this.abort.emit()},e.prototype.onCancel=function(){this.cancel.emit()},e.decorators=[{type:t.Component,args:[{selector:"pip-reset",template:'<pip-shadow visible="true" attachmentSide="top"></pip-shadow>\r\n<pip-shadow visible="true" attachmentSide="left"></pip-shadow>\r\n<pip-shadow visible="true" attachmentSide="right"></pip-shadow>\r\n<pip-card-layout fxFlex="fill" [transparent]="isTransparent">\r\n    <mat-card>\r\n        <mat-card-content>\r\n            <mat-progress-bar mode="indeterminate" class="pip-loading" *ngIf="loading"></mat-progress-bar>\r\n            <h2 class="pip-title">{{title}}</h2>\r\n            <h4 class="pip-subtitle" [innerHTML]="subtitle" *ngIf="subtitle"></h4>\r\n\r\n            <p *ngIf="error" class="pip-error">\r\n                {{error.message || error}}\r\n            </p>\r\n            <form #_resetForm="ngForm" fxLayout="column" fxLayoutGap="16px">\r\n                <div fxLayout="column" fxLayoutGap="8px">\r\n\r\n                    <a *ngIf="showUrl && !changeUrl" (click)="changeUrl = true" class="pip-link pip-server">{{changeServerUrlName}}</a>\r\n\r\n                    <mat-form-field *ngIf="showUrl && changeUrl">\r\n                        <input matInput [placeholder]="serverUrlName" type="url" id="serverUrl" name="serverUrl"\r\n                               [(ngModel)]="serverUrl" #_serverUrl="ngModel" required [pattern]="serverUrlPattern" autocomplete="server-url" />\r\n                        <mat-error *ngIf="_serverUrl.errors?.required">{{serverUrlRequired}}</mat-error>\r\n                        <mat-error *ngIf="_serverUrl.errors?.pattern">{{serverUrlInvalid}}</mat-error>\r\n                    </mat-form-field>\r\n                    <mat-form-field>\r\n                        <input matInput [placeholder]="emailName" type="email" id="email" name="email" [(ngModel)]="email"\r\n                               #_email="ngModel" required [pattern]="emailPattern" autocomplete="email" />\r\n                        <mat-error *ngIf="_email.errors?.required">{{emailRequired}}</mat-error>\r\n                        <mat-error *ngIf="_email.errors?.pattern">{{emailInvalid}}</mat-error>\r\n                    </mat-form-field>\r\n                    <mat-form-field>\r\n                        <input matInput [placeholder]="codeName" type="text" id="code" name="code" [(ngModel)]="code"\r\n                               #_code="ngModel" autocomplete="verification-code" required />\r\n                        <mat-error *ngIf="_code.errors?.required">{{codeRequired}}</mat-error>\r\n                    </mat-form-field>\r\n                    <mat-form-field>\r\n                        <input matInput [placeholder]="passwordName" type="password" id="password" name="password"\r\n                               [(ngModel)]="password" #_password="ngModel" autocomplete="new-password" required pattern="^\\w{3,}$" />\r\n                        <mat-error *ngIf="_password.errors?.required">{{passwordRequired}}</mat-error>\r\n                        <mat-error *ngIf="_password.errors?.pattern">{{passwordInvalid}}</mat-error>\r\n                    </mat-form-field>\r\n                </div>\r\n            </form>\r\n        </mat-card-content>\r\n        <mat-card-actions class="pip-footer" fxLayout="row" fxLayoutAlign="center center" fxLayoutGap="8px">\r\n            <div fxFlex></div>\r\n            <button mat-button *ngIf="!loading" type="button" (click)="onCancel()">{{cancelName}}</button>\r\n            <button mat-button *ngIf="!loading" type="button" color="accent" [disabled]="!_resetForm.form.valid"\r\n                    (click)="onSubmit()">{{resetName}}</button>\r\n            <button mat-button *ngIf="loading" type="button" color="warn" (click)="onAbort()"> {{abortName}} </button>\r\n        </mat-card-actions>\r\n    </mat-card>\r\n</pip-card-layout>',changeDetection:t.ChangeDetectionStrategy.OnPush,styles:[":host{display:block;position:relative;flex:1 1 100%;box-sizing:border-box;display:flex;flex-direction:column}.pip-subtitle{opacity:.54;font-weight:400}.pip-title{font-weight:500;font-size:20px;margin-top:0}.pip-footer{margin-top:8px;margin-bottom:4px!important}.pip-footer-text{margin-bottom:0}.pip-loading{position:absolute;width:100%;left:0;top:1px}"]}]}],e.ctorParameters=function(){return[]},e.propDecorators={title:[{type:t.Input}],subtitle:[{type:t.Input}],changeServerUrlName:[{type:t.Input}],showUrl:[{type:t.Input}],serverUrlName:[{type:t.Input}],serverUrl:[{type:t.Input}],serverUrlPattern:[{type:t.Input}],serverUrlRequired:[{type:t.Input}],serverUrlInvalid:[{type:t.Input}],emailName:[{type:t.Input}],email:[{type:t.Input}],emailPattern:[{type:t.Input}],emailRequired:[{type:t.Input}],emailInvalid:[{type:t.Input}],codeName:[{type:t.Input}],code:[{type:t.Input}],codeRequired:[{type:t.Input}],passwordName:[{type:t.Input}],password:[{type:t.Input}],passwordPattern:[{type:t.Input}],passwordRequired:[{type:t.Input}],passwordInvalid:[{type:t.Input}],error:[{type:t.Input}],loading:[{type:t.Input}],cancelName:[{type:t.Input}],resetName:[{type:t.Input}],abortName:[{type:t.Input}],isTransparent:[{type:t.Input}],submit:[{type:t.Output}],abort:[{type:t.Output}],cancel:[{type:t.Output}]},e}(),v=function(){function e(){}return e.decorators=[{type:t.NgModule,args:[{declarations:[I],imports:[s.PipCardLayoutModule,s.PipShadowModule,i.FlexLayoutModule,r.FormsModule,a.HttpClientModule,n.CommonModule,o.MatIconModule,o.MatButtonModule,o.MatCardModule,o.MatMenuModule,o.MatInputModule,o.MatSelectModule,o.MatProgressBarModule],exports:[I],providers:[]}]}],e}(),b=function(){function e(){this.changeUrl=!1,this.title="Forgot Password?",this.subtitle="Enter the email address you used when you joined and we'll send you instructions to reset your password. <br> <br> For security reasons, we do NOT store your password. So rest assured that we will never send your password via email.'",this.changeServerUrlName="Change server",this.showUrl=!0,this.serverUrlName="Server URL",this.serverUrlPattern=l,this.serverUrlRequired="Server URL is required",this.serverUrlInvalid="Server URL is invalid",this.emailName="Email",this.emailPattern=u,this.emailRequired="Email is required",this.emailInvalid="Email URL is invalid",this.cancelName="CANCEL",this.recoveryName="RECOVERY",this.abortName="ABORT",this.isTransparent=!1,this.submit=new t.EventEmitter,this.abort=new t.EventEmitter,this.cancel=new t.EventEmitter}return e.prototype.onSubmit=function(){this.submit.emit({serverUrl:this.serverUrl,email:this.email})},e.prototype.onAbort=function(){this.abort.emit()},e.prototype.onCancel=function(){this.cancel.emit()},e.decorators=[{type:t.Component,args:[{selector:"pip-recovery",template:'<pip-shadow visible="true" attachmentSide="top"></pip-shadow>\r\n<pip-shadow visible="true" attachmentSide="left"></pip-shadow>\r\n<pip-shadow visible="true" attachmentSide="right"></pip-shadow>\r\n<pip-card-layout fxFlex="fill" [transparent]="isTransparent">\r\n    <mat-card>\r\n        <mat-card-content>\r\n            <mat-progress-bar mode="indeterminate" class="pip-loading" *ngIf="loading"></mat-progress-bar>\r\n            <h2 class="pip-title">{{title}}</h2>\r\n            <h4 class="pip-subtitle" [innerHTML]="subtitle" *ngIf="subtitle"></h4>\r\n\r\n            <p *ngIf="error" class="pip-error">\r\n                {{error.message || error}}\r\n            </p>\r\n            <form #_recoveryForm="ngForm" fxLayout="column" fxLayoutGap="16px">\r\n                <div fxLayout="column" fxLayoutGap="8px">\r\n\r\n                    <a *ngIf="showUrl && !changeUrl" (click)="changeUrl = true" class="pip-link pip-server">{{changeServerUrlName}}</a>\r\n                    <mat-form-field *ngIf="showUrl && changeUrl">\r\n                        <input matInput [placeholder]="serverUrlName" type="url" id="serverUrl" name="serverUrl"\r\n                               [(ngModel)]="serverUrl" #_serverUrl="ngModel" required [pattern]="serverUrlPattern" autocomplete="server-url" />\r\n                        <mat-error *ngIf="_serverUrl.errors?.required">{{serverUrlRequired}}</mat-error>\r\n                        <mat-error *ngIf="_serverUrl.errors?.pattern">{{serverUrlInvalid}}</mat-error>\r\n                    </mat-form-field>\r\n                    <mat-form-field>\r\n                        <input matInput [placeholder]="emailName" type="email" id="email" name="email" [(ngModel)]="email"\r\n                               #_email="ngModel" required [pattern]="emailPattern" autocomplete="email" />\r\n                        <mat-error *ngIf="_email.errors?.required">{{emailRequired}}</mat-error>\r\n                        <mat-error *ngIf="_email.errors?.pattern">{{emailInvalid}}</mat-error>\r\n                    </mat-form-field>\r\n\r\n                </div>\r\n            </form>\r\n        </mat-card-content>\r\n\r\n        <mat-card-actions fxLayout="row" fxLayoutAlign="center center">\r\n            <div fxFlex></div>\r\n            <button mat-button *ngIf="!loading" type="button" (click)="onCancel()">{{cancelName}}</button>\r\n            <button mat-button *ngIf="!loading" type="button" color="accent" [disabled]="!_recoveryForm.form.valid"\r\n                    (click)="onSubmit()">{{recoveryName}}</button>\r\n            <button mat-button *ngIf="loading" type="button" color="warm" (click)="onAbort()"> {{abortName}} </button>\r\n        </mat-card-actions>\r\n    </mat-card>\r\n</pip-card-layout>',changeDetection:t.ChangeDetectionStrategy.OnPush,styles:[":host{display:block;position:relative;flex:1 1 100%;box-sizing:border-box;display:flex;flex-direction:column}.pip-subtitle{opacity:.54;font-weight:400}.pip-title{font-weight:500;font-size:20px;margin-top:0}.pip-footer{margin-top:8px;margin-bottom:4px!important}.pip-footer-text{margin-bottom:0}.pip-loading{position:absolute;width:100%;left:0;top:1px}"]}]}],e.ctorParameters=function(){return[]},e.propDecorators={title:[{type:t.Input}],subtitle:[{type:t.Input}],changeServerUrlName:[{type:t.Input}],showUrl:[{type:t.Input}],serverUrlName:[{type:t.Input}],serverUrl:[{type:t.Input}],serverUrlPattern:[{type:t.Input}],serverUrlRequired:[{type:t.Input}],serverUrlInvalid:[{type:t.Input}],emailName:[{type:t.Input}],email:[{type:t.Input}],emailPattern:[{type:t.Input}],emailRequired:[{type:t.Input}],emailInvalid:[{type:t.Input}],any:[{type:t.Input}],error:[{type:t.Input}],loading:[{type:t.Input}],cancelName:[{type:t.Input}],recoveryName:[{type:t.Input}],abortName:[{type:t.Input}],isTransparent:[{type:t.Input}],submit:[{type:t.Output}],abort:[{type:t.Output}],cancel:[{type:t.Output}]},e}(),w=function(){function e(){}return e.decorators=[{type:t.NgModule,args:[{declarations:[b],imports:[s.PipCardLayoutModule,s.PipShadowModule,i.FlexLayoutModule,r.FormsModule,a.HttpClientModule,n.CommonModule,o.MatIconModule,o.MatButtonModule,o.MatCardModule,o.MatMenuModule,o.MatInputModule,o.MatSelectModule,o.MatProgressBarModule],exports:[b],providers:[]}]}],e}(),x=function(){function e(){this.title="Verify email?",this.changeServerUrlName="Change server",this.codeName="Verification code",this.codePattern=c,this.codeRequired="Code is required",this.codeInvalid="Code is invalid",this.success="Code resend success.",this.emailName="Email",this.emailPattern=u,this.emailRequired="Email is required",this.emailInvalid="Email URL is invalid",this.cancelName="CANCEL",this.verificationName="VERIFICATION",this.abortName="ABORT",this.isTransparent=!1,this.resendText="If you haven't received the code, press ",this.resendText1="resend",this.resendLinkText=" to send it again.",this.showCancel=!0,this.submit=new t.EventEmitter,this.abort=new t.EventEmitter,this.cancel=new t.EventEmitter,this.resend=new t.EventEmitter}return e.prototype.onSubmit=function(){this.submit.emit({code:this.code,email:this.email})},e.prototype.onAbort=function(){this.abort.emit()},e.prototype.onResend=function(e){e&&(e.control.markAsTouched(),this.email&&e.valid&&(this.showSuccess=!1,this.resend.emit({email:this.email})))},e.prototype.onCancel=function(){this.cancel.emit()},e.prototype.onChangeEmail=function(){this.error=null,this.showSuccess=!1},e.prototype.onChangeCode=function(){this.error=null,this.showSuccess=!1},e.decorators=[{type:t.Component,args:[{selector:"pip-email-verification-dummy",template:'<pip-shadow visible="true" attachmentSide="top"></pip-shadow>\r\n<pip-shadow visible="true" attachmentSide="left"></pip-shadow>\r\n<pip-shadow visible="true" attachmentSide="right"></pip-shadow>\r\n<pip-card-layout fxFlex="fill" [transparent]="isTransparent">\r\n    <mat-card>\r\n        <mat-card-content>\r\n            <mat-progress-bar mode="indeterminate" class="pip-loading" *ngIf="loading"></mat-progress-bar>\r\n            <h2 class="pip-title">{{ title }}</h2>\r\n            <h4 class="pip-subtitle" [innerHTML]="subtitle" *ngIf="subtitle"></h4>\r\n\r\n            <p *ngIf="error" class="pip-error">\r\n                {{ error.message || error }}\r\n            </p>\r\n            <p *ngIf="showSuccess" class="pip-success">\r\n                {{ success }}\r\n            </p>\r\n            <form #_verificationForm="ngForm" fxLayout="column" fxLayoutGap="16px">\r\n                <div fxLayout="column" fxLayoutGap="8px">\r\n\r\n                    <mat-form-field>\r\n                        <input matInput [placeholder]="emailName" type="email" id="email" name="email" [(ngModel)]="email"\r\n                               #_email="ngModel" required [pattern]="emailPattern" (keyup)="onChangeEmail()" autocomplete="email" />\r\n                        <mat-error *ngIf="_email.errors?.required">{{ emailRequired }}</mat-error>\r\n                        <mat-error *ngIf="_email.errors?.pattern">{{ emailInvalid }}</mat-error>\r\n                    </mat-form-field>\r\n\r\n                    <mat-form-field>\r\n                        <input matInput [placeholder]="codeName" type="url" id="code" name="code" [(ngModel)]="code"\r\n                               #_code="ngModel" required [pattern]="codePattern" (keyup)="onChangeCode()" autocomplete="verification-code" />\r\n                        <mat-error *ngIf="_code.errors?.required">{{ codeRequired }}</mat-error>\r\n                        <mat-error *ngIf="_code.errors?.pattern">{{ codeInvalid }}</mat-error>\r\n                    </mat-form-field>\r\n\r\n                </div>\r\n            </form>\r\n\r\n            <p *ngIf="resendText && resendLinkText">\r\n                <span>{{ resendText }} </span>\r\n                <a (click)="onResend(_email)" class="pip-link">{{ resendLinkText }}</a>\r\n                <span>{{ resendText1 }}</span>\r\n            </p>\r\n        </mat-card-content>\r\n\r\n        <mat-card-actions fxLayout="row" fxLayoutAlign="center center" fxLayoutGap="8px">\r\n            <div fxFlex></div>\r\n            <button mat-button *ngIf="!loading && showCancel" type="button" (click)="onCancel()">{{cancelName}}</button>\r\n            <button mat-button *ngIf="!loading" type="button" color="accent" [disabled]="!_verificationForm.form.valid"\r\n                    (click)="onSubmit()">{{verificationName}}</button>\r\n            <button mat-button *ngIf="loading" type="button" color="warm" (click)="onAbort()"> {{abortName}} </button>\r\n        </mat-card-actions>\r\n    </mat-card>\r\n</pip-card-layout>',changeDetection:t.ChangeDetectionStrategy.OnPush,styles:[":host{display:block;position:relative;flex:1 1 100%;box-sizing:border-box;display:flex;flex-direction:column}.pip-subtitle{opacity:.54;font-weight:400}.pip-title{font-weight:500;font-size:20px;margin-top:0}.pip-footer{margin-top:8px;margin-bottom:4px!important}.pip-footer-text{margin-bottom:0}.pip-loading{position:absolute;width:100%;left:0;top:1px}"]}]}],e.ctorParameters=function(){return[]},e.propDecorators={title:[{type:t.Input}],subtitle:[{type:t.Input}],changeServerUrlName:[{type:t.Input}],codeName:[{type:t.Input}],code:[{type:t.Input}],codePattern:[{type:t.Input}],codeRequired:[{type:t.Input}],codeInvalid:[{type:t.Input}],success:[{type:t.Input}],showSuccess:[{type:t.Input}],emailName:[{type:t.Input}],email:[{type:t.Input}],emailPattern:[{type:t.Input}],emailRequired:[{type:t.Input}],emailInvalid:[{type:t.Input}],error:[{type:t.Input}],loading:[{type:t.Input}],cancelName:[{type:t.Input}],verificationName:[{type:t.Input}],abortName:[{type:t.Input}],isTransparent:[{type:t.Input}],resendText:[{type:t.Input}],resendText1:[{type:t.Input}],resendLinkText:[{type:t.Input}],showCancel:[{type:t.Input}],submit:[{type:t.Output}],abort:[{type:t.Output}],cancel:[{type:t.Output}],resend:[{type:t.Output}]},e}(),M=function(){function e(){}return e.decorators=[{type:t.NgModule,args:[{declarations:[x],imports:[s.PipCardLayoutModule,s.PipShadowModule,i.FlexLayoutModule,r.FormsModule,a.HttpClientModule,n.CommonModule,o.MatIconModule,o.MatButtonModule,o.MatCardModule,o.MatMenuModule,o.MatInputModule,o.MatSelectModule,o.MatProgressBarModule],exports:[x],providers:[]}]}],e}(),U=function(){function e(){this.title="Verify phone?",this.changeServerUrlName="Change server",this.codeName="Verification code",this.codePattern=c,this.codeRequired="Code is required",this.codeInvalid="Code is invalid",this.success="Code resend success.",this.phoneName="Phone",this.phonePattern=m,this.phoneRequired="Phone is required",this.phoneInvalid="Enter a valid phone in e.164 format: +xxxxxxxxxxx",this.cancelName="CANCEL",this.verificationName="VERIFICATION",this.abortName="ABORT",this.isTransparent=!1,this.resendText="If you haven't received the code, press ",this.resendText1="resend",this.resendLinkText=" to send it again.",this.showCancel=!0,this.submit=new t.EventEmitter,this.abort=new t.EventEmitter,this.cancel=new t.EventEmitter,this.resend=new t.EventEmitter}return e.prototype.onSubmit=function(){this.submit.emit({code:this.code,phone:this.phone})},e.prototype.onAbort=function(){this.abort.emit()},e.prototype.onResend=function(e){e&&(e.control.markAsTouched(),this.phone&&e.valid&&(this.showSuccess=!1,this.resend.emit({phone:this.phone})))},e.prototype.onCancel=function(){this.cancel.emit()},e.prototype.onChangePhone=function(){this.error=null,this.showSuccess=!1},e.prototype.onChangeCode=function(){this.error=null,this.showSuccess=!1},e.decorators=[{type:t.Component,args:[{selector:"pip-phone-verification-dummy",template:'<pip-shadow visible="true" attachmentSide="top"></pip-shadow>\r\n<pip-shadow visible="true" attachmentSide="left"></pip-shadow>\r\n<pip-shadow visible="true" attachmentSide="right"></pip-shadow>\r\n<pip-card-layout fxFlex="fill" [transparent]="isTransparent">\r\n    <mat-card>\r\n        <mat-card-content>\r\n            <mat-progress-bar mode="indeterminate" class="pip-loading" *ngIf="loading"></mat-progress-bar>\r\n            <h2 class="pip-title">{{ title }}</h2>\r\n            <h4 class="pip-subtitle" [innerHTML]="subtitle" *ngIf="subtitle"></h4>\r\n\r\n            <p *ngIf="error" class="pip-error">\r\n                {{ error.message || error }}\r\n            </p>\r\n            <p *ngIf="showSuccess" class="pip-success">\r\n                {{ success }}\r\n            </p>\r\n            <form #_verificationForm="ngForm" fxLayout="column" fxLayoutGap="16px">\r\n                <div fxLayout="column" fxLayoutGap="8px">\r\n\r\n                    <mat-form-field>\r\n                        <input matInput [placeholder]="phoneName" type="phone" id="phone" name="phone" [(ngModel)]="phone"\r\n                               #_phone="ngModel" required [pattern]="phonePattern" (keyup)="onChangePhone()" autocomplete="phone-number" />\r\n                        <mat-error *ngIf="_phone.errors?.required">{{ phoneRequired }}</mat-error>\r\n                        <mat-error *ngIf="_phone.errors?.pattern">{{ phoneInvalid }}</mat-error>\r\n                    </mat-form-field>\r\n\r\n                    <mat-form-field>\r\n                        <input matInput [placeholder]="codeName" type="url" id="code" name="code" [(ngModel)]="code"\r\n                               #_code="ngModel" required [pattern]="codePattern" (keyup)="onChangeCode()" autocomplete="verification-code" />\r\n                        <mat-error *ngIf="_code.errors?.required">{{ codeRequired }}</mat-error>\r\n                        <mat-error *ngIf="_code.errors?.pattern">{{ codeInvalid }}</mat-error>\r\n                    </mat-form-field>\r\n\r\n                </div>\r\n            </form>\r\n\r\n            <p *ngIf="resendText && resendLinkText">\r\n                <span>{{ resendText }} </span>\r\n                <a (click)="onResend(_phone)" class="pip-link">{{ resendLinkText }}</a>\r\n                <span>{{ resendText1 }}</span>\r\n            </p>\r\n        </mat-card-content>\r\n\r\n        <mat-card-actions fxLayout="row" fxLayoutAlign="center center" fxLayoutGap="8px">\r\n            <div fxFlex></div>\r\n            <button mat-button *ngIf="!loading && showCancel" type="button" (click)="onCancel()">{{cancelName}}</button>\r\n            <button mat-button *ngIf="!loading" type="button" color="accent" [disabled]="!_verificationForm.form.valid"\r\n                    (click)="onSubmit()">{{verificationName}}</button>\r\n            <button mat-button *ngIf="loading" type="button" color="warm" (click)="onAbort()"> {{abortName}} </button>\r\n        </mat-card-actions>\r\n    </mat-card>\r\n</pip-card-layout>',changeDetection:t.ChangeDetectionStrategy.OnPush,styles:[":host{display:block;position:relative;flex:1 1 100%;box-sizing:border-box;display:flex;flex-direction:column}.pip-subtitle{opacity:.54;font-weight:400}.pip-title{font-weight:500;font-size:20px;margin-top:0}.pip-footer{margin-top:8px;margin-bottom:4px!important}.pip-footer-text{margin-bottom:0}.pip-loading{position:absolute;width:100%;left:0;top:1px}"]}]}],e.ctorParameters=function(){return[]},e.propDecorators={title:[{type:t.Input}],subtitle:[{type:t.Input}],changeServerUrlName:[{type:t.Input}],codeName:[{type:t.Input}],code:[{type:t.Input}],codePattern:[{type:t.Input}],codeRequired:[{type:t.Input}],codeInvalid:[{type:t.Input}],success:[{type:t.Input}],showSuccess:[{type:t.Input}],phoneName:[{type:t.Input}],phone:[{type:t.Input}],phonePattern:[{type:t.Input}],phoneRequired:[{type:t.Input}],phoneInvalid:[{type:t.Input}],error:[{type:t.Input}],loading:[{type:t.Input}],cancelName:[{type:t.Input}],verificationName:[{type:t.Input}],abortName:[{type:t.Input}],isTransparent:[{type:t.Input}],resendText:[{type:t.Input}],resendText1:[{type:t.Input}],resendLinkText:[{type:t.Input}],showCancel:[{type:t.Input}],submit:[{type:t.Output}],abort:[{type:t.Output}],cancel:[{type:t.Output}],resend:[{type:t.Output}]},e}(),N=function(){function e(){}return e.decorators=[{type:t.NgModule,args:[{declarations:[U],imports:[s.PipCardLayoutModule,s.PipShadowModule,i.FlexLayoutModule,r.FormsModule,a.HttpClientModule,n.CommonModule,o.MatIconModule,o.MatButtonModule,o.MatCardModule,o.MatMenuModule,o.MatInputModule,o.MatSelectModule,o.MatProgressBarModule],exports:[U],providers:[]}]}],e}();e.PipSigninComponent=h,e.PipSigninModule=f,e.PipSignupComponent=g,e.PipSignupModule=y,e.PipResetComponent=I,e.PipResetModule=v,e.PipRecoveryComponent=b,e.PipRecoveryModule=w,e.PipEmailVerificationDummyComponent=x,e.PipEmailVerificationDummyModule=M,e.PipPhoneVerificationDummyComponent=U,e.PipPhoneVerificationDummyModule=N,e.REGEX_STRING_SERVER_URL=l,e.REGEX_STRING_EMAIL=u,e.REGEX_STRING_PASSWORD=d,e.REGEX_STRING_PHONE=m,e.REGEX_STRING_CODE=c,Object.defineProperty(e,"__esModule",{value:!0})});
//# sourceMappingURL=pip-webui2-entry.umd.min.js.map