GoScrobble/web/node_modules/.cache/babel-loader/2003e0e1dac864ae8a3760e951ca54c3.json

1 line
3.9 KiB
JSON

{"ast":null,"code":"import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport merge from './merge';\n\nfunction compose() {\n for (var _len = arguments.length, styles = new Array(_len), _key = 0; _key < _len; _key++) {\n styles[_key] = arguments[_key];\n }\n\n var fn = function fn(props) {\n return styles.reduce(function (acc, style) {\n var output = style(props);\n\n if (output) {\n return merge(acc, output);\n }\n\n return acc;\n }, {});\n }; // Alternative approach that doesn't yield any performance gain.\n // const handlers = styles.reduce((acc, style) => {\n // style.filterProps.forEach(prop => {\n // acc[prop] = style;\n // });\n // return acc;\n // }, {});\n // const fn = props => {\n // return Object.keys(props).reduce((acc, prop) => {\n // if (handlers[prop]) {\n // return merge(acc, handlers[prop](props));\n // }\n // return acc;\n // }, {});\n // };\n\n\n fn.propTypes = process.env.NODE_ENV !== 'production' ? styles.reduce(function (acc, style) {\n return _extends(acc, style.propTypes);\n }, {}) : {};\n fn.filterProps = styles.reduce(function (acc, style) {\n return acc.concat(style.filterProps);\n }, []);\n return fn;\n}\n\nexport default compose;","map":{"version":3,"sources":["/app/node_modules/@material-ui/system/esm/compose.js"],"names":["_extends","merge","compose","_len","arguments","length","styles","Array","_key","fn","props","reduce","acc","style","output","propTypes","process","env","NODE_ENV","filterProps","concat"],"mappings":"AAAA,OAAOA,QAAP,MAAqB,oCAArB;AACA,OAAOC,KAAP,MAAkB,SAAlB;;AAEA,SAASC,OAAT,GAAmB;AACjB,OAAK,IAAIC,IAAI,GAAGC,SAAS,CAACC,MAArB,EAA6BC,MAAM,GAAG,IAAIC,KAAJ,CAAUJ,IAAV,CAAtC,EAAuDK,IAAI,GAAG,CAAnE,EAAsEA,IAAI,GAAGL,IAA7E,EAAmFK,IAAI,EAAvF,EAA2F;AACzFF,IAAAA,MAAM,CAACE,IAAD,CAAN,GAAeJ,SAAS,CAACI,IAAD,CAAxB;AACD;;AAED,MAAIC,EAAE,GAAG,SAASA,EAAT,CAAYC,KAAZ,EAAmB;AAC1B,WAAOJ,MAAM,CAACK,MAAP,CAAc,UAAUC,GAAV,EAAeC,KAAf,EAAsB;AACzC,UAAIC,MAAM,GAAGD,KAAK,CAACH,KAAD,CAAlB;;AAEA,UAAII,MAAJ,EAAY;AACV,eAAOb,KAAK,CAACW,GAAD,EAAME,MAAN,CAAZ;AACD;;AAED,aAAOF,GAAP;AACD,KARM,EAQJ,EARI,CAAP;AASD,GAVD,CALiB,CAed;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGAH,EAAAA,EAAE,CAACM,SAAH,GAAeC,OAAO,CAACC,GAAR,CAAYC,QAAZ,KAAyB,YAAzB,GAAwCZ,MAAM,CAACK,MAAP,CAAc,UAAUC,GAAV,EAAeC,KAAf,EAAsB;AACzF,WAAOb,QAAQ,CAACY,GAAD,EAAMC,KAAK,CAACE,SAAZ,CAAf;AACD,GAFsD,EAEpD,EAFoD,CAAxC,GAEN,EAFT;AAGAN,EAAAA,EAAE,CAACU,WAAH,GAAiBb,MAAM,CAACK,MAAP,CAAc,UAAUC,GAAV,EAAeC,KAAf,EAAsB;AACnD,WAAOD,GAAG,CAACQ,MAAJ,CAAWP,KAAK,CAACM,WAAjB,CAAP;AACD,GAFgB,EAEd,EAFc,CAAjB;AAGA,SAAOV,EAAP;AACD;;AAED,eAAeP,OAAf","sourcesContent":["import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport merge from './merge';\n\nfunction compose() {\n for (var _len = arguments.length, styles = new Array(_len), _key = 0; _key < _len; _key++) {\n styles[_key] = arguments[_key];\n }\n\n var fn = function fn(props) {\n return styles.reduce(function (acc, style) {\n var output = style(props);\n\n if (output) {\n return merge(acc, output);\n }\n\n return acc;\n }, {});\n }; // Alternative approach that doesn't yield any performance gain.\n // const handlers = styles.reduce((acc, style) => {\n // style.filterProps.forEach(prop => {\n // acc[prop] = style;\n // });\n // return acc;\n // }, {});\n // const fn = props => {\n // return Object.keys(props).reduce((acc, prop) => {\n // if (handlers[prop]) {\n // return merge(acc, handlers[prop](props));\n // }\n // return acc;\n // }, {});\n // };\n\n\n fn.propTypes = process.env.NODE_ENV !== 'production' ? styles.reduce(function (acc, style) {\n return _extends(acc, style.propTypes);\n }, {}) : {};\n fn.filterProps = styles.reduce(function (acc, style) {\n return acc.concat(style.filterProps);\n }, []);\n return fn;\n}\n\nexport default compose;"]},"metadata":{},"sourceType":"module"}