@coolon/angular-ui-powerups 3.11.2 → 3.12.0
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/CHANGELOG.md +7 -0
- package/bundles/coolon-angular-ui-powerups.umd.js +132 -116
- 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/components/table/table.component.js +22 -7
- package/esm2015/lib/components/table/table.component.js.map +1 -1
- package/esm2015/lib/components/table/table.component.metadata.json +1 -1
- package/fesm2015/coolon-angular-ui-powerups.js +106 -91
- package/fesm2015/coolon-angular-ui-powerups.js.map +1 -1
- package/lib/components/table/table.component.d.ts +8 -5
- package/package.json +2 -2
|
@@ -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/form-field"),require("@angular/material/input"),require("@angular/material/select"),require("@angular/material/tabs"),require("@angular/platform-browser/animations"),require("@angular/cdk/portal"),require("@angular/cdk/scrolling"),require("@angular/material/autocomplete"),require("@angular/material/button"),require("@angular/material/checkbox"),require("@angular/material/divider"),require("@angular/material/icon"),require("@angular/material/menu"),require("@angular/material/progress-spinner"),require("@angular/material/table"),require("@angular/material/tooltip"),require("@fortawesome/angular-fontawesome"),require("@fortawesome/free-solid-svg-icons"),require("@coolon/pectin"),require("@typescript-plus/fast-memoize-decorator/dist/src"),require("lodash"),require("typescript-string-enums"),require("@coolon/typescript-utilities"),require("immer"),require("@angular/flex-layout"),require("@angular/material/dialog"),require("@angular/router"),require("@angular/cdk/overlay"),require("resize-observer-polyfill"),require("@angular/material/list"),require("@typescript-plus/fast-memoize-decorator"),require("reflect-metadata"),require("@angular/animations")):"function"==typeof define&&define.amd?define("@coolon/angular-ui-powerups",["exports","@angular/common","@angular/core","@angular/forms","@angular/material/form-field","@angular/material/input","@angular/material/select","@angular/material/tabs","@angular/platform-browser/animations","@angular/cdk/portal","@angular/cdk/scrolling","@angular/material/autocomplete","@angular/material/button","@angular/material/checkbox","@angular/material/divider","@angular/material/icon","@angular/material/menu","@angular/material/progress-spinner","@angular/material/table","@angular/material/tooltip","@fortawesome/angular-fontawesome","@fortawesome/free-solid-svg-icons","@coolon/pectin","@typescript-plus/fast-memoize-decorator/dist/src","lodash","typescript-string-enums","@coolon/typescript-utilities","immer","@angular/flex-layout","@angular/material/dialog","@angular/router","@angular/cdk/overlay","resize-observer-polyfill","@angular/material/list","@typescript-plus/fast-memoize-decorator","reflect-metadata","@angular/animations"],e):e(((t="undefined"!=typeof globalThis?globalThis:t||self).coolon=t.coolon||{},t.coolon["angular-ui-powerups"]={}),t.ng.common,t.ng.core,t.ng.forms,t.ng.material.formField,t.ng.material.input,t.ng.material.select,t.ng.material.tabs,t.ng.platformBrowser.animations,t.ng.cdk.portal,t.ng.cdk.scrolling,t.ng.material.autocomplete,t.ng.material.button,t.ng.material.checkbox,t.ng.material.divider,t.ng.material.icon,t.ng.material.menu,t.ng.material.progressSpinner,t.ng.material.table,t.ng.material.tooltip,t.angularFontawesome,t.freeSolidSvgIcons,t.pectin,t.src,t._,t.typescriptStringEnums,t.typescriptUtilities,t.produce,t.ng.flexLayout,t.ng.material.dialog,t.ng.router,t.ng.cdk.overlay,t.ResizeObserver,t.ng.material.list,t.fastMemoizeDecorator,null,t.ng.animations)}(this,(function(t,e,n,o,i,r,a,s,c,l,u,p,d,f,h,m,g,y,v,b,C,I,w,x,M,P,R,S,A,O,T,D,E,F,k,_,L){"use strict";function N(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var V=N(M),H=N(S),j=N(E),U=function(t,e){return(U=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)};function B(t,e){function n(){this.constructor=t}U(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}function q(t,e,n,o){var i,r=arguments.length,a=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,o);else for(var s=t.length-1;s>=0;s--)(i=t[s])&&(a=(r<3?i(a):r>3?i(e,n,a):i(e,n))||a);return r>3&&a&&Object.defineProperty(e,n,a),a}function z(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)}function G(t,e,n,o){return new(n||(n=Promise))((function(i,r){function a(t){try{c(o.next(t))}catch(t){r(t)}}function s(t){try{c(o.throw(t))}catch(t){r(t)}}function c(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}c((o=o.apply(t,e||[])).next())}))}function W(t,e){var n,o,i,r,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[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,o&&(i=2&r[0]?o.return:r[0]?o.throw||((i=o.return)&&i.call(o),0):o.next)&&!(i=i.call(o,r[1])).done)return i;switch(o=0,i&&(r=[2&r[0],i.value]),r[0]){case 0:case 1:i=r;break;case 4:return a.label++,{value:r[1],done:!1};case 5:a.label++,o=r[1],r=[0];continue;case 7:r=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==r[0]&&2!==r[0])){a=0;continue}if(3===r[0]&&(!i||r[1]>i[0]&&r[1]<i[3])){a.label=r[1];break}if(6===r[0]&&a.label<i[1]){a.label=i[1],i=r;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(r);break}i[2]&&a.ops.pop(),a.trys.pop();continue}r=e.call(t,a)}catch(t){r=[6,t],o=0}finally{n=i=0}if(5&r[0])throw r[1];return{value:r[0]?r[1]:void 0,done:!0}}([r,s])}}}Object.create;function K(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var o,i,r=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(o=r.next()).done;)a.push(o.value)}catch(t){i={error:t}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(i)throw i.error}}return a}function X(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(K(arguments[e]));return t}Object.create;var $=function(t){function e(e,n,o){var i=t.call(this)||this;return i.elementRef=e,i._commandEnabled=(new w.DelegatingValueModel).withDefault(!1),i._commandParameterProvided=!1,i.matControl=n||o,i}return B(e,t),Object.defineProperty(e.prototype,"pectinCommand",{get:function(){return this._command},set:function(t){this._command=t,this._commandEnabled.setDelegate(t?t.enabled:null)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"commandParameter",{get:function(){return this._commandParameter},set:function(t){this._commandParameterProvided=!0,this._commandParameter=t},enumerable:!1,configurable:!0}),e.prototype.ngOnInit=function(){w.assert.notNil(this.pectinCommand),this.pectinCommand instanceof w.UnaryCommand?this._commandParameterProvided||w.lang.illegalState("UnaryCommands require the command parameter to be specified."):this._commandParameterProvided&&w.lang.illegalState("command parameters are only supported by UnaryCommands")},e.prototype.ngAfterViewInit=function(){var t=this;(0,w.Dsl.disposeWith(this).when)(this._commandEnabled).changes((function(e){return t.updateEnabledState(e)}),{initialValue:"triggerChange"})},e.prototype.updateEnabledState=function(t){var e=this;this.matControl&&setTimeout((function(){e.matControl.disabled=!t}),0),t?(this.elementRef.nativeElement.removeAttribute("disabled"),"A"===this.elementRef.nativeElement.tagName&&this.elementRef.nativeElement.setAttribute("href","javascript:void")):(this.elementRef.nativeElement.setAttribute("disabled","disabled"),"A"===this.elementRef.nativeElement.tagName&&this.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 w.UnaryCommand?this.pectinCommand.withContext({event:t}).execute(this.commandParameter):this.pectinCommand.withContext({event:t}).execute():console.warn("disabled command clicked, ignoring.")},e}(w.GarbageCollector);$.decorators=[{type:n.Directive,args:[{selector:"[pectinCommand]"}]}],$.ctorParameters=function(){return[{type:n.ElementRef,decorators:[{type:n.Inject,args:[n.ElementRef]}]},{type:d.MatButton,decorators:[{type:n.Host},{type:n.Optional}]},{type:g.MatMenuItem,decorators:[{type:n.Host},{type:n.Optional}]}]},$.propDecorators={pectinCommand:[{type:n.Input}],commandParameter:[{type:n.Input}],notifyClick:[{type:n.HostListener,args:["click",["$event"]]}]};var Y=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return B(e,t),e.prototype.ngOnDestroy=function(){this.dispose()},e}(w.GarbageCollector);Y.decorators=[{type:n.Directive}];var J=function(t){function e(e,n,o,i){var r=t.call(this)||this;return r.focusTargetElement=e,r.ngZone=n,r.focusContext=i,r.document=o,(0,w.Dsl.disposeWith(r).when)(r.focusContext.focused).changes((function(t){t&&!r.alreadyHasFocus()&&r.tryAndFocus()}),{initialValue:"triggerChangeUnlessNil"}),r}return B(e,t),e.prototype.onFocusIn=function(){this.focusContext.notifyFocusIn()},e.prototype.onFocusOut=function(){this.focusContext.notifyFocusOut()},e.prototype.alreadyHasFocus=function(){return this.isElementFocused(this.focusTarget)},e.prototype.isElementFocused=function(t){return this.document.activeElement===t},e.prototype.tryAndFocus=function(t){var e=this;void 0===t&&(t=5),this.modelShouldStillHaveFocus()&&this.canFocus()&&(this.alreadyHasFocus()||this.focusTarget.focus(),this.alreadyHasFocus()||(w.Logger.get(this).log("focus failed, trying "+t+" more times"),t>0?requestAnimationFrame((function(){e.tryAndFocus(t-1)})):w.Logger.get(this).warn("Tried to focus but gave up as the component wasn't enabled or visible.")))},Object.defineProperty(e.prototype,"focusTarget",{get:function(){return this.focusTargetElement},enumerable:!1,configurable:!0}),e.prototype.modelShouldStillHaveFocus=function(){return this.focusContext.focused.value},e.prototype.canFocus=function(){var t=this.focusTarget.getBoundingClientRect();return t.height>=0&&t.height>=0&&!this.focusTarget.disabled},e}(w.GarbageCollector);J.ctorParameters=function(){return[{type:HTMLElement},{type:n.NgZone,decorators:[{type:n.Inject,args:[n.NgZone]}]},{type:void 0,decorators:[{type:n.Inject,args:[e.DOCUMENT]}]},{type:void 0}]};var Z=function(){function t(t,e){this.ngZone=t,this.document=e}return t.prototype.createBinding=function(t,e){return new J(t,this.ngZone,this.document,e)},t}();Z.ɵprov=n.ɵɵdefineInjectable({factory:function(){return new Z(n.ɵɵinject(n.NgZone),n.ɵɵinject(e.DOCUMENT))},token:Z,providedIn:"root"}),Z.decorators=[{type:n.Injectable,args:[{providedIn:"root"}]}],Z.ctorParameters=function(){return[{type:n.NgZone,decorators:[{type:n.Inject,args:[n.NgZone]}]},{type:void 0,decorators:[{type:n.Inject,args:[e.DOCUMENT]}]}]};var Q=function(t){function e(e,n){var o=t.call(this)||this;return o.el=e,o.focusBindingFactory=n,o}return B(e,t),e.prototype.onFocusIn=function(){this.hasBinding()&&this.pectinFocusBinding.notifyFocusIn()},e.prototype.onFocusOut=function(){this.hasBinding()&&this.pectinFocusBinding.notifyFocusOut()},e.prototype.ngOnInit=function(){},e.prototype.ngAfterViewInit=function(){this.hasBinding()?this.registerDisposable(this.focusBindingFactory.createBinding(this.focusTarget,this.pectinFocusBinding)):w.Logger.get(this).warn("pectinFocusBinding was nil")},e.prototype.hasBinding=function(){return!!this.pectinFocusBinding&&!!this.pectinFocusBinding},Object.defineProperty(e.prototype,"focusTarget",{get:function(){return this.focusBindingTarget||this.el.nativeElement},enumerable:!1,configurable:!0}),e}(Y);Q.decorators=[{type:n.Directive,args:[{selector:"[pectinFocusBinding]"}]}],Q.ctorParameters=function(){return[{type:n.ElementRef,decorators:[{type:n.Inject,args:[n.ElementRef]}]},{type:Z}]},Q.propDecorators={pectinFocusBinding:[{type:n.Input}],focusBindingTarget:[{type:n.Input}],onFocusIn:[{type:n.HostListener,args:["focusin"]}],onFocusOut:[{type:n.HostListener,args:["focusout"]}]};var tt=function(){};tt.decorators=[{type:n.NgModule,args:[{declarations:[$,Q],imports:[e.CommonModule,c.BrowserAnimationsModule,o.FormsModule,r.MatInputModule,i.MatFormFieldModule,a.MatSelectModule,s.MatTabsModule],exports:[$,Q]}]}];var et=function(t){function e(){return t.call(this)||this}return B(e,t),e.prototype.ngOnInit=function(){},e}(w.GarbageCollector);et.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{-ms-grid-columns:auto;-ms-grid-rows:auto;background-color:rgba(0,0,0,.2);bottom:0;display:-ms-grid;display:grid;grid-template-columns:auto;grid-template-rows:auto;left:0;place-content:center;position:absolute;right:0;top:0}"]}]}],et.ctorParameters=function(){return[]},et.propDecorators={busyModel:[{type:n.Input}],busy:[{type:n.Input}]},q([w.TrackExternal(),z("design:type",w.ValueModel)],et.prototype,"busyModel",void 0),q([w.StoreInValueModel("busyModel"),z("design:type",Boolean)],et.prototype,"busy",void 0);var nt=function(t){function e(){return t.call(this)||this}return B(e,t),e.prototype.ngOnInit=function(){},e}(Y);nt.decorators=[{type:n.Component,args:[{selector:"aup-card-container",template:'<div class="card-container">\n <ng-content></ng-content>\n\n <div class="add-card-container" *ngIf="addCardCommand.enabled.value" [pectinCommand]="addCardCommand">\n <aup-command-face *ngIf="addCardFace" [faces]="[addCardFace]"></aup-command-face>\n <aup-icon *ngIf="!addCardFace" icon="mat:add"></aup-icon>\n </div>\n\n <div class="add-card-template" *ngIf="addCardTemplate">\n <ng-container [ngTemplateOutlet]="addCardTemplate"></ng-container>\n </div>\n\n</div>\n',styles:[":root{--aup-default-background:#fff;--aup-default-padding:var(--default-padding,18px)}aup-activity-title{font-family:Roboto,Helvetica Neue,sans-serif;font-size:20px;letter-spacing:normal;line-height:32px;margin-bottom:var(--default-padding)}.router-outlet-container>*{bottom:0;left:0;position:absolute;right:0;top:0}[no-tab-header]>mat-tab-header{display:none}[full-height-tabs] .mat-tab-body-wrapper,mat-tab-group.full-height-tabs .mat-tab-body-wrapper{flex:1}[full-height-tabs] .mat-tab-body-wrapper .mat-tab-body-content,[full-height-tabs] .mat-tab-body-wrapper mat-tab-body,mat-tab-group.full-height-tabs .mat-tab-body-wrapper .mat-tab-body-content,mat-tab-group.full-height-tabs .mat-tab-body-wrapper mat-tab-body{display:flex;flex-direction:column;justify-content:stretch}.dialog-interaction-context,.dialog-interaction-context mat-dialog-container{max-height:95vh!important;max-width:95vw!important}.dialog-interaction-context mat-dialog-container{padding:0}.activity-outlet-wrapper{align-items:stretch;display:flex;flex-direction:column}.aup-popup-interaction-panel{background:var(--aup-default-background,#fff);box-shadow:0 2px 1px -1px rgba(0,0,0,.2),0 1px 1px 0 rgba(0,0,0,.14),0 1px 3px 0 rgba(0,0,0,.12);transition:box-shadow .28s cubic-bezier(.4,0,.2,1)}.aup-input-activity{padding:calc(var(--aup-default-padding)/2)}.aup-input-component{display:block}.aup-input-component input,.aup-input-component mat-form-field{width:100%}.aup-input-component input mat-hint.faux-error,.aup-input-component mat-form-field mat-hint.faux-error{color:#f44336}.aup-input-component.dense mat-form-field .mat-form-field-infix{border-top:none}.aup-input-component.dense mat-form-field .mat-form-field-flex{padding-top:0}.aup-input-component.dense mat-form-field .mat-form-field-wrapper{border-bottom:0;padding-bottom:0}.aup-input-component.dense mat-form-field .mat-form-field-underline{bottom:0}.aup-input-component.dense mat-form-field.mat-form-field-can-float.mat-form-field-should-float .mat-form-field-label-wrapper{display:none}.aup-input-component.dense mat-form-field.mat-form-field-appearance-standard.mat-form-field-has-label .mat-select:not(.mat-select-empty) .mat-select-arrow-wrapper{transform:translateY(0)}aup-table-cell-renderer>.aup-input-component .mat-form-field-flex{padding-top:0}aup-table-cell-renderer>.aup-input-component .mat-form-field-infix{width:0}aup-table-cell-renderer>.aup-input-component .mat-form-field-label-wrapper{display:none}aup-table{--default-column-gap:var(--column-gap,24px);--resolved-row-hover-background-color:var(--row-hover-background-color,rgba(0,0,0,0.05));--resolved-row-selected-background-color:var(--row-selected-background-color,rgba(0,0,255,0.04))}aup-table .mat-table td.mat-cell:first-of-type,aup-table .mat-table td.mat-footer-cell:first-of-type,aup-table .mat-table th.mat-header-cell:first-of-type{padding-left:0}aup-table .mat-table tr.enable-hover:hover{background-color:var(--resolved-row-hover-background-color)}aup-table .mat-table tr.aup-row-selected,aup-table .mat-table tr.aup-row-selected.enable-hover:hover{background-color:var(--resolved-row-selected-background-color)}aup-table .mat-table td.enable-cursor{cursor:pointer}aup-table .mat-table .mat-cell:not(.flex),aup-table .mat-table .mat-header-cell:not(.flex){white-space:nowrap;width:1px}aup-table aup-table-cell-renderer,aup-table aup-table-header-cell-renderer{align-items:stretch;display:flex;flex-direction:column;height:100%;justify-content:center;min-height:47px}aup-table aup-table-cell-renderer.first-column,aup-table aup-table-cell-renderer:not(.first-column),aup-table aup-table-header-cell-renderer.first-column,aup-table aup-table-header-cell-renderer:not(.first-column){padding-left:var(--default-column-gap)}aup-table aup-table-cell-renderer.fillCell{justify-content:stretch;padding-left:0!important}aup-table aup-table-cell-renderer.padChild>:first-child{flex:1;padding-left:var(--default-column-gap)}:root{--aup-command-face-icon-gap:8px;--aup-fa-icon-width:18px;--aup-icon-width:24px}aup-icon{--fa-icon-offset:calc((var(--aup-icon-width) - var(--aup-fa-icon-width))/2);position:relative}aup-icon fa-icon .svg-inline--fa{height:var(--aup-fa-icon-width)!important;left:var(--fa-icon-offset);position:absolute;top:var(--fa-icon-offset);width:var(--aup-fa-icon-width)!important}.mat-menu-panel aup-icon .svg-inline--fa{opacity:.54}:host{--resolved-card-background:var(--card-background,#fcfcfb);--resolved-card-gap:var(--card-gap,16px);--resolved-card-height:var(--card-height,auto);--resolved-card-min-height:var(--card-min-height,auto);--resolved-card-width:var(--card-width,300px);background:var(--resolved-card-background);display:block;flex:1}.card-container{box-sizing:border-box;display:-ms-grid;display:grid;grid-gap:var(--resolved-card-gap);grid-template-columns:repeat(auto-fill,var(--resolved-card-width));grid-template-rows:repeat(auto-fit,minmax(var(--resolved-card-min-height),var(--resolved-card-height)));max-width:100%;min-height:calc(var(--resolved-card-height) + 2*var(--resolved-card-gap));min-width:calc(var(--resolved-card-width) + 2*var(--resolved-card-gap));padding:var(--resolved-card-gap);width:calc((var(--resolved-card-width) + var(--resolved-card-gap))*2 + var(--grid-gap))}.add-card-container{align-items:center;background-color:hsla(0,0%,100%,.8);border:2px dashed rgba(0,0,0,.1);border-radius:6px;box-sizing:border-box;color:rgba(0,0,0,.54);cursor:pointer;display:flex;flex-direction:column;font-weight:300;height:var(--resolved-card-height);justify-content:center;min-height:var(--resolved-card-min-height);transition:all .28s cubic-bezier(.4,0,.2,1);width:var(--resolved-card-width)}.add-card-container mat-icon{font-size:200%}.add-card-container:hover{background-color:#fff;border-color:transparent;color:rgba(0,0,0,.54);transition:box-shadow .28s cubic-bezier(.4,0,.2,1);transition:all .28s cubic-bezier(.4,0,.2,1)}.add-card-container:hover:hover{box-shadow:0 2px 4px -1px rgba(0,0,0,.2),0 4px 5px 0 rgba(0,0,0,.14),0 1px 10px 0 rgba(0,0,0,.12)}.add-card-template-container{align-items:stretch;display:flex;flex-direction:column;height:var(--resolved-card-height);justify-content:stretch;width:var(--resolved-card-width)}"]}]}],nt.ctorParameters=function(){return[]},nt.propDecorators={addCardCommand:[{type:n.Input}],addCardFace:[{type:n.Input}],addCardTemplate:[{type:n.ContentChild,args:["addCardTemplate"]}]},q([w.TrackExternal(),z("design:type",w.Command)],nt.prototype,"addCardCommand",void 0),function(t){!function(t){t.START="start",t.END="end"}(t.Position||(t.Position={})),t.Style=P.Enum({FLAT:"flat",STROKED:"stroked",RAISED:"raised"}),t.getColorOf=function(t){return V.default.isFunction(null==t?void 0:t.color)?t.color():void 0},t.getStyleOf=function(t){return V.default.isFunction(null==t?void 0:t.style)?t.style():void 0},t.getIconOf=function(t){return V.default.isFunction(null==t?void 0:t.icon)?t.icon():void 0},t.getIconPositionOf=function(t){return V.default.isFunction(null==t?void 0:t.iconPosition)?t.iconPosition():void 0},t.getTooltipOf=function(t){return V.default.isFunction(null==t?void 0:t.tooltip)?t.tooltip():void 0},t.getTextOf=function(t){return V.default.isFunction(null==t?void 0:t.text)?t.text():void 0};var e=function(){function e(t){this.face=t}return Object.defineProperty(e.prototype,"text",{get:function(){return t.getTextOf(this.face)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"icon",{get:function(){return t.getIconOf(this.face)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"iconPosition",{get:function(){return t.getIconPositionOf(this.face)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"tooltip",{get:function(){return t.getTooltipOf(this.face)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"iconPositionStart",{get:function(){return this.iconPosition===t.Position.START},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"iconPositionEnd",{get:function(){return this.iconPosition===t.Position.END},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"color",{get:function(){return t.getColorOf(this.face)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"style",{get:function(){return t.getStyleOf(this.face)},enumerable:!1,configurable:!0}),e}();q([x.Memoize(),z("design:type",Object),z("design:paramtypes",[])],e.prototype,"text",null),q([x.Memoize(),z("design:type",Object),z("design:paramtypes",[])],e.prototype,"icon",null),q([x.Memoize(),z("design:type",Object),z("design:paramtypes",[])],e.prototype,"iconPosition",null),q([x.Memoize(),z("design:type",Object),z("design:paramtypes",[])],e.prototype,"tooltip",null),q([x.Memoize(),z("design:type",Boolean),z("design:paramtypes",[])],e.prototype,"iconPositionStart",null),q([x.Memoize(),z("design:type",Boolean),z("design:paramtypes",[])],e.prototype,"iconPositionEnd",null),q([x.Memoize(),z("design:type",String),z("design:paramtypes",[])],e.prototype,"color",null),q([x.Memoize(),z("design:type",String),z("design:paramtypes",[])],e.prototype,"style",null),t.Adapter=e}(t.CommandFace||(t.CommandFace={}));var ot=function(e){function n(){var n=e.call(this)||this;n.facesModel=new w.MutableListModel,n.ignoreIcon=!1,n.ignoreText=!1,n.includeMissingIconInLayout=!1;var o=w.Dsl.disposeWith(n),i=o.chain;o.valueOf,o.before,o.when,o.after,o.observe,o.switchOn;n.faceAdapters=i(n.facesModel).map((function(e){return new t.CommandFace.Adapter(e)}));var r=n.faceAdapters.first();return n.activeIcon=r.pluck("icon"),n.activeColor=r.pluck("color"),n}return B(n,e),Object.defineProperty(n.prototype,"requiresMissingIconInLayout",{get:function(){return this.includeMissingIconInLayout&&!this.activeIcon.value},enumerable:!1,configurable:!0}),n.prototype.ngOnInit=function(){},n.prototype.shouldIncludeIcon=function(t){return!this.ignoreIcon&&t.icon||this.includeMissingIconInLayout},n.prototype.hasIconStart=function(e){return this.shouldIncludeIcon(e)&&(!e.iconPosition||e.iconPosition===t.CommandFace.Position.START)},n.prototype.hasIconEnd=function(e){return this.shouldIncludeIcon(e)&&e.iconPosition===t.CommandFace.Position.END},Object.defineProperty(n.prototype,"color",{get:function(){return this.activeColor.value},enumerable:!1,configurable:!0}),n}(Y);ot.decorators=[{type:n.Component,args:[{selector:"aup-command-face",template:'<div class="face-container" *ngFor="let face of faceAdapters.value">\n <aup-icon *ngIf="hasIconStart(face)" [icon]="face.icon"></aup-icon>\n <span *ngIf="face.text">{{face.text}}</span>\n <aup-icon *ngIf="hasIconEnd(face)" [icon]="face.icon"></aup-icon>\n</div>\n',encapsulation:n.ViewEncapsulation.None,styles:["aup-command-face{--icon-gap:var(--aup-command-face-icon-gap);display:-ms-inline-grid;display:inline-grid}aup-command-face>.face-container{-ms-grid-column:1;-ms-grid-row:1;align-items:center;display:inline-flex;flex-direction:row;grid-column:1;grid-row:1}aup-command-face>.face-container:not(:first-child){visibility:hidden}aup-command-face>.face-container *+*{margin-left:var(--icon-gap)}aup-command-face.hide-icon aup-icon{visibility:hidden}aup-command-face.centered{justify-items:center}"]}]}],ot.ctorParameters=function(){return[]},ot.propDecorators={_rawFaces:[{type:n.Input,args:["faces"]}],ignoreIcon:[{type:n.Input}],ignoreText:[{type:n.Input}],includeMissingIconInLayout:[{type:n.Input}],requiresMissingIconInLayout:[{type:n.HostBinding,args:["class.hide-icon"]}],color:[{type:n.HostBinding,args:["attr.color"]}]},q([w.StoreInListModel("facesModel"),z("design:type",Array)],ot.prototype,"_rawFaces",void 0);var it=function(t){function e(e,n){var o=t.call(this)||this;return o.element=e,o.parent=n,n&&o.registerDisposable(o.parent.register(o)),o}return B(e,t),Object.defineProperty(e.prototype,"componentIndex",{get:function(){return this.computeComponentIndex()},enumerable:!1,configurable:!0}),e.prototype.computeComponentIndex=function(){for(var t=this.element.nativeElement,e=0;t=t.previousElementSibling;)e++;return e},e.prototype.getFace=function(){},e}(Y),rt=new n.InjectionToken("popup-component"),at=function(e){function n(n,o){var i=e.call(this,n,o)||this;i.CommandFace=t.CommandFace;var r=w.Dsl.disposeWith(i),a=r.chain;r.switchOn;return i.faces=a(i.command.busy).mapToList((function(t){return t?[i.busyFaceModel.value,i.faceModel.value]:[i.faceModel.value,i.busyFaceModel.value]}),{allowNil:!0,dependsOn:[i.faceModel,i.busyFaceModel]}).rejectNil(),i.activeFace=i.faces.first(),i.buttonStyle=a(i.activeFace).map((function(e){return t.CommandFace.getStyleOf(e)})),i.colorModel=a(i.activeFace).map((function(e){return t.CommandFace.getColorOf(e)})),i}return B(n,e),n.prototype.isActive=function(t){return this.activeFace.query().equals(t)},n.prototype.ngOnInit=function(){},n.prototype.ngAfterViewInit=function(){},n.prototype.getFace=function(){return this.face},n}(it);at.decorators=[{type:n.Component,args:[{selector:"aup-command",template:'<ng-container [ngSwitch]="buttonStyle.value">\n <ng-container *ngSwitchCase="CommandFace.Style.STROKED">\n <button mat-stroked-button [pectinCommand]="command" [color]="colorModel.value" [class.busy]="command.busy.value">\n <aup-command-face class="centered" [faces]="faces.value"></aup-command-face>\n </button>\n </ng-container>\n <ng-container *ngSwitchCase="CommandFace.Style.RAISED">\n <button mat-raised-button [pectinCommand]="command" [color]="colorModel.value" [class.busy]="command.busy.value">\n <aup-command-face class="centered" [faces]="faces.value"></aup-command-face>\n </button>\n </ng-container>\n <ng-container *ngSwitchDefault>\n <button mat-button [pectinCommand]="command" [color]="colorModel.value" [class.busy]="command.busy.value">\n <aup-command-face class="centered" [faces]="faces.value"></aup-command-face>\n </button>\n </ng-container>\n</ng-container>\n',styles:[":host{display:inline-flex;flex-direction:row;justify-content:stretch}button{flex:1}"]}]}],at.ctorParameters=function(){return[{type:n.ElementRef},{type:void 0,decorators:[{type:n.Inject,args:[rt]},{type:n.Optional}]}]},at.propDecorators={command:[{type:n.Input}],faceModel:[{type:n.Input}],face:[{type:n.Input}],busyFaceModel:[{type:n.Input}],busyFace:[{type:n.Input}]},q([w.TrackExternal(),z("design:type",w.Command)],at.prototype,"command",void 0),q([w.TrackExternal(),z("design:type",w.ValueModel)],at.prototype,"faceModel",void 0),q([w.StoreInValueModel("faceModel"),z("design:type",Object)],at.prototype,"face",void 0),q([w.TrackExternal(),z("design:type",w.ValueModel)],at.prototype,"busyFaceModel",void 0),q([w.StoreInValueModel("busyFaceModel"),z("design:type",Object)],at.prototype,"busyFace",void 0);var st=function(t){function e(){return t.call(this)||this}return B(e,t),e.prototype.ngOnInit=function(){},e}(Y);st.decorators=[{type:n.Component,args:[{selector:"aup-flex",template:""}]}],st.ctorParameters=function(){return[]};var ct=function(e){function n(n,o){var i=e.call(this,n,o)||this;i._unorderedChildren=new w.MutableListModel,i.faceModelDelegate=new w.DelegatingValueModel,i.xPosition="after",i.yPosition="below";var r=w.Dsl.disposeWith(i),a=r.chain;r.valueOf,r.before,r.when,r.after,r.observe,r.switchOn;return i.faceAdapterModel=a(i.faceModelDelegate).map((function(e){return new t.CommandFace.Adapter(e)})),i.children=a(i._unorderedChildren).sortBy("componentIndex"),i}return B(n,e),n.prototype.ngAfterContentChecked=function(){this._unorderedChildren.value=X(this._unorderedChildren.value)},Object.defineProperty(n.prototype,"faceAdapter",{get:function(){var e,n;return this.faceAdapterModel||console.error("Somehow faceAdapterModel is nil -- set a break point here and let me know what's going on"),null!==(n=null===(e=this.faceAdapterModel)||void 0===e?void 0:e.value)&&void 0!==n?n:new t.CommandFace.Adapter(void 0)},enumerable:!1,configurable:!0}),n.prototype.isRoot=function(){return!this.parent},n.prototype.register=function(t){var e=this;return this._unorderedChildren.push(t),w.Disposable.disposableThatRuns((function(){e._unorderedChildren.remove(t)}))},n.prototype.onCommandFired=function(){this.triggers.forEach((function(t){t.menuOpen&&t.closeMenu()}))},n.prototype.getFace=function(){return this.faceAdapter.face},n}(it);ct.decorators=[{type:n.Component,args:[{selector:"aup-abstract-popup-menu",template:""}]}],ct.ctorParameters=function(){return[{type:n.ElementRef},{type:void 0,decorators:[{type:n.Inject,args:[rt]}]}]},ct.propDecorators={xPosition:[{type:n.Input}],yPosition:[{type:n.Input}],triggers:[{type:n.ViewChildren,args:[g.MatMenuTrigger]}]};var lt=function(t){function e(e,n){var o=t.call(this,e,n)||this;o.tooltipModel=new w.MutableValueModel;var i=w.Dsl.disposeWith(o),r=i.chain;i.valueOf,i.before,i.when,i.after,i.observe,i.switchOn;return o.faceModelDelegate.setDelegate(r(o.tooltipModel).map((function(t){return{icon:function(){return"mat:more_vert"},tooltip:function(){return t}}}),{allowNil:!0})),o}return B(e,t),Object.defineProperty(e.prototype,"face",{get:function(){return this.faceModelDelegate.value},enumerable:!1,configurable:!0}),e}(ct);lt.decorators=[{type:n.Component,args:[{selector:"aup-more-menu",template:'<div class="content" style="display: none">\n <ng-content></ng-content>\n</div>\n<ng-container *ngIf="isRoot()">\n <ng-container *ngIf="faceAdapter.text" [ngSwitch]="faceAdapter.style">\n <ng-container *ngSwitchCase="\'stroked\'">\n <button matMenuTrigger\n [matMenuTriggerFor]="subMenu.menuComponent"\n [matTooltip]="faceAdapter.tooltip"\n [color]="faceAdapter.color"\n mat-stroked-button>\n <aup-command-face [faces]="[face]"></aup-command-face>\n </button>\n <aup-popup-menu-renderer #subMenu\n [parent]="this"\n (commandFired)="onCommandFired()"></aup-popup-menu-renderer>\n </ng-container>\n\n <ng-container *ngSwitchCase="\'raised\'">\n <button matMenuTrigger\n [matMenuTriggerFor]="subMenu.menuComponent"\n [matTooltip]="faceAdapter.tooltip"\n [color]="faceAdapter.color"\n mat-raised-button>\n <aup-command-face [faces]="[face]"></aup-command-face>\n </button>\n <aup-popup-menu-renderer #subMenu\n [parent]="this"\n (commandFired)="onCommandFired()"></aup-popup-menu-renderer>\n </ng-container>\n\n <ng-container *ngSwitchDefault>\n <button matMenuTrigger\n [matMenuTriggerFor]="subMenu.menuComponent"\n [matTooltip]="faceAdapter.tooltip"\n [color]="faceAdapter.color"\n mat-button>\n <aup-command-face [faces]="[face]"></aup-command-face>\n </button>\n <aup-popup-menu-renderer #subMenu [parent]="this" (commandFired)="onCommandFired()"></aup-popup-menu-renderer>\n </ng-container>\n\n </ng-container>\n\n <ng-container *ngIf="!faceAdapter.text">\n <button matMenuTrigger\n mat-icon-button\n [matMenuTriggerFor]="subMenu.menuComponent"\n [matTooltip]="faceAdapter.tooltip"\n [color]="faceAdapter.color"\n >\n <aup-command-face [faces]="[face]"></aup-command-face>\n </button>\n <aup-popup-menu-renderer #subMenu\n [parent]="this"\n (commandFired)="onCommandFired()"></aup-popup-menu-renderer>\n </ng-container>\n</ng-container>\n',providers:[{provide:rt,useExisting:lt}]}]}],lt.ctorParameters=function(){return[{type:n.ElementRef},{type:void 0,decorators:[{type:n.Inject,args:[rt]},{type:n.Optional},{type:n.SkipSelf}]}]},lt.propDecorators={tooltip:[{type:n.Input}]},q([w.StoreInValueModel("tooltipModel"),z("design:type",String)],lt.prototype,"tooltip",void 0),(t.TrackBy||(t.TrackBy={})).byIndex=function(t,e){return e},t.CommandContainer=function(t){function e(e){var n=t.call(this)||this;return n.parent=e,n}return B(e,t),Object.defineProperty(e.prototype,"depth",{get:function(){return this.hasParent()?this.parent.depth+1:0},enumerable:!1,configurable:!0}),e.prototype.hasParent=function(){return!!this.parent},Object.defineProperty(e.prototype,"orientation",{get:function(){return e.Orientation.VERTICAL},enumerable:!1,configurable:!0}),e}(w.GarbageCollector),(t.CommandContainer||(t.CommandContainer={})).Orientation=P.Enum({HORIZONTAL:"horizontal",VERTICAL:"vertical"});var ut=function(e){function n(){return e.call(this)||this}return B(n,e),Object.defineProperty(n.prototype,"orientation",{get:function(){return t.CommandContainer.Orientation.HORIZONTAL},enumerable:!1,configurable:!0}),n.prototype.ngOnInit=function(){},n.prototype.ngAfterContentInit=function(){},n.prototype.ngAfterViewInit=function(){},n}(t.CommandContainer);ut.decorators=[{type:n.Component,args:[{selector:"aup-tool-bar",template:'<div class="toolbar-content"><ng-content></ng-content></div>',encapsulation:n.ViewEncapsulation.None,styles:[":host{display:inline-block}.toolbar-content{align-items:center;display:inline-flex;flex-direction:row}.toolbar-content>aup-separator{-ms-grid-row-align:stretch;align-self:stretch;margin:4px 0 4px 8px}.toolbar-content>aup-flex{flex:1}.toolbar-content>*+*{margin-left:8px}"]}]}],ut.ctorParameters=function(){return[]};var pt=function(e){function n(t,n,o){var i=e.call(this,t,n)||this;return i.containerParent=o,i}return B(n,e),n.prototype.isHorizontalContainer=function(){return this.containerParent instanceof ut&&this.containerParent.orientation===t.CommandContainer.Orientation.HORIZONTAL},n.prototype.ngOnInit=function(){},n}(it);pt.decorators=[{type:n.Component,args:[{selector:"aup-separator",template:'\n <mat-divider [vertical]="!isHorizontalContainer()"></mat-divider>',styles:[":host {\n }",":host(.horizontal-container) {\n display: inline-flex;\n flex-direction: row;\n align-items: stretch;\n }"]}]}],pt.ctorParameters=function(){return[{type:n.ElementRef},{type:void 0,decorators:[{type:n.Optional},{type:n.Inject,args:[rt]}]},{type:t.CommandContainer,decorators:[{type:n.Optional}]}]},pt.propDecorators={isHorizontalContainer:[{type:n.HostBinding,args:["class.horizontal-container"]}]};var dt=function(e){function o(){var o=e.call(this)||this;o._childList=new w.DelegatingListModel,o.commandFired=new n.EventEmitter,o.TrackBy=t.TrackBy;var i=w.Dsl.disposeWith(o),r=i.chain,a=i.valueOf,s=(i.before,i.when,i.after,i.observe,i.switchOn,r(o._childList).map((function(t){return t.getFace()})).rejectNil()),c=s.select((function(e){return!!t.CommandFace.getIconOf(e)})).count(),l=s.count();return o.hasMixedIcons=a.all(c.isGreaterThan(0),l.doesNotEqual(c)).areTruthy(),o}return B(o,e),Object.defineProperty(o.prototype,"parent",{get:function(){return this._parentComponent},set:function(t){this._parentComponent=t,this._childList.setDelegate(t.children)},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"children",{get:function(){return this.parent.children.value},enumerable:!1,configurable:!0}),o.prototype.executeCommand=function(t){var e=this;this.isCommand(t)&&t.command.execute().finally((function(){e.commandFired.emit()}))},o.prototype.isEnabled=function(t){return!0},o.prototype.onCommandFired=function(){this.commandFired.emit(),this.triggers.forEach((function(t){t.menuOpen&&t.closeMenu()}))},o.prototype.isCommand=function(t){return t instanceof at},o.prototype.isPopupMenu=function(t){return t instanceof ct},o.prototype.isSeparator=function(t){return t instanceof pt},o.prototype.getTooltip=function(e){return this.isCommand(e)?t.CommandFace.getTooltipOf(e.face):void 0},o.prototype.getFaces=function(t){return this.isCommand(t)?t.faces.value:this.isPopupMenu(t)?[t.faceAdapter.face]:void 0},o}(Y);dt.decorators=[{type:n.Component,args:[{selector:"aup-popup-menu-renderer",template:'<mat-menu #menu [xPosition]="parent.xPosition" [yPosition]="parent.yPosition">\n <ng-template matMenuContent>\n <ng-container *ngFor="let child of children; trackBy: TrackBy.byIndex" >\n <button *ngIf="isCommand(child)"\n (click)="executeCommand(child)"\n [disabled]="!isEnabled(child)"\n [matTooltip]="getTooltip(child)"\n mat-menu-item>\n <aup-command-face [faces]="getFaces(child)"\n [includeMissingIconInLayout]="hasMixedIcons.value"></aup-command-face>\n </button>\n\n <ng-container *ngIf="isPopupMenu(child)">\n <button mat-menu-item\n matMenuTrigger\n [matMenuTriggerFor]="innerPanel.menuComponent"\n >\n <aup-command-face [faces]="getFaces(child)"\n [includeMissingIconInLayout]="hasMixedIcons.value"></aup-command-face>\n </button>\n <aup-popup-menu-renderer #innerPanel\n [parent]="child"\n (commandFired)="onCommandFired()"></aup-popup-menu-renderer>\n </ng-container>\n\n <mat-divider *ngIf="isSeparator(child)"></mat-divider>\n\n </ng-container>\n\n </ng-template>\n</mat-menu>\n'}]}],dt.ctorParameters=function(){return[]},dt.propDecorators={parent:[{type:n.Input}],menuComponent:[{type:n.ViewChild,args:["menu",{static:!0}]}],commandFired:[{type:n.Output}],triggers:[{type:n.ViewChildren,args:[g.MatMenuTrigger]}]};var ft=function(t){function e(e,n){var o=t.call(this,e,n)||this,i=w.Dsl.disposeWith(o);i.chain,i.valueOf,i.before,i.when,i.after,i.observe,i.switchOn;return o}return B(e,t),e}(ct);ft.decorators=[{type:n.Component,args:[{selector:"aup-popup-menu",template:'<div class="content" style="display: none">\n <ng-content></ng-content>\n</div>\n<ng-container *ngIf="isRoot()">\n <ng-container *ngIf="faceAdapter.text" [ngSwitch]="faceAdapter.style">\n <ng-container *ngSwitchCase="\'stroked\'">\n <button matMenuTrigger\n [matMenuTriggerFor]="subMenu.menuComponent"\n [matTooltip]="faceAdapter.tooltip"\n [color]="faceAdapter.color"\n mat-stroked-button>\n <aup-command-face [faces]="[face]"></aup-command-face>\n </button>\n <aup-popup-menu-renderer #subMenu\n [parent]="this"\n (commandFired)="onCommandFired()"></aup-popup-menu-renderer>\n </ng-container>\n\n <ng-container *ngSwitchCase="\'raised\'">\n <button matMenuTrigger\n [matMenuTriggerFor]="subMenu.menuComponent"\n [matTooltip]="faceAdapter.tooltip"\n [color]="faceAdapter.color"\n mat-raised-button>\n <aup-command-face [faces]="[face]"></aup-command-face>\n </button>\n <aup-popup-menu-renderer #subMenu\n [parent]="this"\n (commandFired)="onCommandFired()"></aup-popup-menu-renderer>\n </ng-container>\n\n <ng-container *ngSwitchDefault>\n <button matMenuTrigger\n [matMenuTriggerFor]="subMenu.menuComponent"\n [matTooltip]="faceAdapter.tooltip"\n [color]="faceAdapter.color"\n mat-button>\n <aup-command-face [faces]="[face]"></aup-command-face>\n </button>\n <aup-popup-menu-renderer #subMenu [parent]="this" (commandFired)="onCommandFired()"></aup-popup-menu-renderer>\n </ng-container>\n\n </ng-container>\n\n <ng-container *ngIf="!faceAdapter.text">\n <button matMenuTrigger\n mat-icon-button\n [matMenuTriggerFor]="subMenu.menuComponent"\n [matTooltip]="faceAdapter.tooltip"\n [color]="faceAdapter.color"\n >\n <aup-command-face [faces]="[face]"></aup-command-face>\n </button>\n <aup-popup-menu-renderer #subMenu\n [parent]="this"\n (commandFired)="onCommandFired()"></aup-popup-menu-renderer>\n </ng-container>\n</ng-container>\n',providers:[{provide:rt,useExisting:ft}]}]}],ft.ctorParameters=function(){return[{type:n.ElementRef},{type:void 0,decorators:[{type:n.Inject,args:[rt]},{type:n.Optional},{type:n.SkipSelf}]}]},ft.propDecorators={faceModel:[{type:n.Input}],face:[{type:n.Input}]},q([w.TrackExternal({delegateTo:"faceModelDelegate"}),z("design:type",w.ValueModel)],ft.prototype,"faceModel",void 0),q([w.StoreInValueModel("faceModel"),z("design:type",Object)],ft.prototype,"face",void 0);var ht=function(){function t(){}return t.prototype.ngOnInit=function(){},t}();ht.decorators=[{type:n.Component,args:[{selector:"aup-empty-state",template:'\n <div class="container">\n <ng-content></ng-content>\n </div>\n ',styles:[":host{align-items:center;display:flex;flex-direction:column;justify-content:center}.container{border:2px dashed rgba(0,0,0,.2);border-radius:5px;font-size:14px;font-weight:300;padding:var(--aup-default-padding)}"]}]}],ht.ctorParameters=function(){return[]};var mt=function(t){function e(e){var n=t.call(this)||this;return n.focusManager=e,n.restoreFocusCommand=w.Command.create((function(){n.restoreFocus()})),n.tabIndex=-1,n}return B(e,t),e.prototype.ngOnInit=function(){},e.prototype.restoreFocus=function(){this.focusManager.restoreFocus()},e}(Y);mt.decorators=[{type:n.Component,args:[{selector:"aup-focus-container",template:"<ng-content></ng-content>\n",providers:[{provide:w.FocusManager}],styles:[":host{display:block}"]}]}],mt.ctorParameters=function(){return[{type:w.FocusManager,decorators:[{type:n.Self}]}]},mt.propDecorators={tabIndex:[{type:n.HostBinding,args:["attr.tabindex"]}]};var gt=function(t){function e(e,n,o){var i=t.call(this)||this;i.el=e,i.focusManager=n;var r=w.Dsl.disposeWith(i);r.chain,r.valueOf,r.before,r.when,r.after,r.observe,r.switchOn;return i.focusManager&&(i._focusContext=i.focusManager.registerFocusable(i),i.registerDisposable(i._focusContext),i.registerDisposable(o.createBinding(e.nativeElement,i.focusContext))),i}return B(e,t),Object.defineProperty(e.prototype,"focusable",{get:function(){return this.focusContext?0:void 0},enumerable:!1,configurable:!0}),e.prototype.onFocus=function(){var t;null===(t=this.focusContext)||void 0===t||t.notifyFocusIn()},e.prototype.onBlur=function(){var t;null===(t=this.focusContext)||void 0===t||t.notifyFocusOut()},Object.defineProperty(e.prototype,"focusContext",{get:function(){return this._focusContext},enumerable:!1,configurable:!0}),e}(Y);gt.decorators=[{type:n.Component,args:[{template:""}]}],gt.ctorParameters=function(){return[{type:n.ElementRef},{type:w.FocusManager},{type:Z}]},gt.propDecorators={focusable:[{type:n.HostBinding,args:["attr.tabindex"]}],onFocus:[{type:n.HostListener,args:["focus"]}],onBlur:[{type:n.HostListener,args:["blur"]}]};var yt=function(t){function e(){var e=t.call(this)||this;e.onValueEditedListeners=new w.EventListenerList,e.dense=!1,e.focus=new n.EventEmitter,e.blur=new n.EventEmitter,e.enterKey=new n.EventEmitter,e.escapeKey=new n.EventEmitter,e.baseClassName="aup-input-component";var o=e;return e.errorStateMatcher={isErrorState:function(t,e){return o.hasErrors()}},e}return B(e,t),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.formValueModel.enabled},enumerable:!1,configurable:!0}),e.prototype.hasErrors=function(){return!this.errorList.query().isEmpty()},Object.defineProperty(e.prototype,"errorList",{get:function(){return this.formValueModel.errorList},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"firstError",{get:function(){return this.hasErrors()?this.errorList.value[0]:null},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"focusContext",{get:function(){return this.formValueModel.focusContext},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"floatLabel",{get:function(){return this.dense?"never":this.userFloatLabel},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"showHint",{get:function(){return!this.dense&&!!this.hint},enumerable:!1,configurable:!0}),e.prototype.onValueEdited=function(t){return this.onValueEditedListeners.add(t)},e}(Y);yt.decorators=[{type:n.Component,args:[{template:""}]}],yt.ctorParameters=function(){return[]},yt.propDecorators={label:[{type:n.Input}],userFloatLabel:[{type:n.Input,args:["floatLabel"]}],hint:[{type:n.Input}],placeholder:[{type:n.Input}],dense:[{type:n.HostBinding,args:["class.dense"]},{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}],baseClassName:[{type:n.HostBinding,args:["class"]}],notifyClick:[{type:n.HostListener,args:["click"]}],notifyFocusIn:[{type:n.HostListener,args:["focusin"]}],notifyFocusOut:[{type:n.HostListener,args:["focusout"]}]};var vt=function(t){function e(){var e=t.call(this)||this;e.formValueModel=e.registerDisposable(new w.Form.DelegatingListModel),e.componentListModel=new w.MutableListModel,e.setValueIsInProgress=new w.Guard,e.valueChange=new n.EventEmitter;var o=w.Dsl.disposeWith(e),i=o.when,r=o.valueOf,a=o.chain,s=new w.Binding.Identity(e.formValueModel,e.componentListModel).writeRight(),c=r.any(e.setValueIsInProgress,a(s.direction).equals(w.Binding.Direction.RIGHT)).areTruthy();return i(e.componentListModel).changes((function(t,n){e.valueChange.emit(t),e.onValueEditedListeners.fire((function(e){return e(t,n)}))}),{initialValue:"ignore",unless:c}),w.DebugContext.tag(e.formValueModel,e.constructor.name+".formValueModel"),e}return B(e,t),Object.defineProperty(e.prototype,"value",{set:function(t){var e=this;this.setValueIsInProgress.whileTrue((function(){e.listHolder?e.listHolder.value=t:(e.listHolder=new w.MutableListModel(t),e.listModel=e.listHolder)}))},enumerable:!1,configurable:!0}),e}(yt);vt.decorators=[{type:n.Component,args:[{template:""}]}],vt.ctorParameters=function(){return[]},vt.propDecorators={listModel:[{type:n.Input}],value:[{type:n.Input}],valueChange:[{type:n.Output}]},q([w.TrackExternal({delegateTo:"formValueModel"}),z("design:type",Object)],vt.prototype,"listModel",void 0);var bt=function(t){function e(){var e=t.call(this)||this;e.formValueModel=e.registerDisposable(new w.Form.DelegatingValueModel),e.setValueInProgress=new w.Guard,e.componentValueModel=new w.MutableValueModel,e.valueChange=new n.EventEmitter;var o=w.Dsl.disposeWith(e),i=o.when,r=o.chain,a=o.valueOf,s=new w.Binding.Identity(e.formValueModel,e.componentValueModel).writeRight(),c=a.any(e.setValueInProgress,r(s.direction).equals(w.Binding.Direction.RIGHT)).areTruthy();return i(e.componentValueModel).changes((function(t,n){e.valueChange.emit(t),e.onValueEditedListeners.fire((function(e){return e(t,n)}))}),{initialValue:"ignore",unless:c}),w.DebugContext.tag(e.formValueModel,e.constructor.name+".formValueModel"),e}return B(e,t),Object.defineProperty(e.prototype,"value",{set:function(t){var e=this;this.setValueInProgress.whileTrue((function(){e.plainValueHolder?e.plainValueHolder.value=t:(e.plainValueHolder=new w.MutableValueModel(t),e.valueModel=e.plainValueHolder)}))},enumerable:!1,configurable:!0}),e}(yt);bt.decorators=[{type:n.Component,args:[{template:""}]}],bt.ctorParameters=function(){return[]},bt.propDecorators={valueModel:[{type:n.Input}],value:[{type:n.Input}],valueChange:[{type:n.Output}]},q([w.TrackExternal({delegateTo:"formValueModel"}),z("design:type",Object)],bt.prototype,"valueModel",void 0);var Ct=function(t){function e(){var e=t.call(this)||this;e.filterValue=new w.MutableValueModel,e.optionLabelFormat=function(t){return t&&e.optionLabel?t[e.optionLabel]:t};var n=w.Dsl.disposeWith(e),o=n.chain,i=(n.valueOf,n.before,n.when,n.after,n.observe,n.switchOn,o(e.filterValue).map((function(t){return V.default.isString(t)?t.toLowerCase():""})));return e.filteredOptions=o(e.optionsModel).select((function(t){return V.default.isEmpty(e.filterValue.value)||e.optionLabelFormat(t).toString().toLowerCase().includes(i.value)}),{dependsOn:i}),e}return B(e,t),e.prototype.ngOnInit=function(){},e.prototype.formatOption=function(t){return this.optionLabelFormat(t)},e.prototype.updateFilter=function(t){this.filterValue.value=t},e.prototype.onSelect=function(t){this.valueModel.value=t.option.value},e}(bt);Ct.decorators=[{type:n.Component,args:[{selector:"aup-autocomplete-input",template:'<mat-form-field appearance="standard" [floatLabel]="floatLabel">\n <mat-label *ngIf="label">{{label}}</mat-label>\n <input type="string"\n matInput\n [matAutocomplete]="autocomplete"\n placeholder="{{placeholder}}"\n [ngModel]="componentValueModel.value"\n (ngModelChange)="updateFilter($event)"\n [disabled]="!enabled.value"\n (keydown.enter)="notifyEnterKey()"\n (keydown.escape)="notifyEscapeKey()"\n [pectinFocusBinding]="focusContext"\n [errorStateMatcher]="errorStateMatcher"\n >\n <mat-autocomplete #autocomplete [displayWith]="optionLabelFormat" [autoActiveFirstOption]="true" (optionSelected)="onSelect($event)">\n <mat-option *ngFor="let option of filteredOptions.value; let i = index"\n [value]="option"\n >{{formatOption(option)}}</mat-option>\n <mat-option *ngIf="allowNil">{{placeholder}}</mat-option>\n </mat-autocomplete>\n\n <mat-hint *ngIf="showHint">{{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%}"]}]}],Ct.ctorParameters=function(){return[]},Ct.propDecorators={optionsModel:[{type:n.Input}],options:[{type:n.Input}],optionLabel:[{type:n.Input}],allowNil:[{type:n.Input}],nilOptionTemplateRef:[{type:n.ContentChild,args:["nilOptionTemplate"]}],optionLabelFormat:[{type:n.Input}]},q([w.TrackExternal(),z("design:type",w.ListModel)],Ct.prototype,"optionsModel",void 0),q([w.StoreInListModel("optionsModel"),z("design:type",Array)],Ct.prototype,"options",void 0);var It=function(t){function e(){var e=t.call(this)||this;return e.color="accent",e.labelPosition="after",e}return B(e,t),e.prototype.ngOnInit=function(){},e}(bt);It.decorators=[{type:n.Component,args:[{selector:"aup-checkbox-input",template:'\x3c!-- TODO: add focus binding --\x3e\n<mat-checkbox\n [(ngModel)]="componentValueModel.value"\n [color]="color"\n [labelPosition]="labelPosition"\n [disabled]="!isEnabled()"\n>{{label}}</mat-checkbox>\n<mat-hint *ngIf="showHint">{{hint}}</mat-hint>\n<mat-error *ngIf="hasErrors">{{firstError}}</mat-error>\n',styles:[":host{display:inline-flex;flex-direction:column;padding:24px 0 16px}:host.dense{padding:6px 0 2px}mat-error,mat-hint{font-size:12px;font-weight:400;line-height:13.5px;margin-left:24px;margin-top:4px}"]}]}],It.ctorParameters=function(){return[]},It.propDecorators={color:[{type:n.Input}],labelPosition:[{type:n.Input}]};var wt=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 B(e,t),e.prototype.ngOnInit=function(){},e}(vt);wt.decorators=[{type:n.Component,args:[{selector:"aup-multiple-select-input",template:'<mat-form-field appearance="standard" [floatLabel]="floatLabel">\n <mat-label *ngIf="label">{{label}}</mat-label>\n <mat-select placeholder="{{placeholder}}"\n multiple\n [(ngModel)]="componentListModel.value"\n [disabled]="!enabled.value"\n (keydown.enter)="notifyEnterKey()"\n (keydown.escape)="notifyEscapeKey()"\n [pectinFocusBinding]="focusContext"\n [errorStateMatcher]="errorStateMatcher"\n >\n <mat-option *ngFor="let option of optionsModel.value; let i = index" [value]="option">\n <ng-container *ngIf="!optionTemplateRef">{{optionLabelFormat(option)}}</ng-container>\n <ng-container *ngIf="optionTemplateRef"\n [ngTemplateOutlet]="optionTemplateRef"\n [ngTemplateOutletContext]="{ $implicit: option, index: i }"\n >\n </ng-container>\n </mat-option>\n </mat-select>\n <mat-hint *ngIf="showHint">{{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%}"]}]}],wt.ctorParameters=function(){return[]},wt.propDecorators={optionsModel:[{type:n.Input}],options:[{type:n.Input}],optionLabel:[{type:n.Input}],optionTemplateRef:[{type:n.ContentChild,args:["optionTemplate"]}],optionLabelFormat:[{type:n.Input}]},q([w.TrackExternal(),z("design:type",w.ListModel)],wt.prototype,"optionsModel",void 0),q([w.StoreInListModel("optionsModel"),z("design:type",Array)],wt.prototype,"options",void 0);var xt=function(t){function e(){var e=t.call(this)||this;return e.min=Number.MIN_SAFE_INTEGER,e.max=Number.MAX_SAFE_INTEGER,e}return B(e,t),e.prototype.ngOnInit=function(){},e}(bt);xt.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 [attr.autocomplete]="autocomplete"\n [(ngModel)]="componentValueModel.value"\n [disabled]="!enabled.value"\n (keydown.enter)="notifyEnterKey()"\n (keydown.escape)="notifyEscapeKey()"\n [pectinFocusBinding]="focusContext"\n [errorStateMatcher]="errorStateMatcher"\n [min]="min"\n [max]="max"\n >\n <mat-hint *ngIf="hint && !dense" >{{hint}}</mat-hint>\n <mat-error *ngIf="hasErrors">{{firstError}}</mat-error>\n</mat-form-field>\n',styles:[""]}]}],xt.ctorParameters=function(){return[]},xt.propDecorators={autocomplete:[{type:n.Input}],min:[{type:n.Input}],max:[{type:n.Input}]};var Mt=function(t){function e(){return t.call(this)||this}return B(e,t),e.prototype.ngOnInit=function(){},e}(bt);Mt.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 [attr.autocomplete]="autocomplete"\n [(ngModel)]="componentValueModel.value"\n [disabled]="!enabled.value"\n (keydown.enter)="notifyEnterKey()"\n (keydown.escape)="notifyEscapeKey()"\n [pectinFocusBinding]="focusContext"\n [errorStateMatcher]="errorStateMatcher"\n >\n <mat-hint *ngIf="showHint">{{hint}}</mat-hint>\n <mat-error *ngIf="hasErrors">{{firstError}}</mat-error>\n</mat-form-field>\n\n',styles:[""]}]}],Mt.ctorParameters=function(){return[]},Mt.propDecorators={autocomplete:[{type:n.Input}]};var Pt=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 B(e,t),e.prototype.ngOnInit=function(){},e}(bt);Pt.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)]="componentValueModel.value"\n [disabled]="!enabled.value"\n (keydown.enter)="notifyEnterKey()"\n (keydown.escape)="notifyEscapeKey()"\n [pectinFocusBinding]="focusContext"\n [errorStateMatcher]="errorStateMatcher"\n >\n <mat-option *ngIf="allowNil">\n <ng-container *ngIf="!nilOptionTemplateRef">{{placeholder}}</ng-container>\n <ng-container *ngIf="nilOptionTemplateRef" [ngTemplateOutlet]="nilOptionTemplateRef"></ng-container>\n </mat-option>\n <mat-option *ngFor="let option of optionsModel.value; let i = index" [value]="option">\n <ng-container *ngIf="!optionTemplateRef">{{optionLabelFormat(option)}}</ng-container>\n <ng-container *ngIf="optionTemplateRef"\n [ngTemplateOutlet]="optionTemplateRef"\n [ngTemplateOutletContext]="{ $implicit: option, index: i }"\n >\n </ng-container>\n </mat-option>\n </mat-select>\n <mat-hint *ngIf="showHint">{{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%}"]}]}],Pt.ctorParameters=function(){return[]},Pt.propDecorators={optionsModel:[{type:n.Input}],options:[{type:n.Input}],optionLabel:[{type:n.Input}],allowNil:[{type:n.Input}],optionTemplateRef:[{type:n.ContentChild,args:["optionTemplate"]}],nilOptionTemplateRef:[{type:n.ContentChild,args:["nilOptionTemplate"]}],optionLabelFormat:[{type:n.Input}]},q([w.TrackExternal(),z("design:type",w.ListModel)],Pt.prototype,"optionsModel",void 0),q([w.StoreInListModel("optionsModel"),z("design:type",Array)],Pt.prototype,"options",void 0);var Rt=function(t){function e(){var e=t.call(this)||this,n=w.Dsl.disposeWith(e),o=n.chain;n.valueOf,n.before,n.when,n.after,n.observe,n.switchOn;return e.clearCommand=w.Command.create((function(){e.componentValueModel.value=null})),e.clearCommand.disableWhile(o.stringValue(e.componentValueModel).isBlank()),e}return B(e,t),e.prototype.ngOnInit=function(){},e}(bt);Rt.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 [attr.autocomplete]="autocomplete"\n [(ngModel)]="componentValueModel.value"\n [disabled]="!enabled.value"\n (keydown.enter)="notifyEnterKey()"\n (keydown.escape)="notifyEscapeKey()"\n [pectinFocusBinding]="focusContext"\n [errorStateMatcher]="errorStateMatcher"\n >\n <mat-hint *ngIf="showHint">{{hint}}</mat-hint>\n <mat-error *ngIf="hasErrors">{{firstError}}</mat-error>\n <button mat-button mat-icon-button matSuffix *ngIf="enableClear" [pectinCommand]="clearCommand">\n <aup-icon icon="mat:close"></aup-icon>\n </button>\n</mat-form-field>\n\n',styles:["button[disabled]{visibility:hidden}"]}]}],Rt.ctorParameters=function(){return[]},Rt.propDecorators={autocomplete:[{type:n.Input}],enableClearModel:[{type:n.Input}],enableClear:[{type:n.Input}]},q([w.TrackExternal({defaultValue:!1}),z("design:type",w.ValueModel)],Rt.prototype,"enableClearModel",void 0),q([w.StoreInValueModel("enableClearModel"),z("design:type",Boolean)],Rt.prototype,"enableClear",void 0);var St=function(t){function e(){var e=t.call(this)||this;return e.rows=2,e}return B(e,t),e.prototype.ngOnInit=function(){},e}(bt);St.decorators=[{type:n.Component,args:[{selector:"aup-text-input",template:'<mat-form-field appearance="standard" [floatLabel]="floatLabel">\n <mat-label *ngIf="label">{{label}}</mat-label>\n <textarea matInput\n placeholder="{{placeholder}}"\n [(ngModel)]="componentValueModel.value"\n [disabled]="!enabled.value"\n (keydown.enter)="notifyEnterKey()"\n (keydown.escape)="notifyEscapeKey()"\n [pectinFocusBinding]="focusContext"\n [errorStateMatcher]="errorStateMatcher"\n [rows]="rows"\n [cols]="cols"\n >\n </textarea>\n <mat-hint *ngIf="showHint">{{hint}}</mat-hint>\n <mat-error *ngIf="hasErrors">{{firstError}}</mat-error>\n</mat-form-field>\n\n',styles:["button[disabled]{visibility:hidden}textarea{overflow:auto}"]}]}],St.ctorParameters=function(){return[]},St.propDecorators={rows:[{type:n.Input}],cols:[{type:n.Input}]},t.IconComponent=function(){function t(){this.allowedPrefixes=P.Enum.values(t.IconPrefix).map((function(t){return t+":"})),this.iconPrefix=t.IconPrefix}return Object.defineProperty(t.prototype,"icon",{get:function(){return this._icon},set:function(t){if(this._icon=t,!t)return this.errorMessage="icon is nil",void(this.prefix=void 0);var e=t.indexOf(":");e>0&&(this.prefix=this.icon.slice(0,e),this.suffix=this.icon.slice(e+1)),this.prefix&&(this.errorMessage='Unknown icon "'+t+'"'),this.errorMessage="Unknown icon prefix, expected one of ["+this.allowedPrefixes.join(",")+'] got "'+this.prefix+':"'},enumerable:!1,configurable:!0}),t}(),t.IconComponent.decorators=[{type:n.Component,args:[{selector:"aup-icon",template:'<ng-container [ngSwitch]="prefix">\n\n <mat-icon *ngSwitchCase="iconPrefix.SVG"\n [svgIcon]="suffix"\n class="svgIcon">\n </mat-icon>\n\n <mat-icon *ngSwitchCase="iconPrefix.MATERIAL">\n {{suffix}}\n </mat-icon>\n\n <div *ngSwitchCase="iconPrefix.FONT_AWESOME"\n class="faIconWrapper">\n <fa-icon [icon]="suffix">\n </fa-icon>\n </div>\n\n <mat-icon *ngSwitchDefault\n [matTooltip]="errorMessage">\n bug_report\n </mat-icon>\n\n</ng-container>\n\n',styles:[":host{display:inline-flex;width:24px}fa-icon{vertical-align:middle}.faIconWrapper{text-align:center}.faIconWrapper,.svgIcon{height:24px;width:24px}:host(.mat-chip-remove) mat-icon{font-size:18px}mat-icon{height:inherit;width:inherit}"]}]}],t.IconComponent.propDecorators={icon:[{type:n.Input}]},(t.IconComponent||(t.IconComponent={})).IconPrefix=P.Enum({SVG:"svg",FONT_AWESOME:"fa",MATERIAL:"mat"});var At=function(){};At.decorators=[{type:n.Component,args:[{selector:"aup-noop",template:"",styles:[":host{display:block}"]}]}],At.ctorParameters=function(){return[]};var Ot=function(){function t(){}return t.prototype.ngOnInit=function(){},t}();Ot.decorators=[{type:n.Component,args:[{selector:"aup-scroll-container",template:'<div class="container" cdkScrollable>\n <ng-content></ng-content>\n</div>\n',styles:[":host{flex-direction:column;min-height:0}.container,:host{align-items:stretch;display:flex}.container{flex:1;flex-basis:0;flex-direction:column;overflow-y:scroll}"]}]}],Ot.ctorParameters=function(){return[]};var Tt=function(){function t(){this.underline=!1}return t.prototype.ngOnInit=function(){},t}();Tt.decorators=[{type:n.Component,args:[{selector:"aup-section-header",template:"<ng-content></ng-content>\n",styles:[":host{--def-border-bottom-color:var(--border-bottom-color,rgba(0,0,0,0.07));color:rgba(0,0,0,.5);display:block;font-size:12px;line-height:12px;padding:8px 16px}:host.underline{border-bottom:1px solid var(--def-border-bottom-color)}"]}]}],Tt.ctorParameters=function(){return[]},Tt.propDecorators={underline:[{type:n.Input},{type:n.HostBinding,args:["class.underline"]}]};var Dt=function(){function t(t){this.templateRef=t}return Object.defineProperty(t.prototype,"name",{get:function(){return this.constructor.name},enumerable:!1,configurable:!0}),t}(),Et=function(t){function e(e){var n=t.call(this,e)||this;return n.isDefault=!1,n}return B(e,t),e.prototype.matches=function(t){return this.aupSwitchCaseWhen===t},e}(Dt);Et.decorators=[{type:n.Directive,args:[{selector:"[aupSwitchCaseWhen]",providers:[{provide:Dt,useExisting:Et}]}]}],Et.ctorParameters=function(){return[{type:n.TemplateRef}]},Et.propDecorators={aupSwitchCaseWhen:[{type:n.Input}]};var Ft=function(t){function e(e){var n=t.call(this,e)||this;return n.isDefault=!0,n}return B(e,t),e.prototype.matches=function(t){return!1},e}(Dt);Ft.decorators=[{type:n.Directive,args:[{selector:"[aupSwitchCaseDefault]",providers:[{provide:Dt,useExisting:Ft}]}]}],Ft.ctorParameters=function(){return[{type:n.TemplateRef}]};var kt=function(t){function e(e){var n=t.call(this)||this;return n.cdr=e,n.selectedIndex=0,n}return B(e,t),e.prototype.ngOnInit=function(){},e.prototype.ngAfterContentInit=function(){var t=this,e=this.switchCaseOptions.changes.subscribe((function(e){return t.updateSelection()}));this.onDispose((function(){return e.unsubscribe()}));var n=w.Dsl.disposeWith(this);n.chain;(0,n.when)(this.switchModel).changes((function(){return t.updateSelection()}),{initialValue:"triggerChange"}),this.cdr.detectChanges()},e.prototype.updateSelection=function(){var t=this,e=[];this.switchCaseOptions.forEach((function(n,o){n.matches(t.switchModel.value)&&e.push(o)})),e.length>1&&console.warn("found "+e.length+" matching case values, displaying the first."),0===e.length&&(this.switchCaseOptions.forEach((function(t,n){t.isDefault&&e.push(n)})),e.length>1&&console.warn("found "+e.length+" default case values, displaying the first.")),e.length>0?this.selectedIndex=e[0]:(console.warn("found no matching or default case values."),this.selectedIndex=-1)},e}(Y);kt.decorators=[{type:n.Component,args:[{selector:"aup-switch-case",template:'<mat-tab-group class="content-wrapper" no-tab-header full-height-tabs [selectedIndex]="selectedIndex">\n <mat-tab *ngFor="let option of switchCaseOptions">\n <ng-template [ngTemplateOutlet]="option.templateRef"></ng-template>\n </mat-tab>\n</mat-tab-group>\n\n\n',styles:[":host{align-items:stretch;display:flex;flex-direction:column}mat-tab-group{flex:1}"]}]}],kt.ctorParameters=function(){return[{type:n.ChangeDetectorRef}]},kt.propDecorators={switchModel:[{type:n.Input}],switch:[{type:n.Input}],switchCaseOptions:[{type:n.ContentChildren,args:[Dt]}]},q([w.TrackExternal(),z("design:type",w.ValueModel)],kt.prototype,"switchModel",void 0),q([w.StoreInValueModel("switchModel"),z("design:type",Object)],kt.prototype,"switch",void 0);var _t=Symbol("aup-cell-header-renderer-component-ref"),Lt=Symbol("aup-cell-renderer-component-ref"),Nt=Symbol("aup-cell-editor-component-ref"),Vt=Symbol("aup-cell-renderer-portal-component"),Ht=Symbol("aup-cell-editor-portal-component"),jt=function(){},Ut=function(t){function e(e,n){var o=t.call(this)||this;return o.componentType=e,o.initialiseHeader=n,o}return B(e,t),e.prototype.initialiseHost=function(t,e){R.assert.isTruthy(t),t[_t]=new l.ComponentPortal(this.componentType)},e.prototype.onPortalAttached=function(t,e){this.initialiseHeader(e,t.column)},e}(jt),Bt=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return B(e,t),e}(jt),qt=function(t){function e(e,n){var o=t.call(this)||this;return o.componentType=e,o.updateComponent=n,o}return B(e,t),e.prototype.initialiseHost=function(t,e){t[Lt]=new l.ComponentPortal(this.componentType)},e.prototype.onPortalAttached=function(t,e){t[Vt]=e,this.updateComponent(e,t.getRowData(),!0)},e.prototype.pushState=function(t){t[Vt]&&this.updateComponent(t[Vt],t.getRowData(),!1)},e}(Bt),zt=function(t){function e(e,n){var o=t.call(this)||this;return o.componentType=e,o.initialiseEditorSession=n,o}return B(e,t),e.prototype.initialiseHost=function(t,e){R.assert.isTruthy(t),t[Nt]=new l.ComponentPortal(this.componentType)},e.prototype.onPortalAttached=function(t,e){t[Ht]=e,this.initialiseEditorSession(e,t.editSession)},e}(jt),Gt=function(t){function e(){return t.call(this)||this}return B(e,t),e.prototype.registerPortal=function(t,e,n,o){this.templateRef=t,this.viewContainer=e,this.fillCell=n,this.padChild=o},e.prototype.initialiseHost=function(t,e){R.assert.isTruthy(t)},e.prototype.onPortalAttached=function(t,e){},e.prototype.pushState=function(t){t[Lt]=this.createPortal(t.getRowData()),t.fillCell=this.fillCell,t.padChild=this.padChild},e.prototype.createPortal=function(t){return new l.TemplatePortal(this.templateRef,this.viewContainer,Object.assign(Object.assign({},t),{$implicit:t.row}))},e}(Bt),Wt=function(){function t(){}return Object.defineProperty(t.prototype,"value",{get:function(){return this._value},set:function(t){this._value=t},enumerable:!1,configurable:!0}),t}();Wt.decorators=[{type:n.Component,args:[{selector:"aup-default-cell-renderer",template:"{{value}}\n",styles:[""]}]}],Wt.ctorParameters=function(){return[]},Wt.propDecorators={value:[{type:n.Input}]};var Kt=function(){};Kt.decorators=[{type:n.Component,args:[{selector:"aup-default-header-renderer",template:"{{headerText}}\n",styles:[""]}]}],Kt.ctorParameters=function(){return[]},Kt.propDecorators={headerText:[{type:n.Input}]};var Xt=function(t){function e(){var e=t.call(this)||this;return e.saveCommand=w.Command.create((function(){e.editSession.saveCommand.execute(e.editSession.form).then((function(t){t&&e.editSession.dispose()}))})),e.cancelCommand=w.Command.create((function(){e.editSession.dispose()})),e}return B(e,t),e.prototype.ngOnInit=function(){},Object.defineProperty(e.prototype,"form",{get:function(){var t;return null===(t=this.editSession)||void 0===t?void 0:t.form},enumerable:!1,configurable:!0}),e}(Y);Xt.decorators=[{type:n.Component,args:[{selector:"aup-row-editor-controls",template:'<button *ngIf="!editSession" mat-icon-button [pectinCommand]="editRowCommand" class="edit-button"><aup-icon icon="mat:edit"></aup-icon></button>\n<button *ngIf="editSession" mat-icon-button [pectinCommand]="saveCommand"><aup-icon icon="mat:done"></aup-icon></button>\n<button *ngIf="editSession" mat-icon-button [pectinCommand]="cancelCommand"><aup-icon icon="mat:clear"></aup-icon></button>\n',styles:[":host{display:block;width:80px}.edit-button{visibility:hidden}:host-context(tr:hover) .edit-button{visibility:visible}"]}]}],Xt.ctorParameters=function(){return[]},Xt.propDecorators={row:[{type:n.Input}],editRowCommand:[{type:n.Input}],editSession:[{type:n.Input}]},q([w.TrackExternal(),z("design:type",w.Command)],Xt.prototype,"editRowCommand",void 0);var $t=function(t){function e(){var e=t.call(this)||this;return e.selectCommand=w.Command.create((function(){e.selectionModel.selectCommand.execute(e.row)})),e}return B(e,t),e.prototype.isSelected=function(){return this.selectionModel.isSelected(this.row)},e}(Y);$t.decorators=[{type:n.Component,args:[{selector:"aup-select-cell-renderer",template:'<mat-checkbox [pectinCommand]="selectCommand" [checked]="isSelected()"></mat-checkbox>\n',styles:[""]}]}],$t.ctorParameters=function(){return[]},$t.propDecorators={row:[{type:n.Input}]};var Yt=function(t){function e(){var e=t.call(this)||this;return e.selectCommand=w.Command.create((function(){e.selectionModel.toggleAllCommand.execute()})),e}return B(e,t),e.prototype.isSelected=function(){var t;return(null===(t=this.selectionModel)||void 0===t?void 0:t.allSelected.value)||!1},e.prototype.isIntermediate=function(){var t;return(null===(t=this.selectionModel)||void 0===t?void 0:t.someSelected.value)||!1},e}(Y);Yt.decorators=[{type:n.Component,args:[{selector:"aup-select-header-cell-renderer",template:'<mat-checkbox *ngIf="enableHeaderControls" [pectinCommand]="selectCommand" [checked]="isSelected()" [indeterminate]="this.isIntermediate()"></mat-checkbox>\n',styles:[""]}]}],Yt.ctorParameters=function(){return[]};var Jt=function(){},Zt=Symbol("aup-cell-renderer:row-data-cache"),Qt=function(){function t(t,e){this.columnId=t,this.textPropertiesProvider=e,this._selectRowOnClick=void 0,this._flex=!1,this.installHeaderRenderer()}return t.prototype.installHeaderRenderer=function(){this.cellHeaderRenderer(Kt,(function(t,e){t.headerText=e.getHeaderText()}))},t.prototype.getHeaderText=function(){var t;return(null===(t=this.getColumnTextProperties())||void 0===t?void 0:t.headerText())||this.getDefaultHeaderText()},t.prototype.getDefaultHeaderText=function(){return this.columnId},t.prototype.getColumnTextProperties=function(){return this._columnTextProperties||this.textPropertiesProvider()},t.prototype.textProperties=function(t){return this._columnTextProperties=t,this},t.prototype.configureHeaderRenderer=function(t){this._columnHeaderPortalRef=t},t.prototype.configureCellRenderer=function(t){this._cellRendererPortalRef=t},t.prototype.configureCellEditor=function(t){this._cellEditorPortalRef=t},t.prototype.cellHeaderRenderer=function(t,e){return this.configureHeaderRenderer(new Ut(t,e)),this},t.prototype.flex=function(t){void 0===t&&(t=!0),this._flex=t},t.prototype.isFlex=function(){return this._flex},t.prototype.hasEditorPortal=function(){return!!this._cellEditorPortalRef},t.prototype.attachHeaderCell=function(t){this._columnHeaderPortalRef.initialiseHost(t,this)},t.prototype.attachCell=function(t){this._cellRendererPortalRef.initialiseHost(t,this),this.hasEditorPortal()&&this._cellEditorPortalRef.initialiseHost(t,this)},t.prototype.onHeaderAttached=function(t,e){this._columnHeaderPortalRef.onPortalAttached(t,e)},t.prototype.onRendererAttached=function(t,e){this._cellRendererPortalRef.onPortalAttached(t,e)},t.prototype.onEditorAttached=function(t,e){this._cellEditorPortalRef.onPortalAttached(t,e)},t.prototype.updatePortalContent=function(t){this._cellRendererPortalRef.pushState(t)},t.prototype.selectRowOnClick=function(t){return this._selectRowOnClick=t,this},t.prototype.isRowSelectionEnabled=function(){return this._selectRowOnClick},t.prototype.isRowSelectionExplicitlyEnabled=function(){return!0===this._selectRowOnClick},t.prototype.isRowSelectionExplicitlyDisabled=function(){return!1===this._selectRowOnClick},t}();q([x.Memoize(),z("design:type",Function),z("design:paramtypes",[]),z("design:returntype",String)],Qt.prototype,"getHeaderText",null),q([x.Memoize(),z("design:type",Function),z("design:paramtypes",[]),z("design:returntype",Object)],Qt.prototype,"getColumnTextProperties",null);var te=function(t){function e(e,n,o){var i=t.call(this,e,o)||this;return i.property=n,i._format=function(t){return t},i.cellRenderer(Wt),i}return B(e,t),e.prototype.cellRenderer=function(t,e){var n=this;return this.configureCellRenderer(new qt(t,(function(t,o,i){i&&(V.default.isFunction(e)?e(t):V.default.isFunction(null==e?void 0:e.onComponentInit)&&e.onComponentInit(t)),t.value=n._format(o.row[n.property]),!V.default.isFunction(e)&&V.default.isFunction(null==e?void 0:e.onRowUpdate)&&e.onRowUpdate(t,o.row)}))),this},e.prototype.liveEditCellRenderer=function(t,e){return this.mutableCellRenderer(t,e)},e.prototype.mutableCellRenderer=function(t,e){var n=this;return this.configureCellRenderer(new qt(t,(function(t,o,i){t[Zt]=o.row;var r=!1;i&&(V.default.isFunction(null==e?void 0:e.onComponentInit)&&e.onComponentInit(t),t.onValueEdited((function(n,o){r||e.onValueEdit(t[Zt],n,o)}))),r=!0,t.value=o.row[n.property],r=!1,!V.default.isFunction(e)&&V.default.isFunction(null==e?void 0:e.onRowUpdate)&&e.onRowUpdate(t,o.row)}))),this},e.prototype.cellEditor=function(t,e,n){var o=this,i=Array.isArray(e)?e:void 0,r=V.default.isFunction(e)?e:n;return this.configureCellEditor(new zt(t,(function(t,e){var n=e.form.pluck(o.property);i&&n.validateUsing(i),t.valueModel=n,r&&r(t)}))),this},e.prototype.format=function(t){return R.assert.isFunction(t),this._format=t,this},e.prototype.selectRowOnClick=function(e){return t.prototype.selectRowOnClick.call(this,e)},e}(Qt),ee=function(t){function e(e,n,o){var i=t.call(this,e,o)||this;return i.property=n,i._format=function(t){return t.map((function(t){return null==t?void 0:t.toString()})).join(", ")},i.cellRenderer(Wt),i}return B(e,t),e.prototype.cellRenderer=function(t){var e=this;return this.configureCellRenderer(new qt(t,(function(t,n){t.value=e._format(n.row[e.property])}))),this},e.prototype.cellEditor=function(t,e,n){var o=this,i=Array.isArray(e)?e:void 0,r=V.default.isFunction(e)?e:n;return this.configureCellEditor(new zt(t,(function(t,e){var n=e.form.pluckList(o.property);i&&n.validateUsing(i),t.listModel=n,r&&r(t)}))),this},e.prototype.format=function(t){return R.assert.isFunction(t),this._format=t,this},e.prototype.selectRowOnClick=function(e){return t.prototype.selectRowOnClick.call(this,e)},e}(Qt),ne=function(t){function e(e,n,o){var i=t.call(this,e,n)||this;return i.getValue=o,i.cellRenderer(Wt),i}return B(e,t),e.prototype.cellRenderer=function(t,e){var n=this;return this.configureCellRenderer(new qt(t,(function(t,o,i){i&&(V.default.isFunction(e)?e(t):V.default.isFunction(null==e?void 0:e.onComponentInit)&&e.onComponentInit(t)),t.value=n.getValue(o.row),!V.default.isFunction(e)&&V.default.isFunction(null==e?void 0:e.onRowUpdate)&&e.onRowUpdate(t,o.row)}))),this},e.prototype.selectRowOnClick=function(e){return t.prototype.selectRowOnClick.call(this,e)},e}(Qt),oe=function(t){function e(e,n,o){var i=t.call(this,e,o)||this;return i.cellRenderer(Xt),i}return B(e,t),e.prototype.cellRenderer=function(t){return this.configureCellRenderer(new qt(t,(function(t,e){t.row=e.row,t.editSession=e.editSession,t.editRowCommand=e.editRowCommand}))),this},e.prototype.getDefaultHeaderText=function(){return""},e}(Qt),ie=function(t){function e(e,n){var o=t.call(this,e,n)||this;return o.config=new Gt,o.configureCellRenderer(o.config),o}return B(e,t),e.prototype.setTemplate=function(t,e,n,o){this.config.registerPortal(t,e,n,o)},e.prototype.selectRowOnClick=function(e){return t.prototype.selectRowOnClick.call(this,e)},e}(Qt),re=function(t){function e(e,n,o){var i=t.call(this,e,n)||this;return i.selectionModel=o,i._enableHeaderControls=!0,i.selectOnRowClick(!1),o instanceof w.MultipleSelectionModel&&i.cellHeaderRenderer(Yt,(function(t){t.selectionModel=o,t.enableHeaderControls=i._enableHeaderControls})),i.configureCellRenderer(new qt($t,(function(t,e){t.row=e.row,t.selectionModel=o}))),i}return B(e,t),e.prototype.getDefaultHeaderText=function(){return""},e.prototype.isRowSelectionEnabledByDefault=function(){return this.isRowSelectionExplicitlyEnabled()},e.prototype.selectOnRowClick=function(e){return t.prototype.selectRowOnClick.call(this,e)},e.prototype.enableHeaderControls=function(t){return this._enableHeaderControls=t,this},e.prototype.selectRow=function(t){this.selectionModel.selectCommand.execute(t)},e}(Qt),ae=function(t){function e(e,n,o,i){var r=t.call(this)||this;return r.rowId=e,r.form=o,r.saveCommand=i,r._liveRowValue=new w.MutableValueModel,r.liveRowValue=r._liveRowValue.readonly,r.form.load(n),r._liveRowValue.value=n,r.form.onEdit((function(){r._liveRowValue.value=H.default(r._liveRowValue.value,(function(t){r.form.writeDirtyStateTo(t)}))})),r}return B(e,t),e}(w.GarbageCollector),se=function(t,e){this.className=t,this.matches=e};t.AbstractTableModel=function(t){function e(e){var n=t.call(this)||this;n.sourceOfTruth=e,n._columns=new w.MutableListModel,n._editorSessions=new w.MutableListModel,n.rowClassNamePredicates=[],n.rowClickListeners=new w.EventListenerList,n._createForm=function(t){return new w.DirtyTrackingForm},n.trackBy=function(t,e){return n.identityOf?n.identityOf(e):t},n.identityOf=e.identityOf;var o=w.Dsl.disposeWith(n),i=o.chain;o.valueOf,o.before,o.when,o.after,o.observe,o.switchOn;return n._columnsById=i(n._columns).indexBy("columnId"),n._rowsBeingEdited=new w.MutableListModel([],{identifiedWith:n.identityOf}),n._editorSessionByRowId=i(n._editorSessions).indexBy("rowId"),n.editing=i(n._editorSessions).count().isGreaterThan(0),n.dataSource=i(n.sourceOfTruth).replaceAll(n.rowsBeingEdited),n.firstEditableColumn=i(n.columns).select((function(t){return t.hasEditorPortal()})).first(),n.hasColumnsWithRowSelectionExplicitlyEnabled=i(n._columns).findIndex((function(t){return t.isRowSelectionExplicitlyEnabled()})).isGreaterThanOrEqualTo(0),n}return B(e,t),Object.defineProperty(e.prototype,"rowsBeingEdited",{get:function(){return this._rowsBeingEdited.readonly},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"columns",{get:function(){return this._columns.readonly},enumerable:!1,configurable:!0}),e.prototype.pluck=function(t,e){var n=this,o=(null==e?void 0:e.columnId)||t.toString();return this.addColumn(new te(o,t,(function(){return n.getColumnTextProperties(o)})))},e.prototype.pluckList=function(t,e){var n=this,o=(null==e?void 0:e.columnId)||t.toString();return this.addColumn(new ee(o,t,(function(){return n.getColumnTextProperties(o)})))},e.prototype._addSelectionColumn=function(t){var e=this;w.assert.isNil(this.selectionColumnModel);var n="selection-column";return this.selectionColumnModel=new re(n,(function(){return e.getColumnTextProperties(n)}),t),this.addRowClass("aup-row-selected",(function(e){return t.isSelected(e)})),this.addColumn(this.selectionColumnModel)},e.prototype.addEditControls=function(t){var e=this;this.saveCommand=t;var n="editControls";return this.addColumn(new oe(n,t,(function(){return e.getColumnTextProperties(n)})))},e.prototype.addCustomColumn=function(t,e){var n=this;return this.addColumn(new ne(t,(function(){return n.getColumnTextProperties(t)}),e))},e.prototype.addComponentColumn=function(t,e,n){var o=this;return this.addColumn(new ne(t,(function(){return o.getColumnTextProperties(t)}),(function(t){return t}))).cellRenderer(e,n)},e.prototype.addTemplateColumn=function(t){var e=this;return this.addColumn(new ie(t,(function(){return e.getColumnTextProperties(t)})))},e.prototype.addRowClass=function(t,e){this.rowClassNamePredicates.push(new se(t,e))},e.prototype.getRowClasses=function(t){var e=[];return this.rowClassNamePredicates.forEach((function(n){n.matches(t)&&e.push(n.className)})),e},e.prototype.useFormFactory=function(t){return this._createForm=t,this},e.prototype.addColumn=function(t){return this._columnsById.get(t.columnId)?w.lang.illegalState("Column with id="+t.columnId+" already exists"):this._columns.push(t),t},Object.defineProperty(e.prototype,"selectionModel",{get:function(){var t;return null===(t=this.selectionColumnModel)||void 0===t?void 0:t.selectionModel},enumerable:!1,configurable:!0}),e.prototype.columnTextProperties=function(t){this._columnTextPropertiesLookup=t},e.prototype.getColumnTextProperties=function(t){return this._columnTextPropertiesLookup?this._columnTextPropertiesLookup[t]:void 0},e.prototype.startEditSession=function(t){var e=this,n=this.identityOf(t);if(this._rowsBeingEdited.query().indexOf(t)>-1)return w.lang.illegalState("Row with id="+n+" already being edited");var o=new ae(n,t,this._createForm(t),this.saveCommand);return(0,w.Dsl.disposeWith(o).when)(o.liveRowValue).changes((function(t){e._rowsBeingEdited.replaceOrPush(t)}),{initialValue:"triggerChangeUnlessNil"}),this._editorSessions.push(o),o.onDispose((function(){e._rowsBeingEdited.remove(o.liveRowValue.value),e._editorSessions.remove(o)})),o},e.prototype.getEditSessionFor=function(t){return this._editorSessionByRowId.get(this.identityOf(t))},e.prototype.cancelAllEditorSessions=function(){var t=this;this._editorSessions.runInTransaction((function(e){t._rowsBeingEdited.runInTransaction((function(){e.value.forEach((function(t){return t.dispose()}))}))}))},e.prototype.isRowSelectionEnabledFor=function(t){var e;return this.selectionColumnModel&&(null!==(e=t.isRowSelectionEnabled())&&void 0!==e?e:this.isRowSelectionEnabledByDefault())},e.prototype.isRowSelectionEnabledByDefault=function(){return this.selectionColumnModel&&this.selectionColumnModel.isRowSelectionEnabledByDefault()},e.prototype.isRowSelectionEnabled=function(){return this.hasColumnsWithRowSelectionExplicitlyEnabled.value||this.isRowSelectionEnabledByDefault()},e.prototype.isHoverEnabled=function(){return this.isRowSelectionEnabled()||this.rowClickListeners.listenerCount>0},e.prototype.isCursorEnabled=function(t){return this.isRowSelectionEnabledFor(t)||this.rowClickListeners.listenerCount>0},e.prototype.selectRow=function(t){var e;null===(e=this.selectionColumnModel)||void 0===e||e.selectRow(t)},e.prototype.onRowClicked=function(t){return this.rowClickListeners.add(t)},e.prototype._notifyCellClicked=function(t,e){this.isRowSelectionEnabledFor(t)&&this.selectRow(e),this.rowClickListeners.fire((function(t){return t(e)}))},e}(w.GarbageCollector),t.AbstractTableModel=q([w.TrackExternal.Strategy(new w.TrackExternal.OneTimeBinding),z("design:paramtypes",[w.ListModel])],t.AbstractTableModel);var ce=function(t){function e(){return t.call(this)||this}return B(e,t),e.prototype.ngOnInit=function(){var t=w.Dsl.disposeWith(this),e=t.chain;t.valueOf,t.before,t.when,t.after,t.observe,t.switchOn;this.columns=e(this.tableModel.columns),this.columnIds=e(this.columns).pluck("columnId"),this.columnsById=e(this.columns).indexBy("columnId")},e.prototype.isEditing=function(t){return!!this.tableModel.getEditSessionFor(t)},e.prototype.registerColumnTemplate=function(t,e,n,o,i){var r=this.columnsById.get(t);r instanceof ie&&r.setTemplate(e,n,o,i)},e.prototype.notifyCellClicked=function(t,e){this.tableModel._notifyCellClicked(t,e)},e}(Y);ce.decorators=[{type:n.Component,args:[{selector:"aup-table",template:'<table mat-table [dataSource]="tableModel.dataSource.value" [trackBy]="tableModel.trackBy">\n\n <ng-container *ngFor="let column of columns.value; index as index; first as first; last as last"\n matColumnDef="{{column.columnId}}">\n <th mat-header-cell *matHeaderCellDef [class.flex]="column.isFlex()">\n <aup-table-header-cell-renderer [column]="column"\n [attr.column-index]="index"\n [attr.column-id]="column.columnId"\n [class.first-column]="first"\n [class.last-column]="last"\n ></aup-table-header-cell-renderer>\n </th>\n <td mat-cell *matCellDef="let row" (click)="notifyCellClicked(column, row)"\n [class.enable-cursor]="tableModel.isCursorEnabled(column)"\n [class.flex]="column.isFlex()"\n >\n <aup-table-cell-renderer [column]="column"\n [row]="row"\n [tableModel]="tableModel"\n [editSession]="tableModel.getEditSessionFor(row)"\n [attr.column-index]="index"\n [attr.column-id]="column.columnId"\n [class.first-column]="first"\n [class.last-column]="last"\n ></aup-table-cell-renderer>\n </td>\n </ng-container>\n\n <tr mat-header-row *matHeaderRowDef="columnIds.value"></tr>\n <tr mat-row *matRowDef="let row; columns: columnIds.value; let i = index"\n [ngClass]="tableModel.getRowClasses(row)" [class.enable-hover]="tableModel.isHoverEnabled()"\n [attr.trackBy]="tableModel.trackBy(i, row)"\n ></tr>\n\n</table>\n',styles:[":host{align-items:stretch;display:flex;flex-direction:column}:host table{flex:1;width:100%}"]}]}],ce.ctorParameters=function(){return[]},ce.propDecorators={tableModel:[{type:n.Input}]},q([w.TrackExternal(),z("design:type",t.AbstractTableModel)],ce.prototype,"tableModel",void 0);var le=function(){function t(t,e,n){this.host=t,this.templateRef=e,this.viewContainer=n,this.aupColumnTemplateFillCell=!1,this.aupColumnTemplateAutoPadChild=void 0}return t.prototype.ngOnInit=function(){var t;w.assert.isTruthy(this.aupColumnTemplateColumnId),this.host.registerColumnTemplate(this.aupColumnTemplateColumnId,this.templateRef,this.viewContainer,this.aupColumnTemplateFillCell,null!==(t=this.aupColumnTemplateAutoPadChild)&&void 0!==t?t:this.aupColumnTemplateFillCell)},t}();le.decorators=[{type:n.Directive,args:[{selector:"[aupColumnTemplate]"}]}],le.ctorParameters=function(){return[{type:ce},{type:n.TemplateRef},{type:n.ViewContainerRef}]},le.propDecorators={aupColumnTemplate:[{type:n.Input}],aupColumnTemplateColumnId:[{type:n.Input}],aupColumnTemplateFillCell:[{type:n.Input}],aupColumnTemplateAutoPadChild:[{type:n.Input}]};var ue=function(t){function e(){var e=t.call(this)||this;return e.defaultClassNames="aup-cell-renderer",e.fillCell=!1,e.padChild=!1,e.editRowCommand=w.Command.create((function(){e.tableModel.startEditSession(e.row)})),e}return B(e,t),e.prototype.ngOnInit=function(){var t=w.Dsl.disposeWith(this),e=t.chain;t.valueOf,t.before,t.when,t.after,t.observe,t.switchOn;this.firstEditableColumn=e(this.tableModel.firstEditableColumn).equals(this.column),this.column.attachCell(this)},e.prototype.hasActiveEditor=function(){return!!this.editSession&&!!this.column.hasEditorPortal()},e.prototype.initialiseRenderer=function(t){this.column.onRendererAttached(this,t)},e.prototype.initialiseEditor=function(t){var e=this;this.column.onEditorAttached(this,t),this.firstEditableColumn.value&&setTimeout((function(){return e.tryAndFocusEditor(t)}))},e.prototype.tryAndFocusEditor=function(t){var e;if(t.requestFocus)t.requestFocus();else{var n=t.valueModel||t.listModel;null===(e=null==n?void 0:n.focusContext)||void 0===e||e.requestFocus()}},e.prototype.ngOnChanges=function(t){this.column.updatePortalContent(this)},e.prototype.getRendererPortal=function(){return this[Lt]},e.prototype.getEditorPortal=function(){return this[Nt]},e.prototype.getRowData=function(){return{row:this.row,editSession:this.editSession,editRowCommand:this.editRowCommand}},e}(Y);ue.decorators=[{type:n.Component,args:[{selector:"aup-table-cell-renderer",template:'<ng-container *ngIf="!hasActiveEditor()" [cdkPortalOutlet]="getRendererPortal()" (attached)="initialiseRenderer($event.instance)"></ng-container>\n<ng-container *ngIf="hasActiveEditor()" [cdkPortalOutlet]="getEditorPortal()" (attached)="initialiseEditor($event.instance)"></ng-container>\n',styles:[""]}]}],ue.ctorParameters=function(){return[]},ue.propDecorators={row:[{type:n.Input}],column:[{type:n.Input}],editSession:[{type:n.Input}],tableModel:[{type:n.Input}],defaultClassNames:[{type:n.HostBinding,args:["class"]}],fillCell:[{type:n.HostBinding,args:["class.fillCell"]}],padChild:[{type:n.HostBinding,args:["class.padChild"]}]};var pe=function(){function t(){this.defaultClassNames="aup-header-cell-renderer"}return t.prototype.ngOnInit=function(){this.column.attachHeaderCell(this)},t.prototype.initialiseHeader=function(t){this.column.onHeaderAttached(this,t)},t.prototype.getPortal=function(){return this[_t]},t}();pe.decorators=[{type:n.Component,args:[{selector:"aup-table-header-cell-renderer",template:'<ng-container [cdkPortalOutlet]="getPortal()" (attached)="initialiseHeader($event.instance)"></ng-container>\n',styles:[":host{align-items:stretch;display:flex;flex-direction:column;height:100%;justify-content:center}"]}]}],pe.ctorParameters=function(){return[]},pe.propDecorators={column:[{type:n.Input}],defaultClassNames:[{type:n.HostBinding,args:["class"]}]};var de=function(t,e){this.factory=t,this.face=e},fe=function(t){function e(){var e=t.call(this)||this;return e.actions=[],e.moreActions=[],e}return B(e,t),e.prototype.registerAction=function(t,e){this.actions.push(new de(t,e))},e.prototype.registerMoreAction=function(t,e){this.moreActions.push(new de(t,e))},e.prototype.ngOnInit=function(){},e.prototype.createMoreMenuCommand=function(t,e){var n=this,o=w.Dsl.disposeWith(this).when,i=t.factory.create(e);return o(i.busy).becomesFalsey((function(){n.closeMoreMenu()})),i},e.prototype.closeMoreMenu=function(){this.menu.closeMenu()},e}(Y);fe.decorators=[{type:n.Component,args:[{selector:"aup-table-row-menu",template:'\n <aup-tool-bar>\n <aup-command *ngFor="let action of actions" [command]="action.factory.create(value)"\n [face]="action.face"></aup-command>\n </aup-tool-bar>\n <ng-container *ngIf="moreActions.length > 0">\n <aup-more-menu>\n <aup-command *ngFor="let action of moreActions" [command]="action.factory.create(value)"\n [face]="action.face"></aup-command>\n </aup-more-menu>\n </ng-container>\n ',styles:[":host {\n display: inline-flex;\n flex-direction: row;\n align-items: center;\n }"]}]}],fe.ctorParameters=function(){return[]},fe.propDecorators={value:[{type:n.Input}],menu:[{type:n.ViewChild,args:[g.MatMenuTrigger]}]};var he;t.TreeInheritanceIconComponent=function(){function t(){this.pixelWidth=24,this.pixelHeight=48}return Object.defineProperty(t.prototype,"heightOffset",{get:function(){return 60-this.pixelHeight},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"viewBox",{get:function(){return"0 "+this.heightOffset+" "+this.pixelWidth+" "+(this.pixelHeight-this.heightOffset)},enumerable:!1,configurable:!0}),t.prototype.hasHead=function(){return t.HAS_HEAD.includes(this.type)},t.prototype.hasTerminal=function(){return t.HAS_TERMINAL.includes(this.type)},t.prototype.hasLeadIn=function(){return t.HAS_LEAD_IN.includes(this.type)},t.prototype.hasTail=function(){return t.HAS_TAIL.includes(this.type)},t}(),t.TreeInheritanceIconComponent.decorators=[{type:n.Component,args:[{selector:"aup-tree-inheritance-icon",template:'<svg xmlns="http://www.w3.org/2000/svg" [attr.width]="pixelWidth" [attr.height]="pixelHeight" [attr.viewBox]="viewBox">\n <g fill="none" fill-rule="evenodd">\n <rect *ngIf="hasHead()" width="1" height="32.5" x="11.5" fill="currentColor"/>\n <rect *ngIf="hasTail()" width="1" height="32.5" x="11.5" y="31.5" fill="currentColor"/>\n\n <rect *ngIf="hasLeadIn()" width="12" height="1" y="31.5" fill="currentColor"/>\n <rect *ngIf="hasTerminal()" width="12" height="1" x="12" y="31.5" fill="currentColor"/>\n </g>\n</svg>\n',styles:[":host{color:inherit;position:relative}svg{color:var(--line-color);display:block}"]}]}],t.TreeInheritanceIconComponent.ctorParameters=function(){return[]},t.TreeInheritanceIconComponent.propDecorators={type:[{type:n.Input},{type:n.HostBinding,args:["class"]}],pixelWidth:[{type:n.Input}],pixelHeight:[{type:n.Input}]},(he=t.TreeInheritanceIconComponent||(t.TreeInheritanceIconComponent={})).Type=P.Enum({ICON_BLANK:"blank",ICON_PARENT:"parent",ICON_INHERITED_TERMINAL:"inherited_terminal",ICON_INHERITED_THROUGH_TERMINAL:"inherited_through_terminal",ICON_THROUGH:"through"}),he.HAS_LEAD_IN=[he.Type.ICON_PARENT],he.HAS_TERMINAL=[he.Type.ICON_INHERITED_TERMINAL,he.Type.ICON_INHERITED_THROUGH_TERMINAL,he.Type.ICON_PARENT],he.HAS_HEAD=[he.Type.ICON_THROUGH,he.Type.ICON_INHERITED_TERMINAL,he.Type.ICON_INHERITED_THROUGH_TERMINAL],he.HAS_TAIL=[he.Type.ICON_PARENT,he.Type.ICON_THROUGH,he.Type.ICON_INHERITED_THROUGH_TERMINAL];var me=function(e){function n(){var n=e.call(this)||this;n.iconTypes=[],n.nodeModel=new w.MutableValueModel;var o=w.Dsl.disposeWith(n).chain;return n.iconList=o(n.nodeModel).mapToList((function(e){var n=e.ancestors().slice(1).map((function(e){return e.isLastChild()?t.TreeInheritanceIconComponent.Type.ICON_BLANK:t.TreeInheritanceIconComponent.Type.ICON_THROUGH}));return e.isRoot()||n.push(e.isLastChild()?t.TreeInheritanceIconComponent.Type.ICON_INHERITED_TERMINAL:t.TreeInheritanceIconComponent.Type.ICON_INHERITED_THROUGH_TERMINAL),n})),n}return B(n,e),n.prototype.ngOnInit=function(){var t=this,e=w.Dsl.disposeWith(this).chain;this.canExpand=e(this.nodeModel).map((function(e){return e.hasChildren()&&t.expansionModel.isCollapsed(e)}),{dependsOn:this.expansionModel.isExpandedPredicate}),this.canCollapse=e(this.nodeModel).map((function(e){return e.hasChildren()&&!t.expansionModel.isCollapsed(e)}),{dependsOn:this.expansionModel.isExpandedPredicate}),this.iconModel=e(this.nodeModel).map((function(e){return t.node.isLeaf()?void 0:t.iconFactory(e,t.expansionModel.isExpanded(t.node))}),{dependsOn:this.expansionModel.isExpandedPredicate})},Object.defineProperty(n.prototype,"isRoot",{get:function(){return this.node.isRoot()},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"isLeaf",{get:function(){return this.node.isLeaf()},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"node",{get:function(){return this.nodeModel.value},enumerable:!1,configurable:!0}),n.prototype.expandOrCollapse=function(t){this.expansionModel.isCollapsed(t)?this.expansionModel.expand(t):this.expansionModel.collapse(t)},n}(Y);me.decorators=[{type:n.Component,args:[{selector:"aup-tree-label-cell-renderer",template:'<div class="tree-icons">\n <aup-tree-inheritance-icon *ngFor="let iconClass of iconList.value" [type]="iconClass"></aup-tree-inheritance-icon>\n <aup-icon *ngIf="iconModel.value"\n [icon]="iconModel.value"\n [class.clickable]="canExpand.value || canCollapse.value"\n (click)="expandOrCollapse(node)" ></aup-icon>\n</div>\n<div class="label">{{label}}</div>\n',styles:[":host{--line-color:#ddd;--node-color:#999;align-items:stretch;display:inline-flex;flex-direction:row}:host div.label{align-items:center;display:flex;flex-direction:row;padding-left:6px;white-space:nowrap}:host div.tree-icons{-ms-grid-rows:1fr;align-items:stretch;display:-ms-grid;display:grid;grid-auto-columns:auto;grid-auto-flow:column;grid-template-rows:1fr;justify-content:stretch}:host div.tree-icons aup-icon{-ms-grid-row-align:center;align-self:center;color:var(--node-color)}:host div.tree-icons aup-icon.clickable{cursor:pointer}:host div.tree-icons aup-icon,:host div.tree-icons aup-tree-inheritance-icon{margin-left:4px}"]}]}],me.ctorParameters=function(){return[]},me.propDecorators={value:[{type:n.Input}],label:[{type:n.Input}],iconFactory:[{type:n.Input}],expansionModel:[{type:n.Input}],isRoot:[{type:n.HostBinding,args:["class.root"]}],isLeaf:[{type:n.HostBinding,args:["class.leaf"]}]},q([w.StoreInValueModel("nodeModel"),z("design:type",Object)],me.prototype,"value",void 0);var ge,ye,ve=function(){function t(t){this.identityOf=t,this.collapsedIds=new Set,this._isExpandedPredicate=new w.MutableValueModel((function(){return!0})),this.updatePredicate()}return Object.defineProperty(t.prototype,"isExpandedPredicate",{get:function(){return this._isExpandedPredicate.readonly},enumerable:!1,configurable:!0}),t.prototype.expand=function(t){this.isCollapsed(t)&&(this.collapsedIds.delete(this.identityOf(t.node)),this.updatePredicate())},t.prototype.collapse=function(t){this.isCollapsed(t)||(this.collapsedIds.add(this.identityOf(t.node)),this.updatePredicate())},t.prototype.canExpand=function(t){return t.hasChildren()&&this.isCollapsed(t)},t.prototype.canCollapse=function(t){return t.hasChildren()&&!this.isCollapsed(t)},t.prototype.isCollapsed=function(t){return this.collapsedIds.has(this.identityOf(t.node))},t.prototype.isExpanded=function(t){return!this.isCollapsed(t)},t.prototype.ensureAncestorsAndSelfVisible=function(t){var e=this;t.ancestors().map((function(n){return e.identityOf(t.node)})).forEach((function(t){return e.collapsedIds.delete(t)})),this.updatePredicate()},t.prototype.updatePredicate=function(){var t=this;this._isExpandedPredicate.value=function(e){return!t.collapsedIds.has(t.identityOf(e.node))}},t}(),be=function(t){function e(e,n,o){var i=t.call(this,e,n)||this;return i.expansionModel=o,i.iconFactory=function(t,e){return e?"mat:folder_open":"mat:folder"},i.cellRenderer(me),i}return B(e,t),e.prototype.pluck=function(t){this.labelProperty=t},e.prototype.addIcon=function(t){this.iconFactory=t},e.prototype.cellRenderer=function(t){var e=this;return this.configureCellRenderer(new qt(t,(function(t,n,o){o&&(t.expansionModel=e.expansionModel),t.value=n.row,t.label=V.default.isNil(e.labelProperty)?void 0:n.row[e.labelProperty],t.iconFactory=e.iconFactory}))),this},e.prototype.selectRowOnClick=function(e){return t.prototype.selectRowOnClick.call(this,e)},e}(Qt);t.SelfAndDescendantsVisitor=function(){function t(){}return t.prototype.visit=function(t){this.onVisit(t),this.shouldVisitChildrenOf(t)&&t.visitChildren(this)},t.prototype.shouldVisitChildrenOf=function(t){return!0},t}(),ge=t.SelfAndDescendantsVisitor||(t.SelfAndDescendantsVisitor={}),ye=function(t){function e(e){var n=t.call(this)||this;return n.callback=e,n}return B(e,t),e.prototype.onVisit=function(t){this.callback(t)},e}(ge),ge.Each=ye;var Ce=function(){function e(t,e){this.parent=t,this.node=e}return Object.defineProperty(e.prototype,"decoratedSelf",{get:function(){var e=this;return this.memoize("decoratedSelf",(function(){return e.parent?e.parent.children.find((function(t){return t.node===e.node})):t.DecoratedTreeNode.createRoot(e.node)}))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"children",{get:function(){var t=this;return this.memoize("children",(function(){return t.node.children?t.node.children.map((function(n){return R.Mixin.createProxy(n,new e(t.decoratedSelf,n))})):[]}))},enumerable:!1,configurable:!0}),e.prototype.descendants=function(){var t=this;return this.memoize("descendants",(function(){var e=[];return t.visitDescendants((function(t){return e.push(t)})),e}))},e.prototype.selfAndDescendants=function(){var t=this;return this.memoize("selfAndDescendants",(function(){var e=[];return t.visitSelfAndDescendants((function(t){return e.push(t)})),e}))},e.prototype.siblingsBefore=function(){var t=this;return this.memoize("siblingsBefore",(function(){return t.parent?t.parent.children.slice(0,t.myIndex()):[]}))},e.prototype.siblingsAfter=function(){var t=this;return this.memoize("siblingsAfter",(function(){return t.parent?t.parent.children.slice(1+t.myIndex()):[]}))},e.prototype.siblings=function(){var t=this;return this.memoize("siblings",(function(){return[].concat(t.siblingsBefore(),t.siblingsAfter())}))},e.prototype.isFirstChild=function(){var t=this;return this.memoize("isFirstChild",(function(){return!!t.parent&&0===t.myIndex()}))},e.prototype.myIndex=function(){var t=this;return this.memoize("myIndex",(function(){var e=t.parent.children.findIndex((function(e){return e.node===t.node}));return w.assert.isTruthy(e>=0,"illegal state, expected index to be >= 0"),e}))},e.prototype.isLastChild=function(){var t=this;return this.memoize("isLastChild",(function(){return!!t.parent&&t.myIndex()===t.parent.children.length-1}))},e.prototype.hasSiblings=function(){return!!this.parent&&this.node.children.length>1},e.prototype.find=function(t){return M.find(this.descendants(),t)},e.prototype.select=function(t){return M.filter(this.descendants(),t)},e.prototype.flattenInto=function(t){return this.visitSelfAndDescendants((function(e){return t.push(e)})),t},e.prototype.ancestors=function(){var t=this;return this.memoize("ancestors",(function(){return t.parent?t.parent.ancestors().concat([t.parent]):[]}))},e.prototype.ancestorsAndSelf=function(){var t=this;return this.memoize("ancestorsAndSelf",(function(){return t.ancestors().concat([t.decoratedSelf])}))},e.prototype.pathToParent=function(t){var e=this;return this.memoize("pathToParent",(function(){if(e.node===t.node)return[];if(e.parent)return e.parent.pathToParent(t).concat([e.parent]);throw new Error("parent is not an ancestor")}))},e.prototype.pathToParentAndSelf=function(t){var e=this;return this.memoize("pathToParentAndSelf",(function(){return e.pathToParent(t).concat([e.decoratedSelf])}))},e.prototype.isRoot=function(){return!this.parent},Object.defineProperty(e.prototype,"depth",{get:function(){return this.isRoot()?0:this.parent.depth+1},enumerable:!1,configurable:!0}),e.prototype.isLeaf=function(){return!this.isRoot()&&this.node.children.length<1},e.prototype.hasChildren=function(){return this.node.children.length>0},e.prototype.depthFromParent=function(t){return this.pathToParent(t).length},e.prototype.treeDepth=function(){var t=this;return this.memoize("treeDepth",(function(){return 1+t.descendants().map((function(e){return e.depthFromParent(t)})).reduce((function(t,e){return Math.max(t,e)}))}))},e.prototype.flatten=function(){var t=this;return this.memoize("flatten",(function(){return t.flattenInto([])}))},e.prototype.visit=function(t){return t.visit(this),t},e.prototype.visitChildren=function(t){return M.each(this.children,(function(e){return e.visit(t)})),t},e.prototype.visitSelfAndDescendants=function(e){this.visit(new t.SelfAndDescendantsVisitor.Each(e))},e.prototype.visitDescendants=function(e){this.visitChildren(new t.SelfAndDescendantsVisitor.Each(e))},e.prototype.memoize=function(t,e){var n="__"+t;return M.isNil(this[n])&&(this[n]=e()),this[n]},e}();(t.DecoratedTreeNode||(t.DecoratedTreeNode={})).createRoot=function(t){return R.Mixin.createProxy(t,new Ce(void 0,t))};var Ie=function(e){function n(t,n){var o=e.call(this,t)||this;return o.source=t,o.expansionModel=n,o.trackSource(o.expansionModel.isExpandedPredicate),o}return B(n,e),n.prototype.getIdentityOf=function(t){return this.source.identityOf(t.node)},n.prototype.compute=function(e){var n=this,o=[];return e.forEach((function(e){return n.addNodeAndVisibleChildren(t.DecoratedTreeNode.createRoot(e),o)})),o},n.prototype.addNodeAndVisibleChildren=function(t,e){var n=this;e.push(t),t.hasChildren()&&!this.expansionModel.isCollapsed(t)&&t.children.forEach((function(t){return n.addNodeAndVisibleChildren(t,e)}))},n}(w.ComputedListModel),we=function(t){function e(e,n){var o=t.call(this,e)||this;return o.treeExpansionModel=n,o}return B(e,t),e.fromRoot=function(t,e){var n=new w.GarbageCollector,o=w.Dsl.disposeWith(n),i=o.chain,r=(o.valueOf,o.before,o.when,o.after,o.observe,o.switchOn,i(t).mapToList((function(t){return[t]}))),a=this.fromList(r,e);return a.registerDisposable(n),a},e.fromChildrenOf=function(t,e){var n=new w.GarbageCollector,o=w.Dsl.disposeWith(n),i=o.chain,r=(o.valueOf,o.before,o.when,o.after,o.observe,o.switchOn,i(t).mapToList((function(t){return t.children}))),a=this.fromList(r,e);return a.registerDisposable(n),a},e.fromList=function(t,n){var o=new ve(t.identityOf),i=new Ie(t,o),r=new e(i,o);return r.registerDisposable(i),n&&n(r),r},e.prototype.treeControlColumn=function(t){var e=this,n="tree-label",o=new be(n,(function(){return e.getColumnTextProperties(n)}),this.treeExpansionModel);t(o),this.addColumn(o)},e.prototype.expand=function(t){this.treeExpansionModel.expand(t)},e.prototype.collapse=function(t){this.treeExpansionModel.expand(t)},e.prototype.isCollapsed=function(t){return this.treeExpansionModel.isCollapsed(t)},e.prototype.ensureAncestorsAndSelfVisible=function(t){this.treeExpansionModel.ensureAncestorsAndSelfVisible(t)},e}(t.AbstractTableModel),xe=function(t){function e(e){var n=t.call(this)||this;return n.collapsedIds=e,n._areas=[],n._collapsed=new Set(e),n}return B(e,t),e.prototype.onVisit=function(t){this._areas.push(t)},e.prototype.shouldVisitChildrenOf=function(t){return!this._collapsed.has(t)},Object.defineProperty(e.prototype,"flattenedAreas",{get:function(){return this._areas},enumerable:!1,configurable:!0}),e}(t.SelfAndDescendantsVisitor),Me=function(t){function e(){return t.call(this)||this}return B(e,t),e}(Y);Me.decorators=[{type:n.Component,args:[{selector:"aup-tree-table",template:'<aup-table [tableModel]="treeTableModel"></aup-table>\n',encapsulation:n.ViewEncapsulation.None,styles:["td.mat-cell{border-bottom-width:0!important;border-top-width:0!important}td.mat-column-tree-label{width:1px}aup-table-cell-renderer[column-id=tree-label]{padding-left:8px!important}aup-tree-label-cell-renderer{flex:1}"]}]}],Me.ctorParameters=function(){return[]},Me.propDecorators={treeTableModel:[{type:n.Input}]},q([w.TrackExternal(),z("design:type",we)],Me.prototype,"treeTableModel",void 0);var Pe=function(t){function e(e){var n=t.call(this,e)||this;return n.focusManager=e,n}return B(e,t),e.prototype.arrowLeft=function(t){this.leftArrowCommand.enabled.value&&(t.preventDefault(),t.stopPropagation(),this.leftArrowCommand.execute())},e.prototype.arrowRight=function(t){this.rightArrowCommand.enabled.value&&(t.preventDefault(),t.stopPropagation(),this.rightArrowCommand.execute())},e.prototype.arrowDown=function(t){t.preventDefault(),t.stopPropagation(),this.focusManager.focusNext()},e.prototype.arrowUp=function(t){t.preventDefault(),t.stopPropagation(),this.focusManager.focusPrevious()},e.prototype.ngOnInit=function(){},e}(mt);Pe.decorators=[{type:n.Component,args:[{selector:"aup-vertical-focus-container",template:"<ng-content></ng-content>\n",providers:[{provide:w.FocusManager}],styles:[":host{display:block}"]}]}],Pe.ctorParameters=function(){return[{type:w.FocusManager,decorators:[{type:n.Self}]}]},Pe.propDecorators={rightArrowCommand:[{type:n.Input,args:["command.arrowRight"]}],leftArrowCommand:[{type:n.Input,args:["command.arrowLeft"]}],arrowLeft:[{type:n.HostListener,args:["keyup.arrowLeft",["$event"]]}],arrowRight:[{type:n.HostListener,args:["keyup.arrowRight",["$event"]]}],arrowDown:[{type:n.HostListener,args:["keyup.arrowDown",["$event"]]}],arrowUp:[{type:n.HostListener,args:["keyup.arrowUp",["$event"]]}]},q([w.TrackExternal(),z("design:type",w.Command)],Pe.prototype,"rightArrowCommand",void 0),q([w.TrackExternal(),z("design:type",w.Command)],Pe.prototype,"leftArrowCommand",void 0);var Re=function(t){t.addIconPacks(I.fas)};Re.decorators=[{type:n.NgModule,args:[{declarations:[yt,bt,vt,xt,Rt,St,Mt,Pt,wt,Ct,It,Ot,At,kt,Et,Ft,mt,Pe,gt,nt,ce,Xt,le,Wt,ue,$t,Yt,Kt,pe,t.IconComponent,Tt,fe,ut,at,ft,ot,lt,pt,st,ct,dt,Me,t.TreeInheritanceIconComponent,me,t.IconComponent,et,ht],imports:[e.CommonModule,c.BrowserAnimationsModule,o.FormsModule,r.MatInputModule,i.MatFormFieldModule,a.MatSelectModule,s.MatTabsModule,tt,m.MatIconModule,d.MatButtonModule,f.MatCheckboxModule,v.MatTableModule,l.PortalModule,u.CdkScrollableModule,C.FontAwesomeModule,b.MatTooltipModule,p.MatAutocompleteModule,g.MatMenuModule,h.MatDividerModule,y.MatProgressSpinnerModule],exports:[xt,Rt,St,Mt,It,Pt,wt,Ct,Ot,At,kt,Et,Ft,mt,Pe,gt,nt,ce,Xt,le,t.IconComponent,Tt,fe,ut,at,ft,ot,lt,pt,st,Me,et,ht],providers:[Z]}]}],Re.ctorParameters=function(){return[{type:C.FaIconLibrary}]};var Se=new n.InjectionToken("InteractionActivityData"),Ae=function(t){function e(){var e=t.apply(this,X(arguments))||this;return e._busyModel=(new w.DelegatingValueModel).withDefault(!1),e._focusedModel=e.registerDisposable(new w.DelegatingValueModel),e.class="aup-activity",e}return B(e,t),Object.defineProperty(e.prototype,"isFocused",{get:function(){return this._focusedModel.value},enumerable:!1,configurable:!0}),e.prototype.initialise=function(t,e){var n=this,o=w.Dsl.disposeWith(this),i=(o.chain,o.when);R.assert.isNil(this._activityContext),this._activityContext=e,this._interactionContext=t,this._focusedModel.setDelegate(e.focused),i(this._focusedModel).becomesTruthy((function(){n.onActivityReady()}))},Object.defineProperty(e.prototype,"interactionContext",{get:function(){return R.assert.isTruthy(this.isInitialised()),this._interactionContext},enumerable:!1,configurable:!0}),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:!1,configurable:!0}),Object.defineProperty(e.prototype,"focused",{get:function(){return this._focusedModel.readonly},enumerable:!1,configurable:!0}),e.prototype.busyWhile=function(t){this._busyModel.setDelegate(t)},e.prototype.isBusy=function(){return this._busyModel.value},e.prototype.isInitialised=function(){return!!this._activityContext},e}(Y);Ae.decorators=[{type:n.Component,args:[{template:""}]}],Ae.propDecorators={class:[{type:n.HostBinding,args:["class"]}],isFocused:[{type:n.HostBinding,args:["attr.focused"]}]};var Oe=function(t){function e(){var e=t.apply(this,X(arguments))||this;return e.align="start",e}return B(e,t),Object.defineProperty(e.prototype,"alignEnd",{get:function(){return"end"===this.align},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"alignStretch",{get:function(){return"stretch"===this.align},enumerable:!1,configurable:!0}),e.prototype.ngOnInit=function(){},e.prototype.hasConfirmCommand=function(){return w.DelegatingCommand.hasDelegate(this.confirmCommand)},e.prototype.hasCancelCommand=function(){return w.DelegatingCommand.hasDelegate(this.cancelCommand)},e}(Y);Oe.decorators=[{type:n.Component,args:[{selector:"aup-activity-actions",template:'<ng-container *ngIf="hasCancelCommand()">\n <aup-command class="cancel" [command]="cancelCommand" [face]="style.cancel"></aup-command>\n</ng-container>\n<ng-container *ngIf="hasConfirmCommand()">\n <aup-command class="confirm" [command]="confirmCommand" [face]="style.confirm"></aup-command>\n</ng-container>\n<div class="content">\n <ng-content></ng-content>\n</div>\n',styles:[':host{-ms-grid-columns:auto auto 1fr;-ms-grid-rows:auto;align-items:center;display:-ms-grid;display:grid;grid-template-areas:"cancel confirm content";grid-template-columns:auto auto 1fr;grid-template-rows:auto;justify-content:end}:host.align-end{-ms-grid-columns:1fr auto auto;grid-template-areas:"content cancel confirm";grid-template-columns:1fr auto auto}:host.align-stretch{-ms-grid-columns:auto 1fr auto;grid-template-areas:"cancel content confirm";grid-template-columns:auto 1fr auto}.cancel{-ms-grid-column:1;-ms-grid-row:1;grid-area:cancel}:host.align-end>.cancel{-ms-grid-column:2;-ms-grid-row:1}:host.align-stretch>.cancel{-ms-grid-column:1;-ms-grid-row:1}.confirm{-ms-grid-column:2;-ms-grid-row:1;grid-area:confirm}.column,:host.align-end>.confirm,:host.align-stretch>.confirm{-ms-grid-column:3;-ms-grid-row:1}.column{grid-area:content;text-align:left}:host.align-end>.column{-ms-grid-column:1;-ms-grid-row:1}:host.align-stretch>.column{-ms-grid-column:2;-ms-grid-row:1}']}]}],Oe.propDecorators={confirmCommand:[{type:n.Input}],cancelCommand:[{type:n.Input}],style:[{type:n.Input}],align:[{type:n.Input}],alignEnd:[{type:n.HostBinding,args:["class.align-end"]}],alignStretch:[{type:n.HostBinding,args:["class.align-stretch"]}]},q([w.TrackExternal(),z("design:type",w.Command)],Oe.prototype,"confirmCommand",void 0),q([w.TrackExternal(),z("design:type",w.Command)],Oe.prototype,"cancelCommand",void 0);var Te=function(t){function e(e){var n=t.call(this)||this;return n.alert=e,n}return B(e,t),e.prototype.ngOnInit=function(){},e}(Ae);Te.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<div matDialogActions>\n <button mat-raised-button color="primary" (click)="done()" data-cy="close-button">{{alert.ok()}}</button>\n</div>\n',styles:[":host{display:block;padding:var(--aup-default-padding)}.mat-dialog-content{margin:0;padding:0}.mat-dialog-actions{align-items:flex-end;justify-content:flex-end;margin-bottom:0!important;padding:0}"]}]}],Te.ctorParameters=function(){return[{type:void 0,decorators:[{type:n.Inject,args:[Se]}]}]};var De=function(t){function e(e){var n=t.call(this)||this;return n.config=e,w.assert.notNil(e),n}return B(e,t),e.prototype.ngOnInit=function(){},Object.defineProperty(e.prototype,"confirm",{get:function(){return this.config.confirm},enumerable:!1,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}(Ae);De.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<div 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</div>\n\n',styles:[":host{display:block;padding:var(--aup-default-padding)}.mat-dialog-content{margin:0;padding:0}.mat-dialog-actions{align-items:flex-end;justify-content:flex-end;margin-bottom:0!important;padding:0}"]}]}],De.ctorParameters=function(){return[{type:void 0,decorators:[{type:n.Inject,args:[Se]}]}]};var Ee=function(t){function e(e){var n=t.call(this)||this;return n.confirm=e,w.assert.notNil(e),n}return B(e,t),e.prototype.ngOnInit=function(){},e.prototype.isDestructive=function(){return this.confirm.destructive&&this.confirm.destructive()},e}(Ae);Ee.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<div 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</div>\n\n',styles:[":host{display:block;padding:var(--aup-default-padding)}.mat-dialog-content{margin:0;padding:0}.mat-dialog-actions{align-items:flex-end;justify-content:flex-end;margin-bottom:0!important;padding:0}"]}]}],Ee.ctorParameters=function(){return[{type:void 0,decorators:[{type:n.Inject,args:[Se]}]}]};var Fe=function(){function t(){}return t.prototype.startActivity=function(t,e,n){return this.createAndLaunchActivity(t,e,R.Opts.get(n).getOptional("disableClose",!1))},t.prototype.confirm=function(t){return this.confirmOrReject(t).then((function(){return!0})).catch((function(){return!1}))},t.prototype.alert=function(t){return this.createAndLaunchActivity(Te,t,!1)},t.prototype.confirmOrReject=function(t){return this.createAndLaunchActivity(Ee,t,!0)},t.prototype.confirmThen=function(t,e,n){return this.createAndLaunchActivity(De,{confirm:t,activityType:e,data:n},!0)},t}(),ke=function(){function t(t,e,n){this.activityClass=t,this.activityData=e,this.onComplete=n,this._complete=!1,this.deferredResult=w.Deferred.defer(),this.focusedModel=new w.MutableValueModel,this._activityBusy=(new w.DelegatingValueModel).withDefault(!1)}return t.prototype.isActivityRealised=function(){return!!this._activity},t.prototype.isComplete=function(){return this._complete},Object.defineProperty(t.prototype,"activity",{get:function(){return w.assert.isTruthy(this.isActivityRealised()),this._activity},enumerable:!1,configurable:!0}),t.prototype.setFocused=function(t){this.focusedModel.value=t},Object.defineProperty(t.prototype,"focused",{get:function(){return this.focusedModel.value},enumerable:!1,configurable:!0}),t.prototype.notifyActivityCreated=function(t,e){w.assert.isNil(this._activity),this._activity=t;var n=this;this._activity.initialise(e,{onDone:function(t){n.finishActivity((function(e){return e.resolve(t)}))},onCancel:function(t){n.finishActivity((function(e){return e.reject(t)}))},focused:this.focusedModel.readonly}),this._activityBusy.setDelegate(this._activity.busy)},t.prototype.finishActivity=function(t){w.assert.isFalsey(this.isComplete()),t(this.deferredResult),this._complete=!0,this.onComplete(this),this._activityBusy.dispose()},t.prototype.cancel=function(){this.activity.cancel()},Object.defineProperty(t.prototype,"activityResult",{get:function(){return this.deferredResult.promise},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"activityBusy",{get:function(){return this._activityBusy.readonly},enumerable:!1,configurable:!0}),t}(),_e=function(){function t(t,e,n){this.componentFactoryResolver=t,this.viewContainerRef=e,this.injector=n}return Object.defineProperty(t.prototype,"activityRef",{get:function(){return this._activityRef},set:function(t){this.activityRef&&!this.activityRef.isComplete()&&R.lang.illegalState("changing activity before previous one has completed"),this._activityRef=t,this.loadActivity(t)},enumerable:!1,configurable:!0}),t.prototype.ngOnInit=function(){},t.prototype.loadActivity=function(t){var e=n.Injector.create({providers:[{provide:Se,useValue:t.activityData}],parent:this.injector}),o=this.componentFactoryResolver.resolveComponentFactory(t.activityClass);this.viewContainerRef.clear(),this.activityComponentRef=this.viewContainerRef.createComponent(o,0,e),this.activityRef.notifyActivityCreated(this.activityComponentRef.instance,this.nestedInteractionContext)},Object.defineProperty(t.prototype,"component",{get:function(){return this.activityComponentRef.instance},enumerable:!1,configurable:!0}),t}();_e.decorators=[{type:n.Component,args:[{selector:"aup-activity-outlet",template:"",styles:[":host{display:block}"]}]}],_e.ctorParameters=function(){return[{type:n.ComponentFactoryResolver},{type:n.ViewContainerRef},{type:n.Injector}]},_e.propDecorators={nestedInteractionContext:[{type:n.Input}],activityRef:[{type:n.Input}]};var Le=function(t){function e(){var e=t.call(this)||this;return e.dynamicHeight=!1,e.activityRefs=[],e.garbage=new w.GarbageCollector,e.inAnimation=new w.MutableValueModel(!1),e.busy=(new w.DelegatingValueModel).withDefault(!1),e.registerDisposable(e.busy),e}return B(e,t),e.prototype.ngOnInit=function(){},e.prototype.ngAfterViewInit=function(){var t=this,e=w.Dsl.disposeWith(this);e.chain;e.observe.valuesFrom(this.tabs.animationDone).subscribe((function(){return t.onAnimationFinished()}))},e.prototype.initialise=function(t,e){w.assert.isFalsey(this.isInitialised()),w.assert.notNil(t),w.assert.notNil(e),this._identifier=t,this.interactionServiceApi=e},Object.defineProperty(e.prototype,"identifier",{get:function(){return this._identifier},enumerable:!1,configurable:!0}),e.prototype.isInitialised=function(){return!!this.identifier},e.prototype.isActive=function(){return this.getActiveActivityCount()>0},e.prototype.registerDisposable=function(t){return this.garbage.registerDisposable(t)},e.prototype.dispose=function(){w.assert.isFalsey(this.isActive()),this.garbage.dispose()},e.prototype.getActiveActivityRef=function(){return this.isActive()||R.lang.illegalState("no activity in progress"),V.default.findLast(this.activityRefs,(function(t){return!t.isComplete()}))},e.prototype.cancelActiveActivity=function(){return G(this,void 0,void 0,(function(){return W(this,(function(t){return this.getActiveActivityRef().cancel(),this.isCleaningUp()?[2,this.waitForInteractionContextCleanupToFinish()]:[2,!this.isActive()]}))}))},e.prototype.createAndLaunchActivity=function(t,e,n){var o=this;w.assert.isTruthy(this.isInitialised());var i=new ke(t,e,(function(){o.getActiveActivityCount()>0?o.triggerTabSynchronisation():o.finishAndStartCleanup()}));return this.launchActivity(i),1===this.activityRefs.length&&this.interactionServiceApi.notifyActive(this),i.activityResult},e.prototype.getActiveActivityCount=function(){return this.activityRefs.filter((function(t){return!t.isComplete()})).length},e.prototype.isCleaningUp=function(){return!!this._deferredCleanUp},e.prototype.waitForInteractionContextCleanupToFinish=function(){return G(this,void 0,void 0,(function(){return W(this,(function(t){return[2,!this._deferredCleanUp||this._deferredCleanUp]}))}))},e.prototype.finishAndStartCleanup=function(){var t=this;if(!this._deferredCleanUp){this.activityRefs=[];var e=this.interactionServiceApi.notifyFinished(this);this._deferredCleanUp=e.finally((function(){t._deferredCleanUp=null}))}},e.prototype.launchActivity=function(t){var e=this.activityRefs.filter((function(t){return!t.isComplete()}));this.activityRefs=e.concat(t),this.synchroniseSelectedTabIndex()},e.prototype.activityIndex=function(t,e){return t},e.prototype.onAnimationFinished=function(){this.onAnimationFinishedJob&&(this.onAnimationFinishedJob(),this.onAnimationFinishedJob=void 0)},e.prototype.synchroniseSelectedTabIndex=function(){var t=this,e=this.tabs.selectedIndex,n=this.getActiveActivityCount()-1;e!==n&&(this.inAnimation.value=!0,this.activityRefs[n].setFocused(!1),this.busy.setDelegate(this.activityRefs[n].activityBusy),this.tabs.selectedIndex=n,this.onAnimationFinishedJob=function(){t.activityRefs=t.activityRefs.filter((function(t){return!t.isComplete()})),t.inAnimation.value=!1,t.activityRefs.forEach((function(t,e){t.setFocused(e===n)}))})},e.prototype.getSelectedOutlet=function(){return this.activityOutlets.toArray()[this.tabs.selectedIndex]},e.prototype.getSelectedTabIndex=function(){return this.tabs.selectedIndex},e.prototype.triggerTabSynchronisation=function(){var t=this;this.syncSelectedTabTimeout&&clearTimeout(this.syncSelectedTabTimeout),this.syncSelectedTabTimeout=setTimeout((function(){t.syncSelectedTabTimeout=null,t.synchroniseSelectedTabIndex()}),75)},e}(Fe);Le.decorators=[{type:n.Component,args:[{selector:"aup-activity-container",template:'<mat-tab-group #tabs no-tab-header\n [dynamicHeight]="dynamicHeight"\n [class.full-height-tabs]="!dynamicHeight">\n <mat-tab *ngFor="let activityRef of activityRefs; let i = index; trackBy: activityIndex">\n <aup-busy-overlay [busyModel]="busy">\n \x3c!--\n We have issues where angular is triggering a leave animation when an\n new activity is started, but is not running the enter animation\n when it is scrolled back into view. So we track the tab changes and\n disable all animations inside the tab while we\'re animating.\n --\x3e\n <div class="activity-outlet-wrapper" [@.disabled]="!activityRef.focused">\n <aup-activity-outlet [nestedInteractionContext]="this" [activityRef]="activityRef"></aup-activity-outlet>\n </div>\n </aup-busy-overlay>\n </mat-tab>\n</mat-tab-group>\n',styles:[":host{display:flex;flex-direction:column}aup-busy-overlay,mat-tab-group{flex:1}"]}]}],Le.ctorParameters=function(){return[]},Le.propDecorators={dynamicHeight:[{type:n.Input}],tabs:[{type:n.ViewChild,args:["tabs",{static:!0}]}],activityOutlets:[{type:n.ViewChildren,args:[_e]}]};var Ne=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return B(e,t),e.prototype.ngOnInit=function(){},e}(Y);Ne.decorators=[{type:n.Component,args:[{selector:"aup-activity-title",template:"<ng-content></ng-content>\n",styles:[":host{display:block}"]}]}];var Ve=function(){function t(t,e,n){this.activeInteractionContextIds=t,this.activeModalContext=e,this.createExclusiveInteractionContext=n}return t.prototype.isActive=function(){return this.getActiveInteractionContextIds().length>0},t.prototype.isModalActive=function(){return!!this.activeModalContext.value},t.prototype.isComponentInteracting=function(t){return t.interactionContext&&t.interactionContext.isActive()},t.prototype.getActiveInteractionContextIds=function(){return this.activeInteractionContextIds.value},t.prototype.cancelCurrentModalInteraction=function(){return this.activeModalContext.value.cancelActiveActivity()},t.prototype.cancelComponentInteraction=function(t){return t.interactionContext.cancelActiveActivity()},t}(),He=function(){},je=0;t.InteractionService=function(){function t(e){this.modelInteractionContextFactory=e,this.garbage=new w.GarbageCollector,this._navigationInProgress=(new w.DelegatingValueModel).withDefault(!1);var n=w.Dsl.disposeWith(this.garbage),o=n.chain,i=n.valueOf;n.before,n.when,n.after,n.observe,n.switchOn;this.exclusiveInteractionRegistry=new t.ContextRegistry,this.modalInteractionRegistry=new t.ContextRegistry,this.inPlaceInteractionRegistry=new t.ContextRegistry,this.modalInteractionRegistry.disableWhen(i.any(this.exclusiveInteractionRegistry.active,this.modalInteractionRegistry.active).areTruthy()),this.inPlaceInteractionRegistry.disableWhen(i.any(this.exclusiveInteractionRegistry.active,this.modalInteractionRegistry.active,this.inPlaceInteractionRegistry.active).areTruthy()),this.active=i.any(this.inPlaceInteractionRegistry.active,this.modalInteractionRegistry.active).areTruthy(),this.activeInteractionContextIds=o(this.inPlaceInteractionRegistry.interactionContextIds).concat(this.modalInteractionRegistry.interactionContextIds),this.activeModalContext=o(this.modalInteractionRegistry.interactionContexts).first(),this.inModalInteraction=o(this.activeModalContext).isNotNil()}return t.prototype.isActive=function(){return this.active.value},t.prototype.createModalInteractionContextFor=function(t){return this.createModalInteractionContextDisposedWith(t)},t.prototype.createModalInteractionContextDisposedWith=function(e){return this.modelInteractionContextFactory.createInteractionContext("modal",new t.ApiAdapter(this.placeRouter,this.modalInteractionRegistry))},t.prototype.registerInplaceInteractionContext=function(e){e.initialise("ip"+ ++je,new t.ApiAdapter(this.placeRouter,this.inPlaceInteractionRegistry))},t.prototype.registerPlaceRouter=function(e){var n=this;R.assert.isFalsey(this.placeRouter),this.placeRouter=e,this._navigationInProgress.setDelegate(this.placeRouter.navigationInProgress);var o=this;return new Ve(this.activeInteractionContextIds,this.activeModalContext,(function(){return o.modelInteractionContextFactory.createInteractionContext("exclusive",new t.ApiAdapter(n.placeRouter,n.exclusiveInteractionRegistry))}))},t}(),t.InteractionService.ɵprov=n.ɵɵdefineInjectable({factory:function(){return new t.InteractionService(n.ɵɵinject(He))},token:t.InteractionService,providedIn:"root"}),t.InteractionService.decorators=[{type:n.Injectable,args:[{providedIn:"root"}]}],t.InteractionService.ctorParameters=function(){return[{type:He}]},function(t){var e=function(t){function e(){var e=t.call(this)||this;e._interactions=new w.MutableListModel,e._disabledDelegate=(new w.DelegatingValueModel).withDefault(!1);var n=w.Dsl.disposeWith(e),o=n.chain;n.valueOf,n.before,n.when,n.after,n.observe,n.switchOn;return e.active=o(e._interactions).isNotEmpty(),e.interactionContextIds=o(e._interactions).pluck("identifier"),e}return B(e,t),Object.defineProperty(e.prototype,"interactionContexts",{get:function(){return this._interactions.readonly},enumerable:!1,configurable:!0}),e.prototype.start=function(t){this._interactions.push(t)},e.prototype.finish=function(t){this._interactions.remove(t)},e.prototype.isActive=function(){return this.active.value},e.prototype.disableWhen=function(t){this._disabledDelegate.setDelegate(t)},e}(w.GarbageCollector);t.ContextRegistry=e;var n=function(){function t(t,e){this.placeRouter=t,this.contextRegistry=e}return t.prototype.notifyActive=function(t){return R.assert.isTruthy(t.identifier),this.contextRegistry.start(t),this.isNavigationInProgress()?Promise.resolve():this.placeRouter.syncInteractionContextIdsWithRouter()},t.prototype.isNavigationInProgress=function(){return this.placeRouter.navigationInProgress.value},t.prototype.notifyFinished=function(t){return this.contextRegistry.finish(t),this.isNavigationInProgress()?Promise.resolve():this.placeRouter.syncInteractionContextIdsWithRouter()},t}();t.ApiAdapter=n}(t.InteractionService||(t.InteractionService={}));var Ue=function(t){function e(e,n){var o=t.call(this)||this;return o.interactionService=e,o.tabConfig=n,o.animateFirstActivity=!0,o}return B(e,t),Object.defineProperty(e.prototype,"animationDuration",{get:function(){var t;return this.animateFirstActivity?(null===(t=this.tabConfig)||void 0===t?void 0:t.animationDuration)||"500ms":"0ms"},enumerable:!1,configurable:!0}),e.prototype.ngAfterViewInit=function(){this.interactionService.registerInplaceInteractionContext(this)},e.prototype.initialise=function(t,e){this.activityContainerComponent.initialise(t,e)},Object.defineProperty(e.prototype,"identifier",{get:function(){return this.activityContainerComponent.identifier},enumerable:!1,configurable:!0}),e.prototype.alert=function(t){return this.activityContainerComponent.alert(t)},e.prototype.cancelActiveActivity=function(){return this.activityContainerComponent.cancelActiveActivity()},e.prototype.confirm=function(t){return this.activityContainerComponent.confirm(t)},e.prototype.confirmOrReject=function(t){return this.activityContainerComponent.confirmOrReject(t)},e.prototype.confirmThen=function(t,e,n){return this.activityContainerComponent.confirmThen(t,e)},e.prototype.isActive=function(){return this.activityContainerComponent.isActive()},e.prototype.startActivity=function(t,e,n){return this.activityContainerComponent.startActivity(t,e,n)},e}(Y);Ue.decorators=[{type:n.Component,args:[{selector:"aup-in-place-interaction-context",template:'<mat-tab-group no-tab-header [selectedIndex]="isActive() ? 1 : 0" full-height-tabs [dynamicHeight]="false" [animationDuration]="animationDuration">\n <mat-tab>\n <ng-content></ng-content>\n </mat-tab>\n <mat-tab>\n <aup-activity-container #activityContainer [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}"]}]}],Ue.ctorParameters=function(){return[{type:t.InteractionService},{type:void 0,decorators:[{type:n.Inject,args:[s.MAT_TABS_CONFIG]},{type:n.Optional}]}]},Ue.propDecorators={activityContainerComponent:[{type:n.ViewChild,args:["activityContainer",{static:!0}]}],animateFirstActivity:[{type:n.Input}]};var Be=function(t){function e(){var e=t.call(this)||this;return e.icon="mat:add",e.tabindex=0,e.clickCommand=w.Command.create((function(t){e.activityClass?e.startActivity(e.activityClass,e.activityData).catch((function(t){})):e.addCommand.withContext(t).execute()})),e}return B(e,t),Object.defineProperty(e.prototype,"active",{get:function(){return!!this.interactionContext&&this.interactionContext.isActive()},enumerable:!1,configurable:!0}),e.prototype.startActivity=function(t,e){return this.interactionContext.startActivity(t,e)},e.prototype.ngOnInit=function(){},e}(Y);Be.decorators=[{type:n.Component,args:[{selector:"aup-add-item-interaction-context",template:'<aup-in-place-interaction-context [animateFirstActivity]="false">\n <a part="link" class="link" [pectinCommand]="clickCommand"><aup-icon [icon]="icon"></aup-icon> {{label}}</a>\n</aup-in-place-interaction-context>\n',styles:[":host{--def-link-background:var(--link-background,transparent);--def-link-background-hover:var(--link-background-hover,rgba(0,0,0,0.05));--def-link-border-radius:var(--link-border-radius,4px);--def-link-color:var(--link-color,currentColor);--def-link-color-hover:var(--link-color-hover,currentColor);--def-link-padding:var(--link-padding,calc(var(--aup-default-padding)/2));border-radius:var(--def-link-border-radius);box-sizing:border-box;display:flex;flex-direction:column;outline:none}:host:hover a.link{background-color:var(--def-link-background-hover);color:var(--def-link-color-hover)}a.link,aup-in-place-interaction-context{border-radius:var(--def-link-border-radius)}a.link{align-items:center;background:var(--def-link-background);color:var(--def-link-color);cursor:pointer;display:flex;flex-direction:row;padding:var(--def-link-padding);text-decoration:none}a.link mat-icon{margin-right:8px}"]}]}],Be.ctorParameters=function(){return[]},Be.propDecorators={label:[{type:n.Input}],icon:[{type:n.Input}],activityClass:[{type:n.Input}],activityData:[{type:n.Input}],addCommand:[{type:n.Input}],interactionContext:[{type:n.ViewChild,args:[Ue]}],active:[{type:n.HostBinding,args:["class.interaction-active"]}],tabindex:[{type:n.HostBinding,args:["tabindex"]}]},q([w.TrackExternal(),z("design:type",w.Command)],Be.prototype,"addCommand",void 0);var qe=function(t){function e(e,n,o){var i=t.call(this)||this;return i._element=e,i._overlay=n,i.outputPortal=new l.ComponentPortal(Ue),i.anchorX="start",i.anchorY="bottom",i.scrollContainers=o?[o]:[],i}return B(e,t),Object.defineProperty(e.prototype,"active",{get:function(){return this.isActive()},enumerable:!1,configurable:!0}),e.prototype.startActivity=function(t,e){var n=this,o=this._overlay.create({hasBackdrop:!1,panelClass:"aup-popup-interaction-panel",positionStrategy:this._overlay.position().flexibleConnectedTo(this._element).withPush(!0).withPositions(this.computePositions()).withGrowAfterOpen(!0).withScrollableContainers(this.scrollContainers)}),i=this.scrollContainers.map((function(t){return t.elementScrolled().subscribe((function(){o.updatePosition()}))})),r=o.attach(this.outputPortal);return this.interactionContext=r.instance,new Promise((function(r,a){setTimeout((function(){n.interactionContext.startActivity(t,e).then(r).catch(a).finally((function(){i.forEach((function(t){return t.unsubscribe()})),o.dispose()})),setTimeout((function(){o.updatePosition()}))}))}))},e.prototype.computePositions=function(){var t="start"===this.anchorX?"start":"end",e="top"===this.anchorY?"bottom":"top";return[{originX:this.anchorX,originY:this.anchorY,overlayX:t,overlayY:e}]},e.prototype.cancelActiveActivity=function(){return this.interactionContext.cancelActiveActivity()},e.prototype.isActive=function(){return this.interactionContext&&this.interactionContext.isActive()},e.prototype.ngOnInit=function(){},e}(Y);qe.decorators=[{type:n.Component,args:[{selector:"aup-popup-interaction-context",template:"<ng-content></ng-content>\n",styles:[":host{display:inline}:host.interaction-active{background:rgba(0,0,0,.05)}"]}]}],qe.ctorParameters=function(){return[{type:n.ElementRef},{type:D.Overlay},{type:D.CdkScrollable,decorators:[{type:n.Optional},{type:n.SkipSelf}]}]},qe.propDecorators={active:[{type:n.HostBinding,args:["class.interaction-active"]}],anchorX:[{type:n.Input}],anchorY:[{type:n.Input}]};var ze=function(t){function e(){var e=t.call(this)||this;return e.activityDone=new n.EventEmitter,e.activityCancelled=new n.EventEmitter,e}return B(e,t),e.prototype.onEnter=function(t){t.preventDefault(),t.stopPropagation(),this.aupInteractionContextTriggerFor.isActive()?this.aupInteractionContextTriggerFor.cancelActiveActivity():this.startActivity()},e.prototype.onClick=function(t){t.preventDefault(),t.stopPropagation(),this.aupInteractionContextTriggerFor.isActive()?this.aupInteractionContextTriggerFor.cancelActiveActivity():this.startActivity()},e.prototype.startActivity=function(){var t=this;w.assert.isTruthy(this.aupInteractionContextTriggerFor),w.assert.isFalsey(this.aupInteractionContextTriggerFor.isActive()),w.assert.isTruthy(this.activityClass),this.aupInteractionContextTriggerFor.startActivity(this.activityClass,this.activityData).then((function(e){t.activityDone.emit(e)})).catch((function(e){t.activityCancelled.emit(e)}))},e.prototype.prepareActivityData=function(){return V.default.isFunction(this.activityDataFactory())?this.activityDataFactory():this.activityData},e}(w.GarbageCollector);ze.decorators=[{type:n.Directive,args:[{selector:"[aupInteractionContextTriggerFor]"}]}],ze.ctorParameters=function(){return[]},ze.propDecorators={aupInteractionContextTriggerFor:[{type:n.Input}],activityClass:[{type:n.Input}],activityData:[{type:n.Input}],activityDataFactory:[{type:n.Input}],activityDone:[{type:n.Output}],activityCancelled:[{type:n.Output}],onEnter:[{type:n.HostListener,args:["keyup.enter",["$event"]]}],onClick:[{type:n.HostListener,args:["click",["$event"]]}]};var Ge=function(t){function e(e){var n=t.call(this)||this;n.data=e,n.class="aup-input-activity";var o=new w.DirtyTrackingForm;return n.valueModel=o.valueModel(n.data.initialValue),n.valueModel.validateUsing(e.validators||[]),n.confirmCommand=w.Command.create((function(){if(n.valueModel.validate()){if(e.save)return Promise.resolve(e.save(n.valueModel,n.interactionContext)).then((function(){return n.done()}));n.done(n.valueModel.value)}})),n.cancelCommand=w.Command.create((function(){n.cancel()})),n}return B(e,t),e.prototype.onActivityReady=function(){this.valueModel.focusContext.requestFocus()},e}(Ae);Ge.decorators=[{type:n.Component,args:[{template:""}]}],Ge.ctorParameters=function(){return[{type:void 0,decorators:[{type:n.Inject,args:[Se]}]}]},Ge.propDecorators={class:[{type:n.HostBinding,args:["class"]}]};var We=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return B(e,t),e}(Ge);We.decorators=[{type:n.Component,args:[{selector:"aup-string-input-activity",template:'\n <aup-string-input [valueModel]="valueModel"\n [label]="data.label"\n [placeholder]="data.placeholder"\n [command.enter]="confirmCommand"\n [command.escape]="cancelCommand"></aup-string-input>\n <aup-activity-actions align="end"\n [confirmCommand]="confirmCommand"\n [cancelCommand]="cancelCommand"\n [style]="data.buttonStyle"></aup-activity-actions>\n '}]}];var Ke=function(t){function e(){var e=t.apply(this,X(arguments))||this;return e.defaultOptionLabelFormat=function(t){return e.data.optionLabel?t[e.data.optionLabel]:t},e}return B(e,t),Object.defineProperty(e.prototype,"optionLabelFormat",{get:function(){var t;return null!==(t=this.data.optionLabelFormat)&&void 0!==t?t:this.defaultOptionLabelFormat},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"options",{get:function(){var t;return(null===(t=this.data.optionsModel)||void 0===t?void 0:t.value)||this.data.options},enumerable:!1,configurable:!0}),e}(Ge);Ke.decorators=[{type:n.Component,args:[{selector:"aup-select-input-activity",template:'\n <aup-select-input [valueModel]="valueModel"\n [label]="data.label"\n [placeholder]="data.placeholder"\n [command.enter]="confirmCommand"\n [command.escape]="cancelCommand"\n [options]="options"\n [optionLabelFormat]="optionLabelFormat"\n ></aup-select-input>\n <aup-activity-actions align="end"\n [confirmCommand]="confirmCommand"\n [cancelCommand]="cancelCommand"\n [style]="data.buttonStyle"\n ></aup-activity-actions>\n '}]}];var Xe,$e=function(t,e){this.width=t,this.height=e},Ye=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,o,i){var r=t.call(this,o,i)||this;return r.top=e,r.left=n,r.width=o,r.height=i,r}return B(e,t),e.prototype.relativePositionOf=function(t){return t instanceof MouseEvent?new Ye(t.clientX-this.left,t.clientY-this.top):new Ye(t.x-this.left,t.y-this.top)},e}($e),(Xe=t.Bounds||(t.Bounds={})).ofElement=function(t){var e=t.getBoundingClientRect();return new Xe(e.top,e.left,e.width,e.height)};var Je=function(e){function n(n,o){var i=e.call(this)||this;return i.elementRef=n,i.ngZone=o,i._boundsModel=new w.MutableValueModel(new t.Bounds(0,0,0,0)),i}return B(n,e),n.prototype.ngAfterViewInit=function(){var t=this;this.updateBounds();var e=this.elementRef.nativeElement,n=new j.default((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:!1,configurable:!0}),Object.defineProperty(n.prototype,"nativeElement",{get:function(){return this.elementRef.nativeElement},enumerable:!1,configurable:!0}),n.prototype.relativePositionOf=function(t){return this.bounds.relativePositionOf(t)},Object.defineProperty(n.prototype,"bounds",{get:function(){return this._boundsModel.value},enumerable:!1,configurable:!0}),n.prototype.updateBounds=function(){this._boundsModel.value=t.Bounds.ofElement(this.nativeElement)},n}(Y);Je.decorators=[{type:n.Directive}],Je.ctorParameters=function(){return[{type:n.ElementRef},{type:n.NgZone}]};var Ze=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return B(e,t),e.fromList=function(t,n){var o=new e(t);return n&&n(o),o},e.prototype.addSelectionColumn=function(t){return this._addSelectionColumn(t)},e}(t.AbstractTableModel),Qe=function(){};Qe.decorators=[{type:n.NgModule,args:[{imports:[e.CommonModule,d.MatButtonModule,O.MatDialogModule,s.MatTabsModule,l.PortalModule,T.RouterModule,m.MatIconModule,tt,A.FlexModule,A.GridModule,Re],declarations:[Le,Ee,De,Te,_e,Ue,Be,Oe,qe,We,Ke,Ge,ze,Ae,Ne],exports:[Le,_e,Ne,Ue,Be,Oe,qe,ze,We,Ke],entryComponents:[Le,Ee,De,Te],providers:[t.InteractionService]}]}],t.ParameterDefinition=function(){function t(t,e,n){this.propertyName=t,this.urlFormat=n,this.options=R.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:!1,configurable:!0}),Object.defineProperty(t.prototype,"isRouteParameter",{get:function(){return!!this.urlFormat},enumerable:!1,configurable:!0}),t.prototype.getOptionValue=function(t){return this.options.getOptional(t,null)},t.prototype.sanitise=function(t,e,n,o,i){return G(this,void 0,void 0,(function(){var o;return W(this,(function(i){return this.isMissingFrom(e)&&!n.lastVisitIncluded(e.placeDefinition)?(o=n.getMostRecentVisitFor(e.placeDefinition),this.remember&&o&&(t=o.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){var e=function(t){function e(){var e=t.apply(this,X(arguments))||this;return e.isRouteId=!0,e.isArray=!1,e}return B(e,t),e.prototype.isEmptyValue=function(t){return V.default.isNil(t)},e.prototype.hasChanged=function(t,e){return t!==e},e}(t);t.RouteId=e;var n=function(t){function e(){var e=t.apply(this,X(arguments))||this;return e.isRouteId=!1,e.isArray=!1,e}return B(e,t),e.prototype.isEmptyValue=function(t){return V.default.isNil(t)},e.prototype.hasChanged=function(t,e){return t!==e},e}(t);t.ValueParameter=n;var o=function(t){function e(e,n,o){var i=t.call(this,e,n,o)||this;return i.isRouteId=!1,i.isArray=!0,i}return B(e,t),e.prototype.isEmptyValue=function(t){return V.default.isNil(t)||t.length<1},e.prototype.hasChanged=function(t,e){return!V.default.isEqual(t,e)},e}(t);t.ArrayParameter=o}(t.ParameterDefinition||(t.ParameterDefinition={}));var tn=function(){function t(t,e,n,o,i,r,a){this.component=t,this.path=e,this.authenticate=n,this.roles=o,this.data=i,this.routeParameters=r,this.children=a}return t.prototype.hasRouteId=function(){return!!this.getRouteIdParameterDef()},t.prototype.getRouteIdParameterDef=function(){return this.routeParameters.find((function(t){return t.isRouteId}))},t.prototype.getRouteParameterDefs=function(t){return void 0===t&&(t=!1),this.getVisitParameterDefs({includeRouteId:t,includeRouteParameters:!0})},t.prototype.getVisitParameterDefs=function(t){var e=R.Opts.get(t),n=!t||e.getOptional("includeRouteId",!1),o=!t||e.getOptional("includeRouteParameters",!1),i=!t||e.getOptional("includeNonRouteParameters",!1);return this.routeParameters.filter((function(t){return n&&t.isRouteId||o&&t.isRouteParameter&&!t.isRouteId||i&&!t.isRouteParameter}))},t.prototype.getPlaceData=function(t,e){return this.data?V.default.isNil(this.data[t])?e:this.data[t]:e},t.prototype.searchPlaceData=function(t,e){var n=this;if(this.data){var o=t.find((function(t){return!V.default.isNil(n.data[t])}));return o?this.data[o]:e}return e},t.prototype.getRouteIdFrom=function(t){var e=this.getRouteIdParameterDef();return e?t.getParameter(e.name):null},t.prototype.getFormattedRouteId=function(t){return t.hasRouteId()?this.getRouteIdParameterDef().urlFormat.format(t.getRouteId()):""},t.prototype.getFormattedRouteParameters=function(t,e){void 0===e&&(e=!1);var n={};return this.getVisitParameterDefs({includeRouteId:e,includeRouteParameters:!0}).forEach((function(e){var o=t.getParameter(e.name);e.isEmptyValue(o)||(e.isArray?(w.assert.isArray(o),n[e.name]=o.map((function(t){return e.urlFormat.format(t)}))):(w.assert.isFalsey(Array.isArray(o)),n[e.name]=e.urlFormat.format(o)))})),n},t.prototype.getNonRouteParameters=function(t){var e={};return this.getVisitParameterDefs({includeNonRouteParameters:!0}).forEach((function(n){var o=t.getParameter(n.name);n.isEmptyValue(o)||(e[n.name]=o)})),e},t.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 o=t.get(n.name).split(",").map((function(t){return t.trim()}));e[n.name]=o.map((function(t){return n.urlFormat.parse(t)}))}else{var i=t.get(n.name);n.isRouteId&&V.default.isEmpty(i)||(e[n.name]=n.urlFormat.parse(i))}})),e},t}();q([x.Memoize(),z("design:type",Function),z("design:paramtypes",[]),z("design:returntype",t.ParameterDefinition)],tn.prototype,"getRouteIdParameterDef",null),q([x.Memoize(),z("design:type",Function),z("design:paramtypes",[Object]),z("design:returntype",Array)],tn.prototype,"getRouteParameterDefs",null),q([x.Memoize(),z("design:type",Function),z("design:paramtypes",[Object]),z("design:returntype",Array)],tn.prototype,"getVisitParameterDefs",null);var en="PLACE_DEFINITION_OPTIONS",nn=Symbol("place:route:parameters");t.PlaceComponent=function(t){function e(){var e=t.call(this)||this;e.visitModel=new w.MutableValueModel,e._inVisitUpdate=new w.Guard,e._active=new w.MutableValueModel(!1);var n=w.Dsl.disposeWith(e),o=(n.chain,n.valueOf,n.before,n.when);n.after,n.observe,n.switchOn;return o(e._active).becomesTruthy((function(){return e.onPlaceReady()})),e}return B(e,t),e.prototype.initialiseVisit=function(t,e){var n=this;w.assert.isNil(this.visitModel.value);var o=w.Dsl.disposeWith(this).when;this.visitModel.value=t,w.DebugContext.getOrCreate(this.visitModel).tag(this.placeDefinition.component.name+".visitModel"),this.placeDefinition.getVisitParameterDefs().forEach((function(t){return n.installBinding(t)})),o(this.visitModel).changes((function(t,n){e(t,n)}),{unless:this._inVisitUpdate})},e.prototype.updateVisit=function(t){var e=this;w.assert.isTruthy(this.isInitialised()),w.assert.notNil(t),this._inVisitUpdate.whileTrue((function(){e.visitModel.value=t}))},e.prototype.isInitialised=function(){return!!this.visitModel.value},e.prototype.installBinding=function(t){var e=this[t.propertyName];w.DebugContext.tag(e,this.placeDefinition.component.name+"."+t.propertyName),this.registerDisposable(new w.Binding(this.visitModel,e,{toRight:function(e){return e.getParameter(t.name)},toLeft:function(e,n){return n.replace(t,e)}})).writeRight()},Object.defineProperty(e.prototype,"placeDefinition",{get:function(){return e.getDefinition(this.constructor)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"childPlaces",{get:function(){return this.placeDefinition.children.map((function(t){return t.component}))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"active",{get:function(){return this._active.readonly},enumerable:!1,configurable:!0}),e.prototype._notifyActive=function(t){this._active.value=t},e.prototype.onPlaceReady=function(){},e}(Y),t.PlaceComponent.decorators=[{type:n.Directive}],t.PlaceComponent.ctorParameters=function(){return[]},q([k.Memoize(),z("design:type",tn),z("design:paramtypes",[])],t.PlaceComponent.prototype,"placeDefinition",null),function(t){function e(e){return w.lang.constructorChain(e).includes(t)}t.isPlaceComponentConstructor=e,t.getRouteParameters=function(t){return R.Klass.get(t).getMetadataList(nn)},t.getDefinition=function(t){if(t instanceof T.ActivatedRouteSnapshot){var n=t.component;if(!e(n))throw new Error("ActivatedRouteSnapshot component is not a PlaceComponent, got "+n);return Reflect.getMetadata(en,n)}return Reflect.getMetadata(en,t)},t.injectDefinition=function(t,e){Reflect.defineMetadata(en,e,t)}}(t.PlaceComponent||(t.PlaceComponent={}));var on=function(){function t(t,e,n){this.component=t,this.navigationSession=e,this.isPrimaryComponent=n}return Object.defineProperty(t.prototype,"routerInteractionAdapter",{get:function(){return this.navigationSession.interactionServiceAdapter},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"urlService",{get:function(){return this.navigationSession.urlService},enumerable:!1,configurable:!0}),t.prototype.canDeactivate=function(t,e){return G(this,void 0,void 0,(function(){return W(this,(function(n){return this.canDeactivatePromise||(this.canDeactivatePromise=this.canDeactivateComponent(t,e)),[2,this.canDeactivatePromise]}))}))},t.prototype.canDeactivateComponent=function(t,e){return G(this,void 0,void 0,(function(){var t,n;return W(this,(function(o){switch(o.label){case 0:return this.navigationSession.isPopState?this.isPrimaryComponent&&this.routerInteractionAdapter.isModalActive()?(t=this.urlService.getActiveInteractionIdsFromUrl(e.url),n=this.routerInteractionAdapter.getActiveInteractionContextIds(),M.isEqual(n,t)?[3,2]:[4,this.routerInteractionAdapter.cancelCurrentModalInteraction()]):[3,3]:[3,5];case 1:return o.sent(),[2,!1];case 2:return[3,5];case 3:return this.routerInteractionAdapter.isComponentInteracting(this.component)?[4,this.routerInteractionAdapter.cancelComponentInteraction(this.component)]:[3,5];case 4:return o.sent(),[2,!1];case 5:if(this.isNotJustAChangeInRouteId(e)){if(this.component.canDeactivate)return[2,this.component.canDeactivate(this.navigationSession.canDeactivateInteractionContext)];if(this.routerInteractionAdapter.isComponentInteracting(this.component))return console.warn("Route changed while component has active interaction, cancelling navigation"),[2,!1]}return[2,!0]}}))}))},t.prototype.isNotJustAChangeInRouteId=function(t){return!t.includesPathOf(this.component.placeDefinition)},t}(),rn=function(t){function e(e,n){var o=t.call(this)||this;return o.context=e,o.startingUrl=n,o.debugPropertyKeys=[],o._visits=new Map,o.componentDeactivationHandlers=new Map,o._interactionContext=o.context.routerInteractionAdapter.createExclusiveInteractionContext(),o.onDispose((function(){o._interactionContext&&o._interactionContext.dispose()})),o}return B(e,t),Object.defineProperty(e.prototype,"name",{get:function(){return this.constructor.name},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"urlService",{get:function(){return this.context.urlService},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"interactionServiceAdapter",{get:function(){return this.context.routerInteractionAdapter},enumerable:!1,configurable:!0}),e.prototype.storeVisit=function(t){this._visits.set(t.placeDefinition,t)},e.prototype.getVisitFor=function(t){return this._visits.get(t)},Object.defineProperty(e.prototype,"canDeactivateInteractionContext",{get:function(){return this._interactionContext},enumerable:!1,configurable:!0}),e.prototype.notifyActive=function(){},e.prototype.onRouterStarted=function(t){this.ignore(t)},e.prototype.onUrlChange=function(t){this.canDeactivateInteractionContext&&this.canDeactivateInteractionContext.isActive()&&this.cancelCanDeactivateInteraction(t)},e.prototype.onPopState=function(t){return this.illegalTransition(t)},e.prototype.onRouterCancelled=function(t){return this.illegalTransition(t)},e.prototype.onRouterError=function(t){return this.illegalTransition(t)},e.prototype.onRouterEnd=function(t){return this.illegalTransition(t)},e.prototype.getVisits=function(){return Array.from(this._visits.values())},e.prototype.illegalTransition=function(t){return w.lang.illegalState(t.toString()+" not supported by "+this.toString())},e.prototype.currentRouterUrl=function(){return this.urlService.getCurrentRouterUrl()},e.prototype.resetBrowserLocation=function(t,e){void 0===e&&(e={replaceCurrent:!1}),this.urlService.resetBrowserLocation(t,e)},e.prototype.repairBrowserHistoryAndUrlAfterGuardCancellation=function(t,e){w.Logger.get(this).info("WORK-AROUND: Updating browser location after pop state - see angular issue #13586"),this.urlService.resetBrowserLocation(t,{replaceCurrent:!0}),this.urlService.resetBrowserLocation(e,{replaceCurrent:!1})},e.prototype.ignore=function(t,e){e=e?" -> "+e:""},e.prototype.toString=function(){return this.constructor.name+"("+this.debugState()+")"},e.prototype.debugState=function(t){var e=this;return(t||this.debugPropertyKeys).map((function(t){return t+": "+e[t]})).join(", ")},e.prototype.canDeactivatePlace=function(t,e,n){return G(this,void 0,void 0,(function(){var o,i;return W(this,(function(r){return(o=this.componentDeactivationHandlers.get(t))||(i=0===this.componentDeactivationHandlers.size,o=new on(t,this,i),this.componentDeactivationHandlers.set(t,o)),[2,o.canDeactivate(e,n).then((function(t){return t})).catch((function(t){throw t}))]}))}))},e.prototype.cancelCanDeactivateInteraction=function(t){w.Logger.get(this).info("back button pressed during navigation session interaction promise");var e=this.detachCanDeactivateInteractionContext();w.Logger.get(this).info("cancelling current navigation activity.."),e.cancelActiveActivity().then((function(){e.dispose()})),this.handleCanDeactivateCancelledEventScenario(t)},e.prototype.reinstateUrlAfterAngularChangedItOnCancellation=function(t){this.resetBrowserLocation(t,{replaceCurrent:!0})},e.prototype.detachCanDeactivateInteractionContext=function(){var t=this._interactionContext;return this._interactionContext=null,t},e}(w.GarbageCollector),an=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return B(e,t),e.prototype.handleCanDeactivateCancelledEventScenario=function(t){R.lang.illegalState("onCanDeactivateInteractionCancelled not supported for event clean up states")},e}(rn),sn=function(t){function e(e,n,o){var i=t.call(this,e,n)||this;return i.locationChangeTriggerUrl=o,i.isPopState=!1,i.firstCancelHandled=!1,i.popStateHandled=!1,i.debugPropertyKeys=["idle","startingUrl","poppedHistoryUrl","locationChangeTriggerUrl","popStateEventUrl","firstCancelHandled","popStateHandled"],i}return B(e,t),e.prototype.onRouterStarted=function(t){this.ignore(t)},e.prototype.onRouterCancelled=function(t){this.repairBrowserHistoryAndUrlAfterGuardCancellation(this.locationChangeTriggerUrl,this.startingUrl),this.context.finishRoutingSession()},e.prototype.onRouterEnd=function(t){this.ignore(t)},e.prototype.onRouterError=function(t){this.ignore(t)},e.prototype.onPopState=function(t){this.ignore(t)},e.prototype.canDeactivatePlace=function(t,e,n){return G(this,void 0,void 0,(function(){return W(this,(function(t){return[2,!1]}))}))},e}(an),cn=function(t){function e(e,n){var o=t.call(this,e,n)||this;return o.isPopState=!0,o.debugPropertyKeys=["startingUrl","poppedHistoryUrl"],o.finished=w.Deferred.defer(),o}return B(e,t),e.prototype.onPopState=function(t){this.gotPopState=!0},e.prototype.onRouterStarted=function(t){this.ignore(t)},e.prototype.onRouterCancelled=function(t){this.ignore(t)},e.prototype.onUrlChange=function(t){},e.prototype.finishUp=function(){this.context.finishRoutingSession(),this.finished.resolve(!0)},e.prototype.onRouterEnd=function(t){this.gotPopState&&this.finishUp()},e.prototype.handleCanDeactivateCancelledEventScenario=function(t){w.lang.illegalState("onCanDeactivateInteractionCancelled not supported for activity context synchronisation since we should never leave a place")},Object.defineProperty(e.prototype,"finishedPromise",{get:function(){return this.finished.promise},enumerable:!1,configurable:!0}),e}(rn),ln=function(t){function e(e,n,o){var i=t.call(this,e,n)||this;return i.wasTriggeredByPopState=o,i.isPopState=!1,i}return B(e,t),e.prototype.notifyActive=function(){var t=this;setTimeout((function(){t.syncInteractionIdsWithRouter()}))},e.prototype.onRouterEnd=function(t){this.context.finishRoutingSession()},e.prototype.onRouterCancelled=function(t){this.context.finishRoutingSession()},e.prototype.syncInteractionIdsWithRouter=function(){var t=this.interactionServiceAdapter.getActiveInteractionContextIds(),e=this.urlService.getCurrentLocationUrlSnapshot().getInteractionIds();if(V.default.isEqual(t,e))this.context.finishRoutingSession();else if(t.length>e.length){var n=t.length>e.length&&e.length<1;this.addActivityContextToRoute(t,n)}else this.removeActivityContextFromRoute(t)},e.prototype.addActivityContextToRoute=function(t,e){var n=this,o=this.urlService.getCurrentRouterSnapshot().updateInteractionIds(t);this.context.navigateByUrl(o,{replaceUrl:!e}).then((function(e){n.urlService.getCurrentLocationUrlSnapshot().hasInteractionIds(t)||R.lang.illegalState("Expected url to be "+o.url+" but was "+n.urlService.getCurrentLocationUrl())}))},e.prototype.removeActivityContextFromRoute=function(t){var e=this.urlService.getCurrentRouterSnapshot().updateInteractionIds(t);if(t.length<1)if(this.wasTriggeredByPopState);else{var n=new cn(this.context,this.urlService.getCurrentRouterUrl());this.context.transitionTo(n),this.urlService.back()}else this.context.navigateByUrl(e,{replaceUrl:!this.wasTriggeredByPopState})},e.prototype.handleCanDeactivateCancelledEventScenario=function(t){R.lang.methodNotSupported()},e}(rn),un=function(t){function e(){var e=t.apply(this,X(arguments))||this;return e.isPopState=!1,e}return B(e,t),e.prototype.onRouterCancelled=function(t){this.context.finishRoutingSession()},e.prototype.onRouterError=function(t){this.context.finishRoutingSession()},e.prototype.onRouterEnd=function(t){this.context.routerInteractionAdapter.isActive()?this.context.transitionTo(new ln(this.context,this.startingUrl,!1)):this.context.finishRoutingSession(this.getVisits())},e.prototype.handleCanDeactivateCancelledEventScenario=function(t){this.context.transitionTo(new sn(this.context,this.startingUrl,t))},e}(rn),pn=function(t){function e(e,n,o){var i=t.call(this,e,n)||this;return i.poppedHistoryUrl=o,i.isPopState=!0,i.debugPropertyKeys=["startingUrl","poppedHistoryUrl"],i}return B(e,t),e.prototype.repairBrowserHistoryAndUrlAfterGuardCancellation=function(){t.prototype.repairBrowserHistoryAndUrlAfterGuardCancellation.call(this,this.poppedHistoryUrl,this.startingUrl)},e}(rn),dn=function(t){function e(e,n,o){return t.call(this,e,n,o)||this}return B(e,t),e.prototype.onRouterCancelled=function(t){this.repairBrowserHistoryAndUrlAfterGuardCancellation(),this.context.transitionTo(new ln(this.context,this.poppedHistoryUrl,!1))},e.prototype.onRouterEnd=function(t){this.context.finishRoutingSession()},e.prototype.handleCanDeactivateCancelledEventScenario=function(t){this.illegalTransition("Leaving interaction after pop-state should't block so should never see a back button click")},e}(pn),fn=function(t){function e(e,n,o){var i=t.call(this,e,n)||this;return i.clickedLinkUrl=o,i.isPopState=!1,i.clickedLinkMatchedBackButtonUrl=!1,i.debugPropertyKeys=["idle","startingUrl","clickedLinkUrl","firstCancelEventUrl","clickedLinkMatchedBackButtonUrl","popStateEventUrl"],i}return B(e,t),e.prototype.onRouterStarted=function(t){this.ignore(t)},e.prototype.onRouterCancelled=function(t){t.url===this.clickedLinkUrl?this.context.transitionTo(new gn(this.context,this.startingUrl,this.clickedLinkUrl)):this.context.transitionTo(new yn(this.context,this.startingUrl,this.clickedLinkUrl))},e.prototype.canDeactivatePlace=function(t,e,n){return G(this,void 0,void 0,(function(){return W(this,(function(t){return[2,!1]}))}))},e}(an);q([w.Trace(),z("design:type",Function),z("design:paramtypes",[T.NavigationStart]),z("design:returntype",void 0)],fn.prototype,"onRouterStarted",null),q([w.Trace(),z("design:type",Function),z("design:paramtypes",[T.NavigationCancel]),z("design:returntype",void 0)],fn.prototype,"onRouterCancelled",null);var hn,mn,gn=function(t){function e(e,n,o){var i=t.call(this,e,n)||this;return i.clickedLinkUrl=o,i.isPopState=!1,i.debugPropertyKeys=["idle","startingUrl","clickedLinkUrl","popStateEventUrl"],i}return B(e,t),e.prototype.onRouterEnd=function(t){this.ignore(t)},e.prototype.onRouterError=function(t){this.ignore(t)},e.prototype.onPopState=function(t){this.popStateEventUrl=t.url,this.ignore(t)},e.prototype.onRouterCancelled=function(t){this.popStateEventUrl&&this.finaliseRouting()},e.prototype.finaliseRouting=function(){return this.repairBrowserHistoryAndUrlAfterGuardCancellation(this.clickedLinkUrl,this.startingUrl),this.context.finishRoutingSession()},e.prototype.canDeactivatePlace=function(t,e,n){return G(this,void 0,void 0,(function(){return W(this,(function(t){return[2,!1]}))}))},e}(an),yn=function(t){function e(e,n,o){var i=t.call(this,e,n)||this;return i.clickedLinkUrl=o,i.isPopState=!1,i.debugPropertyKeys=["idle","startingUrl","clickedLinkUrl","popStateEventUrl"],i}return B(e,t),e.prototype.onRouterEnd=function(t){this.ignore(t)},e.prototype.onRouterError=function(t){this.ignore(t)},e.prototype.onPopState=function(t){this.popStateEventUrl=t.url,this.ignore(t)},e.prototype.onRouterCancelled=function(t){this.popStateEventUrl&&this.finaliseRouting()},e.prototype.finaliseRouting=function(){return this.repairBrowserHistoryAndUrlAfterGuardCancellation(this.clickedLinkUrl,this.startingUrl),this.context.finishRoutingSession()},e.prototype.canDeactivatePlace=function(t,e,n){return G(this,void 0,void 0,(function(){return W(this,(function(t){return[2,!1]}))}))},e}(an),vn=function(t){function e(){var e=t.apply(this,X(arguments))||this;return e.isPopState=!1,e.debugPropertyKeys=["startingUrl","urlAfterRedirects"],e}return B(e,t),e.prototype.onRouterCancelled=function(t){},e.prototype.onRouterError=function(t){this.context.finishRoutingSession()},e.prototype.onRouterEnd=function(t){this.urlAfterRedirects=t.urlAfterRedirects,this.context.finishRoutingSession(this.getVisits())},e.prototype.handleCanDeactivateCancelledEventScenario=function(t){this.context.transitionTo(new fn(this.context,this.startingUrl,t))},e}(rn);hn=t.NavigationContext||(t.NavigationContext={}),mn=function(t,e,n,o,i){this.urlService=t,this.routerInteractionAdapter=e,this.navigateByUrl=n,this.transitionTo=o,this.finishRoutingSession=i},hn.Impl=mn;var bn,Cn,In,wn,xn,Mn=function(t){function e(e,n,o,i){var r=t.call(this,e,n)||this;return r.locationChangeTriggerUrl=o,r.poppedHistoryUrl=i,r.isPopState=!1,r.firstCancelHandled=!1,r.popStateHandled=!1,r.debugPropertyKeys=["idle","startingUrl","poppedHistoryUrl","locationChangeTriggerUrl","popStateEventUrl","firstCancelHandled","popStateHandled"],r}return B(e,t),e.prototype.onRouterStarted=function(t){this.ignore(t)},e.prototype.onRouterCancelled=function(t){if(this.firstCancelHandled){if(this.popStateHandled){var e=t.url;return this.repairBrowserHistoryAndUrlAfterGuardCancellation(e,this.parentPageUrl),this.resetBrowserLocation(this.startingUrl,{replaceCurrent:!1}),this.context.finishRoutingSession()}}else this.firstCancelHandled=!0,this.parentPageUrl=t.url,this.ignore(t)},e.prototype.onRouterEnd=function(t){this.ignore(t)},e.prototype.onRouterError=function(t){this.ignore(t)},e.prototype.onPopState=function(t){this.popStateHandled=!0,this.popStateEventUrl=t.url,this.ignore(t)},e.prototype.canDeactivatePlace=function(t,e,n){return G(this,void 0,void 0,(function(){return W(this,(function(t){return[2,!1]}))}))},e}(an),Pn=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return B(e,t),e.prototype.onRouterCancelled=function(t){this.repairBrowserHistoryAndUrlAfterGuardCancellation(),this.context.finishRoutingSession()},e.prototype.onRouterEnd=function(t){this.context.finishRoutingSession(this.getVisits())},e.prototype.handleCanDeactivateCancelledEventScenario=function(t){this.context.transitionTo(new Mn(this.context,this.startingUrl,t,this.poppedHistoryUrl))},e}(pn);bn=t.PlaceAccessGuard||(t.PlaceAccessGuard={}),Cn=function(){function t(){}return t.prototype.isAuthenticated=function(){return!0},t.prototype.isAuthorised=function(t){return!0},t}(),bn.NoAuth=Cn,t.PlaceHistory=function(){function t(){this._archive=new Map,this.placeHistoryDepth=4}return t.prototype.notifyNavigationStarted=function(){this._activeVisits&&(this.archive(this._activeVisits.visits),this._previousVisits=this._activeVisits)},t.prototype.notifyNavigationFinished=function(e){this._activeVisits=new t.VisitRecord(e)},t.prototype.updateVisit=function(t){w.assert.isTruthy(this._activeVisits),this._activeVisits.update(t)},t.prototype.lastVisitIncluded=function(t){var e;return!!(null===(e=this._previousVisits)||void 0===e?void 0:e.getVisitFor(t))},t.prototype.getMostRecentVisitFor=function(t){return V.default.first(this.getHistory(t))},t.prototype.getHistory=function(t){var e=this._archive.get(t);return e||(e=[],this.setHistory(t,e)),e},t.prototype.setHistory=function(t,e){this._archive.set(t,e)},t.prototype.archive=function(t){var e=this;t.forEach((function(t){var n=e.getHistory(t.placeDefinition),o=V.default.first(n);o&&!t.hasChangedFrom(o)||(n.unshift(t),e.setHistory(t.placeDefinition,n.slice(0,e.placeHistoryDepth)))}))},t}(),t.PlaceHistory.ɵprov=n.ɵɵdefineInjectable({factory:function(){return new t.PlaceHistory},token:t.PlaceHistory,providedIn:"root"}),t.PlaceHistory.decorators=[{type:n.Injectable,args:[{providedIn:"root"}]}],t.PlaceHistory.ctorParameters=function(){return[]},In=t.PlaceHistory||(t.PlaceHistory={}),wn=function(){function t(t){this.visits=t}return t.prototype.update=function(t){this.visits=this.visits.filter((function(e){return e.placeDefinition!==t.placeDefinition})).concat(t)},t.prototype.getVisitFor=function(t){return this.visits.find((function(e){return e.placeDefinition===t}))},t}(),In.VisitRecord=wn,t.UrlSnapshot=function(){function t(t,e){this.urlSerializer=t,this.url=e,this.urlTree=t.parse(e)}return t.prototype.updateVisitSegments=function(e){var n=this.urlSerializer.parse(this.url),o=X(this.getPrimarySegments(n)),i=this.getSegmentsFor(e),r=o.findIndex((function(t){return t.path===i[0].path}));return o.splice.apply(o,X([r,i.length],i)),n.root.children.primary.segments=o,new t(this.urlSerializer,n.toString())},t.prototype.getPrimarySegments=function(t){return this.urlTree.root.children.primary.segments},t.prototype.getSegmentsFor=function(t){return t.placeDefinition.hasRouteId()?[new T.UrlSegment(t.placeDefinition.path,t.placeDefinition.getFormattedRouteParameters(t)),new T.UrlSegment(t.placeDefinition.getFormattedRouteId(t),{})]:[new T.UrlSegment(t.placeDefinition.path,t.placeDefinition.getFormattedRouteParameters(t))]},t.prototype.includesPathOf=function(t){return this.getPrimarySegments(this.urlTree).find((function(e){return e.path===t.path}))},t.prototype.getInteractionIds=function(){var e=this.urlTree.queryParams[t.INTERACTION_QUERY_PARAM];return e?t.parseInteractionIds(e):[]},t.prototype.hasInteractions=function(){return this.getInteractionIds().length>0},t.prototype.hasInteractionIds=function(t){return V.default.isEqual(this.getInteractionIds(),t)},t.prototype.updateInteractionIds=function(e){if(0===e.length)return this.removeInteractionIds();var n=this.urlSerializer.parse(this.url);return n.queryParams[t.INTERACTION_QUERY_PARAM]=t.createPathIdFor(e),new t(this.urlSerializer,n.toString())},t.prototype.removeInteractionIds=function(){var e=this.urlSerializer.parse(this.url);return e.queryParams&&e.queryParams[t.INTERACTION_QUERY_PARAM]&&(e.queryParams={}),new t(this.urlSerializer,e.toString())},t.prototype.toString=function(){return"UrlSnapshot("+this.url+")"},t}(),(xn=t.UrlSnapshot||(t.UrlSnapshot={})).INTERACTION_QUERY_PARAM="aup-interactions",xn.INTERACTION_ID_SEPARATOR="--",xn.parseInteractionIds=function(t){return t.split(xn.INTERACTION_ID_SEPARATOR)},xn.createPathIdFor=function(t){return t.join(xn.INTERACTION_ID_SEPARATOR)};var Rn=function(){function e(t,e,n){this.angularRouter=t,this.angularLocation=e,this.urlSerializer=n}return e.prototype.parseUrl=function(e){return new t.UrlSnapshot(this.urlSerializer,e)},e.prototype.createUrlSnapshot=function(){for(var t=this,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];var o=[];return e.forEach((function(e){o.push(t.parseUrl(""+e.placeDefinition.path).updateVisitSegments(e).url)})),this.parseUrl(o.join(""))},e.prototype.getCurrentRouterUrl=function(){return this.angularRouter.routerState?this.angularRouter.routerState.snapshot.url:null},e.prototype.getCurrentLocationUrl=function(){return this.angularLocation.path()},e.prototype.getCurrentLocationUrlSnapshot=function(){return this.parseUrl(this.getCurrentLocationUrl())},e.prototype.getCurrentRouterSnapshot=function(){return this.parseUrl(this.getCurrentRouterUrl())},e.prototype.getActiveInteractionIdsFromUrl=function(t){return this.parseUrl(t).getInteractionIds()},e.prototype.hasActiveInteractions=function(t){return this.getActiveInteractionIdsFromUrl(t).length>0},e.prototype.resetBrowserLocation=function(t,e){e.replaceCurrent?this.angularLocation.replaceState(t):this.angularLocation.go(t)},e.prototype.back=function(){this.angularLocation.back()},e}();Rn.ɵprov=n.ɵɵdefineInjectable({factory:function(){return new Rn(n.ɵɵinject(T.Router),n.ɵɵinject(e.Location),n.ɵɵinject(T.UrlSerializer))},token:Rn,providedIn:"root"}),Rn.decorators=[{type:n.Injectable,args:[{providedIn:"root"}]}],Rn.ctorParameters=function(){return[{type:T.Router},{type:e.Location},{type:T.UrlSerializer}]};var Sn=function(e){function n(n,o,i,r,a){var s=e.call(this)||this;s.angularRouter=n,s.angularLocation=o,s.interactionService=i,s.urlService=r,s.placeHistory=a,s.navigationSessionModel=new w.MutableValueModel,s._activeVisits=new w.MutableListModel,s.sessionFinishedJobs=[],s._accessGuard=(new w.DelegatingValueModel).withDefault(new t.PlaceAccessGuard.NoAuth),window.Cypress&&(window["aup.PlaceRouter"]=s),s.routerInteractionAdapter=i.registerPlaceRouter(s),s.navigationContext=new t.NavigationContext.Impl(s.urlService,s.routerInteractionAdapter,(function(t,e){return s.navigateByUrl(t,e)}),(function(t){s.transitionTo(t)}),(function(t){s.routingSessionFinished(t)}));var c=w.Dsl.disposeWith(s),l=c.chain;c.valueOf,c.before,c.when,c.after,c.observe,c.switchOn;s.navigationInProgress=l(s.navigationSessionModel).isNotNil();var u=l(s.interactionService.active).map((function(t){return t?"IdleDuringInteraction":"Idle"}));return s.navigationSessionName=l(s.navigationSessionModel).pluck("name").otherwise(u),w.DebugContext.tag(s._activeVisits,"PlaceRouter.activeVisits"),s.activeVisitsByPlaceDefinition=l(s._activeVisits).indexBy("placeDefinition"),n.events.subscribe((function(t){t instanceof T.NavigationStart&&("popstate"===t.navigationTrigger?s.onPopState(t):s.onRouterStarted(t)),t instanceof T.NavigationEnd&&s.onRouterEnd(t),t instanceof T.NavigationError&&s.onRouterError(t),t instanceof T.NavigationCancel&&s.onRouterCancelled(t)})),o.onUrlChange((function(t){return s.onUrlChanged(t)})),s}return B(n,e),Object.defineProperty(n.prototype,"accessGuard",{get:function(){return this._accessGuard.readonly},enumerable:!1,configurable:!0}),n.prototype.configureAuth=function(t,e){var n=new w.MutableValueModel;new w.Binding(n,t,{toRight:function(t){return w.lang.illegalState("hackyMutableModel is read only")},toLeft:function(t){return t}}).writeLeft(),this._accessGuard.setDelegate(n),this.redirections=e},n.prototype.getAuthenticationFailureRedirect=function(t,e){return this.redirections.onAuthenticationFailure(t,e)},n.prototype.getAuthorisationFailureRedirect=function(t,e){return this.redirections.onAuthorisationFailure(t,e)},Object.defineProperty(n.prototype,"navigationSession",{get:function(){return this.navigationSessionModel.value},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"currentSession",{get:function(){return this.navigationSessionModel.value},enumerable:!1,configurable:!0}),n.prototype.isNavigating=function(){return this.navigationInProgress.value},n.prototype.waitUntilIdle=function(){var t=this,e=w.Dsl.disposeWith(this).when;return new Promise((function(n){e(t.navigationInProgress).becomesFalsey((function(){return n(t)}),{initialValue:"evaluate",once:!0})}))},n.prototype.onPopState=function(t){if(w.assert.isTruthy("popstate"===t.navigationTrigger),this.currentSession)this.currentSession.onPopState(t);else{var e=t.url,n=this.urlService.getCurrentRouterUrl(),o=this.interactionService.isActive()?new dn(this.navigationContext,n,e):new Pn(this.navigationContext,n,e);this.transitionTo(o)}},n.prototype.onRouterStarted=function(t){w.assert.isFalsey("popstate"===t.navigationTrigger);this.interactionService.isActive();this.currentSession?this.currentSession.onRouterStarted(t):this.transitionTo(this.createNavigationSession(this.urlService.getCurrentRouterUrl()))},n.prototype.onUrlChanged=function(t){this.currentSession?this.currentSession.onUrlChange(t):console.log("FYI: url changed without a navigation session in progress")},n.prototype.onRouterCancelled=function(t){this.currentSession.onRouterCancelled(t)},n.prototype.onRouterError=function(t){this.currentSession.onRouterError(t)},n.prototype.onRouterEnd=function(t){this.currentSession.onRouterEnd(t)},n.prototype.navigate=function(t,e){var n=this;return this.doNavigation(t,(function(o){return G(n,void 0,void 0,(function(){var n;return W(this,(function(o){switch(o.label){case 0:return n=X([t.placeDefinition.path],this.createRouteParameters(t)),[4,this.angularRouter.navigate(n,{relativeTo:e?e.relativeTo:null})];case 1:return o.sent(),[2]}}))}))}))},n.prototype.doNavigation=function(t,e){return G(this,void 0,void 0,(function(){var n;return W(this,(function(o){switch(o.label){case 0:this.navigationInProgress.value&&w.lang.illegalState("Navigation already in progress"),(n=this.createNavigationSession(this.urlService.getCurrentRouterUrl())).storeVisit(t),this.transitionTo(n),o.label=1;case 1:return o.trys.push([1,,3,4]),[4,e(this.angularRouter)];case 2:return o.sent(),[3,4];case 3:return!this.angularRouter.getCurrentNavigation()&&this.currentSession&&this.currentSession.onRouterEnd(new T.NavigationEnd(-1,"","")),[7];case 4:return[2]}}))}))},n.prototype.navigateByUrl=function(t,e){return this.angularRouter.navigateByUrl(t.urlTree,e)},Object.defineProperty(n.prototype,"activeVisits",{get:function(){return this._activeVisits.readonly},enumerable:!1,configurable:!0}),n.prototype.pushVisitChangesToRoute=function(t,e){return G(this,void 0,void 0,(function(){var n=this;return W(this,(function(o){return this.placeHistory.updateVisit(e),e.hasRoutingChangedFrom(t)?[2,this.doNavigation(e,(function(t){var o=n.urlService.parseUrl(n.angularRouter.routerState.snapshot.url).updateVisitSegments(e);return n.navigateByUrl(o)}))]:[2]}))}))},n.prototype.createNavigationSession=function(t){return this.interactionService.isActive()?new un(this.navigationContext,t):new vn(this.navigationContext,t)},n.prototype.transitionTo=function(t){var e=this.navigationSessionModel.value;e||this.placeHistory.notifyNavigationStarted(),w.assert.isTruthy(t!==e),this.navigationSessionModel.value=t,e&&e.dispose(),t.notifyActive()},n.prototype.routingSessionFinished=function(t){t&&t.length>0&&(w.assert.isTruthy(this.navigationInProgress.value),this.placeHistory.notifyNavigationFinished(t),this._activeVisits.value=t),this.currentSession.dispose(),this.navigationSessionModel.value=null,this.sessionFinishedJobs.forEach((function(t){return t()})),this.sessionFinishedJobs=[]},n.prototype.runAfterRoutingSessionFinishes=function(t){w.assert.isTruthy(this.navigationInProgress),this.sessionFinishedJobs.push(t)},n.prototype.syncInteractionContextIdsWithRouter=function(){var t=this;if(this.navigationSession){this.navigationSession;return new Promise((function(e,n){t.runAfterRoutingSessionFinishes((function(){t.runAfterRoutingSessionFinishes(e);var n=new ln(t.navigationContext,t.urlService.getCurrentRouterUrl(),!1);t.transitionTo(n)}))}))}return new Promise((function(e,n){t.runAfterRoutingSessionFinishes(e);var o=new ln(t.navigationContext,t.urlService.getCurrentRouterUrl(),!1);t.transitionTo(o)}))},n.prototype.createRouteParameters=function(t){var e=t.placeDefinition;return t.hasRouteId()?[e.getFormattedRouteId(t),e.getFormattedRouteParameters(t)]:[e.getFormattedRouteParameters(t)]},n}(w.GarbageCollector);Sn.ɵprov=n.ɵɵdefineInjectable({factory:function(){return new Sn(n.ɵɵinject(T.Router),n.ɵɵinject(e.Location),n.ɵɵinject(t.InteractionService),n.ɵɵinject(Rn),n.ɵɵinject(t.PlaceHistory))},token:Sn,providedIn:"root"}),Sn.decorators=[{type:n.Injectable,args:[{providedIn:"root"}]}],Sn.ctorParameters=function(){return[{type:T.Router},{type:e.Location},{type:t.InteractionService},{type:Rn},{type:t.PlaceHistory}]};var An=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!M.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 o;return new t(this.placeDefinition,Object.assign(Object.assign({},this.visitParameters),((o={})[e.name]=n,o)))},t.prototype.mergeRouteParameters=function(e){var n=this,o=Object.keys(e),i={};return this.placeDefinition.getVisitParameterDefs().forEach((function(t){if(t.isRouteId||t.isRouteParameter)o.includes(t.name)&&(i[t.name]=e[t.name]);else{var r=n.getParameter(t.name);n.hasParameter(t.name)&&(i[t.name]=r)}})),new t(this.placeDefinition,i)},t.prototype.hasRoutingChangedFrom=function(t){var e=t.placeDefinition===this.placeDefinition,n=M.isEqual(this.placeDefinition.getFormattedRouteParameters(this,!0),this.placeDefinition.getFormattedRouteParameters(t,!0));return!e||!n},t.prototype.hasChangedFrom=function(t){return!M.isEqual(this.placeDefinition.getNonRouteParameters(this),this.placeDefinition.getNonRouteParameters(t))||this.hasRoutingChangedFrom(t)},t.prototype.toDebugString=function(){var t=this;return Object.keys(this.visitParameters).map((function(e){return e+"="+t.visitParameters[e]})).join(",")},t}(),On=new n.InjectionToken("AUP_PLACE_CONFIG"),Tn=L.style({position:"absolute",top:"0",left:"0",bottom:"0",right:"0"}),Dn=[L.query(":enter, :leave",Tn,{optional:!0}),L.group([L.query(":enter",[L.style({transform:"translateX(-100%)"}),L.animate("{{duration}} ease-out",L.style({transform:"translateX(0%)"}))],{optional:!0}),L.query(":leave",[L.style({transform:"translateX(0%)"}),L.animate("{{duration}} ease-out",L.style({transform:"translateX(100%)"}))],{optional:!0})])],En=[L.query(":enter, :leave",Tn,{optional:!0}),L.group([L.query(":enter",[L.style({transform:"translateX(100%)",minHeight:"1px"}),L.animate("{{duration}} ease-out",L.style({transform:"translateX(0%)"}))],{optional:!0}),L.query(":leave",[L.style({transform:"translateX(0%)"}),L.animate("{{duration}} ease-out",L.style({transform:"translateX(-100%)",minHeight:"1px"}))],{optional:!0})])];function Fn(t){return L.trigger("routeAnimations",[L.transition(":increment",En,{params:{duration:t}}),L.transition(":decrement",Dn,{params:{duration:t}})])}var kn=Fn("0.3s"),_n=function(t){function e(e,o,i,r){var a=t.call(this)||this;a.router=e,a.placeRouter=o,a.placeConfig=i,a.placeChanged=new n.EventEmitter,a.outletActivated=new w.MutableValueModel(!1),a._activatedRouteModel=new w.MutableValueModel,a._activePlaceModel=new w.MutableValueModel,a.initialPlaceIndex=null,a._isPushingVisitToRoute=new w.MutableValueModel(!1),a.isVeryFirstLoad=!0;var s=w.Dsl.disposeWith(a),c=s.chain,l=s.valueOf,u=(s.before,s.when);s.after,s.observe,s.switchOn;a.parentOutletModel=new w.MutableValueModel(r);var p=c(a.parentOutletModel).pullValueModel((function(t){return t.activePlaceModel})).pluck("placeDefinition").pluckList("children").pluck("component"),d=c(a.activePlaceModel).map((function(t){return t.constructor}));return a.placesInAnimationOrder=c(a.customPlaceAnimationOrderModel).otherwise(p),a.activePlaceAnimationPosition=a.placesInAnimationOrder.reduce((function(t){var e=0;return d.value&&(e=t.indexOf(d.value),M.isNil(a.initialPlaceIndex)&&(a.initialPlaceIndex=e)),M.isNil(a.initialPlaceIndex)?0:e-a.initialPlaceIndex}),{dependsOn:d}),a.animationSupported=a.placesInAnimationOrder.count().isGreaterThan(0),a.animationEnabled=l.all(a.animateModel,a.animationSupported).areTruthy(),a._activePlaceDefinition=c(a._activePlaceModel).pluck("placeDefinition"),a.routerVisitModel=a._activePlaceDefinition.findIn(c(o.activeVisitsByPlaceDefinition)),a.navigationInProgress=c(a.placeRouter.navigationInProgress),u(a.navigationInProgress).becomesFalsey((function(){a.checkStateAndInitialise()})),u(a.outletActivated).becomesTruthy((function(){a.checkStateAndInitialise()})),c(a._activePlaceModel).postponeWhile(a.navigationInProgress).subscribe((function(t){return a.placeChanged.emit(t)})),u(o.accessGuard).changes((function(t){var e=a._activePlaceModel.value;if(e&&!t.isAuthorised(e.placeDefinition)){var n=o.getAuthorisationFailureRedirect(a._activatedRouteModel.value.snapshot,a.router.routerState.snapshot);a.placeRouter.navigate(n)}})),a}return B(e,t),e.prototype.ngOnInit=function(){},e.prototype.getAnimationOrder=function(){return this.activePlaceAnimationPosition.value},Object.defineProperty(e.prototype,"animationDuration",{get:function(){return this.placeConfig&&this.placeConfig.animationDuration?this.placeConfig.animationDuration:"500ms"},enumerable:!1,configurable:!0}),e.prototype.navigate=function(t){this.placeRouter.navigate(t,{relativeTo:this.parentOutlet?this.parentOutlet.activatedRouteModel.value:null})},Object.defineProperty(e.prototype,"parentOutlet",{get:function(){return this.parentOutletModel.value},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"activePlaceModel",{get:function(){return this._activePlaceModel.readonly},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"activatedRouteModel",{get:function(){return this._activatedRouteModel.readonly},enumerable:!1,configurable:!0}),e.prototype.onOutletActivated=function(t,e){this._activatedRouteModel.value=t.activatedRoute,this._activePlaceModel.value=e,this.validateAnimationState(e),this.outletActivated.value=!0,this.checkStateAndInitialise()},e.prototype.validateAnimationState=function(t){this.animateModel.value&&(this.placesInAnimationOrder.length<1?console.error("PlaceOutlet.animate === true but placeAnimationOrder has not been set. Animation is disabled."):this.placesInAnimationOrder.query().includes(t.placeDefinition.component)||console.error("PlaceOutlet.animate === true but placeAnimationOrder doesn't contain "+t.placeDefinition.component.name+"."))},e.prototype.onOutletDeactivated=function(){this.outletActivated.value=!1,this._activePlaceModel.value=null,this._activatedRouteModel.value=null},e.prototype.checkStateAndInitialise=function(){var t=this.routerVisitModel.value,e=this.activePlaceModel.value;t&&e&&!e.isInitialised()&&(t.placeDefinition!==e.placeDefinition&&w.lang.illegalState("wrong visit!!!"),this.initialisePlace(t,e))},e.prototype.initialisePlace=function(t,e){var n=this,o=new w.MutableValueModel(t);w.DebugContext.tag(o,"PlaceOutletComponent["+e.constructor.name+")].visitModel"),e.initialiseVisit(t,(function(t,e){n.pushVisitChangeToRoute(e,t)}));var i=function(){n._activePlaceModel.value._notifyActive(!0)};!this.animationEnabled.value||this.isVeryFirstLoad?(this.isVeryFirstLoad=!1,i()):this.onAnimationFinishedJob=i;var r=w.Dsl.disposeWith(e),a=r.when,s=(r.chain,r.valueOf);a(this.routerVisitModel).changes((function(t){e.updateVisit(t)}),{unless:s.any(this._isPushingVisitToRoute,this.routerVisitModel.isNil()).areTruthy()})},e.prototype.pushVisitChangeToRoute=function(t,e){var n=this;this._isPushingVisitToRoute.value=!0,this.placeRouter.pushVisitChangesToRoute(t,e).finally((function(){n._isPushingVisitToRoute.value=!1}))},e.prototype.animationStarted=function(){},e.prototype.animationDone=function(){this.onAnimationFinishedJob&&(this.onAnimationFinishedJob(),this.onAnimationFinishedJob=void 0)},e}(Y);_n.decorators=[{type:n.Component,args:[{selector:"aup-place-outlet",template:'<ng-container *ngIf="animationEnabled.value">\n <div class="router-outlet-container" cdkScrollable\n [@routeAnimations]="{value: getAnimationOrder(), params:{duration: animationDuration}}"\n (@routeAnimations.start)="animationStarted()"\n (@routeAnimations.done)="animationDone()"\n >\n <router-outlet #routerOutlet="outlet"\n (activate)="onOutletActivated(routerOutlet, $event)"\n (deactivate)="onOutletDeactivated()">\n </router-outlet>\n </div>\n</ng-container>\n\n<ng-container *ngIf="!animationEnabled.value">\n <div class="router-outlet-container" cdkScrollable>\n <router-outlet #routerOutlet="outlet"\n (activate)="onOutletActivated(routerOutlet, $event)"\n (deactivate)="onOutletDeactivated()">\n </router-outlet>\n </div>\n</ng-container>\n\n',animations:[kn],styles:[":host{display:flex;flex-direction:column;min-height:0}.router-outlet-container{display:block;flex:1;min-height:0;overflow-x:hidden;overflow-y:scroll;position:relative}router-outlet{display:none}"]}]}],_n.ctorParameters=function(){return[{type:T.Router},{type:Sn},{type:void 0,decorators:[{type:n.Optional},{type:n.Inject,args:[On]}]},{type:_n,decorators:[{type:n.SkipSelf},{type:n.Optional}]}]},_n.propDecorators={animate:[{type:n.Input}],animateModel:[{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}]}]},q([w.StoreInValueModel("animateModel"),z("design:type",Boolean)],_n.prototype,"animate",void 0),q([w.TrackExternal({defaultValue:!0}),z("design:type",w.ValueModel)],_n.prototype,"animateModel",void 0),q([w.TrackExternal(),z("design:type",w.ListModel)],_n.prototype,"customPlaceAnimationOrderModel",void 0),q([w.StoreInListModel("customPlaceAnimationOrderModel"),z("design:type",Array)],_n.prototype,"customPlaceAnimationOrder",void 0);var Ln=function(e){function n(n){var o=e.call(this)||this;o.placeRouter=n,o._activePlaceComponent=new w.DelegatingValueModel;var i=w.Dsl.disposeWith(o),r=i.chain,a=(i.valueOf,i.before,i.when);i.after,i.observe,i.switchOn;return o.placeDefinitions=r(o.placesModel).map((function(e){return t.PlaceComponent.getDefinition(e)})).select((function(t){return n.accessGuard.value.isAuthorised(t)}),{dependsOn:n.accessGuard}),o.commandFactory=w.Command.createFactory((function(t){o.placeOutlet.navigate(new An(t))})),a(o.placeOutletModel).changes((function(t){setTimeout((function(){return o._activePlaceComponent.setDelegate(t?t.activePlaceModel:null)}))})),o.activePlaceDefinition=r(o._activePlaceComponent).pluck("placeDefinition"),o}return B(n,e),n.prototype.getNavigationFace=function(t){var e=t.getPlaceData("nav");return{text: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)}}},n.prototype.isActive=function(t){return this.activePlaceDefinition.query().equals(t)},n.prototype.ngOnInit=function(){},n}(Y);Ln.decorators=[{type:n.Component,args:[{template:""}]}],Ln.ctorParameters=function(){return[{type:Sn}]},Ln.propDecorators={places:[{type:n.Input}],placesModel:[{type:n.Input}],placeOutlet:[{type:n.Input}],placeOutletModel:[{type:n.Input}]},q([w.StoreInListModel("placesModel"),z("design:type",Array)],Ln.prototype,"places",void 0),q([w.TrackExternal(),z("design:type",w.ListModel)],Ln.prototype,"placesModel",void 0),q([w.StoreInValueModel("placeOutletModel"),z("design:type",_n)],Ln.prototype,"placeOutlet",void 0),q([w.TrackExternal(),z("design:type",w.ValueModel)],Ln.prototype,"placeOutletModel",void 0),q([x.Memoize(),z("design:type",Function),z("design:paramtypes",[tn]),z("design:returntype",Object)],Ln.prototype,"getNavigationFace",null);var Nn=function(t){function e(e){return t.call(this,e)||this}return B(e,t),e}(Ln);Nn.decorators=[{type:n.Component,args:[{selector:"aup-list-place-nav",template:'<mat-nav-list fxFlex>\n <a mat-list-item *ngFor="let placeDefinition of placeDefinitions.value"\n [pectinCommand]="commandFactory.create(placeDefinition)"\n [class.active]="isActive(placeDefinition)"\n [matTooltip]="getNavigationFace(placeDefinition).tooltip()">\n <aup-command-face [faces]="[getNavigationFace(placeDefinition)]"></aup-command-face>\n </a>\n</mat-nav-list>\n',styles:[":host{--selected-background:#f1f1f1;--selected-border-color:#838383;--selected-color:inherit;display:flex;flex-direction:column}mat-nav-list{padding-top:0}a{border-right:2px solid transparent}a.active{background:var(--selected-background);border-right:2px solid var(--selected-border-color);color:var(--selected-color)}"]}]}],Nn.ctorParameters=function(){return[{type:Sn}]};var Vn=function(t){function e(e){var n=t.call(this,e)||this;return n.expanded=!1,n}return B(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}(Ln);Vn.decorators=[{type:n.Component,args:[{selector:"aup-side-place-navigation",template:'<mat-nav-list>\n <a mat-list-item (click)="toggleMenu()" class="home">\n <aup-icon class="collapsed-only" icon="mat:menu"></aup-icon>\n <aup-icon class="expanded-only" icon="mat:arrow_back"></aup-icon>\n <span class="expanded-only">Menu</span>\n </a>\n <a mat-list-item *ngFor="let placeDefinition of placeDefinitions.value"\n [pectinCommand]="commandFactory.create(placeDefinition)"\n [class.active]="isActive(placeDefinition)"\n [matTooltip]="getNavigationFace(placeDefinition).tooltip()">\n <aup-icon *ngIf="getNavigationFace(placeDefinition).icon()" [icon]="getNavigationFace(placeDefinition).icon()"></aup-icon>\n <span class="expanded-only">{{getNavigationFace(placeDefinition).text()}}</span>\n </a>\n <span [style.flex]="1"></span>\n <ng-container *ngIf="navEndTemplate" [ngTemplateOutlet]="navEndTemplate"></ng-container>\n</mat-nav-list>\n',styles:[":host{--resolved-background-color:var(--nav-background-color,#555);--resolved-color:var(--nav-color,hsla(0,0%,100%,0.9));--resolved-expanded-width:var(--nav-expanded-width,235px);--resolved-nav-item-height:var(--nav-item-height,var(--resolved-nav-item-width));--resolved-nav-item-width:var(--nav-width,56px);background-color:var(--resolved-background-color);color:var(--resolved-color);display:flex;flex-direction:column;transition:width 125ms linear;width:var(--resolved-nav-item-width)}:host.expanded{max-width:var(--resolved-expanded-width);width:var(--resolved-expanded-width)}:host-context(.expanded) .expanded-only{max-width:100%}:host-context(.expanded) .collapsed-only{max-width:0}:host-context(.expanded) .mat-list-item aup-icon:not(.collapsed-only){margin-right:12px}:host-context(.expanded) .mat-list-item span{text-wrap:none;white-space:nowrap}.expanded-only{max-width:0;overflow:hidden}.collapsed-only{max-width:100%;overflow:hidden}mat-nav-list{display:flex;flex:1;flex-direction:column}.mat-list-item{color:inherit;height:var(--resolved-nav-item-height);width:var(--resolved-nav-item-width)}.mat-list-item.active{background-color:#444}.mat-list-item.home{text-align:left}mat-icon{color:inherit}mat-icon.flip-horizontal{transform:scaleX(-1)}"]}]}],Vn.ctorParameters=function(){return[{type:Sn}]},Vn.propDecorators={expanded:[{type:n.HostBinding,args:["class.expanded"]}],navEndTemplate:[{type:n.ContentChild,args:["navEndTemplate"]}]};var Hn=function(t){function e(e){return t.call(this,e)||this}return B(e,t),e}(Ln);Hn.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]="getNavigationFace(placeDefinition).tooltip()">\n <aup-command-face [faces]="[getNavigationFace(placeDefinition)]"></aup-command-face>\n </a>\n</nav>\n',styles:[""]}]}],Hn.ctorParameters=function(){return[{type:Sn}]};var jn=function(){};jn.decorators=[{type:n.NgModule,args:[{imports:[e.CommonModule,c.BrowserAnimationsModule,y.MatProgressSpinnerModule,T.RouterModule,s.MatTabsModule,F.MatListModule,b.MatTooltipModule,m.MatIconModule,tt,A.FlexModule,Re],declarations:[_n,Hn,Nn,Vn,Ln],entryComponents:[],exports:[_n,Hn,Nn,Vn,Ln],providers:[]}]}];var Un=function(){};Un.decorators=[{type:n.NgModule,args:[{declarations:[],imports:[e.CommonModule,c.BrowserAnimationsModule,o.FormsModule,r.MatInputModule,i.MatFormFieldModule,a.MatSelectModule,s.MatTabsModule,tt,Re,jn,Qe],exports:[Qe,jn,tt,Re,At]}]}];var Bn=L.style({opacity:0,height:"0",paddingTop:"0",paddingBottom:"0"}),qn=L.trigger("slideDownOnEnter",[L.transition(":enter",[Bn,L.animate("{{duration}}")],{params:{duration:"100ms"}}),L.transition(":leave",[L.animate("{{duration}}",Bn)],{params:{duration:"100ms"}})]),zn=L.style({opacity:0,width:"0",paddingLeft:"0",paddingRight:"0"}),Gn=L.trigger("slideRightOnEnter",[L.transition(":enter",[zn,L.animate("{{duration}}")],{params:{duration:"100ms"}}),L.transition(":leave",[L.animate("{{duration}}",zn)],{params:{duration:"100ms"}})]),Wn=function(t){function e(e,n,o,i){var r=t.call(this)||this;return r.identifier=e,r.api=n,r.dialogService=o,r.config=i,r.garbage=new w.GarbageCollector,R.assert.notNil(o),r}return B(e,t),e.prototype.cancelActiveActivity=function(){return this.activityContainer.cancelActiveActivity()},e.prototype.dispose=function(){this.isActive()&&w.lang.illegalState("Dispose called while active."),this.garbage.dispose()},e.prototype.registerDisposable=function(t){return this.garbage.registerDisposable(t)},e.prototype.isActive=function(){return!!this.activityContainer&&this.activityContainer.isActive()},e.prototype.createAndLaunchActivity=function(t,e,n){var o=this;R.assert.isNil(this._currentActivityRef);var i=Object.assign(Object.assign({},this.config),{disableClose:n,panelClass:"dialog-interaction-context"}),r=this.dialogService.open(Le,i),a=this.activityContainer=r.componentInstance;this.activityContainer.initialise(this.identifier,this.api);var s=this.activityContainer.startActivity(t,e);return s.finally((function(){return r.close()})),r.afterClosed().subscribe((function(t){a.isActive()&&a.cancelActiveActivity(),o.activityContainer=null})),r.updateSize(),r.afterOpened().subscribe((function(t){r.updateSize()})),s},e}(Fe),Kn=new n.InjectionToken("DIALOG_INTERACTION_SERVICE_DEFAULTS"),Xn=function(t){function e(e,n,o){var i=t.call(this)||this;return i.dialogService=e,i.dialogServiceDefaults=n,i.matDialogDefaultConfig=o,R.assert.notNil(e),i}return B(e,t),e.prototype.createInteractionContext=function(t,e,n){var o=Object.assign(Object.assign({autoFocus:!1,hasBackdrop:!0,closeOnNavigation:!1},this.matDialogDefaultConfig),this.dialogServiceDefaults);return new Wn(t,e,this.dialogService,o)},e}(He);Xn.ɵprov=n.ɵɵdefineInjectable({factory:function(){return new Xn(n.ɵɵinject(O.MatDialog),n.ɵɵinject(Kn,8),n.ɵɵinject(O.MAT_DIALOG_DEFAULT_OPTIONS,8))},token:Xn,providedIn:"root"}),Xn.decorators=[{type:n.Injectable,args:[{providedIn:"root"}]}],Xn.ctorParameters=function(){return[{type:O.MatDialog},{type:O.MatDialogConfig,decorators:[{type:n.Optional},{type:n.Inject,args:[Kn]}]},{type:O.MatDialogConfig,decorators:[{type:n.Optional},{type:n.Inject,args:[O.MAT_DIALOG_DEFAULT_OPTIONS]}]}]};var $n=function(){function t(t,e){this.paramMaps=[t].concat((e||[]).map((function(t){return new Yn(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:!1,configurable:!0}),t}();q([x.Memoize(),z("design:type",Array),z("design:paramtypes",[])],$n.prototype,"keys",null);var Yn=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:!1,configurable:!0}),t}(),Jn=function(){function t(){}return t.prototype.canActivate=function(t,e){return G(this,void 0,void 0,(function(){return W(this,(function(t){return[2,!0]}))}))},t}();Jn.ɵprov=n.ɵɵdefineInjectable({factory:function(){return new Jn},token:Jn,providedIn:"root"}),Jn.decorators=[{type:n.Injectable,args:[{providedIn:"root"}]}],Jn.ctorParameters=function(){return[]};var Zn,Qn,to,eo,no=function(){function t(t,e,n,o,i){this.navigationSession=t,this.activatedRoute=e,this.router=n,this.placeHistory=o,this.injector=i}return t.prototype.sanitise=function(t){return G(this,void 0,void 0,(function(){var e,n,o,i,r,a,s,c,l;return W(this,(function(u){switch(u.label){case 0:return(e=t.placeDefinition).hasRouteId()?(n=e.getRouteIdParameterDef(),o=t.getRouteId(),[4,n.sanitise(o,t,this.placeHistory,this.injector,this.navigationSession.isPopState)]):[3,2];case 1:if(l=u.sent(),n.hasChanged(o,l))return[2,t.replace(n,l)];u.label=2;case 2:i=e.getVisitParameterDefs({includeRouteParameters:!0,includeNonRouteParameters:!0}),r=t,a=0,u.label=3;case 3:return a<i.length?(s=i[a],c=t.getParameter(s.name),[4,s.sanitise(c,r,this.placeHistory,this.injector,this.navigationSession.isPopState)]):[3,6];case 4:l=u.sent(),s.hasChanged(c,l)&&(r=r.replace(s,l)),u.label=5;case 5:return a++,[3,3];case 6:return[2,r.hasChangedFrom(t)?r:t]}}))}))},t}(),oo=function(){function e(t,e,n,o,i,r){this.router=t,this.urlService=e,this.placeRouter=n,this.placeHistory=o,this.interactionService=i,this.injector=r}return e.prototype.canActivate=function(e,n){return G(this,void 0,void 0,(function(){var o,i,r,a,s=this;return W(this,(function(c){switch(c.label){case 0:return t.PlaceComponent.isPlaceComponentConstructor(e.component)?(o=t.PlaceComponent.getDefinition(e.component)).authenticate?[4,this.placeRouter.accessGuard.value.isAuthenticated()]:[3,2]:[3,4];case 1:if(!c.sent())return i=this.placeRouter.getAuthenticationFailureRedirect(e,n),(r=this.getPlaceDefinition(i)).authenticate&&w.lang.illegalState("handleNotAuthenticated hook returned place "+r.component.name+" that requires authentication."),[2,this.createUrlTree(i)];if(this.placeRouter.accessGuard.value&&!this.placeRouter.accessGuard.value.isAuthorised(o))return i=this.placeRouter.getAuthorisationFailureRedirect(e,n),r=this.getPlaceDefinition(i),this.placeRouter.accessGuard.value&&!this.placeRouter.accessGuard.value.isAuthorised(r)&&w.lang.illegalState("handleNotAuthorised hook returned place "+r.component.name+" that is not authorised for the current user."),[2,this.createUrlTree(i)];c.label=2;case 2:return[4,this.cleanInteractionState(e,n,(function(){return G(s,void 0,void 0,(function(){var t,i,r,a,s;return W(this,(function(c){switch(c.label){case 0:return t=new $n(e.paramMap,e.url),i=o.parseRouteParams(t),r=this.placeRouter.navigationSession,a=r.getVisitFor(o)||new An(o,i),[4,new no(r,e,this.router,this.placeHistory,this.injector).sanitise(a.mergeRouteParameters(i))];case 1:return s=c.sent(),r.storeVisit(s),a.hasRoutingChangedFrom(s)?[2,this.urlService.parseUrl(n.url).updateVisitSegments(s)]:[2,!0]}}))}))}))];case 3:return[2,(a=c.sent())instanceof t.UrlSnapshot?a.urlTree:a];case 4:return[2,w.lang.illegalState("expected component to be an instance of PlaceComponent, got "+e.component)]}}))}))},e.prototype.canDeactivate=function(e,n,o,i){return G(this,void 0,void 0,(function(){var n,r,a;return W(this,(function(s){switch(s.label){case 0:return n=this.urlService.parseUrl(o.url),r=this.urlService.parseUrl(i.url),[4,this.placeRouter.navigationSession.canDeactivatePlace(e,n,r)];case 1:return[2,(a=s.sent())instanceof t.UrlSnapshot?a.urlTree:a]}}))}))},e.prototype.getPlaceDefinition=function(e){return e instanceof An?e.placeDefinition:t.PlaceComponent.getDefinition(e)},e.prototype.createUrlTree=function(e){var n=e instanceof An?e:new An(t.PlaceComponent.getDefinition(e),{});return this.urlService.createUrlSnapshot(n).urlTree},e.prototype.cleanInteractionState=function(t,e,n){return G(this,void 0,void 0,(function(){var t;return W(this,(function(o){return t=this.urlService.parseUrl(e.url),!this.interactionService.isActive()&&t.hasInteractions()?[2,t.removeInteractionIds()]:[2,n()]}))}))},e}();function io(t,e,n,o,i){var r={backingModel:n,binding:null},a=o+"("+t.constructor.name+"."+e.toString()+")";w.DebugContext.getOrCreate(r.backingModel).tag(a),Object.defineProperty(t,e,{get:function(){return r.backingModel},set:function(t){r.binding&&r.binding.dispose(),t&&(r.binding=new w.Binding(r.backingModel,t,{toLeft:w.Functions.identity,toRight:w.Functions.identity}),i(t)?r.binding.writeRight():(i(r.backingModel)||console.warn("Assigning a visit model with an existing value to a visit parameter with an existing value. Visit parameter will be overridden"),r.binding.writeLeft()))}})}oo.ɵprov=n.ɵɵdefineInjectable({factory:function(){return new oo(n.ɵɵinject(T.Router),n.ɵɵinject(Rn),n.ɵɵinject(Sn),n.ɵɵinject(t.PlaceHistory),n.ɵɵinject(t.InteractionService),n.ɵɵinject(n.INJECTOR))},token:oo,providedIn:"root"}),oo.decorators=[{type:n.Injectable,args:[{providedIn:"root"}]}],oo.ctorParameters=function(){return[{type:T.Router},{type:Rn},{type:Sn},{type:t.PlaceHistory},{type:t.InteractionService},{type:n.Injector}]},Zn=t.Formatter||(t.Formatter={}),Qn=function(){function t(){}return t.prototype.format=function(t){return t},t.prototype.parse=function(t){return t},t}(),to=function(){function t(){}return t.prototype.format=function(t){return V.default.isNumber(t)&&!V.default.isNaN(t)?""+t:null},t.prototype.parse=function(t){var e=Number.parseFloat(t);return V.default.isNaN(e)?null:e},t}(),eo=function(){function t(){}return t.prototype.format=function(t){return t?"true":"false"},t.prototype.parse=function(t){return"true"===t},t}(),Zn.STRING=new Qn,Zn.NUMBER=new to,Zn.BOOLEAN=new eo,t.ACTIVITY_DATA=Se,t.AUP_PLACE_CONFIG=On,t.AbstractInputActivity=Ge,t.AbstractInputComponent=yt,t.AbstractInteractionContext=Fe,t.AbstractListInputComponent=vt,t.AbstractPlaceNavigationComponent=Ln,t.AbstractPopStateNavigation=pn,t.AbstractPopupMenuComponent=ct,t.AbstractValueInputComponent=bt,t.Activity=Ae,t.ActivityActionsComponent=Oe,t.ActivityContainerComponent=Le,t.ActivityOutletComponent=_e,t.ActivityRef=ke,t.ActivityTitleComponent=Ne,t.AddItemInteractionContextComponent=Be,t.AlertDialogComponent=Te,t.AngularUiPowerupsModule=Un,t.AutocompleteInputComponent=Ct,t.BusyOverlayComponent=et,t.CELL_EDITOR_PORTAL=Nt,t.CELL_RENDERER_PORTAL=Lt,t.CardContainerComponent=nt,t.CellEditorPortalRef=zt,t.CellHeaderPortalRef=Ut,t.CellPortalRef=jt,t.CellRendererPortalRef=Bt,t.CheckboxInputComponent=It,t.ColumnModel=Qt,t.ColumnTemplateDirective=le,t.CommandComponent=at,t.CommandDirective=$,t.CommandFaceComponent=ot,t.ComponentCellRendererPortalRef=qt,t.ComponentsModule=Re,t.ConfirmThenDialogComponent=De,t.ConfirmationDialogComponent=Ee,t.ConsolidatedParameterMap=$n,t.CustomTemplateColumnModel=ie,t.CustomValueColumnModel=ne,t.DEFINITION_META_DATA_KEY=en,t.DIALOG_INTERACTION_SERVICE_DEFAULTS=Kn,t.DefaultCellRendererComponent=Wt,t.DefaultHeaderCellRendererComponent=Kt,t.DialogInteractionContext=Wn,t.DialogInteractionContextFactory=Xn,t.Dimension=$e,t.DirectivesModule=tt,t.DisposableComponent=Y,t.EditRowControls=Xt,t.EditSession=ae,t.EditorControlColumnModel=oe,t.EmptyStateComponent=ht,t.EventCleanUpSession=an,t.FlattenStrategy=xe,t.FlexComponent=st,t.FocusBinding=J,t.FocusBindingDirective=Q,t.FocusBindingFactory=Z,t.FocusContainerComponent=mt,t.FocusableComponent=gt,t.HEADER_CELL_RENDERER_PORTAL=_t,t.InPlaceInteractionContextComponent=Ue,t.InteractionContextTriggerFor=ze,t.InteractionModule=Qe,t.InteractionServiceRoutingAdapter=Ve,t.LEFT_RIGHT_PLACE_ANIMATION=kn,t.ListPlaceNavComponent=Nn,t.ListPropertyColumnModel=ee,t.ModalInteractionContextFactory=He,t.MoreMenuComponent=lt,t.MultipleSelectInputComponent=wt,t.Navigating=vn,t.NavigatingDuringInteraction=un,t.NavigationSession=rn,t.NoopAuthGuard=Jn,t.NoopComponent=At,t.NumberInputComponent=xt,t.POPUP_CONTAINER=rt,t.PORTAL_EDITOR_COMPONENT=Ht,t.PORTAL_RENDERER_COMPONENT=Vt,t.PasswordInputComponent=Mt,t.Place=function(e){return function(n){t.PlaceComponent.isPlaceComponentConstructor(n)?t.PlaceComponent.injectDefinition(n,new tn(n,e.path,!!M.isNil(e.authenticate)||e.authenticate,M.isNil(e.roles)?[]:e.roles,e.data,t.PlaceComponent.getRouteParameters(n),(e.children||[]).map((function(e){return t.PlaceComponent.getDefinition(e)})))):w.lang.illegalState(n+" must extend PlaceComponent to use the @Place decorator")}},t.PlaceComponentDeactivationHandler=on,t.PlaceDefinition=tn,t.PlaceGuard=oo,t.PlaceModule=jn,t.PlaceOutletComponent=_n,t.PlaceRouter=Sn,t.Point=Ye,t.PopStateDuringInteractionNavigation=dn,t.PopStateNavigation=Pn,t.PopupAwareComponent=it,t.PopupInteractionContextComponent=qe,t.PopupMenuComponent=ft,t.PopupMenuRendererComponent=dt,t.PropertyColumnModel=te,t.ROUTE_PARAMETER_LIST_KEY=nn,t.RemoveLastInteractionFromUrlNavigationSession=cn,t.ResizeAwareComponent=Je,t.RouteId=function(e,n){return function(o,i){var r=new t.ParameterDefinition.RouteId(i.toString(),n,e);R.Klass.get(o).addToOwnMetadataList(nn,r),io(o,i,new w.MutableValueModel,"@RouteId",(function(t){return t.query().isNil()}))}},t.ScrollContainerComponent=Ot,t.SectionHeaderComponent=Tt,t.SelectCellRendererComponent=$t,t.SelectHeaderCellRendererComponent=Yt,t.SelectInputActivity=Ke,t.SelectInputComponent=Pt,t.SelectionColumnModel=re,t.SeparatorComponent=pt,t.SidePlaceNavigationComponent=Vn,t.StringInputActivity=We,t.StringInputComponent=Rt,t.SwitchCaseComponent=kt,t.SwitchCaseDefaultDirective=Ft,t.SwitchCaseOption=Dt,t.SwitchCaseWhenDirective=Et,t.SynchroniseInteractionContextIdsWithRoute=ln,t.TabbedPlaceNavigationComponent=Hn,t.TableCellRendererComponent=ue,t.TableComponent=ce,t.TableHeaderCellRendererComponent=pe,t.TableModel=Ze,t.TableRowMenuComponent=fe,t.TemplateCellRendererPortalRef=Gt,t.TextInputComponent=St,t.ToolBarComponent=ut,t.TreeExpansionModel=ve,t.TreeLabelCellRendererComponent=me,t.TreeLabelColumnModel=be,t.TreeTableComponent=Me,t.TreeTableModel=we,t.TreeToListModel=Ie,t.UrlService=Rn,t.VerticalFocusContainerComponent=Pe,t.Visit=An,t.VisitParameter=function(e){var n=R.Opts.get(e);return function(o,i){var r=new t.ParameterDefinition.ValueParameter(i.toString(),e,n.getOptional("storeInUrl",null));R.Klass.get(o).addToOwnMetadataList(nn,r),io(o,i,new w.MutableValueModel,"@VisitParameter",(function(t){return t.query().isNil()}))}},t.VisitParameterList=function(e){var n=R.Opts.get(e);return function(o,i){var r=new t.ParameterDefinition.ArrayParameter(i.toString(),e,n.getOptional("storeInUrl",null));R.Klass.get(o).addToOwnMetadataList(nn,r),io(o,i,new w.MutableListModel,"@VisitParameterList",(function(t){return t.query().isEmpty()}))}},t.VisitSanitiser=no,t.WaitUntilLeavingInteractionTransitionCancelled=sn,t.WaitUntilLinkTriggeredNavigationInteractionCancellationTypeDetermined=fn,t.WaitUntilPopStateDuringCanDeactivateInteractionFinishes=Mn,t.leftRightPlaceAnimation=Fn,t.slideDownOnEnterAnimation=qn,t.slideRightOnEnterAnimation=Gn,t.ɵ0=Jt,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/form-field"),require("@angular/material/input"),require("@angular/material/select"),require("@angular/material/tabs"),require("@angular/platform-browser/animations"),require("@angular/cdk/portal"),require("@angular/cdk/scrolling"),require("@angular/material/autocomplete"),require("@angular/material/button"),require("@angular/material/checkbox"),require("@angular/material/divider"),require("@angular/material/icon"),require("@angular/material/menu"),require("@angular/material/progress-spinner"),require("@angular/material/table"),require("@angular/material/tooltip"),require("@fortawesome/angular-fontawesome"),require("@fortawesome/free-solid-svg-icons"),require("@coolon/pectin"),require("@typescript-plus/fast-memoize-decorator/dist/src"),require("lodash"),require("typescript-string-enums"),require("resize-observer-polyfill"),require("@coolon/typescript-utilities"),require("immer"),require("@angular/flex-layout"),require("@angular/material/dialog"),require("@angular/router"),require("@angular/cdk/overlay"),require("@angular/material/list"),require("@typescript-plus/fast-memoize-decorator"),require("reflect-metadata"),require("@angular/animations")):"function"==typeof define&&define.amd?define("@coolon/angular-ui-powerups",["exports","@angular/common","@angular/core","@angular/forms","@angular/material/form-field","@angular/material/input","@angular/material/select","@angular/material/tabs","@angular/platform-browser/animations","@angular/cdk/portal","@angular/cdk/scrolling","@angular/material/autocomplete","@angular/material/button","@angular/material/checkbox","@angular/material/divider","@angular/material/icon","@angular/material/menu","@angular/material/progress-spinner","@angular/material/table","@angular/material/tooltip","@fortawesome/angular-fontawesome","@fortawesome/free-solid-svg-icons","@coolon/pectin","@typescript-plus/fast-memoize-decorator/dist/src","lodash","typescript-string-enums","resize-observer-polyfill","@coolon/typescript-utilities","immer","@angular/flex-layout","@angular/material/dialog","@angular/router","@angular/cdk/overlay","@angular/material/list","@typescript-plus/fast-memoize-decorator","reflect-metadata","@angular/animations"],e):e(((t="undefined"!=typeof globalThis?globalThis:t||self).coolon=t.coolon||{},t.coolon["angular-ui-powerups"]={}),t.ng.common,t.ng.core,t.ng.forms,t.ng.material.formField,t.ng.material.input,t.ng.material.select,t.ng.material.tabs,t.ng.platformBrowser.animations,t.ng.cdk.portal,t.ng.cdk.scrolling,t.ng.material.autocomplete,t.ng.material.button,t.ng.material.checkbox,t.ng.material.divider,t.ng.material.icon,t.ng.material.menu,t.ng.material.progressSpinner,t.ng.material.table,t.ng.material.tooltip,t.angularFontawesome,t.freeSolidSvgIcons,t.pectin,t.src,t._,t.typescriptStringEnums,t.ResizeObserver,t.typescriptUtilities,t.produce,t.ng.flexLayout,t.ng.material.dialog,t.ng.router,t.ng.cdk.overlay,t.ng.material.list,t.fastMemoizeDecorator,null,t.ng.animations)}(this,(function(t,e,n,o,i,r,a,s,c,l,u,p,d,f,h,m,g,y,v,b,C,I,w,x,M,P,R,S,A,O,T,D,E,F,k,_,L){"use strict";function N(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var V=N(M),H=N(R),j=N(A),U=function(t,e){return(U=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)};function B(t,e){function n(){this.constructor=t}U(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}function q(t,e,n,o){var i,r=arguments.length,a=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,o);else for(var s=t.length-1;s>=0;s--)(i=t[s])&&(a=(r<3?i(a):r>3?i(e,n,a):i(e,n))||a);return r>3&&a&&Object.defineProperty(e,n,a),a}function z(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)}function G(t,e,n,o){return new(n||(n=Promise))((function(i,r){function a(t){try{c(o.next(t))}catch(t){r(t)}}function s(t){try{c(o.throw(t))}catch(t){r(t)}}function c(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}c((o=o.apply(t,e||[])).next())}))}function W(t,e){var n,o,i,r,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[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,o&&(i=2&r[0]?o.return:r[0]?o.throw||((i=o.return)&&i.call(o),0):o.next)&&!(i=i.call(o,r[1])).done)return i;switch(o=0,i&&(r=[2&r[0],i.value]),r[0]){case 0:case 1:i=r;break;case 4:return a.label++,{value:r[1],done:!1};case 5:a.label++,o=r[1],r=[0];continue;case 7:r=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==r[0]&&2!==r[0])){a=0;continue}if(3===r[0]&&(!i||r[1]>i[0]&&r[1]<i[3])){a.label=r[1];break}if(6===r[0]&&a.label<i[1]){a.label=i[1],i=r;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(r);break}i[2]&&a.ops.pop(),a.trys.pop();continue}r=e.call(t,a)}catch(t){r=[6,t],o=0}finally{n=i=0}if(5&r[0])throw r[1];return{value:r[0]?r[1]:void 0,done:!0}}([r,s])}}}Object.create;function K(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var o,i,r=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(o=r.next()).done;)a.push(o.value)}catch(t){i={error:t}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(i)throw i.error}}return a}function X(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(K(arguments[e]));return t}Object.create;var $=function(t){function e(e,n,o){var i=t.call(this)||this;return i.elementRef=e,i._commandEnabled=(new w.DelegatingValueModel).withDefault(!1),i._commandParameterProvided=!1,i.matControl=n||o,i}return B(e,t),Object.defineProperty(e.prototype,"pectinCommand",{get:function(){return this._command},set:function(t){this._command=t,this._commandEnabled.setDelegate(t?t.enabled:null)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"commandParameter",{get:function(){return this._commandParameter},set:function(t){this._commandParameterProvided=!0,this._commandParameter=t},enumerable:!1,configurable:!0}),e.prototype.ngOnInit=function(){w.assert.notNil(this.pectinCommand),this.pectinCommand instanceof w.UnaryCommand?this._commandParameterProvided||w.lang.illegalState("UnaryCommands require the command parameter to be specified."):this._commandParameterProvided&&w.lang.illegalState("command parameters are only supported by UnaryCommands")},e.prototype.ngAfterViewInit=function(){var t=this;(0,w.Dsl.disposeWith(this).when)(this._commandEnabled).changes((function(e){return t.updateEnabledState(e)}),{initialValue:"triggerChange"})},e.prototype.updateEnabledState=function(t){var e=this;this.matControl&&setTimeout((function(){e.matControl.disabled=!t}),0),t?(this.elementRef.nativeElement.removeAttribute("disabled"),"A"===this.elementRef.nativeElement.tagName&&this.elementRef.nativeElement.setAttribute("href","javascript:void")):(this.elementRef.nativeElement.setAttribute("disabled","disabled"),"A"===this.elementRef.nativeElement.tagName&&this.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 w.UnaryCommand?this.pectinCommand.withContext({event:t}).execute(this.commandParameter):this.pectinCommand.withContext({event:t}).execute():console.warn("disabled command clicked, ignoring.")},e}(w.GarbageCollector);$.decorators=[{type:n.Directive,args:[{selector:"[pectinCommand]"}]}],$.ctorParameters=function(){return[{type:n.ElementRef,decorators:[{type:n.Inject,args:[n.ElementRef]}]},{type:d.MatButton,decorators:[{type:n.Host},{type:n.Optional}]},{type:g.MatMenuItem,decorators:[{type:n.Host},{type:n.Optional}]}]},$.propDecorators={pectinCommand:[{type:n.Input}],commandParameter:[{type:n.Input}],notifyClick:[{type:n.HostListener,args:["click",["$event"]]}]};var Y=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return B(e,t),e.prototype.ngOnDestroy=function(){this.dispose()},e}(w.GarbageCollector);Y.decorators=[{type:n.Directive}];var J=function(t){function e(e,n,o,i){var r=t.call(this)||this;return r.focusTargetElement=e,r.ngZone=n,r.focusContext=i,r.document=o,(0,w.Dsl.disposeWith(r).when)(r.focusContext.focused).changes((function(t){t&&!r.alreadyHasFocus()&&r.tryAndFocus()}),{initialValue:"triggerChangeUnlessNil"}),r}return B(e,t),e.prototype.onFocusIn=function(){this.focusContext.notifyFocusIn()},e.prototype.onFocusOut=function(){this.focusContext.notifyFocusOut()},e.prototype.alreadyHasFocus=function(){return this.isElementFocused(this.focusTarget)},e.prototype.isElementFocused=function(t){return this.document.activeElement===t},e.prototype.tryAndFocus=function(t){var e=this;void 0===t&&(t=5),this.modelShouldStillHaveFocus()&&this.canFocus()&&(this.alreadyHasFocus()||this.focusTarget.focus(),this.alreadyHasFocus()||(w.Logger.get(this).log("focus failed, trying "+t+" more times"),t>0?requestAnimationFrame((function(){e.tryAndFocus(t-1)})):w.Logger.get(this).warn("Tried to focus but gave up as the component wasn't enabled or visible.")))},Object.defineProperty(e.prototype,"focusTarget",{get:function(){return this.focusTargetElement},enumerable:!1,configurable:!0}),e.prototype.modelShouldStillHaveFocus=function(){return this.focusContext.focused.value},e.prototype.canFocus=function(){var t=this.focusTarget.getBoundingClientRect();return t.height>=0&&t.height>=0&&!this.focusTarget.disabled},e}(w.GarbageCollector);J.ctorParameters=function(){return[{type:HTMLElement},{type:n.NgZone,decorators:[{type:n.Inject,args:[n.NgZone]}]},{type:void 0,decorators:[{type:n.Inject,args:[e.DOCUMENT]}]},{type:void 0}]};var Z=function(){function t(t,e){this.ngZone=t,this.document=e}return t.prototype.createBinding=function(t,e){return new J(t,this.ngZone,this.document,e)},t}();Z.ɵprov=n.ɵɵdefineInjectable({factory:function(){return new Z(n.ɵɵinject(n.NgZone),n.ɵɵinject(e.DOCUMENT))},token:Z,providedIn:"root"}),Z.decorators=[{type:n.Injectable,args:[{providedIn:"root"}]}],Z.ctorParameters=function(){return[{type:n.NgZone,decorators:[{type:n.Inject,args:[n.NgZone]}]},{type:void 0,decorators:[{type:n.Inject,args:[e.DOCUMENT]}]}]};var Q=function(t){function e(e,n){var o=t.call(this)||this;return o.el=e,o.focusBindingFactory=n,o}return B(e,t),e.prototype.onFocusIn=function(){this.hasBinding()&&this.pectinFocusBinding.notifyFocusIn()},e.prototype.onFocusOut=function(){this.hasBinding()&&this.pectinFocusBinding.notifyFocusOut()},e.prototype.ngOnInit=function(){},e.prototype.ngAfterViewInit=function(){this.hasBinding()?this.registerDisposable(this.focusBindingFactory.createBinding(this.focusTarget,this.pectinFocusBinding)):w.Logger.get(this).warn("pectinFocusBinding was nil")},e.prototype.hasBinding=function(){return!!this.pectinFocusBinding&&!!this.pectinFocusBinding},Object.defineProperty(e.prototype,"focusTarget",{get:function(){return this.focusBindingTarget||this.el.nativeElement},enumerable:!1,configurable:!0}),e}(Y);Q.decorators=[{type:n.Directive,args:[{selector:"[pectinFocusBinding]"}]}],Q.ctorParameters=function(){return[{type:n.ElementRef,decorators:[{type:n.Inject,args:[n.ElementRef]}]},{type:Z}]},Q.propDecorators={pectinFocusBinding:[{type:n.Input}],focusBindingTarget:[{type:n.Input}],onFocusIn:[{type:n.HostListener,args:["focusin"]}],onFocusOut:[{type:n.HostListener,args:["focusout"]}]};var tt=function(){};tt.decorators=[{type:n.NgModule,args:[{declarations:[$,Q],imports:[e.CommonModule,c.BrowserAnimationsModule,o.FormsModule,r.MatInputModule,i.MatFormFieldModule,a.MatSelectModule,s.MatTabsModule],exports:[$,Q]}]}];var et=function(t){function e(){return t.call(this)||this}return B(e,t),e.prototype.ngOnInit=function(){},e}(w.GarbageCollector);et.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{-ms-grid-columns:auto;-ms-grid-rows:auto;background-color:rgba(0,0,0,.2);bottom:0;display:-ms-grid;display:grid;grid-template-columns:auto;grid-template-rows:auto;left:0;place-content:center;position:absolute;right:0;top:0}"]}]}],et.ctorParameters=function(){return[]},et.propDecorators={busyModel:[{type:n.Input}],busy:[{type:n.Input}]},q([w.TrackExternal(),z("design:type",w.ValueModel)],et.prototype,"busyModel",void 0),q([w.StoreInValueModel("busyModel"),z("design:type",Boolean)],et.prototype,"busy",void 0);var nt=function(t){function e(){return t.call(this)||this}return B(e,t),e.prototype.ngOnInit=function(){},e}(Y);nt.decorators=[{type:n.Component,args:[{selector:"aup-card-container",template:'<div class="card-container">\n <ng-content></ng-content>\n\n <div class="add-card-container" *ngIf="addCardCommand.enabled.value" [pectinCommand]="addCardCommand">\n <aup-command-face *ngIf="addCardFace" [faces]="[addCardFace]"></aup-command-face>\n <aup-icon *ngIf="!addCardFace" icon="mat:add"></aup-icon>\n </div>\n\n <div class="add-card-template" *ngIf="addCardTemplate">\n <ng-container [ngTemplateOutlet]="addCardTemplate"></ng-container>\n </div>\n\n</div>\n',styles:[":root{--aup-default-background:#fff;--aup-default-padding:var(--default-padding,18px)}aup-activity-title{font-family:Roboto,Helvetica Neue,sans-serif;font-size:20px;letter-spacing:normal;line-height:32px;margin-bottom:var(--default-padding)}.router-outlet-container>*{bottom:0;left:0;position:absolute;right:0;top:0}[no-tab-header]>mat-tab-header{display:none}[full-height-tabs] .mat-tab-body-wrapper,mat-tab-group.full-height-tabs .mat-tab-body-wrapper{flex:1}[full-height-tabs] .mat-tab-body-wrapper .mat-tab-body-content,[full-height-tabs] .mat-tab-body-wrapper mat-tab-body,mat-tab-group.full-height-tabs .mat-tab-body-wrapper .mat-tab-body-content,mat-tab-group.full-height-tabs .mat-tab-body-wrapper mat-tab-body{display:flex;flex-direction:column;justify-content:stretch}.dialog-interaction-context,.dialog-interaction-context mat-dialog-container{max-height:95vh!important;max-width:95vw!important}.dialog-interaction-context mat-dialog-container{padding:0}.activity-outlet-wrapper{align-items:stretch;display:flex;flex-direction:column}.aup-popup-interaction-panel{background:var(--aup-default-background,#fff);box-shadow:0 2px 1px -1px rgba(0,0,0,.2),0 1px 1px 0 rgba(0,0,0,.14),0 1px 3px 0 rgba(0,0,0,.12);transition:box-shadow .28s cubic-bezier(.4,0,.2,1)}.aup-input-activity{padding:calc(var(--aup-default-padding)/2)}.aup-input-component{display:block}.aup-input-component input,.aup-input-component mat-form-field{width:100%}.aup-input-component input mat-hint.faux-error,.aup-input-component mat-form-field mat-hint.faux-error{color:#f44336}.aup-input-component.dense mat-form-field .mat-form-field-infix{border-top:none}.aup-input-component.dense mat-form-field .mat-form-field-flex{padding-top:0}.aup-input-component.dense mat-form-field .mat-form-field-wrapper{border-bottom:0;padding-bottom:0}.aup-input-component.dense mat-form-field .mat-form-field-underline{bottom:0}.aup-input-component.dense mat-form-field.mat-form-field-can-float.mat-form-field-should-float .mat-form-field-label-wrapper{display:none}.aup-input-component.dense mat-form-field.mat-form-field-appearance-standard.mat-form-field-has-label .mat-select:not(.mat-select-empty) .mat-select-arrow-wrapper{transform:translateY(0)}aup-table-cell-renderer>.aup-input-component .mat-form-field-flex{padding-top:0}aup-table-cell-renderer>.aup-input-component .mat-form-field-infix{width:0}aup-table-cell-renderer>.aup-input-component .mat-form-field-label-wrapper{display:none}aup-table{--default-column-gap:var(--column-gap,24px);--resolved-row-hover-background-color:var(--row-hover-background-color,rgba(0,0,0,0.05));--resolved-row-selected-background-color:var(--row-selected-background-color,rgba(0,0,255,0.04))}aup-table .mat-table td.mat-cell:first-of-type,aup-table .mat-table td.mat-footer-cell:first-of-type,aup-table .mat-table th.mat-header-cell:first-of-type{padding-left:0}aup-table .mat-table tr.enable-hover:hover{background-color:var(--resolved-row-hover-background-color)}aup-table .mat-table tr.aup-row-selected,aup-table .mat-table tr.aup-row-selected.enable-hover:hover{background-color:var(--resolved-row-selected-background-color)}aup-table .mat-table td.enable-cursor{cursor:pointer}aup-table .mat-table .mat-cell:not(.flex),aup-table .mat-table .mat-header-cell:not(.flex){white-space:nowrap;width:1px}aup-table aup-table-cell-renderer,aup-table aup-table-header-cell-renderer{align-items:stretch;display:flex;flex-direction:column;height:100%;justify-content:center;min-height:47px}aup-table aup-table-cell-renderer.first-column,aup-table aup-table-cell-renderer:not(.first-column),aup-table aup-table-header-cell-renderer.first-column,aup-table aup-table-header-cell-renderer:not(.first-column){padding-left:var(--default-column-gap)}aup-table aup-table-cell-renderer.fillCell{justify-content:stretch;padding-left:0!important}aup-table aup-table-cell-renderer.padChild>:first-child{flex:1;padding-left:var(--default-column-gap)}:root{--aup-command-face-icon-gap:8px;--aup-fa-icon-width:18px;--aup-icon-width:24px}aup-icon{--fa-icon-offset:calc((var(--aup-icon-width) - var(--aup-fa-icon-width))/2);position:relative}aup-icon fa-icon .svg-inline--fa{height:var(--aup-fa-icon-width)!important;left:var(--fa-icon-offset);position:absolute;top:var(--fa-icon-offset);width:var(--aup-fa-icon-width)!important}.mat-menu-panel aup-icon .svg-inline--fa{opacity:.54}:host{--resolved-card-background:var(--card-background,#fcfcfb);--resolved-card-gap:var(--card-gap,16px);--resolved-card-height:var(--card-height,auto);--resolved-card-min-height:var(--card-min-height,auto);--resolved-card-width:var(--card-width,300px);background:var(--resolved-card-background);display:block;flex:1}.card-container{box-sizing:border-box;display:-ms-grid;display:grid;grid-gap:var(--resolved-card-gap);grid-template-columns:repeat(auto-fill,var(--resolved-card-width));grid-template-rows:repeat(auto-fit,minmax(var(--resolved-card-min-height),var(--resolved-card-height)));max-width:100%;min-height:calc(var(--resolved-card-height) + 2*var(--resolved-card-gap));min-width:calc(var(--resolved-card-width) + 2*var(--resolved-card-gap));padding:var(--resolved-card-gap);width:calc((var(--resolved-card-width) + var(--resolved-card-gap))*2 + var(--grid-gap))}.add-card-container{align-items:center;background-color:hsla(0,0%,100%,.8);border:2px dashed rgba(0,0,0,.1);border-radius:6px;box-sizing:border-box;color:rgba(0,0,0,.54);cursor:pointer;display:flex;flex-direction:column;font-weight:300;height:var(--resolved-card-height);justify-content:center;min-height:var(--resolved-card-min-height);transition:all .28s cubic-bezier(.4,0,.2,1);width:var(--resolved-card-width)}.add-card-container mat-icon{font-size:200%}.add-card-container:hover{background-color:#fff;border-color:transparent;color:rgba(0,0,0,.54);transition:box-shadow .28s cubic-bezier(.4,0,.2,1);transition:all .28s cubic-bezier(.4,0,.2,1)}.add-card-container:hover:hover{box-shadow:0 2px 4px -1px rgba(0,0,0,.2),0 4px 5px 0 rgba(0,0,0,.14),0 1px 10px 0 rgba(0,0,0,.12)}.add-card-template-container{align-items:stretch;display:flex;flex-direction:column;height:var(--resolved-card-height);justify-content:stretch;width:var(--resolved-card-width)}"]}]}],nt.ctorParameters=function(){return[]},nt.propDecorators={addCardCommand:[{type:n.Input}],addCardFace:[{type:n.Input}],addCardTemplate:[{type:n.ContentChild,args:["addCardTemplate"]}]},q([w.TrackExternal(),z("design:type",w.Command)],nt.prototype,"addCardCommand",void 0),function(t){!function(t){t.START="start",t.END="end"}(t.Position||(t.Position={})),t.Style=P.Enum({FLAT:"flat",STROKED:"stroked",RAISED:"raised"}),t.getColorOf=function(t){return V.default.isFunction(null==t?void 0:t.color)?t.color():void 0},t.getStyleOf=function(t){return V.default.isFunction(null==t?void 0:t.style)?t.style():void 0},t.getIconOf=function(t){return V.default.isFunction(null==t?void 0:t.icon)?t.icon():void 0},t.getIconPositionOf=function(t){return V.default.isFunction(null==t?void 0:t.iconPosition)?t.iconPosition():void 0},t.getTooltipOf=function(t){return V.default.isFunction(null==t?void 0:t.tooltip)?t.tooltip():void 0},t.getTextOf=function(t){return V.default.isFunction(null==t?void 0:t.text)?t.text():void 0};var e=function(){function e(t){this.face=t}return Object.defineProperty(e.prototype,"text",{get:function(){return t.getTextOf(this.face)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"icon",{get:function(){return t.getIconOf(this.face)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"iconPosition",{get:function(){return t.getIconPositionOf(this.face)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"tooltip",{get:function(){return t.getTooltipOf(this.face)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"iconPositionStart",{get:function(){return this.iconPosition===t.Position.START},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"iconPositionEnd",{get:function(){return this.iconPosition===t.Position.END},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"color",{get:function(){return t.getColorOf(this.face)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"style",{get:function(){return t.getStyleOf(this.face)},enumerable:!1,configurable:!0}),e}();q([x.Memoize(),z("design:type",Object),z("design:paramtypes",[])],e.prototype,"text",null),q([x.Memoize(),z("design:type",Object),z("design:paramtypes",[])],e.prototype,"icon",null),q([x.Memoize(),z("design:type",Object),z("design:paramtypes",[])],e.prototype,"iconPosition",null),q([x.Memoize(),z("design:type",Object),z("design:paramtypes",[])],e.prototype,"tooltip",null),q([x.Memoize(),z("design:type",Boolean),z("design:paramtypes",[])],e.prototype,"iconPositionStart",null),q([x.Memoize(),z("design:type",Boolean),z("design:paramtypes",[])],e.prototype,"iconPositionEnd",null),q([x.Memoize(),z("design:type",String),z("design:paramtypes",[])],e.prototype,"color",null),q([x.Memoize(),z("design:type",String),z("design:paramtypes",[])],e.prototype,"style",null),t.Adapter=e}(t.CommandFace||(t.CommandFace={}));var ot=function(e){function n(){var n=e.call(this)||this;n.facesModel=new w.MutableListModel,n.ignoreIcon=!1,n.ignoreText=!1,n.includeMissingIconInLayout=!1;var o=w.Dsl.disposeWith(n),i=o.chain;o.valueOf,o.before,o.when,o.after,o.observe,o.switchOn;n.faceAdapters=i(n.facesModel).map((function(e){return new t.CommandFace.Adapter(e)}));var r=n.faceAdapters.first();return n.activeIcon=r.pluck("icon"),n.activeColor=r.pluck("color"),n}return B(n,e),Object.defineProperty(n.prototype,"requiresMissingIconInLayout",{get:function(){return this.includeMissingIconInLayout&&!this.activeIcon.value},enumerable:!1,configurable:!0}),n.prototype.ngOnInit=function(){},n.prototype.shouldIncludeIcon=function(t){return!this.ignoreIcon&&t.icon||this.includeMissingIconInLayout},n.prototype.hasIconStart=function(e){return this.shouldIncludeIcon(e)&&(!e.iconPosition||e.iconPosition===t.CommandFace.Position.START)},n.prototype.hasIconEnd=function(e){return this.shouldIncludeIcon(e)&&e.iconPosition===t.CommandFace.Position.END},Object.defineProperty(n.prototype,"color",{get:function(){return this.activeColor.value},enumerable:!1,configurable:!0}),n}(Y);ot.decorators=[{type:n.Component,args:[{selector:"aup-command-face",template:'<div class="face-container" *ngFor="let face of faceAdapters.value">\n <aup-icon *ngIf="hasIconStart(face)" [icon]="face.icon"></aup-icon>\n <span *ngIf="face.text">{{face.text}}</span>\n <aup-icon *ngIf="hasIconEnd(face)" [icon]="face.icon"></aup-icon>\n</div>\n',encapsulation:n.ViewEncapsulation.None,styles:["aup-command-face{--icon-gap:var(--aup-command-face-icon-gap);display:-ms-inline-grid;display:inline-grid}aup-command-face>.face-container{-ms-grid-column:1;-ms-grid-row:1;align-items:center;display:inline-flex;flex-direction:row;grid-column:1;grid-row:1}aup-command-face>.face-container:not(:first-child){visibility:hidden}aup-command-face>.face-container *+*{margin-left:var(--icon-gap)}aup-command-face.hide-icon aup-icon{visibility:hidden}aup-command-face.centered{justify-items:center}"]}]}],ot.ctorParameters=function(){return[]},ot.propDecorators={_rawFaces:[{type:n.Input,args:["faces"]}],ignoreIcon:[{type:n.Input}],ignoreText:[{type:n.Input}],includeMissingIconInLayout:[{type:n.Input}],requiresMissingIconInLayout:[{type:n.HostBinding,args:["class.hide-icon"]}],color:[{type:n.HostBinding,args:["attr.color"]}]},q([w.StoreInListModel("facesModel"),z("design:type",Array)],ot.prototype,"_rawFaces",void 0);var it=function(t){function e(e,n){var o=t.call(this)||this;return o.element=e,o.parent=n,n&&o.registerDisposable(o.parent.register(o)),o}return B(e,t),Object.defineProperty(e.prototype,"componentIndex",{get:function(){return this.computeComponentIndex()},enumerable:!1,configurable:!0}),e.prototype.computeComponentIndex=function(){for(var t=this.element.nativeElement,e=0;t=t.previousElementSibling;)e++;return e},e.prototype.getFace=function(){},e}(Y),rt=new n.InjectionToken("popup-component"),at=function(e){function n(n,o){var i=e.call(this,n,o)||this;i.CommandFace=t.CommandFace;var r=w.Dsl.disposeWith(i),a=r.chain;r.switchOn;return i.faces=a(i.command.busy).mapToList((function(t){return t?[i.busyFaceModel.value,i.faceModel.value]:[i.faceModel.value,i.busyFaceModel.value]}),{allowNil:!0,dependsOn:[i.faceModel,i.busyFaceModel]}).rejectNil(),i.activeFace=i.faces.first(),i.buttonStyle=a(i.activeFace).map((function(e){return t.CommandFace.getStyleOf(e)})),i.colorModel=a(i.activeFace).map((function(e){return t.CommandFace.getColorOf(e)})),i}return B(n,e),n.prototype.isActive=function(t){return this.activeFace.query().equals(t)},n.prototype.ngOnInit=function(){},n.prototype.ngAfterViewInit=function(){},n.prototype.getFace=function(){return this.face},n}(it);at.decorators=[{type:n.Component,args:[{selector:"aup-command",template:'<ng-container [ngSwitch]="buttonStyle.value">\n <ng-container *ngSwitchCase="CommandFace.Style.STROKED">\n <button mat-stroked-button [pectinCommand]="command" [color]="colorModel.value" [class.busy]="command.busy.value">\n <aup-command-face class="centered" [faces]="faces.value"></aup-command-face>\n </button>\n </ng-container>\n <ng-container *ngSwitchCase="CommandFace.Style.RAISED">\n <button mat-raised-button [pectinCommand]="command" [color]="colorModel.value" [class.busy]="command.busy.value">\n <aup-command-face class="centered" [faces]="faces.value"></aup-command-face>\n </button>\n </ng-container>\n <ng-container *ngSwitchDefault>\n <button mat-button [pectinCommand]="command" [color]="colorModel.value" [class.busy]="command.busy.value">\n <aup-command-face class="centered" [faces]="faces.value"></aup-command-face>\n </button>\n </ng-container>\n</ng-container>\n',styles:[":host{display:inline-flex;flex-direction:row;justify-content:stretch}button{flex:1}"]}]}],at.ctorParameters=function(){return[{type:n.ElementRef},{type:void 0,decorators:[{type:n.Inject,args:[rt]},{type:n.Optional}]}]},at.propDecorators={command:[{type:n.Input}],faceModel:[{type:n.Input}],face:[{type:n.Input}],busyFaceModel:[{type:n.Input}],busyFace:[{type:n.Input}]},q([w.TrackExternal(),z("design:type",w.Command)],at.prototype,"command",void 0),q([w.TrackExternal(),z("design:type",w.ValueModel)],at.prototype,"faceModel",void 0),q([w.StoreInValueModel("faceModel"),z("design:type",Object)],at.prototype,"face",void 0),q([w.TrackExternal(),z("design:type",w.ValueModel)],at.prototype,"busyFaceModel",void 0),q([w.StoreInValueModel("busyFaceModel"),z("design:type",Object)],at.prototype,"busyFace",void 0);var st=function(t){function e(){return t.call(this)||this}return B(e,t),e.prototype.ngOnInit=function(){},e}(Y);st.decorators=[{type:n.Component,args:[{selector:"aup-flex",template:""}]}],st.ctorParameters=function(){return[]};var ct=function(e){function n(n,o){var i=e.call(this,n,o)||this;i._unorderedChildren=new w.MutableListModel,i.faceModelDelegate=new w.DelegatingValueModel,i.xPosition="after",i.yPosition="below";var r=w.Dsl.disposeWith(i),a=r.chain;r.valueOf,r.before,r.when,r.after,r.observe,r.switchOn;return i.faceAdapterModel=a(i.faceModelDelegate).map((function(e){return new t.CommandFace.Adapter(e)})),i.children=a(i._unorderedChildren).sortBy("componentIndex"),i}return B(n,e),n.prototype.ngAfterContentChecked=function(){this._unorderedChildren.value=X(this._unorderedChildren.value)},Object.defineProperty(n.prototype,"faceAdapter",{get:function(){var e,n;return this.faceAdapterModel||console.error("Somehow faceAdapterModel is nil -- set a break point here and let me know what's going on"),null!==(n=null===(e=this.faceAdapterModel)||void 0===e?void 0:e.value)&&void 0!==n?n:new t.CommandFace.Adapter(void 0)},enumerable:!1,configurable:!0}),n.prototype.isRoot=function(){return!this.parent},n.prototype.register=function(t){var e=this;return this._unorderedChildren.push(t),w.Disposable.disposableThatRuns((function(){e._unorderedChildren.remove(t)}))},n.prototype.onCommandFired=function(){this.triggers.forEach((function(t){t.menuOpen&&t.closeMenu()}))},n.prototype.getFace=function(){return this.faceAdapter.face},n}(it);ct.decorators=[{type:n.Component,args:[{selector:"aup-abstract-popup-menu",template:""}]}],ct.ctorParameters=function(){return[{type:n.ElementRef},{type:void 0,decorators:[{type:n.Inject,args:[rt]}]}]},ct.propDecorators={xPosition:[{type:n.Input}],yPosition:[{type:n.Input}],triggers:[{type:n.ViewChildren,args:[g.MatMenuTrigger]}]};var lt=function(t){function e(e,n){var o=t.call(this,e,n)||this;o.tooltipModel=new w.MutableValueModel;var i=w.Dsl.disposeWith(o),r=i.chain;i.valueOf,i.before,i.when,i.after,i.observe,i.switchOn;return o.faceModelDelegate.setDelegate(r(o.tooltipModel).map((function(t){return{icon:function(){return"mat:more_vert"},tooltip:function(){return t}}}),{allowNil:!0})),o}return B(e,t),Object.defineProperty(e.prototype,"face",{get:function(){return this.faceModelDelegate.value},enumerable:!1,configurable:!0}),e}(ct);lt.decorators=[{type:n.Component,args:[{selector:"aup-more-menu",template:'<div class="content" style="display: none">\n <ng-content></ng-content>\n</div>\n<ng-container *ngIf="isRoot()">\n <ng-container *ngIf="faceAdapter.text" [ngSwitch]="faceAdapter.style">\n <ng-container *ngSwitchCase="\'stroked\'">\n <button matMenuTrigger\n [matMenuTriggerFor]="subMenu.menuComponent"\n [matTooltip]="faceAdapter.tooltip"\n [color]="faceAdapter.color"\n mat-stroked-button>\n <aup-command-face [faces]="[face]"></aup-command-face>\n </button>\n <aup-popup-menu-renderer #subMenu\n [parent]="this"\n (commandFired)="onCommandFired()"></aup-popup-menu-renderer>\n </ng-container>\n\n <ng-container *ngSwitchCase="\'raised\'">\n <button matMenuTrigger\n [matMenuTriggerFor]="subMenu.menuComponent"\n [matTooltip]="faceAdapter.tooltip"\n [color]="faceAdapter.color"\n mat-raised-button>\n <aup-command-face [faces]="[face]"></aup-command-face>\n </button>\n <aup-popup-menu-renderer #subMenu\n [parent]="this"\n (commandFired)="onCommandFired()"></aup-popup-menu-renderer>\n </ng-container>\n\n <ng-container *ngSwitchDefault>\n <button matMenuTrigger\n [matMenuTriggerFor]="subMenu.menuComponent"\n [matTooltip]="faceAdapter.tooltip"\n [color]="faceAdapter.color"\n mat-button>\n <aup-command-face [faces]="[face]"></aup-command-face>\n </button>\n <aup-popup-menu-renderer #subMenu [parent]="this" (commandFired)="onCommandFired()"></aup-popup-menu-renderer>\n </ng-container>\n\n </ng-container>\n\n <ng-container *ngIf="!faceAdapter.text">\n <button matMenuTrigger\n mat-icon-button\n [matMenuTriggerFor]="subMenu.menuComponent"\n [matTooltip]="faceAdapter.tooltip"\n [color]="faceAdapter.color"\n >\n <aup-command-face [faces]="[face]"></aup-command-face>\n </button>\n <aup-popup-menu-renderer #subMenu\n [parent]="this"\n (commandFired)="onCommandFired()"></aup-popup-menu-renderer>\n </ng-container>\n</ng-container>\n',providers:[{provide:rt,useExisting:lt}]}]}],lt.ctorParameters=function(){return[{type:n.ElementRef},{type:void 0,decorators:[{type:n.Inject,args:[rt]},{type:n.Optional},{type:n.SkipSelf}]}]},lt.propDecorators={tooltip:[{type:n.Input}]},q([w.StoreInValueModel("tooltipModel"),z("design:type",String)],lt.prototype,"tooltip",void 0),(t.TrackBy||(t.TrackBy={})).byIndex=function(t,e){return e},t.CommandContainer=function(t){function e(e){var n=t.call(this)||this;return n.parent=e,n}return B(e,t),Object.defineProperty(e.prototype,"depth",{get:function(){return this.hasParent()?this.parent.depth+1:0},enumerable:!1,configurable:!0}),e.prototype.hasParent=function(){return!!this.parent},Object.defineProperty(e.prototype,"orientation",{get:function(){return e.Orientation.VERTICAL},enumerable:!1,configurable:!0}),e}(w.GarbageCollector),(t.CommandContainer||(t.CommandContainer={})).Orientation=P.Enum({HORIZONTAL:"horizontal",VERTICAL:"vertical"});var ut=function(e){function n(){return e.call(this)||this}return B(n,e),Object.defineProperty(n.prototype,"orientation",{get:function(){return t.CommandContainer.Orientation.HORIZONTAL},enumerable:!1,configurable:!0}),n.prototype.ngOnInit=function(){},n.prototype.ngAfterContentInit=function(){},n.prototype.ngAfterViewInit=function(){},n}(t.CommandContainer);ut.decorators=[{type:n.Component,args:[{selector:"aup-tool-bar",template:'<div class="toolbar-content"><ng-content></ng-content></div>',encapsulation:n.ViewEncapsulation.None,styles:[":host{display:inline-block}.toolbar-content{align-items:center;display:inline-flex;flex-direction:row}.toolbar-content>aup-separator{-ms-grid-row-align:stretch;align-self:stretch;margin:4px 0 4px 8px}.toolbar-content>aup-flex{flex:1}.toolbar-content>*+*{margin-left:8px}"]}]}],ut.ctorParameters=function(){return[]};var pt=function(e){function n(t,n,o){var i=e.call(this,t,n)||this;return i.containerParent=o,i}return B(n,e),n.prototype.isHorizontalContainer=function(){return this.containerParent instanceof ut&&this.containerParent.orientation===t.CommandContainer.Orientation.HORIZONTAL},n.prototype.ngOnInit=function(){},n}(it);pt.decorators=[{type:n.Component,args:[{selector:"aup-separator",template:'\n <mat-divider [vertical]="!isHorizontalContainer()"></mat-divider>',styles:[":host {\n }",":host(.horizontal-container) {\n display: inline-flex;\n flex-direction: row;\n align-items: stretch;\n }"]}]}],pt.ctorParameters=function(){return[{type:n.ElementRef},{type:void 0,decorators:[{type:n.Optional},{type:n.Inject,args:[rt]}]},{type:t.CommandContainer,decorators:[{type:n.Optional}]}]},pt.propDecorators={isHorizontalContainer:[{type:n.HostBinding,args:["class.horizontal-container"]}]};var dt=function(e){function o(){var o=e.call(this)||this;o._childList=new w.DelegatingListModel,o.commandFired=new n.EventEmitter,o.TrackBy=t.TrackBy;var i=w.Dsl.disposeWith(o),r=i.chain,a=i.valueOf,s=(i.before,i.when,i.after,i.observe,i.switchOn,r(o._childList).map((function(t){return t.getFace()})).rejectNil()),c=s.select((function(e){return!!t.CommandFace.getIconOf(e)})).count(),l=s.count();return o.hasMixedIcons=a.all(c.isGreaterThan(0),l.doesNotEqual(c)).areTruthy(),o}return B(o,e),Object.defineProperty(o.prototype,"parent",{get:function(){return this._parentComponent},set:function(t){this._parentComponent=t,this._childList.setDelegate(t.children)},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"children",{get:function(){return this.parent.children.value},enumerable:!1,configurable:!0}),o.prototype.executeCommand=function(t){var e=this;this.isCommand(t)&&t.command.execute().finally((function(){e.commandFired.emit()}))},o.prototype.isEnabled=function(t){return!0},o.prototype.onCommandFired=function(){this.commandFired.emit(),this.triggers.forEach((function(t){t.menuOpen&&t.closeMenu()}))},o.prototype.isCommand=function(t){return t instanceof at},o.prototype.isPopupMenu=function(t){return t instanceof ct},o.prototype.isSeparator=function(t){return t instanceof pt},o.prototype.getTooltip=function(e){return this.isCommand(e)?t.CommandFace.getTooltipOf(e.face):void 0},o.prototype.getFaces=function(t){return this.isCommand(t)?t.faces.value:this.isPopupMenu(t)?[t.faceAdapter.face]:void 0},o}(Y);dt.decorators=[{type:n.Component,args:[{selector:"aup-popup-menu-renderer",template:'<mat-menu #menu [xPosition]="parent.xPosition" [yPosition]="parent.yPosition">\n <ng-template matMenuContent>\n <ng-container *ngFor="let child of children; trackBy: TrackBy.byIndex" >\n <button *ngIf="isCommand(child)"\n (click)="executeCommand(child)"\n [disabled]="!isEnabled(child)"\n [matTooltip]="getTooltip(child)"\n mat-menu-item>\n <aup-command-face [faces]="getFaces(child)"\n [includeMissingIconInLayout]="hasMixedIcons.value"></aup-command-face>\n </button>\n\n <ng-container *ngIf="isPopupMenu(child)">\n <button mat-menu-item\n matMenuTrigger\n [matMenuTriggerFor]="innerPanel.menuComponent"\n >\n <aup-command-face [faces]="getFaces(child)"\n [includeMissingIconInLayout]="hasMixedIcons.value"></aup-command-face>\n </button>\n <aup-popup-menu-renderer #innerPanel\n [parent]="child"\n (commandFired)="onCommandFired()"></aup-popup-menu-renderer>\n </ng-container>\n\n <mat-divider *ngIf="isSeparator(child)"></mat-divider>\n\n </ng-container>\n\n </ng-template>\n</mat-menu>\n'}]}],dt.ctorParameters=function(){return[]},dt.propDecorators={parent:[{type:n.Input}],menuComponent:[{type:n.ViewChild,args:["menu",{static:!0}]}],commandFired:[{type:n.Output}],triggers:[{type:n.ViewChildren,args:[g.MatMenuTrigger]}]};var ft=function(t){function e(e,n){var o=t.call(this,e,n)||this,i=w.Dsl.disposeWith(o);i.chain,i.valueOf,i.before,i.when,i.after,i.observe,i.switchOn;return o}return B(e,t),e}(ct);ft.decorators=[{type:n.Component,args:[{selector:"aup-popup-menu",template:'<div class="content" style="display: none">\n <ng-content></ng-content>\n</div>\n<ng-container *ngIf="isRoot()">\n <ng-container *ngIf="faceAdapter.text" [ngSwitch]="faceAdapter.style">\n <ng-container *ngSwitchCase="\'stroked\'">\n <button matMenuTrigger\n [matMenuTriggerFor]="subMenu.menuComponent"\n [matTooltip]="faceAdapter.tooltip"\n [color]="faceAdapter.color"\n mat-stroked-button>\n <aup-command-face [faces]="[face]"></aup-command-face>\n </button>\n <aup-popup-menu-renderer #subMenu\n [parent]="this"\n (commandFired)="onCommandFired()"></aup-popup-menu-renderer>\n </ng-container>\n\n <ng-container *ngSwitchCase="\'raised\'">\n <button matMenuTrigger\n [matMenuTriggerFor]="subMenu.menuComponent"\n [matTooltip]="faceAdapter.tooltip"\n [color]="faceAdapter.color"\n mat-raised-button>\n <aup-command-face [faces]="[face]"></aup-command-face>\n </button>\n <aup-popup-menu-renderer #subMenu\n [parent]="this"\n (commandFired)="onCommandFired()"></aup-popup-menu-renderer>\n </ng-container>\n\n <ng-container *ngSwitchDefault>\n <button matMenuTrigger\n [matMenuTriggerFor]="subMenu.menuComponent"\n [matTooltip]="faceAdapter.tooltip"\n [color]="faceAdapter.color"\n mat-button>\n <aup-command-face [faces]="[face]"></aup-command-face>\n </button>\n <aup-popup-menu-renderer #subMenu [parent]="this" (commandFired)="onCommandFired()"></aup-popup-menu-renderer>\n </ng-container>\n\n </ng-container>\n\n <ng-container *ngIf="!faceAdapter.text">\n <button matMenuTrigger\n mat-icon-button\n [matMenuTriggerFor]="subMenu.menuComponent"\n [matTooltip]="faceAdapter.tooltip"\n [color]="faceAdapter.color"\n >\n <aup-command-face [faces]="[face]"></aup-command-face>\n </button>\n <aup-popup-menu-renderer #subMenu\n [parent]="this"\n (commandFired)="onCommandFired()"></aup-popup-menu-renderer>\n </ng-container>\n</ng-container>\n',providers:[{provide:rt,useExisting:ft}]}]}],ft.ctorParameters=function(){return[{type:n.ElementRef},{type:void 0,decorators:[{type:n.Inject,args:[rt]},{type:n.Optional},{type:n.SkipSelf}]}]},ft.propDecorators={faceModel:[{type:n.Input}],face:[{type:n.Input}]},q([w.TrackExternal({delegateTo:"faceModelDelegate"}),z("design:type",w.ValueModel)],ft.prototype,"faceModel",void 0),q([w.StoreInValueModel("faceModel"),z("design:type",Object)],ft.prototype,"face",void 0);var ht=function(){function t(){}return t.prototype.ngOnInit=function(){},t}();ht.decorators=[{type:n.Component,args:[{selector:"aup-empty-state",template:'\n <div class="container">\n <ng-content></ng-content>\n </div>\n ',styles:[":host{align-items:center;display:flex;flex-direction:column;justify-content:center}.container{border:2px dashed rgba(0,0,0,.2);border-radius:5px;font-size:14px;font-weight:300;padding:var(--aup-default-padding)}"]}]}],ht.ctorParameters=function(){return[]};var mt=function(t){function e(e){var n=t.call(this)||this;return n.focusManager=e,n.restoreFocusCommand=w.Command.create((function(){n.restoreFocus()})),n.tabIndex=-1,n}return B(e,t),e.prototype.ngOnInit=function(){},e.prototype.restoreFocus=function(){this.focusManager.restoreFocus()},e}(Y);mt.decorators=[{type:n.Component,args:[{selector:"aup-focus-container",template:"<ng-content></ng-content>\n",providers:[{provide:w.FocusManager}],styles:[":host{display:block}"]}]}],mt.ctorParameters=function(){return[{type:w.FocusManager,decorators:[{type:n.Self}]}]},mt.propDecorators={tabIndex:[{type:n.HostBinding,args:["attr.tabindex"]}]};var gt=function(t){function e(e,n,o){var i=t.call(this)||this;i.el=e,i.focusManager=n;var r=w.Dsl.disposeWith(i);r.chain,r.valueOf,r.before,r.when,r.after,r.observe,r.switchOn;return i.focusManager&&(i._focusContext=i.focusManager.registerFocusable(i),i.registerDisposable(i._focusContext),i.registerDisposable(o.createBinding(e.nativeElement,i.focusContext))),i}return B(e,t),Object.defineProperty(e.prototype,"focusable",{get:function(){return this.focusContext?0:void 0},enumerable:!1,configurable:!0}),e.prototype.onFocus=function(){var t;null===(t=this.focusContext)||void 0===t||t.notifyFocusIn()},e.prototype.onBlur=function(){var t;null===(t=this.focusContext)||void 0===t||t.notifyFocusOut()},Object.defineProperty(e.prototype,"focusContext",{get:function(){return this._focusContext},enumerable:!1,configurable:!0}),e}(Y);gt.decorators=[{type:n.Component,args:[{template:""}]}],gt.ctorParameters=function(){return[{type:n.ElementRef},{type:w.FocusManager},{type:Z}]},gt.propDecorators={focusable:[{type:n.HostBinding,args:["attr.tabindex"]}],onFocus:[{type:n.HostListener,args:["focus"]}],onBlur:[{type:n.HostListener,args:["blur"]}]};var yt=function(t){function e(){var e=t.call(this)||this;e.onValueEditedListeners=new w.EventListenerList,e.dense=!1,e.focus=new n.EventEmitter,e.blur=new n.EventEmitter,e.enterKey=new n.EventEmitter,e.escapeKey=new n.EventEmitter,e.baseClassName="aup-input-component";var o=e;return e.errorStateMatcher={isErrorState:function(t,e){return o.hasErrors()}},e}return B(e,t),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.formValueModel.enabled},enumerable:!1,configurable:!0}),e.prototype.hasErrors=function(){return!this.errorList.query().isEmpty()},Object.defineProperty(e.prototype,"errorList",{get:function(){return this.formValueModel.errorList},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"firstError",{get:function(){return this.hasErrors()?this.errorList.value[0]:null},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"focusContext",{get:function(){return this.formValueModel.focusContext},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"floatLabel",{get:function(){return this.dense?"never":this.userFloatLabel},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"showHint",{get:function(){return!this.dense&&!!this.hint},enumerable:!1,configurable:!0}),e.prototype.onValueEdited=function(t){return this.onValueEditedListeners.add(t)},e}(Y);yt.decorators=[{type:n.Component,args:[{template:""}]}],yt.ctorParameters=function(){return[]},yt.propDecorators={label:[{type:n.Input}],userFloatLabel:[{type:n.Input,args:["floatLabel"]}],hint:[{type:n.Input}],placeholder:[{type:n.Input}],dense:[{type:n.HostBinding,args:["class.dense"]},{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}],baseClassName:[{type:n.HostBinding,args:["class"]}],notifyClick:[{type:n.HostListener,args:["click"]}],notifyFocusIn:[{type:n.HostListener,args:["focusin"]}],notifyFocusOut:[{type:n.HostListener,args:["focusout"]}]};var vt=function(t){function e(){var e=t.call(this)||this;e.formValueModel=e.registerDisposable(new w.Form.DelegatingListModel),e.componentListModel=new w.MutableListModel,e.setValueIsInProgress=new w.Guard,e.valueChange=new n.EventEmitter;var o=w.Dsl.disposeWith(e),i=o.when,r=o.valueOf,a=o.chain,s=new w.Binding.Identity(e.formValueModel,e.componentListModel).writeRight(),c=r.any(e.setValueIsInProgress,a(s.direction).equals(w.Binding.Direction.RIGHT)).areTruthy();return i(e.componentListModel).changes((function(t,n){e.valueChange.emit(t),e.onValueEditedListeners.fire((function(e){return e(t,n)}))}),{initialValue:"ignore",unless:c}),w.DebugContext.tag(e.formValueModel,e.constructor.name+".formValueModel"),e}return B(e,t),Object.defineProperty(e.prototype,"value",{set:function(t){var e=this;this.setValueIsInProgress.whileTrue((function(){e.listHolder?e.listHolder.value=t:(e.listHolder=new w.MutableListModel(t),e.listModel=e.listHolder)}))},enumerable:!1,configurable:!0}),e}(yt);vt.decorators=[{type:n.Component,args:[{template:""}]}],vt.ctorParameters=function(){return[]},vt.propDecorators={listModel:[{type:n.Input}],value:[{type:n.Input}],valueChange:[{type:n.Output}]},q([w.TrackExternal({delegateTo:"formValueModel"}),z("design:type",Object)],vt.prototype,"listModel",void 0);var bt=function(t){function e(){var e=t.call(this)||this;e.formValueModel=e.registerDisposable(new w.Form.DelegatingValueModel),e.setValueInProgress=new w.Guard,e.componentValueModel=new w.MutableValueModel,e.valueChange=new n.EventEmitter;var o=w.Dsl.disposeWith(e),i=o.when,r=o.chain,a=o.valueOf,s=new w.Binding.Identity(e.formValueModel,e.componentValueModel).writeRight(),c=a.any(e.setValueInProgress,r(s.direction).equals(w.Binding.Direction.RIGHT)).areTruthy();return i(e.componentValueModel).changes((function(t,n){e.valueChange.emit(t),e.onValueEditedListeners.fire((function(e){return e(t,n)}))}),{initialValue:"ignore",unless:c}),w.DebugContext.tag(e.formValueModel,e.constructor.name+".formValueModel"),e}return B(e,t),Object.defineProperty(e.prototype,"value",{set:function(t){var e=this;this.setValueInProgress.whileTrue((function(){e.plainValueHolder?e.plainValueHolder.value=t:(e.plainValueHolder=new w.MutableValueModel(t),e.valueModel=e.plainValueHolder)}))},enumerable:!1,configurable:!0}),e}(yt);bt.decorators=[{type:n.Component,args:[{template:""}]}],bt.ctorParameters=function(){return[]},bt.propDecorators={valueModel:[{type:n.Input}],value:[{type:n.Input}],valueChange:[{type:n.Output}]},q([w.TrackExternal({delegateTo:"formValueModel"}),z("design:type",Object)],bt.prototype,"valueModel",void 0);var Ct=function(t){function e(){var e=t.call(this)||this;e.filterValue=new w.MutableValueModel,e.optionLabelFormat=function(t){return t&&e.optionLabel?t[e.optionLabel]:t};var n=w.Dsl.disposeWith(e),o=n.chain,i=(n.valueOf,n.before,n.when,n.after,n.observe,n.switchOn,o(e.filterValue).map((function(t){return V.default.isString(t)?t.toLowerCase():""})));return e.filteredOptions=o(e.optionsModel).select((function(t){return V.default.isEmpty(e.filterValue.value)||e.optionLabelFormat(t).toString().toLowerCase().includes(i.value)}),{dependsOn:i}),e}return B(e,t),e.prototype.ngOnInit=function(){},e.prototype.formatOption=function(t){return this.optionLabelFormat(t)},e.prototype.updateFilter=function(t){this.filterValue.value=t},e.prototype.onSelect=function(t){this.valueModel.value=t.option.value},e}(bt);Ct.decorators=[{type:n.Component,args:[{selector:"aup-autocomplete-input",template:'<mat-form-field appearance="standard" [floatLabel]="floatLabel">\n <mat-label *ngIf="label">{{label}}</mat-label>\n <input type="string"\n matInput\n [matAutocomplete]="autocomplete"\n placeholder="{{placeholder}}"\n [ngModel]="componentValueModel.value"\n (ngModelChange)="updateFilter($event)"\n [disabled]="!enabled.value"\n (keydown.enter)="notifyEnterKey()"\n (keydown.escape)="notifyEscapeKey()"\n [pectinFocusBinding]="focusContext"\n [errorStateMatcher]="errorStateMatcher"\n >\n <mat-autocomplete #autocomplete [displayWith]="optionLabelFormat" [autoActiveFirstOption]="true" (optionSelected)="onSelect($event)">\n <mat-option *ngFor="let option of filteredOptions.value; let i = index"\n [value]="option"\n >{{formatOption(option)}}</mat-option>\n <mat-option *ngIf="allowNil">{{placeholder}}</mat-option>\n </mat-autocomplete>\n\n <mat-hint *ngIf="showHint">{{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%}"]}]}],Ct.ctorParameters=function(){return[]},Ct.propDecorators={optionsModel:[{type:n.Input}],options:[{type:n.Input}],optionLabel:[{type:n.Input}],allowNil:[{type:n.Input}],nilOptionTemplateRef:[{type:n.ContentChild,args:["nilOptionTemplate"]}],optionLabelFormat:[{type:n.Input}]},q([w.TrackExternal(),z("design:type",w.ListModel)],Ct.prototype,"optionsModel",void 0),q([w.StoreInListModel("optionsModel"),z("design:type",Array)],Ct.prototype,"options",void 0);var It=function(t){function e(){var e=t.call(this)||this;return e.color="accent",e.labelPosition="after",e}return B(e,t),e.prototype.ngOnInit=function(){},e}(bt);It.decorators=[{type:n.Component,args:[{selector:"aup-checkbox-input",template:'\x3c!-- TODO: add focus binding --\x3e\n<mat-checkbox\n [(ngModel)]="componentValueModel.value"\n [color]="color"\n [labelPosition]="labelPosition"\n [disabled]="!isEnabled()"\n>{{label}}</mat-checkbox>\n<mat-hint *ngIf="showHint">{{hint}}</mat-hint>\n<mat-error *ngIf="hasErrors">{{firstError}}</mat-error>\n',styles:[":host{display:inline-flex;flex-direction:column;padding:24px 0 16px}:host.dense{padding:6px 0 2px}mat-error,mat-hint{font-size:12px;font-weight:400;line-height:13.5px;margin-left:24px;margin-top:4px}"]}]}],It.ctorParameters=function(){return[]},It.propDecorators={color:[{type:n.Input}],labelPosition:[{type:n.Input}]};var wt=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 B(e,t),e.prototype.ngOnInit=function(){},e}(vt);wt.decorators=[{type:n.Component,args:[{selector:"aup-multiple-select-input",template:'<mat-form-field appearance="standard" [floatLabel]="floatLabel">\n <mat-label *ngIf="label">{{label}}</mat-label>\n <mat-select placeholder="{{placeholder}}"\n multiple\n [(ngModel)]="componentListModel.value"\n [disabled]="!enabled.value"\n (keydown.enter)="notifyEnterKey()"\n (keydown.escape)="notifyEscapeKey()"\n [pectinFocusBinding]="focusContext"\n [errorStateMatcher]="errorStateMatcher"\n >\n <mat-option *ngFor="let option of optionsModel.value; let i = index" [value]="option">\n <ng-container *ngIf="!optionTemplateRef">{{optionLabelFormat(option)}}</ng-container>\n <ng-container *ngIf="optionTemplateRef"\n [ngTemplateOutlet]="optionTemplateRef"\n [ngTemplateOutletContext]="{ $implicit: option, index: i }"\n >\n </ng-container>\n </mat-option>\n </mat-select>\n <mat-hint *ngIf="showHint">{{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%}"]}]}],wt.ctorParameters=function(){return[]},wt.propDecorators={optionsModel:[{type:n.Input}],options:[{type:n.Input}],optionLabel:[{type:n.Input}],optionTemplateRef:[{type:n.ContentChild,args:["optionTemplate"]}],optionLabelFormat:[{type:n.Input}]},q([w.TrackExternal(),z("design:type",w.ListModel)],wt.prototype,"optionsModel",void 0),q([w.StoreInListModel("optionsModel"),z("design:type",Array)],wt.prototype,"options",void 0);var xt=function(t){function e(){var e=t.call(this)||this;return e.min=Number.MIN_SAFE_INTEGER,e.max=Number.MAX_SAFE_INTEGER,e}return B(e,t),e.prototype.ngOnInit=function(){},e}(bt);xt.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 [attr.autocomplete]="autocomplete"\n [(ngModel)]="componentValueModel.value"\n [disabled]="!enabled.value"\n (keydown.enter)="notifyEnterKey()"\n (keydown.escape)="notifyEscapeKey()"\n [pectinFocusBinding]="focusContext"\n [errorStateMatcher]="errorStateMatcher"\n [min]="min"\n [max]="max"\n >\n <mat-hint *ngIf="hint && !dense" >{{hint}}</mat-hint>\n <mat-error *ngIf="hasErrors">{{firstError}}</mat-error>\n</mat-form-field>\n',styles:[""]}]}],xt.ctorParameters=function(){return[]},xt.propDecorators={autocomplete:[{type:n.Input}],min:[{type:n.Input}],max:[{type:n.Input}]};var Mt=function(t){function e(){return t.call(this)||this}return B(e,t),e.prototype.ngOnInit=function(){},e}(bt);Mt.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 [attr.autocomplete]="autocomplete"\n [(ngModel)]="componentValueModel.value"\n [disabled]="!enabled.value"\n (keydown.enter)="notifyEnterKey()"\n (keydown.escape)="notifyEscapeKey()"\n [pectinFocusBinding]="focusContext"\n [errorStateMatcher]="errorStateMatcher"\n >\n <mat-hint *ngIf="showHint">{{hint}}</mat-hint>\n <mat-error *ngIf="hasErrors">{{firstError}}</mat-error>\n</mat-form-field>\n\n',styles:[""]}]}],Mt.ctorParameters=function(){return[]},Mt.propDecorators={autocomplete:[{type:n.Input}]};var Pt=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 B(e,t),e.prototype.ngOnInit=function(){},e}(bt);Pt.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)]="componentValueModel.value"\n [disabled]="!enabled.value"\n (keydown.enter)="notifyEnterKey()"\n (keydown.escape)="notifyEscapeKey()"\n [pectinFocusBinding]="focusContext"\n [errorStateMatcher]="errorStateMatcher"\n >\n <mat-option *ngIf="allowNil">\n <ng-container *ngIf="!nilOptionTemplateRef">{{placeholder}}</ng-container>\n <ng-container *ngIf="nilOptionTemplateRef" [ngTemplateOutlet]="nilOptionTemplateRef"></ng-container>\n </mat-option>\n <mat-option *ngFor="let option of optionsModel.value; let i = index" [value]="option">\n <ng-container *ngIf="!optionTemplateRef">{{optionLabelFormat(option)}}</ng-container>\n <ng-container *ngIf="optionTemplateRef"\n [ngTemplateOutlet]="optionTemplateRef"\n [ngTemplateOutletContext]="{ $implicit: option, index: i }"\n >\n </ng-container>\n </mat-option>\n </mat-select>\n <mat-hint *ngIf="showHint">{{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%}"]}]}],Pt.ctorParameters=function(){return[]},Pt.propDecorators={optionsModel:[{type:n.Input}],options:[{type:n.Input}],optionLabel:[{type:n.Input}],allowNil:[{type:n.Input}],optionTemplateRef:[{type:n.ContentChild,args:["optionTemplate"]}],nilOptionTemplateRef:[{type:n.ContentChild,args:["nilOptionTemplate"]}],optionLabelFormat:[{type:n.Input}]},q([w.TrackExternal(),z("design:type",w.ListModel)],Pt.prototype,"optionsModel",void 0),q([w.StoreInListModel("optionsModel"),z("design:type",Array)],Pt.prototype,"options",void 0);var Rt=function(t){function e(){var e=t.call(this)||this,n=w.Dsl.disposeWith(e),o=n.chain;n.valueOf,n.before,n.when,n.after,n.observe,n.switchOn;return e.clearCommand=w.Command.create((function(){e.componentValueModel.value=null})),e.clearCommand.disableWhile(o.stringValue(e.componentValueModel).isBlank()),e}return B(e,t),e.prototype.ngOnInit=function(){},e}(bt);Rt.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 [attr.autocomplete]="autocomplete"\n [(ngModel)]="componentValueModel.value"\n [disabled]="!enabled.value"\n (keydown.enter)="notifyEnterKey()"\n (keydown.escape)="notifyEscapeKey()"\n [pectinFocusBinding]="focusContext"\n [errorStateMatcher]="errorStateMatcher"\n >\n <mat-hint *ngIf="showHint">{{hint}}</mat-hint>\n <mat-error *ngIf="hasErrors">{{firstError}}</mat-error>\n <button mat-button mat-icon-button matSuffix *ngIf="enableClear" [pectinCommand]="clearCommand">\n <aup-icon icon="mat:close"></aup-icon>\n </button>\n</mat-form-field>\n\n',styles:["button[disabled]{visibility:hidden}"]}]}],Rt.ctorParameters=function(){return[]},Rt.propDecorators={autocomplete:[{type:n.Input}],enableClearModel:[{type:n.Input}],enableClear:[{type:n.Input}]},q([w.TrackExternal({defaultValue:!1}),z("design:type",w.ValueModel)],Rt.prototype,"enableClearModel",void 0),q([w.StoreInValueModel("enableClearModel"),z("design:type",Boolean)],Rt.prototype,"enableClear",void 0);var St=function(t){function e(){var e=t.call(this)||this;return e.rows=2,e}return B(e,t),e.prototype.ngOnInit=function(){},e}(bt);St.decorators=[{type:n.Component,args:[{selector:"aup-text-input",template:'<mat-form-field appearance="standard" [floatLabel]="floatLabel">\n <mat-label *ngIf="label">{{label}}</mat-label>\n <textarea matInput\n placeholder="{{placeholder}}"\n [(ngModel)]="componentValueModel.value"\n [disabled]="!enabled.value"\n (keydown.enter)="notifyEnterKey()"\n (keydown.escape)="notifyEscapeKey()"\n [pectinFocusBinding]="focusContext"\n [errorStateMatcher]="errorStateMatcher"\n [rows]="rows"\n [cols]="cols"\n >\n </textarea>\n <mat-hint *ngIf="showHint">{{hint}}</mat-hint>\n <mat-error *ngIf="hasErrors">{{firstError}}</mat-error>\n</mat-form-field>\n\n',styles:["button[disabled]{visibility:hidden}textarea{overflow:auto}"]}]}],St.ctorParameters=function(){return[]},St.propDecorators={rows:[{type:n.Input}],cols:[{type:n.Input}]},t.IconComponent=function(){function t(){this.allowedPrefixes=P.Enum.values(t.IconPrefix).map((function(t){return t+":"})),this.iconPrefix=t.IconPrefix}return Object.defineProperty(t.prototype,"icon",{get:function(){return this._icon},set:function(t){if(this._icon=t,!t)return this.errorMessage="icon is nil",void(this.prefix=void 0);var e=t.indexOf(":");e>0&&(this.prefix=this.icon.slice(0,e),this.suffix=this.icon.slice(e+1)),this.prefix&&(this.errorMessage='Unknown icon "'+t+'"'),this.errorMessage="Unknown icon prefix, expected one of ["+this.allowedPrefixes.join(",")+'] got "'+this.prefix+':"'},enumerable:!1,configurable:!0}),t}(),t.IconComponent.decorators=[{type:n.Component,args:[{selector:"aup-icon",template:'<ng-container [ngSwitch]="prefix">\n\n <mat-icon *ngSwitchCase="iconPrefix.SVG"\n [svgIcon]="suffix"\n class="svgIcon">\n </mat-icon>\n\n <mat-icon *ngSwitchCase="iconPrefix.MATERIAL">\n {{suffix}}\n </mat-icon>\n\n <div *ngSwitchCase="iconPrefix.FONT_AWESOME"\n class="faIconWrapper">\n <fa-icon [icon]="suffix">\n </fa-icon>\n </div>\n\n <mat-icon *ngSwitchDefault\n [matTooltip]="errorMessage">\n bug_report\n </mat-icon>\n\n</ng-container>\n\n',styles:[":host{display:inline-flex;width:24px}fa-icon{vertical-align:middle}.faIconWrapper{text-align:center}.faIconWrapper,.svgIcon{height:24px;width:24px}:host(.mat-chip-remove) mat-icon{font-size:18px}mat-icon{height:inherit;width:inherit}"]}]}],t.IconComponent.propDecorators={icon:[{type:n.Input}]},(t.IconComponent||(t.IconComponent={})).IconPrefix=P.Enum({SVG:"svg",FONT_AWESOME:"fa",MATERIAL:"mat"});var At=function(){};At.decorators=[{type:n.Component,args:[{selector:"aup-noop",template:"",styles:[":host{display:block}"]}]}],At.ctorParameters=function(){return[]};var Ot=function(){function t(){}return t.prototype.ngOnInit=function(){},t}();Ot.decorators=[{type:n.Component,args:[{selector:"aup-scroll-container",template:'<div class="container" cdkScrollable>\n <ng-content></ng-content>\n</div>\n',styles:[":host{flex-direction:column;min-height:0}.container,:host{align-items:stretch;display:flex}.container{flex:1;flex-basis:0;flex-direction:column;overflow-y:scroll}"]}]}],Ot.ctorParameters=function(){return[]};var Tt=function(){function t(){this.underline=!1}return t.prototype.ngOnInit=function(){},t}();Tt.decorators=[{type:n.Component,args:[{selector:"aup-section-header",template:"<ng-content></ng-content>\n",styles:[":host{--def-border-bottom-color:var(--border-bottom-color,rgba(0,0,0,0.07));color:rgba(0,0,0,.5);display:block;font-size:12px;line-height:12px;padding:8px 16px}:host.underline{border-bottom:1px solid var(--def-border-bottom-color)}"]}]}],Tt.ctorParameters=function(){return[]},Tt.propDecorators={underline:[{type:n.Input},{type:n.HostBinding,args:["class.underline"]}]};var Dt=function(){function t(t){this.templateRef=t}return Object.defineProperty(t.prototype,"name",{get:function(){return this.constructor.name},enumerable:!1,configurable:!0}),t}(),Et=function(t){function e(e){var n=t.call(this,e)||this;return n.isDefault=!1,n}return B(e,t),e.prototype.matches=function(t){return this.aupSwitchCaseWhen===t},e}(Dt);Et.decorators=[{type:n.Directive,args:[{selector:"[aupSwitchCaseWhen]",providers:[{provide:Dt,useExisting:Et}]}]}],Et.ctorParameters=function(){return[{type:n.TemplateRef}]},Et.propDecorators={aupSwitchCaseWhen:[{type:n.Input}]};var Ft=function(t){function e(e){var n=t.call(this,e)||this;return n.isDefault=!0,n}return B(e,t),e.prototype.matches=function(t){return!1},e}(Dt);Ft.decorators=[{type:n.Directive,args:[{selector:"[aupSwitchCaseDefault]",providers:[{provide:Dt,useExisting:Ft}]}]}],Ft.ctorParameters=function(){return[{type:n.TemplateRef}]};var kt=function(t){function e(e){var n=t.call(this)||this;return n.cdr=e,n.selectedIndex=0,n}return B(e,t),e.prototype.ngOnInit=function(){},e.prototype.ngAfterContentInit=function(){var t=this,e=this.switchCaseOptions.changes.subscribe((function(e){return t.updateSelection()}));this.onDispose((function(){return e.unsubscribe()}));var n=w.Dsl.disposeWith(this);n.chain;(0,n.when)(this.switchModel).changes((function(){return t.updateSelection()}),{initialValue:"triggerChange"}),this.cdr.detectChanges()},e.prototype.updateSelection=function(){var t=this,e=[];this.switchCaseOptions.forEach((function(n,o){n.matches(t.switchModel.value)&&e.push(o)})),e.length>1&&console.warn("found "+e.length+" matching case values, displaying the first."),0===e.length&&(this.switchCaseOptions.forEach((function(t,n){t.isDefault&&e.push(n)})),e.length>1&&console.warn("found "+e.length+" default case values, displaying the first.")),e.length>0?this.selectedIndex=e[0]:(console.warn("found no matching or default case values."),this.selectedIndex=-1)},e}(Y);kt.decorators=[{type:n.Component,args:[{selector:"aup-switch-case",template:'<mat-tab-group class="content-wrapper" no-tab-header full-height-tabs [selectedIndex]="selectedIndex">\n <mat-tab *ngFor="let option of switchCaseOptions">\n <ng-template [ngTemplateOutlet]="option.templateRef"></ng-template>\n </mat-tab>\n</mat-tab-group>\n\n\n',styles:[":host{align-items:stretch;display:flex;flex-direction:column}mat-tab-group{flex:1}"]}]}],kt.ctorParameters=function(){return[{type:n.ChangeDetectorRef}]},kt.propDecorators={switchModel:[{type:n.Input}],switch:[{type:n.Input}],switchCaseOptions:[{type:n.ContentChildren,args:[Dt]}]},q([w.TrackExternal(),z("design:type",w.ValueModel)],kt.prototype,"switchModel",void 0),q([w.StoreInValueModel("switchModel"),z("design:type",Object)],kt.prototype,"switch",void 0);var _t,Lt=function(t,e){this.width=t,this.height=e},Nt=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,o,i){var r=t.call(this,o,i)||this;return r.top=e,r.left=n,r.width=o,r.height=i,r}return B(e,t),e.prototype.relativePositionOf=function(t){return t instanceof MouseEvent?new Nt(t.clientX-this.left,t.clientY-this.top):new Nt(t.x-this.left,t.y-this.top)},e}(Lt),(_t=t.Bounds||(t.Bounds={})).ofElement=function(t){var e=t.getBoundingClientRect();return new _t(e.top,e.left,e.width,e.height)};var Vt=function(e){function n(n,o){var i=e.call(this)||this;return i.elementRef=n,i.ngZone=o,i._boundsModel=new w.MutableValueModel(new t.Bounds(0,0,0,0)),i}return B(n,e),n.prototype.ngAfterViewInit=function(){var t=this;this.updateBounds();var e=this.elementRef.nativeElement,n=new H.default((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:!1,configurable:!0}),Object.defineProperty(n.prototype,"nativeElement",{get:function(){return this.elementRef.nativeElement},enumerable:!1,configurable:!0}),n.prototype.relativePositionOf=function(t){return this.bounds.relativePositionOf(t)},Object.defineProperty(n.prototype,"bounds",{get:function(){return this._boundsModel.value},enumerable:!1,configurable:!0}),n.prototype.updateBounds=function(){this._boundsModel.value=t.Bounds.ofElement(this.nativeElement)},n}(Y);Vt.decorators=[{type:n.Directive}],Vt.ctorParameters=function(){return[{type:n.ElementRef},{type:n.NgZone}]};var Ht=Symbol("aup-cell-header-renderer-component-ref"),jt=Symbol("aup-cell-renderer-component-ref"),Ut=Symbol("aup-cell-editor-component-ref"),Bt=Symbol("aup-cell-renderer-portal-component"),qt=Symbol("aup-cell-editor-portal-component"),zt=function(){},Gt=function(t){function e(e,n){var o=t.call(this)||this;return o.componentType=e,o.initialiseHeader=n,o}return B(e,t),e.prototype.initialiseHost=function(t,e){S.assert.isTruthy(t),t[Ht]=new l.ComponentPortal(this.componentType)},e.prototype.onPortalAttached=function(t,e){this.initialiseHeader(e,t.column)},e}(zt),Wt=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return B(e,t),e}(zt),Kt=function(t){function e(e,n){var o=t.call(this)||this;return o.componentType=e,o.updateComponent=n,o}return B(e,t),e.prototype.initialiseHost=function(t,e){t[jt]=new l.ComponentPortal(this.componentType)},e.prototype.onPortalAttached=function(t,e){t[Bt]=e,this.updateComponent(e,t.getRowData(),!0)},e.prototype.pushState=function(t){t[Bt]&&this.updateComponent(t[Bt],t.getRowData(),!1)},e}(Wt),Xt=function(t){function e(e,n){var o=t.call(this)||this;return o.componentType=e,o.initialiseEditorSession=n,o}return B(e,t),e.prototype.initialiseHost=function(t,e){S.assert.isTruthy(t),t[Ut]=new l.ComponentPortal(this.componentType)},e.prototype.onPortalAttached=function(t,e){t[qt]=e,this.initialiseEditorSession(e,t.editSession)},e}(zt),$t=function(t){function e(){return t.call(this)||this}return B(e,t),e.prototype.registerPortal=function(t,e,n,o){this.templateRef=t,this.viewContainer=e,this.fillCell=n,this.padChild=o},e.prototype.initialiseHost=function(t,e){S.assert.isTruthy(t)},e.prototype.onPortalAttached=function(t,e){},e.prototype.pushState=function(t){t[jt]=this.createPortal(t.getRowData()),t.fillCell=this.fillCell,t.padChild=this.padChild},e.prototype.createPortal=function(t){return new l.TemplatePortal(this.templateRef,this.viewContainer,Object.assign(Object.assign({},t),{$implicit:t.row}))},e}(Wt),Yt=function(){function t(){}return Object.defineProperty(t.prototype,"value",{get:function(){return this._value},set:function(t){this._value=t},enumerable:!1,configurable:!0}),t}();Yt.decorators=[{type:n.Component,args:[{selector:"aup-default-cell-renderer",template:"{{value}}\n",styles:[""]}]}],Yt.ctorParameters=function(){return[]},Yt.propDecorators={value:[{type:n.Input}]};var Jt=function(){};Jt.decorators=[{type:n.Component,args:[{selector:"aup-default-header-renderer",template:"{{headerText}}\n",styles:[""]}]}],Jt.ctorParameters=function(){return[]},Jt.propDecorators={headerText:[{type:n.Input}]};var Zt=function(t){function e(){var e=t.call(this)||this;return e.saveCommand=w.Command.create((function(){e.editSession.saveCommand.execute(e.editSession.form).then((function(t){t&&e.editSession.dispose()}))})),e.cancelCommand=w.Command.create((function(){e.editSession.dispose()})),e}return B(e,t),e.prototype.ngOnInit=function(){},Object.defineProperty(e.prototype,"form",{get:function(){var t;return null===(t=this.editSession)||void 0===t?void 0:t.form},enumerable:!1,configurable:!0}),e}(Y);Zt.decorators=[{type:n.Component,args:[{selector:"aup-row-editor-controls",template:'<button *ngIf="!editSession" mat-icon-button [pectinCommand]="editRowCommand" class="edit-button"><aup-icon icon="mat:edit"></aup-icon></button>\n<button *ngIf="editSession" mat-icon-button [pectinCommand]="saveCommand"><aup-icon icon="mat:done"></aup-icon></button>\n<button *ngIf="editSession" mat-icon-button [pectinCommand]="cancelCommand"><aup-icon icon="mat:clear"></aup-icon></button>\n',styles:[":host{display:block;width:80px}.edit-button{visibility:hidden}:host-context(tr:hover) .edit-button{visibility:visible}"]}]}],Zt.ctorParameters=function(){return[]},Zt.propDecorators={row:[{type:n.Input}],editRowCommand:[{type:n.Input}],editSession:[{type:n.Input}]},q([w.TrackExternal(),z("design:type",w.Command)],Zt.prototype,"editRowCommand",void 0);var Qt=function(t){function e(){var e=t.call(this)||this;return e.selectCommand=w.Command.create((function(){e.selectionModel.selectCommand.execute(e.row)})),e}return B(e,t),e.prototype.isSelected=function(){return this.selectionModel.isSelected(this.row)},e}(Y);Qt.decorators=[{type:n.Component,args:[{selector:"aup-select-cell-renderer",template:'<mat-checkbox [pectinCommand]="selectCommand" [checked]="isSelected()"></mat-checkbox>\n',styles:[""]}]}],Qt.ctorParameters=function(){return[]},Qt.propDecorators={row:[{type:n.Input}]};var te=function(t){function e(){var e=t.call(this)||this;return e.selectCommand=w.Command.create((function(){e.selectionModel.toggleAllCommand.execute()})),e}return B(e,t),e.prototype.isSelected=function(){var t;return(null===(t=this.selectionModel)||void 0===t?void 0:t.allSelected.value)||!1},e.prototype.isIntermediate=function(){var t;return(null===(t=this.selectionModel)||void 0===t?void 0:t.someSelected.value)||!1},e}(Y);te.decorators=[{type:n.Component,args:[{selector:"aup-select-header-cell-renderer",template:'<mat-checkbox *ngIf="enableHeaderControls" [pectinCommand]="selectCommand" [checked]="isSelected()" [indeterminate]="this.isIntermediate()"></mat-checkbox>\n',styles:[""]}]}],te.ctorParameters=function(){return[]};var ee=function(){},ne=Symbol("aup-cell-renderer:row-data-cache"),oe=function(){function t(t,e){this.columnId=t,this.textPropertiesProvider=e,this._selectRowOnClick=void 0,this._flex=!1,this.installHeaderRenderer()}return t.prototype.installHeaderRenderer=function(){this.cellHeaderRenderer(Jt,(function(t,e){t.headerText=e.getHeaderText()}))},t.prototype.getHeaderText=function(){var t;return(null===(t=this.getColumnTextProperties())||void 0===t?void 0:t.headerText())||this.getDefaultHeaderText()},t.prototype.getDefaultHeaderText=function(){return this.columnId},t.prototype.getColumnTextProperties=function(){return this._columnTextProperties||this.textPropertiesProvider()},t.prototype.textProperties=function(t){return this._columnTextProperties=t,this},t.prototype.configureHeaderRenderer=function(t){this._columnHeaderPortalRef=t},t.prototype.configureCellRenderer=function(t){this._cellRendererPortalRef=t},t.prototype.configureCellEditor=function(t){this._cellEditorPortalRef=t},t.prototype.cellHeaderRenderer=function(t,e){return this.configureHeaderRenderer(new Gt(t,e)),this},t.prototype.flex=function(t){void 0===t&&(t=!0),this._flex=t},t.prototype.isFlex=function(){return this._flex},t.prototype.hasEditorPortal=function(){return!!this._cellEditorPortalRef},t.prototype.attachHeaderCell=function(t){this._columnHeaderPortalRef.initialiseHost(t,this)},t.prototype.attachCell=function(t){this._cellRendererPortalRef.initialiseHost(t,this),this.hasEditorPortal()&&this._cellEditorPortalRef.initialiseHost(t,this)},t.prototype.onHeaderAttached=function(t,e){this._columnHeaderPortalRef.onPortalAttached(t,e)},t.prototype.onRendererAttached=function(t,e){this._cellRendererPortalRef.onPortalAttached(t,e)},t.prototype.onEditorAttached=function(t,e){this._cellEditorPortalRef.onPortalAttached(t,e)},t.prototype.updatePortalContent=function(t){this._cellRendererPortalRef.pushState(t)},t.prototype.selectRowOnClick=function(t){return this._selectRowOnClick=t,this},t.prototype.isRowSelectionEnabled=function(){return this._selectRowOnClick},t.prototype.isRowSelectionExplicitlyEnabled=function(){return!0===this._selectRowOnClick},t.prototype.isRowSelectionExplicitlyDisabled=function(){return!1===this._selectRowOnClick},t}();q([x.Memoize(),z("design:type",Function),z("design:paramtypes",[]),z("design:returntype",String)],oe.prototype,"getHeaderText",null),q([x.Memoize(),z("design:type",Function),z("design:paramtypes",[]),z("design:returntype",Object)],oe.prototype,"getColumnTextProperties",null);var ie=function(t){function e(e,n,o){var i=t.call(this,e,o)||this;return i.property=n,i._format=function(t){return t},i.cellRenderer(Yt),i}return B(e,t),e.prototype.cellRenderer=function(t,e){var n=this;return this.configureCellRenderer(new Kt(t,(function(t,o,i){i&&(V.default.isFunction(e)?e(t):V.default.isFunction(null==e?void 0:e.onComponentInit)&&e.onComponentInit(t)),t.value=n._format(o.row[n.property]),!V.default.isFunction(e)&&V.default.isFunction(null==e?void 0:e.onRowUpdate)&&e.onRowUpdate(t,o.row)}))),this},e.prototype.liveEditCellRenderer=function(t,e){return this.mutableCellRenderer(t,e)},e.prototype.mutableCellRenderer=function(t,e){var n=this;return this.configureCellRenderer(new Kt(t,(function(t,o,i){t[ne]=o.row;var r=!1;i&&(V.default.isFunction(null==e?void 0:e.onComponentInit)&&e.onComponentInit(t),t.onValueEdited((function(n,o){r||e.onValueEdit(t[ne],n,o)}))),r=!0,t.value=o.row[n.property],r=!1,!V.default.isFunction(e)&&V.default.isFunction(null==e?void 0:e.onRowUpdate)&&e.onRowUpdate(t,o.row)}))),this},e.prototype.cellEditor=function(t,e,n){var o=this,i=Array.isArray(e)?e:void 0,r=V.default.isFunction(e)?e:n;return this.configureCellEditor(new Xt(t,(function(t,e){var n=e.form.pluck(o.property);i&&n.validateUsing(i),t.valueModel=n,r&&r(t)}))),this},e.prototype.format=function(t){return S.assert.isFunction(t),this._format=t,this},e.prototype.selectRowOnClick=function(e){return t.prototype.selectRowOnClick.call(this,e)},e}(oe),re=function(t){function e(e,n,o){var i=t.call(this,e,o)||this;return i.property=n,i._format=function(t){return t.map((function(t){return null==t?void 0:t.toString()})).join(", ")},i.cellRenderer(Yt),i}return B(e,t),e.prototype.cellRenderer=function(t){var e=this;return this.configureCellRenderer(new Kt(t,(function(t,n){t.value=e._format(n.row[e.property])}))),this},e.prototype.cellEditor=function(t,e,n){var o=this,i=Array.isArray(e)?e:void 0,r=V.default.isFunction(e)?e:n;return this.configureCellEditor(new Xt(t,(function(t,e){var n=e.form.pluckList(o.property);i&&n.validateUsing(i),t.listModel=n,r&&r(t)}))),this},e.prototype.format=function(t){return S.assert.isFunction(t),this._format=t,this},e.prototype.selectRowOnClick=function(e){return t.prototype.selectRowOnClick.call(this,e)},e}(oe),ae=function(t){function e(e,n,o){var i=t.call(this,e,n)||this;return i.getValue=o,i.cellRenderer(Yt),i}return B(e,t),e.prototype.cellRenderer=function(t,e){var n=this;return this.configureCellRenderer(new Kt(t,(function(t,o,i){i&&(V.default.isFunction(e)?e(t):V.default.isFunction(null==e?void 0:e.onComponentInit)&&e.onComponentInit(t)),t.value=n.getValue(o.row),!V.default.isFunction(e)&&V.default.isFunction(null==e?void 0:e.onRowUpdate)&&e.onRowUpdate(t,o.row)}))),this},e.prototype.selectRowOnClick=function(e){return t.prototype.selectRowOnClick.call(this,e)},e}(oe),se=function(t){function e(e,n,o){var i=t.call(this,e,o)||this;return i.cellRenderer(Zt),i}return B(e,t),e.prototype.cellRenderer=function(t){return this.configureCellRenderer(new Kt(t,(function(t,e){t.row=e.row,t.editSession=e.editSession,t.editRowCommand=e.editRowCommand}))),this},e.prototype.getDefaultHeaderText=function(){return""},e}(oe),ce=function(t){function e(e,n){var o=t.call(this,e,n)||this;return o.config=new $t,o.configureCellRenderer(o.config),o}return B(e,t),e.prototype.setTemplate=function(t,e,n,o){this.config.registerPortal(t,e,n,o)},e.prototype.selectRowOnClick=function(e){return t.prototype.selectRowOnClick.call(this,e)},e}(oe),le=function(t){function e(e,n,o){var i=t.call(this,e,n)||this;return i.selectionModel=o,i._enableHeaderControls=!0,i.selectOnRowClick(!1),o instanceof w.MultipleSelectionModel&&i.cellHeaderRenderer(te,(function(t){t.selectionModel=o,t.enableHeaderControls=i._enableHeaderControls})),i.configureCellRenderer(new Kt(Qt,(function(t,e){t.row=e.row,t.selectionModel=o}))),i}return B(e,t),e.prototype.getDefaultHeaderText=function(){return""},e.prototype.isRowSelectionEnabledByDefault=function(){return this.isRowSelectionExplicitlyEnabled()},e.prototype.selectOnRowClick=function(e){return t.prototype.selectRowOnClick.call(this,e)},e.prototype.enableHeaderControls=function(t){return this._enableHeaderControls=t,this},e.prototype.selectRow=function(t){this.selectionModel.selectCommand.execute(t)},e}(oe),ue=function(t){function e(e,n,o,i){var r=t.call(this)||this;return r.rowId=e,r.form=o,r.saveCommand=i,r._liveRowValue=new w.MutableValueModel,r.liveRowValue=r._liveRowValue.readonly,r.form.load(n),r._liveRowValue.value=n,r.form.onEdit((function(){r._liveRowValue.value=j.default(r._liveRowValue.value,(function(t){r.form.writeDirtyStateTo(t)}))})),r}return B(e,t),e}(w.GarbageCollector),pe=function(t,e){this.className=t,this.matches=e};t.AbstractTableModel=function(t){function e(e){var n=t.call(this)||this;n.sourceOfTruth=e,n._columns=new w.MutableListModel,n._editorSessions=new w.MutableListModel,n.rowClassNamePredicates=[],n.rowClickListeners=new w.EventListenerList,n._createForm=function(t){return new w.DirtyTrackingForm},n.trackBy=function(t,e){return n.identityOf?n.identityOf(e):t},n.identityOf=e.identityOf;var o=w.Dsl.disposeWith(n),i=o.chain;o.valueOf,o.before,o.when,o.after,o.observe,o.switchOn;return n._columnsById=i(n._columns).indexBy("columnId"),n._rowsBeingEdited=new w.MutableListModel([],{identifiedWith:n.identityOf}),n._editorSessionByRowId=i(n._editorSessions).indexBy("rowId"),n.editing=i(n._editorSessions).count().isGreaterThan(0),n.dataSource=i(n.sourceOfTruth).replaceAll(n.rowsBeingEdited),n.firstEditableColumn=i(n.columns).select((function(t){return t.hasEditorPortal()})).first(),n.hasColumnsWithRowSelectionExplicitlyEnabled=i(n._columns).findIndex((function(t){return t.isRowSelectionExplicitlyEnabled()})).isGreaterThanOrEqualTo(0),n}return B(e,t),Object.defineProperty(e.prototype,"rowsBeingEdited",{get:function(){return this._rowsBeingEdited.readonly},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"columns",{get:function(){return this._columns.readonly},enumerable:!1,configurable:!0}),e.prototype.pluck=function(t,e){var n=this,o=(null==e?void 0:e.columnId)||t.toString();return this.addColumn(new ie(o,t,(function(){return n.getColumnTextProperties(o)})))},e.prototype.pluckList=function(t,e){var n=this,o=(null==e?void 0:e.columnId)||t.toString();return this.addColumn(new re(o,t,(function(){return n.getColumnTextProperties(o)})))},e.prototype._addSelectionColumn=function(t){var e=this;w.assert.isNil(this.selectionColumnModel);var n="selection-column";return this.selectionColumnModel=new le(n,(function(){return e.getColumnTextProperties(n)}),t),this.addRowClass("aup-row-selected",(function(e){return t.isSelected(e)})),this.addColumn(this.selectionColumnModel)},e.prototype.addEditControls=function(t){var e=this;this.saveCommand=t;var n="editControls";return this.addColumn(new se(n,t,(function(){return e.getColumnTextProperties(n)})))},e.prototype.addCustomColumn=function(t,e){var n=this;return this.addColumn(new ae(t,(function(){return n.getColumnTextProperties(t)}),e))},e.prototype.addComponentColumn=function(t,e,n){var o=this;return this.addColumn(new ae(t,(function(){return o.getColumnTextProperties(t)}),(function(t){return t}))).cellRenderer(e,n)},e.prototype.addTemplateColumn=function(t){var e=this;return this.addColumn(new ce(t,(function(){return e.getColumnTextProperties(t)})))},e.prototype.addRowClass=function(t,e){this.rowClassNamePredicates.push(new pe(t,e))},e.prototype.getRowClasses=function(t){var e=[];return this.rowClassNamePredicates.forEach((function(n){n.matches(t)&&e.push(n.className)})),e},e.prototype.useFormFactory=function(t){return this._createForm=t,this},e.prototype.addColumn=function(t){return this._columnsById.get(t.columnId)?w.lang.illegalState("Column with id="+t.columnId+" already exists"):this._columns.push(t),t},Object.defineProperty(e.prototype,"selectionModel",{get:function(){var t;return null===(t=this.selectionColumnModel)||void 0===t?void 0:t.selectionModel},enumerable:!1,configurable:!0}),e.prototype.columnTextProperties=function(t){this._columnTextPropertiesLookup=t},e.prototype.getColumnTextProperties=function(t){return this._columnTextPropertiesLookup?this._columnTextPropertiesLookup[t]:void 0},e.prototype.startEditSession=function(t){var e=this,n=this.identityOf(t);if(this._rowsBeingEdited.query().indexOf(t)>-1)return w.lang.illegalState("Row with id="+n+" already being edited");var o=new ue(n,t,this._createForm(t),this.saveCommand);return(0,w.Dsl.disposeWith(o).when)(o.liveRowValue).changes((function(t){e._rowsBeingEdited.replaceOrPush(t)}),{initialValue:"triggerChangeUnlessNil"}),this._editorSessions.push(o),o.onDispose((function(){e._rowsBeingEdited.remove(o.liveRowValue.value),e._editorSessions.remove(o)})),o},e.prototype.getEditSessionFor=function(t){return this._editorSessionByRowId.get(this.identityOf(t))},e.prototype.cancelAllEditorSessions=function(){var t=this;this._editorSessions.runInTransaction((function(e){t._rowsBeingEdited.runInTransaction((function(){e.value.forEach((function(t){return t.dispose()}))}))}))},e.prototype.isRowSelectionEnabledFor=function(t){var e;return this.selectionColumnModel&&(null!==(e=t.isRowSelectionEnabled())&&void 0!==e?e:this.isRowSelectionEnabledByDefault())},e.prototype.isRowSelectionEnabledByDefault=function(){return this.selectionColumnModel&&this.selectionColumnModel.isRowSelectionEnabledByDefault()},e.prototype.isRowSelectionEnabled=function(){return this.hasColumnsWithRowSelectionExplicitlyEnabled.value||this.isRowSelectionEnabledByDefault()},e.prototype.isHoverEnabled=function(){return this.isRowSelectionEnabled()||this.rowClickListeners.listenerCount>0},e.prototype.isCursorEnabled=function(t){return this.isRowSelectionEnabledFor(t)||this.rowClickListeners.listenerCount>0},e.prototype.selectRow=function(t){var e;null===(e=this.selectionColumnModel)||void 0===e||e.selectRow(t)},e.prototype.onRowClicked=function(t){return this.rowClickListeners.add(t)},e.prototype._notifyCellClicked=function(t,e){this.isRowSelectionEnabledFor(t)&&this.selectRow(e),this.rowClickListeners.fire((function(t){return t(e)}))},e}(w.GarbageCollector),t.AbstractTableModel=q([w.TrackExternal.Strategy(new w.TrackExternal.OneTimeBinding),z("design:paramtypes",[w.ListModel])],t.AbstractTableModel);var de=function(t){function e(e,n){var o=t.call(this,e,n)||this;o.headerHeight=new w.MutableValueModel(56),o.rowHeight=new w.MutableValueModel(48);var i=w.Dsl.disposeWith(o).chain;return o.visibleRowCount=i(o.boundsModel).map((function(t){var e=(t.height-o.headerHeight.value)/o.rowHeight.value;return e<1?0:Math.floor(e)}),{dependsOn:[o.headerHeight,o.rowHeight],postponeWhile:i(o.boundsModel).pluckNumeric("height").isLessThan(1)}),o}return B(e,t),e.prototype.ngOnInit=function(){var t=w.Dsl.disposeWith(this),e=t.chain;t.valueOf,t.before,t.when,t.after,t.observe,t.switchOn;this.columns=e(this.tableModel.columns),this.columnIds=e(this.columns).pluck("columnId"),this.columnsById=e(this.columns).indexBy("columnId")},e.prototype.isEditing=function(t){return!!this.tableModel.getEditSessionFor(t)},e.prototype.registerColumnTemplate=function(t,e,n,o,i){var r=this.columnsById.get(t);r instanceof ce&&r.setTemplate(e,n,o,i)},e.prototype.notifyCellClicked=function(t,e){this.tableModel._notifyCellClicked(t,e)},e}(Vt);de.decorators=[{type:n.Component,args:[{selector:"aup-table",template:'<table mat-table [dataSource]="tableModel.dataSource.value" [trackBy]="tableModel.trackBy">\n\n <ng-container *ngFor="let column of columns.value; index as index; first as first; last as last"\n matColumnDef="{{column.columnId}}">\n <th mat-header-cell *matHeaderCellDef [class.flex]="column.isFlex()">\n <aup-table-header-cell-renderer [column]="column"\n [attr.column-index]="index"\n [attr.column-id]="column.columnId"\n [class.first-column]="first"\n [class.last-column]="last"\n ></aup-table-header-cell-renderer>\n </th>\n <td mat-cell *matCellDef="let row" (click)="notifyCellClicked(column, row)"\n [class.enable-cursor]="tableModel.isCursorEnabled(column)"\n [class.flex]="column.isFlex()"\n >\n <aup-table-cell-renderer [column]="column"\n [row]="row"\n [tableModel]="tableModel"\n [editSession]="tableModel.getEditSessionFor(row)"\n [attr.column-index]="index"\n [attr.column-id]="column.columnId"\n [class.first-column]="first"\n [class.last-column]="last"\n ></aup-table-cell-renderer>\n </td>\n </ng-container>\n\n <tr mat-header-row *matHeaderRowDef="columnIds.value"></tr>\n <tr mat-row *matRowDef="let row; columns: columnIds.value; let i = index"\n [ngClass]="tableModel.getRowClasses(row)" [class.enable-hover]="tableModel.isHoverEnabled()"\n [attr.trackBy]="tableModel.trackBy(i, row)"\n ></tr>\n\n</table>\n',styles:[":host{align-items:stretch;display:flex;flex-direction:column}:host table{flex:1;width:100%}"]}]}],de.ctorParameters=function(){return[{type:n.ElementRef},{type:n.NgZone}]},de.propDecorators={tableModel:[{type:n.Input}]},q([w.TrackExternal(),z("design:type",t.AbstractTableModel)],de.prototype,"tableModel",void 0);var fe=function(){function t(t,e,n){this.host=t,this.templateRef=e,this.viewContainer=n,this.aupColumnTemplateFillCell=!1,this.aupColumnTemplateAutoPadChild=void 0}return t.prototype.ngOnInit=function(){var t;w.assert.isTruthy(this.aupColumnTemplateColumnId),this.host.registerColumnTemplate(this.aupColumnTemplateColumnId,this.templateRef,this.viewContainer,this.aupColumnTemplateFillCell,null!==(t=this.aupColumnTemplateAutoPadChild)&&void 0!==t?t:this.aupColumnTemplateFillCell)},t}();fe.decorators=[{type:n.Directive,args:[{selector:"[aupColumnTemplate]"}]}],fe.ctorParameters=function(){return[{type:de},{type:n.TemplateRef},{type:n.ViewContainerRef}]},fe.propDecorators={aupColumnTemplate:[{type:n.Input}],aupColumnTemplateColumnId:[{type:n.Input}],aupColumnTemplateFillCell:[{type:n.Input}],aupColumnTemplateAutoPadChild:[{type:n.Input}]};var he=function(t){function e(){var e=t.call(this)||this;return e.defaultClassNames="aup-cell-renderer",e.fillCell=!1,e.padChild=!1,e.editRowCommand=w.Command.create((function(){e.tableModel.startEditSession(e.row)})),e}return B(e,t),e.prototype.ngOnInit=function(){var t=w.Dsl.disposeWith(this),e=t.chain;t.valueOf,t.before,t.when,t.after,t.observe,t.switchOn;this.firstEditableColumn=e(this.tableModel.firstEditableColumn).equals(this.column),this.column.attachCell(this)},e.prototype.hasActiveEditor=function(){return!!this.editSession&&!!this.column.hasEditorPortal()},e.prototype.initialiseRenderer=function(t){this.column.onRendererAttached(this,t)},e.prototype.initialiseEditor=function(t){var e=this;this.column.onEditorAttached(this,t),this.firstEditableColumn.value&&setTimeout((function(){return e.tryAndFocusEditor(t)}))},e.prototype.tryAndFocusEditor=function(t){var e;if(t.requestFocus)t.requestFocus();else{var n=t.valueModel||t.listModel;null===(e=null==n?void 0:n.focusContext)||void 0===e||e.requestFocus()}},e.prototype.ngOnChanges=function(t){this.column.updatePortalContent(this)},e.prototype.getRendererPortal=function(){return this[jt]},e.prototype.getEditorPortal=function(){return this[Ut]},e.prototype.getRowData=function(){return{row:this.row,editSession:this.editSession,editRowCommand:this.editRowCommand}},e}(Y);he.decorators=[{type:n.Component,args:[{selector:"aup-table-cell-renderer",template:'<ng-container *ngIf="!hasActiveEditor()" [cdkPortalOutlet]="getRendererPortal()" (attached)="initialiseRenderer($event.instance)"></ng-container>\n<ng-container *ngIf="hasActiveEditor()" [cdkPortalOutlet]="getEditorPortal()" (attached)="initialiseEditor($event.instance)"></ng-container>\n',styles:[""]}]}],he.ctorParameters=function(){return[]},he.propDecorators={row:[{type:n.Input}],column:[{type:n.Input}],editSession:[{type:n.Input}],tableModel:[{type:n.Input}],defaultClassNames:[{type:n.HostBinding,args:["class"]}],fillCell:[{type:n.HostBinding,args:["class.fillCell"]}],padChild:[{type:n.HostBinding,args:["class.padChild"]}]};var me=function(){function t(){this.defaultClassNames="aup-header-cell-renderer"}return t.prototype.ngOnInit=function(){this.column.attachHeaderCell(this)},t.prototype.initialiseHeader=function(t){this.column.onHeaderAttached(this,t)},t.prototype.getPortal=function(){return this[Ht]},t}();me.decorators=[{type:n.Component,args:[{selector:"aup-table-header-cell-renderer",template:'<ng-container [cdkPortalOutlet]="getPortal()" (attached)="initialiseHeader($event.instance)"></ng-container>\n',styles:[":host{align-items:stretch;display:flex;flex-direction:column;height:100%;justify-content:center}"]}]}],me.ctorParameters=function(){return[]},me.propDecorators={column:[{type:n.Input}],defaultClassNames:[{type:n.HostBinding,args:["class"]}]};var ge=function(t,e){this.factory=t,this.face=e},ye=function(t){function e(){var e=t.call(this)||this;return e.actions=[],e.moreActions=[],e}return B(e,t),e.prototype.registerAction=function(t,e){this.actions.push(new ge(t,e))},e.prototype.registerMoreAction=function(t,e){this.moreActions.push(new ge(t,e))},e.prototype.ngOnInit=function(){},e.prototype.createMoreMenuCommand=function(t,e){var n=this,o=w.Dsl.disposeWith(this).when,i=t.factory.create(e);return o(i.busy).becomesFalsey((function(){n.closeMoreMenu()})),i},e.prototype.closeMoreMenu=function(){this.menu.closeMenu()},e}(Y);ye.decorators=[{type:n.Component,args:[{selector:"aup-table-row-menu",template:'\n <aup-tool-bar>\n <aup-command *ngFor="let action of actions" [command]="action.factory.create(value)"\n [face]="action.face"></aup-command>\n </aup-tool-bar>\n <ng-container *ngIf="moreActions.length > 0">\n <aup-more-menu>\n <aup-command *ngFor="let action of moreActions" [command]="action.factory.create(value)"\n [face]="action.face"></aup-command>\n </aup-more-menu>\n </ng-container>\n ',styles:[":host {\n display: inline-flex;\n flex-direction: row;\n align-items: center;\n }"]}]}],ye.ctorParameters=function(){return[]},ye.propDecorators={value:[{type:n.Input}],menu:[{type:n.ViewChild,args:[g.MatMenuTrigger]}]};var ve;t.TreeInheritanceIconComponent=function(){function t(){this.pixelWidth=24,this.pixelHeight=48}return Object.defineProperty(t.prototype,"heightOffset",{get:function(){return 60-this.pixelHeight},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"viewBox",{get:function(){return"0 "+this.heightOffset+" "+this.pixelWidth+" "+(this.pixelHeight-this.heightOffset)},enumerable:!1,configurable:!0}),t.prototype.hasHead=function(){return t.HAS_HEAD.includes(this.type)},t.prototype.hasTerminal=function(){return t.HAS_TERMINAL.includes(this.type)},t.prototype.hasLeadIn=function(){return t.HAS_LEAD_IN.includes(this.type)},t.prototype.hasTail=function(){return t.HAS_TAIL.includes(this.type)},t}(),t.TreeInheritanceIconComponent.decorators=[{type:n.Component,args:[{selector:"aup-tree-inheritance-icon",template:'<svg xmlns="http://www.w3.org/2000/svg" [attr.width]="pixelWidth" [attr.height]="pixelHeight" [attr.viewBox]="viewBox">\n <g fill="none" fill-rule="evenodd">\n <rect *ngIf="hasHead()" width="1" height="32.5" x="11.5" fill="currentColor"/>\n <rect *ngIf="hasTail()" width="1" height="32.5" x="11.5" y="31.5" fill="currentColor"/>\n\n <rect *ngIf="hasLeadIn()" width="12" height="1" y="31.5" fill="currentColor"/>\n <rect *ngIf="hasTerminal()" width="12" height="1" x="12" y="31.5" fill="currentColor"/>\n </g>\n</svg>\n',styles:[":host{color:inherit;position:relative}svg{color:var(--line-color);display:block}"]}]}],t.TreeInheritanceIconComponent.ctorParameters=function(){return[]},t.TreeInheritanceIconComponent.propDecorators={type:[{type:n.Input},{type:n.HostBinding,args:["class"]}],pixelWidth:[{type:n.Input}],pixelHeight:[{type:n.Input}]},(ve=t.TreeInheritanceIconComponent||(t.TreeInheritanceIconComponent={})).Type=P.Enum({ICON_BLANK:"blank",ICON_PARENT:"parent",ICON_INHERITED_TERMINAL:"inherited_terminal",ICON_INHERITED_THROUGH_TERMINAL:"inherited_through_terminal",ICON_THROUGH:"through"}),ve.HAS_LEAD_IN=[ve.Type.ICON_PARENT],ve.HAS_TERMINAL=[ve.Type.ICON_INHERITED_TERMINAL,ve.Type.ICON_INHERITED_THROUGH_TERMINAL,ve.Type.ICON_PARENT],ve.HAS_HEAD=[ve.Type.ICON_THROUGH,ve.Type.ICON_INHERITED_TERMINAL,ve.Type.ICON_INHERITED_THROUGH_TERMINAL],ve.HAS_TAIL=[ve.Type.ICON_PARENT,ve.Type.ICON_THROUGH,ve.Type.ICON_INHERITED_THROUGH_TERMINAL];var be=function(e){function n(){var n=e.call(this)||this;n.iconTypes=[],n.nodeModel=new w.MutableValueModel;var o=w.Dsl.disposeWith(n).chain;return n.iconList=o(n.nodeModel).mapToList((function(e){var n=e.ancestors().slice(1).map((function(e){return e.isLastChild()?t.TreeInheritanceIconComponent.Type.ICON_BLANK:t.TreeInheritanceIconComponent.Type.ICON_THROUGH}));return e.isRoot()||n.push(e.isLastChild()?t.TreeInheritanceIconComponent.Type.ICON_INHERITED_TERMINAL:t.TreeInheritanceIconComponent.Type.ICON_INHERITED_THROUGH_TERMINAL),n})),n}return B(n,e),n.prototype.ngOnInit=function(){var t=this,e=w.Dsl.disposeWith(this).chain;this.canExpand=e(this.nodeModel).map((function(e){return e.hasChildren()&&t.expansionModel.isCollapsed(e)}),{dependsOn:this.expansionModel.isExpandedPredicate}),this.canCollapse=e(this.nodeModel).map((function(e){return e.hasChildren()&&!t.expansionModel.isCollapsed(e)}),{dependsOn:this.expansionModel.isExpandedPredicate}),this.iconModel=e(this.nodeModel).map((function(e){return t.node.isLeaf()?void 0:t.iconFactory(e,t.expansionModel.isExpanded(t.node))}),{dependsOn:this.expansionModel.isExpandedPredicate})},Object.defineProperty(n.prototype,"isRoot",{get:function(){return this.node.isRoot()},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"isLeaf",{get:function(){return this.node.isLeaf()},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"node",{get:function(){return this.nodeModel.value},enumerable:!1,configurable:!0}),n.prototype.expandOrCollapse=function(t){this.expansionModel.isCollapsed(t)?this.expansionModel.expand(t):this.expansionModel.collapse(t)},n}(Y);be.decorators=[{type:n.Component,args:[{selector:"aup-tree-label-cell-renderer",template:'<div class="tree-icons">\n <aup-tree-inheritance-icon *ngFor="let iconClass of iconList.value" [type]="iconClass"></aup-tree-inheritance-icon>\n <aup-icon *ngIf="iconModel.value"\n [icon]="iconModel.value"\n [class.clickable]="canExpand.value || canCollapse.value"\n (click)="expandOrCollapse(node)" ></aup-icon>\n</div>\n<div class="label">{{label}}</div>\n',styles:[":host{--line-color:#ddd;--node-color:#999;align-items:stretch;display:inline-flex;flex-direction:row}:host div.label{align-items:center;display:flex;flex-direction:row;padding-left:6px;white-space:nowrap}:host div.tree-icons{-ms-grid-rows:1fr;align-items:stretch;display:-ms-grid;display:grid;grid-auto-columns:auto;grid-auto-flow:column;grid-template-rows:1fr;justify-content:stretch}:host div.tree-icons aup-icon{-ms-grid-row-align:center;align-self:center;color:var(--node-color)}:host div.tree-icons aup-icon.clickable{cursor:pointer}:host div.tree-icons aup-icon,:host div.tree-icons aup-tree-inheritance-icon{margin-left:4px}"]}]}],be.ctorParameters=function(){return[]},be.propDecorators={value:[{type:n.Input}],label:[{type:n.Input}],iconFactory:[{type:n.Input}],expansionModel:[{type:n.Input}],isRoot:[{type:n.HostBinding,args:["class.root"]}],isLeaf:[{type:n.HostBinding,args:["class.leaf"]}]},q([w.StoreInValueModel("nodeModel"),z("design:type",Object)],be.prototype,"value",void 0);var Ce,Ie,we=function(){function t(t){this.identityOf=t,this.collapsedIds=new Set,this._isExpandedPredicate=new w.MutableValueModel((function(){return!0})),this.updatePredicate()}return Object.defineProperty(t.prototype,"isExpandedPredicate",{get:function(){return this._isExpandedPredicate.readonly},enumerable:!1,configurable:!0}),t.prototype.expand=function(t){this.isCollapsed(t)&&(this.collapsedIds.delete(this.identityOf(t.node)),this.updatePredicate())},t.prototype.collapse=function(t){this.isCollapsed(t)||(this.collapsedIds.add(this.identityOf(t.node)),this.updatePredicate())},t.prototype.canExpand=function(t){return t.hasChildren()&&this.isCollapsed(t)},t.prototype.canCollapse=function(t){return t.hasChildren()&&!this.isCollapsed(t)},t.prototype.isCollapsed=function(t){return this.collapsedIds.has(this.identityOf(t.node))},t.prototype.isExpanded=function(t){return!this.isCollapsed(t)},t.prototype.ensureAncestorsAndSelfVisible=function(t){var e=this;t.ancestors().map((function(n){return e.identityOf(t.node)})).forEach((function(t){return e.collapsedIds.delete(t)})),this.updatePredicate()},t.prototype.updatePredicate=function(){var t=this;this._isExpandedPredicate.value=function(e){return!t.collapsedIds.has(t.identityOf(e.node))}},t}(),xe=function(t){function e(e,n,o){var i=t.call(this,e,n)||this;return i.expansionModel=o,i.iconFactory=function(t,e){return e?"mat:folder_open":"mat:folder"},i.cellRenderer(be),i}return B(e,t),e.prototype.pluck=function(t){this.labelProperty=t},e.prototype.addIcon=function(t){this.iconFactory=t},e.prototype.cellRenderer=function(t){var e=this;return this.configureCellRenderer(new Kt(t,(function(t,n,o){o&&(t.expansionModel=e.expansionModel),t.value=n.row,t.label=V.default.isNil(e.labelProperty)?void 0:n.row[e.labelProperty],t.iconFactory=e.iconFactory}))),this},e.prototype.selectRowOnClick=function(e){return t.prototype.selectRowOnClick.call(this,e)},e}(oe);t.SelfAndDescendantsVisitor=function(){function t(){}return t.prototype.visit=function(t){this.onVisit(t),this.shouldVisitChildrenOf(t)&&t.visitChildren(this)},t.prototype.shouldVisitChildrenOf=function(t){return!0},t}(),Ce=t.SelfAndDescendantsVisitor||(t.SelfAndDescendantsVisitor={}),Ie=function(t){function e(e){var n=t.call(this)||this;return n.callback=e,n}return B(e,t),e.prototype.onVisit=function(t){this.callback(t)},e}(Ce),Ce.Each=Ie;var Me=function(){function e(t,e){this.parent=t,this.node=e}return Object.defineProperty(e.prototype,"decoratedSelf",{get:function(){var e=this;return this.memoize("decoratedSelf",(function(){return e.parent?e.parent.children.find((function(t){return t.node===e.node})):t.DecoratedTreeNode.createRoot(e.node)}))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"children",{get:function(){var t=this;return this.memoize("children",(function(){return t.node.children?t.node.children.map((function(n){return S.Mixin.createProxy(n,new e(t.decoratedSelf,n))})):[]}))},enumerable:!1,configurable:!0}),e.prototype.descendants=function(){var t=this;return this.memoize("descendants",(function(){var e=[];return t.visitDescendants((function(t){return e.push(t)})),e}))},e.prototype.selfAndDescendants=function(){var t=this;return this.memoize("selfAndDescendants",(function(){var e=[];return t.visitSelfAndDescendants((function(t){return e.push(t)})),e}))},e.prototype.siblingsBefore=function(){var t=this;return this.memoize("siblingsBefore",(function(){return t.parent?t.parent.children.slice(0,t.myIndex()):[]}))},e.prototype.siblingsAfter=function(){var t=this;return this.memoize("siblingsAfter",(function(){return t.parent?t.parent.children.slice(1+t.myIndex()):[]}))},e.prototype.siblings=function(){var t=this;return this.memoize("siblings",(function(){return[].concat(t.siblingsBefore(),t.siblingsAfter())}))},e.prototype.isFirstChild=function(){var t=this;return this.memoize("isFirstChild",(function(){return!!t.parent&&0===t.myIndex()}))},e.prototype.myIndex=function(){var t=this;return this.memoize("myIndex",(function(){var e=t.parent.children.findIndex((function(e){return e.node===t.node}));return w.assert.isTruthy(e>=0,"illegal state, expected index to be >= 0"),e}))},e.prototype.isLastChild=function(){var t=this;return this.memoize("isLastChild",(function(){return!!t.parent&&t.myIndex()===t.parent.children.length-1}))},e.prototype.hasSiblings=function(){return!!this.parent&&this.node.children.length>1},e.prototype.find=function(t){return M.find(this.descendants(),t)},e.prototype.select=function(t){return M.filter(this.descendants(),t)},e.prototype.flattenInto=function(t){return this.visitSelfAndDescendants((function(e){return t.push(e)})),t},e.prototype.ancestors=function(){var t=this;return this.memoize("ancestors",(function(){return t.parent?t.parent.ancestors().concat([t.parent]):[]}))},e.prototype.ancestorsAndSelf=function(){var t=this;return this.memoize("ancestorsAndSelf",(function(){return t.ancestors().concat([t.decoratedSelf])}))},e.prototype.pathToParent=function(t){var e=this;return this.memoize("pathToParent",(function(){if(e.node===t.node)return[];if(e.parent)return e.parent.pathToParent(t).concat([e.parent]);throw new Error("parent is not an ancestor")}))},e.prototype.pathToParentAndSelf=function(t){var e=this;return this.memoize("pathToParentAndSelf",(function(){return e.pathToParent(t).concat([e.decoratedSelf])}))},e.prototype.isRoot=function(){return!this.parent},Object.defineProperty(e.prototype,"depth",{get:function(){return this.isRoot()?0:this.parent.depth+1},enumerable:!1,configurable:!0}),e.prototype.isLeaf=function(){return!this.isRoot()&&this.node.children.length<1},e.prototype.hasChildren=function(){return this.node.children.length>0},e.prototype.depthFromParent=function(t){return this.pathToParent(t).length},e.prototype.treeDepth=function(){var t=this;return this.memoize("treeDepth",(function(){return 1+t.descendants().map((function(e){return e.depthFromParent(t)})).reduce((function(t,e){return Math.max(t,e)}))}))},e.prototype.flatten=function(){var t=this;return this.memoize("flatten",(function(){return t.flattenInto([])}))},e.prototype.visit=function(t){return t.visit(this),t},e.prototype.visitChildren=function(t){return M.each(this.children,(function(e){return e.visit(t)})),t},e.prototype.visitSelfAndDescendants=function(e){this.visit(new t.SelfAndDescendantsVisitor.Each(e))},e.prototype.visitDescendants=function(e){this.visitChildren(new t.SelfAndDescendantsVisitor.Each(e))},e.prototype.memoize=function(t,e){var n="__"+t;return M.isNil(this[n])&&(this[n]=e()),this[n]},e}();(t.DecoratedTreeNode||(t.DecoratedTreeNode={})).createRoot=function(t){return S.Mixin.createProxy(t,new Me(void 0,t))};var Pe=function(e){function n(t,n){var o=e.call(this,t)||this;return o.source=t,o.expansionModel=n,o.trackSource(o.expansionModel.isExpandedPredicate),o}return B(n,e),n.prototype.getIdentityOf=function(t){return this.source.identityOf(t.node)},n.prototype.compute=function(e){var n=this,o=[];return e.forEach((function(e){return n.addNodeAndVisibleChildren(t.DecoratedTreeNode.createRoot(e),o)})),o},n.prototype.addNodeAndVisibleChildren=function(t,e){var n=this;e.push(t),t.hasChildren()&&!this.expansionModel.isCollapsed(t)&&t.children.forEach((function(t){return n.addNodeAndVisibleChildren(t,e)}))},n}(w.ComputedListModel),Re=function(t){function e(e,n){var o=t.call(this,e)||this;return o.treeExpansionModel=n,o}return B(e,t),e.fromRoot=function(t,e){var n=new w.GarbageCollector,o=w.Dsl.disposeWith(n),i=o.chain,r=(o.valueOf,o.before,o.when,o.after,o.observe,o.switchOn,i(t).mapToList((function(t){return[t]}))),a=this.fromList(r,e);return a.registerDisposable(n),a},e.fromChildrenOf=function(t,e){var n=new w.GarbageCollector,o=w.Dsl.disposeWith(n),i=o.chain,r=(o.valueOf,o.before,o.when,o.after,o.observe,o.switchOn,i(t).mapToList((function(t){return t.children}))),a=this.fromList(r,e);return a.registerDisposable(n),a},e.fromList=function(t,n){var o=new we(t.identityOf),i=new Pe(t,o),r=new e(i,o);return r.registerDisposable(i),n&&n(r),r},e.prototype.treeControlColumn=function(t){var e=this,n="tree-label",o=new xe(n,(function(){return e.getColumnTextProperties(n)}),this.treeExpansionModel);t(o),this.addColumn(o)},e.prototype.expand=function(t){this.treeExpansionModel.expand(t)},e.prototype.collapse=function(t){this.treeExpansionModel.expand(t)},e.prototype.isCollapsed=function(t){return this.treeExpansionModel.isCollapsed(t)},e.prototype.ensureAncestorsAndSelfVisible=function(t){this.treeExpansionModel.ensureAncestorsAndSelfVisible(t)},e}(t.AbstractTableModel),Se=function(t){function e(e){var n=t.call(this)||this;return n.collapsedIds=e,n._areas=[],n._collapsed=new Set(e),n}return B(e,t),e.prototype.onVisit=function(t){this._areas.push(t)},e.prototype.shouldVisitChildrenOf=function(t){return!this._collapsed.has(t)},Object.defineProperty(e.prototype,"flattenedAreas",{get:function(){return this._areas},enumerable:!1,configurable:!0}),e}(t.SelfAndDescendantsVisitor),Ae=function(t){function e(){return t.call(this)||this}return B(e,t),e}(Y);Ae.decorators=[{type:n.Component,args:[{selector:"aup-tree-table",template:'<aup-table [tableModel]="treeTableModel"></aup-table>\n',encapsulation:n.ViewEncapsulation.None,styles:["td.mat-cell{border-bottom-width:0!important;border-top-width:0!important}td.mat-column-tree-label{width:1px}aup-table-cell-renderer[column-id=tree-label]{padding-left:8px!important}aup-tree-label-cell-renderer{flex:1}"]}]}],Ae.ctorParameters=function(){return[]},Ae.propDecorators={treeTableModel:[{type:n.Input}]},q([w.TrackExternal(),z("design:type",Re)],Ae.prototype,"treeTableModel",void 0);var Oe=function(t){function e(e){var n=t.call(this,e)||this;return n.focusManager=e,n}return B(e,t),e.prototype.arrowLeft=function(t){this.leftArrowCommand.enabled.value&&(t.preventDefault(),t.stopPropagation(),this.leftArrowCommand.execute())},e.prototype.arrowRight=function(t){this.rightArrowCommand.enabled.value&&(t.preventDefault(),t.stopPropagation(),this.rightArrowCommand.execute())},e.prototype.arrowDown=function(t){t.preventDefault(),t.stopPropagation(),this.focusManager.focusNext()},e.prototype.arrowUp=function(t){t.preventDefault(),t.stopPropagation(),this.focusManager.focusPrevious()},e.prototype.ngOnInit=function(){},e}(mt);Oe.decorators=[{type:n.Component,args:[{selector:"aup-vertical-focus-container",template:"<ng-content></ng-content>\n",providers:[{provide:w.FocusManager}],styles:[":host{display:block}"]}]}],Oe.ctorParameters=function(){return[{type:w.FocusManager,decorators:[{type:n.Self}]}]},Oe.propDecorators={rightArrowCommand:[{type:n.Input,args:["command.arrowRight"]}],leftArrowCommand:[{type:n.Input,args:["command.arrowLeft"]}],arrowLeft:[{type:n.HostListener,args:["keyup.arrowLeft",["$event"]]}],arrowRight:[{type:n.HostListener,args:["keyup.arrowRight",["$event"]]}],arrowDown:[{type:n.HostListener,args:["keyup.arrowDown",["$event"]]}],arrowUp:[{type:n.HostListener,args:["keyup.arrowUp",["$event"]]}]},q([w.TrackExternal(),z("design:type",w.Command)],Oe.prototype,"rightArrowCommand",void 0),q([w.TrackExternal(),z("design:type",w.Command)],Oe.prototype,"leftArrowCommand",void 0);var Te=function(t){t.addIconPacks(I.fas)};Te.decorators=[{type:n.NgModule,args:[{declarations:[yt,bt,vt,xt,Rt,St,Mt,Pt,wt,Ct,It,Ot,At,kt,Et,Ft,mt,Oe,gt,nt,de,Zt,fe,Yt,he,Qt,te,Jt,me,t.IconComponent,Tt,ye,ut,at,ft,ot,lt,pt,st,ct,dt,Ae,t.TreeInheritanceIconComponent,be,t.IconComponent,et,ht],imports:[e.CommonModule,c.BrowserAnimationsModule,o.FormsModule,r.MatInputModule,i.MatFormFieldModule,a.MatSelectModule,s.MatTabsModule,tt,m.MatIconModule,d.MatButtonModule,f.MatCheckboxModule,v.MatTableModule,l.PortalModule,u.CdkScrollableModule,C.FontAwesomeModule,b.MatTooltipModule,p.MatAutocompleteModule,g.MatMenuModule,h.MatDividerModule,y.MatProgressSpinnerModule],exports:[xt,Rt,St,Mt,It,Pt,wt,Ct,Ot,At,kt,Et,Ft,mt,Oe,gt,nt,de,Zt,fe,t.IconComponent,Tt,ye,ut,at,ft,ot,lt,pt,st,Ae,et,ht],providers:[Z]}]}],Te.ctorParameters=function(){return[{type:C.FaIconLibrary}]};var De=new n.InjectionToken("InteractionActivityData"),Ee=function(t){function e(){var e=t.apply(this,X(arguments))||this;return e._busyModel=(new w.DelegatingValueModel).withDefault(!1),e._focusedModel=e.registerDisposable(new w.DelegatingValueModel),e.class="aup-activity",e}return B(e,t),Object.defineProperty(e.prototype,"isFocused",{get:function(){return this._focusedModel.value},enumerable:!1,configurable:!0}),e.prototype.initialise=function(t,e){var n=this,o=w.Dsl.disposeWith(this),i=(o.chain,o.when);S.assert.isNil(this._activityContext),this._activityContext=e,this._interactionContext=t,this._focusedModel.setDelegate(e.focused),i(this._focusedModel).becomesTruthy((function(){n.onActivityReady()}))},Object.defineProperty(e.prototype,"interactionContext",{get:function(){return S.assert.isTruthy(this.isInitialised()),this._interactionContext},enumerable:!1,configurable:!0}),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:!1,configurable:!0}),Object.defineProperty(e.prototype,"focused",{get:function(){return this._focusedModel.readonly},enumerable:!1,configurable:!0}),e.prototype.busyWhile=function(t){this._busyModel.setDelegate(t)},e.prototype.isBusy=function(){return this._busyModel.value},e.prototype.isInitialised=function(){return!!this._activityContext},e}(Y);Ee.decorators=[{type:n.Component,args:[{template:""}]}],Ee.propDecorators={class:[{type:n.HostBinding,args:["class"]}],isFocused:[{type:n.HostBinding,args:["attr.focused"]}]};var Fe=function(t){function e(){var e=t.apply(this,X(arguments))||this;return e.align="start",e}return B(e,t),Object.defineProperty(e.prototype,"alignEnd",{get:function(){return"end"===this.align},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"alignStretch",{get:function(){return"stretch"===this.align},enumerable:!1,configurable:!0}),e.prototype.ngOnInit=function(){},e.prototype.hasConfirmCommand=function(){return w.DelegatingCommand.hasDelegate(this.confirmCommand)},e.prototype.hasCancelCommand=function(){return w.DelegatingCommand.hasDelegate(this.cancelCommand)},e}(Y);Fe.decorators=[{type:n.Component,args:[{selector:"aup-activity-actions",template:'<ng-container *ngIf="hasCancelCommand()">\n <aup-command class="cancel" [command]="cancelCommand" [face]="style.cancel"></aup-command>\n</ng-container>\n<ng-container *ngIf="hasConfirmCommand()">\n <aup-command class="confirm" [command]="confirmCommand" [face]="style.confirm"></aup-command>\n</ng-container>\n<div class="content">\n <ng-content></ng-content>\n</div>\n',styles:[':host{-ms-grid-columns:auto auto 1fr;-ms-grid-rows:auto;align-items:center;display:-ms-grid;display:grid;grid-template-areas:"cancel confirm content";grid-template-columns:auto auto 1fr;grid-template-rows:auto;justify-content:end}:host.align-end{-ms-grid-columns:1fr auto auto;grid-template-areas:"content cancel confirm";grid-template-columns:1fr auto auto}:host.align-stretch{-ms-grid-columns:auto 1fr auto;grid-template-areas:"cancel content confirm";grid-template-columns:auto 1fr auto}.cancel{-ms-grid-column:1;-ms-grid-row:1;grid-area:cancel}:host.align-end>.cancel{-ms-grid-column:2;-ms-grid-row:1}:host.align-stretch>.cancel{-ms-grid-column:1;-ms-grid-row:1}.confirm{-ms-grid-column:2;-ms-grid-row:1;grid-area:confirm}.column,:host.align-end>.confirm,:host.align-stretch>.confirm{-ms-grid-column:3;-ms-grid-row:1}.column{grid-area:content;text-align:left}:host.align-end>.column{-ms-grid-column:1;-ms-grid-row:1}:host.align-stretch>.column{-ms-grid-column:2;-ms-grid-row:1}']}]}],Fe.propDecorators={confirmCommand:[{type:n.Input}],cancelCommand:[{type:n.Input}],style:[{type:n.Input}],align:[{type:n.Input}],alignEnd:[{type:n.HostBinding,args:["class.align-end"]}],alignStretch:[{type:n.HostBinding,args:["class.align-stretch"]}]},q([w.TrackExternal(),z("design:type",w.Command)],Fe.prototype,"confirmCommand",void 0),q([w.TrackExternal(),z("design:type",w.Command)],Fe.prototype,"cancelCommand",void 0);var ke=function(t){function e(e){var n=t.call(this)||this;return n.alert=e,n}return B(e,t),e.prototype.ngOnInit=function(){},e}(Ee);ke.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<div matDialogActions>\n <button mat-raised-button color="primary" (click)="done()" data-cy="close-button">{{alert.ok()}}</button>\n</div>\n',styles:[":host{display:block;padding:var(--aup-default-padding)}.mat-dialog-content{margin:0;padding:0}.mat-dialog-actions{align-items:flex-end;justify-content:flex-end;margin-bottom:0!important;padding:0}"]}]}],ke.ctorParameters=function(){return[{type:void 0,decorators:[{type:n.Inject,args:[De]}]}]};var _e=function(t){function e(e){var n=t.call(this)||this;return n.config=e,w.assert.notNil(e),n}return B(e,t),e.prototype.ngOnInit=function(){},Object.defineProperty(e.prototype,"confirm",{get:function(){return this.config.confirm},enumerable:!1,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}(Ee);_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<div 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</div>\n\n',styles:[":host{display:block;padding:var(--aup-default-padding)}.mat-dialog-content{margin:0;padding:0}.mat-dialog-actions{align-items:flex-end;justify-content:flex-end;margin-bottom:0!important;padding:0}"]}]}],_e.ctorParameters=function(){return[{type:void 0,decorators:[{type:n.Inject,args:[De]}]}]};var Le=function(t){function e(e){var n=t.call(this)||this;return n.confirm=e,w.assert.notNil(e),n}return B(e,t),e.prototype.ngOnInit=function(){},e.prototype.isDestructive=function(){return this.confirm.destructive&&this.confirm.destructive()},e}(Ee);Le.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<div 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</div>\n\n',styles:[":host{display:block;padding:var(--aup-default-padding)}.mat-dialog-content{margin:0;padding:0}.mat-dialog-actions{align-items:flex-end;justify-content:flex-end;margin-bottom:0!important;padding:0}"]}]}],Le.ctorParameters=function(){return[{type:void 0,decorators:[{type:n.Inject,args:[De]}]}]};var Ne=function(){function t(){}return t.prototype.startActivity=function(t,e,n){return this.createAndLaunchActivity(t,e,S.Opts.get(n).getOptional("disableClose",!1))},t.prototype.confirm=function(t){return this.confirmOrReject(t).then((function(){return!0})).catch((function(){return!1}))},t.prototype.alert=function(t){return this.createAndLaunchActivity(ke,t,!1)},t.prototype.confirmOrReject=function(t){return this.createAndLaunchActivity(Le,t,!0)},t.prototype.confirmThen=function(t,e,n){return this.createAndLaunchActivity(_e,{confirm:t,activityType:e,data:n},!0)},t}(),Ve=function(){function t(t,e,n){this.activityClass=t,this.activityData=e,this.onComplete=n,this._complete=!1,this.deferredResult=w.Deferred.defer(),this.focusedModel=new w.MutableValueModel,this._activityBusy=(new w.DelegatingValueModel).withDefault(!1)}return t.prototype.isActivityRealised=function(){return!!this._activity},t.prototype.isComplete=function(){return this._complete},Object.defineProperty(t.prototype,"activity",{get:function(){return w.assert.isTruthy(this.isActivityRealised()),this._activity},enumerable:!1,configurable:!0}),t.prototype.setFocused=function(t){this.focusedModel.value=t},Object.defineProperty(t.prototype,"focused",{get:function(){return this.focusedModel.value},enumerable:!1,configurable:!0}),t.prototype.notifyActivityCreated=function(t,e){w.assert.isNil(this._activity),this._activity=t;var n=this;this._activity.initialise(e,{onDone:function(t){n.finishActivity((function(e){return e.resolve(t)}))},onCancel:function(t){n.finishActivity((function(e){return e.reject(t)}))},focused:this.focusedModel.readonly}),this._activityBusy.setDelegate(this._activity.busy)},t.prototype.finishActivity=function(t){w.assert.isFalsey(this.isComplete()),t(this.deferredResult),this._complete=!0,this.onComplete(this),this._activityBusy.dispose()},t.prototype.cancel=function(){this.activity.cancel()},Object.defineProperty(t.prototype,"activityResult",{get:function(){return this.deferredResult.promise},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"activityBusy",{get:function(){return this._activityBusy.readonly},enumerable:!1,configurable:!0}),t}(),He=function(){function t(t,e,n){this.componentFactoryResolver=t,this.viewContainerRef=e,this.injector=n}return Object.defineProperty(t.prototype,"activityRef",{get:function(){return this._activityRef},set:function(t){this.activityRef&&!this.activityRef.isComplete()&&S.lang.illegalState("changing activity before previous one has completed"),this._activityRef=t,this.loadActivity(t)},enumerable:!1,configurable:!0}),t.prototype.ngOnInit=function(){},t.prototype.loadActivity=function(t){var e=n.Injector.create({providers:[{provide:De,useValue:t.activityData}],parent:this.injector}),o=this.componentFactoryResolver.resolveComponentFactory(t.activityClass);this.viewContainerRef.clear(),this.activityComponentRef=this.viewContainerRef.createComponent(o,0,e),this.activityRef.notifyActivityCreated(this.activityComponentRef.instance,this.nestedInteractionContext)},Object.defineProperty(t.prototype,"component",{get:function(){return this.activityComponentRef.instance},enumerable:!1,configurable:!0}),t}();He.decorators=[{type:n.Component,args:[{selector:"aup-activity-outlet",template:"",styles:[":host{display:block}"]}]}],He.ctorParameters=function(){return[{type:n.ComponentFactoryResolver},{type:n.ViewContainerRef},{type:n.Injector}]},He.propDecorators={nestedInteractionContext:[{type:n.Input}],activityRef:[{type:n.Input}]};var je=function(t){function e(){var e=t.call(this)||this;return e.dynamicHeight=!1,e.activityRefs=[],e.garbage=new w.GarbageCollector,e.inAnimation=new w.MutableValueModel(!1),e.busy=(new w.DelegatingValueModel).withDefault(!1),e.registerDisposable(e.busy),e}return B(e,t),e.prototype.ngOnInit=function(){},e.prototype.ngAfterViewInit=function(){var t=this,e=w.Dsl.disposeWith(this);e.chain;e.observe.valuesFrom(this.tabs.animationDone).subscribe((function(){return t.onAnimationFinished()}))},e.prototype.initialise=function(t,e){w.assert.isFalsey(this.isInitialised()),w.assert.notNil(t),w.assert.notNil(e),this._identifier=t,this.interactionServiceApi=e},Object.defineProperty(e.prototype,"identifier",{get:function(){return this._identifier},enumerable:!1,configurable:!0}),e.prototype.isInitialised=function(){return!!this.identifier},e.prototype.isActive=function(){return this.getActiveActivityCount()>0},e.prototype.registerDisposable=function(t){return this.garbage.registerDisposable(t)},e.prototype.dispose=function(){w.assert.isFalsey(this.isActive()),this.garbage.dispose()},e.prototype.getActiveActivityRef=function(){return this.isActive()||S.lang.illegalState("no activity in progress"),V.default.findLast(this.activityRefs,(function(t){return!t.isComplete()}))},e.prototype.cancelActiveActivity=function(){return G(this,void 0,void 0,(function(){return W(this,(function(t){return this.getActiveActivityRef().cancel(),this.isCleaningUp()?[2,this.waitForInteractionContextCleanupToFinish()]:[2,!this.isActive()]}))}))},e.prototype.createAndLaunchActivity=function(t,e,n){var o=this;w.assert.isTruthy(this.isInitialised());var i=new Ve(t,e,(function(){o.getActiveActivityCount()>0?o.triggerTabSynchronisation():o.finishAndStartCleanup()}));return this.launchActivity(i),1===this.activityRefs.length&&this.interactionServiceApi.notifyActive(this),i.activityResult},e.prototype.getActiveActivityCount=function(){return this.activityRefs.filter((function(t){return!t.isComplete()})).length},e.prototype.isCleaningUp=function(){return!!this._deferredCleanUp},e.prototype.waitForInteractionContextCleanupToFinish=function(){return G(this,void 0,void 0,(function(){return W(this,(function(t){return[2,!this._deferredCleanUp||this._deferredCleanUp]}))}))},e.prototype.finishAndStartCleanup=function(){var t=this;if(!this._deferredCleanUp){this.activityRefs=[];var e=this.interactionServiceApi.notifyFinished(this);this._deferredCleanUp=e.finally((function(){t._deferredCleanUp=null}))}},e.prototype.launchActivity=function(t){var e=this.activityRefs.filter((function(t){return!t.isComplete()}));this.activityRefs=e.concat(t),this.synchroniseSelectedTabIndex()},e.prototype.activityIndex=function(t,e){return t},e.prototype.onAnimationFinished=function(){this.onAnimationFinishedJob&&(this.onAnimationFinishedJob(),this.onAnimationFinishedJob=void 0)},e.prototype.synchroniseSelectedTabIndex=function(){var t=this,e=this.tabs.selectedIndex,n=this.getActiveActivityCount()-1;e!==n&&(this.inAnimation.value=!0,this.activityRefs[n].setFocused(!1),this.busy.setDelegate(this.activityRefs[n].activityBusy),this.tabs.selectedIndex=n,this.onAnimationFinishedJob=function(){t.activityRefs=t.activityRefs.filter((function(t){return!t.isComplete()})),t.inAnimation.value=!1,t.activityRefs.forEach((function(t,e){t.setFocused(e===n)}))})},e.prototype.getSelectedOutlet=function(){return this.activityOutlets.toArray()[this.tabs.selectedIndex]},e.prototype.getSelectedTabIndex=function(){return this.tabs.selectedIndex},e.prototype.triggerTabSynchronisation=function(){var t=this;this.syncSelectedTabTimeout&&clearTimeout(this.syncSelectedTabTimeout),this.syncSelectedTabTimeout=setTimeout((function(){t.syncSelectedTabTimeout=null,t.synchroniseSelectedTabIndex()}),75)},e}(Ne);je.decorators=[{type:n.Component,args:[{selector:"aup-activity-container",template:'<mat-tab-group #tabs no-tab-header\n [dynamicHeight]="dynamicHeight"\n [class.full-height-tabs]="!dynamicHeight">\n <mat-tab *ngFor="let activityRef of activityRefs; let i = index; trackBy: activityIndex">\n <aup-busy-overlay [busyModel]="busy">\n \x3c!--\n We have issues where angular is triggering a leave animation when an\n new activity is started, but is not running the enter animation\n when it is scrolled back into view. So we track the tab changes and\n disable all animations inside the tab while we\'re animating.\n --\x3e\n <div class="activity-outlet-wrapper" [@.disabled]="!activityRef.focused">\n <aup-activity-outlet [nestedInteractionContext]="this" [activityRef]="activityRef"></aup-activity-outlet>\n </div>\n </aup-busy-overlay>\n </mat-tab>\n</mat-tab-group>\n',styles:[":host{display:flex;flex-direction:column}aup-busy-overlay,mat-tab-group{flex:1}"]}]}],je.ctorParameters=function(){return[]},je.propDecorators={dynamicHeight:[{type:n.Input}],tabs:[{type:n.ViewChild,args:["tabs",{static:!0}]}],activityOutlets:[{type:n.ViewChildren,args:[He]}]};var Ue=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return B(e,t),e.prototype.ngOnInit=function(){},e}(Y);Ue.decorators=[{type:n.Component,args:[{selector:"aup-activity-title",template:"<ng-content></ng-content>\n",styles:[":host{display:block}"]}]}];var Be=function(){function t(t,e,n){this.activeInteractionContextIds=t,this.activeModalContext=e,this.createExclusiveInteractionContext=n}return t.prototype.isActive=function(){return this.getActiveInteractionContextIds().length>0},t.prototype.isModalActive=function(){return!!this.activeModalContext.value},t.prototype.isComponentInteracting=function(t){return t.interactionContext&&t.interactionContext.isActive()},t.prototype.getActiveInteractionContextIds=function(){return this.activeInteractionContextIds.value},t.prototype.cancelCurrentModalInteraction=function(){return this.activeModalContext.value.cancelActiveActivity()},t.prototype.cancelComponentInteraction=function(t){return t.interactionContext.cancelActiveActivity()},t}(),qe=function(){},ze=0;t.InteractionService=function(){function t(e){this.modelInteractionContextFactory=e,this.garbage=new w.GarbageCollector,this._navigationInProgress=(new w.DelegatingValueModel).withDefault(!1);var n=w.Dsl.disposeWith(this.garbage),o=n.chain,i=n.valueOf;n.before,n.when,n.after,n.observe,n.switchOn;this.exclusiveInteractionRegistry=new t.ContextRegistry,this.modalInteractionRegistry=new t.ContextRegistry,this.inPlaceInteractionRegistry=new t.ContextRegistry,this.modalInteractionRegistry.disableWhen(i.any(this.exclusiveInteractionRegistry.active,this.modalInteractionRegistry.active).areTruthy()),this.inPlaceInteractionRegistry.disableWhen(i.any(this.exclusiveInteractionRegistry.active,this.modalInteractionRegistry.active,this.inPlaceInteractionRegistry.active).areTruthy()),this.active=i.any(this.inPlaceInteractionRegistry.active,this.modalInteractionRegistry.active).areTruthy(),this.activeInteractionContextIds=o(this.inPlaceInteractionRegistry.interactionContextIds).concat(this.modalInteractionRegistry.interactionContextIds),this.activeModalContext=o(this.modalInteractionRegistry.interactionContexts).first(),this.inModalInteraction=o(this.activeModalContext).isNotNil()}return t.prototype.isActive=function(){return this.active.value},t.prototype.createModalInteractionContextFor=function(t){return this.createModalInteractionContextDisposedWith(t)},t.prototype.createModalInteractionContextDisposedWith=function(e){return this.modelInteractionContextFactory.createInteractionContext("modal",new t.ApiAdapter(this.placeRouter,this.modalInteractionRegistry))},t.prototype.registerInplaceInteractionContext=function(e){e.initialise("ip"+ ++ze,new t.ApiAdapter(this.placeRouter,this.inPlaceInteractionRegistry))},t.prototype.registerPlaceRouter=function(e){var n=this;S.assert.isFalsey(this.placeRouter),this.placeRouter=e,this._navigationInProgress.setDelegate(this.placeRouter.navigationInProgress);var o=this;return new Be(this.activeInteractionContextIds,this.activeModalContext,(function(){return o.modelInteractionContextFactory.createInteractionContext("exclusive",new t.ApiAdapter(n.placeRouter,n.exclusiveInteractionRegistry))}))},t}(),t.InteractionService.ɵprov=n.ɵɵdefineInjectable({factory:function(){return new t.InteractionService(n.ɵɵinject(qe))},token:t.InteractionService,providedIn:"root"}),t.InteractionService.decorators=[{type:n.Injectable,args:[{providedIn:"root"}]}],t.InteractionService.ctorParameters=function(){return[{type:qe}]},function(t){var e=function(t){function e(){var e=t.call(this)||this;e._interactions=new w.MutableListModel,e._disabledDelegate=(new w.DelegatingValueModel).withDefault(!1);var n=w.Dsl.disposeWith(e),o=n.chain;n.valueOf,n.before,n.when,n.after,n.observe,n.switchOn;return e.active=o(e._interactions).isNotEmpty(),e.interactionContextIds=o(e._interactions).pluck("identifier"),e}return B(e,t),Object.defineProperty(e.prototype,"interactionContexts",{get:function(){return this._interactions.readonly},enumerable:!1,configurable:!0}),e.prototype.start=function(t){this._interactions.push(t)},e.prototype.finish=function(t){this._interactions.remove(t)},e.prototype.isActive=function(){return this.active.value},e.prototype.disableWhen=function(t){this._disabledDelegate.setDelegate(t)},e}(w.GarbageCollector);t.ContextRegistry=e;var n=function(){function t(t,e){this.placeRouter=t,this.contextRegistry=e}return t.prototype.notifyActive=function(t){return S.assert.isTruthy(t.identifier),this.contextRegistry.start(t),this.isNavigationInProgress()?Promise.resolve():this.placeRouter.syncInteractionContextIdsWithRouter()},t.prototype.isNavigationInProgress=function(){return this.placeRouter.navigationInProgress.value},t.prototype.notifyFinished=function(t){return this.contextRegistry.finish(t),this.isNavigationInProgress()?Promise.resolve():this.placeRouter.syncInteractionContextIdsWithRouter()},t}();t.ApiAdapter=n}(t.InteractionService||(t.InteractionService={}));var Ge=function(t){function e(e,n){var o=t.call(this)||this;return o.interactionService=e,o.tabConfig=n,o.animateFirstActivity=!0,o}return B(e,t),Object.defineProperty(e.prototype,"animationDuration",{get:function(){var t;return this.animateFirstActivity?(null===(t=this.tabConfig)||void 0===t?void 0:t.animationDuration)||"500ms":"0ms"},enumerable:!1,configurable:!0}),e.prototype.ngAfterViewInit=function(){this.interactionService.registerInplaceInteractionContext(this)},e.prototype.initialise=function(t,e){this.activityContainerComponent.initialise(t,e)},Object.defineProperty(e.prototype,"identifier",{get:function(){return this.activityContainerComponent.identifier},enumerable:!1,configurable:!0}),e.prototype.alert=function(t){return this.activityContainerComponent.alert(t)},e.prototype.cancelActiveActivity=function(){return this.activityContainerComponent.cancelActiveActivity()},e.prototype.confirm=function(t){return this.activityContainerComponent.confirm(t)},e.prototype.confirmOrReject=function(t){return this.activityContainerComponent.confirmOrReject(t)},e.prototype.confirmThen=function(t,e,n){return this.activityContainerComponent.confirmThen(t,e)},e.prototype.isActive=function(){return this.activityContainerComponent.isActive()},e.prototype.startActivity=function(t,e,n){return this.activityContainerComponent.startActivity(t,e,n)},e}(Y);Ge.decorators=[{type:n.Component,args:[{selector:"aup-in-place-interaction-context",template:'<mat-tab-group no-tab-header [selectedIndex]="isActive() ? 1 : 0" full-height-tabs [dynamicHeight]="false" [animationDuration]="animationDuration">\n <mat-tab>\n <ng-content></ng-content>\n </mat-tab>\n <mat-tab>\n <aup-activity-container #activityContainer [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}"]}]}],Ge.ctorParameters=function(){return[{type:t.InteractionService},{type:void 0,decorators:[{type:n.Inject,args:[s.MAT_TABS_CONFIG]},{type:n.Optional}]}]},Ge.propDecorators={activityContainerComponent:[{type:n.ViewChild,args:["activityContainer",{static:!0}]}],animateFirstActivity:[{type:n.Input}]};var We=function(t){function e(){var e=t.call(this)||this;return e.icon="mat:add",e.tabindex=0,e.clickCommand=w.Command.create((function(t){e.activityClass?e.startActivity(e.activityClass,e.activityData).catch((function(t){})):e.addCommand.withContext(t).execute()})),e}return B(e,t),Object.defineProperty(e.prototype,"active",{get:function(){return!!this.interactionContext&&this.interactionContext.isActive()},enumerable:!1,configurable:!0}),e.prototype.startActivity=function(t,e){return this.interactionContext.startActivity(t,e)},e.prototype.ngOnInit=function(){},e}(Y);We.decorators=[{type:n.Component,args:[{selector:"aup-add-item-interaction-context",template:'<aup-in-place-interaction-context [animateFirstActivity]="false">\n <a part="link" class="link" [pectinCommand]="clickCommand"><aup-icon [icon]="icon"></aup-icon> {{label}}</a>\n</aup-in-place-interaction-context>\n',styles:[":host{--def-link-background:var(--link-background,transparent);--def-link-background-hover:var(--link-background-hover,rgba(0,0,0,0.05));--def-link-border-radius:var(--link-border-radius,4px);--def-link-color:var(--link-color,currentColor);--def-link-color-hover:var(--link-color-hover,currentColor);--def-link-padding:var(--link-padding,calc(var(--aup-default-padding)/2));border-radius:var(--def-link-border-radius);box-sizing:border-box;display:flex;flex-direction:column;outline:none}:host:hover a.link{background-color:var(--def-link-background-hover);color:var(--def-link-color-hover)}a.link,aup-in-place-interaction-context{border-radius:var(--def-link-border-radius)}a.link{align-items:center;background:var(--def-link-background);color:var(--def-link-color);cursor:pointer;display:flex;flex-direction:row;padding:var(--def-link-padding);text-decoration:none}a.link mat-icon{margin-right:8px}"]}]}],We.ctorParameters=function(){return[]},We.propDecorators={label:[{type:n.Input}],icon:[{type:n.Input}],activityClass:[{type:n.Input}],activityData:[{type:n.Input}],addCommand:[{type:n.Input}],interactionContext:[{type:n.ViewChild,args:[Ge]}],active:[{type:n.HostBinding,args:["class.interaction-active"]}],tabindex:[{type:n.HostBinding,args:["tabindex"]}]},q([w.TrackExternal(),z("design:type",w.Command)],We.prototype,"addCommand",void 0);var Ke=function(t){function e(e,n,o){var i=t.call(this)||this;return i._element=e,i._overlay=n,i.outputPortal=new l.ComponentPortal(Ge),i.anchorX="start",i.anchorY="bottom",i.scrollContainers=o?[o]:[],i}return B(e,t),Object.defineProperty(e.prototype,"active",{get:function(){return this.isActive()},enumerable:!1,configurable:!0}),e.prototype.startActivity=function(t,e){var n=this,o=this._overlay.create({hasBackdrop:!1,panelClass:"aup-popup-interaction-panel",positionStrategy:this._overlay.position().flexibleConnectedTo(this._element).withPush(!0).withPositions(this.computePositions()).withGrowAfterOpen(!0).withScrollableContainers(this.scrollContainers)}),i=this.scrollContainers.map((function(t){return t.elementScrolled().subscribe((function(){o.updatePosition()}))})),r=o.attach(this.outputPortal);return this.interactionContext=r.instance,new Promise((function(r,a){setTimeout((function(){n.interactionContext.startActivity(t,e).then(r).catch(a).finally((function(){i.forEach((function(t){return t.unsubscribe()})),o.dispose()})),setTimeout((function(){o.updatePosition()}))}))}))},e.prototype.computePositions=function(){var t="start"===this.anchorX?"start":"end",e="top"===this.anchorY?"bottom":"top";return[{originX:this.anchorX,originY:this.anchorY,overlayX:t,overlayY:e}]},e.prototype.cancelActiveActivity=function(){return this.interactionContext.cancelActiveActivity()},e.prototype.isActive=function(){return this.interactionContext&&this.interactionContext.isActive()},e.prototype.ngOnInit=function(){},e}(Y);Ke.decorators=[{type:n.Component,args:[{selector:"aup-popup-interaction-context",template:"<ng-content></ng-content>\n",styles:[":host{display:inline}:host.interaction-active{background:rgba(0,0,0,.05)}"]}]}],Ke.ctorParameters=function(){return[{type:n.ElementRef},{type:E.Overlay},{type:E.CdkScrollable,decorators:[{type:n.Optional},{type:n.SkipSelf}]}]},Ke.propDecorators={active:[{type:n.HostBinding,args:["class.interaction-active"]}],anchorX:[{type:n.Input}],anchorY:[{type:n.Input}]};var Xe=function(t){function e(){var e=t.call(this)||this;return e.activityDone=new n.EventEmitter,e.activityCancelled=new n.EventEmitter,e}return B(e,t),e.prototype.onEnter=function(t){t.preventDefault(),t.stopPropagation(),this.aupInteractionContextTriggerFor.isActive()?this.aupInteractionContextTriggerFor.cancelActiveActivity():this.startActivity()},e.prototype.onClick=function(t){t.preventDefault(),t.stopPropagation(),this.aupInteractionContextTriggerFor.isActive()?this.aupInteractionContextTriggerFor.cancelActiveActivity():this.startActivity()},e.prototype.startActivity=function(){var t=this;w.assert.isTruthy(this.aupInteractionContextTriggerFor),w.assert.isFalsey(this.aupInteractionContextTriggerFor.isActive()),w.assert.isTruthy(this.activityClass),this.aupInteractionContextTriggerFor.startActivity(this.activityClass,this.activityData).then((function(e){t.activityDone.emit(e)})).catch((function(e){t.activityCancelled.emit(e)}))},e.prototype.prepareActivityData=function(){return V.default.isFunction(this.activityDataFactory())?this.activityDataFactory():this.activityData},e}(w.GarbageCollector);Xe.decorators=[{type:n.Directive,args:[{selector:"[aupInteractionContextTriggerFor]"}]}],Xe.ctorParameters=function(){return[]},Xe.propDecorators={aupInteractionContextTriggerFor:[{type:n.Input}],activityClass:[{type:n.Input}],activityData:[{type:n.Input}],activityDataFactory:[{type:n.Input}],activityDone:[{type:n.Output}],activityCancelled:[{type:n.Output}],onEnter:[{type:n.HostListener,args:["keyup.enter",["$event"]]}],onClick:[{type:n.HostListener,args:["click",["$event"]]}]};var $e=function(t){function e(e){var n=t.call(this)||this;n.data=e,n.class="aup-input-activity";var o=new w.DirtyTrackingForm;return n.valueModel=o.valueModel(n.data.initialValue),n.valueModel.validateUsing(e.validators||[]),n.confirmCommand=w.Command.create((function(){if(n.valueModel.validate()){if(e.save)return Promise.resolve(e.save(n.valueModel,n.interactionContext)).then((function(){return n.done()}));n.done(n.valueModel.value)}})),n.cancelCommand=w.Command.create((function(){n.cancel()})),n}return B(e,t),e.prototype.onActivityReady=function(){this.valueModel.focusContext.requestFocus()},e}(Ee);$e.decorators=[{type:n.Component,args:[{template:""}]}],$e.ctorParameters=function(){return[{type:void 0,decorators:[{type:n.Inject,args:[De]}]}]},$e.propDecorators={class:[{type:n.HostBinding,args:["class"]}]};var Ye=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return B(e,t),e}($e);Ye.decorators=[{type:n.Component,args:[{selector:"aup-string-input-activity",template:'\n <aup-string-input [valueModel]="valueModel"\n [label]="data.label"\n [placeholder]="data.placeholder"\n [command.enter]="confirmCommand"\n [command.escape]="cancelCommand"></aup-string-input>\n <aup-activity-actions align="end"\n [confirmCommand]="confirmCommand"\n [cancelCommand]="cancelCommand"\n [style]="data.buttonStyle"></aup-activity-actions>\n '}]}];var Je=function(t){function e(){var e=t.apply(this,X(arguments))||this;return e.defaultOptionLabelFormat=function(t){return e.data.optionLabel?t[e.data.optionLabel]:t},e}return B(e,t),Object.defineProperty(e.prototype,"optionLabelFormat",{get:function(){var t;return null!==(t=this.data.optionLabelFormat)&&void 0!==t?t:this.defaultOptionLabelFormat},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"options",{get:function(){var t;return(null===(t=this.data.optionsModel)||void 0===t?void 0:t.value)||this.data.options},enumerable:!1,configurable:!0}),e}($e);Je.decorators=[{type:n.Component,args:[{selector:"aup-select-input-activity",template:'\n <aup-select-input [valueModel]="valueModel"\n [label]="data.label"\n [placeholder]="data.placeholder"\n [command.enter]="confirmCommand"\n [command.escape]="cancelCommand"\n [options]="options"\n [optionLabelFormat]="optionLabelFormat"\n ></aup-select-input>\n <aup-activity-actions align="end"\n [confirmCommand]="confirmCommand"\n [cancelCommand]="cancelCommand"\n [style]="data.buttonStyle"\n ></aup-activity-actions>\n '}]}];var Ze=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return B(e,t),e.fromList=function(t,n){var o=new e(t);return n&&n(o),o},e.prototype.addSelectionColumn=function(t){return this._addSelectionColumn(t)},e}(t.AbstractTableModel),Qe=function(){};Qe.decorators=[{type:n.NgModule,args:[{imports:[e.CommonModule,d.MatButtonModule,T.MatDialogModule,s.MatTabsModule,l.PortalModule,D.RouterModule,m.MatIconModule,tt,O.FlexModule,O.GridModule,Te],declarations:[je,Le,_e,ke,He,Ge,We,Fe,Ke,Ye,Je,$e,Xe,Ee,Ue],exports:[je,He,Ue,Ge,We,Fe,Ke,Xe,Ye,Je],entryComponents:[je,Le,_e,ke],providers:[t.InteractionService]}]}],t.ParameterDefinition=function(){function t(t,e,n){this.propertyName=t,this.urlFormat=n,this.options=S.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:!1,configurable:!0}),Object.defineProperty(t.prototype,"isRouteParameter",{get:function(){return!!this.urlFormat},enumerable:!1,configurable:!0}),t.prototype.getOptionValue=function(t){return this.options.getOptional(t,null)},t.prototype.sanitise=function(t,e,n,o,i){return G(this,void 0,void 0,(function(){var o;return W(this,(function(i){return this.isMissingFrom(e)&&!n.lastVisitIncluded(e.placeDefinition)?(o=n.getMostRecentVisitFor(e.placeDefinition),this.remember&&o&&(t=o.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){var e=function(t){function e(){var e=t.apply(this,X(arguments))||this;return e.isRouteId=!0,e.isArray=!1,e}return B(e,t),e.prototype.isEmptyValue=function(t){return V.default.isNil(t)},e.prototype.hasChanged=function(t,e){return t!==e},e}(t);t.RouteId=e;var n=function(t){function e(){var e=t.apply(this,X(arguments))||this;return e.isRouteId=!1,e.isArray=!1,e}return B(e,t),e.prototype.isEmptyValue=function(t){return V.default.isNil(t)},e.prototype.hasChanged=function(t,e){return t!==e},e}(t);t.ValueParameter=n;var o=function(t){function e(e,n,o){var i=t.call(this,e,n,o)||this;return i.isRouteId=!1,i.isArray=!0,i}return B(e,t),e.prototype.isEmptyValue=function(t){return V.default.isNil(t)||t.length<1},e.prototype.hasChanged=function(t,e){return!V.default.isEqual(t,e)},e}(t);t.ArrayParameter=o}(t.ParameterDefinition||(t.ParameterDefinition={}));var tn=function(){function t(t,e,n,o,i,r,a){this.component=t,this.path=e,this.authenticate=n,this.roles=o,this.data=i,this.routeParameters=r,this.children=a}return t.prototype.hasRouteId=function(){return!!this.getRouteIdParameterDef()},t.prototype.getRouteIdParameterDef=function(){return this.routeParameters.find((function(t){return t.isRouteId}))},t.prototype.getRouteParameterDefs=function(t){return void 0===t&&(t=!1),this.getVisitParameterDefs({includeRouteId:t,includeRouteParameters:!0})},t.prototype.getVisitParameterDefs=function(t){var e=S.Opts.get(t),n=!t||e.getOptional("includeRouteId",!1),o=!t||e.getOptional("includeRouteParameters",!1),i=!t||e.getOptional("includeNonRouteParameters",!1);return this.routeParameters.filter((function(t){return n&&t.isRouteId||o&&t.isRouteParameter&&!t.isRouteId||i&&!t.isRouteParameter}))},t.prototype.getPlaceData=function(t,e){return this.data?V.default.isNil(this.data[t])?e:this.data[t]:e},t.prototype.searchPlaceData=function(t,e){var n=this;if(this.data){var o=t.find((function(t){return!V.default.isNil(n.data[t])}));return o?this.data[o]:e}return e},t.prototype.getRouteIdFrom=function(t){var e=this.getRouteIdParameterDef();return e?t.getParameter(e.name):null},t.prototype.getFormattedRouteId=function(t){return t.hasRouteId()?this.getRouteIdParameterDef().urlFormat.format(t.getRouteId()):""},t.prototype.getFormattedRouteParameters=function(t,e){void 0===e&&(e=!1);var n={};return this.getVisitParameterDefs({includeRouteId:e,includeRouteParameters:!0}).forEach((function(e){var o=t.getParameter(e.name);e.isEmptyValue(o)||(e.isArray?(w.assert.isArray(o),n[e.name]=o.map((function(t){return e.urlFormat.format(t)}))):(w.assert.isFalsey(Array.isArray(o)),n[e.name]=e.urlFormat.format(o)))})),n},t.prototype.getNonRouteParameters=function(t){var e={};return this.getVisitParameterDefs({includeNonRouteParameters:!0}).forEach((function(n){var o=t.getParameter(n.name);n.isEmptyValue(o)||(e[n.name]=o)})),e},t.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 o=t.get(n.name).split(",").map((function(t){return t.trim()}));e[n.name]=o.map((function(t){return n.urlFormat.parse(t)}))}else{var i=t.get(n.name);n.isRouteId&&V.default.isEmpty(i)||(e[n.name]=n.urlFormat.parse(i))}})),e},t}();q([x.Memoize(),z("design:type",Function),z("design:paramtypes",[]),z("design:returntype",t.ParameterDefinition)],tn.prototype,"getRouteIdParameterDef",null),q([x.Memoize(),z("design:type",Function),z("design:paramtypes",[Object]),z("design:returntype",Array)],tn.prototype,"getRouteParameterDefs",null),q([x.Memoize(),z("design:type",Function),z("design:paramtypes",[Object]),z("design:returntype",Array)],tn.prototype,"getVisitParameterDefs",null);var en="PLACE_DEFINITION_OPTIONS",nn=Symbol("place:route:parameters");t.PlaceComponent=function(t){function e(){var e=t.call(this)||this;e.visitModel=new w.MutableValueModel,e._inVisitUpdate=new w.Guard,e._active=new w.MutableValueModel(!1);var n=w.Dsl.disposeWith(e),o=(n.chain,n.valueOf,n.before,n.when);n.after,n.observe,n.switchOn;return o(e._active).becomesTruthy((function(){return e.onPlaceReady()})),e}return B(e,t),e.prototype.initialiseVisit=function(t,e){var n=this;w.assert.isNil(this.visitModel.value);var o=w.Dsl.disposeWith(this).when;this.visitModel.value=t,w.DebugContext.getOrCreate(this.visitModel).tag(this.placeDefinition.component.name+".visitModel"),this.placeDefinition.getVisitParameterDefs().forEach((function(t){return n.installBinding(t)})),o(this.visitModel).changes((function(t,n){e(t,n)}),{unless:this._inVisitUpdate})},e.prototype.updateVisit=function(t){var e=this;w.assert.isTruthy(this.isInitialised()),w.assert.notNil(t),this._inVisitUpdate.whileTrue((function(){e.visitModel.value=t}))},e.prototype.isInitialised=function(){return!!this.visitModel.value},e.prototype.installBinding=function(t){var e=this[t.propertyName];w.DebugContext.tag(e,this.placeDefinition.component.name+"."+t.propertyName),this.registerDisposable(new w.Binding(this.visitModel,e,{toRight:function(e){return e.getParameter(t.name)},toLeft:function(e,n){return n.replace(t,e)}})).writeRight()},Object.defineProperty(e.prototype,"placeDefinition",{get:function(){return e.getDefinition(this.constructor)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"childPlaces",{get:function(){return this.placeDefinition.children.map((function(t){return t.component}))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"active",{get:function(){return this._active.readonly},enumerable:!1,configurable:!0}),e.prototype._notifyActive=function(t){this._active.value=t},e.prototype.onPlaceReady=function(){},e}(Y),t.PlaceComponent.decorators=[{type:n.Directive}],t.PlaceComponent.ctorParameters=function(){return[]},q([k.Memoize(),z("design:type",tn),z("design:paramtypes",[])],t.PlaceComponent.prototype,"placeDefinition",null),function(t){function e(e){return w.lang.constructorChain(e).includes(t)}t.isPlaceComponentConstructor=e,t.getRouteParameters=function(t){return S.Klass.get(t).getMetadataList(nn)},t.getDefinition=function(t){if(t instanceof D.ActivatedRouteSnapshot){var n=t.component;if(!e(n))throw new Error("ActivatedRouteSnapshot component is not a PlaceComponent, got "+n);return Reflect.getMetadata(en,n)}return Reflect.getMetadata(en,t)},t.injectDefinition=function(t,e){Reflect.defineMetadata(en,e,t)}}(t.PlaceComponent||(t.PlaceComponent={}));var on=function(){function t(t,e,n){this.component=t,this.navigationSession=e,this.isPrimaryComponent=n}return Object.defineProperty(t.prototype,"routerInteractionAdapter",{get:function(){return this.navigationSession.interactionServiceAdapter},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"urlService",{get:function(){return this.navigationSession.urlService},enumerable:!1,configurable:!0}),t.prototype.canDeactivate=function(t,e){return G(this,void 0,void 0,(function(){return W(this,(function(n){return this.canDeactivatePromise||(this.canDeactivatePromise=this.canDeactivateComponent(t,e)),[2,this.canDeactivatePromise]}))}))},t.prototype.canDeactivateComponent=function(t,e){return G(this,void 0,void 0,(function(){var t,n;return W(this,(function(o){switch(o.label){case 0:return this.navigationSession.isPopState?this.isPrimaryComponent&&this.routerInteractionAdapter.isModalActive()?(t=this.urlService.getActiveInteractionIdsFromUrl(e.url),n=this.routerInteractionAdapter.getActiveInteractionContextIds(),M.isEqual(n,t)?[3,2]:[4,this.routerInteractionAdapter.cancelCurrentModalInteraction()]):[3,3]:[3,5];case 1:return o.sent(),[2,!1];case 2:return[3,5];case 3:return this.routerInteractionAdapter.isComponentInteracting(this.component)?[4,this.routerInteractionAdapter.cancelComponentInteraction(this.component)]:[3,5];case 4:return o.sent(),[2,!1];case 5:if(this.isNotJustAChangeInRouteId(e)){if(this.component.canDeactivate)return[2,this.component.canDeactivate(this.navigationSession.canDeactivateInteractionContext)];if(this.routerInteractionAdapter.isComponentInteracting(this.component))return console.warn("Route changed while component has active interaction, cancelling navigation"),[2,!1]}return[2,!0]}}))}))},t.prototype.isNotJustAChangeInRouteId=function(t){return!t.includesPathOf(this.component.placeDefinition)},t}(),rn=function(t){function e(e,n){var o=t.call(this)||this;return o.context=e,o.startingUrl=n,o.debugPropertyKeys=[],o._visits=new Map,o.componentDeactivationHandlers=new Map,o._interactionContext=o.context.routerInteractionAdapter.createExclusiveInteractionContext(),o.onDispose((function(){o._interactionContext&&o._interactionContext.dispose()})),o}return B(e,t),Object.defineProperty(e.prototype,"name",{get:function(){return this.constructor.name},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"urlService",{get:function(){return this.context.urlService},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"interactionServiceAdapter",{get:function(){return this.context.routerInteractionAdapter},enumerable:!1,configurable:!0}),e.prototype.storeVisit=function(t){this._visits.set(t.placeDefinition,t)},e.prototype.getVisitFor=function(t){return this._visits.get(t)},Object.defineProperty(e.prototype,"canDeactivateInteractionContext",{get:function(){return this._interactionContext},enumerable:!1,configurable:!0}),e.prototype.notifyActive=function(){},e.prototype.onRouterStarted=function(t){this.ignore(t)},e.prototype.onUrlChange=function(t){this.canDeactivateInteractionContext&&this.canDeactivateInteractionContext.isActive()&&this.cancelCanDeactivateInteraction(t)},e.prototype.onPopState=function(t){return this.illegalTransition(t)},e.prototype.onRouterCancelled=function(t){return this.illegalTransition(t)},e.prototype.onRouterError=function(t){return this.illegalTransition(t)},e.prototype.onRouterEnd=function(t){return this.illegalTransition(t)},e.prototype.getVisits=function(){return Array.from(this._visits.values())},e.prototype.illegalTransition=function(t){return w.lang.illegalState(t.toString()+" not supported by "+this.toString())},e.prototype.currentRouterUrl=function(){return this.urlService.getCurrentRouterUrl()},e.prototype.resetBrowserLocation=function(t,e){void 0===e&&(e={replaceCurrent:!1}),this.urlService.resetBrowserLocation(t,e)},e.prototype.repairBrowserHistoryAndUrlAfterGuardCancellation=function(t,e){w.Logger.get(this).info("WORK-AROUND: Updating browser location after pop state - see angular issue #13586"),this.urlService.resetBrowserLocation(t,{replaceCurrent:!0}),this.urlService.resetBrowserLocation(e,{replaceCurrent:!1})},e.prototype.ignore=function(t,e){e=e?" -> "+e:""},e.prototype.toString=function(){return this.constructor.name+"("+this.debugState()+")"},e.prototype.debugState=function(t){var e=this;return(t||this.debugPropertyKeys).map((function(t){return t+": "+e[t]})).join(", ")},e.prototype.canDeactivatePlace=function(t,e,n){return G(this,void 0,void 0,(function(){var o,i;return W(this,(function(r){return(o=this.componentDeactivationHandlers.get(t))||(i=0===this.componentDeactivationHandlers.size,o=new on(t,this,i),this.componentDeactivationHandlers.set(t,o)),[2,o.canDeactivate(e,n).then((function(t){return t})).catch((function(t){throw t}))]}))}))},e.prototype.cancelCanDeactivateInteraction=function(t){w.Logger.get(this).info("back button pressed during navigation session interaction promise");var e=this.detachCanDeactivateInteractionContext();w.Logger.get(this).info("cancelling current navigation activity.."),e.cancelActiveActivity().then((function(){e.dispose()})),this.handleCanDeactivateCancelledEventScenario(t)},e.prototype.reinstateUrlAfterAngularChangedItOnCancellation=function(t){this.resetBrowserLocation(t,{replaceCurrent:!0})},e.prototype.detachCanDeactivateInteractionContext=function(){var t=this._interactionContext;return this._interactionContext=null,t},e}(w.GarbageCollector),an=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return B(e,t),e.prototype.handleCanDeactivateCancelledEventScenario=function(t){S.lang.illegalState("onCanDeactivateInteractionCancelled not supported for event clean up states")},e}(rn),sn=function(t){function e(e,n,o){var i=t.call(this,e,n)||this;return i.locationChangeTriggerUrl=o,i.isPopState=!1,i.firstCancelHandled=!1,i.popStateHandled=!1,i.debugPropertyKeys=["idle","startingUrl","poppedHistoryUrl","locationChangeTriggerUrl","popStateEventUrl","firstCancelHandled","popStateHandled"],i}return B(e,t),e.prototype.onRouterStarted=function(t){this.ignore(t)},e.prototype.onRouterCancelled=function(t){this.repairBrowserHistoryAndUrlAfterGuardCancellation(this.locationChangeTriggerUrl,this.startingUrl),this.context.finishRoutingSession()},e.prototype.onRouterEnd=function(t){this.ignore(t)},e.prototype.onRouterError=function(t){this.ignore(t)},e.prototype.onPopState=function(t){this.ignore(t)},e.prototype.canDeactivatePlace=function(t,e,n){return G(this,void 0,void 0,(function(){return W(this,(function(t){return[2,!1]}))}))},e}(an),cn=function(t){function e(e,n){var o=t.call(this,e,n)||this;return o.isPopState=!0,o.debugPropertyKeys=["startingUrl","poppedHistoryUrl"],o.finished=w.Deferred.defer(),o}return B(e,t),e.prototype.onPopState=function(t){this.gotPopState=!0},e.prototype.onRouterStarted=function(t){this.ignore(t)},e.prototype.onRouterCancelled=function(t){this.ignore(t)},e.prototype.onUrlChange=function(t){},e.prototype.finishUp=function(){this.context.finishRoutingSession(),this.finished.resolve(!0)},e.prototype.onRouterEnd=function(t){this.gotPopState&&this.finishUp()},e.prototype.handleCanDeactivateCancelledEventScenario=function(t){w.lang.illegalState("onCanDeactivateInteractionCancelled not supported for activity context synchronisation since we should never leave a place")},Object.defineProperty(e.prototype,"finishedPromise",{get:function(){return this.finished.promise},enumerable:!1,configurable:!0}),e}(rn),ln=function(t){function e(e,n,o){var i=t.call(this,e,n)||this;return i.wasTriggeredByPopState=o,i.isPopState=!1,i}return B(e,t),e.prototype.notifyActive=function(){var t=this;setTimeout((function(){t.syncInteractionIdsWithRouter()}))},e.prototype.onRouterEnd=function(t){this.context.finishRoutingSession()},e.prototype.onRouterCancelled=function(t){this.context.finishRoutingSession()},e.prototype.syncInteractionIdsWithRouter=function(){var t=this.interactionServiceAdapter.getActiveInteractionContextIds(),e=this.urlService.getCurrentLocationUrlSnapshot().getInteractionIds();if(V.default.isEqual(t,e))this.context.finishRoutingSession();else if(t.length>e.length){var n=t.length>e.length&&e.length<1;this.addActivityContextToRoute(t,n)}else this.removeActivityContextFromRoute(t)},e.prototype.addActivityContextToRoute=function(t,e){var n=this,o=this.urlService.getCurrentRouterSnapshot().updateInteractionIds(t);this.context.navigateByUrl(o,{replaceUrl:!e}).then((function(e){n.urlService.getCurrentLocationUrlSnapshot().hasInteractionIds(t)||S.lang.illegalState("Expected url to be "+o.url+" but was "+n.urlService.getCurrentLocationUrl())}))},e.prototype.removeActivityContextFromRoute=function(t){var e=this.urlService.getCurrentRouterSnapshot().updateInteractionIds(t);if(t.length<1)if(this.wasTriggeredByPopState);else{var n=new cn(this.context,this.urlService.getCurrentRouterUrl());this.context.transitionTo(n),this.urlService.back()}else this.context.navigateByUrl(e,{replaceUrl:!this.wasTriggeredByPopState})},e.prototype.handleCanDeactivateCancelledEventScenario=function(t){S.lang.methodNotSupported()},e}(rn),un=function(t){function e(){var e=t.apply(this,X(arguments))||this;return e.isPopState=!1,e}return B(e,t),e.prototype.onRouterCancelled=function(t){this.context.finishRoutingSession()},e.prototype.onRouterError=function(t){this.context.finishRoutingSession()},e.prototype.onRouterEnd=function(t){this.context.routerInteractionAdapter.isActive()?this.context.transitionTo(new ln(this.context,this.startingUrl,!1)):this.context.finishRoutingSession(this.getVisits())},e.prototype.handleCanDeactivateCancelledEventScenario=function(t){this.context.transitionTo(new sn(this.context,this.startingUrl,t))},e}(rn),pn=function(t){function e(e,n,o){var i=t.call(this,e,n)||this;return i.poppedHistoryUrl=o,i.isPopState=!0,i.debugPropertyKeys=["startingUrl","poppedHistoryUrl"],i}return B(e,t),e.prototype.repairBrowserHistoryAndUrlAfterGuardCancellation=function(){t.prototype.repairBrowserHistoryAndUrlAfterGuardCancellation.call(this,this.poppedHistoryUrl,this.startingUrl)},e}(rn),dn=function(t){function e(e,n,o){return t.call(this,e,n,o)||this}return B(e,t),e.prototype.onRouterCancelled=function(t){this.repairBrowserHistoryAndUrlAfterGuardCancellation(),this.context.transitionTo(new ln(this.context,this.poppedHistoryUrl,!1))},e.prototype.onRouterEnd=function(t){this.context.finishRoutingSession()},e.prototype.handleCanDeactivateCancelledEventScenario=function(t){this.illegalTransition("Leaving interaction after pop-state should't block so should never see a back button click")},e}(pn),fn=function(t){function e(e,n,o){var i=t.call(this,e,n)||this;return i.clickedLinkUrl=o,i.isPopState=!1,i.clickedLinkMatchedBackButtonUrl=!1,i.debugPropertyKeys=["idle","startingUrl","clickedLinkUrl","firstCancelEventUrl","clickedLinkMatchedBackButtonUrl","popStateEventUrl"],i}return B(e,t),e.prototype.onRouterStarted=function(t){this.ignore(t)},e.prototype.onRouterCancelled=function(t){t.url===this.clickedLinkUrl?this.context.transitionTo(new gn(this.context,this.startingUrl,this.clickedLinkUrl)):this.context.transitionTo(new yn(this.context,this.startingUrl,this.clickedLinkUrl))},e.prototype.canDeactivatePlace=function(t,e,n){return G(this,void 0,void 0,(function(){return W(this,(function(t){return[2,!1]}))}))},e}(an);q([w.Trace(),z("design:type",Function),z("design:paramtypes",[D.NavigationStart]),z("design:returntype",void 0)],fn.prototype,"onRouterStarted",null),q([w.Trace(),z("design:type",Function),z("design:paramtypes",[D.NavigationCancel]),z("design:returntype",void 0)],fn.prototype,"onRouterCancelled",null);var hn,mn,gn=function(t){function e(e,n,o){var i=t.call(this,e,n)||this;return i.clickedLinkUrl=o,i.isPopState=!1,i.debugPropertyKeys=["idle","startingUrl","clickedLinkUrl","popStateEventUrl"],i}return B(e,t),e.prototype.onRouterEnd=function(t){this.ignore(t)},e.prototype.onRouterError=function(t){this.ignore(t)},e.prototype.onPopState=function(t){this.popStateEventUrl=t.url,this.ignore(t)},e.prototype.onRouterCancelled=function(t){this.popStateEventUrl&&this.finaliseRouting()},e.prototype.finaliseRouting=function(){return this.repairBrowserHistoryAndUrlAfterGuardCancellation(this.clickedLinkUrl,this.startingUrl),this.context.finishRoutingSession()},e.prototype.canDeactivatePlace=function(t,e,n){return G(this,void 0,void 0,(function(){return W(this,(function(t){return[2,!1]}))}))},e}(an),yn=function(t){function e(e,n,o){var i=t.call(this,e,n)||this;return i.clickedLinkUrl=o,i.isPopState=!1,i.debugPropertyKeys=["idle","startingUrl","clickedLinkUrl","popStateEventUrl"],i}return B(e,t),e.prototype.onRouterEnd=function(t){this.ignore(t)},e.prototype.onRouterError=function(t){this.ignore(t)},e.prototype.onPopState=function(t){this.popStateEventUrl=t.url,this.ignore(t)},e.prototype.onRouterCancelled=function(t){this.popStateEventUrl&&this.finaliseRouting()},e.prototype.finaliseRouting=function(){return this.repairBrowserHistoryAndUrlAfterGuardCancellation(this.clickedLinkUrl,this.startingUrl),this.context.finishRoutingSession()},e.prototype.canDeactivatePlace=function(t,e,n){return G(this,void 0,void 0,(function(){return W(this,(function(t){return[2,!1]}))}))},e}(an),vn=function(t){function e(){var e=t.apply(this,X(arguments))||this;return e.isPopState=!1,e.debugPropertyKeys=["startingUrl","urlAfterRedirects"],e}return B(e,t),e.prototype.onRouterCancelled=function(t){},e.prototype.onRouterError=function(t){this.context.finishRoutingSession()},e.prototype.onRouterEnd=function(t){this.urlAfterRedirects=t.urlAfterRedirects,this.context.finishRoutingSession(this.getVisits())},e.prototype.handleCanDeactivateCancelledEventScenario=function(t){this.context.transitionTo(new fn(this.context,this.startingUrl,t))},e}(rn);hn=t.NavigationContext||(t.NavigationContext={}),mn=function(t,e,n,o,i){this.urlService=t,this.routerInteractionAdapter=e,this.navigateByUrl=n,this.transitionTo=o,this.finishRoutingSession=i},hn.Impl=mn;var bn,Cn,In,wn,xn,Mn=function(t){function e(e,n,o,i){var r=t.call(this,e,n)||this;return r.locationChangeTriggerUrl=o,r.poppedHistoryUrl=i,r.isPopState=!1,r.firstCancelHandled=!1,r.popStateHandled=!1,r.debugPropertyKeys=["idle","startingUrl","poppedHistoryUrl","locationChangeTriggerUrl","popStateEventUrl","firstCancelHandled","popStateHandled"],r}return B(e,t),e.prototype.onRouterStarted=function(t){this.ignore(t)},e.prototype.onRouterCancelled=function(t){if(this.firstCancelHandled){if(this.popStateHandled){var e=t.url;return this.repairBrowserHistoryAndUrlAfterGuardCancellation(e,this.parentPageUrl),this.resetBrowserLocation(this.startingUrl,{replaceCurrent:!1}),this.context.finishRoutingSession()}}else this.firstCancelHandled=!0,this.parentPageUrl=t.url,this.ignore(t)},e.prototype.onRouterEnd=function(t){this.ignore(t)},e.prototype.onRouterError=function(t){this.ignore(t)},e.prototype.onPopState=function(t){this.popStateHandled=!0,this.popStateEventUrl=t.url,this.ignore(t)},e.prototype.canDeactivatePlace=function(t,e,n){return G(this,void 0,void 0,(function(){return W(this,(function(t){return[2,!1]}))}))},e}(an),Pn=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return B(e,t),e.prototype.onRouterCancelled=function(t){this.repairBrowserHistoryAndUrlAfterGuardCancellation(),this.context.finishRoutingSession()},e.prototype.onRouterEnd=function(t){this.context.finishRoutingSession(this.getVisits())},e.prototype.handleCanDeactivateCancelledEventScenario=function(t){this.context.transitionTo(new Mn(this.context,this.startingUrl,t,this.poppedHistoryUrl))},e}(pn);bn=t.PlaceAccessGuard||(t.PlaceAccessGuard={}),Cn=function(){function t(){}return t.prototype.isAuthenticated=function(){return!0},t.prototype.isAuthorised=function(t){return!0},t}(),bn.NoAuth=Cn,t.PlaceHistory=function(){function t(){this._archive=new Map,this.placeHistoryDepth=4}return t.prototype.notifyNavigationStarted=function(){this._activeVisits&&(this.archive(this._activeVisits.visits),this._previousVisits=this._activeVisits)},t.prototype.notifyNavigationFinished=function(e){this._activeVisits=new t.VisitRecord(e)},t.prototype.updateVisit=function(t){w.assert.isTruthy(this._activeVisits),this._activeVisits.update(t)},t.prototype.lastVisitIncluded=function(t){var e;return!!(null===(e=this._previousVisits)||void 0===e?void 0:e.getVisitFor(t))},t.prototype.getMostRecentVisitFor=function(t){return V.default.first(this.getHistory(t))},t.prototype.getHistory=function(t){var e=this._archive.get(t);return e||(e=[],this.setHistory(t,e)),e},t.prototype.setHistory=function(t,e){this._archive.set(t,e)},t.prototype.archive=function(t){var e=this;t.forEach((function(t){var n=e.getHistory(t.placeDefinition),o=V.default.first(n);o&&!t.hasChangedFrom(o)||(n.unshift(t),e.setHistory(t.placeDefinition,n.slice(0,e.placeHistoryDepth)))}))},t}(),t.PlaceHistory.ɵprov=n.ɵɵdefineInjectable({factory:function(){return new t.PlaceHistory},token:t.PlaceHistory,providedIn:"root"}),t.PlaceHistory.decorators=[{type:n.Injectable,args:[{providedIn:"root"}]}],t.PlaceHistory.ctorParameters=function(){return[]},In=t.PlaceHistory||(t.PlaceHistory={}),wn=function(){function t(t){this.visits=t}return t.prototype.update=function(t){this.visits=this.visits.filter((function(e){return e.placeDefinition!==t.placeDefinition})).concat(t)},t.prototype.getVisitFor=function(t){return this.visits.find((function(e){return e.placeDefinition===t}))},t}(),In.VisitRecord=wn,t.UrlSnapshot=function(){function t(t,e){this.urlSerializer=t,this.url=e,this.urlTree=t.parse(e)}return t.prototype.updateVisitSegments=function(e){var n=this.urlSerializer.parse(this.url),o=X(this.getPrimarySegments(n)),i=this.getSegmentsFor(e),r=o.findIndex((function(t){return t.path===i[0].path}));return o.splice.apply(o,X([r,i.length],i)),n.root.children.primary.segments=o,new t(this.urlSerializer,n.toString())},t.prototype.getPrimarySegments=function(t){return this.urlTree.root.children.primary.segments},t.prototype.getSegmentsFor=function(t){return t.placeDefinition.hasRouteId()?[new D.UrlSegment(t.placeDefinition.path,t.placeDefinition.getFormattedRouteParameters(t)),new D.UrlSegment(t.placeDefinition.getFormattedRouteId(t),{})]:[new D.UrlSegment(t.placeDefinition.path,t.placeDefinition.getFormattedRouteParameters(t))]},t.prototype.includesPathOf=function(t){return this.getPrimarySegments(this.urlTree).find((function(e){return e.path===t.path}))},t.prototype.getInteractionIds=function(){var e=this.urlTree.queryParams[t.INTERACTION_QUERY_PARAM];return e?t.parseInteractionIds(e):[]},t.prototype.hasInteractions=function(){return this.getInteractionIds().length>0},t.prototype.hasInteractionIds=function(t){return V.default.isEqual(this.getInteractionIds(),t)},t.prototype.updateInteractionIds=function(e){if(0===e.length)return this.removeInteractionIds();var n=this.urlSerializer.parse(this.url);return n.queryParams[t.INTERACTION_QUERY_PARAM]=t.createPathIdFor(e),new t(this.urlSerializer,n.toString())},t.prototype.removeInteractionIds=function(){var e=this.urlSerializer.parse(this.url);return e.queryParams&&e.queryParams[t.INTERACTION_QUERY_PARAM]&&(e.queryParams={}),new t(this.urlSerializer,e.toString())},t.prototype.toString=function(){return"UrlSnapshot("+this.url+")"},t}(),(xn=t.UrlSnapshot||(t.UrlSnapshot={})).INTERACTION_QUERY_PARAM="aup-interactions",xn.INTERACTION_ID_SEPARATOR="--",xn.parseInteractionIds=function(t){return t.split(xn.INTERACTION_ID_SEPARATOR)},xn.createPathIdFor=function(t){return t.join(xn.INTERACTION_ID_SEPARATOR)};var Rn=function(){function e(t,e,n){this.angularRouter=t,this.angularLocation=e,this.urlSerializer=n}return e.prototype.parseUrl=function(e){return new t.UrlSnapshot(this.urlSerializer,e)},e.prototype.createUrlSnapshot=function(){for(var t=this,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];var o=[];return e.forEach((function(e){o.push(t.parseUrl(""+e.placeDefinition.path).updateVisitSegments(e).url)})),this.parseUrl(o.join(""))},e.prototype.getCurrentRouterUrl=function(){return this.angularRouter.routerState?this.angularRouter.routerState.snapshot.url:null},e.prototype.getCurrentLocationUrl=function(){return this.angularLocation.path()},e.prototype.getCurrentLocationUrlSnapshot=function(){return this.parseUrl(this.getCurrentLocationUrl())},e.prototype.getCurrentRouterSnapshot=function(){return this.parseUrl(this.getCurrentRouterUrl())},e.prototype.getActiveInteractionIdsFromUrl=function(t){return this.parseUrl(t).getInteractionIds()},e.prototype.hasActiveInteractions=function(t){return this.getActiveInteractionIdsFromUrl(t).length>0},e.prototype.resetBrowserLocation=function(t,e){e.replaceCurrent?this.angularLocation.replaceState(t):this.angularLocation.go(t)},e.prototype.back=function(){this.angularLocation.back()},e}();Rn.ɵprov=n.ɵɵdefineInjectable({factory:function(){return new Rn(n.ɵɵinject(D.Router),n.ɵɵinject(e.Location),n.ɵɵinject(D.UrlSerializer))},token:Rn,providedIn:"root"}),Rn.decorators=[{type:n.Injectable,args:[{providedIn:"root"}]}],Rn.ctorParameters=function(){return[{type:D.Router},{type:e.Location},{type:D.UrlSerializer}]};var Sn=function(e){function n(n,o,i,r,a){var s=e.call(this)||this;s.angularRouter=n,s.angularLocation=o,s.interactionService=i,s.urlService=r,s.placeHistory=a,s.navigationSessionModel=new w.MutableValueModel,s._activeVisits=new w.MutableListModel,s.sessionFinishedJobs=[],s._accessGuard=(new w.DelegatingValueModel).withDefault(new t.PlaceAccessGuard.NoAuth),window.Cypress&&(window["aup.PlaceRouter"]=s),s.routerInteractionAdapter=i.registerPlaceRouter(s),s.navigationContext=new t.NavigationContext.Impl(s.urlService,s.routerInteractionAdapter,(function(t,e){return s.navigateByUrl(t,e)}),(function(t){s.transitionTo(t)}),(function(t){s.routingSessionFinished(t)}));var c=w.Dsl.disposeWith(s),l=c.chain;c.valueOf,c.before,c.when,c.after,c.observe,c.switchOn;s.navigationInProgress=l(s.navigationSessionModel).isNotNil();var u=l(s.interactionService.active).map((function(t){return t?"IdleDuringInteraction":"Idle"}));return s.navigationSessionName=l(s.navigationSessionModel).pluck("name").otherwise(u),w.DebugContext.tag(s._activeVisits,"PlaceRouter.activeVisits"),s.activeVisitsByPlaceDefinition=l(s._activeVisits).indexBy("placeDefinition"),n.events.subscribe((function(t){t instanceof D.NavigationStart&&("popstate"===t.navigationTrigger?s.onPopState(t):s.onRouterStarted(t)),t instanceof D.NavigationEnd&&s.onRouterEnd(t),t instanceof D.NavigationError&&s.onRouterError(t),t instanceof D.NavigationCancel&&s.onRouterCancelled(t)})),o.onUrlChange((function(t){return s.onUrlChanged(t)})),s}return B(n,e),Object.defineProperty(n.prototype,"accessGuard",{get:function(){return this._accessGuard.readonly},enumerable:!1,configurable:!0}),n.prototype.configureAuth=function(t,e){var n=new w.MutableValueModel;new w.Binding(n,t,{toRight:function(t){return w.lang.illegalState("hackyMutableModel is read only")},toLeft:function(t){return t}}).writeLeft(),this._accessGuard.setDelegate(n),this.redirections=e},n.prototype.getAuthenticationFailureRedirect=function(t,e){return this.redirections.onAuthenticationFailure(t,e)},n.prototype.getAuthorisationFailureRedirect=function(t,e){return this.redirections.onAuthorisationFailure(t,e)},Object.defineProperty(n.prototype,"navigationSession",{get:function(){return this.navigationSessionModel.value},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"currentSession",{get:function(){return this.navigationSessionModel.value},enumerable:!1,configurable:!0}),n.prototype.isNavigating=function(){return this.navigationInProgress.value},n.prototype.waitUntilIdle=function(){var t=this,e=w.Dsl.disposeWith(this).when;return new Promise((function(n){e(t.navigationInProgress).becomesFalsey((function(){return n(t)}),{initialValue:"evaluate",once:!0})}))},n.prototype.onPopState=function(t){if(w.assert.isTruthy("popstate"===t.navigationTrigger),this.currentSession)this.currentSession.onPopState(t);else{var e=t.url,n=this.urlService.getCurrentRouterUrl(),o=this.interactionService.isActive()?new dn(this.navigationContext,n,e):new Pn(this.navigationContext,n,e);this.transitionTo(o)}},n.prototype.onRouterStarted=function(t){w.assert.isFalsey("popstate"===t.navigationTrigger);this.interactionService.isActive();this.currentSession?this.currentSession.onRouterStarted(t):this.transitionTo(this.createNavigationSession(this.urlService.getCurrentRouterUrl()))},n.prototype.onUrlChanged=function(t){this.currentSession?this.currentSession.onUrlChange(t):console.log("FYI: url changed without a navigation session in progress")},n.prototype.onRouterCancelled=function(t){this.currentSession.onRouterCancelled(t)},n.prototype.onRouterError=function(t){this.currentSession.onRouterError(t)},n.prototype.onRouterEnd=function(t){this.currentSession.onRouterEnd(t)},n.prototype.navigate=function(t,e){var n=this;return this.doNavigation(t,(function(o){return G(n,void 0,void 0,(function(){var n;return W(this,(function(o){switch(o.label){case 0:return n=X([t.placeDefinition.path],this.createRouteParameters(t)),[4,this.angularRouter.navigate(n,{relativeTo:e?e.relativeTo:null})];case 1:return o.sent(),[2]}}))}))}))},n.prototype.doNavigation=function(t,e){return G(this,void 0,void 0,(function(){var n;return W(this,(function(o){switch(o.label){case 0:this.navigationInProgress.value&&w.lang.illegalState("Navigation already in progress"),(n=this.createNavigationSession(this.urlService.getCurrentRouterUrl())).storeVisit(t),this.transitionTo(n),o.label=1;case 1:return o.trys.push([1,,3,4]),[4,e(this.angularRouter)];case 2:return o.sent(),[3,4];case 3:return!this.angularRouter.getCurrentNavigation()&&this.currentSession&&this.currentSession.onRouterEnd(new D.NavigationEnd(-1,"","")),[7];case 4:return[2]}}))}))},n.prototype.navigateByUrl=function(t,e){return this.angularRouter.navigateByUrl(t.urlTree,e)},Object.defineProperty(n.prototype,"activeVisits",{get:function(){return this._activeVisits.readonly},enumerable:!1,configurable:!0}),n.prototype.pushVisitChangesToRoute=function(t,e){return G(this,void 0,void 0,(function(){var n=this;return W(this,(function(o){return this.placeHistory.updateVisit(e),e.hasRoutingChangedFrom(t)?[2,this.doNavigation(e,(function(t){var o=n.urlService.parseUrl(n.angularRouter.routerState.snapshot.url).updateVisitSegments(e);return n.navigateByUrl(o)}))]:[2]}))}))},n.prototype.createNavigationSession=function(t){return this.interactionService.isActive()?new un(this.navigationContext,t):new vn(this.navigationContext,t)},n.prototype.transitionTo=function(t){var e=this.navigationSessionModel.value;e||this.placeHistory.notifyNavigationStarted(),w.assert.isTruthy(t!==e),this.navigationSessionModel.value=t,e&&e.dispose(),t.notifyActive()},n.prototype.routingSessionFinished=function(t){t&&t.length>0&&(w.assert.isTruthy(this.navigationInProgress.value),this.placeHistory.notifyNavigationFinished(t),this._activeVisits.value=t),this.currentSession.dispose(),this.navigationSessionModel.value=null,this.sessionFinishedJobs.forEach((function(t){return t()})),this.sessionFinishedJobs=[]},n.prototype.runAfterRoutingSessionFinishes=function(t){w.assert.isTruthy(this.navigationInProgress),this.sessionFinishedJobs.push(t)},n.prototype.syncInteractionContextIdsWithRouter=function(){var t=this;if(this.navigationSession){this.navigationSession;return new Promise((function(e,n){t.runAfterRoutingSessionFinishes((function(){t.runAfterRoutingSessionFinishes(e);var n=new ln(t.navigationContext,t.urlService.getCurrentRouterUrl(),!1);t.transitionTo(n)}))}))}return new Promise((function(e,n){t.runAfterRoutingSessionFinishes(e);var o=new ln(t.navigationContext,t.urlService.getCurrentRouterUrl(),!1);t.transitionTo(o)}))},n.prototype.createRouteParameters=function(t){var e=t.placeDefinition;return t.hasRouteId()?[e.getFormattedRouteId(t),e.getFormattedRouteParameters(t)]:[e.getFormattedRouteParameters(t)]},n}(w.GarbageCollector);Sn.ɵprov=n.ɵɵdefineInjectable({factory:function(){return new Sn(n.ɵɵinject(D.Router),n.ɵɵinject(e.Location),n.ɵɵinject(t.InteractionService),n.ɵɵinject(Rn),n.ɵɵinject(t.PlaceHistory))},token:Sn,providedIn:"root"}),Sn.decorators=[{type:n.Injectable,args:[{providedIn:"root"}]}],Sn.ctorParameters=function(){return[{type:D.Router},{type:e.Location},{type:t.InteractionService},{type:Rn},{type:t.PlaceHistory}]};var An=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!M.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 o;return new t(this.placeDefinition,Object.assign(Object.assign({},this.visitParameters),((o={})[e.name]=n,o)))},t.prototype.mergeRouteParameters=function(e){var n=this,o=Object.keys(e),i={};return this.placeDefinition.getVisitParameterDefs().forEach((function(t){if(t.isRouteId||t.isRouteParameter)o.includes(t.name)&&(i[t.name]=e[t.name]);else{var r=n.getParameter(t.name);n.hasParameter(t.name)&&(i[t.name]=r)}})),new t(this.placeDefinition,i)},t.prototype.hasRoutingChangedFrom=function(t){var e=t.placeDefinition===this.placeDefinition,n=M.isEqual(this.placeDefinition.getFormattedRouteParameters(this,!0),this.placeDefinition.getFormattedRouteParameters(t,!0));return!e||!n},t.prototype.hasChangedFrom=function(t){return!M.isEqual(this.placeDefinition.getNonRouteParameters(this),this.placeDefinition.getNonRouteParameters(t))||this.hasRoutingChangedFrom(t)},t.prototype.toDebugString=function(){var t=this;return Object.keys(this.visitParameters).map((function(e){return e+"="+t.visitParameters[e]})).join(",")},t}(),On=new n.InjectionToken("AUP_PLACE_CONFIG"),Tn=L.style({position:"absolute",top:"0",left:"0",bottom:"0",right:"0"}),Dn=[L.query(":enter, :leave",Tn,{optional:!0}),L.group([L.query(":enter",[L.style({transform:"translateX(-100%)"}),L.animate("{{duration}} ease-out",L.style({transform:"translateX(0%)"}))],{optional:!0}),L.query(":leave",[L.style({transform:"translateX(0%)"}),L.animate("{{duration}} ease-out",L.style({transform:"translateX(100%)"}))],{optional:!0})])],En=[L.query(":enter, :leave",Tn,{optional:!0}),L.group([L.query(":enter",[L.style({transform:"translateX(100%)",minHeight:"1px"}),L.animate("{{duration}} ease-out",L.style({transform:"translateX(0%)"}))],{optional:!0}),L.query(":leave",[L.style({transform:"translateX(0%)"}),L.animate("{{duration}} ease-out",L.style({transform:"translateX(-100%)",minHeight:"1px"}))],{optional:!0})])];function Fn(t){return L.trigger("routeAnimations",[L.transition(":increment",En,{params:{duration:t}}),L.transition(":decrement",Dn,{params:{duration:t}})])}var kn=Fn("0.3s"),_n=function(t){function e(e,o,i,r){var a=t.call(this)||this;a.router=e,a.placeRouter=o,a.placeConfig=i,a.placeChanged=new n.EventEmitter,a.outletActivated=new w.MutableValueModel(!1),a._activatedRouteModel=new w.MutableValueModel,a._activePlaceModel=new w.MutableValueModel,a.initialPlaceIndex=null,a._isPushingVisitToRoute=new w.MutableValueModel(!1),a.isVeryFirstLoad=!0;var s=w.Dsl.disposeWith(a),c=s.chain,l=s.valueOf,u=(s.before,s.when);s.after,s.observe,s.switchOn;a.parentOutletModel=new w.MutableValueModel(r);var p=c(a.parentOutletModel).pullValueModel((function(t){return t.activePlaceModel})).pluck("placeDefinition").pluckList("children").pluck("component"),d=c(a.activePlaceModel).map((function(t){return t.constructor}));return a.placesInAnimationOrder=c(a.customPlaceAnimationOrderModel).otherwise(p),a.activePlaceAnimationPosition=a.placesInAnimationOrder.reduce((function(t){var e=0;return d.value&&(e=t.indexOf(d.value),M.isNil(a.initialPlaceIndex)&&(a.initialPlaceIndex=e)),M.isNil(a.initialPlaceIndex)?0:e-a.initialPlaceIndex}),{dependsOn:d}),a.animationSupported=a.placesInAnimationOrder.count().isGreaterThan(0),a.animationEnabled=l.all(a.animateModel,a.animationSupported).areTruthy(),a._activePlaceDefinition=c(a._activePlaceModel).pluck("placeDefinition"),a.routerVisitModel=a._activePlaceDefinition.findIn(c(o.activeVisitsByPlaceDefinition)),a.navigationInProgress=c(a.placeRouter.navigationInProgress),u(a.navigationInProgress).becomesFalsey((function(){a.checkStateAndInitialise()})),u(a.outletActivated).becomesTruthy((function(){a.checkStateAndInitialise()})),c(a._activePlaceModel).postponeWhile(a.navigationInProgress).subscribe((function(t){return a.placeChanged.emit(t)})),u(o.accessGuard).changes((function(t){var e=a._activePlaceModel.value;if(e&&!t.isAuthorised(e.placeDefinition)){var n=o.getAuthorisationFailureRedirect(a._activatedRouteModel.value.snapshot,a.router.routerState.snapshot);a.placeRouter.navigate(n)}})),a}return B(e,t),e.prototype.ngOnInit=function(){},e.prototype.getAnimationOrder=function(){return this.activePlaceAnimationPosition.value},Object.defineProperty(e.prototype,"animationDuration",{get:function(){return this.placeConfig&&this.placeConfig.animationDuration?this.placeConfig.animationDuration:"500ms"},enumerable:!1,configurable:!0}),e.prototype.navigate=function(t){this.placeRouter.navigate(t,{relativeTo:this.parentOutlet?this.parentOutlet.activatedRouteModel.value:null})},Object.defineProperty(e.prototype,"parentOutlet",{get:function(){return this.parentOutletModel.value},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"activePlaceModel",{get:function(){return this._activePlaceModel.readonly},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"activatedRouteModel",{get:function(){return this._activatedRouteModel.readonly},enumerable:!1,configurable:!0}),e.prototype.onOutletActivated=function(t,e){this._activatedRouteModel.value=t.activatedRoute,this._activePlaceModel.value=e,this.validateAnimationState(e),this.outletActivated.value=!0,this.checkStateAndInitialise()},e.prototype.validateAnimationState=function(t){this.animateModel.value&&(this.placesInAnimationOrder.length<1?console.error("PlaceOutlet.animate === true but placeAnimationOrder has not been set. Animation is disabled."):this.placesInAnimationOrder.query().includes(t.placeDefinition.component)||console.error("PlaceOutlet.animate === true but placeAnimationOrder doesn't contain "+t.placeDefinition.component.name+"."))},e.prototype.onOutletDeactivated=function(){this.outletActivated.value=!1,this._activePlaceModel.value=null,this._activatedRouteModel.value=null},e.prototype.checkStateAndInitialise=function(){var t=this.routerVisitModel.value,e=this.activePlaceModel.value;t&&e&&!e.isInitialised()&&(t.placeDefinition!==e.placeDefinition&&w.lang.illegalState("wrong visit!!!"),this.initialisePlace(t,e))},e.prototype.initialisePlace=function(t,e){var n=this,o=new w.MutableValueModel(t);w.DebugContext.tag(o,"PlaceOutletComponent["+e.constructor.name+")].visitModel"),e.initialiseVisit(t,(function(t,e){n.pushVisitChangeToRoute(e,t)}));var i=function(){n._activePlaceModel.value._notifyActive(!0)};!this.animationEnabled.value||this.isVeryFirstLoad?(this.isVeryFirstLoad=!1,i()):this.onAnimationFinishedJob=i;var r=w.Dsl.disposeWith(e),a=r.when,s=(r.chain,r.valueOf);a(this.routerVisitModel).changes((function(t){e.updateVisit(t)}),{unless:s.any(this._isPushingVisitToRoute,this.routerVisitModel.isNil()).areTruthy()})},e.prototype.pushVisitChangeToRoute=function(t,e){var n=this;this._isPushingVisitToRoute.value=!0,this.placeRouter.pushVisitChangesToRoute(t,e).finally((function(){n._isPushingVisitToRoute.value=!1}))},e.prototype.animationStarted=function(){},e.prototype.animationDone=function(){this.onAnimationFinishedJob&&(this.onAnimationFinishedJob(),this.onAnimationFinishedJob=void 0)},e}(Y);_n.decorators=[{type:n.Component,args:[{selector:"aup-place-outlet",template:'<ng-container *ngIf="animationEnabled.value">\n <div class="router-outlet-container" cdkScrollable\n [@routeAnimations]="{value: getAnimationOrder(), params:{duration: animationDuration}}"\n (@routeAnimations.start)="animationStarted()"\n (@routeAnimations.done)="animationDone()"\n >\n <router-outlet #routerOutlet="outlet"\n (activate)="onOutletActivated(routerOutlet, $event)"\n (deactivate)="onOutletDeactivated()">\n </router-outlet>\n </div>\n</ng-container>\n\n<ng-container *ngIf="!animationEnabled.value">\n <div class="router-outlet-container" cdkScrollable>\n <router-outlet #routerOutlet="outlet"\n (activate)="onOutletActivated(routerOutlet, $event)"\n (deactivate)="onOutletDeactivated()">\n </router-outlet>\n </div>\n</ng-container>\n\n',animations:[kn],styles:[":host{display:flex;flex-direction:column;min-height:0}.router-outlet-container{display:block;flex:1;min-height:0;overflow-x:hidden;overflow-y:scroll;position:relative}router-outlet{display:none}"]}]}],_n.ctorParameters=function(){return[{type:D.Router},{type:Sn},{type:void 0,decorators:[{type:n.Optional},{type:n.Inject,args:[On]}]},{type:_n,decorators:[{type:n.SkipSelf},{type:n.Optional}]}]},_n.propDecorators={animate:[{type:n.Input}],animateModel:[{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}]}]},q([w.StoreInValueModel("animateModel"),z("design:type",Boolean)],_n.prototype,"animate",void 0),q([w.TrackExternal({defaultValue:!0}),z("design:type",w.ValueModel)],_n.prototype,"animateModel",void 0),q([w.TrackExternal(),z("design:type",w.ListModel)],_n.prototype,"customPlaceAnimationOrderModel",void 0),q([w.StoreInListModel("customPlaceAnimationOrderModel"),z("design:type",Array)],_n.prototype,"customPlaceAnimationOrder",void 0);var Ln=function(e){function n(n){var o=e.call(this)||this;o.placeRouter=n,o._activePlaceComponent=new w.DelegatingValueModel;var i=w.Dsl.disposeWith(o),r=i.chain,a=(i.valueOf,i.before,i.when);i.after,i.observe,i.switchOn;return o.placeDefinitions=r(o.placesModel).map((function(e){return t.PlaceComponent.getDefinition(e)})).select((function(t){return n.accessGuard.value.isAuthorised(t)}),{dependsOn:n.accessGuard}),o.commandFactory=w.Command.createFactory((function(t){o.placeOutlet.navigate(new An(t))})),a(o.placeOutletModel).changes((function(t){setTimeout((function(){return o._activePlaceComponent.setDelegate(t?t.activePlaceModel:null)}))})),o.activePlaceDefinition=r(o._activePlaceComponent).pluck("placeDefinition"),o}return B(n,e),n.prototype.getNavigationFace=function(t){var e=t.getPlaceData("nav");return{text: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)}}},n.prototype.isActive=function(t){return this.activePlaceDefinition.query().equals(t)},n.prototype.ngOnInit=function(){},n}(Y);Ln.decorators=[{type:n.Component,args:[{template:""}]}],Ln.ctorParameters=function(){return[{type:Sn}]},Ln.propDecorators={places:[{type:n.Input}],placesModel:[{type:n.Input}],placeOutlet:[{type:n.Input}],placeOutletModel:[{type:n.Input}]},q([w.StoreInListModel("placesModel"),z("design:type",Array)],Ln.prototype,"places",void 0),q([w.TrackExternal(),z("design:type",w.ListModel)],Ln.prototype,"placesModel",void 0),q([w.StoreInValueModel("placeOutletModel"),z("design:type",_n)],Ln.prototype,"placeOutlet",void 0),q([w.TrackExternal(),z("design:type",w.ValueModel)],Ln.prototype,"placeOutletModel",void 0),q([x.Memoize(),z("design:type",Function),z("design:paramtypes",[tn]),z("design:returntype",Object)],Ln.prototype,"getNavigationFace",null);var Nn=function(t){function e(e){return t.call(this,e)||this}return B(e,t),e}(Ln);Nn.decorators=[{type:n.Component,args:[{selector:"aup-list-place-nav",template:'<mat-nav-list fxFlex>\n <a mat-list-item *ngFor="let placeDefinition of placeDefinitions.value"\n [pectinCommand]="commandFactory.create(placeDefinition)"\n [class.active]="isActive(placeDefinition)"\n [matTooltip]="getNavigationFace(placeDefinition).tooltip()">\n <aup-command-face [faces]="[getNavigationFace(placeDefinition)]"></aup-command-face>\n </a>\n</mat-nav-list>\n',styles:[":host{--selected-background:#f1f1f1;--selected-border-color:#838383;--selected-color:inherit;display:flex;flex-direction:column}mat-nav-list{padding-top:0}a{border-right:2px solid transparent}a.active{background:var(--selected-background);border-right:2px solid var(--selected-border-color);color:var(--selected-color)}"]}]}],Nn.ctorParameters=function(){return[{type:Sn}]};var Vn=function(t){function e(e){var n=t.call(this,e)||this;return n.expanded=!1,n}return B(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}(Ln);Vn.decorators=[{type:n.Component,args:[{selector:"aup-side-place-navigation",template:'<mat-nav-list>\n <a mat-list-item (click)="toggleMenu()" class="home">\n <aup-icon class="collapsed-only" icon="mat:menu"></aup-icon>\n <aup-icon class="expanded-only" icon="mat:arrow_back"></aup-icon>\n <span class="expanded-only">Menu</span>\n </a>\n <a mat-list-item *ngFor="let placeDefinition of placeDefinitions.value"\n [pectinCommand]="commandFactory.create(placeDefinition)"\n [class.active]="isActive(placeDefinition)"\n [matTooltip]="getNavigationFace(placeDefinition).tooltip()">\n <aup-icon *ngIf="getNavigationFace(placeDefinition).icon()" [icon]="getNavigationFace(placeDefinition).icon()"></aup-icon>\n <span class="expanded-only">{{getNavigationFace(placeDefinition).text()}}</span>\n </a>\n <span [style.flex]="1"></span>\n <ng-container *ngIf="navEndTemplate" [ngTemplateOutlet]="navEndTemplate"></ng-container>\n</mat-nav-list>\n',styles:[":host{--resolved-background-color:var(--nav-background-color,#555);--resolved-color:var(--nav-color,hsla(0,0%,100%,0.9));--resolved-expanded-width:var(--nav-expanded-width,235px);--resolved-nav-item-height:var(--nav-item-height,var(--resolved-nav-item-width));--resolved-nav-item-width:var(--nav-width,56px);background-color:var(--resolved-background-color);color:var(--resolved-color);display:flex;flex-direction:column;transition:width 125ms linear;width:var(--resolved-nav-item-width)}:host.expanded{max-width:var(--resolved-expanded-width);width:var(--resolved-expanded-width)}:host-context(.expanded) .expanded-only{max-width:100%}:host-context(.expanded) .collapsed-only{max-width:0}:host-context(.expanded) .mat-list-item aup-icon:not(.collapsed-only){margin-right:12px}:host-context(.expanded) .mat-list-item span{text-wrap:none;white-space:nowrap}.expanded-only{max-width:0;overflow:hidden}.collapsed-only{max-width:100%;overflow:hidden}mat-nav-list{display:flex;flex:1;flex-direction:column}.mat-list-item{color:inherit;height:var(--resolved-nav-item-height);width:var(--resolved-nav-item-width)}.mat-list-item.active{background-color:#444}.mat-list-item.home{text-align:left}mat-icon{color:inherit}mat-icon.flip-horizontal{transform:scaleX(-1)}"]}]}],Vn.ctorParameters=function(){return[{type:Sn}]},Vn.propDecorators={expanded:[{type:n.HostBinding,args:["class.expanded"]}],navEndTemplate:[{type:n.ContentChild,args:["navEndTemplate"]}]};var Hn=function(t){function e(e){return t.call(this,e)||this}return B(e,t),e}(Ln);Hn.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]="getNavigationFace(placeDefinition).tooltip()">\n <aup-command-face [faces]="[getNavigationFace(placeDefinition)]"></aup-command-face>\n </a>\n</nav>\n',styles:[""]}]}],Hn.ctorParameters=function(){return[{type:Sn}]};var jn=function(){};jn.decorators=[{type:n.NgModule,args:[{imports:[e.CommonModule,c.BrowserAnimationsModule,y.MatProgressSpinnerModule,D.RouterModule,s.MatTabsModule,F.MatListModule,b.MatTooltipModule,m.MatIconModule,tt,O.FlexModule,Te],declarations:[_n,Hn,Nn,Vn,Ln],entryComponents:[],exports:[_n,Hn,Nn,Vn,Ln],providers:[]}]}];var Un=function(){};Un.decorators=[{type:n.NgModule,args:[{declarations:[],imports:[e.CommonModule,c.BrowserAnimationsModule,o.FormsModule,r.MatInputModule,i.MatFormFieldModule,a.MatSelectModule,s.MatTabsModule,tt,Te,jn,Qe],exports:[Qe,jn,tt,Te,At]}]}];var Bn=L.style({opacity:0,height:"0",paddingTop:"0",paddingBottom:"0"}),qn=L.trigger("slideDownOnEnter",[L.transition(":enter",[Bn,L.animate("{{duration}}")],{params:{duration:"100ms"}}),L.transition(":leave",[L.animate("{{duration}}",Bn)],{params:{duration:"100ms"}})]),zn=L.style({opacity:0,width:"0",paddingLeft:"0",paddingRight:"0"}),Gn=L.trigger("slideRightOnEnter",[L.transition(":enter",[zn,L.animate("{{duration}}")],{params:{duration:"100ms"}}),L.transition(":leave",[L.animate("{{duration}}",zn)],{params:{duration:"100ms"}})]),Wn=function(t){function e(e,n,o,i){var r=t.call(this)||this;return r.identifier=e,r.api=n,r.dialogService=o,r.config=i,r.garbage=new w.GarbageCollector,S.assert.notNil(o),r}return B(e,t),e.prototype.cancelActiveActivity=function(){return this.activityContainer.cancelActiveActivity()},e.prototype.dispose=function(){this.isActive()&&w.lang.illegalState("Dispose called while active."),this.garbage.dispose()},e.prototype.registerDisposable=function(t){return this.garbage.registerDisposable(t)},e.prototype.isActive=function(){return!!this.activityContainer&&this.activityContainer.isActive()},e.prototype.createAndLaunchActivity=function(t,e,n){var o=this;S.assert.isNil(this._currentActivityRef);var i=Object.assign(Object.assign({},this.config),{disableClose:n,panelClass:"dialog-interaction-context"}),r=this.dialogService.open(je,i),a=this.activityContainer=r.componentInstance;this.activityContainer.initialise(this.identifier,this.api);var s=this.activityContainer.startActivity(t,e);return s.finally((function(){return r.close()})),r.afterClosed().subscribe((function(t){a.isActive()&&a.cancelActiveActivity(),o.activityContainer=null})),r.updateSize(),r.afterOpened().subscribe((function(t){r.updateSize()})),s},e}(Ne),Kn=new n.InjectionToken("DIALOG_INTERACTION_SERVICE_DEFAULTS"),Xn=function(t){function e(e,n,o){var i=t.call(this)||this;return i.dialogService=e,i.dialogServiceDefaults=n,i.matDialogDefaultConfig=o,S.assert.notNil(e),i}return B(e,t),e.prototype.createInteractionContext=function(t,e,n){var o=Object.assign(Object.assign({autoFocus:!1,hasBackdrop:!0,closeOnNavigation:!1},this.matDialogDefaultConfig),this.dialogServiceDefaults);return new Wn(t,e,this.dialogService,o)},e}(qe);Xn.ɵprov=n.ɵɵdefineInjectable({factory:function(){return new Xn(n.ɵɵinject(T.MatDialog),n.ɵɵinject(Kn,8),n.ɵɵinject(T.MAT_DIALOG_DEFAULT_OPTIONS,8))},token:Xn,providedIn:"root"}),Xn.decorators=[{type:n.Injectable,args:[{providedIn:"root"}]}],Xn.ctorParameters=function(){return[{type:T.MatDialog},{type:T.MatDialogConfig,decorators:[{type:n.Optional},{type:n.Inject,args:[Kn]}]},{type:T.MatDialogConfig,decorators:[{type:n.Optional},{type:n.Inject,args:[T.MAT_DIALOG_DEFAULT_OPTIONS]}]}]};var $n=function(){function t(t,e){this.paramMaps=[t].concat((e||[]).map((function(t){return new Yn(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:!1,configurable:!0}),t}();q([x.Memoize(),z("design:type",Array),z("design:paramtypes",[])],$n.prototype,"keys",null);var Yn=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:!1,configurable:!0}),t}(),Jn=function(){function t(){}return t.prototype.canActivate=function(t,e){return G(this,void 0,void 0,(function(){return W(this,(function(t){return[2,!0]}))}))},t}();Jn.ɵprov=n.ɵɵdefineInjectable({factory:function(){return new Jn},token:Jn,providedIn:"root"}),Jn.decorators=[{type:n.Injectable,args:[{providedIn:"root"}]}],Jn.ctorParameters=function(){return[]};var Zn,Qn,to,eo,no=function(){function t(t,e,n,o,i){this.navigationSession=t,this.activatedRoute=e,this.router=n,this.placeHistory=o,this.injector=i}return t.prototype.sanitise=function(t){return G(this,void 0,void 0,(function(){var e,n,o,i,r,a,s,c,l;return W(this,(function(u){switch(u.label){case 0:return(e=t.placeDefinition).hasRouteId()?(n=e.getRouteIdParameterDef(),o=t.getRouteId(),[4,n.sanitise(o,t,this.placeHistory,this.injector,this.navigationSession.isPopState)]):[3,2];case 1:if(l=u.sent(),n.hasChanged(o,l))return[2,t.replace(n,l)];u.label=2;case 2:i=e.getVisitParameterDefs({includeRouteParameters:!0,includeNonRouteParameters:!0}),r=t,a=0,u.label=3;case 3:return a<i.length?(s=i[a],c=t.getParameter(s.name),[4,s.sanitise(c,r,this.placeHistory,this.injector,this.navigationSession.isPopState)]):[3,6];case 4:l=u.sent(),s.hasChanged(c,l)&&(r=r.replace(s,l)),u.label=5;case 5:return a++,[3,3];case 6:return[2,r.hasChangedFrom(t)?r:t]}}))}))},t}(),oo=function(){function e(t,e,n,o,i,r){this.router=t,this.urlService=e,this.placeRouter=n,this.placeHistory=o,this.interactionService=i,this.injector=r}return e.prototype.canActivate=function(e,n){return G(this,void 0,void 0,(function(){var o,i,r,a,s=this;return W(this,(function(c){switch(c.label){case 0:return t.PlaceComponent.isPlaceComponentConstructor(e.component)?(o=t.PlaceComponent.getDefinition(e.component)).authenticate?[4,this.placeRouter.accessGuard.value.isAuthenticated()]:[3,2]:[3,4];case 1:if(!c.sent())return i=this.placeRouter.getAuthenticationFailureRedirect(e,n),(r=this.getPlaceDefinition(i)).authenticate&&w.lang.illegalState("handleNotAuthenticated hook returned place "+r.component.name+" that requires authentication."),[2,this.createUrlTree(i)];if(this.placeRouter.accessGuard.value&&!this.placeRouter.accessGuard.value.isAuthorised(o))return i=this.placeRouter.getAuthorisationFailureRedirect(e,n),r=this.getPlaceDefinition(i),this.placeRouter.accessGuard.value&&!this.placeRouter.accessGuard.value.isAuthorised(r)&&w.lang.illegalState("handleNotAuthorised hook returned place "+r.component.name+" that is not authorised for the current user."),[2,this.createUrlTree(i)];c.label=2;case 2:return[4,this.cleanInteractionState(e,n,(function(){return G(s,void 0,void 0,(function(){var t,i,r,a,s;return W(this,(function(c){switch(c.label){case 0:return t=new $n(e.paramMap,e.url),i=o.parseRouteParams(t),r=this.placeRouter.navigationSession,a=r.getVisitFor(o)||new An(o,i),[4,new no(r,e,this.router,this.placeHistory,this.injector).sanitise(a.mergeRouteParameters(i))];case 1:return s=c.sent(),r.storeVisit(s),a.hasRoutingChangedFrom(s)?[2,this.urlService.parseUrl(n.url).updateVisitSegments(s)]:[2,!0]}}))}))}))];case 3:return[2,(a=c.sent())instanceof t.UrlSnapshot?a.urlTree:a];case 4:return[2,w.lang.illegalState("expected component to be an instance of PlaceComponent, got "+e.component)]}}))}))},e.prototype.canDeactivate=function(e,n,o,i){return G(this,void 0,void 0,(function(){var n,r,a;return W(this,(function(s){switch(s.label){case 0:return n=this.urlService.parseUrl(o.url),r=this.urlService.parseUrl(i.url),[4,this.placeRouter.navigationSession.canDeactivatePlace(e,n,r)];case 1:return[2,(a=s.sent())instanceof t.UrlSnapshot?a.urlTree:a]}}))}))},e.prototype.getPlaceDefinition=function(e){return e instanceof An?e.placeDefinition:t.PlaceComponent.getDefinition(e)},e.prototype.createUrlTree=function(e){var n=e instanceof An?e:new An(t.PlaceComponent.getDefinition(e),{});return this.urlService.createUrlSnapshot(n).urlTree},e.prototype.cleanInteractionState=function(t,e,n){return G(this,void 0,void 0,(function(){var t;return W(this,(function(o){return t=this.urlService.parseUrl(e.url),!this.interactionService.isActive()&&t.hasInteractions()?[2,t.removeInteractionIds()]:[2,n()]}))}))},e}();function io(t,e,n,o,i){var r={backingModel:n,binding:null},a=o+"("+t.constructor.name+"."+e.toString()+")";w.DebugContext.getOrCreate(r.backingModel).tag(a),Object.defineProperty(t,e,{get:function(){return r.backingModel},set:function(t){r.binding&&r.binding.dispose(),t&&(r.binding=new w.Binding(r.backingModel,t,{toLeft:w.Functions.identity,toRight:w.Functions.identity}),i(t)?r.binding.writeRight():(i(r.backingModel)||console.warn("Assigning a visit model with an existing value to a visit parameter with an existing value. Visit parameter will be overridden"),r.binding.writeLeft()))}})}oo.ɵprov=n.ɵɵdefineInjectable({factory:function(){return new oo(n.ɵɵinject(D.Router),n.ɵɵinject(Rn),n.ɵɵinject(Sn),n.ɵɵinject(t.PlaceHistory),n.ɵɵinject(t.InteractionService),n.ɵɵinject(n.INJECTOR))},token:oo,providedIn:"root"}),oo.decorators=[{type:n.Injectable,args:[{providedIn:"root"}]}],oo.ctorParameters=function(){return[{type:D.Router},{type:Rn},{type:Sn},{type:t.PlaceHistory},{type:t.InteractionService},{type:n.Injector}]},Zn=t.Formatter||(t.Formatter={}),Qn=function(){function t(){}return t.prototype.format=function(t){return t},t.prototype.parse=function(t){return t},t}(),to=function(){function t(){}return t.prototype.format=function(t){return V.default.isNumber(t)&&!V.default.isNaN(t)?""+t:null},t.prototype.parse=function(t){var e=Number.parseFloat(t);return V.default.isNaN(e)?null:e},t}(),eo=function(){function t(){}return t.prototype.format=function(t){return t?"true":"false"},t.prototype.parse=function(t){return"true"===t},t}(),Zn.STRING=new Qn,Zn.NUMBER=new to,Zn.BOOLEAN=new eo,t.ACTIVITY_DATA=De,t.AUP_PLACE_CONFIG=On,t.AbstractInputActivity=$e,t.AbstractInputComponent=yt,t.AbstractInteractionContext=Ne,t.AbstractListInputComponent=vt,t.AbstractPlaceNavigationComponent=Ln,t.AbstractPopStateNavigation=pn,t.AbstractPopupMenuComponent=ct,t.AbstractValueInputComponent=bt,t.Activity=Ee,t.ActivityActionsComponent=Fe,t.ActivityContainerComponent=je,t.ActivityOutletComponent=He,t.ActivityRef=Ve,t.ActivityTitleComponent=Ue,t.AddItemInteractionContextComponent=We,t.AlertDialogComponent=ke,t.AngularUiPowerupsModule=Un,t.AutocompleteInputComponent=Ct,t.BusyOverlayComponent=et,t.CELL_EDITOR_PORTAL=Ut,t.CELL_RENDERER_PORTAL=jt,t.CardContainerComponent=nt,t.CellEditorPortalRef=Xt,t.CellHeaderPortalRef=Gt,t.CellPortalRef=zt,t.CellRendererPortalRef=Wt,t.CheckboxInputComponent=It,t.ColumnModel=oe,t.ColumnTemplateDirective=fe,t.CommandComponent=at,t.CommandDirective=$,t.CommandFaceComponent=ot,t.ComponentCellRendererPortalRef=Kt,t.ComponentsModule=Te,t.ConfirmThenDialogComponent=_e,t.ConfirmationDialogComponent=Le,t.ConsolidatedParameterMap=$n,t.CustomTemplateColumnModel=ce,t.CustomValueColumnModel=ae,t.DEFINITION_META_DATA_KEY=en,t.DIALOG_INTERACTION_SERVICE_DEFAULTS=Kn,t.DefaultCellRendererComponent=Yt,t.DefaultHeaderCellRendererComponent=Jt,t.DialogInteractionContext=Wn,t.DialogInteractionContextFactory=Xn,t.Dimension=Lt,t.DirectivesModule=tt,t.DisposableComponent=Y,t.EditRowControls=Zt,t.EditSession=ue,t.EditorControlColumnModel=se,t.EmptyStateComponent=ht,t.EventCleanUpSession=an,t.FlattenStrategy=Se,t.FlexComponent=st,t.FocusBinding=J,t.FocusBindingDirective=Q,t.FocusBindingFactory=Z,t.FocusContainerComponent=mt,t.FocusableComponent=gt,t.HEADER_CELL_RENDERER_PORTAL=Ht,t.InPlaceInteractionContextComponent=Ge,t.InteractionContextTriggerFor=Xe,t.InteractionModule=Qe,t.InteractionServiceRoutingAdapter=Be,t.LEFT_RIGHT_PLACE_ANIMATION=kn,t.ListPlaceNavComponent=Nn,t.ListPropertyColumnModel=re,t.ModalInteractionContextFactory=qe,t.MoreMenuComponent=lt,t.MultipleSelectInputComponent=wt,t.Navigating=vn,t.NavigatingDuringInteraction=un,t.NavigationSession=rn,t.NoopAuthGuard=Jn,t.NoopComponent=At,t.NumberInputComponent=xt,t.POPUP_CONTAINER=rt,t.PORTAL_EDITOR_COMPONENT=qt,t.PORTAL_RENDERER_COMPONENT=Bt,t.PasswordInputComponent=Mt,t.Place=function(e){return function(n){t.PlaceComponent.isPlaceComponentConstructor(n)?t.PlaceComponent.injectDefinition(n,new tn(n,e.path,!!M.isNil(e.authenticate)||e.authenticate,M.isNil(e.roles)?[]:e.roles,e.data,t.PlaceComponent.getRouteParameters(n),(e.children||[]).map((function(e){return t.PlaceComponent.getDefinition(e)})))):w.lang.illegalState(n+" must extend PlaceComponent to use the @Place decorator")}},t.PlaceComponentDeactivationHandler=on,t.PlaceDefinition=tn,t.PlaceGuard=oo,t.PlaceModule=jn,t.PlaceOutletComponent=_n,t.PlaceRouter=Sn,t.Point=Nt,t.PopStateDuringInteractionNavigation=dn,t.PopStateNavigation=Pn,t.PopupAwareComponent=it,t.PopupInteractionContextComponent=Ke,t.PopupMenuComponent=ft,t.PopupMenuRendererComponent=dt,t.PropertyColumnModel=ie,t.ROUTE_PARAMETER_LIST_KEY=nn,t.RemoveLastInteractionFromUrlNavigationSession=cn,t.ResizeAwareComponent=Vt,t.RouteId=function(e,n){return function(o,i){var r=new t.ParameterDefinition.RouteId(i.toString(),n,e);S.Klass.get(o).addToOwnMetadataList(nn,r),io(o,i,new w.MutableValueModel,"@RouteId",(function(t){return t.query().isNil()}))}},t.ScrollContainerComponent=Ot,t.SectionHeaderComponent=Tt,t.SelectCellRendererComponent=Qt,t.SelectHeaderCellRendererComponent=te,t.SelectInputActivity=Je,t.SelectInputComponent=Pt,t.SelectionColumnModel=le,t.SeparatorComponent=pt,t.SidePlaceNavigationComponent=Vn,t.StringInputActivity=Ye,t.StringInputComponent=Rt,t.SwitchCaseComponent=kt,t.SwitchCaseDefaultDirective=Ft,t.SwitchCaseOption=Dt,t.SwitchCaseWhenDirective=Et,t.SynchroniseInteractionContextIdsWithRoute=ln,t.TabbedPlaceNavigationComponent=Hn,t.TableCellRendererComponent=he,t.TableComponent=de,t.TableHeaderCellRendererComponent=me,t.TableModel=Ze,t.TableRowMenuComponent=ye,t.TemplateCellRendererPortalRef=$t,t.TextInputComponent=St,t.ToolBarComponent=ut,t.TreeExpansionModel=we,t.TreeLabelCellRendererComponent=be,t.TreeLabelColumnModel=xe,t.TreeTableComponent=Ae,t.TreeTableModel=Re,t.TreeToListModel=Pe,t.UrlService=Rn,t.VerticalFocusContainerComponent=Oe,t.Visit=An,t.VisitParameter=function(e){var n=S.Opts.get(e);return function(o,i){var r=new t.ParameterDefinition.ValueParameter(i.toString(),e,n.getOptional("storeInUrl",null));S.Klass.get(o).addToOwnMetadataList(nn,r),io(o,i,new w.MutableValueModel,"@VisitParameter",(function(t){return t.query().isNil()}))}},t.VisitParameterList=function(e){var n=S.Opts.get(e);return function(o,i){var r=new t.ParameterDefinition.ArrayParameter(i.toString(),e,n.getOptional("storeInUrl",null));S.Klass.get(o).addToOwnMetadataList(nn,r),io(o,i,new w.MutableListModel,"@VisitParameterList",(function(t){return t.query().isEmpty()}))}},t.VisitSanitiser=no,t.WaitUntilLeavingInteractionTransitionCancelled=sn,t.WaitUntilLinkTriggeredNavigationInteractionCancellationTypeDetermined=fn,t.WaitUntilPopStateDuringCanDeactivateInteractionFinishes=Mn,t.leftRightPlaceAnimation=Fn,t.slideDownOnEnterAnimation=qn,t.slideRightOnEnterAnimation=Gn,t.ɵ0=ee,Object.defineProperty(t,"__esModule",{value:!0})}));
|
|
2
2
|
//# sourceMappingURL=coolon-angular-ui-powerups.umd.min.js.map
|