1{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/error-overlay/index.tsx"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AAC1B,2EAA2E;AAC3E,+CAAwC;AAExC,sFAA8D;AAI9D,IAAI,CAAC,MAAM,CAAC,YAAY,EAAE;IACxB,MAAM,CAAC,YAAY,GAAG,UAAU,EAAE;QAChC,OAAO,UAAU,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC;IAC3B,CAAC,CAAC;CACH;AAED,IAAI,OAAO,CAAC,GAAG,CAAC,QAAQ,KAAK,aAAa,EAAE;IAC1C,IAAI,uBAAQ,CAAC,EAAE,KAAK,KAAK,EAAE;QACzB,6CAA6C;QAE7C,OAAO,CAAC,UAAU,CAAC,CAAC,OAAO,CAAC,OAAO,EAAE,CAAC;KACvC;CACF;AAED,SAAgB,gBAAgB,CAAC,IAA8B;IAC7D,IAAI,OAAO,CAAC,GAAG,CAAC,QAAQ,KAAK,YAAY,EAAE;QACzC,OAAO,IAAI,CAAC;KACb;IACD,OAAO,SAAS,YAAY,CAAC,KAAU;QACrC,OAAO,CACL,8BAAC,6BAAmB;YAClB,8BAAC,IAAI,OAAK,KAAK,GAAI,CACC,CACvB,CAAC;IACJ,CAAC,CAAC;AACJ,CAAC;AAXD,4CAWC","sourcesContent":["import React from 'react';\n// TODO: This will break tree shaking due to how we transpile this package.\nimport { Platform } from 'react-native';\n\nimport ErrorToastContainer from './toast/ErrorToastContainer';\n\ndeclare const process: any;\n\nif (!global.setImmediate) {\n  global.setImmediate = function (fn) {\n    return setTimeout(fn, 0);\n  };\n}\n\nif (process.env.NODE_ENV === 'development') {\n  if (Platform.OS === 'web') {\n    // Stack traces are big with React Navigation\n\n    require('./LogBox').default.install();\n  }\n}\n\nexport function withErrorOverlay(Comp: React.ComponentType<any>) {\n  if (process.env.NODE_ENV === 'production') {\n    return Comp;\n  }\n  return function ErrorOverlay(props: any) {\n    return (\n      <ErrorToastContainer>\n        <Comp {...props} />\n      </ErrorToastContainer>\n    );\n  };\n}\n"]}