package com.sistemasolton.itranvias.home.data.repository;

import androidx.core.view.MotionEventCompat;
import com.sistemasolton.itranvias.home.data.remote.ITranviasApi;
import com.sistemasolton.itranvias.home.domain.repository.ITranviasRepository;
import kotlin.Metadata;
import kotlin.coroutines.Continuation;
import kotlin.coroutines.jvm.internal.ContinuationImpl;
import kotlin.coroutines.jvm.internal.DebugMetadata;
import kotlin.jvm.internal.Intrinsics;
import kotlin.text.StringsKt;
import kotlinx.datetime.Clock;
import kotlinx.datetime.LocalDate;
import kotlinx.datetime.TimeZone;
import kotlinx.datetime.TimeZoneKt;
import kotlinx.serialization.json.Json;

/* JADX INFO: compiled from: ITranviasRepositoryImpl.kt */
/* JADX INFO: loaded from: classes2.dex */
@Metadata(d1 = {"\u0000X\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u000e\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u0006\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0002\b\t\n\u0002\u0010\t\n\u0000\b\u0007\u0018\u00002\u00020\u0001B\u0017\u0012\u0006\u0010\u0002\u001a\u00020\u0003\u0012\u0006\u0010\u0004\u001a\u00020\u0005¢\u0006\u0004\b\u0006\u0010\u0007J\u0016\u0010\b\u001a\u00020\t2\u0006\u0010\n\u001a\u00020\u000bH\u0096@¢\u0006\u0002\u0010\fJ\u0010\u0010\r\u001a\u00020\u000b2\u0006\u0010\n\u001a\u00020\u000bH\u0002J\u0016\u0010\u000e\u001a\u00020\u000f2\u0006\u0010\u0010\u001a\u00020\u000bH\u0096@¢\u0006\u0002\u0010\fJ\u0016\u0010\u0011\u001a\u00020\u00122\u0006\u0010\u0010\u001a\u00020\u000bH\u0096@¢\u0006\u0002\u0010\fJ \u0010\u0013\u001a\u00020\u00142\u0006\u0010\u0010\u001a\u00020\u000b2\b\u0010\u0015\u001a\u0004\u0018\u00010\u000bH\u0096@¢\u0006\u0002\u0010\u0016J\u001e\u0010\u0017\u001a\u00020\u00182\u0006\u0010\u0019\u001a\u00020\u001a2\u0006\u0010\u001b\u001a\u00020\u001aH\u0096@¢\u0006\u0002\u0010\u001cJ\u0016\u0010\u001d\u001a\u00020\u001e2\u0006\u0010\u0010\u001a\u00020\u000bH\u0096@¢\u0006\u0002\u0010\fJ0\u0010\u001f\u001a\u0004\u0018\u00010\t2\u0006\u0010 \u001a\u00020\u000b2\u0006\u0010!\u001a\u00020\u000b2\u0006\u0010\"\u001a\u00020\u000b2\u0006\u0010#\u001a\u00020\u000bH\u0096@¢\u0006\u0002\u0010$J\u0018\u0010%\u001a\u00020\u000b2\u0006\u0010\u0019\u001a\u00020\u001a2\u0006\u0010\u001b\u001a\u00020\u001aH\u0002J\b\u0010&\u001a\u00020\u000bH\u0002J\b\u0010'\u001a\u00020(H\u0002R\u000e\u0010\u0002\u001a\u00020\u0003X\u0082\u0004¢\u0006\u0002\n\u0000R\u000e\u0010\u0004\u001a\u00020\u0005X\u0082\u0004¢\u0006\u0002\n\u0000¨\u0006)"}, d2 = {"Lcom/sistemasolton/itranvias/home/data/repository/ITranviasRepositoryImpl;", "Lcom/sistemasolton/itranvias/home/domain/repository/ITranviasRepository;", "api", "Lcom/sistemasolton/itranvias/home/data/remote/ITranviasApi;", "json", "Lkotlinx/serialization/json/Json;", "<init>", "(Lcom/sistemasolton/itranvias/home/data/remote/ITranviasApi;Lkotlinx/serialization/json/Json;)V", "getInfoDef", "Lcom/sistemasolton/itranvias/home/data/remote/dto/infodto/InfoDto;", "language", "", "(Ljava/lang/String;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;", "buildDato", "getLineDetail", "Lcom/sistemasolton/itranvias/home/data/remote/dto/detallelineadto/DetalleLineaDto;", "dato", "getStopDetail", "Lcom/sistemasolton/itranvias/home/data/remote/dto/detalleparadadto/DetalleParadaDto;", "getSchedule", "Lcom/sistemasolton/itranvias/home/data/remote/dto/horariodto/HorarioDto;", "fecha", "(Ljava/lang/String;Ljava/lang/String;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;", "getNearbyStops", "Lcom/sistemasolton/itranvias/home/data/remote/dto/nearbystopdto/NearbyStopsDto;", "lat", "", "lon", "(DDLkotlin/coroutines/Continuation;)Ljava/lang/Object;", "getLineMap", "Lcom/sistemasolton/itranvias/home/data/remote/dto/mapasdto/MapasDto;", "checkMasterVersion", "fechaActualizacion", "lenguaje", "idNovedad", "fechaNovedad", "(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;", "buildNearbyDato", "getCurrentDateFormatted", "getCurrentTimestamp", "", "composeApp_release"}, k = 1, mv = {2, 1, 0}, xi = 48)
public final class ITranviasRepositoryImpl implements ITranviasRepository {
    public static final int $stable = 8;
    private final ITranviasApi api;
    private final Json json;

