{"version":3,"file":"Predictions.mjs","sources":["../../src/Predictions.ts"],"sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { isAmplifyContext } from '@aws-amplify/core';\nimport { assertOptionalCtxArg } from '@aws-amplify/core/internals/utils';\nimport { AmazonAIConvertPredictionsProvider, AmazonAIIdentifyPredictionsProvider, AmazonAIInterpretPredictionsProvider, } from './providers';\n/**\n * Facade class that delegates predictions operations to sub-providers.\n *\n * Exported publicly (alongside the default `Predictions` singleton) so consumers\n * can construct an instance with an explicit `AmplifyContext` — enabling\n * per-request context injection in server-side / multi-tenant scenarios.\n */\nexport class PredictionsClass {\n    constructor(ctx) {\n        // Reject a defined-but-unbranded value passed in the context position\n        // with a typed error before resolving the (optional) explicit context.\n        assertOptionalCtxArg(ctx);\n        const resolvedCtx = isAmplifyContext(ctx) ? ctx : undefined;\n        this.convertProvider = new AmazonAIConvertPredictionsProvider(resolvedCtx);\n        this.identifyProvider = new AmazonAIIdentifyPredictionsProvider(resolvedCtx);\n        this.interpretProvider = new AmazonAIInterpretPredictionsProvider(resolvedCtx);\n    }\n    getModuleName() {\n        return 'Predictions';\n    }\n    interpret(input) {\n        return this.interpretProvider.interpret(input);\n    }\n    convert(input) {\n        return this.convertProvider.convert(input);\n    }\n    identify(input) {\n        return this.identifyProvider.identify(input);\n    }\n}\nexport const Predictions = new PredictionsClass();\n"],"names":[],"mappings":";;;;;;AAAA;AACA;AAIA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAM,gBAAgB,CAAC;AAC9B,IAAI,WAAW,CAAC,GAAG,EAAE;AACrB;AACA;AACA,QAAQ,oBAAoB,CAAC,GAAG,CAAC;AACjC,QAAQ,MAAM,WAAW,GAAG,gBAAgB,CAAC,GAAG,CAAC,GAAG,GAAG,GAAG,SAAS;AACnE,QAAQ,IAAI,CAAC,eAAe,GAAG,IAAI,kCAAkC,CAAC,WAAW,CAAC;AAClF,QAAQ,IAAI,CAAC,gBAAgB,GAAG,IAAI,mCAAmC,CAAC,WAAW,CAAC;AACpF,QAAQ,IAAI,CAAC,iBAAiB,GAAG,IAAI,oCAAoC,CAAC,WAAW,CAAC;AACtF,IAAI;AACJ,IAAI,aAAa,GAAG;AACpB,QAAQ,OAAO,aAAa;AAC5B,IAAI;AACJ,IAAI,SAAS,CAAC,KAAK,EAAE;AACrB,QAAQ,OAAO,IAAI,CAAC,iBAAiB,CAAC,SAAS,CAAC,KAAK,CAAC;AACtD,IAAI;AACJ,IAAI,OAAO,CAAC,KAAK,EAAE;AACnB,QAAQ,OAAO,IAAI,CAAC,eAAe,CAAC,OAAO,CAAC,KAAK,CAAC;AAClD,IAAI;AACJ,IAAI,QAAQ,CAAC,KAAK,EAAE;AACpB,QAAQ,OAAO,IAAI,CAAC,gBAAgB,CAAC,QAAQ,CAAC,KAAK,CAAC;AACpD,IAAI;AACJ;AACY,MAAC,WAAW,GAAG,IAAI,gBAAgB;;;;"}