2 lines
7.8 KiB
JavaScript
Executable file
2 lines
7.8 KiB
JavaScript
Executable file
import{r as n,j as e,T as w,a as y}from"./0-vendor-react-DWOJpYrt.js";import{C as u,c as p,d as f,e as j,I as C}from"./page-comunicacion-DmHQUHoW.js";import{L as b,R as K}from"./page-herramientas-DcKR8MlC.js";import{B as m}from"./page-ajustes-DgawOEJM.js";import"./1-vendor-utils-Delnuc0l.js";import"./2-vendor-markdown-BQlHAcA7.js";const N=[{id:"grey",colorName:"Gris",colorHex:"#9CA3AF",lengthMinCm:46,lengthMaxCm:59,weightMinKg:3,weightMaxKg:5,equipment:{ettUncuffed:"3.0",ettCuffed:"3.0",laryngoscopeBlade:"0",suctionCatheter:"6-8 Fr",ivCatheter:"24G"}},{id:"pink",colorName:"Rosa",colorHex:"#F9A8D4",lengthMinCm:60,lengthMaxCm:66,weightMinKg:5,weightMaxKg:6,equipment:{ettUncuffed:"3.5",ettCuffed:"3.0",laryngoscopeBlade:"1",suctionCatheter:"8 Fr",ivCatheter:"24G"}},{id:"red",colorName:"Rojo",colorHex:"#F87171",lengthMinCm:67,lengthMaxCm:74,weightMinKg:6,weightMaxKg:8,equipment:{ettUncuffed:"3.5-4.0",ettCuffed:"3.5",laryngoscopeBlade:"1",suctionCatheter:"8 Fr",ivCatheter:"22G"}},{id:"purple",colorName:"Púrpura",colorHex:"#A78BFA",lengthMinCm:75,lengthMaxCm:84,weightMinKg:8,weightMaxKg:10,equipment:{ettUncuffed:"4.0",ettCuffed:"3.5",laryngoscopeBlade:"1",suctionCatheter:"8-10 Fr",ivCatheter:"22G"}},{id:"yellow",colorName:"Amarillo",colorHex:"#FACC15",lengthMinCm:85,lengthMaxCm:94,weightMinKg:10,weightMaxKg:12,equipment:{ettUncuffed:"4.5",ettCuffed:"4.0",laryngoscopeBlade:"2",suctionCatheter:"10 Fr",ivCatheter:"22G"}},{id:"white",colorName:"Blanco",colorHex:"#E5E7EB",lengthMinCm:95,lengthMaxCm:104,weightMinKg:12,weightMaxKg:14,equipment:{ettUncuffed:"5.0",ettCuffed:"4.5",laryngoscopeBlade:"2",suctionCatheter:"10 Fr",ivCatheter:"20-22G"}},{id:"blue",colorName:"Azul",colorHex:"#60A5FA",lengthMinCm:105,lengthMaxCm:114,weightMinKg:14,weightMaxKg:18,equipment:{ettUncuffed:"5.5",ettCuffed:"5.0",laryngoscopeBlade:"2",suctionCatheter:"12 Fr",ivCatheter:"20G"}},{id:"orange",colorName:"Naranja",colorHex:"#FDBA74",lengthMinCm:115,lengthMaxCm:124,weightMinKg:18,weightMaxKg:23,equipment:{ettUncuffed:"6.0",ettCuffed:"5.5",laryngoscopeBlade:"3",suctionCatheter:"12 Fr",ivCatheter:"20G"}},{id:"green",colorName:"Verde",colorHex:"#4ADE80",lengthMinCm:125,lengthMaxCm:134,weightMinKg:23,weightMaxKg:29,equipment:{ettUncuffed:"6.5",ettCuffed:"6.0",laryngoscopeBlade:"3",suctionCatheter:"12-14 Fr",ivCatheter:"18-20G"}}],B=r=>N.find(s=>r>=s.lengthMinCm&&r<=s.lengthMaxCm),F=r=>N.find(s=>r>=s.weightMinKg&&r<=s.weightMaxKg),A=r=>Math.round((r.weightMinKg+r.weightMaxKg)/2*10)/10,G=()=>{const[r,s]=n.useState(""),[g,h]=n.useState(""),[a,x]=n.useState("length"),o=Number(r),i=Number(g),d=n.useMemo(()=>{if(!(!Number.isFinite(o)||o<=0))return B(o)},[o]),l=n.useMemo(()=>{if(!(!Number.isFinite(i)||i<=0))return F(i)},[i]),t=a==="length"?d:l,M=d&&l&&d.id!==l.id,v=()=>{s(""),h("")};return e.jsxs("div",{className:"space-y-6",children:[e.jsxs("header",{className:"space-y-2",children:[e.jsx("h1",{className:"text-xl font-semibold text-foreground",children:"Pediatría rápida (Broselow)"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"Estimación rápida por talla/peso para dosis y material. Usar siempre cinta Broselow oficial y protocolos locales."})]}),e.jsxs(u,{children:[e.jsxs(p,{className:"space-y-1",children:[e.jsx(f,{className:"text-base",children:"Entrada principal"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"Selecciona el modo (talla o peso) y completa el valor disponible."})]}),e.jsxs(j,{className:"space-y-4",children:[e.jsxs("div",{className:"flex flex-wrap gap-2",children:[e.jsx(m,{type:"button",variant:a==="length"?"default":"outline",onClick:()=>x("length"),children:"Por talla"}),e.jsx(m,{type:"button",variant:a==="weight"?"default":"outline",onClick:()=>x("weight"),children:"Por peso"}),e.jsx(m,{type:"button",variant:"outline",onClick:v,children:"Limpiar"})]}),e.jsxs("div",{className:"grid gap-4 md:grid-cols-2",children:[e.jsxs("div",{children:[e.jsx(b,{htmlFor:"length",children:"Talla (cm)"}),e.jsx(C,{id:"length",type:"number",inputMode:"decimal",placeholder:"Ej: 92",value:r,onChange:c=>s(c.target.value),disabled:a!=="length"})]}),e.jsxs("div",{children:[e.jsx(b,{htmlFor:"weight",children:"Peso (kg)"}),e.jsx(C,{id:"weight",type:"number",inputMode:"decimal",placeholder:"Ej: 12",value:g,onChange:c=>h(c.target.value),disabled:a!=="weight"})]})]}),t?e.jsxs("div",{className:"rounded-lg border border-border p-4 space-y-4",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-xs text-muted-foreground",children:"Zona"}),e.jsx("p",{className:"text-lg font-semibold text-foreground",children:t.colorName})]}),e.jsx("span",{className:"h-8 w-8 rounded-full border border-border",style:{backgroundColor:t.colorHex}})]}),e.jsxs("div",{className:"grid gap-3 md:grid-cols-3",children:[e.jsxs("div",{className:"rounded-md bg-muted/40 p-3",children:[e.jsx("p",{className:"text-xs text-muted-foreground",children:"Rango talla"}),e.jsxs("p",{className:"text-sm font-semibold text-foreground",children:[t.lengthMinCm,"-",t.lengthMaxCm," cm"]})]}),e.jsxs("div",{className:"rounded-md bg-muted/40 p-3",children:[e.jsx("p",{className:"text-xs text-muted-foreground",children:"Rango peso"}),e.jsxs("p",{className:"text-sm font-semibold text-foreground",children:[t.weightMinKg,"-",t.weightMaxKg," kg"]})]}),e.jsxs("div",{className:"rounded-md bg-muted/40 p-3",children:[e.jsx("p",{className:"text-xs text-muted-foreground",children:"Peso estimado"}),e.jsxs("p",{className:"text-sm font-semibold text-foreground",children:[A(t)," kg"]})]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx("p",{className:"text-sm font-semibold text-foreground",children:"Material sugerido"}),e.jsxs("div",{className:"grid gap-3 md:grid-cols-2",children:[e.jsxs("div",{className:"rounded-md border border-border/60 p-3 text-sm text-muted-foreground",children:[e.jsx("strong",{children:"TET sin balón:"})," ",t.equipment.ettUncuffed]}),e.jsxs("div",{className:"rounded-md border border-border/60 p-3 text-sm text-muted-foreground",children:[e.jsx("strong",{children:"TET con balón:"})," ",t.equipment.ettCuffed]}),e.jsxs("div",{className:"rounded-md border border-border/60 p-3 text-sm text-muted-foreground",children:[e.jsx("strong",{children:"Hoja laringo:"})," ",t.equipment.laryngoscopeBlade]}),e.jsxs("div",{className:"rounded-md border border-border/60 p-3 text-sm text-muted-foreground",children:[e.jsx("strong",{children:"Sonda aspiración:"})," ",t.equipment.suctionCatheter]}),e.jsxs("div",{className:"rounded-md border border-border/60 p-3 text-sm text-muted-foreground",children:[e.jsx("strong",{children:"Catéter IV:"})," ",t.equipment.ivCatheter]})]})]})]}):e.jsx("div",{className:"rounded-lg border border-border/60 bg-muted/30 p-3 text-sm text-muted-foreground",children:"Introduce una talla (46-134 cm) o un peso (3-29 kg) para obtener la zona."}),M&&e.jsx("div",{className:"rounded-lg border border-[hsl(var(--emergency-medium))]/30 bg-[hsl(var(--emergency-medium))]/10 p-3 text-sm text-[hsl(var(--emergency-medium))]",children:e.jsxs("div",{className:"flex items-start gap-2",children:[e.jsx(w,{className:"w-4 h-4 mt-0.5"}),e.jsxs("div",{children:[e.jsx("p",{className:"font-semibold",children:"Talla y peso no coinciden"}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"Si tienes ambos datos, prioriza la talla medida con cinta Broselow."})]})]})}),e.jsx("div",{className:"text-xs text-muted-foreground",children:"Nota: valores aproximados para entrenamiento. Verificar siempre con cinta oficial y guía local."})]})]}),e.jsxs(u,{children:[e.jsx(p,{children:e.jsx(f,{className:"text-base",children:"Accesos rápidos"})}),e.jsxs(j,{className:"space-y-2 text-sm text-muted-foreground",children:[e.jsx(y,{to:"/herramientas",className:"underline underline-offset-4",children:"Abrir calculadora de dosis pediátricas"}),e.jsx("p",{children:"Temporizador RCP integrado abajo."})]})]}),e.jsx(K,{})]})};export{G as default};
|