{"map":"{\"version\":3,\"file\":\"_reactiveNextOperator.js\",\"sourceRoot\":\"\",\"sources\":[\"../../../../src/operators/foundation/_reactiveNextOperator.ts\"],\"names\":[],\"mappings\":\"AAAA;;;;;;;;;;;;;;GAcG;;AAEH,OAAO,EACL,gBAAgB,GACjB,MAAM,2BAA2B,CAAC;AAEnC,OAAO,EAEL,aAAa,GACd,MAAM,qBAAqB,CAAC;AA0B7B,MAAM,mCAA4E,UAAa;IAC7F,MAAM,CAAC,KAAM,SAAQ,UAAU;QAC7B;;;;;;;;;;;WAWG;QACH,qBAAqB,CAAO,EAAkF;gBAAlF,EAAE,SAAS,EAAE,MAAM,OAA+D,EAA7D,kEAAuB;YACtE,MAAM,CAAC,IAAI,gBAAgB,CACzB,CAAC,QAAqB;gBACpB,MAAM,cAAc,GAAG,SAAS,CAAC;oBAC/B,IAAI,EAAE,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC;iBACnC,CAAC,CAAC;gBAEH,yCAAyC;gBACzC,EAAE;gBACF,qEAAqE;gBACrE,iEAAiE;gBACjE,oEAAoE;gBACpE,WAAW;gBACX,MAAM,CAAC,aAAa;gBAClB,oEAAoE;gBACpE,MAAM,CAAC,MAAM,CACX,EAAE,QAAQ,EAAE,IAAI,EAAE,EAClB,MAAM,CACP,EACD,oBAAoB,CACrB,CAAC,SAAS,CACT,cAAc,CACf,CAAC,WAAW,CAAC;YAChB,CAAC,CACF,CAAC;QACJ,CAAC;KACF,CAAC;AACJ,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 * as tslib_1 from \"tslib\";\r\nimport { MotionObservable, } from '../../observables/proxies';\r\nimport { combineLatest, } from '../../combineLatest';\r\nexport function withReactiveNextOperator(superclass) {\r\n    return class extends superclass {\r\n        /**\r\n         * Similar to `_nextOperator`, but listens for values not just from\r\n         * upstream, but also on any arguments it receives.\r\n         *\r\n         * It calls `operation` with the most recent values from upstream and from\r\n         * the other arguments.  Arguments that aren't reactive will be passed\r\n         * through as-they-are.  Arguments that are reactive will cause `operation`\r\n         * to be called again for each value they emit.\r\n         *\r\n         * `_reactiveNextOperator` will not call `operation` until it has received\r\n         * a value from every argument it is subscribed to.\r\n         */\r\n        _reactiveNextOperator(_a) {\r\n            var { operation, inputs } = _a, combineLatestOptions = tslib_1.__rest(_a, [\"operation\", \"inputs\"]);\r\n            return new MotionObservable((observer) => {\r\n                const innerOperation = operation({\r\n                    emit: observer.next.bind(observer),\r\n                });\r\n                // TODO: verify this is the correct type.\r\n                //\r\n                // I added `{upstream: Observable<T>}` because otherwise `inputs` was\r\n                // getting inferred to require an `upstream` at a callsite.  This\r\n                // appears to fix it, but I haven't taken the time to reason if it's\r\n                // correct.\r\n                return combineLatest(\r\n                // TypeScript doesn't like ...inputs, so we use the longhand version\r\n                Object.assign({ upstream: this }, inputs), combineLatestOptions).subscribe(innerOperation).unsubscribe;\r\n            });\r\n        }\r\n    };\r\n}\r\n//# sourceMappingURL=_reactiveNextOperator.js.map"}
