{"map":"{\"version\":3,\"file\":\"rename.js\",\"sourceRoot\":\"\",\"sources\":[\"../../../src/operators/rename.ts\"],\"names\":[],\"mappings\":\"AAAA;;;;;;;;;;;;;;GAcG;AA0BH,MAAM,qBAAkE,UAAa;IACnF,MAAM,CAAC,KAAM,SAAQ,UAAU;QAuB7B,MAAM,CAMJ,OAA2B;YAC3B,EAAE,CAAC,CAAC,OAAO,CAAC,OAAO,IAAI,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC;gBACzD,OAAO,GAAG,OAAO,CAAC,OAAyB,CAAC;YAC9C,CAAC;YAED,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC;gBACf,SAAS,CAAC,KAAK;oBACb,MAAM,MAAM,GAAG,EAAO,CAAC;oBAEvB,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,OAAO,CAC7B,CAAC,CAAC,MAAM,EAAE,MAAM,CAAC;wBACf,EAAE,CAAC,CAAC,KAAK,CAAC,cAAc,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;4BAChC,MAAc,CAAC,MAAM,CAAC,GAAG,KAAK,CAAC,MAAW,CAAC,CAAC;wBAC/C,CAAC;oBACH,CAAC,CACF,CAAC;oBAEF,MAAM,CAAC,MAAM,CAAC;gBAChB,CAAC;aACF,CAAC,CAAC;QACL,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\nexport function withRename(superclass) {\r\n    return class extends superclass {\r\n        rename(mapping) {\r\n            if (mapping.mapping && Object.keys(mapping).length === 1) {\r\n                mapping = mapping.mapping;\r\n            }\r\n            return this._map({\r\n                transform(value) {\r\n                    const result = {};\r\n                    Object.entries(mapping).forEach(([oldKey, newKey]) => {\r\n                        if (value.hasOwnProperty(oldKey)) {\r\n                            result[newKey] = value[oldKey];\r\n                        }\r\n                    });\r\n                    return result;\r\n                }\r\n            });\r\n        }\r\n    };\r\n}\r\n//# sourceMappingURL=rename.js.map","dts":{"name":"/Users/brentons/Projects/material-motion-js/packages/core/operators/rename.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 { Constructor, MotionMappable, ObservableWithMotionOperators } from '../types';\r\nexport interface MotionRenameable<T> {\r\n    rename<K extends keyof T, V extends T[K], M extends {\r\n        [P in K]: string;\r\n    }, R extends M[K], U extends {\r\n        [P in R]: V;\r\n    }>(mapping: M): ObservableWithMotionOperators<U>;\r\n    rename<K extends keyof T, V extends T[K], M extends {\r\n        [P in K]: string;\r\n    }, R extends M[K], U extends {\r\n        [P in R]: V;\r\n    }>(kwargs: {\r\n        mapping: M;\r\n    }): ObservableWithMotionOperators<U>;\r\n}\r\nexport declare function withRename<T, S extends Constructor<MotionMappable<T>>>(superclass: S): S & Constructor<MotionRenameable<T>>;\r\n"}}
