{"version":3,"sources":["src/common.speech/ServiceMessages/TranslationHypothesis.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAI3C,MAAM,WAAW,sBAAsB;IACnC,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,aAAa,CAAC;CAC9B;AAED,qBAAa,qBAAsB,YAAW,sBAAsB;IAChE,OAAO,CAAC,yBAAyB,CAAyB;IAE1D,OAAO;WAKO,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,qBAAqB;aAIhD,QAAQ,EAAI,MAAM;aAIlB,MAAM,EAAI,MAAM;aAIhB,IAAI,EAAI,MAAM;aAId,WAAW,EAAI,aAAa;CAG1C","file":"TranslationHypothesis.d.ts","sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT license.\n\nimport { ITranslations } from \"../Exports\";\nimport { TranslationStatus } from \"../TranslationStatus\";\n\n// translation.hypothesis\nexport interface ITranslationHypothesis {\n    Duration: number;\n    Offset: number;\n    Text: string;\n    Translation: ITranslations;\n}\n\nexport class TranslationHypothesis implements ITranslationHypothesis {\n    private privTranslationHypothesis: ITranslationHypothesis;\n\n    private constructor(json: string) {\n        this.privTranslationHypothesis = JSON.parse(json);\n        this.privTranslationHypothesis.Translation.TranslationStatus = (TranslationStatus as any)[this.privTranslationHypothesis.Translation.TranslationStatus];\n    }\n\n    public static fromJSON(json: string): TranslationHypothesis {\n        return new TranslationHypothesis(json);\n    }\n\n    public get Duration(): number {\n        return this.privTranslationHypothesis.Duration;\n    }\n\n    public get Offset(): number {\n        return this.privTranslationHypothesis.Offset;\n    }\n\n    public get Text(): string {\n        return this.privTranslationHypothesis.Text;\n    }\n\n    public get Translation(): ITranslations {\n        return this.privTranslationHypothesis.Translation;\n    }\n}\n"]}