{"version":3,"sources":["jsdelivr-header.js","/npm/react-native-stt@0.0.2/index.js"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA,OCNS,cAAe,mBAAoB,aAAgB,eAE5D,MAAM,aAAe,cAAc,eAEnC,MAAM,YAAY,mBAChB,WAAA,GACE,MAAM,aACR,CAEA,MAAA,GACE,GAAoB,YAAhB,SAAS,GACX,OAAO,aAAa,QAExB,CAEA,KAAA,CAAM,EAAS,IACb,MAAoB,YAAhB,SAAS,GACJ,aAAa,yBACjB,MAAK,IACG,aAAa,MAAM,KAGvB,aAAa,MAAM,EAE9B,CAEA,IAAA,GACE,OAAO,aAAa,MACtB,CAEA,OAAA,GACE,OAAO,aAAa,SACtB,CAEA,gBAAA,GACE,OAAO,aAAa,kBACtB,CAEA,gBAAA,CAAiB,EAAM,GACrB,KAAK,YAAY,EAAM,EACzB,CAEA,mBAAA,CAAoB,EAAM,GACxB,KAAK,eAAe,EAAM,EAC5B,iBAGa,IAAI","file":"/npm/react-native-stt@0.0.2/index.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.37.0.\n * Original file: /npm/react-native-stt@0.0.2/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","import { NativeModules, NativeEventEmitter, Platform } from 'react-native';\n\nconst SpeechToText = NativeModules.RNSpeechToText;\n\nclass Stt extends NativeEventEmitter {\n  constructor() {\n    super(SpeechToText);\n  }\n\n  cancle() {\n    if (Platform.os === 'android') {\n      return SpeechToText.cancel();\n    }\n  }\n\n  start(locale = '') {\n    if (Platform.os === 'android') {\n      return SpeechToText.createSpeechRecognizer()\n        .then(() => {\n          return SpeechToText.start(locale);\n        });\n    } else{\n      return SpeechToText.start(locale);\n    }\n  }\n\n  stop() {\n    return SpeechToText.stop();\n  }\n\n  destroy() {\n    return SpeechToText.destroy();\n  }\n\n  supportedLocales() {\n    return SpeechToText.supportedLocales();\n  }\n\n  addEventListener(type, handler) {\n    this.addListener(type, handler);\n  }\n\n  removeEventListener(type, handler) {\n    this.removeListener(type, handler);\n  }\n}\n\nexport default new Stt();\n"]}