@jjlmoya/utils-alcohol 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +60 -0
- package/src/category/i18n/en.ts +19 -0
- package/src/category/i18n/es.ts +28 -0
- package/src/category/i18n/fr.ts +19 -0
- package/src/category/index.ts +12 -0
- package/src/category/seo.astro +15 -0
- package/src/components/PreviewNavSidebar.astro +116 -0
- package/src/components/PreviewToolbar.astro +143 -0
- package/src/data.ts +11 -0
- package/src/env.d.ts +5 -0
- package/src/index.ts +19 -0
- package/src/layouts/PreviewLayout.astro +117 -0
- package/src/pages/[locale]/[slug].astro +155 -0
- package/src/pages/[locale].astro +271 -0
- package/src/pages/index.astro +4 -0
- package/src/tests/content_mandatory.test.ts +32 -0
- package/src/tests/faq_count.test.ts +17 -0
- package/src/tests/mocks/astro_mock.js +2 -0
- package/src/tests/seo_length.test.ts +39 -0
- package/src/tests/tool_validation.test.ts +17 -0
- package/src/tool/alcoholClearance/component.astro +219 -0
- package/src/tool/alcoholClearance/component.css +369 -0
- package/src/tool/alcoholClearance/i18n/en.ts +172 -0
- package/src/tool/alcoholClearance/i18n/es.ts +181 -0
- package/src/tool/alcoholClearance/i18n/fr.ts +163 -0
- package/src/tool/alcoholClearance/index.ts +50 -0
- package/src/tool/alcoholClearance/logic.ts +59 -0
- package/src/tool/beerCooler/component.astro +236 -0
- package/src/tool/beerCooler/component.css +381 -0
- package/src/tool/beerCooler/i18n/en.ts +168 -0
- package/src/tool/beerCooler/i18n/es.ts +181 -0
- package/src/tool/beerCooler/i18n/fr.ts +168 -0
- package/src/tool/beerCooler/index.ts +49 -0
- package/src/tool/beerCooler/logic.ts +34 -0
- package/src/tool/carbonationCalculator/component.astro +225 -0
- package/src/tool/carbonationCalculator/component.css +483 -0
- package/src/tool/carbonationCalculator/i18n/en.ts +175 -0
- package/src/tool/carbonationCalculator/i18n/es.ts +179 -0
- package/src/tool/carbonationCalculator/i18n/fr.ts +175 -0
- package/src/tool/carbonationCalculator/index.ts +48 -0
- package/src/tool/carbonationCalculator/logic.ts +40 -0
- package/src/tool/cocktailBalancer/bibliography.astro +14 -0
- package/src/tool/cocktailBalancer/component.astro +396 -0
- package/src/tool/cocktailBalancer/component.css +1218 -0
- package/src/tool/cocktailBalancer/data/IngredientRepository.ts +83 -0
- package/src/tool/cocktailBalancer/data/Presets.ts +122 -0
- package/src/tool/cocktailBalancer/domain/Ingredient.ts +29 -0
- package/src/tool/cocktailBalancer/i18n/en.ts +193 -0
- package/src/tool/cocktailBalancer/i18n/es.ts +193 -0
- package/src/tool/cocktailBalancer/i18n/fr.ts +193 -0
- package/src/tool/cocktailBalancer/index.ts +68 -0
- package/src/tool/cocktailBalancer/logic.ts +118 -0
- package/src/tool/cocktailBalancer/seo.astro +53 -0
- package/src/tool/partyKeg/component.astro +269 -0
- package/src/tool/partyKeg/component.css +660 -0
- package/src/tool/partyKeg/i18n/en.ts +162 -0
- package/src/tool/partyKeg/i18n/es.ts +166 -0
- package/src/tool/partyKeg/i18n/fr.ts +162 -0
- package/src/tool/partyKeg/index.ts +46 -0
- package/src/tool/partyKeg/logic.ts +36 -0
- package/src/tools.ts +14 -0
- package/src/types.ts +72 -0
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
import type { WithContext, SoftwareApplication } from 'schema-dts';
|
|
2
|
+
import type { AlcoholClearanceUI, AlcoholClearanceLocaleContent } from '../index';
|
|
3
|
+
|
|
4
|
+
const slug = 'alcohol-clearance-calculator';
|
|
5
|
+
const title = 'BAC & Alcohol Metabolism Calculator';
|
|
6
|
+
const description = 'Estimate your Blood Alcohol Content (BAC) and the time needed for your body to eliminate alcohol based on Widmark\'s formula.';
|
|
7
|
+
|
|
8
|
+
const ui: AlcoholClearanceUI = {
|
|
9
|
+
biologicalSexLabel: 'Biological Sex',
|
|
10
|
+
weightLabel: 'Body Weight',
|
|
11
|
+
kgUnit: 'kg',
|
|
12
|
+
addDrinkLabel: 'Add Drink',
|
|
13
|
+
beerLabel: 'Beer',
|
|
14
|
+
wineLabel: 'Wine',
|
|
15
|
+
spiritLabel: 'Mixed Drink',
|
|
16
|
+
shotLabel: 'Shot',
|
|
17
|
+
accumulatedLabel: 'Consumed Drinks',
|
|
18
|
+
emptyListLabel: 'Your list is empty',
|
|
19
|
+
emptySubLabel: 'Select drinks to calculate.',
|
|
20
|
+
estimatedBacLabel: 'Estimated BAC',
|
|
21
|
+
bacUnit: 'BAC',
|
|
22
|
+
timeToZeroLabel: 'to be at 0.0',
|
|
23
|
+
waterAdviceLabel: 'Water (Before sleep)',
|
|
24
|
+
pillAdviceLabel: 'Supplements',
|
|
25
|
+
noneAdvice: 'Not needed',
|
|
26
|
+
hydrationAdvice: 'Priority: Hydration',
|
|
27
|
+
electrolytesAdvice: 'Electrolytes + Vit. B',
|
|
28
|
+
disclaimerText: 'This calculator is a theoretical estimate. Metabolism and food vary the result. Don\'t drink and drive.',
|
|
29
|
+
drinkUnit: 'drink',
|
|
30
|
+
drinksUnit: 'drinks'
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
const faqTitle = 'Frequently Asked Questions';
|
|
34
|
+
const bibliographyTitle = 'Bibliography & Sources';
|
|
35
|
+
|
|
36
|
+
const faq: AlcoholClearanceLocaleContent['faq'] = [
|
|
37
|
+
{
|
|
38
|
+
question: "What is Widmark's formula?",
|
|
39
|
+
answer: "It is the standard pharmacokinetics model that relates the amount of alcohol ingested with body weight and a distribution factor based on biological sex.",
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
question: "Can coffee speed up alcohol elimination?",
|
|
43
|
+
answer: "No. The liver eliminates alcohol at a constant rate (approx. 0.15 g/L per hour). Coffee may make you feel more alert, but it doesn't reduce blood alcohol levels.",
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
question: "Why does biological sex affect BAC calculations?",
|
|
47
|
+
answer: "Biological sex influences the Widmark factor 'r', which represents total body water as a fraction of weight. Men average r=0.68 because they have proportionally more body water. Women average r=0.55 due to higher body fat percentages, which holds less alcohol. This means for the same drinks and weight, women will have a higher BAC.",
|
|
48
|
+
},
|
|
49
|
+
];
|
|
50
|
+
|
|
51
|
+
const bibliography: AlcoholClearanceLocaleContent['bibliography'] = [
|
|
52
|
+
{
|
|
53
|
+
name: "Widmark's Formula for BAC Calculation - Forensic Science Lab",
|
|
54
|
+
url: "https://www.forensic-science.com/widmark-formula",
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
name: "Alcohol Metabolism: How the body processes alcohol - NIH",
|
|
58
|
+
url: "https://www.niaaa.nih.gov/publications/alcohol-metabolism",
|
|
59
|
+
},
|
|
60
|
+
];
|
|
61
|
+
|
|
62
|
+
const howTo: AlcoholClearanceLocaleContent['howTo'] = [
|
|
63
|
+
{
|
|
64
|
+
name: "Set up your profile",
|
|
65
|
+
text: "Select your biological sex (affects body water percentage) and your current weight.",
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
name: "Add consumed drinks",
|
|
69
|
+
text: "Click on the drink icons you've had. They will accumulate in the list below.",
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
name: "Check safety times",
|
|
73
|
+
text: "Observe the estimated BAC and, most importantly, the time the liver will take to process all the ingested ethanol.",
|
|
74
|
+
},
|
|
75
|
+
];
|
|
76
|
+
|
|
77
|
+
const seo: AlcoholClearanceLocaleContent['seo'] = [
|
|
78
|
+
{
|
|
79
|
+
type: 'title',
|
|
80
|
+
text: 'Alcohol Metabolism: Science and Elimination',
|
|
81
|
+
level: 2
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
type: 'paragraph',
|
|
85
|
+
html: 'Understanding how our body processes ethanol is essential for safety and for mitigating hangovers. Our <strong>alcohol elimination calculator</strong> uses the recognized <strong>Widmark Formula</strong> to offer you a clear map of your metabolic state. Alcohol is not eliminated by sweating, drinking water, or exercising — only time and hepatic metabolism can reduce your blood alcohol concentration.'
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
type: 'diagnostic',
|
|
89
|
+
title: 'The Pharmacokinetics of BAC',
|
|
90
|
+
icon: 'mdi:gender-male-female',
|
|
91
|
+
variant: 'info',
|
|
92
|
+
badge: 'Biochemistry',
|
|
93
|
+
html: 'Alcohol distributes through body water. Factors like weight and the Widmark coefficient r (0.68 in men / 0.55 in women) determine the initial dilution of ethanol in the bloodstream. This is why two people of the same weight can have very different BAC readings after consuming the same drinks.'
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
type: 'title',
|
|
97
|
+
text: 'Hepatic Oxidation and Enzymes',
|
|
98
|
+
level: 2
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
type: 'paragraph',
|
|
102
|
+
html: 'The liver degrades 95% of alcohol through Alcohol Dehydrogenase (ADH). This process occurs at a constant rate (zero-order kinetics), which means it cannot be accelerated by exercise or coffee. The remaining 5% is eliminated through breath, urine, and sweat — which is the basis for breathalyzer testing in traffic enforcement.'
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
type: 'stats',
|
|
106
|
+
items: [
|
|
107
|
+
{ label: 'Elimination Rate', value: '0.15 g/L·h', icon: 'mdi:clock-fast' },
|
|
108
|
+
{ label: 'Gastric Absorption', value: '20% Ethanol', icon: 'mdi:stomach' },
|
|
109
|
+
{ label: 'Suggested Hydration', value: '1:1 Water/Drink', icon: 'mdi:water' }
|
|
110
|
+
],
|
|
111
|
+
columns: 3
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
type: 'proscons',
|
|
115
|
+
title: 'Myths vs Reality',
|
|
116
|
+
items: [
|
|
117
|
+
{ pro: 'Water and electrolytes before sleep reduce hangover severity by countering diuresis.', con: '' },
|
|
118
|
+
{ pro: '', con: 'Cold showers: They do not affect blood alcohol concentration at all.' },
|
|
119
|
+
{ pro: '', con: 'Coffee: Masks drowsiness but does not restore lost reflexes or cognitive function.' }
|
|
120
|
+
]
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
type: 'card',
|
|
124
|
+
title: 'What Causes a Hangover?',
|
|
125
|
+
icon: 'mdi:alert-decagram',
|
|
126
|
+
html: 'Known scientifically as veisalgia, a hangover is caused by systemic dehydration (vasopressin suppression by ethanol), acetaldehyde accumulation (a toxic metabolite), and a cytokine inflammatory immune response. The brain\'s glutamate rebound after alcohol suppression also contributes to anxiety and sensitivity to light and sound the morning after.'
|
|
127
|
+
},
|
|
128
|
+
{
|
|
129
|
+
type: 'tip',
|
|
130
|
+
title: 'Safety First: Know Your Limit',
|
|
131
|
+
html: 'A BAC of 0.05% measurably impairs judgment, tracking, and reaction time. Most countries set the legal driving limit between 0.05% and 0.08%. However, individual sensitivity varies significantly — age, medications, fatigue, and genetic ADH enzyme variants all shift how alcohol affects you personally. When in doubt, do not drive.'
|
|
132
|
+
},
|
|
133
|
+
{
|
|
134
|
+
type: 'title',
|
|
135
|
+
text: 'The Role of Food and Absorption Rate',
|
|
136
|
+
level: 2
|
|
137
|
+
},
|
|
138
|
+
{
|
|
139
|
+
type: 'paragraph',
|
|
140
|
+
html: 'Eating before or during drinking dramatically changes alcohol absorption kinetics. Food in the stomach — especially proteins and fats — slows gastric emptying, reducing the peak rate at which ethanol enters the bloodstream. A person who drinks on an empty stomach can reach a peak BAC 50% higher than the same person who ate a full meal before drinking the same amount. This is one of the most powerful variables that the Widmark formula cannot fully capture, which is why our calculator includes a disclaimer about theoretical estimation.'
|
|
141
|
+
},
|
|
142
|
+
{
|
|
143
|
+
type: 'paragraph',
|
|
144
|
+
html: 'The type of alcoholic beverage also matters beyond just ABV and volume. Carbonated mixers (tonic water, sparkling wine) accelerate gastric emptying and push alcohol into the bloodstream faster. Drinks with very high ABV (>25%) can temporarily inhibit stomach motility, slowing absorption. Sweet drinks can mask the perceived effect of alcohol, leading people to drink faster than they realize. These nuances are why real-world BAC can diverge from model predictions by 20-30% in both directions.'
|
|
145
|
+
}
|
|
146
|
+
];
|
|
147
|
+
|
|
148
|
+
const schemas: AlcoholClearanceLocaleContent['schemas'] = [
|
|
149
|
+
{
|
|
150
|
+
'@context': 'https://schema.org',
|
|
151
|
+
'@type': 'SoftwareApplication',
|
|
152
|
+
name: title,
|
|
153
|
+
description: description,
|
|
154
|
+
applicationCategory: 'HealthApplication',
|
|
155
|
+
operatingSystem: 'Web',
|
|
156
|
+
offers: { '@type': 'Offer', price: '0', priceCurrency: 'EUR' },
|
|
157
|
+
} as WithContext<SoftwareApplication>,
|
|
158
|
+
];
|
|
159
|
+
|
|
160
|
+
export const content: AlcoholClearanceLocaleContent = {
|
|
161
|
+
slug,
|
|
162
|
+
title,
|
|
163
|
+
description,
|
|
164
|
+
ui,
|
|
165
|
+
seo,
|
|
166
|
+
faqTitle,
|
|
167
|
+
faq,
|
|
168
|
+
bibliographyTitle,
|
|
169
|
+
bibliography,
|
|
170
|
+
howTo,
|
|
171
|
+
schemas,
|
|
172
|
+
};
|
|
@@ -0,0 +1,181 @@
|
|
|
1
|
+
import type { WithContext, SoftwareApplication } from 'schema-dts';
|
|
2
|
+
import type { AlcoholClearanceUI, AlcoholClearanceLocaleContent } from '../index';
|
|
3
|
+
|
|
4
|
+
const slug = 'calculadora-eliminacion-alcohol';
|
|
5
|
+
const title = 'Calculadora de Alcoholemia y Metabolismo';
|
|
6
|
+
const description = 'Estima tu tasa de alcoholemia (BAC) y el tiempo necesario para eliminar el alcohol de tu organismo basándote en la fórmula de Widmark.';
|
|
7
|
+
|
|
8
|
+
const ui: AlcoholClearanceUI = {
|
|
9
|
+
biologicalSexLabel: 'Sexo Biológico',
|
|
10
|
+
weightLabel: 'Peso Corporal',
|
|
11
|
+
kgUnit: 'kg',
|
|
12
|
+
addDrinkLabel: 'Añadir Bebida',
|
|
13
|
+
beerLabel: 'Cerveza',
|
|
14
|
+
wineLabel: 'Vino',
|
|
15
|
+
spiritLabel: 'Copa',
|
|
16
|
+
shotLabel: 'Chupito',
|
|
17
|
+
accumulatedLabel: 'Consumo Acumulado',
|
|
18
|
+
emptyListLabel: 'Tu lista está vacía',
|
|
19
|
+
emptySubLabel: 'Selecciona bebidas para calcular.',
|
|
20
|
+
estimatedBacLabel: 'Alcoholemia Estimada',
|
|
21
|
+
bacUnit: 'BAC',
|
|
22
|
+
timeToZeroLabel: 'para estar a 0.0',
|
|
23
|
+
waterAdviceLabel: 'Agua (Antes de dormir)',
|
|
24
|
+
pillAdviceLabel: 'Suplementos',
|
|
25
|
+
noneAdvice: 'Sin necesidad',
|
|
26
|
+
hydrationAdvice: 'Prioriza Hidratación',
|
|
27
|
+
electrolytesAdvice: 'Electrolitos + Vit. B',
|
|
28
|
+
disclaimerText: 'Esta calculadora es una estimación teórica. Metabolismo y comida varían el resultado. Si bebes, no conduzcas.',
|
|
29
|
+
drinkUnit: 'bebida',
|
|
30
|
+
drinksUnit: 'bebidas'
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
const faqTitle = 'Preguntas Frecuentes';
|
|
34
|
+
const bibliographyTitle = 'Bibliografía y Fuentes';
|
|
35
|
+
|
|
36
|
+
const faq: AlcoholClearanceLocaleContent['faq'] = [
|
|
37
|
+
{
|
|
38
|
+
question: "¿Qué es la fórmula de Widmark?",
|
|
39
|
+
answer: "Es el modelo estándar de farmacocinética que relaciona la cantidad de alcohol ingerido con el peso corporal y un factor de distribución según el sexo biológico.",
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
question: "¿Se puede acelerar la eliminación con café?",
|
|
43
|
+
answer: "No. El hígado elimina el alcohol a una tasa constante (aprox. 0.15 g/L por hora). El café puede espabilarte, pero no reduce el alcohol en sangre.",
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
question: "¿Por qué el sexo biológico afecta al cálculo de la alcoholemia?",
|
|
47
|
+
answer: "El sexo biológico influye en el factor de Widmark 'r', que representa el agua corporal total como fracción del peso. Los hombres tienen de media r=0.68 porque tienen proporcionalmente más agua corporal. Las mujeres tienen de media r=0.55 debido a un mayor porcentaje de grasa corporal, que retiene menos el alcohol. Esto significa que, con las mismas bebidas y peso, las mujeres tendrán una tasa de alcoholemia más alta.",
|
|
48
|
+
},
|
|
49
|
+
];
|
|
50
|
+
|
|
51
|
+
const howTo: AlcoholClearanceLocaleContent['howTo'] = [
|
|
52
|
+
{
|
|
53
|
+
name: "Configurar tu perfil",
|
|
54
|
+
text: "Selecciona tu sexo biológico (influye en el porcentaje de agua corporal) y tu peso actual.",
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
name: "Añadir las bebidas consumidas",
|
|
58
|
+
text: "Ve pulsando sobre los iconos de las bebidas que has tomado. Se irán acumulando en la lista inferior.",
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
name: "Revisar los tiempos de seguridad",
|
|
62
|
+
text: "Observa el BAC estimado y, sobre todo, el tiempo que el hígado tardará en procesar todo el etanol ingerido.",
|
|
63
|
+
},
|
|
64
|
+
];
|
|
65
|
+
|
|
66
|
+
const bibliography: AlcoholClearanceLocaleContent['bibliography'] = [
|
|
67
|
+
{
|
|
68
|
+
name: "Widmark's Formula for BAC Calculation - Forensic Science Lab",
|
|
69
|
+
url: "https://www.forensic-science.com/widmark-formula",
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
name: "Alcohol Metabolism: How the body processes alcohol - NIH",
|
|
73
|
+
url: "https://www.niaaa.nih.gov/publications/alcohol-metabolism",
|
|
74
|
+
},
|
|
75
|
+
];
|
|
76
|
+
|
|
77
|
+
const seo: AlcoholClearanceLocaleContent['seo'] = [
|
|
78
|
+
{
|
|
79
|
+
type: 'title',
|
|
80
|
+
text: 'Metabolismo del Alcohol: Ciencia y Eliminación',
|
|
81
|
+
level: 2
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
type: 'paragraph',
|
|
85
|
+
html: 'Comprender cómo nuestro organismo procesa el etanol es esencial para la seguridad y para mitigar la resaca. Nuestra <strong>calculadora de eliminación de alcohol</strong> utiliza la reconocida <strong>Fórmula de Widmark</strong> para ofrecerte un mapa claro de tu estado metabólico.'
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
type: 'diagnostic',
|
|
89
|
+
title: 'La Farmacocinética de la Alcoholemia',
|
|
90
|
+
icon: 'mdi:gender-male-female',
|
|
91
|
+
variant: 'info',
|
|
92
|
+
badge: 'Bioquímica',
|
|
93
|
+
html: 'El alcohol se distribuye por el agua corporal. Factores como el peso y el coeficiente r (0.68 en hombres / 0.55 en mujeres) determinan la dilución inicial del etanol en el torrente sanguíneo.'
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
type: 'title',
|
|
97
|
+
text: 'Oxidación Hepática y Enzimas',
|
|
98
|
+
level: 2
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
type: 'paragraph',
|
|
102
|
+
html: 'El hígado degrada el 95% del alcohol mediante la Alcohol Deshidrogenasa (ADH). Este proceso ocurre a una velocidad constante (cinética de orden cero), lo que significa que no se puede acelerar con ejercicio o café.'
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
type: 'stats',
|
|
106
|
+
items: [
|
|
107
|
+
{ label: 'Tasa de Eliminación', value: '0.15 g/L·h', icon: 'mdi:clock-fast' },
|
|
108
|
+
{ label: 'Absorción Gástrica', value: '20% Etanol', icon: 'mdi:stomach' },
|
|
109
|
+
{ label: 'Hidratación Sugerida', value: '1:1 Agua/Copa', icon: 'mdi:water' }
|
|
110
|
+
],
|
|
111
|
+
columns: 3
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
type: 'proscons',
|
|
115
|
+
title: 'Mitos vs Realidad',
|
|
116
|
+
items: [
|
|
117
|
+
{ pro: 'El agua y los electrolitos antes de dormir reducen la severidad de la resaca.', con: '' },
|
|
118
|
+
{ pro: '', con: 'Duchas frías: No afectan a la concentración de alcohol en sangre.' },
|
|
119
|
+
{ pro: '', con: 'Café: Enmascara la somnolencia pero no recupera los reflejos perdidos.' }
|
|
120
|
+
]
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
type: 'card',
|
|
124
|
+
title: '¿Qué causa la resaca?',
|
|
125
|
+
icon: 'mdi:alert-decagram',
|
|
126
|
+
html: 'Conocida científicamente como veisalgia, se produce por deshidratación sistémica (supresión de vasopresina por el etanol), acumulación de acetaldehído (un metabolito tóxico) y una respuesta inflamatoria citoquínica del sistema inmune. El rebote del glutamato cerebral tras la supresión alcohólica también contribuye a la ansiedad y sensibilidad a la luz al día siguiente.'
|
|
127
|
+
},
|
|
128
|
+
{
|
|
129
|
+
type: 'tip',
|
|
130
|
+
title: 'Seguridad Primero: Conoce tu Límite',
|
|
131
|
+
html: 'Una alcoholemia de 0.05% altera mediblemente el juicio, el seguimiento visual y el tiempo de reacción. La mayoría de países fijan el límite legal de conducción entre 0.05% y 0.08%. Sin embargo, la sensibilidad individual varía significativamente — la edad, los medicamentos, la fatiga y las variantes genéticas de la enzima ADH influyen en cómo el alcohol te afecta personalmente. Ante la duda, no conduzcas.'
|
|
132
|
+
},
|
|
133
|
+
{
|
|
134
|
+
type: 'summary',
|
|
135
|
+
title: '¿Para quién es esta herramienta?',
|
|
136
|
+
items: [
|
|
137
|
+
'Conductores designados: Calcula si un amigo ha eliminado suficiente alcohol antes de conducir.',
|
|
138
|
+
'Personas responsables: Comprende cuánto tiempo necesita tu cuerpo para procesar diferentes cantidades.',
|
|
139
|
+
'Profesionales de la salud: Utiliza la fórmula de Widmark como referencia educativa para pacientes.'
|
|
140
|
+
]
|
|
141
|
+
},
|
|
142
|
+
{
|
|
143
|
+
type: 'title',
|
|
144
|
+
text: 'El Papel de la Comida y la Tasa de Absorción',
|
|
145
|
+
level: 2
|
|
146
|
+
},
|
|
147
|
+
{
|
|
148
|
+
type: 'paragraph',
|
|
149
|
+
html: 'Comer antes o durante el consumo de alcohol cambia drásticamente la cinética de absorción. La comida en el estómago — especialmente proteínas y grasas — ralentiza el vaciado gástrico, reduciendo la tasa máxima a la que el etanol entra en el torrente sanguíneo. Una persona que bebe con el estómago vacío puede alcanzar un BAC máximo un 50% más alto que la misma persona que comió antes de beber la misma cantidad. Esta es una de las variables más poderosas que la fórmula de Widmark no puede capturar completamente, razón por la que nuestra calculadora incluye un aviso sobre la estimación teórica.'
|
|
150
|
+
},
|
|
151
|
+
{
|
|
152
|
+
type: 'paragraph',
|
|
153
|
+
html: 'El tipo de bebida alcohólica también importa más allá del ABV y el volumen. Los mezcladores con gas (tónica, cava) aceleran el vaciado gástrico y empujan el alcohol al torrente sanguíneo más rápido. Las bebidas con ABV muy alto (>25%) pueden inhibir temporalmente la motilidad gástrica, ralentizando la absorción. Las bebidas dulces pueden enmascarar el efecto percibido del alcohol, llevando a las personas a beber más rápido de lo que se dan cuenta. Estas sutilezas explican por qué el BAC real puede desviarse de las predicciones del modelo en un 20-30% en ambas direcciones.'
|
|
154
|
+
}
|
|
155
|
+
];
|
|
156
|
+
|
|
157
|
+
const schemas: AlcoholClearanceLocaleContent['schemas'] = [
|
|
158
|
+
{
|
|
159
|
+
'@context': 'https://schema.org',
|
|
160
|
+
'@type': 'SoftwareApplication',
|
|
161
|
+
name: title,
|
|
162
|
+
description: description,
|
|
163
|
+
applicationCategory: 'HealthApplication',
|
|
164
|
+
operatingSystem: 'Web',
|
|
165
|
+
offers: { '@type': 'Offer', price: '0', priceCurrency: 'EUR' },
|
|
166
|
+
} as WithContext<SoftwareApplication>,
|
|
167
|
+
];
|
|
168
|
+
|
|
169
|
+
export const content: AlcoholClearanceLocaleContent = {
|
|
170
|
+
slug,
|
|
171
|
+
title,
|
|
172
|
+
description,
|
|
173
|
+
ui,
|
|
174
|
+
seo,
|
|
175
|
+
faqTitle,
|
|
176
|
+
faq,
|
|
177
|
+
bibliographyTitle,
|
|
178
|
+
bibliography,
|
|
179
|
+
howTo,
|
|
180
|
+
schemas,
|
|
181
|
+
};
|
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
import type { WithContext, SoftwareApplication } from 'schema-dts';
|
|
2
|
+
import type { AlcoholClearanceUI, AlcoholClearanceLocaleContent } from '../index';
|
|
3
|
+
|
|
4
|
+
const slug = 'calculateur-elimination-alcohol';
|
|
5
|
+
const title = 'Calculateur d\'Alcooolémie et Métabolisme';
|
|
6
|
+
const description = 'Estimez votre taux d\'alcoolémie (BAC) et le temps nécessaire à votre corps pour éliminer l\'alcool selon la formule de Widmark.';
|
|
7
|
+
|
|
8
|
+
const ui: AlcoholClearanceUI = {
|
|
9
|
+
biologicalSexLabel: 'Sexe Biologique',
|
|
10
|
+
weightLabel: 'Poids Corporel',
|
|
11
|
+
kgUnit: 'kg',
|
|
12
|
+
addDrinkLabel: 'Ajouter une Boisson',
|
|
13
|
+
beerLabel: 'Bière',
|
|
14
|
+
wineLabel: 'Vin',
|
|
15
|
+
spiritLabel: 'Cocktail',
|
|
16
|
+
shotLabel: 'Shot',
|
|
17
|
+
accumulatedLabel: 'Consommation Cumulée',
|
|
18
|
+
emptyListLabel: 'Votre liste est vide',
|
|
19
|
+
emptySubLabel: 'Sélectionnez des boissons pour calculer.',
|
|
20
|
+
estimatedBacLabel: 'Alcoolémie Estimée',
|
|
21
|
+
bacUnit: 'BAC',
|
|
22
|
+
timeToZeroLabel: 'pour être à 0.0',
|
|
23
|
+
waterAdviceLabel: 'Eau (Avant de dormir)',
|
|
24
|
+
pillAdviceLabel: 'Suppléments',
|
|
25
|
+
noneAdvice: 'Pas besoin',
|
|
26
|
+
hydrationAdvice: 'Priorité Hydratation',
|
|
27
|
+
electrolytesAdvice: 'Électrolytes + Vit. B',
|
|
28
|
+
disclaimerText: 'Ce calculateur est une estimation théorique. Le métabolisme et l\'alimentation font varier le résultat. Si vous buvez, ne conduisez pas.',
|
|
29
|
+
drinkUnit: 'boisson',
|
|
30
|
+
drinksUnit: 'boissons'
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
const faqTitle = 'Foire Aux Questions';
|
|
34
|
+
const bibliographyTitle = 'Bibliographie & Sources';
|
|
35
|
+
|
|
36
|
+
const faq: AlcoholClearanceLocaleContent['faq'] = [
|
|
37
|
+
{
|
|
38
|
+
question: "Qu'est-ce que la formule de Widmark ?",
|
|
39
|
+
answer: "C'est le modèle standard de pharmacocinétique qui relie la quantité d'alcool ingérée au poids corporel et à un facteur de distribution selon le sexe biologique.",
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
question: "Le café peut-il accélérer l'élimination de l'alcool ?",
|
|
43
|
+
answer: "Non. Le foie élimine l'alcool à un taux constant (environ 0,15 g/L par heure). Le café peut vous réveiller, mais ne réduit pas le taux d'alcool dans le sang.",
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
question: "Pourquoi le sexe biologique affecte-t-il le calcul de l'alcoolémie ?",
|
|
47
|
+
answer: "Le sexe biologique influence le facteur de Widmark 'r', qui représente l'eau corporelle totale en fraction du poids. Les hommes ont en moyenne r=0,68 car ils ont proportionnellement plus d'eau corporelle. Les femmes ont en moyenne r=0,55 en raison d'un pourcentage plus élevé de graisses corporelles, qui retiennent moins l'alcool. Ainsi, à boissons et poids égaux, les femmes auront un BAC plus élevé.",
|
|
48
|
+
},
|
|
49
|
+
];
|
|
50
|
+
|
|
51
|
+
const bibliography: AlcoholClearanceLocaleContent['bibliography'] = [
|
|
52
|
+
{
|
|
53
|
+
name: "Widmark's Formula for BAC Calculation - Forensic Science Lab",
|
|
54
|
+
url: "https://www.forensic-science.com/widmark-formula",
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
name: "Alcohol Metabolism: How the body processes alcohol - NIH",
|
|
58
|
+
url: "https://www.niaaa.nih.gov/publications/alcohol-metabolism",
|
|
59
|
+
},
|
|
60
|
+
];
|
|
61
|
+
|
|
62
|
+
const howTo: AlcoholClearanceLocaleContent['howTo'] = [
|
|
63
|
+
{
|
|
64
|
+
name: "Configurer votre profil",
|
|
65
|
+
text: "Sélectionnez votre sexe biologique (influence le pourcentage d'eau corporelle) et votre poids actuel.",
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
name: "Ajouter les boissons consommées",
|
|
69
|
+
text: "Cliquez sur les icônes des boissons que vous avez prises. Elles s'accumuleront dans la liste ci-dessous.",
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
name: "Vérifier les temps de sécurité",
|
|
73
|
+
text: "Observez le BAC estimé et, surtout, le temps que le foie mettra à traiter tout l'éthanol ingéré.",
|
|
74
|
+
},
|
|
75
|
+
];
|
|
76
|
+
|
|
77
|
+
const seo: AlcoholClearanceLocaleContent['seo'] = [
|
|
78
|
+
{
|
|
79
|
+
type: 'title',
|
|
80
|
+
text: 'Métabolisme de l\'Alcool : Science et Élimination',
|
|
81
|
+
level: 2
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
type: 'paragraph',
|
|
85
|
+
html: 'Comprendre comment notre corps traite l\'éthanol est essentiel pour la sécurité et pour atténuer les gueules de bois. Notre <strong>calculateur d\'élimination d\'alcool</strong> utilise la célèbre <strong>Formule de Widmark</strong> pour vous offrir une carte claire de votre état métabolique. L\'alcool ne s\'élimine pas en transpirant, en buvant de l\'eau ou en faisant de l\'exercice — seuls le temps et le métabolisme hépatique peuvent réduire votre alcoolémie.'
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
type: 'diagnostic',
|
|
89
|
+
title: 'La Pharmacocinétique de l\'Alcoolémie',
|
|
90
|
+
icon: 'mdi:gender-male-female',
|
|
91
|
+
variant: 'info',
|
|
92
|
+
badge: 'Biochimie',
|
|
93
|
+
html: 'L\'alcool se distribue dans l\'eau corporelle. Des facteurs comme le poids et le coefficient de Widmark r (0,68 chez les hommes / 0,55 chez les femmes) déterminent la dilution initiale de l\'éthanol dans le sang. C\'est pourquoi deux personnes du même poids peuvent avoir des alcoolémies très différentes après avoir consommé les mêmes boissons.'
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
type: 'title',
|
|
97
|
+
text: 'Oxydation Hépatique et Enzymes',
|
|
98
|
+
level: 2
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
type: 'paragraph',
|
|
102
|
+
html: 'Le foie dégrade 95 % de l\'alcool via l\'Alcool Déshydrogénase (ADH). Ce processus se déroule à une vitesse constante (cinétique d\'ordre zéro), ce qui signifie qu\'il ne peut pas être accéléré par l\'exercice ou le café. Les 5 % restants sont éliminés par la respiration, l\'urine et la transpiration — c\'est la base des éthylotests utilisés dans le contrôle routier.'
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
type: 'stats',
|
|
106
|
+
items: [
|
|
107
|
+
{ label: 'Taux d\'Élimination', value: '0,15 g/L·h', icon: 'mdi:clock-fast' },
|
|
108
|
+
{ label: 'Absorption Gastrique', value: '20% Éthanol', icon: 'mdi:stomach' },
|
|
109
|
+
{ label: 'Hydratation Suggérée', value: '1:1 Eau/Verre', icon: 'mdi:water' }
|
|
110
|
+
],
|
|
111
|
+
columns: 3
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
type: 'proscons',
|
|
115
|
+
title: 'Mythes vs Réalité',
|
|
116
|
+
items: [
|
|
117
|
+
{ pro: 'L\'eau et les électrolytes avant de dormir réduisent la sévérité de la gueule de bois.', con: '' },
|
|
118
|
+
{ pro: '', con: 'Douches froides : Elles n\'affectent pas du tout le taux d\'alcoolémie.' },
|
|
119
|
+
{ pro: '', con: 'Café : Masque la somnolence mais ne restaure pas les réflexes ni les fonctions cognitives.' }
|
|
120
|
+
]
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
type: 'card',
|
|
124
|
+
title: 'Qu\'est-ce qui Cause la Gueule de Bois ?',
|
|
125
|
+
icon: 'mdi:alert-decagram',
|
|
126
|
+
html: 'Connue scientifiquement sous le nom de véisalgie, la gueule de bois est causée par une déshydratation systémique (suppression de la vasopressine par l\'éthanol), l\'accumulation d\'acétaldéhyde (un métabolite toxique) et une réponse inflammatoire immunitaire à cytokines. Le rebond du glutamate cérébral après la suppression par l\'alcool contribue également à l\'anxiété et à la sensibilité à la lumière.'
|
|
127
|
+
},
|
|
128
|
+
{
|
|
129
|
+
type: 'tip',
|
|
130
|
+
title: 'Sécurité Avant Tout : Connaissez Votre Limite',
|
|
131
|
+
html: 'Un BAC de 0,05 % altère mesuralement le jugement, la coordination et le temps de réaction. La plupart des pays fixent la limite légale de conduite entre 0,05 % et 0,08 %. Cependant, la sensibilité individuelle varie considérablement — l\'âge, les médicaments, la fatigue et les variants génétiques de l\'enzyme ADH influencent tous la façon dont l\'alcool vous affecte personnellement. En cas de doute, ne conduisez pas.'
|
|
132
|
+
},
|
|
133
|
+
{
|
|
134
|
+
type: 'paragraph',
|
|
135
|
+
html: 'Manger avant ou pendant la consommation d\'alcool modifie considérablement la cinétique d\'absorption. La nourriture dans l\'estomac — notamment les protéines et les graisses — ralentit la vidange gastrique, réduisant le taux de pic auquel l\'éthanol entre dans le sang. Une personne qui boit à jeun peut atteindre un BAC maximal 50 % plus élevé que la même personne ayant mangé un repas complet avant de boire la même quantité. C\'est l\'une des variables les plus puissantes que la formule de Widmark ne peut pas pleinement capturer, raison pour laquelle notre calculateur inclut une clause de non-responsabilité sur l\'estimation théorique.'
|
|
136
|
+
}
|
|
137
|
+
];
|
|
138
|
+
|
|
139
|
+
const schemas: AlcoholClearanceLocaleContent['schemas'] = [
|
|
140
|
+
{
|
|
141
|
+
'@context': 'https://schema.org',
|
|
142
|
+
'@type': 'SoftwareApplication',
|
|
143
|
+
name: title,
|
|
144
|
+
description: description,
|
|
145
|
+
applicationCategory: 'HealthApplication',
|
|
146
|
+
operatingSystem: 'Web',
|
|
147
|
+
offers: { '@type': 'Offer', price: '0', priceCurrency: 'EUR' },
|
|
148
|
+
} as WithContext<SoftwareApplication>,
|
|
149
|
+
];
|
|
150
|
+
|
|
151
|
+
export const content: AlcoholClearanceLocaleContent = {
|
|
152
|
+
slug,
|
|
153
|
+
title,
|
|
154
|
+
description,
|
|
155
|
+
ui,
|
|
156
|
+
seo,
|
|
157
|
+
faqTitle,
|
|
158
|
+
faq,
|
|
159
|
+
bibliographyTitle,
|
|
160
|
+
bibliography,
|
|
161
|
+
howTo,
|
|
162
|
+
schemas,
|
|
163
|
+
};
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import type { AlcoholToolEntry, ToolLocaleContent, ToolDefinition } from '../../types';
|
|
2
|
+
import AlcoholClearanceCalculator from './component.astro';
|
|
3
|
+
|
|
4
|
+
export interface AlcoholClearanceUI {
|
|
5
|
+
[key: string]: string;
|
|
6
|
+
biologicalSexLabel: string;
|
|
7
|
+
weightLabel: string;
|
|
8
|
+
kgUnit: string;
|
|
9
|
+
addDrinkLabel: string;
|
|
10
|
+
beerLabel: string;
|
|
11
|
+
wineLabel: string;
|
|
12
|
+
spiritLabel: string;
|
|
13
|
+
shotLabel: string;
|
|
14
|
+
accumulatedLabel: string;
|
|
15
|
+
emptyListLabel: string;
|
|
16
|
+
emptySubLabel: string;
|
|
17
|
+
estimatedBacLabel: string;
|
|
18
|
+
bacUnit: string;
|
|
19
|
+
timeToZeroLabel: string;
|
|
20
|
+
waterAdviceLabel: string;
|
|
21
|
+
pillAdviceLabel: string;
|
|
22
|
+
noneAdvice: string;
|
|
23
|
+
hydrationAdvice: string;
|
|
24
|
+
electrolytesAdvice: string;
|
|
25
|
+
disclaimerText: string;
|
|
26
|
+
drinkUnit: string;
|
|
27
|
+
drinksUnit: string;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export type AlcoholClearanceLocaleContent = ToolLocaleContent<AlcoholClearanceUI>;
|
|
31
|
+
|
|
32
|
+
export const alcoholClearance: AlcoholToolEntry<AlcoholClearanceUI> = {
|
|
33
|
+
id: 'alcohol-clearance',
|
|
34
|
+
icons: {
|
|
35
|
+
bg: 'mdi:account-alert',
|
|
36
|
+
fg: 'mdi:glass-cocktail',
|
|
37
|
+
},
|
|
38
|
+
i18n: {
|
|
39
|
+
es: () => import('./i18n/es').then((m) => m.content),
|
|
40
|
+
en: () => import('./i18n/en').then((m) => m.content),
|
|
41
|
+
fr: () => import('./i18n/fr').then((m) => m.content),
|
|
42
|
+
},
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
export { AlcoholClearanceCalculator };
|
|
46
|
+
|
|
47
|
+
export const ALCOHOL_CLEARANCE_TOOL: ToolDefinition = {
|
|
48
|
+
entry: alcoholClearance as AlcoholToolEntry<Record<string, string>>,
|
|
49
|
+
Component: AlcoholClearanceCalculator,
|
|
50
|
+
};
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
export interface BACResults {
|
|
2
|
+
bacPermille: number;
|
|
3
|
+
bacPercent: number;
|
|
4
|
+
hoursToZero: number;
|
|
5
|
+
minutesToZero: number;
|
|
6
|
+
waterMl: number;
|
|
7
|
+
advice: string;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
function emptyBACResults(): BACResults {
|
|
11
|
+
return {
|
|
12
|
+
bacPermille: 0,
|
|
13
|
+
bacPercent: 0,
|
|
14
|
+
hoursToZero: 0,
|
|
15
|
+
minutesToZero: 0,
|
|
16
|
+
waterMl: 0,
|
|
17
|
+
advice: 'none'
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
function computeAdvice(totalGrams: number): string {
|
|
22
|
+
if (totalGrams > 30) return 'electrolytes';
|
|
23
|
+
return 'hydration';
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export function calculateAlcoholClearance(
|
|
27
|
+
totalGrams: number,
|
|
28
|
+
weight: number,
|
|
29
|
+
r: number,
|
|
30
|
+
drinkCount: number
|
|
31
|
+
): BACResults {
|
|
32
|
+
if (totalGrams <= 0) return emptyBACResults();
|
|
33
|
+
|
|
34
|
+
const bacPermille = totalGrams / (weight * r);
|
|
35
|
+
const bacPercent = bacPermille / 10;
|
|
36
|
+
const hours = bacPermille / 0.15;
|
|
37
|
+
const h = Math.floor(hours);
|
|
38
|
+
const m = Math.floor((hours - h) * 60);
|
|
39
|
+
|
|
40
|
+
return {
|
|
41
|
+
bacPermille,
|
|
42
|
+
bacPercent,
|
|
43
|
+
hoursToZero: h,
|
|
44
|
+
minutesToZero: m,
|
|
45
|
+
waterMl: drinkCount * 250,
|
|
46
|
+
advice: computeAdvice(totalGrams)
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
export const DRINK_TEMPLATES = {
|
|
51
|
+
beer: { name: 'beer', size: 330, abv: 0.05 },
|
|
52
|
+
wine: { name: 'wine', size: 150, abv: 0.12 },
|
|
53
|
+
spirit: { name: 'spirit', size: 50, abv: 0.4 },
|
|
54
|
+
shot: { name: 'shot', size: 40, abv: 0.4 },
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
export function getAlcoholGrams(sizeMl: number, abv: number): number {
|
|
58
|
+
return sizeMl * abv * 0.8;
|
|
59
|
+
}
|