/** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("rxjs"),require("@angular/core")):"function"==typeof define&&define.amd?define("@angular/cdk/collections",["exports","rxjs","@angular/core"],e):e((t.ng=t.ng||{},t.ng.cdk=t.ng.cdk||{},t.ng.cdk.collections={}),t.rxjs,t.ng.core)}(this,function(t,e,n){"use strict";function i(t,e){function n(){this.constructor=t}s(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}function o(t){return t&&"function"==typeof t.connect}function r(){return Error("Cannot pass multiple values into SelectionModel with single-value mode.")}var s=function(t,e){return(s=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},c=function(){function t(){}return t}(),l=function(t){function n(e){var n=t.call(this)||this;return n._data=e,n}return i(n,t),n.prototype.connect=function(){return this._data instanceof e.Observable?this._data:e.of(this._data)},n.prototype.disconnect=function(){},n}(c),u=function(){function t(t,n,i){var o=this;void 0===t&&(t=!1),void 0===i&&(i=!0),this._multiple=t,this._emitChanges=i,this._selection=new Set,this._deselectedToEmit=[],this._selectedToEmit=[],this.changed=new e.Subject,this.onChange=this.changed,n&&n.length&&(t?n.forEach(function(t){return o._markSelected(t)}):this._markSelected(n[0]),this._selectedToEmit.length=0)}return Object.defineProperty(t.prototype,"selected",{get:function(){return this._selected||(this._selected=Array.from(this._selection.values())),this._selected},enumerable:!0,configurable:!0}),t.prototype.select=function(){for(var t=this,e=[],n=0;n1&&!this._multiple)throw r()},t}(),h=function(){function t(){this._listeners=[]}return t.prototype.notify=function(t,e){for(var n=0,i=this._listeners;n