{"version":3,"file":"loadAmplifyRtnPasskeys.mjs","sources":["../../../src/moduleLoaders/loadAmplifyRtnPasskeys.ts"],"sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nexport const loadAmplifyRtnPasskeys = () => {\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('@aws-amplify/rtn-passkeys')?.module;\n        if (module) {\n            return module;\n        }\n        throw new Error('Ensure `@aws-amplify/rtn-passkeys` 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, '@aws-amplify/rtn-passkeys');\n        throw new Error(message);\n    }\n};\n"],"names":[],"mappings":"AAAA;AACA;AACY,MAAC,sBAAsB,GAAG,MAAM;AAC5C,IAAI,IAAI;AACR;AACA;AACA,QAAQ,MAAM,MAAM,GAAG,OAAO,CAAC,2BAA2B,CAAC,EAAE,MAAM;AACnE,QAAQ,IAAI,MAAM,EAAE;AACpB,YAAY,OAAO,MAAM;AACzB,QAAQ;AACR,QAAQ,MAAM,IAAI,KAAK,CAAC,6DAA6D,CAAC;AACtF,IAAI;AACJ,IAAI,OAAO,CAAC,EAAE;AACd;AACA;AACA;AACA,QAAQ,MAAM,OAAO,GAAG,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC,YAAY,EAAE,2BAA2B,CAAC;AACpF,QAAQ,MAAM,IAAI,KAAK,CAAC,OAAO,CAAC;AAChC,IAAI;AACJ;;;;"}