    /* JADX INFO: renamed from: com.sistemasolton.itranvias.home.data.repository.ITranviasRepositoryImpl$checkMasterVersion$1, reason: invalid class name */
    /* JADX INFO: compiled from: ITranviasRepositoryImpl.kt */
    @Metadata(k = 3, mv = {2, 1, 0}, xi = 48)
    @DebugMetadata(c = "com.sistemasolton.itranvias.home.data.repository.ITranviasRepositoryImpl", f = "ITranviasRepositoryImpl.kt", i = {}, l = {122}, m = "checkMasterVersion", n = {}, s = {})
    static final class AnonymousClass1 extends ContinuationImpl {
        int label;
        /* synthetic */ Object result;

        AnonymousClass1(Continuation<? super AnonymousClass1> continuation) {
            super(continuation);
        }

        @Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
        public final Object invokeSuspend(Object obj) {
            this.result = obj;
            this.label |= Integer.MIN_VALUE;
            return ITranviasRepositoryImpl.this.checkMasterVersion(null, null, null, null, this);
        }
    }

    /* JADX INFO: renamed from: com.sistemasolton.itranvias.home.data.repository.ITranviasRepositoryImpl$getInfoDef$1, reason: invalid class name and case insensitive filesystem */
    /* JADX INFO: compiled from: ITranviasRepositoryImpl.kt */
    @Metadata(k = 3, mv = {2, 1, 0}, xi = 48)
    @DebugMetadata(c = "com.sistemasolton.itranvias.home.data.repository.ITranviasRepositoryImpl", f = "ITranviasRepositoryImpl.kt", i = {}, l = {23}, m = "getInfoDef", n = {}, s = {})
    static final class C06371 extends ContinuationImpl {
        int label;
        /* synthetic */ Object result;

        C06371(Continuation<? super C06371> continuation) {
            super(continuation);
        }

        @Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
        public final Object invokeSuspend(Object obj) {
            this.result = obj;
            this.label |= Integer.MIN_VALUE;
            return ITranviasRepositoryImpl.this.getInfoDef(null, this);
        }
    }

    /* JADX INFO: renamed from: com.sistemasolton.itranvias.home.data.repository.ITranviasRepositoryImpl$getLineDetail$1, reason: invalid class name and case insensitive filesystem */
    /* JADX INFO: compiled from: ITranviasRepositoryImpl.kt */
    @Metadata(k = 3, mv = {2, 1, 0}, xi = 48)
    @DebugMetadata(c = "com.sistemasolton.itranvias.home.data.repository.ITranviasRepositoryImpl", f = "ITranviasRepositoryImpl.kt", i = {}, l = {MotionEventCompat.AXIS_GENERIC_11}, m = "getLineDetail", n = {}, s = {})
    static final class C06381 extends ContinuationImpl {
        int label;
        /* synthetic */ Object result;

        C06381(Continuation<? super C06381> continuation) {
            super(continuation);
        }

        @Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
        public final Object invokeSuspend(Object obj) {
            this.result = obj;
            this.label |= Integer.MIN_VALUE;
            return ITranviasRepositoryImpl.this.getLineDetail(null, this);
        }
    }

    /* JADX INFO: renamed from: com.sistemasolton.itranvias.home.data.repository.ITranviasRepositoryImpl$getLineMap$1, reason: invalid class name and case insensitive filesystem */
    /* JADX INFO: compiled from: ITranviasRepositoryImpl.kt */
    @Metadata(k = 3, mv = {2, 1, 0}, xi = 48)
    @DebugMetadata(c = "com.sistemasolton.itranvias.home.data.repository.ITranviasRepositoryImpl", f = "ITranviasRepositoryImpl.kt", i = {}, l = {102}, m = "getLineMap", n = {}, s = {})
    static final class C06391 extends ContinuationImpl {
        int label;
        /* synthetic */ Object result;

        C06391(Continuation<? super C06391> continuation) {
            super(continuation);
        }

        @Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
        public final Object invokeSuspend(Object obj) {
            this.result = obj;
            this.label |= Integer.MIN_VALUE;
            return ITranviasRepositoryImpl.this.getLineMap(null, this);
        }
    }

    /* JADX INFO: renamed from: com.sistemasolton.itranvias.home.data.repository.ITranviasRepositoryImpl$getNearbyStops$1, reason: invalid class name and case insensitive filesystem */
    /* JADX INFO: compiled from: ITranviasRepositoryImpl.kt */
    @Metadata(k = 3, mv = {2, 1, 0}, xi = 48)
    @DebugMetadata(c = "com.sistemasolton.itranvias.home.data.repository.ITranviasRepositoryImpl", f = "ITranviasRepositoryImpl.kt", i = {}, l = {86}, m = "getNearbyStops", n = {}, s = {})
    static final class C06401 extends ContinuationImpl {
        int label;
        /* synthetic */ Object result;

        C06401(Continuation<? super C06401> continuation) {
            super(continuation);
        }

        @Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
        public final Object invokeSuspend(Object obj) {
            this.result = obj;
            this.label |= Integer.MIN_VALUE;
            return ITranviasRepositoryImpl.this.getNearbyStops(0.0d, 0.0d, this);
        }
    }

