import{B as e,L as t}from"./Card-Cxq4Ee-X.js";import{A as n,b as r,d as i,x as a}from"./supplements-DUypwbGQ.js";var o={vitamin_d_25oh:{name:`25(OH)D (Vitamin D)`,shortName:`25(OH)D`,disclaimer:`Reference range only. Not a medical diagnosis. Use your lab’s reference intervals.`},calcium_total:{name:`Total calcium`,shortName:`Total Ca`,disclaimer:`Reference range only. Not a medical diagnosis. Use your lab’s reference intervals.`},calcium_ionized:{name:`Ionized calcium`,shortName:`Ca++`,disclaimer:`Reference range only. Not a medical diagnosis. Use your lab’s reference intervals.`},magnesium:{name:`Magnesium`,shortName:`Mg`,disclaimer:`Reference range only. Not a medical diagnosis. Use your lab’s reference intervals.`},ferritin:{name:`Ferritin`,shortName:`Ferritin`,disclaimer:`Reference range only. Not a medical diagnosis. Use your lab’s reference intervals.`},serum_iron:{name:`Serum iron`,shortName:`Serum Fe`,disclaimer:`Reference range only. Not a medical diagnosis. Use your lab’s reference intervals.`},transferrin_saturation:{name:`Transferrin saturation`,shortName:`TSAT`,disclaimer:`Reference range only. Not a medical diagnosis. Use your lab’s reference intervals.`},b12:{name:`Vitamin B12`,shortName:`B12`,disclaimer:`Reference range only. Not a medical diagnosis. Use your lab’s reference intervals.`},folate:{name:`Folate (B9)`,shortName:`Folate`,disclaimer:`Reference range only. Not a medical diagnosis. Use your lab’s reference intervals.`},zinc:{name:`Zinc`,shortName:`Zn`,disclaimer:`Reference range only. Not a medical diagnosis. Use your lab’s reference intervals.`},copper:{name:`Copper`,shortName:`Cu`,disclaimer:`Reference range only. Not a medical diagnosis. Use your lab’s reference intervals.`},tsh:{name:`TSH`,shortName:`TSH`,disclaimer:`Reference range only. Not a medical diagnosis. Use your lab’s reference intervals.`},glucose_fasting:{name:`Fasting glucose`,shortName:`Glucose`,disclaimer:`Reference range only. Not a medical diagnosis. Use your lab’s reference intervals.`},hba1c:{name:`Glycated hemoglobin (HbA1c)`,shortName:`HbA1c`,disclaimer:`Reference range only. Not a medical diagnosis. Use your lab’s reference intervals.`},alt:{name:`ALT (alanine aminotransferase)`,shortName:`ALT`,disclaimer:`Reference range only. Not a medical diagnosis. Use your lab’s reference intervals.`},ast:{name:`AST (aspartate aminotransferase)`,shortName:`AST`,disclaimer:`Reference range only. Not a medical diagnosis. Use your lab’s reference intervals.`},creatinine:{name:`Creatinine`,shortName:`Creatinine`,disclaimer:`Reference range only. Not a medical diagnosis. Use your lab’s reference intervals.`},egfr:{name:`eGFR`,shortName:`eGFR`,disclaimer:`Reference range only. Not a medical diagnosis. Use your lab’s reference intervals.`},cbc_hemoglobin:{name:`Hemoglobin`,shortName:`Hb`,disclaimer:`Reference range only. Not a medical diagnosis. Use your lab’s reference intervals.`},cbc_wbc:{name:`White blood cells`,shortName:`WBC`,disclaimer:`Reference range only. Not a medical diagnosis. Use your lab’s reference intervals.`},cbc_platelets:{name:`Platelets`,shortName:`PLT`,disclaimer:`Reference range only. Not a medical diagnosis. Use your lab’s reference intervals.`},crp:{name:`C-reactive protein (CRP)`,shortName:`CRP`,disclaimer:`Reference range only. Not a medical diagnosis. Use your lab’s reference intervals.`},total_cholesterol:{name:`Total cholesterol`,shortName:`TC`,disclaimer:`Reference range only. Not a medical diagnosis. Use your lab’s reference intervals.`},ldl:{name:`LDL cholesterol`,shortName:`LDL`,disclaimer:`Reference range only. Not a medical diagnosis. Use your lab’s reference intervals.`},hdl:{name:`HDL cholesterol`,shortName:`HDL`,disclaimer:`Reference range only. Not a medical diagnosis. Use your lab’s reference intervals.`},triglycerides:{name:`Triglycerides`,shortName:`TG`,disclaimer:`Reference range only. Not a medical diagnosis. Use your lab’s reference intervals.`},homocysteine:{name:`Homocysteine`,shortName:`Hcy`,disclaimer:`Reference range only. Not a medical diagnosis. Use your lab’s reference intervals.`},free_t4:{name:`Free T4`,shortName:`Free T4`,disclaimer:`Reference range only. Not a medical diagnosis. Use your lab’s reference intervals.`},free_t3:{name:`Free T3`,shortName:`Free T3`,disclaimer:`Reference range only. Not a medical diagnosis. Use your lab’s reference intervals.`},anti_tpo:{name:`Anti-TPO antibodies`,shortName:`Anti-TPO`,disclaimer:`Reference range only. Not a medical diagnosis. Use your lab’s reference intervals.`},anti_tg:{name:`Anti-thyroglobulin antibodies`,shortName:`Anti-Tg`,disclaimer:`Reference range only. Not a medical diagnosis. Use your lab’s reference intervals.`},insulin_fasting:{name:`Fasting insulin`,shortName:`Insulin`,disclaimer:`Reference range only. Not a medical diagnosis. Use your lab’s reference intervals.`},ggt:{name:`GGT (gamma-GT)`,shortName:`GGT`,disclaimer:`Reference range only. Not a medical diagnosis. Use your lab’s reference intervals.`},alp:{name:`ALP (alkaline phosphatase)`,shortName:`ALP`,disclaimer:`Reference range only. Not a medical diagnosis. Use your lab’s reference intervals.`},bilirubin_total:{name:`Total bilirubin`,shortName:`Bilirubin`,disclaimer:`Reference range only. Not a medical diagnosis. Use your lab’s reference intervals.`},vitamin_b6:{name:`Vitamin B6 (pyridoxal-5-phosphate)`,shortName:`B6`,interpretationNotes:`Assay form (PLP vs B6) affects reference ranges.`,disclaimer:`Reference range only. Not a medical diagnosis. Use your lab’s reference intervals.`},phosphate:{name:`Inorganic phosphate`,shortName:`P`,disclaimer:`Reference range only. Not a medical diagnosis. Use your lab’s reference intervals.`},uric_acid:{name:`Uric acid`,shortName:`UA`,disclaimer:`Reference range only. Not a medical diagnosis. Use your lab’s reference intervals.`},potassium:{name:`Potassium`,shortName:`K`,interpretationNotes:`Critical with kidney disease and some medications.`,disclaimer:`Reference range only. Not a medical diagnosis. Use your lab’s reference intervals.`}},s=`Справочный диапазон. Не является медицинским диагнозом. Используйте референсы вашей лаборатории.`,c=[{id:`vitamin_d_25oh`,name:`25(OH)D (Витамин D)`,shortName:`25(OH)D`,category:`vitamins`,defaultUnit:`нг/мл`,supportedUnits:[`нг/мл`,`ng/mL`,`нмоль/л`,`nmol/L`],aliases:[`витамин D`,`vitamin D`,`25-OH витамин D`],defaultReferenceRanges:[{low:30,high:100,unit:`нг/мл`,sex:`any`}],freshnessDays:180,disclaimer:s},{id:`calcium_total`,name:`Кальций общий`,shortName:`Ca общ.`,category:`minerals`,defaultUnit:`ммоль/л`,supportedUnits:[`ммоль/л`,`mmol/L`,`мг/дл`,`mg/dL`],aliases:[`calcium`,`Ca`],defaultReferenceRanges:[{low:2.15,high:2.55,unit:`ммоль/л`,sex:`any`}],freshnessDays:180,disclaimer:s},{id:`calcium_ionized`,name:`Кальций ионизированный`,shortName:`Ca++`,category:`minerals`,defaultUnit:`ммоль/л`,supportedUnits:[`ммоль/л`,`mmol/L`],aliases:[`ionized calcium`,`Ca++`],defaultReferenceRanges:[{low:1.12,high:1.32,unit:`ммоль/л`,sex:`any`}],freshnessDays:180,disclaimer:s},{id:`magnesium`,name:`Магний`,shortName:`Mg`,category:`minerals`,defaultUnit:`ммоль/л`,supportedUnits:[`ммоль/л`,`mmol/L`,`мг/дл`,`mg/dL`],aliases:[`Mg`,`magnesium`],defaultReferenceRanges:[{low:.66,high:1.07,unit:`ммоль/л`,sex:`any`}],freshnessDays:180,disclaimer:s},{id:`ferritin`,name:`Ферритин`,shortName:`Ферритин`,category:`minerals`,defaultUnit:`нг/мл`,supportedUnits:[`нг/мл`,`ng/mL`,`мкг/л`,`µg/L`],aliases:[`ferritin`],defaultReferenceRanges:[{low:30,high:400,unit:`нг/мл`,sex:`male`},{low:15,high:200,unit:`нг/мл`,sex:`female`}],freshnessDays:180,disclaimer:s},{id:`serum_iron`,name:`Железо сывороточное`,shortName:`Fe сыв.`,category:`minerals`,defaultUnit:`мкмоль/л`,supportedUnits:[`мкмоль/л`,`µmol/L`,`мкг/дл`,`µg/dL`],aliases:[`serum iron`,`сывороточное железо`],defaultReferenceRanges:[{low:11,high:28,unit:`мкмоль/л`,sex:`male`},{low:9,high:30,unit:`мкмоль/л`,sex:`female`}],freshnessDays:180,disclaimer:s},{id:`transferrin_saturation`,name:`Насыщение трансферрина`,shortName:`TSAT`,category:`minerals`,defaultUnit:`%`,supportedUnits:[`%`],aliases:[`TSAT`,`transferrin saturation`,`ОЖСС`],defaultReferenceRanges:[{low:20,high:50,unit:`%`,sex:`any`}],freshnessDays:180,disclaimer:s},{id:`b12`,name:`Витамин B12`,shortName:`B12`,category:`vitamins`,defaultUnit:`пг/мл`,supportedUnits:[`пг/мл`,`pg/mL`,`пмоль/л`,`pmol/L`],aliases:[`B12`,`кобаламин`,`cobalamin`],defaultReferenceRanges:[{low:200,high:900,unit:`пг/мл`,sex:`any`}],freshnessDays:180,disclaimer:s},{id:`folate`,name:`Фолат (B9)`,shortName:`Фолат`,category:`vitamins`,defaultUnit:`нг/мл`,supportedUnits:[`нг/мл`,`ng/mL`,`нмоль/л`,`nmol/L`],aliases:[`folic acid`,`фолиевая кислота`,`B9`,`folate`],defaultReferenceRanges:[{low:3,high:20,unit:`нг/мл`,sex:`any`}],freshnessDays:180,disclaimer:s},{id:`zinc`,name:`Цинк`,shortName:`Zn`,category:`minerals`,defaultUnit:`мкмоль/л`,supportedUnits:[`мкмоль/л`,`µmol/L`,`мкг/дл`,`µg/dL`],aliases:[`Zn`,`zinc`],defaultReferenceRanges:[{low:11,high:23,unit:`мкмоль/л`,sex:`any`}],freshnessDays:180,disclaimer:s},{id:`copper`,name:`Медь`,shortName:`Cu`,category:`minerals`,defaultUnit:`мкмоль/л`,supportedUnits:[`мкмоль/л`,`µmol/L`,`мкг/дл`,`µg/dL`],aliases:[`Cu`,`copper`],defaultReferenceRanges:[{low:11,high:22,unit:`мкмоль/л`,sex:`male`},{low:12.6,high:24.3,unit:`мкмоль/л`,sex:`female`}],freshnessDays:180,disclaimer:s},{id:`tsh`,name:`ТТГ`,shortName:`ТТГ`,category:`hormones`,defaultUnit:`мМЕ/л`,supportedUnits:[`мМЕ/л`,`mIU/L`,`мкМЕ/мл`,`µIU/mL`],aliases:[`TSH`,`тиреотропный гормон`],defaultReferenceRanges:[{low:.4,high:4,unit:`мМЕ/л`,sex:`any`}],freshnessDays:180,disclaimer:s},{id:`glucose_fasting`,name:`Глюкоза натощак`,shortName:`Глюкоза`,category:`metabolic`,defaultUnit:`ммоль/л`,supportedUnits:[`ммоль/л`,`mmol/L`,`мг/дл`,`mg/dL`],aliases:[`glucose`,`сахар`,`fasting glucose`],defaultReferenceRanges:[{low:3.9,high:5.6,unit:`ммоль/л`,sex:`any`}],freshnessDays:180,disclaimer:s},{id:`hba1c`,name:`Гликированный гемоглобин (HbA1c)`,shortName:`HbA1c`,category:`metabolic`,defaultUnit:`%`,supportedUnits:[`%`,`ммоль/моль`,`mmol/mol`],aliases:[`HbA1c`,`гликозилированный гемоглобин`],defaultReferenceRanges:[{low:4,high:5.6,unit:`%`,sex:`any`}],freshnessDays:180,disclaimer:s},{id:`alt`,name:`АЛТ (аланинаминотрансфераза)`,shortName:`АЛТ`,category:`liver`,defaultUnit:`Ед/л`,supportedUnits:[`Ед/л`,`U/L`,`ед/л`],aliases:[`ALT`,`АЛАТ`,`GPT`],defaultReferenceRanges:[{low:0,high:41,unit:`Ед/л`,sex:`male`},{low:0,high:33,unit:`Ед/л`,sex:`female`}],freshnessDays:180,disclaimer:s},{id:`ast`,name:`АСТ (аспартатаминотрансфераза)`,shortName:`АСТ`,category:`liver`,defaultUnit:`Ед/л`,supportedUnits:[`Ед/л`,`U/L`,`ед/л`],aliases:[`AST`,`АСАТ`,`GOT`],defaultReferenceRanges:[{low:0,high:40,unit:`Ед/л`,sex:`male`},{low:0,high:32,unit:`Ед/л`,sex:`female`}],freshnessDays:180,disclaimer:s},{id:`creatinine`,name:`Креатинин`,shortName:`Креатинин`,category:`kidney`,defaultUnit:`мкмоль/л`,supportedUnits:[`мкмоль/л`,`µmol/L`,`мг/дл`,`mg/dL`],aliases:[`creatinine`],defaultReferenceRanges:[{low:62,high:106,unit:`мкмоль/л`,sex:`male`},{low:44,high:80,unit:`мкмоль/л`,sex:`female`}],freshnessDays:180,disclaimer:s},{id:`egfr`,name:`СКФ (рСКФ)`,shortName:`рСКФ`,category:`kidney`,defaultUnit:`мл/мин/1.73м²`,supportedUnits:[`мл/мин/1.73м²`,`mL/min/1.73m²`],aliases:[`eGFR`,`GFR`,`скорость клубочковой фильтрации`],defaultReferenceRanges:[{low:90,unit:`мл/мин/1.73м²`,sex:`any`}],freshnessDays:180,disclaimer:s},{id:`cbc_hemoglobin`,name:`Гемоглобин`,shortName:`Hb`,category:`blood`,defaultUnit:`г/л`,supportedUnits:[`г/л`,`g/L`,`г/дл`,`g/dL`],aliases:[`Hb`,`hemoglobin`,`гемоглобин`],defaultReferenceRanges:[{low:130,high:170,unit:`г/л`,sex:`male`},{low:120,high:150,unit:`г/л`,sex:`female`}],freshnessDays:90,disclaimer:s},{id:`cbc_wbc`,name:`Лейкоциты`,shortName:`WBC`,category:`blood`,defaultUnit:`×10⁹/л`,supportedUnits:[`×10⁹/л`,`10^9/L`,`тыс/мкл`],aliases:[`WBC`,`leukocytes`,`белые клетки`],defaultReferenceRanges:[{low:4,high:10,unit:`×10⁹/л`,sex:`any`}],freshnessDays:90,disclaimer:s},{id:`cbc_platelets`,name:`Тромбоциты`,shortName:`PLT`,category:`blood`,defaultUnit:`×10⁹/л`,supportedUnits:[`×10⁹/л`,`10^9/L`,`тыс/мкл`],aliases:[`PLT`,`platelets`,`тромбоциты`],defaultReferenceRanges:[{low:150,high:400,unit:`×10⁹/л`,sex:`any`}],freshnessDays:90,disclaimer:s},{id:`crp`,name:`С-реактивный белок (СРБ)`,shortName:`СРБ`,category:`inflammation`,defaultUnit:`мг/л`,supportedUnits:[`мг/л`,`mg/L`],aliases:[`CRP`,`C-reactive protein`,`СРБ`],defaultReferenceRanges:[{low:0,high:5,unit:`мг/л`,sex:`any`}],freshnessDays:90,disclaimer:s},{id:`total_cholesterol`,name:`Холестерин общий`,shortName:`ОХС`,category:`lipids`,defaultUnit:`ммоль/л`,supportedUnits:[`ммоль/л`,`mmol/L`,`мг/дл`,`mg/dL`],aliases:[`total cholesterol`,`холестерин`],defaultReferenceRanges:[{low:3,high:5.2,unit:`ммоль/л`,sex:`any`}],freshnessDays:180,disclaimer:s},{id:`ldl`,name:`ЛПНП (LDL)`,shortName:`ЛПНП`,category:`lipids`,defaultUnit:`ммоль/л`,supportedUnits:[`ммоль/л`,`mmol/L`,`мг/дл`,`mg/dL`],aliases:[`LDL`,`ЛПНП`],defaultReferenceRanges:[{low:0,high:3,unit:`ммоль/л`,sex:`any`}],freshnessDays:180,disclaimer:s},{id:`hdl`,name:`ЛПВП (HDL)`,shortName:`ЛПВП`,category:`lipids`,defaultUnit:`ммоль/л`,supportedUnits:[`ммоль/л`,`mmol/L`,`мг/дл`,`mg/dL`],aliases:[`HDL`,`ЛПВП`],defaultReferenceRanges:[{low:1,high:2.5,unit:`ммоль/л`,sex:`male`},{low:1.2,high:2.8,unit:`ммоль/л`,sex:`female`}],freshnessDays:180,disclaimer:s},{id:`triglycerides`,name:`Триглицериды`,shortName:`ТГ`,category:`lipids`,defaultUnit:`ммоль/л`,supportedUnits:[`ммоль/л`,`mmol/L`,`мг/дл`,`mg/dL`],aliases:[`TG`,`triglycerides`],defaultReferenceRanges:[{low:0,high:1.7,unit:`ммоль/л`,sex:`any`}],freshnessDays:180,disclaimer:s},{id:`homocysteine`,name:`Гомоцистеин`,shortName:`Hcy`,category:`metabolic`,defaultUnit:`мкмоль/л`,supportedUnits:[`мкмоль/л`,`µmol/L`],aliases:[`homocysteine`,`hcy`,`гомоцистеин`],defaultReferenceRanges:[{low:5,high:15,unit:`мкмоль/л`,sex:`any`}],freshnessDays:180,interpretationNotes:`Повышение может быть связано с дефицитом B12/фолата; интерпретация зависит от лаборатории.`,disclaimer:s},{id:`free_t4`,name:`Свободный T4`,shortName:`свT4`,category:`hormones`,defaultUnit:`пмоль/л`,supportedUnits:[`пмоль/л`,`pmol/L`,`нг/дл`,`ng/dL`],aliases:[`free T4`,`FT4`,`свободный тироксин`,`т4 свободный`],defaultReferenceRanges:[{low:12,high:22,unit:`пмоль/л`,sex:`any`}],freshnessDays:180,interpretationNotes:`Референсы сильно зависят от метода и лаборатории.`,disclaimer:s},{id:`free_t3`,name:`Свободный T3`,shortName:`свT3`,category:`hormones`,defaultUnit:`пмоль/л`,supportedUnits:[`пмоль/л`,`pmol/L`,`пг/мл`,`pg/mL`],aliases:[`free T3`,`FT3`,`свободный трийодтиронин`],defaultReferenceRanges:[{low:3.1,high:6.8,unit:`пмоль/л`,sex:`any`}],freshnessDays:180,interpretationNotes:`Используется в контексте щитовидной железы; не для самоназначения доз.`,disclaimer:s},{id:`anti_tpo`,name:`Антитела к ТПО`,shortName:`anti-TPO`,category:`hormones`,defaultUnit:`МЕ/мл`,supportedUnits:[`МЕ/мл`,`IU/mL`,`мМЕ/л`],aliases:[`anti-TPO`,`anti TPO`,`ат-тпо`,`тпо`],defaultReferenceRanges:[{low:0,high:34,unit:`МЕ/мл`,sex:`any`}],freshnessDays:365,interpretationNotes:`Порог «отрицательно» зависит от лаборатории; справочно для контекста аутоиммунного тиреоидита.`,disclaimer:s},{id:`anti_tg`,name:`Антитела к тиреоглобулину`,shortName:`anti-Tg`,category:`hormones`,defaultUnit:`МЕ/мл`,supportedUnits:[`МЕ/мл`,`IU/mL`],aliases:[`anti-Tg`,`anti TG`,`ат-тг`,`тиреоглобулин`],defaultReferenceRanges:[{low:0,high:115,unit:`МЕ/мл`,sex:`any`}],freshnessDays:365,interpretationNotes:`Интерпретация зависит от метода; используйте референс лаборатории.`,disclaimer:s},{id:`insulin_fasting`,name:`Инсулин натощак`,shortName:`Инсулин`,category:`metabolic`,defaultUnit:`мкЕд/мл`,supportedUnits:[`мкЕд/мл`,`µIU/mL`,`mIU/L`,`мМЕ/л`],aliases:[`insulin`,`инсулин`,`fasting insulin`],defaultReferenceRanges:[{low:2,high:25,unit:`мкЕд/мл`,sex:`any`}],freshnessDays:180,interpretationNotes:`Интерпретация зависит от глюкозы и контекста; HOMA-IR не рассчитывается в приложении.`,disclaimer:s},{id:`ggt`,name:`ГГТ (гамма-ГТ)`,shortName:`ГГТ`,category:`liver`,defaultUnit:`Ед/л`,supportedUnits:[`Ед/л`,`U/L`,`ед/л`],aliases:[`GGT`,`gamma-GT`,`гамма-гт`],defaultReferenceRanges:[{low:0,high:61,unit:`Ед/л`,sex:`male`},{low:0,high:36,unit:`Ед/л`,sex:`female`}],freshnessDays:180,disclaimer:s},{id:`alp`,name:`Щелочная фосфатаза (АЛП)`,shortName:`АЛП`,category:`liver`,defaultUnit:`Ед/л`,supportedUnits:[`Ед/л`,`U/L`,`ед/л`],aliases:[`ALP`,`alkaline phosphatase`,`щелочная фосфатаза`],defaultReferenceRanges:[{low:40,high:130,unit:`Ед/л`,sex:`male`},{low:35,high:105,unit:`Ед/л`,sex:`female`}],freshnessDays:180,disclaimer:s},{id:`bilirubin_total`,name:`Билирубин общий`,shortName:`Билирубин`,category:`liver`,defaultUnit:`мкмоль/л`,supportedUnits:[`мкмоль/л`,`µmol/L`,`мг/дл`,`mg/dL`],aliases:[`bilirubin`,`билирубин`,`total bilirubin`],defaultReferenceRanges:[{low:3.4,high:20.5,unit:`мкмоль/л`,sex:`any`}],freshnessDays:180,disclaimer:s},{id:`vitamin_b6`,name:`Витамин B6 (пиридоксаль-5-фосфат)`,shortName:`B6`,category:`vitamins`,defaultUnit:`нмоль/л`,supportedUnits:[`нмоль/л`,`nmol/L`,`нг/мл`,`ng/mL`],aliases:[`B6`,`pyridoxal`,`пиридоксин`,`PLP`],defaultReferenceRanges:[{low:20,high:106,unit:`нмоль/л`,sex:`any`}],freshnessDays:180,interpretationNotes:`Форма анализа (PLP vs B6) влияет на референсы.`,disclaimer:s},{id:`phosphate`,name:`Фосфор неорганический`,shortName:`P`,category:`minerals`,defaultUnit:`ммоль/л`,supportedUnits:[`ммоль/л`,`mmol/L`,`мг/дл`,`mg/dL`],aliases:[`phosphate`,`phosphorus`,`фосфор`,`p`],defaultReferenceRanges:[{low:.81,high:1.45,unit:`ммоль/л`,sex:`any`}],freshnessDays:180,disclaimer:s},{id:`uric_acid`,name:`Мочевая кислота`,shortName:`МК`,category:`metabolic`,defaultUnit:`мкмоль/л`,supportedUnits:[`мкмоль/л`,`µmol/L`,`мг/дл`,`mg/dL`],aliases:[`uric acid`,`urate`,`мочевая кислота`],defaultReferenceRanges:[{low:202,high:416,unit:`мкмоль/л`,sex:`male`},{low:143,high:339,unit:`мкмоль/л`,sex:`female`}],freshnessDays:180,disclaimer:s},{id:`potassium`,name:`Калий`,shortName:`K`,category:`minerals`,defaultUnit:`ммоль/л`,supportedUnits:[`ммоль/л`,`mmol/L`,`мэкв/л`,`mEq/L`],aliases:[`potassium`,`k`,`калий`],defaultReferenceRanges:[{low:3.5,high:5.1,unit:`ммоль/л`,sex:`any`}],freshnessDays:90,interpretationNotes:`Критичен при заболеваниях почек и некоторых препаратах.`,disclaimer:s}];function l(e,t){if(t!==`en`)return e;let n=o[e.id];return n?{...e,...n}:e}function u(e,n=t()){let r=c.find(t=>t.id===e);return r?l(r,n):void 0}function d(e=t()){return c.map(t=>l(t,e))}var f={"ng/ml":`нг/мл`,"nmol/l":`нмоль/л`,"mmol/l":`ммоль/л`,"mg/dl":`мг/дл`,"µmol/l":`мкмоль/л`,"umol/l":`мкмоль/л`,"pg/ml":`пг/мл`,"pmol/l":`пмоль/л`,"µg/dl":`мкг/дл`,"ug/dl":`мкг/дл`,"µg/l":`мкг/л`,"ug/l":`мкг/л`,"u/l":`Ед/л`,"iu/l":`Ед/л`,"g/l":`г/л`,"g/dl":`г/дл`,"miu/l":`мМЕ/л`,"µiu/ml":`мкМЕ/мл`,"uiu/ml":`мкМЕ/мл`,"mg/l":`мг/л`,"10^9/l":`×10⁹/л`,"mmol/mol":`ммоль/моль`,"ml/min/1.73m²":`мл/мин/1.73м²`,"ml/min/1.73m2":`мл/мин/1.73м²`,"iu/ml":`МЕ/мл`,"meq/l":`мэкв/л`},p=[{from:`нг/мл`,to:`нмоль/л`,factor:2.5,biomarkerIds:[`vitamin_d_25oh`]},{from:`нмоль/л`,to:`нг/мл`,factor:1/2.5,biomarkerIds:[`vitamin_d_25oh`]},{from:`мг/дл`,to:`ммоль/л`,factor:1/18,biomarkerIds:[`glucose_fasting`]},{from:`ммоль/л`,to:`мг/дл`,factor:18,biomarkerIds:[`glucose_fasting`]},{from:`мг/дл`,to:`ммоль/л`,factor:1/38.67,biomarkerIds:[`total_cholesterol`,`ldl`,`hdl`]},{from:`ммоль/л`,to:`мг/дл`,factor:38.67,biomarkerIds:[`total_cholesterol`,`ldl`,`hdl`]},{from:`мг/дл`,to:`ммоль/л`,factor:1/88.57,biomarkerIds:[`triglycerides`]},{from:`ммоль/л`,to:`мг/дл`,factor:88.57,biomarkerIds:[`triglycerides`]},{from:`мг/дл`,to:`мкмоль/л`,factor:88.4,biomarkerIds:[`creatinine`]},{from:`мкмоль/л`,to:`мг/дл`,factor:1/88.4,biomarkerIds:[`creatinine`]},{from:`пг/мл`,to:`пмоль/л`,factor:.738,biomarkerIds:[`b12`]},{from:`пмоль/л`,to:`пг/мл`,factor:1/.738,biomarkerIds:[`b12`]},{from:`нг/мл`,to:`нмоль/л`,factor:2.266,biomarkerIds:[`folate`]},{from:`нмоль/л`,to:`нг/мл`,factor:1/2.266,biomarkerIds:[`folate`]},{from:`мкг/дл`,to:`мкмоль/л`,factor:.179,biomarkerIds:[`serum_iron`]},{from:`мкмоль/л`,to:`мкг/дл`,factor:1/.179,biomarkerIds:[`serum_iron`]},{from:`г/дл`,to:`г/л`,factor:10,biomarkerIds:[`cbc_hemoglobin`]},{from:`г/л`,to:`г/дл`,factor:.1,biomarkerIds:[`cbc_hemoglobin`]},{from:`мкМЕ/мл`,to:`мМЕ/л`,factor:1,biomarkerIds:[`tsh`]},{from:`мМЕ/л`,to:`мкМЕ/мл`,factor:1,biomarkerIds:[`tsh`]},{from:`нг/дл`,to:`пмоль/л`,factor:12.87,biomarkerIds:[`free_t4`]},{from:`пмоль/л`,to:`нг/дл`,factor:1/12.87,biomarkerIds:[`free_t4`]},{from:`пг/мл`,to:`пмоль/л`,factor:1.536,biomarkerIds:[`free_t3`]},{from:`пмоль/л`,to:`пг/мл`,factor:1/1.536,biomarkerIds:[`free_t3`]},{from:`мг/дл`,to:`мкмоль/л`,factor:17.1,biomarkerIds:[`bilirubin_total`]},{from:`мкмоль/л`,to:`мг/дл`,factor:1/17.1,biomarkerIds:[`bilirubin_total`]},{from:`мг/дл`,to:`мкмоль/л`,factor:59.48,biomarkerIds:[`uric_acid`]},{from:`мкмоль/л`,to:`мг/дл`,factor:1/59.48,biomarkerIds:[`uric_acid`]},{from:`мг/дл`,to:`ммоль/л`,factor:.323,biomarkerIds:[`phosphate`]},{from:`ммоль/л`,to:`мг/дл`,factor:1/.323,biomarkerIds:[`phosphate`]},{from:`мМЕ/л`,to:`мкЕд/мл`,factor:1,biomarkerIds:[`insulin_fasting`]},{from:`мэкв/л`,to:`ммоль/л`,factor:1,biomarkerIds:[`potassium`]}];function m(e){let t=e.trim();return f[t.toLowerCase()]??t}function h(e,t,n){let r=m(e),i=m(t);return p.find(e=>m(e.from)!==r||m(e.to)!==i?!1:!e.biomarkerIds||!n?!0:e.biomarkerIds.includes(n))}function g(e,t,n,r){let i=m(t),a=m(n);if(i===a)return{ok:!0,value:e,unit:a};let o=h(t,n,r);return o?{ok:!0,value:e*o.factor,unit:a}:{ok:!1,reason:`Неизвестная конвертация: ${i} → ${a}`}}function _(n,r=t()){let i=`labs.display.${n}`,a=e(i,void 0,r);return a===i?n:a}function v(e){switch(e){case`normal`:return`green`;case`below`:return`yellow`;case`above`:return`red`;case`outdated`:return`orange`;case`missing`:return`gray`;case`cannot_interpret`:return`orange`;default:return`gray`}}function y(e){switch(v(e)){case`green`:return{color:`#5adf8a`,borderColor:`rgba(90, 223, 138, 0.55)`,background:`rgba(90, 223, 138, 0.12)`};case`yellow`:return{color:`#d8b84f`,borderColor:`rgba(216, 184, 79, 0.55)`,background:`rgba(216, 184, 79, 0.12)`};case`red`:return{color:`#ff6b6b`,borderColor:`rgba(255, 107, 107, 0.55)`,background:`rgba(255, 107, 107, 0.12)`};case`orange`:return{color:`#ffb25f`,borderColor:`rgba(255, 178, 95, 0.55)`,background:`rgba(255, 178, 95, 0.12)`};default:return{color:`var(--color-text-muted)`,borderColor:`var(--color-surface-elevated)`,background:`var(--color-bg)`}}}function b(e,n=t()){let r=_(`status.${e}`,n);return r.startsWith(`status.`)?_(`status.default`,n):r}function x(e,t){return`${Number.isInteger(e)?String(e):e.toFixed(2).replace(/\.?0+$/,``)} ${t}`}function S(e,n=t()){try{let t=new Date(e);if(Number.isNaN(t.getTime()))return e;let r=n===`en`?`en-US`:`ru-RU`;return t.toLocaleDateString(r,{day:`2-digit`,month:`2-digit`,year:`numeric`})}catch{return e}}function C(e,n=t()){let r=_(`category.${e}`,n);return r.startsWith(`category.`)?_(`category.other`,n):r}var w={above:0,below:1,outdated:2,cannot_interpret:3,normal:4,missing:5};function T(e){return[...e].sort((e,t)=>(w[e.status]??5)-(w[t.status]??5))}function E(e,t){let n=new Date(e).getTime(),r=new Date(t).getTime();return!Number.isFinite(n)||!Number.isFinite(r)?1/0:Math.abs(r-n)/864e5}function D(e,t,n){let r=t.freshnessDays;if(r==null||r<=0)return!1;let i=n??new Date().toISOString();return E(e.collectedAtISO,i)>r}function O(e,t){let n=e.filter(e=>e.biomarkerId===t);if(n.length!==0)return n.reduce((e,t)=>t.collectedAtISO>e.collectedAtISO?t:e)}function k(e,t,n){if(t?.referenceLow!=null||t?.referenceHigh!=null)return{low:t.referenceLow,high:t.referenceHigh,unit:t.referenceUnit??t.unit};let r=e.defaultReferenceRanges;if(!r||r.length===0)return;let i=n?.sex===`male`||n?.sex===`female`?n.sex:void 0,a=n?.ageYears,o=r.filter(e=>!(e.sex&&e.sex!==`any`&&i&&e.sex!==i||e.minAgeYears!=null&&a!=null&&ae.maxAgeYears)),s=o.find(e=>e.sex===i)??o.find(e=>e.sex===`any`||!e.sex)??o[0];if(!s){let e=r.find(e=>e.sex===`any`||!e.sex)??r[0];return e?{low:e.low,high:e.high,unit:e.unit}:void 0}return{low:s.low,high:s.high,unit:s.unit}}function A(e){switch(e){case`normal`:return`success`;case`below`:return`warning`;case`above`:return`danger`;case`missing`:return`muted`;case`outdated`:return`info`;case`cannot_interpret`:return`info`}}function j(n,r){return e(`labs.display.evaluation.${n}`,r,t())}function M(e){let{definition:t,result:n,profile:r,nowISO:i}=e;if(!n)return{biomarkerId:t.id,status:`missing`,severity:`muted`,isOutdated:!1,missingReason:j(`missingReason`),warnings:[],label:b(`missing`)};if(D(n,t,i))return{biomarkerId:t.id,status:`outdated`,severity:`info`,value:n.value,unit:n.unit,collectedAtISO:n.collectedAtISO,isOutdated:!0,warnings:[j(`outdatedWarning`)],label:b(`outdated`)};let a=k(t,n,r);if(!a||a.low==null&&a.high==null)return{biomarkerId:t.id,status:`cannot_interpret`,severity:`info`,value:n.value,unit:n.unit,collectedAtISO:n.collectedAtISO,isOutdated:!1,warnings:[j(`noReference`)],label:b(`cannot_interpret`)};let o=n.value,s=m(n.unit),c=m(a.unit);if(s!==c){let e=g(n.value,n.unit,a.unit,t.id);if(!e.ok)return{biomarkerId:t.id,status:`cannot_interpret`,severity:`info`,value:n.value,unit:n.unit,collectedAtISO:n.collectedAtISO,isOutdated:!1,warnings:[j(`unitConversion`,{from:s,to:c})],label:b(`cannot_interpret`)};o=e.value,s=e.unit}let l=`normal`;return a.low!=null&&oa.high&&(l=`above`),{biomarkerId:t.id,status:l,severity:A(l),value:n.value,unit:n.unit,normalizedValue:o,normalizedUnit:s,referenceLow:a.low,referenceHigh:a.high,referenceUnit:c,collectedAtISO:n.collectedAtISO,isOutdated:!1,warnings:[],label:b(l)}}function N(n,r=t()){let i=`labs.display.retake.${n}`,a=e(i,void 0,r);return a===i?n:a}function P(e,n=t()){let r=N(`urgency.${e}`,n);return r.startsWith(`urgency.`)?e:r}function F(e){switch(e){case`due_now`:return{color:`#ff6b6b`,borderColor:`rgba(255, 107, 107, 0.55)`,background:`rgba(255, 107, 107, 0.12)`};case`due_soon`:return{color:`#ffb25f`,borderColor:`rgba(255, 178, 95, 0.55)`,background:`rgba(255, 178, 95, 0.12)`};case`blocked_context`:return{color:`#7eb8ff`,borderColor:`rgba(126, 184, 255, 0.55)`,background:`rgba(126, 184, 255, 0.12)`};case`optional`:return{color:`var(--color-text-muted)`,borderColor:`var(--color-surface-elevated)`,background:`var(--color-bg)`};default:return{color:`#5adf8a`,borderColor:`rgba(90, 223, 138, 0.55)`,background:`rgba(90, 223, 138, 0.12)`}}}function I(n,r=t()){return n.activePlanKnowledgeIds.length===0?N(`summary.emptyPlan`,r):n.dueNow.length>0?e(`labs.display.retake.summary.dueNow`,{count:n.dueNow.length},r):n.dueSoon.length>0?e(`labs.display.retake.summary.dueSoon`,{count:n.dueSoon.length},r):n.blockedContext.length>0?N(`summary.blocked`,r):N(`summary.allOk`,r)}function L(n,r=t()){let i=n.biomarkerName;if(n.blocked||n.urgency===`blocked_context`)return e(`labs.display.retake.message.blocked`,{name:i},r);let a=n.reason;return a===`missing_for_active_plan`?e(`labs.display.retake.message.missing`,{name:i},r):a===`outdated_for_active_plan`?e(`labs.display.retake.message.outdated`,{name:i,days:n.daysSinceCollection==null?``:e(`labs.display.retake.message.outdatedDays`,{days:Math.round(n.daysSinceCollection)},r)},r):a===`after_dose_change`?e(`labs.display.retake.message.afterDoseChange`,{name:i},r):a===`before_regular_high_risk`&&n.urgency===`due_soon`&&n.daysUntilStale!=null?e(`labs.display.retake.message.dueSoon`,{name:i,days:Math.round(n.daysUntilStale)},r):e(a===`before_regular_high_risk`?`labs.display.retake.message.required`:a===`safety_context`?`labs.display.retake.message.safety`:`labs.display.retake.message.optional`,{name:i},r)}function R(n,r=5,i=t()){if(n.length===0)return``;let a=n.slice(0,r).map(e=>e.biomarkerName),o=n.length-a.length;return o>0?e(`labs.display.retake.listMore`,{shown:a.join(`, `),n:o},i):a.join(`, `)}var z=new Set([`creatinine`,`egfr`,`potassium`]),B=new Set([`tsh`,`free_t4`,`free_t3`,`anti_tpo`,`anti_tg`]);function V(e,t){let n=new Date(e).getTime(),r=new Date(t).getTime();return!Number.isFinite(n)||!Number.isFinite(r)?1/0:Math.abs(r-n)/864e5}function H(e,t){let n={creatinine:90,egfr:90,potassium:90,tsh:180,vitamin_d_25oh:180,ferritin:180,magnesium:180};return n[e]==null?t!=null&&t>0?t:180:n[e]}function U(e,t){let n=e.get(t.biomarkerId);if(!n){e.set(t.biomarkerId,{...t});return}e.set(t.biomarkerId,{biomarkerId:t.biomarkerId,reason:t.prioritye.priority-t.priority||e.biomarkerId.localeCompare(t.biomarkerId))}function G(e){let t=new Set;for(let n of e)if(n.active){if(n.supplementKnowledgeId){t.add(n.supplementKnowledgeId);continue}if(n.supplementCatalogId){let e=i(n.supplementCatalogId);e&&t.add(e)}}return[...t]}function K(e,t){return z.has(e)?n(t,`kidney_disease`)||n(t,`reduced_kidney_function`):B.has(e)?n(t,`thyroid_disease`):!1}function q(e,t,n,r){if(!e.affectsDoseForPlan||!n)return!1;for(let i of t)if(!(!i.active||!i.supplementKnowledgeId)&&e.relatedSupplementKnowledgeIds.includes(i.supplementKnowledgeId)&&!(V(i.updatedAtISO,r)>14)&&V(n.collectedAtISO,i.updatedAtISO)>0)return!0;return!1}function J(e){let n=e.locale??t(),r=e.nowISO??new Date().toISOString(),i=e.planItems??[],a=e.activePlanKnowledgeIds.length>0?W(e.activePlanKnowledgeIds):[],o=[],s=[],c=[],l=[],d=[];for(let t of a){let a=u(t.biomarkerId,n);if(!a)continue;let f=O(e.labResults,t.biomarkerId),p=K(t.biomarkerId,e.safetyProfile),m=a.shortName??a.name,h=`not_needed`,g=t.reason,_,v;if(!f)h=t.isRequiredForPlan||t.affectsDoseForPlan?`due_now`:`optional`,g=`missing_for_active_plan`;else{_=V(f.collectedAtISO,r);let e=D(f,a,r),n=H(t.biomarkerId,a.freshnessDays);if(q(t,i,f,r))h=`due_soon`,g=`after_dose_change`;else if(e)h=t.isRequiredForPlan||t.affectsDoseForPlan?`due_now`:`due_soon`,g=`outdated_for_active_plan`;else if(_>=n-30&&(t.isRequiredForPlan||t.affectsDoseForPlan))h=`due_soon`,v=Math.max(0,n-_);else{let e=M({definition:a,result:f,nowISO:r});e.status===`missing`||e.status===`cannot_interpret`?(h=t.isRequiredForPlan?`due_now`:`optional`,g=`missing_for_active_plan`):h=`not_needed`}}p&&h!==`not_needed`&&(h=`blocked_context`,g=`safety_context`);let y={biomarkerId:t.biomarkerId,biomarkerName:m,urgency:h,reason:g,priority:t.priority,freshnessDays:t.freshnessDays,daysSinceCollection:_,daysUntilStale:v,relatedSupplementKnowledgeIds:[...t.relatedSupplementKnowledgeIds],message:L({biomarkerName:m,urgency:h,reason:g,daysSinceCollection:_,daysUntilStale:v,blocked:p},n),collectedAtISO:f?.collectedAtISO};switch(h){case`due_now`:o.push(y);break;case`due_soon`:s.push(y);break;case`optional`:c.push(y);break;case`blocked_context`:d.push(y);break;case`not_needed`:l.push(y);break;default:break}}let f=e=>[...e].sort((e,t)=>e.priority-t.priority||e.biomarkerName.localeCompare(t.biomarkerName)),p=f(o),m=f(s),h=f(d),g=I({activePlanKnowledgeIds:e.activePlanKnowledgeIds,dueNow:p,dueSoon:m,blockedContext:h},n);return{dueNow:p,dueSoon:m,optional:f(c),notNeeded:f(l),blockedContext:h,summary:g,activePlanKnowledgeIds:[...e.activePlanKnowledgeIds]}}function Y(e){let t=a(e.supplementKnowledgeId);if(!t?.affectsDose?.length)return[];let n=e.nowISO??new Date().toISOString(),r=[];for(let i of t.affectsDose){let t=u(i),a=O(e.labResults,i);!t||!a||D(a,t,n)&&r.push(i)}return r}function X(e){return{dueNowCount:e.dueNow.length,dueSoonCount:e.dueSoon.length,optionalCount:e.optional.length,blockedContextCount:e.blockedContext.length}}export{c as _,R as a,M as c,x as d,C as f,g,T as h,G as i,O as l,y as m,X as n,P as o,b as p,Y as r,F as s,J as t,S as u,u as v,d as y};