{"version":3,"sources":["node_modules\\fbjs\\lib\\getMarkupWrap.js"],"names":["ExecutionEnvironment","require","invariant","dummyNode","canUseDOM","document","createElement","shouldWrap","selectWrap","tableWrap","trWrap","svgWrap","markupWrap","svgElements","forEach","nodeName","getMarkupWrap","process","env","NODE_ENV","hasOwnProperty","innerHTML","firstChild","module","exports"],"mappings":"AAAA;;;;;;;;;;;;;;AAcA,GAAIA,sBAAuBC,QAAQ,wBAAR,CAA3B;;AAEA,GAAIC,WAAYD,QAAQ,aAAR,CAAhB;;;;;AAKA,GAAIE,WAAYH,qBAAqBI,SAArB,CAAiCC,SAASC,aAAT,CAAuB,KAAvB,CAAjC,CAAiE,IAAjF;;;;;;;;;AASA,GAAIC,YAAa,EAAjB;;AAEA,GAAIC,YAAa,CAAC,CAAD,CAAI,0BAAJ,CAAgC,WAAhC,CAAjB;AACA,GAAIC,WAAY,CAAC,CAAD,CAAI,SAAJ,CAAe,UAAf,CAAhB;AACA,GAAIC,QAAS,CAAC,CAAD,CAAI,oBAAJ,CAA0B,uBAA1B,CAAb;;AAEA,GAAIC,SAAU,CAAC,CAAD,CAAI,0CAAJ,CAAgD,QAAhD,CAAd;;AAEA,GAAIC,YAAa;AACf,IAAK,CAAC,CAAD,CAAI,QAAJ,CAAc,QAAd,CADU;;AAGf,OAAQ,CAAC,CAAD,CAAI,OAAJ,CAAa,QAAb,CAHO;AAIf,MAAO,CAAC,CAAD,CAAI,kCAAJ,CAAwC,qBAAxC,CAJQ;AAKf,SAAU,CAAC,CAAD,CAAI,YAAJ,CAAkB,aAAlB,CALK;AAMf,QAAS,CAAC,CAAD,CAAI,UAAJ,CAAgB,WAAhB,CANM;AAOf,KAAM,CAAC,CAAD,CAAI,gBAAJ,CAAsB,kBAAtB,CAPS;;AASf,WAAYJ,UATG;AAUf,SAAUA,UAVK;;AAYf,UAAWC,SAZI;AAaf,WAAYA,SAbG;AAcf,QAASA,SAdM;AAef,QAASA,SAfM;AAgBf,QAASA,SAhBM;;AAkBf,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/tmpl/project","sourcesContent":["'use strict';\n\n/**\n * Copyright (c) 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n */\n\n/*eslint-disable fb-www/unsafe-html */\n\nvar ExecutionEnvironment = require('./ExecutionEnvironment');\n\nvar invariant = require('./invariant');\n\n/**\n * Dummy container used to detect which wraps are necessary.\n */\nvar dummyNode = ExecutionEnvironment.canUseDOM ? document.createElement('div') : null;\n\n/**\n * Some browsers cannot use `innerHTML` to render certain elements standalone,\n * so we wrap them, render the wrapped nodes, then extract the desired node.\n *\n * In IE8, certain elements cannot render alone, so wrap all elements ('*').\n */\n\nvar shouldWrap = {};\n\nvar selectWrap = [1, '<select multiple=\"true\">', '</select>'];\nvar tableWrap = [1, '<table>', '</table>'];\nvar trWrap = [3, '<table><tbody><tr>', '</tr></tbody></table>'];\n\nvar svgWrap = [1, '<svg xmlns=\"http://www.w3.org/2000/svg\">', '</svg>'];\n\nvar markupWrap = {\n  '*': [1, '?<div>', '</div>'],\n\n  'area': [1, '<map>', '</map>'],\n  'col': [2, '<table><tbody></tbody><colgroup>', '</colgroup></table>'],\n  'legend': [1, '<fieldset>', '</fieldset>'],\n  'param': [1, '<object>', '</object>'],\n  'tr': [2, '<table><tbody>', '</tbody></table>'],\n\n  'optgroup': selectWrap,\n  'option': selectWrap,\n\n  'caption': tableWrap,\n  'colgroup': tableWrap,\n  'tbody': tableWrap,\n  'tfoot': tableWrap,\n  'thead': tableWrap,\n\n  'td': trWrap,\n  'th': trWrap\n};\n\n// Initialize the SVG elements since we know they'll always need to be wrapped\n// consistently. If they are created inside a <div> they will be initialized in\n// the wrong namespace (and will not display).\nvar svgElements = ['circle', 'clipPath', 'defs', 'ellipse', 'g', 'image', 'line', 'linearGradient', 'mask', 'path', 'pattern', 'polygon', 'polyline', 'radialGradient', 'rect', 'stop', 'text', 'tspan'];\nsvgElements.forEach(function (nodeName) {\n  markupWrap[nodeName] = svgWrap;\n  shouldWrap[nodeName] = true;\n});\n\n/**\n * Gets the markup wrap configuration for the supplied `nodeName`.\n *\n * NOTE: This lazily detects which wraps are necessary for the current browser.\n *\n * @param {string} nodeName Lowercase `nodeName`.\n * @return {?array} Markup wrap configuration, if applicable.\n */\nfunction getMarkupWrap(nodeName) {\n  !!!dummyNode ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Markup wrapping node not initialized') : invariant(false) : void 0;\n  if (!markupWrap.hasOwnProperty(nodeName)) {\n    nodeName = '*';\n  }\n  if (!shouldWrap.hasOwnProperty(nodeName)) {\n    if (nodeName === '*') {\n      dummyNode.innerHTML = '<link />';\n    } else {\n      dummyNode.innerHTML = '<' + nodeName + '></' + nodeName + '>';\n    }\n    shouldWrap[nodeName] = !dummyNode.firstChild;\n  }\n  return shouldWrap[nodeName] ? markupWrap[nodeName] : null;\n}\n\nmodule.exports = getMarkupWrap;"]}