{"version":3,"sources":["jsdelivr-header.js","/npm/@uehreka/open-graph-scraper-react-native@1.1.0/index.js"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA,ACNA,MAAM,qBAAuB,QAAQ,8BAOrC,QAAQ,IAAM,MAAO,EAAS,KAE5B,GADwC,mBAAb,EACV,CACf,IAAI,EACJ,IACE,QAAgB,qBAAqB,EACvC,CAAE,MAAO,GAOP,OAAO,GAAS,EANI,CAClB,SAAS,EACT,WAAY,EAAQ,IACpB,MAAO,EAAU,QACjB,aAAc,GAGlB,CACA,OAAO,GAAS,EAAO,EAAQ,SAAU,EAAQ,SACnD,CAEA,OAAO,IAAI,SAAQ,MAAO,EAAS,KACjC,IAAI,EACJ,IACE,QAAgB,qBAAqB,EACvC,CAAE,MAAO,GAUP,OAAO,EATa,CAClB,OAAO,EACP,OAAQ,CACN,SAAS,EACT,WAAY,EAAQ,IACpB,MAAO,EAAU,QACjB,aAAc,IAIpB,CAMA,OAAO,EALc,CACnB,OAAO,EACP,OAAQ,EAAQ,SAChB,SAAU,EAAQ,UAEQ,GAC5B,EAGJ,OAAO,QAAU,CAAC,EAAS,IAAa,QAAQ,IAAI,EAAS","file":"/npm/@uehreka/open-graph-scraper-react-native@1.1.0/index.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.39.0.\n * Original file: /npm/@uehreka/open-graph-scraper-react-native@1.1.0/index.js\n *\n * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files\n */\n","const openGraphScraperLite = require('./lib/openGraphScraperLite');\n\n/*\n * run\n * @param string options - options the user has set\n * @param function callback and promise\n */\nexports.run = async (options, callback) => {\n  const hasCallback = typeof callback === 'function';\n  if (hasCallback) {\n    let results;\n    try {\n      results = await openGraphScraperLite(options);\n    } catch (exception) {\n      const returnError = {\n        success: false,\n        requestUrl: options.url,\n        error: exception.message,\n        errorDetails: exception,\n      };\n      return callback(true, returnError);\n    }\n    return callback(false, results.ogObject, results.response);\n  }\n  // eslint-disable-next-line no-async-promise-executor\n  return new Promise(async (resolve, reject) => {\n    let results;\n    try {\n      results = await openGraphScraperLite(options);\n    } catch (exception) {\n      const returnError = {\n        error: true,\n        result: {\n          success: false,\n          requestUrl: options.url,\n          error: exception.message,\n          errorDetails: exception,\n        },\n      };\n      return reject(returnError);\n    }\n    const returnValues = {\n      error: false,\n      result: results.ogObject,\n      response: results.response,\n    };\n    return resolve(returnValues);\n  });\n};\n\nmodule.exports = (options, callback) => exports.run(options, callback);\n"]}