UNPKG

html-react-parser

Version:
221 lines (189 loc) 71.4 kB
(function webpackUniversalModuleDefinition(root, factory) { if(typeof exports === 'object' && typeof module === 'object') module.exports = factory(require("react")); else if(typeof define === 'function' && define.amd) define(["react"], factory); else if(typeof exports === 'object') exports["HTMLReactParser"] = factory(require("react")); else root["HTMLReactParser"] = factory(root["React"]); })(window, function(__WEBPACK_EXTERNAL_MODULE_react__) { return /******/ (function(modules) { // webpackBootstrap /******/ // The module cache /******/ var installedModules = {}; /******/ /******/ // The require function /******/ function __webpack_require__(moduleId) { /******/ /******/ // Check if module is in cache /******/ if(installedModules[moduleId]) { /******/ return installedModules[moduleId].exports; /******/ } /******/ // Create a new module (and put it into the cache) /******/ var module = installedModules[moduleId] = { /******/ i: moduleId, /******/ l: false, /******/ exports: {} /******/ }; /******/ /******/ // Execute the module function /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); /******/ /******/ // Flag the module as loaded /******/ module.l = true; /******/ /******/ // Return the exports of the module /******/ return module.exports; /******/ } /******/ /******/ /******/ // expose the modules object (__webpack_modules__) /******/ __webpack_require__.m = modules; /******/ /******/ // expose the module cache /******/ __webpack_require__.c = installedModules; /******/ /******/ // define getter function for harmony exports /******/ __webpack_require__.d = function(exports, name, getter) { /******/ if(!__webpack_require__.o(exports, name)) { /******/ Object.defineProperty(exports, name, { enumerable: true, get: getter }); /******/ } /******/ }; /******/ /******/ // define __esModule on exports /******/ __webpack_require__.r = function(exports) { /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); /******/ } /******/ Object.defineProperty(exports, '__esModule', { value: true }); /******/ }; /******/ /******/ // create a fake namespace object /******/ // mode & 1: value is a module id, require it /******/ // mode & 2: merge all properties of value into the ns /******/ // mode & 4: return value when already ns object /******/ // mode & 8|1: behave like require /******/ __webpack_require__.t = function(value, mode) { /******/ if(mode & 1) value = __webpack_require__(value); /******/ if(mode & 8) return value; /******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value; /******/ var ns = Object.create(null); /******/ __webpack_require__.r(ns); /******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value }); /******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key)); /******/ return ns; /******/ }; /******/ /******/ // getDefaultExport function for compatibility with non-harmony modules /******/ __webpack_require__.n = function(module) { /******/ var getter = module && module.__esModule ? /******/ function getDefault() { return module['default']; } : /******/ function getModuleExports() { return module; }; /******/ __webpack_require__.d(getter, 'a', getter); /******/ return getter; /******/ }; /******/ /******/ // Object.prototype.hasOwnProperty.call /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; /******/ /******/ // __webpack_public_path__ /******/ __webpack_require__.p = ""; /******/ /******/ /******/ // Load entry module and return exports /******/ return __webpack_require__(__webpack_require__.s = "./index.js"); /******/ }) /************************************************************************/ /******/ ({ /***/ "./index.js": /*!******************!*\ !*** ./index.js ***! \******************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { eval("var domToReact = __webpack_require__(/*! ./lib/dom-to-react */ \"./lib/dom-to-react.js\");\nvar htmlToDOM = __webpack_require__(/*! html-dom-parser */ \"./node_modules/html-dom-parser/lib/html-to-dom-client.js\");\n\n// decode HTML entities by default for `htmlparser2`\nvar domParserOptions = { decodeEntities: true, lowerCaseAttributeNames: false };\n\n/**\n * Convert HTML string to React elements.\n *\n * @param {String} html - The HTML string.\n * @param {Object} [options] - The additional options.\n * @param {Function} [options.replace] - The replace method.\n * @return {ReactElement|Array}\n */\nfunction HTMLReactParser(html, options) {\n if (typeof html !== 'string') {\n throw new TypeError('First argument must be a string');\n }\n return domToReact(htmlToDOM(html, domParserOptions), options);\n}\n\n/**\n * Export HTML to React parser.\n */\nmodule.exports = HTMLReactParser;\n\nmodule.exports.domToReact = domToReact;\nmodule.exports.htmlToDOM = htmlToDOM;\n\n\n//# sourceURL=webpack://HTMLReactParser/./index.js?"); /***/ }), /***/ "./lib/attributes-to-props.js": /*!************************************!*\ !*** ./lib/attributes-to-props.js ***! \************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { eval("var DOMProperty = __webpack_require__(/*! react-dom-core/lib/DOMProperty */ \"./node_modules/react-dom-core/lib/DOMProperty.js\");\nvar propertyConfig = __webpack_require__(/*! ./property-config */ \"./lib/property-config.js\");\nvar styleToObject = __webpack_require__(/*! style-to-object */ \"./node_modules/style-to-object/index.js\");\nvar utilities = __webpack_require__(/*! ./utilities */ \"./lib/utilities.js\");\n\nvar config = propertyConfig.config;\nvar isCustomAttribute = propertyConfig.HTMLDOMPropertyConfig.isCustomAttribute;\nDOMProperty.injection.injectDOMPropertyConfig(\n propertyConfig.HTMLDOMPropertyConfig\n);\n\n/**\n * Makes attributes compatible with React props.\n *\n * @param {Object} [attributes={}] - The attributes.\n * @return {Object} - The props.\n */\nfunction attributesToProps(attributes) {\n attributes = attributes || {};\n var props = {};\n var propertyName;\n var propertyValue;\n var reactProperty;\n\n for (propertyName in attributes) {\n propertyValue = attributes[propertyName];\n\n // custom attributes (`data-` and `aria-`)\n if (isCustomAttribute(propertyName)) {\n props[propertyName] = propertyValue;\n continue;\n }\n\n // make HTML DOM attribute/property consistent with React attribute/property\n reactProperty = config.html[propertyName.toLowerCase()];\n if (reactProperty) {\n if (\n DOMProperty.properties.hasOwnProperty(reactProperty) &&\n DOMProperty.properties[reactProperty].hasBooleanValue\n ) {\n props[reactProperty] = true;\n } else {\n props[reactProperty] = propertyValue;\n }\n continue;\n }\n\n // make SVG DOM attribute/property consistent with React attribute/property\n reactProperty = config.svg[propertyName];\n if (reactProperty) {\n props[reactProperty] = propertyValue;\n } else if (utilities.PRESERVE_CUSTOM_ATTRIBUTES) {\n props[propertyName] = propertyValue;\n }\n }\n\n // convert inline style to object\n if (attributes.style != null) {\n props.style = cssToJs(attributes.style);\n }\n return props;\n}\n\n/**\n * Converts CSS style string to JS style object.\n *\n * @param {String} style - The CSS style.\n * @return {Object} - The JS style object.\n */\nfunction cssToJs(style) {\n if (typeof style !== 'string') {\n throw new TypeError('First argument must be a string.');\n }\n var styleObj = {};\n\n styleToObject(style, function(propName, propValue) {\n // Check if it's not a comment node\n if (propName && propValue) {\n styleObj[utilities.camelCase(propName)] = propValue;\n }\n });\n return styleObj;\n}\n\nmodule.exports = attributesToProps;\n\n\n//# sourceURL=webpack://HTMLReactParser/./lib/attributes-to-props.js?"); /***/ }), /***/ "./lib/dom-to-react.js": /*!*****************************!*\ !*** ./lib/dom-to-react.js ***! \*****************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { eval("var React = __webpack_require__(/*! react */ \"react\");\nvar attributesToProps = __webpack_require__(/*! ./attributes-to-props */ \"./lib/attributes-to-props.js\");\nvar utilities = __webpack_require__(/*! ./utilities */ \"./lib/utilities.js\");\n\n/**\n * Converts DOM nodes to React elements.\n *\n * @param {Array} nodes - The DOM nodes.\n * @param {Object} [options] - The additional options.\n * @param {Function} [options.replace] - The replace method.\n * @return {ReactElement|Array}\n */\nfunction domToReact(nodes, options) {\n options = options || {};\n var result = [];\n var node;\n var isReplacePresent = typeof options.replace === 'function';\n var replacement;\n var props;\n var children;\n\n for (var i = 0, len = nodes.length; i < len; i++) {\n node = nodes[i];\n\n // replace with custom React element (if applicable)\n if (isReplacePresent) {\n replacement = options.replace(node);\n\n if (React.isValidElement(replacement)) {\n // specify a \"key\" prop if element has siblings\n // https://fb.me/react-warning-keys\n if (len > 1) {\n replacement = React.cloneElement(replacement, {\n key: replacement.key || i\n });\n }\n result.push(replacement);\n continue;\n }\n }\n\n if (node.type === 'text') {\n result.push(node.data);\n continue;\n }\n\n props = node.attribs;\n if (!shouldPassAttributesUnaltered(node)) {\n // update values\n props = attributesToProps(node.attribs);\n }\n\n children = null;\n\n // node type for <script> is \"script\"\n // node type for <style> is \"style\"\n if (node.type === 'script' || node.type === 'style') {\n // prevent text in <script> or <style> from being escaped\n // https://facebook.github.io/react/tips/dangerously-set-inner-html.html\n if (node.children[0]) {\n props.dangerouslySetInnerHTML = {\n __html: node.children[0].data\n };\n }\n } else if (node.type === 'tag') {\n // setting textarea value in children is an antipattern in React\n // https://reactjs.org/docs/forms.html#the-textarea-tag\n if (node.name === 'textarea' && node.children[0]) {\n props.defaultValue = node.children[0].data;\n\n // continue recursion of creating React elements (if applicable)\n } else if (node.children && node.children.length) {\n children = domToReact(node.children, options);\n }\n\n // skip all other cases (e.g., comment)\n } else {\n continue;\n }\n\n // specify a \"key\" prop if element has siblings\n // https://fb.me/react-warning-keys\n if (len > 1) {\n props.key = i;\n }\n\n result.push(React.createElement(node.name, props, children));\n }\n\n return result.length === 1 ? result[0] : result;\n}\n\nfunction shouldPassAttributesUnaltered(node) {\n return (\n utilities.PRESERVE_CUSTOM_ATTRIBUTES &&\n node.type === 'tag' &&\n utilities.isCustomComponent(node.name, node.attribs)\n );\n}\n\nmodule.exports = domToReact;\n\n\n//# sourceURL=webpack://HTMLReactParser/./lib/dom-to-react.js?"); /***/ }), /***/ "./lib/property-config.js": /*!********************************!*\ !*** ./lib/property-config.js ***! \********************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { eval("var HTMLDOMPropertyConfig = __webpack_require__(/*! react-dom-core/lib/HTMLDOMPropertyConfig */ \"./node_modules/react-dom-core/lib/HTMLDOMPropertyConfig.js\");\nvar SVGDOMPropertyConfig = __webpack_require__(/*! react-dom-core/lib/SVGDOMPropertyConfig */ \"./node_modules/react-dom-core/lib/SVGDOMPropertyConfig.js\");\nvar utilities = __webpack_require__(/*! ./utilities */ \"./lib/utilities.js\");\n\nvar config = {\n html: {},\n svg: {}\n};\n\nvar propertyName;\n\n/**\n * HTML DOM property config.\n *\n * https://github.com/facebook/react/blob/15-stable/src/renderers/dom/shared/HTMLDOMPropertyConfig.js\n */\n\n// first map out the HTML attribute names\n// e.g., { className: 'class' } => { 'class': 'className' }\nconfig.html = utilities.invertObject(HTMLDOMPropertyConfig.DOMAttributeNames);\n\n// then map out the rest of the HTML properties\n// e.g., { readOnly: 0 } => { readonly: 'readOnly' }\nfor (propertyName in HTMLDOMPropertyConfig.Properties) {\n // lowercase to make matching property names easier\n config.html[propertyName.toLowerCase()] = propertyName;\n}\n\n/**\n * SVG DOM property config.\n *\n * https://github.com/facebook/react/blob/15-stable/src/renderers/dom/shared/SVGDOMPropertyConfig.js\n */\n\n// first map out the SVG attribute names\n// e.g., { fontSize: 'font-size' } => { 'font-size': 'fontSize' }\nconfig.svg = utilities.invertObject(SVGDOMPropertyConfig.DOMAttributeNames);\n\n// then map out the rest of the SVG properties\n// e.g., { fillRule: 0 } => { fillRule: 'fillRule' }\nfor (propertyName in SVGDOMPropertyConfig.Properties) {\n // do not lowercase as some svg properties are camel cased\n config.html[propertyName] = propertyName;\n}\n\nmodule.exports = {\n config: config,\n HTMLDOMPropertyConfig: HTMLDOMPropertyConfig,\n SVGDOMPropertyConfig: SVGDOMPropertyConfig\n};\n\n\n//# sourceURL=webpack://HTMLReactParser/./lib/property-config.js?"); /***/ }), /***/ "./lib/utilities.js": /*!**************************!*\ !*** ./lib/utilities.js ***! \**************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { eval("var React = __webpack_require__(/*! react */ \"react\");\nvar hyphenPatternRegex = /-([a-z])/g;\nvar CUSTOM_PROPERTY_OR_NO_HYPHEN_REGEX = /^--[a-zA-Z0-9-]+$|^[^-]+$/;\n\n/**\n * Converts a string to camelCase.\n *\n * @param {String} string - The string.\n * @return {String}\n */\nfunction camelCase(string) {\n if (typeof string !== 'string') {\n throw new TypeError('First argument must be a string');\n }\n\n // custom property or no hyphen found\n if (CUSTOM_PROPERTY_OR_NO_HYPHEN_REGEX.test(string)) {\n return string;\n }\n\n // convert to camelCase\n return string\n .toLowerCase()\n .replace(hyphenPatternRegex, function(_, character) {\n return character.toUpperCase();\n });\n}\n\n/**\n * Swap key with value in an object.\n *\n * @param {Object} obj - The object.\n * @param {Function} [override] - The override method.\n * @return {Object} - The inverted object.\n */\nfunction invertObject(obj, override) {\n if (!obj || typeof obj !== 'object') {\n throw new TypeError('First argument must be an object');\n }\n\n var key;\n var value;\n var isOverridePresent = typeof override === 'function';\n var overrides = {};\n var result = {};\n\n for (key in obj) {\n value = obj[key];\n\n if (isOverridePresent) {\n overrides = override(key, value);\n if (overrides && overrides.length === 2) {\n result[overrides[0]] = overrides[1];\n continue;\n }\n }\n\n if (typeof value === 'string') {\n result[value] = key;\n }\n }\n\n return result;\n}\n\n/**\n * Check if a given tag is a custom component.\n *\n * @see {@link https://github.com/facebook/react/blob/v16.6.3/packages/react-dom/src/shared/isCustomComponent.js}\n *\n * @param {string} tagName - The name of the html tag.\n * @param {Object} props - The props being passed to the element.\n * @return {boolean}\n */\nfunction isCustomComponent(tagName, props) {\n if (tagName.indexOf('-') === -1) {\n return props && typeof props.is === 'string';\n }\n\n switch (tagName) {\n // These are reserved SVG and MathML elements.\n // We don't mind this whitelist too much because we expect it to never grow.\n // The alternative is to track the namespace in a few places which is convoluted.\n // https://w3c.github.io/webcomponents/spec/custom/#custom-elements-core-concepts\n case 'annotation-xml':\n case 'color-profile':\n case 'font-face':\n case 'font-face-src':\n case 'font-face-uri':\n case 'font-face-format':\n case 'font-face-name':\n case 'missing-glyph':\n return false;\n default:\n return true;\n }\n}\n\n/**\n * @constant {Boolean}\n * @see {@link https://reactjs.org/blog/2017/09/08/dom-attributes-in-react-16.html}\n */\nvar PRESERVE_CUSTOM_ATTRIBUTES = React.version.split('.')[0] >= 16;\n\nmodule.exports = {\n PRESERVE_CUSTOM_ATTRIBUTES: PRESERVE_CUSTOM_ATTRIBUTES,\n camelCase: camelCase,\n invertObject: invertObject,\n isCustomComponent: isCustomComponent\n};\n\n\n//# sourceURL=webpack://HTMLReactParser/./lib/utilities.js?"); /***/ }), /***/ "./node_modules/css/lib/parse/index.js": /*!*********************************************!*\ !*** ./node_modules/css/lib/parse/index.js ***! \*********************************************/ /*! no static exports found */ /***/ (function(module, exports) { eval("// http://www.w3.org/TR/CSS21/grammar.html\n// https://github.com/visionmedia/css-parse/pull/49#issuecomment-30088027\nvar commentre = /\\/\\*[^*]*\\*+([^/*][^*]*\\*+)*\\//g\n\nmodule.exports = function(css, options){\n options = options || {};\n\n /**\n * Positional.\n */\n\n var lineno = 1;\n var column = 1;\n\n /**\n * Update lineno and column based on `str`.\n */\n\n function updatePosition(str) {\n var lines = str.match(/\\n/g);\n if (lines) lineno += lines.length;\n var i = str.lastIndexOf('\\n');\n column = ~i ? str.length - i : column + str.length;\n }\n\n /**\n * Mark position and patch `node.position`.\n */\n\n function position() {\n var start = { line: lineno, column: column };\n return function(node){\n node.position = new Position(start);\n whitespace();\n return node;\n };\n }\n\n /**\n * Store position information for a node\n */\n\n function Position(start) {\n this.start = start;\n this.end = { line: lineno, column: column };\n this.source = options.source;\n }\n\n /**\n * Non-enumerable source string\n */\n\n Position.prototype.content = css;\n\n /**\n * Error `msg`.\n */\n\n var errorsList = [];\n\n function error(msg) {\n var err = new Error(options.source + ':' + lineno + ':' + column + ': ' + msg);\n err.reason = msg;\n err.filename = options.source;\n err.line = lineno;\n err.column = column;\n err.source = css;\n\n if (options.silent) {\n errorsList.push(err);\n } else {\n throw err;\n }\n }\n\n /**\n * Parse stylesheet.\n */\n\n function stylesheet() {\n var rulesList = rules();\n\n return {\n type: 'stylesheet',\n stylesheet: {\n source: options.source,\n rules: rulesList,\n parsingErrors: errorsList\n }\n };\n }\n\n /**\n * Opening brace.\n */\n\n function open() {\n return match(/^{\\s*/);\n }\n\n /**\n * Closing brace.\n */\n\n function close() {\n return match(/^}/);\n }\n\n /**\n * Parse ruleset.\n */\n\n function rules() {\n var node;\n var rules = [];\n whitespace();\n comments(rules);\n while (css.length && css.charAt(0) != '}' && (node = atrule() || rule())) {\n if (node !== false) {\n rules.push(node);\n comments(rules);\n }\n }\n return rules;\n }\n\n /**\n * Match `re` and return captures.\n */\n\n function match(re) {\n var m = re.exec(css);\n if (!m) return;\n var str = m[0];\n updatePosition(str);\n css = css.slice(str.length);\n return m;\n }\n\n /**\n * Parse whitespace.\n */\n\n function whitespace() {\n match(/^\\s*/);\n }\n\n /**\n * Parse comments;\n */\n\n function comments(rules) {\n var c;\n rules = rules || [];\n while (c = comment()) {\n if (c !== false) {\n rules.push(c);\n }\n }\n return rules;\n }\n\n /**\n * Parse comment.\n */\n\n function comment() {\n var pos = position();\n if ('/' != css.charAt(0) || '*' != css.charAt(1)) return;\n\n var i = 2;\n while (\"\" != css.charAt(i) && ('*' != css.charAt(i) || '/' != css.charAt(i + 1))) ++i;\n i += 2;\n\n if (\"\" === css.charAt(i-1)) {\n return error('End of comment missing');\n }\n\n var str = css.slice(2, i - 2);\n column += 2;\n updatePosition(str);\n css = css.slice(i);\n column += 2;\n\n return pos({\n type: 'comment',\n comment: str\n });\n }\n\n /**\n * Parse selector.\n */\n\n function selector() {\n var m = match(/^([^{]+)/);\n if (!m) return;\n /* @fix Remove all comments from selectors\n * http://ostermiller.org/findcomment.html */\n return trim(m[0])\n .replace(/\\/\\*([^*]|[\\r\\n]|(\\*+([^*/]|[\\r\\n])))*\\*\\/+/g, '')\n .replace(/\"(?:\\\\\"|[^\"])*\"|'(?:\\\\'|[^'])*'/g, function(m) {\n return m.replace(/,/g, '\\u200C');\n })\n .split(/\\s*(?![^(]*\\)),\\s*/)\n .map(function(s) {\n return s.replace(/\\u200C/g, ',');\n });\n }\n\n /**\n * Parse declaration.\n */\n\n function declaration() {\n var pos = position();\n\n // prop\n var prop = match(/^(\\*?[-#\\/\\*\\\\\\w]+(\\[[0-9a-z_-]+\\])?)\\s*/);\n if (!prop) return;\n prop = trim(prop[0]);\n\n // :\n if (!match(/^:\\s*/)) return error(\"property missing ':'\");\n\n // val\n var val = match(/^((?:'(?:\\\\'|.)*?'|\"(?:\\\\\"|.)*?\"|\\([^\\)]*?\\)|[^};])+)/);\n\n var ret = pos({\n type: 'declaration',\n property: prop.replace(commentre, ''),\n value: val ? trim(val[0]).replace(commentre, '') : ''\n });\n\n // ;\n match(/^[;\\s]*/);\n\n return ret;\n }\n\n /**\n * Parse declarations.\n */\n\n function declarations() {\n var decls = [];\n\n if (!open()) return error(\"missing '{'\");\n comments(decls);\n\n // declarations\n var decl;\n while (decl = declaration()) {\n if (decl !== false) {\n decls.push(decl);\n comments(decls);\n }\n }\n\n if (!close()) return error(\"missing '}'\");\n return decls;\n }\n\n /**\n * Parse keyframe.\n */\n\n function keyframe() {\n var m;\n var vals = [];\n var pos = position();\n\n while (m = match(/^((\\d+\\.\\d+|\\.\\d+|\\d+)%?|[a-z]+)\\s*/)) {\n vals.push(m[1]);\n match(/^,\\s*/);\n }\n\n if (!vals.length) return;\n\n return pos({\n type: 'keyframe',\n values: vals,\n declarations: declarations()\n });\n }\n\n /**\n * Parse keyframes.\n */\n\n function atkeyframes() {\n var pos = position();\n var m = match(/^@([-\\w]+)?keyframes\\s*/);\n\n if (!m) return;\n var vendor = m[1];\n\n // identifier\n var m = match(/^([-\\w]+)\\s*/);\n if (!m) return error(\"@keyframes missing name\");\n var name = m[1];\n\n if (!open()) return error(\"@keyframes missing '{'\");\n\n var frame;\n var frames = comments();\n while (frame = keyframe()) {\n frames.push(frame);\n frames = frames.concat(comments());\n }\n\n if (!close()) return error(\"@keyframes missing '}'\");\n\n return pos({\n type: 'keyframes',\n name: name,\n vendor: vendor,\n keyframes: frames\n });\n }\n\n /**\n * Parse supports.\n */\n\n function atsupports() {\n var pos = position();\n var m = match(/^@supports *([^{]+)/);\n\n if (!m) return;\n var supports = trim(m[1]);\n\n if (!open()) return error(\"@supports missing '{'\");\n\n var style = comments().concat(rules());\n\n if (!close()) return error(\"@supports missing '}'\");\n\n return pos({\n type: 'supports',\n supports: supports,\n rules: style\n });\n }\n\n /**\n * Parse host.\n */\n\n function athost() {\n var pos = position();\n var m = match(/^@host\\s*/);\n\n if (!m) return;\n\n if (!open()) return error(\"@host missing '{'\");\n\n var style = comments().concat(rules());\n\n if (!close()) return error(\"@host missing '}'\");\n\n return pos({\n type: 'host',\n rules: style\n });\n }\n\n /**\n * Parse media.\n */\n\n function atmedia() {\n var pos = position();\n var m = match(/^@media *([^{]+)/);\n\n if (!m) return;\n var media = trim(m[1]);\n\n if (!open()) return error(\"@media missing '{'\");\n\n var style = comments().concat(rules());\n\n if (!close()) return error(\"@media missing '}'\");\n\n return pos({\n type: 'media',\n media: media,\n rules: style\n });\n }\n\n\n /**\n * Parse custom-media.\n */\n\n function atcustommedia() {\n var pos = position();\n var m = match(/^@custom-media\\s+(--[^\\s]+)\\s*([^{;]+);/);\n if (!m) return;\n\n return pos({\n type: 'custom-media',\n name: trim(m[1]),\n media: trim(m[2])\n });\n }\n\n /**\n * Parse paged media.\n */\n\n function atpage() {\n var pos = position();\n var m = match(/^@page */);\n if (!m) return;\n\n var sel = selector() || [];\n\n if (!open()) return error(\"@page missing '{'\");\n var decls = comments();\n\n // declarations\n var decl;\n while (decl = declaration()) {\n decls.push(decl);\n decls = decls.concat(comments());\n }\n\n if (!close()) return error(\"@page missing '}'\");\n\n return pos({\n type: 'page',\n selectors: sel,\n declarations: decls\n });\n }\n\n /**\n * Parse document.\n */\n\n function atdocument() {\n var pos = position();\n var m = match(/^@([-\\w]+)?document *([^{]+)/);\n if (!m) return;\n\n var vendor = trim(m[1]);\n var doc = trim(m[2]);\n\n if (!open()) return error(\"@document missing '{'\");\n\n var style = comments().concat(rules());\n\n if (!close()) return error(\"@document missing '}'\");\n\n return pos({\n type: 'document',\n document: doc,\n vendor: vendor,\n rules: style\n });\n }\n\n /**\n * Parse font-face.\n */\n\n function atfontface() {\n var pos = position();\n var m = match(/^@font-face\\s*/);\n if (!m) return;\n\n if (!open()) return error(\"@font-face missing '{'\");\n var decls = comments();\n\n // declarations\n var decl;\n while (decl = declaration()) {\n decls.push(decl);\n decls = decls.concat(comments());\n }\n\n if (!close()) return error(\"@font-face missing '}'\");\n\n return pos({\n type: 'font-face',\n declarations: decls\n });\n }\n\n /**\n * Parse import\n */\n\n var atimport = _compileAtrule('import');\n\n /**\n * Parse charset\n */\n\n var atcharset = _compileAtrule('charset');\n\n /**\n * Parse namespace\n */\n\n var atnamespace = _compileAtrule('namespace');\n\n /**\n * Parse non-block at-rules\n */\n\n\n function _compileAtrule(name) {\n var re = new RegExp('^@' + name + '\\\\s*([^;]+);');\n return function() {\n var pos = position();\n var m = match(re);\n if (!m) return;\n var ret = { type: name };\n ret[name] = m[1].trim();\n return pos(ret);\n }\n }\n\n /**\n * Parse at rule.\n */\n\n function atrule() {\n if (css[0] != '@') return;\n\n return atkeyframes()\n || atmedia()\n || atcustommedia()\n || atsupports()\n || atimport()\n || atcharset()\n || atnamespace()\n || atdocument()\n || atpage()\n || athost()\n || atfontface();\n }\n\n /**\n * Parse rule.\n */\n\n function rule() {\n var pos = position();\n var sel = selector();\n\n if (!sel) return error('selector missing');\n comments();\n\n return pos({\n type: 'rule',\n selectors: sel,\n declarations: declarations()\n });\n }\n\n return addParent(stylesheet());\n};\n\n/**\n * Trim `str`.\n */\n\nfunction trim(str) {\n return str ? str.replace(/^\\s+|\\s+$/g, '') : '';\n}\n\n/**\n * Adds non-enumerable parent node reference to each node.\n */\n\nfunction addParent(obj, parent) {\n var isNode = obj && typeof obj.type === 'string';\n var childParent = isNode ? obj : parent;\n\n for (var k in obj) {\n var value = obj[k];\n if (Array.isArray(value)) {\n value.forEach(function(v) { addParent(v, childParent); });\n } else if (value && typeof value === 'object') {\n addParent(value, childParent);\n }\n }\n\n if (isNode) {\n Object.defineProperty(obj, 'parent', {\n configurable: true,\n writable: true,\n enumerable: false,\n value: parent || null\n });\n }\n\n return obj;\n}\n\n\n//# sourceURL=webpack://HTMLReactParser/./node_modules/css/lib/parse/index.js?"); /***/ }), /***/ "./node_modules/fbjs/lib/invariant.js": /*!********************************************!*\ !*** ./node_modules/fbjs/lib/invariant.js ***! \********************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; eval("/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n\n\n\n/**\n * Use invariant() to assert state which your program assumes to be true.\n *\n * Provide sprintf-style format (only %s is supported) and arguments\n * to provide information about what broke and what you were\n * expecting.\n *\n * The invariant message will be stripped in production, but the invariant\n * will remain to ensure logic does not differ in production.\n */\n\nvar validateFormat = function validateFormat(format) {};\n\nif (true) {\n validateFormat = function validateFormat(format) {\n if (format === undefined) {\n throw new Error('invariant requires an error message argument');\n }\n };\n}\n\nfunction invariant(condition, format, a, b, c, d, e, f) {\n validateFormat(format);\n\n if (!condition) {\n var error;\n if (format === undefined) {\n error = new Error('Minified exception occurred; use the non-minified dev environment ' + 'for the full error message and additional helpful warnings.');\n } else {\n var args = [a, b, c, d, e, f];\n var argIndex = 0;\n error = new Error(format.replace(/%s/g, function () {\n return args[argIndex++];\n }));\n error.name = 'Invariant Violation';\n }\n\n error.framesToPop = 1; // we don't care about invariant's own frame\n throw error;\n }\n}\n\nmodule.exports = invariant;\n\n//# sourceURL=webpack://HTMLReactParser/./node_modules/fbjs/lib/invariant.js?"); /***/ }), /***/ "./node_modules/html-dom-parser/lib/domparser.js": /*!*******************************************************!*\ !*** ./node_modules/html-dom-parser/lib/domparser.js ***! \*******************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; eval("\n\n/**\n * Module dependencies.\n */\nvar utilities = __webpack_require__(/*! ./utilities */ \"./node_modules/html-dom-parser/lib/utilities.js\");\nvar detectIE = utilities.isIE;\n\n/**\n * Constants.\n */\nvar HTML_TAG_NAME = 'html';\nvar BODY_TAG_NAME = 'body';\nvar HEAD_TAG_NAME = 'head';\nvar FIRST_TAG_REGEX = /<([a-zA-Z]+[0-9]?)/; // e.g., <h1>\nvar HEAD_REGEX = /<\\/head>/i;\nvar BODY_REGEX = /<\\/body>/i;\n// http://www.w3.org/TR/html/syntax.html#void-elements\nvar VOID_ELEMENTS_REGEX = /<(area|base|br|col|embed|hr|img|input|keygen|link|menuitem|meta|param|source|track|wbr)(.*?)\\/?>/gi;\n\n// browser support\nvar isIE = detectIE();\nvar isIE9 = detectIE(9);\n\n/**\n * DOMParser (performance: slow).\n *\n * https://developer.mozilla.org/docs/Web/API/DOMParser#Parsing_an_SVG_or_HTML_document\n */\nvar parseFromString;\nif (typeof window.DOMParser === 'function') {\n var domParser = new window.DOMParser();\n // IE9 does not support 'text/html' MIME type\n // https://msdn.microsoft.com/en-us/library/ff975278(v=vs.85).aspx\n var MIME_TYPE = isIE9 ? 'text/xml' : 'text/html';\n\n /**\n * Creates an HTML document using `DOMParser.parseFromString`.\n *\n * @param {String} html - The HTML string.\n * @param {String} [tagName] - The element to render the HTML (with 'body' as fallback).\n * @return {HTMLDocument}\n */\n parseFromString = function domStringParser(html, tagName) {\n if (tagName) {\n html = ['<', tagName, '>', html, '</', tagName, '>'].join('');\n }\n // because IE9 only supports MIME type 'text/xml', void elements need to be self-closed\n if (isIE9) {\n html = html.replace(VOID_ELEMENTS_REGEX, '<$1$2$3/>');\n }\n return domParser.parseFromString(html, MIME_TYPE);\n };\n}\n\n/**\n * DOMImplementation (performance: fair).\n *\n * https://developer.mozilla.org/docs/Web/API/DOMImplementation/createHTMLDocument\n */\nvar parseFromDocument;\nif (typeof document.implementation === 'object') {\n // title parameter is required in IE\n // https://msdn.microsoft.com/en-us/library/ff975457(v=vs.85).aspx\n var doc = document.implementation.createHTMLDocument(isIE ? 'HTML_DOM_PARSER_TITLE' : undefined);\n\n /**\n * Use HTML document created by `document.implementation.createHTMLDocument`.\n *\n * @param {String} html - The HTML string.\n * @param {String} [tagName] - The element to render the HTML (with 'body' as fallback).\n * @return {HTMLDocument}\n */\n parseFromDocument = function createHTMLDocument(html, tagName) {\n if (tagName) {\n doc.documentElement.getElementsByTagName(tagName)[0].innerHTML = html;\n return doc;\n }\n\n try {\n doc.documentElement.innerHTML = html;\n return doc;\n // fallback when certain elements in `documentElement` are read-only (IE9)\n } catch (err) {\n if (parseFromString) return parseFromString(html);\n }\n };\n}\n\n/**\n * Template (performance: fast).\n *\n * https://developer.mozilla.org/docs/Web/HTML/Element/template\n */\nvar parseFromTemplate;\nvar template = document.createElement('template');\nif (template.content) {\n\n /**\n * Uses a template element (content fragment) to parse HTML.\n *\n * @param {String} html - The HTML string.\n * @return {NodeList}\n */\n parseFromTemplate = function templateParser(html) {\n template.innerHTML = html;\n return template.content.childNodes;\n };\n}\n\n/** Fallback document parser. */\nvar parseWithFallback = parseFromDocument || parseFromString;\n\n/**\n * Parses HTML string to DOM nodes.\n *\n * @param {String} html - The HTML string.\n * @param {String} [tagName] - The tag name.\n * @return {NodeList|Array}\n */\nmodule.exports = function domparser(html) {\n // try to match first tag\n var tagName;\n var match = html.match(FIRST_TAG_REGEX);\n if (match && match[1]) {\n tagName = match[1].toLowerCase();\n }\n\n var doc;\n var element;\n var elements;\n\n switch (tagName) {\n case HTML_TAG_NAME:\n if (parseFromString) {\n doc = parseFromString(html);\n\n // the created document may come with filler head/body elements,\n // so ake sure to remove them if they don't actually exist\n if (!HEAD_REGEX.test(html)) {\n element = doc.getElementsByTagName(HEAD_TAG_NAME)[0];\n if (element) element.parentNode.removeChild(element);\n }\n if (!BODY_REGEX.test(html)) {\n element = doc.getElementsByTagName(BODY_TAG_NAME)[0];\n if (element) element.parentNode.removeChild(element);\n }\n\n return doc.getElementsByTagName(HTML_TAG_NAME);\n }\n break;\n\n case HEAD_TAG_NAME:\n if (parseWithFallback) {\n elements = parseWithFallback(html).getElementsByTagName(HEAD_TAG_NAME);\n\n // account for possibility of sibling\n if (BODY_REGEX.test(html)) {\n return elements[0].parentNode.childNodes;\n }\n return elements;\n }\n break;\n\n case BODY_TAG_NAME:\n if (parseWithFallback) {\n elements = parseWithFallback(html).getElementsByTagName(BODY_TAG_NAME);\n\n // account for possibility of sibling (return both body and head)\n if (HEAD_REGEX.test(html)) {\n return elements[0].parentNode.childNodes;\n }\n return elements;\n }\n break;\n\n // low-level tag or text\n default:\n if (parseFromTemplate) return parseFromTemplate(html);\n if (parseWithFallback) {\n return parseWithFallback(html, BODY_TAG_NAME).getElementsByTagName(BODY_TAG_NAME)[0].childNodes;\n }\n break;\n }\n\n return [];\n};\n\n\n//# sourceURL=webpack://HTMLReactParser/./node_modules/html-dom-parser/lib/domparser.js?"); /***/ }), /***/ "./node_modules/html-dom-parser/lib/html-to-dom-client.js": /*!****************************************************************!*\ !*** ./node_modules/html-dom-parser/lib/html-to-dom-client.js ***! \****************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; eval("\n\n/**\n * Module dependencies.\n */\nvar domparser = __webpack_require__(/*! ./domparser */ \"./node_modules/html-dom-parser/lib/domparser.js\");\nvar utilities = __webpack_require__(/*! ./utilities */ \"./node_modules/html-dom-parser/lib/utilities.js\");\nvar formatDOM = utilities.formatDOM;\nvar isIE9 = utilities.isIE(9);\n\n/**\n * Constants.\n */\nvar DIRECTIVE_REGEX = /<(![a-zA-Z\\s]+)>/; // e.g., <!doctype html>\n\n/**\n * Parses HTML and reformats DOM nodes output.\n *\n * @param {String} html - The HTML string.\n * @return {Array} - The formatted DOM nodes.\n */\nmodule.exports = function parseDOM(html) {\n if (typeof html !== 'string') {\n throw new TypeError('First argument must be a string.');\n }\n if (!html) return [];\n\n // match directive\n var match = html.match(DIRECTIVE_REGEX);\n var directive;\n if (match && match[1]) {\n directive = match[1];\n\n // remove directive in IE9 because DOMParser uses\n // MIME type 'text/xml' instead of 'text/html'\n if (isIE9) {\n html = html.replace(match[0], '');\n }\n }\n\n return formatDOM(domparser(html), null, directive);\n};\n\n\n//# sourceURL=webpack://HTMLReactParser/./node_modules/html-dom-parser/lib/html-to-dom-client.js?"); /***/ }), /***/ "./node_modules/html-dom-parser/lib/utilities.js": /*!*******************************************************!*\ !*** ./node_modules/html-dom-parser/lib/utilities.js ***! \*******************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; eval("\n\n/**\n * Format DOM attributes to an associative array.\n *\n * @param {NamedNodeMap} - The list of attributes.\n * @return {Object} - The object of attributes.\n */\nfunction formatAttributes(attributes) {\n var result = {};\n var attribute;\n\n // NamedNodeMap is array-like\n for (var i = 0, len = attributes.length; i < len; i++) {\n attribute = attributes[i];\n result[attribute.name] = attribute.value;\n }\n\n return result;\n}\n\n/**\n * Format the browser DOM nodes to mimic the output of `htmlparser2.parseDOM()`.\n *\n * @param {NodeList} nodes - The DOM nodes.\n * @param {Object} [parentObj] - The formatted parent node.\n * @param {String} [directive] - The directive.\n * @return {Object} - The formatted DOM object.\n */\nfunction formatDOM(nodes, parentObj, directive) {\n parentObj = parentObj || null;\n\n var result = [];\n var node;\n var prevNode;\n var nodeObj;\n\n // NodeList is array-like\n for (var i = 0, len = nodes.length; i < len; i++) {\n node = nodes[i];\n // reset\n nodeObj = {\n next: null,\n prev: result[i - 1] || null,\n parent: parentObj\n };\n\n // set the next node for the previous node (if applicable)\n prevNode = result[i - 1];\n if (prevNode) {\n prevNode.next = nodeObj;\n }\n\n // set the node name if it's not \"#text\" or \"#comment\"\n // e.g., \"div\"\n if (node.nodeName.indexOf('#') !== 0) {\n nodeObj.name = node.nodeName.toLowerCase();\n\n // also, nodes of type \"tag\" have \"attribs\"\n nodeObj.attribs = {}; // default\n if (node.attributes && node.attributes.length) {\n nodeObj.attribs = formatAttributes(node.attributes);\n }\n }\n\n // set the node type\n // e.g., \"tag\"\n switch (node.nodeType) {\n // 1 = element\n case 1:\n if (nodeObj.name === 'script' || nodeObj.name === 'style') {\n nodeObj.type = nodeObj.name;\n } else {\n nodeObj.type = 'tag';\n }\n // recursively format the children\n nodeObj.children = formatDOM(node.childNodes, nodeObj);\n break;\n // 2 = attribute\n // 3 = text\n case 3:\n nodeObj.type = 'text';\n nodeObj.data = node.nodeValue;\n break;\n // 8 = comment\n case 8:\n nodeObj.type = 'comment';\n nodeObj.data = node.nodeValue;\n break;\n default:\n break;\n }\n\n result.push(nodeObj);\n }\n\n if (directive) {\n result.unshift({\n name: directive.substring(0, directive.indexOf(' ')).toLowerCase(),\n data: directive,\n type: 'directive',\n next: result[0] ? result[0] : null,\n prev: null,\n parent: parentObj\n });\n\n if (result[1]) {\n result[1].prev = result[0];\n }\n }\n\n return result;\n}\n\n/**\n * Detect IE with or without version.\n *\n * @param {Number} [version] - The IE version to detect.\n * @return {Boolean} - Whether IE or the version has been detected.\n */\nfunction isIE(version) {\n if (version) {\n return document.documentMode === version;\n }\n return /(MSIE |Trident\\/|Edge\\/)/.test(navigator.userAgent);\n}\n\n/**\n * Export utilities.\n */\nmodule.exports = {\n formatAttributes: formatAttributes,\n formatDOM: formatDOM,\n isIE: isIE\n};\n\n\n//# sourceURL=webpack://HTMLReactParser/./node_modules/html-dom-parser/lib/utilities.js?"); /***/ }), /***/ "./node_modules/react-dom-core/lib/DOMProperty.js": /*!********************************************************!*\ !*** ./node_modules/react-dom-core/lib/DOMProperty.js ***! \********************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; eval("/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n\n\n\nvar _prodInvariant = __webpack_require__(/*! ./reactProdInvariant */ \"./node_modules/react-dom-core/lib/reactProdInvariant.js\");\n\nvar invariant = __webpack_require__(/*! fbjs/lib/invariant */ \"./node_modules/fbjs/lib/invariant.js\");\n\nfunction checkMask(value, bitmask) {\n return (value & bitmask) === bitmask;\n}\n\nvar DOMPropertyInjection = {\n /**\n * Mapping from normalized, camelcased property names to a configuration that\n * specifies how the associated DOM property should be accessed or rendered.\n */\n MUST_USE_PROPERTY: 0x1,\n HAS_BOOLEAN_VALUE: 0x4,\n HAS_NUMERIC_VALUE: 0x8,\n HAS_POSITIVE_NUMERIC_VALUE: 0x10 | 0x8,\n HAS_OVERLOADED_BOOLEAN_VALUE: 0x20,\n\n /**\n * Inject some specialized knowledge about the DOM. This takes a config object\n * with the following properties:\n *\n * isCustomAttribute: function that given an attribute name will return true\n * if it can be inserted into the DOM verbatim. Useful for data-* or aria-*\n * attributes where it's impossible to enumerate all of the possible\n * attribute names,\n *\n * Properties: object mapping DOM property name to one of the\n * DOMPropertyInjection constants or null. If your attribute isn't in here,\n * it won't get written to the DOM.\n *\n * DOMAttributeNames: object mapping React attribute name to the DOM\n * attribute name. Attribute names not specified use the **lowercase**\n * normalized name.\n *\n * DOMAttributeNamespaces: object mapping React attribute name to the DOM\n * attribute namespace URL. (Attribute names not specified use no namespace.)\n *\n * DOMPropertyNames: similar to DOMAttributeNames but for DOM properties.\n * Property names not specified use the normalized name.\n *\n * DOMMutationMethods: Properties that require special mutation methods. If\n * `value` is undefined, the mutation method should unset the property.\n *\n * @param {object} domPropertyConfig the config as described above.\n */\n injectDOMPropertyConfig: function (domPropertyConfig) {\n var Injection = DOMPropertyInjection;\n var Properties = domPropertyConfig.Properties || {};\n var DOMAttributeNamespaces = domPropertyConfig.DOMAttributeNamespaces || {};\n var DOMAttributeNames = domPropertyConfig.DOMAttributeNames || {};\n var DOMPropertyNames = domPropertyConfig.DOMPropertyNames || {};\n var DOMMutationMethods = domPropertyConfig.DOMMutationMethods || {};\n\n if (domPropertyConfig.isCustomAttribute) {\n DOMProperty._isCustomAttributeFunctions.push(domPropertyConfig.isCustomAttribute);\n }\n\n for (var propName in Properties) {\n !!DOMProperty.properties.hasOwnProperty(propName) ? true ? invariant(false, 'injectDOMPropertyConfig(...): You\\'re trying to inject DOM property \\'%s\\' which has already been injected. You may be accidentally injecting the same DOM property config twice, or you may be injecting two configs that have conflicting property names.', propName) : undefined : void 0;\n\n var lowerCased = propName.toLowerCase();\n var propConfig = Properties[propName];\n\n var propertyInfo = {\n attributeName: lowerCased,\n attributeNamespace: null,\n propertyName: propName,\n mutationMethod: null,\n\n mustUseProperty: checkMask(propConfig, Injection.MUST_USE_PROPERTY),\n hasBooleanValue: checkMask(propConfig, Injection.HAS_BOOLEAN_VALUE),\n hasNumericValue: checkMask(propConfig, Injection.HAS_NUMERIC_VALUE),\n hasPositiveNumericValue: checkMask(propConfig, Injection.HAS_POSITIVE_NUMERIC_VALUE),\n hasOverloadedBooleanValue: checkMask(propConfig, Injection.HAS_OVERLOADED_BOOLEAN_VALUE)\n };\n !(propertyInfo.hasBooleanValue + propertyInfo.hasNumericValue + propertyInfo.hasOverloadedBooleanValue <= 1) ? true ? invariant(false, 'DOMProperty: Value can be one of boolean, overloaded boolean, or numeric value, but not a combination: %s', propName) : undefined : void 0;\n\n if (true) {\n DOMProperty.getPossibleStandardName[lowerCased] = propName;\n }\n\n if (DOMAttributeNames.hasOwnProperty(propName)) {\n var attributeName = DOMAttributeNames[propName];\n propertyInfo.attributeName = attributeName;\n if (true) {\n DOMProperty.getPossibleStandardName[attributeName] = propName;\n }\n }\n\n if (DOMAttributeNamespaces.hasOwnProperty(propName)) {\n propertyInfo.attributeNamespace = DOMAttributeNamespaces[propName];\n }\n\n if (DOMPropertyNames.hasOwnProperty(propName)) {\n propertyInfo.propertyName = DOMPropertyNames[propName];\n }\n\n if (DOMMutationMethods.hasOwnProperty(propName)) {\n propertyInfo.mutationMethod = DOMMutationMethods[propName];\n }\n\n DOMProperty.properties[propName] = propertyInfo;\n }\n }\n};\n\n/* eslint-disable max-len */\nvar ATTRIBUTE_NAME_START_CHAR = ':A-Z_a-z\\\\u00C0-\\\\u00D6\\\\u00D8-\\\\u00F6\\\\u00F8-\\\\u02FF\\\\u0370-\\\\u037D\\\\u037F-\\\\u1FFF\\\\u200C-\\\\u200D\\\\u2070-\\\\u218F\\\\u2C00-\\\\u2FEF\\\\u3001-\\\\uD7FF\\\\uF900-\\\\uFDCF\\\\uFDF0-\\\\uFFFD';\n/* eslint-enable max-len */\n\n/**\n * DOMProperty exports lookup objects that can be used like functions:\n *\n * > DOMProperty.isValid['id']\n * true\n * > DOMProperty.isValid['foobar']\n * undefined\n *\n * Although this may be confusing, it performs better in general.\n *\n * @see http://jsperf.com/key-exists\n * @see http://jsperf.com/key-missing\n */\nvar DOMProperty = {\n ID_ATTRIBUTE_NAME: 'data-reactid',\n ROOT_ATTRIBUTE_NAME: 'data-reactroot',\n\n ATTRIBUTE_NAME_START_CHAR: ATTRIBUTE_NAME_START_CHAR,\n ATTRIBUTE_NAME_CHAR: ATTRIBUTE_NAME_START_CHAR + '\\\\-.0-9\\\\u00B