GoScrobble/web/node_modules/.cache/babel-loader/941aac52522221632424ef144034fb9e.json

1 line
8.6 KiB
JSON
Raw Normal View History

2022-04-25 02:47:15 +00:00
{"ast":null,"code":"import _toConsumableArray from \"@babel/runtime/helpers/esm/toConsumableArray\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _typeof from \"@babel/runtime/helpers/esm/typeof\";\nimport PropTypes from 'prop-types';\nimport merge from './merge'; // The breakpoint **start** at this value.\n// For instance with the first breakpoint xs: [xs, sm[.\n\nvar values = {\n xs: 0,\n sm: 600,\n md: 960,\n lg: 1280,\n xl: 1920\n};\nvar defaultBreakpoints = {\n // Sorted ASC by size. That's important.\n // It can't be configured as it's used statically for propTypes.\n keys: ['xs', 'sm', 'md', 'lg', 'xl'],\n up: function up(key) {\n return \"@media (min-width:\".concat(values[key], \"px)\");\n }\n};\nexport function handleBreakpoints(props, propValue, styleFromPropValue) {\n if (process.env.NODE_ENV !== 'production') {\n if (!props.theme) {\n console.error('Material-UI: You are calling a style function without a theme value.');\n }\n }\n\n if (Array.isArray(propValue)) {\n var themeBreakpoints = props.theme.breakpoints || defaultBreakpoints;\n return propValue.reduce(function (acc, item, index) {\n acc[themeBreakpoints.up(themeBreakpoints.keys[index])] = styleFromPropValue(propValue[index]);\n return acc;\n }, {});\n }\n\n if (_typeof(propValue) === 'object') {\n var _themeBreakpoints = props.theme.breakpoints || defaultBreakpoints;\n\n return Object.keys(propValue).reduce(function (acc, breakpoint) {\n acc[_themeBreakpoints.up(breakpoint)] = styleFromPropValue(propValue[breakpoint]);\n return acc;\n }, {});\n }\n\n var output = styleFromPropValue(propValue);\n return output;\n}\n\nfunction breakpoints(styleFunction) {\n var newStyleFunction = function newStyleFunction(props) {\n var base = styleFunction(props);\n var themeBreakpoints = props.theme.breakpoints || defaultBreakpoints;\n var extended = themeBreakpoints.keys.reduce(function (acc, key) {\n if (props[key]) {\n acc = acc || {};\n acc[themeBreakpoints.up(key)] = styleFunction(_extends({\n theme: props.theme\n }, props[key]));\n }\n\n return acc;\n }, null);\n return merge(base, extended);\n };\n\n newStyleFunction.propTypes = process.env.NODE_ENV !== 'production' ? _extends({}, styleFunction.propTypes, {\n xs: PropTypes.object,\n sm: PropTypes.object,\n md: PropTypes.object,\n lg: PropTypes.object,\n xl: PropTypes.object\n }) : {};\n newStyleFunction.filterProps = ['xs', 'sm', 'md', 'lg', 'xl'].concat(_toConsumableArray(styleFunction.filterProps));\n return newStyleFunction;\n}\n\nexport default breakpoints;","map":{"version":3,"sources":["/app/node_modules/@material-ui/system/esm/breakpoints.js"],"names":["_toConsumableArray","_extends","_typeof","PropTypes","merge","values","xs","sm","md","lg","xl","defaultBreakpoints","keys","up","key","concat","handleBreakpoints","props","propValue","styleFromPropValue","process","env","NODE_ENV","theme","console","error","Array","isArray","themeBreakpoints","breakpoints","reduce","acc","item","index","_themeBreakpoints","Object","breakpoint","output","styleFunction","newStyleFunction","base","extended","propTypes","object","filterProps"],"mappings":"AAAA,OAAOA,kBAAP,MAA+B,8CAA/B;AACA,OAAOC,QAAP,MAAqB,oCAArB;AACA,OAAOC,OAAP,MAAoB,mCAApB;AACA,OAAOC,SAAP,MAAsB,YAAtB;AACA,OAAOC,KAAP,MAAkB,SAAlB,C,CAA6B;AAC7B;;AAEA,IAAIC,MAAM,GAAG;AACXC,EAAAA,EAAE,EAAE,CADO;AAEXC,EAAAA,EAAE,EAAE,GAFO;AAGXC,EAAAA,EAAE,EAAE,GAHO;AAIXC,EAAAA,EAAE,EAAE,IAJO;AAKXC,EAAAA,EAAE,EAAE;AALO,CAAb;AAOA,IAAIC,kBAAkB,GAAG;AACvB;AACA;AACAC,EAAAA,IAAI,EAAE,CAAC,IAAD,EAAO,IAAP,EAAa,IAAb,EAAmB,IAAnB,EAAyB,IAAzB,CAHiB;AAIvBC,EAAAA,EAAE,EAAE,SAASA,EAAT,CAAYC,GAAZ,EAAiB;AACnB,WAAO,qBAAqBC,MAArB,CAA4BV,MAAM,CAACS,GAAD,CAAlC,EAAyC,KAAzC,CAAP;AACD;AANsB,CAAzB;AAQA,OAAO,SAASE,iBAAT,CAA2BC,KAA3B,EAAkCC,SAAlC,EAA6CC,kBAA7C,EAAiE;AACtE,MAAIC,OAAO,CAACC,GAAR,CAAYC,QAAZ,KAAyB,YAA7B,EAA2C;AACzC,QAAI,CAACL,KAAK,CAACM,KAAX,EAAkB;AAChBC,MAAAA,OAAO,CAACC,KAAR,CAAc,sEAAd;AACD;AACF;;AAED,MAAIC,KAAK,CAACC