    /* JADX INFO: renamed from: com.sistemasolton.itranvias.home.data.repository.ITranviasRepositoryImpl$getSchedule$1, reason: invalid class name and case insensitive filesystem */
    /* JADX INFO: compiled from: ITranviasRepositoryImpl.kt */
    @Metadata(k = 3, mv = {2, 1, 0}, xi = 48)
    @DebugMetadata(c = "com.sistemasolton.itranvias.home.data.repository.ITranviasRepositoryImpl", f = "ITranviasRepositoryImpl.kt", i = {}, l = {68}, m = "getSchedule", n = {}, s = {})
    static final class C06411 extends ContinuationImpl {
        int label;
        /* synthetic */ Object result;

        C06411(Continuation<? super C06411> continuation) {
            super(continuation);
        }

        @Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
        public final Object invokeSuspend(Object obj) {
            this.result = obj;
            this.label |= Integer.MIN_VALUE;
            return ITranviasRepositoryImpl.this.getSchedule(null, null, this);
        }
    }

    /* JADX INFO: renamed from: com.sistemasolton.itranvias.home.data.repository.ITranviasRepositoryImpl$getStopDetail$1, reason: invalid class name and case insensitive filesystem */
    /* JADX INFO: compiled from: ITranviasRepositoryImpl.kt */
    @Metadata(k = 3, mv = {2, 1, 0}, xi = 48)
    @DebugMetadata(c = "com.sistemasolton.itranvias.home.data.repository.ITranviasRepositoryImpl", f = "ITranviasRepositoryImpl.kt", i = {}, l = {55}, m = "getStopDetail", n = {}, s = {})
    static final class C06421 extends ContinuationImpl {
        int label;
        /* synthetic */ Object result;

        C06421(Continuation<? super C06421> continuation) {
            super(continuation);
        }

        @Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
        public final Object invokeSuspend(Object obj) {
            this.result = obj;
            this.label |= Integer.MIN_VALUE;
            return ITranviasRepositoryImpl.this.getStopDetail(null, this);
        }
    }

    public ITranviasRepositoryImpl(ITranviasApi api, Json json) {
        Intrinsics.checkNotNullParameter(api, "api");
        Intrinsics.checkNotNullParameter(json, "json");
        this.api = api;
        this.json = json;
    }

    /* JADX WARN: Removed duplicated region for block: B:7:0x0014  */
    @Override // com.sistemasolton.itranvias.home.domain.repository.ITranviasRepository
    /*
        Code decompiled incorrectly, please refer to instructions dump.
        To view partially-correct code enable 'Show inconsistent code' option in preferences
    */
    public java.lang.Object getInfoDef(java.lang.String r11, kotlin.coroutines.Continuation<? super com.sistemasolton.itranvias.home.data.remote.dto.infodto.InfoDto> r12) throws java.lang.Throwable {
        /*
            r10 = this;
            boolean r0 = r12 instanceof com.sistemasolton.itranvias.home.data.repository.ITranviasRepositoryImpl.C06371
            if (r0 == 0) goto L14
            r0 = r12
            com.sistemasolton.itranvias.home.data.repository.ITranviasRepositoryImpl$getInfoDef$1 r0 = (com.sistemasolton.itranvias.home.data.repository.ITranviasRepositoryImpl.C06371) r0
            int r1 = r0.label
            r2 = -2147483648(0xffffffff80000000, float:-0.0)
            r1 = r1 & r2
            if (r1 == 0) goto L14
            int r12 = r0.label
            int r12 = r12 - r2
            r0.label = r12
            goto L19
        L14:
            com.sistemasolton.itranvias.home.data.repository.ITranviasRepositoryImpl$getInfoDef$1 r0 = new com.sistemasolton.itranvias.home.data.repository.ITranviasRepositoryImpl$getInfoDef$1
            r0.<init>(r12)
        L19:
            r6 = r0
            java.lang.Object r12 = r6.result
            java.lang.Object r0 = kotlin.coroutines.intrinsics.IntrinsicsKt.getCOROUTINE_SUSPENDED()
            int r1 = r6.label
            r9 = 1
            if (r1 == 0) goto L33
            if (r1 != r9) goto L2b
            kotlin.ResultKt.throwOnFailure(r12)
            goto L4a
        L2b:
            java.lang.IllegalStateException r11 = new java.lang.IllegalStateException
            java.lang.String r12 = "call to 'resume' before 'invoke' with coroutine"
            r11.<init>(r12)
            throw r11
        L33:
            kotlin.ResultKt.throwOnFailure(r12)
            java.lang.String r2 = r10.buildDato(r11)
            com.sistemasolton.itranvias.home.data.remote.ITranviasApi r1 = r10.api
            r6.label = r9
            r3 = 0
            r4 = 0
            r7 = 6
            r8 = 0
            java.lang.Object r12 = com.sistemasolton.itranvias.home.data.remote.ITranviasApi.DefaultImpls.getInfoDef$default(r1, r2, r3, r4, r6, r7, r8)
            if (r12 != r0) goto L4a
            return r0
        L4a:
            java.lang.String r12 = (java.lang.String) r12
            r11 = r12
            java.lang.CharSequence r11 = (java.lang.CharSequence) r11
            r4 = 6
            r5 = 0
            r1 = 123(0x7b, float:1.72E-43)
            r2 = 0
            r3 = 0
            r0 = r11
            int r6 = kotlin.text.StringsKt.indexOf$default(r0, r1, r2, r3, r4, r5)
            r1 = 125(0x7d, float:1.75E-43)
            int r11 = kotlin.text.StringsKt.lastIndexOf$default(r0, r1, r2, r3, r4, r5)
            r0 = -1
            if (r6 == r0) goto L83
            if (r11 == r0) goto L83
            if (r11 <= r6) goto L83
            int r11 = r11 + r9
            java.lang.String r11 = r12.substring(r6, r11)
            java.lang.String r12 = "substring(...)"
            kotlin.jvm.internal.Intrinsics.checkNotNullExpressionValue(r11, r12)
            kotlinx.serialization.json.Json r12 = r10.json
            r12.getSerializersModule()
            com.sistemasolton.itranvias.home.data.remote.dto.infodto.InfoDto$Companion r0 = com.sistemasolton.itranvias.home.data.remote.dto.infodto.InfoDto.INSTANCE
            kotlinx.serialization.KSerializer r0 = r0.serializer()
            kotlinx.serialization.DeserializationStrategy r0 = (kotlinx.serialization.DeserializationStrategy) r0
            java.lang.Object r11 = r12.decodeFromString(r0, r11)
            return r11
        L83:
            java.lang.IllegalStateException r11 = new java.lang.IllegalStateException
            java.lang.String r12 = "No se encontró JSON válido en la respuesta"
            r11.<init>(r12)
            throw r11
        */
        throw new UnsupportedOperationException("Method not decompiled: com.sistemasolton.itranvias.home.data.repository.ITranviasRepositoryImpl.getInfoDef(java.lang.String, kotlin.coroutines.Continuation):java.lang.Object");
    }

