{"map":"{\"version\":3,\"file\":\"ReactiveProperty.js\",\"sourceRoot\":\"\",\"sources\":[\"../../../src/observables/ReactiveProperty.ts\"],\"names\":[],\"mappings\":\"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EACL,iBAAiB,GAClB,MAAM,qBAAqB,CAAC;AAO7B;;;;GAIG;AACH,MAAM,uBAA2B,SAAQ,iBAAoB;IAC3D,YAAY,gBAAwD;QAClE,KAAK,EAAE,CAAC;QAER,iEAAiE;QACjE,EAAE;QACF,gEAAgE;QAChE,yEAAyE;QACzE,mCAAmC;QACnC,EAAE,CAAC,CAAC,gBAAgB,CAAC,CAAC,CAAC;YACrB,MAAM,CAAC,cAAc,CACnB,IAAI,EACJ,eAAe,EACf;gBACE,GAAG,EAAE,gBAAgB,CAAC,IAAI;gBAC1B,GAAG,EAAE,gBAAgB,CAAC,KAAK;aAC5B,CACF,CAAC;QACJ,CAAC;IACH,CAAC;IAED,IAAI;QACF,MAAM,CAAC,IAAI,CAAC,aAAa,CAAC;IAC5B,CAAC;IAED,KAAK,CAAC,KAAQ;QACZ,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IACnB,CAAC;CACF;AACD,eAAe,gBAAgB,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 { IndefiniteSubject, } from './IndefiniteSubject';\r\n/**\r\n * A Subject that exposes its last value via `read()` and `write(nextValue)`.\r\n *\r\n * Writes will be broadcast to all observers.\r\n */\r\nexport class ReactiveProperty extends IndefiniteSubject {\r\n    constructor(readableWritable) {\r\n        super();\r\n        // IndefiniteSubject caches the last emission as `_lastEmission`.\r\n        //\r\n        // If the user supplies `read` and `write` functions, we replace\r\n        // `_subject._lastEmission` with them, so all reads and writes go through\r\n        // the user-supplied getter/setter.\r\n        if (readableWritable) {\r\n            Object.defineProperty(this, '_lastEmission', {\r\n                get: readableWritable.read,\r\n                set: readableWritable.write,\r\n            });\r\n        }\r\n    }\r\n    read() {\r\n        return this._lastEmission;\r\n    }\r\n    write(value) {\r\n        this.next(value);\r\n    }\r\n}\r\nexport default ReactiveProperty;\r\n//# sourceMappingURL=ReactiveProperty.js.map","dts":{"name":"/Users/brentons/Projects/material-motion-js/packages/core/observables/ReactiveProperty.d.ts","text":"/** @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 { IndefiniteSubject } from './IndefiniteSubject';\r\nimport { ScopedReadable, ScopedWritable } from '../types';\r\n/**\r\n * A Subject that exposes its last value via `read()` and `write(nextValue)`.\r\n *\r\n * Writes will be broadcast to all observers.\r\n */\r\nexport declare class ReactiveProperty<T> extends IndefiniteSubject<T> {\r\n    constructor(readableWritable?: ScopedReadable<T> & ScopedWritable<T>);\r\n    read(): T;\r\n    write(value: T): void;\r\n}\r\nexport default ReactiveProperty;\r\n"}}
