Spaces:
Running
Running
undefined - Initial Deployment
Browse files- README.md +7 -5
- index.html +688 -19
README.md
CHANGED
|
@@ -1,10 +1,12 @@
|
|
| 1 |
---
|
| 2 |
-
title:
|
| 3 |
-
emoji:
|
| 4 |
-
colorFrom:
|
| 5 |
-
colorTo:
|
| 6 |
sdk: static
|
| 7 |
pinned: false
|
|
|
|
|
|
|
| 8 |
---
|
| 9 |
|
| 10 |
-
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
|
|
|
| 1 |
---
|
| 2 |
+
title: apps-redring
|
| 3 |
+
emoji: 🐳
|
| 4 |
+
colorFrom: gray
|
| 5 |
+
colorTo: red
|
| 6 |
sdk: static
|
| 7 |
pinned: false
|
| 8 |
+
tags:
|
| 9 |
+
- deepsite
|
| 10 |
---
|
| 11 |
|
| 12 |
+
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
index.html
CHANGED
|
@@ -1,19 +1,688 @@
|
|
| 1 |
-
<!
|
| 2 |
-
<html>
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<!DOCTYPE html>
|
| 2 |
+
<html lang="es">
|
| 3 |
+
<head>
|
| 4 |
+
<meta charset="UTF-8">
|
| 5 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 6 |
+
<title>Cotizador REDRING</title>
|
| 7 |
+
<script src="https://cdn.tailwindcss.com"></script>
|
| 8 |
+
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
|
| 9 |
+
<style>
|
| 10 |
+
.gradient-bg {
|
| 11 |
+
background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 100%);
|
| 12 |
+
}
|
| 13 |
+
.service-card {
|
| 14 |
+
transition: all 0.3s ease;
|
| 15 |
+
}
|
| 16 |
+
.service-card:hover {
|
| 17 |
+
transform: translateY(-5px);
|
| 18 |
+
box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
|
| 19 |
+
}
|
| 20 |
+
.result-card {
|
| 21 |
+
animation: fadeIn 0.5s ease-out;
|
| 22 |
+
}
|
| 23 |
+
@keyframes fadeIn {
|
| 24 |
+
from { opacity: 0; transform: translateY(20px); }
|
| 25 |
+
to { opacity: 1; transform: translateY(0); }
|
| 26 |
+
}
|
| 27 |
+
input[type="range"] {
|
| 28 |
+
-webkit-appearance: none;
|
| 29 |
+
height: 8px;
|
| 30 |
+
background: #e2e8f0;
|
| 31 |
+
border-radius: 5px;
|
| 32 |
+
}
|
| 33 |
+
input[type="range"]::-webkit-slider-thumb {
|
| 34 |
+
-webkit-appearance: none;
|
| 35 |
+
height: 20px;
|
| 36 |
+
width: 20px;
|
| 37 |
+
border-radius: 50%;
|
| 38 |
+
background: #2563eb;
|
| 39 |
+
cursor: pointer;
|
| 40 |
+
box-shadow: 0 0 2px rgba(0, 0, 0, 0.2);
|
| 41 |
+
}
|
| 42 |
+
.tab-content {
|
| 43 |
+
display: none;
|
| 44 |
+
}
|
| 45 |
+
.tab-content.active {
|
| 46 |
+
display: block;
|
| 47 |
+
}
|
| 48 |
+
</style>
|
| 49 |
+
</head>
|
| 50 |
+
<body class="bg-gray-50 min-h-screen">
|
| 51 |
+
<div class="gradient-bg text-white py-8 shadow-lg">
|
| 52 |
+
<div class="container mx-auto px-4">
|
| 53 |
+
<div class="flex items-center justify-between">
|
| 54 |
+
<div>
|
| 55 |
+
<h1 class="text-3xl md:text-4xl font-bold">Cotizador REDRING</h1>
|
| 56 |
+
<p class="mt-2 text-blue-100">Herramienta interna para cotización de servicios</p>
|
| 57 |
+
</div>
|
| 58 |
+
<div class="hidden md:block">
|
| 59 |
+
<i class="fas fa-calculator text-4xl opacity-70"></i>
|
| 60 |
+
</div>
|
| 61 |
+
</div>
|
| 62 |
+
</div>
|
| 63 |
+
</div>
|
| 64 |
+
|
| 65 |
+
<div class="container mx-auto px-4 py-8">
|
| 66 |
+
<!-- Service Selection Tabs -->
|
| 67 |
+
<div class="bg-white rounded-lg shadow-md mb-8 overflow-hidden">
|
| 68 |
+
<div class="flex border-b">
|
| 69 |
+
<button class="tab-btn py-4 px-6 font-medium text-gray-700 hover:text-blue-600 focus:outline-none border-b-2 border-blue-600 text-blue-600" data-tab="maquila">
|
| 70 |
+
<i class="fas fa-users-cog mr-2"></i>Maquila de Nómina
|
| 71 |
+
</button>
|
| 72 |
+
<button class="tab-btn py-4 px-6 font-medium text-gray-700 hover:text-blue-600 focus:outline-none" data-tab="renta">
|
| 73 |
+
<i class="fas fa-laptop-code mr-2"></i>Renta de Software
|
| 74 |
+
</button>
|
| 75 |
+
</div>
|
| 76 |
+
|
| 77 |
+
<!-- Maquila de Nómina Tab -->
|
| 78 |
+
<div id="maquila" class="tab-content active p-6">
|
| 79 |
+
<h2 class="text-2xl font-bold text-gray-800 mb-6">Cotización de Maquila de Nómina</h2>
|
| 80 |
+
|
| 81 |
+
<div class="grid md:grid-cols-2 gap-8">
|
| 82 |
+
<!-- Input Form -->
|
| 83 |
+
<div class="bg-white p-6 rounded-lg shadow-sm border border-gray-200">
|
| 84 |
+
<h3 class="text-xl font-semibold text-gray-700 mb-4">Parámetros de cotización</h3>
|
| 85 |
+
|
| 86 |
+
<div id="employeeRanges">
|
| 87 |
+
<div class="mb-6 range-group">
|
| 88 |
+
<div class="flex justify-between items-center mb-2">
|
| 89 |
+
<label class="block text-gray-700 font-medium">Rango de empleados</label>
|
| 90 |
+
<button type="button" class="remove-range text-red-500 hover:text-red-700 text-sm">
|
| 91 |
+
<i class="fas fa-times mr-1"></i>Eliminar
|
| 92 |
+
</button>
|
| 93 |
+
</div>
|
| 94 |
+
<div class="grid grid-cols-2 gap-4 mb-2">
|
| 95 |
+
<div>
|
| 96 |
+
<label class="block text-gray-600 text-sm mb-1">Desde</label>
|
| 97 |
+
<input type="number" min="1" class="min-employees w-full px-3 py-2 border border-gray-300 rounded-md" value="1">
|
| 98 |
+
</div>
|
| 99 |
+
<div>
|
| 100 |
+
<label class="block text-gray-600 text-sm mb-1">Hasta</label>
|
| 101 |
+
<input type="number" min="1" class="max-employees w-full px-3 py-2 border border-gray-300 rounded-md" value="10">
|
| 102 |
+
</div>
|
| 103 |
+
</div>
|
| 104 |
+
<div class="mb-4">
|
| 105 |
+
<label class="block text-gray-700 font-medium mb-2">Tipo de periodo</label>
|
| 106 |
+
<select class="period-type w-full px-4 py-2 border border-gray-300 rounded-md">
|
| 107 |
+
<option value="mensual">Mensual</option>
|
| 108 |
+
<option value="quincenal">Quincenal/Catorcenal</option>
|
| 109 |
+
<option value="semanal">Semanal</option>
|
| 110 |
+
</select>
|
| 111 |
+
</div>
|
| 112 |
+
</div>
|
| 113 |
+
</div>
|
| 114 |
+
<button type="button" id="addRange" class="w-full bg-gray-200 hover:bg-gray-300 text-gray-800 py-2 px-4 rounded-md mb-6">
|
| 115 |
+
<i class="fas fa-plus mr-2"></i>Agregar otro rango
|
| 116 |
+
</button>
|
| 117 |
+
|
| 118 |
+
<div class="mb-6">
|
| 119 |
+
<label class="block text-gray-700 font-medium mb-2">Tipo de servicio</label>
|
| 120 |
+
<div class="space-y-2">
|
| 121 |
+
<label class="flex items-center">
|
| 122 |
+
<input type="radio" name="serviceType" value="hibrido" class="mr-2" checked>
|
| 123 |
+
<span>Híbrido (Cliente sube incidencias en RR 2.0)</span>
|
| 124 |
+
</label>
|
| 125 |
+
<label class="flex items-center">
|
| 126 |
+
<input type="radio" name="serviceType" value="total" class="mr-2">
|
| 127 |
+
<span>Gestión Total</span>
|
| 128 |
+
</label>
|
| 129 |
+
</div>
|
| 130 |
+
</div>
|
| 131 |
+
|
| 132 |
+
<div class="mb-6" id="periodTypeContainer">
|
| 133 |
+
<label class="block text-gray-700 font-medium mb-2">Tipo de periodo</label>
|
| 134 |
+
<select id="periodType" class="w-full px-4 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500">
|
| 135 |
+
<option value="mensual">Mensual</option>
|
| 136 |
+
<option value="quincenal">Quincenal/Catorcenal</option>
|
| 137 |
+
<option value="semanal">Semanal</option>
|
| 138 |
+
</select>
|
| 139 |
+
</div>
|
| 140 |
+
|
| 141 |
+
<div class="mb-6">
|
| 142 |
+
<label class="block text-gray-700 font-medium mb-2">¿Usa layout de RR 2.0?</label>
|
| 143 |
+
<div class="flex items-center">
|
| 144 |
+
<input type="checkbox" id="useLayout" class="mr-2 h-5 w-5 text-blue-600">
|
| 145 |
+
<span>Sí, el cliente usa el layout de RR 2.0</span>
|
| 146 |
+
</div>
|
| 147 |
+
</div>
|
| 148 |
+
|
| 149 |
+
<button id="calculateMaquila" class="w-full bg-blue-600 hover:bg-blue-700 text-white font-bold py-3 px-4 rounded-md transition duration-300">
|
| 150 |
+
<i class="fas fa-calculator mr-2"></i>Calcular Cotización
|
| 151 |
+
</button>
|
| 152 |
+
</div>
|
| 153 |
+
|
| 154 |
+
<!-- Results Placeholder -->
|
| 155 |
+
<div id="maquilaResults" class="result-card bg-white p-6 rounded-lg shadow-sm border border-gray-200 hidden">
|
| 156 |
+
<h3 class="text-xl font-semibold text-gray-700 mb-4">Resultados de cotización</h3>
|
| 157 |
+
<div class="space-y-4">
|
| 158 |
+
<div class="flex justify-between py-2 border-b border-gray-200">
|
| 159 |
+
<span class="text-gray-600">Número de empleados:</span>
|
| 160 |
+
<span id="resultEmployees" class="font-medium"></span>
|
| 161 |
+
</div>
|
| 162 |
+
<div class="flex justify-between py-2 border-b border-gray-200">
|
| 163 |
+
<span class="text-gray-600">Tipo de servicio:</span>
|
| 164 |
+
<span id="resultServiceType" class="font-medium"></span>
|
| 165 |
+
</div>
|
| 166 |
+
<div class="flex justify-between py-2 border-b border-gray-200">
|
| 167 |
+
<span class="text-gray-600">Tipo de periodo:</span>
|
| 168 |
+
<span id="resultPeriodType" class="font-medium"></span>
|
| 169 |
+
</div>
|
| 170 |
+
<div class="flex justify-between py-2 border-b border-gray-200">
|
| 171 |
+
<span class="text-gray-600">Usa layout RR 2.0:</span>
|
| 172 |
+
<span id="resultLayout" class="font-medium"></span>
|
| 173 |
+
</div>
|
| 174 |
+
<div id="resultDetails" class="space-y-3 mt-4"></div>
|
| 175 |
+
<div class="bg-blue-50 p-4 rounded-md mt-4">
|
| 176 |
+
<div class="flex justify-between items-center">
|
| 177 |
+
<span class="text-lg font-bold text-gray-700">Precio mensual:</span>
|
| 178 |
+
<span id="resultMonthlyPrice" class="text-2xl font-bold text-blue-600"></span>
|
| 179 |
+
</div>
|
| 180 |
+
<div class="flex justify-between mt-2">
|
| 181 |
+
<span class="text-gray-600">Facturación anual:</span>
|
| 182 |
+
<span id="resultAnnual" class="font-medium"></span>
|
| 183 |
+
</div>
|
| 184 |
+
</div>
|
| 185 |
+
<div class="bg-green-50 p-4 rounded-md">
|
| 186 |
+
<div class="flex justify-between items-center">
|
| 187 |
+
<span class="text-lg font-bold text-gray-700">Con descuento (25%):</span>
|
| 188 |
+
<span id="resultDiscountPrice" class="text-2xl font-bold text-green-600"></span>
|
| 189 |
+
</div>
|
| 190 |
+
<div class="flex justify-between mt-2">
|
| 191 |
+
<span class="text-gray-600">Facturación anual con descuento:</span>
|
| 192 |
+
<span id="resultAnnualDiscount" class="font-medium"></span>
|
| 193 |
+
</div>
|
| 194 |
+
</div>
|
| 195 |
+
</div>
|
| 196 |
+
|
| 197 |
+
<button id="newMaquilaQuote" class="w-full mt-6 bg-gray-200 hover:bg-gray-300 text-gray-800 font-bold py-2 px-4 rounded-md transition duration-300">
|
| 198 |
+
<i class="fas fa-redo mr-2"></i>Nueva cotización
|
| 199 |
+
</button>
|
| 200 |
+
</div>
|
| 201 |
+
</div>
|
| 202 |
+
|
| 203 |
+
<!-- Pricing Table -->
|
| 204 |
+
<div class="mt-12">
|
| 205 |
+
<h3 class="text-xl font-semibold text-gray-700 mb-4">Tabla de referencia de precios</h3>
|
| 206 |
+
<div class="overflow-x-auto">
|
| 207 |
+
<table class="min-w-full bg-white border border-gray-200">
|
| 208 |
+
<thead class="bg-gray-50">
|
| 209 |
+
<tr>
|
| 210 |
+
<th class="px-6 py-3 border-b border-gray-200 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Rango</th>
|
| 211 |
+
<th class="px-6 py-3 border-b border-gray-200 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Empleados</th>
|
| 212 |
+
<th colspan="2" class="px-6 py-3 border-b border-gray-200 text-center text-xs font-medium text-gray-500 uppercase tracking-wider">Híbrido</th>
|
| 213 |
+
<th colspan="3" class="px-6 py-3 border-b border-gray-200 text-center text-xs font-medium text-gray-500 uppercase tracking-wider">Gestión Total</th>
|
| 214 |
+
<th colspan="2" class="px-6 py-3 border-b border-gray-200 text-center text-xs font-medium text-gray-500 uppercase tracking-wider">Renta</th>
|
| 215 |
+
</tr>
|
| 216 |
+
<tr>
|
| 217 |
+
<th></th>
|
| 218 |
+
<th></th>
|
| 219 |
+
<th class="px-6 py-2 border-b border-gray-200 text-xs font-medium text-gray-500 uppercase tracking-wider">P. mensual</th>
|
| 220 |
+
<th class="px-6 py-2 border-b border-gray-200 text-xs font-medium text-gray-500 uppercase tracking-wider">Fact. anual</th>
|
| 221 |
+
<th class="px-6 py-2 border-b border-gray-200 text-xs font-medium text-gray-500 uppercase tracking-wider">Mensual</th>
|
| 222 |
+
<th class="px-6 py-2 border-b border-gray-200 text-xs font-medium text-gray-500 uppercase tracking-wider">Qnal/Cator.</th>
|
| 223 |
+
<th class="px-6 py-2 border-b border-gray-200 text-xs font-medium text-gray-500 uppercase tracking-wider">Semanal</th>
|
| 224 |
+
<th class="px-6 py-2 border-b border-gray-200 text-xs font-medium text-gray-500 uppercase tracking-wider">P. mensual</th>
|
| 225 |
+
<th class="px-6 py-2 border-b border-gray-200 text-xs font-medium text-gray-500 uppercase tracking-wider">Fact. anual</th>
|
| 226 |
+
</tr>
|
| 227 |
+
</thead>
|
| 228 |
+
<tbody class="divide-y divide-gray-200">
|
| 229 |
+
<!-- Rows will be populated by JavaScript -->
|
| 230 |
+
</tbody>
|
| 231 |
+
</table>
|
| 232 |
+
</div>
|
| 233 |
+
</div>
|
| 234 |
+
</div>
|
| 235 |
+
|
| 236 |
+
<!-- Renta de Software Tab -->
|
| 237 |
+
<div id="renta" class="tab-content p-6">
|
| 238 |
+
<h2 class="text-2xl font-bold text-gray-800 mb-6">Cotización de Renta de Software</h2>
|
| 239 |
+
|
| 240 |
+
<div class="grid md:grid-cols-2 gap-8">
|
| 241 |
+
<!-- Input Form -->
|
| 242 |
+
<div class="bg-white p-6 rounded-lg shadow-sm border border-gray-200">
|
| 243 |
+
<h3 class="text-xl font-semibold text-gray-700 mb-4">Parámetros de cotización</h3>
|
| 244 |
+
|
| 245 |
+
<div class="mb-6">
|
| 246 |
+
<label class="block text-gray-700 font-medium mb-2">Número de empleados</label>
|
| 247 |
+
<input type="range" id="employeeRangeRenta" min="1" max="5500" value="10" class="w-full mb-2">
|
| 248 |
+
<div class="flex justify-between">
|
| 249 |
+
<span>1</span>
|
| 250 |
+
<span id="employeeValueRenta" class="font-bold">10</span>
|
| 251 |
+
<span>5500+</span>
|
| 252 |
+
</div>
|
| 253 |
+
</div>
|
| 254 |
+
|
| 255 |
+
<div class="mb-6">
|
| 256 |
+
<label class="block text-gray-700 font-medium mb-2">Tipo de cotización</label>
|
| 257 |
+
<div class="space-y-2">
|
| 258 |
+
<label class="flex items-center">
|
| 259 |
+
<input type="radio" name="rentaType" value="unico" class="mr-2" checked>
|
| 260 |
+
<span>Un precio para todos los tipos de periodo</span>
|
| 261 |
+
</label>
|
| 262 |
+
<label class="flex items-center">
|
| 263 |
+
<input type="radio" name="rentaType" value="diferente" class="mr-2">
|
| 264 |
+
<span>Diferentes precios por tipo de periodo</span>
|
| 265 |
+
</label>
|
| 266 |
+
</div>
|
| 267 |
+
</div>
|
| 268 |
+
|
| 269 |
+
<div class="mb-6" id="periodTypeRentaContainer">
|
| 270 |
+
<label class="block text-gray-700 font-medium mb-2">Tipo de periodo</label>
|
| 271 |
+
<select id="periodTypeRenta" class="w-full px-4 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500">
|
| 272 |
+
<option value="mensual">Mensual</option>
|
| 273 |
+
<option value="quincenal">Quincenal/Catorcenal</option>
|
| 274 |
+
<option value="semanal">Semanal</option>
|
| 275 |
+
</select>
|
| 276 |
+
</div>
|
| 277 |
+
|
| 278 |
+
<button id="calculateRenta" class="w-full bg-blue-600 hover:bg-blue-700 text-white font-bold py-3 px-4 rounded-md transition duration-300">
|
| 279 |
+
<i class="fas fa-calculator mr-2"></i>Calcular Cotización
|
| 280 |
+
</button>
|
| 281 |
+
</div>
|
| 282 |
+
|
| 283 |
+
<!-- Results Placeholder -->
|
| 284 |
+
<div id="rentaResults" class="result-card bg-white p-6 rounded-lg shadow-sm border border-gray-200 hidden">
|
| 285 |
+
<h3 class="text-xl font-semibold text-gray-700 mb-4">Resultados de cotización</h3>
|
| 286 |
+
<div class="space-y-4">
|
| 287 |
+
<div class="flex justify-between py-2 border-b border-gray-200">
|
| 288 |
+
<span class="text-gray-600">Número de empleados:</span>
|
| 289 |
+
<span id="resultEmployeesRenta" class="font-medium"></span>
|
| 290 |
+
</div>
|
| 291 |
+
<div class="flex justify-between py-2 border-b border-gray-200">
|
| 292 |
+
<span class="text-gray-600">Tipo de cotización:</span>
|
| 293 |
+
<span id="resultRentaType" class="font-medium"></span>
|
| 294 |
+
</div>
|
| 295 |
+
<div class="flex justify-between py-2 border-b border-gray-200">
|
| 296 |
+
<span class="text-gray-600">Tipo de periodo:</span>
|
| 297 |
+
<span id="resultPeriodTypeRenta" class="font-medium"></span>
|
| 298 |
+
</div>
|
| 299 |
+
<div class="bg-blue-50 p-4 rounded-md mt-4">
|
| 300 |
+
<div class="flex justify-between items-center">
|
| 301 |
+
<span class="text-lg font-bold text-gray-700">Precio mensual:</span>
|
| 302 |
+
<span id="resultMonthlyPriceRenta" class="text-2xl font-bold text-blue-600"></span>
|
| 303 |
+
</div>
|
| 304 |
+
<div class="flex justify-between mt-2">
|
| 305 |
+
<span class="text-gray-600">Facturación anual:</span>
|
| 306 |
+
<span id="resultAnnualRenta" class="font-medium"></span>
|
| 307 |
+
</div>
|
| 308 |
+
</div>
|
| 309 |
+
</div>
|
| 310 |
+
|
| 311 |
+
<button id="newRentaQuote" class="w-full mt-6 bg-gray-200 hover:bg-gray-300 text-gray-800 font-bold py-2 px-4 rounded-md transition duration-300">
|
| 312 |
+
<i class="fas fa-redo mr-2"></i>Nueva cotización
|
| 313 |
+
</button>
|
| 314 |
+
</div>
|
| 315 |
+
</div>
|
| 316 |
+
</div>
|
| 317 |
+
</div>
|
| 318 |
+
</div>
|
| 319 |
+
|
| 320 |
+
<footer class="bg-gray-800 text-white py-6">
|
| 321 |
+
<div class="container mx-auto px-4 text-center">
|
| 322 |
+
<p>© 2023 REDRING - Herramienta interna de cotización</p>
|
| 323 |
+
<p class="text-gray-400 text-sm mt-2">Para rangos superiores a 5,500 empleados, consultar con Gerencias Comercial y Operaciones</p>
|
| 324 |
+
</div>
|
| 325 |
+
</footer>
|
| 326 |
+
|
| 327 |
+
<script>
|
| 328 |
+
// Pricing data
|
| 329 |
+
const pricingData = [
|
| 330 |
+
{ min: 1, max: 10, hibrido: 525, totalMensual: 700, totalQuincenal: 770, totalSemanal: 840, renta: 99 },
|
| 331 |
+
{ min: 11, max: 30, hibrido: 488, totalMensual: 650, totalQuincenal: 715, totalSemanal: 780, renta: 94 },
|
| 332 |
+
{ min: 31, max: 70, hibrido: 450, totalMensual: 600, totalQuincenal: 660, totalSemanal: 720, renta: 89 },
|
| 333 |
+
{ min: 71, max: 150, hibrido: 413, totalMensual: 550, totalQuincenal: 605, totalSemanal: 660, renta: 84 },
|
| 334 |
+
{ min: 151, max: 300, hibrido: 375, totalMensual: 500, totalQuincenal: 550, totalSemanal: 600, renta: 79 },
|
| 335 |
+
{ min: 301, max: 600, hibrido: 338, totalMensual: 450, totalQuincenal: 495, totalSemanal: 540, renta: 74 },
|
| 336 |
+
{ min: 601, max: 1200, hibrido: 300, totalMensual: 400, totalQuincenal: 440, totalSemanal: 480, renta: 69 },
|
| 337 |
+
{ min: 1201, max: 2200, hibrido: 263, totalMensual: 350, totalQuincenal: 385, totalSemanal: 420, renta: 64 },
|
| 338 |
+
{ min: 2201, max: 3300, hibrido: 225, totalMensual: 300, totalQuincenal: 330, totalSemanal: 360, renta: 59 },
|
| 339 |
+
{ min: 3301, max: 4400, hibrido: 188, totalMensual: 250, totalQuincenal: 275, totalSemanal: 300, renta: 54 },
|
| 340 |
+
{ min: 4401, max: 5500, hibrido: 150, totalMensual: 200, totalQuincenal: 220, totalSemanal: 240, renta: 49 },
|
| 341 |
+
{ min: 5501, max: null, hibrido: null, totalMensual: null, totalQuincenal: null, totalSemanal: null, renta: null }
|
| 342 |
+
];
|
| 343 |
+
|
| 344 |
+
// Tab functionality
|
| 345 |
+
document.querySelectorAll('.tab-btn').forEach(btn => {
|
| 346 |
+
btn.addEventListener('click', () => {
|
| 347 |
+
// Remove active class from all tabs and buttons
|
| 348 |
+
document.querySelectorAll('.tab-btn').forEach(tb => {
|
| 349 |
+
tb.classList.remove('border-blue-600', 'text-blue-600');
|
| 350 |
+
tb.classList.add('text-gray-700');
|
| 351 |
+
});
|
| 352 |
+
|
| 353 |
+
document.querySelectorAll('.tab-content').forEach(content => {
|
| 354 |
+
content.classList.remove('active');
|
| 355 |
+
});
|
| 356 |
+
|
| 357 |
+
// Add active class to clicked tab
|
| 358 |
+
btn.classList.add('border-blue-600', 'text-blue-600');
|
| 359 |
+
btn.classList.remove('text-gray-700');
|
| 360 |
+
|
| 361 |
+
const tabId = btn.getAttribute('data-tab');
|
| 362 |
+
document.getElementById(tabId).classList.add('active');
|
| 363 |
+
});
|
| 364 |
+
});
|
| 365 |
+
|
| 366 |
+
// Employee range input for Maquila
|
| 367 |
+
const employeeRange = document.getElementById('employeeRange');
|
| 368 |
+
const employeeValue = document.getElementById('employeeValue');
|
| 369 |
+
|
| 370 |
+
employeeRange.addEventListener('input', () => {
|
| 371 |
+
employeeValue.textContent = employeeRange.value;
|
| 372 |
+
});
|
| 373 |
+
|
| 374 |
+
// Employee range input for Renta
|
| 375 |
+
const employeeRangeRenta = document.getElementById('employeeRangeRenta');
|
| 376 |
+
const employeeValueRenta = document.getElementById('employeeValueRenta');
|
| 377 |
+
|
| 378 |
+
employeeRangeRenta.addEventListener('input', () => {
|
| 379 |
+
employeeValueRenta.textContent = employeeRangeRenta.value;
|
| 380 |
+
});
|
| 381 |
+
|
| 382 |
+
// Show/hide period type based on service type for Maquila
|
| 383 |
+
document.querySelectorAll('input[name="serviceType"]').forEach(radio => {
|
| 384 |
+
radio.addEventListener('change', () => {
|
| 385 |
+
const useLayout = document.getElementById('useLayout').checked;
|
| 386 |
+
const serviceType = document.querySelector('input[name="serviceType"]:checked').value;
|
| 387 |
+
|
| 388 |
+
if (serviceType === 'total' && !useLayout) {
|
| 389 |
+
document.getElementById('periodTypeContainer').classList.remove('hidden');
|
| 390 |
+
} else {
|
| 391 |
+
document.getElementById('periodTypeContainer').classList.add('hidden');
|
| 392 |
+
}
|
| 393 |
+
});
|
| 394 |
+
});
|
| 395 |
+
|
| 396 |
+
document.getElementById('useLayout').addEventListener('change', function() {
|
| 397 |
+
const serviceType = document.querySelector('input[name="serviceType"]:checked').value;
|
| 398 |
+
|
| 399 |
+
if (serviceType === 'total' && !this.checked) {
|
| 400 |
+
document.getElementById('periodTypeContainer').classList.remove('hidden');
|
| 401 |
+
} else {
|
| 402 |
+
document.getElementById('periodTypeContainer').classList.add('hidden');
|
| 403 |
+
}
|
| 404 |
+
});
|
| 405 |
+
|
| 406 |
+
// Show/hide period type based on renta type
|
| 407 |
+
document.querySelectorAll('input[name="rentaType"]').forEach(radio => {
|
| 408 |
+
radio.addEventListener('change', () => {
|
| 409 |
+
const rentaType = document.querySelector('input[name="rentaType"]:checked').value;
|
| 410 |
+
|
| 411 |
+
if (rentaType === 'diferente') {
|
| 412 |
+
document.getElementById('periodTypeRentaContainer').classList.remove('hidden');
|
| 413 |
+
} else {
|
| 414 |
+
document.getElementById('periodTypeRentaContainer').classList.add('hidden');
|
| 415 |
+
}
|
| 416 |
+
});
|
| 417 |
+
});
|
| 418 |
+
|
| 419 |
+
// Add new range
|
| 420 |
+
document.getElementById('addRange').addEventListener('click', () => {
|
| 421 |
+
const rangeGroup = document.querySelector('.range-group').cloneNode(true);
|
| 422 |
+
rangeGroup.querySelector('.min-employees').value = '';
|
| 423 |
+
rangeGroup.querySelector('.max-employees').value = '';
|
| 424 |
+
document.getElementById('employeeRanges').appendChild(rangeGroup);
|
| 425 |
+
addRemoveListeners();
|
| 426 |
+
});
|
| 427 |
+
|
| 428 |
+
// Remove range
|
| 429 |
+
function addRemoveListeners() {
|
| 430 |
+
document.querySelectorAll('.remove-range').forEach(btn => {
|
| 431 |
+
btn.addEventListener('click', function() {
|
| 432 |
+
if (document.querySelectorAll('.range-group').length > 1) {
|
| 433 |
+
this.closest('.range-group').remove();
|
| 434 |
+
} else {
|
| 435 |
+
alert('Debe haber al menos un rango de empleados');
|
| 436 |
+
}
|
| 437 |
+
});
|
| 438 |
+
});
|
| 439 |
+
}
|
| 440 |
+
|
| 441 |
+
// Calculate Maquila with multiple ranges
|
| 442 |
+
document.getElementById('calculateMaquila').addEventListener('click', () => {
|
| 443 |
+
const serviceType = document.querySelector('input[name="serviceType"]:checked').value;
|
| 444 |
+
const useLayout = document.getElementById('useLayout').checked;
|
| 445 |
+
|
| 446 |
+
const ranges = document.querySelectorAll('.range-group');
|
| 447 |
+
let totalPrice = 0;
|
| 448 |
+
let totalAnnual = 0;
|
| 449 |
+
let resultsHTML = '';
|
| 450 |
+
|
| 451 |
+
ranges.forEach(range => {
|
| 452 |
+
const minEmployees = parseInt(range.querySelector('.min-employees').value) || 0;
|
| 453 |
+
const maxEmployees = parseInt(range.querySelector('.max-employees').value) || 0;
|
| 454 |
+
const periodType = range.querySelector('.period-type').value;
|
| 455 |
+
|
| 456 |
+
if (minEmployees === 0 || maxEmployees === 0 || minEmployees > maxEmployees) {
|
| 457 |
+
alert('Por favor ingrese rangos válidos');
|
| 458 |
+
return;
|
| 459 |
+
}
|
| 460 |
+
|
| 461 |
+
const avgEmployees = Math.floor((minEmployees + maxEmployees) / 2);
|
| 462 |
+
|
| 463 |
+
// Find the pricing tier
|
| 464 |
+
let tier = pricingData.find(t =>
|
| 465 |
+
(t.max === null && avgEmployees >= t.min) ||
|
| 466 |
+
(avgEmployees >= t.min && avgEmployees <= t.max)
|
| 467 |
+
);
|
| 468 |
+
|
| 469 |
+
if (!tier) {
|
| 470 |
+
alert(`Para más de 5,500 empleados, consultar con Gerencias Comercial y Operaciones`);
|
| 471 |
+
return;
|
| 472 |
+
}
|
| 473 |
+
|
| 474 |
+
// Calculate price
|
| 475 |
+
let price;
|
| 476 |
+
let annual;
|
| 477 |
+
let description;
|
| 478 |
+
|
| 479 |
+
if (serviceType === 'hibrido') {
|
| 480 |
+
price = tier.hibrido * avgEmployees;
|
| 481 |
+
annual = price * 10;
|
| 482 |
+
description = "Híbrido";
|
| 483 |
+
} else { // total
|
| 484 |
+
if (useLayout) {
|
| 485 |
+
price = tier.totalMensual * avgEmployees;
|
| 486 |
+
description = "Gestión Total (con layout RR 2.0)";
|
| 487 |
+
} else {
|
| 488 |
+
if (periodType === 'mensual') {
|
| 489 |
+
price = tier.totalMensual * avgEmployees;
|
| 490 |
+
} else if (periodType === 'quincenal') {
|
| 491 |
+
price = tier.totalQuincenal * avgEmployees;
|
| 492 |
+
} else { // semanal
|
| 493 |
+
price = tier.totalSemanal * avgEmployees;
|
| 494 |
+
}
|
| 495 |
+
description = `Gestión Total (${periodType})`;
|
| 496 |
+
}
|
| 497 |
+
annual = price * (periodType === 'mensual' ? 10 : (periodType === 'quincenal' ? 24 : 52));
|
| 498 |
+
}
|
| 499 |
+
|
| 500 |
+
totalPrice += price;
|
| 501 |
+
totalAnnual += annual;
|
| 502 |
+
|
| 503 |
+
// Add to results details
|
| 504 |
+
resultsHTML += `
|
| 505 |
+
<div class="mb-4 p-3 bg-gray-50 rounded-md">
|
| 506 |
+
<div class="flex justify-between py-1">
|
| 507 |
+
<span class="text-gray-600">Empleados:</span>
|
| 508 |
+
<span class="font-medium">${minEmployees} - ${maxEmployees}</span>
|
| 509 |
+
</div>
|
| 510 |
+
<div class="flex justify-between py-1">
|
| 511 |
+
<span class="text-gray-600">Tipo de periodo:</span>
|
| 512 |
+
<span class="font-medium">${periodType.charAt(0).toUpperCase() + periodType.slice(1)}</span>
|
| 513 |
+
</div>
|
| 514 |
+
<div class="flex justify-between py-1">
|
| 515 |
+
<span class="text-gray-600">Precio mensual:</span>
|
| 516 |
+
<span class="font-medium">${price.toLocaleString()}</span>
|
| 517 |
+
</div>
|
| 518 |
+
<div class="flex justify-between py-1">
|
| 519 |
+
<span class="text-gray-600">Facturación anual:</span>
|
| 520 |
+
<span class="font-medium">${annual.toLocaleString()}</span>
|
| 521 |
+
</div>
|
| 522 |
+
</div>
|
| 523 |
+
`;
|
| 524 |
+
});
|
| 525 |
+
|
| 526 |
+
// Calculate discount
|
| 527 |
+
const discountPrice = totalPrice * 0.75;
|
| 528 |
+
const annualDiscount = totalAnnual * 0.75;
|
| 529 |
+
|
| 530 |
+
// Display results
|
| 531 |
+
document.getElementById('resultEmployees').textContent = ranges.length > 1 ? 'Múltiples rangos' : `${ranges[0].querySelector('.min-employees').value} - ${ranges[0].querySelector('.max-employees').value}`;
|
| 532 |
+
document.getElementById('resultServiceType').textContent = serviceType === 'hibrido' ? 'Híbrido' : 'Gestión Total';
|
| 533 |
+
document.getElementById('resultPeriodType').textContent = ranges.length > 1 ? 'Múltiples periodos' : ranges[0].querySelector('.period-type').value.charAt(0).toUpperCase() + ranges[0].querySelector('.period-type').value.slice(1);
|
| 534 |
+
document.getElementById('resultLayout').textContent = useLayout ? "Sí" : "No";
|
| 535 |
+
|
| 536 |
+
// Add details to results
|
| 537 |
+
document.getElementById('resultDetails').innerHTML = resultsHTML;
|
| 538 |
+
|
| 539 |
+
// Show totals
|
| 540 |
+
document.getElementById('resultMonthlyPrice').textContent = `${totalPrice.toLocaleString()}`;
|
| 541 |
+
document.getElementById('resultAnnual').textContent = `${totalAnnual.toLocaleString()}`;
|
| 542 |
+
document.getElementById('resultDiscountPrice').textContent = `${discountPrice.toLocaleString()}`;
|
| 543 |
+
document.getElementById('resultAnnualDiscount').textContent = `${annualDiscount.toLocaleString()}`;
|
| 544 |
+
|
| 545 |
+
// Show results
|
| 546 |
+
document.getElementById('maquilaResults').classList.remove('hidden');
|
| 547 |
+
});
|
| 548 |
+
|
| 549 |
+
// Calculate Renta
|
| 550 |
+
document.getElementById('calculateRenta').addEventListener('click', () => {
|
| 551 |
+
const employees = parseInt(employeeRangeRenta.value);
|
| 552 |
+
const rentaType = document.querySelector('input[name="rentaType"]:checked').value;
|
| 553 |
+
const periodType = document.getElementById('periodTypeRenta').value;
|
| 554 |
+
|
| 555 |
+
// Find the pricing tier
|
| 556 |
+
let tier = pricingData.find(t =>
|
| 557 |
+
(t.max === null && employees >= t.min) ||
|
| 558 |
+
(employees >= t.min && employees <= t.max)
|
| 559 |
+
);
|
| 560 |
+
|
| 561 |
+
if (!tier) {
|
| 562 |
+
alert("Para más de 5,500 empleados, consultar con Gerencias Comercial y Operaciones");
|
| 563 |
+
return;
|
| 564 |
+
}
|
| 565 |
+
|
| 566 |
+
// Calculate price
|
| 567 |
+
let price;
|
| 568 |
+
let annual;
|
| 569 |
+
let description;
|
| 570 |
+
|
| 571 |
+
if (rentaType === 'unico') {
|
| 572 |
+
price = tier.renta * employees;
|
| 573 |
+
description = "Precio único para todos los periodos";
|
| 574 |
+
} else { // diferente
|
| 575 |
+
price = tier.renta * employees;
|
| 576 |
+
description = `Precio para periodo ${periodType}`;
|
| 577 |
+
}
|
| 578 |
+
|
| 579 |
+
annual = price * (periodType === 'mensual' ? 10 : (periodType === 'quincenal' ? 24 : 52));
|
| 580 |
+
|
| 581 |
+
// Display results
|
| 582 |
+
document.getElementById('resultEmployeesRenta').textContent = employees;
|
| 583 |
+
document.getElementById('resultRentaType').textContent = description;
|
| 584 |
+
document.getElementById('resultPeriodTypeRenta').textContent = periodType.charAt(0).toUpperCase() + periodType.slice(1);
|
| 585 |
+
document.getElementById('resultMonthlyPriceRenta').textContent = `$${price.toLocaleString()}`;
|
| 586 |
+
document.getElementById('resultAnnualRenta').textContent = `$${annual.toLocaleString()}`;
|
| 587 |
+
|
| 588 |
+
// Show results
|
| 589 |
+
document.getElementById('rentaResults').classList.remove('hidden');
|
| 590 |
+
});
|
| 591 |
+
|
| 592 |
+
// New quote buttons
|
| 593 |
+
document.getElementById('newMaquilaQuote').addEventListener('click', () => {
|
| 594 |
+
document.getElementById('maquilaResults').classList.add('hidden');
|
| 595 |
+
});
|
| 596 |
+
|
| 597 |
+
document.getElementById('newRentaQuote').addEventListener('click', () => {
|
| 598 |
+
document.getElementById('rentaResults').classList.add('hidden');
|
| 599 |
+
});
|
| 600 |
+
|
| 601 |
+
// Populate pricing table
|
| 602 |
+
function populatePricingTable() {
|
| 603 |
+
const tbody = document.querySelector('tbody');
|
| 604 |
+
tbody.innerHTML = '';
|
| 605 |
+
|
| 606 |
+
pricingData.forEach((tier, index) => {
|
| 607 |
+
const row = document.createElement('tr');
|
| 608 |
+
row.className = index % 2 === 0 ? 'bg-white' : 'bg-gray-50';
|
| 609 |
+
|
| 610 |
+
// Rango
|
| 611 |
+
const rangeCell = document.createElement('td');
|
| 612 |
+
rangeCell.className = 'px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900';
|
| 613 |
+
rangeCell.textContent = index + 1;
|
| 614 |
+
row.appendChild(rangeCell);
|
| 615 |
+
|
| 616 |
+
// Empleados
|
| 617 |
+
const employeesCell = document.createElement('td');
|
| 618 |
+
employeesCell.className = 'px-6 py-4 whitespace-nowrap text-sm text-gray-500';
|
| 619 |
+
if (tier.max === null) {
|
| 620 |
+
employeesCell.textContent = `>${tier.min}`;
|
| 621 |
+
} else {
|
| 622 |
+
employeesCell.textContent = `${tier.min} - ${tier.max}`;
|
| 623 |
+
}
|
| 624 |
+
row.appendChild(employeesCell);
|
| 625 |
+
|
| 626 |
+
// Híbrido
|
| 627 |
+
const hibridoPriceCell = document.createElement('td');
|
| 628 |
+
hibridoPriceCell.className = 'px-6 py-4 whitespace-nowrap text-sm text-gray-500';
|
| 629 |
+
hibridoPriceCell.textContent = tier.hibrido ? `$${tier.hibrido}` : 'Consultar';
|
| 630 |
+
row.appendChild(hibridoPriceCell);
|
| 631 |
+
|
| 632 |
+
const hibridoAnnualCell = document.createElement('td');
|
| 633 |
+
hibridoAnnualCell.className = 'px-6 py-4 whitespace-nowrap text-sm text-gray-500';
|
| 634 |
+
if (tier.hibrido) {
|
| 635 |
+
const avgEmployees = tier.max ? Math.floor((tier.min + tier.max) / 2) : tier.min;
|
| 636 |
+
hibridoAnnualCell.textContent = `$${(tier.hibrido * avgEmployees * 10).toLocaleString()}`;
|
| 637 |
+
} else {
|
| 638 |
+
hibridoAnnualCell.textContent = 'Consultar';
|
| 639 |
+
}
|
| 640 |
+
row.appendChild(hibridoAnnualCell);
|
| 641 |
+
|
| 642 |
+
// Gestión Total
|
| 643 |
+
const totalMensualCell = document.createElement('td');
|
| 644 |
+
totalMensualCell.className = 'px-6 py-4 whitespace-nowrap text-sm text-gray-500';
|
| 645 |
+
totalMensualCell.textContent = tier.totalMensual ? `$${tier.totalMensual}` : 'Consultar';
|
| 646 |
+
row.appendChild(totalMensualCell);
|
| 647 |
+
|
| 648 |
+
const totalQuincenalCell = document.createElement('td');
|
| 649 |
+
totalQuincenalCell.className = 'px-6 py-4 whitespace-nowrap text-sm text-gray-500';
|
| 650 |
+
totalQuincenalCell.textContent = tier.totalQuincenal ? `$${tier.totalQuincenal}` : 'Consultar';
|
| 651 |
+
row.appendChild(totalQuincenalCell);
|
| 652 |
+
|
| 653 |
+
const totalSemanalCell = document.createElement('td');
|
| 654 |
+
totalSemanalCell.className = 'px-6 py-4 whitespace-nowrap text-sm text-gray-500';
|
| 655 |
+
totalSemanalCell.textContent = tier.totalSemanal ? `$${tier.totalSemanal}` : 'Consultar';
|
| 656 |
+
row.appendChild(totalSemanalCell);
|
| 657 |
+
|
| 658 |
+
// Renta
|
| 659 |
+
const rentaPriceCell = document.createElement('td');
|
| 660 |
+
rentaPriceCell.className = 'px-6 py-4 whitespace-nowrap text-sm text-gray-500';
|
| 661 |
+
rentaPriceCell.textContent = tier.renta ? `$${tier.renta}` : 'Consultar';
|
| 662 |
+
row.appendChild(rentaPriceCell);
|
| 663 |
+
|
| 664 |
+
const rentaAnnualCell = document.createElement('td');
|
| 665 |
+
rentaAnnualCell.className = 'px-6 py-4 whitespace-nowrap text-sm text-gray-500';
|
| 666 |
+
if (tier.renta) {
|
| 667 |
+
const avgEmployees = tier.max ? Math.floor((tier.min + tier.max) / 2) : tier.min;
|
| 668 |
+
rentaAnnualCell.textContent = `$${(tier.renta * avgEmployees * 10).toLocaleString()}`;
|
| 669 |
+
} else {
|
| 670 |
+
rentaAnnualCell.textContent = 'Consultar';
|
| 671 |
+
}
|
| 672 |
+
row.appendChild(rentaAnnualCell);
|
| 673 |
+
|
| 674 |
+
tbody.appendChild(row);
|
| 675 |
+
});
|
| 676 |
+
}
|
| 677 |
+
|
| 678 |
+
// Initialize
|
| 679 |
+
document.addEventListener('DOMContentLoaded', () => {
|
| 680 |
+
populatePricingTable();
|
| 681 |
+
addRemoveListeners();
|
| 682 |
+
|
| 683 |
+
// Hide period type initially for Maquila
|
| 684 |
+
document.getElementById('periodTypeContainer').classList.add('hidden');
|
| 685 |
+
});
|
| 686 |
+
</script>
|
| 687 |
+
<p style="border-radius: 8px; text-align: center; font-size: 12px; color: #fff; margin-top: 16px;position: fixed; left: 8px; bottom: 8px; z-index: 10; background: rgba(0, 0, 0, 0.8); padding: 4px 8px;">Made with <img src="https://enzostvs-deepsite.hf.space/logo.svg" alt="DeepSite Logo" style="width: 16px; height: 16px; vertical-align: middle;display:inline-block;margin-right:3px;filter:brightness(0) invert(1);"><a href="https://enzostvs-deepsite.hf.space" style="color: #fff;text-decoration: underline;" target="_blank" >DeepSite</a> - 🧬 <a href="https://enzostvs-deepsite.hf.space?remix=MyNameIsToby/apps-redring" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
|
| 688 |
+
</html>
|