    private final String buildDato(String language) {
        return "20250701T175122_" + language + "_3_20250728T104916";
    }

    /* JADX WARN: Removed duplicated region for block: B:7:0x0014  */
    @Override // com.sistemasolton.itranvias.home.domain.repository.ITranviasRepository
    /*
        Code decompiled incorrectly, please refer to instructions dump.
        To view partially-correct code enable 'Show inconsistent code' option in preferences
    */
    public java.lang.Object getLineDetail(java.lang.String r11, kotlin.coroutines.Continuation<? super com.sistemasolton.itranvias.home.data.remote.dto.detallelineadto.DetalleLineaDto> r12) throws java.lang.Throwable {
        /*
            r10 = this;
            boolean r0 = r12 instanceof com.sistemasolton.itranvias.home.data.repository.ITranviasRepositoryImpl.C06381
            if (r0 == 0) goto L14
            r0 = r12
            com.sistemasolton.itranvias.home.data.repository.ITranviasRepositoryImpl$getLineDetail$1 r0 = (com.sistemasolton.itranvias.home.data.repository.ITranviasRepositoryImpl.C06381) r0
            int r1 = r0.label
            r2 = -2147483648(0xffffffff80000000, float:-0.0)
            r1 = r1 & r2
            if (r1 == 0) goto L14
            int r12 = r0.label
            int r12 = r12 - r2
            r0.label = r12
            goto L19
        L14:
            com.sistemasolton.itranvias.home.data.repository.ITranviasRepositoryImpl$getLineDetail$1 r0 = new com.sistemasolton.itranvias.home.data.repository.ITranviasRepositoryImpl$getLineDetail$1
            r0.<init>(r12)
        L19:
            r6 = r0
            java.lang.Object r12 = r6.result
            java.lang.Object r0 = kotlin.coroutines.intrinsics.IntrinsicsKt.getCOROUTINE_SUSPENDED()
            int r1 = r6.label
            r9 = 1
            if (r1 == 0) goto L33
            if (r1 != r9) goto L2b
            kotlin.ResultKt.throwOnFailure(r12)
            goto L47
        L2b:
            java.lang.IllegalStateException r11 = new java.lang.IllegalStateException
            java.lang.String r12 = "call to 'resume' before 'invoke' with coroutine"
            r11.<init>(r12)
            throw r11
        L33:
            kotlin.ResultKt.throwOnFailure(r12)
            com.sistemasolton.itranvias.home.data.remote.ITranviasApi r1 = r10.api
            r6.label = r9
            r3 = 0
            r4 = 0
            r7 = 6
            r8 = 0
            r2 = r11
            java.lang.Object r12 = com.sistemasolton.itranvias.home.data.remote.ITranviasApi.DefaultImpls.getLineDetail$default(r1, r2, r3, r4, r6, r7, r8)
            if (r12 != r0) goto L47
            return r0
        L47:
            java.lang.String r12 = (java.lang.String) r12
            r11 = r12
            java.lang.CharSequence r11 = (java.lang.CharSequence) r11
            r4 = 6
            r5 = 0
            r1 = 123(0x7b, float:1.72E-43)
            r2 = 0
            r3 = 0
            r0 = r11
            int r6 = kotlin.text.StringsKt.indexOf$default(r0, r1, r2, r3, r4, r5)
            r1 = 125(0x7d, float:1.75E-43)
            int r11 = kotlin.text.StringsKt.lastIndexOf$default(r0, r1, r2, r3, r4, r5)
            r0 = -1
            if (r6 == r0) goto L80
            if (r11 == r0) goto L80
            if (r11 <= r6) goto L80
            int r11 = r11 + r9
            java.lang.String r11 = r12.substring(r6, r11)
            java.lang.String r12 = "substring(...)"
            kotlin.jvm.internal.Intrinsics.checkNotNullExpressionValue(r11, r12)
            kotlinx.serialization.json.Json r12 = r10.json
            r12.getSerializersModule()
            com.sistemasolton.itranvias.home.data.remote.dto.detallelineadto.DetalleLineaDto$Companion r0 = com.sistemasolton.itranvias.home.data.remote.dto.detallelineadto.DetalleLineaDto.INSTANCE
            kotlinx.serialization.KSerializer r0 = r0.serializer()
            kotlinx.serialization.DeserializationStrategy r0 = (kotlinx.serialization.DeserializationStrategy) r0
            java.lang.Object r11 = r12.decodeFromString(r0, r11)
            return r11
        L80:
            java.lang.IllegalStateException r11 = new java.lang.IllegalStateException
            java.lang.String r12 = "No se encontró JSON válido en la respuesta"
            r11.<init>(r12)
            throw r11
        */
        throw new UnsupportedOperationException("Method not decompiled: com.sistemasolton.itranvias.home.data.repository.ITranviasRepositoryImpl.getLineDetail(java.lang.String, kotlin.coroutines.Continuation):java.lang.Object");
    }

