{"version":3,"file":"npm.jss-plugin-camel-case.js","mappings":";;;;;;;;;;;AAA6C;;AAE7C;AACA;AACA;AACA,WAAW,QAAQ;AACnB,YAAY;AACZ;;AAEA;AACA;;AAEA;AACA,gDAAgD,gEAAS;AACzD;AACA;;AAEA;AACA,+FAA+F;AAC/F;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB;;;AAGA;AACA;AACA;AACA;AACA,0BAA0B,sBAAsB;AAChD;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,yBAAyB,gEAAS,QAAQ;;AAE1C;AACA,sCAAsC;;AAEtC;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,+DAAe,SAAS,EAAC","sources":["webpack://giveeasy.cloud/./node_modules/jss-plugin-camel-case/dist/jss-plugin-camel-case.esm.js"],"sourcesContent":["import hyphenate from 'hyphenate-style-name';\n\n/**\n * Convert camel cased property names to dash separated.\n *\n * @param {Object} style\n * @return {Object}\n */\n\nfunction convertCase(style) {\n var converted = {};\n\n for (var prop in style) {\n var key = prop.indexOf('--') === 0 ? prop : hyphenate(prop);\n converted[key] = style[prop];\n }\n\n if (style.fallbacks) {\n if (Array.isArray(style.fallbacks)) converted.fallbacks = style.fallbacks.map(convertCase);else converted.fallbacks = convertCase(style.fallbacks);\n }\n\n return converted;\n}\n/**\n * Allow camel cased property names by converting them back to dasherized.\n *\n * @param {Rule} rule\n */\n\n\nfunction camelCase() {\n function onProcessStyle(style) {\n if (Array.isArray(style)) {\n // Handle rules like @font-face, which can have multiple styles in an array\n for (var index = 0; index < style.length; index++) {\n style[index] = convertCase(style[index]);\n }\n\n return style;\n }\n\n return convertCase(style);\n }\n\n function onChangeValue(value, prop, rule) {\n if (prop.indexOf('--') === 0) {\n return value;\n }\n\n var hyphenatedProp = hyphenate(prop); // There was no camel case in place\n\n if (prop === hyphenatedProp) return value;\n rule.prop(hyphenatedProp, value); // Core will ignore that property value we set the proper one above.\n\n return null;\n }\n\n return {\n onProcessStyle: onProcessStyle,\n onChangeValue: onChangeValue\n };\n}\n\nexport default camelCase;\n"],"names":[],"sourceRoot":""}