@ifsworld/granite-components 3.2.0 → 3.3.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.
@@ -1,4 +1,4 @@
1
- !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@angular/core"),require("@angular/common"),require("@angular/cdk/coercion"),require("rxjs"),require("rxjs/operators"),require("@angular/cdk/testing"),require("@angular/cdk/overlay"),require("@angular/cdk/portal"),require("@angular/cdk/a11y"),require("@angular/cdk/keycodes"),require("@angular/animations"),require("@angular/cdk/bidi"),require("@angular/cdk/platform"),require("@angular/cdk/collections"),require("@angular/cdk/table")):"function"==typeof define&&define.amd?define("@ifsworld/granite-components",["exports","@angular/core","@angular/common","@angular/cdk/coercion","rxjs","rxjs/operators","@angular/cdk/testing","@angular/cdk/overlay","@angular/cdk/portal","@angular/cdk/a11y","@angular/cdk/keycodes","@angular/animations","@angular/cdk/bidi","@angular/cdk/platform","@angular/cdk/collections","@angular/cdk/table"],e):e(((t="undefined"!=typeof globalThis?globalThis:t||self).ifsworld=t.ifsworld||{},t.ifsworld["granite-components"]={}),t.ng.core,t.ng.common,t.ng.cdk.coercion,t.rxjs,t.rxjs.operators,t.ng.cdk.testing,t.ng.cdk.overlay,t.ng.cdk.portal,t.ng.cdk.a11y,t.ng.cdk.keycodes,t.ng.animations,t.ng.cdk.bidi,t.ng.cdk.platform,t.ng.cdk.collections,t.ng.cdk.table)}(this,(function(t,e,n,r,o,i,a,s,c,l,u,g,d,h,p,m){"use strict";var b,v=function(){function t(t){this.element=t,this._columnSpan=null}return Object.defineProperty(t.prototype,"columnSpan",{set:function(t){this._columnSpan=t,this.updateStyles()},enumerable:!1,configurable:!0}),t.prototype.updateStyles=function(){this.setCssProperty("--columnSpan",this._columnSpan?this._columnSpan.toString():null)},t.prototype.setCssProperty=function(t,e){this.element.nativeElement.style.setProperty(t,e)},t}();v.decorators=[{type:e.Component,args:[{selector:"granite-arrange-grid-item",template:"<ng-content></ng-content>",changeDetection:e.ChangeDetectionStrategy.OnPush,styles:[":host{--columnSpan:$default-column-span;display:grid;grid-column:span var(--columnSpan,1)}"]}]}],v.ctorParameters=function(){return[{type:e.ElementRef}]},(b=t.GraniteArrangeGridOrientation||(t.GraniteArrangeGridOrientation={})).columns="columns",b.rows="rows";var f=function(){function e(n){this.element=n,this.orientation=t.GraniteArrangeGridOrientation.columns,this.classColumnOrientation=!1,this.classRowOrientation=!1,this._cols=e.defaultCols,this.destroy$=new o.Subject}return Object.defineProperty(e.prototype,"cols",{get:function(){return this._cols},set:function(t){this._cols=Math.max(1,Math.round(r.coerceNumberProperty(t)))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"rows",{get:function(){return this._rows},set:function(t){throw Error("Explicitly setting rows value for arrange grid is unsupported")},enumerable:!1,configurable:!0}),e.prototype.ngAfterContentInit=function(){var t=this;this.arrangeGridItemComponents.changes.pipe(i.takeUntil(this.destroy$)).subscribe((function(){return t.updateStyles()})),this.updateStyles()},e.prototype.ngOnChanges=function(t){(t.orientation&&!t.orientation.isFirstChange()||t.cols&&!t.cols.isFirstChange())&&this.updateStyles()},e.prototype.ngOnDestroy=function(){this.destroy$.next()},e.prototype.updateStyles=function(){var e=(this.arrangeGridItemComponents||[]).length;this.orientation===t.GraniteArrangeGridOrientation.columns?(this._rows=Math.trunc((e-1)/(this._cols||1))+1,this.classColumnOrientation=!0,this.classRowOrientation=!1,e>0&&(this.arrangeGridItemComponents.forEach((function(t){return t.columnSpan=null})),this.arrangeGridItemComponents.last.columnSpan=this._rows*this._cols-e+1)):(this._cols=1,this._rows=e,this.classColumnOrientation=!1,this.classRowOrientation=!0),this.setCssProperty("--cols",this._cols.toString()),this.setCssProperty("--rows",this._rows.toString())},e.prototype.setCssProperty=function(t,e){this.element.nativeElement.style.setProperty(t,e)},e}();f.defaultCols=2,f.decorators=[{type:e.Component,args:[{selector:"granite-arrange-grid",template:'<ng-content select="granite-arrange-grid-item"></ng-content>\n',changeDetection:e.ChangeDetectionStrategy.OnPush,styles:["@media only screen and (min-width:960px){:host{--cols:1;--rows:1;display:grid;grid-template-columns:repeat(var(--cols,1),1fr);-moz-column-gap:.5rem;column-gap:.5rem;row-gap:.5rem}:host.row-orientation{grid-template-columns:auto;grid-template-rows:repeat(calc(var(--rows, 1) - 1),-webkit-max-content);grid-template-rows:repeat(calc(var(--rows, 1) - 1),max-content)}}"]}]}],f.ctorParameters=function(){return[{type:e.ElementRef}]},f.propDecorators={orientation:[{type:e.Input}],classColumnOrientation:[{type:e.HostBinding,args:["class.column-orientation"]}],classRowOrientation:[{type:e.HostBinding,args:["class.row-orientation"]}],arrangeGridItemComponents:[{type:e.ContentChildren,args:[v]}],cols:[{type:e.Input}]};var y=function(){};y.decorators=[{type:e.NgModule,args:[{declarations:[f,v],imports:[n.CommonModule],exports:[f,v]}]}];var _=function(){function t(t,e){this.element=t,this.renderer=e}return t.prototype.ngOnChanges=function(){this.updateStyles()},t.prototype.updateStyles=function(){this.setStyle("gridColumnStart",this.columnStart),this.setStyle("gridColumnEnd",this.columnEnd),this.setStyle("gridRowStart",this.rowStart),this.setStyle("gridRowEnd",this.rowEnd)},t.prototype.setStyle=function(t,e){this.renderer.setStyle(this.element.nativeElement,t,e||"")},t}();_.decorators=[{type:e.Component,args:[{selector:"granite-grid-item",template:"<ng-content></ng-content>",changeDetection:e.ChangeDetectionStrategy.OnPush}]}],_.ctorParameters=function(){return[{type:e.ElementRef},{type:e.Renderer2}]},_.propDecorators={columnStart:[{type:e.Input}],columnEnd:[{type:e.Input}],rowStart:[{type:e.Input}],rowEnd:[{type:e.Input}]};var k=function(){function t(t){this.element=t}return Object.defineProperty(t.prototype,"cols",{get:function(){return this._cols},set:function(t){this._cols=Math.max(1,Math.round(r.coerceNumberProperty(t)))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"rows",{get:function(){return this._rows},set:function(t){this._rows=Math.max(1,Math.round(r.coerceNumberProperty(t)))},enumerable:!1,configurable:!0}),t.prototype.ngAfterContentInit=function(){this.updateStyles()},t.prototype.ngOnChanges=function(t){(t.cols&&!t.cols.isFirstChange()||t.rows&&!t.rows.isFirstChange())&&this.updateStyles()},t.prototype.updateStyles=function(){this.updateColumnStyles(),this.updateRowStyles()},t.prototype.setCssProperty=function(t,e){this.element.nativeElement.style.setProperty(t,e)},t.prototype.updateColumnStyles=function(){this.setCssProperty("--cols",this._cols&&this._cols.toString()||null)},t.prototype.updateRowStyles=function(){this.setCssProperty("--rows",this._rows&&this._rows.toString()||null)},t}();k.decorators=[{type:e.Component,args:[{selector:"granite-grid",template:"<ng-content></ng-content>",changeDetection:e.ChangeDetectionStrategy.OnPush,styles:[":host{--cols:1;--rows:1;display:grid;grid-template-columns:repeat(var(--cols,1),1fr);grid-template-rows:repeat(var(--rows,1),1fr)}"]}]}],k.ctorParameters=function(){return[{type:e.ElementRef}]},k.propDecorators={cols:[{type:e.Input}],rows:[{type:e.Input}]};var w=function(){};w.decorators=[{type:e.NgModule,args:[{declarations:[k,_],imports:[n.CommonModule],exports:[k,_]}]}];
1
+ !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@angular/core"),require("@angular/common"),require("@angular/cdk/coercion"),require("rxjs"),require("rxjs/operators"),require("@angular/cdk/testing"),require("@angular/cdk/overlay"),require("@angular/cdk/portal"),require("@angular/cdk/a11y"),require("@angular/cdk/keycodes"),require("@angular/animations"),require("@angular/cdk/bidi"),require("@angular/cdk/platform"),require("@angular/cdk/collections"),require("@angular/cdk/table")):"function"==typeof define&&define.amd?define("@ifsworld/granite-components",["exports","@angular/core","@angular/common","@angular/cdk/coercion","rxjs","rxjs/operators","@angular/cdk/testing","@angular/cdk/overlay","@angular/cdk/portal","@angular/cdk/a11y","@angular/cdk/keycodes","@angular/animations","@angular/cdk/bidi","@angular/cdk/platform","@angular/cdk/collections","@angular/cdk/table"],e):e(((t="undefined"!=typeof globalThis?globalThis:t||self).ifsworld=t.ifsworld||{},t.ifsworld["granite-components"]={}),t.ng.core,t.ng.common,t.ng.cdk.coercion,t.rxjs,t.rxjs.operators,t.ng.cdk.testing,t.ng.cdk.overlay,t.ng.cdk.portal,t.ng.cdk.a11y,t.ng.cdk.keycodes,t.ng.animations,t.ng.cdk.bidi,t.ng.cdk.platform,t.ng.cdk.collections,t.ng.cdk.table)}(this,(function(t,e,n,r,i,o,a,s,c,l,u,g,d,p,h,m){"use strict";var b,v=function(){function t(t){this.element=t,this._columnSpan=null}return Object.defineProperty(t.prototype,"columnSpan",{set:function(t){this._columnSpan=t,this.updateStyles()},enumerable:!1,configurable:!0}),t.prototype.updateStyles=function(){this.setCssProperty("--columnSpan",this._columnSpan?this._columnSpan.toString():null)},t.prototype.setCssProperty=function(t,e){this.element.nativeElement.style.setProperty(t,e)},t}();v.decorators=[{type:e.Component,args:[{selector:"granite-arrange-grid-item",template:"<ng-content></ng-content>",changeDetection:e.ChangeDetectionStrategy.OnPush,styles:[":host{--columnSpan:$default-column-span;display:grid;grid-column:span var(--columnSpan,1)}"]}]}],v.ctorParameters=function(){return[{type:e.ElementRef}]},(b=t.GraniteArrangeGridOrientation||(t.GraniteArrangeGridOrientation={})).columns="columns",b.rows="rows";var f=function(){function e(n){this.element=n,this.orientation=t.GraniteArrangeGridOrientation.columns,this.classColumnOrientation=!1,this.classRowOrientation=!1,this._cols=e.defaultCols,this.destroy$=new i.Subject}return Object.defineProperty(e.prototype,"cols",{get:function(){return this._cols},set:function(t){this._cols=Math.max(1,Math.round(r.coerceNumberProperty(t)))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"rows",{get:function(){return this._rows},set:function(t){throw Error("Explicitly setting rows value for arrange grid is unsupported")},enumerable:!1,configurable:!0}),e.prototype.ngAfterContentInit=function(){var t=this;this.arrangeGridItemComponents.changes.pipe(o.takeUntil(this.destroy$)).subscribe((function(){return t.updateStyles()})),this.updateStyles()},e.prototype.ngOnChanges=function(t){(t.orientation&&!t.orientation.isFirstChange()||t.cols&&!t.cols.isFirstChange())&&this.updateStyles()},e.prototype.ngOnDestroy=function(){this.destroy$.next()},e.prototype.updateStyles=function(){var e=(this.arrangeGridItemComponents||[]).length;this.orientation===t.GraniteArrangeGridOrientation.columns?(this._rows=Math.trunc((e-1)/(this._cols||1))+1,this.classColumnOrientation=!0,this.classRowOrientation=!1,e>0&&(this.arrangeGridItemComponents.forEach((function(t){return t.columnSpan=null})),this.arrangeGridItemComponents.last.columnSpan=this._rows*this._cols-e+1)):(this._cols=1,this._rows=e,this.classColumnOrientation=!1,this.classRowOrientation=!0),this.setCssProperty("--cols",this._cols.toString()),this.setCssProperty("--rows",this._rows.toString())},e.prototype.setCssProperty=function(t,e){this.element.nativeElement.style.setProperty(t,e)},e}();f.defaultCols=2,f.decorators=[{type:e.Component,args:[{selector:"granite-arrange-grid",template:'<ng-content select="granite-arrange-grid-item"></ng-content>\n',changeDetection:e.ChangeDetectionStrategy.OnPush,styles:["@media only screen and (min-width:960px){:host{--cols:1;--rows:1;display:grid;grid-template-columns:repeat(var(--cols,1),1fr);-moz-column-gap:.5rem;column-gap:.5rem;row-gap:.5rem}:host.row-orientation{grid-template-columns:auto;grid-template-rows:repeat(calc(var(--rows, 1) - 1),-webkit-max-content);grid-template-rows:repeat(calc(var(--rows, 1) - 1),max-content)}}"]}]}],f.ctorParameters=function(){return[{type:e.ElementRef}]},f.propDecorators={orientation:[{type:e.Input}],classColumnOrientation:[{type:e.HostBinding,args:["class.column-orientation"]}],classRowOrientation:[{type:e.HostBinding,args:["class.row-orientation"]}],arrangeGridItemComponents:[{type:e.ContentChildren,args:[v]}],cols:[{type:e.Input}]};var y=function(){};y.decorators=[{type:e.NgModule,args:[{declarations:[f,v],imports:[n.CommonModule],exports:[f,v]}]}];var _=function(){function t(t,e){this.element=t,this.renderer=e}return t.prototype.ngOnChanges=function(){this.updateStyles()},t.prototype.updateStyles=function(){this.setStyle("gridColumnStart",this.columnStart),this.setStyle("gridColumnEnd",this.columnEnd),this.setStyle("gridRowStart",this.rowStart),this.setStyle("gridRowEnd",this.rowEnd)},t.prototype.setStyle=function(t,e){this.renderer.setStyle(this.element.nativeElement,t,e||"")},t}();_.decorators=[{type:e.Component,args:[{selector:"granite-grid-item",template:"<ng-content></ng-content>",changeDetection:e.ChangeDetectionStrategy.OnPush}]}],_.ctorParameters=function(){return[{type:e.ElementRef},{type:e.Renderer2}]},_.propDecorators={columnStart:[{type:e.Input}],columnEnd:[{type:e.Input}],rowStart:[{type:e.Input}],rowEnd:[{type:e.Input}]};var w=function(){function t(t){this.element=t}return Object.defineProperty(t.prototype,"cols",{get:function(){return this._cols},set:function(t){this._cols=Math.max(1,Math.round(r.coerceNumberProperty(t)))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"rows",{get:function(){return this._rows},set:function(t){this._rows=Math.max(1,Math.round(r.coerceNumberProperty(t)))},enumerable:!1,configurable:!0}),t.prototype.ngAfterContentInit=function(){this.updateStyles()},t.prototype.ngOnChanges=function(t){(t.cols&&!t.cols.isFirstChange()||t.rows&&!t.rows.isFirstChange())&&this.updateStyles()},t.prototype.updateStyles=function(){this.updateColumnStyles(),this.updateRowStyles()},t.prototype.setCssProperty=function(t,e){this.element.nativeElement.style.setProperty(t,e)},t.prototype.updateColumnStyles=function(){this.setCssProperty("--cols",this._cols&&this._cols.toString()||null)},t.prototype.updateRowStyles=function(){this.setCssProperty("--rows",this._rows&&this._rows.toString()||null)},t}();w.decorators=[{type:e.Component,args:[{selector:"granite-grid",template:"<ng-content></ng-content>",changeDetection:e.ChangeDetectionStrategy.OnPush,styles:[":host{--cols:1;--rows:1;display:grid;grid-template-columns:repeat(var(--cols,1),1fr);grid-template-rows:repeat(var(--rows,1),1fr)}"]}]}],w.ctorParameters=function(){return[{type:e.ElementRef}]},w.propDecorators={cols:[{type:e.Input}],rows:[{type:e.Input}]};var k=function(){};k.decorators=[{type:e.NgModule,args:[{declarations:[w,_],imports:[n.CommonModule],exports:[w,_]}]}];
2
2
  /*! *****************************************************************************
3
3
  Copyright (c) Microsoft Corporation.
4
4
 
@@ -13,7 +13,7 @@
13
13
  OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
14
14
  PERFORMANCE OF THIS SOFTWARE.
15
15
  ***************************************************************************** */
