{"ast":null,"code":"import 'expo/build/Expo.fx';\nimport * as React from 'react';\nimport AppRegistry from \"react-native-web/dist/exports/AppRegistry\";\nimport Platform from \"react-native-web/dist/exports/Platform\";\nimport { createRoot } from \"./createRoot\";\nexport default function registerRootComponent(component) {\n  var qualifiedComponent = component;\n  if (process.env.NODE_ENV !== 'production') {\n    var _require = require(\"./withDevTools\"),\n      withDevTools = _require.withDevTools;\n    qualifiedComponent = withDevTools(component);\n  }\n  if (Platform.OS !== 'web') {\n    AppRegistry.registerComponent('main', function () {\n      return qualifiedComponent;\n    });\n  } else if (typeof document !== 'undefined') {\n    var tag = document.getElementById('root');\n    if (!tag) {\n      tag = document.getElementById('main');\n      if (process.env.NODE_ENV !== 'production') {\n        if (tag) {\n          console.warn('Mounting the root React component to an HTML element with id \"main\" is deprecated. Use id \"root\" instead.');\n        }\n      }\n    }\n    if (!tag) {\n      throw new Error('Required HTML element with id \"root\" was not found in the document HTML. This is required for mounting the root React component.');\n    }\n    var rootTag = createRoot(tag);\n    rootTag.render(React.createElement(qualifiedComponent));\n  }\n}","map":{"version":3,"sources":["../../src/launch/registerRootComponent.tsx"],"names":[],"mappings":"AAAA,OAAO,oBAAoB;AAE3B,OAAO,KAAK,KAAK,MAAM,OAAO;AAAC,OAAA,WAAA;AAAA,OAAA,QAAA;AAG/B,SAAS,UAAU;AAanB,eAAc,SAAU,qBAAqB,CAC3C,SAAiC,EAAA;EAEjC,IAAI,kBAAkB,GAAG,SAAS;EAElC,IAAI,OAAO,CAAC,GAAG,CAAC,QAAQ,KAAK,YAAY,EAAE;IACzC,IAAA,QAAA,GAAyB,OAAO,iBAAiB,CAAoC;MAA7E,YAAY,GAAA,QAAA,CAAZ,YAAY;IACpB,kBAAkB,GAAG,YAAY,CAAC,SAAS,CAAC;EAC7C;EAED,IAAI,QAAQ,CAAC,EAAE,KAAK,KAAK,EAAE;IACzB,WAAW,CAAC,iBAAiB,CAAC,MAAM,EAAE;MAAA,OAAM,kBAAkB;IAAA,EAAC;GAChE,MAAM,IAEL,OAAO,QAAQ,KAAK,WAAW,EAC/B;IACA,IAAI,GAAG,GAAG,QAAQ,CAAC,cAAc,CAAC,MAAM,CAAC;IAEzC,IAAI,CAAC,GAAG,EAAE;MACR,GAAG,GAAG,QAAQ,CAAC,cAAc,CAAC,MAAM,CAAC;MACrC,IAAI,OAAO,CAAC,GAAG,CAAC,QAAQ,KAAK,YAAY,EAAE;QAEzC,IAAI,GAAG,EAAE;UACP,OAAO,CAAC,IAAI,CACV,2GAA2G,CAC5G;QACF;MACF;IACF;IAED,IAAI,CAAC,GAAG,EAAE;MACR,MAAM,IAAI,KAAK,CACb,kIAAkI,CACnI;IACF;IAED,IAAM,OAAO,GAAG,UAAU,CAAC,GAAG,CAAC;IAC/B,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,aAAa,CAAC,kBAAkB,CAAC,CAAC;EACxD;AACH","sourcesContent":["import 'expo/build/Expo.fx';\n\nimport * as React from 'react';\nimport { AppRegistry, Platform } from 'react-native';\n\nimport { createRoot } from './createRoot';\n\ntype InitialProps = {\n  exp: {\n    notification?: any;\n    manifestString?: string;\n    [key: string]: any;\n  };\n  shell?: boolean;\n  shellManifestUrl?: string;\n  [key: string]: any;\n};\n\nexport default function registerRootComponent<P extends InitialProps>(\n  component: React.ComponentType<P>\n): void {\n  let qualifiedComponent = component;\n\n  if (process.env.NODE_ENV !== 'production') {\n    const { withDevTools } = require('./withDevTools') as typeof import('./withDevTools');\n    qualifiedComponent = withDevTools(component);\n  }\n\n  if (Platform.OS !== 'web') {\n    AppRegistry.registerComponent('main', () => qualifiedComponent);\n  } else if (\n    // Skip querying the DOM if we're in a Node.js environment.\n    typeof document !== 'undefined'\n  ) {\n    let tag = document.getElementById('root');\n\n    if (!tag) {\n      tag = document.getElementById('main');\n      if (process.env.NODE_ENV !== 'production') {\n        // This block will be removed in production\n        if (tag) {\n          console.warn(\n            'Mounting the root React component to an HTML element with id \"main\" is deprecated. Use id \"root\" instead.'\n          );\n        }\n      }\n    }\n\n    if (!tag) {\n      throw new Error(\n        'Required HTML element with id \"root\" was not found in the document HTML. This is required for mounting the root React component.'\n      );\n    }\n\n    const rootTag = createRoot(tag);\n    rootTag.render(React.createElement(qualifiedComponent));\n  }\n}\n"],"sourceRoot":""},"metadata":{},"sourceType":"module"}