<div class="modal" tabindex="-1">

    <div class="modal-dialog" style='width: 1000px'>
        <div class="modal-content">
            <div class="modal-header">
                <h5 class="modal-title text-primary">Informe EP15 para
                    <strong class="text-uppercase"><?php echo e(strtolower($analitoEP15->nom_analito)); ?></strong>
                </h5>
                <button class="btnEvent close" data-event='click' data-route='CancelModal'>
                    <span aria-hidden="true">&times;</span>
                </button>
            </div>

            <div class="modal-body">
                <div class="text-center">
                    <?php if(Auth::user()->rol_id_rol != 5): ?>
                        <img width="50%" src="<?php echo e($cliente->imagen_cliente); ?>">
                    <?php endif; ?>
                    <h5 class="pt-2"><strong> Proyecto V2M-EP15-<?php echo e($analitoEP15->id_proyecto_ep15); ?> </strong></h5>
                </div>
                <div class="text-right">
                    <form class='formEvent' data-event='submit' data-route='ExportReportEP15'
                          data-reference='<?php echo e($analitoEP15->id_encrypt_analito_ep15); ?>'>
                        <a target="_blank"
                           href='/GenerateInformeFinalEP15?id_reference=<?php echo e($analitoEP15->id_encrypt_analito_ep15); ?>'
                           class="btn btn-danger btn-sm btn-icon-split mb-3">
                            <span class="icon text-dark-100">
                                <i class="fas fa-file-pdf"></i>
                            </span>
                            <span class="text">Exportar</span>
                        </a>
                    </form>
                </div>

                <input type="hidden" id='id_analito_ep15'
                       value="<?php echo e($analitoEP15->id_encrypt_analito_ep15); ?>">

                <div class="cont-informe-ep15">
                    <div class=" p-3 border bg-light" id="myTabContent">

                        <?php for($nivel=1; $nivel<=$analitoEP15->num_niveles; $nivel++): ?>
                            <?php
                                $nivel_bd_gl;
                                foreach($niveles as $nivel_bd){
                                    if($nivel_bd->nivel == $nivel){
                                        $nivel_bd_gl = $nivel_bd;
                                    }
                                }
                            ?>

                            <div class="text-center show consolidado_nivel fade
                                " id="modulo_nivel_<?php echo e($nivel); ?>" role="tabpanel"
                                 aria-labelledby="nivel-<?php echo e($nivel); ?>-tab">

                                <!-- Titulo del nivel del analito -->
                                <h2 class='titulo-nivel'>Nivel <?php echo e($nivel); ?></h2>
                                <h2 class='titulo-analito'><?php echo e($analitoEP15->nom_analito); ?></h2>

                                <!-- Contenido del nivel del analito -->
                                <h1 class='encabezado_titulos'>I. información general</h1>
                                <div class="contenido_ep15">
                                    <table class='table table-sm table-borderless m-0'>
                                        <tr class='font-weight-bold'>
                                            <td style='width:25%;'>Sistema de medición</td>
                                            <td style='width:25%;'>Lote de reactivos</td>
                                            <td style='width:25%;'>Lote de calibrador</td>
                                            <td style='width:25%;'>Material utilizado</td>
                                        </tr>
                                        <tr>
                                            <td><?php echo e($analitoEP15->nom_analizador); ?></td>
                                            <td><?php echo e($analitoEP15->lote_reactivo); ?></td>
                                            <td><?php echo e($analitoEP15->lote_calibrador); ?></td>
                                            <td><?php echo e($analitoEP15->material_utilizado); ?></td>
                                        </tr>
                                        <tr class='font-weight-bold'>
                                            <td>Limite Aps%</td>
                                            <td>Número de datos N</td>
                                            <td>Sigma <sub>R</sub></td>
                                            <td>Sigma <sub>WL</sub></td>
                                        </tr>
                                        <tr>
                                            <td><?php echo e(number_format(round($analitoEP15->etmp,2), 2)); ?></td>
                                            <td><?php echo e($obj_json[$nivel]["corridas"]["general"]["n_datos"]); ?></td>
                                            <td><?php echo e(round($obj_json[$nivel]["sigma_r"],2)); ?></td>
                                            <td><?php echo e(round($obj_json[$nivel]["sigma_wl"],2)); ?></td>
                                        </tr>
                                    </table>
                                </div>

                                <h1 class='encabezado_titulos'>II. Límite de Grubbs</h1>
                                <div class="contenido_ep15">
                                    <table class='table table-sm table-borderless m-0'>
                                        <tr class='font-weight-bold'>
                                            <td style='width:25%;'>
                                                <img style="width: 30%;" src="/img/formulas/limite_grubbs.png"
                                                     alt="Diagrama de flujo"></td>
                                        </tr>
                                        <tr>
                                            <td>
                                                <div style="display: flex; flex-direction: row; justify-content: center;
                                                    gap: 3rem">
                                                    <div style="display: flex; flex-direction: column">
                                                        <span>
                                                            <strong>Límite inferior de grubbs: </strong>+<?php echo e(round($obj_json[$nivel]["corridas"]["general"]["gran_media"],2)); ?> - ( <?php echo e($obj_json[$nivel]["corridas"]["general"]["factor_grubbs"]); ?> + <?php echo e(round($obj_json[$nivel]["corridas"]["general"]["gran_de"],2)); ?> )
                                                        </span>
                                                        <span>
                                                            <strong>Límite inferior de grubbs: </strong><?php echo e(round($obj_json[$nivel]["corridas"]["general"]["limite_inferior_grubbs"],2)); ?>

                                                        </span>
                                                    </div>
                                                    <div style="display: flex; flex-direction: column">
                                                        <span>
                                                            <strong>Límite superior de grubbs: </strong>+<?php echo e(round($obj_json[$nivel]["corridas"]["general"]["gran_media"],2)); ?> - ( <?php echo e($obj_json[$nivel]["corridas"]["general"]["factor_grubbs"]); ?> + <?php echo e(round($obj_json[$nivel]["corridas"]["general"]["gran_de"],2)); ?> )
                                                        </span>
                                                        <span>
                                                            <strong>Límite superior de grubbs: </strong><?php echo e(round($obj_json[$nivel]["corridas"]["general"]["limite_superior_grubbs"],2)); ?>

                                                        </span>
                                                    </div>
                                                </div>
                                            </td>
                                        </tr>
                                    </table>
                                </div>

                                <h1 class='encabezado_titulos'>III. Diagrama de flujo S<sub>R</sub> y S<sub>WL</sub>
                                </h1>
                                <div class="contenido_ep15">
                                    <div class="row">
                                        <div class="col-12">
                                            <div class="cont-diagrama-flujo">
                                                <?php
                                                    $image = "vv";
                                                    $rsr1 = round($obj_json[$nivel]["corridas"]["general"]["sr"],2);
                                                    $rsr2 = round($obj_json[$nivel]["sigma_r"],2);
                                                    $lswl1 = round($obj_json[$nivel]["corridas"]["general"]["swl"],2);
                                                    $lswl2 = round($obj_json[$nivel]["sigma_wl"],2);
                                                    if($rsr1 > $rsr2 && $lswl1 > $lswl2){
                                                        $image = "rr";
                                                    }elseif($rsr1 > $rsr2 && $lswl1 <= $lswl2){
                                                        $image = "rv";
                                                    }elseif($rsr1 <= $rsr2 && $lswl1 > $lswl2){
                                                        $image = "vr";
                                                    }
                                                ?>
                                                <img src="img/diagrama_flujo/<?php echo e($image); ?>.png" alt="Diagrama de flujo">
                                                <span
                                                    class="span-estadistico p1"><?php echo e($rsr1); ?></span>
                                                <span
                                                    class="span-estadistico p2"><?php echo e($rsr2); ?></span>
                                                <span
                                                    class="span-estadistico p3"><?php echo e($lswl1); ?></span>
                                                <span
                                                    class="span-estadistico p4"><?php echo e($lswl2); ?></span>
                                                <span class="span-estadistico p5">(<?php echo e(round($obj_json[$nivel]["corridas"]["general"]["ms2"],3)); ?>)^(1÷2)</span>
                                                <span class="span-estadistico p6" style='font-size:0.45rem;'>(<?php echo e(round($obj_json[$nivel]["corridas"]["general"]["ms2"],3)); ?> + <?php echo e(round($obj_json[$nivel]["corridas"]["general"]["vb"],3)); ?>)^(1÷2)</span>
                                                <span
                                                    class="span-estadistico p7"><?php echo e(round($obj_json[$nivel]["corridas"]["general"]["ms2"],3)); ?></span>
                                                <span
                                                    class="span-estadistico p8"><?php echo e(round($obj_json[$nivel]["corridas"]["general"]["vb"],3)); ?></span>
                                                <span class="span-estadistico p9"><?php echo e(round($obj_json[$nivel]["corridas"]["general"]["ss2"],3)); ?> ÷ <?php echo e(round($obj_json[$nivel]["corridas"]["general"]["df2"],3)); ?></span>
                                                <span class="span-estadistico p10"><?php echo e(round($obj_json[$nivel]["corridas"]["general"]["ss1"],3)); ?> ÷ <?php echo e(round($obj_json[$nivel]["corridas"]["general"]["df1"],3)); ?></span>
                                                <span class="span-estadistico p11"><?php echo e(round($obj_json[$nivel]["corridas"]["general"]["ss_total"],3)); ?> - <?php echo e(round($obj_json[$nivel]["corridas"]["general"]["ss1"],3)); ?></span>
                                                <span class="span-estadistico p12"><?php echo e($obj_json[$nivel]["corridas"]["general"]["n_datos"]); ?> - <?php echo e($obj_json[$nivel]["corridas"]["general"]["df1"] + 1); ?></span>
                                                <span class="span-estadistico p13"><?php echo e($obj_json[$nivel]["corridas"]["general"]["df1"] + 1); ?> x <?php echo e(round($obj_json[$nivel]["corridas"]["general"]["ss1"] / ($obj_json[$nivel]["corridas"]["general"]["df1"] + 1),3)); ?></span>
                                                <span class="span-estadistico p14"><?php echo e($obj_json[$nivel]["corridas"]["general"]["df1"] + 1); ?> - 1</span>
                                            </div>


                                        </div>
                                    </div>
                                </div>

                                <h1 class='encabezado_titulos'>IV. Límite de verificación superior UVL (Upper
                                    Verification Limit)</h1>
                                <div class="contenido_ep15">
                                    <table class='table table-sm table-borderless m-0'>
                                        <tr>
                                            <td style="width: 33.33%;"><strong>df<sub>R</sub> Repetibilidad:
                                                </strong><?php echo e(round($obj_json[$nivel]["corridas"]["general"]["df_r"],2)); ?>

                                            </td>
                                            <td style="width: 33.33%;"><strong>Factor UVL<sub>R</sub>:
                                                </strong> <?php echo e(number_format(round($obj_json[$nivel]["corridas"]["general"]["factor_uvl_r"],4), 4)); ?>

                                            </td>
                                            <td style="width: 33.33%;"><strong>UVL
                                                    Repetibilidad: </strong> <?php echo e(number_format(round($obj_json[$nivel]["corridas"]["general"]["uvl_repetibilidad"],4), 4)); ?>

                                            </td>
                                        </tr>
                                        <tr>
                                            <td><strong>df<sub>WL</sub> Imprecisión intra-laboratorio:
                                                </strong><?php echo e(round($obj_json[$nivel]["corridas"]["general"]["df_wl"],2)); ?>

                                                (p = <?php echo e(round($obj_json[$nivel]["corridas"]["general"]["p"],2)); ?>)
                                            </td>
                                            <td><strong>Factor UVL<sub>WL</sub>:
                                                </strong> <?php echo e(number_format(round($obj_json[$nivel]["corridas"]["general"]["factor_uvl_wl"],4), 4)); ?>

                                            </td>
                                            <td><strong>UVL
                                                    intra-laboratorio: </strong> <?php echo e(number_format(round($obj_json[$nivel]["corridas"]["general"]["uvl_intra_laboratorio"],4), 4)); ?>

                                            </td>
                                        </tr>
                                    </table>
                                    <div class="flex-row justify-content-center align-content-center d-flex text-xs pt-4" style="gap: .3rem">
                                                <?php if(round($obj_json[$nivel]["corridas"]["general"]["sr"], 2) <= round($obj_json[$nivel]["corridas"]["general"]["uvl_repetibilidad"], 2)): ?>
                                                    <span style="padding: .3rem; margin-right: .1rem;  background: #f0fff0;">La declaración de repetibilidad  HA sido verificada por el laboratorio</span>
                                                <?php else: ?>
                                                    <span style="padding: .3rem; margin-right: .1rem; background: #fff5ee">La declaración de repetibilidad NO ha sido verificada por el laboratorio</span>
                                                <?php endif; ?>

                                                <?php if(round($obj_json[$nivel]["corridas"]["general"]["swl"], 2) <= round($obj_json[$nivel]["corridas"]["general"]["uvl_intra_laboratorio"], 2)): ?>
                                                    <span style="padding: .3rem; margin-left: 1rem; background: #f0fff0;">La declaración de imprecisión HA sido verificada por el laboratorio</span>
                                                <?php else: ?>
                                                    <span style="padding: .3rem; margin-left: 1rem; background: #fff5ee">La declaración de imprecisión NO ha sido verificada por el laboratorio</span>
                                                <?php endif; ?>
                                            </div>
                                            <!-- revision cambios -->
                                </div>


                                <h1 class='encabezado_titulos'>V. Gráfica integrada de control de calidad</h1>
                                <div class="contenido_ep15">
                                    <div id='grafica_ep15_<?php echo e($nivel); ?>' style='width: 900px; height: 300px;'></div>
                                </div>


                                <h1 class='encabezado_titulos'>VI. Recolección de información</h1>
                                <div class="contenido_ep15">
                                    <table class='table table-sm shadow-sm table-bordered'>
                                        <tr class='font-weight-bold table-secondary'>
                                            <td>Corrida</td>
                                            <td>Fecha</td>
                                            <td>R1</td>
                                            <td>R2</td>
                                            <td>R3</td>
                                            <td>R4</td>
                                            <td>R5</td>
                                            <td>Promedio</td>
                                            <td>D.E.</td>
                                        </tr>

                                        <?php for($x=1; $x<sizeof($obj_json[$nivel]["corridas"]); $x++): ?>
                                            <tr>
                                                <td><?php echo e($x); ?></td>
                                                <td><?php echo e($obj_json[$nivel]["corridas"][$x]["fecha"]); ?></td>
                                                <td style="<?php if(
                                                                $obj_json[$nivel]['corridas']['general']['limite_inferior_grubbs'] > $obj_json[$nivel]['corridas'][$x]['concentracion_1'] ||
                                                                $obj_json[$nivel]['corridas']['general']['limite_superior_grubbs'] < $obj_json[$nivel]['corridas'][$x]['concentracion_1']): ?>
                                                                    color: #bd0000 !important;  <?php endif; ?>">
                                                    <?php echo e((($obj_json[$nivel]["corridas"][$x]["concentracion_1"]) > 0.000002 ? round($obj_json[$nivel]["corridas"][$x]["concentracion_1"],2) : "N/A" )); ?></td>
                                                <td style="<?php if(
                                                                $obj_json[$nivel]['corridas']['general']['limite_inferior_grubbs'] > $obj_json[$nivel]['corridas'][$x]['concentracion_2'] ||
                                                                $obj_json[$nivel]['corridas']['general']['limite_superior_grubbs'] < $obj_json[$nivel]['corridas'][$x]['concentracion_2']): ?>
                                                                    color: #bd0000 !important;  <?php endif; ?>">
                                                    <?php echo e((($obj_json[$nivel]["corridas"][$x]["concentracion_2"]) > 0.000002 ? round($obj_json[$nivel]["corridas"][$x]["concentracion_2"],2) : "N/A" )); ?></td>
                                                <td style="<?php if(
                                                                $obj_json[$nivel]['corridas']['general']['limite_inferior_grubbs'] > $obj_json[$nivel]['corridas'][$x]['concentracion_3'] ||
                                                                $obj_json[$nivel]['corridas']['general']['limite_superior_grubbs'] < $obj_json[$nivel]['corridas'][$x]['concentracion_3']): ?>
                                                                    color: #bd0000 !important;  <?php endif; ?>">
                                                    <?php echo e((($obj_json[$nivel]["corridas"][$x]["concentracion_3"]) > 0.000002 ? round($obj_json[$nivel]["corridas"][$x]["concentracion_3"],2) : "N/A" )); ?></td>
                                                <td style="<?php if(
                                                                $obj_json[$nivel]['corridas']['general']['limite_inferior_grubbs'] > $obj_json[$nivel]['corridas'][$x]['concentracion_4'] ||
                                                                $obj_json[$nivel]['corridas']['general']['limite_superior_grubbs'] < $obj_json[$nivel]['corridas'][$x]['concentracion_4']): ?>
                                                                    color: #bd0000 !important;  <?php endif; ?>">
                                                    <?php echo e((($obj_json[$nivel]["corridas"][$x]["concentracion_4"]) > 0.000002 ? round($obj_json[$nivel]["corridas"][$x]["concentracion_4"],2) : "N/A" )); ?></td>
                                                <td style="<?php if(
                                                                $obj_json[$nivel]['corridas']['general']['limite_inferior_grubbs'] > $obj_json[$nivel]['corridas'][$x]['concentracion_5'] ||
                                                                $obj_json[$nivel]['corridas']['general']['limite_superior_grubbs'] < $obj_json[$nivel]['corridas'][$x]['concentracion_5']): ?>
                                                                    color: #bd0000 !important;  <?php endif; ?>">
                                                    <?php echo e((($obj_json[$nivel]["corridas"][$x]["concentracion_5"]) > 0.000002 ? round($obj_json[$nivel]["corridas"][$x]["concentracion_5"],2) : "N/A" )); ?></td>
                                                <td><?php echo e(round($obj_json[$nivel]["corridas"][$x]["promedio"],2)); ?></td>
                                                <td><?php echo e(round($obj_json[$nivel]["corridas"][$x]["de"],2)); ?></td>
                                            </tr>
                                        <?php endfor; ?>

                                        <tr>
                                            <td colspan='3' class='font-weight-bold'>Gran
                                                media: <?php echo e(round($obj_json[$nivel]["corridas"]["general"]["gran_media"],2)); ?></td>
                                            <td colspan='3' class='font-weight-bold'>
                                                D.E.: <?php echo e(round($obj_json[$nivel]["corridas"]["general"]["gran_de"],2)); ?></td>
                                            <td colspan='3' class='font-weight-bold'>
                                                C.V: <?php echo e(round($obj_json[$nivel]["corridas"]["general"]["gran_de"] * 100/$obj_json[$nivel]["corridas"]["general"]["gran_media"],2)); ?>

                                                %
                                            </td>
                                        </tr>
                                    </table>
                                </div>

                                <h1 class='encabezado_titulos'>VII. Verificación de la precisión</h1>
                                <div class="contenido_ep15 p-2">
                                    <div class="row">
                                        <div class="col-9">
                                            <table class='table table-sm shadow-sm table-bordered'>
                                                <tr class='font-weight-bold table-secondary'>
                                                    <td style='width: 15%'>Fórmula</td>
                                                    <td style='width: 14.1666%'>C1</td>
                                                    <td style='width: 14.1666%'>C2</td>
                                                    <td style='width: 14.1666%'>C3</td>
                                                    <td style='width: 14.1666%'>C4</td>
                                                    <td style='width: 14.1666%'>C5</td>
                                                </tr>
                                                <tr>
                                                    <td><img src="img/formulas_ep15/diferencia.png" width="50"
                                                             height="25" alt="Fórmula de diferencia"></td>
                                                    <td><?php echo e(round($obj_json[$nivel]["corridas"]["1"]["dia_menos_gran_media"],2)); ?></td>
                                                    <td><?php echo e(round($obj_json[$nivel]["corridas"]["2"]["dia_menos_gran_media"],2)); ?></td>
                                                    <td><?php echo e(round($obj_json[$nivel]["corridas"]["3"]["dia_menos_gran_media"],2)); ?></td>
                                                    <td><?php echo e(round($obj_json[$nivel]["corridas"]["4"]["dia_menos_gran_media"],2)); ?></td>
                                                    <td><?php echo e(round($obj_json[$nivel]["corridas"]["5"]["dia_menos_gran_media"],2)); ?></td>
                                                </tr>
                                                <tr>
                                                    <td><img src="img/formulas_ep15/diferencia_cuadrado.png" width="59"
                                                             height="25" class='ml-1'
                                                             alt="Fórmula de diferencias al cuadrado"></td>
                                                    <td><?php echo e(round($obj_json[$nivel]["corridas"]["1"]["dia_menos_gran_media_al_cuadrado"],2)); ?></td>
                                                    <td><?php echo e(round($obj_json[$nivel]["corridas"]["2"]["dia_menos_gran_media_al_cuadrado"],2)); ?></td>
                                                    <td><?php echo e(round($obj_json[$nivel]["corridas"]["3"]["dia_menos_gran_media_al_cuadrado"],2)); ?></td>
                                                    <td><?php echo e(round($obj_json[$nivel]["corridas"]["4"]["dia_menos_gran_media_al_cuadrado"],2)); ?></td>
                                                    <td><?php echo e(round($obj_json[$nivel]["corridas"]["5"]["dia_menos_gran_media_al_cuadrado"],2)); ?></td>
                                                </tr>
                                            </table>
                                        </div>
                                        <div class="col-3">
                                            <table class='table table-sm shadow-sm table-bordered'>
                                                <tr class='font-weight-bold'>
                                                    <td colspan='2' class="table-secondary">SS1</td>
                                                </tr>
                                                <tr>
                                                    <td><img src="img/formulas_ep15/ss1.png" width="90" height="60"
                                                             alt="Fórmula de diferencias al cuadrado"></td>
                                                    <td><?php echo e(round($obj_json[$nivel]["corridas"]["general"]["ss1"],2)); ?></td>
                                                </tr>
                                            </table>
                                        </div>
                                    </div>


                                    <div class="row">
                                        <div class="col-9 text-center">
                                            <strong>Diferencia de las medias al cuadrado</strong>
                                        </div>
                                    </div>


                                    <div class="row">
                                        <div class="col-9">
                                            <table class='table table-sm shadow-sm table-bordered'>
                                                <tr class='font-weight-bold table-secondary'>
                                                    <td style='width: 15%'>Corrida</td>
                                                    <td style='width: 14.1666%'>R1</td>
                                                    <td style='width: 14.1666%'>R2</td>
                                                    <td style='width: 14.1666%'>R3</td>
                                                    <td style='width: 14.1666%'>R4</td>
                                                    <td style='width: 14.1666%'>R5</td>
                                                </tr>
                                                <?php for($x=1; $x<sizeof($obj_json[$nivel]["corridas"]); $x++): ?>
                                                    <tr>
                                                        <td style='width: 15%'>C<?php echo e($x); ?></td>
                                                        <td style='width: 14.1666%'><?php echo e(($obj_json[$nivel]["corridas"][$x]["concentracion_1"] == null) ? "N/A" : round($obj_json[$nivel]["corridas"][$x]["concentracion_1_menos_dia_al_2"],2)); ?></td>
                                                        <td style='width: 14.1666%'><?php echo e(($obj_json[$nivel]["corridas"][$x]["concentracion_2"] == null) ? "N/A" : round($obj_json[$nivel]["corridas"][$x]["concentracion_2_menos_dia_al_2"],2)); ?></td>
                                                        <td style='width: 14.1666%'><?php echo e(($obj_json[$nivel]["corridas"][$x]["concentracion_3"] == null) ? "N/A" : round($obj_json[$nivel]["corridas"][$x]["concentracion_3_menos_dia_al_2"],2)); ?></td>
                                                        <td style='width: 14.1666%'><?php echo e(($obj_json[$nivel]["corridas"][$x]["concentracion_4"] == null) ? "N/A" : round($obj_json[$nivel]["corridas"][$x]["concentracion_4_menos_dia_al_2"],2)); ?></td>
                                                        <td style='width: 14.1666%'><?php echo e(($obj_json[$nivel]["corridas"][$x]["concentracion_5"] == null) ? "N/A" : round($obj_json[$nivel]["corridas"][$x]["concentracion_5_menos_dia_al_2"],2)); ?></td>
                                                    </tr>
                                                <?php endfor; ?>
                                            </table>
                                        </div>
                                        <div class="col-3">
                                            <table class='table table-sm shadow-sm table-bordered'>
                                                <tr class='font-weight-bold'>
                                                    <td colspan='2' class="table-secondary">SS2</td>
                                                </tr>
                                                <tr>
                                                    <td><img src="img/formulas_ep15/ss2.png" width="100" height="60"
                                                             alt="Fórmula de diferencias al cuadrado"></td>
                                                    <td><?php echo e(round($obj_json[$nivel]["corridas"]["general"]["ss2"],2)); ?></td>
                                                </tr>
                                            </table>
                                        </div>
                                    </div>

                                    <div class="row px-3">
                                        <div class="col-2 border">
                                            <div class="cont-img">
                                                <img src="img/formulas_ep15/df1.png" alt="Fórmula DF1" width="100"
                                                     height="22" class='my-2'>
                                            </div>
                                            <div
                                                class="badge badge-light small border border-secondary"><?php echo e(round($obj_json[$nivel]["corridas"]["general"]["df1"],2)); ?></div>
                                        </div>
                                        <div class="col-2 border">
                                            <div class="cont-img">
                                                <img src="img/formulas_ep15/df2.png" alt="Fórmula DF2" width="110"
                                                     height="24" class="mt-2 mb-1">
                                            </div>
                                            <div
                                                class="badge badge-light small border border-secondary"><?php echo e(round($obj_json[$nivel]["corridas"]["general"]["df2"],2)); ?></div>
                                        </div>
                                        <div class="col-2 border">
                                            <div class="cont-img">
                                                <img src="img/formulas_ep15/ms1.png" alt="Fórmula MS1" width="130"
                                                     height="20" class="mt-2 mb-1">
                                            </div>
                                            <div
                                                class="badge badge-light small border border-secondary"><?php echo e(round($obj_json[$nivel]["corridas"]["general"]["ms1"],2)); ?></div>
                                        </div>
                                        <div class="col-2 border">
                                            <div class="cont-img">
                                                <img src="img/formulas_ep15/ms2.png" alt="Fórmula MS2" width="114"
                                                     height="22" class="mt-2">
                                                <img src="img/formulas_ep15/ms2-2.png" alt="Fórmula MS2 complementación"
                                                     width="38" height="25">
                                            </div>
                                            <div
                                                class="badge badge-light small border border-secondary"><?php echo e(round($obj_json[$nivel]["corridas"]["general"]["ms2"],2)); ?></div>
                                        </div>
                                        <div class="col-2 border">
                                            <div class="cont-img">
                                                <img src="img/formulas_ep15/n0.png" alt="Fórmula N sub cero" width="28"
                                                     height="28" class="mt-2">
                                            </div>
                                            <div
                                                class="badge badge-light small border border-secondary"><?php echo e(round($obj_json[$nivel]["corridas"]["general"]["n0"],2)); ?></div>
                                        </div>
                                        <div class="col-2 border">
                                            <div class="cont-img">
                                                <img src="img/formulas_ep15/vb.png" alt="Fórmula VB" width="130"
                                                     height="24" class="mt-2">
                                            </div>
                                            <div
                                                class="badge badge-light small border border-secondary"><?php echo e(round($obj_json[$nivel]["corridas"]["general"]["vb"],2)); ?></div>
                                        </div>
                                    </div>

                                    <div class="row">
                                        <div class="col-3"></div>
                                        <div class="col-6">
                                            <table class="table w-100 table-borderless mt-2 mb-0">
                                                <tr>
                                                    <td style='width: 35%;'><img src="img/formulas_ep15/sr.png"
                                                                                 alt="Fórmula SR" width="110"
                                                                                 height="40"></td>
                                                    <?php if($obj_json[$nivel]["corridas"]["general"]["sr"] <= $obj_json[$nivel]["sigma_r"]): ?>
                                                        <td style='width: 15%; background-color: #F2F8EE;'
                                                            class='font-weight-bold'>
                                                    <?php else: ?>
                                                        <td style='width: 15%; background-color: #FDF3ED;'
                                                            class='font-weight-bold'>
                                                            <?php endif; ?>
                                                            <?php echo e(round($obj_json[$nivel]["corridas"]["general"]["sr"],2)); ?>

                                                        </td>
                                                        <td style='width: 35%;'><img src="img/formulas_ep15/swl.png"
                                                                                     alt="Fórmula SWL" width="130"
                                                                                     height="36"></td>
                                                        <?php if($obj_json[$nivel]["corridas"]["general"]["swl"] <= $obj_json[$nivel]["sigma_wl"]): ?>
                                                            <td style='width: 15%; background-color: #F2F8EE;'
                                                                class='font-weight-bold'>
                                                        <?php else: ?>
                                                            <td style='width: 15%; background-color: #FDF3ED;'
                                                                class='font-weight-bold'>
                                                                <?php endif; ?>
                                                                <?php echo e(round($obj_json[$nivel]["corridas"]["general"]["swl"],2)); ?>

                                                            </td>
                                                </tr>
                                            </table>
                                        </div>
                                        <div class="col-3"></div>
                                    </div>
                                </div>


                                <h1 class='encabezado_titulos'>VIII. Estimación del sesgo</h1>
                                <div class="contenido_ep15 mb-5">
                                    <div class="row px-2">
                                        <div class="col-12 border shadow-sm p-2">
                                            <h6 class="text-left font-weight-bold">INSERTO</h6>
                                            <p class="text-left">Media <span
                                                    class="badge badge-light px-2 py-1 border border-secondary mx-2"><?php echo e(round($obj_json[$nivel]["media_inserto"],2)); ?></span>
                                                D.E. <span
                                                    class="badge badge-light px-2 py-1 border border-secondary mx-2"><?php echo e(round($obj_json[$nivel]["de_inserto"],2)); ?></span>
                                                U <span
                                                    class="badge badge-light px-2 py-1 border border-secondary mx-2"><?php echo e(round($obj_json[$nivel]["u_incertidumbre"],2)); ?></span>
                                                k <span
                                                    class="badge badge-light px-2 py-1 border border-secondary mx-2"><?php echo e(round($obj_json[$nivel]["k"],2)); ?></span>
                                            </p>
                                            <div class="row px-2">
                                                <div class="col-4 p-0 border">
                                                    <div><img src="img/formulas_ep15/sex.png" width="220" height="50"
                                                              class="my-2"></div>
                                                    <div>
                                                        <div
                                                            class="badge badge-light px-2 py-1 border border-secondary mx-2"><?php echo e(round($obj_json[$nivel]["corridas"]["general"]["se_x"],2)); ?></div>
                                                    </div>
                                                </div>
                                                <div class="col-4 p-0 border">
                                                    <div><img src="img/formulas_ep15/serm_2.png" width="120" height="50"
                                                              class="my-2"></div>
                                                    <div>
                                                        <div
                                                            class="badge badge-light px-2 py-1 border border-secondary mx-2"><?php echo e(round($obj_json[$nivel]["corridas"]["general"]["se_rm_inserto"],2)); ?></div>
                                                    </div>
                                                </div>
                                                <div class="col-4 p-0 border">
                                                    <div><img src="img/formulas_ep15/sec.png" width="150" height="50"
                                                              class="my-2"></div>
                                                    <div>
                                                        <div
                                                            class="badge badge-light px-2 py-1 border border-secondary mx-2"><?php echo e(round($obj_json[$nivel]["corridas"]["general"]["se_c_inserto"],2)); ?></div>
                                                    </div>
                                                </div>
                                            </div>
                                            <div class="row px-2">
                                                <div class="col-4 p-0 border">
                                                    <div><img src="img/formulas_ep15/dfx.png" width="130" height="30"
                                                              class="my-2"></div>
                                                    <div>
                                                        <div
                                                            class="badge badge-light px-2 py-1 border border-secondary mx-2"><?php echo e(round($obj_json[$nivel]["corridas"]["general"]["df_x"],2)); ?></div>
                                                    </div>
                                                </div>
                                                <div class="col-4 p-0 border">
                                                    <div><img src="img/formulas_ep15/dfc_2.png" width="140" height="30"
                                                              class="my-2"></div>
                                                    <div>
                                                        <div
                                                            class="badge badge-light px-2 py-1 border border-secondary mx-2"><?php echo e(round($obj_json[$nivel]["corridas"]["general"]["dfc_inserto"],2)); ?></div>
                                                    </div>
                                                </div>
                                                <div class="col-4 p-0 border">
                                                    <div><img src="img/formulas_ep15/m.png" width="130" height="25"
                                                              class="my-2"></div>
                                                    <div>
                                                        <div
                                                            class="badge badge-light px-2 py-1 border border-secondary mx-2"><?php echo e(round($obj_json[$nivel]["corridas"]["general"]["m_inserto"],2)); ?></div>
                                                    </div>
                                                </div>
                                            </div>
                                            <div class="text-center">
                                                <img src="img/formulas_ep15/vi.png" width="230" height="25"
                                                     class="my-2">
                                                <span class="badge badge-light px-2 py-1 border border-secondary mx-2"><?php echo e(round($obj_json[$nivel]["corridas"]["general"]["li_iv_inserto"],2)); ?> - <?php echo e(round($obj_json[$nivel]["corridas"]["general"]["ls_iv_inserto"],2)); ?></span>
                                            </div>

                                            <table class="table table-sm p-0 m-0 table-borderless mt-3 w-100">
                                                <tr>
                                                    <td>Sesgo de la prueba %</td>

                                                    <?php if($obj_json[$nivel]["corridas"]["general"]["sesgo_porcentaje_inserto"] <= $obj_json[$nivel]["smp_porcentaje"]): ?>
                                                        <td style="background-color: #F2F8EE;" class='font-weight-bold'>
                                                    <?php else: ?>
                                                        <td style="background-color: #FDF3ED;" class='font-weight-bold'>
                                                            <?php endif; ?>
                                                            <?php echo e(round($obj_json[$nivel]["corridas"]["general"]["sesgo_porcentaje_inserto"],2)); ?>

                                                            %
                                                        </td>


                                                        <td>Sesgo de la prueba UNID.</td>
                                                        <?php if($obj_json[$nivel]["corridas"]["general"]["sesgo_unidad_inserto"] <= $obj_json[$nivel]["smp_unidad"]): ?>
                                                            <td style="background-color: #F2F8EE;"
                                                                class='font-weight-bold'>
                                                        <?php else: ?>
                                                            <td style="background-color: #FDF3ED;"
                                                                class='font-weight-bold'>
                                                                <?php endif; ?>
                                                                <?php echo e(round($obj_json[$nivel]["corridas"]["general"]["sesgo_unidad_inserto"],2)); ?>

                                                            </td>

                                                </tr>
                                            </table>
                                        </div>

                                        <div class="col-12 border shadow-sm mt-2 p-2">
                                            <h6 class="text-left font-weight-bold">GRUPO PAR</h6>
                                            <p class="text-left">Media <span
                                                    class="badge badge-light px-2 py-1 border border-secondary mx-2"><?php echo e(round($obj_json[$nivel]["media_gpar"],2)); ?></span>
                                                D.E. <span
                                                    class="badge badge-light px-2 py-1 border border-secondary mx-2"><?php echo e(round($obj_json[$nivel]["de_gpar"],2)); ?></span>
                                                Nlab <span
                                                    class="badge badge-light px-2 py-1 border border-secondary mx-2"><?php echo e(round($obj_json[$nivel]["n_lab_gpar"],2)); ?></span>
                                            </p>
                                            <div class="row px-2">
                                                <div class="col-4 p-0 border">
                                                    <div><img src="img/formulas_ep15/sex.png" width="220" height="50"
                                                              class="my-2"></div>
                                                    <div>
                                                        <div
                                                            class="badge badge-light px-2 py-1 border border-secondary mx-2"><?php echo e(round($obj_json[$nivel]["corridas"]["general"]["se_x"],2)); ?></div>
                                                    </div>
                                                </div>
                                                <div class="col-4 p-0 border">
                                                    <div><img src="img/formulas_ep15/serm.png" width="120" height="50"
                                                              class="my-2"></div>
                                                    <div>
                                                        <div
                                                            class="badge badge-light px-2 py-1 border border-secondary mx-2"><?php echo e(round($obj_json[$nivel]["corridas"]["general"]["se_rm_gpar"],2)); ?></div>
                                                    </div>
                                                </div>
                                                <div class="col-4 p-0 border">
                                                    <div><img src="img/formulas_ep15/sec.png" width="150" height="50"
                                                              class="my-2"></div>
                                                    <div>
                                                        <div
                                                            class="badge badge-light px-2 py-1 border border-secondary mx-2"><?php echo e(round($obj_json[$nivel]["corridas"]["general"]["se_c_gpar"],2)); ?></div>
                                                    </div>
                                                </div>
                                            </div>
                                            <div class="row px-2">
                                                <div class="col-4 p-0 border">
                                                    <div><img src="img/formulas_ep15/tau.png" width="100" height="48"
                                                              class="my-2"></div>
                                                    <div>
                                                        <div
                                                            class="badge badge-light px-2 py-1 border border-secondary mx-2"><?php echo e(round($obj_json[$nivel]["corridas"]["general"]["calculo_tau"],2)); ?></div>
                                                    </div>
                                                </div>
                                                <div class="col-4 p-0 border">
                                                    <div><img src="img/formulas_ep15/dfc.png" width="35" height="30"
                                                              class="my-2"></div>
                                                    <div>
                                                        <div
                                                            class="badge badge-light px-2 py-1 border border-secondary mx-2"><?php echo e(round($obj_json[$nivel]["corridas"]["general"]["dfc_gpar"],2)); ?></div>
                                                    </div>
                                                </div>
                                                <div class="col-4 p-0 border">
                                                    <div><img src="img/formulas_ep15/m.png" width="130" height="25"
                                                              class="my-2"></div>
                                                    <div>
                                                        <div
                                                            class="badge badge-light px-2 py-1 border border-secondary mx-2"><?php echo e(round($obj_json[$nivel]["corridas"]["general"]["m_gpar"],2)); ?></div>
                                                    </div>
                                                </div>
                                            </div>
                                            <div class="text-center">
                                                <img src="img/formulas_ep15/vi.png" width="230" height="25"
                                                     class="my-2">
                                                <span class="badge badge-light px-2 py-1 border border-secondary mx-2"><?php echo e(round($obj_json[$nivel]["corridas"]["general"]["li_iv_gpar"],2)); ?> - <?php echo e(round($obj_json[$nivel]["corridas"]["general"]["ls_iv_gpar"],2)); ?></span>
                                            </div>

                                            <table class="table table-sm p-0 m-0 table-borderless mt-3 w-100">
                                                <tr>
                                                    <td>Sesgo de la prueba %</td>
                                                    <?php if($obj_json[$nivel]["corridas"]["general"]["sesgo_porcentaje_gpar"] <= $obj_json[$nivel]["smp_porcentaje"]): ?>
                                                        <td style="background-color: #F2F8EE;" class='font-weight-bold'>
                                                    <?php else: ?>
                                                        <td style="background-color: #FDF3ED;" class='font-weight-bold'>
                                                            <?php endif; ?>
                                                            <?php echo e(round($obj_json[$nivel]["corridas"]["general"]["sesgo_porcentaje_gpar"],2)); ?>

                                                            %
                                                        </td>

                                                        <td>Sesgo de la prueba UNID.</td>
                                                        <?php if($obj_json[$nivel]["corridas"]["general"]["sesgo_unidad_gpar"] <= $obj_json[$nivel]["smp_unidad"]): ?>
                                                            <td style="background-color: #F2F8EE;"
                                                                class='font-weight-bold'>
                                                        <?php else: ?>
                                                            <td style="background-color: #FDF3ED;"
                                                                class='font-weight-bold'>
                                                                <?php endif; ?>
                                                                <?php echo e(round($obj_json[$nivel]["corridas"]["general"]["sesgo_unidad_gpar"],2)); ?>

                                                            </td>
                                                </tr>
                                            </table>
                                        </div>
                                    </div>
                                </div>

                            </div>
                        <?php endfor; ?>
                    </div>
                </div>


                <form class="form-imgs-temp"></form>

            </div>

            <div class="modal-footer">
                <button type="button" class="btn btn-secondary" data-dismiss="modal">Cerrar informe</button>
            </div>

        </div>
    </div>
</div>
<?php /**PATH /Users/luisolaya/projects/front/laravel/v2m/resources/views/resultadoEP15/resultadoEP15InformeFinal.blade.php ENDPATH**/ ?>