Primer paso de la investigacion. Se aportan el .apk, las carpetas con el apk extraido y el apk descompilado. El archivo API_DOCUMENTATION.md es un archivo donde se anotaran los descubrimientos del funcionamiento de la API, y los .py son scripts para probar la funcionalidad de la API con los métodos que vayamos encontrando. Finalmente, los archivos .js son scripts de Frida para extraer informacion de la APP durante la ejecucion.
This commit is contained in:
@@ -0,0 +1,83 @@
|
||||
package com.adif.elcanomovil.repositories.stations;
|
||||
|
||||
import com.adif.elcanomovil.domain.entities.station.Station;
|
||||
import com.adif.elcanomovil.domain.entities.utils.AsyncResult;
|
||||
import java.util.List;
|
||||
import kotlin.Metadata;
|
||||
import kotlin.Unit;
|
||||
import kotlin.coroutines.Continuation;
|
||||
import kotlin.coroutines.jvm.internal.DebugMetadata;
|
||||
import kotlin.coroutines.jvm.internal.SuspendLambda;
|
||||
import kotlin.jvm.functions.Function2;
|
||||
import kotlin.jvm.internal.SourceDebugExtension;
|
||||
import kotlinx.coroutines.flow.FlowCollector;
|
||||
|
||||
@Metadata(d1 = {"\u0000\u0014\n\u0000\n\u0002\u0010\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\u0010\u0000\u001a\u00020\u0001\"\u0004\b\u0000\u0010\u0002\"\u0004\b\u0001\u0010\u0003*\u000e\u0012\n\u0012\b\u0012\u0004\u0012\u0002H\u00020\u00050\u0004H\u008a@¨\u0006\u0006"}, d2 = {"<anonymous>", "", "ResultType", "RequestType", "Lkotlinx/coroutines/flow/FlowCollector;", "Lcom/adif/elcanomovil/domain/entities/utils/AsyncResult;", "com/adif/elcanomovil/repositories/NetworkBoundResourceKt$networkBoundResource$3"}, k = 3, mv = {1, 9, 0}, xi = 48)
|
||||
@DebugMetadata(c = "com.adif.elcanomovil.repositories.stations.DefaultStationsRepository$fetch$2$invokeSuspend$$inlined$networkBoundResource$1", f = "DefaultStationsRepository.kt", i = {0, 1, 2, 3, 4, 5, 5, 5}, l = {18, 19, 22, 44, 53, 48, 38}, m = "invokeSuspend", n = {"$this$flow", "$this$flow", "$this$flow", "$this$flow", "$this$flow", "$this$flow", "throwable", "throwable"}, s = {"L$0", "L$0", "L$0", "L$0", "L$0", "L$0", "L$1", "L$2"})
|
||||
@SourceDebugExtension({"SMAP\nNetworkBoundResource.kt\nKotlin\n*S Kotlin\n*F\n+ 1 NetworkBoundResource.kt\ncom/adif/elcanomovil/repositories/NetworkBoundResourceKt$networkBoundResource$3\n+ 2 DefaultStationsRepository.kt\ncom/adif/elcanomovil/repositories/stations/DefaultStationsRepository$fetch$2\n+ 3 Transform.kt\nkotlinx/coroutines/flow/FlowKt__TransformKt\n+ 4 Emitters.kt\nkotlinx/coroutines/flow/FlowKt__EmittersKt\n+ 5 SafeCollector.common.kt\nkotlinx/coroutines/flow/internal/SafeCollector_commonKt\n*L\n1#1,40:1\n55#2,2:41\n75#2:43\n63#2,11:44\n53#3:55\n55#3:59\n53#3:60\n55#3:64\n53#3:65\n55#3:69\n53#3:70\n55#3:74\n50#4:56\n55#4:58\n50#4:61\n55#4:63\n50#4:66\n55#4:68\n50#4:71\n55#4:73\n109#5:57\n109#5:62\n109#5:67\n109#5:72\n*S KotlinDebug\n*F\n+ 1 NetworkBoundResource.kt\ncom/adif/elcanomovil/repositories/NetworkBoundResourceKt$networkBoundResource$3\n*L\n26#1:55\n26#1:59\n29#1:60\n29#1:64\n31#1:65\n31#1:69\n35#1:70\n35#1:74\n26#1:56\n26#1:58\n29#1:61\n29#1:63\n31#1:66\n31#1:68\n35#1:71\n35#1:73\n26#1:57\n29#1:62\n31#1:67\n35#1:72\n*E\n"})
|
||||
/* loaded from: classes.dex */
|
||||
public final class DefaultStationsRepository$fetch$2$invokeSuspend$$inlined$networkBoundResource$1 extends SuspendLambda implements Function2<FlowCollector<? super AsyncResult<? extends List<? extends Station>>>, Continuation<? super Unit>, Object> {
|
||||
final /* synthetic */ boolean $shouldFetch$inlined;
|
||||
private /* synthetic */ Object L$0;
|
||||
Object L$1;
|
||||
Object L$2;
|
||||
int label;
|
||||
final /* synthetic */ DefaultStationsRepository this$0;
|
||||
|
||||
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
|
||||
public DefaultStationsRepository$fetch$2$invokeSuspend$$inlined$networkBoundResource$1(Continuation continuation, DefaultStationsRepository defaultStationsRepository, boolean z3, DefaultStationsRepository defaultStationsRepository2, DefaultStationsRepository defaultStationsRepository3, DefaultStationsRepository defaultStationsRepository4) {
|
||||
super(2, continuation);
|
||||
this.this$0 = defaultStationsRepository;
|
||||
this.$shouldFetch$inlined = z3;
|
||||
}
|
||||
|
||||
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
|
||||
public final Continuation<Unit> create(Object obj, Continuation<?> continuation) {
|
||||
DefaultStationsRepository defaultStationsRepository = this.this$0;
|
||||
DefaultStationsRepository$fetch$2$invokeSuspend$$inlined$networkBoundResource$1 defaultStationsRepository$fetch$2$invokeSuspend$$inlined$networkBoundResource$1 = new DefaultStationsRepository$fetch$2$invokeSuspend$$inlined$networkBoundResource$1(continuation, defaultStationsRepository, this.$shouldFetch$inlined, defaultStationsRepository, defaultStationsRepository, defaultStationsRepository);
|
||||
defaultStationsRepository$fetch$2$invokeSuspend$$inlined$networkBoundResource$1.L$0 = obj;
|
||||
return defaultStationsRepository$fetch$2$invokeSuspend$$inlined$networkBoundResource$1;
|
||||
}
|
||||
|
||||
/* JADX WARN: Code restructure failed: missing block: B:17:0x0196, code lost:
|
||||
|
||||
if (kotlinx.coroutines.flow.FlowKt.emitAll(r1, r5, r9) == r0) goto L54;
|
||||
*/
|
||||
/* JADX WARN: Code restructure failed: missing block: B:37:0x00ab, code lost:
|
||||
|
||||
if (r10 == r0) goto L54;
|
||||
*/
|
||||
/* JADX WARN: Code restructure failed: missing block: B:41:0x0091, code lost:
|
||||
|
||||
if (r10 == r0) goto L54;
|
||||
*/
|
||||
/* JADX WARN: Code restructure failed: missing block: B:43:0x006f, code lost:
|
||||
|
||||
if (r10 == r0) goto L54;
|
||||
*/
|
||||
/* JADX WARN: Failed to find 'out' block for switch in B:3:0x0009. Please report as an issue. */
|
||||
/* JADX WARN: Multi-variable type inference failed */
|
||||
/* JADX WARN: Removed duplicated region for block: B:28:0x00db */
|
||||
/* JADX WARN: Type inference failed for: r1v0, types: [int] */
|
||||
/* JADX WARN: Type inference failed for: r1v1 */
|
||||
/* JADX WARN: Type inference failed for: r1v29 */
|
||||
/* JADX WARN: Type inference failed for: r1v36 */
|
||||
/* JADX WARN: Type inference failed for: r1v37 */
|
||||
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
|
||||
/*
|
||||
Code decompiled incorrectly, please refer to instructions dump.
|
||||
To view partially-correct add '--show-bad-code' argument
|
||||
*/
|
||||
public final java.lang.Object invokeSuspend(java.lang.Object r10) {
|
||||
/*
|
||||
Method dump skipped, instructions count: 432
|
||||
To view this dump add '--comments-level debug' option
|
||||
*/
|
||||
throw new UnsupportedOperationException("Method not decompiled: com.adif.elcanomovil.repositories.stations.DefaultStationsRepository$fetch$2$invokeSuspend$$inlined$networkBoundResource$1.invokeSuspend(java.lang.Object):java.lang.Object");
|
||||
}
|
||||
|
||||
@Override // kotlin.jvm.functions.Function2
|
||||
public final Object invoke(FlowCollector<? super AsyncResult<? extends List<? extends Station>>> flowCollector, Continuation<? super Unit> continuation) {
|
||||
return ((DefaultStationsRepository$fetch$2$invokeSuspend$$inlined$networkBoundResource$1) create(flowCollector, continuation)).invokeSuspend(Unit.INSTANCE);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,86 @@
|
||||
package com.adif.elcanomovil.repositories.stations;
|
||||
|
||||
import com.adif.elcanomovil.domain.entities.MapRegion;
|
||||
import com.adif.elcanomovil.domain.entities.station.Station;
|
||||
import com.adif.elcanomovil.domain.entities.utils.AsyncResult;
|
||||
import java.util.List;
|
||||
import kotlin.Metadata;
|
||||
import kotlin.Unit;
|
||||
import kotlin.coroutines.Continuation;
|
||||
import kotlin.coroutines.jvm.internal.DebugMetadata;
|
||||
import kotlin.coroutines.jvm.internal.SuspendLambda;
|
||||
import kotlin.jvm.functions.Function2;
|
||||
import kotlin.jvm.internal.SourceDebugExtension;
|
||||
import kotlinx.coroutines.flow.FlowCollector;
|
||||
|
||||
@Metadata(d1 = {"\u0000\u0014\n\u0000\n\u0002\u0010\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\u0010\u0000\u001a\u00020\u0001\"\u0004\b\u0000\u0010\u0002\"\u0004\b\u0001\u0010\u0003*\u000e\u0012\n\u0012\b\u0012\u0004\u0012\u0002H\u00020\u00050\u0004H\u008a@¨\u0006\u0006"}, d2 = {"<anonymous>", "", "ResultType", "RequestType", "Lkotlinx/coroutines/flow/FlowCollector;", "Lcom/adif/elcanomovil/domain/entities/utils/AsyncResult;", "com/adif/elcanomovil/repositories/NetworkBoundResourceKt$networkBoundResource$3"}, k = 3, mv = {1, 9, 0}, xi = 48)
|
||||
@DebugMetadata(c = "com.adif.elcanomovil.repositories.stations.DefaultStationsRepository$fetchForRegion$2$invokeSuspend$$inlined$networkBoundResource$1", f = "DefaultStationsRepository.kt", i = {0, 1, 2, 3, 4, 5, 5, 5}, l = {18, 19, 22, 44, 53, 48, 38}, m = "invokeSuspend", n = {"$this$flow", "$this$flow", "$this$flow", "$this$flow", "$this$flow", "$this$flow", "throwable", "throwable"}, s = {"L$0", "L$0", "L$0", "L$0", "L$0", "L$0", "L$1", "L$2"})
|
||||
@SourceDebugExtension({"SMAP\nNetworkBoundResource.kt\nKotlin\n*S Kotlin\n*F\n+ 1 NetworkBoundResource.kt\ncom/adif/elcanomovil/repositories/NetworkBoundResourceKt$networkBoundResource$3\n+ 2 DefaultStationsRepository.kt\ncom/adif/elcanomovil/repositories/stations/DefaultStationsRepository$fetchForRegion$2\n+ 3 Transform.kt\nkotlinx/coroutines/flow/FlowKt__TransformKt\n+ 4 Emitters.kt\nkotlinx/coroutines/flow/FlowKt__EmittersKt\n+ 5 SafeCollector.common.kt\nkotlinx/coroutines/flow/internal/SafeCollector_commonKt\n*L\n1#1,40:1\n84#2,2:41\n118#2:43\n106#2,11:44\n53#3:55\n55#3:59\n53#3:60\n55#3:64\n53#3:65\n55#3:69\n53#3:70\n55#3:74\n50#4:56\n55#4:58\n50#4:61\n55#4:63\n50#4:66\n55#4:68\n50#4:71\n55#4:73\n109#5:57\n109#5:62\n109#5:67\n109#5:72\n*S KotlinDebug\n*F\n+ 1 NetworkBoundResource.kt\ncom/adif/elcanomovil/repositories/NetworkBoundResourceKt$networkBoundResource$3\n*L\n26#1:55\n26#1:59\n29#1:60\n29#1:64\n31#1:65\n31#1:69\n35#1:70\n35#1:74\n26#1:56\n26#1:58\n29#1:61\n29#1:63\n31#1:66\n31#1:68\n35#1:71\n35#1:73\n26#1:57\n29#1:62\n31#1:67\n35#1:72\n*E\n"})
|
||||
/* loaded from: classes.dex */
|
||||
public final class DefaultStationsRepository$fetchForRegion$2$invokeSuspend$$inlined$networkBoundResource$1 extends SuspendLambda implements Function2<FlowCollector<? super AsyncResult<? extends List<? extends Station>>>, Continuation<? super Unit>, Object> {
|
||||
final /* synthetic */ MapRegion $mapRegion$inlined;
|
||||
final /* synthetic */ boolean $shouldFetch$inlined;
|
||||
private /* synthetic */ Object L$0;
|
||||
Object L$1;
|
||||
Object L$2;
|
||||
int label;
|
||||
final /* synthetic */ DefaultStationsRepository this$0;
|
||||
|
||||
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
|
||||
public DefaultStationsRepository$fetchForRegion$2$invokeSuspend$$inlined$networkBoundResource$1(Continuation continuation, DefaultStationsRepository defaultStationsRepository, MapRegion mapRegion, boolean z3, DefaultStationsRepository defaultStationsRepository2, DefaultStationsRepository defaultStationsRepository3, DefaultStationsRepository defaultStationsRepository4) {
|
||||
super(2, continuation);
|
||||
this.this$0 = defaultStationsRepository;
|
||||
this.$mapRegion$inlined = mapRegion;
|
||||
this.$shouldFetch$inlined = z3;
|
||||
}
|
||||
|
||||
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
|
||||
public final Continuation<Unit> create(Object obj, Continuation<?> continuation) {
|
||||
DefaultStationsRepository defaultStationsRepository = this.this$0;
|
||||
DefaultStationsRepository$fetchForRegion$2$invokeSuspend$$inlined$networkBoundResource$1 defaultStationsRepository$fetchForRegion$2$invokeSuspend$$inlined$networkBoundResource$1 = new DefaultStationsRepository$fetchForRegion$2$invokeSuspend$$inlined$networkBoundResource$1(continuation, defaultStationsRepository, this.$mapRegion$inlined, this.$shouldFetch$inlined, defaultStationsRepository, defaultStationsRepository, defaultStationsRepository);
|
||||
defaultStationsRepository$fetchForRegion$2$invokeSuspend$$inlined$networkBoundResource$1.L$0 = obj;
|
||||
return defaultStationsRepository$fetchForRegion$2$invokeSuspend$$inlined$networkBoundResource$1;
|
||||
}
|
||||
|
||||
/* JADX WARN: Code restructure failed: missing block: B:17:0x01a0, code lost:
|
||||
|
||||
if (kotlinx.coroutines.flow.FlowKt.emitAll(r1, r5, r9) == r0) goto L54;
|
||||
*/
|
||||
/* JADX WARN: Code restructure failed: missing block: B:37:0x00ad, code lost:
|
||||
|
||||
if (r10 == r0) goto L54;
|
||||
*/
|
||||
/* JADX WARN: Code restructure failed: missing block: B:41:0x0093, code lost:
|
||||
|
||||
if (r10 == r0) goto L54;
|
||||
*/
|
||||
/* JADX WARN: Code restructure failed: missing block: B:43:0x006f, code lost:
|
||||
|
||||
if (r10 == r0) goto L54;
|
||||
*/
|
||||
/* JADX WARN: Failed to find 'out' block for switch in B:3:0x0009. Please report as an issue. */
|
||||
/* JADX WARN: Multi-variable type inference failed */
|
||||
/* JADX WARN: Removed duplicated region for block: B:28:0x00dd */
|
||||
/* JADX WARN: Type inference failed for: r1v0, types: [int] */
|
||||
/* JADX WARN: Type inference failed for: r1v1 */
|
||||
/* JADX WARN: Type inference failed for: r1v29 */
|
||||
/* JADX WARN: Type inference failed for: r1v36 */
|
||||
/* JADX WARN: Type inference failed for: r1v37 */
|
||||
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
|
||||
/*
|
||||
Code decompiled incorrectly, please refer to instructions dump.
|
||||
To view partially-correct add '--show-bad-code' argument
|
||||
*/
|
||||
public final java.lang.Object invokeSuspend(java.lang.Object r10) {
|
||||
/*
|
||||
Method dump skipped, instructions count: 442
|
||||
To view this dump add '--comments-level debug' option
|
||||
*/
|
||||
throw new UnsupportedOperationException("Method not decompiled: com.adif.elcanomovil.repositories.stations.DefaultStationsRepository$fetchForRegion$2$invokeSuspend$$inlined$networkBoundResource$1.invokeSuspend(java.lang.Object):java.lang.Object");
|
||||
}
|
||||
|
||||
@Override // kotlin.jvm.functions.Function2
|
||||
public final Object invoke(FlowCollector<? super AsyncResult<? extends List<? extends Station>>> flowCollector, Continuation<? super Unit> continuation) {
|
||||
return ((DefaultStationsRepository$fetchForRegion$2$invokeSuspend$$inlined$networkBoundResource$1) create(flowCollector, continuation)).invokeSuspend(Unit.INSTANCE);
|
||||
}
|
||||
}
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1,10 @@
|
||||
package com.adif.elcanomovil.repositories.stations;
|
||||
|
||||
import kotlin.Metadata;
|
||||
|
||||
@Metadata(d1 = {"\u0000\n\n\u0000\n\u0002\u0010\u000e\n\u0002\b\u0002\"\u000e\u0010\u0000\u001a\u00020\u0001X\u0086T¢\u0006\u0002\n\u0000\"\u000e\u0010\u0002\u001a\u00020\u0001X\u0082T¢\u0006\u0002\n\u0000¨\u0006\u0003"}, d2 = {"LOW_VALUE_OF_ONE_STATION_TOKEN", "", "STATIONS_FILE_NAME", "repositories_proNon_corporateRelease"}, k = 2, mv = {1, 9, 0}, xi = 48)
|
||||
/* loaded from: classes.dex */
|
||||
public final class DefaultStationsRepositoryKt {
|
||||
public static final String LOW_VALUE_OF_ONE_STATION_TOKEN = "0";
|
||||
private static final String STATIONS_FILE_NAME = "stations_all.json";
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
package com.adif.elcanomovil.repositories.stations;
|
||||
|
||||
import android.content.Context;
|
||||
import com.adif.elcanomovil.serviceNetworking.stations.StationsService;
|
||||
import com.adif.elcanomovil.serviceStorage.database.StationsDao;
|
||||
import com.adif.elcanomovil.serviceStorage.preferences.PreferenceStorage;
|
||||
import d1.InterfaceC0307a;
|
||||
import dagger.internal.DaggerGenerated;
|
||||
import dagger.internal.Factory;
|
||||
import dagger.internal.QualifierMetadata;
|
||||
import dagger.internal.ScopeMetadata;
|
||||
import javax.inject.Provider;
|
||||
|
||||
@ScopeMetadata("javax.inject.Singleton")
|
||||
@DaggerGenerated
|
||||
@QualifierMetadata({"dagger.hilt.android.qualifiers.ApplicationContext"})
|
||||
/* loaded from: classes.dex */
|
||||
public final class DefaultStationsRepository_Factory implements Factory<DefaultStationsRepository> {
|
||||
private final Provider<InterfaceC0307a> appDispatcherProvider;
|
||||
private final Provider<Context> contextProvider;
|
||||
private final Provider<StationMapper> stationMapperProvider;
|
||||
private final Provider<StationsDao> stationsDaoProvider;
|
||||
private final Provider<StationsService> stationsServiceProvider;
|
||||
private final Provider<PreferenceStorage> storageProvider;
|
||||
|
||||
public DefaultStationsRepository_Factory(Provider<StationsService> provider, Provider<StationsDao> provider2, Provider<StationMapper> provider3, Provider<PreferenceStorage> provider4, Provider<Context> provider5, Provider<InterfaceC0307a> provider6) {
|
||||
this.stationsServiceProvider = provider;
|
||||
this.stationsDaoProvider = provider2;
|
||||
this.stationMapperProvider = provider3;
|
||||
this.storageProvider = provider4;
|
||||
this.contextProvider = provider5;
|
||||
this.appDispatcherProvider = provider6;
|
||||
}
|
||||
|
||||
public static DefaultStationsRepository_Factory create(Provider<StationsService> provider, Provider<StationsDao> provider2, Provider<StationMapper> provider3, Provider<PreferenceStorage> provider4, Provider<Context> provider5, Provider<InterfaceC0307a> provider6) {
|
||||
return new DefaultStationsRepository_Factory(provider, provider2, provider3, provider4, provider5, provider6);
|
||||
}
|
||||
|
||||
public static DefaultStationsRepository newInstance(StationsService stationsService, StationsDao stationsDao, StationMapper stationMapper, PreferenceStorage preferenceStorage, Context context, InterfaceC0307a interfaceC0307a) {
|
||||
return new DefaultStationsRepository(stationsService, stationsDao, stationMapper, preferenceStorage, context, interfaceC0307a);
|
||||
}
|
||||
|
||||
@Override // javax.inject.Provider
|
||||
public DefaultStationsRepository get() {
|
||||
return newInstance(this.stationsServiceProvider.get(), this.stationsDaoProvider.get(), this.stationMapperProvider.get(), this.storageProvider.get(), this.contextProvider.get(), this.appDispatcherProvider.get());
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
package com.adif.elcanomovil.repositories.stations;
|
||||
|
||||
import com.adif.elcanomovil.domain.entities.station.ExtendedStationInfo;
|
||||
import com.adif.elcanomovil.domain.entities.station.RequestedStationInfo;
|
||||
import com.adif.elcanomovil.domain.entities.station.StationInfo;
|
||||
import com.adif.elcanomovil.serviceNetworking.stations.model.BannerDTO;
|
||||
import com.adif.elcanomovil.serviceNetworking.stations.model.ExtendedStationInfoDTO;
|
||||
import com.adif.elcanomovil.serviceNetworking.stations.model.RequestedStationInfoDTO;
|
||||
import com.adif.elcanomovil.serviceNetworking.stations.model.StationCommercialServicesDTO;
|
||||
import com.adif.elcanomovil.serviceNetworking.stations.model.StationInfoDTO;
|
||||
import com.adif.elcanomovil.serviceNetworking.stations.model.StationServicesDTO;
|
||||
import com.adif.elcanomovil.serviceNetworking.stations.model.StationTransportServicesDTO;
|
||||
import java.util.List;
|
||||
import kotlin.Metadata;
|
||||
import kotlin.jvm.internal.Intrinsics;
|
||||
|
||||
@Metadata(d1 = {"\u0000\u0018\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\u0018\u00002\u00020\u0001B\u0005¢\u0006\u0002\u0010\u0002J\u000e\u0010\u0003\u001a\u00020\u00042\u0006\u0010\u0005\u001a\u00020\u0006¨\u0006\u0007"}, d2 = {"Lcom/adif/elcanomovil/repositories/stations/OneStationMapper;", "", "()V", "responseToDomain", "Lcom/adif/elcanomovil/domain/entities/station/RequestedStationInfo;", "source", "Lcom/adif/elcanomovil/serviceNetworking/stations/model/RequestedStationInfoDTO;", "repositories_proNon_corporateRelease"}, k = 1, mv = {1, 9, 0}, xi = 48)
|
||||
/* loaded from: classes.dex */
|
||||
public final class OneStationMapper {
|
||||
public final RequestedStationInfo responseToDomain(RequestedStationInfoDTO source) {
|
||||
Intrinsics.checkNotNullParameter(source, "source");
|
||||
String stationCode = source.getStationCode();
|
||||
StationInfoDTO stationInfo = source.getStationInfo();
|
||||
StationInfo domain = stationInfo != null ? OneStationMapperKt.toDomain(stationInfo) : null;
|
||||
ExtendedStationInfoDTO extendedStationInfo = source.getExtendedStationInfo();
|
||||
ExtendedStationInfo domain2 = extendedStationInfo != null ? OneStationMapperKt.toDomain(extendedStationInfo) : null;
|
||||
List<StationServicesDTO> stationServices = source.getStationServices();
|
||||
List domain3 = stationServices != null ? OneStationMapperKt.toDomain((List<StationServicesDTO>) stationServices) : null;
|
||||
List<StationTransportServicesDTO> stationTransportServices = source.getStationTransportServices();
|
||||
List stationTransportServicesToDomain = stationTransportServices != null ? OneStationMapperKt.stationTransportServicesToDomain(stationTransportServices) : null;
|
||||
List<StationCommercialServicesDTO> stationCommercialServices = source.getStationCommercialServices();
|
||||
List stationCommercialServicesToDomain = stationCommercialServices != null ? OneStationMapperKt.stationCommercialServicesToDomain(stationCommercialServices) : null;
|
||||
List<StationCommercialServicesDTO> stationActivities = source.getStationActivities();
|
||||
List stationCommercialServicesToDomain2 = stationActivities != null ? OneStationMapperKt.stationCommercialServicesToDomain(stationActivities) : null;
|
||||
BannerDTO banner = source.getBanner();
|
||||
return new RequestedStationInfo(stationCode, domain, domain2, domain3, stationTransportServicesToDomain, stationCommercialServicesToDomain, stationCommercialServicesToDomain2, banner != null ? OneStationMapperKt.toDomain(banner) : null);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,213 @@
|
||||
package com.adif.elcanomovil.repositories.stations;
|
||||
|
||||
import com.adif.elcanomovil.domain.entities.station.Accessible;
|
||||
import com.adif.elcanomovil.domain.entities.station.Banner;
|
||||
import com.adif.elcanomovil.domain.entities.station.Correspondence;
|
||||
import com.adif.elcanomovil.domain.entities.station.ExtendedStationInfo;
|
||||
import com.adif.elcanomovil.domain.entities.station.Location;
|
||||
import com.adif.elcanomovil.domain.entities.station.Locator;
|
||||
import com.adif.elcanomovil.domain.entities.station.Offer;
|
||||
import com.adif.elcanomovil.domain.entities.station.OpeningHours;
|
||||
import com.adif.elcanomovil.domain.entities.station.StationCommercialServices;
|
||||
import com.adif.elcanomovil.domain.entities.station.StationInfo;
|
||||
import com.adif.elcanomovil.domain.entities.station.StationServices;
|
||||
import com.adif.elcanomovil.domain.entities.station.StationTransportServices;
|
||||
import com.adif.elcanomovil.serviceNetworking.stations.model.AccessibleDTO;
|
||||
import com.adif.elcanomovil.serviceNetworking.stations.model.BannerDTO;
|
||||
import com.adif.elcanomovil.serviceNetworking.stations.model.CorrespondenceDTO;
|
||||
import com.adif.elcanomovil.serviceNetworking.stations.model.ExtendedStationInfoDTO;
|
||||
import com.adif.elcanomovil.serviceNetworking.stations.model.LocationDTO;
|
||||
import com.adif.elcanomovil.serviceNetworking.stations.model.LocatorDTO;
|
||||
import com.adif.elcanomovil.serviceNetworking.stations.model.OfferDTO;
|
||||
import com.adif.elcanomovil.serviceNetworking.stations.model.OpeningHoursDTO;
|
||||
import com.adif.elcanomovil.serviceNetworking.stations.model.StationCommercialServicesDTO;
|
||||
import com.adif.elcanomovil.serviceNetworking.stations.model.StationInfoDTO;
|
||||
import com.adif.elcanomovil.serviceNetworking.stations.model.StationServicesDTO;
|
||||
import com.adif.elcanomovil.serviceNetworking.stations.model.StationTransportServicesDTO;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import kotlin.Metadata;
|
||||
import kotlin.collections.CollectionsKt__IterablesKt;
|
||||
import kotlin.jvm.internal.SourceDebugExtension;
|
||||
|
||||
@Metadata(d1 = {"\u0000p\n\u0000\n\u0002\u0010 \n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\u001a\u0018\u0010\u0000\u001a\b\u0012\u0004\u0012\u00020\u00020\u0001*\b\u0012\u0004\u0012\u00020\u00030\u0001H\u0002\u001a\u0018\u0010\u0004\u001a\b\u0012\u0004\u0012\u00020\u00050\u0001*\b\u0012\u0004\u0012\u00020\u00060\u0001H\u0002\u001a\u0018\u0010\u0007\u001a\b\u0012\u0004\u0012\u00020\b0\u0001*\b\u0012\u0004\u0012\u00020\t0\u0001H\u0002\u001a\u0018\u0010\n\u001a\b\u0012\u0004\u0012\u00020\u000b0\u0001*\b\u0012\u0004\u0012\u00020\f0\u0001H\u0002\u001a\f\u0010\r\u001a\u00020\u000e*\u00020\u000fH\u0002\u001a\f\u0010\r\u001a\u00020\u0010*\u00020\u0011H\u0002\u001a\f\u0010\r\u001a\u00020\u0012*\u00020\u0013H\u0002\u001a\f\u0010\r\u001a\u00020\u0014*\u00020\u0015H\u0002\u001a\f\u0010\r\u001a\u00020\u0016*\u00020\u0017H\u0002\u001a\f\u0010\r\u001a\u00020\u0018*\u00020\u0019H\u0002\u001a\f\u0010\r\u001a\u00020\u001a*\u00020\u001bH\u0002\u001a\u0018\u0010\r\u001a\b\u0012\u0004\u0012\u00020\u001c0\u0001*\b\u0012\u0004\u0012\u00020\u001d0\u0001H\u0002¨\u0006\u001e"}, d2 = {"correspondenceDTOtoDomain", "", "Lcom/adif/elcanomovil/domain/entities/station/Correspondence;", "Lcom/adif/elcanomovil/serviceNetworking/stations/model/CorrespondenceDTO;", "offersToDomain", "Lcom/adif/elcanomovil/domain/entities/station/Offer;", "Lcom/adif/elcanomovil/serviceNetworking/stations/model/OfferDTO;", "stationCommercialServicesToDomain", "Lcom/adif/elcanomovil/domain/entities/station/StationCommercialServices;", "Lcom/adif/elcanomovil/serviceNetworking/stations/model/StationCommercialServicesDTO;", "stationTransportServicesToDomain", "Lcom/adif/elcanomovil/domain/entities/station/StationTransportServices;", "Lcom/adif/elcanomovil/serviceNetworking/stations/model/StationTransportServicesDTO;", "toDomain", "Lcom/adif/elcanomovil/domain/entities/station/Accessible;", "Lcom/adif/elcanomovil/serviceNetworking/stations/model/AccessibleDTO;", "Lcom/adif/elcanomovil/domain/entities/station/Banner;", "Lcom/adif/elcanomovil/serviceNetworking/stations/model/BannerDTO;", "Lcom/adif/elcanomovil/domain/entities/station/ExtendedStationInfo;", "Lcom/adif/elcanomovil/serviceNetworking/stations/model/ExtendedStationInfoDTO;", "Lcom/adif/elcanomovil/domain/entities/station/Location;", "Lcom/adif/elcanomovil/serviceNetworking/stations/model/LocationDTO;", "Lcom/adif/elcanomovil/domain/entities/station/Locator;", "Lcom/adif/elcanomovil/serviceNetworking/stations/model/LocatorDTO;", "Lcom/adif/elcanomovil/domain/entities/station/OpeningHours;", "Lcom/adif/elcanomovil/serviceNetworking/stations/model/OpeningHoursDTO;", "Lcom/adif/elcanomovil/domain/entities/station/StationInfo;", "Lcom/adif/elcanomovil/serviceNetworking/stations/model/StationInfoDTO;", "Lcom/adif/elcanomovil/domain/entities/station/StationServices;", "Lcom/adif/elcanomovil/serviceNetworking/stations/model/StationServicesDTO;", "repositories_proNon_corporateRelease"}, k = 2, mv = {1, 9, 0}, xi = 48)
|
||||
@SourceDebugExtension({"SMAP\nOneStationMapper.kt\nKotlin\n*S Kotlin\n*F\n+ 1 OneStationMapper.kt\ncom/adif/elcanomovil/repositories/stations/OneStationMapperKt\n+ 2 _Collections.kt\nkotlin/collections/CollectionsKt___CollectionsKt\n*L\n1#1,181:1\n1549#2:182\n1620#2,3:183\n1549#2:186\n1620#2,3:187\n1549#2:190\n1620#2,3:191\n1549#2:194\n1620#2,3:195\n1549#2:198\n1620#2,3:199\n*S KotlinDebug\n*F\n+ 1 OneStationMapper.kt\ncom/adif/elcanomovil/repositories/stations/OneStationMapperKt\n*L\n87#1:182\n87#1:183,3\n118#1:186\n118#1:187,3\n140#1:190\n140#1:191,3\n149#1:194\n149#1:195,3\n172#1:198\n172#1:199,3\n*E\n"})
|
||||
/* loaded from: classes.dex */
|
||||
public final class OneStationMapperKt {
|
||||
private static final List<Correspondence> correspondenceDTOtoDomain(List<CorrespondenceDTO> list) {
|
||||
int collectionSizeOrDefault;
|
||||
List<CorrespondenceDTO> list2 = list;
|
||||
collectionSizeOrDefault = CollectionsKt__IterablesKt.collectionSizeOrDefault(list2, 10);
|
||||
ArrayList arrayList = new ArrayList(collectionSizeOrDefault);
|
||||
for (CorrespondenceDTO correspondenceDTO : list2) {
|
||||
arrayList.add(new Correspondence(correspondenceDTO.getName(), correspondenceDTO.getLogo()));
|
||||
}
|
||||
return arrayList;
|
||||
}
|
||||
|
||||
private static final List<Offer> offersToDomain(List<OfferDTO> list) {
|
||||
int collectionSizeOrDefault;
|
||||
List<OfferDTO> list2 = list;
|
||||
collectionSizeOrDefault = CollectionsKt__IterablesKt.collectionSizeOrDefault(list2, 10);
|
||||
ArrayList arrayList = new ArrayList(collectionSizeOrDefault);
|
||||
for (OfferDTO offerDTO : list2) {
|
||||
arrayList.add(new Offer(offerDTO.getLogo(), offerDTO.getName(), offerDTO.getDescription(), offerDTO.getPictures()));
|
||||
}
|
||||
return arrayList;
|
||||
}
|
||||
|
||||
/* JADX INFO: Access modifiers changed from: private */
|
||||
public static final List<StationCommercialServices> stationCommercialServicesToDomain(List<StationCommercialServicesDTO> list) {
|
||||
int collectionSizeOrDefault;
|
||||
List<StationCommercialServicesDTO> list2 = list;
|
||||
collectionSizeOrDefault = CollectionsKt__IterablesKt.collectionSizeOrDefault(list2, 10);
|
||||
ArrayList arrayList = new ArrayList(collectionSizeOrDefault);
|
||||
for (StationCommercialServicesDTO stationCommercialServicesDTO : list2) {
|
||||
String identifier = stationCommercialServicesDTO.getIdentifier();
|
||||
String name = stationCommercialServicesDTO.getName();
|
||||
String serviceType = stationCommercialServicesDTO.getServiceType();
|
||||
String logo = stationCommercialServicesDTO.getLogo();
|
||||
String phoneNumber = stationCommercialServicesDTO.getPhoneNumber();
|
||||
String localNumber = stationCommercialServicesDTO.getLocalNumber();
|
||||
String sapNumber = stationCommercialServicesDTO.getSapNumber();
|
||||
LocatorDTO locator = stationCommercialServicesDTO.getLocator();
|
||||
List<Offer> list3 = null;
|
||||
Locator domain = locator != null ? toDomain(locator) : null;
|
||||
String web = stationCommercialServicesDTO.getWeb();
|
||||
String description = stationCommercialServicesDTO.getDescription();
|
||||
OpeningHoursDTO openingHours = stationCommercialServicesDTO.getOpeningHours();
|
||||
OpeningHours domain2 = openingHours != null ? toDomain(openingHours) : null;
|
||||
List<String> pictures = stationCommercialServicesDTO.getPictures();
|
||||
AccessibleDTO accessible = stationCommercialServicesDTO.getAccessible();
|
||||
Accessible domain3 = accessible != null ? toDomain(accessible) : null;
|
||||
List<String> paymentWay = stationCommercialServicesDTO.getPaymentWay();
|
||||
List<OfferDTO> offers = stationCommercialServicesDTO.getOffers();
|
||||
if (offers != null) {
|
||||
list3 = offersToDomain(offers);
|
||||
}
|
||||
arrayList.add(new StationCommercialServices(identifier, name, serviceType, logo, phoneNumber, localNumber, sapNumber, domain, web, stationCommercialServicesDTO.getAndroidLink(), description, domain2, pictures, domain3, paymentWay, list3));
|
||||
}
|
||||
return arrayList;
|
||||
}
|
||||
|
||||
/* JADX INFO: Access modifiers changed from: private */
|
||||
/* JADX WARN: Multi-variable type inference failed */
|
||||
public static final List<StationTransportServices> stationTransportServicesToDomain(List<StationTransportServicesDTO> list) {
|
||||
int collectionSizeOrDefault;
|
||||
List<Correspondence> list2;
|
||||
Accessible accessible;
|
||||
List<StationTransportServicesDTO> list3 = list;
|
||||
collectionSizeOrDefault = CollectionsKt__IterablesKt.collectionSizeOrDefault(list3, 10);
|
||||
ArrayList arrayList = new ArrayList(collectionSizeOrDefault);
|
||||
for (StationTransportServicesDTO stationTransportServicesDTO : list3) {
|
||||
String serviceType = stationTransportServicesDTO.getServiceType();
|
||||
List<CorrespondenceDTO> correspondences = stationTransportServicesDTO.getCorrespondences();
|
||||
if (correspondences != null) {
|
||||
list2 = correspondenceDTOtoDomain(correspondences);
|
||||
accessible = null;
|
||||
} else {
|
||||
list2 = null;
|
||||
accessible = null;
|
||||
}
|
||||
String identifier = stationTransportServicesDTO.getIdentifier();
|
||||
Accessible accessible2 = accessible;
|
||||
String name = stationTransportServicesDTO.getName();
|
||||
String logo = stationTransportServicesDTO.getLogo();
|
||||
String phoneNumber = stationTransportServicesDTO.getPhoneNumber();
|
||||
AccessibleDTO accessible3 = stationTransportServicesDTO.getAccessible();
|
||||
Accessible domain = accessible3 != null ? toDomain(accessible3) : accessible2;
|
||||
LocatorDTO locator = stationTransportServicesDTO.getLocator();
|
||||
Object domain2 = locator != null ? toDomain(locator) : accessible2;
|
||||
String web = stationTransportServicesDTO.getWeb();
|
||||
Accessible accessible4 = domain;
|
||||
Locator locator2 = domain2;
|
||||
String androidLink = stationTransportServicesDTO.getAndroidLink();
|
||||
String huaweiLink = stationTransportServicesDTO.getHuaweiLink();
|
||||
OpeningHours openingHours = accessible2;
|
||||
String description = stationTransportServicesDTO.getDescription();
|
||||
OpeningHoursDTO openingHours2 = stationTransportServicesDTO.getOpeningHours();
|
||||
if (openingHours2 != null) {
|
||||
openingHours = toDomain(openingHours2);
|
||||
}
|
||||
arrayList.add(new StationTransportServices(serviceType, list2, identifier, name, logo, phoneNumber, accessible4, locator2, web, androidLink, huaweiLink, description, openingHours, stationTransportServicesDTO.getPictures(), stationTransportServicesDTO.getIoslink()));
|
||||
}
|
||||
return arrayList;
|
||||
}
|
||||
|
||||
/* JADX INFO: Access modifiers changed from: private */
|
||||
public static final Banner toDomain(BannerDTO bannerDTO) {
|
||||
return new Banner(bannerDTO.getBannerURI(), bannerDTO.getBannerTitle(), bannerDTO.getBannerDescription());
|
||||
}
|
||||
|
||||
/* JADX INFO: Access modifiers changed from: private */
|
||||
public static final StationInfo toDomain(StationInfoDTO stationInfoDTO) {
|
||||
String stationCode = stationInfoDTO.getStationCode();
|
||||
String stationType = stationInfoDTO.getStationType();
|
||||
String longName = stationInfoDTO.getLongName();
|
||||
String shortName = stationInfoDTO.getShortName();
|
||||
List<String> akaList = stationInfoDTO.getAkaList();
|
||||
List<String> trafficType = stationInfoDTO.getTrafficType();
|
||||
List<String> lines = stationInfoDTO.getLines();
|
||||
String commercialZoneType = stationInfoDTO.getCommercialZoneType();
|
||||
String commuterNetwork = stationInfoDTO.getCommuterNetwork();
|
||||
AccessibleDTO accessible = stationInfoDTO.getAccessible();
|
||||
return new StationInfo(stationCode, stationType, longName, shortName, akaList, trafficType, lines, commercialZoneType, commuterNetwork, accessible != null ? toDomain(accessible) : null, stationInfoDTO.getDescription(), toDomain(stationInfoDTO.getLocation()));
|
||||
}
|
||||
|
||||
private static final Accessible toDomain(AccessibleDTO accessibleDTO) {
|
||||
return new Accessible(Boolean.valueOf(accessibleDTO.getAccessible()), accessibleDTO.getDescription());
|
||||
}
|
||||
|
||||
private static final Location toDomain(LocationDTO locationDTO) {
|
||||
return new Location(Double.valueOf(locationDTO.getLongitude()), Double.valueOf(locationDTO.getLatitude()));
|
||||
}
|
||||
|
||||
/* JADX INFO: Access modifiers changed from: private */
|
||||
public static final ExtendedStationInfo toDomain(ExtendedStationInfoDTO extendedStationInfoDTO) {
|
||||
OpeningHoursDTO openingHours = extendedStationInfoDTO.getOpeningHours();
|
||||
OpeningHours domain = openingHours != null ? toDomain(openingHours) : null;
|
||||
LocatorDTO locator = extendedStationInfoDTO.getLocator();
|
||||
return new ExtendedStationInfo(domain, locator != null ? toDomain(locator) : null, extendedStationInfoDTO.getPictures(), extendedStationInfoDTO.getBlueprints());
|
||||
}
|
||||
|
||||
/* JADX INFO: Access modifiers changed from: private */
|
||||
public static final List<StationServices> toDomain(List<StationServicesDTO> list) {
|
||||
int collectionSizeOrDefault;
|
||||
List<StationServicesDTO> list2 = list;
|
||||
collectionSizeOrDefault = CollectionsKt__IterablesKt.collectionSizeOrDefault(list2, 10);
|
||||
ArrayList arrayList = new ArrayList(collectionSizeOrDefault);
|
||||
for (StationServicesDTO stationServicesDTO : list2) {
|
||||
String serviceType = stationServicesDTO.getServiceType();
|
||||
String identifier = stationServicesDTO.getIdentifier();
|
||||
String name = stationServicesDTO.getName();
|
||||
String logo = stationServicesDTO.getLogo();
|
||||
String phoneNumber = stationServicesDTO.getPhoneNumber();
|
||||
AccessibleDTO accessible = stationServicesDTO.getAccessible();
|
||||
Accessible domain = accessible != null ? toDomain(accessible) : null;
|
||||
LocatorDTO locator = stationServicesDTO.getLocator();
|
||||
Locator domain2 = locator != null ? toDomain(locator) : null;
|
||||
String web = stationServicesDTO.getWeb();
|
||||
Locator locator2 = domain2;
|
||||
String androidLink = stationServicesDTO.getAndroidLink();
|
||||
String huaweiLink = stationServicesDTO.getHuaweiLink();
|
||||
OpeningHours openingHours = null;
|
||||
String description = stationServicesDTO.getDescription();
|
||||
OpeningHoursDTO openingHours2 = stationServicesDTO.getOpeningHours();
|
||||
if (openingHours2 != null) {
|
||||
openingHours = toDomain(openingHours2);
|
||||
}
|
||||
arrayList.add(new StationServices(serviceType, identifier, name, logo, phoneNumber, domain, locator2, web, androidLink, huaweiLink, description, openingHours, stationServicesDTO.getPictures(), stationServicesDTO.getIoslink()));
|
||||
}
|
||||
return arrayList;
|
||||
}
|
||||
|
||||
private static final Locator toDomain(LocatorDTO locatorDTO) {
|
||||
String description = locatorDTO.getDescription();
|
||||
LocationDTO location = locatorDTO.getLocation();
|
||||
return new Locator(description, location != null ? toDomain(location) : null);
|
||||
}
|
||||
|
||||
private static final OpeningHours toDomain(OpeningHoursDTO openingHoursDTO) {
|
||||
return new OpeningHours(openingHoursDTO.getShortText(), openingHoursDTO.getLongText());
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,72 @@
|
||||
package com.adif.elcanomovil.repositories.stations;
|
||||
|
||||
import android.location.Location;
|
||||
import com.adif.elcanomovil.domain.entities.station.Station;
|
||||
import com.adif.elcanomovil.repositories.utils.REGEX_UNACCENTKt;
|
||||
import com.adif.elcanomovil.serviceNetworking.stations.model.RequestedStationInfoListDTO;
|
||||
import com.adif.elcanomovil.serviceStorage.model.StationEntity;
|
||||
import com.adif.elcanomovil.uiTrain.entities.TrainInfoMapperKt;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
import kotlin.Metadata;
|
||||
import kotlin.Unit;
|
||||
import kotlin.collections.CollectionsKt;
|
||||
import kotlin.jvm.internal.Intrinsics;
|
||||
import kotlin.jvm.internal.SourceDebugExtension;
|
||||
|
||||
@Metadata(d1 = {"\u0000.\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\b\n\u0000\n\u0002\u0010 \n\u0002\u0010\u000e\n\u0000\n\u0002\u0018\u0002\n\u0000\u0018\u00002\u00020\u0001B\u0005¢\u0006\u0002\u0010\u0002J\u000e\u0010\u0003\u001a\u00020\u00042\u0006\u0010\u0005\u001a\u00020\u0006J\u0016\u0010\u0007\u001a\u00020\b2\f\u0010\t\u001a\b\u0012\u0004\u0012\u00020\u000b0\nH\u0002J\u000e\u0010\f\u001a\u00020\u00062\u0006\u0010\u0005\u001a\u00020\r¨\u0006\u000e"}, d2 = {"Lcom/adif/elcanomovil/repositories/stations/StationMapper;", "", "()V", "entityToDomain", "Lcom/adif/elcanomovil/domain/entities/station/Station;", "source", "Lcom/adif/elcanomovil/serviceStorage/model/StationEntity;", "logicTypeTraffic", "", "typeTraffic", "", "", "responseToEntity", "Lcom/adif/elcanomovil/serviceNetworking/stations/model/RequestedStationInfoListDTO;", "repositories_proNon_corporateRelease"}, k = 1, mv = {1, 9, 0}, xi = 48)
|
||||
@SourceDebugExtension({"SMAP\nStationMapper.kt\nKotlin\n*S Kotlin\n*F\n+ 1 StationMapper.kt\ncom/adif/elcanomovil/repositories/stations/StationMapper\n+ 2 _Collections.kt\nkotlin/collections/CollectionsKt___CollectionsKt\n*L\n1#1,59:1\n1549#2:60\n1620#2,3:61\n*S KotlinDebug\n*F\n+ 1 StationMapper.kt\ncom/adif/elcanomovil/repositories/stations/StationMapper\n*L\n16#1:60\n16#1:61,3\n*E\n"})
|
||||
/* loaded from: classes.dex */
|
||||
public final class StationMapper {
|
||||
private final int logicTypeTraffic(List<String> typeTraffic) {
|
||||
List<String> list = typeTraffic;
|
||||
ArrayList arrayList = new ArrayList(CollectionsKt.g(list));
|
||||
for (String str : list) {
|
||||
Locale ROOT = Locale.ROOT;
|
||||
Intrinsics.checkNotNullExpressionValue(ROOT, "ROOT");
|
||||
String upperCase = str.toUpperCase(ROOT);
|
||||
Intrinsics.checkNotNullExpressionValue(upperCase, "toUpperCase(...)");
|
||||
arrayList.add(upperCase);
|
||||
}
|
||||
boolean contains = arrayList.contains(TrainInfoMapperKt.CERCANIAS);
|
||||
boolean contains2 = arrayList.contains("AVLDMD");
|
||||
if (contains && contains2) {
|
||||
return 2;
|
||||
}
|
||||
return (!contains && contains2) ? 1 : 0;
|
||||
}
|
||||
|
||||
public final Station entityToDomain(StationEntity source) {
|
||||
Intrinsics.checkNotNullParameter(source, "source");
|
||||
String stationCode = source.getStationCode();
|
||||
String stationType = source.getStationType();
|
||||
String longName = source.getLongName();
|
||||
String shortName = source.getShortName();
|
||||
String commercialZoneType = source.getCommercialZoneType();
|
||||
Location location = new Location("");
|
||||
location.setLatitude(source.getLatitude());
|
||||
location.setLongitude(source.getLongitude());
|
||||
Unit unit = Unit.INSTANCE;
|
||||
return new Station(stationCode, stationType, longName, shortName, commercialZoneType, location, source.getTrafficType(), source.getCommuterNetwork(), null, 256, null);
|
||||
}
|
||||
|
||||
public final StationEntity responseToEntity(RequestedStationInfoListDTO source) {
|
||||
Intrinsics.checkNotNullParameter(source, "source");
|
||||
String stationCode = source.getStationInfo().getStationCode();
|
||||
String stationType = source.getStationInfo().getStationType();
|
||||
String longName = source.getStationInfo().getLongName();
|
||||
String shortName = source.getStationInfo().getShortName();
|
||||
String unaccent = REGEX_UNACCENTKt.unaccent(source.getStationInfo().getLongName());
|
||||
String unaccent2 = REGEX_UNACCENTKt.unaccent(source.getStationInfo().getShortName());
|
||||
double latitude = source.getStationInfo().getLocation().getLatitude();
|
||||
double longitude = source.getStationInfo().getLocation().getLongitude();
|
||||
int logicTypeTraffic = logicTypeTraffic(source.getStationInfo().getTrafficType());
|
||||
String commercialZoneType = source.getStationInfo().getCommercialZoneType();
|
||||
String commuterNetwork = source.getStationInfo().getCommuterNetwork();
|
||||
if (commuterNetwork == null) {
|
||||
commuterNetwork = "";
|
||||
}
|
||||
return new StationEntity(stationCode, stationType, longName, shortName, unaccent, unaccent2, latitude, longitude, logicTypeTraffic, commercialZoneType, commuterNetwork, CollectionsKt.l(source.getStationInfo().getAkaList(), "", null, null, null, 62));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
package com.adif.elcanomovil.repositories.stations;
|
||||
|
||||
import com.adif.elcanomovil.uiTrain.entities.TrainInfoMapperKt;
|
||||
import kotlin.Metadata;
|
||||
|
||||
@Metadata(d1 = {"\u0000\n\n\u0000\n\u0002\u0010\b\n\u0002\b\u0003\"\u000e\u0010\u0000\u001a\u00020\u0001X\u0086T¢\u0006\u0002\n\u0000\"\u000e\u0010\u0002\u001a\u00020\u0001X\u0086T¢\u0006\u0002\n\u0000\"\u000e\u0010\u0003\u001a\u00020\u0001X\u0086T¢\u0006\u0002\n\u0000¨\u0006\u0004"}, d2 = {"AVLDMD", "", "BOTH", TrainInfoMapperKt.CERCANIAS, "repositories_proNon_corporateRelease"}, k = 2, mv = {1, 9, 0}, xi = 48)
|
||||
/* loaded from: classes.dex */
|
||||
public final class StationMapperKt {
|
||||
public static final int AVLDMD = 1;
|
||||
public static final int BOTH = 2;
|
||||
public static final int CERCANIAS = 0;
|
||||
}
|
||||
@@ -0,0 +1,77 @@
|
||||
package com.adif.elcanomovil.repositories.stations;
|
||||
|
||||
import com.adif.elcanomovil.serviceStorage.model.StationEntity;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import kotlin.ResultKt;
|
||||
import kotlin.Unit;
|
||||
import kotlin.collections.CollectionsKt__IterablesKt;
|
||||
import kotlin.coroutines.Continuation;
|
||||
import kotlin.coroutines.intrinsics.IntrinsicsKt;
|
||||
import kotlin.coroutines.jvm.internal.SuspendLambda;
|
||||
import kotlin.jvm.functions.Function2;
|
||||
import kotlinx.coroutines.flow.FlowCollector;
|
||||
|
||||
/* loaded from: classes.dex */
|
||||
public final class a extends SuspendLambda implements Function2 {
|
||||
|
||||
/* renamed from: a, reason: collision with root package name */
|
||||
public int f4663a;
|
||||
|
||||
/* renamed from: b, reason: collision with root package name */
|
||||
public /* synthetic */ Object f4664b;
|
||||
|
||||
/* renamed from: c, reason: collision with root package name */
|
||||
public final /* synthetic */ List f4665c;
|
||||
|
||||
/* renamed from: d, reason: collision with root package name */
|
||||
public final /* synthetic */ DefaultStationsRepository f4666d;
|
||||
|
||||
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
|
||||
public a(List list, DefaultStationsRepository defaultStationsRepository, Continuation continuation) {
|
||||
super(2, continuation);
|
||||
this.f4665c = list;
|
||||
this.f4666d = defaultStationsRepository;
|
||||
}
|
||||
|
||||
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
|
||||
public final Continuation create(Object obj, Continuation continuation) {
|
||||
a aVar = new a(this.f4665c, this.f4666d, continuation);
|
||||
aVar.f4664b = obj;
|
||||
return aVar;
|
||||
}
|
||||
|
||||
@Override // kotlin.jvm.functions.Function2
|
||||
public final Object invoke(Object obj, Object obj2) {
|
||||
return ((a) create((FlowCollector) obj, (Continuation) obj2)).invokeSuspend(Unit.INSTANCE);
|
||||
}
|
||||
|
||||
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
|
||||
public final Object invokeSuspend(Object obj) {
|
||||
int collectionSizeOrDefault;
|
||||
StationMapper stationMapper;
|
||||
Object coroutine_suspended = IntrinsicsKt.getCOROUTINE_SUSPENDED();
|
||||
int i = this.f4663a;
|
||||
if (i == 0) {
|
||||
ResultKt.throwOnFailure(obj);
|
||||
FlowCollector flowCollector = (FlowCollector) this.f4664b;
|
||||
List<StationEntity> list = this.f4665c;
|
||||
collectionSizeOrDefault = CollectionsKt__IterablesKt.collectionSizeOrDefault(list, 10);
|
||||
ArrayList arrayList = new ArrayList(collectionSizeOrDefault);
|
||||
for (StationEntity stationEntity : list) {
|
||||
stationMapper = this.f4666d.stationMapper;
|
||||
arrayList.add(stationMapper.entityToDomain(stationEntity));
|
||||
}
|
||||
this.f4663a = 1;
|
||||
if (flowCollector.emit(arrayList, this) == coroutine_suspended) {
|
||||
return coroutine_suspended;
|
||||
}
|
||||
} else {
|
||||
if (i != 1) {
|
||||
throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
|
||||
}
|
||||
ResultKt.throwOnFailure(obj);
|
||||
}
|
||||
return Unit.INSTANCE;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
package com.adif.elcanomovil.repositories.stations;
|
||||
|
||||
import java.util.List;
|
||||
import kotlin.ResultKt;
|
||||
import kotlin.Unit;
|
||||
import kotlin.coroutines.Continuation;
|
||||
import kotlin.coroutines.intrinsics.IntrinsicsKt;
|
||||
import kotlin.coroutines.jvm.internal.SuspendLambda;
|
||||
import kotlin.jvm.functions.Function2;
|
||||
import kotlinx.coroutines.flow.FlowKt;
|
||||
|
||||
/* loaded from: classes.dex */
|
||||
public final class b extends SuspendLambda implements Function2 {
|
||||
|
||||
/* renamed from: a, reason: collision with root package name */
|
||||
public /* synthetic */ Object f4667a;
|
||||
|
||||
/* renamed from: b, reason: collision with root package name */
|
||||
public final /* synthetic */ DefaultStationsRepository f4668b;
|
||||
|
||||
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
|
||||
public b(DefaultStationsRepository defaultStationsRepository, Continuation continuation) {
|
||||
super(2, continuation);
|
||||
this.f4668b = defaultStationsRepository;
|
||||
}
|
||||
|
||||
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
|
||||
public final Continuation create(Object obj, Continuation continuation) {
|
||||
b bVar = new b(this.f4668b, continuation);
|
||||
bVar.f4667a = obj;
|
||||
return bVar;
|
||||
}
|
||||
|
||||
@Override // kotlin.jvm.functions.Function2
|
||||
public final Object invoke(Object obj, Object obj2) {
|
||||
return ((b) create((List) obj, (Continuation) obj2)).invokeSuspend(Unit.INSTANCE);
|
||||
}
|
||||
|
||||
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
|
||||
public final Object invokeSuspend(Object obj) {
|
||||
IntrinsicsKt.getCOROUTINE_SUSPENDED();
|
||||
ResultKt.throwOnFailure(obj);
|
||||
return FlowKt.flow(new a((List) this.f4667a, this.f4668b, null));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
package com.adif.elcanomovil.repositories.stations;
|
||||
|
||||
import kotlin.ResultKt;
|
||||
import kotlin.Unit;
|
||||
import kotlin.coroutines.Continuation;
|
||||
import kotlin.coroutines.intrinsics.IntrinsicsKt;
|
||||
import kotlin.coroutines.jvm.internal.SuspendLambda;
|
||||
import kotlin.jvm.functions.Function2;
|
||||
import kotlinx.coroutines.CoroutineScope;
|
||||
import kotlinx.coroutines.flow.FlowKt;
|
||||
|
||||
/* loaded from: classes.dex */
|
||||
public final class c extends SuspendLambda implements Function2 {
|
||||
|
||||
/* renamed from: a, reason: collision with root package name */
|
||||
public final /* synthetic */ DefaultStationsRepository f4669a;
|
||||
|
||||
/* renamed from: b, reason: collision with root package name */
|
||||
public final /* synthetic */ boolean f4670b;
|
||||
|
||||
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
|
||||
public c(DefaultStationsRepository defaultStationsRepository, boolean z3, Continuation continuation) {
|
||||
super(2, continuation);
|
||||
this.f4669a = defaultStationsRepository;
|
||||
this.f4670b = z3;
|
||||
}
|
||||
|
||||
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
|
||||
public final Continuation create(Object obj, Continuation continuation) {
|
||||
return new c(this.f4669a, this.f4670b, continuation);
|
||||
}
|
||||
|
||||
@Override // kotlin.jvm.functions.Function2
|
||||
public final Object invoke(Object obj, Object obj2) {
|
||||
return ((c) create((CoroutineScope) obj, (Continuation) obj2)).invokeSuspend(Unit.INSTANCE);
|
||||
}
|
||||
|
||||
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
|
||||
public final Object invokeSuspend(Object obj) {
|
||||
IntrinsicsKt.getCOROUTINE_SUSPENDED();
|
||||
ResultKt.throwOnFailure(obj);
|
||||
DefaultStationsRepository defaultStationsRepository = this.f4669a;
|
||||
return FlowKt.flow(new DefaultStationsRepository$fetch$2$invokeSuspend$$inlined$networkBoundResource$1(null, defaultStationsRepository, this.f4670b, defaultStationsRepository, defaultStationsRepository, defaultStationsRepository));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,93 @@
|
||||
package com.adif.elcanomovil.repositories.stations;
|
||||
|
||||
import com.adif.elcanomovil.domain.entities.MapRegion;
|
||||
import com.adif.elcanomovil.domain.entities.station.Station;
|
||||
import com.adif.elcanomovil.extensions.LocationExtensionsKt;
|
||||
import com.adif.elcanomovil.serviceStorage.model.StationEntity;
|
||||
import com.google.android.gms.maps.model.LatLngBounds;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import kotlin.ResultKt;
|
||||
import kotlin.Unit;
|
||||
import kotlin.coroutines.Continuation;
|
||||
import kotlin.coroutines.intrinsics.IntrinsicsKt;
|
||||
import kotlin.coroutines.jvm.internal.SuspendLambda;
|
||||
import kotlin.jvm.functions.Function2;
|
||||
import kotlinx.coroutines.flow.FlowCollector;
|
||||
|
||||
/* loaded from: classes.dex */
|
||||
public final class d extends SuspendLambda implements Function2 {
|
||||
|
||||
/* renamed from: a, reason: collision with root package name */
|
||||
public int f4671a;
|
||||
|
||||
/* renamed from: b, reason: collision with root package name */
|
||||
public /* synthetic */ Object f4672b;
|
||||
|
||||
/* renamed from: c, reason: collision with root package name */
|
||||
public final /* synthetic */ MapRegion f4673c;
|
||||
|
||||
/* renamed from: d, reason: collision with root package name */
|
||||
public final /* synthetic */ List f4674d;
|
||||
|
||||
/* renamed from: e, reason: collision with root package name */
|
||||
public final /* synthetic */ DefaultStationsRepository f4675e;
|
||||
|
||||
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
|
||||
public d(MapRegion mapRegion, List list, DefaultStationsRepository defaultStationsRepository, Continuation continuation) {
|
||||
super(2, continuation);
|
||||
this.f4673c = mapRegion;
|
||||
this.f4674d = list;
|
||||
this.f4675e = defaultStationsRepository;
|
||||
}
|
||||
|
||||
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
|
||||
public final Continuation create(Object obj, Continuation continuation) {
|
||||
d dVar = new d(this.f4673c, this.f4674d, this.f4675e, continuation);
|
||||
dVar.f4672b = obj;
|
||||
return dVar;
|
||||
}
|
||||
|
||||
@Override // kotlin.jvm.functions.Function2
|
||||
public final Object invoke(Object obj, Object obj2) {
|
||||
return ((d) create((FlowCollector) obj, (Continuation) obj2)).invokeSuspend(Unit.INSTANCE);
|
||||
}
|
||||
|
||||
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
|
||||
public final Object invokeSuspend(Object obj) {
|
||||
StationMapper stationMapper;
|
||||
boolean stationInRegionBounds;
|
||||
Object coroutine_suspended = IntrinsicsKt.getCOROUTINE_SUSPENDED();
|
||||
int i = this.f4671a;
|
||||
if (i == 0) {
|
||||
ResultKt.throwOnFailure(obj);
|
||||
FlowCollector flowCollector = (FlowCollector) this.f4672b;
|
||||
MapRegion mapRegion = this.f4673c;
|
||||
LatLngBounds latLngBounds = mapRegion != null ? new LatLngBounds(LocationExtensionsKt.toLatLng(mapRegion.getSouthwest()), LocationExtensionsKt.toLatLng(mapRegion.getNortheast())) : null;
|
||||
List<StationEntity> list = this.f4674d;
|
||||
ArrayList arrayList = new ArrayList();
|
||||
for (StationEntity stationEntity : list) {
|
||||
DefaultStationsRepository defaultStationsRepository = this.f4675e;
|
||||
stationMapper = defaultStationsRepository.stationMapper;
|
||||
Station entityToDomain = stationMapper.entityToDomain(stationEntity);
|
||||
stationInRegionBounds = defaultStationsRepository.stationInRegionBounds(entityToDomain, latLngBounds);
|
||||
if (!stationInRegionBounds) {
|
||||
entityToDomain = null;
|
||||
}
|
||||
if (entityToDomain != null) {
|
||||
arrayList.add(entityToDomain);
|
||||
}
|
||||
}
|
||||
this.f4671a = 1;
|
||||
if (flowCollector.emit(arrayList, this) == coroutine_suspended) {
|
||||
return coroutine_suspended;
|
||||
}
|
||||
} else {
|
||||
if (i != 1) {
|
||||
throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
|
||||
}
|
||||
ResultKt.throwOnFailure(obj);
|
||||
}
|
||||
return Unit.INSTANCE;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,50 @@
|
||||
package com.adif.elcanomovil.repositories.stations;
|
||||
|
||||
import com.adif.elcanomovil.domain.entities.MapRegion;
|
||||
import java.util.List;
|
||||
import kotlin.ResultKt;
|
||||
import kotlin.Unit;
|
||||
import kotlin.coroutines.Continuation;
|
||||
import kotlin.coroutines.intrinsics.IntrinsicsKt;
|
||||
import kotlin.coroutines.jvm.internal.SuspendLambda;
|
||||
import kotlin.jvm.functions.Function2;
|
||||
import kotlinx.coroutines.flow.FlowKt;
|
||||
|
||||
/* loaded from: classes.dex */
|
||||
public final class e extends SuspendLambda implements Function2 {
|
||||
|
||||
/* renamed from: a, reason: collision with root package name */
|
||||
public /* synthetic */ Object f4676a;
|
||||
|
||||
/* renamed from: b, reason: collision with root package name */
|
||||
public final /* synthetic */ MapRegion f4677b;
|
||||
|
||||
/* renamed from: c, reason: collision with root package name */
|
||||
public final /* synthetic */ DefaultStationsRepository f4678c;
|
||||
|
||||
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
|
||||
public e(MapRegion mapRegion, DefaultStationsRepository defaultStationsRepository, Continuation continuation) {
|
||||
super(2, continuation);
|
||||
this.f4677b = mapRegion;
|
||||
this.f4678c = defaultStationsRepository;
|
||||
}
|
||||
|
||||
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
|
||||
public final Continuation create(Object obj, Continuation continuation) {
|
||||
e eVar = new e(this.f4677b, this.f4678c, continuation);
|
||||
eVar.f4676a = obj;
|
||||
return eVar;
|
||||
}
|
||||
|
||||
@Override // kotlin.jvm.functions.Function2
|
||||
public final Object invoke(Object obj, Object obj2) {
|
||||
return ((e) create((List) obj, (Continuation) obj2)).invokeSuspend(Unit.INSTANCE);
|
||||
}
|
||||
|
||||
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
|
||||
public final Object invokeSuspend(Object obj) {
|
||||
IntrinsicsKt.getCOROUTINE_SUSPENDED();
|
||||
ResultKt.throwOnFailure(obj);
|
||||
return FlowKt.flow(new d(this.f4677b, (List) this.f4676a, this.f4678c, null));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,50 @@
|
||||
package com.adif.elcanomovil.repositories.stations;
|
||||
|
||||
import com.adif.elcanomovil.domain.entities.MapRegion;
|
||||
import kotlin.ResultKt;
|
||||
import kotlin.Unit;
|
||||
import kotlin.coroutines.Continuation;
|
||||
import kotlin.coroutines.intrinsics.IntrinsicsKt;
|
||||
import kotlin.coroutines.jvm.internal.SuspendLambda;
|
||||
import kotlin.jvm.functions.Function2;
|
||||
import kotlinx.coroutines.CoroutineScope;
|
||||
import kotlinx.coroutines.flow.FlowKt;
|
||||
|
||||
/* loaded from: classes.dex */
|
||||
public final class f extends SuspendLambda implements Function2 {
|
||||
|
||||
/* renamed from: a, reason: collision with root package name */
|
||||
public final /* synthetic */ DefaultStationsRepository f4679a;
|
||||
|
||||
/* renamed from: b, reason: collision with root package name */
|
||||
public final /* synthetic */ MapRegion f4680b;
|
||||
|
||||
/* renamed from: c, reason: collision with root package name */
|
||||
public final /* synthetic */ boolean f4681c;
|
||||
|
||||
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
|
||||
public f(DefaultStationsRepository defaultStationsRepository, MapRegion mapRegion, boolean z3, Continuation continuation) {
|
||||
super(2, continuation);
|
||||
this.f4679a = defaultStationsRepository;
|
||||
this.f4680b = mapRegion;
|
||||
this.f4681c = z3;
|
||||
}
|
||||
|
||||
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
|
||||
public final Continuation create(Object obj, Continuation continuation) {
|
||||
return new f(this.f4679a, this.f4680b, this.f4681c, continuation);
|
||||
}
|
||||
|
||||
@Override // kotlin.jvm.functions.Function2
|
||||
public final Object invoke(Object obj, Object obj2) {
|
||||
return ((f) create((CoroutineScope) obj, (Continuation) obj2)).invokeSuspend(Unit.INSTANCE);
|
||||
}
|
||||
|
||||
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
|
||||
public final Object invokeSuspend(Object obj) {
|
||||
IntrinsicsKt.getCOROUTINE_SUSPENDED();
|
||||
ResultKt.throwOnFailure(obj);
|
||||
DefaultStationsRepository defaultStationsRepository = this.f4679a;
|
||||
return FlowKt.flow(new DefaultStationsRepository$fetchForRegion$2$invokeSuspend$$inlined$networkBoundResource$1(null, defaultStationsRepository, this.f4680b, this.f4681c, defaultStationsRepository, defaultStationsRepository, defaultStationsRepository));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,63 @@
|
||||
package com.adif.elcanomovil.repositories.stations;
|
||||
|
||||
import com.adif.elcanomovil.serviceNetworking.stations.StationsService;
|
||||
import com.adif.elcanomovil.serviceNetworking.stations.model.DetailedInfoDTO;
|
||||
import com.adif.elcanomovil.serviceNetworking.stations.model.OneStationRequest;
|
||||
import kotlin.ResultKt;
|
||||
import kotlin.Unit;
|
||||
import kotlin.coroutines.Continuation;
|
||||
import kotlin.coroutines.intrinsics.IntrinsicsKt;
|
||||
import kotlin.coroutines.jvm.internal.SuspendLambda;
|
||||
import kotlin.jvm.functions.Function2;
|
||||
import kotlinx.coroutines.CoroutineScope;
|
||||
import kotlinx.coroutines.scheduling.WorkQueueKt;
|
||||
|
||||
/* loaded from: classes.dex */
|
||||
public final class g extends SuspendLambda implements Function2 {
|
||||
|
||||
/* renamed from: a, reason: collision with root package name */
|
||||
public int f4682a;
|
||||
|
||||
/* renamed from: b, reason: collision with root package name */
|
||||
public final /* synthetic */ DefaultStationsRepository f4683b;
|
||||
|
||||
/* renamed from: c, reason: collision with root package name */
|
||||
public final /* synthetic */ String f4684c;
|
||||
|
||||
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
|
||||
public g(DefaultStationsRepository defaultStationsRepository, String str, Continuation continuation) {
|
||||
super(2, continuation);
|
||||
this.f4683b = defaultStationsRepository;
|
||||
this.f4684c = str;
|
||||
}
|
||||
|
||||
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
|
||||
public final Continuation create(Object obj, Continuation continuation) {
|
||||
return new g(this.f4683b, this.f4684c, continuation);
|
||||
}
|
||||
|
||||
@Override // kotlin.jvm.functions.Function2
|
||||
public final Object invoke(Object obj, Object obj2) {
|
||||
return ((g) create((CoroutineScope) obj, (Continuation) obj2)).invokeSuspend(Unit.INSTANCE);
|
||||
}
|
||||
|
||||
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
|
||||
public final Object invokeSuspend(Object obj) {
|
||||
StationsService stationsService;
|
||||
Object coroutine_suspended = IntrinsicsKt.getCOROUTINE_SUSPENDED();
|
||||
int i = this.f4682a;
|
||||
if (i != 0) {
|
||||
if (i != 1) {
|
||||
throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
|
||||
}
|
||||
ResultKt.throwOnFailure(obj);
|
||||
return obj;
|
||||
}
|
||||
ResultKt.throwOnFailure(obj);
|
||||
stationsService = this.f4683b.stationsService;
|
||||
OneStationRequest oneStationRequest = new OneStationRequest(new DetailedInfoDTO(false, false, false, false, false, false, false, WorkQueueKt.MASK, null), this.f4684c, "0");
|
||||
this.f4682a = 1;
|
||||
Object oneStation = stationsService.oneStation(oneStationRequest, this);
|
||||
return oneStation == coroutine_suspended ? coroutine_suspended : oneStation;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,161 @@
|
||||
package com.adif.elcanomovil.repositories.stations;
|
||||
|
||||
import kotlin.Unit;
|
||||
import kotlin.coroutines.Continuation;
|
||||
import kotlin.coroutines.jvm.internal.SuspendLambda;
|
||||
import kotlin.jvm.functions.Function2;
|
||||
import kotlinx.coroutines.flow.FlowCollector;
|
||||
|
||||
/* loaded from: classes.dex */
|
||||
public final class h extends SuspendLambda implements Function2 {
|
||||
|
||||
/* renamed from: a, reason: collision with root package name */
|
||||
public int f4685a;
|
||||
|
||||
/* renamed from: b, reason: collision with root package name */
|
||||
public /* synthetic */ Object f4686b;
|
||||
|
||||
/* renamed from: c, reason: collision with root package name */
|
||||
public final /* synthetic */ DefaultStationsRepository f4687c;
|
||||
|
||||
/* renamed from: d, reason: collision with root package name */
|
||||
public final /* synthetic */ String f4688d;
|
||||
|
||||
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
|
||||
public h(DefaultStationsRepository defaultStationsRepository, String str, Continuation continuation) {
|
||||
super(2, continuation);
|
||||
this.f4687c = defaultStationsRepository;
|
||||
this.f4688d = str;
|
||||
}
|
||||
|
||||
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
|
||||
public final Continuation create(Object obj, Continuation continuation) {
|
||||
h hVar = new h(this.f4687c, this.f4688d, continuation);
|
||||
hVar.f4686b = obj;
|
||||
return hVar;
|
||||
}
|
||||
|
||||
@Override // kotlin.jvm.functions.Function2
|
||||
public final Object invoke(Object obj, Object obj2) {
|
||||
return ((h) create((FlowCollector) obj, (Continuation) obj2)).invokeSuspend(Unit.INSTANCE);
|
||||
}
|
||||
|
||||
/* JADX WARN: Code restructure failed: missing block: B:19:0x00ab, code lost:
|
||||
|
||||
if (r1.emit(r11, r10) != r0) goto L33;
|
||||
*/
|
||||
/* JADX WARN: Code restructure failed: missing block: B:30:0x00c7, code lost:
|
||||
|
||||
if (r1.emit(r11, r10) != r0) goto L33;
|
||||
*/
|
||||
/* JADX WARN: Type inference failed for: r1v0, types: [int, kotlinx.coroutines.flow.FlowCollector] */
|
||||
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
|
||||
/*
|
||||
Code decompiled incorrectly, please refer to instructions dump.
|
||||
To view partially-correct add '--show-bad-code' argument
|
||||
*/
|
||||
public final java.lang.Object invokeSuspend(java.lang.Object r11) {
|
||||
/*
|
||||
r10 = this;
|
||||
java.lang.Object r0 = kotlin.coroutines.intrinsics.IntrinsicsKt.getCOROUTINE_SUSPENDED()
|
||||
int r1 = r10.f4685a
|
||||
com.adif.elcanomovil.repositories.stations.DefaultStationsRepository r2 = r10.f4687c
|
||||
r3 = 4
|
||||
r4 = 3
|
||||
r5 = 2
|
||||
r6 = 1
|
||||
r7 = 0
|
||||
if (r1 == 0) goto L40
|
||||
if (r1 == r6) goto L38
|
||||
if (r1 == r5) goto L30
|
||||
if (r1 == r4) goto L24
|
||||
if (r1 != r3) goto L1c
|
||||
kotlin.ResultKt.throwOnFailure(r11)
|
||||
goto Lca
|
||||
L1c:
|
||||
java.lang.IllegalStateException r10 = new java.lang.IllegalStateException
|
||||
java.lang.String r11 = "call to 'resume' before 'invoke' with coroutine"
|
||||
r10.<init>(r11)
|
||||
throw r10
|
||||
L24:
|
||||
java.lang.Object r1 = r10.f4686b
|
||||
kotlinx.coroutines.flow.FlowCollector r1 = (kotlinx.coroutines.flow.FlowCollector) r1
|
||||
kotlin.ResultKt.throwOnFailure(r11) // Catch: java.lang.Throwable -> L2d
|
||||
goto Lca
|
||||
L2d:
|
||||
r11 = move-exception
|
||||
goto Lae
|
||||
L30:
|
||||
java.lang.Object r1 = r10.f4686b
|
||||
kotlinx.coroutines.flow.FlowCollector r1 = (kotlinx.coroutines.flow.FlowCollector) r1
|
||||
kotlin.ResultKt.throwOnFailure(r11) // Catch: java.lang.Throwable -> L2d
|
||||
goto L83
|
||||
L38:
|
||||
java.lang.Object r1 = r10.f4686b
|
||||
kotlinx.coroutines.flow.FlowCollector r1 = (kotlinx.coroutines.flow.FlowCollector) r1
|
||||
kotlin.ResultKt.throwOnFailure(r11)
|
||||
goto L64
|
||||
L40:
|
||||
kotlin.ResultKt.throwOnFailure(r11)
|
||||
java.lang.Object r11 = r10.f4686b
|
||||
kotlinx.coroutines.flow.FlowCollector r11 = (kotlinx.coroutines.flow.FlowCollector) r11
|
||||
kotlinx.coroutines.flow.MutableStateFlow r1 = com.adif.elcanomovil.repositories.stations.DefaultStationsRepository.access$get_currentOneStation$p(r2)
|
||||
com.adif.elcanomovil.domain.entities.utils.AsyncResult$Companion r8 = com.adif.elcanomovil.domain.entities.utils.AsyncResult.INSTANCE
|
||||
com.adif.elcanomovil.domain.entities.utils.AsyncResult r9 = r8.loading(r7)
|
||||
r1.setValue(r9)
|
||||
com.adif.elcanomovil.domain.entities.utils.AsyncResult r1 = r8.loading(r7)
|
||||
r10.f4686b = r11
|
||||
r10.f4685a = r6
|
||||
java.lang.Object r1 = r11.emit(r1, r10)
|
||||
if (r1 != r0) goto L63
|
||||
goto Lc9
|
||||
L63:
|
||||
r1 = r11
|
||||
L64:
|
||||
d1.a r11 = com.adif.elcanomovil.repositories.stations.DefaultStationsRepository.access$getAppDispatcher$p(r2) // Catch: java.lang.Throwable -> L2d
|
||||
d1.d r11 = (d1.d) r11 // Catch: java.lang.Throwable -> L2d
|
||||
r11.getClass() // Catch: java.lang.Throwable -> L2d
|
||||
kotlinx.coroutines.CoroutineDispatcher r11 = kotlinx.coroutines.Dispatchers.getIO() // Catch: java.lang.Throwable -> L2d
|
||||
com.adif.elcanomovil.repositories.stations.g r6 = new com.adif.elcanomovil.repositories.stations.g // Catch: java.lang.Throwable -> L2d
|
||||
java.lang.String r8 = r10.f4688d // Catch: java.lang.Throwable -> L2d
|
||||
r6.<init>(r2, r8, r7) // Catch: java.lang.Throwable -> L2d
|
||||
r10.f4686b = r1 // Catch: java.lang.Throwable -> L2d
|
||||
r10.f4685a = r5 // Catch: java.lang.Throwable -> L2d
|
||||
java.lang.Object r11 = kotlinx.coroutines.BuildersKt.withContext(r11, r6, r10) // Catch: java.lang.Throwable -> L2d
|
||||
if (r11 != r0) goto L83
|
||||
goto Lc9
|
||||
L83:
|
||||
com.adif.elcanomovil.serviceNetworking.stations.model.StationResponse r11 = (com.adif.elcanomovil.serviceNetworking.stations.model.StationResponse) r11 // Catch: java.lang.Throwable -> L2d
|
||||
com.adif.elcanomovil.domain.entities.utils.AsyncResult$Companion r5 = com.adif.elcanomovil.domain.entities.utils.AsyncResult.INSTANCE // Catch: java.lang.Throwable -> L2d
|
||||
com.adif.elcanomovil.serviceNetworking.stations.model.RequestedStationInfoDTO r11 = r11.getRequestedStationInfo() // Catch: java.lang.Throwable -> L2d
|
||||
com.adif.elcanomovil.repositories.stations.OneStationMapper r6 = new com.adif.elcanomovil.repositories.stations.OneStationMapper // Catch: java.lang.Throwable -> L2d
|
||||
r6.<init>() // Catch: java.lang.Throwable -> L2d
|
||||
com.adif.elcanomovil.domain.entities.station.RequestedStationInfo r11 = r6.responseToDomain(r11) // Catch: java.lang.Throwable -> L2d
|
||||
kotlinx.coroutines.flow.MutableStateFlow r6 = com.adif.elcanomovil.repositories.stations.DefaultStationsRepository.access$get_currentOneStation$p(r2) // Catch: java.lang.Throwable -> L2d
|
||||
com.adif.elcanomovil.domain.entities.utils.AsyncResult r8 = r5.success(r11) // Catch: java.lang.Throwable -> L2d
|
||||
r6.setValue(r8) // Catch: java.lang.Throwable -> L2d
|
||||
com.adif.elcanomovil.domain.entities.utils.AsyncResult r11 = r5.success(r11) // Catch: java.lang.Throwable -> L2d
|
||||
r10.f4686b = r1 // Catch: java.lang.Throwable -> L2d
|
||||
r10.f4685a = r4 // Catch: java.lang.Throwable -> L2d
|
||||
java.lang.Object r10 = r1.emit(r11, r10) // Catch: java.lang.Throwable -> L2d
|
||||
if (r10 != r0) goto Lca
|
||||
goto Lc9
|
||||
Lae:
|
||||
kotlinx.coroutines.flow.MutableStateFlow r2 = com.adif.elcanomovil.repositories.stations.DefaultStationsRepository.access$get_currentOneStation$p(r2)
|
||||
com.adif.elcanomovil.domain.entities.utils.AsyncResult$Companion r4 = com.adif.elcanomovil.domain.entities.utils.AsyncResult.INSTANCE
|
||||
com.adif.elcanomovil.domain.entities.utils.AsyncResult r5 = r4.error(r11, r7)
|
||||
r2.setValue(r5)
|
||||
com.adif.elcanomovil.domain.entities.utils.AsyncResult r11 = r4.error(r11, r7)
|
||||
r10.f4686b = r7
|
||||
r10.f4685a = r3
|
||||
java.lang.Object r10 = r1.emit(r11, r10)
|
||||
if (r10 != r0) goto Lca
|
||||
Lc9:
|
||||
return r0
|
||||
Lca:
|
||||
kotlin.Unit r10 = kotlin.Unit.INSTANCE
|
||||
return r10
|
||||
*/
|
||||
throw new UnsupportedOperationException("Method not decompiled: com.adif.elcanomovil.repositories.stations.h.invokeSuspend(java.lang.Object):java.lang.Object");
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,54 @@
|
||||
package com.adif.elcanomovil.repositories.stations;
|
||||
|
||||
import com.adif.elcanomovil.serviceStorage.database.StationsDao;
|
||||
import com.adif.elcanomovil.serviceStorage.model.StationEntity;
|
||||
import kotlin.ResultKt;
|
||||
import kotlin.Unit;
|
||||
import kotlin.coroutines.Continuation;
|
||||
import kotlin.coroutines.intrinsics.IntrinsicsKt;
|
||||
import kotlin.coroutines.jvm.internal.SuspendLambda;
|
||||
import kotlin.jvm.functions.Function2;
|
||||
import kotlinx.coroutines.CoroutineScope;
|
||||
|
||||
/* loaded from: classes.dex */
|
||||
public final class i extends SuspendLambda implements Function2 {
|
||||
|
||||
/* renamed from: a, reason: collision with root package name */
|
||||
public final /* synthetic */ DefaultStationsRepository f4689a;
|
||||
|
||||
/* renamed from: b, reason: collision with root package name */
|
||||
public final /* synthetic */ String f4690b;
|
||||
|
||||
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
|
||||
public i(DefaultStationsRepository defaultStationsRepository, String str, Continuation continuation) {
|
||||
super(2, continuation);
|
||||
this.f4689a = defaultStationsRepository;
|
||||
this.f4690b = str;
|
||||
}
|
||||
|
||||
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
|
||||
public final Continuation create(Object obj, Continuation continuation) {
|
||||
return new i(this.f4689a, this.f4690b, continuation);
|
||||
}
|
||||
|
||||
@Override // kotlin.jvm.functions.Function2
|
||||
public final Object invoke(Object obj, Object obj2) {
|
||||
return ((i) create((CoroutineScope) obj, (Continuation) obj2)).invokeSuspend(Unit.INSTANCE);
|
||||
}
|
||||
|
||||
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
|
||||
public final Object invokeSuspend(Object obj) {
|
||||
StationMapper stationMapper;
|
||||
StationsDao stationsDao;
|
||||
IntrinsicsKt.getCOROUTINE_SUSPENDED();
|
||||
ResultKt.throwOnFailure(obj);
|
||||
DefaultStationsRepository defaultStationsRepository = this.f4689a;
|
||||
stationMapper = defaultStationsRepository.stationMapper;
|
||||
stationsDao = defaultStationsRepository.stationsDao;
|
||||
StationEntity stationEntity = stationsDao.get(this.f4690b);
|
||||
if (stationEntity == null) {
|
||||
return null;
|
||||
}
|
||||
return stationMapper.entityToDomain(stationEntity);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
package com.adif.elcanomovil.repositories.stations;
|
||||
|
||||
import com.adif.elcanomovil.serviceNetworking.stations.model.StationsResponse;
|
||||
import kotlin.coroutines.Continuation;
|
||||
import kotlin.coroutines.jvm.internal.ContinuationImpl;
|
||||
import kotlin.jvm.internal.IntCompanionObject;
|
||||
|
||||
/* loaded from: classes.dex */
|
||||
public final class j extends ContinuationImpl {
|
||||
|
||||
/* renamed from: a, reason: collision with root package name */
|
||||
public DefaultStationsRepository f4691a;
|
||||
|
||||
/* renamed from: b, reason: collision with root package name */
|
||||
public StationsResponse f4692b;
|
||||
|
||||
/* renamed from: c, reason: collision with root package name */
|
||||
public /* synthetic */ Object f4693c;
|
||||
|
||||
/* renamed from: d, reason: collision with root package name */
|
||||
public final /* synthetic */ DefaultStationsRepository f4694d;
|
||||
|
||||
/* renamed from: e, reason: collision with root package name */
|
||||
public int f4695e;
|
||||
|
||||
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
|
||||
public j(DefaultStationsRepository defaultStationsRepository, Continuation continuation) {
|
||||
super(continuation);
|
||||
this.f4694d = defaultStationsRepository;
|
||||
}
|
||||
|
||||
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
|
||||
public final Object invokeSuspend(Object obj) {
|
||||
Object parseLocalFileWithStations;
|
||||
this.f4693c = obj;
|
||||
this.f4695e |= IntCompanionObject.MIN_VALUE;
|
||||
parseLocalFileWithStations = this.f4694d.parseLocalFileWithStations(this);
|
||||
return parseLocalFileWithStations;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
package com.adif.elcanomovil.repositories.stations;
|
||||
|
||||
import com.adif.elcanomovil.serviceNetworking.stations.model.StationsResponse;
|
||||
import kotlin.coroutines.Continuation;
|
||||
import kotlin.coroutines.jvm.internal.ContinuationImpl;
|
||||
import kotlin.jvm.internal.IntCompanionObject;
|
||||
|
||||
/* loaded from: classes.dex */
|
||||
public final class k extends ContinuationImpl {
|
||||
|
||||
/* renamed from: a, reason: collision with root package name */
|
||||
public DefaultStationsRepository f4696a;
|
||||
|
||||
/* renamed from: b, reason: collision with root package name */
|
||||
public StationsResponse f4697b;
|
||||
|
||||
/* renamed from: c, reason: collision with root package name */
|
||||
public /* synthetic */ Object f4698c;
|
||||
|
||||
/* renamed from: d, reason: collision with root package name */
|
||||
public final /* synthetic */ DefaultStationsRepository f4699d;
|
||||
|
||||
/* renamed from: e, reason: collision with root package name */
|
||||
public int f4700e;
|
||||
|
||||
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
|
||||
public k(DefaultStationsRepository defaultStationsRepository, Continuation continuation) {
|
||||
super(continuation);
|
||||
this.f4699d = defaultStationsRepository;
|
||||
}
|
||||
|
||||
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
|
||||
public final Object invokeSuspend(Object obj) {
|
||||
Object processAndInsertDBStationsResponse;
|
||||
this.f4698c = obj;
|
||||
this.f4700e |= IntCompanionObject.MIN_VALUE;
|
||||
processAndInsertDBStationsResponse = this.f4699d.processAndInsertDBStationsResponse(null, this);
|
||||
return processAndInsertDBStationsResponse;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,64 @@
|
||||
package com.adif.elcanomovil.repositories.stations;
|
||||
|
||||
import com.adif.elcanomovil.repositories.utils.REGEX_UNACCENTKt;
|
||||
import com.adif.elcanomovil.serviceStorage.database.StationsDao;
|
||||
import com.adif.elcanomovil.serviceStorage.model.StationEntity;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import kotlin.ResultKt;
|
||||
import kotlin.Unit;
|
||||
import kotlin.collections.CollectionsKt__IterablesKt;
|
||||
import kotlin.coroutines.Continuation;
|
||||
import kotlin.coroutines.intrinsics.IntrinsicsKt;
|
||||
import kotlin.coroutines.jvm.internal.SuspendLambda;
|
||||
import kotlin.jvm.functions.Function2;
|
||||
import kotlin.text.StringsKt__StringsJVMKt;
|
||||
import kotlinx.coroutines.CoroutineScope;
|
||||
|
||||
/* loaded from: classes.dex */
|
||||
public final class l extends SuspendLambda implements Function2 {
|
||||
|
||||
/* renamed from: a, reason: collision with root package name */
|
||||
public final /* synthetic */ DefaultStationsRepository f4701a;
|
||||
|
||||
/* renamed from: b, reason: collision with root package name */
|
||||
public final /* synthetic */ String f4702b;
|
||||
|
||||
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
|
||||
public l(DefaultStationsRepository defaultStationsRepository, String str, Continuation continuation) {
|
||||
super(2, continuation);
|
||||
this.f4701a = defaultStationsRepository;
|
||||
this.f4702b = str;
|
||||
}
|
||||
|
||||
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
|
||||
public final Continuation create(Object obj, Continuation continuation) {
|
||||
return new l(this.f4701a, this.f4702b, continuation);
|
||||
}
|
||||
|
||||
@Override // kotlin.jvm.functions.Function2
|
||||
public final Object invoke(Object obj, Object obj2) {
|
||||
return ((l) create((CoroutineScope) obj, (Continuation) obj2)).invokeSuspend(Unit.INSTANCE);
|
||||
}
|
||||
|
||||
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
|
||||
public final Object invokeSuspend(Object obj) {
|
||||
StationsDao stationsDao;
|
||||
String replace$default;
|
||||
int collectionSizeOrDefault;
|
||||
StationMapper stationMapper;
|
||||
IntrinsicsKt.getCOROUTINE_SUSPENDED();
|
||||
ResultKt.throwOnFailure(obj);
|
||||
DefaultStationsRepository defaultStationsRepository = this.f4701a;
|
||||
stationsDao = defaultStationsRepository.stationsDao;
|
||||
replace$default = StringsKt__StringsJVMKt.replace$default(REGEX_UNACCENTKt.unaccent(this.f4702b), " ", "%", false, 4, (Object) null);
|
||||
List<StationEntity> coincidences = stationsDao.getCoincidences(replace$default);
|
||||
collectionSizeOrDefault = CollectionsKt__IterablesKt.collectionSizeOrDefault(coincidences, 10);
|
||||
ArrayList arrayList = new ArrayList(collectionSizeOrDefault);
|
||||
for (StationEntity stationEntity : coincidences) {
|
||||
stationMapper = defaultStationsRepository.stationMapper;
|
||||
arrayList.add(stationMapper.entityToDomain(stationEntity));
|
||||
}
|
||||
return arrayList;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user