    /* JADX WARN: Removed duplicated region for block: B:7:0x0014  */
    @Override // com.sistemasolton.itranvias.home.domain.repository.ITranviasRepository
    /*
        Code decompiled incorrectly, please refer to instructions dump.
        To view partially-correct code enable 'Show inconsistent code' option in preferences
    */
    public java.lang.Object getStopDetail(java.lang.String r11, kotlin.coroutines.Continuation<? super com.sistemasolton.itranvias.home.data.remote.dto.detalleparadadto.DetalleParadaDto> r12) throws java.lang.Throwable {
        /*
            r10 = this;
            boolean r0 = r12 instanceof com.sistemasolton.itranvias.home.data.repository.ITranviasRepositoryImpl.C06421
            if (r0 == 0) goto L14
            r0 = r12
            com.sistemasolton.itranvias.home.data.repository.ITranviasRepositoryImpl$getStopDetail$1 r0 = (com.sistemasolton.itranvias.home.data.repository.ITranviasRepositoryImpl.C06421) r0
            int r1 = r0.label
            r2 = -2147483648(0xffffffff80000000, float:-0.0)
            r1 = r1 & r2
            if (r1 == 0) goto L14
            int r12 = r0.label
            int r12 = r12 - r2
            r0.label = r12
            goto L19
        L14:
            com.sistemasolton.itranvias.home.data.repository.ITranviasRepositoryImpl$getStopDetail$1 r0 = new com.sistemasolton.itranvias.home.data.repository.ITranviasRepositoryImpl$getStopDetail$1
            r0.<init>(r12)
        L19:
            r6 = r0
            java.lang.Object r12 = r6.result
            java.lang.Object r0 = kotlin.coroutines.intrinsics.IntrinsicsKt.getCOROUTINE_SUSPENDED()
            int r1 = r6.label
            r9 = 1
            if (r1 == 0) goto L33
            if (r1 != r9) goto L2b
            kotlin.ResultKt.throwOnFailure(r12)
            goto L47
        L2b:
            java.lang.IllegalStateException r11 = new java.lang.IllegalStateException
            java.lang.String r12 = "call to 'resume' before 'invoke' with coroutine"
            r11.<init>(r12)
            throw r11
        L33:
            kotlin.ResultKt.throwOnFailure(r12)
            com.sistemasolton.itranvias.home.data.remote.ITranviasApi r1 = r10.api
            r6.label = r9
            r3 = 0
            r4 = 0
            r7 = 6
            r8 = 0
            r2 = r11
            java.lang.Object r12 = com.sistemasolton.itranvias.home.data.remote.ITranviasApi.DefaultImpls.getStopDetail$default(r1, r2, r3, r4, r6, r7, r8)
            if (r12 != r0) goto L47
            return r0
        L47:
            java.lang.String r12 = (java.lang.String) r12
            r11 = r12
            java.lang.CharSequence r11 = (java.lang.CharSequence) r11
            r4 = 6
            r5 = 0
            r1 = 123(0x7b, float:1.72E-43)
            r2 = 0
            r3 = 0
            r0 = r11
            int r6 = kotlin.text.StringsKt.indexOf$default(r0, r1, r2, r3, r4, r5)
            r1 = 125(0x7d, float:1.75E-43)
            int r11 = kotlin.text.StringsKt.lastIndexOf$default(r0, r1, r2, r3, r4, r5)
            r0 = -1
            if (r6 == r0) goto L80
            if (r11 == r0) goto L80
            if (r11 <= r6) goto L80
            int r11 = r11 + r9
            java.lang.String r11 = r12.substring(r6, r11)
            java.lang.String r12 = "substring(...)"
            kotlin.jvm.internal.Intrinsics.checkNotNullExpressionValue(r11, r12)
            kotlinx.serialization.json.Json r12 = r10.json
            r12.getSerializersModule()
            com.sistemasolton.itranvias.home.data.remote.dto.detalleparadadto.DetalleParadaDto$Companion r0 = com.sistemasolton.itranvias.home.data.remote.dto.detalleparadadto.DetalleParadaDto.INSTANCE
            kotlinx.serialization.KSerializer r0 = r0.serializer()
            kotlinx.serialization.DeserializationStrategy r0 = (kotlinx.serialization.DeserializationStrategy) r0
            java.lang.Object r11 = r12.decodeFromString(r0, r11)
            return r11
        L80:
            java.lang.IllegalStateException r11 = new java.lang.IllegalStateException
            java.lang.String r12 = "No se encontró JSON válido en la respuesta"
            r11.<init>(r12)
            throw r11
        */
        throw new UnsupportedOperationException("Method not decompiled: com.sistemasolton.itranvias.home.data.repository.ITranviasRepositoryImpl.getStopDetail(java.lang.String, kotlin.coroutines.Continuation):java.lang.Object");
    }