16
- var x=function(t,e){return(x=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 C(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}x(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}function M(t,e,n,r){return new(n||(n=Promise))((function(o,i){function a(t){try{c(r.next(t))}catch(t){i(t)}}function s(t){try{c(r.throw(t))}catch(t){i(t)}}function c(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}c((r=r.apply(t,e||[])).next())}))}function I(t,e){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=e.call(t,a)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}}Object.create;function S(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function O(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,o,i=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(t){o={error:t}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}function T(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(O(arguments[e]));return t}Object.create;function D(t,e,n){var r;n&&n.style&&null!=e&&n.style.setProperty(t,(r=e)&&(r.startsWith("granite-")||r.startsWith("fnd-"))?"var(--"+e+")":e)}var P=function(){function t(t){this.elementRef=t,this.pill=!1}return t.prototype.ngOnChanges=function(t){t.backgroundColor&&t.backgroundColor.previousValue!==t.backgroundColor.currentValue&&D("background-color",t.backgroundColor.currentValue,this.elementRef.nativeElement),t.color&&t.color.previousValue!==t.color.currentValue&&D("color",t.color.currentValue,this.elementRef.nativeElement)},t}();P.decorators=[{type:e.Component,args:[{selector:"granite-badge",exportAs:"graniteBadge",host:{class:"granite-badge","[class.granite-badge-pill]":"pill"},template:"<ng-content></ng-content>",changeDetection:e.ChangeDetectionStrategy.OnPush,styles:[":host{display:-moz-inline-flex;display:inline-flex;flex-direction:row;flex-wrap:nowrap;overflow:hidden;-ms-text-overflow:ellipsis;text-overflow:ellipsis;white-space:nowrap;align-items:center;background-color:var(--granite-color-signal-neutral);color:var(--granite-color-text-static-light);padding:5px;border-radius:5px;-webkit-padding-start:10px;padding-inline-start:10px;-webkit-padding-end:10px;padding-inline-end:10px}:host(.granite-badge-pill){border-radius:25px}"]}]}],P.ctorParameters=function(){return[{type:e.ElementRef}]},P.propDecorators={backgroundColor:[{type:e.Input}],color:[{type:e.Input}],pill:[{type:e.Input}]};var E=function(){};E.decorators=[{type:e.NgModule,args:[{declarations:[P],imports:[n.CommonModule],exports:[P]}]}];var A=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return C(e,t),e.with=function(t){var n=this;void 0===t&&(t={});var r=new a.HarnessPredicate(e,t);return r.addOption("text",t.text,(function(t,e){return a.HarnessPredicate.stringMatches(t.getText(),e)})),r.addOption("pill",t.pill,(function(t,e){return M(n,void 0,void 0,(function(){return I(this,(function(n){switch(n.label){case 0:return[4,t.isPill()];case 1:return[2,n.sent()===e]}}))}))})),r},e.prototype.getText=function(){return M(this,void 0,void 0,(function(){return I(this,(function(t){switch(t.label){case 0:return[4,this.host()];case 1:return[2,t.sent().text()]}}))}))},e.prototype.isPill=function(){return M(this,void 0,void 0,(function(){return I(this,(function(t){switch(t.label){case 0:return[4,this.host()];case 1:return[2,t.sent().hasClass("granite-badge-pill")]}}))}))},e}(a.ComponentHarness);A.hostSelector="granite-badge";var R=new e.InjectionToken("GRANITE_MENU_PANEL"),B=function(){function t(t,e,n){this._elementRef=t,this._focusMonitor=e,this._parentMenu=n,this.role="menuitem",this._hovered=new o.Subject,this._focused=new o.Subject,this._triggersSubmenu=!1,this._highlighted=!1,e.monitor(this._elementRef,!1)}return t.prototype.ngOnDestroy=function(){this._focusMonitor.stopMonitoring(this._elementRef),this._hovered.complete(),this._focused.complete()},t.prototype.focus=function(t,e){void 0===t&&(t="program"),this._focusMonitor.focusVia(this._getHostElement(),t,e),this._focused.next(this)},t.prototype._getHostElement=function(){return this._elementRef.nativeElement},t}();function z(t,e){return t+"ms "+(void 0!==e?" "+e+"ms ":"")+"cubic-bezier(0, 0, 0.2, 1)"}function L(t,e){return t+"ms "+(void 0!==e?" "+e+"ms ":"")+"linear"}B.decorators=[{type:e.Component,args:[{selector:"[graniteMenuItem]",template:'<ng-content></ng-content>\n <ng-container *ngIf="_triggersSubmenu">\n <granite-icon class="caret-left">caret-left</granite-icon>\n <granite-icon class="caret-right">caret-right</granite-icon>\n </ng-container>',exportAs:"graniteMenuItem",host:{"[attr.role]":"role","[class.granite-menu-item]":"true","[class.granite-menu-item-highlighted]":"_highlighted","[class.granite-menu-item-submenu-trigger]":"_triggersSubmenu","[class.granite-device-output-touch]":'_clientOutput?.device === "touch"',"(mouseenter)":"_hovered.next(this)"},styles:[":host{display:block;position:relative;line-height:var(--granite-spacing-xl);height:var(--granite-spacing-xl);padding:0 var(--granite-spacing-s);width:100%;max-width:100%;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:pointer;outline:none;border:none;-webkit-tap-highlight-color:transparent;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;text-align:start;text-decoration:none;background-color:var(--granite-color-background-variant);color:var(--granite-color-text);font-size:var(--granite-font-size-body-small);font-family:inherit}@media (hover:hover) and (pointer:fine){:host:hover{background:var(--granite-color-background-active-hover);color:var(--granite-color-text-on-active)}}@media (hover:none) and (pointer:coarse){:host:active{background:var(--granite-color-background-active-hover);color:var(--granite-color-text-on-active)}}:host.cdk-keyboard-focused,:host.cdk-program-focused,:host.granite-menu-item-highlighted{background:var(--granite-color-background-active-hover);color:var(--granite-color-text-on-active)}:host granite-icon{position:absolute;font-size:var(--granite-font-size-body-small);color:inherit;top:50%;transform:translateY(-50%)}:host.granite-menu-item-submenu-trigger{-webkit-padding-end:var(--granite-spacing-l);padding-inline-end:var(--granite-spacing-l)}:host-context([dir=ltr]) :host.granite-menu-item-submenu-trigger granite-icon,html[dir=ltr] :host.granite-menu-item-submenu-trigger granite-icon{right:var(--granite-spacing-xs)}:host-context([dir=rtl]) :host.granite-menu-item-submenu-trigger granite-icon,html[dir=rtl] :host.granite-menu-item-submenu-trigger granite-icon{left:var(--granite-spacing-xs)}[dir=ltr] :host.granite-menu-item-submenu-trigger granite-icon.caret-left,[dir=rtl] :host.granite-menu-item-submenu-trigger granite-icon.caret-right{display:none}:host.granite-divider-top{border-top:var(--granite-border-width-regular) solid var(--granite-color-border-soft)}:host.granite-divider-bottom{border-bottom:var(--granite-border-width-regular) solid var(--granite-color-border-soft)}:host.granite-device-output-touch{height:var(--granite-spacing-xl);line-height:var(--granite-spacing-xl);font-size:var(--granite-font-size-body-small);text-align:center}:host.granite-device-output-touch,:host.granite-device-output-touch.granite-menu-item-back-trigger,:host.granite-device-output-touch.granite-menu-item-submenu-trigger{padding:0 var(--granite-spacing-l)}:host.granite-device-output-touch.granite-menu-item-title{line-height:var(--granite-spacing-xl);height:var(--granite-spacing-xl);font-size:var(--granite-font-size-micro);color:var(--granite-color-text-weak)}@media (hover:none) and (pointer:coarse){:host.granite-device-output-touch.granite-menu-item-title:active{background:var(--granite-color-background-active-hover);color:var(--granite-color-text-on-active)}}:host-context([dir=ltr]) :host.granite-device-output-touch.granite-menu-item-back-trigger granite-icon,html[dir=ltr] :host.granite-device-output-touch.granite-menu-item-back-trigger granite-icon{left:var(--granite-spacing-xs)}:host-context([dir=rtl]) :host.granite-device-output-touch.granite-menu-item-back-trigger granite-icon,html[dir=rtl] :host.granite-device-output-touch.granite-menu-item-back-trigger granite-icon{right:var(--granite-spacing-xs)}[dir=ltr] :host.granite-device-output-touch.granite-menu-item-back-trigger granite-icon.caret-right,[dir=rtl] :host.granite-device-output-touch.granite-menu-item-back-trigger granite-icon.caret-left{display:none}"]}]}],B.ctorParameters=function(){return[{type:e.ElementRef},{type:l.FocusMonitor},{type:void 0,decorators:[{type:e.Inject,args:[R]},{type:e.Optional}]}]},B.propDecorators={role:[{type:e.Input}]};var X=z(120),G={transformMenuDesktop:g.trigger("transformMenuDesktop",[g.state("void",g.style({opacity:0,transform:"scale(0.9)"})),g.transition("void => enter",g.group([g.query(".granite-menu-content",g.animate(L(100),g.style({opacity:1}))),g.animate(X,g.style({transform:"scale(1)"}))])),g.transition("* => void",g.animate(L(100,25),g.style({opacity:0})))])},j=300,F=z(j),H=L(j),q=L(j,200),Y="1ms linear",V=g.style({transform:"translateX(0) translateY(100%)",opacity:0}),N=g.style({opacity:1,transform:"translateX(0) translateY(0)"}),U=g.style({opacity:0,transform:"translateX(100vw) translateY(0)"}),$=g.style({opacity:1,transform:"translateX(-100vw) translateY(0)"}),K=g.style({transform:"translateX({{ xOffset }}px)"}),W=g.style({transform:"translateX(calc(-100vw + {{ xOffset }}px))"}),Q=g.style({opacity:0,transform:"translateX(0) translateY(0)"}),Z={transformMenuTouch:g.trigger("transformMenuTouch",[g.state("void",U),g.state("enter, enter-from-below",N),g.state("pan-hidden",W,{params:{xOffset:0}}),g.state("pan",K,{params:{xOffset:0}}),g.state("below-with-delay",V),g.state("hide",$),g.transition("pan => enter, pan => enter-from-below, pan => void, enter <=> hide, enter-from-below <=> hide, pan-hidden => hide, pan-hidden => enter",g.animate(F)),g.transition("void => enter-from-below",g.sequence([g.animate(Y,V),g.animate(F,N)])),g.transition("void => enter",g.sequence([g.animate(Y,U),g.animate(F,N)])),g.transition("enter => void",g.animate(F,U)),g.transition("hide => below",g.animate(H,$)),g.transition("hide => below-with-delay",g.sequence([g.animate(Y,$),g.animate(q,$)])),g.transition("enter => below, enter-from-below => below",g.sequence([g.animate(Y,N),g.animate(H,V)])),g.transition("enter => below-with-delay, enter-from-below => below-with-delay",g.sequence([g.animate(Y,N),g.animate(q,V)]))]),transformCloseButton:g.trigger("transformCloseButton",[g.state("void, below, below-with-delay",Q),g.state("enter, enter-from-below, pan-hidden, pan, hide",N),g.transition("void => enter-from-below",g.sequence([g.animate(Y,Q),g.animate(L(50,150),N)])),g.transition("enter => below, enter-from-below => below",g.sequence([g.animate(Y,N),g.animate(L(25),Q)])),g.transition("enter => below-with-delay, enter-from-below => below-with-delay",g.sequence([g.animate(Y,N),g.animate(L(50,200),Q)]))])};var J=0,tt={value:"void",params:{xOffset:0}},et=function(){function t(t){this._changeDetectorRef=t,this.closed=new e.EventEmitter,this.panelId="granite-menu-panel-"+J++,this.showBackButton=!1,this.showTitle=!1,this.showCloseButton=!1,this._transformMenu=new o.BehaviorSubject(tt),this._animationDone=new o.Subject,this._directDescendantItems=new e.QueryList,this._tabSubscription=o.Subscription.EMPTY,this._xPosition="after",this._yPosition="below",this.xOffset=0}return Object.defineProperty(t.prototype,"xPosition",{get:function(){return this._xPosition},set:function(t){"before"!==t&&"after"!==t&&function(){throw Error('xPosition value must be either \'before\' or after\'.\n Example: <granite-menu xPosition="before" #menu="graniteMenu"></granite-menu>')}(),this._xPosition=t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"yPosition",{get:function(){return this._yPosition},set:function(t){"above"!==t&&"below"!==t&&function(){throw Error('yPosition value must be either \'above\' or below\'.\n Example: <granite-menu yPosition="above" #menu="graniteMenu"></granite-menu>')}(),this._yPosition=t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"_panelAnimationState",{set:function(t){this._transformMenu.next({value:t,params:{xOffset:this.xOffset}})},enumerable:!1,configurable:!0}),t.prototype.ngAfterContentInit=function(){var t=this;this._updateDirectDescendants(),this._keyManager=new l.FocusKeyManager(this._directDescendantItems).withWrap(),this._tabSubscription=this._keyManager.tabOut.subscribe((function(){t.closed.emit("tab")})),this._directDescendantItems.changes.pipe(i.startWith(this._directDescendantItems),i.switchMap((function(t){return o.merge.apply(void 0,T(t.map((function(t){return t._focused}))))}))).subscribe((function(e){return t._keyManager.updateActiveItem(e)}))},t.prototype.ngOnDestroy=function(){this._directDescendantItems.destroy(),this._tabSubscription.unsubscribe(),this.closed.complete()},t.prototype._hovered=function(){var t=this;return this._directDescendantItems.changes.pipe(i.startWith(this._directDescendantItems),i.filter((function(){var e;return"touch"!==(null===(e=t._clientOutput)||void 0===e?void 0:e.device)})),i.switchMap((function(t){return o.merge.apply(void 0,T(t.map((function(t){return t._hovered}))))})))},t.prototype._handleKeydown=function(t){var e=t.key,n=this._keyManager;switch(e){case"Escape":u.hasModifierKey(t)||(t.preventDefault(),this.closed.emit("keydown"));break;case"ArrowLeft":this.parentMenu&&"ltr"===this.direction&&this.closed.emit("keydown");break;case"ArrowRight":this.parentMenu&&"rtl"===this.direction&&this.closed.emit("keydown");break;case"Home":case"End":u.hasModifierKey(t)||("Home"===e?n.setFirstItemActive():n.setLastItemActive(),t.preventDefault());break;default:"ArrowUp"!==e&&"ArrowDown"!==e||n.setFocusOrigin("keyboard"),n.onKeydown(t)}},t.prototype.focusFirstItem=function(t){void 0===t&&(t="program"),this._keyManager.setFocusOrigin(t).setFirstItemActive()},t.prototype._updateShowTitle=function(){this.showTitle=!!this.title||this.showBackButton},t.prototype._startAnimation=function(){this._panelAnimationState="enter"},t.prototype._resetAnimation=function(){this._panelAnimationState="void"},t.prototype._startTouchCloseDownAnimation=function(){this._panelAnimationState="below"},t.prototype._startTouchCloseDownAnimationWithDelay=function(){this._panelAnimationState="below-with-delay"},t.prototype._startTouchCloseSideAnimation=function(){this._resetAnimation()},t.prototype._startTouchRootEnterAnimation=function(){this._panelAnimationState="enter-from-below",this.xOffset=0},t.prototype._startTouchSubmenuEnterAnimation=function(){this._panelAnimationState="enter",this.xOffset=0},t.prototype._startTouchPanAnimation=function(t){this._panelAnimationState="pan",this.xOffset=t},t.prototype._startTouchHidePanAnimation=function(t){this._panelAnimationState="pan-hidden",this.xOffset=t},t.prototype._startTouchHideAnimation=function(){this._panelAnimationState="hide",this.xOffset=0},t.prototype._onAnimationDone=function(t){this._animationDone.next(t),this._isAnimating=!1},t.prototype._onAnimationStart=function(t){this._isAnimating=!0,"enter"!==t.toState&&"enter-from-below"!==t.toState||0!==this._keyManager.activeItemIndex||(t.element.scrollTop=0)},t.prototype._handleClick=function(){this.closed.emit("click")},t.prototype._handleCloseClick=function(){this.closed.emit()},t.prototype._handleBackClick=function(t){this.showBackButton&&this.closed.emit("keydown"),t.stopPropagation()},t.prototype._setDevice=function(t,e){this._clientInput=t,this._clientOutput=e,this._directDescendantItems.forEach((function(n){n._clientInput=t,n._clientOutput=e})),this._changeDetectorRef.markForCheck()},t.prototype.resetActiveItem=function(){this._keyManager.setActiveItem(-1)},t.prototype._updateDirectDescendants=function(){var t=this;this._allItems.changes.pipe(i.startWith(this._allItems)).subscribe((function(e){t._directDescendantItems.reset(e.filter((function(e){return e._parentMenu===t}))),t._directDescendantItems.notifyOnChanges()}))},t}();et.decorators=[{type:e.Directive}],et.ctorParameters=function(){return[{type:e.ChangeDetectorRef}]},et.propDecorators={xPosition:[{type:e.Input}],yPosition:[{type:e.Input}],title:[{type:e.Input}],closeLabel:[{type:e.Input}],templateRef:[{type:e.ViewChild,args:[e.TemplateRef]}],_allItems:[{type:e.ContentChildren,args:[B,{descendants:!0}]}],closed:[{type:e.Output}]};var nt=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return C(e,t),e}(et);nt.decorators=[{type:e.Component,args:[{selector:"granite-menu",template:'\x3c!--\n Using separate template part for desktop and touch output, because of\n animation triggers and slightly different content.\n--\x3e\n<ng-template>\n \x3c!-- Desktop --\x3e\n <ng-container *ngIf="_clientOutput.device === \'desktop\'">\n <div\n #menu\n class="granite-menu"\n tabindex="-1"\n [id]="panelId"\n [@transformMenuDesktop]="_transformMenu | async"\n (@transformMenuDesktop.start)="_onAnimationStart($event)"\n (@transformMenuDesktop.done)="_onAnimationDone($event)"\n (click)="_handleClick()"\n (keydown)="_handleKeydown($event)"\n >\n <div class="granite-menu-content">\n <ng-container [ngTemplateOutlet]="content"></ng-container>\n </div>\n </div>\n </ng-container>\n\n \x3c!-- Touch --\x3e\n <ng-container *ngIf="_clientOutput?.device === \'touch\'">\n <div\n #menu\n class="granite-menu granite-device-output-touch"\n tabindex="-1"\n [id]="panelId"\n [@transformMenuTouch]="_transformMenu | async"\n (@transformMenuTouch.start)="_onAnimationStart($event)"\n (@transformMenuTouch.done)="_onAnimationDone($event)"\n (click)="_handleClick()"\n (keydown)="_handleKeydown($event)"\n >\n <div class="granite-menu-content">\n <div *ngIf="showTitle" class="header-container">\n <button\n [disabled]="!showBackButton"\n graniteMenuTouchTitleItem\n (click)="_handleBackClick($event)"\n >\n {{ title }}\n </button>\n </div>\n\n <ng-container [ngTemplateOutlet]="content"></ng-container>\n\n <div class="footer-container"></div>\n </div>\n </div>\n\n \x3c!-- Close button --\x3e\n <div class="close" [@transformCloseButton]="_transformMenu | async">\n <button\n *ngIf="showCloseButton"\n graniteMenuTouchCloseItem\n (click)="_handleCloseClick()"\n >\n {{ closeLabel }}\n </button>\n </div>\n </ng-container>\n\n \x3c!--\n Content template shared between desktop and touch parts, as <ng-content>\n can\'t be used in two places in the same template\n --\x3e\n <ng-template #content>\n <ng-content></ng-content>\n </ng-template>\n</ng-template>\n',changeDetection:e.ChangeDetectionStrategy.OnPush,exportAs:"graniteMenu",animations:[G.transformMenuDesktop,Z.transformMenuTouch,Z.transformCloseButton],providers:[{provide:R,useExisting:nt}],styles:[".granite-menu:not(.granite-device-output-touch){background-color:var(--granite-color-background-variant);color:var(--granite-color-text);overflow:auto;-webkit-overflow-scrolling:touch;min-height:var(--granite-spacing-xl);max-height:calc(100vh - var(--granite-spacing-xl));outline:0;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;filter:drop-shadow(0 16px 16px rgba(0,0,0,.08)) drop-shadow(0 4px 20px rgba(0,0,0,.1));min-width:calc(var(--granite-spacing-m) * 7);overflow-x:hidden;overflow-y:hidden}.granite-menu:not(.granite-device-output-touch).ng-animating{pointer-events:none}.granite-menu:not(.granite-device-output-touch):hover{overflow-y:auto}.granite-menu:not(.granite-device-output-touch)::-webkit-scrollbar{width:var(--granite-spacing-xs)}.granite-menu:not(.granite-device-output-touch)::-webkit-scrollbar-thumb{background-color:var(--granite-color-border-hard);border-radius:calc(var(--granite-spacing-m) * .125)}.granite-menu:not(.granite-device-output-touch)::-webkit-scrollbar-track{background-color:var(--granite-color-background-hover)}.granite-menu.granite-device-output-touch{background-color:var(--granite-color-background-variant);color:var(--granite-color-text);overflow:auto;-webkit-overflow-scrolling:touch;min-height:var(--granite-spacing-xl);max-height:calc(100vh - var(--granite-spacing-xl));outline:0;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;filter:drop-shadow(0 16px 16px rgba(0,0,0,.08)) drop-shadow(0 4px 20px rgba(0,0,0,.1));border-radius:calc(var(--granite-radius-m) / 2);-webkit-margin-start:var(--granite-spacing-xs);margin-inline-start:var(--granite-spacing-xs);-webkit-margin-end:var(--granite-spacing-xs);margin-inline-end:var(--granite-spacing-xs);-webkit-margin-after:var(--granite-spacing-xs);margin-block-end:var(--granite-spacing-xs);max-height:calc(100% - var(--granite-spacing-m) * 7)}.granite-menu.granite-device-output-touch.ng-animating{pointer-events:none}.granite-menu.granite-device-output-touch .header-container{position:-webkit-sticky;position:sticky;top:0;background-color:var(--granite-color-background-variant);z-index:1}.granite-menu.granite-device-output-touch .footer-container{position:-webkit-sticky;position:sticky;bottom:0;height:0}.close:not(:empty){background-color:var(--granite-color-background-variant);color:var(--granite-color-text);overflow:auto;-webkit-overflow-scrolling:touch;min-height:var(--granite-spacing-xl);max-height:calc(100vh - var(--granite-spacing-xl));outline:0;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;filter:drop-shadow(0 16px 16px rgba(0,0,0,.08)) drop-shadow(0 4px 20px rgba(0,0,0,.1));border-radius:calc(var(--granite-radius-m) / 2);-webkit-margin-start:var(--granite-spacing-xs);margin-inline-start:var(--granite-spacing-xs);-webkit-margin-end:var(--granite-spacing-xs);margin-inline-end:var(--granite-spacing-xs);-webkit-margin-after:var(--granite-spacing-xs);margin-block-end:var(--granite-spacing-xs)}.close:not(:empty).ng-animating{pointer-events:none}"]}]}];var rt=new e.InjectionToken("GRANITE_CLIENT_INPUT"),ot=new e.InjectionToken("GRANITE_CLIENT_OUTPUT"),it={input:{devices:["mouse","keyboard"]},output:{device:"desktop"}},at={input:{devices:["touch","onscreen-keyboard"]},output:{device:"touch"}},st=h.normalizePassiveListenerOptions({passive:!0}),ct=function(){function t(t,e,n,r,i,a,s,c,l,u){var g=this;this._overlay=t,this._element=e,this._viewContainerRef=n,this._parentMenu=r,this._clientInput=i,this._clientOutput=a,this._menuItemInstance=s,this._dir=c,this._focusMonitor=l,this._isMenuOpen=!1,this._openedBy=null,this._hoverSubscription=o.Subscription.EMPTY,this._menuCloseSubscription=o.Subscription.EMPTY,this._closingActionsSubscription=o.Subscription.EMPTY,this._portal=null,this._overlayRef=null,this._touchTouchingElement=!1,this._handleTouchStart=function(){g._openedBy="touch"},this._handleOverlayTouchStart=function(t){g.menu._isAnimating||(g._touchStartTime=(new Date).getTime(),g._touchStartX=t.changedTouches[0].clientX,g._touchStartY=t.changedTouches[0].clientY,g._touchCurrentX=g._touchStartX,g._touchCurrentY=g._touchStartY,g._touchTranslateX=0,g._touchMaxX=g._overlayRef.hostElement.getBoundingClientRect().width,g._touchLockedX=null,g._touchTouchingElement=!0)},this._handleOverlayTouchMove=function(t){if(g._touchTouchingElement&&!g.menu._isAnimating&&!g._touchLockedX){if(g._touchCurrentX=t.changedTouches[0].clientX,g._touchCurrentY=t.changedTouches[0].clientY,null===g._touchLockedX){var e=Math.abs(g._touchCurrentY-g._touchStartY),n=Math.abs(g._touchCurrentX-g._touchStartX);if(n>10||e>10)return void(g._touchLockedX=e>n)}g._touchTranslateX=g._touchCurrentX-g._touchStartX,g._touchTranslateX<0?g._touchTranslateX=g.easeOutExpo(g._touchTranslateX,0,-8,-4*g._touchMaxX):g._parentMenu?g._touchTranslateX>g._touchMaxX&&(g._touchTranslateX=g.easeOutExpo(g._touchTranslateX-g._touchMaxX,g._touchMaxX,8,4*g._touchMaxX)):g._touchTranslateX=g.easeOutExpo(g._touchTranslateX,0,8,4*g._touchMaxX),g.animateSetMenuPosition(g._touchTranslateX)}},this._handleOverlayTouchEnd=function(){if(g._touchTouchingElement&&!g.menu._isAnimating&&(g._touchTranslateX=g._touchCurrentX-g._touchStartX,0!==g._touchTranslateX)){g._touchTouchingElement=!1,g._touchTimeTaken=(new Date).getTime()-g._touchStartTime;var t=g._touchTranslateX>g._touchMaxX/2,e=g._touchTranslateX>g._touchMaxX/10&&g._touchTimeTaken>50&&g._touchTimeTaken<300;g._parentMenu&&(e||t)?g.menu.closed.emit("keydown"):g.animateOpenMenu()}},e.nativeElement.addEventListener("touchstart",this._handleTouchStart,st),s&&(s._triggersSubmenu=this.triggersSubmenu()),this._document=u}return t.prototype.ngOnChanges=function(t){t.menu&&this._handleMenuChange()},t.prototype.ngAfterContentInit=function(){this._checkMenu(),this._handleHover()},t.prototype.ngOnDestroy=function(){this._overlayRef&&(this.removeOverlayListeners(),this._overlayRef.dispose(),this._overlayRef=null),this._element.nativeElement.removeEventListener("touchstart",this._handleTouchStart,st),this._hoverSubscription.unsubscribe(),this._menuCloseSubscription.unsubscribe(),this._closingActionsSubscription.unsubscribe()},t.prototype._handleMenuChange=function(){var t=this;if(this._menuCloseSubscription.unsubscribe(),this.menu){var e=this.menu.closed;this._menuCloseSubscription=e.subscribe((function(e){if(!t.menu._isClosing){if(t.menu._isClosing=!0,"touch"===t._clientOutput.device)(t.menu._isAnimating?t.menu._animationDone:o.of([null])).pipe(i.take(1),i.delay(0,o.asapScheduler)).subscribe((function(){t.animateCloseMenu("keydown"!==e,"click"===e),t.menu._animationDone.pipe(i.take(1),i.delay(0,o.asapScheduler)).subscribe((function(){return t._destroyMenu()}))}));else t._destroyMenu();"click"!==e&&"tab"!==e||!t._parentMenu||t._parentMenu.closed.emit(e)}}))}},t.prototype.openMenu=function(){var t,e=this;if(!this._isMenuOpen){this._checkMenu(),this.menu.parentMenu=this.triggersSubmenu()?this._parentMenu:void 0,this.menu.direction="rtl"===this._dir.value?"rtl":"ltr",this._parentMenu&&(this._clientInput=this._parentMenu._clientInput,this._clientOutput=this._parentMenu._clientOutput),this.menu._setDevice(this._clientInput,this._clientOutput),"touch"===this._clientOutput.device&&(this.menu.showBackButton=!!this._parentMenu,this.menu._updateShowTitle(),this.menu.closeLabel||(this.menu.closeLabel=null===(t=this._parentMenu)||void 0===t?void 0:t.closeLabel),this.menu.showCloseButton=!!this.menu.closeLabel),this.menu._isClosing=!1;var n=[];"touch"===this._clientOutput.device&&n.push("granite-overlay-pane-fill-width-bottom");var r="touch"!==this._clientOutput.device?this._overlay.scrollStrategies.reposition():void 0,o="touch"===this._clientOutput.device&&!this.triggersSubmenu();if(this._overlayRef)"touch"===this._clientOutput.device&&(this.menu._panelAnimationState="void");else{var i=new s.OverlayConfig({positionStrategy:this._positionStrategy(),backdropClass:"granite-overlay-dark-glass-backdrop",scrollStrategy:r,direction:this._dir,panelClass:n,hasBackdrop:o});this._overlayRef=this._overlay.create(i),"touch"===this._clientOutput.device&&this.addOverlayListeners()}this._portal&&this._portal.templateRef===this.menu.templateRef||(this._portal=new c.TemplatePortal(this.menu.templateRef,this._viewContainerRef)),this._overlayRef.attach(this._portal),this._closingActionsSubscription=this._menuClosingActions().subscribe((function(){return e.closeMenu()})),this.animateOpenMenu(),this._setIsMenuOpen(!0),this.menu.focusFirstItem(this._openedBy||"program")}},t.prototype.triggersSubmenu=function(){return!(!this._menuItemInstance||!this._parentMenu)},t.prototype.toggleMenu=function(){this._isMenuOpen?this.closeMenu():this.openMenu()},t.prototype.closeMenu=function(){this.menu.closed.emit()},t.prototype.focus=function(t,e){void 0===t&&(t="program"),this._focusMonitor?this._focusMonitor.focusVia(this._element,t,e):this._element.nativeElement.focus(e)},t.prototype._destroyMenu=function(){this._overlayRef&&this._isMenuOpen&&(this._closingActionsSubscription.unsubscribe(),this._overlayRef.detach(),this._restoreFocus(),this.menu._resetAnimation(),this._setIsMenuOpen(!1))},t.prototype._handleMousedown=function(t){l.isFakeMousedownFromScreenReader(t)||("touch"!==this._openedBy&&(this._openedBy=0===t.button?"mouse":null),this.triggersSubmenu()&&!this._toggleOnSubmenuClick()&&t.preventDefault())},t.prototype._handleKeydown=function(t){var e=t.key;this.triggersSubmenu()&&("ArrowRight"===e&&"ltr"===this._dir.value||"ArrowLeft"===e&&"rtl"===this._dir.value)&&this.openMenu()},t.prototype._handleClick=function(t){this.triggersSubmenu()?(t.stopPropagation(),this._toggleOnSubmenuClick()?this.toggleMenu():this.openMenu()):this.toggleMenu()},t.prototype._handleHover=function(){var t=this;this.triggersSubmenu()&&this._parentMenu&&(this._hoverSubscription=this._parentMenu._hovered().pipe(i.filter((function(){return t._openOnHover()})),i.filter((function(e){return e===t._menuItemInstance})),i.delay(0,o.asapScheduler)).subscribe((function(){t._openedBy="mouse",t.menu instanceof et&&t.menu._isAnimating?t.menu._animationDone.pipe(i.take(1),i.delay(0,o.asapScheduler),i.takeUntil(t._parentMenu._hovered())).subscribe((function(){return t.openMenu()})):t.openMenu()})))},t.prototype._restoreFocus=function(){this._openedBy?this.triggersSubmenu()||this.focus(this._openedBy):this.focus(),this._openedBy=null},t.prototype._setIsMenuOpen=function(t){this._isMenuOpen=t,this.triggersSubmenu()&&(this._menuItemInstance._highlighted=t&&"touch"!==this._clientOutput.device)},t.prototype._checkMenu=function(){this.menu||
16
+ var x=function(t,e){return(x=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 C(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}x(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}function I(t,e,n,r){return new(n||(n=Promise))((function(i,o){function a(t){try{c(r.next(t))}catch(t){o(t)}}function s(t){try{c(r.throw(t))}catch(t){o(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((r=r.apply(t,e||[])).next())}))}function M(t,e){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=e.call(t,a)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}}Object.create;function S(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function T(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,o=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a}function O(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(T(arguments[e]));return t}Object.create;function E(t,e,n){var r;n&&n.style&&null!=e&&n.style.setProperty(t,(r=e)&&(r.startsWith("granite-")||r.startsWith("fnd-"))?"var(--"+e+")":e)}var D=function(){function t(t){this.elementRef=t,this.pill=!1}return t.prototype.ngOnChanges=function(t){t.backgroundColor&&t.backgroundColor.previousValue!==t.backgroundColor.currentValue&&E("background-color",t.backgroundColor.currentValue,this.elementRef.nativeElement),t.color&&t.color.previousValue!==t.color.currentValue&&E("color",t.color.currentValue,this.elementRef.nativeElement)},t}();D.decorators=[{type:e.Component,args:[{selector:"granite-badge",exportAs:"graniteBadge",host:{class:"granite-badge","[class.granite-badge-pill]":"pill"},template:"<ng-content></ng-content>",changeDetection:e.ChangeDetectionStrategy.OnPush,styles:[":host{display:-moz-inline-flex;display:inline-flex;flex-direction:row;flex-wrap:nowrap;overflow:hidden;-ms-text-overflow:ellipsis;text-overflow:ellipsis;white-space:nowrap;align-items:center;background-color:var(--granite-color-signal-neutral);color:var(--granite-color-text-static-light);padding:5px;border-radius:5px;-webkit-padding-start:10px;padding-inline-start:10px;-webkit-padding-end:10px;padding-inline-end:10px}:host(.granite-badge-pill){border-radius:25px}"]}]}],D.ctorParameters=function(){return[{type:e.ElementRef}]},D.propDecorators={backgroundColor:[{type:e.Input}],color:[{type:e.Input}],pill:[{type:e.Input}]};var P=function(){};P.decorators=[{type:e.NgModule,args:[{declarations:[D],imports:[n.CommonModule],exports:[D]}]}];var A=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return C(e,t),e.with=function(t){var n=this;void 0===t&&(t={});var r=new a.HarnessPredicate(e,t);return r.addOption("text",t.text,(function(t,e){return a.HarnessPredicate.stringMatches(t.getText(),e)})),r.addOption("pill",t.pill,(function(t,e){return I(n,void 0,void 0,(function(){return M(this,(function(n){switch(n.label){case 0:return[4,t.isPill()];case 1:return[2,n.sent()===e]}}))}))})),r},e.prototype.getText=function(){return I(this,void 0,void 0,(function(){return M(this,(function(t){switch(t.label){case 0:return[4,this.host()];case 1:return[2,t.sent().text()]}}))}))},e.prototype.isPill=function(){return I(this,void 0,void 0,(function(){return M(this,(function(t){switch(t.label){case 0:return[4,this.host()];case 1:return[2,t.sent().hasClass("granite-badge-pill")]}}))}))},e}(a.ComponentHarness);A.hostSelector="granite-badge";var R=new e.InjectionToken("GRANITE_MENU_PANEL"),B=function(){function t(t,e,n){this._elementRef=t,this._focusMonitor=e,this._parentMenu=n,this.role="menuitem",this._hovered=new i.Subject,this._focused=new i.Subject,this._triggersSubmenu=!1,this._highlighted=!1,e.monitor(this._elementRef,!1)}return t.prototype.ngOnDestroy=function(){this._focusMonitor.stopMonitoring(this._elementRef),this._hovered.complete(),this._focused.complete()},t.prototype.focus=function(t,e){void 0===t&&(t="program"),this._focusMonitor.focusVia(this._getHostElement(),t,e),this._focused.next(this)},t.prototype._getHostElement=function(){return this._elementRef.nativeElement},t}();function z(t,e){return t+"ms "+(void 0!==e?" "+e+"ms ":"")+"cubic-bezier(0, 0, 0.2, 1)"}function L(t,e){return t+"ms "+(void 0!==e?" "+e+"ms ":"")+"linear"}B.decorators=[{type:e.Component,args:[{selector:"[graniteMenuItem]",template:'<ng-content></ng-content>\n <ng-container *ngIf="_triggersSubmenu">\n <granite-icon class="caret-left">caret-left</granite-icon>\n <granite-icon class="caret-right">caret-right</granite-icon>\n </ng-container>',exportAs:"graniteMenuItem",host:{"[attr.role]":"role","[class.granite-menu-item]":"true","[class.granite-menu-item-highlighted]":"_highlighted","[class.granite-menu-item-submenu-trigger]":"_triggersSubmenu","[class.granite-device-output-touch]":'_clientOutput?.device === "touch"',"(mouseenter)":"_hovered.next(this)"},styles:[":host{display:block;position:relative;line-height:var(--granite-spacing-xl);height:var(--granite-spacing-xl);padding:0 var(--granite-spacing-s);width:100%;max-width:100%;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:pointer;outline:none;border:none;-webkit-tap-highlight-color:transparent;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;text-align:start;text-decoration:none;background-color:var(--granite-color-background-variant);color:var(--granite-color-text);font-size:var(--granite-font-size-body-small);font-family:inherit}@media (hover:hover) and (pointer:fine){:host:hover{background:var(--granite-color-background-active-hover);color:var(--granite-color-text-on-active)}}@media (hover:none) and (pointer:coarse){:host:active{background:var(--granite-color-background-active-hover);color:var(--granite-color-text-on-active)}}:host.cdk-keyboard-focused,:host.cdk-program-focused,:host.granite-menu-item-highlighted{background:var(--granite-color-background-active-hover);color:var(--granite-color-text-on-active)}:host granite-icon{position:absolute;font-size:var(--granite-font-size-body-small);color:inherit;top:50%;transform:translateY(-50%)}:host.granite-menu-item-submenu-trigger{-webkit-padding-end:var(--granite-spacing-l);padding-inline-end:var(--granite-spacing-l)}:host-context([dir=ltr]) :host.granite-menu-item-submenu-trigger granite-icon,html[dir=ltr] :host.granite-menu-item-submenu-trigger granite-icon{right:var(--granite-spacing-xs)}:host-context([dir=rtl]) :host.granite-menu-item-submenu-trigger granite-icon,html[dir=rtl] :host.granite-menu-item-submenu-trigger granite-icon{left:var(--granite-spacing-xs)}[dir=ltr] :host.granite-menu-item-submenu-trigger granite-icon.caret-left,[dir=rtl] :host.granite-menu-item-submenu-trigger granite-icon.caret-right{display:none}:host.granite-divider-top{border-top:var(--granite-border-width-regular) solid var(--granite-color-border-soft)}:host.granite-divider-bottom{border-bottom:var(--granite-border-width-regular) solid var(--granite-color-border-soft)}:host.granite-device-output-touch{height:var(--granite-spacing-xl);line-height:var(--granite-spacing-xl);font-size:var(--granite-font-size-body-small);text-align:center}:host.granite-device-output-touch,:host.granite-device-output-touch.granite-menu-item-back-trigger,:host.granite-device-output-touch.granite-menu-item-submenu-trigger{padding:0 var(--granite-spacing-l)}:host.granite-device-output-touch.granite-menu-item-title{line-height:var(--granite-spacing-xl);height:var(--granite-spacing-xl);font-size:var(--granite-font-size-micro);color:var(--granite-color-text-weak)}@media (hover:none) and (pointer:coarse){:host.granite-device-output-touch.granite-menu-item-title:active{background:var(--granite-color-background-active-hover);color:var(--granite-color-text-on-active)}}:host-context([dir=ltr]) :host.granite-device-output-touch.granite-menu-item-back-trigger granite-icon,html[dir=ltr] :host.granite-device-output-touch.granite-menu-item-back-trigger granite-icon{left:var(--granite-spacing-xs)}:host-context([dir=rtl]) :host.granite-device-output-touch.granite-menu-item-back-trigger granite-icon,html[dir=rtl] :host.granite-device-output-touch.granite-menu-item-back-trigger granite-icon{right:var(--granite-spacing-xs)}[dir=ltr] :host.granite-device-output-touch.granite-menu-item-back-trigger granite-icon.caret-right,[dir=rtl] :host.granite-device-output-touch.granite-menu-item-back-trigger granite-icon.caret-left{display:none}"]}]}],B.ctorParameters=function(){return[{type:e.ElementRef},{type:l.FocusMonitor},{type:void 0,decorators:[{type:e.Inject,args:[R]},{type:e.Optional}]}]},B.propDecorators={role:[{type:e.Input}]};var q=z(120),G={transformMenuDesktop:g.trigger("transformMenuDesktop",[g.state("void",g.style({opacity:0,transform:"scale(0.9)"})),g.transition("void => enter",g.group([g.query(".granite-menu-content",g.animate(L(100),g.style({opacity:1}))),g.animate(q,g.style({transform:"scale(1)"}))])),g.transition("* => void",g.animate(L(100,25),g.style({opacity:0})))])},X=300,F=z(X),j=L(X),V=L(X,200),H="1ms linear",Y=g.style({transform:"translateX(0) translateY(100%)",opacity:0}),N=g.style({opacity:1,transform:"translateX(0) translateY(0)"}),U=g.style({opacity:0,transform:"translateX(100vw) translateY(0)"}),$=g.style({opacity:1,transform:"translateX(-100vw) translateY(0)"}),K=g.style({transform:"translateX({{ xOffset }}px)"}),W=g.style({transform:"translateX(calc(-100vw + {{ xOffset }}px))"}),Q=g.style({opacity:0,transform:"translateX(0) translateY(0)"}),Z={transformMenuTouch:g.trigger("transformMenuTouch",[g.state("void",U),g.state("enter, enter-from-below",N),g.state("pan-hidden",W,{params:{xOffset:0}}),g.state("pan",K,{params:{xOffset:0}}),g.state("below-with-delay",Y),g.state("hide",$),g.transition("pan => enter, pan => enter-from-below, pan => void, enter <=> hide, enter-from-below <=> hide, pan-hidden => hide, pan-hidden => enter",g.animate(F)),g.transition("void => enter-from-below",g.sequence([g.animate(H,Y),g.animate(F,N)])),g.transition("void => enter",g.sequence([g.animate(H,U),g.animate(F,N)])),g.transition("enter => void",g.animate(F,U)),g.transition("hide => below",g.animate(j,$)),g.transition("hide => below-with-delay",g.sequence([g.animate(H,$),g.animate(V,$)])),g.transition("enter => below, enter-from-below => below",g.sequence([g.animate(H,N),g.animate(j,Y)])),g.transition("enter => below-with-delay, enter-from-below => below-with-delay",g.sequence([g.animate(H,N),g.animate(V,Y)]))]),transformCloseButton:g.trigger("transformCloseButton",[g.state("void, below, below-with-delay",Q),g.state("enter, enter-from-below, pan-hidden, pan, hide",N),g.transition("void => enter-from-below",g.sequence([g.animate(H,Q),g.animate(L(50,150),N)])),g.transition("enter => below, enter-from-below => below",g.sequence([g.animate(H,N),g.animate(L(25),Q)])),g.transition("enter => below-with-delay, enter-from-below => below-with-delay",g.sequence([g.animate(H,N),g.animate(L(50,200),Q)]))])};var J=0,tt={value:"void",params:{xOffset:0}},et=function(){function t(t){this._changeDetectorRef=t,this.closed=new e.EventEmitter,this.panelId="granite-menu-panel-"+J++,this.showBackButton=!1,this.showTitle=!1,this.showCloseButton=!1,this._transformMenu=new i.BehaviorSubject(tt),this._animationDone=new i.Subject,this._directDescendantItems=new e.QueryList,this._tabSubscription=i.Subscription.EMPTY,this._xPosition="after",this._yPosition="below",this.xOffset=0}return Object.defineProperty(t.prototype,"xPosition",{get:function(){return this._xPosition},set:function(t){"before"!==t&&"after"!==t&&function(){throw Error('xPosition value must be either \'before\' or after\'.\n Example: <granite-menu xPosition="before" #menu="graniteMenu"></granite-menu>')}(),this._xPosition=t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"yPosition",{get:function(){return this._yPosition},set:function(t){"above"!==t&&"below"!==t&&function(){throw Error('yPosition value must be either \'above\' or below\'.\n Example: <granite-menu yPosition="above" #menu="graniteMenu"></granite-menu>')}(),this._yPosition=t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"_panelAnimationState",{set:function(t){this._transformMenu.next({value:t,params:{xOffset:this.xOffset}})},enumerable:!1,configurable:!0}),t.prototype.ngAfterContentInit=function(){var t=this;this._updateDirectDescendants(),this._keyManager=new l.FocusKeyManager(this._directDescendantItems).withWrap(),this._tabSubscription=this._keyManager.tabOut.subscribe((function(){t.closed.emit("tab")})),this._directDescendantItems.changes.pipe(o.startWith(this._directDescendantItems),o.switchMap((function(t){return i.merge.apply(void 0,O(t.map((function(t){return t._focused}))))}))).subscribe((function(e){return t._keyManager.updateActiveItem(e)}))},t.prototype.ngOnDestroy=function(){this._directDescendantItems.destroy(),this._tabSubscription.unsubscribe(),this.closed.complete()},t.prototype._hovered=function(){var t=this;return this._directDescendantItems.changes.pipe(o.startWith(this._directDescendantItems),o.filter((function(){var e;return"touch"!==(null===(e=t._clientOutput)||void 0===e?void 0:e.device)})),o.switchMap((function(t){return i.merge.apply(void 0,O(t.map((function(t){return t._hovered}))))})))},t.prototype._handleKeydown=function(t){var e=t.key,n=this._keyManager;switch(e){case"Escape":u.hasModifierKey(t)||(t.preventDefault(),this.closed.emit("keydown"));break;case"ArrowLeft":this.parentMenu&&"ltr"===this.direction&&this.closed.emit("keydown");break;case"ArrowRight":this.parentMenu&&"rtl"===this.direction&&this.closed.emit("keydown");break;case"Home":case"End":u.hasModifierKey(t)||("Home"===e?n.setFirstItemActive():n.setLastItemActive(),t.preventDefault());break;default:"ArrowUp"!==e&&"ArrowDown"!==e||n.setFocusOrigin("keyboard"),n.onKeydown(t)}},t.prototype.focusFirstItem=function(t){void 0===t&&(t="program"),this._keyManager.setFocusOrigin(t).setFirstItemActive()},t.prototype._updateShowTitle=function(){this.showTitle=!!this.title||this.showBackButton},t.prototype._startAnimation=function(){this._panelAnimationState="enter"},t.prototype._resetAnimation=function(){this._panelAnimationState="void"},t.prototype._startTouchCloseDownAnimation=function(){this._panelAnimationState="below"},t.prototype._startTouchCloseDownAnimationWithDelay=function(){this._panelAnimationState="below-with-delay"},t.prototype._startTouchCloseSideAnimation=function(){this._resetAnimation()},t.prototype._startTouchRootEnterAnimation=function(){this._panelAnimationState="enter-from-below",this.xOffset=0},t.prototype._startTouchSubmenuEnterAnimation=function(){this._panelAnimationState="enter",this.xOffset=0},t.prototype._startTouchPanAnimation=function(t){this._panelAnimationState="pan",this.xOffset=t},t.prototype._startTouchHidePanAnimation=function(t){this._panelAnimationState="pan-hidden",this.xOffset=t},t.prototype._startTouchHideAnimation=function(){this._panelAnimationState="hide",this.xOffset=0},t.prototype._onAnimationDone=function(t){this._animationDone.next(t),this._isAnimating=!1},t.prototype._onAnimationStart=function(t){this._isAnimating=!0,"enter"!==t.toState&&"enter-from-below"!==t.toState||0!==this._keyManager.activeItemIndex||(t.element.scrollTop=0)},t.prototype._handleClick=function(){this.closed.emit("click")},t.prototype._handleCloseClick=function(){this.closed.emit()},t.prototype._handleBackClick=function(t){this.showBackButton&&this.closed.emit("keydown"),t.stopPropagation()},t.prototype._setDevice=function(t,e){this._clientInput=t,this._clientOutput=e,this._directDescendantItems.forEach((function(n){n._clientInput=t,n._clientOutput=e})),this._changeDetectorRef.markForCheck()},t.prototype.resetActiveItem=function(){this._keyManager.setActiveItem(-1)},t.prototype._updateDirectDescendants=function(){var t=this;this._allItems.changes.pipe(o.startWith(this._allItems)).subscribe((function(e){t._directDescendantItems.reset(e.filter((function(e){return e._parentMenu===t}))),t._directDescendantItems.notifyOnChanges()}))},t}();et.decorators=[{type:e.Directive}],et.ctorParameters=function(){return[{type:e.ChangeDetectorRef}]},et.propDecorators={xPosition:[{type:e.Input}],yPosition:[{type:e.Input}],title:[{type:e.Input}],closeLabel:[{type:e.Input}],templateRef:[{type:e.ViewChild,args:[e.TemplateRef]}],_allItems:[{type:e.ContentChildren,args:[B,{descendants:!0}]}],closed:[{type:e.Output}]};var nt=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return C(e,t),e}(et);nt.decorators=[{type:e.Component,args:[{selector:"granite-menu",template:'\x3c!--\n Using separate template part for desktop and touch output, because of\n animation triggers and slightly different content.\n--\x3e\n<ng-template>\n \x3c!-- Desktop --\x3e\n <ng-container *ngIf="_clientOutput.device === \'desktop\'">\n <div\n #menu\n class="granite-menu"\n tabindex="-1"\n [id]="panelId"\n [@transformMenuDesktop]="_transformMenu | async"\n (@transformMenuDesktop.start)="_onAnimationStart($event)"\n (@transformMenuDesktop.done)="_onAnimationDone($event)"\n (click)="_handleClick()"\n (keydown)="_handleKeydown($event)"\n >\n <div class="granite-menu-content">\n <ng-container [ngTemplateOutlet]="content"></ng-container>\n </div>\n </div>\n </ng-container>\n\n \x3c!-- Touch --\x3e\n <ng-container *ngIf="_clientOutput?.device === \'touch\'">\n <div\n #menu\n class="granite-menu granite-device-output-touch"\n tabindex="-1"\n [id]="panelId"\n [@transformMenuTouch]="_transformMenu | async"\n (@transformMenuTouch.start)="_onAnimationStart($event)"\n (@transformMenuTouch.done)="_onAnimationDone($event)"\n (click)="_handleClick()"\n (keydown)="_handleKeydown($event)"\n >\n <div class="granite-menu-content">\n <div *ngIf="showTitle" class="header-container">\n <button\n [disabled]="!showBackButton"\n graniteMenuTouchTitleItem\n (click)="_handleBackClick($event)"\n >\n {{ title }}\n </button>\n </div>\n\n <ng-container [ngTemplateOutlet]="content"></ng-container>\n\n <div class="footer-container"></div>\n </div>\n </div>\n\n \x3c!-- Close button --\x3e\n <div class="close" [@transformCloseButton]="_transformMenu | async">\n <button\n *ngIf="showCloseButton"\n graniteMenuTouchCloseItem\n (click)="_handleCloseClick()"\n >\n {{ closeLabel }}\n </button>\n </div>\n </ng-container>\n\n \x3c!--\n Content template shared between desktop and touch parts, as <ng-content>\n can\'t be used in two places in the same template\n --\x3e\n <ng-template #content>\n <ng-content></ng-content>\n </ng-template>\n</ng-template>\n',changeDetection:e.ChangeDetectionStrategy.OnPush,exportAs:"graniteMenu",animations:[G.transformMenuDesktop,Z.transformMenuTouch,Z.transformCloseButton],providers:[{provide:R,useExisting:nt}],styles:[".granite-menu:not(.granite-device-output-touch){background-color:var(--granite-color-background-variant);color:var(--granite-color-text);overflow:auto;-webkit-overflow-scrolling:touch;min-height:var(--granite-spacing-xl);max-height:calc(100vh - var(--granite-spacing-xl));outline:0;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;filter:drop-shadow(0 16px 16px rgba(0,0,0,.08)) drop-shadow(0 4px 20px rgba(0,0,0,.1));min-width:calc(var(--granite-spacing-m) * 7);overflow-x:hidden;overflow-y:hidden}.granite-menu:not(.granite-device-output-touch).ng-animating{pointer-events:none}.granite-menu:not(.granite-device-output-touch):hover{overflow-y:auto}.granite-menu:not(.granite-device-output-touch)::-webkit-scrollbar{width:var(--granite-spacing-xs)}.granite-menu:not(.granite-device-output-touch)::-webkit-scrollbar-thumb{background-color:var(--granite-color-border-hard);border-radius:calc(var(--granite-spacing-m) * .125)}.granite-menu:not(.granite-device-output-touch)::-webkit-scrollbar-track{background-color:var(--granite-color-background-hover)}.granite-menu.granite-device-output-touch{background-color:var(--granite-color-background-variant);color:var(--granite-color-text);overflow:auto;-webkit-overflow-scrolling:touch;min-height:var(--granite-spacing-xl);max-height:calc(100vh - var(--granite-spacing-xl));outline:0;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;filter:drop-shadow(0 16px 16px rgba(0,0,0,.08)) drop-shadow(0 4px 20px rgba(0,0,0,.1));border-radius:calc(var(--granite-radius-m) / 2);-webkit-margin-start:var(--granite-spacing-xs);margin-inline-start:var(--granite-spacing-xs);-webkit-margin-end:var(--granite-spacing-xs);margin-inline-end:var(--granite-spacing-xs);-webkit-margin-after:var(--granite-spacing-xs);margin-block-end:var(--granite-spacing-xs);max-height:calc(100% - var(--granite-spacing-m) * 7)}.granite-menu.granite-device-output-touch.ng-animating{pointer-events:none}.granite-menu.granite-device-output-touch .header-container{position:-webkit-sticky;position:sticky;top:0;background-color:var(--granite-color-background-variant);z-index:1}.granite-menu.granite-device-output-touch .footer-container{position:-webkit-sticky;position:sticky;bottom:0;height:0}.close:not(:empty){background-color:var(--granite-color-background-variant);color:var(--granite-color-text);overflow:auto;-webkit-overflow-scrolling:touch;min-height:var(--granite-spacing-xl);max-height:calc(100vh - var(--granite-spacing-xl));outline:0;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;filter:drop-shadow(0 16px 16px rgba(0,0,0,.08)) drop-shadow(0 4px 20px rgba(0,0,0,.1));border-radius:calc(var(--granite-radius-m) / 2);-webkit-margin-start:var(--granite-spacing-xs);margin-inline-start:var(--granite-spacing-xs);-webkit-margin-end:var(--granite-spacing-xs);margin-inline-end:var(--granite-spacing-xs);-webkit-margin-after:var(--granite-spacing-xs);margin-block-end:var(--granite-spacing-xs)}.close:not(:empty).ng-animating{pointer-events:none}"]}]}];var rt=new e.InjectionToken("GRANITE_CLIENT_INPUT"),it=new e.InjectionToken("GRANITE_CLIENT_OUTPUT"),ot={input:{devices:["mouse","keyboard"]},output:{device:"desktop"}},at={input:{devices:["touch","onscreen-keyboard"]},output:{device:"touch"}},st=p.normalizePassiveListenerOptions({passive:!0}),ct=function(){function t(t,e,n,r,o,a,s,c,l,u){var g=this;this._overlay=t,this._element=e,this._viewContainerRef=n,this._parentMenu=r,this._clientInput=o,this._clientOutput=a,this._menuItemInstance=s,this._dir=c,this._focusMonitor=l,this._isMenuOpen=!1,this._openedBy=null,this._hoverSubscription=i.Subscription.EMPTY,this._menuCloseSubscription=i.Subscription.EMPTY,this._closingActionsSubscription=i.Subscription.EMPTY,this._portal=null,this._overlayRef=null,this._touchTouchingElement=!1,this._handleTouchStart=function(){g._openedBy="touch"},this._handleOverlayTouchStart=function(t){g.menu._isAnimating||(g._touchStartTime=(new Date).getTime(),g._touchStartX=t.changedTouches[0].clientX,g._touchStartY=t.changedTouches[0].clientY,g._touchCurrentX=g._touchStartX,g._touchCurrentY=g._touchStartY,g._touchTranslateX=0,g._touchMaxX=g._overlayRef.hostElement.getBoundingClientRect().width,g._touchLockedX=null,g._touchTouchingElement=!0)},this._handleOverlayTouchMove=function(t){if(g._touchTouchingElement&&!g.menu._isAnimating&&!g._touchLockedX){if(g._touchCurrentX=t.changedTouches[0].clientX,g._touchCurrentY=t.changedTouches[0].clientY,null===g._touchLockedX){var e=Math.abs(g._touchCurrentY-g._touchStartY),n=Math.abs(g._touchCurrentX-g._touchStartX);if(n>10||e>10)return void(g._touchLockedX=e>n)}g._touchTranslateX=g._touchCurrentX-g._touchStartX,g._touchTranslateX<0?g._touchTranslateX=g.easeOutExpo(g._touchTranslateX,0,-8,-4*g._touchMaxX):g._parentMenu?g._touchTranslateX>g._touchMaxX&&(g._touchTranslateX=g.easeOutExpo(g._touchTranslateX-g._touchMaxX,g._touchMaxX,8,4*g._touchMaxX)):g._touchTranslateX=g.easeOutExpo(g._touchTranslateX,0,8,4*g._touchMaxX),g.animateSetMenuPosition(g._touchTranslateX)}},this._handleOverlayTouchEnd=function(){if(g._touchTouchingElement&&!g.menu._isAnimating&&(g._touchTranslateX=g._touchCurrentX-g._touchStartX,0!==g._touchTranslateX)){g._touchTouchingElement=!1,g._touchTimeTaken=(new Date).getTime()-g._touchStartTime;var t=g._touchTranslateX>g._touchMaxX/2,e=g._touchTranslateX>g._touchMaxX/10&&g._touchTimeTaken>50&&g._touchTimeTaken<300;g._parentMenu&&(e||t)?g.menu.closed.emit("keydown"):g.animateOpenMenu()}},e.nativeElement.addEventListener("touchstart",this._handleTouchStart,st),s&&(s._triggersSubmenu=this.triggersSubmenu()),this._document=u}return t.prototype.ngOnChanges=function(t){t.menu&&this._handleMenuChange()},t.prototype.ngAfterContentInit=function(){this._checkMenu(),this._handleHover()},t.prototype.ngOnDestroy=function(){this._overlayRef&&(this.removeOverlayListeners(),this._overlayRef.dispose(),this._overlayRef=null),this._element.nativeElement.removeEventListener("touchstart",this._handleTouchStart,st),this._hoverSubscription.unsubscribe(),this._menuCloseSubscription.unsubscribe(),this._closingActionsSubscription.unsubscribe()},t.prototype._handleMenuChange=function(){var t=this;if(this._menuCloseSubscription.unsubscribe(),this.menu){var e=this.menu.closed;this._menuCloseSubscription=e.subscribe((function(e){if(!t.menu._isClosing){if(t.menu._isClosing=!0,"touch"===t._clientOutput.device)(t.menu._isAnimating?t.menu._animationDone:i.of([null])).pipe(o.take(1),o.delay(0,i.asapScheduler)).subscribe((function(){t.animateCloseMenu("keydown"!==e,"click"===e),t.menu._animationDone.pipe(o.take(1),o.delay(0,i.asapScheduler)).subscribe((function(){return t._destroyMenu()}))}));else t._destroyMenu();"click"!==e&&"tab"!==e||!t._parentMenu||t._parentMenu.closed.emit(e)}}))}},t.prototype.openMenu=function(){var t,e=this;if(!this._isMenuOpen){this._checkMenu(),this.menu.parentMenu=this.triggersSubmenu()?this._parentMenu:void 0,this.menu.direction="rtl"===this._dir.value?"rtl":"ltr",this._parentMenu&&(this._clientInput=this._parentMenu._clientInput,this._clientOutput=this._parentMenu._clientOutput),this.menu._setDevice(this._clientInput,this._clientOutput),"touch"===this._clientOutput.device&&(this.menu.showBackButton=!!this._parentMenu,this.menu._updateShowTitle(),this.menu.closeLabel||(this.menu.closeLabel=null===(t=this._parentMenu)||void 0===t?void 0:t.closeLabel),this.menu.showCloseButton=!!this.menu.closeLabel),this.menu._isClosing=!1;var n=[];"touch"===this._clientOutput.device&&n.push("granite-overlay-pane-fill-width-bottom");var r="touch"!==this._clientOutput.device?this._overlay.scrollStrategies.reposition():void 0,i="touch"===this._clientOutput.device&&!this.triggersSubmenu();if(this._overlayRef)"touch"===this._clientOutput.device&&(this.menu._panelAnimationState="void");else{var o=new s.OverlayConfig({positionStrategy:this._positionStrategy(),backdropClass:"granite-overlay-dark-glass-backdrop",scrollStrategy:r,direction:this._dir,panelClass:n,hasBackdrop:i});this._overlayRef=this._overlay.create(o),"touch"===this._clientOutput.device&&this.addOverlayListeners()}this._portal&&this._portal.templateRef===this.menu.templateRef||(this._portal=new c.TemplatePortal(this.menu.templateRef,this._viewContainerRef)),this._overlayRef.attach(this._portal),this._closingActionsSubscription=this._menuClosingActions().subscribe((function(){return e.closeMenu()})),this.animateOpenMenu(),this._setIsMenuOpen(!0),this.menu.focusFirstItem(this._openedBy||"program")}},t.prototype.triggersSubmenu=function(){return!(!this._menuItemInstance||!this._parentMenu)},t.prototype.toggleMenu=function(){this._isMenuOpen?this.closeMenu():this.openMenu()},t.prototype.closeMenu=function(){this.menu.closed.emit()},t.prototype.focus=function(t,e){void 0===t&&(t="program"),this._focusMonitor?this._focusMonitor.focusVia(this._element,t,e):this._element.nativeElement.focus(e)},t.prototype._destroyMenu=function(){this._overlayRef&&this._isMenuOpen&&(this._closingActionsSubscription.unsubscribe(),this._overlayRef.detach(),this._restoreFocus(),this.menu._resetAnimation(),this._setIsMenuOpen(!1))},t.prototype._handleMousedown=function(t){l.isFakeMousedownFromScreenReader(t)||("touch"!==this._openedBy&&(this._openedBy=0===t.button?"mouse":null),this.triggersSubmenu()&&!this._toggleOnSubmenuClick()&&t.preventDefault())},t.prototype._handleKeydown=function(t){var e=t.key;this.triggersSubmenu()&&("ArrowRight"===e&&"ltr"===this._dir.value||"ArrowLeft"===e&&"rtl"===this._dir.value)&&this.openMenu()},t.prototype._handleClick=function(t){this.triggersSubmenu()?(t.stopPropagation(),this._toggleOnSubmenuClick()?this.toggleMenu():this.openMenu()):this.toggleMenu()},t.prototype._handleHover=function(){var t=this;this.triggersSubmenu()&&this._parentMenu&&(this._hoverSubscription=this._parentMenu._hovered().pipe(o.filter((function(){return t._openOnHover()})),o.filter((function(e){return e===t._menuItemInstance})),o.delay(0,i.asapScheduler)).subscribe((function(){t._openedBy="mouse",t.menu instanceof et&&t.menu._isAnimating?t.menu._animationDone.pipe(o.take(1),o.delay(0,i.asapScheduler),o.takeUntil(t._parentMenu._hovered())).subscribe((function(){return t.openMenu()})):t.openMenu()})))},t.prototype._restoreFocus=function(){this._openedBy?this.triggersSubmenu()||this.focus(this._openedBy):this.focus(),this._openedBy=null},t.prototype._setIsMenuOpen=function(t){this._isMenuOpen=t,this.triggersSubmenu()&&(this._menuItemInstance._highlighted=t&&"touch"!==this._clientOutput.device)},t.prototype._checkMenu=function(){this.menu||
17
17
  /**
18
18
  * @license
19
19
  * Copyright Google LLC All Rights Reserved.
@@ -21,5 +21,5 @@ var x=function(t,e){return(x=Object.setPrototypeOf||{__proto__:[]}instanceof Arr
21
21
  * Use of this source code is governed by an MIT-style license that can be
22
22
  * found in the LICENSE file at https://angular.io/license
23
23
  */
24
- function(){throw Error('graniteMenuTriggerFor: must pass in an granite-menu instance.\n\n Example:\n <granite-menu #menu="graniteMenu"></granite-menu>\n <button [graniteMenuTriggerFor]="menu"></button>')}()},t.prototype._desktopPositionStrategy=function(){var t=this._overlay.position().flexibleConnectedTo(this._element).withLockedPosition().withTransformOriginOn(".granite-menu").withPush(!1);return this._setPosition(t),t},t.prototype._setPosition=function(t){var e=O("before"===this.menu.xPosition?["end","start"]:["start","end"],2),n=e[0],r=e[1],o=O("above"===this.menu.yPosition?["bottom","top"]:["top","bottom"],2),i=o[0],a=o[1],s=O([i,a],2),c=s[0],l=s[1],u=O([n,r],2),g=u[0],d=u[1],h=0;this.triggersSubmenu()?(d=n="before"===this.menu.xPosition?"start":"end",r=g="end"===n?"start":"end",h="bottom"===i?0:-0):(c="top"===i?"bottom":"top",l="top"===a?"bottom":"top"),t.withPositions([{originX:n,originY:c,overlayX:g,overlayY:i,offsetY:h},{originX:r,originY:c,overlayX:d,overlayY:i,offsetY:h},{originX:n,originY:l,overlayX:g,overlayY:a,offsetY:-h},{originX:r,originY:l,overlayX:d,overlayY:a,offsetY:-h}])},t.prototype._menuClosingActions=function(){var t,e=this,n=null===(t=this._overlayRef)||void 0===t?void 0:t.detachments(),r=this._parentMenu?this._parentMenu.closed:o.of(),a="desktop"===this._clientOutput.device&&this._parentMenu?this._parentMenu._hovered().pipe(i.filter((function(t){return t!==e._menuItemInstance})),i.filter((function(){return e._isMenuOpen}))):o.of(),s=this._parentMenu?o.of():o.fromEvent(this._document,"click").pipe(i.filter((function(t){return t.target!==e._element.nativeElement&&null===t.target.closest(".granite-menu")})),i.filter((function(){return!e.menu._isAnimating})));return o.merge(n,a,r,s)},t.prototype._openOnHover=function(){var t,e;return"desktop"===(null===(t=this._parentMenu._clientOutput)||void 0===t?void 0:t.device)&&(null===(e=this._parentMenu._clientInput)||void 0===e?void 0:e.devices.includes("mouse"))},t.prototype._toggleOnSubmenuClick=function(){var t,e;return"desktop"===(null===(t=this._parentMenu._clientOutput)||void 0===t?void 0:t.device)&&!(null===(e=this._parentMenu._clientInput)||void 0===e?void 0:e.devices.includes("mouse"))},t.prototype.animateOpenMenu=function(){"touch"===this._clientOutput.device?this.animateTouchOpenMenu():this.menu._startAnimation()},t.prototype.animateTouchOpenMenu=function(){this.triggersSubmenu()?(this.menu._startTouchSubmenuEnterAnimation(),this._parentMenu._startTouchHideAnimation()):this.menu._startTouchRootEnterAnimation()},t.prototype.animateCloseMenu=function(t,e){"touch"===this._clientOutput.device?this._animateTouchCloseMenu(t,e):this._parentMenu._resetAnimation()},t.prototype._animateTouchCloseMenu=function(t,e){var n;t?e?this.menu._startTouchCloseDownAnimationWithDelay():this.menu._startTouchCloseDownAnimation():(this.menu._startTouchCloseSideAnimation(),null===(n=this._parentMenu)||void 0===n||n._startTouchSubmenuEnterAnimation())},t.prototype.animateSetMenuPosition=function(t){this.menu._startTouchPanAnimation(t),this._parentMenu&&this._parentMenu._startTouchHidePanAnimation(t)},t.prototype._positionStrategy=function(){return"touch"===this._clientOutput.device?this._touchPositionStrategy():this._desktopPositionStrategy()},t.prototype._touchPositionStrategy=function(){return this._overlay.position().global()},t.prototype.addOverlayListeners=function(){this._overlayRef.hostElement.addEventListener("touchstart",this._handleOverlayTouchStart,st),this._overlayRef.hostElement.addEventListener("touchmove",this._handleOverlayTouchMove,st),this._overlayRef.hostElement.addEventListener("touchend",this._handleOverlayTouchEnd,st)},t.prototype.removeOverlayListeners=function(){this._overlayRef.hostElement.removeEventListener("touchstart",this._handleOverlayTouchStart,st),this._overlayRef.hostElement.removeEventListener("touchmove",this._handleOverlayTouchMove,st),this._overlayRef.hostElement.removeEventListener("touchend",this._handleOverlayTouchEnd,st)},t.prototype.easeOutExpo=function(t,e,n,r){return t===r?e+n:n*(1-Math.pow(2,-10*t/r))+e},t}();ct.decorators=[{type:e.Directive,args:[{selector:"[graniteMenuTriggerFor]",host:{class:"granite-menu-trigger","aria-haspopup":"true","[attr.aria-expanded]":"_isMenuOpen || null","[attr.aria-controls]":"_isMenuOpen ? menu.panelId : null","(mousedown)":"_handleMousedown($event)","(keydown)":"_handleKeydown($event)","(click)":"_handleClick($event)"}}]}],ct.ctorParameters=function(){return[{type:s.Overlay},{type:e.ElementRef},{type:e.ViewContainerRef},{type:et,decorators:[{type:e.Inject,args:[R]},{type:e.Optional}]},{type:void 0,decorators:[{type:e.Inject,args:[rt]},{type:e.Optional}]},{type:void 0,decorators:[{type:e.Inject,args:[ot]},{type:e.Optional}]},{type:B,decorators:[{type:e.Optional},{type:e.Self}]},{type:d.Directionality,decorators:[{type:e.Optional}]},{type:l.FocusMonitor},{type:void 0,decorators:[{type:e.Inject,args:[n.DOCUMENT]}]}]},ct.propDecorators={menu:[{type:e.Input,args:["graniteMenuTriggerFor"]}]};var lt=function(){};lt.decorators=[{type:e.Component,args:[{selector:"[graniteMenuTouchCloseItem]",template:"<ng-content></ng-content>",exportAs:"graniteMenuTouchCloseItem",host:{"[class.granite-device-output-touch]":"true"},styles:[":host{display:block;position:relative;line-height:var(--granite-spacing-xl);height:var(--granite-spacing-xl);padding:0 var(--granite-spacing-s);width:100%;max-width:100%;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:pointer;outline:none;border:none;-webkit-tap-highlight-color:transparent;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;text-align:start;text-decoration:none;background-color:var(--granite-color-background-variant);color:var(--granite-color-text);font-size:var(--granite-font-size-body-small);font-family:inherit}@media (hover:hover) and (pointer:fine){:host:hover{background:var(--granite-color-background-active-hover);color:var(--granite-color-text-on-active)}}@media (hover:none) and (pointer:coarse){:host:active{background:var(--granite-color-background-active-hover);color:var(--granite-color-text-on-active)}}:host.cdk-keyboard-focused,:host.cdk-program-focused,:host.granite-menu-item-highlighted{background:var(--granite-color-background-active-hover);color:var(--granite-color-text-on-active)}:host granite-icon{position:absolute;font-size:var(--granite-font-size-body-small);color:inherit;top:50%;transform:translateY(-50%)}:host.granite-menu-item-submenu-trigger{-webkit-padding-end:var(--granite-spacing-l);padding-inline-end:var(--granite-spacing-l)}:host-context([dir=ltr]) :host.granite-menu-item-submenu-trigger granite-icon,html[dir=ltr] :host.granite-menu-item-submenu-trigger granite-icon{right:var(--granite-spacing-xs)}:host-context([dir=rtl]) :host.granite-menu-item-submenu-trigger granite-icon,html[dir=rtl] :host.granite-menu-item-submenu-trigger granite-icon{left:var(--granite-spacing-xs)}[dir=ltr] :host.granite-menu-item-submenu-trigger granite-icon.caret-left,[dir=rtl] :host.granite-menu-item-submenu-trigger granite-icon.caret-right{display:none}:host.granite-divider-top{border-top:var(--granite-border-width-regular) solid var(--granite-color-border-soft)}:host.granite-divider-bottom{border-bottom:var(--granite-border-width-regular) solid var(--granite-color-border-soft)}:host.granite-device-output-touch{height:var(--granite-spacing-xl);line-height:var(--granite-spacing-xl);font-size:var(--granite-font-size-body-small);text-align:center}:host.granite-device-output-touch,:host.granite-device-output-touch.granite-menu-item-back-trigger,:host.granite-device-output-touch.granite-menu-item-submenu-trigger{padding:0 var(--granite-spacing-l)}:host.granite-device-output-touch.granite-menu-item-title{line-height:var(--granite-spacing-xl);height:var(--granite-spacing-xl);font-size:var(--granite-font-size-micro);color:var(--granite-color-text-weak)}@media (hover:none) and (pointer:coarse){:host.granite-device-output-touch.granite-menu-item-title:active{background:var(--granite-color-background-active-hover);color:var(--granite-color-text-on-active)}}:host-context([dir=ltr]) :host.granite-device-output-touch.granite-menu-item-back-trigger granite-icon,html[dir=ltr] :host.granite-device-output-touch.granite-menu-item-back-trigger granite-icon{left:var(--granite-spacing-xs)}:host-context([dir=rtl]) :host.granite-device-output-touch.granite-menu-item-back-trigger granite-icon,html[dir=rtl] :host.granite-device-output-touch.granite-menu-item-back-trigger granite-icon{right:var(--granite-spacing-xs)}[dir=ltr] :host.granite-device-output-touch.granite-menu-item-back-trigger granite-icon.caret-right,[dir=rtl] :host.granite-device-output-touch.granite-menu-item-back-trigger granite-icon.caret-left{display:none}"]}]}];var ut=function(t){this._triggersBack=!1,this._triggersBack=!!t.parentMenu};ut.decorators=[{type:e.Component,args:[{selector:"[graniteMenuTouchTitleItem]",template:'\n <ng-container *ngIf="_triggersBack">\n <granite-icon class="caret-left">caret-left</granite-icon>\n <granite-icon class="caret-right">caret-right</granite-icon>\n </ng-container>\n <ng-content></ng-content>\n ',exportAs:"graniteMenuTouchTitleItem",host:{"[class.granite-menu-item-title]":"true","[class.granite-menu-item-back-trigger]":"_triggersBack","[class.granite-device-output-touch]":"true"},styles:[":host{display:block;position:relative;line-height:var(--granite-spacing-xl);height:var(--granite-spacing-xl);padding:0 var(--granite-spacing-s);width:100%;max-width:100%;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:pointer;outline:none;border:none;-webkit-tap-highlight-color:transparent;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;text-align:start;text-decoration:none;background-color:var(--granite-color-background-variant);color:var(--granite-color-text);font-size:var(--granite-font-size-body-small);font-family:inherit}@media (hover:hover) and (pointer:fine){:host:hover{background:var(--granite-color-background-active-hover);color:var(--granite-color-text-on-active)}}@media (hover:none) and (pointer:coarse){:host:active{background:var(--granite-color-background-active-hover);color:var(--granite-color-text-on-active)}}:host.cdk-keyboard-focused,:host.cdk-program-focused,:host.granite-menu-item-highlighted{background:var(--granite-color-background-active-hover);color:var(--granite-color-text-on-active)}:host granite-icon{position:absolute;font-size:var(--granite-font-size-body-small);color:inherit;top:50%;transform:translateY(-50%)}:host.granite-menu-item-submenu-trigger{-webkit-padding-end:var(--granite-spacing-l);padding-inline-end:var(--granite-spacing-l)}:host-context([dir=ltr]) :host.granite-menu-item-submenu-trigger granite-icon,html[dir=ltr] :host.granite-menu-item-submenu-trigger granite-icon{right:var(--granite-spacing-xs)}:host-context([dir=rtl]) :host.granite-menu-item-submenu-trigger granite-icon,html[dir=rtl] :host.granite-menu-item-submenu-trigger granite-icon{left:var(--granite-spacing-xs)}[dir=ltr] :host.granite-menu-item-submenu-trigger granite-icon.caret-left,[dir=rtl] :host.granite-menu-item-submenu-trigger granite-icon.caret-right{display:none}:host.granite-divider-top{border-top:var(--granite-border-width-regular) solid var(--granite-color-border-soft)}:host.granite-divider-bottom{border-bottom:var(--granite-border-width-regular) solid var(--granite-color-border-soft)}:host.granite-device-output-touch{height:var(--granite-spacing-xl);line-height:var(--granite-spacing-xl);font-size:var(--granite-font-size-body-small);text-align:center}:host.granite-device-output-touch,:host.granite-device-output-touch.granite-menu-item-back-trigger,:host.granite-device-output-touch.granite-menu-item-submenu-trigger{padding:0 var(--granite-spacing-l)}:host.granite-device-output-touch.granite-menu-item-title{line-height:var(--granite-spacing-xl);height:var(--granite-spacing-xl);font-size:var(--granite-font-size-micro);color:var(--granite-color-text-weak)}@media (hover:none) and (pointer:coarse){:host.granite-device-output-touch.granite-menu-item-title:active{background:var(--granite-color-background-active-hover);color:var(--granite-color-text-on-active)}}:host-context([dir=ltr]) :host.granite-device-output-touch.granite-menu-item-back-trigger granite-icon,html[dir=ltr] :host.granite-device-output-touch.granite-menu-item-back-trigger granite-icon{left:var(--granite-spacing-xs)}:host-context([dir=rtl]) :host.granite-device-output-touch.granite-menu-item-back-trigger granite-icon,html[dir=rtl] :host.granite-device-output-touch.granite-menu-item-back-trigger granite-icon{right:var(--granite-spacing-xs)}[dir=ltr] :host.granite-device-output-touch.granite-menu-item-back-trigger granite-icon.caret-right,[dir=rtl] :host.granite-device-output-touch.granite-menu-item-back-trigger granite-icon.caret-left{display:none}"]}]}],ut.ctorParameters=function(){return[{type:et,decorators:[{type:e.Inject,args:[R]},{type:e.Optional}]}]};var gt=function(){this.dividerDirection="top"};gt.decorators=[{type:e.Directive,args:[{selector:"[graniteDivider]",exportAs:"graniteDivider",host:{"[class.granite-divider-top]":'dividerDirection === "top"',"[class.granite-divider-bottom]":'dividerDirection === "bottom"'}}]}],gt.propDecorators={dividerDirection:[{type:e.Input}]};var dt=function(){function t(t,e,n){this._elementRef=t,this.renderer=e,n||this.renderer.setAttribute(t.nativeElement,"aria-hidden","true")}return t.prototype.ngOnChanges=function(t){t.fontIcon&&this._updateFontIcon()},t.prototype._updateFontIcon=function(){this.fontIcon!==this._previousFontIconClass&&(this._previousFontIconClass&&this.renderer.removeClass(this._elementRef.nativeElement,this._previousFontIconClass),this.fontIcon&&this.renderer.addClass(this._elementRef.nativeElement,this.fontIcon),this._previousFontIconClass=this.fontIcon)},t}();dt.decorators=[{type:e.Component,args:[{selector:"granite-icon",template:"<ng-content></ng-content>",host:{role:"img",class:"granite-icon"},changeDetection:e.ChangeDetectionStrategy.OnPush,styles:[":host.granite-icon{background-repeat:no-repeat;display:inline-block;padding:0 calc(var(--granite-spacing-xs) / 2);font-size:1em;line-height:1em;position:relative;top:.1em}"]}]}],dt.ctorParameters=function(){return[{type:e.ElementRef},{type:e.Renderer2},{type:String,decorators:[{type:e.Attribute,args:["aria-hidden"]}]}]},dt.propDecorators={fontIcon:[{type:e.Input}]};var ht=function(){};ht.decorators=[{type:e.NgModule,args:[{declarations:[dt],exports:[dt]}]}];var pt=function(){};pt.decorators=[{type:e.NgModule,args:[{declarations:[nt,B,ct,lt,ut,gt],imports:[n.CommonModule,s.OverlayModule,c.PortalModule,ht],exports:[nt,B,ct,lt,ut,gt]}]}];var mt=function(t){function e(){var e=t.apply(this,T(arguments))||this;return e._documentRootLocator=e.documentRootLocatorFactory(),e}return C(e,t),e.with=function(t){return void 0===t&&(t={}),new a.HarnessPredicate(e,t).addOption("text",t.text,(function(t,e){return a.HarnessPredicate.stringMatches(t.getText(),e)}))},e.prototype.getText=function(){return M(this,void 0,void 0,(function(){return I(this,(function(t){switch(t.label){case 0:return[4,this.host()];case 1:return[2,t.sent().text()]}}))}))},e.prototype.open=function(){return M(this,void 0,void 0,(function(){return I(this,(function(t){switch(t.label){case 0:return[4,this.isOpen()];case 1:return t.sent()?[3,4]:[4,this.host()];case 2:return[4,t.sent().click()];case 3:return t.sent(),[2,this.forceStabilize()];case 4:return[2]}}))}))},e.prototype.close=function(){var t;return M(this,void 0,void 0,(function(){return I(this,(function(e){switch(e.label){case 0:return[4,this._getMenuPanel()];case 1:return[4,null===(t=e.sent())||void 0===t?void 0:t.sendKeys(a.TestKey.ESCAPE)];case 2:return e.sent(),[2,this.forceStabilize()]}}))}))},e.prototype.isOpen=function(){return M(this,void 0,void 0,(function(){return I(this,(function(t){switch(t.label){case 0:return[4,this._getMenuPanel()];case 1:return[2,!!t.sent()]}}))}))},e.prototype.getItems=function(t){return void 0===t&&(t={}),M(this,void 0,void 0,(function(){var e;return I(this,(function(n){switch(n.label){case 0:return[4,this._getPanelId()];case 1:return(e=n.sent())?[2,this._documentRootLocator.locatorForAll(bt.with(Object.assign(Object.assign({},t),{ancestor:"#"+e})))()]:[2,[]]}}))}))},e.prototype._getMenuPanel=function(){return M(this,void 0,void 0,(function(){var t;return I(this,(function(e){switch(e.label){case 0:return[4,this._getPanelId()];case 1:return[2,(t=e.sent())?this._documentRootLocator.locatorForOptional("#"+t)():null]}}))}))},e.prototype._getPanelId=function(){return M(this,void 0,void 0,(function(){return I(this,(function(t){switch(t.label){case 0:return[4,this.host()];case 1:return[4,t.sent().getAttribute("aria-controls")];case 2:return[2,t.sent()||null]}}))}))},e}(a.ComponentHarness);mt.hostSelector=".granite-menu-trigger";var bt=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return C(e,t),e.with=function(t){return void 0===t&&(t={}),new a.HarnessPredicate(e,t).addOption("text",t.text,(function(t,e){return a.HarnessPredicate.stringMatches(t.getText(),e)}))},e.prototype.getText=function(){return M(this,void 0,void 0,(function(){return I(this,(function(t){switch(t.label){case 0:return[4,this.host()];case 1:return[2,t.sent().text()]}}))}))},e.prototype.hasSubmenu=function(){return M(this,void 0,void 0,(function(){return I(this,(function(t){switch(t.label){case 0:return[4,this.host()];case 1:return[2,t.sent().matchesSelector(mt.hostSelector)]}}))}))},e.prototype.getSubmenu=function(){return M(this,void 0,void 0,(function(){return I(this,(function(t){switch(t.label){case 0:return[4,this.hasSubmenu()];case 1:return t.sent()?[2,new mt(this.locatorFactory)]:[2,null]}}))}))},e.prototype.click=function(){return M(this,void 0,void 0,(function(){return I(this,(function(t){switch(t.label){case 0:return[4,this.host()];case 1:return[4,t.sent().click()];case 2:return t.sent(),[2,this.forceStabilize()]}}))}))},e}(a.ComponentHarness);bt.hostSelector=".granite-menu-item";var vt=function(){function t(t){this._focusMonitor=t,this.id=null,this.checked=!1,this.disabled=!1,this.readonly=!1,this.labelPosition="after",this.ariaLabel=null,this.ariaLabelledby=null,this.valueChange=new e.EventEmitter,this.toggleChange=new e.EventEmitter,this.toggleBlur=new e.EventEmitter,this._positionBefore=!1,this._toggleSwitchDisabled=!1}return t.prototype.ngOnChanges=function(t){t.checked&&(this.checked=r.coerceBooleanProperty(t.checked.currentValue)),t.disabled&&(this.disabled=r.coerceBooleanProperty(t.disabled.currentValue)),t.readonly&&(this.readonly=r.coerceBooleanProperty(t.readonly.currentValue)),null!=t.labelPosition&&(this._positionBefore=null!=t.labelPosition.currentValue&&"before"===t.labelPosition.currentValue),(t.disabled||t.readonly)&&(this.disabled||this.readonly)&&(this._toggleSwitchDisabled=!0)},t.prototype.focus=function(t,e){void 0===t&&(t="program"),this._focusMonitor.focusVia(this._getInputElement(),t,e)},t.prototype._onBlur=function(){this.toggleBlur.emit()},t.prototype._toggleSwitchChange=function(){this.checked=this._getInputElement().checked,this.valueChange.emit(this.checked)},t.prototype._toggleSwitchClick=function(){this.toggleChange.emit()},t.prototype._getInputElement=function(){return this._inputElement.nativeElement},t}();vt.decorators=[{type:e.Component,args:[{selector:"granite-toggle-switch",exportAs:"graniteToggleSwitch",host:{class:"granite-toggle-switch","[class.granite-toggle-switch-checked]":"checked","[class.granite-toggle-switch-disabled]":"disabled","[class.granite-toggle-switch-readonly]":"readonly","[class.granite-toggle-switch-label-before]":"_positionBefore"},template:'<label [attr.for]="id" class="granite-toggle-switch-label">\n <div class="granite-toggle-switch-bar">\n <input\n #input\n [id]="id"\n class="granite-toggle-switch-input cdk-visually-hidden"\n role="switch"\n type="checkbox"\n [attr.aria-checked]="checked.toString()"\n [attr.aria-label]="ariaLabel"\n [attr.aria-labelledby]="ariaLabelledby"\n [checked]="checked"\n [disabled]="_toggleSwitchDisabled"\n [readonly]="readonly"\n (click)="_toggleSwitchClick()"\n (change)="_toggleSwitchChange()"\n (blur)="_onBlur()"\n />\n <div class="granite-toggle-switch-thumb"></div>\n </div>\n <span class="granite-toggle-switch-text"><ng-content></ng-content></span>\n</label>\n',changeDetection:e.ChangeDetectionStrategy.OnPush,styles:[".cdk-visually-hidden{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;white-space:nowrap;outline:0;-webkit-appearance:none;-moz-appearance:none}:host{box-sizing:border-box}:host *,:host :after,:host :before{box-sizing:inherit;cursor:pointer}:host(.granite-toggle-switch){color:var(--granite-color-text)}:host(.granite-toggle-switch-checked) .granite-toggle-switch-bar{background-color:var(--granite-color-background-active)}:host(.granite-toggle-switch-checked) .granite-toggle-switch-thumb{border:.0625rem solid var(--granite-color-background-active)}:host-context([dir=ltr]) :host(.granite-toggle-switch-checked) .granite-toggle-switch-thumb,html[dir=ltr] :host(.granite-toggle-switch-checked) .granite-toggle-switch-thumb{float:right}:host-context([dir=rtl]) :host(.granite-toggle-switch-checked) .granite-toggle-switch-thumb,html[dir=rtl] :host(.granite-toggle-switch-checked) .granite-toggle-switch-thumb{float:left}:host(.granite-toggle-switch-disabled) .granite-toggle-switch-label{opacity:.6}:host(.granite-toggle-switch-disabled) *,:host(.granite-toggle-switch-readonly) *{cursor:default}:host(.granite-toggle-switch-label-before) .granite-toggle-switch-label{flex-direction:row-reverse}:host(.granite-toggle-switch-label-before) .granite-toggle-switch-text{-webkit-padding-start:0;padding-inline-start:0;-webkit-padding-end:var(--granite-spacing-s);padding-inline-end:var(--granite-spacing-s)}.granite-toggle-switch-label{display:flex;align-items:center;width:-webkit-max-content;width:-moz-max-content;width:max-content}.granite-toggle-switch-bar{width:var(--granite-spacing-xl);height:var(--granite-spacing-m);border-radius:var(--granite-spacing-s);background-color:var(--granite-color-background-inactive);transition:background-color .1s linear;position:relative}.granite-toggle-switch-bar:focus-within{box-shadow:0 0 0 .0625rem var(--granite-color-focus)}.granite-toggle-switch-thumb{width:var(--granite-spacing-m);height:var(--granite-spacing-m);border-radius:var(--granite-spacing-m);background-color:var(--granite-color-text-static-light);border:.0625rem solid var(--granite-color-background-inactive);transition:float .1s linear}:host-context([dir=ltr]) .granite-toggle-switch-thumb,html[dir=ltr] .granite-toggle-switch-thumb{float:left}:host-context([dir=rtl]) .granite-toggle-switch-thumb,html[dir=rtl] .granite-toggle-switch-thumb{float:right}.granite-toggle-switch-text{-webkit-padding-start:var(--granite-spacing-s);padding-inline-start:var(--granite-spacing-s)}.granite-toggle-switch-text:empty{display:none}"]}]}],vt.ctorParameters=function(){return[{type:l.FocusMonitor}]},vt.propDecorators={id:[{type:e.Input}],checked:[{type:e.Input}],disabled:[{type:e.Input}],readonly:[{type:e.Input}],labelPosition:[{type:e.Input}],ariaLabel:[{type:e.Input,args:["aria-label"]}],ariaLabelledby:[{type:e.Input,args:["aria-labelledby"]}],valueChange:[{type:e.Output}],toggleChange:[{type:e.Output}],toggleBlur:[{type:e.Output}],_inputElement:[{type:e.ViewChild,args:["input"]}]};var ft=function(){};ft.decorators=[{type:e.NgModule,args:[{declarations:[vt],exports:[vt]}]}];var yt=function(){function t(t,n){var r=this;this._focusMonitor=t,this._radioDispatcher=n,this.id=null,this.checked=!1,this.required=!1,this.disabled=!1,this.readonly=!1,this.labelPosition="after",this.ariaLabel=null,this.ariaLabelledby=null,this.radioChange=new e.EventEmitter,this.radioBlur=new e.EventEmitter,this._positionBefore=!1,this._radioDisabled=!1,this._removeUniqueSelectionListener=function(){},this._removeUniqueSelectionListener=n.listen((function(t,e){t!==r.id&&e===r.name&&(r.checked=!1)}))}return t.prototype.ngOnChanges=function(t){t.checked&&(this.checked=r.coerceBooleanProperty(t.checked.currentValue)),t.required&&(this.required=r.coerceBooleanProperty(t.required.currentValue)),t.readonly&&(this.readonly=r.coerceBooleanProperty(t.readonly.currentValue)),t.disabled&&(this.disabled=r.coerceBooleanProperty(t.disabled.currentValue)),null!=t.labelPosition&&(this._positionBefore=null!=t.labelPosition.currentValue&&"before"===t.labelPosition.currentValue),(t.disabled||t.readonly)&&(this.disabled||this.readonly)&&(this._radioDisabled=!0)},t.prototype.ngOnDestroy=function(){this._removeUniqueSelectionListener()},t.prototype.focus=function(t,e){void 0===t&&(t="program"),this._focusMonitor.focusVia(this._getInputElement(),t,e)},t.prototype._radioClick=function(t){this.radioChange.emit(t)},t.prototype._radioChange=function(){this.checked=this._getInputElement().checked,this._radioDispatcher.notify(this.id,this.name)},t.prototype._onBlur=function(){this.radioBlur.emit()},t.prototype._getInputElement=function(){return this._inputElement.nativeElement},t}();yt.decorators=[{type:e.Component,args:[{selector:"granite-radio-button",exportAs:"graniteRadioButton",host:{class:"granite-radio-button","[class.granite-radio-button-disabled]":"disabled","[class.granite-radio-button-label-before]":"_positionBefore","[class.granite-radio-button-checked]":"checked","[class.granite-radio-button-readonly]":"readonly"},template:'<label class="granite-radio-button-label">\n <div class="granite-radio-button-outer-circle">\n <input\n #input\n [id]="id"\n class="granite-radio-button-input cdk-visually-hidden"\n type="radio"\n [attr.name]="name"\n [disabled]="_radioDisabled"\n [checked]="checked"\n [readonly]="readonly"\n [required]="required"\n [attr.aria-label]="ariaLabel"\n [attr.aria-labelledby]="ariaLabelledby"\n [attr.aria-checked]="checked.toString()"\n [value]="value"\n (click)="_radioClick($event.target.value)"\n (change)="_radioChange()"\n (blur)="_onBlur()"\n />\n <div class="granite-radio-button-inner-circle"></div>\n </div>\n <span class="granite-radio-button-text">\n <ng-content></ng-content>\n </span>\n</label>\n',styles:[".cdk-visually-hidden{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;white-space:nowrap;outline:0;-webkit-appearance:none;-moz-appearance:none}:host(.granite-radio-button):not(.granite-radio-button-readonly):not(.granite-radio-button-disabled) .granite-radio-button-label:hover{cursor:pointer}:host(.granite-radio-button):not(.granite-radio-button-readonly):not(.granite-radio-button-disabled) .granite-radio-button-label:hover .granite-radio-button-outer-circle{border-color:var(--granite-color-background-active-hover)}:host(.granite-radio-button):not(.granite-radio-button-readonly):not(.granite-radio-button-disabled) .granite-radio-button-label:hover .granite-radio-button-inner-circle{background-color:var(--granite-color-background-active-hover)}:host(.granite-radio-button):not(.granite-radio-button-readonly):not(.granite-radio-button-disabled) .granite-radio-button-outer-circle:focus-within{border:1px solid var(--granite-color-focus)}:host(.granite-radio-button-label-before) .granite-radio-button-label{flex-direction:row-reverse}:host(.granite-radio-button-label-before) .granite-radio-button-text{-webkit-padding-start:0;padding-inline-start:0;-webkit-padding-end:var(--granite-spacing-s);padding-inline-end:var(--granite-spacing-s)}:host(.granite-radio-button-checked) .granite-radio-button-inner-circle{visibility:visible;-webkit-animation:growAnimation .1s;animation:growAnimation .1s}:host(.granite-radio-button-checked) .granite-radio-button-outer-circle{border-color:var(--granite-color-background-active)}:host(.granite-radio-button-checked).granite-radio-button-disabled .granite-radio-button-inner-circle{background-color:var(--granite-color-text)}:host(.granite-radio-button-checked).granite-radio-button-disabled .granite-radio-button-outer-circle{border:1px solid var(--granite-color-text);background-color:transparent}:host(.granite-radio-button-checked).granite-radio-button-readonly .granite-radio-button-inner-circle{background-color:var(--granite-color-text)}:host(.granite-radio-button-checked).granite-radio-button-readonly .granite-radio-button-outer-circle{border:1px solid var(--granite-color-text)}.granite-radio-button-text{-webkit-padding-start:var(--granite-spacing-s);padding-inline-start:var(--granite-spacing-s);color:var(--granite-color-text)}.granite-radio-button-text:empty{display:none}.granite-radio-button-label{display:flex;align-items:center;width:-webkit-max-content;width:-moz-max-content;width:max-content;-webkit-margin-end:var(--granite-spacing-xl);margin-inline-end:var(--granite-spacing-xl)}:host(.granite-radio-button-disabled) .granite-radio-button-text{opacity:.6}:host(.granite-radio-button-disabled) .granite-radio-button-outer-circle{opacity:.3;background-color:var(--granite-color-border-soft)}.granite-radio-button-outer-circle{height:var(--granite-spacing-m);width:var(--granite-spacing-m);border-radius:50%;box-sizing:border-box;border:1px solid var(--granite-color-border-hard);display:flex;justify-content:center;position:relative;align-items:center}.granite-radio-button-inner-circle{width:calc(var(--granite-spacing-s) * 1.25);height:calc(var(--granite-spacing-s) * 1.25);visibility:hidden;position:absolute;border-radius:50%;background-color:var(--granite-color-background-active);margin:auto}@-webkit-keyframes growAnimation{0%{transform:scale(0)}to{transform:scale(1)}}@keyframes growAnimation{0%{transform:scale(0)}to{transform:scale(1)}}"]}]}],yt.ctorParameters=function(){return[{type:l.FocusMonitor},{type:p.UniqueSelectionDispatcher}]},yt.propDecorators={value:[{type:e.Input}],id:[{type:e.Input}],name:[{type:e.Input}],checked:[{type:e.Input}],required:[{type:e.Input}],disabled:[{type:e.Input}],readonly:[{type:e.Input}],labelPosition:[{type:e.Input}],ariaLabel:[{type:e.Input,args:["aria-label"]}],ariaLabelledby:[{type:e.Input,args:["aria-labelledby"]}],radioChange:[{type:e.Output}],radioBlur:[{type:e.Output}],_inputElement:[{type:e.ViewChild,args:["input"]}]};var _t=function(){};_t.decorators=[{type:e.NgModule,args:[{declarations:[yt],exports:[yt]}]}];var kt,wt=function(t){void 0===t&&(t=function(){});var n=function(t){function e(){var e=t.apply(this,T(arguments))||this;return e.disabled=!1,e}return C(e,t),e.prototype.ngOnChanges=function(t){t.disabled&&(this.disabled=r.coerceBooleanProperty(t.disabled.currentValue))},e}(t);return n.decorators=[{type:e.Directive}],n.propDecorators={disabled:[{type:e.Input}]},n};!function(t){t.graniteButton="granite-button",t.granitePrimaryButton="granite-primary-button",t.graniteFlatButton="granite-flat-button"}(kt||(kt={}));var xt=function(t){function e(e,n){var r,o,i=t.call(this)||this;i._focusMonitor=e,i._elementRef=n;try{for(var a=S(Object.keys(kt)),s=a.next();!s.done;s=a.next()){var c=s.value;i._getHostElement().hasAttribute(c)&&i._getHostElement().classList.add(kt[c])}}catch(t){r={error:t}}finally{try{s&&!s.done&&(o=a.return)&&o.call(a)}finally{if(r)throw r.error}}return i}return C(e,t),e.prototype.ngOnChanges=function(e){t.prototype.ngOnChanges.call(this,e)},e.prototype.focus=function(t,e){void 0===t&&(t="program"),this._focusMonitor.focusVia(this._getHostElement(),t,e)},e.prototype._getHostElement=function(){return this._elementRef.nativeElement},e}(wt());xt.decorators=[{type:e.Component,args:[{selector:"button[graniteButton],\n button[granitePrimaryButton],\n button[graniteFlatButton]\n ",host:{class:"granite-button-base","[class.granite-button-disabled]":"disabled","[attr.disabled]":"disabled || null"},exportAs:"graniteButton",template:"<ng-content></ng-content>",inputs:["disabled"],changeDetection:e.ChangeDetectionStrategy.OnPush,styles:[":host{box-sizing:border-box}:host *,:host :after,:host :before{box-sizing:inherit;cursor:pointer}button:host{background-color:inherit;-webkit-appearance:none;-moz-appearance:none;appearance:none;border:none;font:inherit;border-radius:inherit;height:inherit;font-weight:inherit;line-height:inherit;color:inherit;margin:inherit;cursor:pointer;padding:inherit}a:host,button:host{outline:none}:host.granite-button-base{height:var(--granite-spacing-xl);border-radius:var(--granite-spacing-xs);font-size:var(--granite-font-size-body-small);font-weight:var(--granite-font-weight-regular);padding:var(--granite-spacing-s) var(--granite-spacing-s);position:relative;line-height:var(--granite-line-height-regular);display:flex;justify-content:center;align-items:center;width:-webkit-fit-content;width:-moz-fit-content;width:fit-content}:host:focus:not(.granite-button-disabled):not(:active){border:1px solid var(--granite-color-focus)}button:host.granite-primary-button{background-color:var(--granite-color-background-active);color:var(--granite-color-text-on-active);border:1px solid transparent}button:host.granite-primary-button:hover:not(.granite-button-disabled){background-color:var(--granite-color-background-active-hover);color:none}button:host.granite-primary-button:active:not(.granite-button-disabled){background-color:var(--granite-color-background-active-selected);color:none}button:host.granite-button{background-color:var(--granite-color-background-variant);color:var(--granite-color-text);border:1px solid var(--granite-color-border-soft)}button:host.granite-button:hover:not(.granite-button-disabled){background-color:var(--granite-color-background-active-hover);color:var(--granite-color-text-on-active)}button:host.granite-button:active:not(.granite-button-disabled){background-color:var(--granite-color-background-active-selected);color:var(--granite-color-text-on-active)}button:host.granite-flat-button{background-color:transparent;color:var(--granite-color-text);border:1px solid transparent}button:host.granite-flat-button:hover:not(.granite-button-disabled){background-color:var(--granite-color-background-hover);color:var(--granite-color-text)}button:host.granite-flat-button:active:not(.granite-button-disabled){background-color:var(--granite-color-background-selected);color:var(--granite-color-text)}button:host.granite-button-disabled,button:host.granite-button-disabled:active,button:host.granite-button-disabled:focus,button:host.granite-button-disabled:hover{opacity:.4;cursor:default}a:host.granite-button{background-color:var(--granite-color-background-variant);color:var(--granite-color-text-link);border:1px solid var(--granite-color-border-soft)}a:host.granite-button:hover:not(.granite-button-disabled){background-color:var(--granite-color-background-active-hover);color:var(--granite-color-text-on-active)}a:host.granite-button:active:not(.granite-button-disabled){background-color:var(--granite-color-background-active-selected);color:var(--granite-color-text-on-active)}a:host.granite-button-disabled,a:host.granite-button-disabled:active,a:host.granite-button-disabled:focus,a:host.granite-button-disabled:hover{opacity:.4;text-decoration:none;cursor:default;border:1px solid var(--granite-color-border-soft);pointer-events:none}"]}]}],xt.ctorParameters=function(){return[{type:l.FocusMonitor},{type:e.ElementRef}]};var Ct=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r._focusMonitor=e,r._elementRef=n,r}return C(e,t),e.prototype._anchorClick=function(t){this.disabled&&t.preventDefault()},e.prototype.ngOnChanges=function(e){t.prototype.ngOnChanges.call(this,e)},e}(xt);Ct.decorators=[{type:e.Component,args:[{selector:"a[graniteButton]",host:{class:"granite-button-base","[attr.tabindex]":"disabled ? -1 : 0","[class.granite-button-disabled]":"disabled"},exportAs:"graniteAnchor",template:"<ng-content></ng-content>",inputs:["disabled"],changeDetection:e.ChangeDetectionStrategy.OnPush,styles:[":host{box-sizing:border-box}:host *,:host :after,:host :before{box-sizing:inherit;cursor:pointer}button:host{background-color:inherit;-webkit-appearance:none;-moz-appearance:none;appearance:none;border:none;font:inherit;border-radius:inherit;height:inherit;font-weight:inherit;line-height:inherit;color:inherit;margin:inherit;cursor:pointer;padding:inherit}a:host,button:host{outline:none}:host.granite-button-base{height:var(--granite-spacing-xl);border-radius:var(--granite-spacing-xs);font-size:var(--granite-font-size-body-small);font-weight:var(--granite-font-weight-regular);padding:var(--granite-spacing-s) var(--granite-spacing-s);position:relative;line-height:var(--granite-line-height-regular);display:flex;justify-content:center;align-items:center;width:-webkit-fit-content;width:-moz-fit-content;width:fit-content}:host:focus:not(.granite-button-disabled):not(:active){border:1px solid var(--granite-color-focus)}button:host.granite-primary-button{background-color:var(--granite-color-background-active);color:var(--granite-color-text-on-active);border:1px solid transparent}button:host.granite-primary-button:hover:not(.granite-button-disabled){background-color:var(--granite-color-background-active-hover);color:none}button:host.granite-primary-button:active:not(.granite-button-disabled){background-color:var(--granite-color-background-active-selected);color:none}button:host.granite-button{background-color:var(--granite-color-background-variant);color:var(--granite-color-text);border:1px solid var(--granite-color-border-soft)}button:host.granite-button:hover:not(.granite-button-disabled){background-color:var(--granite-color-background-active-hover);color:var(--granite-color-text-on-active)}button:host.granite-button:active:not(.granite-button-disabled){background-color:var(--granite-color-background-active-selected);color:var(--granite-color-text-on-active)}button:host.granite-flat-button{background-color:transparent;color:var(--granite-color-text);border:1px solid transparent}button:host.granite-flat-button:hover:not(.granite-button-disabled){background-color:var(--granite-color-background-hover);color:var(--granite-color-text)}button:host.granite-flat-button:active:not(.granite-button-disabled){background-color:var(--granite-color-background-selected);color:var(--granite-color-text)}button:host.granite-button-disabled,button:host.granite-button-disabled:active,button:host.granite-button-disabled:focus,button:host.granite-button-disabled:hover{opacity:.4;cursor:default}a:host.granite-button{background-color:var(--granite-color-background-variant);color:var(--granite-color-text-link);border:1px solid var(--granite-color-border-soft)}a:host.granite-button:hover:not(.granite-button-disabled){background-color:var(--granite-color-background-active-hover);color:var(--granite-color-text-on-active)}a:host.granite-button:active:not(.granite-button-disabled){background-color:var(--granite-color-background-active-selected);color:var(--granite-color-text-on-active)}a:host.granite-button-disabled,a:host.granite-button-disabled:active,a:host.granite-button-disabled:focus,a:host.granite-button-disabled:hover{opacity:.4;text-decoration:none;cursor:default;border:1px solid var(--granite-color-border-soft);pointer-events:none}"]}]}],Ct.ctorParameters=function(){return[{type:l.FocusMonitor},{type:e.ElementRef}]},Ct.propDecorators={_anchorClick:[{type:e.HostListener,args:["click",["$event"]]}]};var Mt=function(){};Mt.decorators=[{type:e.NgModule,args:[{declarations:[xt,Ct],exports:[xt,Ct]}]}];var It=function(){};It.decorators=[{type:e.Directive,args:[{selector:"granite-table-column"}]}],It.propDecorators={name:[{type:e.Input}],title:[{type:e.Input}],staticType:[{type:e.Input}],tableCellTemplateRef:[{type:e.ContentChild,args:["graniteTableCellTemplate",{static:!1}]}]};var St=function(){};St.CELL_ID_PREFIX="granite-cell";var Ot=function(){function t(){this.ariaLabel=null,this.cellIdPrefix=St.CELL_ID_PREFIX}return t.prototype.ngAfterContentInit=function(){this.columns=this.tableColumnsComponent.toArray(),this.renderedColumns=this.columns.map((function(t){return t.name}))},t}();Ot.decorators=[{type:e.Component,args:[{selector:"granite-table",template:'<cdk-table\n [dataSource]="dataSource"\n multiTemplateDataRows\n [trackBy]="trackBy"\n [attr.aria-label]="ariaLabel"\n>\n <ng-container\n *ngFor="let column of columns; index as columnI"\n [cdkColumnDef]="column.name"\n >\n \x3c!-- Cell Header --\x3e\n <cdk-header-cell *cdkHeaderCellDef graniteTableHeaderCell>\n {{ (column.title ? column.title : column.name) | graniteTitle }}\n </cdk-header-cell>\n\n \x3c!-- Cell Data --\x3e\n <cdk-cell\n graniteTableDataCell\n *cdkCellDef="let element; let rowI = dataIndex"\n [id]="cellIdPrefix + \'-\' + rowI + \'-\' + columnI"\n [value]="element[column.name]"\n [rowIndex]="rowI"\n [columnIndex]="columnI"\n [staticType]="column.staticType"\n [column]="column"\n [tableCellTemplateRef]="column.tableCellTemplateRef"\n ></cdk-cell>\n </ng-container>\n\n <cdk-header-row *cdkHeaderRowDef="renderedColumns"></cdk-header-row>\n <cdk-row\n *cdkRowDef="let row; let rowI = dataIndex; columns: renderedColumns"\n [attr.aria-rowindex]="rowI + 1"\n ></cdk-row>\n</cdk-table>\n',changeDetection:e.ChangeDetectionStrategy.OnPush,styles:[":host{box-sizing:border-box}:host *,:host :after,:host :before{box-sizing:inherit}cdk-table{flex-direction:column;background-color:var(--granite-color-background-variant)}cdk-header-row,cdk-row,cdk-table{display:flex}cdk-cell,cdk-header-cell{flex:1}cdk-cell{height:calc(var(--granite-spacing-m) * 2.5);border-top:1px solid var(--granite-color-border-soft)}"]}]}],Ot.propDecorators={dataSource:[{type:e.Input}],trackBy:[{type:e.Input}],ariaLabel:[{type:e.Input,args:["aria-label"]}],tableColumnsComponent:[{type:e.ContentChildren,args:[It]}]};var Tt=function(){};Tt.decorators=[{type:e.Directive}],Tt.propDecorators={id:[{type:e.Input}],column:[{type:e.Input}]};var Dt=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return C(e,t),e}(Tt);Dt.decorators=[{type:e.Component,args:[{selector:"cdk-cell[graniteTableDataCell]",template:'<span class="granite-table-data-cell-static-container">\n <ng-template\n [ngTemplateOutlet]="tableCellTemplateRef || defaultTableCellTemplate"\n [ngTemplateOutletContext]="{\n data: value,\n rowIndex: rowIndex,\n columnIndex: columnIndex,\n column: column\n }"\n ></ng-template>\n</span>\n\n<ng-template #defaultTableCellTemplate>\n <ng-container [ngSwitch]="staticType">\n <ng-container *ngSwitchCase="\'badge\'">\n <granite-badge>{{ value }}</granite-badge>\n </ng-container>\n <ng-container *ngSwitchDefault>{{ value }}</ng-container>\n </ng-container>\n</ng-template>\n',styles:[".granite-table-data-cell-static-container{padding:var(--granite-spacing-s);height:var(--granite-spacing-l);font-size:var(--granite-font-size-body-small);line-height:var(--granite-line-height-regular);display:flex;justify-content:center;align-items:center;color:var(--granite-color-text)}"]}]}],Dt.propDecorators={value:[{type:e.Input}],staticType:[{type:e.Input}],rowIndex:[{type:e.Input}],columnIndex:[{type:e.Input}],tableCellTemplateRef:[{type:e.Input}]};var Pt=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return C(e,t),e}(Tt);Pt.decorators=[{type:e.Component,args:[{selector:"cdk-header-cell[graniteTableHeaderCell]",template:'<span class="granite-table-header-cell-title">\n <ng-content></ng-content>\n</span>\n',styles:[".granite-table-header-cell-title{padding:var(--granite-spacing-s);height:var(--granite-spacing-l);font-size:var(--granite-font-size-micro);line-height:var(--granite-line-height-flowing);letter-spacing:.015em;font-weight:400;display:flex;justify-content:center;align-items:center;color:var(--granite-color-text-weak)}"]}]}];var Et=function(){function t(){}return t.prototype.transform=function(t){return t.split(/(?=[A-Z ])/).map((function(t){return t.trim()})).filter(Boolean).map((function(t){return t.charAt(0).toLocaleUpperCase()+t.slice(1)})).join(" ")},t}();Et.decorators=[{type:e.Pipe,args:[{name:"graniteTitle"}]}];var At=function(){};At.decorators=[{type:e.NgModule,args:[{exports:[Et],declarations:[Et]}]}];var Rt=function(){};Rt.decorators=[{type:e.NgModule,args:[{declarations:[Ot,Dt,Pt,It],imports:[n.CommonModule,m.CdkTableModule,E,At],exports:[Ot,It]}]}];var Bt=it.output,zt=function(){};zt.decorators=[{type:e.Directive,args:[{selector:"[graniteClientOutputDesktop]",providers:[{provide:ot,useValue:Bt}]}]}];var Lt=at.output,Xt=function(){};Xt.decorators=[{type:e.Directive,args:[{selector:"[graniteClientOutputTouch]",providers:[{provide:ot,useValue:Lt}]}]}];var Gt=it.input,jt=function(){};jt.decorators=[{type:e.Directive,args:[{selector:"[graniteClientInputDesktop]",providers:[{provide:rt,useValue:Gt}]}]}];var Ft=at.input,Ht=function(){};Ht.decorators=[{type:e.Directive,args:[{selector:"[graniteClientInputTouch]",providers:[{provide:rt,useValue:Ft}]}]}];var qt=function(){};qt.decorators=[{type:e.NgModule,args:[{declarations:[zt,Xt,jt,Ht],exports:[zt,Xt,jt,Ht]}]}],t.ClientInputDesktopDirective=jt,t.ClientInputTouchDirective=Ht,t.ClientOutputDesktopDirective=zt,t.ClientOutputTouchDirective=Xt,t.GRANITE_CLIENT_INPUT=rt,t.GRANITE_CLIENT_OUTPUT=ot,t.GraniteAnchorComponent=Ct,t.GraniteArrangeGridComponent=f,t.GraniteArrangeGridItemComponent=v,t.GraniteArrangeGridModule=y,t.GraniteBadgeComponent=P,t.GraniteBadgeHarness=A,t.GraniteBadgeModule=E,t.GraniteButtonComponent=xt,t.GraniteButtonModule=Mt,t.GraniteCoreModule=qt,t.GraniteDividerDirective=gt,t.GraniteGridComponent=k,t.GraniteGridItemComponent=_,t.GraniteGridModule=w,t.GraniteIconComponent=dt,t.GraniteIconModule=ht,t.GraniteMenuComponent=nt,t.GraniteMenuHarness=mt,t.GraniteMenuItemComponent=B,t.GraniteMenuItemHarness=bt,t.GraniteMenuModule=pt,t.GraniteMenuTouchCloseComponent=lt,t.GraniteMenuTouchTitleItemComponent=ut,t.GraniteMenuTriggerForDirective=ct,t.GraniteRadioButtonComponent=yt,t.GraniteRadioButtonModule=_t,t.GraniteTableColumnDirective=It,t.GraniteTableComponent=Ot,t.GraniteTableModule=Rt,t.GraniteToggleSwitchComponent=vt,t.GraniteToggleSwitchModule=ft,t._MenuBaseComponent=et,t.deviceDesktop=it,t.deviceTouch=at,t.disabledMixin=wt,t.graniteMenuDesktopAnimations=G,t.graniteMenuTouchAnimations=Z,t.ɵ0=Lt,t.ɵa=R,t.ɵc=z,t.ɵd=L,t.ɵe=Dt,t.ɵf=Tt,t.ɵg=Pt,t.ɵh=At,t.ɵi=Et,Object.defineProperty(t,"__esModule",{value:!0})}));
24
+ function(){throw Error('graniteMenuTriggerFor: must pass in an granite-menu instance.\n\n Example:\n <granite-menu #menu="graniteMenu"></granite-menu>\n <button [graniteMenuTriggerFor]="menu"></button>')}()},t.prototype._desktopPositionStrategy=function(){var t=this._overlay.position().flexibleConnectedTo(this._element).withLockedPosition().withTransformOriginOn(".granite-menu").withPush(!1);return this._setPosition(t),t},t.prototype._setPosition=function(t){var e=T("before"===this.menu.xPosition?["end","start"]:["start","end"],2),n=e[0],r=e[1],i=T("above"===this.menu.yPosition?["bottom","top"]:["top","bottom"],2),o=i[0],a=i[1],s=T([o,a],2),c=s[0],l=s[1],u=T([n,r],2),g=u[0],d=u[1],p=0;this.triggersSubmenu()?(d=n="before"===this.menu.xPosition?"start":"end",r=g="end"===n?"start":"end",p="bottom"===o?0:-0):(c="top"===o?"bottom":"top",l="top"===a?"bottom":"top"),t.withPositions([{originX:n,originY:c,overlayX:g,overlayY:o,offsetY:p},{originX:r,originY:c,overlayX:d,overlayY:o,offsetY:p},{originX:n,originY:l,overlayX:g,overlayY:a,offsetY:-p},{originX:r,originY:l,overlayX:d,overlayY:a,offsetY:-p}])},t.prototype._menuClosingActions=function(){var t,e=this,n=null===(t=this._overlayRef)||void 0===t?void 0:t.detachments(),r=this._parentMenu?this._parentMenu.closed:i.of(),a="desktop"===this._clientOutput.device&&this._parentMenu?this._parentMenu._hovered().pipe(o.filter((function(t){return t!==e._menuItemInstance})),o.filter((function(){return e._isMenuOpen}))):i.of(),s=this._parentMenu?i.of():i.fromEvent(this._document,"click").pipe(o.filter((function(t){return t.target!==e._element.nativeElement&&null===t.target.closest(".granite-menu")})),o.filter((function(){return!e.menu._isAnimating})));return i.merge(n,a,r,s)},t.prototype._openOnHover=function(){var t,e;return"desktop"===(null===(t=this._parentMenu._clientOutput)||void 0===t?void 0:t.device)&&(null===(e=this._parentMenu._clientInput)||void 0===e?void 0:e.devices.includes("mouse"))},t.prototype._toggleOnSubmenuClick=function(){var t,e;return"desktop"===(null===(t=this._parentMenu._clientOutput)||void 0===t?void 0:t.device)&&!(null===(e=this._parentMenu._clientInput)||void 0===e?void 0:e.devices.includes("mouse"))},t.prototype.animateOpenMenu=function(){"touch"===this._clientOutput.device?this.animateTouchOpenMenu():this.menu._startAnimation()},t.prototype.animateTouchOpenMenu=function(){this.triggersSubmenu()?(this.menu._startTouchSubmenuEnterAnimation(),this._parentMenu._startTouchHideAnimation()):this.menu._startTouchRootEnterAnimation()},t.prototype.animateCloseMenu=function(t,e){"touch"===this._clientOutput.device?this._animateTouchCloseMenu(t,e):this._parentMenu._resetAnimation()},t.prototype._animateTouchCloseMenu=function(t,e){var n;t?e?this.menu._startTouchCloseDownAnimationWithDelay():this.menu._startTouchCloseDownAnimation():(this.menu._startTouchCloseSideAnimation(),null===(n=this._parentMenu)||void 0===n||n._startTouchSubmenuEnterAnimation())},t.prototype.animateSetMenuPosition=function(t){this.menu._startTouchPanAnimation(t),this._parentMenu&&this._parentMenu._startTouchHidePanAnimation(t)},t.prototype._positionStrategy=function(){return"touch"===this._clientOutput.device?this._touchPositionStrategy():this._desktopPositionStrategy()},t.prototype._touchPositionStrategy=function(){return this._overlay.position().global()},t.prototype.addOverlayListeners=function(){this._overlayRef.hostElement.addEventListener("touchstart",this._handleOverlayTouchStart,st),this._overlayRef.hostElement.addEventListener("touchmove",this._handleOverlayTouchMove,st),this._overlayRef.hostElement.addEventListener("touchend",this._handleOverlayTouchEnd,st)},t.prototype.removeOverlayListeners=function(){this._overlayRef.hostElement.removeEventListener("touchstart",this._handleOverlayTouchStart,st),this._overlayRef.hostElement.removeEventListener("touchmove",this._handleOverlayTouchMove,st),this._overlayRef.hostElement.removeEventListener("touchend",this._handleOverlayTouchEnd,st)},t.prototype.easeOutExpo=function(t,e,n,r){return t===r?e+n:n*(1-Math.pow(2,-10*t/r))+e},t}();ct.decorators=[{type:e.Directive,args:[{selector:"[graniteMenuTriggerFor]",host:{class:"granite-menu-trigger","aria-haspopup":"true","[attr.aria-expanded]":"_isMenuOpen || null","[attr.aria-controls]":"_isMenuOpen ? menu.panelId : null","(mousedown)":"_handleMousedown($event)","(keydown)":"_handleKeydown($event)","(click)":"_handleClick($event)"}}]}],ct.ctorParameters=function(){return[{type:s.Overlay},{type:e.ElementRef},{type:e.ViewContainerRef},{type:et,decorators:[{type:e.Inject,args:[R]},{type:e.Optional}]},{type:void 0,decorators:[{type:e.Inject,args:[rt]},{type:e.Optional}]},{type:void 0,decorators:[{type:e.Inject,args:[it]},{type:e.Optional}]},{type:B,decorators:[{type:e.Optional},{type:e.Self}]},{type:d.Directionality,decorators:[{type:e.Optional}]},{type:l.FocusMonitor},{type:void 0,decorators:[{type:e.Inject,args:[n.DOCUMENT]}]}]},ct.propDecorators={menu:[{type:e.Input,args:["graniteMenuTriggerFor"]}]};var lt=function(){};lt.decorators=[{type:e.Component,args:[{selector:"[graniteMenuTouchCloseItem]",template:"<ng-content></ng-content>",exportAs:"graniteMenuTouchCloseItem",host:{"[class.granite-device-output-touch]":"true"},styles:[":host{display:block;position:relative;line-height:var(--granite-spacing-xl);height:var(--granite-spacing-xl);padding:0 var(--granite-spacing-s);width:100%;max-width:100%;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:pointer;outline:none;border:none;-webkit-tap-highlight-color:transparent;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;text-align:start;text-decoration:none;background-color:var(--granite-color-background-variant);color:var(--granite-color-text);font-size:var(--granite-font-size-body-small);font-family:inherit}@media (hover:hover) and (pointer:fine){:host:hover{background:var(--granite-color-background-active-hover);color:var(--granite-color-text-on-active)}}@media (hover:none) and (pointer:coarse){:host:active{background:var(--granite-color-background-active-hover);color:var(--granite-color-text-on-active)}}:host.cdk-keyboard-focused,:host.cdk-program-focused,:host.granite-menu-item-highlighted{background:var(--granite-color-background-active-hover);color:var(--granite-color-text-on-active)}:host granite-icon{position:absolute;font-size:var(--granite-font-size-body-small);color:inherit;top:50%;transform:translateY(-50%)}:host.granite-menu-item-submenu-trigger{-webkit-padding-end:var(--granite-spacing-l);padding-inline-end:var(--granite-spacing-l)}:host-context([dir=ltr]) :host.granite-menu-item-submenu-trigger granite-icon,html[dir=ltr] :host.granite-menu-item-submenu-trigger granite-icon{right:var(--granite-spacing-xs)}:host-context([dir=rtl]) :host.granite-menu-item-submenu-trigger granite-icon,html[dir=rtl] :host.granite-menu-item-submenu-trigger granite-icon{left:var(--granite-spacing-xs)}[dir=ltr] :host.granite-menu-item-submenu-trigger granite-icon.caret-left,[dir=rtl] :host.granite-menu-item-submenu-trigger granite-icon.caret-right{display:none}:host.granite-divider-top{border-top:var(--granite-border-width-regular) solid var(--granite-color-border-soft)}:host.granite-divider-bottom{border-bottom:var(--granite-border-width-regular) solid var(--granite-color-border-soft)}:host.granite-device-output-touch{height:var(--granite-spacing-xl);line-height:var(--granite-spacing-xl);font-size:var(--granite-font-size-body-small);text-align:center}:host.granite-device-output-touch,:host.granite-device-output-touch.granite-menu-item-back-trigger,:host.granite-device-output-touch.granite-menu-item-submenu-trigger{padding:0 var(--granite-spacing-l)}:host.granite-device-output-touch.granite-menu-item-title{line-height:var(--granite-spacing-xl);height:var(--granite-spacing-xl);font-size:var(--granite-font-size-micro);color:var(--granite-color-text-weak)}@media (hover:none) and (pointer:coarse){:host.granite-device-output-touch.granite-menu-item-title:active{background:var(--granite-color-background-active-hover);color:var(--granite-color-text-on-active)}}:host-context([dir=ltr]) :host.granite-device-output-touch.granite-menu-item-back-trigger granite-icon,html[dir=ltr] :host.granite-device-output-touch.granite-menu-item-back-trigger granite-icon{left:var(--granite-spacing-xs)}:host-context([dir=rtl]) :host.granite-device-output-touch.granite-menu-item-back-trigger granite-icon,html[dir=rtl] :host.granite-device-output-touch.granite-menu-item-back-trigger granite-icon{right:var(--granite-spacing-xs)}[dir=ltr] :host.granite-device-output-touch.granite-menu-item-back-trigger granite-icon.caret-right,[dir=rtl] :host.granite-device-output-touch.granite-menu-item-back-trigger granite-icon.caret-left{display:none}"]}]}];var ut=function(t){this._triggersBack=!1,this._triggersBack=!!t.parentMenu};ut.decorators=[{type:e.Component,args:[{selector:"[graniteMenuTouchTitleItem]",template:'\n <ng-container *ngIf="_triggersBack">\n <granite-icon class="caret-left">caret-left</granite-icon>\n <granite-icon class="caret-right">caret-right</granite-icon>\n </ng-container>\n <ng-content></ng-content>\n ',exportAs:"graniteMenuTouchTitleItem",host:{"[class.granite-menu-item-title]":"true","[class.granite-menu-item-back-trigger]":"_triggersBack","[class.granite-device-output-touch]":"true"},styles:[":host{display:block;position:relative;line-height:var(--granite-spacing-xl);height:var(--granite-spacing-xl);padding:0 var(--granite-spacing-s);width:100%;max-width:100%;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:pointer;outline:none;border:none;-webkit-tap-highlight-color:transparent;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;text-align:start;text-decoration:none;background-color:var(--granite-color-background-variant);color:var(--granite-color-text);font-size:var(--granite-font-size-body-small);font-family:inherit}@media (hover:hover) and (pointer:fine){:host:hover{background:var(--granite-color-background-active-hover);color:var(--granite-color-text-on-active)}}@media (hover:none) and (pointer:coarse){:host:active{background:var(--granite-color-background-active-hover);color:var(--granite-color-text-on-active)}}:host.cdk-keyboard-focused,:host.cdk-program-focused,:host.granite-menu-item-highlighted{background:var(--granite-color-background-active-hover);color:var(--granite-color-text-on-active)}:host granite-icon{position:absolute;font-size:var(--granite-font-size-body-small);color:inherit;top:50%;transform:translateY(-50%)}:host.granite-menu-item-submenu-trigger{-webkit-padding-end:var(--granite-spacing-l);padding-inline-end:var(--granite-spacing-l)}:host-context([dir=ltr]) :host.granite-menu-item-submenu-trigger granite-icon,html[dir=ltr] :host.granite-menu-item-submenu-trigger granite-icon{right:var(--granite-spacing-xs)}:host-context([dir=rtl]) :host.granite-menu-item-submenu-trigger granite-icon,html[dir=rtl] :host.granite-menu-item-submenu-trigger granite-icon{left:var(--granite-spacing-xs)}[dir=ltr] :host.granite-menu-item-submenu-trigger granite-icon.caret-left,[dir=rtl] :host.granite-menu-item-submenu-trigger granite-icon.caret-right{display:none}:host.granite-divider-top{border-top:var(--granite-border-width-regular) solid var(--granite-color-border-soft)}:host.granite-divider-bottom{border-bottom:var(--granite-border-width-regular) solid var(--granite-color-border-soft)}:host.granite-device-output-touch{height:var(--granite-spacing-xl);line-height:var(--granite-spacing-xl);font-size:var(--granite-font-size-body-small);text-align:center}:host.granite-device-output-touch,:host.granite-device-output-touch.granite-menu-item-back-trigger,:host.granite-device-output-touch.granite-menu-item-submenu-trigger{padding:0 var(--granite-spacing-l)}:host.granite-device-output-touch.granite-menu-item-title{line-height:var(--granite-spacing-xl);height:var(--granite-spacing-xl);font-size:var(--granite-font-size-micro);color:var(--granite-color-text-weak)}@media (hover:none) and (pointer:coarse){:host.granite-device-output-touch.granite-menu-item-title:active{background:var(--granite-color-background-active-hover);color:var(--granite-color-text-on-active)}}:host-context([dir=ltr]) :host.granite-device-output-touch.granite-menu-item-back-trigger granite-icon,html[dir=ltr] :host.granite-device-output-touch.granite-menu-item-back-trigger granite-icon{left:var(--granite-spacing-xs)}:host-context([dir=rtl]) :host.granite-device-output-touch.granite-menu-item-back-trigger granite-icon,html[dir=rtl] :host.granite-device-output-touch.granite-menu-item-back-trigger granite-icon{right:var(--granite-spacing-xs)}[dir=ltr] :host.granite-device-output-touch.granite-menu-item-back-trigger granite-icon.caret-right,[dir=rtl] :host.granite-device-output-touch.granite-menu-item-back-trigger granite-icon.caret-left{display:none}"]}]}],ut.ctorParameters=function(){return[{type:et,decorators:[{type:e.Inject,args:[R]},{type:e.Optional}]}]};var gt=function(){this.dividerDirection="top"};gt.decorators=[{type:e.Directive,args:[{selector:"[graniteDivider]",exportAs:"graniteDivider",host:{"[class.granite-divider-top]":'dividerDirection === "top"',"[class.granite-divider-bottom]":'dividerDirection === "bottom"'}}]}],gt.propDecorators={dividerDirection:[{type:e.Input}]};var dt=function(){function t(t,e,n){this._elementRef=t,this.renderer=e,n||this.renderer.setAttribute(t.nativeElement,"aria-hidden","true")}return t.prototype.ngOnChanges=function(t){t.fontIcon&&this._updateFontIcon()},t.prototype._updateFontIcon=function(){this.fontIcon!==this._previousFontIconClass&&(this._previousFontIconClass&&this.renderer.removeClass(this._elementRef.nativeElement,this._previousFontIconClass),this.fontIcon&&this.renderer.addClass(this._elementRef.nativeElement,this.fontIcon),this._previousFontIconClass=this.fontIcon)},t}();dt.decorators=[{type:e.Component,args:[{selector:"granite-icon",template:"<ng-content></ng-content>",host:{role:"img",class:"granite-icon"},changeDetection:e.ChangeDetectionStrategy.OnPush,styles:[":host.granite-icon{background-repeat:no-repeat;display:inline-block;padding:0 calc(var(--granite-spacing-xs) / 2);font-size:1em;line-height:1em;position:relative;top:.1em}"]}]}],dt.ctorParameters=function(){return[{type:e.ElementRef},{type:e.Renderer2},{type:String,decorators:[{type:e.Attribute,args:["aria-hidden"]}]}]},dt.propDecorators={fontIcon:[{type:e.Input}]};var pt=function(){};pt.decorators=[{type:e.NgModule,args:[{declarations:[dt],exports:[dt]}]}];var ht=function(){};ht.decorators=[{type:e.NgModule,args:[{declarations:[nt,B,ct,lt,ut,gt],imports:[n.CommonModule,s.OverlayModule,c.PortalModule,pt],exports:[nt,B,ct,lt,ut,gt]}]}];var mt=function(t){function e(){var e=t.apply(this,O(arguments))||this;return e._documentRootLocator=e.documentRootLocatorFactory(),e}return C(e,t),e.with=function(t){return void 0===t&&(t={}),new a.HarnessPredicate(e,t).addOption("text",t.text,(function(t,e){return a.HarnessPredicate.stringMatches(t.getText(),e)}))},e.prototype.getText=function(){return I(this,void 0,void 0,(function(){return M(this,(function(t){switch(t.label){case 0:return[4,this.host()];case 1:return[2,t.sent().text()]}}))}))},e.prototype.open=function(){return I(this,void 0,void 0,(function(){return M(this,(function(t){switch(t.label){case 0:return[4,this.isOpen()];case 1:return t.sent()?[3,4]:[4,this.host()];case 2:return[4,t.sent().click()];case 3:return t.sent(),[2,this.forceStabilize()];case 4:return[2]}}))}))},e.prototype.close=function(){var t;return I(this,void 0,void 0,(function(){return M(this,(function(e){switch(e.label){case 0:return[4,this._getMenuPanel()];case 1:return[4,null===(t=e.sent())||void 0===t?void 0:t.sendKeys(a.TestKey.ESCAPE)];case 2:return e.sent(),[2,this.forceStabilize()]}}))}))},e.prototype.isOpen=function(){return I(this,void 0,void 0,(function(){return M(this,(function(t){switch(t.label){case 0:return[4,this._getMenuPanel()];case 1:return[2,!!t.sent()]}}))}))},e.prototype.getItems=function(t){return void 0===t&&(t={}),I(this,void 0,void 0,(function(){var e;return M(this,(function(n){switch(n.label){case 0:return[4,this._getPanelId()];case 1:return(e=n.sent())?[2,this._documentRootLocator.locatorForAll(bt.with(Object.assign(Object.assign({},t),{ancestor:"#"+e})))()]:[2,[]]}}))}))},e.prototype._getMenuPanel=function(){return I(this,void 0,void 0,(function(){var t;return M(this,(function(e){switch(e.label){case 0:return[4,this._getPanelId()];case 1:return[2,(t=e.sent())?this._documentRootLocator.locatorForOptional("#"+t)():null]}}))}))},e.prototype._getPanelId=function(){return I(this,void 0,void 0,(function(){return M(this,(function(t){switch(t.label){case 0:return[4,this.host()];case 1:return[4,t.sent().getAttribute("aria-controls")];case 2:return[2,t.sent()||null]}}))}))},e}(a.ComponentHarness);mt.hostSelector=".granite-menu-trigger";var bt=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return C(e,t),e.with=function(t){return void 0===t&&(t={}),new a.HarnessPredicate(e,t).addOption("text",t.text,(function(t,e){return a.HarnessPredicate.stringMatches(t.getText(),e)}))},e.prototype.getText=function(){return I(this,void 0,void 0,(function(){return M(this,(function(t){switch(t.label){case 0:return[4,this.host()];case 1:return[2,t.sent().text()]}}))}))},e.prototype.hasSubmenu=function(){return I(this,void 0,void 0,(function(){return M(this,(function(t){switch(t.label){case 0:return[4,this.host()];case 1:return[2,t.sent().matchesSelector(mt.hostSelector)]}}))}))},e.prototype.getSubmenu=function(){return I(this,void 0,void 0,(function(){return M(this,(function(t){switch(t.label){case 0:return[4,this.hasSubmenu()];case 1:return t.sent()?[2,new mt(this.locatorFactory)]:[2,null]}}))}))},e.prototype.click=function(){return I(this,void 0,void 0,(function(){return M(this,(function(t){switch(t.label){case 0:return[4,this.host()];case 1:return[4,t.sent().click()];case 2:return t.sent(),[2,this.forceStabilize()]}}))}))},e}(a.ComponentHarness);bt.hostSelector=".granite-menu-item";var vt=function(){function t(t){this._focusMonitor=t,this.id=null,this.checked=!1,this.disabled=!1,this.readonly=!1,this.labelPosition="after",this.ariaLabel=null,this.ariaLabelledby=null,this.valueChange=new e.EventEmitter,this.toggleChange=new e.EventEmitter,this.toggleBlur=new e.EventEmitter,this._positionBefore=!1,this._toggleSwitchDisabled=!1}return t.prototype.ngOnChanges=function(t){t.checked&&(this.checked=r.coerceBooleanProperty(t.checked.currentValue)),t.disabled&&(this.disabled=r.coerceBooleanProperty(t.disabled.currentValue)),t.readonly&&(this.readonly=r.coerceBooleanProperty(t.readonly.currentValue)),null!=t.labelPosition&&(this._positionBefore=null!=t.labelPosition.currentValue&&"before"===t.labelPosition.currentValue),(t.disabled||t.readonly)&&(this.disabled||this.readonly)&&(this._toggleSwitchDisabled=!0)},t.prototype.focus=function(t,e){void 0===t&&(t="program"),this._focusMonitor.focusVia(this._getInputElement(),t,e)},t.prototype._onBlur=function(){this.toggleBlur.emit()},t.prototype._toggleSwitchChange=function(){this.checked=this._getInputElement().checked,this.valueChange.emit(this.checked)},t.prototype._toggleSwitchClick=function(){this.toggleChange.emit()},t.prototype._getInputElement=function(){return this._inputElement.nativeElement},t}();vt.decorators=[{type:e.Component,args:[{selector:"granite-toggle-switch",exportAs:"graniteToggleSwitch",host:{class:"granite-toggle-switch","[class.granite-toggle-switch-checked]":"checked","[class.granite-toggle-switch-disabled]":"disabled","[class.granite-toggle-switch-readonly]":"readonly","[class.granite-toggle-switch-label-before]":"_positionBefore"},template:'<label [attr.for]="id" class="granite-toggle-switch-label">\n <div class="granite-toggle-switch-bar">\n <input\n #input\n [id]="id"\n class="granite-toggle-switch-input cdk-visually-hidden"\n role="switch"\n type="checkbox"\n [attr.aria-checked]="checked.toString()"\n [attr.aria-label]="ariaLabel"\n [attr.aria-labelledby]="ariaLabelledby"\n [checked]="checked"\n [disabled]="_toggleSwitchDisabled"\n [readonly]="readonly"\n (click)="_toggleSwitchClick()"\n (change)="_toggleSwitchChange()"\n (blur)="_onBlur()"\n />\n <div class="granite-toggle-switch-thumb"></div>\n </div>\n <span class="granite-toggle-switch-text"><ng-content></ng-content></span>\n</label>\n',changeDetection:e.ChangeDetectionStrategy.OnPush,styles:[".cdk-visually-hidden{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;white-space:nowrap;outline:0;-webkit-appearance:none;-moz-appearance:none}:host{box-sizing:border-box}:host *,:host :after,:host :before{box-sizing:inherit;cursor:pointer}:host(.granite-toggle-switch){color:var(--granite-color-text)}:host(.granite-toggle-switch-checked) .granite-toggle-switch-bar{background-color:var(--granite-color-background-active)}:host(.granite-toggle-switch-checked) .granite-toggle-switch-thumb{border:.0625rem solid var(--granite-color-background-active)}:host-context([dir=ltr]) :host(.granite-toggle-switch-checked) .granite-toggle-switch-thumb,html[dir=ltr] :host(.granite-toggle-switch-checked) .granite-toggle-switch-thumb{float:right}:host-context([dir=rtl]) :host(.granite-toggle-switch-checked) .granite-toggle-switch-thumb,html[dir=rtl] :host(.granite-toggle-switch-checked) .granite-toggle-switch-thumb{float:left}:host(.granite-toggle-switch-disabled) .granite-toggle-switch-label{opacity:.6}:host(.granite-toggle-switch-disabled) *,:host(.granite-toggle-switch-readonly) *{cursor:default}:host(.granite-toggle-switch-label-before) .granite-toggle-switch-label{flex-direction:row-reverse}:host(.granite-toggle-switch-label-before) .granite-toggle-switch-text{-webkit-padding-start:0;padding-inline-start:0;-webkit-padding-end:var(--granite-spacing-s);padding-inline-end:var(--granite-spacing-s)}.granite-toggle-switch-label{display:flex;align-items:center;width:-webkit-max-content;width:-moz-max-content;width:max-content}.granite-toggle-switch-bar{width:var(--granite-spacing-xl);height:var(--granite-spacing-m);border-radius:var(--granite-spacing-s);background-color:var(--granite-color-background-inactive);transition:background-color .1s linear;position:relative}.granite-toggle-switch-bar:focus-within{box-shadow:0 0 0 .0625rem var(--granite-color-focus)}.granite-toggle-switch-thumb{width:var(--granite-spacing-m);height:var(--granite-spacing-m);border-radius:var(--granite-spacing-m);background-color:var(--granite-color-text-static-light);border:.0625rem solid var(--granite-color-background-inactive);transition:float .1s linear}:host-context([dir=ltr]) .granite-toggle-switch-thumb,html[dir=ltr] .granite-toggle-switch-thumb{float:left}:host-context([dir=rtl]) .granite-toggle-switch-thumb,html[dir=rtl] .granite-toggle-switch-thumb{float:right}.granite-toggle-switch-text{-webkit-padding-start:var(--granite-spacing-s);padding-inline-start:var(--granite-spacing-s)}.granite-toggle-switch-text:empty{display:none}"]}]}],vt.ctorParameters=function(){return[{type:l.FocusMonitor}]},vt.propDecorators={id:[{type:e.Input}],checked:[{type:e.Input}],disabled:[{type:e.Input}],readonly:[{type:e.Input}],labelPosition:[{type:e.Input}],ariaLabel:[{type:e.Input,args:["aria-label"]}],ariaLabelledby:[{type:e.Input,args:["aria-labelledby"]}],valueChange:[{type:e.Output}],toggleChange:[{type:e.Output}],toggleBlur:[{type:e.Output}],_inputElement:[{type:e.ViewChild,args:["input"]}]};var ft=function(){};ft.decorators=[{type:e.NgModule,args:[{declarations:[vt],exports:[vt]}]}];var yt=function(){function t(t,n){var r=this;this._focusMonitor=t,this._radioDispatcher=n,this.id=null,this.checked=!1,this.required=!1,this.disabled=!1,this.readonly=!1,this.labelPosition="after",this.ariaLabel=null,this.ariaLabelledby=null,this.radioChange=new e.EventEmitter,this.radioBlur=new e.EventEmitter,this._positionBefore=!1,this._radioDisabled=!1,this._removeUniqueSelectionListener=function(){},this._removeUniqueSelectionListener=n.listen((function(t,e){t!==r.id&&e===r.name&&(r.checked=!1)}))}return t.prototype.ngOnChanges=function(t){t.checked&&(this.checked=r.coerceBooleanProperty(t.checked.currentValue)),t.required&&(this.required=r.coerceBooleanProperty(t.required.currentValue)),t.readonly&&(this.readonly=r.coerceBooleanProperty(t.readonly.currentValue)),t.disabled&&(this.disabled=r.coerceBooleanProperty(t.disabled.currentValue)),null!=t.labelPosition&&(this._positionBefore=null!=t.labelPosition.currentValue&&"before"===t.labelPosition.currentValue),(t.disabled||t.readonly)&&(this.disabled||this.readonly)&&(this._radioDisabled=!0)},t.prototype.ngOnDestroy=function(){this._removeUniqueSelectionListener()},t.prototype.focus=function(t,e){void 0===t&&(t="program"),this._focusMonitor.focusVia(this._getInputElement(),t,e)},t.prototype._radioClick=function(t){this.radioChange.emit(t)},t.prototype._radioChange=function(){this.checked=this._getInputElement().checked,this._radioDispatcher.notify(this.id,this.name)},t.prototype._onBlur=function(){this.radioBlur.emit()},t.prototype._getInputElement=function(){return this._inputElement.nativeElement},t}();yt.decorators=[{type:e.Component,args:[{selector:"granite-radio-button",exportAs:"graniteRadioButton",host:{class:"granite-radio-button","[class.granite-radio-button-disabled]":"disabled","[class.granite-radio-button-label-before]":"_positionBefore","[class.granite-radio-button-checked]":"checked","[class.granite-radio-button-readonly]":"readonly"},template:'<label class="granite-radio-button-label">\n <div class="granite-radio-button-outer-circle">\n <input\n #input\n [id]="id"\n class="granite-radio-button-input cdk-visually-hidden"\n type="radio"\n [attr.name]="name"\n [disabled]="_radioDisabled"\n [checked]="checked"\n [readonly]="readonly"\n [required]="required"\n [attr.aria-label]="ariaLabel"\n [attr.aria-labelledby]="ariaLabelledby"\n [attr.aria-checked]="checked.toString()"\n [value]="value"\n (click)="_radioClick($event.target.value)"\n (change)="_radioChange()"\n (blur)="_onBlur()"\n />\n <div class="granite-radio-button-inner-circle"></div>\n </div>\n <span class="granite-radio-button-text">\n <ng-content></ng-content>\n </span>\n</label>\n',styles:[".cdk-visually-hidden{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;white-space:nowrap;outline:0;-webkit-appearance:none;-moz-appearance:none}:host(.granite-radio-button):not(.granite-radio-button-readonly):not(.granite-radio-button-disabled) .granite-radio-button-label:hover{cursor:pointer}:host(.granite-radio-button):not(.granite-radio-button-readonly):not(.granite-radio-button-disabled) .granite-radio-button-label:hover .granite-radio-button-outer-circle{border-color:var(--granite-color-background-active-hover)}:host(.granite-radio-button):not(.granite-radio-button-readonly):not(.granite-radio-button-disabled) .granite-radio-button-label:hover .granite-radio-button-inner-circle{background-color:var(--granite-color-background-active-hover)}:host(.granite-radio-button):not(.granite-radio-button-readonly):not(.granite-radio-button-disabled) .granite-radio-button-outer-circle:focus-within{border:1px solid var(--granite-color-focus)}:host(.granite-radio-button-label-before) .granite-radio-button-label{flex-direction:row-reverse}:host(.granite-radio-button-label-before) .granite-radio-button-text{-webkit-padding-start:0;padding-inline-start:0;-webkit-padding-end:var(--granite-spacing-s);padding-inline-end:var(--granite-spacing-s)}:host(.granite-radio-button-checked) .granite-radio-button-inner-circle{visibility:visible;-webkit-animation:growAnimation .1s;animation:growAnimation .1s}:host(.granite-radio-button-checked) .granite-radio-button-outer-circle{border-color:var(--granite-color-background-active)}:host(.granite-radio-button-checked).granite-radio-button-disabled .granite-radio-button-inner-circle{background-color:var(--granite-color-text)}:host(.granite-radio-button-checked).granite-radio-button-disabled .granite-radio-button-outer-circle{border:1px solid var(--granite-color-text);background-color:transparent}:host(.granite-radio-button-checked).granite-radio-button-readonly .granite-radio-button-inner-circle{background-color:var(--granite-color-text)}:host(.granite-radio-button-checked).granite-radio-button-readonly .granite-radio-button-outer-circle{border:1px solid var(--granite-color-text)}.granite-radio-button-text{-webkit-padding-start:var(--granite-spacing-s);padding-inline-start:var(--granite-spacing-s);color:var(--granite-color-text)}.granite-radio-button-text:empty{display:none}.granite-radio-button-label{display:flex;align-items:center;width:-webkit-max-content;width:-moz-max-content;width:max-content;-webkit-margin-end:var(--granite-spacing-xl);margin-inline-end:var(--granite-spacing-xl)}:host(.granite-radio-button-disabled) .granite-radio-button-text{opacity:.6}:host(.granite-radio-button-disabled) .granite-radio-button-outer-circle{opacity:.3;background-color:var(--granite-color-border-soft)}.granite-radio-button-outer-circle{height:var(--granite-spacing-m);width:var(--granite-spacing-m);border-radius:50%;box-sizing:border-box;border:1px solid var(--granite-color-border-hard);display:flex;justify-content:center;position:relative;align-items:center}.granite-radio-button-inner-circle{width:calc(var(--granite-spacing-s) * 1.25);height:calc(var(--granite-spacing-s) * 1.25);visibility:hidden;position:absolute;border-radius:50%;background-color:var(--granite-color-background-active);margin:auto}@-webkit-keyframes growAnimation{0%{transform:scale(0)}to{transform:scale(1)}}@keyframes growAnimation{0%{transform:scale(0)}to{transform:scale(1)}}"]}]}],yt.ctorParameters=function(){return[{type:l.FocusMonitor},{type:h.UniqueSelectionDispatcher}]},yt.propDecorators={value:[{type:e.Input}],id:[{type:e.Input}],name:[{type:e.Input}],checked:[{type:e.Input}],required:[{type:e.Input}],disabled:[{type:e.Input}],readonly:[{type:e.Input}],labelPosition:[{type:e.Input}],ariaLabel:[{type:e.Input,args:["aria-label"]}],ariaLabelledby:[{type:e.Input,args:["aria-labelledby"]}],radioChange:[{type:e.Output}],radioBlur:[{type:e.Output}],_inputElement:[{type:e.ViewChild,args:["input"]}]};var _t=function(){};_t.decorators=[{type:e.NgModule,args:[{declarations:[yt],exports:[yt]}]}];var wt,kt=function(t){void 0===t&&(t=function(){});var n=function(t){function e(){var e=t.apply(this,O(arguments))||this;return e.disabled=!1,e}return C(e,t),e.prototype.ngOnChanges=function(t){t.disabled&&(this.disabled=r.coerceBooleanProperty(t.disabled.currentValue))},e}(t);return n.decorators=[{type:e.Directive}],n.propDecorators={disabled:[{type:e.Input}]},n};!function(t){t.graniteButton="granite-button",t.granitePrimaryButton="granite-primary-button",t.graniteFlatButton="granite-flat-button"}(wt||(wt={}));var xt=function(t){function e(e,n){var r,i,o=t.call(this)||this;o._focusMonitor=e,o._elementRef=n;try{for(var a=S(Object.keys(wt)),s=a.next();!s.done;s=a.next()){var c=s.value;o._getHostElement().hasAttribute(c)&&o._getHostElement().classList.add(wt[c])}}catch(t){r={error:t}}finally{try{s&&!s.done&&(i=a.return)&&i.call(a)}finally{if(r)throw r.error}}return o}return C(e,t),e.prototype.ngOnChanges=function(e){t.prototype.ngOnChanges.call(this,e)},e.prototype.focus=function(t,e){void 0===t&&(t="program"),this._focusMonitor.focusVia(this._getHostElement(),t,e)},e.prototype._getHostElement=function(){return this._elementRef.nativeElement},e}(kt());xt.decorators=[{type:e.Component,args:[{selector:"button[graniteButton],\n button[granitePrimaryButton],\n button[graniteFlatButton]\n ",host:{class:"granite-button-base","[class.granite-button-disabled]":"disabled","[attr.disabled]":"disabled || null"},exportAs:"graniteButton",template:"<ng-content></ng-content>",inputs:["disabled"],changeDetection:e.ChangeDetectionStrategy.OnPush,styles:[":host{box-sizing:border-box}:host *,:host :after,:host :before{box-sizing:inherit;cursor:pointer}button:host{background-color:inherit;-webkit-appearance:none;-moz-appearance:none;appearance:none;border:none;font:inherit;border-radius:inherit;height:inherit;font-weight:inherit;line-height:inherit;color:inherit;margin:inherit;cursor:pointer;padding:inherit}a:host,button:host{outline:none}:host.granite-button-base{height:var(--granite-spacing-xl);border-radius:var(--granite-spacing-xs);font-size:var(--granite-font-size-body-small);font-weight:var(--granite-font-weight-regular);padding:var(--granite-spacing-s) var(--granite-spacing-s);position:relative;line-height:var(--granite-line-height-regular);display:flex;justify-content:center;align-items:center;width:-webkit-fit-content;width:-moz-fit-content;width:fit-content}:host:focus:not(.granite-button-disabled):not(:active){border:1px solid var(--granite-color-focus)}button:host.granite-primary-button{background-color:var(--granite-color-background-active);color:var(--granite-color-text-on-active);border:1px solid transparent}button:host.granite-primary-button:hover:not(.granite-button-disabled){background-color:var(--granite-color-background-active-hover);color:none}button:host.granite-primary-button:active:not(.granite-button-disabled){background-color:var(--granite-color-background-active-selected);color:none}button:host.granite-button{background-color:var(--granite-color-background-variant);color:var(--granite-color-text);border:1px solid var(--granite-color-border-soft)}button:host.granite-button:hover:not(.granite-button-disabled){background-color:var(--granite-color-background-active-hover);color:var(--granite-color-text-on-active)}button:host.granite-button:active:not(.granite-button-disabled){background-color:var(--granite-color-background-active-selected);color:var(--granite-color-text-on-active)}button:host.granite-flat-button{background-color:transparent;color:var(--granite-color-text);border:1px solid transparent}button:host.granite-flat-button:hover:not(.granite-button-disabled){background-color:var(--granite-color-background-hover);color:var(--granite-color-text)}button:host.granite-flat-button:active:not(.granite-button-disabled){background-color:var(--granite-color-background-selected);color:var(--granite-color-text)}button:host.granite-button-disabled,button:host.granite-button-disabled:active,button:host.granite-button-disabled:focus,button:host.granite-button-disabled:hover{opacity:.4;cursor:default}a:host.granite-button{background-color:var(--granite-color-background-variant);color:var(--granite-color-text-link);border:1px solid var(--granite-color-border-soft)}a:host.granite-button:hover:not(.granite-button-disabled){background-color:var(--granite-color-background-active-hover);color:var(--granite-color-text-on-active)}a:host.granite-button:active:not(.granite-button-disabled){background-color:var(--granite-color-background-active-selected);color:var(--granite-color-text-on-active)}a:host.granite-button-disabled,a:host.granite-button-disabled:active,a:host.granite-button-disabled:focus,a:host.granite-button-disabled:hover{opacity:.4;text-decoration:none;cursor:default;border:1px solid var(--granite-color-border-soft);pointer-events:none}"]}]}],xt.ctorParameters=function(){return[{type:l.FocusMonitor},{type:e.ElementRef}]};var Ct=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r._focusMonitor=e,r._elementRef=n,r}return C(e,t),e.prototype._anchorClick=function(t){this.disabled&&t.preventDefault()},e.prototype.ngOnChanges=function(e){t.prototype.ngOnChanges.call(this,e)},e}(xt);Ct.decorators=[{type:e.Component,args:[{selector:"a[graniteButton]",host:{class:"granite-button-base","[attr.tabindex]":"disabled ? -1 : 0","[class.granite-button-disabled]":"disabled"},exportAs:"graniteAnchor",template:"<ng-content></ng-content>",inputs:["disabled"],changeDetection:e.ChangeDetectionStrategy.OnPush,styles:[":host{box-sizing:border-box}:host *,:host :after,:host :before{box-sizing:inherit;cursor:pointer}button:host{background-color:inherit;-webkit-appearance:none;-moz-appearance:none;appearance:none;border:none;font:inherit;border-radius:inherit;height:inherit;font-weight:inherit;line-height:inherit;color:inherit;margin:inherit;cursor:pointer;padding:inherit}a:host,button:host{outline:none}:host.granite-button-base{height:var(--granite-spacing-xl);border-radius:var(--granite-spacing-xs);font-size:var(--granite-font-size-body-small);font-weight:var(--granite-font-weight-regular);padding:var(--granite-spacing-s) var(--granite-spacing-s);position:relative;line-height:var(--granite-line-height-regular);display:flex;justify-content:center;align-items:center;width:-webkit-fit-content;width:-moz-fit-content;width:fit-content}:host:focus:not(.granite-button-disabled):not(:active){border:1px solid var(--granite-color-focus)}button:host.granite-primary-button{background-color:var(--granite-color-background-active);color:var(--granite-color-text-on-active);border:1px solid transparent}button:host.granite-primary-button:hover:not(.granite-button-disabled){background-color:var(--granite-color-background-active-hover);color:none}button:host.granite-primary-button:active:not(.granite-button-disabled){background-color:var(--granite-color-background-active-selected);color:none}button:host.granite-button{background-color:var(--granite-color-background-variant);color:var(--granite-color-text);border:1px solid var(--granite-color-border-soft)}button:host.granite-button:hover:not(.granite-button-disabled){background-color:var(--granite-color-background-active-hover);color:var(--granite-color-text-on-active)}button:host.granite-button:active:not(.granite-button-disabled){background-color:var(--granite-color-background-active-selected);color:var(--granite-color-text-on-active)}button:host.granite-flat-button{background-color:transparent;color:var(--granite-color-text);border:1px solid transparent}button:host.granite-flat-button:hover:not(.granite-button-disabled){background-color:var(--granite-color-background-hover);color:var(--granite-color-text)}button:host.granite-flat-button:active:not(.granite-button-disabled){background-color:var(--granite-color-background-selected);color:var(--granite-color-text)}button:host.granite-button-disabled,button:host.granite-button-disabled:active,button:host.granite-button-disabled:focus,button:host.granite-button-disabled:hover{opacity:.4;cursor:default}a:host.granite-button{background-color:var(--granite-color-background-variant);color:var(--granite-color-text-link);border:1px solid var(--granite-color-border-soft)}a:host.granite-button:hover:not(.granite-button-disabled){background-color:var(--granite-color-background-active-hover);color:var(--granite-color-text-on-active)}a:host.granite-button:active:not(.granite-button-disabled){background-color:var(--granite-color-background-active-selected);color:var(--granite-color-text-on-active)}a:host.granite-button-disabled,a:host.granite-button-disabled:active,a:host.granite-button-disabled:focus,a:host.granite-button-disabled:hover{opacity:.4;text-decoration:none;cursor:default;border:1px solid var(--granite-color-border-soft);pointer-events:none}"]}]}],Ct.ctorParameters=function(){return[{type:l.FocusMonitor},{type:e.ElementRef}]},Ct.propDecorators={_anchorClick:[{type:e.HostListener,args:["click",["$event"]]}]};var It=function(){};It.decorators=[{type:e.NgModule,args:[{declarations:[xt,Ct],exports:[xt,Ct]}]}];var Mt=function(){};Mt.decorators=[{type:e.Directive,args:[{selector:"granite-table-column"}]}],Mt.propDecorators={name:[{type:e.Input}],title:[{type:e.Input}],staticType:[{type:e.Input}],tableCellTemplateRef:[{type:e.ContentChild,args:["graniteTableCellTemplate",{static:!1}]}]};var St=function(){};St.CELL_ID_PREFIX="granite-cell";var Tt=function(){function t(){this.ariaLabel=null,this.cellIdPrefix=St.CELL_ID_PREFIX}return t.prototype.ngAfterContentInit=function(){this.columns=this.tableColumnsComponent.toArray(),this.renderedColumns=this.columns.map((function(t){return t.name}))},t}();Tt.decorators=[{type:e.Component,args:[{selector:"granite-table",template:'<cdk-table\n [dataSource]="dataSource"\n multiTemplateDataRows\n [trackBy]="trackBy"\n [attr.aria-label]="ariaLabel"\n>\n <ng-container\n *ngFor="let column of columns; index as columnI"\n [cdkColumnDef]="column.name"\n >\n \x3c!-- Cell Header --\x3e\n <cdk-header-cell *cdkHeaderCellDef graniteTableHeaderCell>\n {{ (column.title ? column.title : column.name) | graniteTitle }}\n </cdk-header-cell>\n\n \x3c!-- Cell Data --\x3e\n <cdk-cell\n graniteTableDataCell\n *cdkCellDef="let element; let rowI = dataIndex"\n [id]="cellIdPrefix + \'-\' + rowI + \'-\' + columnI"\n [value]="element[column.name]"\n [rowIndex]="rowI"\n [columnIndex]="columnI"\n [staticType]="column.staticType"\n [column]="column"\n [tableCellTemplateRef]="column.tableCellTemplateRef"\n ></cdk-cell>\n </ng-container>\n\n <cdk-header-row *cdkHeaderRowDef="renderedColumns"></cdk-header-row>\n <cdk-row\n *cdkRowDef="let row; let rowI = dataIndex; columns: renderedColumns"\n [attr.aria-rowindex]="rowI + 1"\n ></cdk-row>\n</cdk-table>\n',changeDetection:e.ChangeDetectionStrategy.OnPush,styles:[":host{box-sizing:border-box}:host *,:host :after,:host :before{box-sizing:inherit}cdk-table{flex-direction:column;background-color:var(--granite-color-background-variant)}cdk-header-row,cdk-row,cdk-table{display:flex}cdk-cell,cdk-header-cell{flex:1}cdk-cell{height:calc(var(--granite-spacing-m) * 2.5);border-top:1px solid var(--granite-color-border-soft)}"]}]}],Tt.propDecorators={dataSource:[{type:e.Input}],trackBy:[{type:e.Input}],ariaLabel:[{type:e.Input,args:["aria-label"]}],tableColumnsComponent:[{type:e.ContentChildren,args:[Mt]}]};var Ot=function(){};Ot.decorators=[{type:e.Directive}],Ot.propDecorators={id:[{type:e.Input}],column:[{type:e.Input}]};var Et=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return C(e,t),e}(Ot);Et.decorators=[{type:e.Component,args:[{selector:"cdk-cell[graniteTableDataCell]",template:'<span class="granite-table-data-cell-static-container">\n <ng-template\n [ngTemplateOutlet]="tableCellTemplateRef || defaultTableCellTemplate"\n [ngTemplateOutletContext]="{\n data: value,\n rowIndex: rowIndex,\n columnIndex: columnIndex,\n column: column\n }"\n ></ng-template>\n</span>\n\n<ng-template #defaultTableCellTemplate>\n <ng-container [ngSwitch]="staticType">\n <ng-container *ngSwitchCase="\'badge\'">\n <granite-badge>{{ value }}</granite-badge>\n </ng-container>\n <ng-container *ngSwitchDefault>{{ value }}</ng-container>\n </ng-container>\n</ng-template>\n',styles:[".granite-table-data-cell-static-container{padding:var(--granite-spacing-s);height:var(--granite-spacing-l);font-size:var(--granite-font-size-body-small);line-height:var(--granite-line-height-regular);display:flex;justify-content:center;align-items:center;color:var(--granite-color-text)}"]}]}],Et.propDecorators={value:[{type:e.Input}],staticType:[{type:e.Input}],rowIndex:[{type:e.Input}],columnIndex:[{type:e.Input}],tableCellTemplateRef:[{type:e.Input}]};var Dt=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return C(e,t),e}(Ot);Dt.decorators=[{type:e.Component,args:[{selector:"cdk-header-cell[graniteTableHeaderCell]",template:'<span class="granite-table-header-cell-title">\n <ng-content></ng-content>\n</span>\n',styles:[".granite-table-header-cell-title{padding:var(--granite-spacing-s);height:var(--granite-spacing-l);font-size:var(--granite-font-size-micro);line-height:var(--granite-line-height-flowing);letter-spacing:.015em;font-weight:400;display:flex;justify-content:center;align-items:center;color:var(--granite-color-text-weak)}"]}]}];var Pt=function(){function t(){}return t.prototype.transform=function(t){return t.split(/(?=[A-Z ])/).map((function(t){return t.trim()})).filter(Boolean).map((function(t){return t.charAt(0).toLocaleUpperCase()+t.slice(1)})).join(" ")},t}();Pt.decorators=[{type:e.Pipe,args:[{name:"graniteTitle"}]}];var At=function(){};At.decorators=[{type:e.NgModule,args:[{exports:[Pt],declarations:[Pt]}]}];var Rt=function(){};Rt.decorators=[{type:e.NgModule,args:[{declarations:[Tt,Et,Dt,Mt],imports:[n.CommonModule,m.CdkTableModule,P,At],exports:[Tt,Mt]}]}];var Bt=["text","number","password","textarea"],zt=function(){function t(t){this._focusMonitor=t,this.id=null,this.name=null,this.type="text",this.value="",this.required=!1,this.readonly=!1,this.invalid=!1,this.disabled=!1,this.placeholder="",this.maxlength=255,this.countcharacters=!1,this.ariaLabel=null,this.ariaLabelledby=null,this.valueChange=new e.EventEmitter,this._supported=!0,this._empty=!1,this._passwordFieldIcon="view",this._passwordField=!1,this._passwordToggled=!1,this._currentCharCount=0}return t.prototype.ngOnInit=function(){this._validateType(),this._passwordField="password"==this.type,this._empty=null==this.value||""===this.value},t.prototype.ngOnChanges=function(t){t.required&&(this.required=r.coerceBooleanProperty(t.required.currentValue)),t.readonly&&(this.readonly=r.coerceBooleanProperty(t.readonly.currentValue)),t.invalid&&(this.invalid=r.coerceBooleanProperty(t.invalid.currentValue)),t.disabled&&(this.disabled=r.coerceBooleanProperty(t.disabled.currentValue)),t.countcharacters&&(this.countcharacters=r.coerceBooleanProperty(t.countcharacters.currentValue)),t.value&&(this._empty=null==this.value||""===this.value),t.type&&this._validateType()},t.prototype.focus=function(t,e){void 0===t&&(t="program"),"text"===this.type?this._focusMonitor.focusVia(this._getInputElement(),t,e):"textarea"===this.type&&this._focusMonitor.focusVia(this._getTextareaElement(),t,e)},t.prototype._togglePassword=function(){this._passwordToggled?(this._passwordToggled=!1,this.type="password",this._passwordFieldIcon="view"):(this._passwordToggled=!0,this.type="text",this._passwordFieldIcon="view-disabled")},t.prototype._onKeyUp=function(t){var e=t.target;this._applyCharacterCount(e.value),this._empty=null==e.value||""===e.value,this.valueChange.emit(e.value)},t.prototype._onInput=function(t){var e=t.target;this._empty=null==e.value||""===e.value,this.valueChange.emit(e.value)},t.prototype._validateType=function(){if(Bt.indexOf(this.type)<0)throw this._supported=!1,Error('Input type "'+this.type+"\" isn't supported by graniteInputField.")},t.prototype._applyCharacterCount=function(t){this.countcharacters&&(this._currentCharCount=t.length,this._currentCharCount>this.maxlength&&(t=t.slice(0,this.maxlength),this._currentCharCount=this.maxlength))},t.prototype._getInputElement=function(){return this._inputElement.nativeElement},t.prototype._getTextareaElement=function(){return this._textareaElement.nativeElement},t}();zt.decorators=[{type:e.Component,args:[{selector:"granite-input-field",exportAs:"graniteInputField",template:'<div\n *ngIf="_supported"\n class="granite-input-container"\n [class.granite-input-disabled]="disabled"\n [class.granite-input-readonly]="readonly"\n [class.granite-input-disabled]="disabled"\n [class.granite-input-readonly]="readonly"\n>\n <div\n class="granite-input-top-row"\n [class.granite-input-required]="required"\n [class.granite-input-empty]="_empty"\n [class.granite-input-disabled]="disabled"\n [class.granite-input-readonly]="readonly"\n >\n <div\n *ngIf="prefixicon"\n class="granite-input-prepend"\n [class.granite-input-required]="required"\n [class.granite-input-empty]="_empty"\n >\n <granite-icon class="granite-input-prepend-icon">\n {{ prefixicon }}\n </granite-icon>\n </div>\n\n <ng-container\n *ngIf="type != \'textarea\'; then inputElement; else textareaElement"\n ></ng-container>\n\n <ng-template #inputElement>\n <input\n #input\n [id]="id"\n class="granite-input-base"\n [class.granite-input-invalid]="invalid"\n [class.granite-input-empty]="_empty"\n [name]="name"\n [attr.type]="type"\n [required]="required"\n [readonly]="readonly"\n [disabled]="disabled"\n [placeholder]="placeholder"\n [attr.maxlength]="maxlength"\n [value]="value"\n [attr.aria-label]="ariaLabel"\n [attr.aria-labelledby]="ariaLabelledby"\n [attr.aria-invalid]="invalid"\n (keyup)="_onKeyUp($event)"\n (input)="_onInput($event)"\n />\n </ng-template>\n\n <button\n *ngIf="_passwordField"\n class="granite-input-append"\n [class.granite-input-required]="required"\n [class.granite-input-empty]="_empty"\n (click)="_togglePassword()"\n >\n <granite-icon class="granite-input-password-toggle-icon">\n {{ _passwordFieldIcon }}\n </granite-icon>\n </button>\n\n <ng-template #textareaElement>\n <textarea\n #textarea\n [id]="id"\n class="granite-input-base granite-text-area"\n [class.granite-input-invalid]="invalid"\n [class.granite-input-empty]="_empty"\n rows="1"\n [name]="name"\n [attr.type]="type"\n [required]="required"\n [readonly]="readonly"\n [disabled]="disabled"\n [placeholder]="placeholder"\n [value]="value"\n [attr.maxlength]="maxlength"\n [attr.aria-label]="ariaLabel"\n [attr.aria-labelledby]="ariaLabelledby"\n [attr.aria-required]="required"\n [attr.aria-invalid]="invalid"\n (keyup)="_onKeyUp($event)"\n (input)="_onInput($event)"\n ></textarea>\n </ng-template>\n\n <div\n class="granite-input-hover-bar"\n [class.granite-input-invalid]="invalid"\n [class.granite-input-empty]="_empty"\n ></div>\n </div>\n\n <div *ngIf="countcharacters" class="granite-input-bottom-row">\n <div class="granite-input-char-count">\n {{ _currentCharCount }}/{{ maxlength }}\n </div>\n </div>\n</div>\n',host:{class:"granite-input-field"},changeDetection:e.ChangeDetectionStrategy.OnPush,styles:[":host{transition:all .2s ease-out;width:calc(var(--granite-spacing-3-xl) * 3.625);height:var(--granite-spacing-xl);box-sizing:border-box}:host *,:host :after,:host :before{box-sizing:inherit}.granite-input-container{height:inherit;width:inherit;font-size:var(--granite-font-size-body-small)}.granite-input-container .granite-input-top-row{display:inline-flex;width:inherit;height:inherit;position:relative;background:var(--granite-color-background)}.granite-input-container .granite-input-top-row:hover .granite-input-hover-bar{height:calc(var(--granite-spacing-xs)/2)}.granite-input-container .granite-input-top-row:hover .granite-input-hover-bar.granite-input-invalid.granite-input-empty{background-color:var(--granite-color-focus)}.granite-input-container .granite-input-top-row .granite-text-area{min-width:calc(var(--granite-spacing-3-xl) * 3.625);min-height:var(--granite-spacing-xl)}.granite-input-container .granite-input-top-row.granite-input-disabled,.granite-input-container .granite-input-top-row.granite-input-readonly{background-color:transparent;box-shadow:none}.granite-input-container .granite-input-top-row.granite-input-disabled .granite-input-hover-bar,.granite-input-container .granite-input-top-row.granite-input-readonly .granite-input-hover-bar{background-color:transparent}.granite-input-container .granite-input-top-row .granite-input-base{-webkit-appearance:none;-moz-appearance:none;appearance:none;outline:none;border:none;background-color:var(--granite-color-background-input);padding:var(--granite-spacing-s);width:inherit;height:inherit;color:var(--granite-color-text);font:inherit;font-weight:var(--granite-font-weight-regular);line-height:100%}.granite-input-container .granite-input-top-row .granite-input-base:required.granite-input-empty{background-color:var(--granite-color-background-failure)}.granite-input-container .granite-input-top-row .granite-input-base:required::-moz-placeholder{color:var(--granite-color-text-weak)}.granite-input-container .granite-input-top-row .granite-input-base:required:-ms-input-placeholder{color:var(--granite-color-text-weak)}.granite-input-container .granite-input-top-row .granite-input-base:required::placeholder{color:var(--granite-color-text-weak)}.granite-input-container .granite-input-top-row .granite-input-base:-moz-read-only{background-color:transparent}.granite-input-container .granite-input-top-row .granite-input-base:read-only{background-color:transparent}.granite-input-container .granite-input-top-row .granite-input-base:disabled{opacity:.3}.granite-input-container .granite-input-top-row .granite-input-base::-moz-placeholder{color:var(--granite-color-text-hint)}.granite-input-container .granite-input-top-row .granite-input-base:-ms-input-placeholder{color:var(--granite-color-text-hint)}.granite-input-container .granite-input-top-row .granite-input-base::placeholder{color:var(--granite-color-text-hint)}.granite-input-container .granite-input-top-row .granite-input-base:hover::-moz-placeholder{color:var(--granite-color-text)}.granite-input-container .granite-input-top-row .granite-input-base:hover:-ms-input-placeholder{color:var(--granite-color-text)}.granite-input-container .granite-input-top-row .granite-input-base:hover::placeholder{color:var(--granite-color-text)}.granite-input-container .granite-input-top-row .granite-input-base:focus{box-shadow:inset 0 calc(var(--granite-spacing-xs)/2) var(--granite-color-focus),inset calc(var(--granite-spacing-xs)/2) 0 var(--granite-color-focus),inset calc(var(--granite-spacing-xs)/2 * -1) 0 var(--granite-color-focus),inset 0 calc(var(--granite-spacing-xs)/2 * -1) var(--granite-color-focus)}.granite-input-container .granite-input-top-row .granite-input-base:focus.granite-input-invalid{box-shadow:inset 0 calc(var(--granite-spacing-xs)/2 * -1) var(--granite-color-signal-failure),inset 0 calc(var(--granite-spacing-xs)/2) var(--granite-color-focus),inset calc(var(--granite-spacing-xs)/2) 0 var(--granite-color-focus),inset calc(var(--granite-spacing-xs)/2 * -1) 0 var(--granite-color-focus)}.granite-input-container .granite-input-top-row .granite-input-base:focus::-moz-placeholder{color:transparent}.granite-input-container .granite-input-top-row .granite-input-base:focus:-ms-input-placeholder{color:transparent}.granite-input-container .granite-input-top-row .granite-input-base:focus::placeholder{color:transparent}.granite-input-container .granite-input-top-row .granite-input-hover-bar{height:calc(var(--granite-spacing-xs)/4);background-color:var(--granite-color-border-hard);position:absolute;width:inherit;bottom:0}.granite-input-container .granite-input-top-row .granite-input-hover-bar.granite-input-invalid{background-color:var(--granite-color-signal-failure)}.granite-input-container .granite-input-top-row:focus-within .granite-input-hover-bar{background-color:transparent}.granite-input-container .granite-input-prepend{display:flex;align-items:center;padding:0 var(--granite-spacing-s);background:var(--granite-color-background-input)}.granite-input-container .granite-input-prepend .granite-input-prepend-icon{width:var(--granite-spacing-m);height:var(--granite-spacing-m);color:var(--granite-color-text);box-shadow:none}.granite-input-container .granite-input-prepend.granite-input-required.granite-input-empty{background-color:var(--granite-color-background-failure)}.granite-input-container .granite-input-append{-webkit-appearance:none;-moz-appearance:none;appearance:none;outline:none;border:none;background-color:var(--granite-color-background-input);position:relative}.granite-input-container .granite-input-append:focus{box-shadow:inset 0 calc(var(--granite-spacing-xs)/2) var(--granite-color-focus),inset calc(var(--granite-spacing-xs)/2) 0 var(--granite-color-focus),inset calc(var(--granite-spacing-xs)/2 * -1) 0 var(--granite-color-focus),inset 0 calc(var(--granite-spacing-xs)/2 * -1) var(--granite-color-focus)}.granite-input-container .granite-input-append .granite-input-password-toggle-icon{width:-webkit-max-content;width:-moz-max-content;width:max-content;height:-webkit-max-content;height:-moz-max-content;height:max-content;color:var(--granite-color-text);box-shadow:none}.granite-input-container .granite-input-append.granite-input-required.granite-input-empty{background-color:var(--granite-color-background-failure)}.granite-input-container .granite-input-bottom-row{box-shadow:none}.granite-input-container .granite-input-char-count{background:var(--granite-color-background-warning);border-radius:0 0 var(--granite-spacing-xs) var(--granite-spacing-xs);padding:var(--granite-spacing-s);background-size:contain;width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;box-shadow:none}.granite-input-container.granite-input-disabled,.granite-input-container.granite-input-readonly{background-color:transparent}"]}]}],zt.ctorParameters=function(){return[{type:l.FocusMonitor}]},zt.propDecorators={id:[{type:e.Input}],name:[{type:e.Input}],type:[{type:e.Input}],value:[{type:e.Input}],required:[{type:e.Input}],readonly:[{type:e.Input}],invalid:[{type:e.Input}],disabled:[{type:e.Input}],placeholder:[{type:e.Input}],prefixicon:[{type:e.Input}],maxlength:[{type:e.Input}],countcharacters:[{type:e.Input}],ariaLabel:[{type:e.Input,args:["aria-label"]}],ariaLabelledby:[{type:e.Input,args:["aria-labelledby"]}],valueChange:[{type:e.Output}],_inputElement:[{type:e.ViewChild,args:["input"]}],_textareaElement:[{type:e.ViewChild,args:["textarea"]}]};var Lt=function(){};Lt.decorators=[{type:e.NgModule,args:[{imports:[n.CommonModule,pt,It],declarations:[zt],exports:[zt]}]}];var qt=ot.output,Gt=function(){};Gt.decorators=[{type:e.Directive,args:[{selector:"[graniteClientOutputDesktop]",providers:[{provide:it,useValue:qt}]}]}];var Xt=at.output,Ft=function(){};Ft.decorators=[{type:e.Directive,args:[{selector:"[graniteClientOutputTouch]",providers:[{provide:it,useValue:Xt}]}]}];var jt=ot.input,Vt=function(){};Vt.decorators=[{type:e.Directive,args:[{selector:"[graniteClientInputDesktop]",providers:[{provide:rt,useValue:jt}]}]}];var Ht=at.input,Yt=function(){};Yt.decorators=[{type:e.Directive,args:[{selector:"[graniteClientInputTouch]",providers:[{provide:rt,useValue:Ht}]}]}];var Nt=function(){};Nt.decorators=[{type:e.NgModule,args:[{declarations:[Gt,Ft,Vt,Yt],exports:[Gt,Ft,Vt,Yt]}]}],t.ClientInputDesktopDirective=Vt,t.ClientInputTouchDirective=Yt,t.ClientOutputDesktopDirective=Gt,t.ClientOutputTouchDirective=Ft,t.GRANITE_CLIENT_INPUT=rt,t.GRANITE_CLIENT_OUTPUT=it,t.GraniteAnchorComponent=Ct,t.GraniteArrangeGridComponent=f,t.GraniteArrangeGridItemComponent=v,t.GraniteArrangeGridModule=y,t.GraniteBadgeComponent=D,t.GraniteBadgeHarness=A,t.GraniteBadgeModule=P,t.GraniteButtonComponent=xt,t.GraniteButtonModule=It,t.GraniteCoreModule=Nt,t.GraniteDividerDirective=gt,t.GraniteGridComponent=w,t.GraniteGridItemComponent=_,t.GraniteGridModule=k,t.GraniteIconComponent=dt,t.GraniteIconModule=pt,t.GraniteInputFieldComponent=zt,t.GraniteInputFieldModule=Lt,t.GraniteMenuComponent=nt,t.GraniteMenuHarness=mt,t.GraniteMenuItemComponent=B,t.GraniteMenuItemHarness=bt,t.GraniteMenuModule=ht,t.GraniteMenuTouchCloseComponent=lt,t.GraniteMenuTouchTitleItemComponent=ut,t.GraniteMenuTriggerForDirective=ct,t.GraniteRadioButtonComponent=yt,t.GraniteRadioButtonModule=_t,t.GraniteTableColumnDirective=Mt,t.GraniteTableComponent=Tt,t.GraniteTableModule=Rt,t.GraniteToggleSwitchComponent=vt,t.GraniteToggleSwitchModule=ft,t._MenuBaseComponent=et,t.deviceDesktop=ot,t.deviceTouch=at,t.disabledMixin=kt,t.graniteMenuDesktopAnimations=G,t.graniteMenuTouchAnimations=Z,t.ɵ0=Xt,t.ɵa=R,t.ɵc=z,t.ɵd=L,t.ɵe=Et,t.ɵf=Ot,t.ɵg=Dt,t.ɵh=At,t.ɵi=Pt,Object.defineProperty(t,"__esModule",{value:!0})}));
25
25
  //# sourceMappingURL=ifsworld-granite-components.umd.min.js.map