{"version":3,"sources":["node_modules\\react-dom\\lib\\ReactDOMTextComponent.js"],"names":["_prodInvariant","require","_assign","DOMChildrenOperations","DOMLazyTree","ReactDOMComponentTree","escapeTextContentForBrowser","invariant","validateDOMNesting","ReactDOMTextComponent","text","_currentElement","_stringText","_hostNode","_hostParent","_domID","_mountIndex","_closingComment","_commentNodes","prototype","mountComponent","transaction","hostParent","hostContainerInfo","context","process","env","NODE_ENV","parentInfo","_ancestorInfo","domID","_idCounter","openingValue","closingValue","useCreateElement","ownerDocument","_ownerDocument","openingComment","createComment","closingComment","lazyTree","createDocumentFragment","queueChild","createTextNode","precacheNode","escapedText","renderToStaticMarkup","receiveComponent","nextText","nextStringText","commentNodes","getHostNode","replaceDelimitedText","hostNode","getNodeFromInstance","node","nextSibling","nodeType","nodeValue","unmountComponent","uncacheNode","module","exports"],"mappings":";;;;;;;;;;AAUA;;AAEA,GAAIA,gBAAiBC,QAAQ,sBAAR,CAArB;AACIC,QAAUD,QAAQ,eAAR,CADd;;AAGA,GAAIE,uBAAwBF,QAAQ,yBAAR,CAA5B;AACA,GAAIG,aAAcH,QAAQ,eAAR,CAAlB;AACA,GAAII,uBAAwBJ,QAAQ,yBAAR,CAA5B;;AAEA,GAAIK,6BAA8BL,QAAQ,+BAAR,CAAlC;AACA,GAAIM,WAAYN,QAAQ,oBAAR,CAAhB;AACA,GAAIO,oBAAqBP,QAAQ,sBAAR,CAAzB;;;;;;;;;;;;;;;;;AAiBA,GAAIQ,uBAAwB,QAAxBA,sBAAwB,CAAUC,IAAV,CAAgB;;AAE1C,KAAKC,eAAL,CAAuBD,IAAvB;AACA,KAAKE,WAAL,CAAmB,GAAKF,IAAxB;;AAEA,KAAKG,SAAL,CAAiB,IAAjB;AACA,KAAKC,WAAL,CAAmB,IAAnB;;;AAGA,KAAKC,MAAL,CAAc,CAAd;AACA,KAAKC,WAAL,CAAmB,CAAnB;AACA,KAAKC,eAAL,CAAuB,IAAvB;AACA,KAAKC,aAAL,CAAqB,IAArB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,EAApL;AACA,GAAIwC,KAAKE,QAAL,GAAkB,CAAlB,EAAuBF,KAAKG,SAAL,GAAmB,eAA9C,CAA+D;AAC7D,KAAKzC,eAAL,CAAuBsC,IAAvB;AACA;AACD;AACDA,KAAOA,KAAKC,WAAZ;AACD;AACF;AACDH,SAAW,CAAC,KAAKxC,SAAN,CAAiB,KAAKI,eAAtB,CAAX;AACA,KAAKC,aAAL,CAAqBmC,QAArB;AACA,MAAOA,SAAP;AACD,CAlGsC;;AAoGvCM,iBAAkB,2BAAY;AAC5B,KAAK1C,eAAL,CAAuB,IAAvB;AACA,KAAKC,aAAL,CAAqB,IAArB;AACAb,sBAAsBuD,WAAtB,CAAkC,IAAlC;AACD,CAxGsC,CAAzC;;;AA2GAC,OAAOC,OAAP,CAAiBrD,qBAAjB","file":"ReactDOMTextComponent.js","sourceRoot":"d:/Work/Office/react-native-on-web/cli/tmpl/project","sourcesContent":["/**\n * Copyright 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'use strict';\n\nvar _prodInvariant = require('./reactProdInvariant'),\n    _assign = require('object-assign');\n\nvar DOMChildrenOperations = require('./DOMChildrenOperations');\nvar DOMLazyTree = require('./DOMLazyTree');\nvar ReactDOMComponentTree = require('./ReactDOMComponentTree');\n\nvar escapeTextContentForBrowser = require('./escapeTextContentForBrowser');\nvar invariant = require('fbjs/lib/invariant');\nvar validateDOMNesting = require('./validateDOMNesting');\n\n/**\n * Text nodes violate a couple assumptions that React makes about components:\n *\n *  - When mounting text into the DOM, adjacent text nodes are merged.\n *  - Text nodes cannot be assigned a React root ID.\n *\n * This component is used to wrap strings between comment nodes so that they\n * can undergo the same reconciliation that is applied to elements.\n *\n * TODO: Investigate representing React components in the DOM with text nodes.\n *\n * @class ReactDOMTextComponent\n * @extends ReactComponent\n * @internal\n */\nvar ReactDOMTextComponent = function (text) {\n  // TODO: This is really a ReactText (ReactNode), not a ReactElement\n  this._currentElement = text;\n  this._stringText = '' + text;\n  // ReactDOMComponentTree uses these:\n  this._hostNode = null;\n  this._hostParent = null;\n\n  // Properties\n  this._domID = 0;\n  this._mountIndex = 0;\n  this._closingComment = null;\n  this._commentNodes = null;\n};\n\n_assign(ReactDOMTextComponent.prototype, {\n  /**\n   * Creates the markup for this text node. This node is not intended to have\n   * any features besides containing text content.\n   *\n   * @param {ReactReconcileTransaction|ReactServerRenderingTransaction} transaction\n   * @return {string} Markup for this text node.\n   * @internal\n   */\n  mountComponent: function (transaction, hostParent, hostContainerInfo, context) {\n    if (process.env.NODE_ENV !== 'production') {\n      var parentInfo;\n      if (hostParent != null) {\n        parentInfo = hostParent._ancestorInfo;\n      } else if (hostContainerInfo != null) {\n        parentInfo = hostContainerInfo._ancestorInfo;\n      }\n      if (parentInfo) {\n        // parentInfo should always be present except for the top-level\n        // component when server rendering\n        validateDOMNesting(null, this._stringText, this, parentInfo);\n      }\n    }\n\n    var domID = hostContainerInfo._idCounter++;\n    var openingValue = ' react-text: ' + domID + ' ';\n    var closingValue = ' /react-text ';\n    this._domID = domID;\n    this._hostParent = hostParent;\n    if (transaction.useCreateElement) {\n      var ownerDocument = hostContainerInfo._ownerDocument;\n      var openingComment = ownerDocument.createComment(openingValue);\n      var closingComment = ownerDocument.createComment(closingValue);\n      var lazyTree = DOMLazyTree(ownerDocument.createDocumentFragment());\n      DOMLazyTree.queueChild(lazyTree, DOMLazyTree(openingComment));\n      if (this._stringText) {\n        DOMLazyTree.queueChild(lazyTree, DOMLazyTree(ownerDocument.createTextNode(this._stringText)));\n      }\n      DOMLazyTree.queueChild(lazyTree, DOMLazyTree(closingComment));\n      ReactDOMComponentTree.precacheNode(this, openingComment);\n      this._closingComment = closingComment;\n      return lazyTree;\n    } else {\n      var escapedText = escapeTextContentForBrowser(this._stringText);\n\n      if (transaction.renderToStaticMarkup) {\n        // Normally we'd wrap this between comment nodes for the reasons stated\n        // above, but since this is a situation where React won't take over\n        // (static pages), we can simply return the text as it is.\n        return escapedText;\n      }\n\n      return '<!--' + openingValue + '-->' + escapedText + '<!--' + closingValue + '-->';\n    }\n  },\n\n  /**\n   * Updates this component by updating the text content.\n   *\n   * @param {ReactText} nextText The next text content\n   * @param {ReactReconcileTransaction} transaction\n   * @internal\n   */\n  receiveComponent: function (nextText, transaction) {\n    if (nextText !== this._currentElement) {\n      this._currentElement = nextText;\n      var nextStringText = '' + nextText;\n      if (nextStringText !== this._stringText) {\n        // TODO: Save this as pending props and use performUpdateIfNecessary\n        // and/or updateComponent to do the actual update for consistency with\n        // other component types?\n        this._stringText = nextStringText;\n        var commentNodes = this.getHostNode();\n        DOMChildrenOperations.replaceDelimitedText(commentNodes[0], commentNodes[1], nextStringText);\n      }\n    }\n  },\n\n  getHostNode: function () {\n    var hostNode = this._commentNodes;\n    if (hostNode) {\n      return hostNode;\n    }\n    if (!this._closingComment) {\n      var openingComment = ReactDOMComponentTree.getNodeFromInstance(this);\n      var node = openingComment.nextSibling;\n      while (true) {\n        !(node != null) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Missing closing comment for text component %s', this._domID) : _prodInvariant('67', this._domID) : void 0;\n        if (node.nodeType === 8 && node.nodeValue === ' /react-text ') {\n          this._closingComment = node;\n          break;\n        }\n        node = node.nextSibling;\n      }\n    }\n    hostNode = [this._hostNode, this._closingComment];\n    this._commentNodes = hostNode;\n    return hostNode;\n  },\n\n  unmountComponent: function () {\n    this._closingComment = null;\n    this._commentNodes = null;\n    ReactDOMComponentTree.uncacheNode(this);\n  }\n});\n\nmodule.exports = ReactDOMTextComponent;"]}