    /* JADX WARN: Removed duplicated region for block: B:7:0x0014  */
    @Override // com.sistemasolton.itranvias.home.domain.repository.ITranviasRepository
    /*
        Code decompiled incorrectly, please refer to instructions dump.
        To view partially-correct code enable 'Show inconsistent code' option in preferences
    */
    public java.lang.Object getSchedule(java.lang.String r10, java.lang.String r11, kotlin.coroutines.Continuation<? super com.sistemasolton.itranvias.home.data.remote.dto.horariodto.HorarioDto> r12) throws java.lang.Throwable {
        /*
            r9 = this;
            boolean r0 = r12 instanceof com.sistemasolton.itranvias.home.data.repository.ITranviasRepositoryImpl.C06411
            if (r0 == 0) goto L14
            r0 = r12
            com.sistemasolton.itranvias.home.data.repository.ITranviasRepositoryImpl$getSchedule$1 r0 = (com.sistemasolton.itranvias.home.data.repository.ITranviasRepositoryImpl.C06411) r0
            int r1 = r0.label
            r2 = -2147483648(0xffffffff80000000, float:-0.0)
            r1 = r1 & r2
            if (r1 == 0) goto L14
            int r12 = r0.label
            int r12 = r12 - r2
            r0.label = r12
            goto L19
        L14:
            com.sistemasolton.itranvias.home.data.repository.ITranviasRepositoryImpl$getSchedule$1 r0 = new com.sistemasolton.itranvias.home.data.repository.ITranviasRepositoryImpl$getSchedule$1
            r0.<init>(r12)
        L19:
            r7 = r0
            java.lang.Object r12 = r7.result
            java.lang.Object r0 = kotlin.coroutines.intrinsics.IntrinsicsKt.getCOROUTINE_SUSPENDED()
            int r1 = r7.label
            r8 = 1
            if (r1 == 0) goto L33
            if (r1 != r8) goto L2b
            kotlin.ResultKt.throwOnFailure(r12)
            goto L4f
        L2b:
            java.lang.IllegalStateException r10 = new java.lang.IllegalStateException
            java.lang.String r11 = "call to 'resume' before 'invoke' with coroutine"
            r10.<init>(r11)
            throw r10
        L33:
            kotlin.ResultKt.throwOnFailure(r12)
            if (r11 != 0) goto L3c
            java.lang.String r11 = r9.getCurrentDateFormatted()
        L3c:
            r3 = r11
            com.sistemasolton.itranvias.home.data.remote.ITranviasApi r1 = r9.api
            long r5 = r9.getCurrentTimestamp()
            r7.label = r8
            r4 = 8
            r2 = r10
            java.lang.Object r12 = r1.getSchedule(r2, r3, r4, r5, r7)
            if (r12 != r0) goto L4f
            return r0
        L4f:
            java.lang.String r12 = (java.lang.String) r12
            r10 = r12
            java.lang.CharSequence r10 = (java.lang.CharSequence) r10
            r4 = 6
            r5 = 0
            r1 = 123(0x7b, float:1.72E-43)
            r2 = 0
            r3 = 0
            r0 = r10
            int r11 = kotlin.text.StringsKt.indexOf$default(r0, r1, r2, r3, r4, r5)
            r1 = 125(0x7d, float:1.75E-43)
            int r10 = kotlin.text.StringsKt.lastIndexOf$default(r0, r1, r2, r3, r4, r5)
            r0 = -1
            if (r11 == r0) goto L88
            if (r10 == r0) goto L88
            if (r10 <= r11) goto L88
            int r10 = r10 + r8
            java.lang.String r10 = r12.substring(r11, r10)
            java.lang.String r11 = "substring(...)"
            kotlin.jvm.internal.Intrinsics.checkNotNullExpressionValue(r10, r11)
            kotlinx.serialization.json.Json r11 = r9.json
            r11.getSerializersModule()
            com.sistemasolton.itranvias.home.data.remote.dto.horariodto.HorarioDto$Companion r12 = com.sistemasolton.itranvias.home.data.remote.dto.horariodto.HorarioDto.INSTANCE
            kotlinx.serialization.KSerializer r12 = r12.serializer()
            kotlinx.serialization.DeserializationStrategy r12 = (kotlinx.serialization.DeserializationStrategy) r12
            java.lang.Object r10 = r11.decodeFromString(r12, r10)
            return r10
        L88:
            java.lang.IllegalStateException r10 = new java.lang.IllegalStateException
            java.lang.String r11 = "No se encontró JSON válido en la respuesta"
            r10.<init>(r11)
            throw r10
        */
        throw new UnsupportedOperationException("Method not decompiled: com.sistemasolton.itranvias.home.data.repository.ITranviasRepositoryImpl.getSchedule(java.lang.String, java.lang.String, kotlin.coroutines.Continuation):java.lang.Object");
    }

