@magmamath/students-features 1.3.23-rc.21 → 1.3.23-rc.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/commonjs/features/voice/playing/components/VoiceTranscription.js +48 -39
- package/dist/commonjs/features/voice/playing/components/VoiceTranscription.js.map +1 -1
- package/dist/commonjs/features/voice/playing/components/VoiceTranscriptionCollapsible.js +2 -2
- package/dist/commonjs/features/voice/playing/components/VoiceTranscriptionCollapsible.js.map +1 -1
- package/dist/commonjs/features/voice/playing/components/VoiceTranscriptionHeaderActions.js +8 -7
- package/dist/commonjs/features/voice/playing/components/VoiceTranscriptionHeaderActions.js.map +1 -1
- package/dist/commonjs/features/voice/playing/hooks/{useDropdownAnimation.js → useVoiceTranscription.js} +7 -8
- package/dist/commonjs/features/voice/playing/hooks/useVoiceTranscription.js.map +1 -0
- package/dist/commonjs/features/voice/playing/hooks/useVoiceTranscriptionEffects.js +37 -0
- package/dist/commonjs/features/voice/playing/hooks/useVoiceTranscriptionEffects.js.map +1 -0
- package/dist/commonjs/features/voice/playing/model/Player.model.js +1 -24
- package/dist/commonjs/features/voice/playing/model/Player.model.js.map +1 -1
- package/dist/commonjs/features/voice/playing/model/TranscriptionsDownloaderModel.js +66 -0
- package/dist/commonjs/features/voice/playing/model/TranscriptionsDownloaderModel.js.map +1 -0
- package/dist/commonjs/features/voice/playing/model/VoiceFileDownloader.model.js +2 -2
- package/dist/commonjs/features/voice/playing/model/VoiceFileDownloader.model.js.map +1 -1
- package/dist/commonjs/features/voice/playing/model/VoicePlayer.model.js +175 -46
- package/dist/commonjs/features/voice/playing/model/VoicePlayer.model.js.map +1 -1
- package/dist/commonjs/features/voice/playing/model/{Dropdown.model.js → VoiceTranscription.model.js} +4 -4
- package/dist/commonjs/features/voice/playing/model/VoiceTranscription.model.js.map +1 -0
- package/dist/commonjs/features/voice/playing/model/VoiceTranscriptionTranslation.model.js +15 -0
- package/dist/commonjs/features/voice/playing/model/VoiceTranscriptionTranslation.model.js.map +1 -0
- package/dist/commonjs/features/voice/playing/model/{TranscriptionsCollection.js → VoiceTranscriptionsCollection.js} +4 -4
- package/dist/commonjs/features/voice/playing/model/VoiceTranscriptionsCollection.js.map +1 -0
- package/dist/commonjs/features/voice/types.js.map +1 -1
- package/dist/commonjs/index.js +0 -12
- package/dist/commonjs/index.js.map +1 -1
- package/dist/module/features/voice/playing/components/VoiceTranscription.js +47 -40
- package/dist/module/features/voice/playing/components/VoiceTranscription.js.map +1 -1
- package/dist/module/features/voice/playing/components/VoiceTranscriptionCollapsible.js +2 -2
- package/dist/module/features/voice/playing/components/VoiceTranscriptionCollapsible.js.map +1 -1
- package/dist/module/features/voice/playing/components/VoiceTranscriptionHeaderActions.js +7 -8
- package/dist/module/features/voice/playing/components/VoiceTranscriptionHeaderActions.js.map +1 -1
- package/dist/module/features/voice/playing/hooks/{useDropdownAnimation.js → useVoiceTranscription.js} +5 -6
- package/dist/module/features/voice/playing/hooks/useVoiceTranscription.js.map +1 -0
- package/dist/module/features/voice/playing/hooks/useVoiceTranscriptionEffects.js +32 -0
- package/dist/module/features/voice/playing/hooks/useVoiceTranscriptionEffects.js.map +1 -0
- package/dist/module/features/voice/playing/model/Player.model.js +1 -24
- package/dist/module/features/voice/playing/model/Player.model.js.map +1 -1
- package/dist/module/features/voice/playing/model/TranscriptionsDownloaderModel.js +61 -0
- package/dist/module/features/voice/playing/model/TranscriptionsDownloaderModel.js.map +1 -0
- package/dist/module/features/voice/playing/model/VoiceFileDownloader.model.js +2 -2
- package/dist/module/features/voice/playing/model/VoiceFileDownloader.model.js.map +1 -1
- package/dist/module/features/voice/playing/model/VoicePlayer.model.js +177 -48
- package/dist/module/features/voice/playing/model/VoicePlayer.model.js.map +1 -1
- package/dist/module/features/voice/playing/model/{Dropdown.model.js → VoiceTranscription.model.js} +2 -2
- package/dist/module/features/voice/playing/model/VoiceTranscription.model.js.map +1 -0
- package/dist/module/features/voice/playing/model/VoiceTranscriptionTranslation.model.js +10 -0
- package/dist/module/features/voice/playing/model/VoiceTranscriptionTranslation.model.js.map +1 -0
- package/dist/module/features/voice/playing/model/{TranscriptionsCollection.js → VoiceTranscriptionsCollection.js} +2 -2
- package/dist/module/features/voice/playing/model/VoiceTranscriptionsCollection.js.map +1 -0
- package/dist/module/features/voice/types.js.map +1 -1
- package/dist/module/index.js +0 -1
- package/dist/module/index.js.map +1 -1
- package/dist/typescript/commonjs/features/voice/index.d.ts +0 -1
- package/dist/typescript/commonjs/features/voice/index.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/voice/playing/components/VoiceTranscription.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/voice/playing/components/VoiceTranscriptionCollapsible.d.ts +2 -2
- package/dist/typescript/commonjs/features/voice/playing/components/VoiceTranscriptionCollapsible.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/voice/playing/components/VoiceTranscriptionHeaderActions.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/voice/playing/hooks/{useDropdownAnimation.d.ts → useVoiceTranscription.d.ts} +3 -3
- package/dist/typescript/commonjs/features/voice/playing/hooks/useVoiceTranscription.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/voice/playing/hooks/useVoiceTranscriptionEffects.d.ts +12 -0
- package/dist/typescript/commonjs/features/voice/playing/hooks/useVoiceTranscriptionEffects.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/voice/playing/model/Player.model.d.ts +0 -3
- package/dist/typescript/commonjs/features/voice/playing/model/Player.model.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/voice/playing/model/TranscriptionsDownloaderModel.d.ts +15 -0
- package/dist/typescript/commonjs/features/voice/playing/model/TranscriptionsDownloaderModel.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/voice/playing/model/VoiceFileDownloader.model.d.ts +2 -2
- package/dist/typescript/commonjs/features/voice/playing/model/VoiceFileDownloader.model.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/voice/playing/model/VoicePlayer.model.d.ts +20 -18
- package/dist/typescript/commonjs/features/voice/playing/model/VoicePlayer.model.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/voice/playing/model/{Dropdown.model.d.ts → VoiceTranscription.model.d.ts} +2 -2
- package/dist/typescript/commonjs/features/voice/playing/model/VoiceTranscription.model.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/voice/playing/model/VoiceTranscriptionTranslation.model.d.ts +7 -0
- package/dist/typescript/commonjs/features/voice/playing/model/VoiceTranscriptionTranslation.model.d.ts.map +1 -0
- package/dist/typescript/{module/features/voice/playing/model/TranscriptionsCollection.d.ts → commonjs/features/voice/playing/model/VoiceTranscriptionsCollection.d.ts} +2 -2
- package/dist/typescript/commonjs/features/voice/playing/model/VoiceTranscriptionsCollection.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/voice/types.d.ts +1 -4
- package/dist/typescript/commonjs/features/voice/types.d.ts.map +1 -1
- package/dist/typescript/commonjs/index.d.ts +0 -1
- package/dist/typescript/commonjs/index.d.ts.map +1 -1
- package/dist/typescript/module/features/voice/index.d.ts +0 -1
- package/dist/typescript/module/features/voice/index.d.ts.map +1 -1
- package/dist/typescript/module/features/voice/playing/components/VoiceTranscription.d.ts.map +1 -1
- package/dist/typescript/module/features/voice/playing/components/VoiceTranscriptionCollapsible.d.ts +2 -2
- package/dist/typescript/module/features/voice/playing/components/VoiceTranscriptionCollapsible.d.ts.map +1 -1
- package/dist/typescript/module/features/voice/playing/components/VoiceTranscriptionHeaderActions.d.ts.map +1 -1
- package/dist/typescript/module/features/voice/playing/hooks/{useDropdownAnimation.d.ts → useVoiceTranscription.d.ts} +3 -3
- package/dist/typescript/module/features/voice/playing/hooks/useVoiceTranscription.d.ts.map +1 -0
- package/dist/typescript/module/features/voice/playing/hooks/useVoiceTranscriptionEffects.d.ts +12 -0
- package/dist/typescript/module/features/voice/playing/hooks/useVoiceTranscriptionEffects.d.ts.map +1 -0
- package/dist/typescript/module/features/voice/playing/model/Player.model.d.ts +0 -3
- package/dist/typescript/module/features/voice/playing/model/Player.model.d.ts.map +1 -1
- package/dist/typescript/module/features/voice/playing/model/TranscriptionsDownloaderModel.d.ts +15 -0
- package/dist/typescript/module/features/voice/playing/model/TranscriptionsDownloaderModel.d.ts.map +1 -0
- package/dist/typescript/module/features/voice/playing/model/VoiceFileDownloader.model.d.ts +2 -2
- package/dist/typescript/module/features/voice/playing/model/VoiceFileDownloader.model.d.ts.map +1 -1
- package/dist/typescript/module/features/voice/playing/model/VoicePlayer.model.d.ts +20 -18
- package/dist/typescript/module/features/voice/playing/model/VoicePlayer.model.d.ts.map +1 -1
- package/dist/typescript/module/features/voice/playing/model/{Dropdown.model.d.ts → VoiceTranscription.model.d.ts} +2 -2
- package/dist/typescript/module/features/voice/playing/model/VoiceTranscription.model.d.ts.map +1 -0
- package/dist/typescript/module/features/voice/playing/model/VoiceTranscriptionTranslation.model.d.ts +7 -0
- package/dist/typescript/module/features/voice/playing/model/VoiceTranscriptionTranslation.model.d.ts.map +1 -0
- package/dist/typescript/{commonjs/features/voice/playing/model/TranscriptionsCollection.d.ts → module/features/voice/playing/model/VoiceTranscriptionsCollection.d.ts} +2 -2
- package/dist/typescript/module/features/voice/playing/model/VoiceTranscriptionsCollection.d.ts.map +1 -0
- package/dist/typescript/module/features/voice/types.d.ts +1 -4
- package/dist/typescript/module/features/voice/types.d.ts.map +1 -1
- package/dist/typescript/module/index.d.ts +0 -1
- package/dist/typescript/module/index.d.ts.map +1 -1
- package/package.json +1 -28
- package/src/features/voice/index.ts +0 -1
- package/src/features/voice/playing/components/VoiceTranscription.tsx +60 -43
- package/src/features/voice/playing/components/VoiceTranscriptionCollapsible.tsx +4 -4
- package/src/features/voice/playing/components/VoiceTranscriptionHeaderActions.tsx +9 -8
- package/src/features/voice/playing/hooks/{useDropdownAnimation.ts → useVoiceTranscription.ts} +5 -5
- package/src/features/voice/playing/hooks/useVoiceTranscriptionEffects.ts +44 -0
- package/src/features/voice/playing/model/Player.model.ts +1 -26
- package/src/features/voice/playing/model/TranscriptionsDownloaderModel.ts +80 -0
- package/src/features/voice/playing/model/VoiceFileDownloader.model.ts +2 -2
- package/src/features/voice/playing/model/VoicePlayer.model.ts +196 -56
- package/src/features/voice/playing/model/{Dropdown.model.ts → VoiceTranscription.model.ts} +1 -1
- package/src/features/voice/playing/model/VoiceTranscriptionTranslation.model.ts +11 -0
- package/src/features/voice/playing/model/{TranscriptionsCollection.ts → VoiceTranscriptionsCollection.ts} +1 -1
- package/src/features/voice/types.ts +0 -9
- package/src/index.ts +0 -1
- package/dist/commonjs/features/translation/constants.js +0 -11
- package/dist/commonjs/features/translation/constants.js.map +0 -1
- package/dist/commonjs/features/translation/helpers.js +0 -60
- package/dist/commonjs/features/translation/helpers.js.map +0 -1
- package/dist/commonjs/features/translation/index.js +0 -105
- package/dist/commonjs/features/translation/index.js.map +0 -1
- package/dist/commonjs/features/translation/model/TranslationModel.js +0 -122
- package/dist/commonjs/features/translation/model/TranslationModel.js.map +0 -1
- package/dist/commonjs/features/translation/model/TranslationPreprocessor.js +0 -142
- package/dist/commonjs/features/translation/model/TranslationPreprocessor.js.map +0 -1
- package/dist/commonjs/features/translation/model/TranslationService.js +0 -112
- package/dist/commonjs/features/translation/model/TranslationService.js.map +0 -1
- package/dist/commonjs/features/translation/preserve/wordsToPreserve.js +0 -314
- package/dist/commonjs/features/translation/preserve/wordsToPreserve.js.map +0 -1
- package/dist/commonjs/features/translation/providers/google/GoogleTranslationProvider.js +0 -50
- package/dist/commonjs/features/translation/providers/google/GoogleTranslationProvider.js.map +0 -1
- package/dist/commonjs/features/translation/providers/google/supportedLanguages.js +0 -230
- package/dist/commonjs/features/translation/providers/google/supportedLanguages.js.map +0 -1
- package/dist/commonjs/features/translation/providers/google.types.js +0 -2
- package/dist/commonjs/features/translation/providers/google.types.js.map +0 -1
- package/dist/commonjs/features/translation/providers/translation.interface.js +0 -49
- package/dist/commonjs/features/translation/providers/translation.interface.js.map +0 -1
- package/dist/commonjs/features/translation/types.js +0 -2
- package/dist/commonjs/features/translation/types.js.map +0 -1
- package/dist/commonjs/features/voice/playing/hooks/useDropdownAnimation.js.map +0 -1
- package/dist/commonjs/features/voice/playing/hooks/useVoiceTranscriptionController.js +0 -128
- package/dist/commonjs/features/voice/playing/hooks/useVoiceTranscriptionController.js.map +0 -1
- package/dist/commonjs/features/voice/playing/model/Dropdown.model.js.map +0 -1
- package/dist/commonjs/features/voice/playing/model/PlaybackController.js +0 -183
- package/dist/commonjs/features/voice/playing/model/PlaybackController.js.map +0 -1
- package/dist/commonjs/features/voice/playing/model/TranscriptionsCollection.js.map +0 -1
- package/dist/commonjs/features/voice/playing/model/TranscriptionsDownloader.model.js +0 -82
- package/dist/commonjs/features/voice/playing/model/TranscriptionsDownloader.model.js.map +0 -1
- package/dist/commonjs/features/voice/playing/model/Translation.model.js +0 -62
- package/dist/commonjs/features/voice/playing/model/Translation.model.js.map +0 -1
- package/dist/module/features/translation/constants.js +0 -7
- package/dist/module/features/translation/constants.js.map +0 -1
- package/dist/module/features/translation/helpers.js +0 -53
- package/dist/module/features/translation/helpers.js.map +0 -1
- package/dist/module/features/translation/index.js +0 -12
- package/dist/module/features/translation/index.js.map +0 -1
- package/dist/module/features/translation/model/TranslationModel.js +0 -117
- package/dist/module/features/translation/model/TranslationModel.js.map +0 -1
- package/dist/module/features/translation/model/TranslationPreprocessor.js +0 -137
- package/dist/module/features/translation/model/TranslationPreprocessor.js.map +0 -1
- package/dist/module/features/translation/model/TranslationService.js +0 -107
- package/dist/module/features/translation/model/TranslationService.js.map +0 -1
- package/dist/module/features/translation/preserve/wordsToPreserve.js +0 -310
- package/dist/module/features/translation/preserve/wordsToPreserve.js.map +0 -1
- package/dist/module/features/translation/providers/google/GoogleTranslationProvider.js +0 -45
- package/dist/module/features/translation/providers/google/GoogleTranslationProvider.js.map +0 -1
- package/dist/module/features/translation/providers/google/supportedLanguages.js +0 -225
- package/dist/module/features/translation/providers/google/supportedLanguages.js.map +0 -1
- package/dist/module/features/translation/providers/google.types.js +0 -2
- package/dist/module/features/translation/providers/google.types.js.map +0 -1
- package/dist/module/features/translation/providers/translation.interface.js +0 -44
- package/dist/module/features/translation/providers/translation.interface.js.map +0 -1
- package/dist/module/features/translation/types.js +0 -2
- package/dist/module/features/translation/types.js.map +0 -1
- package/dist/module/features/voice/playing/hooks/useDropdownAnimation.js.map +0 -1
- package/dist/module/features/voice/playing/hooks/useVoiceTranscriptionController.js +0 -123
- package/dist/module/features/voice/playing/hooks/useVoiceTranscriptionController.js.map +0 -1
- package/dist/module/features/voice/playing/model/Dropdown.model.js.map +0 -1
- package/dist/module/features/voice/playing/model/PlaybackController.js +0 -178
- package/dist/module/features/voice/playing/model/PlaybackController.js.map +0 -1
- package/dist/module/features/voice/playing/model/TranscriptionsCollection.js.map +0 -1
- package/dist/module/features/voice/playing/model/TranscriptionsDownloader.model.js +0 -77
- package/dist/module/features/voice/playing/model/TranscriptionsDownloader.model.js.map +0 -1
- package/dist/module/features/voice/playing/model/Translation.model.js +0 -57
- package/dist/module/features/voice/playing/model/Translation.model.js.map +0 -1
- package/dist/typescript/commonjs/features/translation/constants.d.ts +0 -5
- package/dist/typescript/commonjs/features/translation/constants.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/translation/helpers.d.ts +0 -9
- package/dist/typescript/commonjs/features/translation/helpers.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/translation/index.d.ts +0 -12
- package/dist/typescript/commonjs/features/translation/index.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/translation/model/TranslationModel.d.ts +0 -33
- package/dist/typescript/commonjs/features/translation/model/TranslationModel.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/translation/model/TranslationPreprocessor.d.ts +0 -34
- package/dist/typescript/commonjs/features/translation/model/TranslationPreprocessor.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/translation/model/TranslationService.d.ts +0 -40
- package/dist/typescript/commonjs/features/translation/model/TranslationService.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/translation/preserve/wordsToPreserve.d.ts +0 -3
- package/dist/typescript/commonjs/features/translation/preserve/wordsToPreserve.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/translation/providers/google/GoogleTranslationProvider.d.ts +0 -17
- package/dist/typescript/commonjs/features/translation/providers/google/GoogleTranslationProvider.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/translation/providers/google/supportedLanguages.d.ts +0 -209
- package/dist/typescript/commonjs/features/translation/providers/google/supportedLanguages.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/translation/providers/google.types.d.ts +0 -15
- package/dist/typescript/commonjs/features/translation/providers/google.types.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/translation/providers/translation.interface.d.ts +0 -30
- package/dist/typescript/commonjs/features/translation/providers/translation.interface.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/translation/types.d.ts +0 -27
- package/dist/typescript/commonjs/features/translation/types.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/voice/playing/hooks/useDropdownAnimation.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/voice/playing/hooks/useVoiceTranscriptionController.d.ts +0 -30
- package/dist/typescript/commonjs/features/voice/playing/hooks/useVoiceTranscriptionController.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/voice/playing/model/Dropdown.model.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/voice/playing/model/PlaybackController.d.ts +0 -28
- package/dist/typescript/commonjs/features/voice/playing/model/PlaybackController.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/voice/playing/model/TranscriptionsCollection.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/voice/playing/model/TranscriptionsDownloader.model.d.ts +0 -19
- package/dist/typescript/commonjs/features/voice/playing/model/TranscriptionsDownloader.model.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/voice/playing/model/Translation.model.d.ts +0 -25
- package/dist/typescript/commonjs/features/voice/playing/model/Translation.model.d.ts.map +0 -1
- package/dist/typescript/module/features/translation/constants.d.ts +0 -5
- package/dist/typescript/module/features/translation/constants.d.ts.map +0 -1
- package/dist/typescript/module/features/translation/helpers.d.ts +0 -9
- package/dist/typescript/module/features/translation/helpers.d.ts.map +0 -1
- package/dist/typescript/module/features/translation/index.d.ts +0 -12
- package/dist/typescript/module/features/translation/index.d.ts.map +0 -1
- package/dist/typescript/module/features/translation/model/TranslationModel.d.ts +0 -33
- package/dist/typescript/module/features/translation/model/TranslationModel.d.ts.map +0 -1
- package/dist/typescript/module/features/translation/model/TranslationPreprocessor.d.ts +0 -34
- package/dist/typescript/module/features/translation/model/TranslationPreprocessor.d.ts.map +0 -1
- package/dist/typescript/module/features/translation/model/TranslationService.d.ts +0 -40
- package/dist/typescript/module/features/translation/model/TranslationService.d.ts.map +0 -1
- package/dist/typescript/module/features/translation/preserve/wordsToPreserve.d.ts +0 -3
- package/dist/typescript/module/features/translation/preserve/wordsToPreserve.d.ts.map +0 -1
- package/dist/typescript/module/features/translation/providers/google/GoogleTranslationProvider.d.ts +0 -17
- package/dist/typescript/module/features/translation/providers/google/GoogleTranslationProvider.d.ts.map +0 -1
- package/dist/typescript/module/features/translation/providers/google/supportedLanguages.d.ts +0 -209
- package/dist/typescript/module/features/translation/providers/google/supportedLanguages.d.ts.map +0 -1
- package/dist/typescript/module/features/translation/providers/google.types.d.ts +0 -15
- package/dist/typescript/module/features/translation/providers/google.types.d.ts.map +0 -1
- package/dist/typescript/module/features/translation/providers/translation.interface.d.ts +0 -30
- package/dist/typescript/module/features/translation/providers/translation.interface.d.ts.map +0 -1
- package/dist/typescript/module/features/translation/types.d.ts +0 -27
- package/dist/typescript/module/features/translation/types.d.ts.map +0 -1
- package/dist/typescript/module/features/voice/playing/hooks/useDropdownAnimation.d.ts.map +0 -1
- package/dist/typescript/module/features/voice/playing/hooks/useVoiceTranscriptionController.d.ts +0 -30
- package/dist/typescript/module/features/voice/playing/hooks/useVoiceTranscriptionController.d.ts.map +0 -1
- package/dist/typescript/module/features/voice/playing/model/Dropdown.model.d.ts.map +0 -1
- package/dist/typescript/module/features/voice/playing/model/PlaybackController.d.ts +0 -28
- package/dist/typescript/module/features/voice/playing/model/PlaybackController.d.ts.map +0 -1
- package/dist/typescript/module/features/voice/playing/model/TranscriptionsCollection.d.ts.map +0 -1
- package/dist/typescript/module/features/voice/playing/model/TranscriptionsDownloader.model.d.ts +0 -19
- package/dist/typescript/module/features/voice/playing/model/TranscriptionsDownloader.model.d.ts.map +0 -1
- package/dist/typescript/module/features/voice/playing/model/Translation.model.d.ts +0 -25
- package/dist/typescript/module/features/voice/playing/model/Translation.model.d.ts.map +0 -1
- package/src/features/translation/constants.ts +0 -4
- package/src/features/translation/helpers.ts +0 -63
- package/src/features/translation/index.ts +0 -30
- package/src/features/translation/model/TranslationModel.ts +0 -174
- package/src/features/translation/model/TranslationPreprocessor.ts +0 -171
- package/src/features/translation/model/TranslationService.ts +0 -148
- package/src/features/translation/preserve/wordsToPreserve.ts +0 -87
- package/src/features/translation/providers/google/GoogleTranslationProvider.ts +0 -50
- package/src/features/translation/providers/google/supportedLanguages.ts +0 -229
- package/src/features/translation/providers/google.types.ts +0 -16
- package/src/features/translation/providers/translation.interface.ts +0 -63
- package/src/features/translation/types.ts +0 -30
- package/src/features/voice/playing/hooks/useVoiceTranscriptionController.ts +0 -171
- package/src/features/voice/playing/model/PlaybackController.ts +0 -213
- package/src/features/voice/playing/model/TranscriptionsDownloader.model.ts +0 -88
- package/src/features/voice/playing/model/Translation.model.ts +0 -75
|
@@ -5,74 +5,58 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.VoicePlayerModel = void 0;
|
|
7
7
|
var _effector = require("effector");
|
|
8
|
-
var
|
|
8
|
+
var _VoiceTranscriptionsCollection = require("./VoiceTranscriptionsCollection.js");
|
|
9
9
|
var _VoiceFileDownloaderModel = require("./VoiceFileDownloader.model.js");
|
|
10
|
-
var
|
|
11
|
-
var
|
|
10
|
+
var _VoiceTranscriptionModel = require("./VoiceTranscription.model.js");
|
|
11
|
+
var _VoiceTranscriptionTranslationModel = require("./VoiceTranscriptionTranslation.model.js");
|
|
12
12
|
var _PlayerModel = require("./Player.model.js");
|
|
13
|
-
var _TranscriptionsDownloaderModel = require("./
|
|
14
|
-
var _PlaybackController = require("./PlaybackController.js");
|
|
13
|
+
var _TranscriptionsDownloaderModel = require("./TranscriptionsDownloaderModel.js");
|
|
15
14
|
class VoicePlayerModel {
|
|
16
|
-
collection = new
|
|
17
|
-
|
|
15
|
+
collection = new _VoiceTranscriptionsCollection.VoiceTranscriptionsCollection();
|
|
16
|
+
downloader = new _VoiceFileDownloaderModel.VoiceFileDownloaderModel();
|
|
17
|
+
dropdown = new _VoiceTranscriptionModel.VoiceTranscriptionModel();
|
|
18
|
+
translation = new _VoiceTranscriptionTranslationModel.VoiceTranscriptionTranslationModel();
|
|
18
19
|
playerModel = new _PlayerModel.PlayerModel();
|
|
20
|
+
currentPlayingAttempt = null;
|
|
21
|
+
shouldPreventPlayback = false;
|
|
19
22
|
setCurrentAttempt = (0, _effector.createEvent)();
|
|
20
23
|
reset = (0, _effector.createEvent)();
|
|
21
24
|
$currentAttempt = (0, _effector.restore)(this.setCurrentAttempt, null).reset(this.reset);
|
|
22
25
|
$playerState = this.playerModel.$playerState;
|
|
23
26
|
pauseAudio = this.playerModel.pause;
|
|
24
|
-
|
|
27
|
+
stopAudio = () => {
|
|
28
|
+
this.shouldPreventPlayback = true;
|
|
29
|
+
this.abortAllDownloads();
|
|
30
|
+
this.playerModel.stop();
|
|
31
|
+
this.currentPlayingAttempt = null;
|
|
32
|
+
this.setCurrentAttempt(null);
|
|
33
|
+
};
|
|
34
|
+
resetPlayer = () => {
|
|
35
|
+
this.shouldPreventPlayback = true;
|
|
36
|
+
this.releaseCollectionResources();
|
|
37
|
+
this.playerModel.stop();
|
|
38
|
+
this.currentPlayingAttempt = null;
|
|
39
|
+
this.setCurrentAttempt(null);
|
|
40
|
+
this.collection.clear();
|
|
41
|
+
};
|
|
25
42
|
constructor(params) {
|
|
26
43
|
this.api = params.api;
|
|
27
|
-
this.downloader = new _VoiceFileDownloaderModel.VoiceFileDownloaderModel(params.api);
|
|
28
44
|
this.loader = new _TranscriptionsDownloaderModel.TranscriptionsDownloaderModel(this.collection, params.api);
|
|
29
|
-
this.
|
|
30
|
-
this.
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
downloader: this.downloader
|
|
45
|
+
this.downloader.setApi(params.api);
|
|
46
|
+
this.playerModel.playbackFinished.watch(() => {
|
|
47
|
+
this.currentPlayingAttempt = null;
|
|
48
|
+
this.setCurrentAttempt(null);
|
|
34
49
|
});
|
|
35
|
-
this.togglePlayPause = this.playback.togglePlayPause;
|
|
36
50
|
if (params.audios) {
|
|
37
51
|
this.initializeCollectionFromAudios(params.audios);
|
|
38
52
|
}
|
|
39
53
|
this.playerModel.setupAudioMode();
|
|
40
54
|
}
|
|
41
|
-
stopAudio = () => {
|
|
42
|
-
this.playback.halt();
|
|
43
|
-
};
|
|
44
|
-
preloadAudio = attemptNumber => {
|
|
45
|
-
const target = attemptNumber ?? this.$currentAttempt.getState();
|
|
46
|
-
if (target === null) return;
|
|
47
|
-
return this.playback.preloadAudio(target);
|
|
48
|
-
};
|
|
49
|
-
resetPlayer = () => {
|
|
50
|
-
this.playback.releaseResources();
|
|
51
|
-
this.playback.halt();
|
|
52
|
-
this.collection.clear();
|
|
53
|
-
this.translation.clearCache();
|
|
54
|
-
};
|
|
55
55
|
initializeWithAudios(answerAudio) {
|
|
56
|
+
this.loader.setTranscriptsLoaded(false);
|
|
56
57
|
this.collection.clear();
|
|
57
58
|
this.initializeCollectionFromAudios(answerAudio);
|
|
58
59
|
}
|
|
59
|
-
isAudioLoading(attemptNumber) {
|
|
60
|
-
return this.collection.get(attemptNumber)?.audioLoading || false;
|
|
61
|
-
}
|
|
62
|
-
getAllAttempts() {
|
|
63
|
-
return this.collection.getAll();
|
|
64
|
-
}
|
|
65
|
-
reinitializePlayer() {
|
|
66
|
-
this.playerModel.reinitialize();
|
|
67
|
-
}
|
|
68
|
-
cleanup() {
|
|
69
|
-
this.playback.releaseResources();
|
|
70
|
-
this.collection.clear();
|
|
71
|
-
this.reset();
|
|
72
|
-
this.dropdown.reset();
|
|
73
|
-
this.translation.reset();
|
|
74
|
-
this.playerModel.release();
|
|
75
|
-
}
|
|
76
60
|
initializeCollectionFromAudios(audios) {
|
|
77
61
|
if (!audios) {
|
|
78
62
|
console.warn('VoicePlayerModel: audios is not provided');
|
|
@@ -92,6 +76,151 @@ class VoicePlayerModel {
|
|
|
92
76
|
});
|
|
93
77
|
});
|
|
94
78
|
}
|
|
79
|
+
releaseCollectionResources() {
|
|
80
|
+
this.collection.getAll().forEach(item => {
|
|
81
|
+
if (item.controller) {
|
|
82
|
+
this.downloader.abortDownload(item.controller);
|
|
83
|
+
}
|
|
84
|
+
if (item.audioUri?.startsWith('blob:')) {
|
|
85
|
+
try {
|
|
86
|
+
URL.revokeObjectURL(item.audioUri);
|
|
87
|
+
} catch (e) {}
|
|
88
|
+
}
|
|
89
|
+
});
|
|
90
|
+
}
|
|
91
|
+
abortAllDownloads() {
|
|
92
|
+
this.collection.getAll().forEach(item => {
|
|
93
|
+
if (item.controller && item.audioLoading) {
|
|
94
|
+
this.downloader.abortDownload(item.controller);
|
|
95
|
+
this.collection.update(item.attemptNumber, {
|
|
96
|
+
audioLoading: false,
|
|
97
|
+
controller: undefined,
|
|
98
|
+
audioDownloadPromise: undefined
|
|
99
|
+
});
|
|
100
|
+
}
|
|
101
|
+
});
|
|
102
|
+
}
|
|
103
|
+
handlePlayAttempt = (0, _effector.createEffect)(async attemptNumber => {
|
|
104
|
+
this.shouldPreventPlayback = false;
|
|
105
|
+
const item = this.collection.get(attemptNumber);
|
|
106
|
+
if (!item) return;
|
|
107
|
+
if (this.currentPlayingAttempt !== null && this.currentPlayingAttempt !== attemptNumber) {
|
|
108
|
+
this.abortAllDownloads();
|
|
109
|
+
}
|
|
110
|
+
if (this.collection.hasAudio(attemptNumber)) {
|
|
111
|
+
this.playAudioFx(attemptNumber);
|
|
112
|
+
return;
|
|
113
|
+
}
|
|
114
|
+
try {
|
|
115
|
+
this.playerModel.setPlayerState(_PlayerModel.PlayerState.LOADING);
|
|
116
|
+
const {
|
|
117
|
+
collectionItem,
|
|
118
|
+
downloadPromise
|
|
119
|
+
} = await this.downloader.download({
|
|
120
|
+
audioFileId: item.audioFileId,
|
|
121
|
+
attemptNumber
|
|
122
|
+
});
|
|
123
|
+
if (this.shouldPreventPlayback) {
|
|
124
|
+
collectionItem.controller?.abort();
|
|
125
|
+
return;
|
|
126
|
+
}
|
|
127
|
+
this.collection.update(attemptNumber, collectionItem);
|
|
128
|
+
const result = await downloadPromise;
|
|
129
|
+
if (this.shouldPreventPlayback) {
|
|
130
|
+
if (result.uri?.startsWith('blob:')) {
|
|
131
|
+
URL.revokeObjectURL(result.uri);
|
|
132
|
+
}
|
|
133
|
+
return;
|
|
134
|
+
}
|
|
135
|
+
this.collection.update(attemptNumber, {
|
|
136
|
+
audioUri: result.uri,
|
|
137
|
+
audioLoading: false,
|
|
138
|
+
audioError: undefined,
|
|
139
|
+
controller: undefined,
|
|
140
|
+
audioDownloadPromise: undefined
|
|
141
|
+
});
|
|
142
|
+
this.playerModel.setPlayerState(_PlayerModel.PlayerState.IDLE);
|
|
143
|
+
this.playAudioFx(attemptNumber);
|
|
144
|
+
} catch (error) {
|
|
145
|
+
console.error('Audio download error:', error);
|
|
146
|
+
if (error instanceof Error && error.name === 'AbortError') {
|
|
147
|
+
this.playerModel.setPlayerState(_PlayerModel.PlayerState.IDLE);
|
|
148
|
+
return;
|
|
149
|
+
}
|
|
150
|
+
this.collection.update(attemptNumber, {
|
|
151
|
+
audioLoading: false,
|
|
152
|
+
audioError: error instanceof Error ? error.message : 'Failed to download audio',
|
|
153
|
+
controller: undefined,
|
|
154
|
+
audioDownloadPromise: undefined
|
|
155
|
+
});
|
|
156
|
+
}
|
|
157
|
+
});
|
|
158
|
+
playAudioFx = (0, _effector.createEffect)(async attemptNumber => {
|
|
159
|
+
if (this.shouldPreventPlayback) return;
|
|
160
|
+
const item = this.collection.get(attemptNumber);
|
|
161
|
+
if (!item?.audioUri) {
|
|
162
|
+
console.warn('No audio URI available for attempt:', attemptNumber);
|
|
163
|
+
return;
|
|
164
|
+
}
|
|
165
|
+
try {
|
|
166
|
+
if (this.currentPlayingAttempt !== null && this.currentPlayingAttempt !== attemptNumber) {
|
|
167
|
+
this.playerModel.player?.remove();
|
|
168
|
+
}
|
|
169
|
+
if (this.currentPlayingAttempt === attemptNumber && this.playerModel.player?.playing) {
|
|
170
|
+
this.playerModel.pause();
|
|
171
|
+
return;
|
|
172
|
+
}
|
|
173
|
+
if (this.currentPlayingAttempt === attemptNumber && !this.playerModel.player?.playing) {
|
|
174
|
+
this.playerModel.resume();
|
|
175
|
+
return;
|
|
176
|
+
}
|
|
177
|
+
this.currentPlayingAttempt = attemptNumber;
|
|
178
|
+
this.setCurrentAttempt(attemptNumber);
|
|
179
|
+
await this.playerModel.play(item.audioUri);
|
|
180
|
+
} catch (error) {
|
|
181
|
+
console.error('Error playing audio:', error);
|
|
182
|
+
this.playerModel.setPlayerState(_PlayerModel.PlayerState.IDLE);
|
|
183
|
+
this.collection.update(attemptNumber, {
|
|
184
|
+
audioError: error instanceof Error ? error.message : 'Failed to play audio'
|
|
185
|
+
});
|
|
186
|
+
}
|
|
187
|
+
});
|
|
188
|
+
isAudioLoading(attemptNumber) {
|
|
189
|
+
return this.collection.get(attemptNumber)?.audioLoading || false;
|
|
190
|
+
}
|
|
191
|
+
getAllAttempts() {
|
|
192
|
+
return this.collection.getAll();
|
|
193
|
+
}
|
|
194
|
+
reinitializePlayer() {
|
|
195
|
+
this.playerModel.reinitialize();
|
|
196
|
+
}
|
|
197
|
+
cleanup() {
|
|
198
|
+
this.releaseCollectionResources();
|
|
199
|
+
this.collection.clear();
|
|
200
|
+
this.currentPlayingAttempt = null;
|
|
201
|
+
this.reset();
|
|
202
|
+
this.loader.reset();
|
|
203
|
+
this.dropdown.reset();
|
|
204
|
+
this.translation.reset();
|
|
205
|
+
this.playerModel.release();
|
|
206
|
+
}
|
|
207
|
+
togglePlayPause = (0, _effector.attach)({
|
|
208
|
+
source: this.playerModel.$playerState,
|
|
209
|
+
mapParams: (attemptNumber, playerState) => ({
|
|
210
|
+
attemptNumber,
|
|
211
|
+
playerState
|
|
212
|
+
}),
|
|
213
|
+
effect: (0, _effector.createEffect)(({
|
|
214
|
+
attemptNumber,
|
|
215
|
+
playerState
|
|
216
|
+
}) => {
|
|
217
|
+
if (this.currentPlayingAttempt === attemptNumber && playerState === _PlayerModel.PlayerState.PLAYING) {
|
|
218
|
+
this.pauseAudio();
|
|
219
|
+
} else {
|
|
220
|
+
this.handlePlayAttempt(attemptNumber);
|
|
221
|
+
}
|
|
222
|
+
})
|
|
223
|
+
});
|
|
95
224
|
}
|
|
96
225
|
exports.VoicePlayerModel = VoicePlayerModel;
|
|
97
226
|
//# sourceMappingURL=VoicePlayer.model.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_effector","require","
|
|
1
|
+
{"version":3,"names":["_effector","require","_VoiceTranscriptionsCollection","_VoiceFileDownloaderModel","_VoiceTranscriptionModel","_VoiceTranscriptionTranslationModel","_PlayerModel","_TranscriptionsDownloaderModel","VoicePlayerModel","collection","VoiceTranscriptionsCollection","downloader","VoiceFileDownloaderModel","dropdown","VoiceTranscriptionModel","translation","VoiceTranscriptionTranslationModel","playerModel","PlayerModel","currentPlayingAttempt","shouldPreventPlayback","setCurrentAttempt","createEvent","reset","$currentAttempt","restore","$playerState","pauseAudio","pause","stopAudio","abortAllDownloads","stop","resetPlayer","releaseCollectionResources","clear","constructor","params","api","loader","TranscriptionsDownloaderModel","setApi","playbackFinished","watch","audios","initializeCollectionFromAudios","setupAudioMode","initializeWithAudios","answerAudio","setTranscriptsLoaded","console","warn","forEach","audio","index","attemptNumber","audioFileId","add","_id","hasDrawing","drawing","getAll","item","controller","abortDownload","audioUri","startsWith","URL","revokeObjectURL","e","audioLoading","update","undefined","audioDownloadPromise","handlePlayAttempt","createEffect","get","hasAudio","playAudioFx","setPlayerState","PlayerState","LOADING","collectionItem","downloadPromise","download","abort","result","uri","audioError","IDLE","error","Error","name","message","player","remove","playing","resume","play","isAudioLoading","getAllAttempts","reinitializePlayer","reinitialize","cleanup","release","togglePlayPause","attach","source","mapParams","playerState","effect","PLAYING","exports"],"sourceRoot":"../../../../../../src","sources":["features/voice/playing/model/VoicePlayer.model.ts"],"mappings":";;;;;;AAAA,IAAAA,SAAA,GAAAC,OAAA;AACA,IAAAC,8BAAA,GAAAD,OAAA;AACA,IAAAE,yBAAA,GAAAF,OAAA;AACA,IAAAG,wBAAA,GAAAH,OAAA;AACA,IAAAI,mCAAA,GAAAJ,OAAA;AAEA,IAAAK,YAAA,GAAAL,OAAA;AACA,IAAAM,8BAAA,GAAAN,OAAA;AAWO,MAAMO,gBAAgB,CAAC;EACZC,UAAU,GAAG,IAAIC,4DAA6B,CAAC,CAAC;EAChDC,UAAU,GAAG,IAAIC,kDAAwB,CAAC,CAAC;EAC3CC,QAAQ,GAAG,IAAIC,gDAAuB,CAAC,CAAC;EACxCC,WAAW,GAAG,IAAIC,sEAAkC,CAAC,CAAC;EACtDC,WAAW,GAAG,IAAIC,wBAAW,CAAC,CAAC;EAGvCC,qBAAqB,GAAkB,IAAI;EAC3CC,qBAAqB,GAAG,KAAK;EAErBC,iBAAiB,GAAG,IAAAC,qBAAW,EAAgB,CAAC;EAChDC,KAAK,GAAG,IAAAD,qBAAW,EAAC,CAAC;EAErBE,eAAe,GAAG,IAAAC,iBAAO,EAAC,IAAI,CAACJ,iBAAiB,EAAE,IAAI,CAAC,CAACE,KAAK,CAAC,IAAI,CAACA,KAAK,CAAC;EACzEG,YAAY,GAAG,IAAI,CAACT,WAAW,CAACS,YAAY;EAE5CC,UAAU,GAAG,IAAI,CAACV,WAAW,CAACW,KAAK;EAEnCC,SAAS,GAAGA,CAAA,KAAM;IAChC,IAAI,CAACT,qBAAqB,GA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KAAK;EAClE;EAEO8B,cAAcA,CAAA,EAA6B;IAChD,OAAO,IAAI,CAAC1F,UAAU,CAACmD,MAAM,CAAC,CAAC;EACjC;EAEOwC,kBAAkBA,CAAA,EAAG;IAC1B,IAAI,CAACnF,WAAW,CAACoF,YAAY,CAAC,CAAC;EACjC;EAEOC,OAAOA,CAAA,EAAG;IACf,IAAI,CAACrE,0BAA0B,CAAC,CAAC;IACjC,IAAI,CAACxB,UAAU,CAACyB,KAAK,CAAC,CAAC;IACvB,IAAI,CAACf,qBAAqB,GAAG,IAAI;IACjC,IAAI,CAACI,KAAK,CAAC,CAAC;IACZ,IAAI,CAACe,MAAM,CAACf,KAAK,CAAC,CAAC;IACnB,IAAI,CAACV,QAAQ,CAACU,KAAK,CAAC,CAAC;IACrB,IAAI,CAACR,WAAW,CAACQ,KAAK,CAAC,CAAC;IACxB,IAAI,CAACN,WAAW,CAACsF,OAAO,CAAC,CAAC;EAC5B;EAEOC,eAAe,GAAG,IAAAC,gBAAM,EAAC;IAC9BC,MAAM,EAAE,IAAI,CAACzF,WAAW,CAACS,YAAY;IACrCiF,SAAS,EAAEA,CAACrD,aAAqB,EAAEsD,WAAW,MAAM;MAAEtD,aAAa;MAAEsD;IAAY,CAAC,CAAC;IACnFC,MAAM,EAAE,IAAAnC,sBAAY,EAAC,CAAC;MAAEpB,aAAa;MAAEsD;IAAmC,CAAC,KAAK;MAC9E,IAAI,IAAI,CAACzF,qBAAqB,KAAKmC,aAAa,IAAIsD,WAAW,KAAK7B,wBAAW,CAAC+B,OAAO,EAAE;QACvF,IAAI,CAACnF,UAAU,CAAC,CAAC;MACnB,CAAC,MAAM;QACL,IAAI,CAAC8C,iBAAiB,CAACnB,aAAa,CAAC;MACvC;IACF,CAAC;EACH,CAAC,CAAC;AACJ;AAACyD,OAAA,CAAAvG,gBAAA,GAAAA,gBAAA","ignoreList":[]}
|
package/dist/commonjs/features/voice/playing/model/{Dropdown.model.js → VoiceTranscription.model.js}
RENAMED
|
@@ -3,13 +3,13 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.
|
|
6
|
+
exports.VoiceTranscriptionModel = void 0;
|
|
7
7
|
var _effector = require("effector");
|
|
8
|
-
class
|
|
8
|
+
class VoiceTranscriptionModel {
|
|
9
9
|
toggleExpand = (0, _effector.createEvent)();
|
|
10
10
|
setExpanded = (0, _effector.createEvent)();
|
|
11
11
|
reset = (0, _effector.createEvent)();
|
|
12
12
|
$isExpanded = (0, _effector.restore)(this.setExpanded, false).on(this.toggleExpand, state => !state).reset(this.reset);
|
|
13
13
|
}
|
|
14
|
-
exports.
|
|
15
|
-
//# sourceMappingURL=
|
|
14
|
+
exports.VoiceTranscriptionModel = VoiceTranscriptionModel;
|
|
15
|
+
//# sourceMappingURL=VoiceTranscription.model.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_effector","require","VoiceTranscriptionModel","toggleExpand","createEvent","setExpanded","reset","$isExpanded","restore","on","state","exports"],"sourceRoot":"../../../../../../src","sources":["features/voice/playing/model/VoiceTranscription.model.ts"],"mappings":";;;;;;AAAA,IAAAA,SAAA,GAAAC,OAAA;AAEO,MAAMC,uBAAuB,CAAC;EACnBC,YAAY,GAAG,IAAAC,qBAAW,EAAC,CAAC;EAC5BC,WAAW,GAAG,IAAAD,qBAAW,EAAU,CAAC;EACpCE,KAAK,GAAG,IAAAF,qBAAW,EAAC,CAAC;EAErBG,WAAW,GAAG,IAAAC,iBAAO,EAAC,IAAI,CAACH,WAAW,EAAE,KAAK,CAAC,CAC3DI,EAAE,CAAC,IAAI,CAACN,YAAY,EAAGO,KAAK,IAAK,CAACA,KAAK,CAAC,CACxCJ,KAAK,CAAC,IAAI,CAACA,KAAK,CAAC;AACtB;AAACK,OAAA,CAAAT,uBAAA,GAAAA,uBAAA","ignoreList":[]}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.VoiceTranscriptionTranslationModel = void 0;
|
|
7
|
+
var _effector = require("effector");
|
|
8
|
+
class VoiceTranscriptionTranslationModel {
|
|
9
|
+
toggle = (0, _effector.createEvent)();
|
|
10
|
+
setActive = (0, _effector.createEvent)();
|
|
11
|
+
reset = (0, _effector.createEvent)();
|
|
12
|
+
$isActive = (0, _effector.restore)(this.setActive, false).on(this.toggle, state => !state).reset(this.reset);
|
|
13
|
+
}
|
|
14
|
+
exports.VoiceTranscriptionTranslationModel = VoiceTranscriptionTranslationModel;
|
|
15
|
+
//# sourceMappingURL=VoiceTranscriptionTranslation.model.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_effector","require","VoiceTranscriptionTranslationModel","toggle","createEvent","setActive","reset","$isActive","restore","on","state","exports"],"sourceRoot":"../../../../../../src","sources":["features/voice/playing/model/VoiceTranscriptionTranslation.model.ts"],"mappings":";;;;;;AAAA,IAAAA,SAAA,GAAAC,OAAA;AAEO,MAAMC,kCAAkC,CAAC;EAC9BC,MAAM,GAAG,IAAAC,qBAAW,EAAC,CAAC;EACtBC,SAAS,GAAG,IAAAD,qBAAW,EAAU,CAAC;EAClCE,KAAK,GAAG,IAAAF,qBAAW,EAAC,CAAC;EAErBG,SAAS,GAAG,IAAAC,iBAAO,EAAC,IAAI,CAACH,SAAS,EAAE,KAAK,CAAC,CACvDI,EAAE,CAAC,IAAI,CAACN,MAAM,EAAGO,KAAK,IAAK,CAACA,KAAK,CAAC,CAClCJ,KAAK,CAAC,IAAI,CAACA,KAAK,CAAC;AACtB;AAACK,OAAA,CAAAT,kCAAA,GAAAA,kCAAA","ignoreList":[]}
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.
|
|
7
|
-
class
|
|
6
|
+
exports.VoiceTranscriptionsCollection = void 0;
|
|
7
|
+
class VoiceTranscriptionsCollection {
|
|
8
8
|
collection = new Map();
|
|
9
9
|
add(attemptNumber, item) {
|
|
10
10
|
this.collection.set(attemptNumber, item);
|
|
@@ -37,5 +37,5 @@ class TranscriptionsCollection {
|
|
|
37
37
|
return !!item?.audioUri;
|
|
38
38
|
}
|
|
39
39
|
}
|
|
40
|
-
exports.
|
|
41
|
-
//# sourceMappingURL=
|
|
40
|
+
exports.VoiceTranscriptionsCollection = VoiceTranscriptionsCollection;
|
|
41
|
+
//# sourceMappingURL=VoiceTranscriptionsCollection.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["VoiceTranscriptionsCollection","collection","Map","add","attemptNumber","item","set","update","existingItem","get","delete","getAll","Array","from","values","clear","hasTranscript","transcript","hasAudio","audioUri","exports"],"sourceRoot":"../../../../../../src","sources":["features/voice/playing/model/VoiceTranscriptionsCollection.ts"],"mappings":";;;;;;AAEO,MAAMA,6BAA6B,CAAC;EACzBC,UAAU,GAAwC,IAAIC,GAAG,CAAC,CAAC;EAEpEC,GAAGA,CAACC,aAAqB,EAAEC,IAA4B,EAAE;IAC9D,IAAI,CAACJ,UAAU,CAACK,GAAG,CAACF,aAAa,EAAEC,IAAI,CAAC;EAC1C;EAEOE,MAAMA,CAACH,aAAqB,EAAEC,IAAqC,EAAE;IAC1E,MAAMG,YAAY,GAAG,IAAI,CAACP,UAAU,CAACQ,GAAG,CAACL,aAAa,CAAC,IAAK,CAAC,CAA4B;IACzF,IAAI,CAACH,UAAU,CAACK,GAAG,CAACF,aAAa,EAAE;MAAE,GAAGI,YAAY;MAAE,GAAGH;IAAK,CAAC,CAAC;EAClE;EAEOK,MAAMA,CAACN,aAAqB,EAAE;IACnC,IAAI,CAACH,UAAU,CAACS,MAAM,CAACN,aAAa,CAAC;EACvC;EAEOK,GAAGA,CAACL,aAAqB,EAAE;IAChC,OAAO,IAAI,CAACH,UAAU,CAACQ,GAAG,CAACL,aAAa,CAAC;EAC3C;EAEOO,MAAMA,CAAA,EAAG;IACd,OAAOC,KAAK,CAACC,IAAI,CAAC,IAAI,CAACZ,UAAU,CAACa,MAAM,CAAC,CAAC,CAAC;EAC7C;EAEOC,KAAKA,CAAA,EAAG;IACb,IAAI,CAACd,UAAU,CAACc,KAAK,CAAC,CAAC;EACzB;EAEOC,aAAaA,CAACZ,aAAqB,EAAE;IAC1C,MAAMC,IAAI,GAAG,IAAI,CAACJ,UAAU,CAACQ,GAAG,CAACL,aAAa,CAAC;IAC/C,OAAO,CAAC,CAACC,IAAI,EAAEY,UAAU;EAC3B;EAEOC,QAAQA,CAACd,aAAqB,EAAE;IACrC,MAAMC,IAAI,GAAG,IAAI,CAACJ,UAAU,CAACQ,GAAG,CAACL,aAAa,CAAC;IAC/C,OAAO,CAAC,CAACC,IAAI,EAAEc,QAAQ;EACzB;AACF;AAACC,OAAA,CAAApB,6BAAA,GAAAA,6BAAA","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["RecordButtonVariant","exports","VoiceTranscriptionVariant"],"sourceRoot":"../../../../src","sources":["features/voice/types.ts"],"mappings":";;;;;;
|
|
1
|
+
{"version":3,"names":["RecordButtonVariant","exports","VoiceTranscriptionVariant"],"sourceRoot":"../../../../src","sources":["features/voice/types.ts"],"mappings":";;;;;;IAsFYA,mBAAmB,GAAAC,OAAA,CAAAD,mBAAA,0BAAnBA,mBAAmB;EAAnBA,mBAAmB;EAAnBA,mBAAmB;EAAA,OAAnBA,mBAAmB;AAAA;AAAA,IAKnBE,yBAAyB,GAAAD,OAAA,CAAAC,yBAAA,0BAAzBA,yBAAyB;EAAzBA,yBAAyB;EAAzBA,yBAAyB;EAAA,OAAzBA,yBAAyB;AAAA","ignoreList":[]}
|
package/dist/commonjs/index.js
CHANGED
|
@@ -193,16 +193,4 @@ Object.keys(_index15).forEach(function (key) {
|
|
|
193
193
|
}
|
|
194
194
|
});
|
|
195
195
|
});
|
|
196
|
-
var _index16 = require("./features/translation/index.js");
|
|
197
|
-
Object.keys(_index16).forEach(function (key) {
|
|
198
|
-
if (key === "default" || key === "__esModule") return;
|
|
199
|
-
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
200
|
-
if (key in exports && exports[key] === _index16[key]) return;
|
|
201
|
-
Object.defineProperty(exports, key, {
|
|
202
|
-
enumerable: true,
|
|
203
|
-
get: function () {
|
|
204
|
-
return _index16[key];
|
|
205
|
-
}
|
|
206
|
-
});
|
|
207
|
-
});
|
|
208
196
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_helpers","require","_index","Object","keys","forEach","key","prototype","hasOwnProperty","call","_exportNames","exports","defineProperty","enumerable","get","_index2","_index3","_index4","_index5","_index6","_index7","_index8","_index9","_index10","_index11","_index12","_index13","_index14","_index15"
|
|
1
|
+
{"version":3,"names":["_helpers","require","_index","Object","keys","forEach","key","prototype","hasOwnProperty","call","_exportNames","exports","defineProperty","enumerable","get","_index2","_index3","_index4","_index5","_index6","_index7","_index8","_index9","_index10","_index11","_index12","_index13","_index14","_index15"],"sourceRoot":"../../src","sources":["index.ts"],"mappings":";;;;;;;;;;;;;;AAAA,IAAAA,QAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAD,OAAA;AAAAE,MAAA,CAAAC,IAAA,CAAAF,MAAA,EAAAG,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAC,YAAA,EAAAJ,GAAA;EAAA,IAAAA,GAAA,IAAAK,OAAA,IAAAA,OAAA,CAAAL,GAAA,MAAAJ,MAAA,CAAAI,GAAA;EAAAH,MAAA,CAAAS,cAAA,CAAAD,OAAA,EAAAL,GAAA;IAAAO,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAZ,MAAA,CAAAI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AAA,MAAAsB,QAAA,CAAAtB,GAAA;EAAAH,MAAA,CAAAS,cAAA,CAAAD,OAAA,EAAAL,GAAA;IAAAO,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAc,QAAA,CAAAtB,GAAA;IAAA;EAAA;AAAA","ignoreList":[]}
|
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
import { Typography, COLORS
|
|
4
|
-
import
|
|
3
|
+
import { Typography, COLORS } from '@magmamath/react-native-ui';
|
|
4
|
+
import { useUnit } from 'effector-react';
|
|
5
|
+
import React, { useCallback, useMemo } from 'react';
|
|
5
6
|
import { StyleSheet, View } from 'react-native';
|
|
6
7
|
import Animated from 'react-native-reanimated';
|
|
8
|
+
import { NO_AUDIO_BE_MESSAGE } from "../../constants.js";
|
|
9
|
+
import { getActiveAttempt } from "../../helpers.js";
|
|
7
10
|
import { VoiceTranscriptionVariant } from "../../types.js";
|
|
8
11
|
import { useText } from "../../../../i18n/i18n.js";
|
|
9
|
-
import {
|
|
12
|
+
import { useVoiceTranscriptionEffects } from "../hooks/useVoiceTranscriptionEffects.js";
|
|
10
13
|
import { VoiceTranscriptContent } from "./VoiceTranscriptContent.js";
|
|
11
14
|
import { VoiceTranscriptionCollapsible } from "./VoiceTranscriptionCollapsible.js";
|
|
12
15
|
import { VoiceTranscriptionHeaderActions } from "./VoiceTranscriptionHeaderActions.js";
|
|
@@ -21,69 +24,73 @@ export const VoiceTranscription = ({
|
|
|
21
24
|
variant = VoiceTranscriptionVariant.SMALL
|
|
22
25
|
}) => {
|
|
23
26
|
const t = useText();
|
|
24
|
-
const
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
27
|
+
const [playerState, isLoadingTranscripts, isTranslationActive] = useUnit([model.$playerState, model.loader.loadAllTranscripts.pending, model.translation.$isActive]);
|
|
28
|
+
const activeAttempt = getActiveAttempt(attemptOffset, attemptsCount);
|
|
29
|
+
const isLargeVariant = variant === VoiceTranscriptionVariant.LARGE;
|
|
30
|
+
const answersKey = useMemo(() => answers.map(a => `${a._id}:${a.audioFileId ?? ''}`).join(','), [answers]);
|
|
31
|
+
useVoiceTranscriptionEffects({
|
|
29
32
|
model,
|
|
30
33
|
answers,
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
+
answersKey,
|
|
35
|
+
problemId,
|
|
36
|
+
activeAttempt
|
|
34
37
|
});
|
|
35
|
-
const
|
|
38
|
+
const hasActiveTranscript = activeAttempt !== null && answers?.[activeAttempt - 1]?.audioFileId !== undefined;
|
|
39
|
+
const activeTranscript = activeAttempt !== null ? model.loader.getTranscript(activeAttempt) : null;
|
|
40
|
+
const hasTranscriptText = !!activeTranscript && activeTranscript !== NO_AUDIO_BE_MESSAGE;
|
|
41
|
+
const isActiveTranscriptLoading = isLoadingTranscripts && hasActiveTranscript && !activeTranscript;
|
|
42
|
+
const activeTranscriptText = hasTranscriptText ? activeTranscript : t('voice.transcriptNotAvailable');
|
|
43
|
+
const handlePlayPress = useCallback(() => {
|
|
44
|
+
if (activeAttempt) {
|
|
45
|
+
model.translation.setActive(false);
|
|
46
|
+
model.togglePlayPause(activeAttempt);
|
|
47
|
+
}
|
|
48
|
+
}, [model, activeAttempt]);
|
|
49
|
+
const handleTranslationToggle = useCallback(() => {
|
|
50
|
+
model.translation.toggle();
|
|
51
|
+
}, [model]);
|
|
36
52
|
return /*#__PURE__*/_jsxs(Animated.View, {
|
|
37
|
-
style: [styles.container, isLargeVariant
|
|
53
|
+
style: [styles.container, isLargeVariant && styles.largeContainer, style],
|
|
38
54
|
children: [/*#__PURE__*/_jsxs(View, {
|
|
39
55
|
style: styles.header,
|
|
40
56
|
children: [/*#__PURE__*/_jsx(Typography, {
|
|
41
57
|
style: styles.title,
|
|
42
58
|
variant: "h7",
|
|
43
59
|
children: t('voice.transcriptions')
|
|
44
|
-
}),
|
|
45
|
-
playerState:
|
|
46
|
-
isTranslationActive:
|
|
47
|
-
canTranslate:
|
|
48
|
-
onPlayPress:
|
|
49
|
-
onTranslationPress:
|
|
60
|
+
}), hasActiveTranscript && /*#__PURE__*/_jsx(VoiceTranscriptionHeaderActions, {
|
|
61
|
+
playerState: playerState,
|
|
62
|
+
isTranslationActive: isTranslationActive,
|
|
63
|
+
canTranslate: hasTranscriptText,
|
|
64
|
+
onPlayPress: handlePlayPress,
|
|
65
|
+
onTranslationPress: handleTranslationToggle
|
|
50
66
|
})]
|
|
51
67
|
}), isLargeVariant ? /*#__PURE__*/_jsx(VoiceTranscriptContent, {
|
|
52
|
-
text:
|
|
53
|
-
isLoading:
|
|
68
|
+
text: activeTranscriptText,
|
|
69
|
+
isLoading: isActiveTranscriptLoading
|
|
54
70
|
}) : /*#__PURE__*/_jsx(VoiceTranscriptionCollapsible, {
|
|
55
|
-
text:
|
|
56
|
-
isLoading:
|
|
71
|
+
text: activeTranscriptText,
|
|
72
|
+
isLoading: isActiveTranscriptLoading,
|
|
57
73
|
dropdown: model.dropdown
|
|
58
74
|
})]
|
|
59
75
|
});
|
|
60
76
|
};
|
|
61
77
|
const styles = StyleSheet.create({
|
|
62
78
|
container: {
|
|
79
|
+
position: 'absolute',
|
|
80
|
+
top: 56,
|
|
81
|
+
left: 8,
|
|
82
|
+
width: 222,
|
|
83
|
+
maxHeight: 405,
|
|
84
|
+
minHeight: 51,
|
|
63
85
|
padding: 4,
|
|
64
86
|
boxShadow: '0px 1px 3px 0px rgba(51, 51, 51, 0.25)',
|
|
65
87
|
borderRadius: 12,
|
|
66
88
|
backgroundColor: COLORS.NEUTRAL_1,
|
|
67
89
|
overflow: 'hidden'
|
|
68
90
|
},
|
|
69
|
-
// SMALL: floats over the drawing area; consumer-positioned siblings sit
|
|
70
|
-
// beneath it. Absolute positioning is intentional here.
|
|
71
|
-
smallContainer: {
|
|
72
|
-
position: 'absolute',
|
|
73
|
-
top: 56,
|
|
74
|
-
left: SPACING[200],
|
|
75
|
-
width: 222,
|
|
76
|
-
maxHeight: 405,
|
|
77
|
-
minHeight: 51
|
|
78
|
-
},
|
|
79
|
-
// LARGE: rendered as a flex child of the SolutionCard's column flow,
|
|
80
|
-
// between the header and footer. Auto-sizes to whatever space the footer
|
|
81
|
-
// (with or without the playable timeline) leaves — no magic numbers.
|
|
82
91
|
largeContainer: {
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
marginTop: SPACING[200],
|
|
86
|
-
marginBottom: SPACING[200]
|
|
92
|
+
width: '98%',
|
|
93
|
+
height: '100%'
|
|
87
94
|
},
|
|
88
95
|
header: {
|
|
89
96
|
flexDirection: 'row',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["Typography","COLORS","
|
|
1
|
+
{"version":3,"names":["Typography","COLORS","useUnit","React","useCallback","useMemo","StyleSheet","View","Animated","NO_AUDIO_BE_MESSAGE","getActiveAttempt","VoiceTranscriptionVariant","useText","useVoiceTranscriptionEffects","VoiceTranscriptContent","VoiceTranscriptionCollapsible","VoiceTranscriptionHeaderActions","jsx","_jsx","jsxs","_jsxs","VoiceTranscription","style","model","answers","attemptOffset","attemptsCount","problemId","variant","SMALL","t","playerState","isLoadingTranscripts","isTranslationActive","$playerState","loader","loadAllTranscripts","pending","translation","$isActive","activeAttempt","isLargeVariant","LARGE","answersKey","map","a","_id","audioFileId","join","hasActiveTranscript","undefined","activeTranscript","getTranscript","hasTranscriptText","isActiveTranscriptLoading","activeTranscriptText","handlePlayPress","setActive","togglePlayPause","handleTranslationToggle","toggle","styles","container","largeContainer","children","header","title","canTranslate","onPlayPress","onTranslationPress","text","isLoading","dropdown","create","position","top","left","width","maxHeight","minHeight","padding","boxShadow","borderRadius","backgroundColor","NEUTRAL_1","overflow","height","flexDirection","justifyContent","alignItems","marginBottom","color","NEUTRAL_9","marginLeft"],"sourceRoot":"../../../../../../src","sources":["features/voice/playing/components/VoiceTranscription.tsx"],"mappings":";;AAAA,SAASA,UAAU,EAAEC,MAAM,QAAQ,4BAA4B;AAC/D,SAASC,OAAO,QAAQ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U,EAAE,QAAQ;IACpBT,OAAO,EAAE,CAAC;IACVU,YAAY,EAAE,CAAC;IACfJ,MAAM,EAAE;EACV,CAAC;EACDpB,KAAK,EAAE;IACLyB,KAAK,EAAE1F,MAAM,CAAC2F,SAAS;IACvBC,UAAU,EAAE;EACd;AACF,CAAC,CAAC","ignoreList":[]}
|
|
@@ -4,7 +4,7 @@ import { CaretDownIcon } from '@magmamath/react-native-ui';
|
|
|
4
4
|
import React, { useCallback } from 'react';
|
|
5
5
|
import { StyleSheet, TouchableOpacity, View } from 'react-native';
|
|
6
6
|
import Animated from 'react-native-reanimated';
|
|
7
|
-
import {
|
|
7
|
+
import { useVoiceTranscriptionDropdown } from "../hooks/useVoiceTranscription.js";
|
|
8
8
|
import { VoiceTranscriptContent } from "./VoiceTranscriptContent.js";
|
|
9
9
|
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
10
10
|
const AnimatedTouchableOpacity = Animated.createAnimatedComponent(TouchableOpacity);
|
|
@@ -17,7 +17,7 @@ export const VoiceTranscriptionCollapsible = ({
|
|
|
17
17
|
listAnimatedStyle,
|
|
18
18
|
iconAnimatedStyle,
|
|
19
19
|
onListLayout
|
|
20
|
-
} =
|
|
20
|
+
} = useVoiceTranscriptionDropdown(dropdown);
|
|
21
21
|
const handleToggle = useCallback(() => {
|
|
22
22
|
dropdown.toggleExpand();
|
|
23
23
|
}, [dropdown]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["CaretDownIcon","React","useCallback","StyleSheet","TouchableOpacity","View","Animated","
|
|
1
|
+
{"version":3,"names":["CaretDownIcon","React","useCallback","StyleSheet","TouchableOpacity","View","Animated","useVoiceTranscriptionDropdown","VoiceTranscriptContent","jsx","_jsx","Fragment","_Fragment","jsxs","_jsxs","AnimatedTouchableOpacity","createAnimatedComponent","VoiceTranscriptionCollapsible","text","isLoading","dropdown","listAnimatedStyle","iconAnimatedStyle","onListLayout","handleToggle","toggleExpand","children","style","styles","collapsibleContent","onLayout","transcriptContainer","expandButton","onPress","size","create","overflow","position","width","paddingHorizontal","justifyContent","alignItems"],"sourceRoot":"../../../../../../src","sources":["features/voice/playing/components/VoiceTranscriptionCollapsible.tsx"],"mappings":";;AAAA,SAASA,aAAa,QAAQ,4BAA4B;AAC1D,OAAOC,KAAK,IAAIC,WAAW,QAAQ,OAAO;AAC1C,SAASC,UAAU,EAAEC,gBAAgB,EAAEC,IAAI,QAAQ,cAAc;AACjE,OAAOC,QAAQ,MAAM,yBAAyB;AAC9C,SAASC,6BAA6B,QAAQ,mCAAgC;AAE9E,SAASC,sBAAsB,QAAQ,6BAA0B;AAAA,SAAAC,GAAA,IAAAC,IAAA,EAAAC,QAAA,IAAAC,SAAA,EAAAC,IAAA,IAAAC,KAAA;AAEjE,MAAMC,wBAAwB,GAAGT,QAAQ,CAACU,uBAAuB,CAACZ,gBAAgB,CAAC;AAQnF,OAAO,MAAMa,6BAA6B,GAAGA,CAAC;EAC5CC,IAAI;EACJC,SAAS;EACTC;AACkC,CAAC,KAAK;EACxC,MAAM;IAAEC,iBAAiB;IAAEC,iBAAiB;IAAEC;EAAa,CAAC,GAC1DhB,6BAA6B,CAACa,QAAQ,CAAC;EAEzC,MAAMI,YAAY,GAAGtB,WAAW,CAAC,MAAM;IACrCkB,QAAQ,CAACK,YAAY,CAAC,CAAC;EACzB,CAAC,EAAE,CAACL,QAAQ,CAAC,CAAC;EAEd,oBACEN,KAAA,CAAAF,SAAA;IAAAc,QAAA,gBACEhB,IAAA,CAACJ,QAAQ,CAACD,IAAI;MAACsB,KAAK,EAAE,CAACN,iBAAiB,EAAEO,MAAM,CAACC,kBAAkB,CAAE;MAAAH,QAAA,eACnEhB,IAAA,CAACL,IAAI;QAACyB,QAAQ,EAAEP,YAAa;QAACI,KAAK,EAAEC,MAAM,CAACG,mBAAoB;QAAAL,QAAA,eAC9DhB,IAAA,CAACF,sBAAsB;UAACU,IAAI,EAAEA,IAAK;UAACC,SAAS,E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