{"map":"{\"version\":3,\"file\":\"aggregators.js\",\"sourceRoot\":\"\",\"sources\":[\"../../src/aggregators.ts\"],\"names\":[],\"mappings\":\"AAAA;;;;;;;;;;;;;;GAcG;AAMH,OAAO,EACL,aAAa,GACd,MAAM,iBAAiB,CAAC;AAMzB,gBAAgB,KAAU;IACxB,MAAM,CAAC,KAAK,KAAK,IAAI,CAAC;AACxB,CAAC;AAAA,CAAC;AAEF;;;;GAIG;AACH,MAAM,gBAAgB,OAAsD;IAC1E,MAAM,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC;QACjC,SAAS,EAAE,CAAC,MAAM,KAAK,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC;KAC3C,CAAC,CAAC;AACL,CAAC;AAAA,CAAC;AAEF;;;;GAIG;AACH,MAAM,gBAAgB,OAAsD;IAC1E,MAAM,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC;QACjC,SAAS,EAAE,CAAC,MAAM,KAAK,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC;KAC5C,CAAC,CAAC;AACL,CAAC;AAAA,CAAC;AAEF;;;;GAIG;AACH,MAAM,iBAAiB,OAAsD;IAC3E,MAAM,CAAC,GAAG,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC;AAC7B,CAAC;AAAA,CAAC;AAEF;;;GAGG;AACH,MAAM,cAAc,MAA8C;IAChE,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC;QACjB,SAAS,EAAE,CAAC,KAAK,KAAK,CAAC,KAAK;KAC7B,CAAC,CAAC;AACL,CAAC;AAAA,CAAC;AAEF;;;;;;;GAOG;AACH,MAAM,eAAe,MAA8C;IACjE,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,EAAE,SAAS,EAAE,MAAM,EAAE,CAAC,CAAC;AAC/C,CAAC\"}","code":"/** @license\r\n *  Copyright 2016 - present The Material Motion Authors. All Rights Reserved.\r\n *\r\n *  Licensed under the Apache License, Version 2.0 (the \"License\"); you may not\r\n *  use this file except in compliance with the License. You may obtain a copy\r\n *  of the License at\r\n *\r\n *      http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n *  Unless required by applicable law or agreed to in writing, software\r\n *  distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\r\n *  WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\r\n *  License for the specific language governing permissions and limitations\r\n *  under the License.\r\n */\r\nimport { combineLatest, } from './combineLatest';\r\nfunction isTrue(value) {\r\n    return value === true;\r\n}\r\n;\r\n/**\r\n * Accepts an array of streams and returns a stream that emits true when the\r\n * most recent emission from at least one of them is true.  Inert until it has\r\n * received a value from each stream in the array.\r\n */\r\nexport function anyOf(streams) {\r\n    return combineLatest(streams)._map({\r\n        transform: (values) => values.some(isTrue)\r\n    });\r\n}\r\n;\r\n/**\r\n * Accepts an array of streams and returns a stream that emits true when the\r\n * most recent emission from each of them is true.  Inert until it has received\r\n * a value from each stream in the array.\r\n */\r\nexport function allOf(streams) {\r\n    return combineLatest(streams)._map({\r\n        transform: (values) => values.every(isTrue)\r\n    });\r\n}\r\n;\r\n/**\r\n * Accepts an array of streams and returns a stream that emits true when\r\n * the most recent emission from each of them is false.  Inert until it has\r\n * received a value from each stream in the array.\r\n */\r\nexport function noneOf(streams) {\r\n    return not(anyOf(streams));\r\n}\r\n;\r\n/**\r\n * Accepts an stream of booleans and returns a stream of where each emission is\r\n * the opposite of what was emitted upstream.\r\n */\r\nexport function not(stream) {\r\n    return stream._map({\r\n        transform: (value) => !value\r\n    });\r\n}\r\n;\r\n/**\r\n * Accepts a single stream of booleans and emits whenever that stream\r\n * emits `true`.  Useful in combination with the other aggregators, e.g.:\r\n *\r\n * when(\r\n *   a.recognitionState$.isAnyOf([GestureRecognitionState.BEGAN])\r\n * ).subscribe(b.cancellation$)\r\n */\r\nexport function when(stream) {\r\n    return stream._filter({ predicate: isTrue });\r\n}\r\n//# sourceMappingURL=aggregators.js.map"}
