mirror of
https://github.com/idanoo/GoScrobble.git
synced 2024-11-22 16:35:14 +00:00
1 line
15 KiB
JSON
1 line
15 KiB
JSON
{"ast":null,"code":"import '@babel/runtime/helpers/inheritsLoose';\nimport { createContext, forwardRef, createElement } from 'react';\nimport createCache from '@emotion/cache';\nimport { getRegisteredStyles, insertStyles } from '@emotion/utils';\nimport { serializeStyles } from '@emotion/serialize';\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\nvar EmotionCacheContext = /*#__PURE__*/createContext( // we're doing this to avoid preconstruct's dead code elimination in this one case\n// because this module is primarily intended for the browser and node\n// but it's also required in react native and similar environments sometimes\n// and we could have a special build just for that\n// but this is much easier and the native packages\n// might use a different theme context in the future anyway\ntypeof HTMLElement !== 'undefined' ? createCache() : null);\nvar ThemeContext = /*#__PURE__*/createContext({});\nvar CacheProvider = EmotionCacheContext.Provider;\n\nvar withEmotionCache = function withEmotionCache(func) {\n var render = function render(props, ref) {\n return /*#__PURE__*/createElement(EmotionCacheContext.Consumer, null, function (cache) {\n return func(props, cache, ref);\n });\n }; // $FlowFixMe\n\n\n return /*#__PURE__*/forwardRef(render);\n}; // thus we only need to replace what is a valid character for JS, but not for CSS\n\n\nvar sanitizeIdentifier = function sanitizeIdentifier(identifier) {\n return identifier.replace(/\\$/g, '-');\n};\n\nvar typePropName = '__EMOTION_TYPE_PLEASE_DO_NOT_USE__';\nvar labelPropName = '__EMOTION_LABEL_PLEASE_DO_NOT_USE__';\n\nvar createEmotionProps = function createEmotionProps(type, props) {\n if (process.env.NODE_ENV !== 'production' && typeof props.css === 'string' && // check if there is a css declaration\n props.css.indexOf(':') !== -1) {\n throw new Error(\"Strings are not allowed as css prop values, please wrap it in a css template literal from '@emotion/css' like this: css`\" + props.css + \"`\");\n }\n\n var newProps = {};\n\n for (var key in props) {\n if (hasOwnProperty.call(props, key)) {\n newProps[key] = props[key];\n }\n }\n\n newProps[typePropName] = type; // TODO: check if this still works with all of those different JSX functions\n\n if (process.env.NODE_ENV !== 'production') {\n var error = new Error();\n\n if (error.stack) {\n // chrome\n var match = error.stack.match(/at (?:Object\\.|Module\\.|)(?:jsx|createEmotionProps).*\\n\\s+at (?:Object\\.|)([A-Z][A-Za-z$]+) /);\n\n if (!match) {\n // safari and firefox\n match = error.stack.match(/.*\\n([A-Z][A-Za-z$]+)@/);\n }\n\n if (match) {\n newProps[labelPropName] = sanitizeIdentifier(match[1]);\n }\n }\n }\n\n return newProps;\n};\n\nvar render = function render(cache, props, theme, ref) {\n var cssProp = theme === null ? props.css : props.css(theme); // so that using `css` from `emotion` and passing the result to the css prop works\n // not passing the registered cache to serializeStyles because it would\n // make certain babel optimisations not possible\n\n if (typeof cssProp === 'string' && cache.registered[cssProp] !== undefined) {\n cssProp = cache.registered[cssProp];\n }\n\n var type = props[typePropName];\n var registeredStyles = [cssProp];\n var className = '';\n\n if (typeof props.className === 'string') {\n className = getRegisteredStyles(cache.registered, registeredStyles, props.className);\n } else if (props.className != null) {\n className = props.className + \" \";\n }\n\n var serialized = serializeStyles(registeredStyles);\n\n if (process.env.NODE_ENV !== 'production' && serialized.name.indexOf('-') === -1) {\n var labelFromStack = props[labelPropName];\n\n if (labelFromStack) {\n serialized = serializeStyles([serialized, 'label:' + labelFromStack + ';']);\n }\n }\n\n var rules = insertStyles(cache, serialized, typeof type === 'string');\n className += cache.key + \"-\" + serialized.name;\n var newProps = {};\n\n for (var key in props) {\n if (hasOwnProperty.call(props, key) && key !== 'css' && key !== typePropName && (process.env.NODE_ENV === 'production' || key !== labelPropName)) {\n newProps[key] = props[key];\n }\n }\n\n newProps.ref = ref;\n newProps.className = className;\n var ele = /*#__PURE__*/createElement(type, newProps);\n return ele;\n}; // eslint-disable-next-line no-undef\n\n\nvar Emotion = /* #__PURE__ */withEmotionCache(function (props, cache, ref) {\n if (typeof props.css === 'function') {\n return /*#__PURE__*/createElement(ThemeContext.Consumer, null, function (theme) {\n return render(cache, props, theme, ref);\n });\n }\n\n return render(cache, props, null, ref);\n});\n\nif (process.env.NODE_ENV !== 'production') {\n Emotion.displayName = 'EmotionCssPropInternal';\n}\n\nexport { CacheProvider as C, Emotion as E, ThemeContext as T, createEmotionProps as c, hasOwnProperty as h, withEmotionCache as w };","map":{"version":3,"sources":["/app/node_modules/@emotion/core/dist/emotion-element-57a3a7a3.browser.esm.js"],"names":["createContext","forwardRef","createElement","createCache","getRegisteredStyles","insertStyles","serializeStyles","hasOwnProperty","Object","prototype","EmotionCacheContext","HTMLElement","ThemeContext","CacheProvider","Provider","withEmotionCache","func","render","props","ref","Consumer","cache","sanitizeIdentifier","identifier","replace","typePropName","labelPropName","createEmotionProps","type","process","env","NODE_ENV","css","indexOf","Error","newProps","key","call","error","stack","match","theme","cssProp","registered","undefined","registeredStyles","className","serialized","name","labelFromStack","rules","ele","Emotion","displayName","C","E","T","c","h","w"],"mappings":"AAAA,OAAO,sCAAP;AACA,SAASA,aAAT,EAAwBC,UAAxB,EAAoCC,aAApC,QAAyD,OAAzD;AACA,OAAOC,WAAP,MAAwB,gBAAxB;AACA,SAASC,mBAAT,EAA8BC,YAA9B,QAAkD,gBAAlD;AACA,SAASC,eAAT,QAAgC,oBAAhC;AAEA,IAAIC,cAAc,GAAGC,MAAM,CAACC,SAAP,CAAiBF,cAAtC;AAEA,IAAIG,mBAAmB,GAAG,aAAaV,aAAa,EAAE;AACtD;AACA;AACA;AACA;AACA;AACA,OAAOW,WAAP,KAAuB,WAAvB,GAAqCR,WAAW,EAAhD,GAAqD,IAND,CAApD;AAOA,IAAIS,YAAY,GAAG,aAAaZ,aAAa,CAAC,EAAD,CAA7C;AACA,IAAIa,aAAa,GAAGH,mBAAmB,CAACI,QAAxC;;AAEA,IAAIC,gBAAgB,GAAG,SAASA,gBAAT,CAA0BC,IAA1B,EAAgC;AACrD,MAAIC,MAAM,GAAG,SAASA,MAAT,CAAgBC,KAAhB,EAAuBC,GAAvB,EAA4B;AACvC,WAAO,aAAajB,aAAa,CAACQ,mBAAmB,CAACU,QAArB,EAA+B,IAA/B,EA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,CA5CD,C,CA4CG;;;AAGH,IAAIC,OAAO,GAAG,eAAerC,gBAAgB,CAAC,UAAUG,KAAV,EAAiBG,KAAjB,EAAwBF,GAAxB,EAA6B;AACzE,MAAI,OAAOD,KAAK,CAACc,GAAb,KAAqB,UAAzB,EAAqC;AACnC,WAAO,aAAa9B,aAAa,CAACU,YAAY,CAACQ,QAAd,EAAwB,IAAxB,EAA8B,UAAUqB,KAAV,EAAiB;AAC9E,aAAOxB,MAAM,CAACI,KAAD,EAAQH,KAAR,EAAeuB,KAAf,EAAsBtB,GAAtB,CAAb;AACD,KAFgC,CAAjC;AAGD;;AAED,SAAOF,MAAM,CAACI,KAAD,EAAQH,KAAR,EAAe,IAAf,EAAqBC,GAArB,CAAb;AACD,CAR4C,CAA7C;;AAUA,IAAIU,OAAO,CAACC,GAAR,CAAYC,QAAZ,KAAyB,YAA7B,EAA2C;AACzCqB,EAAAA,OAAO,CAACC,WAAR,GAAsB,wBAAtB;AACD;;AAED,SAASxC,aAAa,IAAIyC,CAA1B,EAA6BF,OAAO,IAAIG,CAAxC,EAA2C3C,YAAY,IAAI4C,CAA3D,EAA8D7B,kBAAkB,IAAI8B,CAApF,EAAuFlD,cAAc,IAAImD,CAAzG,EAA4G3C,gBAAgB,IAAI4C,CAAhI","sourcesContent":["import '@babel/runtime/helpers/inheritsLoose';\nimport { createContext, forwardRef, createElement } from 'react';\nimport createCache from '@emotion/cache';\nimport { getRegisteredStyles, insertStyles } from '@emotion/utils';\nimport { serializeStyles } from '@emotion/serialize';\n\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\n\nvar EmotionCacheContext = /*#__PURE__*/createContext( // we're doing this to avoid preconstruct's dead code elimination in this one case\n// because this module is primarily intended for the browser and node\n// but it's also required in react native and similar environments sometimes\n// and we could have a special build just for that\n// but this is much easier and the native packages\n// might use a different theme context in the future anyway\ntypeof HTMLElement !== 'undefined' ? createCache() : null);\nvar ThemeContext = /*#__PURE__*/createContext({});\nvar CacheProvider = EmotionCacheContext.Provider;\n\nvar withEmotionCache = function withEmotionCache(func) {\n var render = function render(props, ref) {\n return /*#__PURE__*/createElement(EmotionCacheContext.Consumer, null, function (cache) {\n return func(props, cache, ref);\n });\n }; // $FlowFixMe\n\n\n return /*#__PURE__*/forwardRef(render);\n};\n\n// thus we only need to replace what is a valid character for JS, but not for CSS\n\nvar sanitizeIdentifier = function sanitizeIdentifier(identifier) {\n return identifier.replace(/\\$/g, '-');\n};\n\nvar typePropName = '__EMOTION_TYPE_PLEASE_DO_NOT_USE__';\nvar labelPropName = '__EMOTION_LABEL_PLEASE_DO_NOT_USE__';\nvar createEmotionProps = function createEmotionProps(type, props) {\n if (process.env.NODE_ENV !== 'production' && typeof props.css === 'string' && // check if there is a css declaration\n props.css.indexOf(':') !== -1) {\n throw new Error(\"Strings are not allowed as css prop values, please wrap it in a css template literal from '@emotion/css' like this: css`\" + props.css + \"`\");\n }\n\n var newProps = {};\n\n for (var key in props) {\n if (hasOwnProperty.call(props, key)) {\n newProps[key] = props[key];\n }\n }\n\n newProps[typePropName] = type; // TODO: check if this still works with all of those different JSX functions\n\n if (process.env.NODE_ENV !== 'production') {\n var error = new Error();\n\n if (error.stack) {\n // chrome\n var match = error.stack.match(/at (?:Object\\.|Module\\.|)(?:jsx|createEmotionProps).*\\n\\s+at (?:Object\\.|)([A-Z][A-Za-z$]+) /);\n\n if (!match) {\n // safari and firefox\n match = error.stack.match(/.*\\n([A-Z][A-Za-z$]+)@/);\n }\n\n if (match) {\n newProps[labelPropName] = sanitizeIdentifier(match[1]);\n }\n }\n }\n\n return newProps;\n};\n\nvar render = function render(cache, props, theme, ref) {\n var cssProp = theme === null ? props.css : props.css(theme); // so that using `css` from `emotion` and passing the result to the css prop works\n // not passing the registered cache to serializeStyles because it would\n // make certain babel optimisations not possible\n\n if (typeof cssProp === 'string' && cache.registered[cssProp] !== undefined) {\n cssProp = cache.registered[cssProp];\n }\n\n var type = props[typePropName];\n var registeredStyles = [cssProp];\n var className = '';\n\n if (typeof props.className === 'string') {\n className = getRegisteredStyles(cache.registered, registeredStyles, props.className);\n } else if (props.className != null) {\n className = props.className + \" \";\n }\n\n var serialized = serializeStyles(registeredStyles);\n\n if (process.env.NODE_ENV !== 'production' && serialized.name.indexOf('-') === -1) {\n var labelFromStack = props[labelPropName];\n\n if (labelFromStack) {\n serialized = serializeStyles([serialized, 'label:' + labelFromStack + ';']);\n }\n }\n\n var rules = insertStyles(cache, serialized, typeof type === 'string');\n className += cache.key + \"-\" + serialized.name;\n var newProps = {};\n\n for (var key in props) {\n if (hasOwnProperty.call(props, key) && key !== 'css' && key !== typePropName && (process.env.NODE_ENV === 'production' || key !== labelPropName)) {\n newProps[key] = props[key];\n }\n }\n\n newProps.ref = ref;\n newProps.className = className;\n var ele = /*#__PURE__*/createElement(type, newProps);\n\n return ele;\n}; // eslint-disable-next-line no-undef\n\n\nvar Emotion = /* #__PURE__ */withEmotionCache(function (props, cache, ref) {\n if (typeof props.css === 'function') {\n return /*#__PURE__*/createElement(ThemeContext.Consumer, null, function (theme) {\n return render(cache, props, theme, ref);\n });\n }\n\n return render(cache, props, null, ref);\n});\n\nif (process.env.NODE_ENV !== 'production') {\n Emotion.displayName = 'EmotionCssPropInternal';\n}\n\nexport { CacheProvider as C, Emotion as E, ThemeContext as T, createEmotionProps as c, hasOwnProperty as h, withEmotionCache as w };\n"]},"metadata":{},"sourceType":"module"} |