1 line
46 KiB
JavaScript
1 line
46 KiB
JavaScript
function _toConsumableArray(t){return _arrayWithoutHoles(t)||_iterableToArray(t)||_unsupportedIterableToArray(t)||_nonIterableSpread()}function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _iterableToArray(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}function _arrayWithoutHoles(t){if(Array.isArray(t))return _arrayLikeToArray(t)}function _createForOfIteratorHelper(t){if("undefined"==typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(t=_unsupportedIterableToArray(t))){var e=0,i=function(){};return{s:i,n:function(){return e>=t.length?{done:!0}:{done:!1,value:t[e++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var n,r,o=!0,s=!1;return{s:function(){n=t[Symbol.iterator]()},n:function(){var t=n.next();return o=t.done,t},e:function(t){s=!0,r=t},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw r}}}}function _unsupportedIterableToArray(t,e){if(t){if("string"==typeof t)return _arrayLikeToArray(t,e);var i=Object.prototype.toString.call(t).slice(8,-1);return"Object"===i&&t.constructor&&(i=t.constructor.name),"Map"===i||"Set"===i?Array.from(i):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?_arrayLikeToArray(t,e):void 0}}function _arrayLikeToArray(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,n=new Array(e);i<e;i++)n[i]=t[i];return n}function _get(t,e,i){return(_get="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,i){var n=_superPropBase(t,e);if(n){var r=Object.getOwnPropertyDescriptor(n,e);return r.get?r.get.call(i):r.value}})(t,e,i||t)}function _superPropBase(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=_getPrototypeOf(t)););return t}function _classCallCheck(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function _defineProperties(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function _createClass(t,e,i){return e&&_defineProperties(t.prototype,e),i&&_defineProperties(t,i),t}function _createSuper(t){return function(){var e,i=_getPrototypeOf(t);if(_isNativeReflectConstruct()){var n=_getPrototypeOf(this).constructor;e=Reflect.construct(i,arguments,n)}else e=i.apply(this,arguments);return _possibleConstructorReturn(this,e)}}function _possibleConstructorReturn(t,e){return!e||"object"!=typeof e&&"function"!=typeof e?_assertThisInitialized(t):e}function _assertThisInitialized(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function _isNativeReflectConstruct(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}function _getPrototypeOf(t){return(_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function _inherits(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&_setPrototypeOf(t,e)}function _setPrototypeOf(t,e){return(_setPrototypeOf=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}(window.webpackJsonp=window.webpackJsonp||[]).push([[2],{"+0xr":function(t,e,i){"use strict";i.d(e,"a",(function(){return It})),i.d(e,"b",(function(){return Ct})),i.d(e,"c",(function(){return Tt})),i.d(e,"d",(function(){return xt})),i.d(e,"e",(function(){return St})),i.d(e,"f",(function(){return Ft})),i.d(e,"g",(function(){return At})),i.d(e,"h",(function(){return Nt})),i.d(e,"i",(function(){return Ht})),i.d(e,"j",(function(){return gt})),i.d(e,"k",(function(){return Lt}));var n=i("8LU1"),r=i("0EQZ"),o=i("fXoL"),s=i("cH1L"),a=i("nLfN"),c=i("ofXK"),l=i("XNiG"),u=i("2Vo4"),h=i("7+OI"),f=i("LRne"),d=i("1G5W"),_=[[["caption"]]],p=["caption"];function y(t){return function(t){_inherits(i,t);var e=_createSuper(i);function i(){var t;_classCallCheck(this,i);for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(t=e.call.apply(e,[this].concat(r)))._sticky=!1,t._hasStickyChanged=!1,t}return _createClass(i,[{key:"hasStickyChanged",value:function(){var t=this._hasStickyChanged;return this._hasStickyChanged=!1,t}},{key:"resetStickyChanged",value:function(){this._hasStickyChanged=!1}},{key:"sticky",get:function(){return this._sticky},set:function(t){var e=this._sticky;this._sticky=Object(n.c)(t),this._hasStickyChanged=e!==this._sticky}}]),i}(t)}var m,v,w,b,k,g,R,C,D,S,O,T,E,x=new o.s("CDK_TABLE"),I=((w=function t(e){_classCallCheck(this,t),this.template=e}).\u0275fac=function(t){return new(t||w)(o.Rb(o.N))},w.\u0275dir=o.Mb({type:w,selectors:[["","cdkCellDef",""]]}),w),A=((v=function t(e){_classCallCheck(this,t),this.template=e}).\u0275fac=function(t){return new(t||v)(o.Rb(o.N))},v.\u0275dir=o.Mb({type:v,selectors:[["","cdkHeaderCellDef",""]]}),v),j=((m=function t(e){_classCallCheck(this,t),this.template=e}).\u0275fac=function(t){return new(t||m)(o.Rb(o.N))},m.\u0275dir=o.Mb({type:m,selectors:[["","cdkFooterCellDef",""]]}),m),H=y((function t(){_classCallCheck(this,t)})),P=((b=function(t){_inherits(i,t);var e=_createSuper(i);function i(t){var n;return _classCallCheck(this,i),(n=e.call(this))._table=t,n._stickyEnd=!1,n}return _createClass(i,[{key:"name",get:function(){return this._name},set:function(t){t&&(this._name=t,this.cssClassFriendlyName=t.replace(/[^a-z0-9_-]/gi,"-"))}},{key:"stickyEnd",get:function(){return this._stickyEnd},set:function(t){var e=this._stickyEnd;this._stickyEnd=Object(n.c)(t),this._hasStickyChanged=e!==this._stickyEnd}}]),i}(H)).\u0275fac=function(t){return new(t||b)(o.Rb(x,8))},b.\u0275dir=o.Mb({type:b,selectors:[["","cdkColumnDef",""]],contentQueries:function(t,e,i){var n;1&t&&(o.Kb(i,I,!0),o.Kb(i,A,!0),o.Kb(i,j,!0)),2&t&&(o.qc(n=o.gc())&&(e.cell=n.first),o.qc(n=o.gc())&&(e.headerCell=n.first),o.qc(n=o.gc())&&(e.footerCell=n.first))},inputs:{sticky:"sticky",name:["cdkColumnDef","name"],stickyEnd:"stickyEnd"},features:[o.Db([{provide:"MAT_SORT_HEADER_COLUMN_DEF",useExisting:b}]),o.Bb]}),b),F=function t(e,i){_classCallCheck(this,t),i.nativeElement.classList.add("cdk-column-".concat(e.cssClassFriendlyName))},M=((R=function(t){_inherits(i,t);var e=_createSuper(i);function i(t,n){return _classCallCheck(this,i),e.call(this,t,n)}return i}(F)).\u0275fac=function(t){return new(t||R)(o.Rb(P),o.Rb(o.m))},R.\u0275dir=o.Mb({type:R,selectors:[["cdk-header-cell"],["th","cdk-header-cell",""]],hostAttrs:["role","columnheader",1,"cdk-header-cell"],features:[o.Bb]}),R),N=((g=function(t){_inherits(i,t);var e=_createSuper(i);function i(t,n){return _classCallCheck(this,i),e.call(this,t,n)}return i}(F)).\u0275fac=function(t){return new(t||g)(o.Rb(P),o.Rb(o.m))},g.\u0275dir=o.Mb({type:g,selectors:[["cdk-cell"],["td","cdk-cell",""]],hostAttrs:["role","gridcell",1,"cdk-cell"],features:[o.Bb]}),g),B=((k=function(){function t(e,i){_classCallCheck(this,t),this.template=e,this._differs=i}return _createClass(t,[{key:"ngOnChanges",value:function(t){if(!this._columnsDiffer){var e=t.columns&&t.columns.currentValue||[];this._columnsDiffer=this._differs.find(e).create(),this._columnsDiffer.diff(e)}}},{key:"getColumnsDiff",value:function(){return this._columnsDiffer.diff(this.columns)}},{key:"extractCellTemplate",value:function(t){return this instanceof X?t.headerCell.template:this instanceof Z?t.footerCell.template:t.cell.template}}]),t}()).\u0275fac=function(t){o.ec()},k.\u0275dir=o.Mb({type:k,features:[o.Cb]}),k),L=y(function(t){_inherits(i,t);var e=_createSuper(i);function i(){return _classCallCheck(this,i),e.apply(this,arguments)}return i}(B)),X=((C=function(t){_inherits(i,t);var e=_createSuper(i);function i(t,n,r){var o;return _classCallCheck(this,i),(o=e.call(this,t,n))._table=r,o}return _createClass(i,[{key:"ngOnChanges",value:function(t){_get(_getPrototypeOf(i.prototype),"ngOnChanges",this).call(this,t)}}]),i}(L)).\u0275fac=function(t){return new(t||C)(o.Rb(o.N),o.Rb(o.u),o.Rb(x,8))},C.\u0275dir=o.Mb({type:C,selectors:[["","cdkHeaderRowDef",""]],inputs:{columns:["cdkHeaderRowDef","columns"],sticky:["cdkHeaderRowDefSticky","sticky"]},features:[o.Bb,o.Cb]}),C),V=y(function(t){_inherits(i,t);var e=_createSuper(i);function i(){return _classCallCheck(this,i),e.apply(this,arguments)}return i}(B)),Z=((E=function(t){_inherits(i,t);var e=_createSuper(i);function i(t,n,r){var o;return _classCallCheck(this,i),(o=e.call(this,t,n))._table=r,o}return _createClass(i,[{key:"ngOnChanges",value:function(t){_get(_getPrototypeOf(i.prototype),"ngOnChanges",this).call(this,t)}}]),i}(V)).\u0275fac=function(t){return new(t||E)(o.Rb(o.N),o.Rb(o.u),o.Rb(x,8))},E.\u0275dir=o.Mb({type:E,selectors:[["","cdkFooterRowDef",""]],inputs:{columns:["cdkFooterRowDef","columns"],sticky:["cdkFooterRowDefSticky","sticky"]},features:[o.Bb,o.Cb]}),E),G=((T=function(t){_inherits(i,t);var e=_createSuper(i);function i(t,n,r){var o;return _classCallCheck(this,i),(o=e.call(this,t,n))._table=r,o}return i}(B)).\u0275fac=function(t){return new(t||T)(o.Rb(o.N),o.Rb(o.u),o.Rb(x,8))},T.\u0275dir=o.Mb({type:T,selectors:[["","cdkRowDef",""]],inputs:{columns:["cdkRowDefColumns","columns"],when:["cdkRowDefWhen","when"]},features:[o.Bb]}),T),K=((O=function(){function t(e){_classCallCheck(this,t),this._viewContainer=e,t.mostRecentCellOutlet=this}return _createClass(t,[{key:"ngOnDestroy",value:function(){t.mostRecentCellOutlet===this&&(t.mostRecentCellOutlet=null)}}]),t}()).\u0275fac=function(t){return new(t||O)(o.Rb(o.Q))},O.\u0275dir=o.Mb({type:O,selectors:[["","cdkCellOutlet",""]]}),O.mostRecentCellOutlet=null,O),q=((S=function t(){_classCallCheck(this,t)}).\u0275fac=function(t){return new(t||S)},S.\u0275cmp=o.Lb({type:S,selectors:[["cdk-header-row"],["tr","cdk-header-row",""]],hostAttrs:["role","row",1,"cdk-header-row"],decls:1,vars:0,consts:[["cdkCellOutlet",""]],template:function(t,e){1&t&&o.Tb(0,0)},directives:[K],encapsulation:2}),S),z=((D=function t(){_classCallCheck(this,t)}).\u0275fac=function(t){return new(t||D)},D.\u0275cmp=o.Lb({type:D,selectors:[["cdk-row"],["tr","cdk-row",""]],hostAttrs:["role","row",1,"cdk-row"],decls:1,vars:0,consts:[["cdkCellOutlet",""]],template:function(t,e){1&t&&o.Tb(0,0)},directives:[K],encapsulation:2}),D),U=["top","bottom","left","right"],Y=function(){function t(e,i,n){var r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];_classCallCheck(this,t),this._isNativeHtmlTable=e,this._stickCellCss=i,this.direction=n,this._isBrowser=r}return _createClass(t,[{key:"clearStickyPositioning",value:function(t,e){var i,n=_createForOfIteratorHelper(t);try{for(n.s();!(i=n.n()).done;){var r=i.value;if(r.nodeType===r.ELEMENT_NODE){this._removeStickyStyle(r,e);for(var o=0;o<r.children.length;o++)this._removeStickyStyle(r.children[o],e)}}}catch(s){n.e(s)}finally{n.f()}}},{key:"updateStickyColumns",value:function(t,e,i){var n=e.some((function(t){return t}))||i.some((function(t){return t}));if(t.length&&n&&this._isBrowser){var r,o=t[0],s=o.children.length,a=this._getCellWidths(o),c=this._getStickyStartColumnPositions(a,e),l=this._getStickyEndColumnPositions(a,i),u="rtl"===this.direction,h=_createForOfIteratorHelper(t);try{for(h.s();!(r=h.n()).done;)for(var f=r.value,d=0;d<s;d++){var _=f.children[d];e[d]&&this._addStickyStyle(_,u?"right":"left",c[d]),i[d]&&this._addStickyStyle(_,u?"left":"right",l[d])}}catch(p){h.e(p)}finally{h.f()}}}},{key:"stickRows",value:function(t,e,i){if(this._isBrowser)for(var n="bottom"===i?t.reverse():t,r=0,o=0;o<n.length;o++)if(e[o]){var s=n[o];if(this._isNativeHtmlTable)for(var a=0;a<s.children.length;a++)this._addStickyStyle(s.children[a],i,r);else this._addStickyStyle(s,i,r);if(o===n.length-1)return;r+=s.getBoundingClientRect().height}}},{key:"updateStickyFooterContainer",value:function(t,e){if(this._isNativeHtmlTable){var i=t.querySelector("tfoot");e.some((function(t){return!t}))?this._removeStickyStyle(i,["bottom"]):this._addStickyStyle(i,"bottom",0)}}},{key:"_removeStickyStyle",value:function(t,e){var i,n=_createForOfIteratorHelper(e);try{for(n.s();!(i=n.n()).done;){var r=i.value;t.style[r]=""}}catch(o){n.e(o)}finally{n.f()}t.style.zIndex=this._getCalculatedZIndex(t),U.some((function(e){return!!t.style[e]}))||(t.style.position="",t.classList.remove(this._stickCellCss))}},{key:"_addStickyStyle",value:function(t,e,i){t.classList.add(this._stickCellCss),t.style[e]="".concat(i,"px"),t.style.cssText+="position: -webkit-sticky; position: sticky; ",t.style.zIndex=this._getCalculatedZIndex(t)}},{key:"_getCalculatedZIndex",value:function(t){var e,i={top:100,bottom:10,left:1,right:1},n=0,r=_createForOfIteratorHelper(U);try{for(r.s();!(e=r.n()).done;){var o=e.value;t.style[o]&&(n+=i[o])}}catch(s){r.e(s)}finally{r.f()}return n?"".concat(n):""}},{key:"_getCellWidths",value:function(t){for(var e=[],i=t.children,n=0;n<i.length;n++)e.push(i[n].getBoundingClientRect().width);return e}},{key:"_getStickyStartColumnPositions",value:function(t,e){for(var i=[],n=0,r=0;r<t.length;r++)e[r]&&(i[r]=n,n+=t[r]);return i}},{key:"_getStickyEndColumnPositions",value:function(t,e){for(var i=[],n=0,r=t.length;r>0;r--)e[r]&&(i[r]=n,n+=t[r]);return i}}]),t}();function Q(t){return Error('Could not find column with id "'.concat(t,'".'))}var W,J,$,tt,et=((tt=function t(e,i){_classCallCheck(this,t),this.viewContainer=e,this.elementRef=i}).\u0275fac=function(t){return new(t||tt)(o.Rb(o.Q),o.Rb(o.m))},tt.\u0275dir=o.Mb({type:tt,selectors:[["","rowOutlet",""]]}),tt),it=(($=function t(e,i){_classCallCheck(this,t),this.viewContainer=e,this.elementRef=i}).\u0275fac=function(t){return new(t||$)(o.Rb(o.Q),o.Rb(o.m))},$.\u0275dir=o.Mb({type:$,selectors:[["","headerRowOutlet",""]]}),$),nt=((J=function t(e,i){_classCallCheck(this,t),this.viewContainer=e,this.elementRef=i}).\u0275fac=function(t){return new(t||J)(o.Rb(o.Q),o.Rb(o.m))},J.\u0275dir=o.Mb({type:J,selectors:[["","footerRowOutlet",""]]}),J),rt=((W=function(){function t(e,i,n,r,o,s,a){_classCallCheck(this,t),this._differs=e,this._changeDetectorRef=i,this._elementRef=n,this._dir=o,this._platform=a,this._onDestroy=new l.a,this._columnDefsByName=new Map,this._customColumnDefs=new Set,this._customRowDefs=new Set,this._customHeaderRowDefs=new Set,this._customFooterRowDefs=new Set,this._headerRowDefChanged=!0,this._footerRowDefChanged=!0,this._cachedRenderRowsMap=new Map,this.stickyCssClass="cdk-table-sticky",this._multiTemplateDataRows=!1,this.viewChange=new u.a({start:0,end:Number.MAX_VALUE}),r||this._elementRef.nativeElement.setAttribute("role","grid"),this._document=s,this._isNativeHtmlTable="TABLE"===this._elementRef.nativeElement.nodeName}return _createClass(t,[{key:"ngOnInit",value:function(){var t=this;this._setupStickyStyler(),this._isNativeHtmlTable&&this._applyNativeTableSections(),this._dataDiffer=this._differs.find([]).create((function(e,i){return t.trackBy?t.trackBy(i.dataIndex,i.data):i}))}},{key:"ngAfterContentChecked",value:function(){if(this._cacheRowDefs(),this._cacheColumnDefs(),!this._headerRowDefs.length&&!this._footerRowDefs.length&&!this._rowDefs.length)throw Error("Missing definitions for header, footer, and row; cannot determine which columns should be rendered.");this._renderUpdatedColumns(),this._headerRowDefChanged&&(this._forceRenderHeaderRows(),this._headerRowDefChanged=!1),this._footerRowDefChanged&&(this._forceRenderFooterRows(),this._footerRowDefChanged=!1),this.dataSource&&this._rowDefs.length>0&&!this._renderChangeSubscription&&this._observeRenderChanges(),this._checkStickyStates()}},{key:"ngOnDestroy",value:function(){this._rowOutlet.viewContainer.clear(),this._headerRowOutlet.viewContainer.clear(),this._footerRowOutlet.viewContainer.clear(),this._cachedRenderRowsMap.clear(),this._onDestroy.next(),this._onDestroy.complete(),Object(r.d)(this.dataSource)&&this.dataSource.disconnect(this)}},{key:"renderRows",value:function(){var t=this;this._renderRows=this._getAllRenderRows();var e=this._dataDiffer.diff(this._renderRows);if(e){var i=this._rowOutlet.viewContainer;e.forEachOperation((function(e,n,r){if(null==e.previousIndex)t._insertRow(e.item,r);else if(null==r)i.remove(n);else{var o=i.get(n);i.move(o,r)}})),this._updateRowIndexContext(),e.forEachIdentityChange((function(t){i.get(t.currentIndex).context.$implicit=t.item.data})),this.updateStickyColumnStyles()}}},{key:"setHeaderRowDef",value:function(t){this._customHeaderRowDefs=new Set([t]),this._headerRowDefChanged=!0}},{key:"setFooterRowDef",value:function(t){this._customFooterRowDefs=new Set([t]),this._footerRowDefChanged=!0}},{key:"addColumnDef",value:function(t){this._customColumnDefs.add(t)}},{key:"removeColumnDef",value:function(t){this._customColumnDefs.delete(t)}},{key:"addRowDef",value:function(t){this._customRowDefs.add(t)}},{key:"removeRowDef",value:function(t){this._customRowDefs.delete(t)}},{key:"addHeaderRowDef",value:function(t){this._customHeaderRowDefs.add(t),this._headerRowDefChanged=!0}},{key:"removeHeaderRowDef",value:function(t){this._customHeaderRowDefs.delete(t),this._headerRowDefChanged=!0}},{key:"addFooterRowDef",value:function(t){this._customFooterRowDefs.add(t),this._footerRowDefChanged=!0}},{key:"removeFooterRowDef",value:function(t){this._customFooterRowDefs.delete(t),this._footerRowDefChanged=!0}},{key:"updateStickyHeaderRowStyles",value:function(){var t=this._getRenderedRows(this._headerRowOutlet),e=this._elementRef.nativeElement.querySelector("thead");e&&(e.style.display=t.length?"":"none");var i=this._headerRowDefs.map((function(t){return t.sticky}));this._stickyStyler.clearStickyPositioning(t,["top"]),this._stickyStyler.stickRows(t,i,"top"),this._headerRowDefs.forEach((function(t){return t.resetStickyChanged()}))}},{key:"updateStickyFooterRowStyles",value:function(){var t=this._getRenderedRows(this._footerRowOutlet),e=this._elementRef.nativeElement.querySelector("tfoot");e&&(e.style.display=t.length?"":"none");var i=this._footerRowDefs.map((function(t){return t.sticky}));this._stickyStyler.clearStickyPositioning(t,["bottom"]),this._stickyStyler.stickRows(t,i,"bottom"),this._stickyStyler.updateStickyFooterContainer(this._elementRef.nativeElement,i),this._footerRowDefs.forEach((function(t){return t.resetStickyChanged()}))}},{key:"updateStickyColumnStyles",value:function(){var t=this,e=this._getRenderedRows(this._headerRowOutlet),i=this._getRenderedRows(this._rowOutlet),n=this._getRenderedRows(this._footerRowOutlet);this._stickyStyler.clearStickyPositioning([].concat(_toConsumableArray(e),_toConsumableArray(i),_toConsumableArray(n)),["left","right"]),e.forEach((function(e,i){t._addStickyColumnStyles([e],t._headerRowDefs[i])})),this._rowDefs.forEach((function(e){for(var n=[],r=0;r<i.length;r++)t._renderRows[r].rowDef===e&&n.push(i[r]);t._addStickyColumnStyles(n,e)})),n.forEach((function(e,i){t._addStickyColumnStyles([e],t._footerRowDefs[i])})),Array.from(this._columnDefsByName.values()).forEach((function(t){return t.resetStickyChanged()}))}},{key:"_getAllRenderRows",value:function(){var t=[],e=this._cachedRenderRowsMap;this._cachedRenderRowsMap=new Map;for(var i=0;i<this._data.length;i++){var n=this._data[i],r=this._getRenderRowsForData(n,i,e.get(n));this._cachedRenderRowsMap.has(n)||this._cachedRenderRowsMap.set(n,new WeakMap);for(var o=0;o<r.length;o++){var s=r[o],a=this._cachedRenderRowsMap.get(s.data);a.has(s.rowDef)?a.get(s.rowDef).push(s):a.set(s.rowDef,[s]),t.push(s)}}return t}},{key:"_getRenderRowsForData",value:function(t,e,i){return this._getRowDefs(t,e).map((function(n){var r=i&&i.has(n)?i.get(n):[];if(r.length){var o=r.shift();return o.dataIndex=e,o}return{data:t,rowDef:n,dataIndex:e}}))}},{key:"_cacheColumnDefs",value:function(){var t=this;this._columnDefsByName.clear(),ot(this._getOwnDefs(this._contentColumnDefs),this._customColumnDefs).forEach((function(e){if(t._columnDefsByName.has(e.name))throw Error('Duplicate column definition name provided: "'.concat(e.name,'".'));t._columnDefsByName.set(e.name,e)}))}},{key:"_cacheRowDefs",value:function(){this._headerRowDefs=ot(this._getOwnDefs(this._contentHeaderRowDefs),this._customHeaderRowDefs),this._footerRowDefs=ot(this._getOwnDefs(this._contentFooterRowDefs),this._customFooterRowDefs),this._rowDefs=ot(this._getOwnDefs(this._contentRowDefs),this._customRowDefs);var t=this._rowDefs.filter((function(t){return!t.when}));if(!this.multiTemplateDataRows&&t.length>1)throw Error("There can only be one default row without a when predicate function.");this._defaultRowDef=t[0]}},{key:"_renderUpdatedColumns",value:function(){var t=function(t,e){return t||!!e.getColumnsDiff()};this._rowDefs.reduce(t,!1)&&this._forceRenderDataRows(),this._headerRowDefs.reduce(t,!1)&&this._forceRenderHeaderRows(),this._footerRowDefs.reduce(t,!1)&&this._forceRenderFooterRows()}},{key:"_switchDataSource",value:function(t){this._data=[],Object(r.d)(this.dataSource)&&this.dataSource.disconnect(this),this._renderChangeSubscription&&(this._renderChangeSubscription.unsubscribe(),this._renderChangeSubscription=null),t||(this._dataDiffer&&this._dataDiffer.diff([]),this._rowOutlet.viewContainer.clear()),this._dataSource=t}},{key:"_observeRenderChanges",value:function(){var t=this;if(this.dataSource){var e;if(Object(r.d)(this.dataSource)?e=this.dataSource.connect(this):Object(h.a)(this.dataSource)?e=this.dataSource:Array.isArray(this.dataSource)&&(e=Object(f.a)(this.dataSource)),void 0===e)throw Error("Provided data source did not match an array, Observable, or DataSource");this._renderChangeSubscription=e.pipe(Object(d.a)(this._onDestroy)).subscribe((function(e){t._data=e||[],t.renderRows()}))}}},{key:"_forceRenderHeaderRows",value:function(){var t=this;this._headerRowOutlet.viewContainer.length>0&&this._headerRowOutlet.viewContainer.clear(),this._headerRowDefs.forEach((function(e,i){return t._renderRow(t._headerRowOutlet,e,i)})),this.updateStickyHeaderRowStyles(),this.updateStickyColumnStyles()}},{key:"_forceRenderFooterRows",value:function(){var t=this;this._footerRowOutlet.viewContainer.length>0&&this._footerRowOutlet.viewContainer.clear(),this._footerRowDefs.forEach((function(e,i){return t._renderRow(t._footerRowOutlet,e,i)})),this.updateStickyFooterRowStyles(),this.updateStickyColumnStyles()}},{key:"_addStickyColumnStyles",value:function(t,e){var i=this,n=Array.from(e.columns||[]).map((function(t){var e=i._columnDefsByName.get(t);if(!e)throw Q(t);return e})),r=n.map((function(t){return t.sticky})),o=n.map((function(t){return t.stickyEnd}));this._stickyStyler.updateStickyColumns(t,r,o)}},{key:"_getRenderedRows",value:function(t){for(var e=[],i=0;i<t.viewContainer.length;i++){var n=t.viewContainer.get(i);e.push(n.rootNodes[0])}return e}},{key:"_getRowDefs",value:function(t,e){if(1==this._rowDefs.length)return[this._rowDefs[0]];var i=[];if(this.multiTemplateDataRows)i=this._rowDefs.filter((function(i){return!i.when||i.when(e,t)}));else{var n=this._rowDefs.find((function(i){return i.when&&i.when(e,t)}))||this._defaultRowDef;n&&i.push(n)}if(!i.length)throw function(t){return Error("Could not find a matching row definition for the"+"provided row data: ".concat(JSON.stringify(t)))}(t);return i}},{key:"_insertRow",value:function(t,e){this._renderRow(this._rowOutlet,t.rowDef,e,{$implicit:t.data})}},{key:"_renderRow",value:function(t,e,i){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};t.viewContainer.createEmbeddedView(e.template,n,i);var r,o=_createForOfIteratorHelper(this._getCellTemplates(e));try{for(o.s();!(r=o.n()).done;){var s=r.value;K.mostRecentCellOutlet&&K.mostRecentCellOutlet._viewContainer.createEmbeddedView(s,n)}}catch(a){o.e(a)}finally{o.f()}this._changeDetectorRef.markForCheck()}},{key:"_updateRowIndexContext",value:function(){for(var t=this._rowOutlet.viewContainer,e=0,i=t.length;e<i;e++){var n=t.get(e).context;n.count=i,n.first=0===e,n.last=e===i-1,n.even=e%2==0,n.odd=!n.even,this.multiTemplateDataRows?(n.dataIndex=this._renderRows[e].dataIndex,n.renderIndex=e):n.index=this._renderRows[e].dataIndex}}},{key:"_getCellTemplates",value:function(t){var e=this;return t&&t.columns?Array.from(t.columns,(function(i){var n=e._columnDefsByName.get(i);if(!n)throw Q(i);return t.extractCellTemplate(n)})):[]}},{key:"_applyNativeTableSections",value:function(){for(var t=this._document.createDocumentFragment(),e=0,i=[{tag:"thead",outlet:this._headerRowOutlet},{tag:"tbody",outlet:this._rowOutlet},{tag:"tfoot",outlet:this._footerRowOutlet}];e<i.length;e++){var n=i[e],r=this._document.createElement(n.tag);r.setAttribute("role","rowgroup"),r.appendChild(n.outlet.elementRef.nativeElement),t.appendChild(r)}this._elementRef.nativeElement.appendChild(t)}},{key:"_forceRenderDataRows",value:function(){this._dataDiffer.diff([]),this._rowOutlet.viewContainer.clear(),this.renderRows(),this.updateStickyColumnStyles()}},{key:"_checkStickyStates",value:function(){var t=function(t,e){return t||e.hasStickyChanged()};this._headerRowDefs.reduce(t,!1)&&this.updateStickyHeaderRowStyles(),this._footerRowDefs.reduce(t,!1)&&this.updateStickyFooterRowStyles(),Array.from(this._columnDefsByName.values()).reduce(t,!1)&&this.updateStickyColumnStyles()}},{key:"_setupStickyStyler",value:function(){var t=this;this._stickyStyler=new Y(this._isNativeHtmlTable,this.stickyCssClass,this._dir?this._dir.value:"ltr",this._platform.isBrowser),(this._dir?this._dir.change:Object(f.a)()).pipe(Object(d.a)(this._onDestroy)).subscribe((function(e){t._stickyStyler.direction=e,t.updateStickyColumnStyles()}))}},{key:"_getOwnDefs",value:function(t){var e=this;return t.filter((function(t){return!t._table||t._table===e}))}},{key:"trackBy",get:function(){return this._trackByFn},set:function(t){Object(o.Y)()&&null!=t&&"function"!=typeof t&&console&&console.warn&&console.warn("trackBy must be a function, but received ".concat(JSON.stringify(t),".")),this._trackByFn=t}},{key:"dataSource",get:function(){return this._dataSource},set:function(t){this._dataSource!==t&&this._switchDataSource(t)}},{key:"multiTemplateDataRows",get:function(){return this._multiTemplateDataRows},set:function(t){this._multiTemplateDataRows=Object(n.c)(t),this._rowOutlet&&this._rowOutlet.viewContainer.length&&this._forceRenderDataRows()}}]),t}()).\u0275fac=function(t){return new(t||W)(o.Rb(o.u),o.Rb(o.i),o.Rb(o.m),o.cc("role"),o.Rb(s.b,8),o.Rb(c.d),o.Rb(a.a))},W.\u0275cmp=o.Lb({type:W,selectors:[["cdk-table"],["table","cdk-table",""]],contentQueries:function(t,e,i){var n;1&t&&(o.Kb(i,P,!0),o.Kb(i,G,!0),o.Kb(i,X,!0),o.Kb(i,Z,!0)),2&t&&(o.qc(n=o.gc())&&(e._contentColumnDefs=n),o.qc(n=o.gc())&&(e._contentRowDefs=n),o.qc(n=o.gc())&&(e._contentHeaderRowDefs=n),o.qc(n=o.gc())&&(e._contentFooterRowDefs=n))},viewQuery:function(t,e){var i;1&t&&(o.zc(et,!0),o.zc(it,!0),o.zc(nt,!0)),2&t&&(o.qc(i=o.gc())&&(e._rowOutlet=i.first),o.qc(i=o.gc())&&(e._headerRowOutlet=i.first),o.qc(i=o.gc())&&(e._footerRowOutlet=i.first))},hostAttrs:[1,"cdk-table"],inputs:{trackBy:"trackBy",dataSource:"dataSource",multiTemplateDataRows:"multiTemplateDataRows"},exportAs:["cdkTable"],features:[o.Db([{provide:x,useExisting:W}])],ngContentSelectors:p,decls:4,vars:0,consts:[["headerRowOutlet",""],["rowOutlet",""],["footerRowOutlet",""]],template:function(t,e){1&t&&(o.nc(_),o.mc(0),o.Tb(1,0),o.Tb(2,1),o.Tb(3,2))},directives:[it,et,nt],encapsulation:2}),W);function ot(t,e){return t.concat(Array.from(e))}var st,at=((st=function t(){_classCallCheck(this,t)}).\u0275mod=o.Pb({type:st}),st.\u0275inj=o.Ob({factory:function(t){return new(t||st)}}),st),ct=i("FKr1");i("quSY"),i("VRyK"),i("itXk"),i("lJxs");var lt,ut,ht,ft,dt,_t,pt,yt,mt,vt,wt,bt=[[["caption"]]],kt=["caption"],gt=((lt=function(t){_inherits(i,t);var e=_createSuper(i);function i(){var t;return _classCallCheck(this,i),(t=e.apply(this,arguments)).stickyCssClass="mat-table-sticky",t}return i}(rt)).\u0275fac=function(t){return Rt(t||lt)},lt.\u0275cmp=o.Lb({type:lt,selectors:[["mat-table"],["table","mat-table",""]],hostAttrs:[1,"mat-table"],exportAs:["matTable"],features:[o.Db([{provide:rt,useExisting:lt},{provide:x,useExisting:lt}]),o.Bb],ngContentSelectors:kt,decls:4,vars:0,consts:[["headerRowOutlet",""],["rowOutlet",""],["footerRowOutlet",""]],template:function(t,e){1&t&&(o.nc(bt),o.mc(0),o.Tb(1,0),o.Tb(2,1),o.Tb(3,2))},directives:[it,et,nt],styles:['mat-table{display:block}mat-header-row{min-height:56px}mat-row,mat-footer-row{min-height:48px}mat-row,mat-header-row,mat-footer-row{display:flex;border-width:0;border-bottom-width:1px;border-style:solid;align-items:center;box-sizing:border-box}mat-row::after,mat-header-row::after,mat-footer-row::after{display:inline-block;min-height:inherit;content:""}mat-cell:first-of-type,mat-header-cell:first-of-type,mat-footer-cell:first-of-type{padding-left:24px}[dir=rtl] mat-cell:first-of-type,[dir=rtl] mat-header-cell:first-of-type,[dir=rtl] mat-footer-cell:first-of-type{padding-left:0;padding-right:24px}mat-cell:last-of-type,mat-header-cell:last-of-type,mat-footer-cell:last-of-type{padding-right:24px}[dir=rtl] mat-cell:last-of-type,[dir=rtl] mat-header-cell:last-of-type,[dir=rtl] mat-footer-cell:last-of-type{padding-right:0;padding-left:24px}mat-cell,mat-header-cell,mat-footer-cell{flex:1;display:flex;align-items:center;overflow:hidden;word-wrap:break-word;min-height:inherit}table.mat-table{border-spacing:0}tr.mat-header-row{height:56px}tr.mat-row,tr.mat-footer-row{height:48px}th.mat-header-cell{text-align:left}[dir=rtl] th.mat-header-cell{text-align:right}th.mat-header-cell,td.mat-cell,td.mat-footer-cell{padding:0;border-bottom-width:1px;border-bottom-style:solid}th.mat-header-cell:first-of-type,td.mat-cell:first-of-type,td.mat-footer-cell:first-of-type{padding-left:24px}[dir=rtl] th.mat-header-cell:first-of-type,[dir=rtl] td.mat-cell:first-of-type,[dir=rtl] td.mat-footer-cell:first-of-type{padding-left:0;padding-right:24px}th.mat-header-cell:last-of-type,td.mat-cell:last-of-type,td.mat-footer-cell:last-of-type{padding-right:24px}[dir=rtl] th.mat-header-cell:last-of-type,[dir=rtl] td.mat-cell:last-of-type,[dir=rtl] td.mat-footer-cell:last-of-type{padding-right:0;padding-left:24px}\n'],encapsulation:2}),lt),Rt=o.Zb(gt),Ct=((ut=function(t){_inherits(i,t);var e=_createSuper(i);function i(){return _classCallCheck(this,i),e.apply(this,arguments)}return i}(I)).\u0275fac=function(t){return Dt(t||ut)},ut.\u0275dir=o.Mb({type:ut,selectors:[["","matCellDef",""]],features:[o.Db([{provide:I,useExisting:ut}]),o.Bb]}),ut),Dt=o.Zb(Ct),St=((ht=function(t){_inherits(i,t);var e=_createSuper(i);function i(){return _classCallCheck(this,i),e.apply(this,arguments)}return i}(A)).\u0275fac=function(t){return Ot(t||ht)},ht.\u0275dir=o.Mb({type:ht,selectors:[["","matHeaderCellDef",""]],features:[o.Db([{provide:A,useExisting:ht}]),o.Bb]}),ht),Ot=o.Zb(St),Tt=((ft=function(t){_inherits(i,t);var e=_createSuper(i);function i(){return _classCallCheck(this,i),e.apply(this,arguments)}return i}(P)).\u0275fac=function(t){return Et(t||ft)},ft.\u0275dir=o.Mb({type:ft,selectors:[["","matColumnDef",""]],inputs:{sticky:"sticky",name:["matColumnDef","name"]},features:[o.Db([{provide:P,useExisting:ft},{provide:"MAT_SORT_HEADER_COLUMN_DEF",useExisting:ft}]),o.Bb]}),ft),Et=o.Zb(Tt),xt=((pt=function(t){_inherits(i,t);var e=_createSuper(i);function i(t,n){var r;return _classCallCheck(this,i),r=e.call(this,t,n),n.nativeElement.classList.add("mat-column-".concat(t.cssClassFriendlyName)),r}return i}(M)).\u0275fac=function(t){return new(t||pt)(o.Rb(P),o.Rb(o.m))},pt.\u0275dir=o.Mb({type:pt,selectors:[["mat-header-cell"],["th","mat-header-cell",""]],hostAttrs:["role","columnheader",1,"mat-header-cell"],features:[o.Bb]}),pt),It=((_t=function(t){_inherits(i,t);var e=_createSuper(i);function i(t,n){var r;return _classCallCheck(this,i),r=e.call(this,t,n),n.nativeElement.classList.add("mat-column-".concat(t.cssClassFriendlyName)),r}return i}(N)).\u0275fac=function(t){return new(t||_t)(o.Rb(P),o.Rb(o.m))},_t.\u0275dir=o.Mb({type:_t,selectors:[["mat-cell"],["td","mat-cell",""]],hostAttrs:["role","gridcell",1,"mat-cell"],features:[o.Bb]}),_t),At=((dt=function(t){_inherits(i,t);var e=_createSuper(i);function i(){return _classCallCheck(this,i),e.apply(this,arguments)}return i}(X)).\u0275fac=function(t){return jt(t||dt)},dt.\u0275dir=o.Mb({type:dt,selectors:[["","matHeaderRowDef",""]],inputs:{columns:["matHeaderRowDef","columns"],sticky:["matHeaderRowDefSticky","sticky"]},features:[o.Db([{provide:X,useExisting:dt}]),o.Bb]}),dt),jt=o.Zb(At),Ht=((yt=function(t){_inherits(i,t);var e=_createSuper(i);function i(){return _classCallCheck(this,i),e.apply(this,arguments)}return i}(G)).\u0275fac=function(t){return Pt(t||yt)},yt.\u0275dir=o.Mb({type:yt,selectors:[["","matRowDef",""]],inputs:{columns:["matRowDefColumns","columns"],when:["matRowDefWhen","when"]},features:[o.Db([{provide:G,useExisting:yt}]),o.Bb]}),yt),Pt=o.Zb(Ht),Ft=((mt=function(t){_inherits(i,t);var e=_createSuper(i);function i(){return _classCallCheck(this,i),e.apply(this,arguments)}return i}(q)).\u0275fac=function(t){return Mt(t||mt)},mt.\u0275cmp=o.Lb({type:mt,selectors:[["mat-header-row"],["tr","mat-header-row",""]],hostAttrs:["role","row",1,"mat-header-row"],exportAs:["matHeaderRow"],features:[o.Db([{provide:q,useExisting:mt}]),o.Bb],decls:1,vars:0,consts:[["cdkCellOutlet",""]],template:function(t,e){1&t&&o.Tb(0,0)},directives:[K],encapsulation:2}),mt),Mt=o.Zb(Ft),Nt=((vt=function(t){_inherits(i,t);var e=_createSuper(i);function i(){return _classCallCheck(this,i),e.apply(this,arguments)}return i}(z)).\u0275fac=function(t){return Bt(t||vt)},vt.\u0275cmp=o.Lb({type:vt,selectors:[["mat-row"],["tr","mat-row",""]],hostAttrs:["role","row",1,"mat-row"],exportAs:["matRow"],features:[o.Db([{provide:z,useExisting:vt}]),o.Bb],decls:1,vars:0,consts:[["cdkCellOutlet",""]],template:function(t,e){1&t&&o.Tb(0,0)},directives:[K],encapsulation:2}),vt),Bt=o.Zb(Nt),Lt=((wt=function t(){_classCallCheck(this,t)}).\u0275mod=o.Pb({type:wt}),wt.\u0275inj=o.Ob({factory:function(t){return new(t||wt)},imports:[[at,ct.e]]}),wt)},Qu3c:function(t,e,i){"use strict";i.d(e,"a",(function(){return D})),i.d(e,"b",(function(){return O}));var n=i("rDax"),r=i("u47x"),o=i("ofXK"),s=i("fXoL"),a=i("FKr1"),c=i("8LU1"),l=i("FtGj"),u=i("0MNC"),h=i("nLfN"),f=i("+rOU"),d=i("XNiG"),_=i("1G5W"),p=i("IzEk"),y=i("R0Ic"),m=i("vxfF"),v=i("cH1L"),w={tooltipState:Object(y.m)("state",[Object(y.j)("initial, void, hidden",Object(y.k)({opacity:0,transform:"scale(0)"})),Object(y.j)("visible",Object(y.k)({transform:"scale(1)"})),Object(y.l)("* => visible",Object(y.e)("200ms cubic-bezier(0, 0, 0.2, 1)",Object(y.g)([Object(y.k)({opacity:0,transform:"scale(0)",offset:0}),Object(y.k)({opacity:.5,transform:"scale(0.99)",offset:.5}),Object(y.k)({opacity:1,transform:"scale(1)",offset:1})]))),Object(y.l)("* => hidden",Object(y.e)("100ms cubic-bezier(0, 0, 0.2, 1)",Object(y.k)({opacity:0})))])},b=Object(h.f)({passive:!0});function k(t){return Error('Tooltip position "'.concat(t,'" is invalid.'))}var g=new s.s("mat-tooltip-scroll-strategy"),R={provide:g,deps:[n.c],useFactory:function(t){return function(){return t.scrollStrategies.reposition({scrollThrottle:20})}}},C=new s.s("mat-tooltip-default-options",{providedIn:"root",factory:function(){return{showDelay:0,hideDelay:0,touchendHideDelay:1500}}}),D=function(){var t=function(){function t(e,i,n,r,o,s,a,c,u,h,f,p){var y=this;_classCallCheck(this,t),this._overlay=e,this._elementRef=i,this._scrollDispatcher=n,this._viewContainerRef=r,this._ngZone=o,this._platform=s,this._ariaDescriber=a,this._focusMonitor=c,this._dir=h,this._defaultOptions=f,this._position="below",this._disabled=!1,this.showDelay=this._defaultOptions.showDelay,this.hideDelay=this._defaultOptions.hideDelay,this.touchGestures="auto",this._message="",this._passiveListeners=new Map,this._destroyed=new d.a,this._handleKeydown=function(t){y._isTooltipVisible()&&t.keyCode===l.g&&!Object(l.s)(t)&&(t.preventDefault(),t.stopPropagation(),y._ngZone.run((function(){return y.hide(0)})))},this._scrollStrategy=u,f&&(f.position&&(this.position=f.position),f.touchGestures&&(this.touchGestures=f.touchGestures)),c.monitor(i).pipe(Object(_.a)(this._destroyed)).subscribe((function(t){t?"keyboard"===t&&o.run((function(){return y.show()})):o.run((function(){return y.hide(0)}))})),o.runOutsideAngular((function(){i.nativeElement.addEventListener("keydown",y._handleKeydown)}))}return _createClass(t,[{key:"ngOnInit",value:function(){this._setupPointerEvents()}},{key:"ngOnDestroy",value:function(){var t=this._elementRef.nativeElement;clearTimeout(this._touchstartTimeout),this._overlayRef&&(this._overlayRef.dispose(),this._tooltipInstance=null),t.removeEventListener("keydown",this._handleKeydown),this._passiveListeners.forEach((function(e,i){t.removeEventListener(i,e,b)})),this._passiveListeners.clear(),this._destroyed.next(),this._destroyed.complete(),this._ariaDescriber.removeDescription(t,this.message),this._focusMonitor.stopMonitoring(t)}},{key:"show",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.showDelay;if(!this.disabled&&this.message&&(!this._isTooltipVisible()||this._tooltipInstance._showTimeoutId||this._tooltipInstance._hideTimeoutId)){var i=this._createOverlay();this._detach(),this._portal=this._portal||new f.c(S,this._viewContainerRef),this._tooltipInstance=i.attach(this._portal).instance,this._tooltipInstance.afterHidden().pipe(Object(_.a)(this._destroyed)).subscribe((function(){return t._detach()})),this._setTooltipClass(this._tooltipClass),this._updateTooltipMessage(),this._tooltipInstance.show(e)}}},{key:"hide",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.hideDelay;this._tooltipInstance&&this._tooltipInstance.hide(t)}},{key:"toggle",value:function(){this._isTooltipVisible()?this.hide():this.show()}},{key:"_isTooltipVisible",value:function(){return!!this._tooltipInstance&&this._tooltipInstance.isVisible()}},{key:"_createOverlay",value:function(){var t=this;if(this._overlayRef)return this._overlayRef;var e=this._scrollDispatcher.getAncestorScrollContainers(this._elementRef),i=this._overlay.position().flexibleConnectedTo(this._elementRef).withTransformOriginOn(".mat-tooltip").withFlexibleDimensions(!1).withViewportMargin(8).withScrollableContainers(e);return i.positionChanges.pipe(Object(_.a)(this._destroyed)).subscribe((function(e){t._tooltipInstance&&e.scrollableViewProperties.isOverlayClipped&&t._tooltipInstance.isVisible()&&t._ngZone.run((function(){return t.hide(0)}))})),this._overlayRef=this._overlay.create({direction:this._dir,positionStrategy:i,panelClass:"mat-tooltip-panel",scrollStrategy:this._scrollStrategy()}),this._updatePosition(),this._overlayRef.detachments().pipe(Object(_.a)(this._destroyed)).subscribe((function(){return t._detach()})),this._overlayRef}},{key:"_detach",value:function(){this._overlayRef&&this._overlayRef.hasAttached()&&this._overlayRef.detach(),this._tooltipInstance=null}},{key:"_updatePosition",value:function(){var t=this._overlayRef.getConfig().positionStrategy,e=this._getOrigin(),i=this._getOverlayPosition();t.withPositions([Object.assign(Object.assign({},e.main),i.main),Object.assign(Object.assign({},e.fallback),i.fallback)])}},{key:"_getOrigin",value:function(){var t,e=!this._dir||"ltr"==this._dir.value,i=this.position;if("above"==i||"below"==i)t={originX:"center",originY:"above"==i?"top":"bottom"};else if("before"==i||"left"==i&&e||"right"==i&&!e)t={originX:"start",originY:"center"};else{if(!("after"==i||"right"==i&&e||"left"==i&&!e))throw k(i);t={originX:"end",originY:"center"}}var n=this._invertPosition(t.originX,t.originY);return{main:t,fallback:{originX:n.x,originY:n.y}}}},{key:"_getOverlayPosition",value:function(){var t,e=!this._dir||"ltr"==this._dir.value,i=this.position;if("above"==i)t={overlayX:"center",overlayY:"bottom"};else if("below"==i)t={overlayX:"center",overlayY:"top"};else if("before"==i||"left"==i&&e||"right"==i&&!e)t={overlayX:"end",overlayY:"center"};else{if(!("after"==i||"right"==i&&e||"left"==i&&!e))throw k(i);t={overlayX:"start",overlayY:"center"}}var n=this._invertPosition(t.overlayX,t.overlayY);return{main:t,fallback:{overlayX:n.x,overlayY:n.y}}}},{key:"_updateTooltipMessage",value:function(){var t=this;this._tooltipInstance&&(this._tooltipInstance.message=this.message,this._tooltipInstance._markForCheck(),this._ngZone.onMicrotaskEmpty.asObservable().pipe(Object(p.a)(1),Object(_.a)(this._destroyed)).subscribe((function(){t._tooltipInstance&&t._overlayRef.updatePosition()})))}},{key:"_setTooltipClass",value:function(t){this._tooltipInstance&&(this._tooltipInstance.tooltipClass=t,this._tooltipInstance._markForCheck())}},{key:"_invertPosition",value:function(t,e){return"above"===this.position||"below"===this.position?"top"===e?e="bottom":"bottom"===e&&(e="top"):"end"===t?t="start":"start"===t&&(t="end"),{x:t,y:e}}},{key:"_setupPointerEvents",value:function(){var t=this;if(this._platform.IOS||this._platform.ANDROID){if("off"!==this.touchGestures){this._disableNativeGesturesIfNecessary();var e=function(){clearTimeout(t._touchstartTimeout),t.hide(t._defaultOptions.touchendHideDelay)};this._passiveListeners.set("touchend",e).set("touchcancel",e).set("touchstart",(function(){clearTimeout(t._touchstartTimeout),t._touchstartTimeout=setTimeout((function(){return t.show()}),500)}))}}else this._passiveListeners.set("mouseenter",(function(){return t.show()})).set("mouseleave",(function(){return t.hide()}));this._passiveListeners.forEach((function(e,i){t._elementRef.nativeElement.addEventListener(i,e,b)}))}},{key:"_disableNativeGesturesIfNecessary",value:function(){var t=this._elementRef.nativeElement,e=t.style,i=this.touchGestures;"off"!==i&&(("on"===i||"INPUT"!==t.nodeName&&"TEXTAREA"!==t.nodeName)&&(e.userSelect=e.msUserSelect=e.webkitUserSelect=e.MozUserSelect="none"),"on"!==i&&t.draggable||(e.webkitUserDrag="none"),e.touchAction="none",e.webkitTapHighlightColor="transparent")}},{key:"position",get:function(){return this._position},set:function(t){t!==this._position&&(this._position=t,this._overlayRef&&(this._updatePosition(),this._tooltipInstance&&this._tooltipInstance.show(0),this._overlayRef.updatePosition()))}},{key:"disabled",get:function(){return this._disabled},set:function(t){this._disabled=Object(c.c)(t),this._disabled&&this.hide(0)}},{key:"message",get:function(){return this._message},set:function(t){var e=this;this._ariaDescriber.removeDescription(this._elementRef.nativeElement,this._message),this._message=null!=t?"".concat(t).trim():"",!this._message&&this._isTooltipVisible()?this.hide(0):(this._updateTooltipMessage(),this._ngZone.runOutsideAngular((function(){Promise.resolve().then((function(){e._ariaDescriber.describe(e._elementRef.nativeElement,e.message)}))})))}},{key:"tooltipClass",get:function(){return this._tooltipClass},set:function(t){this._tooltipClass=t,this._tooltipInstance&&this._setTooltipClass(this._tooltipClass)}}]),t}();return t.\u0275fac=function(e){return new(e||t)(s.Rb(n.c),s.Rb(s.m),s.Rb(m.b),s.Rb(s.Q),s.Rb(s.B),s.Rb(h.a),s.Rb(r.c),s.Rb(r.e),s.Rb(g),s.Rb(v.b,8),s.Rb(C,8),s.Rb(s.m))},t.\u0275dir=s.Mb({type:t,selectors:[["","matTooltip",""]],inputs:{showDelay:["matTooltipShowDelay","showDelay"],hideDelay:["matTooltipHideDelay","hideDelay"],touchGestures:["matTooltipTouchGestures","touchGestures"],position:["matTooltipPosition","position"],disabled:["matTooltipDisabled","disabled"],message:["matTooltip","message"],tooltipClass:["matTooltipClass","tooltipClass"]},exportAs:["matTooltip"]}),t}(),S=function(){var t=function(){function t(e,i){_classCallCheck(this,t),this._changeDetectorRef=e,this._breakpointObserver=i,this._visibility="initial",this._closeOnInteraction=!1,this._onHide=new d.a,this._isHandset=this._breakpointObserver.observe(u.b.Handset)}return _createClass(t,[{key:"show",value:function(t){var e=this;this._hideTimeoutId&&(clearTimeout(this._hideTimeoutId),this._hideTimeoutId=null),this._closeOnInteraction=!0,this._showTimeoutId=setTimeout((function(){e._visibility="visible",e._showTimeoutId=null,e._markForCheck()}),t)}},{key:"hide",value:function(t){var e=this;this._showTimeoutId&&(clearTimeout(this._showTimeoutId),this._showTimeoutId=null),this._hideTimeoutId=setTimeout((function(){e._visibility="hidden",e._hideTimeoutId=null,e._markForCheck()}),t)}},{key:"afterHidden",value:function(){return this._onHide.asObservable()}},{key:"isVisible",value:function(){return"visible"===this._visibility}},{key:"ngOnDestroy",value:function(){this._onHide.complete()}},{key:"_animationStart",value:function(){this._closeOnInteraction=!1}},{key:"_animationDone",value:function(t){var e=t.toState;"hidden"!==e||this.isVisible()||this._onHide.next(),"visible"!==e&&"hidden"!==e||(this._closeOnInteraction=!0)}},{key:"_handleBodyInteraction",value:function(){this._closeOnInteraction&&this.hide(0)}},{key:"_markForCheck",value:function(){this._changeDetectorRef.markForCheck()}}]),t}();return t.\u0275fac=function(e){return new(e||t)(s.Rb(s.i),s.Rb(u.a))},t.\u0275cmp=s.Lb({type:t,selectors:[["mat-tooltip-component"]],hostAttrs:["aria-hidden","true"],hostVars:2,hostBindings:function(t,e){1&t&&s.fc("click",(function(){return e._handleBodyInteraction()}),!1,s.sc),2&t&&s.Ac("zoom","visible"===e._visibility?1:null)},decls:3,vars:7,consts:[[1,"mat-tooltip",3,"ngClass"]],template:function(t,e){if(1&t&&(s.Xb(0,"div",0),s.fc("@state.start",(function(){return e._animationStart()}))("@state.done",(function(t){return e._animationDone(t)})),s.kc(1,"async"),s.Dc(2),s.Wb()),2&t){var i,n=null==(i=s.lc(1,5,e._isHandset))?null:i.matches;s.Ib("mat-tooltip-handset",n),s.oc("ngClass",e.tooltipClass)("@state",e._visibility),s.Eb(2),s.Ec(e.message)}},directives:[o.i],pipes:[o.b],styles:[".mat-tooltip-panel{pointer-events:none !important}.mat-tooltip{color:#fff;border-radius:4px;margin:14px;max-width:250px;padding-left:8px;padding-right:8px;overflow:hidden;text-overflow:ellipsis}.cdk-high-contrast-active .mat-tooltip{outline:solid 1px}.mat-tooltip-handset{margin:24px;padding-left:16px;padding-right:16px}\n"],encapsulation:2,data:{animation:[w.tooltipState]},changeDetection:0}),t}(),O=function(){var t=function t(){_classCallCheck(this,t)};return t.\u0275mod=s.Pb({type:t}),t.\u0275inj=s.Ob({factory:function(e){return new(e||t)},providers:[R],imports:[[r.a,o.c,n.f,a.e],a.e]}),t}()}}]); |