    /* JADX WARN: Removed duplicated region for block: B:7:0x0014  */
    @Override // com.sistemasolton.itranvias.home.domain.repository.ITranviasRepository
    /*
        Code decompiled incorrectly, please refer to instructions dump.
        To view partially-correct code enable 'Show inconsistent code' option in preferences
    */
    public java.lang.Object getNearbyStops(double r9, double r11, kotlin.coroutines.Continuation<? super com.sistemasolton.itranvias.home.data.remote.dto.nearbystopdto.NearbyStopsDto> r13) throws java.lang.Throwable {
        /*
            r8 = this;
            boolean r0 = r13 instanceof com.sistemasolton.itranvias.home.data.repository.ITranviasRepositoryImpl.C06401
            if (r0 == 0) goto L14
            r0 = r13
            com.sistemasolton.itranvias.home.data.repository.ITranviasRepositoryImpl$getNearbyStops$1 r0 = (com.sistemasolton.itranvias.home.data.repository.ITranviasRepositoryImpl.C06401) r0
            int r1 = r0.label
            r2 = -2147483648(0xffffffff80000000, float:-0.0)
            r1 = r1 & r2
            if (r1 == 0) goto L14
            int r13 = r0.label
            int r13 = r13 - r2
            r0.label = r13
            goto L19
        L14:
            com.sistemasolton.itranvias.home.data.repository.ITranviasRepositoryImpl$getNearbyStops$1 r0 = new com.sistemasolton.itranvias.home.data.repository.ITranviasRepositoryImpl$getNearbyStops$1
            r0.<init>(r13)
        L19:
            r6 = r0
            java.lang.Object r13 = r6.result
            java.lang.Object r0 = kotlin.coroutines.intrinsics.IntrinsicsKt.getCOROUTINE_SUSPENDED()
            int r1 = r6.label
            r7 = 1
            if (r1 == 0) goto L33
            if (r1 != r7) goto L2b
            kotlin.ResultKt.throwOnFailure(r13)
            goto L4a
        L2b:
            java.lang.IllegalStateException r9 = new java.lang.IllegalStateException
            java.lang.String r10 = "call to 'resume' before 'invoke' with coroutine"
            r9.<init>(r10)
            throw r9
        L33:
            kotlin.ResultKt.throwOnFailure(r13)
            java.lang.String r2 = r8.buildNearbyDato(r9, r11)
            com.sistemasolton.itranvias.home.data.remote.ITranviasApi r1 = r8.api
            long r4 = r8.getCurrentTimestamp()
            r6.label = r7
            r3 = 3
            java.lang.Object r13 = r1.getNearbyStops(r2, r3, r4, r6)
            if (r13 != r0) goto L4a
            return r0
        L4a:
            java.lang.String r13 = (java.lang.String) r13
            r9 = r13
            java.lang.CharSequence r9 = (java.lang.CharSequence) r9
            r4 = 6
            r5 = 0
            r1 = 123(0x7b, float:1.72E-43)
            r2 = 0
            r3 = 0
            r0 = r9
            int r10 = kotlin.text.StringsKt.indexOf$default(r0, r1, r2, r3, r4, r5)
            r1 = 125(0x7d, float:1.75E-43)
            int r9 = kotlin.text.StringsKt.lastIndexOf$default(r0, r1, r2, r3, r4, r5)
            r11 = -1
            if (r10 == r11) goto L83
            if (r9 == r11) goto L83
            if (r9 <= r10) goto L83
            int r9 = r9 + r7
            java.lang.String r9 = r13.substring(r10, r9)
            java.lang.String r10 = "substring(...)"
            kotlin.jvm.internal.Intrinsics.checkNotNullExpressionValue(r9, r10)
            kotlinx.serialization.json.Json r10 = r8.json
            r10.getSerializersModule()
            com.sistemasolton.itranvias.home.data.remote.dto.nearbystopdto.NearbyStopsDto$Companion r11 = com.sistemasolton.itranvias.home.data.remote.dto.nearbystopdto.NearbyStopsDto.INSTANCE
            kotlinx.serialization.KSerializer r11 = r11.serializer()
            kotlinx.serialization.DeserializationStrategy r11 = (kotlinx.serialization.DeserializationStrategy) r11
            java.lang.Object r9 = r10.decodeFromString(r11, r9)
            return r9
        L83:
            java.lang.IllegalStateException r9 = new java.lang.IllegalStateException
            java.lang.String r10 = "No se encontró JSON válido en la respuesta"
            r9.<init>(r10)
            throw r9
        */
        throw new UnsupportedOperationException("Method not decompiled: com.sistemasolton.itranvias.home.data.repository.ITranviasRepositoryImpl.getNearbyStops(double, double, kotlin.coroutines.Continuation):java.lang.Object");
    }

