@coolon/angular-ui-powerups 0.0.77 → 0.0.78
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundles/coolon-angular-ui-powerups.umd.js +27 -29
- package/bundles/coolon-angular-ui-powerups.umd.js.map +1 -1
- package/bundles/coolon-angular-ui-powerups.umd.min.js +1 -1
- package/bundles/coolon-angular-ui-powerups.umd.min.js.map +1 -1
- package/coolon-angular-ui-powerups.metadata.json +1 -1
- package/esm2015/lib/interaction/components/activity-container/activity-container.component.js +3 -5
- package/esm2015/lib/place/components/abstract-place-navigation.component.js +15 -11
- package/esm2015/lib/place/components/list-place-nav/list-place-nav.component.js +3 -3
- package/esm2015/lib/place/components/place-outlet/place-outlet.component.js +1 -1
- package/esm2015/lib/place/components/tabbed-place-navigation/tabbed-place-navigation.component.js +2 -2
- package/esm2015/lib/place/place-history.js +4 -17
- package/esm2015/lib/place/route/guards/leave-place.guard.js +1 -2
- package/esm5/lib/interaction/components/activity-container/activity-container.component.js +3 -5
- package/esm5/lib/place/components/abstract-place-navigation.component.js +19 -11
- package/esm5/lib/place/components/list-place-nav/list-place-nav.component.js +3 -3
- package/esm5/lib/place/components/place-outlet/place-outlet.component.js +1 -1
- package/esm5/lib/place/components/tabbed-place-navigation/tabbed-place-navigation.component.js +2 -2
- package/esm5/lib/place/place-history.js +4 -14
- package/esm5/lib/place/route/guards/leave-place.guard.js +1 -1
- package/fesm2015/coolon-angular-ui-powerups.js +23 -33
- package/fesm2015/coolon-angular-ui-powerups.js.map +1 -1
- package/fesm5/coolon-angular-ui-powerups.js +27 -29
- package/fesm5/coolon-angular-ui-powerups.js.map +1 -1
- package/lib/place/components/abstract-place-navigation.component.d.ts +3 -3
- package/lib/place/place-history.d.ts +1 -3
- package/package.json +1 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@angular/common"),require("@angular/core"),require("@angular/forms"),require("@angular/material"),require("@angular/material/tabs"),require("@angular/platform-browser/animations"),require("@coolon/pectin"),require("@angular/cdk/portal"),require("@angular/router"),require("lodash"),require("@coolon/typescript-utilities"),require("@angular/material/dialog"),require("@angular/material/icon"),require("@angular/material/list"),require("@angular/material/tooltip"),require("@typescript-plus/fast-memoize-decorator/dist/src"),require("@typescript-plus/fast-memoize-decorator"),require("reflect-metadata"),require("@angular/animations"),require("resize-observer-polyfill")):"function"==typeof define&&define.amd?define("@coolon/angular-ui-powerups",["exports","@angular/common","@angular/core","@angular/forms","@angular/material","@angular/material/tabs","@angular/platform-browser/animations","@coolon/pectin","@angular/cdk/portal","@angular/router","lodash","@coolon/typescript-utilities","@angular/material/dialog","@angular/material/icon","@angular/material/list","@angular/material/tooltip","@typescript-plus/fast-memoize-decorator/dist/src","@typescript-plus/fast-memoize-decorator","reflect-metadata","@angular/animations","resize-observer-polyfill"],e):e(((t=t||self).coolon=t.coolon||{},t.coolon["angular-ui-powerups"]={}),t.ng.common,t.ng.core,t.ng.forms,t.ng.material,t.ng.material.tabs,t.ng.platformBrowser.animations,t.pectin,t.ng.cdk.portal,t.ng.router,t.___default,t.typescriptUtilities,t.ng.material.dialog,t.ng.material.icon,t.ng.material.list,t.ng.material.tooltip,t.src,t.fastMemoizeDecorator,null,t.ng.animations,t.ResizeObserver)}(this,(function(t,e,n,i,o,r,a,s,c,u,l,p,d,f,m,y,h,g,v,b,P){"use strict";var C="default"in l?l.default:l;P=P&&P.hasOwnProperty("default")?P.default:P;var I=function(t,e){return(I=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)};function M(t,e){function n(){this.constructor=t}I(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var O=function(){return(O=Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)};function D(t,e,n,i){var o,r=arguments.length,a=r<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,i);else for(var s=t.length-1;s>=0;s--)(o=t[s])&&(a=(r<3?o(a):r>3?o(e,n,a):o(e,n))||a);return r>3&&a&&Object.defineProperty(e,n,a),a}function R(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)}function A(t,e,n,i){return new(n||(n=Promise))((function(o,r){function a(t){try{c(i.next(t))}catch(t){r(t)}}function s(t){try{c(i.throw(t))}catch(t){r(t)}}function c(t){t.done?o(t.value):new n((function(e){e(t.value)})).then(a,s)}c((i=i.apply(t,e||[])).next())}))}function w(t,e){var n,i,o,r,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return r={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(r[Symbol.iterator]=function(){return this}),r;function s(r){return function(s){return function(r){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,i&&(o=2&r[0]?i.return:r[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,r[1])).done)return o;switch(i=0,o&&(r=[2&r[0],o.value]),r[0]){case 0:case 1:o=r;break;case 4:return a.label++,{value:r[1],done:!1};case 5:a.label++,i=r[1],r=[0];continue;case 7:r=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===r[0]||2===r[0])){a=0;continue}if(3===r[0]&&(!o||r[1]>o[0]&&r[1]<o[3])){a.label=r[1];break}if(6===r[0]&&a.label<o[1]){a.label=o[1],o=r;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(r);break}o[2]&&a.ops.pop(),a.trys.pop();continue}r=e.call(t,a)}catch(t){r=[6,t],i=0}finally{n=o=0}if(5&r[0])throw r[1];return{value:r[0]?r[1]:void 0,done:!0}}([r,s])}}}function x(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var i,o,r=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(i=r.next()).done;)a.push(i.value)}catch(t){o={error:t}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return a}function _(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(x(arguments[e]));return t}var F=function(t){function e(e){var n=t.call(this)||this;return n.elementRef=e,n._commandParameterProvided=!1,n}return M(e,t),Object.defineProperty(e.prototype,"commandParameter",{get:function(){return this._commandParameter},set:function(t){this._commandParameterProvided=!0,this._commandParameter=t},enumerable:!0,configurable:!0}),e.prototype.ngOnInit=function(){s.assert.notNil(this.pectinCommand),this.pectinCommand instanceof s.UnaryCommand?this._commandParameterProvided||s.lang.illegalState("UnaryCommands required the command parameter to be specified."):this._commandParameterProvided&&s.lang.illegalState("command parameters are only supported by UnaryCommands")},e.prototype.ngAfterViewInit=function(){var t=this;(0,s.Dsl.disposeWith(this).chain)(this.pectinCommand.enabled).subscribe((function(e){e?(t.elementRef.nativeElement.removeAttribute("disabled"),"A"===t.elementRef.nativeElement.tagName&&t.elementRef.nativeElement.setAttribute("href","javascript:void")):(t.elementRef.nativeElement.setAttribute("disabled","disabled"),"A"===t.elementRef.nativeElement.tagName&&t.elementRef.nativeElement.removeAttribute("href"))}))},e.prototype.ngOnDestroy=function(){this.dispose()},e.prototype.notifyClick=function(t){t.preventDefault(),t.stopPropagation(),this.pectinCommand.enabled.value?this.pectinCommand instanceof s.UnaryCommand?this.pectinCommand.withContext({event:t}).execute(this.commandParameter):this.pectinCommand.withContext({event:t}).execute():console.warn("disabled command clicked, ignoring.")},e.decorators=[{type:n.Directive,args:[{selector:"[pectinCommand]"}]}],e.ctorParameters=function(){return[{type:n.ElementRef,decorators:[{type:n.Inject,args:[n.ElementRef]}]}]},e.propDecorators={pectinCommand:[{type:n.Input}],commandParameter:[{type:n.Input}],notifyClick:[{type:n.HostListener,args:["click",["$event"]]}]},e}(s.GarbageCollector);var j=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return M(e,t),e.prototype.ngOnDestroy=function(){this.dispose()},e}(s.GarbageCollector),S=function(t){function i(e,n,i){var o=t.call(this)||this;return o.el=e,o.ngZone=n,o.document=i,o}return M(i,t),i.prototype.onFocusIn=function(){this.hasBinding()&&this.pectinFocusBinding.focusContext.notifyFocusIn()},i.prototype.onFocusOut=function(){this.hasBinding()&&this.pectinFocusBinding.focusContext.notifyFocusOut()},i.prototype.ngOnInit=function(){},i.prototype.ngAfterViewInit=function(){var t=this;this.hasBinding()?(0,s.Dsl.disposeWith(this).chain)(this.pectinFocusBinding.focusContext.focused).subscribe((function(e){e&&!t.alreadyHasFocus()&&t.tryAndFocus()})):s.Logger.get(this).warn("pectinFocusBinding was nil")},i.prototype.hasBinding=function(){return!!this.pectinFocusBinding&&!!this.pectinFocusBinding.focusContext},i.prototype.alreadyHasFocus=function(){return this.isFocused(this.focusTarget)},i.prototype.isFocused=function(t){return this.document.activeElement===t},i.prototype.tryAndFocus=function(t){var e=this;void 0===t&&(t=5),this.modelShouldStillHaveFocus()&&this.canFocus()&&(this.alreadyHasFocus()||this.focusTarget.focus(),this.alreadyHasFocus()||(s.Logger.get(this).log("focus failed, trying "+t+" more times"),t>0?requestAnimationFrame((function(){e.tryAndFocus(t-1)})):s.Logger.get(this).warn("Tried to focus but gave up as the component wasn't enabled or visible.")))},Object.defineProperty(i.prototype,"focusTarget",{get:function(){return this.focusBindingTarget||this.el.nativeElement},enumerable:!0,configurable:!0}),i.prototype.modelShouldStillHaveFocus=function(){return this.hasBinding()&&this.pectinFocusBinding.focusContext.focused.value},i.prototype.canFocus=function(){var t=this.focusTarget.getBoundingClientRect();return t.height>=0&&t.height>=0&&!this.focusTarget.disabled},i.decorators=[{type:n.Directive,args:[{selector:"[pectinFocusBinding]"}]}],i.ctorParameters=function(){return[{type:n.ElementRef,decorators:[{type:n.Inject,args:[n.ElementRef]}]},{type:n.NgZone,decorators:[{type:n.Inject,args:[n.NgZone]}]},{type:void 0,decorators:[{type:n.Inject,args:[e.DOCUMENT]}]}]},i.propDecorators={pectinFocusBinding:[{type:n.Input}],focusBindingTarget:[{type:n.Input}],onFocusIn:[{type:n.HostListener,args:["focusin"]}],onFocusOut:[{type:n.HostListener,args:["focusout"]}]},i}(j);var E=function(){function t(){}return t.decorators=[{type:n.NgModule,args:[{declarations:[F,S],imports:[e.CommonModule,a.BrowserAnimationsModule,i.FormsModule,o.MatInputModule,o.MatFormFieldModule,o.MatSelectModule,r.MatTabsModule],exports:[F,S]}]}],t}(),T=function(t){function e(){var e=t.call(this)||this;e.valueModel=new s.DelegatingFormValueModel,e.focus=new n.EventEmitter,e.blur=new n.EventEmitter,e.enterKey=new n.EventEmitter,e.escapeKey=new n.EventEmitter;var i=e;return e.errorStateMatcher={isErrorState:function(t,e){return i.hasErrors()}},e}return M(e,t),Object.defineProperty(e.prototype,"userValueModel",{set:function(t){this.valueModel.setDelegate(t)},enumerable:!0,configurable:!0}),e.prototype.notifyClick=function(){this.safelyInvoke(this.clickCommand)},e.prototype.notifyFocusIn=function(){this.safelyInvoke(this.focusCommand),this.focus.emit()},e.prototype.notifyFocusOut=function(){this.safelyInvoke(this.blurCommand),this.blur.emit()},e.prototype.notifyEnterKey=function(){this.safelyInvoke(this.enterCommand),this.enterKey.emit()},e.prototype.notifyEscapeKey=function(){this.safelyInvoke(this.escapeCommand),this.escapeKey.emit()},e.prototype.safelyInvoke=function(t){t&&t.enabled.value&&t.execute()},e.prototype.ngOnInit=function(){},e.prototype.isEnabled=function(){return this.enabled.value},Object.defineProperty(e.prototype,"enabled",{get:function(){return this.valueModel.enabled},enumerable:!0,configurable:!0}),e.prototype.hasErrors=function(){return!this.errorList.query().isEmpty()},Object.defineProperty(e.prototype,"errorList",{get:function(){return this.valueModel.errorList},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"firstError",{get:function(){return this.hasErrors()?this.errorList.value[0]:null},enumerable:!0,configurable:!0}),e.propDecorators={userValueModel:[{type:n.Input,args:["valueModel"]}],label:[{type:n.Input}],floatLabel:[{type:n.Input}],hint:[{type:n.Input}],placeholder:[{type:n.Input}],focusCommand:[{type:n.Input,args:["command.focus"]}],blurCommand:[{type:n.Input,args:["command.blur"]}],enterCommand:[{type:n.Input,args:["command.enter"]}],escapeCommand:[{type:n.Input,args:["command.escape"]}],clickCommand:[{type:n.Input,args:["command.click"]}],focus:[{type:n.Output}],blur:[{type:n.Output}],enterKey:[{type:n.Output}],escapeKey:[{type:n.Output}],notifyClick:[{type:n.HostListener,args:["click"]}],notifyFocusIn:[{type:n.HostListener,args:["focusin"]}],notifyFocusOut:[{type:n.HostListener,args:["focusout"]}]},D([s.UseDelegate(),R("design:type",s.ValueModel),R("design:paramtypes",[s.ValueModel])],e.prototype,"userValueModel",null),e}(j);var N=function(t){function e(){return t.call(this)||this}return M(e,t),e.prototype.ngOnInit=function(){},e.decorators=[{type:n.Component,args:[{selector:"aup-number-input",template:'<mat-form-field appearance="standard" [floatLabel]="floatLabel">\n <mat-label *ngIf="label">{{label}}</mat-label>\n <input type="number"\n matInput\n placeholder="{{placeholder}}"\n [(ngModel)]="valueModel.value"\n [disabled]="!enabled.value"\n (keydown.enter)="notifyEnterKey()"\n (keydown.escape)="notifyEscapeKey()"\n [pectinFocusBinding]="valueModel"\n [errorStateMatcher]="errorStateMatcher"\n >\n <mat-hint *ngIf="hint">{{hint}}</mat-hint>\n <mat-error *ngIf="hasErrors">{{firstError}}</mat-error>\n</mat-form-field>\n',styles:[":host{display:block}input,mat-form-field{width:100%}input mat-hint.faux-error,mat-form-field mat-hint.faux-error{color:#f44336}"]}]}],e.ctorParameters=function(){return[]},e}(T),L=function(t){function e(){return t.call(this)||this}return M(e,t),e.prototype.ngOnInit=function(){},e.decorators=[{type:n.Component,args:[{selector:"aup-password-input",template:'<mat-form-field appearance="standard" [floatLabel]="floatLabel">\n <mat-label *ngIf="label">{{label}}</mat-label>\n <input type="password"\n matInput\n placeholder="{{placeholder}}"\n [(ngModel)]="valueModel.value"\n [disabled]="!enabled.value"\n (keydown.enter)="notifyEnterKey()"\n (keydown.escape)="notifyEscapeKey()"\n [pectinFocusBinding]="valueModel"\n [errorStateMatcher]="errorStateMatcher"\n >\n <mat-hint *ngIf="hint">{{hint}}</mat-hint>\n <mat-error *ngIf="hasErrors">{{firstError}}</mat-error>\n</mat-form-field>\n\n',styles:[":host{display:block}input,mat-form-field{width:100%}input mat-hint.faux-error,mat-form-field mat-hint.faux-error{color:#f44336}"]}]}],e.ctorParameters=function(){return[]},e}(T),k=function(t){function e(){var e=t.call(this)||this;return e.optionLabelFormat=function(t){return t&&e.optionLabel?t[e.optionLabel]:t},e}return M(e,t),e.prototype.ngOnInit=function(){},e.decorators=[{type:n.Component,args:[{selector:"aup-select-input",template:'<mat-form-field appearance="standard" [floatLabel]="floatLabel">\n <mat-label *ngIf="label">{{label}}</mat-label>\n <mat-select placeholder="{{placeholder}}"\n [(ngModel)]="valueModel.value"\n [disabled]="!enabled.value"\n (keydown.enter)="notifyEnterKey()"\n (keydown.escape)="notifyEscapeKey()"\n [pectinFocusBinding]="valueModel"\n [errorStateMatcher]="errorStateMatcher"\n >\n <mat-option *ngFor="let option of optionsModel.value" [value]="option">{{optionLabelFormat(option)}}\n </mat-option>\n </mat-select>\n <mat-hint *ngIf="hint">{{hint}}</mat-hint>\n <mat-error *ngIf="hasErrors">{{firstError}}</mat-error>\n</mat-form-field>\n',styles:[":host{display:inline-block}mat-form-field{width:100%}"]}]}],e.ctorParameters=function(){return[]},e.propDecorators={optionsModel:[{type:n.Input}],options:[{type:n.Input}],optionLabel:[{type:n.Input}],optionLabelFormat:[{type:n.Input}]},D([s.UseDelegate(),R("design:type",s.ListModel)],e.prototype,"optionsModel",void 0),D([s.StoreInListModel("optionsModel"),R("design:type",Array)],e.prototype,"options",void 0),e}(T);var V=function(t){function e(){return t.call(this)||this}return M(e,t),e.prototype.ngOnInit=function(){},e.decorators=[{type:n.Component,args:[{selector:"aup-string-input",template:'<mat-form-field appearance="standard" [floatLabel]="floatLabel">\n <mat-label *ngIf="label">{{label}}</mat-label>\n <input matInput\n placeholder="{{placeholder}}"\n [(ngModel)]="valueModel.value"\n [disabled]="!enabled.value"\n (keydown.enter)="notifyEnterKey()"\n (keydown.escape)="notifyEscapeKey()"\n [pectinFocusBinding]="valueModel"\n [errorStateMatcher]="errorStateMatcher"\n >\n <mat-hint *ngIf="hint">{{hint}}</mat-hint>\n <mat-error *ngIf="hasErrors">{{firstError}}</mat-error>\n</mat-form-field>\n\n',styles:[":host{display:block}input,mat-form-field{width:100%}input mat-hint.faux-error,mat-form-field mat-hint.faux-error{color:#f44336}"]}]}],e.ctorParameters=function(){return[]},e}(T),B=function(){function t(){}return t.decorators=[{type:n.Component,args:[{selector:"aup-noop",template:"",styles:[":host{display:block}"]}]}],t.ctorParameters=function(){return[]},t}(),U=function(){function t(){}return t.decorators=[{type:n.NgModule,args:[{declarations:[N,V,L,k,B],imports:[e.CommonModule,a.BrowserAnimationsModule,i.FormsModule,o.MatInputModule,o.MatFormFieldModule,o.MatSelectModule,r.MatTabsModule,E],exports:[N,V,L,k,B]}]}],t}(),H=function(t){function e(){return t.call(this)||this}return M(e,t),Object.defineProperty(e.prototype,"currentActivity",{get:function(){return l.last(this.activityList.value)},enumerable:!0,configurable:!0}),e}(s.GarbageCollector);var q=new n.InjectionToken("InteractionActivityData");t.ɵbd=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e._busyModel=(new s.DelegatingValueModel).withDefault(!1),e}return M(e,t),e.prototype.initialise=function(t){p.assert.isNil(this._activityContext),this._activityContext=t},e.prototype.done=function(t){return this._activityContext.onDone(t)},e.prototype.cancel=function(t){this._activityContext.onCancel(t)},e.prototype.onActivityReady=function(){},Object.defineProperty(e.prototype,"busy",{get:function(){return this._busyModel.readonly},enumerable:!0,configurable:!0}),e.prototype.busyWhile=function(t){this._busyModel.setDelegate(t)},e.prototype.isBusy=function(){return this._busyModel.value},e}(s.GarbageCollector),function(t){function e(){}t.Callbacks=e}(t.ɵbd||(t.ɵbd={}));var z=function(){function t(t,e,n){this.componentFactoryResolver=t,this.viewContainerRef=e,this.injector=n}return Object.defineProperty(t.prototype,"activityContext",{get:function(){return this._activityContext},set:function(t){s.assert.isNil(this._activityContext),this._activityContext=t,this.loadActivity(t)},enumerable:!0,configurable:!0}),t.prototype.ngOnInit=function(){},t.prototype.loadActivity=function(t){var e=n.Injector.create({providers:[{provide:H,useValue:this.interactionContext},{provide:q,useValue:t.activityData}],parent:this.injector}),i=this.componentFactoryResolver.resolveComponentFactory(t.activityClass);this.viewContainerRef.clear(),this.activityComponentRef=this.viewContainerRef.createComponent(i,0,e),this.activityComponentRef.instance.initialise(t),this.activityContext.componentReady&&this.activityContext.componentReady(this.component)},Object.defineProperty(t.prototype,"component",{get:function(){return this.activityComponentRef.instance},enumerable:!0,configurable:!0}),t.decorators=[{type:n.Component,args:[{selector:"aup-activity-outlet",template:"",styles:[":host{display:block}"]}]}],t.ctorParameters=function(){return[{type:n.ComponentFactoryResolver},{type:n.ViewContainerRef},{type:n.Injector}]},t.propDecorators={interactionContext:[{type:n.Input}],activityContext:[{type:n.Input}]},t}();var G=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return M(e,t),e}(t.ɵbd),K=function(t){function e(e){var n=t.call(this)||this;return n.alert=e,n}return M(e,t),e.prototype.ngOnInit=function(){},e.decorators=[{type:n.Component,args:[{selector:"aup-alert-dialog",template:'<h3 matDialogTitle *ngIf="alert.title">{{alert.title()}}</h3>\n<div matDialogContent>\n <p *ngFor="let line of alert.content()">{{line}}</p>\n</div>\n<p matDialogActions>\n <button mat-raised-button color="primary" (click)="done()" data-cy="close-button">{{alert.ok()}}</button>\n</p>\n',styles:[":host{display:block;padding:var(--aup-default-padding)}.mat-dialog-actions{justify-content:flex-end}"]}]}],e.ctorParameters=function(){return[{type:void 0,decorators:[{type:n.Inject,args:[q]}]}]},e}(G);t.ɵbf=function(t){function e(e,n){var i=t.call(this)||this;return i.config=e,i.interactionContext=n,s.assert.notNil(e),i}return M(e,t),e.prototype.ngOnInit=function(){},Object.defineProperty(e.prototype,"confirm",{get:function(){return this.config.confirm},enumerable:!0,configurable:!0}),e.prototype.isDestructive=function(){return this.confirm.destructive&&this.confirm.destructive()},e.prototype.onConfirm=function(){var t=this;this.interactionContext.startActivity(this.config.activityType,this.config.data).then((function(e){return t.done(e)})).catch((function(e){return t.cancel(e)}))},e.decorators=[{type:n.Component,args:[{selector:"aup-confirmation-dialog",template:'<h3 matDialogTitle *ngIf="confirm.title">{{confirm.title()}}</h3>\n<div matDialogContent>\n <p *ngFor="let line of confirm.content()">{{line}}</p>\n</div>\n<p matDialogActions>\n <button mat-button (click)="cancel()" data-cy="cancel-button">{{confirm.cancel()}}</button>\n <button mat-raised-button [color]="isDestructive() ? \'warn\' : \'primary\'"\n (click)="onConfirm()" data-cy="confirm-button">{{confirm.ok()}}</button>\n</p>\n\n',styles:[":host{display:block;padding:var(--aup-default-padding)}.mat-dialog-actions{justify-content:flex-end}"]}]}],e.ctorParameters=function(){return[{type:void 0,decorators:[{type:n.Inject,args:[q]}]},{type:H}]},e}(G),function(t){function e(){}t.Data=e}(t.ɵbf||(t.ɵbf={}));var W=function(t){function e(e){var n=t.call(this)||this;return n.confirm=e,s.assert.notNil(e),n}return M(e,t),e.prototype.ngOnInit=function(){},e.prototype.isDestructive=function(){return this.confirm.destructive&&this.confirm.destructive()},e.decorators=[{type:n.Component,args:[{selector:"aup-confirmation-dialog",template:'<h3 matDialogTitle *ngIf="confirm.title">{{confirm.title()}}</h3>\n<div matDialogContent>\n <p *ngFor="let line of confirm.content()">{{line}}</p>\n</div>\n<p matDialogActions>\n <button mat-button (click)="cancel()" data-cy="cancel-button">{{confirm.cancel()}}</button>\n <button mat-raised-button [color]="isDestructive() ? \'warn\' : \'primary\'"\n (click)="done()" data-cy="confirm-button">{{confirm.ok()}}</button>\n</p>\n\n',styles:[":host{display:block;padding:var(--aup-default-padding)}.mat-dialog-actions{justify-content:flex-end}"]}]}],e.ctorParameters=function(){return[{type:void 0,decorators:[{type:n.Inject,args:[q]}]}]},e}(G);var X=function(){function t(t,e,n,i){this.activityData=t,this.activityClass=e,this.interactionContext=n,this.activityCallbacks=i,this._complete=!1}return t.prototype.isComponentRealised=function(){return!!this._component},t.prototype.isComplete=function(){return this._complete},t.prototype.componentReady=function(t){s.assert.isNil(this._component),this._component=t},Object.defineProperty(t.prototype,"component",{get:function(){return this._component},enumerable:!0,configurable:!0}),t.prototype.onDone=function(t){this._complete=!0,this.activityCallbacks.onDone(t)},t.prototype.onCancel=function(t){this._complete=!0,this.activityCallbacks.onCancel(t)},t}();var Z=function(e){function i(){var t=e.call(this)||this;t.throttledNestedActivityFinishEvents=new s.MutableStream,t.initialActivityOutletContextEvent=new n.EventEmitter,t.dynamicHeight=!1,t.activityTabs=new s.MutableListModel,t._activityList=new s.MutableListModel;var i=s.Dsl.disposeWith(t),o=i.chain;i.valueOf,i.before,i.when,i.after,i.observe,i.switchOn;return o(t.throttledNestedActivityFinishEvents).throttle(50).subscribe((function(){return t.onNestedActivityFinished()})),t}return M(i,e),Object.defineProperty(i.prototype,"initialActivityOutletContext",{get:function(){return this._initialActivityOutletContext},set:function(t){s.assert.isNil(this._initialActivityOutletContext);var e=this;t&&(this._initialActivityOutletContext=t,this.activityTabs.push(new X(t.activityData,t.activityClass,this,{onDone:function(n){e.finishInitialActivity(),t.onDone(n)},onCancel:function(n){e.finishInitialActivity(),t.onCancel(n)}})))},enumerable:!0,configurable:!0}),i.prototype.isActive=function(){return this._activityList.length>0},Object.defineProperty(i.prototype,"activityList",{get:function(){return this._activityList.readonly},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"isFinished",{get:function(){return!this._initialActivityOutletContext},enumerable:!0,configurable:!0}),i.prototype.ngOnInit=function(){},i.prototype.ngAfterViewInit=function(){var t=this,e=s.Dsl.disposeWith(this),n=(e.chain,e.observe);n.valuesFrom(this.outlets.changes).subscribe((function(){return setTimeout((function(){return t.updateActivityList()}))})),n.valuesFrom(this.tabs.animationDone).subscribe((function(){return t.onAnimationFinished()})),this.updateActivityList()},i.prototype.startActivity=function(t,e){var n=this,i=this;return new Promise((function(o,r){var a=new X(e,t,i,{onDone:function(t){o(t),i.throttledNestedActivityFinishEvents.publish({})},onCancel:function(t){r(t),i.throttledNestedActivityFinishEvents.publish({})}});i.activityTabs.push(a),i.tabs.selectedIndex=n.activityTabs.length}))},i.prototype.alert=function(t){return this.startActivity(K,t)},i.prototype.confirm=function(t){return this.startActivity(W,t)},i.prototype.confirmThen=function(e,n,i){return this.startActivity(t.ɵbf,{confirm:e,activityType:n,data:i})},i.prototype.finishInitialActivity=function(){this._initialActivityOutletContext=null,this.activityTabs.value=[],this._activityList.value=[],this.initialActivityOutletContextEvent.emit(null)},i.prototype.onNestedActivityFinished=function(){this.synchroniseSelectedTabIndex()&&this.cleanupStaleNestedActivities(),this.updateActivityList()},i.prototype.cleanupStaleNestedActivities=function(){var t=this;this.tabs.selectedIndex<this.activityTabs.length-1&&this.activityTabs.runInTransaction((function(e){e.value=e.value.slice(0,1+t.tabs.selectedIndex)}))},i.prototype.synchroniseSelectedTabIndex=function(){var t=this.tabs.selectedIndex,e=this.activityTabs.query().findIndex((function(t){return t.isComplete()}))-1;return this.tabs.selectedIndex=e,t===e},i.prototype.onAnimationFinished=function(){this.getSelectedOutlet().component.onActivityReady(),this.cleanupStaleNestedActivities(),this.updateActivityList()},i.prototype.updateActivityList=function(){this._activityList.value=this.activityTabs.value.filter((function(t){return!t.isComplete()&&t.isComponentRealised()})).map((function(t){return t.component}))},i.prototype.getSelectedOutlet=function(){return this.outlets.toArray()[this.tabs.selectedIndex]},i.decorators=[{type:n.Component,args:[{selector:"aup-activity-container",template:'<mat-tab-group #tabs no-tab-header [dynamicHeight]="dynamicHeight" [class.full-height-tabs]="!dynamicHeight">\n <mat-tab *ngFor="let tab of activityTabs.value">\n <aup-activity-outlet [interactionContext]="this" [activityContext]="tab"></aup-activity-outlet>\n </mat-tab>\n</mat-tab-group>\n',styles:[":host{display:flex;flex-direction:column}mat-tab-group{flex:1}"]}]}],i.ctorParameters=function(){return[]},i.propDecorators={initialActivityOutletContext:[{type:n.Input}],initialActivityOutletContextEvent:[{type:n.Output,args:["initialActivityOutletContext"]}],dynamicHeight:[{type:n.Input}],tabs:[{type:n.ViewChild,args:["tabs",{static:!0}]}],outlets:[{type:n.ViewChildren,args:[z]}]},i}(H);var Y=function(e){function i(){return e.call(this)||this}return M(i,e),i.prototype.ngOnInit=function(){},Object.defineProperty(i.prototype,"activityList",{get:function(){return this.interactionContext.activityList},enumerable:!0,configurable:!0}),i.prototype.isActive=function(){return this.interactionContext.isActive()},i.prototype.alert=function(t){return this._startActivity(K,t)},i.prototype.confirm=function(t){return this._startActivity(W,t)},i.prototype.confirmThen=function(e,n,i){return this._startActivity(t.ɵbf,{confirm:e,activityType:n,data:i})},i.prototype.startActivity=function(t,e){return this._startActivity(t,e)},i.prototype._startActivity=function(t,e){var n=this;return new Promise((function(i,o){n.interactionContext.initialActivityOutletContext={activityClass:t,activityData:e,onDone:function(t){i(t)},onCancel:function(t){o(t)}}}))},i.decorators=[{type:n.Component,args:[{selector:"aup-inplace-interaction-context",template:'<mat-tab-group no-tab-header [selectedIndex]="isActive() ? 1 : 0" full-height-tabs [dynamicHeight]="false">\n <mat-tab>\n <ng-content></ng-content>\n </mat-tab>\n <mat-tab>\n <aup-activity-container #activityContainer\n [(initialActivityOutletContext)]="initialActivityContext"\n [dynamicHeight]="false"></aup-activity-container>\n </mat-tab>\n</mat-tab-group>\n\n',styles:[":host{display:flex;flex-direction:column}mat-tab-group{flex:1}"]}]}],i.ctorParameters=function(){return[]},i.propDecorators={interactionContext:[{type:n.ViewChild,args:["activityContainer",{static:!0}]}]},i}(H);var J=function(){function t(){}return t.decorators=[{type:n.Component,args:[{selector:"aup-interaction-outlet",template:'<router-outlet name="interaction-context"></router-outlet>\n',styles:[":host{display:block}"]}]}],t.ctorParameters=function(){return[]},t}(),$=new n.InjectionToken("DIALOG_INTERACTION_SERVICE_DEFAULTS"),Q=function(t){function e(){return t.call(this,{initialValue:!1})||this}return M(e,t),Object.defineProperty(e.prototype,"value",{get:function(){return this.store.read()},enumerable:!0,configurable:!0}),e.prototype.whileTrue=function(t){this.startTransaction().commit(!0);try{return t()}finally{this.startTransaction().commit(!1)}},e.prototype.runIfFalse=function(t,e){return void 0===e&&(e=null),this.value?e:t()},e}(s.ValueModel),tt=function(i){function r(t,e,n,o,r){var a=i.call(this)||this;return a.dialogService=t,a.location=e,a.router=n,a.dialogServiceDefaults=o,a.matDialogDefaultConfig=r,a._activityList=new s.DelegatingListModel,a.startingGuard=new Q,p.assert.notNil(t),a}return M(r,i),r.prototype.isActive=function(){return this._activityList.length>0},r.prototype.cancelActivity=function(){this.currentActivity.cancel(null)},Object.defineProperty(r.prototype,"activityList",{get:function(){return this._activityList.readonly},enumerable:!0,configurable:!0}),r.prototype.startActivity=function(t,e){return this._startActivity(t,e)},r.prototype._startActivity=function(t,e,n){var i=this;return void 0===n&&(n=!0),this.isActive()&&s.lang.illegalState("Activity already in progress: "+this.activityList.value.map((function(t){return t.constructor.name})).join(", ")),this.startingGuard.whileTrue((function(){console.log("###### STARTING");var o=i,r=O({autoFocus:!1,hasBackdrop:!0,closeOnNavigation:!1},i.matDialogDefaultConfig,i.dialogServiceDefaults,{data:e,disableClose:n,panelClass:"dialog-interaction-service"}),a=i.dialogService.open(Z,r);return new Promise((function(n,i){var r=a.componentInstance;o.safelyUpdateActivityListDelegate(r.activityList),r.initialActivityOutletContext={activityClass:t,activityData:e,onDone:function(t){n(t),a.close(!0)},onCancel:function(t){i(t),a.close(!0)}},a.afterClosed().subscribe((function(t){t||i("auto-closed")})),a.updateSize()})).finally((function(){console.log("###### FINISHED"),o.safelyUpdateActivityListDelegate(null)}))}))},r.prototype.safelyUpdateActivityListDelegate=function(t){var e=this;setTimeout((function(){return e._activityList.setDelegate(t)}))},r.prototype.alert=function(t){return this._startActivity(K,t,!1)},r.prototype.confirm=function(t){return this._startActivity(W,t,!0)},r.prototype.confirmThen=function(e,n,i){return this._startActivity(t.ɵbf,{confirm:e,activityType:n,data:i},!0)},r.decorators=[{type:n.Injectable,args:[{providedIn:"root"}]}],r.ctorParameters=function(){return[{type:o.MatDialog},{type:e.Location},{type:u.Router},{type:d.MatDialogConfig,decorators:[{type:n.Optional},{type:n.Inject,args:[$]}]},{type:d.MatDialogConfig,decorators:[{type:n.Optional},{type:n.Inject,args:[d.MAT_DIALOG_DEFAULT_OPTIONS]}]}]},r.ngInjectableDef=n.ɵɵdefineInjectable({factory:function(){return new r(n.ɵɵinject(d.MatDialog),n.ɵɵinject(e.Location),n.ɵɵinject(u.Router),n.ɵɵinject($,8),n.ɵɵinject(d.MAT_DIALOG_DEFAULT_OPTIONS,8))},token:r,providedIn:"root"}),r}(H);var et=function(){function i(){}return i.decorators=[{type:n.NgModule,args:[{imports:[e.CommonModule,o.MatButtonModule,o.MatDialogModule,o.MatTabsModule,c.PortalModule,u.RouterModule],declarations:[Z,W,t.ɵbf,K,z,J,Y],exports:[Z,z,J,Y],entryComponents:[Z,W,t.ɵbf,K],providers:[tt]}]}],i}(),nt=function(){function t(){}return t.prototype.ngOnInit=function(){},t.decorators=[{type:n.Component,args:[{selector:"aup-busy-overlay",template:'<ng-content></ng-content>\n<div class="busy-overlay-backdrop" *ngIf="busyModel.value">\n <mat-progress-spinner mode="indeterminate" [diameter]="52"></mat-progress-spinner>\n</div>\n',styles:[":host{position:relative}div.busy-overlay-backdrop{position:absolute;background-color:rgba(0,0,0,.2);top:0;left:0;bottom:0;right:0;display:-ms-grid;display:grid;-ms-grid-columns:auto;grid-template-columns:auto;-ms-grid-rows:auto;grid-template-rows:auto;place-content:center}"]}]}],t.ctorParameters=function(){return[]},t.propDecorators={busyModel:[{type:n.Input}],busy:[{type:n.Input}]},D([s.UseDelegate(),R("design:type",s.ValueModel)],t.prototype,"busyModel",void 0),D([s.StoreInValueModel("busyModel"),R("design:type",Boolean)],t.prototype,"busy",void 0),t}();var it=function(){function t(){}return t.prototype.ngOnInit=function(){},t.decorators=[{type:n.Component,args:[{selector:"aup-empty-state",template:'\n <div class="container">\n <ng-content></ng-content>\n </div>\n ',styles:[":host{display:flex;flex-direction:column;justify-content:center;align-items:center}.container{padding:var(--aup-default-padding);border:2px dashed rgba(0,0,0,.2);border-radius:5px;font-size:14px;font-weight:300}"]}]}],t.ctorParameters=function(){return[]},t}();t.ParameterDefinition=function(){function t(t,e,n){this.propertyName=t,this.urlFormat=n,this.options=p.Opts.get(e),this.remember=this.options.getOptional("remember",!1),this.defaultValue=this.options.getOptional("defaultValue",null)}return Object.defineProperty(t.prototype,"name",{get:function(){return this.options.getOptional("as",this.propertyName)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isRouteParameter",{get:function(){return!!this.urlFormat},enumerable:!0,configurable:!0}),t.prototype.getOptionValue=function(t){return this.options.getOptional(t,null)},t.prototype.sanitise=function(t,e,n,i){return A(this,void 0,void 0,(function(){var i;return w(this,(function(o){return this.isMissingFrom(e)?(i=C.first(n.getHistory(e.placeDefinition)),this.remember&&i&&(t=i.getParameter(this.name)),[2,this.isEmptyValue(t)?this.defaultValue:t]):[2,t]}))}))},t.prototype.isMissingFrom=function(t){return!t.hasParameter(this.name)},t}(),function(t){function e(){}t.Options=e;var n=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.isRouteId=!0,e.isArray=!1,e}return M(e,t),e.prototype.isEmptyValue=function(t){return C.isNil(t)},e.prototype.hasChanged=function(t,e){return t!==e},e}(t);t.RouteId=n;var i=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.isRouteId=!1,e.isArray=!1,e}return M(e,t),e.prototype.isEmptyValue=function(t){return C.isNil(t)},e.prototype.hasChanged=function(t,e){return t!==e},e}(t);t.ValueParameter=i;var o=function(t){function e(e,n,i){var o=t.call(this,e,n,i)||this;return o.isRouteId=!1,o.isArray=!0,o}return M(e,t),e.prototype.isEmptyValue=function(t){return C.isNil(t)||t.length<1},e.prototype.hasChanged=function(t,e){return!C.isEqual(t,e)},e}(t);t.ArrayParameter=o}(t.ParameterDefinition||(t.ParameterDefinition={})),t.PlaceDefinition=function(){function e(t,e,n,i,o,r){this.component=t,this.path=e,this.authenticate=n,this.data=i,this.routeParameters=o,this.children=r}return e.prototype.hasRouteId=function(){return!!this.getRouteIdParameterDef()},e.prototype.getRouteIdParameterDef=function(){return this.routeParameters.find((function(t){return t.isRouteId}))},e.prototype.getRouteParameterDefs=function(t){return void 0===t&&(t=!1),this.getVisitParameterDefs({includeRouteId:t,includeRouteParameters:!0})},e.prototype.getVisitParameterDefs=function(t){var e=p.Opts.get(t),n=!t||e.getOptional("includeRouteId",!1),i=!t||e.getOptional("includeRouteParameters",!1),o=!t||e.getOptional("includeNonRouteParameters",!1);return this.routeParameters.filter((function(t){return n&&t.isRouteId||i&&t.isRouteParameter&&!t.isRouteId||o&&!t.isRouteParameter}))},e.prototype.getPlaceData=function(t,e){return this.data?C.isNil(this.data[t])?e:this.data[t]:e},e.prototype.searchPlaceData=function(t,e){var n=this;if(this.data){var i=t.find((function(t){return!C.isNil(n.data[t])}));return i?this.data[i]:e}return e},e.prototype.getRouteIdFrom=function(t){var e=this.getRouteIdParameterDef();return e?t.getParameter(e.name):null},e.prototype.getFormattedRouteId=function(t){return t.hasRouteId()?this.getRouteIdParameterDef().urlFormat.format(t.getRouteId()):null},e.prototype.getFormattedRouteParameters=function(t,e){void 0===e&&(e=!1);var n={};return this.getVisitParameterDefs({includeRouteId:e,includeRouteParameters:!0}).forEach((function(e){var i=t.getParameter(e.name);e.isEmptyValue(i)||(e.isArray?(s.assert.isArray(i),n[e.name]=i.map((function(t){return e.urlFormat.format(t)}))):(s.assert.isFalsey(Array.isArray(i)),n[e.name]=e.urlFormat.format(i)))})),n},e.prototype.getNonRouteParameters=function(t){var e={};return this.getVisitParameterDefs({includeNonRouteParameters:!0}).forEach((function(n){var i=t.getParameter(n.name);n.isEmptyValue(i)||(e[n.name]=i)})),e},e.prototype.parseRouteParams=function(t){var e={};return this.getVisitParameterDefs({includeRouteId:!0,includeRouteParameters:!0,includeNonRouteParameters:!1}).forEach((function(n){if(t.has(n.name))if(n.isArray){var i=t.getAll(n.name);e[n.name]=i.map((function(t){return n.urlFormat.parse(t)}))}else{var o=n.urlFormat.parse(t.get(n.name));n.isRouteId&&n.isEmptyValue(o)||(e[n.name]=o)}})),e},D([h.Memoize(),R("design:type",Function),R("design:paramtypes",[]),R("design:returntype",t.ParameterDefinition)],e.prototype,"getRouteIdParameterDef",null),D([h.Memoize(),R("design:type",Function),R("design:paramtypes",[Object]),R("design:returntype",Array)],e.prototype,"getRouteParameterDefs",null),D([h.Memoize(),R("design:type",Function),R("design:paramtypes",[Object]),R("design:returntype",Array)],e.prototype,"getVisitParameterDefs",null),e}(),function(t){function e(){}t.ParameterOptions=e}(t.PlaceDefinition||(t.PlaceDefinition={}));var ot,rt="PLACE_DEFINITION_OPTIONS",at=Symbol("place:route:parameters");t.PlaceComponent=function(e){function n(){return e.call(this)||this}return M(n,e),n.prototype.initialiseBindings=function(t){var e=this;s.assert.isNil(this.visit),this.visit=t,this.placeDefinition.getVisitParameterDefs().forEach((function(t){e.installBinding(t)}))},n.prototype.installBinding=function(t){var e=this[t.propertyName];this.registerDisposable(new s.Binding(this.visit,e,{toRight:function(e){return e.getParameter(t.name)},toLeft:function(e,n){return console.log("push to route",{name:t.name,value:e,currentVisit:n}),n.replace(t,e)}}))},Object.defineProperty(n.prototype,"placeDefinition",{get:function(){return n.getDefinition(this.constructor)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"childPlaces",{get:function(){return this.placeDefinition.children.map((function(t){return t.component}))},enumerable:!0,configurable:!0}),n.prototype.canDeactivate=function(){return!0},n.prototype.onPlaceReady=function(){},D([g.Memoize(),R("design:type",t.PlaceDefinition),R("design:paramtypes",[])],n.prototype,"placeDefinition",null),n}(j),(ot=t.PlaceComponent||(t.PlaceComponent={})).isPlaceComponentConstructor=function(t){return s.lang.constructorChain(t).includes(ot)},ot.getRouteParameters=function(t){return p.Klass.get(t).getMetadataList(at)},ot.getDefinition=function(t){return Reflect.getMetadata(rt,t)},ot.injectDefinition=function(t,e){Reflect.defineMetadata(rt,e,t)};var st,ct,ut,lt=function(){function t(t,e){void 0===e&&(e={}),this.placeDefinition=t,this.visitParameters=e}return t.prototype.getRouteId=function(){return this.placeDefinition.getRouteIdFrom(this)},t.prototype.hasRouteId=function(){return!l.isNil(this.getRouteId())},t.prototype.getParameter=function(t){return this.visitParameters[t]},t.prototype.hasParameter=function(t){return Object.keys(this.visitParameters).includes(t)},t.prototype.replace=function(e,n){var i;return new t(this.placeDefinition,O({},this.visitParameters,((i={})[e.name]=n,i)))},t.prototype.mergeRouteParameters=function(e){var n=this,i=Object.keys(e),o={};return this.placeDefinition.getVisitParameterDefs().forEach((function(t){t.isRouteId||t.isRouteParameter?i.includes(t.name)&&(o[t.name]=e[t.name]):n.hasParameter(t.name)&&(o[t.name]=n.getParameter(t.name))})),new t(this.placeDefinition,o)},t.prototype.hasRoutingChangedFrom=function(t){var e=t.placeDefinition===this.placeDefinition,n=l.isEqual(this.placeDefinition.getFormattedRouteParameters(this,!0),this.placeDefinition.getFormattedRouteParameters(t,!0));return!e||!n},t.prototype.hasChangedFrom=function(t){return!l.isEqual(this.placeDefinition.getNonRouteParameters(this),this.placeDefinition.getNonRouteParameters(t))||this.hasRoutingChangedFrom(t)},t.prototype.getUrlSegments=function(){return this.placeDefinition.hasRouteId()?[new u.UrlSegment(this.placeDefinition.path,{}),new u.UrlSegment(this.placeDefinition.getFormattedRouteId(this),this.placeDefinition.getFormattedRouteParameters(this))]:[new u.UrlSegment(this.placeDefinition.path,this.placeDefinition.getFormattedRouteParameters(this))]},t}();t.NavigationSession=function(){function t(t){this.firstNavigation=t,this._alreadyAccepted=[],this._visits=new Map}return t.prototype.storeVisit=function(t){this._visits.set(t.placeDefinition,t)},t.prototype.getVisitFor=function(t){return this._visits.get(t)},t.prototype.mergePrivatePlaceParameters=function(t){return null},t.prototype.alreadyAccepted=function(t){return this._alreadyAccepted.includes(t)},t.prototype.rememberAcceptanceOf=function(t){this._alreadyAccepted.push(t)},t.prototype.setPopstateReturn=function(t){this._popStateReturnUrl=t},Object.defineProperty(t.prototype,"isPopState",{get:function(){return!!this._popStateReturnUrl},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"popStateReturnUrl",{get:function(){return this._popStateReturnUrl},enumerable:!0,configurable:!0}),t.prototype.getVisits=function(){return Array.from(this._visits.values())},t}(),st=t.NavigationSession||(t.NavigationSession={}),ct=function(t){function e(e){var n=t.call(this,e)||this;return n.isExternal=!0,n}return M(e,t),e}(st),ut=function(t){function e(e){var n=t.call(this,!1)||this;return n.isExternal=!1,n.storeVisit(e),n}return M(e,t),e}(st),st.createInternal=function(t){return new ut(t)},st.createExternal=function(t){return new ct(t)};var pt=function(){function t(t){this.router=t,this._history=new Map}return t.prototype.add=function(t){var e=this.getHistory(t.placeDefinition),n=C.first(e);n&&!t.hasChangedFrom(n)||(e.unshift(t),this.setHistory(t.placeDefinition,e.slice(0,3)))},t.prototype.getHistory=function(t){var e=this._history.get(t);return e||(e=[],this.setHistory(t,e)),e},t.prototype.setHistory=function(t,e){this._history.set(t,e)},t.decorators=[{type:n.Injectable,args:[{providedIn:"root"}]}],t.ctorParameters=function(){return[{type:u.Router}]},t.ngInjectableDef=n.ɵɵdefineInjectable({factory:function(){return new t(n.ɵɵinject(u.Router))},token:t,providedIn:"root"}),t}();var dt=function(i){function o(t,e,n){var o=i.call(this)||this;o.router=t,o.angularLocation=e,o.placeHistory=n,o.firstRoute=!0,o._navigationSessionModel=new s.MutableValueModel,o._activeVisits=new s.MutableListModel;var r=s.Dsl.disposeWith(o),a=r.chain;r.valueOf,r.before,r.when,r.after,r.observe,r.switchOn;return o.activeVisitIndex=a(o._activeVisits).indexBy("placeDefinition"),e.onUrlChange((function(t){console.log("location.onUrlChange -> "+t)})),o.router.events.subscribe((function(t){t instanceof u.NavigationStart&&o.onAngularRouterStarted(t),(t instanceof u.NavigationEnd||t instanceof u.NavigationError)&&o.onAngularRouterFinished()})),o.navigationSessionActive=a(o.navigationSessionModel).isNotNil(),o.navigationSessionActive.subscribe((function(t){console.log("navigationSessionActive",t)})),o}return M(o,i),Object.defineProperty(o.prototype,"navigationSession",{get:function(){return this._navigationSessionModel.value},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"navigationSessionModel",{get:function(){return this._navigationSessionModel.readonly},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"activeVisits",{get:function(){return this._activeVisits.readonly},enumerable:!0,configurable:!0}),o.prototype.navigate=function(t,e){return A(this,void 0,void 0,(function(){var n=this;return w(this,(function(i){return this.doNavigation(t,(function(i){return A(n,void 0,void 0,(function(){var n;return w(this,(function(i){switch(i.label){case 0:return n=_([t.placeDefinition.path],this.createRouteParameters(t)),[4,this.router.navigate(n,{relativeTo:e?e.relativeTo:null})];case 1:return i.sent(),[2]}}))}))})),[2]}))}))},o.prototype.pushVisitChangesToRoute=function(t,e,n){return A(this,void 0,void 0,(function(){var i=this;return w(this,(function(o){return this.placeHistory.add(n),n.hasRoutingChangedFrom(e)?[2,this.doNavigation(n,(function(o){var r=_([e.placeDefinition.hasRouteId()?"..":"."],i.createRouteParameters(n),i.extractChildPath(t.snapshot));return console.log("### Push Changes to route Redirect",{commands:r,relativeTo:t.snapshot.url}),o.navigate(r,{relativeTo:t})}))]:[2]}))}))},o.prototype.doNavigation=function(e,n){return A(this,void 0,void 0,(function(){return w(this,(function(i){switch(i.label){case 0:this._navigationSessionModel.value=t.NavigationSession.createInternal(e),i.label=1;case 1:return i.trys.push([1,,3,4]),[4,n(this.router)];case 2:return i.sent(),[3,4];case 3:return this.navigationSession&&!this.router.getCurrentNavigation()&&this.onAngularRouterFinished(),[7];case 4:return[2]}}))}))},o.prototype.createRouteParameters=function(t){var e=t.placeDefinition;return t.hasRouteId()?[e.getFormattedRouteId(t),e.getFormattedRouteParameters(t)]:[e.getFormattedRouteParameters(t)]},o.prototype.onAngularRouterStarted=function(e){if(!this.navigationSession){console.log("navigation started",{firstTime:this.firstRoute});var n=t.NavigationSession.createExternal(this.firstRoute);"popstate"===e.navigationTrigger&&n.setPopstateReturn(this.router.routerState.snapshot.url),this._navigationSessionModel.value=n}this.firstRoute=!1},o.prototype.onAngularRouterFinished=function(){var t=this,e=this._navigationSessionModel.value.getVisits();e.forEach((function(e){t.placeHistory.add(e)})),this._activeVisits.value=e,this._navigationSessionModel.value=null},o.prototype.extractChildPath=function(t){return C.flatten(t.children.map((function(t){return t.url})))},o.decorators=[{type:n.Injectable,args:[{providedIn:"root"}]}],o.ctorParameters=function(){return[{type:u.Router},{type:e.Location},{type:pt}]},o.ngInjectableDef=n.ɵɵdefineInjectable({factory:function(){return new o(n.ɵɵinject(u.Router),n.ɵɵinject(e.Location),n.ɵɵinject(pt))},token:o,providedIn:"root"}),D([s.Trace(),R("design:type",Function),R("design:paramtypes",[lt,Object]),R("design:returntype",Promise)],o.prototype,"navigate",null),o}(s.GarbageCollector);var ft=b.style({position:"absolute",top:"0",left:"0",bottom:"0",right:"0"}),mt=[b.query(":enter, :leave",ft,{optional:!0}),b.group([b.query(":enter",[b.style({transform:"translateX(-100%)"}),b.animate("{{duration}} ease-out",b.style({transform:"translateX(0%)"}))],{optional:!0}),b.query(":leave",[b.style({transform:"translateX(0%)"}),b.animate("{{duration}} ease-out",b.style({transform:"translateX(100%)"}))],{optional:!0})])],yt=[b.query(":enter, :leave",ft,{optional:!0}),b.group([b.query(":enter",[b.style({transform:"translateX(100%)"}),b.animate("{{duration}} ease-out",b.style({transform:"translateX(0%)"}))],{optional:!0}),b.query(":leave",[b.style({transform:"translateX(0%)"}),b.animate("{{duration}} ease-out",b.style({transform:"translateX(-100%)"}))],{optional:!0})])];function ht(t){return b.trigger("routeAnimations",[b.transition(":increment",yt,{params:{duration:t}}),b.transition(":decrement",mt,{params:{duration:t}})])}var gt=ht("0.3s");var vt=function(t){function e(e,i,o){var r=t.call(this)||this;r.router=e,r.placeRouter=i,r.animate=!0,r.placeChanged=new n.EventEmitter,r._activePlace=new s.MutableValueModel,r._placeVisit=new s.MutableValueModel,r._inOutletUpdate=new s.Guard,r._activatedRouteModel=new s.MutableValueModel,r._placeDefinition=new s.MutableValueModel,r.isOnInitialPlace=!0;var a=s.Dsl.disposeWith(r),c=a.chain,u=(a.valueOf,a.before,a.when);a.after,a.observe,a.switchOn;r.parentOutletModel=new s.MutableValueModel(o);var l=c(r.parentOutletModel).pullValueModel((function(t){return t.activePlaceModel})).pluck("placeDefinition").pluckList("children").pluck("component"),p=c(r.activePlaceModel).map((function(t){return t.constructor}));r.placeAnimationOrder=c(r.customPlaceAnimationOrderModel).otherwise(l).indexOf(p).map((function(t){return r.isOnInitialPlace?0:r.animate?Math.max(t,0):0}));var d=c(r._activePlace).pluck("placeDefinition").findIn(i.activeVisitIndex),f=new s.Guard;return u.valueOf(d).changes((function(t){t&&f.whileTrue((function(){r._placeVisit.value=t}))})),u.valueOf(r._placeVisit).changes((function(t,e){r.pushVisitChangesToRoute(t,e)}),{unless:f}),c(r._activePlace).postponeWhile(i.navigationSessionActive).subscribe((function(t){return r.placeChanged.emit(t)})),r}return M(e,t),e.prototype.ngOnInit=function(){},e.prototype.navigate=function(t){console.log({activatedRoute:this._activatedRouteModel.value}),this.placeRouter.navigate(t,{relativeTo:this.parentOutlet?this.parentOutlet.activatedRouteModel.value:null})},Object.defineProperty(e.prototype,"parentOutlet",{get:function(){return this.parentOutletModel.value},enumerable:!0,configurable:!0}),e.prototype.pushVisitChangesToRoute=function(t,e){var n=this._activatedRouteModel.value;this.placeRouter.pushVisitChangesToRoute(n,e,t)},Object.defineProperty(e.prototype,"activePlaceModel",{get:function(){return this._activePlace.readonly},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"activatedRouteModel",{get:function(){return this._activatedRouteModel.readonly},enumerable:!0,configurable:!0}),e.prototype.onOutletActivated=function(t,e){var n=this;this._inOutletUpdate.whileTrue((function(){try{n._activePlace.value=e,n._activatedRouteModel.value=t.activatedRoute,n._placeDefinition.value=e.placeDefinition,e.initialiseBindings(n._placeVisit)}catch(t){console.error(t)}})),this.animate||this.animationDone()},e.prototype.onOutletDeactivated=function(t,e){var n=this;this._inOutletUpdate.whileTrue((function(){n.isOnInitialPlace=!1,n._activePlace.value=null,n._activatedRouteModel.value=null,n._placeDefinition.value=null}))},e.prototype.animationDone=function(){this._activePlace.value&&this._activePlace.value.onPlaceReady()},e.decorators=[{type:n.Component,args:[{selector:"aup-place-outlet",template:'<div class="router-outlet-container"\n [@routeAnimations]="placeAnimationOrder.value"\n (@routeAnimations.done)="animationDone()"\n>\n <router-outlet #routerOutlet="outlet"\n (activate)="onOutletActivated(routerOutlet, $event)"\n (deactivate)="onOutletDeactivated(routerOutlet, $event)">\n </router-outlet>\n</div>\n\n',animations:[gt],styles:[":host{display:flex;flex-direction:column;min-height:0}.router-outlet-container{flex:1;display:block;position:relative;min-height:0}router-outlet{display:none}"]}]}],e.ctorParameters=function(){return[{type:u.Router},{type:dt},{type:e,decorators:[{type:n.SkipSelf},{type:n.Optional}]}]},e.propDecorators={animate:[{type:n.Input}],customPlaceAnimationOrderModel:[{type:n.Input,args:["placeAnimationOrderModel"]}],customPlaceAnimationOrder:[{type:n.Input,args:["placeAnimationOrder"]}],placeChanged:[{type:n.Output}],routerOut:[{type:n.ViewChild,args:["routeOutlet",{static:!0}]}]},D([s.UseDelegate(),R("design:type",s.ListModel)],e.prototype,"customPlaceAnimationOrderModel",void 0),D([s.StoreInListModel("customPlaceAnimationOrderModel"),R("design:type",Array)],e.prototype,"customPlaceAnimationOrder",void 0),D([s.Trace(),R("design:type",Function),R("design:paramtypes",[lt]),R("design:returntype",void 0)],e.prototype,"navigate",null),e}(j);var bt=function(e){function i(){var n=e.call(this)||this,i=s.Dsl.disposeWith(n),o=i.chain;i.valueOf,i.before,i.when,i.after,i.observe,i.switchOn;return n.placeDefinitions=o(n.placesModel).map((function(e){return t.PlaceComponent.getDefinition(e)})),n.relativeToModel=o(n.placeOutletModel).pullValueModel((function(t){return t.activatedRouteModel})),n.commandFactory=s.Command.createFactory((function(t){n.placeOutlet.navigate(new lt(t))})),n}return M(i,e),i.prototype.getNav=function(t){var e=t.getPlaceData("nav");return{title:function(){return e?e.title():t.searchPlaceData(["navTitle","title"])},tooltip:function(){return e&&e.tooltip?e.tooltip():t.getPlaceData("navTooltip",null)},icon:function(){return e&&e.icon?e.icon():t.getPlaceData("navIcon",null)}}},i.prototype.ngOnInit=function(){},i.propDecorators={places:[{type:n.Input}],placesModel:[{type:n.Input}],placeOutlet:[{type:n.Input}],placeOutletModel:[{type:n.Input}]},D([s.StoreInListModel("placesModel"),R("design:type",Array)],i.prototype,"places",void 0),D([s.UseDelegate(),R("design:type",s.ListModel)],i.prototype,"placesModel",void 0),D([s.StoreInValueModel("placeOutletModel"),R("design:type",vt)],i.prototype,"placeOutlet",void 0),D([s.UseDelegate(),R("design:type",s.ValueModel)],i.prototype,"placeOutletModel",void 0),D([h.Memoize(),R("design:type",Function),R("design:paramtypes",[t.PlaceDefinition]),R("design:returntype",Object)],i.prototype,"getNav",null),i}(j);var Pt=function(t){function e(){var e=t.call(this)||this;return e.expanded=!0,e}return M(e,t),e.prototype.expandMenu=function(){this.expanded=!0},e.prototype.collapseMenu=function(){this.expanded=!1},e.prototype.toggleMenu=function(){this.expanded=!this.expanded},e.decorators=[{type:n.Component,args:[{selector:"aup-list-place-nav",template:'<mat-nav-list class="app-menu">\n <a mat-list-item *ngFor="let place of placeDefinitions.value"\n [pectinCommand]="commandFactory.create(place)"\n routerLinkActive #rla="routerLinkActive"\n [matTooltip]="getNav(place).tooltip()">\n <mat-icon *ngIf="getNav(place).icon()">{{getNav(place).icon()}}</mat-icon>\n <span class="expanded-only">{{getNav(place).title()}}</span>\n </a>\n</mat-nav-list>\n',styles:[":host{display:flex;flex-direction:column;--expanded-width:235px;--nav-item-width:var(--nav-bar-height);width:var(--nav-item-width);transition:width 125ms linear}:host.expanded{width:var(--expanded-width);max-width:var(--expanded-width)}.expanded-only{max-width:0;overflow:hidden}.collapsed-only{max-width:100%;overflow:hidden}.header{display:flex;flex-direction:row;justify-content:flex-end;align-items:center;height:var(--nav-bar-height);border-bottom:var(--pinstripe-border);cursor:pointer}.header .menu{flex:1}.header button{color:inherit;width:var(--nav-item-width);height:var(--nav-bar-height)}mat-nav-list{flex:1;display:flex;flex-direction:column}.mat-list-item{width:var(--nav-item-width);height:var(--nav-bar-height);color:inherit}mat-icon{color:inherit}mat-icon.flip-horizontal{transform:scaleX(-1)}:host-context(.expanded) .expanded-only{max-width:100%}:host-context(.expanded) .collapsed-only{max-width:0}:host-context(.expanded) .mat-list-item mat-icon{margin-right:12px}:host-context(.expanded) .mat-list-item span{text-wrap:none;white-space:nowrap}a[ng-reflect-router-link=manage-instruments] mat-icon{transform:rotate(90deg)}.app-menu{padding-top:0}"]}]}],e.ctorParameters=function(){return[]},e.propDecorators={expanded:[{type:n.HostBinding,args:["class.expanded"]}]},e}(bt);var Ct=function(t){function e(){return t.call(this)||this}return M(e,t),e.decorators=[{type:n.Component,args:[{selector:"aup-tabbed-place-navigation",template:'<nav mat-tab-nav-bar>\n <a mat-tab-link *ngFor="let place of placeDefinitions.value"\n [pectinCommand]="commandFactory.create(place)"\n routerLinkActive #rla="routerLinkActive"\n [active]="rla.isActive"\n [matTooltip]="getNav(place).tooltip()">\n <mat-icon *ngIf="getNav(place).icon()">{{getNav(place).icon()}}</mat-icon>\n <span>{{getNav(place).title()}}</span>\n </a>\n</nav>\n',styles:[""]}]}],e.ctorParameters=function(){return[]},e}(bt),It=function(){function t(){}return t.decorators=[{type:n.NgModule,args:[{imports:[e.CommonModule,a.BrowserAnimationsModule,o.MatProgressSpinnerModule,u.RouterModule,r.MatTabsModule,m.MatListModule,y.MatTooltipModule,f.MatIconModule,E],declarations:[it,nt,vt,Ct,Pt],entryComponents:[nt],exports:[nt,vt,it,Ct,Pt],providers:[]}]}],t}(),Mt=function(){function t(){}return t.decorators=[{type:n.NgModule,args:[{declarations:[],imports:[e.CommonModule,a.BrowserAnimationsModule,i.FormsModule,o.MatInputModule,o.MatFormFieldModule,o.MatSelectModule,r.MatTabsModule,E,U,It,et],exports:[et,It,E,U,B]}]}],t}(),Ot=b.style({opacity:0,height:"0",paddingTop:"0",paddingBottom:"0"});var Dt=function(t,e){this.width=t,this.height=e};var Rt,At=function(){function t(t,e){this.x=t,this.y=e}return t.from=function(e){return new t(e.x,e.y)},t.prototype.translate=function(e,n){return new t(this.x+e,this.y+n)},t}();t.Bounds=function(t){function e(e,n,i,o){var r=t.call(this,i,o)||this;return r.top=e,r.left=n,r.width=i,r.height=o,r}return M(e,t),e.prototype.relativePositionOf=function(t){return t instanceof MouseEvent?new At(t.clientX-this.left,t.clientY-this.top):new At(t.x-this.left,t.y-this.top)},e}(Dt),(Rt=t.Bounds||(t.Bounds={})).ofElement=function(t){var e=t.getBoundingClientRect();return new Rt(e.top,e.left,e.width,e.height)};var wt=function(e){function n(n,i){var o=e.call(this)||this;return o.elementRef=n,o.ngZone=i,o._boundsModel=new s.ValueHolder(new t.Bounds(0,0,0,0)),o}return M(n,e),n.prototype.ngAfterViewInit=function(){var t=this;this.updateBounds();var e=this.elementRef.nativeElement,n=new P((function(e,n){t.ngZone.run((function(){return t.updateBounds()}))}));n.observe(e),this.onDispose((function(){return n.disconnect()}))},Object.defineProperty(n.prototype,"boundsModel",{get:function(){return this._boundsModel.readonly},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"nativeElement",{get:function(){return this.elementRef.nativeElement},enumerable:!0,configurable:!0}),n.prototype.relativePositionOf=function(t){return this.bounds.relativePositionOf(t)},Object.defineProperty(n.prototype,"bounds",{get:function(){return this._boundsModel.value},enumerable:!0,configurable:!0}),n.prototype.updateBounds=function(){this._boundsModel.value=t.Bounds.ofElement(this.nativeElement)},n}(j);function xt(){}(function(t){function e(){}t.Callback=e})(xt||(xt={}));var _t,Ft,jt,St,Et=function(){function t(t,e,n){this.router=t,this.injector=e,this.interactionContext=n}return t.prototype.canActivate=function(t,e){return!0},t.prototype.canDeactivate=function(t,e,n,i){return!this.interactionContext.isActive()},t.decorators=[{type:n.Injectable,args:[{providedIn:"root"}]}],t.ctorParameters=function(){return[{type:u.Router},{type:n.Injector},{type:H}]},t.ngInjectableDef=n.ɵɵdefineInjectable({factory:function(){return new t(n.ɵɵinject(u.Router),n.ɵɵinject(n.INJECTOR),n.ɵɵinject(H))},token:t,providedIn:"root"}),D([s.Trace(),R("design:type",Function),R("design:paramtypes",[u.ActivatedRouteSnapshot,u.RouterStateSnapshot]),R("design:returntype",Object)],t.prototype,"canActivate",null),D([s.Trace(),R("design:type",Function),R("design:paramtypes",[B,u.ActivatedRouteSnapshot,u.RouterStateSnapshot,u.RouterStateSnapshot]),R("design:returntype",Object)],t.prototype,"canDeactivate",null),t}();function Tt(e){return function(n){t.PlaceComponent.isPlaceComponentConstructor(n)?t.PlaceComponent.injectDefinition(n,new t.PlaceDefinition(n,e.path,!l.isNil(e.authenticate)&&e.authenticate,e.data,t.PlaceComponent.getRouteParameters(n),(e.children||[]).map((function(e){return t.PlaceComponent.getDefinition(e)})))):s.lang.illegalState(n+" must extend PlaceComponent to use the @Place decorator")}}(function(t){function e(){}t.Options=e})(Tt||(Tt={})),_t=t.Formatter||(t.Formatter={}),Ft=function(){function t(){}return t.prototype.format=function(t){return t},t.prototype.parse=function(t){return t},t}(),jt=function(){function t(){}return t.prototype.format=function(t){return C.isNumber(t)&&!C.isNaN(t)?""+t:null},t.prototype.parse=function(t){var e=Number.parseFloat(t);return C.isNaN(e)?null:e},t}(),St=function(){function t(){}return t.prototype.format=function(t){return t?"true":"false"},t.prototype.parse=function(t){return"true"===t},t}(),_t.STRING=new Ft,_t.NUMBER=new jt,_t.BOOLEAN=new St;var Nt=function(){function t(t,e,n,i){this.activatedRoute=t,this.router=e,this.placeHistory=n,this.injector=i}return t.prototype.sanitise=function(t){return A(this,void 0,void 0,(function(){var e,n,i,o,r,a,s,c,u;return w(this,(function(l){switch(l.label){case 0:return(e=t.placeDefinition).hasRouteId()?(n=e.getRouteIdParameterDef(),i=t.getRouteId(),[4,n.sanitise(i,t,this.placeHistory,this.injector)]):[3,2];case 1:if(u=l.sent(),console.log({routeId:i,sanitisedValue:u}),n.hasChanged(i,u))return[2,t.replace(n,u)];l.label=2;case 2:o=e.getVisitParameterDefs({includeRouteParameters:!0,includeNonRouteParameters:!0}),r=t,a=0,l.label=3;case 3:return a<o.length?(s=o[a],c=t.getParameter(s.name),[4,s.sanitise(c,r,this.placeHistory,this.injector)]):[3,6];case 4:u=l.sent(),s.hasChanged(c,u)&&(r=r.replace(s,u)),l.label=5;case 5:return a++,[3,3];case 6:return[2,r.hasChangedFrom(t)?r:t]}}))}))},t}();t.EnterPlaceGuard=function(){function e(t,e,n,i,o){this.router=t,this.urlSerializer=e,this.placeRouter=n,this.placeHistory=i,this.injector=o}return e.prototype.canActivate=function(n,i){return A(this,void 0,void 0,(function(){var o,r,a,c,u,l,p;return w(this,(function(d){switch(d.label){case 0:return t.PlaceComponent.isPlaceComponentConstructor(n.component)?(o=t.PlaceComponent.getDefinition(n.component),r=new e.ConsolidatedParameterMap(n.paramMap,n.url),a=o.parseRouteParams(r),c=this.placeRouter.navigationSession.getVisitFor(o)||new lt(o,a),[4,new Nt(n,this.router,this.placeHistory,this.injector).sanitise(c.mergeRouteParameters(a))]):[3,2];case 1:return u=d.sent(),this.placeRouter.navigationSession.storeVisit(u),c.hasRoutingChangedFrom(u)?(l=this.urlSerializer.parse(i.url),p=this.createRedirectCommands(u,_(l.root.children.primary.segments)).commands,console.log("##### Place Guard Redirect",p),[2,this.router.createUrlTree(p,{replaceUrl:!0,skipLocationChange:!1})]):[2,!0];case 2:return[2,s.lang.illegalState("expected component to be an instance of PlaceComponent, got "+n.component)];case 3:return[2]}}))}))},e.prototype.createRedirectCommands=function(t,e){var n=t.getUrlSegments(),i=e.findIndex((function(t){return t.path===n[0].path})),o=_(e);o.splice.apply(o,_([i,n.length],n));var r=[];return o.forEach((function(t){r.push(t.path),t.parameterMap.keys.length>0&&r.push(t.parameters)})),{newPath:o,commands:r}},e.decorators=[{type:n.Injectable,args:[{providedIn:"root"}]}],e.ctorParameters=function(){return[{type:u.Router},{type:u.UrlSerializer},{type:dt},{type:pt},{type:n.Injector}]},e.ngInjectableDef=n.ɵɵdefineInjectable({factory:function(){return new e(n.ɵɵinject(u.Router),n.ɵɵinject(u.UrlSerializer),n.ɵɵinject(dt),n.ɵɵinject(pt),n.ɵɵinject(n.INJECTOR))},token:e,providedIn:"root"}),e}(),function(t){var e=function(){function t(t,e){this.paramMaps=[t].concat((e||[]).map((function(t){return new n(t.parameters)}))).filter((function(t){return!!t}))}return t.prototype.get=function(t){return this.paramMaps.find((function(e){return e.has(t)})).get(t)},t.prototype.getAll=function(t){return this.paramMaps.find((function(e){return e.has(t)})).getAll(t)},t.prototype.has=function(t){return!!this.paramMaps.find((function(e){return e.has(t)}))},Object.defineProperty(t.prototype,"keys",{get:function(){return this.paramMaps.reduce((function(t,e){return t.concat(e.keys)}),[])},enumerable:!0,configurable:!0}),D([h.Memoize(),R("design:type",Array),R("design:paramtypes",[])],t.prototype,"keys",null),t}();t.ConsolidatedParameterMap=e;var n=function(){function t(t){this.params=t}return t.prototype.get=function(t){return this.params[t]},t.prototype.getAll=function(t){var e=this.get(t);return Array.isArray(e)?e:[e]},t.prototype.has=function(t){return this.keys.includes(t)},Object.defineProperty(t.prototype,"keys",{get:function(){return Object.keys(this.params)},enumerable:!0,configurable:!0}),t}()}(t.EnterPlaceGuard||(t.EnterPlaceGuard={}));var Lt=function(){function t(t,e,n,i,o){this.router=t,this.injector=e,this.placeRouter=n,this.interactionContext=i,this.angularLocation=o}return t.prototype.isLeavingTheCurrentPlace=function(t,e){var n="/"+e.path;return!t.url.startsWith(n)},t.prototype.canDeactivate=function(t,e,n,i){return A(this,void 0,void 0,(function(){var e,n;return w(this,(function(o){switch(o.label){case 0:return this.placeRouter.navigationSession.alreadyAccepted(t)?[2,!0]:[3,1];case 1:return e=this,n=!0,this.isLeavingTheCurrentPlace(i,t.placeDefinition)?(t.interactionContext&&t.interactionContext.isActive()&&(n=!1,console.log("cancelling",{activity:t.interactionContext.currentActivity}),t.interactionContext.currentActivity.cancel(null)),n?[4,t.canDeactivate()]:[3,3]):[3,4];case 2:n=o.sent(),o.label=3;case 3:return[3,5];case 4:this.interactionContext.isActive()?(console.log("cancelling",{activity:this.interactionContext.currentActivity}),this.interactionContext.currentActivity.cancel(null),n=!1):n=!0,o.label=5;case 5:return n?e.placeRouter.navigationSession.rememberAcceptanceOf(t):this.placeRouter.navigationSession.isPopState&&(console.log("cancelled during popstate"),this.angularLocation.go(this.placeRouter.navigationSession.popStateReturnUrl)),[2,n]}}))}))},t.decorators=[{type:n.Injectable,args:[{providedIn:"root"}]}],t.ctorParameters=function(){return[{type:u.Router},{type:n.Injector},{type:dt},{type:H},{type:e.Location}]},t.ngInjectableDef=n.ɵɵdefineInjectable({factory:function(){return new t(n.ɵɵinject(u.Router),n.ɵɵinject(n.INJECTOR),n.ɵɵinject(dt),n.ɵɵinject(H),n.ɵɵinject(e.Location))},token:t,providedIn:"root"}),t}();t.ACTIVITY_DATA=q,t.AbstractActivity=G,t.AbstractInputComponent=T,t.AbstractPlaceNavigationComponent=bt,t.Activity=t.ɵbd,t.ActivityContainerComponent=Z,t.ActivityOutletComponent=z,t.AlertDialogComponent=K,t.AngularUiPowerupsModule=Mt,t.BusyOverlayComponent=nt,t.CommandDirective=F,t.ComponentsModule=U,t.ConfirmThenDialogComponent=t.ɵbf,t.ConfirmationDialogComponent=W,t.DEFINITION_META_DATA_KEY=rt,t.DIALOG_INTERACTION_SERVICE_DEFAULTS=$,t.DialogInteractionService=tt,t.Dimension=Dt,t.DirectivesModule=E,t.DisposableComponent=j,t.EmptyStateComponent=it,t.FocusBindingDirective=S,t.InplaceInteractionContextComponent=Y,t.InteractionContext=H,t.InteractionGuard=Et,t.InteractionModule=et,t.InteractionOutletComponent=J,t.LEFT_RIGHT_PLACE_ANIMATION=gt,t.LeavePlaceGuard=Lt,t.ListPlaceNavComponent=Pt,t.NoopComponent=B,t.NumberInputComponent=N,t.PasswordInputComponent=L,t.Place=Tt,t.PlaceHistory=pt,t.PlaceModule=It,t.PlaceOutletComponent=vt,t.PlaceRouter=dt,t.Point=At,t.ROUTE_PARAMETER_LIST_KEY=at,t.ResizeAwareComponent=wt,t.RouteId=function(e,n){return function(i,o){var r=new t.ParameterDefinition.RouteId(o.toString(),n,e);p.Klass.get(i).addToOwnMetadataList(at,r),s.UseDelegate()(i,o)}},t.SelectInputComponent=k,t.StringInputComponent=V,t.TabbedPlaceNavigationComponent=Ct,t.Visit=lt,t.VisitParameter=function(e){var n=p.Opts.get(e);return function(i,o){var r=new t.ParameterDefinition.ValueParameter(o.toString(),e,n.getOptional("storeInUrl",null));p.Klass.get(i).addToOwnMetadataList(at,r),s.UseDelegate()(i,o)}},t.VisitParameterList=function(e){var n=p.Opts.get(e);return function(i,o){var r=new t.ParameterDefinition.ArrayParameter(o.toString(),e,n.getOptional("storeInUrl",null));p.Klass.get(i).addToOwnMetadataList(at,r),s.UseDelegate()(i,o)}},t.VisitSanitiser=Nt,t.leftRightPlaceAnimation=ht,t.slideDownAndUpAnimation=function(t,e){s.OptionsHelper.get(e).getOptional("duration","100ms");var n=s.OptionsHelper.get(e).getOptional("hiddenStyleDef",Ot);return b.trigger(t,[b.transition(":enter",[n,b.animate("100ms")]),b.transition(":leave",[b.animate("100ms",n)])])},t.ɵa=E,t.ɵb=F,t.ɵba=W,t.ɵbb=G,t.ɵbc=q,t.ɵbg=K,t.ɵbi=J,t.ɵbj=Y,t.ɵbk=$,t.ɵbl=tt,t.ɵc=S,t.ɵd=j,t.ɵe=U,t.ɵf=N,t.ɵg=T,t.ɵh=V,t.ɵi=L,t.ɵj=k,t.ɵk=B,t.ɵl=It,t.ɵm=it,t.ɵn=nt,t.ɵo=vt,t.ɵp=ht,t.ɵq=gt,t.ɵr=dt,t.ɵs=pt,t.ɵt=Ct,t.ɵu=bt,t.ɵv=Pt,t.ɵw=et,t.ɵx=Z,t.ɵy=H,t.ɵz=z,Object.defineProperty(t,"__esModule",{value:!0})}));
|
|
1
|
+
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@angular/common"),require("@angular/core"),require("@angular/forms"),require("@angular/material"),require("@angular/material/tabs"),require("@angular/platform-browser/animations"),require("@coolon/pectin"),require("@angular/cdk/portal"),require("@angular/router"),require("lodash"),require("@coolon/typescript-utilities"),require("@angular/material/dialog"),require("@angular/material/icon"),require("@angular/material/list"),require("@angular/material/tooltip"),require("@typescript-plus/fast-memoize-decorator/dist/src"),require("@typescript-plus/fast-memoize-decorator"),require("reflect-metadata"),require("@angular/animations"),require("resize-observer-polyfill")):"function"==typeof define&&define.amd?define("@coolon/angular-ui-powerups",["exports","@angular/common","@angular/core","@angular/forms","@angular/material","@angular/material/tabs","@angular/platform-browser/animations","@coolon/pectin","@angular/cdk/portal","@angular/router","lodash","@coolon/typescript-utilities","@angular/material/dialog","@angular/material/icon","@angular/material/list","@angular/material/tooltip","@typescript-plus/fast-memoize-decorator/dist/src","@typescript-plus/fast-memoize-decorator","reflect-metadata","@angular/animations","resize-observer-polyfill"],e):e(((t=t||self).coolon=t.coolon||{},t.coolon["angular-ui-powerups"]={}),t.ng.common,t.ng.core,t.ng.forms,t.ng.material,t.ng.material.tabs,t.ng.platformBrowser.animations,t.pectin,t.ng.cdk.portal,t.ng.router,t.___default,t.typescriptUtilities,t.ng.material.dialog,t.ng.material.icon,t.ng.material.list,t.ng.material.tooltip,t.src,t.fastMemoizeDecorator,null,t.ng.animations,t.ResizeObserver)}(this,(function(t,e,n,i,o,r,a,s,c,u,l,p,f,d,m,y,h,g,v,b,P){"use strict";var C="default"in l?l.default:l;P=P&&P.hasOwnProperty("default")?P.default:P;var I=function(t,e){return(I=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)};function M(t,e){function n(){this.constructor=t}I(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var D=function(){return(D=Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)};function O(t,e,n,i){var o,r=arguments.length,a=r<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,i);else for(var s=t.length-1;s>=0;s--)(o=t[s])&&(a=(r<3?o(a):r>3?o(e,n,a):o(e,n))||a);return r>3&&a&&Object.defineProperty(e,n,a),a}function R(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)}function A(t,e,n,i){return new(n||(n=Promise))((function(o,r){function a(t){try{c(i.next(t))}catch(t){r(t)}}function s(t){try{c(i.throw(t))}catch(t){r(t)}}function c(t){t.done?o(t.value):new n((function(e){e(t.value)})).then(a,s)}c((i=i.apply(t,e||[])).next())}))}function w(t,e){var n,i,o,r,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return r={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(r[Symbol.iterator]=function(){return this}),r;function s(r){return function(s){return function(r){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,i&&(o=2&r[0]?i.return:r[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,r[1])).done)return o;switch(i=0,o&&(r=[2&r[0],o.value]),r[0]){case 0:case 1:o=r;break;case 4:return a.label++,{value:r[1],done:!1};case 5:a.label++,i=r[1],r=[0];continue;case 7:r=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===r[0]||2===r[0])){a=0;continue}if(3===r[0]&&(!o||r[1]>o[0]&&r[1]<o[3])){a.label=r[1];break}if(6===r[0]&&a.label<o[1]){a.label=o[1],o=r;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(r);break}o[2]&&a.ops.pop(),a.trys.pop();continue}r=e.call(t,a)}catch(t){r=[6,t],i=0}finally{n=o=0}if(5&r[0])throw r[1];return{value:r[0]?r[1]:void 0,done:!0}}([r,s])}}}function x(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var i,o,r=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(i=r.next()).done;)a.push(i.value)}catch(t){o={error:t}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return a}function _(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(x(arguments[e]));return t}var F=function(t){function e(e){var n=t.call(this)||this;return n.elementRef=e,n._commandParameterProvided=!1,n}return M(e,t),Object.defineProperty(e.prototype,"commandParameter",{get:function(){return this._commandParameter},set:function(t){this._commandParameterProvided=!0,this._commandParameter=t},enumerable:!0,configurable:!0}),e.prototype.ngOnInit=function(){s.assert.notNil(this.pectinCommand),this.pectinCommand instanceof s.UnaryCommand?this._commandParameterProvided||s.lang.illegalState("UnaryCommands required the command parameter to be specified."):this._commandParameterProvided&&s.lang.illegalState("command parameters are only supported by UnaryCommands")},e.prototype.ngAfterViewInit=function(){var t=this;(0,s.Dsl.disposeWith(this).chain)(this.pectinCommand.enabled).subscribe((function(e){e?(t.elementRef.nativeElement.removeAttribute("disabled"),"A"===t.elementRef.nativeElement.tagName&&t.elementRef.nativeElement.setAttribute("href","javascript:void")):(t.elementRef.nativeElement.setAttribute("disabled","disabled"),"A"===t.elementRef.nativeElement.tagName&&t.elementRef.nativeElement.removeAttribute("href"))}))},e.prototype.ngOnDestroy=function(){this.dispose()},e.prototype.notifyClick=function(t){t.preventDefault(),t.stopPropagation(),this.pectinCommand.enabled.value?this.pectinCommand instanceof s.UnaryCommand?this.pectinCommand.withContext({event:t}).execute(this.commandParameter):this.pectinCommand.withContext({event:t}).execute():console.warn("disabled command clicked, ignoring.")},e.decorators=[{type:n.Directive,args:[{selector:"[pectinCommand]"}]}],e.ctorParameters=function(){return[{type:n.ElementRef,decorators:[{type:n.Inject,args:[n.ElementRef]}]}]},e.propDecorators={pectinCommand:[{type:n.Input}],commandParameter:[{type:n.Input}],notifyClick:[{type:n.HostListener,args:["click",["$event"]]}]},e}(s.GarbageCollector);var j=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return M(e,t),e.prototype.ngOnDestroy=function(){this.dispose()},e}(s.GarbageCollector),S=function(t){function i(e,n,i){var o=t.call(this)||this;return o.el=e,o.ngZone=n,o.document=i,o}return M(i,t),i.prototype.onFocusIn=function(){this.hasBinding()&&this.pectinFocusBinding.focusContext.notifyFocusIn()},i.prototype.onFocusOut=function(){this.hasBinding()&&this.pectinFocusBinding.focusContext.notifyFocusOut()},i.prototype.ngOnInit=function(){},i.prototype.ngAfterViewInit=function(){var t=this;this.hasBinding()?(0,s.Dsl.disposeWith(this).chain)(this.pectinFocusBinding.focusContext.focused).subscribe((function(e){e&&!t.alreadyHasFocus()&&t.tryAndFocus()})):s.Logger.get(this).warn("pectinFocusBinding was nil")},i.prototype.hasBinding=function(){return!!this.pectinFocusBinding&&!!this.pectinFocusBinding.focusContext},i.prototype.alreadyHasFocus=function(){return this.isFocused(this.focusTarget)},i.prototype.isFocused=function(t){return this.document.activeElement===t},i.prototype.tryAndFocus=function(t){var e=this;void 0===t&&(t=5),this.modelShouldStillHaveFocus()&&this.canFocus()&&(this.alreadyHasFocus()||this.focusTarget.focus(),this.alreadyHasFocus()||(s.Logger.get(this).log("focus failed, trying "+t+" more times"),t>0?requestAnimationFrame((function(){e.tryAndFocus(t-1)})):s.Logger.get(this).warn("Tried to focus but gave up as the component wasn't enabled or visible.")))},Object.defineProperty(i.prototype,"focusTarget",{get:function(){return this.focusBindingTarget||this.el.nativeElement},enumerable:!0,configurable:!0}),i.prototype.modelShouldStillHaveFocus=function(){return this.hasBinding()&&this.pectinFocusBinding.focusContext.focused.value},i.prototype.canFocus=function(){var t=this.focusTarget.getBoundingClientRect();return t.height>=0&&t.height>=0&&!this.focusTarget.disabled},i.decorators=[{type:n.Directive,args:[{selector:"[pectinFocusBinding]"}]}],i.ctorParameters=function(){return[{type:n.ElementRef,decorators:[{type:n.Inject,args:[n.ElementRef]}]},{type:n.NgZone,decorators:[{type:n.Inject,args:[n.NgZone]}]},{type:void 0,decorators:[{type:n.Inject,args:[e.DOCUMENT]}]}]},i.propDecorators={pectinFocusBinding:[{type:n.Input}],focusBindingTarget:[{type:n.Input}],onFocusIn:[{type:n.HostListener,args:["focusin"]}],onFocusOut:[{type:n.HostListener,args:["focusout"]}]},i}(j);var E=function(){function t(){}return t.decorators=[{type:n.NgModule,args:[{declarations:[F,S],imports:[e.CommonModule,a.BrowserAnimationsModule,i.FormsModule,o.MatInputModule,o.MatFormFieldModule,o.MatSelectModule,r.MatTabsModule],exports:[F,S]}]}],t}(),T=function(t){function e(){var e=t.call(this)||this;e.valueModel=new s.DelegatingFormValueModel,e.focus=new n.EventEmitter,e.blur=new n.EventEmitter,e.enterKey=new n.EventEmitter,e.escapeKey=new n.EventEmitter;var i=e;return e.errorStateMatcher={isErrorState:function(t,e){return i.hasErrors()}},e}return M(e,t),Object.defineProperty(e.prototype,"userValueModel",{set:function(t){this.valueModel.setDelegate(t)},enumerable:!0,configurable:!0}),e.prototype.notifyClick=function(){this.safelyInvoke(this.clickCommand)},e.prototype.notifyFocusIn=function(){this.safelyInvoke(this.focusCommand),this.focus.emit()},e.prototype.notifyFocusOut=function(){this.safelyInvoke(this.blurCommand),this.blur.emit()},e.prototype.notifyEnterKey=function(){this.safelyInvoke(this.enterCommand),this.enterKey.emit()},e.prototype.notifyEscapeKey=function(){this.safelyInvoke(this.escapeCommand),this.escapeKey.emit()},e.prototype.safelyInvoke=function(t){t&&t.enabled.value&&t.execute()},e.prototype.ngOnInit=function(){},e.prototype.isEnabled=function(){return this.enabled.value},Object.defineProperty(e.prototype,"enabled",{get:function(){return this.valueModel.enabled},enumerable:!0,configurable:!0}),e.prototype.hasErrors=function(){return!this.errorList.query().isEmpty()},Object.defineProperty(e.prototype,"errorList",{get:function(){return this.valueModel.errorList},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"firstError",{get:function(){return this.hasErrors()?this.errorList.value[0]:null},enumerable:!0,configurable:!0}),e.propDecorators={userValueModel:[{type:n.Input,args:["valueModel"]}],label:[{type:n.Input}],floatLabel:[{type:n.Input}],hint:[{type:n.Input}],placeholder:[{type:n.Input}],focusCommand:[{type:n.Input,args:["command.focus"]}],blurCommand:[{type:n.Input,args:["command.blur"]}],enterCommand:[{type:n.Input,args:["command.enter"]}],escapeCommand:[{type:n.Input,args:["command.escape"]}],clickCommand:[{type:n.Input,args:["command.click"]}],focus:[{type:n.Output}],blur:[{type:n.Output}],enterKey:[{type:n.Output}],escapeKey:[{type:n.Output}],notifyClick:[{type:n.HostListener,args:["click"]}],notifyFocusIn:[{type:n.HostListener,args:["focusin"]}],notifyFocusOut:[{type:n.HostListener,args:["focusout"]}]},O([s.UseDelegate(),R("design:type",s.ValueModel),R("design:paramtypes",[s.ValueModel])],e.prototype,"userValueModel",null),e}(j);var N=function(t){function e(){return t.call(this)||this}return M(e,t),e.prototype.ngOnInit=function(){},e.decorators=[{type:n.Component,args:[{selector:"aup-number-input",template:'<mat-form-field appearance="standard" [floatLabel]="floatLabel">\n <mat-label *ngIf="label">{{label}}</mat-label>\n <input type="number"\n matInput\n placeholder="{{placeholder}}"\n [(ngModel)]="valueModel.value"\n [disabled]="!enabled.value"\n (keydown.enter)="notifyEnterKey()"\n (keydown.escape)="notifyEscapeKey()"\n [pectinFocusBinding]="valueModel"\n [errorStateMatcher]="errorStateMatcher"\n >\n <mat-hint *ngIf="hint">{{hint}}</mat-hint>\n <mat-error *ngIf="hasErrors">{{firstError}}</mat-error>\n</mat-form-field>\n',styles:[":host{display:block}input,mat-form-field{width:100%}input mat-hint.faux-error,mat-form-field mat-hint.faux-error{color:#f44336}"]}]}],e.ctorParameters=function(){return[]},e}(T),L=function(t){function e(){return t.call(this)||this}return M(e,t),e.prototype.ngOnInit=function(){},e.decorators=[{type:n.Component,args:[{selector:"aup-password-input",template:'<mat-form-field appearance="standard" [floatLabel]="floatLabel">\n <mat-label *ngIf="label">{{label}}</mat-label>\n <input type="password"\n matInput\n placeholder="{{placeholder}}"\n [(ngModel)]="valueModel.value"\n [disabled]="!enabled.value"\n (keydown.enter)="notifyEnterKey()"\n (keydown.escape)="notifyEscapeKey()"\n [pectinFocusBinding]="valueModel"\n [errorStateMatcher]="errorStateMatcher"\n >\n <mat-hint *ngIf="hint">{{hint}}</mat-hint>\n <mat-error *ngIf="hasErrors">{{firstError}}</mat-error>\n</mat-form-field>\n\n',styles:[":host{display:block}input,mat-form-field{width:100%}input mat-hint.faux-error,mat-form-field mat-hint.faux-error{color:#f44336}"]}]}],e.ctorParameters=function(){return[]},e}(T),k=function(t){function e(){var e=t.call(this)||this;return e.optionLabelFormat=function(t){return t&&e.optionLabel?t[e.optionLabel]:t},e}return M(e,t),e.prototype.ngOnInit=function(){},e.decorators=[{type:n.Component,args:[{selector:"aup-select-input",template:'<mat-form-field appearance="standard" [floatLabel]="floatLabel">\n <mat-label *ngIf="label">{{label}}</mat-label>\n <mat-select placeholder="{{placeholder}}"\n [(ngModel)]="valueModel.value"\n [disabled]="!enabled.value"\n (keydown.enter)="notifyEnterKey()"\n (keydown.escape)="notifyEscapeKey()"\n [pectinFocusBinding]="valueModel"\n [errorStateMatcher]="errorStateMatcher"\n >\n <mat-option *ngFor="let option of optionsModel.value" [value]="option">{{optionLabelFormat(option)}}\n </mat-option>\n </mat-select>\n <mat-hint *ngIf="hint">{{hint}}</mat-hint>\n <mat-error *ngIf="hasErrors">{{firstError}}</mat-error>\n</mat-form-field>\n',styles:[":host{display:inline-block}mat-form-field{width:100%}"]}]}],e.ctorParameters=function(){return[]},e.propDecorators={optionsModel:[{type:n.Input}],options:[{type:n.Input}],optionLabel:[{type:n.Input}],optionLabelFormat:[{type:n.Input}]},O([s.UseDelegate(),R("design:type",s.ListModel)],e.prototype,"optionsModel",void 0),O([s.StoreInListModel("optionsModel"),R("design:type",Array)],e.prototype,"options",void 0),e}(T);var V=function(t){function e(){return t.call(this)||this}return M(e,t),e.prototype.ngOnInit=function(){},e.decorators=[{type:n.Component,args:[{selector:"aup-string-input",template:'<mat-form-field appearance="standard" [floatLabel]="floatLabel">\n <mat-label *ngIf="label">{{label}}</mat-label>\n <input matInput\n placeholder="{{placeholder}}"\n [(ngModel)]="valueModel.value"\n [disabled]="!enabled.value"\n (keydown.enter)="notifyEnterKey()"\n (keydown.escape)="notifyEscapeKey()"\n [pectinFocusBinding]="valueModel"\n [errorStateMatcher]="errorStateMatcher"\n >\n <mat-hint *ngIf="hint">{{hint}}</mat-hint>\n <mat-error *ngIf="hasErrors">{{firstError}}</mat-error>\n</mat-form-field>\n\n',styles:[":host{display:block}input,mat-form-field{width:100%}input mat-hint.faux-error,mat-form-field mat-hint.faux-error{color:#f44336}"]}]}],e.ctorParameters=function(){return[]},e}(T),B=function(){function t(){}return t.decorators=[{type:n.Component,args:[{selector:"aup-noop",template:"",styles:[":host{display:block}"]}]}],t.ctorParameters=function(){return[]},t}(),U=function(){function t(){}return t.decorators=[{type:n.NgModule,args:[{declarations:[N,V,L,k,B],imports:[e.CommonModule,a.BrowserAnimationsModule,i.FormsModule,o.MatInputModule,o.MatFormFieldModule,o.MatSelectModule,r.MatTabsModule,E],exports:[N,V,L,k,B]}]}],t}(),H=function(t){function e(){return t.call(this)||this}return M(e,t),Object.defineProperty(e.prototype,"currentActivity",{get:function(){return l.last(this.activityList.value)},enumerable:!0,configurable:!0}),e}(s.GarbageCollector);var q=new n.InjectionToken("InteractionActivityData");t.ɵbd=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e._busyModel=(new s.DelegatingValueModel).withDefault(!1),e}return M(e,t),e.prototype.initialise=function(t){p.assert.isNil(this._activityContext),this._activityContext=t},e.prototype.done=function(t){return this._activityContext.onDone(t)},e.prototype.cancel=function(t){this._activityContext.onCancel(t)},e.prototype.onActivityReady=function(){},Object.defineProperty(e.prototype,"busy",{get:function(){return this._busyModel.readonly},enumerable:!0,configurable:!0}),e.prototype.busyWhile=function(t){this._busyModel.setDelegate(t)},e.prototype.isBusy=function(){return this._busyModel.value},e}(s.GarbageCollector),function(t){function e(){}t.Callbacks=e}(t.ɵbd||(t.ɵbd={}));var z=function(){function t(t,e,n){this.componentFactoryResolver=t,this.viewContainerRef=e,this.injector=n}return Object.defineProperty(t.prototype,"activityContext",{get:function(){return this._activityContext},set:function(t){s.assert.isNil(this._activityContext),this._activityContext=t,this.loadActivity(t)},enumerable:!0,configurable:!0}),t.prototype.ngOnInit=function(){},t.prototype.loadActivity=function(t){var e=n.Injector.create({providers:[{provide:H,useValue:this.interactionContext},{provide:q,useValue:t.activityData}],parent:this.injector}),i=this.componentFactoryResolver.resolveComponentFactory(t.activityClass);this.viewContainerRef.clear(),this.activityComponentRef=this.viewContainerRef.createComponent(i,0,e),this.activityComponentRef.instance.initialise(t),this.activityContext.componentReady&&this.activityContext.componentReady(this.component)},Object.defineProperty(t.prototype,"component",{get:function(){return this.activityComponentRef.instance},enumerable:!0,configurable:!0}),t.decorators=[{type:n.Component,args:[{selector:"aup-activity-outlet",template:"",styles:[":host{display:block}"]}]}],t.ctorParameters=function(){return[{type:n.ComponentFactoryResolver},{type:n.ViewContainerRef},{type:n.Injector}]},t.propDecorators={interactionContext:[{type:n.Input}],activityContext:[{type:n.Input}]},t}();var G=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return M(e,t),e}(t.ɵbd),K=function(t){function e(e){var n=t.call(this)||this;return n.alert=e,n}return M(e,t),e.prototype.ngOnInit=function(){},e.decorators=[{type:n.Component,args:[{selector:"aup-alert-dialog",template:'<h3 matDialogTitle *ngIf="alert.title">{{alert.title()}}</h3>\n<div matDialogContent>\n <p *ngFor="let line of alert.content()">{{line}}</p>\n</div>\n<p matDialogActions>\n <button mat-raised-button color="primary" (click)="done()" data-cy="close-button">{{alert.ok()}}</button>\n</p>\n',styles:[":host{display:block;padding:var(--aup-default-padding)}.mat-dialog-actions{justify-content:flex-end}"]}]}],e.ctorParameters=function(){return[{type:void 0,decorators:[{type:n.Inject,args:[q]}]}]},e}(G);t.ɵbf=function(t){function e(e,n){var i=t.call(this)||this;return i.config=e,i.interactionContext=n,s.assert.notNil(e),i}return M(e,t),e.prototype.ngOnInit=function(){},Object.defineProperty(e.prototype,"confirm",{get:function(){return this.config.confirm},enumerable:!0,configurable:!0}),e.prototype.isDestructive=function(){return this.confirm.destructive&&this.confirm.destructive()},e.prototype.onConfirm=function(){var t=this;this.interactionContext.startActivity(this.config.activityType,this.config.data).then((function(e){return t.done(e)})).catch((function(e){return t.cancel(e)}))},e.decorators=[{type:n.Component,args:[{selector:"aup-confirmation-dialog",template:'<h3 matDialogTitle *ngIf="confirm.title">{{confirm.title()}}</h3>\n<div matDialogContent>\n <p *ngFor="let line of confirm.content()">{{line}}</p>\n</div>\n<p matDialogActions>\n <button mat-button (click)="cancel()" data-cy="cancel-button">{{confirm.cancel()}}</button>\n <button mat-raised-button [color]="isDestructive() ? \'warn\' : \'primary\'"\n (click)="onConfirm()" data-cy="confirm-button">{{confirm.ok()}}</button>\n</p>\n\n',styles:[":host{display:block;padding:var(--aup-default-padding)}.mat-dialog-actions{justify-content:flex-end}"]}]}],e.ctorParameters=function(){return[{type:void 0,decorators:[{type:n.Inject,args:[q]}]},{type:H}]},e}(G),function(t){function e(){}t.Data=e}(t.ɵbf||(t.ɵbf={}));var W=function(t){function e(e){var n=t.call(this)||this;return n.confirm=e,s.assert.notNil(e),n}return M(e,t),e.prototype.ngOnInit=function(){},e.prototype.isDestructive=function(){return this.confirm.destructive&&this.confirm.destructive()},e.decorators=[{type:n.Component,args:[{selector:"aup-confirmation-dialog",template:'<h3 matDialogTitle *ngIf="confirm.title">{{confirm.title()}}</h3>\n<div matDialogContent>\n <p *ngFor="let line of confirm.content()">{{line}}</p>\n</div>\n<p matDialogActions>\n <button mat-button (click)="cancel()" data-cy="cancel-button">{{confirm.cancel()}}</button>\n <button mat-raised-button [color]="isDestructive() ? \'warn\' : \'primary\'"\n (click)="done()" data-cy="confirm-button">{{confirm.ok()}}</button>\n</p>\n\n',styles:[":host{display:block;padding:var(--aup-default-padding)}.mat-dialog-actions{justify-content:flex-end}"]}]}],e.ctorParameters=function(){return[{type:void 0,decorators:[{type:n.Inject,args:[q]}]}]},e}(G);var X=function(){function t(t,e,n,i){this.activityData=t,this.activityClass=e,this.interactionContext=n,this.activityCallbacks=i,this._complete=!1}return t.prototype.isComponentRealised=function(){return!!this._component},t.prototype.isComplete=function(){return this._complete},t.prototype.componentReady=function(t){s.assert.isNil(this._component),this._component=t},Object.defineProperty(t.prototype,"component",{get:function(){return this._component},enumerable:!0,configurable:!0}),t.prototype.onDone=function(t){this._complete=!0,this.activityCallbacks.onDone(t)},t.prototype.onCancel=function(t){this._complete=!0,this.activityCallbacks.onCancel(t)},t}();var Z=function(e){function i(){var t=e.call(this)||this;t.throttledNestedActivityFinishEvents=new s.MutableStream,t.initialActivityOutletContextEvent=new n.EventEmitter,t.dynamicHeight=!1,t.activityTabs=new s.MutableListModel,t._activityList=new s.MutableListModel;var i=s.Dsl.disposeWith(t),o=i.chain;i.valueOf,i.before,i.when,i.after,i.observe,i.switchOn;return o(t.throttledNestedActivityFinishEvents).throttle(50).subscribe((function(){return t.onNestedActivityFinished()})),t}return M(i,e),Object.defineProperty(i.prototype,"initialActivityOutletContext",{get:function(){return this._initialActivityOutletContext},set:function(t){s.assert.isNil(this._initialActivityOutletContext);var e=this;t&&(this._initialActivityOutletContext=t,this.activityTabs.push(new X(t.activityData,t.activityClass,this,{onDone:function(n){e.finishInitialActivity(),t.onDone(n)},onCancel:function(n){e.finishInitialActivity(),t.onCancel(n)}})))},enumerable:!0,configurable:!0}),i.prototype.isActive=function(){return this._activityList.length>0},Object.defineProperty(i.prototype,"activityList",{get:function(){return this._activityList.readonly},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"isFinished",{get:function(){return!this._initialActivityOutletContext},enumerable:!0,configurable:!0}),i.prototype.ngOnInit=function(){},i.prototype.ngAfterViewInit=function(){var t=this,e=s.Dsl.disposeWith(this),n=(e.chain,e.observe);n.valuesFrom(this.outlets.changes).subscribe((function(){return setTimeout((function(){return t.updateActivityList()}))})),n.valuesFrom(this.tabs.animationDone).subscribe((function(){return t.onAnimationFinished()})),this.updateActivityList()},i.prototype.startActivity=function(t,e){var n=this;this.cleanupStaleNestedActivities();var i=this;return new Promise((function(o,r){var a=new X(e,t,i,{onDone:function(t){o(t),i.throttledNestedActivityFinishEvents.publish({})},onCancel:function(t){r(t),i.throttledNestedActivityFinishEvents.publish({})}});i.activityTabs.push(a),i.tabs.selectedIndex=n.activityTabs.length}))},i.prototype.alert=function(t){return this.startActivity(K,t)},i.prototype.confirm=function(t){return this.startActivity(W,t)},i.prototype.confirmThen=function(e,n,i){return this.startActivity(t.ɵbf,{confirm:e,activityType:n,data:i})},i.prototype.finishInitialActivity=function(){this._initialActivityOutletContext=null,this.activityTabs.value=[],this._activityList.value=[],this.initialActivityOutletContextEvent.emit(null)},i.prototype.onNestedActivityFinished=function(){this.synchroniseSelectedTabIndex(),this.updateActivityList()},i.prototype.cleanupStaleNestedActivities=function(){var t=this;this.tabs.selectedIndex<this.activityTabs.length-1&&this.activityTabs.runInTransaction((function(e){e.value=e.value.slice(0,1+t.tabs.selectedIndex)}))},i.prototype.synchroniseSelectedTabIndex=function(){var t=this.tabs.selectedIndex,e=this.activityTabs.query().findIndex((function(t){return t.isComplete()}))-1;return this.tabs.selectedIndex=e,t===e},i.prototype.onAnimationFinished=function(){this.getSelectedOutlet().component.onActivityReady(),this.cleanupStaleNestedActivities(),this.updateActivityList()},i.prototype.updateActivityList=function(){this._activityList.value=this.activityTabs.value.filter((function(t){return!t.isComplete()&&t.isComponentRealised()})).map((function(t){return t.component}))},i.prototype.getSelectedOutlet=function(){return this.outlets.toArray()[this.tabs.selectedIndex]},i.decorators=[{type:n.Component,args:[{selector:"aup-activity-container",template:'<mat-tab-group #tabs no-tab-header [dynamicHeight]="dynamicHeight" [class.full-height-tabs]="!dynamicHeight">\n <mat-tab *ngFor="let tab of activityTabs.value">\n <aup-activity-outlet [interactionContext]="this" [activityContext]="tab"></aup-activity-outlet>\n </mat-tab>\n</mat-tab-group>\n',styles:[":host{display:flex;flex-direction:column}mat-tab-group{flex:1}"]}]}],i.ctorParameters=function(){return[]},i.propDecorators={initialActivityOutletContext:[{type:n.Input}],initialActivityOutletContextEvent:[{type:n.Output,args:["initialActivityOutletContext"]}],dynamicHeight:[{type:n.Input}],tabs:[{type:n.ViewChild,args:["tabs",{static:!0}]}],outlets:[{type:n.ViewChildren,args:[z]}]},i}(H);var Y=function(e){function i(){return e.call(this)||this}return M(i,e),i.prototype.ngOnInit=function(){},Object.defineProperty(i.prototype,"activityList",{get:function(){return this.interactionContext.activityList},enumerable:!0,configurable:!0}),i.prototype.isActive=function(){return this.interactionContext.isActive()},i.prototype.alert=function(t){return this._startActivity(K,t)},i.prototype.confirm=function(t){return this._startActivity(W,t)},i.prototype.confirmThen=function(e,n,i){return this._startActivity(t.ɵbf,{confirm:e,activityType:n,data:i})},i.prototype.startActivity=function(t,e){return this._startActivity(t,e)},i.prototype._startActivity=function(t,e){var n=this;return new Promise((function(i,o){n.interactionContext.initialActivityOutletContext={activityClass:t,activityData:e,onDone:function(t){i(t)},onCancel:function(t){o(t)}}}))},i.decorators=[{type:n.Component,args:[{selector:"aup-inplace-interaction-context",template:'<mat-tab-group no-tab-header [selectedIndex]="isActive() ? 1 : 0" full-height-tabs [dynamicHeight]="false">\n <mat-tab>\n <ng-content></ng-content>\n </mat-tab>\n <mat-tab>\n <aup-activity-container #activityContainer\n [(initialActivityOutletContext)]="initialActivityContext"\n [dynamicHeight]="false"></aup-activity-container>\n </mat-tab>\n</mat-tab-group>\n\n',styles:[":host{display:flex;flex-direction:column}mat-tab-group{flex:1}"]}]}],i.ctorParameters=function(){return[]},i.propDecorators={interactionContext:[{type:n.ViewChild,args:["activityContainer",{static:!0}]}]},i}(H);var J=function(){function t(){}return t.decorators=[{type:n.Component,args:[{selector:"aup-interaction-outlet",template:'<router-outlet name="interaction-context"></router-outlet>\n',styles:[":host{display:block}"]}]}],t.ctorParameters=function(){return[]},t}(),$=new n.InjectionToken("DIALOG_INTERACTION_SERVICE_DEFAULTS"),Q=function(t){function e(){return t.call(this,{initialValue:!1})||this}return M(e,t),Object.defineProperty(e.prototype,"value",{get:function(){return this.store.read()},enumerable:!0,configurable:!0}),e.prototype.whileTrue=function(t){this.startTransaction().commit(!0);try{return t()}finally{this.startTransaction().commit(!1)}},e.prototype.runIfFalse=function(t,e){return void 0===e&&(e=null),this.value?e:t()},e}(s.ValueModel),tt=function(i){function r(t,e,n,o,r){var a=i.call(this)||this;return a.dialogService=t,a.location=e,a.router=n,a.dialogServiceDefaults=o,a.matDialogDefaultConfig=r,a._activityList=new s.DelegatingListModel,a.startingGuard=new Q,p.assert.notNil(t),a}return M(r,i),r.prototype.isActive=function(){return this._activityList.length>0},r.prototype.cancelActivity=function(){this.currentActivity.cancel(null)},Object.defineProperty(r.prototype,"activityList",{get:function(){return this._activityList.readonly},enumerable:!0,configurable:!0}),r.prototype.startActivity=function(t,e){return this._startActivity(t,e)},r.prototype._startActivity=function(t,e,n){var i=this;return void 0===n&&(n=!0),this.isActive()&&s.lang.illegalState("Activity already in progress: "+this.activityList.value.map((function(t){return t.constructor.name})).join(", ")),this.startingGuard.whileTrue((function(){console.log("###### STARTING");var o=i,r=D({autoFocus:!1,hasBackdrop:!0,closeOnNavigation:!1},i.matDialogDefaultConfig,i.dialogServiceDefaults,{data:e,disableClose:n,panelClass:"dialog-interaction-service"}),a=i.dialogService.open(Z,r);return new Promise((function(n,i){var r=a.componentInstance;o.safelyUpdateActivityListDelegate(r.activityList),r.initialActivityOutletContext={activityClass:t,activityData:e,onDone:function(t){n(t),a.close(!0)},onCancel:function(t){i(t),a.close(!0)}},a.afterClosed().subscribe((function(t){t||i("auto-closed")})),a.updateSize()})).finally((function(){console.log("###### FINISHED"),o.safelyUpdateActivityListDelegate(null)}))}))},r.prototype.safelyUpdateActivityListDelegate=function(t){var e=this;setTimeout((function(){return e._activityList.setDelegate(t)}))},r.prototype.alert=function(t){return this._startActivity(K,t,!1)},r.prototype.confirm=function(t){return this._startActivity(W,t,!0)},r.prototype.confirmThen=function(e,n,i){return this._startActivity(t.ɵbf,{confirm:e,activityType:n,data:i},!0)},r.decorators=[{type:n.Injectable,args:[{providedIn:"root"}]}],r.ctorParameters=function(){return[{type:o.MatDialog},{type:e.Location},{type:u.Router},{type:f.MatDialogConfig,decorators:[{type:n.Optional},{type:n.Inject,args:[$]}]},{type:f.MatDialogConfig,decorators:[{type:n.Optional},{type:n.Inject,args:[f.MAT_DIALOG_DEFAULT_OPTIONS]}]}]},r.ngInjectableDef=n.ɵɵdefineInjectable({factory:function(){return new r(n.ɵɵinject(f.MatDialog),n.ɵɵinject(e.Location),n.ɵɵinject(u.Router),n.ɵɵinject($,8),n.ɵɵinject(f.MAT_DIALOG_DEFAULT_OPTIONS,8))},token:r,providedIn:"root"}),r}(H);var et=function(){function i(){}return i.decorators=[{type:n.NgModule,args:[{imports:[e.CommonModule,o.MatButtonModule,o.MatDialogModule,o.MatTabsModule,c.PortalModule,u.RouterModule],declarations:[Z,W,t.ɵbf,K,z,J,Y],exports:[Z,z,J,Y],entryComponents:[Z,W,t.ɵbf,K],providers:[tt]}]}],i}(),nt=function(){function t(){}return t.prototype.ngOnInit=function(){},t.decorators=[{type:n.Component,args:[{selector:"aup-busy-overlay",template:'<ng-content></ng-content>\n<div class="busy-overlay-backdrop" *ngIf="busyModel.value">\n <mat-progress-spinner mode="indeterminate" [diameter]="52"></mat-progress-spinner>\n</div>\n',styles:[":host{position:relative}div.busy-overlay-backdrop{position:absolute;background-color:rgba(0,0,0,.2);top:0;left:0;bottom:0;right:0;display:-ms-grid;display:grid;-ms-grid-columns:auto;grid-template-columns:auto;-ms-grid-rows:auto;grid-template-rows:auto;place-content:center}"]}]}],t.ctorParameters=function(){return[]},t.propDecorators={busyModel:[{type:n.Input}],busy:[{type:n.Input}]},O([s.UseDelegate(),R("design:type",s.ValueModel)],t.prototype,"busyModel",void 0),O([s.StoreInValueModel("busyModel"),R("design:type",Boolean)],t.prototype,"busy",void 0),t}();var it=function(){function t(){}return t.prototype.ngOnInit=function(){},t.decorators=[{type:n.Component,args:[{selector:"aup-empty-state",template:'\n <div class="container">\n <ng-content></ng-content>\n </div>\n ',styles:[":host{display:flex;flex-direction:column;justify-content:center;align-items:center}.container{padding:var(--aup-default-padding);border:2px dashed rgba(0,0,0,.2);border-radius:5px;font-size:14px;font-weight:300}"]}]}],t.ctorParameters=function(){return[]},t}();t.ParameterDefinition=function(){function t(t,e,n){this.propertyName=t,this.urlFormat=n,this.options=p.Opts.get(e),this.remember=this.options.getOptional("remember",!1),this.defaultValue=this.options.getOptional("defaultValue",null)}return Object.defineProperty(t.prototype,"name",{get:function(){return this.options.getOptional("as",this.propertyName)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isRouteParameter",{get:function(){return!!this.urlFormat},enumerable:!0,configurable:!0}),t.prototype.getOptionValue=function(t){return this.options.getOptional(t,null)},t.prototype.sanitise=function(t,e,n,i){return A(this,void 0,void 0,(function(){var i;return w(this,(function(o){return this.isMissingFrom(e)?(i=C.first(n.getHistory(e.placeDefinition)),this.remember&&i&&(t=i.getParameter(this.name)),[2,this.isEmptyValue(t)?this.defaultValue:t]):[2,t]}))}))},t.prototype.isMissingFrom=function(t){return!t.hasParameter(this.name)},t}(),function(t){function e(){}t.Options=e;var n=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.isRouteId=!0,e.isArray=!1,e}return M(e,t),e.prototype.isEmptyValue=function(t){return C.isNil(t)},e.prototype.hasChanged=function(t,e){return t!==e},e}(t);t.RouteId=n;var i=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.isRouteId=!1,e.isArray=!1,e}return M(e,t),e.prototype.isEmptyValue=function(t){return C.isNil(t)},e.prototype.hasChanged=function(t,e){return t!==e},e}(t);t.ValueParameter=i;var o=function(t){function e(e,n,i){var o=t.call(this,e,n,i)||this;return o.isRouteId=!1,o.isArray=!0,o}return M(e,t),e.prototype.isEmptyValue=function(t){return C.isNil(t)||t.length<1},e.prototype.hasChanged=function(t,e){return!C.isEqual(t,e)},e}(t);t.ArrayParameter=o}(t.ParameterDefinition||(t.ParameterDefinition={})),t.PlaceDefinition=function(){function e(t,e,n,i,o,r){this.component=t,this.path=e,this.authenticate=n,this.data=i,this.routeParameters=o,this.children=r}return e.prototype.hasRouteId=function(){return!!this.getRouteIdParameterDef()},e.prototype.getRouteIdParameterDef=function(){return this.routeParameters.find((function(t){return t.isRouteId}))},e.prototype.getRouteParameterDefs=function(t){return void 0===t&&(t=!1),this.getVisitParameterDefs({includeRouteId:t,includeRouteParameters:!0})},e.prototype.getVisitParameterDefs=function(t){var e=p.Opts.get(t),n=!t||e.getOptional("includeRouteId",!1),i=!t||e.getOptional("includeRouteParameters",!1),o=!t||e.getOptional("includeNonRouteParameters",!1);return this.routeParameters.filter((function(t){return n&&t.isRouteId||i&&t.isRouteParameter&&!t.isRouteId||o&&!t.isRouteParameter}))},e.prototype.getPlaceData=function(t,e){return this.data?C.isNil(this.data[t])?e:this.data[t]:e},e.prototype.searchPlaceData=function(t,e){var n=this;if(this.data){var i=t.find((function(t){return!C.isNil(n.data[t])}));return i?this.data[i]:e}return e},e.prototype.getRouteIdFrom=function(t){var e=this.getRouteIdParameterDef();return e?t.getParameter(e.name):null},e.prototype.getFormattedRouteId=function(t){return t.hasRouteId()?this.getRouteIdParameterDef().urlFormat.format(t.getRouteId()):null},e.prototype.getFormattedRouteParameters=function(t,e){void 0===e&&(e=!1);var n={};return this.getVisitParameterDefs({includeRouteId:e,includeRouteParameters:!0}).forEach((function(e){var i=t.getParameter(e.name);e.isEmptyValue(i)||(e.isArray?(s.assert.isArray(i),n[e.name]=i.map((function(t){return e.urlFormat.format(t)}))):(s.assert.isFalsey(Array.isArray(i)),n[e.name]=e.urlFormat.format(i)))})),n},e.prototype.getNonRouteParameters=function(t){var e={};return this.getVisitParameterDefs({includeNonRouteParameters:!0}).forEach((function(n){var i=t.getParameter(n.name);n.isEmptyValue(i)||(e[n.name]=i)})),e},e.prototype.parseRouteParams=function(t){var e={};return this.getVisitParameterDefs({includeRouteId:!0,includeRouteParameters:!0,includeNonRouteParameters:!1}).forEach((function(n){if(t.has(n.name))if(n.isArray){var i=t.getAll(n.name);e[n.name]=i.map((function(t){return n.urlFormat.parse(t)}))}else{var o=n.urlFormat.parse(t.get(n.name));n.isRouteId&&n.isEmptyValue(o)||(e[n.name]=o)}})),e},O([h.Memoize(),R("design:type",Function),R("design:paramtypes",[]),R("design:returntype",t.ParameterDefinition)],e.prototype,"getRouteIdParameterDef",null),O([h.Memoize(),R("design:type",Function),R("design:paramtypes",[Object]),R("design:returntype",Array)],e.prototype,"getRouteParameterDefs",null),O([h.Memoize(),R("design:type",Function),R("design:paramtypes",[Object]),R("design:returntype",Array)],e.prototype,"getVisitParameterDefs",null),e}(),function(t){function e(){}t.ParameterOptions=e}(t.PlaceDefinition||(t.PlaceDefinition={}));var ot,rt="PLACE_DEFINITION_OPTIONS",at=Symbol("place:route:parameters");t.PlaceComponent=function(e){function n(){return e.call(this)||this}return M(n,e),n.prototype.initialiseBindings=function(t){var e=this;s.assert.isNil(this.visit),this.visit=t,this.placeDefinition.getVisitParameterDefs().forEach((function(t){e.installBinding(t)}))},n.prototype.installBinding=function(t){var e=this[t.propertyName];this.registerDisposable(new s.Binding(this.visit,e,{toRight:function(e){return e.getParameter(t.name)},toLeft:function(e,n){return console.log("push to route",{name:t.name,value:e,currentVisit:n}),n.replace(t,e)}}))},Object.defineProperty(n.prototype,"placeDefinition",{get:function(){return n.getDefinition(this.constructor)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"childPlaces",{get:function(){return this.placeDefinition.children.map((function(t){return t.component}))},enumerable:!0,configurable:!0}),n.prototype.canDeactivate=function(){return!0},n.prototype.onPlaceReady=function(){},O([g.Memoize(),R("design:type",t.PlaceDefinition),R("design:paramtypes",[])],n.prototype,"placeDefinition",null),n}(j),(ot=t.PlaceComponent||(t.PlaceComponent={})).isPlaceComponentConstructor=function(t){return s.lang.constructorChain(t).includes(ot)},ot.getRouteParameters=function(t){return p.Klass.get(t).getMetadataList(at)},ot.getDefinition=function(t){return Reflect.getMetadata(rt,t)},ot.injectDefinition=function(t,e){Reflect.defineMetadata(rt,e,t)};var st,ct,ut,lt=function(){function t(t,e){void 0===e&&(e={}),this.placeDefinition=t,this.visitParameters=e}return t.prototype.getRouteId=function(){return this.placeDefinition.getRouteIdFrom(this)},t.prototype.hasRouteId=function(){return!l.isNil(this.getRouteId())},t.prototype.getParameter=function(t){return this.visitParameters[t]},t.prototype.hasParameter=function(t){return Object.keys(this.visitParameters).includes(t)},t.prototype.replace=function(e,n){var i;return new t(this.placeDefinition,D({},this.visitParameters,((i={})[e.name]=n,i)))},t.prototype.mergeRouteParameters=function(e){var n=this,i=Object.keys(e),o={};return this.placeDefinition.getVisitParameterDefs().forEach((function(t){t.isRouteId||t.isRouteParameter?i.includes(t.name)&&(o[t.name]=e[t.name]):n.hasParameter(t.name)&&(o[t.name]=n.getParameter(t.name))})),new t(this.placeDefinition,o)},t.prototype.hasRoutingChangedFrom=function(t){var e=t.placeDefinition===this.placeDefinition,n=l.isEqual(this.placeDefinition.getFormattedRouteParameters(this,!0),this.placeDefinition.getFormattedRouteParameters(t,!0));return!e||!n},t.prototype.hasChangedFrom=function(t){return!l.isEqual(this.placeDefinition.getNonRouteParameters(this),this.placeDefinition.getNonRouteParameters(t))||this.hasRoutingChangedFrom(t)},t.prototype.getUrlSegments=function(){return this.placeDefinition.hasRouteId()?[new u.UrlSegment(this.placeDefinition.path,{}),new u.UrlSegment(this.placeDefinition.getFormattedRouteId(this),this.placeDefinition.getFormattedRouteParameters(this))]:[new u.UrlSegment(this.placeDefinition.path,this.placeDefinition.getFormattedRouteParameters(this))]},t}();t.NavigationSession=function(){function t(t){this.firstNavigation=t,this._alreadyAccepted=[],this._visits=new Map}return t.prototype.storeVisit=function(t){this._visits.set(t.placeDefinition,t)},t.prototype.getVisitFor=function(t){return this._visits.get(t)},t.prototype.mergePrivatePlaceParameters=function(t){return null},t.prototype.alreadyAccepted=function(t){return this._alreadyAccepted.includes(t)},t.prototype.rememberAcceptanceOf=function(t){this._alreadyAccepted.push(t)},t.prototype.setPopstateReturn=function(t){this._popStateReturnUrl=t},Object.defineProperty(t.prototype,"isPopState",{get:function(){return!!this._popStateReturnUrl},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"popStateReturnUrl",{get:function(){return this._popStateReturnUrl},enumerable:!0,configurable:!0}),t.prototype.getVisits=function(){return Array.from(this._visits.values())},t}(),st=t.NavigationSession||(t.NavigationSession={}),ct=function(t){function e(e){var n=t.call(this,e)||this;return n.isExternal=!0,n}return M(e,t),e}(st),ut=function(t){function e(e){var n=t.call(this,!1)||this;return n.isExternal=!1,n.storeVisit(e),n}return M(e,t),e}(st),st.createInternal=function(t){return new ut(t)},st.createExternal=function(t){return new ct(t)};var pt=function(){function t(){this._history=new Map}return t.prototype.add=function(t){var e=this.getHistory(t.placeDefinition),n=C.first(e);n&&!t.hasChangedFrom(n)||(e.unshift(t),this.setHistory(t.placeDefinition,e.slice(0,3)))},t.prototype.getHistory=function(t){var e=this._history.get(t);return e||(e=[],this.setHistory(t,e)),e},t.prototype.setHistory=function(t,e){this._history.set(t,e)},t.decorators=[{type:n.Injectable,args:[{providedIn:"root"}]}],t.ctorParameters=function(){return[]},t.ngInjectableDef=n.ɵɵdefineInjectable({factory:function(){return new t},token:t,providedIn:"root"}),t}();var ft=function(i){function o(t,e,n){var o=i.call(this)||this;o.router=t,o.angularLocation=e,o.placeHistory=n,o.firstRoute=!0,o._navigationSessionModel=new s.MutableValueModel,o._activeVisits=new s.MutableListModel;var r=s.Dsl.disposeWith(o),a=r.chain;r.valueOf,r.before,r.when,r.after,r.observe,r.switchOn;return o.activeVisitIndex=a(o._activeVisits).indexBy("placeDefinition"),e.onUrlChange((function(t){console.log("location.onUrlChange -> "+t)})),o.router.events.subscribe((function(t){t instanceof u.NavigationStart&&o.onAngularRouterStarted(t),(t instanceof u.NavigationEnd||t instanceof u.NavigationError)&&o.onAngularRouterFinished()})),o.navigationSessionActive=a(o.navigationSessionModel).isNotNil(),o.navigationSessionActive.subscribe((function(t){console.log("navigationSessionActive",t)})),o}return M(o,i),Object.defineProperty(o.prototype,"navigationSession",{get:function(){return this._navigationSessionModel.value},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"navigationSessionModel",{get:function(){return this._navigationSessionModel.readonly},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"activeVisits",{get:function(){return this._activeVisits.readonly},enumerable:!0,configurable:!0}),o.prototype.navigate=function(t,e){return A(this,void 0,void 0,(function(){var n=this;return w(this,(function(i){return this.doNavigation(t,(function(i){return A(n,void 0,void 0,(function(){var n;return w(this,(function(i){switch(i.label){case 0:return n=_([t.placeDefinition.path],this.createRouteParameters(t)),[4,this.router.navigate(n,{relativeTo:e?e.relativeTo:null})];case 1:return i.sent(),[2]}}))}))})),[2]}))}))},o.prototype.pushVisitChangesToRoute=function(t,e,n){return A(this,void 0,void 0,(function(){var i=this;return w(this,(function(o){return this.placeHistory.add(n),n.hasRoutingChangedFrom(e)?[2,this.doNavigation(n,(function(o){var r=_([e.placeDefinition.hasRouteId()?"..":"."],i.createRouteParameters(n),i.extractChildPath(t.snapshot));return console.log("### Push Changes to route Redirect",{commands:r,relativeTo:t.snapshot.url}),o.navigate(r,{relativeTo:t})}))]:[2]}))}))},o.prototype.doNavigation=function(e,n){return A(this,void 0,void 0,(function(){return w(this,(function(i){switch(i.label){case 0:this._navigationSessionModel.value=t.NavigationSession.createInternal(e),i.label=1;case 1:return i.trys.push([1,,3,4]),[4,n(this.router)];case 2:return i.sent(),[3,4];case 3:return this.navigationSession&&!this.router.getCurrentNavigation()&&this.onAngularRouterFinished(),[7];case 4:return[2]}}))}))},o.prototype.createRouteParameters=function(t){var e=t.placeDefinition;return t.hasRouteId()?[e.getFormattedRouteId(t),e.getFormattedRouteParameters(t)]:[e.getFormattedRouteParameters(t)]},o.prototype.onAngularRouterStarted=function(e){if(!this.navigationSession){console.log("navigation started",{firstTime:this.firstRoute});var n=t.NavigationSession.createExternal(this.firstRoute);"popstate"===e.navigationTrigger&&n.setPopstateReturn(this.router.routerState.snapshot.url),this._navigationSessionModel.value=n}this.firstRoute=!1},o.prototype.onAngularRouterFinished=function(){var t=this,e=this._navigationSessionModel.value.getVisits();e.forEach((function(e){t.placeHistory.add(e)})),this._activeVisits.value=e,this._navigationSessionModel.value=null},o.prototype.extractChildPath=function(t){return C.flatten(t.children.map((function(t){return t.url})))},o.decorators=[{type:n.Injectable,args:[{providedIn:"root"}]}],o.ctorParameters=function(){return[{type:u.Router},{type:e.Location},{type:pt}]},o.ngInjectableDef=n.ɵɵdefineInjectable({factory:function(){return new o(n.ɵɵinject(u.Router),n.ɵɵinject(e.Location),n.ɵɵinject(pt))},token:o,providedIn:"root"}),O([s.Trace(),R("design:type",Function),R("design:paramtypes",[lt,Object]),R("design:returntype",Promise)],o.prototype,"navigate",null),o}(s.GarbageCollector);var dt=b.style({position:"absolute",top:"0",left:"0",bottom:"0",right:"0"}),mt=[b.query(":enter, :leave",dt,{optional:!0}),b.group([b.query(":enter",[b.style({transform:"translateX(-100%)"}),b.animate("{{duration}} ease-out",b.style({transform:"translateX(0%)"}))],{optional:!0}),b.query(":leave",[b.style({transform:"translateX(0%)"}),b.animate("{{duration}} ease-out",b.style({transform:"translateX(100%)"}))],{optional:!0})])],yt=[b.query(":enter, :leave",dt,{optional:!0}),b.group([b.query(":enter",[b.style({transform:"translateX(100%)"}),b.animate("{{duration}} ease-out",b.style({transform:"translateX(0%)"}))],{optional:!0}),b.query(":leave",[b.style({transform:"translateX(0%)"}),b.animate("{{duration}} ease-out",b.style({transform:"translateX(-100%)"}))],{optional:!0})])];function ht(t){return b.trigger("routeAnimations",[b.transition(":increment",yt,{params:{duration:t}}),b.transition(":decrement",mt,{params:{duration:t}})])}var gt=ht("0.3s");var vt=function(t){function e(e,i,o){var r=t.call(this)||this;r.router=e,r.placeRouter=i,r.animate=!0,r.placeChanged=new n.EventEmitter,r._activePlace=new s.MutableValueModel,r._placeVisit=new s.MutableValueModel,r._inOutletUpdate=new s.Guard,r._activatedRouteModel=new s.MutableValueModel,r._placeDefinition=new s.MutableValueModel,r.isOnInitialPlace=!0;var a=s.Dsl.disposeWith(r),c=a.chain,u=(a.valueOf,a.before,a.when);a.after,a.observe,a.switchOn;r.parentOutletModel=new s.MutableValueModel(o);var l=c(r.parentOutletModel).pullValueModel((function(t){return t.activePlaceModel})).pluck("placeDefinition").pluckList("children").pluck("component"),p=c(r.activePlaceModel).map((function(t){return t.constructor}));r.placeAnimationOrder=c(r.customPlaceAnimationOrderModel).otherwise(l).indexOf(p).map((function(t){return r.isOnInitialPlace?0:r.animate?Math.max(t,0):0}));var f=c(r._activePlace).pluck("placeDefinition").findIn(i.activeVisitIndex),d=new s.Guard;return u.valueOf(f).changes((function(t){t&&d.whileTrue((function(){r._placeVisit.value=t}))})),u.valueOf(r._placeVisit).changes((function(t,e){r.pushVisitChangesToRoute(t,e)}),{unless:d}),c(r._activePlace).postponeWhile(i.navigationSessionActive).subscribe((function(t){return r.placeChanged.emit(t)})),r}return M(e,t),e.prototype.ngOnInit=function(){},e.prototype.navigate=function(t){console.log({activatedRoute:this._activatedRouteModel.value}),this.placeRouter.navigate(t,{relativeTo:this.parentOutlet?this.parentOutlet.activatedRouteModel.value:null})},Object.defineProperty(e.prototype,"parentOutlet",{get:function(){return this.parentOutletModel.value},enumerable:!0,configurable:!0}),e.prototype.pushVisitChangesToRoute=function(t,e){var n=this._activatedRouteModel.value;this.placeRouter.pushVisitChangesToRoute(n,e,t)},Object.defineProperty(e.prototype,"activePlaceModel",{get:function(){return this._activePlace.readonly},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"activatedRouteModel",{get:function(){return this._activatedRouteModel.readonly},enumerable:!0,configurable:!0}),e.prototype.onOutletActivated=function(t,e){var n=this;this._inOutletUpdate.whileTrue((function(){try{n._activePlace.value=e,n._activatedRouteModel.value=t.activatedRoute,n._placeDefinition.value=e.placeDefinition,e.initialiseBindings(n._placeVisit)}catch(t){console.error(t)}})),this.animate||this.animationDone()},e.prototype.onOutletDeactivated=function(t,e){var n=this;this._inOutletUpdate.whileTrue((function(){n.isOnInitialPlace=!1,n._activePlace.value=null,n._activatedRouteModel.value=null,n._placeDefinition.value=null}))},e.prototype.animationDone=function(){this._activePlace.value&&this._activePlace.value.onPlaceReady()},e.decorators=[{type:n.Component,args:[{selector:"aup-place-outlet",template:'<div class="router-outlet-container"\n [@routeAnimations]="placeAnimationOrder.value"\n (@routeAnimations.done)="animationDone()"\n>\n <router-outlet #routerOutlet="outlet"\n (activate)="onOutletActivated(routerOutlet, $event)"\n (deactivate)="onOutletDeactivated(routerOutlet, $event)">\n </router-outlet>\n</div>\n\n',animations:[gt],styles:[":host{display:flex;flex-direction:column;min-height:0;overflow-x:hidden}.router-outlet-container{flex:1;display:block;position:relative;min-height:0}router-outlet{display:none}"]}]}],e.ctorParameters=function(){return[{type:u.Router},{type:ft},{type:e,decorators:[{type:n.SkipSelf},{type:n.Optional}]}]},e.propDecorators={animate:[{type:n.Input}],customPlaceAnimationOrderModel:[{type:n.Input,args:["placeAnimationOrderModel"]}],customPlaceAnimationOrder:[{type:n.Input,args:["placeAnimationOrder"]}],placeChanged:[{type:n.Output}],routerOut:[{type:n.ViewChild,args:["routeOutlet",{static:!0}]}]},O([s.UseDelegate(),R("design:type",s.ListModel)],e.prototype,"customPlaceAnimationOrderModel",void 0),O([s.StoreInListModel("customPlaceAnimationOrderModel"),R("design:type",Array)],e.prototype,"customPlaceAnimationOrder",void 0),O([s.Trace(),R("design:type",Function),R("design:paramtypes",[lt]),R("design:returntype",void 0)],e.prototype,"navigate",null),e}(j);var bt=function(e){function i(){var n=e.call(this)||this,i=s.Dsl.disposeWith(n),o=i.chain;i.valueOf,i.before,i.when,i.after,i.observe,i.switchOn;return n.placeDefinitions=o(n.placesModel).map((function(e){return t.PlaceComponent.getDefinition(e)})),n.commandFactory=s.Command.createFactory((function(t){n.placeOutlet.navigate(new lt(t))})),n.activePlaceDefinition=o(n.placeOutletModel).pullValueModel((function(t){return t.activePlaceModel})).pluck("placeDefinition"),n}return M(i,e),i.prototype.getNav=function(t){var e=t.getPlaceData("nav");return{title:function(){return e?e.title():t.searchPlaceData(["navTitle","title"])},tooltip:function(){return e&&e.tooltip?e.tooltip():t.getPlaceData("navTooltip",null)},icon:function(){return e&&e.icon?e.icon():t.getPlaceData("navIcon",null)}}},i.prototype.isActive=function(t){return this.activePlaceDefinition.query().equals(t)},i.prototype.ngOnInit=function(){},i.propDecorators={places:[{type:n.Input}],placesModel:[{type:n.Input}],placeOutlet:[{type:n.Input}],placeOutletModel:[{type:n.Input}]},O([s.StoreInListModel("placesModel"),R("design:type",Array)],i.prototype,"places",void 0),O([s.UseDelegate(),R("design:type",s.ListModel)],i.prototype,"placesModel",void 0),O([s.StoreInValueModel("placeOutletModel"),R("design:type",vt)],i.prototype,"placeOutlet",void 0),O([s.UseDelegate(),R("design:type",s.ValueModel)],i.prototype,"placeOutletModel",void 0),O([h.Memoize(),R("design:type",Function),R("design:paramtypes",[t.PlaceDefinition]),R("design:returntype",Object)],i.prototype,"getNav",null),i}(j);var Pt=function(t){function e(){var e=t.call(this)||this;return e.expanded=!0,e}return M(e,t),e.prototype.expandMenu=function(){this.expanded=!0},e.prototype.collapseMenu=function(){this.expanded=!1},e.prototype.toggleMenu=function(){this.expanded=!this.expanded},e.decorators=[{type:n.Component,args:[{selector:"aup-list-place-nav",template:'<mat-nav-list class="app-menu">\n <a mat-list-item *ngFor="let placeDefinition of placeDefinitions.value"\n [pectinCommand]="commandFactory.create(placeDefinition)"\n [class.active]="isActive(placeDefinition)"\n [matTooltip]="getNav(placeDefinition).tooltip()">\n <mat-icon *ngIf="getNav(placeDefinition).icon()">{{getNav(placeDefinition).icon()}}</mat-icon>\n <span class="expanded-only">{{getNav(placeDefinition).title()}}</span>\n </a>\n</mat-nav-list>\n',styles:[":host{display:flex;flex-direction:column;--expanded-width:235px;--nav-item-width:var(--nav-bar-height);width:var(--nav-item-width);transition:width 125ms linear}:host.expanded{width:var(--expanded-width);max-width:var(--expanded-width)}.expanded-only{max-width:0;overflow:hidden}.collapsed-only{max-width:100%;overflow:hidden}.header{display:flex;flex-direction:row;justify-content:flex-end;align-items:center;height:var(--nav-bar-height);border-bottom:var(--pinstripe-border);cursor:pointer}.header .menu{flex:1}.header button{color:inherit;width:var(--nav-item-width);height:var(--nav-bar-height)}mat-nav-list{flex:1;display:flex;flex-direction:column}.mat-list-item{width:var(--nav-item-width);height:var(--nav-bar-height);color:rgba(0,0,0,.6)}.mat-list-item.active{background-color:rgba(0,0,0,.1);color:rgba(0,0,0,.9)}mat-icon{color:inherit}mat-icon.flip-horizontal{transform:scaleX(-1)}:host-context(.expanded) .expanded-only{max-width:100%}:host-context(.expanded) .collapsed-only{max-width:0}:host-context(.expanded) .mat-list-item mat-icon{margin-right:12px}:host-context(.expanded) .mat-list-item span{text-wrap:none;white-space:nowrap}a[ng-reflect-router-link=manage-instruments] mat-icon{transform:rotate(90deg)}.app-menu{padding-top:0}"]}]}],e.ctorParameters=function(){return[]},e.propDecorators={expanded:[{type:n.HostBinding,args:["class.expanded"]}]},e}(bt);var Ct=function(t){function e(){return t.call(this)||this}return M(e,t),e.decorators=[{type:n.Component,args:[{selector:"aup-tabbed-place-navigation",template:'<nav mat-tab-nav-bar>\n <a mat-tab-link *ngFor="let placeDefinition of placeDefinitions.value"\n [pectinCommand]="commandFactory.create(placeDefinition)"\n [active]="isActive(placeDefinition)"\n [matTooltip]="getNav(placeDefinition).tooltip()">\n <mat-icon *ngIf="getNav(placeDefinition).icon()">{{getNav(placeDefinition).icon()}}</mat-icon>\n <span>{{getNav(placeDefinition).title()}}</span>\n </a>\n</nav>\n',styles:[""]}]}],e.ctorParameters=function(){return[]},e}(bt),It=function(){function t(){}return t.decorators=[{type:n.NgModule,args:[{imports:[e.CommonModule,a.BrowserAnimationsModule,o.MatProgressSpinnerModule,u.RouterModule,r.MatTabsModule,m.MatListModule,y.MatTooltipModule,d.MatIconModule,E],declarations:[it,nt,vt,Ct,Pt],entryComponents:[nt],exports:[nt,vt,it,Ct,Pt],providers:[]}]}],t}(),Mt=function(){function t(){}return t.decorators=[{type:n.NgModule,args:[{declarations:[],imports:[e.CommonModule,a.BrowserAnimationsModule,i.FormsModule,o.MatInputModule,o.MatFormFieldModule,o.MatSelectModule,r.MatTabsModule,E,U,It,et],exports:[et,It,E,U,B]}]}],t}(),Dt=b.style({opacity:0,height:"0",paddingTop:"0",paddingBottom:"0"});var Ot=function(t,e){this.width=t,this.height=e};var Rt,At=function(){function t(t,e){this.x=t,this.y=e}return t.from=function(e){return new t(e.x,e.y)},t.prototype.translate=function(e,n){return new t(this.x+e,this.y+n)},t}();t.Bounds=function(t){function e(e,n,i,o){var r=t.call(this,i,o)||this;return r.top=e,r.left=n,r.width=i,r.height=o,r}return M(e,t),e.prototype.relativePositionOf=function(t){return t instanceof MouseEvent?new At(t.clientX-this.left,t.clientY-this.top):new At(t.x-this.left,t.y-this.top)},e}(Ot),(Rt=t.Bounds||(t.Bounds={})).ofElement=function(t){var e=t.getBoundingClientRect();return new Rt(e.top,e.left,e.width,e.height)};var wt=function(e){function n(n,i){var o=e.call(this)||this;return o.elementRef=n,o.ngZone=i,o._boundsModel=new s.ValueHolder(new t.Bounds(0,0,0,0)),o}return M(n,e),n.prototype.ngAfterViewInit=function(){var t=this;this.updateBounds();var e=this.elementRef.nativeElement,n=new P((function(e,n){t.ngZone.run((function(){return t.updateBounds()}))}));n.observe(e),this.onDispose((function(){return n.disconnect()}))},Object.defineProperty(n.prototype,"boundsModel",{get:function(){return this._boundsModel.readonly},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"nativeElement",{get:function(){return this.elementRef.nativeElement},enumerable:!0,configurable:!0}),n.prototype.relativePositionOf=function(t){return this.bounds.relativePositionOf(t)},Object.defineProperty(n.prototype,"bounds",{get:function(){return this._boundsModel.value},enumerable:!0,configurable:!0}),n.prototype.updateBounds=function(){this._boundsModel.value=t.Bounds.ofElement(this.nativeElement)},n}(j);function xt(){}(function(t){function e(){}t.Callback=e})(xt||(xt={}));var _t,Ft,jt,St,Et=function(){function t(t,e,n){this.router=t,this.injector=e,this.interactionContext=n}return t.prototype.canActivate=function(t,e){return!0},t.prototype.canDeactivate=function(t,e,n,i){return!this.interactionContext.isActive()},t.decorators=[{type:n.Injectable,args:[{providedIn:"root"}]}],t.ctorParameters=function(){return[{type:u.Router},{type:n.Injector},{type:H}]},t.ngInjectableDef=n.ɵɵdefineInjectable({factory:function(){return new t(n.ɵɵinject(u.Router),n.ɵɵinject(n.INJECTOR),n.ɵɵinject(H))},token:t,providedIn:"root"}),O([s.Trace(),R("design:type",Function),R("design:paramtypes",[u.ActivatedRouteSnapshot,u.RouterStateSnapshot]),R("design:returntype",Object)],t.prototype,"canActivate",null),O([s.Trace(),R("design:type",Function),R("design:paramtypes",[B,u.ActivatedRouteSnapshot,u.RouterStateSnapshot,u.RouterStateSnapshot]),R("design:returntype",Object)],t.prototype,"canDeactivate",null),t}();function Tt(e){return function(n){t.PlaceComponent.isPlaceComponentConstructor(n)?t.PlaceComponent.injectDefinition(n,new t.PlaceDefinition(n,e.path,!l.isNil(e.authenticate)&&e.authenticate,e.data,t.PlaceComponent.getRouteParameters(n),(e.children||[]).map((function(e){return t.PlaceComponent.getDefinition(e)})))):s.lang.illegalState(n+" must extend PlaceComponent to use the @Place decorator")}}(function(t){function e(){}t.Options=e})(Tt||(Tt={})),_t=t.Formatter||(t.Formatter={}),Ft=function(){function t(){}return t.prototype.format=function(t){return t},t.prototype.parse=function(t){return t},t}(),jt=function(){function t(){}return t.prototype.format=function(t){return C.isNumber(t)&&!C.isNaN(t)?""+t:null},t.prototype.parse=function(t){var e=Number.parseFloat(t);return C.isNaN(e)?null:e},t}(),St=function(){function t(){}return t.prototype.format=function(t){return t?"true":"false"},t.prototype.parse=function(t){return"true"===t},t}(),_t.STRING=new Ft,_t.NUMBER=new jt,_t.BOOLEAN=new St;var Nt=function(){function t(t,e,n,i){this.activatedRoute=t,this.router=e,this.placeHistory=n,this.injector=i}return t.prototype.sanitise=function(t){return A(this,void 0,void 0,(function(){var e,n,i,o,r,a,s,c,u;return w(this,(function(l){switch(l.label){case 0:return(e=t.placeDefinition).hasRouteId()?(n=e.getRouteIdParameterDef(),i=t.getRouteId(),[4,n.sanitise(i,t,this.placeHistory,this.injector)]):[3,2];case 1:if(u=l.sent(),console.log({routeId:i,sanitisedValue:u}),n.hasChanged(i,u))return[2,t.replace(n,u)];l.label=2;case 2:o=e.getVisitParameterDefs({includeRouteParameters:!0,includeNonRouteParameters:!0}),r=t,a=0,l.label=3;case 3:return a<o.length?(s=o[a],c=t.getParameter(s.name),[4,s.sanitise(c,r,this.placeHistory,this.injector)]):[3,6];case 4:u=l.sent(),s.hasChanged(c,u)&&(r=r.replace(s,u)),l.label=5;case 5:return a++,[3,3];case 6:return[2,r.hasChangedFrom(t)?r:t]}}))}))},t}();t.EnterPlaceGuard=function(){function e(t,e,n,i,o){this.router=t,this.urlSerializer=e,this.placeRouter=n,this.placeHistory=i,this.injector=o}return e.prototype.canActivate=function(n,i){return A(this,void 0,void 0,(function(){var o,r,a,c,u,l,p;return w(this,(function(f){switch(f.label){case 0:return t.PlaceComponent.isPlaceComponentConstructor(n.component)?(o=t.PlaceComponent.getDefinition(n.component),r=new e.ConsolidatedParameterMap(n.paramMap,n.url),a=o.parseRouteParams(r),c=this.placeRouter.navigationSession.getVisitFor(o)||new lt(o,a),[4,new Nt(n,this.router,this.placeHistory,this.injector).sanitise(c.mergeRouteParameters(a))]):[3,2];case 1:return u=f.sent(),this.placeRouter.navigationSession.storeVisit(u),c.hasRoutingChangedFrom(u)?(l=this.urlSerializer.parse(i.url),p=this.createRedirectCommands(u,_(l.root.children.primary.segments)).commands,console.log("##### Place Guard Redirect",p),[2,this.router.createUrlTree(p,{replaceUrl:!0,skipLocationChange:!1})]):[2,!0];case 2:return[2,s.lang.illegalState("expected component to be an instance of PlaceComponent, got "+n.component)];case 3:return[2]}}))}))},e.prototype.createRedirectCommands=function(t,e){var n=t.getUrlSegments(),i=e.findIndex((function(t){return t.path===n[0].path})),o=_(e);o.splice.apply(o,_([i,n.length],n));var r=[];return o.forEach((function(t){r.push(t.path),t.parameterMap.keys.length>0&&r.push(t.parameters)})),{newPath:o,commands:r}},e.decorators=[{type:n.Injectable,args:[{providedIn:"root"}]}],e.ctorParameters=function(){return[{type:u.Router},{type:u.UrlSerializer},{type:ft},{type:pt},{type:n.Injector}]},e.ngInjectableDef=n.ɵɵdefineInjectable({factory:function(){return new e(n.ɵɵinject(u.Router),n.ɵɵinject(u.UrlSerializer),n.ɵɵinject(ft),n.ɵɵinject(pt),n.ɵɵinject(n.INJECTOR))},token:e,providedIn:"root"}),e}(),function(t){var e=function(){function t(t,e){this.paramMaps=[t].concat((e||[]).map((function(t){return new n(t.parameters)}))).filter((function(t){return!!t}))}return t.prototype.get=function(t){return this.paramMaps.find((function(e){return e.has(t)})).get(t)},t.prototype.getAll=function(t){return this.paramMaps.find((function(e){return e.has(t)})).getAll(t)},t.prototype.has=function(t){return!!this.paramMaps.find((function(e){return e.has(t)}))},Object.defineProperty(t.prototype,"keys",{get:function(){return this.paramMaps.reduce((function(t,e){return t.concat(e.keys)}),[])},enumerable:!0,configurable:!0}),O([h.Memoize(),R("design:type",Array),R("design:paramtypes",[])],t.prototype,"keys",null),t}();t.ConsolidatedParameterMap=e;var n=function(){function t(t){this.params=t}return t.prototype.get=function(t){return this.params[t]},t.prototype.getAll=function(t){var e=this.get(t);return Array.isArray(e)?e:[e]},t.prototype.has=function(t){return this.keys.includes(t)},Object.defineProperty(t.prototype,"keys",{get:function(){return Object.keys(this.params)},enumerable:!0,configurable:!0}),t}()}(t.EnterPlaceGuard||(t.EnterPlaceGuard={}));var Lt=function(){function t(t,e,n,i,o){this.router=t,this.injector=e,this.placeRouter=n,this.interactionContext=i,this.angularLocation=o}return t.prototype.isLeavingTheCurrentPlace=function(t,e){var n="/"+e.path;return!t.url.startsWith(n)},t.prototype.canDeactivate=function(t,e,n,i){return A(this,void 0,void 0,(function(){var e,n;return w(this,(function(o){switch(o.label){case 0:return this.placeRouter.navigationSession.alreadyAccepted(t)?[2,!0]:[3,1];case 1:return e=this,n=!0,this.isLeavingTheCurrentPlace(i,t.placeDefinition)?(t.interactionContext&&t.interactionContext.isActive()&&(n=!1,console.log("cancelling",{activity:t.interactionContext.currentActivity}),t.interactionContext.currentActivity.cancel(null)),n?[4,t.canDeactivate()]:[3,3]):[3,4];case 2:n=o.sent(),o.label=3;case 3:return[3,5];case 4:this.interactionContext.isActive()?(console.log("cancelling",{activity:this.interactionContext.currentActivity}),this.interactionContext.currentActivity.cancel(null),n=!1):n=!0,o.label=5;case 5:return n?e.placeRouter.navigationSession.rememberAcceptanceOf(t):this.placeRouter.navigationSession.isPopState&&(console.log("cancelled during popstate"),this.angularLocation.go(this.placeRouter.navigationSession.popStateReturnUrl)),[2,n]}}))}))},t.decorators=[{type:n.Injectable,args:[{providedIn:"root"}]}],t.ctorParameters=function(){return[{type:u.Router},{type:n.Injector},{type:ft},{type:H},{type:e.Location}]},t.ngInjectableDef=n.ɵɵdefineInjectable({factory:function(){return new t(n.ɵɵinject(u.Router),n.ɵɵinject(n.INJECTOR),n.ɵɵinject(ft),n.ɵɵinject(H),n.ɵɵinject(e.Location))},token:t,providedIn:"root"}),t}();t.ACTIVITY_DATA=q,t.AbstractActivity=G,t.AbstractInputComponent=T,t.AbstractPlaceNavigationComponent=bt,t.Activity=t.ɵbd,t.ActivityContainerComponent=Z,t.ActivityOutletComponent=z,t.AlertDialogComponent=K,t.AngularUiPowerupsModule=Mt,t.BusyOverlayComponent=nt,t.CommandDirective=F,t.ComponentsModule=U,t.ConfirmThenDialogComponent=t.ɵbf,t.ConfirmationDialogComponent=W,t.DEFINITION_META_DATA_KEY=rt,t.DIALOG_INTERACTION_SERVICE_DEFAULTS=$,t.DialogInteractionService=tt,t.Dimension=Ot,t.DirectivesModule=E,t.DisposableComponent=j,t.EmptyStateComponent=it,t.FocusBindingDirective=S,t.InplaceInteractionContextComponent=Y,t.InteractionContext=H,t.InteractionGuard=Et,t.InteractionModule=et,t.InteractionOutletComponent=J,t.LEFT_RIGHT_PLACE_ANIMATION=gt,t.LeavePlaceGuard=Lt,t.ListPlaceNavComponent=Pt,t.NoopComponent=B,t.NumberInputComponent=N,t.PasswordInputComponent=L,t.Place=Tt,t.PlaceHistory=pt,t.PlaceModule=It,t.PlaceOutletComponent=vt,t.PlaceRouter=ft,t.Point=At,t.ROUTE_PARAMETER_LIST_KEY=at,t.ResizeAwareComponent=wt,t.RouteId=function(e,n){return function(i,o){var r=new t.ParameterDefinition.RouteId(o.toString(),n,e);p.Klass.get(i).addToOwnMetadataList(at,r),s.UseDelegate()(i,o)}},t.SelectInputComponent=k,t.StringInputComponent=V,t.TabbedPlaceNavigationComponent=Ct,t.Visit=lt,t.VisitParameter=function(e){var n=p.Opts.get(e);return function(i,o){var r=new t.ParameterDefinition.ValueParameter(o.toString(),e,n.getOptional("storeInUrl",null));p.Klass.get(i).addToOwnMetadataList(at,r),s.UseDelegate()(i,o)}},t.VisitParameterList=function(e){var n=p.Opts.get(e);return function(i,o){var r=new t.ParameterDefinition.ArrayParameter(o.toString(),e,n.getOptional("storeInUrl",null));p.Klass.get(i).addToOwnMetadataList(at,r),s.UseDelegate()(i,o)}},t.VisitSanitiser=Nt,t.leftRightPlaceAnimation=ht,t.slideDownAndUpAnimation=function(t,e){s.OptionsHelper.get(e).getOptional("duration","100ms");var n=s.OptionsHelper.get(e).getOptional("hiddenStyleDef",Dt);return b.trigger(t,[b.transition(":enter",[n,b.animate("100ms")]),b.transition(":leave",[b.animate("100ms",n)])])},t.ɵa=E,t.ɵb=F,t.ɵba=W,t.ɵbb=G,t.ɵbc=q,t.ɵbg=K,t.ɵbi=J,t.ɵbj=Y,t.ɵbk=$,t.ɵbl=tt,t.ɵc=S,t.ɵd=j,t.ɵe=U,t.ɵf=N,t.ɵg=T,t.ɵh=V,t.ɵi=L,t.ɵj=k,t.ɵk=B,t.ɵl=It,t.ɵm=it,t.ɵn=nt,t.ɵo=vt,t.ɵp=ht,t.ɵq=gt,t.ɵr=ft,t.ɵs=pt,t.ɵt=Ct,t.ɵu=bt,t.ɵv=Pt,t.ɵw=et,t.ɵx=Z,t.ɵy=H,t.ɵz=z,Object.defineProperty(t,"__esModule",{value:!0})}));
|
|
2
2
|
//# sourceMappingURL=coolon-angular-ui-powerups.umd.min.js.map
|