{"version":3,"file":"loadAsyncStorage.mjs","sources":["../../../src/moduleLoaders/loadAsyncStorage.ts"],"sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nexport const loadAsyncStorage = () => {\n    try {\n        // metro bundler requires static string for loading module.\n        // See: https://facebook.github.io/metro/docs/configuration/#dynamicdepsinpackages\n        const module = require('@react-native-async-storage/async-storage')\n            ?.default;\n        if (module) {\n            return module;\n        }\n        throw new Error('Ensure `@react-native-async-storage/async-storage` is installed and linked.');\n    }\n    catch (e) {\n        // The error parsing logic cannot be extracted with metro as the `require`\n        // would be confused when there is a `import` in the same file importing\n        // another module and that causes an error\n        const message = e.message.replace(/undefined/g, '@react-native-async-storage/async-storage');\n        throw new Error(message);\n    }\n};\n"],"names":[],"mappings":"AAAA;AACA;AACY,MAAC,gBAAgB,GAAG,MAAM;AACtC,IAAI,IAAI;AACR;AACA;AACA,QAAQ,MAAM,MAAM,GAAG,OAAO,CAAC,2CAA2C;AAC1E,cAAc,OAAO;AACrB,QAAQ,IAAI,MAAM,EAAE;AACpB,YAAY,OAAO,MAAM;AACzB,QAAQ;AACR,QAAQ,MAAM,IAAI,KAAK,CAAC,6EAA6E,CAAC;AACtG,IAAI;AACJ,IAAI,OAAO,CAAC,EAAE;AACd;AACA;AACA;AACA,QAAQ,MAAM,OAAO,GAAG,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC,YAAY,EAAE,2CAA2C,CAAC;AACpG,QAAQ,MAAM,IAAI,KAAK,CAAC,OAAO,CAAC;AAChC,IAAI;AACJ;;;;"}