    /* JADX WARN: Removed duplicated region for block: B:7:0x0014  */
    @Override // com.sistemasolton.itranvias.home.domain.repository.ITranviasRepository
    /*
        Code decompiled incorrectly, please refer to instructions dump.
        To view partially-correct code enable 'Show inconsistent code' option in preferences
    */
    public java.lang.Object getLineMap(java.lang.String r12, kotlin.coroutines.Continuation<? super com.sistemasolton.itranvias.home.data.remote.dto.mapasdto.MapasDto> r13) throws java.lang.Throwable {
        /*
            r11 = this;
            boolean r0 = r13 instanceof com.sistemasolton.itranvias.home.data.repository.ITranviasRepositoryImpl.C06391
            if (r0 == 0) goto L14
            r0 = r13
            com.sistemasolton.itranvias.home.data.repository.ITranviasRepositoryImpl$getLineMap$1 r0 = (com.sistemasolton.itranvias.home.data.repository.ITranviasRepositoryImpl.C06391) r0
            int r1 = r0.label
            r2 = -2147483648(0xffffffff80000000, float:-0.0)
            r1 = r1 & r2
            if (r1 == 0) goto L14
            int r13 = r0.label
            int r13 = r13 - r2
            r0.label = r13
            goto L19
        L14:
            com.sistemasolton.itranvias.home.data.repository.ITranviasRepositoryImpl$getLineMap$1 r0 = new com.sistemasolton.itranvias.home.data.repository.ITranviasRepositoryImpl$getLineMap$1
            r0.<init>(r13)
        L19:
            r7 = r0
            java.lang.Object r13 = r7.result
            java.lang.Object r0 = kotlin.coroutines.intrinsics.IntrinsicsKt.getCOROUTINE_SUSPENDED()
            int r1 = r7.label
            r10 = 1
            if (r1 == 0) goto L33
            if (r1 != r10) goto L2b
            kotlin.ResultKt.throwOnFailure(r13)
            goto L49
        L2b:
            java.lang.IllegalStateException r12 = new java.lang.IllegalStateException
            java.lang.String r13 = "call to 'resume' before 'invoke' with coroutine"
            r12.<init>(r13)
            throw r12
        L33:
            kotlin.ResultKt.throwOnFailure(r13)
            com.sistemasolton.itranvias.home.data.remote.ITranviasApi r1 = r11.api
            r7.label = r10
            r3 = 0
            r4 = 0
            r5 = 0
            r8 = 14
            r9 = 0
            r2 = r12
            java.lang.Object r13 = com.sistemasolton.itranvias.home.data.remote.ITranviasApi.DefaultImpls.getLineMap$default(r1, r2, r3, r4, r5, r7, r8, r9)
            if (r13 != r0) goto L49
            return r0
        L49:
            java.lang.String r13 = (java.lang.String) r13
            r12 = r13
            java.lang.CharSequence r12 = (java.lang.CharSequence) r12
            r4 = 6
            r5 = 0
            r1 = 123(0x7b, float:1.72E-43)
            r2 = 0
            r3 = 0
            r0 = r12
            int r6 = kotlin.text.StringsKt.indexOf$default(r0, r1, r2, r3, r4, r5)
            r1 = 125(0x7d, float:1.75E-43)
            int r12 = kotlin.text.StringsKt.lastIndexOf$default(r0, r1, r2, r3, r4, r5)
            r0 = -1
            if (r6 == r0) goto L82
            if (r12 == r0) goto L82
            if (r12 <= r6) goto L82
            int r12 = r12 + r10
            java.lang.String r12 = r13.substring(r6, r12)
            java.lang.String r13 = "substring(...)"
            kotlin.jvm.internal.Intrinsics.checkNotNullExpressionValue(r12, r13)
            kotlinx.serialization.json.Json r13 = r11.json
            r13.getSerializersModule()
            com.sistemasolton.itranvias.home.data.remote.dto.mapasdto.MapasDto$Companion r0 = com.sistemasolton.itranvias.home.data.remote.dto.mapasdto.MapasDto.INSTANCE
            kotlinx.serialization.KSerializer r0 = r0.serializer()
            kotlinx.serialization.DeserializationStrategy r0 = (kotlinx.serialization.DeserializationStrategy) r0
            java.lang.Object r12 = r13.decodeFromString(r0, r12)
            return r12
        L82:
            java.lang.IllegalStateException r12 = new java.lang.IllegalStateException
            java.lang.String r13 = "No se encontró JSON válido en la respuesta"
            r12.<init>(r13)
            throw r12
        */
        throw new UnsupportedOperationException("Method not decompiled: com.sistemasolton.itranvias.home.data.repository.ITranviasRepositoryImpl.getLineMap(java.lang.String, kotlin.coroutines.Continuation):java.lang.Object");
    }

    /* JADX WARN: Removed duplicated region for block: B:7:0x0014  */
    @Override // com.sistemasolton.itranvias.home.domain.repository.ITranviasRepository
    /*
        Code decompiled incorrectly, please refer to instructions dump.
        To view partially-correct code enable 'Show inconsistent code' option in preferences
    */
    public java.lang.Object checkMasterVersion(java.lang.String r11, java.lang.String r12, java.lang.String r13, java.lang.String r14, kotlin.coroutines.Continuation<? super com.sistemasolton.itranvias.home.data.remote.dto.infodto.InfoDto> r15) throws java.lang.Throwable {
        /*
            Method dump skipped, instruction units count: 230
            To view this dump change 'Code comments level' option to 'DEBUG'
        */
        throw new UnsupportedOperationException("Method not decompiled: com.sistemasolton.itranvias.home.data.repository.ITranviasRepositoryImpl.checkMasterVersion(java.lang.String, java.lang.String, java.lang.String, java.lang.String, kotlin.coroutines.Continuation):java.lang.Object");
    }

    private final String buildNearbyDato(double lat, double lon) {
        return lat + "_" + lon + "_5000_5";
    }

    private final String getCurrentDateFormatted() {
        LocalDate date = TimeZoneKt.toLocalDateTime(Clock.System.INSTANCE.now(), TimeZone.INSTANCE.currentSystemDefault()).getDate();
        return String.valueOf(date.getYear()) + StringsKt.padStart(String.valueOf(date.getMonthNumber()), 2, '0') + StringsKt.padStart(String.valueOf(date.getDayOfMonth()), 2, '0');
    }

    private final long getCurrentTimestamp() {
        return Clock.System.INSTANCE.now().toEpochMilliseconds();
    }
}