Spaces:
Sleeping
Sleeping
Explain model outputs, calibration and expert assessment
Browse filesExpose all ten model outputs, five paired sums and per-fold calibration before averaging. Separate six expert annotations from model estimates. Refine the responsive bilingual interface, custom identity and motion. Preserve inference weights, coefficients, cached predictions and full-cine examples.
- README.md +2 -2
- service/api.py +2 -0
- service/examples.json +20 -2
- service/storage.py +4 -0
- static/app.js +48 -6
- static/brand-mark.svg +8 -0
- static/favicon.svg +8 -0
- static/index.html +25 -6
- static/result-design.css +666 -0
README.md
CHANGED
|
@@ -27,9 +27,9 @@ A research workspace for reviewing coronary angiography and estimating the study
|
|
| 27 |
1. Open a public example with full cine previews and a precomputed result, or upload de-identified DICOM files or a ZIP archive. Uploaded files are grouped by `StudyInstanceUID`.
|
| 28 |
2. Review each projection. Assign it to LCA, RCA or Exclude, or use **Identify arteries** to suggest assignments. Uncertain suggestions require review. Clips shorter than 10 frames remain excluded.
|
| 29 |
3. Check projection order and select **Calculate SYNTAX**. Both arteries are required for a total score; an incomplete study produces only the available artery contribution.
|
| 30 |
-
4.
|
| 31 |
|
| 32 |
-
The two selected Philips holdout studies have reference SYNTAX scores of 0.00 and 35.17. The
|
| 33 |
|
| 34 |
The cine player is a display preview. Display contrast adjustment and video compression do not alter the DICOM files or the model input. The model uses its own fixed preprocessing.
|
| 35 |
|
|
|
|
| 27 |
1. Open a public example with full cine previews and a precomputed result, or upload de-identified DICOM files or a ZIP archive. Uploaded files are grouped by `StudyInstanceUID`.
|
| 28 |
2. Review each projection. Assign it to LCA, RCA or Exclude, or use **Identify arteries** to suggest assignments. Uncertain suggestions require review. Clips shorter than 10 frames remain excluded.
|
| 29 |
3. Check projection order and select **Calculate SYNTAX**. Both arteries are required for a total score; an incomplete study produces only the available artery contribution.
|
| 30 |
+
4. Inspect all ten artery-model outputs, the five paired sums and their calibration in **How the estimate is calculated**. Export the full-precision result as JSON, including model revision and checkpoint hashes.
|
| 31 |
|
| 32 |
+
The two selected Philips holdout studies have reference SYNTAX scores of 0.00 and 35.17. The expert assessment shows all six published scores and their mean, separately from the model prediction. Their saved predictions were calculated with the pinned ensemble on a GPU; they are explicitly marked **Saved GPU result**. All projections and frames are included. Opening an example uses bundled videos and does not load model weights. **Identify arteries** or **Recalculate SYNTAX** downloads and verifies the source DICOM before running the model. Changing assignments or projection order clears the displayed result. These selected examples illustrate the workflow; aggregate performance is reported in the model card.
|
| 33 |
|
| 34 |
The cine player is a display preview. Display contrast adjustment and video compression do not alter the DICOM files or the model input. The model uses its own fixed preprocessing.
|
| 35 |
|
service/api.py
CHANGED
|
@@ -390,6 +390,8 @@ def create_app(*, data_root: Path | None = None, limits: Limits | None = None, e
|
|
| 390 |
raise InputError('The example default projection index is invalid.')
|
| 391 |
created.default_projection_id = created.projections[index].id
|
| 392 |
created.reference_score = example.get('reference_score')
|
|
|
|
|
|
|
| 393 |
cached_job = None
|
| 394 |
if cache:
|
| 395 |
result = cache['result']
|
|
|
|
| 390 |
raise InputError('The example default projection index is invalid.')
|
| 391 |
created.default_projection_id = created.projections[index].id
|
| 392 |
created.reference_score = example.get('reference_score')
|
| 393 |
+
created.expert_scores = example.get('expert_scores')
|
| 394 |
+
created.reference_url = example.get('reference_url')
|
| 395 |
cached_job = None
|
| 396 |
if cache:
|
| 397 |
result = cache['result']
|
service/examples.json
CHANGED
|
@@ -123,7 +123,16 @@
|
|
| 123 |
"poster_sha256": "69017794bca8642fdeec19b305beea806badaf09d3e050250e481197d5ed9426"
|
| 124 |
}
|
| 125 |
}
|
| 126 |
-
]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 127 |
},
|
| 128 |
{
|
| 129 |
"id": "philips-positive",
|
|
@@ -265,6 +274,15 @@
|
|
| 265 |
"poster_sha256": "3e25b34f8cbeff64eba439f949287480c82c7e61b238603555459fdb9cdec8e2"
|
| 266 |
}
|
| 267 |
}
|
| 268 |
-
]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 269 |
}
|
| 270 |
]
|
|
|
|
| 123 |
"poster_sha256": "69017794bca8642fdeec19b305beea806badaf09d3e050250e481197d5ed9426"
|
| 124 |
}
|
| 125 |
}
|
| 126 |
+
],
|
| 127 |
+
"expert_scores": [
|
| 128 |
+
0.0,
|
| 129 |
+
0.0,
|
| 130 |
+
0.0,
|
| 131 |
+
0.0,
|
| 132 |
+
0.0,
|
| 133 |
+
0.0
|
| 134 |
+
],
|
| 135 |
+
"reference_url": "https://huggingface.co/datasets/MesserMMP/coronary-angiography-syntax/blob/f5d6b5b4aa9856b12b8d65971beb8fce2f71e370/test_data/philips_97.json"
|
| 136 |
},
|
| 137 |
{
|
| 138 |
"id": "philips-positive",
|
|
|
|
| 274 |
"poster_sha256": "3e25b34f8cbeff64eba439f949287480c82c7e61b238603555459fdb9cdec8e2"
|
| 275 |
}
|
| 276 |
}
|
| 277 |
+
],
|
| 278 |
+
"expert_scores": [
|
| 279 |
+
31.5,
|
| 280 |
+
35.5,
|
| 281 |
+
38.5,
|
| 282 |
+
29.5,
|
| 283 |
+
40.5,
|
| 284 |
+
35.5
|
| 285 |
+
],
|
| 286 |
+
"reference_url": "https://huggingface.co/datasets/MesserMMP/coronary-angiography-syntax/blob/f5d6b5b4aa9856b12b8d65971beb8fce2f71e370/test_data/philips_97.json"
|
| 287 |
}
|
| 288 |
]
|
service/storage.py
CHANGED
|
@@ -76,6 +76,8 @@ class Study:
|
|
| 76 |
source_type: str = 'upload'
|
| 77 |
default_projection_id: str | None = None
|
| 78 |
reference_score: float | None = None
|
|
|
|
|
|
|
| 79 |
|
| 80 |
def public(self) -> dict:
|
| 81 |
return {'id': self.id, 'study_uid': self.study_uid,
|
|
@@ -84,6 +86,8 @@ class Study:
|
|
| 84 |
'source_type': self.source_type,
|
| 85 |
'default_projection_id': self.default_projection_id,
|
| 86 |
'reference_score': self.reference_score,
|
|
|
|
|
|
|
| 87 |
'hydrated': all(p.path.is_file() for p in self.projections),
|
| 88 |
'projections': [p.public(self.id) for p in self.projections]}
|
| 89 |
|
|
|
|
| 76 |
source_type: str = 'upload'
|
| 77 |
default_projection_id: str | None = None
|
| 78 |
reference_score: float | None = None
|
| 79 |
+
expert_scores: list[float] | None = None
|
| 80 |
+
reference_url: str | None = None
|
| 81 |
|
| 82 |
def public(self) -> dict:
|
| 83 |
return {'id': self.id, 'study_uid': self.study_uid,
|
|
|
|
| 86 |
'source_type': self.source_type,
|
| 87 |
'default_projection_id': self.default_projection_id,
|
| 88 |
'reference_score': self.reference_score,
|
| 89 |
+
'expert_scores': self.expert_scores,
|
| 90 |
+
'reference_url': self.reference_url,
|
| 91 |
'hydrated': all(p.path.is_file() for p in self.projections),
|
| 92 |
'projections': [p.public(self.id) for p in self.projections]}
|
| 93 |
|
static/app.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
| 1 |
'use strict';
|
| 2 |
const $=id=>document.getElementById(id);
|
| 3 |
-
const words={en:{studies:'Studies',addStudy:'Add study',sidebarEmpty:'No studies loaded.',ephemeral:'Session',sessionHint:'Files expire after 1 hour of inactivity.',modelLink:'Model & methodology ↗',datasetLink:'Open dataset ↗',workspace:'SYNTAX analysis',initialTitle:'New study',initialSubtitle:'Upload DICOM or open a public example.',researchOnly:'Research use',stepUpload:'Upload',stepReview:'Review',stepResult:'Result',dropTitle:'Upload DICOM',dropDescription:'Drop study files or a ZIP archive.',chooseFiles:'Choose files',beforeStart:'Input requirements',prepareTitle:'De-identified DICOM',prepareText:'Remove personal information before upload.',runTitle:'LCA and RCA projections',runText:'Both arteries are required for a full-study score.',projection:'Projection',selectProjection:'Select a projection',dicomPreview:'DICOM · contrast-adjusted preview',projectionAssignment:'Artery',leftArtery:'Left',rightArtery:'Right',exclude:'Exclude',allProjections:'Projections',autoClassify:'Identify arteries',resultTitle:'Result',notCalculated:'Not calculated',resultEmpty:'Run analysis to calculate the score.',rawSideNote:'Before calibration',downloadResult:'Export JSON',readyToRun:'Projection summary',excluded:'Excluded',calculate:'Calculate SYNTAX',jobHint:'The first run downloads the model weights.',jobHintCpu:'CPU analysis can take several minutes.',reviewOne:'1 projection needs review.',reviewMany:'{count} projections need review.',methodTitle:'Model',ensemble:'Ensemble',ensembleValue:'5 folds · 10 models',calibration:'Calibration',calibrationValue:'Applied per fold',device:'Compute',modelVersion:'Model revision',modelScope:'Research use only.',foldResults:'Five-fold ensemble results',foldHint:'',rawScore:'Before calibration',calibratedScore:'After calibration',uploading:'Reading your study',uploadingHint:'Checking DICOM and grouping projections by StudyUID.',connecting:'Connecting…',offline:'Service unavailable',weightsDemand:'weights on demand',modelReady:'model available',weightsCached:'weights cached',modelLoading:'loading weights',modelError:'model unavailable',study:'Study',projections:'projections',frames:'frames',unassigned:'Unassigned',ready:'Ready',complete:'Complete',partial:'Partial',calibratedCaption:'Calibrated ensemble estimate',partialCaption:'A full-study score needs both arteries. Available artery estimates are shown below.',greater22:'SYNTAX ≥ 22',notGreater22:'SYNTAX < 22',reviewUnassigned:'Assign or exclude every projection before running.',bothReady:'Both coronary arteries included.',onlyLeft:'Only LCA is represented. The result will be partial.',onlyRight:'Only RCA is represented. The result will be partial.',noIncluded:'Assign at least one eligible projection to an artery.',shortProjection:'Fewer than 10 frames · excluded from inference',shortCannotAssign:'Clips shorter than 10 frames cannot be included.',assignmentDefault:'',copied:'StudyUID copied',copyFailed:'Could not copy StudyUID',deleted:'Study removed',deleteConfirm:'Remove this study and its uploaded files?',processing:'Processing…',queued:'Waiting to start…',failed:'The operation could not be completed.',invalidResponse:'The service returned an unexpected response.',loaded:'Study loaded',excludedFiles:'Files not added',noStudies:'No usable studies were found.',previewLabel:'Design preview · real public DICOM, no model prediction',previewHint:'This is a design preview. Open the workspace to upload a study and run the model.',earlier:'Move earlier',later:'Move later',order:'Projection order',exampleTitle:'Public examples',referenceLabel:'Reference',referenceSyntaxLabel:'Reference SYNTAX',modelLabel:'Model',precomputedLabel:'Precomputed',exampleLoad:'Open example',exampleHint:'Published holdout studies.',loadingExample:'Loading the example',notAvailable:'Not available',deviceLocal:'Compute',resultStale:'Assignments changed. Run the model again.',atLeastOne:'Choose DICOM files or a ZIP archive.',readySubtitle:'Review the artery assignments.',lowConfidence:'Review suggested assignment',jobClassify:'Identifying arteries',jobInference:'Calculating SYNTAX',jobExample:'Loading public example',confirmAuto:'Automatic classification will replace the current artery assignments for this study.',confirmClassifyTitle:'Replace artery assignments?',confirmDeleteTitle:'Remove this study?',dialogCancel:'Cancel',dialogContinue:'Continue',modelPreparing:'Preparing the ensemble',downloadFailed:'No result is available yet.',close:'Close',expand:'Expand preview',copyUid:'Copy StudyUID',arteryControls:'Artery assignment',workflow:'Workflow',previewVideo:'Angiography display preview',expandedVideo:'Expanded angiography display preview',removeStudy:'Remove study',modelsLicense:'Models & data · CC BY 4.0',expired:'This temporary session has expired. Please upload the study again.',lightTheme:'Light',darkTheme:'Dark',appearance:'Color theme',recalculate:'Recalculate SYNTAX',completeSubtitle:'Analysis complete.',partialSubtitle:'Partial analysis — one coronary artery is missing.',play:'Play',pause:'Pause',previousFrame:'Previous frame',nextFrame:'Next frame',seekFrame:'Frame',framePosition:'Frame {frame} of {total}',collapsePreview:'Return to study',playbackSpeed:'Playback speed',playbackSpeedValue:'Playback speed: {rate}×'},ru:{studies:'Исследования',addStudy:'Добавить исследование',sidebarEmpty:'Исследования не загружены.',ephemeral:'Сессия',sessionHint:'Файлы удаляются после 1 часа бездействия.',modelLink:'Модель и методология ↗',datasetLink:'Открытый датасет ↗',workspace:'Анализ SYNTAX',initialTitle:'Новое исследование',initialSubtitle:'Загрузите DICOM или откройте публичный пример.',researchOnly:'Для исследований',stepUpload:'Загрузить',stepReview:'Проверить',stepResult:'Результат',dropTitle:'Загрузить DICOM',dropDescription:'Перетащите файлы исследования или ZIP-архив.',chooseFiles:'Выбрать файлы',beforeStart:'Требования к данным',prepareTitle:'Обезличенные DICOM',prepareText:'Удалите персональную информацию до загрузки.',runTitle:'Проекции LCA и RCA',runText:'Для полной оценки нужны обе артерии.',projection:'Проекция',selectProjection:'Выберите проекцию',dicomPreview:'DICOM · контраст для просмотра',projectionAssignment:'Артерия',leftArtery:'Левая',rightArtery:'Правая',exclude:'Исключить',allProjections:'Проекции',autoClassify:'Определить артерии',resultTitle:'Результат',notCalculated:'Не рассчитан',resultEmpty:'Запустите анализ для расчёта оценки.',rawSideNote:'До калибровки',downloadResult:'Экспорт JSON',readyToRun:'Состав проекций',excluded:'Исключено',calculate:'Рассчитать SYNTAX',jobHint:'При первом запуске загружаются веса модели.',jobHintCpu:'Расчёт на CPU может занять несколько минут.',reviewOne:'Проверить проекции: 1.',reviewMany:'Проверить проекции: {count}.',methodTitle:'Модель',ensemble:'Ансамбль',ensembleValue:'5 фолдов · 10 моделей',calibration:'Калибровка',calibrationValue:'Для каждого фолда',device:'Вычисления',modelVersion:'Версия модели',modelScope:'Только для исследований.',foldResults:'Оценки по фолдам',foldHint:'',rawScore:'До калибровки',calibratedScore:'После калибровки',uploading:'Читаем исследование',uploadingHint:'Проверяем DICOM и собираем проекции по StudyUID.',connecting:'Подключение…',offline:'Сервис недоступен',weightsDemand:'веса по запросу',modelReady:'модель доступна',weightsCached:'веса загружены',modelLoading:'загрузка весов',modelError:'модель недоступна',study:'Исследование',projections:'проекций',frames:'кадров',unassigned:'Не назначена',ready:'Готово',complete:'Рассчитан',partial:'Частичный',calibratedCaption:'Калиброванная оценка ансамбля',partialCaption:'Для итоговой оценки нужны обе артерии. Ниже показаны доступные вклады.',greater22:'SYNTAX ≥ 22',notGreater22:'SYNTAX < 22',reviewUnassigned:'Назначьте или исключите каждую проекцию перед расчётом.',bothReady:'Обе коронарные артерии включены.',onlyLeft:'Представлена только LCA. Результат будет частичным.',onlyRight:'Представлена только RCA. Результат будет частичным.',noIncluded:'Назначьте хотя бы одну подходящую проекцию артерии.',shortProjection:'Меньше 10 кадров · исключено из расчёта',shortCannotAssign:'Видео короче 10 кадров нельзя включить в расчёт.',assignmentDefault:'',copied:'StudyUID скопирован',copyFailed:'Не удалось скопировать StudyUID',deleted:'Исследование удалено',deleteConfirm:'Удалить исследование и загруженные файлы?',processing:'Обработка…',queued:'Ожидаем запуска…',failed:'Не удалось завершить операцию.',invalidResponse:'Сервис вернул неожиданный ответ.',loaded:'Исследование загружено',excludedFiles:'Файлы не добавлен��',noStudies:'Подходящие исследования не найдены.',previewLabel:'Макет интерфейса · реальные публичные DICOM, без предсказания модели',previewHint:'Это макет интерфейса. Откройте рабочее пространство для загрузки и расчёта.',earlier:'Раньше',later:'Позже',order:'Порядок проекций',exampleTitle:'Публичные примеры',referenceLabel:'Эталон',referenceSyntaxLabel:'Эталон SYNTAX',modelLabel:'Модель',precomputedLabel:'Сохранённый результат',exampleLoad:'Открыть пример',exampleHint:'Исследования из опубликованных holdout.',loadingExample:'Загружаем пример',notAvailable:'Недоступно',deviceLocal:'Вычисления',resultStale:'Назначения изменены. Запустите расчёт заново.',atLeastOne:'Выберите DICOM-файлы или ZIP-архив.',readySubtitle:'Проверьте назначения артерий.',lowConfidence:'Проверьте предложенную артерию',jobClassify:'Определяем артерии',jobInference:'Рассчитываем SYNTAX',jobExample:'Загружаем публичный пример',confirmAuto:'Автоматическое определение заменит текущие назначения артерий для этого исследования.',confirmClassifyTitle:'Заменить назначения артерий?',confirmDeleteTitle:'Удалить исследование?',dialogCancel:'Отмена',dialogContinue:'Продолжить',modelPreparing:'Подготовка ансамбля',downloadFailed:'Результат пока недоступен.',close:'Закрыть',expand:'Увеличить превью',copyUid:'Копировать StudyUID',arteryControls:'Назначение артерии',workflow:'Этапы анализа',previewVideo:'Превью коронарной ангиографии',expandedVideo:'Увеличенное превью коронарной ангиографии',removeStudy:'Удалить исследование',modelsLicense:'Модели и данные · CC BY 4.0',expired:'Срок временного хранения истёк. Загрузите исследование заново.',lightTheme:'Светлая',darkTheme:'Тёмная',appearance:'Цветовая тема',recalculate:'Пересчитать SYNTAX',completeSubtitle:'Анализ завершён.',partialSubtitle:'Частичный анализ — отсутствует одна из артерий.',play:'Воспроизвести',pause:'Пауза',previousFrame:'Предыдущий кадр',nextFrame:'Следующий кадр',seekFrame:'Кадр',framePosition:'Кадр {frame} из {total}',collapsePreview:'Вернуться к исследованию',playbackSpeed:'Скорость воспроизведения',playbackSpeedValue:'Скорость воспроизведения: {rate}×'}};
|
| 4 |
const safeStored=(key,fallback)=>{try{return localStorage.getItem(key)||fallback;}catch{return fallback;}};
|
| 5 |
let lang=safeStored('cardiosyntax-language','en');if(!words[lang])lang='en';
|
| 6 |
let studies=[],selectedStudyId=null,selectedProjectionId=null,status=null,statusChecked=false,busy=false,activeJob=null,pollTimer=null,resultByStudy=new Map(),resultJobByStudy=new Map();
|
|
@@ -33,7 +33,49 @@ function renderCounts(){const s=currentStudy();const counts={left:0,right:0,excl
|
|
| 33 |
function invalidateResult(){const id=selectedStudyId;if(resultByStudy.has(id)){resultByStudy.delete(id);resultJobByStudy.delete(id);toast(t('resultStale'));}}
|
| 34 |
function finite(...values){return values.find(v=>typeof v==='number'&&Number.isFinite(v));}
|
| 35 |
function number(value){return typeof value==='number'&&Number.isFinite(value)?value.toFixed(2):'—';}
|
| 36 |
-
function
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 37 |
function resultMatchesStudy(result,study){if(!result||!study)return false;const assignments=result.input_assignments;if(!Array.isArray(assignments))return result.source?.type!=='precomputed_example';return assignments.length===study.projections.length&&assignments.every((a,i)=>a.id===study.projections[i].id&&a.artery===study.projections[i].artery);}
|
| 38 |
function adoptCachedJob(job){if(!job||job.status!=='completed'||job.kind!=='inference')return;const study=studies.find(s=>s.id===job.study_id);if(!resultMatchesStudy(job.result,study))return;resultByStudy.set(study.id,job.result);resultJobByStudy.set(study.id,job.id);}
|
| 39 |
function acceptStudies(data){const incoming=data.studies||(data.study?[data.study]:[]);for(const s of incoming){const old=studies.findIndex(x=>x.id===s.id);if(old>=0)studies[old]=s;else studies.push(s);}adoptCachedJob(data.cached_job);if(incoming.length)selectStudy(incoming[0].id);const messages=[];const errors=(data.rejected||[]).map(x=>`${x.name}: ${localizeError(x.reason)}`);if(errors.length)messages.push(t('excludedFiles')+'\n'+errors.join('\n'));else if(!incoming.length)messages.push(t('noStudies'));const warnings=data.warnings||[];if(warnings.length)messages.push(warnings.map(x=>typeof x==='string'?x:JSON.stringify(x)).join('\n'));if(messages.length)showError(messages.join('\n\n'));render();if(data.cached_job&&resultByStudy.get(selectedStudyId)?.source?.type==='precomputed_example'&&!window.matchMedia('(prefers-reduced-motion: reduce)').matches)$('viewer-image').play().catch(()=>{});}
|
|
@@ -46,7 +88,7 @@ function finishJob(){busy=false;activeJob=null;clearTimeout(pollTimer);$('job-st
|
|
| 46 |
async function pollJob(){if(!activeJob)return;try{const job=await request(`/api/jobs/${activeJob.id}`);activeJob.message=job.message;hideError();refreshStatus();const progress=Math.min(1,Math.max(0,Number(job.progress)||0));$('job-progress').value=progress;$('job-percentage').textContent=progress?`${Math.round(progress*100)}%`:'';$('job-message').textContent=localizeStage(job.message)||t(job.status==='queued'?'queued':activeJob.kind==='classify'?'jobClassify':activeJob.kind==='example'?'jobExample':'jobInference');if(activeJob.kind==='example'){$('upload-title').textContent=t('loadingExample');$('upload-hint').textContent=$('job-message').textContent;$('overlay-progress').hidden=false;$('overlay-progress').value=progress;}if(job.status==='completed'){if(activeJob.kind==='example')acceptStudies(job.result||{});else if(activeJob.kind==='classify'){const updated=job.result?.study;if(updated){const index=studies.findIndex(s=>s.id===updated.id);if(index>=0){const order=studies[index].projections.map(p=>p.id);updated.projections.sort((a,b)=>order.indexOf(a.id)-order.indexOf(b.id));studies[index]=updated;if(selectedStudyId===updated.id){const unresolved=updated.projections.find(p=>p.artery==='unassigned');if(unresolved)selectedProjectionId=unresolved.id;}}resultByStudy.delete(updated.id);resultJobByStudy.delete(updated.id);}}else {resultByStudy.set(activeJob.study_id,job.result);resultJobByStudy.set(activeJob.study_id,job.id);}finishJob();return;}if(job.status==='failed'){const message=errorText(job.error);finishJob();showError(message);return;}pollTimer=setTimeout(pollJob,1200);}catch(e){if(e.status===404){finishJob();showError(t('expired'));}else{showError(e.message);pollTimer=setTimeout(pollJob,5000);}}}
|
| 47 |
let examples=[];
|
| 48 |
function referenceNumber(value){return value.toFixed(2);}
|
| 49 |
-
function renderExamples(){let box=$('examples-box');if(!box){box=el('section','examples-box');box.id='examples-box';document.querySelector('.welcome-aside').append(box);}box.replaceChildren();if(!examples.length)return;box.append(el('span','eyebrow',t('exampleTitle')));for(const example of examples){const b=el('button','example-button');b.disabled=busy;const reference=finite(example.reference_score),prediction=example.cached_result_available?finite(example.prediction?.calibrated):undefined;const vendor=example.vendor||example.title?.split(' · ')[0]||example.id;const header=el('span','example-card-header');const detail=el('span','example-detail');detail.append(el('strong','',vendor));if(Number.isFinite(example.files))detail.append(el('span','',`${example.files} ${t('projections')}`));header.append(detail,icon('arrow'));b.append(header);if(reference!==undefined||prediction!==undefined){b.classList.add('example-with-scores');const scores=el('span','example-scores');if(reference!==undefined){const cell=el('span','example-score');cell.append(el('small','',t('
|
| 50 |
async function loadExamples(){if(previewMode)return;try{const d=await request('/api/examples');examples=d.examples||[];renderExamples();}catch{}}
|
| 51 |
async function loadExample(id){if(busy)return;busy=true;hideError();render();renderExamples();$('upload-overlay').hidden=false;$('upload-title').textContent=t('loadingExample');$('upload-hint').textContent=t('queued');$('overlay-progress').hidden=false;$('overlay-progress').value=0;try{const job=await request(`/api/examples/${encodeURIComponent(id)}/load`,{method:'POST'});activeJob={...job,kind:'example'};persistWorkspace();pollJob();}catch(e){finishJob();showError(e.message);}}
|
| 52 |
let expandedPlayback=null;
|
|
@@ -54,12 +96,12 @@ function openPreview(){const p=currentProjection();if(!p)return;const main=$('vi
|
|
| 54 |
function closeExpandedPreview(){const video=$('dialog-image'),main=$('viewer-image');const paused=video.paused;video.pause();if(expandedPlayback&¤tProjection()?.id===expandedPlayback.projectionId){if(Number.isFinite(main.duration))main.currentTime=Math.min(video.currentTime,Math.max(0,main.duration-.001));if(!paused)main.play().catch(()=>{});}expandedPlayback=null;}
|
| 55 |
const cinePlayers=[];let cinePlaybackRate=1;
|
| 56 |
function setCineSpeed(rate){if(![.5,1].includes(rate))return;cinePlaybackRate=rate;for(const player of cinePlayers){player.video.defaultPlaybackRate=rate;player.video.playbackRate=rate;updateCine(player);}}
|
| 57 |
-
function buildCine(video){const controls=el('div','cine-controls');const play=el('button','cine-button cine-play');play.type='button';const previous=el('button','cine-button');previous.type='button';previous.append(icon('frame-back'));const next=el('button','cine-button');next.type='button';next.append(icon('frame-forward'));const range=el('input','cine-range');range.type='range';range.min='0';range.step='1';range.value='0';range.max='0';const counter=el('span','cine-counter','— / —');const speed=el('span','cine-speed');speed.setAttribute('role','group');const speedButtons=[.5,1].map(rate=>{const button=el('button','',`${rate}×`);button.type='button';button.dataset.rate=String(rate);button.addEventListener('click',()=>setCineSpeed(rate));speed.append(button);return button;});controls.append(play,previous,next,range,counter,speed);if(video.id==='viewer-image')$('viewer-canvas').after(controls);else video.after(controls);const player={video,play,previous,next,range,counter,speed,speedButtons};cinePlayers.push(player);video.defaultPlaybackRate=cinePlaybackRate;video.playbackRate=cinePlaybackRate;video.tabIndex=0;play.addEventListener('click',()=>toggleCine(player));previous.addEventListener('click',()=>stepCine(player,-1));next.addEventListener('click',()=>stepCine(player,1));range.addEventListener('input',()=>seekCine(player,Number(range.value)));for(const event of ['loadedmetadata','durationchange','timeupdate','play','pause','seeked','emptied','error','ratechange'])video.addEventListener(event,()=>updateCine(player));video.addEventListener('keydown',event=>{if(event.key===' '){event.preventDefault();toggleCine(player);}else if(event.key==='ArrowLeft'||event.key==='ArrowRight'){event.preventDefault();stepCine(player,event.key==='ArrowLeft'?-1:1);}});updateCine(player);}
|
| 58 |
function cineFrame(player){const {video}=player,frames=Number(video.dataset.frames)||0;return frames&&Number.isFinite(video.duration)&&video.duration>0?Math.min(frames-1,Math.floor(video.currentTime/video.duration*frames)):0;}
|
| 59 |
function seekCine(player,index){const {video}=player,frames=Number(video.dataset.frames)||0;if(!frames||!Number.isFinite(video.duration)||video.duration<=0)return;video.currentTime=Math.min(video.duration-.001,(Math.max(0,Math.min(frames-1,index))+.001)*video.duration/frames);updateCine(player);}
|
| 60 |
function stepCine(player,delta){player.video.pause();seekCine(player,cineFrame(player)+delta);}
|
| 61 |
function toggleCine(player){if(player.video.paused)player.video.play().catch(()=>{});else player.video.pause();}
|
| 62 |
-
function updateCine(player){const {video,play,previous,next,range,counter,speed,speedButtons}=player;speed.setAttribute('aria-label',t('playbackSpeed'));speed.title=t('playbackSpeed');for(const button of speedButtons){const selected=Number(button.dataset.rate)===video.playbackRate;button.classList.toggle('selected',selected);button.setAttribute('aria-pressed',String(selected));button.setAttribute('aria-label',t('playbackSpeedValue').replace('{rate}',button.dataset.rate));}const frames=Number(video.dataset.frames)||0;const ready=frames>0&&Number.isFinite(video.duration)&&video.duration>0&&!video.error;const frame=cineFrame(player);play.replaceChildren(icon(video.paused?'play':'pause'));play.setAttribute('aria-label',t(video.paused?'play':'pause'));play.title=t(video.paused?'play':'pause');previous.setAttribute('aria-label',t('previousFrame'));previous.title=t('previousFrame');next.setAttribute('aria-label',t('nextFrame'));next.title=t('nextFrame');range.setAttribute('aria-label',t('seekFrame'));range.max=String(Math.max(0,frames-1));range.value=String(frame);range.style.setProperty('--position',frames>1?`${frame/(frames-1)*100}%`:'0%');range.setAttribute('aria-valuetext',t('framePosition').replace('{frame}',String(frame+1)).replace('{total}',String(frames)));counter.textContent=frames?`${String(frame+1).padStart(2,'0')} / ${frames}`:'— / —';play.disabled=!ready;previous.disabled=!ready||frame===0;next.disabled=!ready||frame>=frames-1;range.disabled=!ready;}
|
| 63 |
$('language-button').addEventListener('click',()=>{lang=lang==='en'?'ru':'en';setStored('cardiosyntax-language',lang);applyLanguage();});document.querySelectorAll('[data-theme-button]').forEach(b=>b.addEventListener('click',()=>setTheme(b.dataset.themeButton)));
|
| 64 |
$('sidebar-upload').addEventListener('click',()=>{if(busy)return;$('viewer-image').pause();selectedStudyId=null;selectedProjectionId=null;hideError();render();});$('dropzone').addEventListener('click',()=>{if(!busy)$('file-input').click();});$('dropzone').addEventListener('keydown',e=>{if(e.key==='Enter'||e.key===' '){e.preventDefault();if(!busy)$('file-input').click();}});$('file-input').addEventListener('change',()=>uploadFiles([...$('file-input').files]));for(const evt of ['dragenter','dragover'])$('dropzone').addEventListener(evt,e=>{e.preventDefault();$('dropzone').classList.add('dragging');});for(const evt of ['dragleave','drop'])$('dropzone').addEventListener(evt,e=>{e.preventDefault();$('dropzone').classList.remove('dragging');});$('dropzone').addEventListener('drop',e=>uploadFiles([...e.dataTransfer.files]));$('close-notice').addEventListener('click',hideError);
|
| 65 |
document.querySelectorAll('[data-artery]').forEach(b=>b.addEventListener('click',()=>{const p=currentProjection();if(!p||busy)return;p.artery=b.dataset.artery;invalidateResult();render();}));$('classify-button').addEventListener('click',()=>startJob('classify'));$('run-button').addEventListener('click',()=>startJob('inference'));$('expand-preview').addEventListener('click',openPreview);$('close-preview').addEventListener('click',()=>$('preview-dialog').close());$('preview-dialog').addEventListener('close',closeExpandedPreview);$('preview-dialog').addEventListener('click',e=>{if(e.target===$('preview-dialog'))$('preview-dialog').close();});$('viewer-image').addEventListener('error',()=>{$('viewer-image').hidden=true;$('viewer-empty').hidden=false;});
|
|
@@ -74,7 +116,7 @@ function localizeStage(message){if(!message||lang==='en')return message;const in
|
|
| 74 |
|
| 75 |
window.addEventListener('beforeunload',()=>clearTimeout(pollTimer));
|
| 76 |
const mobileLayout=window.matchMedia('(max-width: 760px)');
|
| 77 |
-
function placeFoldResults(){const fold=$('fold-results');const destination=
|
| 78 |
mobileLayout.addEventListener('change',placeFoldResults);
|
| 79 |
|
| 80 |
async function init(){placeFoldResults();buildCine($('viewer-image'));buildCine($('dialog-image'));busy=!previewMode;const queryTheme=new URLSearchParams(location.search).get('theme');setTheme(queryTheme||safeStored('cardiosyntax-theme','studio'));applyLanguage();if(previewMode){$('preview-banner').hidden=false;try{const r=await fetch('/static/design-fixture.json');const fixture=await r.json();studies=fixture.studies;selectStudy(studies[0]?.id);}catch(e){showError(e.message);}return;}await refreshStatus();await restoreWorkspace();busy=!!activeJob;render();loadExamples();}
|
|
|
|
| 1 |
'use strict';
|
| 2 |
const $=id=>document.getElementById(id);
|
| 3 |
+
const words={en:{studies:'Studies',addStudy:'Add study',sidebarEmpty:'No studies loaded.',ephemeral:'Session',sessionHint:'Files expire after 1 hour of inactivity.',modelLink:'Model & methodology ↗',datasetLink:'Open dataset ↗',workspace:'SYNTAX analysis',initialTitle:'New study',initialSubtitle:'Upload DICOM or open a public example.',researchOnly:'Research use',stepUpload:'Upload',stepReview:'Review',stepResult:'Result',dropTitle:'Upload DICOM',dropDescription:'Drop study files or a ZIP archive.',chooseFiles:'Choose files',beforeStart:'Input requirements',prepareTitle:'De-identified DICOM',prepareText:'Remove personal information before upload.',runTitle:'LCA and RCA projections',runText:'Both arteries are required for a full-study score.',projection:'Projection',selectProjection:'Select a projection',dicomPreview:'DICOM · contrast-adjusted preview',projectionAssignment:'Artery',leftArtery:'Left',rightArtery:'Right',exclude:'Exclude',allProjections:'Projections',autoClassify:'Identify arteries',resultTitle:'Model estimate',notCalculated:'Not calculated',resultEmpty:'Run analysis to calculate the score.',rawSideNote:'Before calibration',downloadResult:'Export JSON',readyToRun:'Projection summary',excluded:'Excluded',calculate:'Calculate SYNTAX',jobHint:'The first run downloads the model weights.',jobHintCpu:'CPU analysis can take several minutes.',reviewOne:'1 projection needs review.',reviewMany:'{count} projections need review.',methodTitle:'Model',ensemble:'Ensemble',ensembleValue:'5 folds · 10 models',calibration:'Calibration',calibrationValue:'Per fold, before averaging',device:'Compute',modelVersion:'Model revision',modelScope:'Research use only.',foldResults:'How the estimate is calculated',foldHint:'',rawScore:'Before calibration',calibratedScore:'After calibration',uploading:'Reading your study',uploadingHint:'Checking DICOM and grouping projections by StudyUID.',connecting:'Connecting…',offline:'Service unavailable',weightsDemand:'weights on demand',modelReady:'model available',weightsCached:'weights cached',modelLoading:'loading weights',modelError:'model unavailable',study:'Study',projections:'projections',frames:'frames',unassigned:'Unassigned',ready:'Ready',complete:'Complete',partial:'Partial',calibratedCaption:'Final ensemble estimate',partialCaption:'Both coronary arteries are required for a study-level score.',greater22:'SYNTAX ≥ 22',notGreater22:'SYNTAX < 22',reviewUnassigned:'Assign or exclude every projection before running.',bothReady:'Both coronary arteries included.',onlyLeft:'Only LCA is represented. The result will be partial.',onlyRight:'Only RCA is represented. The result will be partial.',noIncluded:'Assign at least one eligible projection to an artery.',shortProjection:'Fewer than 10 frames · excluded from inference',shortCannotAssign:'Clips shorter than 10 frames cannot be included.',assignmentDefault:'',copied:'StudyUID copied',copyFailed:'Could not copy StudyUID',deleted:'Study removed',deleteConfirm:'Remove this study and its uploaded files?',processing:'Processing…',queued:'Waiting to start…',failed:'The operation could not be completed.',invalidResponse:'The service returned an unexpected response.',loaded:'Study loaded',excludedFiles:'Files not added',noStudies:'No usable studies were found.',previewLabel:'Design preview · real public DICOM, no model prediction',previewHint:'This is a design preview. Open the workspace to upload a study and run the model.',earlier:'Move earlier',later:'Move later',order:'Projection order',exampleTitle:'Public examples',referenceLabel:'Expert mean',referenceSyntaxLabel:'Expert assessment',modelLabel:'Model',precomputedLabel:'Saved GPU result',exampleLoad:'Open example',exampleHint:'Published holdout studies.',loadingExample:'Loading the example',notAvailable:'Not available',deviceLocal:'Compute',resultStale:'Assignments changed. Run the model again.',atLeastOne:'Choose DICOM files or a ZIP archive.',readySubtitle:'Review the artery assignments.',lowConfidence:'Review suggested assignment',jobClassify:'Identifying arteries',jobInference:'Calculating SYNTAX',jobExample:'Loading public example',confirmAuto:'Automatic classification will replace the current artery assignments for this study.',confirmClassifyTitle:'Replace artery assignments?',confirmDeleteTitle:'Remove this study?',dialogCancel:'Cancel',dialogContinue:'Continue',modelPreparing:'Preparing the ensemble',downloadFailed:'No result is available yet.',close:'Close',expand:'Expand preview',copyUid:'Copy StudyUID',arteryControls:'Artery assignment',workflow:'Workflow',previewVideo:'Angiography display preview',expandedVideo:'Expanded angiography display preview',removeStudy:'Remove study',modelsLicense:'Models & data · CC BY 4.0',expired:'This temporary session has expired. Please upload the study again.',lightTheme:'Light',darkTheme:'Dark',appearance:'Color theme',recalculate:'Recalculate SYNTAX',completeSubtitle:'Analysis complete.',partialSubtitle:'Partial analysis — one coronary artery is missing.',play:'Play',pause:'Pause',previousFrame:'Previous frame',nextFrame:'Next frame',seekFrame:'Frame',framePosition:'Frame {frame} of {total}',collapsePreview:'Return to study',playbackSpeed:'Playback speed',playbackSpeedValue:'Playback speed: {rate}×',calibratedSyntax:'Calibrated SYNTAX',rawStudyTotal:'Before calibration',howCalculated:'How calculated',expertMeanSix:'Mean of six experts',expertMeanPublished:'Published expert mean',expertLabel:'Expert',expertContext:'For comparison only. Expert scores are not supplied to the model.',datasetAnnotation:'Dataset annotation ↗',foldDefinition:'A fold pairs LCA and RCA models trained on the same data split.',stepModelsTitle:'10 model outputs',stepModelsText:'Five LCA models and five RCA models.',stepSumsTitle:'5 study sums',stepSumsText:'Add the LCA and RCA output within each fold.',stepCalibrationTitle:'5 calibrated values',stepCalibrationText:'Apply each fold’s published a × sum + b.',stepAverageTitle:'Final estimate',stepAverageText:'Average the five calibrated values, then apply a minimum of zero.',foldLabel:'Fold',leftModel:'LCA model',rightModel:'RCA model',pairedSum:'LCA + RCA',foldFormula:'a × sum + b',foldCalibrated:'Calibrated',meanSums:'Mean LCA + RCA',meanCalibrated:'Mean after calibration',finalScore:'Final SYNTAX',beforeDisplayed:'Before calibration: {value}',beforeZeroLimit:'Before the final zero limit',finalFormula:'max(0, mean calibrated)',negativeOutputs:'Models can return negative intermediate estimates. These are not negative clinical scores: the values are retained through calibration and averaging; only final study scores have a minimum of zero.',roundingNote:'Intermediate values show three decimals; calculations use full precision.',fixedCalibration:'The app applies published coefficients and does not adjust them using this study’s expert scores.',calibrationSource:'Published coefficients ↗',partialCalculation:'Only the available artery outputs are shown. A study total and its calibration require both arteries.'},ru:{studies:'Исследования',addStudy:'Добавить исследование',sidebarEmpty:'Исследования не загружены.',ephemeral:'Сессия',sessionHint:'Файлы удаляются после 1 часа бездействия.',modelLink:'Модель и методология ↗',datasetLink:'Открытый датасет ↗',workspace:'Анализ SYNTAX',initialTitle:'Новое исследование',initialSubtitle:'Загрузите DICOM или откройте публичный пример.',researchOnly:'Для исследований',stepUpload:'Загрузить',stepReview:'Проверить',stepResult:'Результат',dropTitle:'Загрузить DICOM',dropDescription:'Перетащите файлы исследования или ZIP-архив.',chooseFiles:'Выбрать файлы',beforeStart:'Требования к данным',prepareTitle:'Обезличенные DICOM',prepareText:'Удалите персональную информацию до загрузки.',runTitle:'Проекции LCA и RCA',runText:'Для полной оценки нужны обе артерии.',projection:'Проекция',selectProjection:'Выберите проекцию',dicomPreview:'DICOM · контраст для просмотра',projectionAssignment:'Артерия',leftArtery:'Левая',rightArtery:'Правая',exclude:'Исключить',allProjections:'Проекции',autoClassify:'Определить артерии',resultTitle:'Оценка модели',notCalculated:'Не рассчитан',resultEmpty:'Запустите анализ для расчёта оценки.',rawSideNote:'До калибровки',downloadResult:'Экспорт JSON',readyToRun:'Состав проекций',excluded:'Исключено',calculate:'Рассчитать SYNTAX',jobHint:'При первом запуске загружаются веса модели.',jobHintCpu:'Расчёт на CPU может занять несколько минут.',reviewOne:'Проверить проекции: 1.',reviewMany:'Проверить проекции: {count}.',methodTitle:'Модель',ensemble:'Ансамбль',ensembleValue:'5 фолдов · 10 моделей',calibration:'Калибровка',calibrationValue:'По фолдам, до усреднения',device:'Вычисления',modelVersion:'Версия модели',modelScope:'Только для исследований.',foldResults:'Как получена оценка',foldHint:'',rawScore:'До калибровки',calibratedScore:'После калибровки',uploading:'Читаем исследование',uploadingHint:'Проверяем DICOM и собираем проекции по StudyUID.',connecting:'Подключение…',offline:'Сервис недоступен',weightsDemand:'веса по запросу',modelReady:'модель доступна',weightsCached:'веса загружены',modelLoading:'загрузка весов',modelError:'модель недоступна',study:'Исследование',projections:'проекций',frames:'кадров',unassigned:'Не назначена',ready:'Готово',complete:'Рассчитан',partial:'Частичный',calibratedCaption:'Итоговая оценка ансамбля',partialCaption:'Для общей оценки исследования нужны обе коронарные артерии.',greater22:'SYNTAX ≥ 22',notGreater22:'SYNTAX < 22',reviewUnassigned:'Назначьте или исключите каждую проекцию перед расчётом.',bothReady:'Обе коронарные артерии включены.',onlyLeft:'Представлена только LCA. Результат будет частичным.',onlyRight:'Представлена только RCA. Результат будет частичным.',noIncluded:'Назначьте хотя бы одну подходящую проекцию артерии.',shortProjection:'Меньше 10 кадров · исключено из расчёта',shortCannotAssign:'Видео короче 10 кадров нельзя включить в расчёт.',assignmentDefault:'',copied:'StudyUID скопирован',copyFailed:'Не удалось скопировать StudyUID',deleted:'Исследование удалено',deleteConfirm:'Удалить исследование и загруженные файлы?',processing:'Обработка…',queued:'Ожидаем запуска…',failed:'Не удалось завершить операцию.',invalidResponse:'Сервис вернул неожиданный ответ.',loaded:'Исследование загружено',excludedFiles:'Файлы не добавлены',noStudies:'Подходящие исследования не найдены.',previewLabel:'Макет интерфейса · реальные публичные DICOM, без предсказания модели',previewHint:'Это макет интерфейса. Откройте рабочее пространство для загрузки и расчёта.',earlier:'Раньше',later:'Позже',order:'Порядок проекций',exampleTitle:'Публичные примеры',referenceLabel:'Среднее экспертов',referenceSyntaxLabel:'Оценка экспертов',modelLabel:'Модель',precomputedLabel:'Сохранённый расчёт на GPU',exampleLoad:'Открыть пример',exampleHint:'Исследования из опубликованных holdout.',loadingExample:'Загружаем пример',notAvailable:'Недоступно',deviceLocal:'Вычисления',resultStale:'Назначения изменены. Запустите расчёт заново.',atLeastOne:'Выберите DICOM-файлы или ZIP-архив.',readySubtitle:'Проверьте назначения артерий.',lowConfidence:'Проверьте предложенную артерию',jobClassify:'Определяем артерии',jobInference:'Рассчитываем SYNTAX',jobExample:'Загружаем публичный пример',confirmAuto:'Автоматическое определение заменит текущие назначения артерий для этого исследования.',confirmClassifyTitle:'Заменить назначения артерий?',confirmDeleteTitle:'Удалить исследование?',dialogCancel:'Отмена',dialogContinue:'Продолжить',modelPreparing:'Подготовка ансамбля',downloadFailed:'Результат пока недоступен.',close:'Закрыть',expand:'Увеличить превью',copyUid:'Копировать StudyUID',arteryControls:'Назначение артерии',workflow:'Этапы анализа',previewVideo:'Превью коронарной ангиографии',expandedVideo:'Увеличенное превью коронарной ангиографии',removeStudy:'Удалить исследование',modelsLicense:'Модели и данные · CC BY 4.0',expired:'Срок временного хранения истёк. Загрузите исследование заново.',lightTheme:'Светлая',darkTheme:'Тёмная',appearance:'Цветовая тема',recalculate:'Пересчитать SYNTAX',completeSubtitle:'Анализ завершён.',partialSubtitle:'Частичный анализ — отсутствует одна из артерий.',play:'Воспроизвести',pause:'Пауза',previousFrame:'Предыдущий кадр',nextFrame:'Следующий кадр',seekFrame:'Кадр',framePosition:'Кадр {frame} из {total}',collapsePreview:'Вернуться к исследованию',playbackSpeed:'Скорость воспроизведения',playbackSpeedValue:'Скорость воспроизведения: {rate}×',calibratedSyntax:'Калиброванный SYNTAX',rawStudyTotal:'До калибровки',howCalculated:'Как получен результат',expertMeanSix:'Среднее шести экспертов',expertMeanPublished:'Опубликованное среднее экспертов',expertLabel:'Эксперт',expertContext:'Только для сравнения. Оценки экспертов не передаются модели.',datasetAnnotation:'Разметка датасета ↗',foldDefinition:'Фолд — пара моделей LCA и RCA, обученных на одном разбиении данных.',stepModelsTitle:'10 выходов моделей',stepModelsText:'Пять моделей LCA и пять моделей RCA.',stepSumsTitle:'5 сумм исследования',stepSumsText:'В каждом фолде складываем выходы LCA и RCA.',stepCalibrationTitle:'5 калиброванных значений',stepCalibrationText:'Применяем опубликованные a × сумма + b каждого фолда.',stepAverageTitle:'Итоговая оценка',stepAverageText:'Усредняем пять калиброванных значений и ограничиваем итог снизу нулём.',foldLabel:'Фолд',leftModel:'Модель LCA',rightModel:'Модель RCA',pairedSum:'LCA + RCA',foldFormula:'a × сумма + b',foldCalibrated:'После калибровки',meanSums:'Средняя сумма LCA + RCA',meanCalibrated:'Среднее после калибровки',finalScore:'Итоговый SYNTAX',beforeDisplayed:'До калибровки: {value}',beforeZeroLimit:'До ограничения итога снизу нулём',finalFormula:'max(0, среднее после калибровки)',negativeOutputs:'Модели могут возвращать отрицательные промежуточные оценки. Это не отрицательные клинические значения: они сохраняются при калибровке и ус��еднении; только итоговые оценки исследования ограничиваются снизу нулём.',roundingNote:'Промежуточные значения показаны с тремя знаками; расчёт использует полную точность.',fixedCalibration:'Приложение использует опубликованные коэффициенты и не подстраивает их под оценки этого исследования.',calibrationSource:'Опубликованные коэффициенты ↗',partialCalculation:'Показаны выходы моделей доступной артерии. Для общей суммы и её калибровки нужны обе артерии.'}};
|
| 4 |
const safeStored=(key,fallback)=>{try{return localStorage.getItem(key)||fallback;}catch{return fallback;}};
|
| 5 |
let lang=safeStored('cardiosyntax-language','en');if(!words[lang])lang='en';
|
| 6 |
let studies=[],selectedStudyId=null,selectedProjectionId=null,status=null,statusChecked=false,busy=false,activeJob=null,pollTimer=null,resultByStudy=new Map(),resultJobByStudy=new Map();
|
|
|
|
| 33 |
function invalidateResult(){const id=selectedStudyId;if(resultByStudy.has(id)){resultByStudy.delete(id);resultJobByStudy.delete(id);toast(t('resultStale'));}}
|
| 34 |
function finite(...values){return values.find(v=>typeof v==='number'&&Number.isFinite(v));}
|
| 35 |
function number(value){return typeof value==='number'&&Number.isFinite(value)?value.toFixed(2):'—';}
|
| 36 |
+
function intermediateNumber(value){return typeof value==='number'&&Number.isFinite(value)?(Math.abs(value)<.0005?0:value).toFixed(3):'—';}
|
| 37 |
+
function coefficientNumber(value){return typeof value==='number'&&Number.isFinite(value)?String(value):'—';}
|
| 38 |
+
function resultRows(result){
|
| 39 |
+
if(!result)return[];
|
| 40 |
+
const recorded=result.per_fold||result.folds||[],left=result.left?.per_fold||[],right=result.right?.per_fold||[],coefficients=result.provenance?.calibration_source?.folds||[];
|
| 41 |
+
const length=Math.max(recorded.length,left.length,right.length);
|
| 42 |
+
return Array.from({length},(_,index)=>{const row=recorded[index]||{},coefficient=coefficients[row.fold??index]||{};return{fold:row.fold??index,left:finite(row.left,left[index]),right:finite(row.right,right[index]),raw:finite(row.raw,row.raw_score,row.total_raw),calibrated:finite(row.calibrated,row.calibrated_score,row.total_calibrated),a:finite(row.a,coefficient.a),b:finite(row.b,coefficient.b)};});
|
| 43 |
+
}
|
| 44 |
+
function meanComplete(rows,key){if(!rows.length||rows.some(row=>finite(row[key])===undefined))return undefined;return rows.reduce((sum,row)=>sum+row[key],0)/rows.length;}
|
| 45 |
+
function setSourceLink(node,url){try{const link=new URL(url);if(link.protocol!=='https:'||link.hostname!=='huggingface.co')throw new Error();node.href=link.href;node.hidden=false;}catch{node.removeAttribute('href');node.hidden=true;}}
|
| 46 |
+
function renderExperts(){
|
| 47 |
+
const study=currentStudy(),reference=finite(study?.reference_score),scores=Array.isArray(study?.expert_scores)&&study.expert_scores.length===6&&study.expert_scores.every(value=>finite(value)!==undefined)?study.expert_scores:[];
|
| 48 |
+
$('reference-score').hidden=reference===undefined&&!scores.length;
|
| 49 |
+
$('reference-score-value').textContent=number(reference);
|
| 50 |
+
$('expert-mean-caption').textContent=t(scores.length===6?'expertMeanSix':'expertMeanPublished');
|
| 51 |
+
const values=$('expert-scores');values.replaceChildren();values.hidden=!scores.length;
|
| 52 |
+
scores.forEach((value,index)=>{const cell=el('div','expert-score');cell.append(el('span','expert-label',`${t('expertLabel')} ${index}`),el('strong','',number(value)));values.append(cell);});
|
| 53 |
+
setSourceLink($('reference-source'),study?.reference_url);
|
| 54 |
+
}
|
| 55 |
+
function renderCalculation(result,rows){
|
| 56 |
+
const available=!!result&&rows.length>0,partial=result?.complete===false;
|
| 57 |
+
$('fold-results').hidden=!available;$('calculation-link').hidden=!available;
|
| 58 |
+
const body=$('fold-table-body');body.replaceChildren();
|
| 59 |
+
if(!available){$('mean-raw-number').textContent='—';$('mean-calibrated-number').textContent='—';$('final-total-number').textContent='—';$('negative-output-note').hidden=true;$('calibration-source').hidden=true;return;}
|
| 60 |
+
$('calculation-flow').hidden=partial;$('calculation-summary').hidden=partial;$('calculation-partial').hidden=!partial;
|
| 61 |
+
rows.forEach(row=>{const line=el('tr');const fold=el('th','',String(row.fold).padStart(2,'0'));fold.scope='row';let formula='—';if(row.a!==undefined&&row.b!==undefined&&row.raw!==undefined){const sum=intermediateNumber(row.raw);formula=`${coefficientNumber(row.a)} × ${row.raw<0?`(${sum})`:sum} ${row.b<0?'−':'+'} ${coefficientNumber(Math.abs(row.b))}`;}line.append(fold,el('td','model-output',intermediateNumber(row.left)),el('td','model-output',intermediateNumber(row.right)),el('td','paired-output',intermediateNumber(row.raw)),el('td','fold-formula',formula),el('td','calibrated-output',intermediateNumber(row.calibrated)));body.append(line);});
|
| 62 |
+
const rawMean=meanComplete(rows,'raw'),calibratedMean=meanComplete(rows,'calibrated');
|
| 63 |
+
$('mean-raw-number').textContent=intermediateNumber(rawMean);$('mean-calibrated-number').textContent=intermediateNumber(calibratedMean);$('final-total-number').textContent=number(finite(result.calibrated,result.calibrated_score,result.total?.calibrated));
|
| 64 |
+
$('raw-total-caption').textContent=t('beforeDisplayed').replace('{value}',number(finite(result.raw,result.raw_score,result.total?.raw)));
|
| 65 |
+
$('negative-output-note').hidden=!rows.some(row=>[row.left,row.right,row.raw,row.calibrated].some(value=>value!==undefined&&value<0));
|
| 66 |
+
const source=result.provenance?.calibration_source,revision=result.provenance?.revision||result.provenance?.model_revision,repo=result.provenance?.repo_id||result.provenance?.repository||result.provenance?.model_repository;
|
| 67 |
+
setSourceLink($('calibration-source'),source?.path&&revision&&repo?`https://huggingface.co/${repo}/blob/${revision}/${source.path}`:undefined);
|
| 68 |
+
}
|
| 69 |
+
function renderResult(){
|
| 70 |
+
const result=resultByStudy.get(selectedStudyId),rows=resultRows(result),calibrated=result?finite(result.calibrated,result.calibrated_score,result.total?.calibrated):undefined,raw=result?finite(result.raw,result.raw_score,result.total?.raw):undefined,complete=!!result&&result.complete!==false&&calibrated!==undefined;
|
| 71 |
+
$('result-card').classList.toggle('is-partial',!!result&&!complete);
|
| 72 |
+
$('result-details').hidden=!result;$('result-origin').hidden=result?.source?.type!=='precomputed_example';$('result-origin').textContent=t('precomputedLabel');
|
| 73 |
+
$('result-state').textContent=result?t(complete?'complete':'partial'):t('notCalculated');$('result-state').className='neutral-badge'+(result?' complete':'');
|
| 74 |
+
$('score-number').className='score-number'+(!result?' empty':'');$('score-number').textContent=complete?number(calibrated):'—';$('raw-total-number').textContent=result&&result.complete!==false?number(raw):'—';
|
| 75 |
+
$('score-caption').textContent=t(!result?'resultEmpty':complete?'calibratedCaption':'partialCaption');
|
| 76 |
+
renderExperts();renderCalculation(result,rows);
|
| 77 |
+
const revision=result?.provenance?.revision||result?.provenance?.model_revision;if(revision){$('model-revision').textContent=revision.slice(0,8);$('model-revision').href=`https://huggingface.co/${result.provenance.repo_id||result.provenance.repository||result.provenance.model_repository||'MesserMMP/coronary-syntax-prediction'}/tree/${revision}`;}
|
| 78 |
+
}
|
| 79 |
function resultMatchesStudy(result,study){if(!result||!study)return false;const assignments=result.input_assignments;if(!Array.isArray(assignments))return result.source?.type!=='precomputed_example';return assignments.length===study.projections.length&&assignments.every((a,i)=>a.id===study.projections[i].id&&a.artery===study.projections[i].artery);}
|
| 80 |
function adoptCachedJob(job){if(!job||job.status!=='completed'||job.kind!=='inference')return;const study=studies.find(s=>s.id===job.study_id);if(!resultMatchesStudy(job.result,study))return;resultByStudy.set(study.id,job.result);resultJobByStudy.set(study.id,job.id);}
|
| 81 |
function acceptStudies(data){const incoming=data.studies||(data.study?[data.study]:[]);for(const s of incoming){const old=studies.findIndex(x=>x.id===s.id);if(old>=0)studies[old]=s;else studies.push(s);}adoptCachedJob(data.cached_job);if(incoming.length)selectStudy(incoming[0].id);const messages=[];const errors=(data.rejected||[]).map(x=>`${x.name}: ${localizeError(x.reason)}`);if(errors.length)messages.push(t('excludedFiles')+'\n'+errors.join('\n'));else if(!incoming.length)messages.push(t('noStudies'));const warnings=data.warnings||[];if(warnings.length)messages.push(warnings.map(x=>typeof x==='string'?x:JSON.stringify(x)).join('\n'));if(messages.length)showError(messages.join('\n\n'));render();if(data.cached_job&&resultByStudy.get(selectedStudyId)?.source?.type==='precomputed_example'&&!window.matchMedia('(prefers-reduced-motion: reduce)').matches)$('viewer-image').play().catch(()=>{});}
|
|
|
|
| 88 |
async function pollJob(){if(!activeJob)return;try{const job=await request(`/api/jobs/${activeJob.id}`);activeJob.message=job.message;hideError();refreshStatus();const progress=Math.min(1,Math.max(0,Number(job.progress)||0));$('job-progress').value=progress;$('job-percentage').textContent=progress?`${Math.round(progress*100)}%`:'';$('job-message').textContent=localizeStage(job.message)||t(job.status==='queued'?'queued':activeJob.kind==='classify'?'jobClassify':activeJob.kind==='example'?'jobExample':'jobInference');if(activeJob.kind==='example'){$('upload-title').textContent=t('loadingExample');$('upload-hint').textContent=$('job-message').textContent;$('overlay-progress').hidden=false;$('overlay-progress').value=progress;}if(job.status==='completed'){if(activeJob.kind==='example')acceptStudies(job.result||{});else if(activeJob.kind==='classify'){const updated=job.result?.study;if(updated){const index=studies.findIndex(s=>s.id===updated.id);if(index>=0){const order=studies[index].projections.map(p=>p.id);updated.projections.sort((a,b)=>order.indexOf(a.id)-order.indexOf(b.id));studies[index]=updated;if(selectedStudyId===updated.id){const unresolved=updated.projections.find(p=>p.artery==='unassigned');if(unresolved)selectedProjectionId=unresolved.id;}}resultByStudy.delete(updated.id);resultJobByStudy.delete(updated.id);}}else {resultByStudy.set(activeJob.study_id,job.result);resultJobByStudy.set(activeJob.study_id,job.id);}finishJob();return;}if(job.status==='failed'){const message=errorText(job.error);finishJob();showError(message);return;}pollTimer=setTimeout(pollJob,1200);}catch(e){if(e.status===404){finishJob();showError(t('expired'));}else{showError(e.message);pollTimer=setTimeout(pollJob,5000);}}}
|
| 89 |
let examples=[];
|
| 90 |
function referenceNumber(value){return value.toFixed(2);}
|
| 91 |
+
function renderExamples(){let box=$('examples-box');if(!box){box=el('section','examples-box');box.id='examples-box';document.querySelector('.welcome-aside').append(box);}box.replaceChildren();if(!examples.length)return;box.append(el('span','eyebrow',t('exampleTitle')));for(const example of examples){const b=el('button','example-button');b.disabled=busy;const reference=finite(example.reference_score),prediction=example.cached_result_available?finite(example.prediction?.calibrated):undefined;const vendor=example.vendor||example.title?.split(' · ')[0]||example.id;const header=el('span','example-card-header');const detail=el('span','example-detail');detail.append(el('strong','',vendor));if(Number.isFinite(example.files))detail.append(el('span','',`${example.files} ${t('projections')}`));header.append(detail,icon('arrow'));b.append(header);if(reference!==undefined||prediction!==undefined){b.classList.add('example-with-scores');const scores=el('span','example-scores');if(reference!==undefined){const cell=el('span','example-score');cell.append(el('small','',t('expertMeanSix')),el('strong','',referenceNumber(reference)));scores.append(cell);}if(prediction!==undefined){const cell=el('span','example-score');cell.append(el('small','',t('modelLabel')),el('strong','',prediction.toFixed(2)));scores.append(cell);}b.append(scores);if(prediction!==undefined)b.append(el('span','example-cache-label',t('precomputedLabel')));}b.setAttribute('aria-label',`${vendor}${reference!==undefined?` · ${t('referenceLabel')} SYNTAX ${referenceNumber(reference)}`:''}${prediction!==undefined?` · ${t('modelLabel')} ${prediction.toFixed(2)} · ${t('precomputedLabel')}`:''}`);b.addEventListener('click',()=>loadExample(example.id));box.append(b);}box.append(el('p','',t('exampleHint')));}
|
| 92 |
async function loadExamples(){if(previewMode)return;try{const d=await request('/api/examples');examples=d.examples||[];renderExamples();}catch{}}
|
| 93 |
async function loadExample(id){if(busy)return;busy=true;hideError();render();renderExamples();$('upload-overlay').hidden=false;$('upload-title').textContent=t('loadingExample');$('upload-hint').textContent=t('queued');$('overlay-progress').hidden=false;$('overlay-progress').value=0;try{const job=await request(`/api/examples/${encodeURIComponent(id)}/load`,{method:'POST'});activeJob={...job,kind:'example'};persistWorkspace();pollJob();}catch(e){finishJob();showError(e.message);}}
|
| 94 |
let expandedPlayback=null;
|
|
|
|
| 96 |
function closeExpandedPreview(){const video=$('dialog-image'),main=$('viewer-image');const paused=video.paused;video.pause();if(expandedPlayback&¤tProjection()?.id===expandedPlayback.projectionId){if(Number.isFinite(main.duration))main.currentTime=Math.min(video.currentTime,Math.max(0,main.duration-.001));if(!paused)main.play().catch(()=>{});}expandedPlayback=null;}
|
| 97 |
const cinePlayers=[];let cinePlaybackRate=1;
|
| 98 |
function setCineSpeed(rate){if(![.5,1].includes(rate))return;cinePlaybackRate=rate;for(const player of cinePlayers){player.video.defaultPlaybackRate=rate;player.video.playbackRate=rate;updateCine(player);}}
|
| 99 |
+
function buildCine(video){const controls=el('div','cine-controls');const play=el('button','cine-button cine-play');play.type='button';const previous=el('button','cine-button');previous.type='button';previous.append(icon('frame-back'));const next=el('button','cine-button');next.type='button';next.append(icon('frame-forward'));const range=el('input','cine-range');range.type='range';range.min='0';range.step='1';range.value='0';range.max='0';const counter=el('span','cine-counter','— / —');const speed=el('span','cine-speed');speed.setAttribute('role','group');const speedButtons=[.5,1].map(rate=>{const button=el('button','',`${rate}×`);button.type='button';button.dataset.rate=String(rate);button.addEventListener('click',()=>setCineSpeed(rate));speed.append(button);return button;});controls.append(play,previous,next,range,counter,speed);if(video.id==='viewer-image')$('viewer-canvas').after(controls);else video.after(controls);const player={video,play,previous,next,range,counter,speed,speedButtons};cinePlayers.push(player);video.defaultPlaybackRate=cinePlaybackRate;video.playbackRate=cinePlaybackRate;video.tabIndex=0;play.addEventListener('click',()=>toggleCine(player));previous.addEventListener('click',()=>stepCine(player,-1));next.addEventListener('click',()=>stepCine(player,1));range.addEventListener('input',()=>seekCine(player,Number(range.value)));for(const event of ['loadedmetadata','loadeddata','durationchange','timeupdate','play','pause','seeking','seeked','emptied','error','ratechange'])video.addEventListener(event,()=>updateCine(player));if(video.id==='viewer-image')video.addEventListener('loadedmetadata',()=>{const frames=Number(video.dataset.frames);if(frames>0&&Number.isFinite(video.duration)&&video.duration>0&&video.currentTime===0&&!video.seeking)video.currentTime=Math.min(.001,video.duration/frames/2);});video.addEventListener('keydown',event=>{if(event.key===' '){event.preventDefault();toggleCine(player);}else if(event.key==='ArrowLeft'||event.key==='ArrowRight'){event.preventDefault();stepCine(player,event.key==='ArrowLeft'?-1:1);}});updateCine(player);}
|
| 100 |
function cineFrame(player){const {video}=player,frames=Number(video.dataset.frames)||0;return frames&&Number.isFinite(video.duration)&&video.duration>0?Math.min(frames-1,Math.floor(video.currentTime/video.duration*frames)):0;}
|
| 101 |
function seekCine(player,index){const {video}=player,frames=Number(video.dataset.frames)||0;if(!frames||!Number.isFinite(video.duration)||video.duration<=0)return;video.currentTime=Math.min(video.duration-.001,(Math.max(0,Math.min(frames-1,index))+.001)*video.duration/frames);updateCine(player);}
|
| 102 |
function stepCine(player,delta){player.video.pause();seekCine(player,cineFrame(player)+delta);}
|
| 103 |
function toggleCine(player){if(player.video.paused)player.video.play().catch(()=>{});else player.video.pause();}
|
| 104 |
+
function updateCine(player){const {video,play,previous,next,range,counter,speed,speedButtons}=player;speed.setAttribute('aria-label',t('playbackSpeed'));speed.title=t('playbackSpeed');for(const button of speedButtons){const selected=Number(button.dataset.rate)===video.playbackRate;button.classList.toggle('selected',selected);button.setAttribute('aria-pressed',String(selected));button.setAttribute('aria-label',t('playbackSpeedValue').replace('{rate}',button.dataset.rate));}const frames=Number(video.dataset.frames)||0;const ready=frames>0&&Number.isFinite(video.duration)&&video.duration>0&&!video.error;const frame=cineFrame(player);play.replaceChildren(icon(video.paused?'play':'pause'));play.setAttribute('aria-label',t(video.paused?'play':'pause'));play.title=t(video.paused?'play':'pause');previous.setAttribute('aria-label',t('previousFrame'));previous.title=t('previousFrame');next.setAttribute('aria-label',t('nextFrame'));next.title=t('nextFrame');range.setAttribute('aria-label',t('seekFrame'));range.max=String(Math.max(0,frames-1));range.value=String(frame);range.style.setProperty('--position',frames>1?`${frame/(frames-1)*100}%`:'0%');if(video.readyState>=2&&!video.seeking)range.setAttribute('aria-valuetext',t('framePosition').replace('{frame}',String(frame+1)).replace('{total}',String(frames)));else range.removeAttribute('aria-valuetext');const visibleFrame=video.readyState>=2&&!video.seeking;counter.textContent=frames?`${visibleFrame?String(frame+1).padStart(2,'0'):'—'} / ${frames}`:'— / —';play.disabled=!ready;previous.disabled=!ready||frame===0;next.disabled=!ready||frame>=frames-1;range.disabled=!ready;}
|
| 105 |
$('language-button').addEventListener('click',()=>{lang=lang==='en'?'ru':'en';setStored('cardiosyntax-language',lang);applyLanguage();});document.querySelectorAll('[data-theme-button]').forEach(b=>b.addEventListener('click',()=>setTheme(b.dataset.themeButton)));
|
| 106 |
$('sidebar-upload').addEventListener('click',()=>{if(busy)return;$('viewer-image').pause();selectedStudyId=null;selectedProjectionId=null;hideError();render();});$('dropzone').addEventListener('click',()=>{if(!busy)$('file-input').click();});$('dropzone').addEventListener('keydown',e=>{if(e.key==='Enter'||e.key===' '){e.preventDefault();if(!busy)$('file-input').click();}});$('file-input').addEventListener('change',()=>uploadFiles([...$('file-input').files]));for(const evt of ['dragenter','dragover'])$('dropzone').addEventListener(evt,e=>{e.preventDefault();$('dropzone').classList.add('dragging');});for(const evt of ['dragleave','drop'])$('dropzone').addEventListener(evt,e=>{e.preventDefault();$('dropzone').classList.remove('dragging');});$('dropzone').addEventListener('drop',e=>uploadFiles([...e.dataTransfer.files]));$('close-notice').addEventListener('click',hideError);
|
| 107 |
document.querySelectorAll('[data-artery]').forEach(b=>b.addEventListener('click',()=>{const p=currentProjection();if(!p||busy)return;p.artery=b.dataset.artery;invalidateResult();render();}));$('classify-button').addEventListener('click',()=>startJob('classify'));$('run-button').addEventListener('click',()=>startJob('inference'));$('expand-preview').addEventListener('click',openPreview);$('close-preview').addEventListener('click',()=>$('preview-dialog').close());$('preview-dialog').addEventListener('close',closeExpandedPreview);$('preview-dialog').addEventListener('click',e=>{if(e.target===$('preview-dialog'))$('preview-dialog').close();});$('viewer-image').addEventListener('error',()=>{$('viewer-image').hidden=true;$('viewer-empty').hidden=false;});
|
|
|
|
| 116 |
|
| 117 |
window.addEventListener('beforeunload',()=>clearTimeout(pollTimer));
|
| 118 |
const mobileLayout=window.matchMedia('(max-width: 760px)');
|
| 119 |
+
function placeFoldResults(){const fold=$('fold-results');const destination=$('workspace-grid');if(fold.parentElement!==destination)destination.append(fold);}
|
| 120 |
mobileLayout.addEventListener('change',placeFoldResults);
|
| 121 |
|
| 122 |
async function init(){placeFoldResults();buildCine($('viewer-image'));buildCine($('dialog-image'));busy=!previewMode;const queryTheme=new URLSearchParams(location.search).get('theme');setTheme(queryTheme||safeStored('cardiosyntax-theme','studio'));applyLanguage();if(previewMode){$('preview-banner').hidden=false;try{const r=await fetch('/static/design-fixture.json');const fixture=await r.json();studies=fixture.studies;selectStudy(studies[0]?.id);}catch(e){showError(e.message);}return;}await refreshStatus();await restoreWorkspace();busy=!!activeJob;render();loadExamples();}
|
static/brand-mark.svg
ADDED
|
|
static/favicon.svg
ADDED
|
|
static/index.html
CHANGED
|
@@ -1,13 +1,19 @@
|
|
| 1 |
<!doctype html>
|
| 2 |
<html lang="en" data-theme="studio">
|
| 3 |
-
<head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"><meta name="theme-color" content="#f3f5f3"><title>CardioSyntax — Research Workspace</title><link rel="stylesheet" href="/static/styles.css"><link rel="stylesheet" href="/static/workspace.css"></head>
|
| 4 |
<body>
|
| 5 |
<svg class="icon-library" aria-hidden="true" xmlns="http://www.w3.org/2000/svg"><defs>
|
| 6 |
<symbol id="i-plus" viewBox="0 0 24 24"><path d="M12 5v14M5 12h14"/></symbol><symbol id="i-upload" viewBox="0 0 24 24"><path d="M12 16V3m-5 5 5-5 5 5M4 15v5h16v-5"/></symbol><symbol id="i-arrow" viewBox="0 0 24 24"><path d="m13 5 7 7-7 7M20 12H4"/></symbol><symbol id="i-expand" viewBox="0 0 24 24"><path d="M8 3H3v5m13-5h5v5M3 16v5h5m13-5v5h-5"/></symbol><symbol id="i-close" viewBox="0 0 24 24"><path d="m6 6 12 12M6 18 18 6"/></symbol><symbol id="i-file" viewBox="0 0 24 24"><path d="M14 3H5v18h14V8l-5-5Zm0 0v5h5M8 13h8m-8 4h6"/></symbol><symbol id="i-trash" viewBox="0 0 24 24"><path d="M3 6h18M9 6V3h6v3M5 6l1 15h12l1-15M10 10v7m4-7v7"/></symbol><symbol id="i-check" viewBox="0 0 24 24"><path d="m5 12 4 4L19 6"/></symbol><symbol id="i-download" viewBox="0 0 24 24"><path d="M12 3v13m-5-5 5 5 5-5M4 17v4h16v-4"/></symbol><symbol id="i-spark" viewBox="0 0 24 24"><path d="m12 3 2.6 6.4L21 12l-6.4 2.6L12 21l-2.6-6.4L3 12l6.4-2.6L12 3Z"/></symbol><symbol id="i-chevron" viewBox="0 0 24 24"><path d="m9 5 7 7-7 7"/></symbol><symbol id="i-info" viewBox="0 0 24 24"><circle cx="12" cy="12" r="9"/><path d="M12 11v6m0-10v1"/></symbol><symbol id="i-copy" viewBox="0 0 24 24"><path d="M8 8h12v13H8zM16 8V3H3v13h5"/></symbol>
|
| 7 |
<symbol id="i-sun" viewBox="0 0 24 24"><circle cx="12" cy="12" r="3.8"/><path d="M12 2v2m0 16v2M2 12h2m16 0h2M4.93 4.93l1.42 1.42m11.3 11.3 1.42 1.42m0-14.14-1.42 1.42m-11.3 11.3-1.42 1.42"/></symbol><symbol id="i-moon" viewBox="0 0 24 24"><path d="M20.6 14.3A8.8 8.8 0 0 1 9.7 3.4a8.8 8.8 0 1 0 10.9 10.9Z"/></symbol><symbol id="i-play" viewBox="0 0 24 24"><path d="m9 5 10 7-10 7V5Z"/></symbol><symbol id="i-pause" viewBox="0 0 24 24"><path d="M8 5v14m8-14v14"/></symbol><symbol id="i-frame-back" viewBox="0 0 24 24"><path d="M5 5v14m13-14-9 7 9 7V5Z"/></symbol><symbol id="i-frame-forward" viewBox="0 0 24 24"><path d="M19 5v14M6 5l9 7-9 7V5Z"/></symbol></defs></svg>
|
| 8 |
<div class="preview-banner" id="preview-banner" hidden></div>
|
| 9 |
<header class="topbar">
|
| 10 |
-
<a class="brand" href="/" aria-label="CardioSyntax home"><span class="brand-mark"><svg
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 11 |
<div class="topbar-right"><div class="server-indicator" id="server-indicator"><span class="status-dot"></span><span id="server-label">Connecting…</span></div><div class="theme-switch" role="group" aria-label="Color theme"><button class="selected" data-theme-button="studio" aria-pressed="true"><svg aria-hidden="true"><use href="#i-sun"/></svg><span data-t="lightTheme">Light</span></button><button data-theme-button="lab" aria-pressed="false"><svg aria-hidden="true"><use href="#i-moon"/></svg><span data-t="darkTheme">Dark</span></button></div><button class="language-button" id="language-button" aria-label="Switch language">RU</button></div>
|
| 12 |
</header>
|
| 13 |
<div class="app-layout">
|
|
@@ -31,13 +37,26 @@
|
|
| 31 |
<div class="assignment-row"><div><span class="eyebrow" data-t="projectionAssignment">Artery</span><span class="assignment-help" id="assignment-help"></span></div><div class="segmented" id="artery-controls" role="group" aria-label="Artery assignment"><button data-artery="left">LCA<span data-t="leftArtery">Left</span></button><button data-artery="right">RCA<span data-t="rightArtery">Right</span></button><button data-artery="exclude"><svg><use href="#i-close"/></svg><span data-t="exclude">Exclude</span></button></div></div>
|
| 32 |
<div class="projections-heading"><h2><span data-t="allProjections">Projections</span> <span class="count-badge" id="projection-count">0</span></h2><button class="button quiet small" id="classify-button"><svg><use href="#i-spark"/></svg><span data-t="autoClassify">Identify arteries</span></button></div><div class="filmstrip" id="filmstrip"></div>
|
| 33 |
<div class="study-footnote"><span>StudyUID</span><code id="study-uid"></code><button class="icon-button small" id="copy-uid" aria-label="Copy StudyUID"><svg><use href="#i-copy"/></svg></button></div>
|
| 34 |
-
<
|
| 35 |
<aside class="analysis-panel">
|
| 36 |
-
<section class="result-card" id="result-card">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 37 |
<section class="run-card"><div class="card-title"><span class="eyebrow" data-t="readyToRun">Projection summary</span></div><div class="selection-counts"><div><span class="artery-dot left"></span><span>LCA</span><strong id="left-count">0</strong></div><div><span class="artery-dot right"></span><span>RCA</span><strong id="right-count">0</strong></div><div><span class="artery-dot excluded"></span><span data-t="excluded">Excluded</span><strong id="excluded-count">0</strong></div></div><p class="run-hint" id="run-hint"></p><button class="button primary full" id="run-button" disabled><span data-t="calculate">Calculate SYNTAX</span><svg><use href="#i-arrow"/></svg></button><div class="job-status" id="job-status" role="status" aria-live="polite" hidden><div class="job-status-heading"><span class="spinner"></span><strong id="job-message"></strong><span id="job-percentage"></span></div><progress id="job-progress" max="1" value="0"></progress><p id="job-hint" hidden></p></div></section>
|
| 38 |
-
<section class="method-card"><span class="eyebrow" data-t="methodTitle">Model</span><dl><div><dt data-t="ensemble">Ensemble</dt><dd data-t="ensembleValue">5 folds · 10 models</dd></div><div><dt data-t="calibration">Calibration</dt><dd data-t="calibrationValue">
|
| 39 |
</aside>
|
| 40 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 41 |
</div>
|
| 42 |
<footer class="page-footer"><div><a href="https://huggingface.co/MesserMMP/coronary-syntax-prediction" target="_blank" rel="noopener" data-t="modelLink">Model & methodology ↗</a><a href="https://huggingface.co/datasets/MesserMMP/coronary-angiography-syntax" target="_blank" rel="noopener" data-t="datasetLink">Open dataset ↗</a></div><a href="https://huggingface.co/datasets/MesserMMP/coronary-angiography-syntax" target="_blank" rel="noopener" data-t="modelsLicense">Models & data · CC BY 4.0</a></footer>
|
| 43 |
</main>
|
|
|
|
| 1 |
<!doctype html>
|
| 2 |
<html lang="en" data-theme="studio">
|
| 3 |
+
<head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"><meta name="theme-color" content="#f3f5f3"><title>CardioSyntax — Research Workspace</title><link rel="stylesheet" href="/static/styles.css"><link rel="stylesheet" href="/static/workspace.css"><link rel="stylesheet" href="/static/result-design.css"><link rel="icon" href="/static/favicon.svg" type="image/svg+xml"></head>
|
| 4 |
<body>
|
| 5 |
<svg class="icon-library" aria-hidden="true" xmlns="http://www.w3.org/2000/svg"><defs>
|
| 6 |
<symbol id="i-plus" viewBox="0 0 24 24"><path d="M12 5v14M5 12h14"/></symbol><symbol id="i-upload" viewBox="0 0 24 24"><path d="M12 16V3m-5 5 5-5 5 5M4 15v5h16v-5"/></symbol><symbol id="i-arrow" viewBox="0 0 24 24"><path d="m13 5 7 7-7 7M20 12H4"/></symbol><symbol id="i-expand" viewBox="0 0 24 24"><path d="M8 3H3v5m13-5h5v5M3 16v5h5m13-5v5h-5"/></symbol><symbol id="i-close" viewBox="0 0 24 24"><path d="m6 6 12 12M6 18 18 6"/></symbol><symbol id="i-file" viewBox="0 0 24 24"><path d="M14 3H5v18h14V8l-5-5Zm0 0v5h5M8 13h8m-8 4h6"/></symbol><symbol id="i-trash" viewBox="0 0 24 24"><path d="M3 6h18M9 6V3h6v3M5 6l1 15h12l1-15M10 10v7m4-7v7"/></symbol><symbol id="i-check" viewBox="0 0 24 24"><path d="m5 12 4 4L19 6"/></symbol><symbol id="i-download" viewBox="0 0 24 24"><path d="M12 3v13m-5-5 5 5 5-5M4 17v4h16v-4"/></symbol><symbol id="i-spark" viewBox="0 0 24 24"><path d="m12 3 2.6 6.4L21 12l-6.4 2.6L12 21l-2.6-6.4L3 12l6.4-2.6L12 3Z"/></symbol><symbol id="i-chevron" viewBox="0 0 24 24"><path d="m9 5 7 7-7 7"/></symbol><symbol id="i-info" viewBox="0 0 24 24"><circle cx="12" cy="12" r="9"/><path d="M12 11v6m0-10v1"/></symbol><symbol id="i-copy" viewBox="0 0 24 24"><path d="M8 8h12v13H8zM16 8V3H3v13h5"/></symbol>
|
| 7 |
<symbol id="i-sun" viewBox="0 0 24 24"><circle cx="12" cy="12" r="3.8"/><path d="M12 2v2m0 16v2M2 12h2m16 0h2M4.93 4.93l1.42 1.42m11.3 11.3 1.42 1.42m0-14.14-1.42 1.42m-11.3 11.3-1.42 1.42"/></symbol><symbol id="i-moon" viewBox="0 0 24 24"><path d="M20.6 14.3A8.8 8.8 0 0 1 9.7 3.4a8.8 8.8 0 1 0 10.9 10.9Z"/></symbol><symbol id="i-play" viewBox="0 0 24 24"><path d="m9 5 10 7-10 7V5Z"/></symbol><symbol id="i-pause" viewBox="0 0 24 24"><path d="M8 5v14m8-14v14"/></symbol><symbol id="i-frame-back" viewBox="0 0 24 24"><path d="M5 5v14m13-14-9 7 9 7V5Z"/></symbol><symbol id="i-frame-forward" viewBox="0 0 24 24"><path d="M19 5v14M6 5l9 7-9 7V5Z"/></symbol></defs></svg>
|
| 8 |
<div class="preview-banner" id="preview-banner" hidden></div>
|
| 9 |
<header class="topbar">
|
| 10 |
+
<a class="brand" href="/" aria-label="CardioSyntax home"><span class="brand-mark"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 40 40" fill="none" aria-hidden="true">
|
| 11 |
+
<g stroke="currentColor" stroke-width="2.25" stroke-linecap="round" stroke-linejoin="round">
|
| 12 |
+
<path d="M30 9.3a14.5 14.5 0 1 0 0 21.4"/>
|
| 13 |
+
<path d="M23 9.5c-4.3 1-6.5 3.2-6.5 6.1 0 4.8 7.3 4.5 7.3 9.2 0 3.1-2.5 5.2-6.1 6.2"/>
|
| 14 |
+
<path d="M17.1 17.7c-3.8 1.2-5.3 4.4-5.3 7.8M23.3 22.8c2.5-1.3 5.6-1.1 7.6.7"/>
|
| 15 |
+
</g>
|
| 16 |
+
</svg></span><span>Cardio<span class="brand-light">Syntax</span></span></a>
|
| 17 |
<div class="topbar-right"><div class="server-indicator" id="server-indicator"><span class="status-dot"></span><span id="server-label">Connecting…</span></div><div class="theme-switch" role="group" aria-label="Color theme"><button class="selected" data-theme-button="studio" aria-pressed="true"><svg aria-hidden="true"><use href="#i-sun"/></svg><span data-t="lightTheme">Light</span></button><button data-theme-button="lab" aria-pressed="false"><svg aria-hidden="true"><use href="#i-moon"/></svg><span data-t="darkTheme">Dark</span></button></div><button class="language-button" id="language-button" aria-label="Switch language">RU</button></div>
|
| 18 |
</header>
|
| 19 |
<div class="app-layout">
|
|
|
|
| 37 |
<div class="assignment-row"><div><span class="eyebrow" data-t="projectionAssignment">Artery</span><span class="assignment-help" id="assignment-help"></span></div><div class="segmented" id="artery-controls" role="group" aria-label="Artery assignment"><button data-artery="left">LCA<span data-t="leftArtery">Left</span></button><button data-artery="right">RCA<span data-t="rightArtery">Right</span></button><button data-artery="exclude"><svg><use href="#i-close"/></svg><span data-t="exclude">Exclude</span></button></div></div>
|
| 38 |
<div class="projections-heading"><h2><span data-t="allProjections">Projections</span> <span class="count-badge" id="projection-count">0</span></h2><button class="button quiet small" id="classify-button"><svg><use href="#i-spark"/></svg><span data-t="autoClassify">Identify arteries</span></button></div><div class="filmstrip" id="filmstrip"></div>
|
| 39 |
<div class="study-footnote"><span>StudyUID</span><code id="study-uid"></code><button class="icon-button small" id="copy-uid" aria-label="Copy StudyUID"><svg><use href="#i-copy"/></svg></button></div>
|
| 40 |
+
</section>
|
| 41 |
<aside class="analysis-panel">
|
| 42 |
+
<section class="result-card" id="result-card">
|
| 43 |
+
<div class="card-title"><span class="eyebrow" data-t="resultTitle">Model estimate</span><span class="neutral-badge" id="result-state" data-t="notCalculated">Not calculated</span></div>
|
| 44 |
+
<div class="score-comparison"><div class="score-comparison-cell calibrated-score"><span class="score-label" data-t="calibratedSyntax">Calibrated SYNTAX</span><div class="score-number" id="score-number">—</div></div><div class="score-comparison-cell raw-score"><span class="score-label" data-t="rawStudyTotal">Before calibration</span><div class="raw-total-number" id="raw-total-number">—</div></div></div>
|
| 45 |
+
<p class="score-caption" id="score-caption" data-t="resultEmpty">Run analysis to calculate the score.</p><span class="result-origin" id="result-origin" hidden></span>
|
| 46 |
+
<div class="result-actions" id="result-details" hidden><a class="button outline full calculation-link" id="calculation-link" href="#fold-results"><span data-t="howCalculated">How calculated</span><svg aria-hidden="true"><use href="#i-arrow"/></svg></a><button class="button outline full" id="download-result"><svg aria-hidden="true"><use href="#i-download"/></svg><span data-t="downloadResult">Export JSON</span></button></div>
|
| 47 |
+
<section class="expert-assessment" id="reference-score" hidden><div class="expert-assessment-summary"><div><span data-t="referenceSyntaxLabel">Expert assessment</span><p id="expert-mean-caption" class="expert-mean-caption"></p></div><strong id="reference-score-value">—</strong></div><div class="expert-scores" id="expert-scores" hidden></div><p class="expert-context" data-t="expertContext">For comparison only. Expert scores are not supplied to the model.</p><a id="reference-source" class="reference-source" target="_blank" rel="noopener" data-t="datasetAnnotation" hidden>Dataset annotation ↗</a></section>
|
| 48 |
+
</section>
|
| 49 |
<section class="run-card"><div class="card-title"><span class="eyebrow" data-t="readyToRun">Projection summary</span></div><div class="selection-counts"><div><span class="artery-dot left"></span><span>LCA</span><strong id="left-count">0</strong></div><div><span class="artery-dot right"></span><span>RCA</span><strong id="right-count">0</strong></div><div><span class="artery-dot excluded"></span><span data-t="excluded">Excluded</span><strong id="excluded-count">0</strong></div></div><p class="run-hint" id="run-hint"></p><button class="button primary full" id="run-button" disabled><span data-t="calculate">Calculate SYNTAX</span><svg><use href="#i-arrow"/></svg></button><div class="job-status" id="job-status" role="status" aria-live="polite" hidden><div class="job-status-heading"><span class="spinner"></span><strong id="job-message"></strong><span id="job-percentage"></span></div><progress id="job-progress" max="1" value="0"></progress><p id="job-hint" hidden></p></div></section>
|
| 50 |
+
<section class="method-card"><span class="eyebrow" data-t="methodTitle">Model</span><dl><div><dt data-t="ensemble">Ensemble</dt><dd data-t="ensembleValue">5 folds · 10 models</dd></div><div><dt data-t="calibration">Calibration</dt><dd data-t="calibrationValue">Per fold, before averaging</dd></div><div><dt data-t="device">Compute</dt><dd id="method-device">—</dd></div><div><dt data-t="modelVersion">Model revision</dt><dd><a id="model-revision" target="_blank" rel="noopener">—</a></dd></div></dl><p data-t="modelScope">Research use only.</p></section>
|
| 51 |
</aside>
|
| 52 |
+
<section class="fold-results calculation-details" id="fold-results" tabindex="-1" aria-labelledby="calculation-title" hidden>
|
| 53 |
+
<div class="calculation-heading"><h2 id="calculation-title" data-t="foldResults">How the estimate is calculated</h2><p data-t="foldDefinition">A fold pairs LCA and RCA models trained on the same data split.</p></div>
|
| 54 |
+
<div class="calculation-rule" id="calculation-flow"><div class="calculation-step"><span class="calculation-step-index">01</span><div><strong data-t="stepModelsTitle">10 model outputs</strong><p data-t="stepModelsText">Five LCA models and five RCA models.</p></div></div><div class="calculation-step"><span class="calculation-step-index">02</span><div><strong data-t="stepSumsTitle">5 study sums</strong><p data-t="stepSumsText">Add the LCA and RCA output within each fold.</p></div></div><div class="calculation-step"><span class="calculation-step-index">03</span><div><strong data-t="stepCalibrationTitle">5 calibrated values</strong><p data-t="stepCalibrationText">Apply each fold’s published a × sum + b.</p></div></div><div class="calculation-step"><span class="calculation-step-index">04</span><div><strong data-t="stepAverageTitle">Final estimate</strong><p data-t="stepAverageText">Average the five calibrated values, then apply a minimum of zero.</p></div></div></div>
|
| 55 |
+
<p class="calculation-partial" id="calculation-partial" data-t="partialCalculation" hidden>Only the available artery outputs are shown. A study total and its calibration require both arteries.</p>
|
| 56 |
+
<div class="fold-table-wrap"><table class="model-breakdown-table"><thead><tr><th scope="col" data-t="foldLabel">Fold</th><th scope="col" data-t="leftModel">LCA model</th><th scope="col" data-t="rightModel">RCA model</th><th scope="col" data-t="pairedSum">LCA + RCA</th><th scope="col" data-t="foldFormula">a × sum + b</th><th scope="col" data-t="foldCalibrated">Calibrated</th></tr></thead><tbody id="fold-table-body"></tbody></table></div>
|
| 57 |
+
<div class="calculation-summary" id="calculation-summary"><div class="calculation-summary-item"><span data-t="meanSums">Mean LCA + RCA</span><strong id="mean-raw-number">—</strong><small id="raw-total-caption"></small></div><div class="calculation-summary-item"><span data-t="meanCalibrated">Mean after calibration</span><strong id="mean-calibrated-number">—</strong><small data-t="beforeZeroLimit">Before the final zero limit</small></div><div class="calculation-summary-item final-summary"><span data-t="finalScore">Final SYNTAX</span><strong id="final-total-number">—</strong><small data-t="finalFormula">max(0, mean calibrated)</small></div></div>
|
| 58 |
+
<div class="calculation-notes"><p id="negative-output-note" data-t="negativeOutputs" hidden>Models can return negative intermediate estimates. These are not negative clinical scores: the values are retained through calibration and averaging; only final study scores have a minimum of zero.</p><p data-t="roundingNote">Intermediate values show three decimals; calculations use full precision.</p><p><span data-t="fixedCalibration">The app applies published coefficients and does not adjust them using this study’s expert scores.</span> <a id="calibration-source" target="_blank" rel="noopener" data-t="calibrationSource" hidden>Published coefficients ↗</a></p></div>
|
| 59 |
+
</section>
|
| 60 |
</div>
|
| 61 |
<footer class="page-footer"><div><a href="https://huggingface.co/MesserMMP/coronary-syntax-prediction" target="_blank" rel="noopener" data-t="modelLink">Model & methodology ↗</a><a href="https://huggingface.co/datasets/MesserMMP/coronary-angiography-syntax" target="_blank" rel="noopener" data-t="datasetLink">Open dataset ↗</a></div><a href="https://huggingface.co/datasets/MesserMMP/coronary-angiography-syntax" target="_blank" rel="noopener" data-t="modelsLicense">Models & data · CC BY 4.0</a></footer>
|
| 62 |
</main>
|
static/result-design.css
ADDED
|
@@ -0,0 +1,666 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
:root {
|
| 2 |
+
--detail-surface: #f7f9f6;
|
| 3 |
+
--detail-accent-surface: #edf4ee;
|
| 4 |
+
--detail-accent-line: #ccdcd0;
|
| 5 |
+
--detail-faint: #edf1eb;
|
| 6 |
+
--motion-fast: 160ms;
|
| 7 |
+
--motion-standard: 220ms;
|
| 8 |
+
--motion-ease: cubic-bezier(.2, .7, .2, 1);
|
| 9 |
+
}
|
| 10 |
+
|
| 11 |
+
html[data-theme="lab"] {
|
| 12 |
+
--detail-surface: #142024;
|
| 13 |
+
--detail-accent-surface: #20332c;
|
| 14 |
+
--detail-accent-line: #3d584b;
|
| 15 |
+
--detail-faint: #223034;
|
| 16 |
+
}
|
| 17 |
+
|
| 18 |
+
.brand-mark {
|
| 19 |
+
width: 37px;
|
| 20 |
+
height: 38px;
|
| 21 |
+
}
|
| 22 |
+
|
| 23 |
+
.brand-mark svg,
|
| 24 |
+
.brand-mark img {
|
| 25 |
+
display: block;
|
| 26 |
+
width: 37px;
|
| 27 |
+
height: 37px;
|
| 28 |
+
fill: none;
|
| 29 |
+
stroke-width: 2.25;
|
| 30 |
+
}
|
| 31 |
+
|
| 32 |
+
.brand-mark svg path {
|
| 33 |
+
vector-effect: none;
|
| 34 |
+
}
|
| 35 |
+
|
| 36 |
+
.brand {
|
| 37 |
+
gap: 10px;
|
| 38 |
+
letter-spacing: -.75px;
|
| 39 |
+
}
|
| 40 |
+
|
| 41 |
+
.theme-switch button,
|
| 42 |
+
.language-button,
|
| 43 |
+
.study-item,
|
| 44 |
+
.projection-card,
|
| 45 |
+
.segmented button,
|
| 46 |
+
.example-button,
|
| 47 |
+
.icon-button,
|
| 48 |
+
.cine-button,
|
| 49 |
+
.cine-speed button,
|
| 50 |
+
.viewer-expand,
|
| 51 |
+
.calculation-link {
|
| 52 |
+
transition: background-color var(--motion-fast) var(--motion-ease),
|
| 53 |
+
border-color var(--motion-fast) var(--motion-ease),
|
| 54 |
+
color var(--motion-fast) var(--motion-ease),
|
| 55 |
+
box-shadow var(--motion-fast) var(--motion-ease);
|
| 56 |
+
}
|
| 57 |
+
|
| 58 |
+
.button {
|
| 59 |
+
transition: background-color var(--motion-fast) var(--motion-ease),
|
| 60 |
+
border-color var(--motion-fast) var(--motion-ease),
|
| 61 |
+
color var(--motion-fast) var(--motion-ease),
|
| 62 |
+
box-shadow var(--motion-fast) var(--motion-ease);
|
| 63 |
+
}
|
| 64 |
+
|
| 65 |
+
.topbar,
|
| 66 |
+
.sidebar,
|
| 67 |
+
.result-card,
|
| 68 |
+
.run-card,
|
| 69 |
+
.calculation-details,
|
| 70 |
+
.expert-assessment,
|
| 71 |
+
.calculation-step,
|
| 72 |
+
.calculation-summary-item {
|
| 73 |
+
transition: background-color var(--motion-standard) var(--motion-ease),
|
| 74 |
+
border-color var(--motion-standard) var(--motion-ease);
|
| 75 |
+
}
|
| 76 |
+
|
| 77 |
+
.projection-card:not(.selected):hover {
|
| 78 |
+
border-color: var(--muted);
|
| 79 |
+
box-shadow: 0 0 0 1px var(--line);
|
| 80 |
+
}
|
| 81 |
+
|
| 82 |
+
.theme-switch button:focus-visible,
|
| 83 |
+
.language-button:focus-visible,
|
| 84 |
+
.calculation-link:focus-visible {
|
| 85 |
+
outline: 2px solid var(--accent);
|
| 86 |
+
outline-offset: 3px;
|
| 87 |
+
}
|
| 88 |
+
|
| 89 |
+
.language-button {
|
| 90 |
+
border-radius: 0 4px 4px 0;
|
| 91 |
+
}
|
| 92 |
+
|
| 93 |
+
.language-button:hover {
|
| 94 |
+
color: var(--accent);
|
| 95 |
+
}
|
| 96 |
+
|
| 97 |
+
#result-card {
|
| 98 |
+
overflow: hidden;
|
| 99 |
+
padding: 22px 20px 20px;
|
| 100 |
+
}
|
| 101 |
+
|
| 102 |
+
#result-card .card-title {
|
| 103 |
+
flex-wrap: wrap;
|
| 104 |
+
row-gap: 8px;
|
| 105 |
+
}
|
| 106 |
+
|
| 107 |
+
.score-comparison {
|
| 108 |
+
display: grid;
|
| 109 |
+
grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr);
|
| 110 |
+
gap: 17px;
|
| 111 |
+
align-items: end;
|
| 112 |
+
margin-top: 28px;
|
| 113 |
+
}
|
| 114 |
+
|
| 115 |
+
.score-comparison-cell {
|
| 116 |
+
min-width: 0;
|
| 117 |
+
}
|
| 118 |
+
|
| 119 |
+
.score-comparison-cell .score-label,
|
| 120 |
+
.score-comparison-cell > span:first-child {
|
| 121 |
+
display: block;
|
| 122 |
+
font-size: 12px;
|
| 123 |
+
font-weight: 500;
|
| 124 |
+
line-height: 1.45;
|
| 125 |
+
color: var(--muted);
|
| 126 |
+
}
|
| 127 |
+
|
| 128 |
+
.score-comparison .score-number {
|
| 129 |
+
margin: 9px 0 0;
|
| 130 |
+
font-size: 50px;
|
| 131 |
+
font-weight: 550;
|
| 132 |
+
line-height: 1.1;
|
| 133 |
+
letter-spacing: -2.5px;
|
| 134 |
+
white-space: nowrap;
|
| 135 |
+
font-variant-numeric: tabular-nums;
|
| 136 |
+
}
|
| 137 |
+
|
| 138 |
+
.score-comparison .score-number.empty {
|
| 139 |
+
color: var(--muted);
|
| 140 |
+
font-size: 50px;
|
| 141 |
+
opacity: .55;
|
| 142 |
+
}
|
| 143 |
+
|
| 144 |
+
.raw-score {
|
| 145 |
+
padding: 1px 0 4px 16px;
|
| 146 |
+
border-left: 1px solid var(--line);
|
| 147 |
+
}
|
| 148 |
+
|
| 149 |
+
.raw-total-number {
|
| 150 |
+
margin-top: 12px;
|
| 151 |
+
font-family: 'Manrope', 'DM Sans', sans-serif;
|
| 152 |
+
font-size: 29px;
|
| 153 |
+
line-height: 1.15;
|
| 154 |
+
font-weight: 500;
|
| 155 |
+
letter-spacing: -1px;
|
| 156 |
+
font-variant-numeric: tabular-nums;
|
| 157 |
+
white-space: nowrap;
|
| 158 |
+
}
|
| 159 |
+
|
| 160 |
+
.score-caption {
|
| 161 |
+
font-size: 12px;
|
| 162 |
+
line-height: 1.65;
|
| 163 |
+
color: var(--muted);
|
| 164 |
+
margin-top: 15px;
|
| 165 |
+
}
|
| 166 |
+
|
| 167 |
+
#result-card .result-origin {
|
| 168 |
+
display: inline-flex;
|
| 169 |
+
align-items: center;
|
| 170 |
+
min-height: 23px;
|
| 171 |
+
margin-top: 11px;
|
| 172 |
+
padding: 3px 7px;
|
| 173 |
+
font-size: 11px;
|
| 174 |
+
line-height: 1.4;
|
| 175 |
+
color: var(--muted);
|
| 176 |
+
background: transparent;
|
| 177 |
+
border: 1px solid var(--line);
|
| 178 |
+
border-radius: 5px;
|
| 179 |
+
}
|
| 180 |
+
|
| 181 |
+
.result-actions {
|
| 182 |
+
display: flex;
|
| 183 |
+
flex-direction: column;
|
| 184 |
+
align-items: stretch;
|
| 185 |
+
gap: 14px;
|
| 186 |
+
margin-top: 23px;
|
| 187 |
+
}
|
| 188 |
+
|
| 189 |
+
.calculation-link {
|
| 190 |
+
display: inline-flex;
|
| 191 |
+
align-items: center;
|
| 192 |
+
gap: 8px;
|
| 193 |
+
align-self: flex-start;
|
| 194 |
+
padding: 3px 0;
|
| 195 |
+
font-size: 12px;
|
| 196 |
+
font-weight: 500;
|
| 197 |
+
line-height: 1.45;
|
| 198 |
+
color: var(--accent);
|
| 199 |
+
border-radius: 3px;
|
| 200 |
+
text-decoration: none;
|
| 201 |
+
text-underline-offset: 4px;
|
| 202 |
+
}
|
| 203 |
+
|
| 204 |
+
.calculation-link:hover {
|
| 205 |
+
color: var(--accent-hover);
|
| 206 |
+
text-decoration: underline;
|
| 207 |
+
}
|
| 208 |
+
|
| 209 |
+
.calculation-link svg {
|
| 210 |
+
width: 14px;
|
| 211 |
+
height: 14px;
|
| 212 |
+
}
|
| 213 |
+
|
| 214 |
+
.result-actions .button {
|
| 215 |
+
min-height: 40px;
|
| 216 |
+
}
|
| 217 |
+
|
| 218 |
+
#reference-score.expert-assessment {
|
| 219 |
+
display: block;
|
| 220 |
+
margin-top: 24px;
|
| 221 |
+
padding-top: 20px;
|
| 222 |
+
border-top: 1px solid var(--line);
|
| 223 |
+
color: var(--ink);
|
| 224 |
+
}
|
| 225 |
+
|
| 226 |
+
.expert-assessment-summary {
|
| 227 |
+
display: flex;
|
| 228 |
+
align-items: baseline;
|
| 229 |
+
justify-content: space-between;
|
| 230 |
+
gap: 14px;
|
| 231 |
+
}
|
| 232 |
+
|
| 233 |
+
.expert-assessment-summary > span {
|
| 234 |
+
font-size: 12px;
|
| 235 |
+
font-weight: 500;
|
| 236 |
+
line-height: 1.5;
|
| 237 |
+
color: var(--ink);
|
| 238 |
+
}
|
| 239 |
+
|
| 240 |
+
#reference-score-value {
|
| 241 |
+
flex-shrink: 0;
|
| 242 |
+
color: var(--ink);
|
| 243 |
+
font-family: 'Manrope', 'DM Sans', sans-serif;
|
| 244 |
+
font-size: 24px;
|
| 245 |
+
line-height: 1.15;
|
| 246 |
+
font-weight: 550;
|
| 247 |
+
letter-spacing: -.7px;
|
| 248 |
+
font-variant-numeric: tabular-nums;
|
| 249 |
+
}
|
| 250 |
+
|
| 251 |
+
#expert-mean-caption {
|
| 252 |
+
font-size: 11px;
|
| 253 |
+
line-height: 1.6;
|
| 254 |
+
margin-top: 7px;
|
| 255 |
+
color: var(--muted);
|
| 256 |
+
}
|
| 257 |
+
|
| 258 |
+
.expert-scores {
|
| 259 |
+
display: grid;
|
| 260 |
+
grid-template-columns: repeat(3, minmax(0, 1fr));
|
| 261 |
+
gap: 1px;
|
| 262 |
+
margin-top: 15px;
|
| 263 |
+
overflow: hidden;
|
| 264 |
+
background: var(--line);
|
| 265 |
+
border: 1px solid var(--line);
|
| 266 |
+
border-radius: 8px;
|
| 267 |
+
}
|
| 268 |
+
|
| 269 |
+
.expert-score {
|
| 270 |
+
min-width: 0;
|
| 271 |
+
padding: 10px 9px 11px;
|
| 272 |
+
background: var(--detail-surface);
|
| 273 |
+
}
|
| 274 |
+
|
| 275 |
+
.expert-label {
|
| 276 |
+
display: block;
|
| 277 |
+
color: var(--muted);
|
| 278 |
+
font-size: 11px;
|
| 279 |
+
line-height: 1.5;
|
| 280 |
+
}
|
| 281 |
+
|
| 282 |
+
#reference-score .expert-score strong {
|
| 283 |
+
display: block;
|
| 284 |
+
margin-top: 4px;
|
| 285 |
+
color: var(--ink);
|
| 286 |
+
font-size: 16px;
|
| 287 |
+
line-height: 1.4;
|
| 288 |
+
font-weight: 500;
|
| 289 |
+
letter-spacing: -.25px;
|
| 290 |
+
font-variant-numeric: tabular-nums;
|
| 291 |
+
}
|
| 292 |
+
|
| 293 |
+
.expert-context {
|
| 294 |
+
font-size: 11px;
|
| 295 |
+
line-height: 1.65;
|
| 296 |
+
color: var(--muted);
|
| 297 |
+
margin-top: 12px;
|
| 298 |
+
}
|
| 299 |
+
|
| 300 |
+
#reference-source {
|
| 301 |
+
display: inline-block;
|
| 302 |
+
margin-top: 9px;
|
| 303 |
+
font-size: 11px;
|
| 304 |
+
line-height: 1.5;
|
| 305 |
+
text-underline-offset: 3px;
|
| 306 |
+
}
|
| 307 |
+
|
| 308 |
+
.is-partial .score-comparison {
|
| 309 |
+
opacity: .7;
|
| 310 |
+
}
|
| 311 |
+
|
| 312 |
+
#fold-results.calculation-details {
|
| 313 |
+
grid-column: 1 / -1;
|
| 314 |
+
margin: 8px 0 0;
|
| 315 |
+
padding: 26px;
|
| 316 |
+
min-width: 0;
|
| 317 |
+
border: 1px solid var(--line);
|
| 318 |
+
border-radius: 12px;
|
| 319 |
+
background: var(--surface);
|
| 320 |
+
box-shadow: var(--shadow);
|
| 321 |
+
scroll-margin-top: 24px;
|
| 322 |
+
}
|
| 323 |
+
|
| 324 |
+
.calculation-heading {
|
| 325 |
+
display: flex;
|
| 326 |
+
flex-direction: column;
|
| 327 |
+
align-items: flex-start;
|
| 328 |
+
gap: 7px;
|
| 329 |
+
margin-bottom: 22px;
|
| 330 |
+
}
|
| 331 |
+
|
| 332 |
+
.calculation-heading h2 {
|
| 333 |
+
font-family: 'Manrope', 'DM Sans', sans-serif;
|
| 334 |
+
font-size: 18px;
|
| 335 |
+
line-height: 1.4;
|
| 336 |
+
font-weight: 650;
|
| 337 |
+
letter-spacing: -.4px;
|
| 338 |
+
}
|
| 339 |
+
|
| 340 |
+
.calculation-heading p,
|
| 341 |
+
.calculation-heading .muted {
|
| 342 |
+
max-width: 760px;
|
| 343 |
+
font-size: 12px;
|
| 344 |
+
line-height: 1.65;
|
| 345 |
+
color: var(--muted);
|
| 346 |
+
}
|
| 347 |
+
|
| 348 |
+
.calculation-rule {
|
| 349 |
+
display: grid;
|
| 350 |
+
grid-template-columns: repeat(4, minmax(0, 1fr));
|
| 351 |
+
gap: 24px;
|
| 352 |
+
margin-bottom: 25px;
|
| 353 |
+
}
|
| 354 |
+
|
| 355 |
+
.calculation-step {
|
| 356 |
+
position: relative;
|
| 357 |
+
display: flex;
|
| 358 |
+
align-items: flex-start;
|
| 359 |
+
gap: 12px;
|
| 360 |
+
min-width: 0;
|
| 361 |
+
padding: 17px 15px;
|
| 362 |
+
background: var(--detail-surface);
|
| 363 |
+
border: 1px solid var(--line);
|
| 364 |
+
border-radius: 8px;
|
| 365 |
+
}
|
| 366 |
+
|
| 367 |
+
.calculation-step:not(:last-child)::after {
|
| 368 |
+
content: '';
|
| 369 |
+
position: absolute;
|
| 370 |
+
right: -17px;
|
| 371 |
+
top: 50%;
|
| 372 |
+
width: 6px;
|
| 373 |
+
height: 6px;
|
| 374 |
+
border-top: 1px solid var(--muted);
|
| 375 |
+
border-right: 1px solid var(--muted);
|
| 376 |
+
transform: translateY(-50%) rotate(45deg);
|
| 377 |
+
opacity: .7;
|
| 378 |
+
}
|
| 379 |
+
|
| 380 |
+
.calculation-step-index {
|
| 381 |
+
flex: none;
|
| 382 |
+
display: grid;
|
| 383 |
+
place-items: center;
|
| 384 |
+
width: 25px;
|
| 385 |
+
height: 25px;
|
| 386 |
+
border: 1px solid var(--line);
|
| 387 |
+
border-radius: 6px;
|
| 388 |
+
background: var(--surface);
|
| 389 |
+
color: var(--muted);
|
| 390 |
+
font-size: 11px;
|
| 391 |
+
line-height: 1;
|
| 392 |
+
font-weight: 500;
|
| 393 |
+
font-variant-numeric: tabular-nums;
|
| 394 |
+
}
|
| 395 |
+
|
| 396 |
+
.calculation-step strong {
|
| 397 |
+
display: block;
|
| 398 |
+
font-size: 12px;
|
| 399 |
+
line-height: 1.45;
|
| 400 |
+
font-weight: 600;
|
| 401 |
+
color: var(--ink);
|
| 402 |
+
padding-top: 3px;
|
| 403 |
+
}
|
| 404 |
+
|
| 405 |
+
.calculation-step p {
|
| 406 |
+
font-size: 11px;
|
| 407 |
+
line-height: 1.6;
|
| 408 |
+
margin-top: 6px;
|
| 409 |
+
color: var(--muted);
|
| 410 |
+
}
|
| 411 |
+
|
| 412 |
+
.calculation-details .fold-table-wrap {
|
| 413 |
+
overflow: auto;
|
| 414 |
+
overscroll-behavior-x: contain;
|
| 415 |
+
scrollbar-width: thin;
|
| 416 |
+
scrollbar-color: var(--line) transparent;
|
| 417 |
+
border-radius: 8px;
|
| 418 |
+
}
|
| 419 |
+
|
| 420 |
+
.model-breakdown-table {
|
| 421 |
+
width: 100%;
|
| 422 |
+
min-width: 700px;
|
| 423 |
+
table-layout: auto;
|
| 424 |
+
font-size: 13px;
|
| 425 |
+
font-variant-numeric: tabular-nums;
|
| 426 |
+
}
|
| 427 |
+
|
| 428 |
+
.model-breakdown-table th {
|
| 429 |
+
padding: 13px 15px;
|
| 430 |
+
font-size: 11px;
|
| 431 |
+
line-height: 1.5;
|
| 432 |
+
font-weight: 500;
|
| 433 |
+
color: var(--muted);
|
| 434 |
+
background: var(--detail-surface);
|
| 435 |
+
vertical-align: bottom;
|
| 436 |
+
}
|
| 437 |
+
|
| 438 |
+
.model-breakdown-table td {
|
| 439 |
+
padding: 15px;
|
| 440 |
+
font-size: 13px;
|
| 441 |
+
line-height: 1.4;
|
| 442 |
+
color: var(--ink);
|
| 443 |
+
background: var(--surface);
|
| 444 |
+
}
|
| 445 |
+
|
| 446 |
+
.model-breakdown-table th:first-child,
|
| 447 |
+
.model-breakdown-table td:first-child {
|
| 448 |
+
width: 12%;
|
| 449 |
+
text-align: left;
|
| 450 |
+
white-space: nowrap;
|
| 451 |
+
}
|
| 452 |
+
|
| 453 |
+
.model-breakdown-table td:first-child {
|
| 454 |
+
font-weight: 500;
|
| 455 |
+
color: var(--muted);
|
| 456 |
+
}
|
| 457 |
+
|
| 458 |
+
.model-breakdown-table th:nth-child(5),
|
| 459 |
+
.model-breakdown-table td:nth-child(5) {
|
| 460 |
+
text-align: center;
|
| 461 |
+
}
|
| 462 |
+
|
| 463 |
+
.model-breakdown-table .fold-formula {
|
| 464 |
+
white-space: nowrap;
|
| 465 |
+
font-size: 12px;
|
| 466 |
+
color: var(--muted);
|
| 467 |
+
letter-spacing: .1px;
|
| 468 |
+
}
|
| 469 |
+
|
| 470 |
+
.model-breakdown-table th:last-child,
|
| 471 |
+
.model-breakdown-table td:last-child {
|
| 472 |
+
padding-right: 19px;
|
| 473 |
+
background: var(--detail-accent-surface);
|
| 474 |
+
color: var(--accent);
|
| 475 |
+
}
|
| 476 |
+
|
| 477 |
+
.model-breakdown-table td:last-child {
|
| 478 |
+
font-weight: 600;
|
| 479 |
+
}
|
| 480 |
+
|
| 481 |
+
.calculation-summary {
|
| 482 |
+
display: grid;
|
| 483 |
+
grid-template-columns: repeat(3, minmax(0, 1fr));
|
| 484 |
+
gap: 16px;
|
| 485 |
+
margin-top: 20px;
|
| 486 |
+
}
|
| 487 |
+
|
| 488 |
+
.calculation-summary-item {
|
| 489 |
+
min-width: 0;
|
| 490 |
+
padding: 17px 18px 16px;
|
| 491 |
+
border: 1px solid var(--line);
|
| 492 |
+
border-radius: 8px;
|
| 493 |
+
background: var(--surface);
|
| 494 |
+
}
|
| 495 |
+
|
| 496 |
+
.calculation-summary-item > span {
|
| 497 |
+
display: block;
|
| 498 |
+
font-size: 11px;
|
| 499 |
+
font-weight: 500;
|
| 500 |
+
line-height: 1.5;
|
| 501 |
+
color: var(--muted);
|
| 502 |
+
}
|
| 503 |
+
|
| 504 |
+
.calculation-summary-item > strong {
|
| 505 |
+
display: block;
|
| 506 |
+
margin-top: 9px;
|
| 507 |
+
font-family: 'Manrope', 'DM Sans', sans-serif;
|
| 508 |
+
font-size: 27px;
|
| 509 |
+
line-height: 1.15;
|
| 510 |
+
font-weight: 550;
|
| 511 |
+
letter-spacing: -.9px;
|
| 512 |
+
font-variant-numeric: tabular-nums;
|
| 513 |
+
}
|
| 514 |
+
|
| 515 |
+
.calculation-summary-item > small {
|
| 516 |
+
display: block;
|
| 517 |
+
margin-top: 8px;
|
| 518 |
+
font-size: 11px;
|
| 519 |
+
line-height: 1.55;
|
| 520 |
+
color: var(--muted);
|
| 521 |
+
overflow-wrap: anywhere;
|
| 522 |
+
}
|
| 523 |
+
|
| 524 |
+
.calculation-summary-item:last-child {
|
| 525 |
+
background: var(--detail-accent-surface);
|
| 526 |
+
border-color: var(--detail-accent-line);
|
| 527 |
+
}
|
| 528 |
+
|
| 529 |
+
.calculation-summary-item:last-child > strong {
|
| 530 |
+
color: var(--accent);
|
| 531 |
+
}
|
| 532 |
+
|
| 533 |
+
.calculation-notes {
|
| 534 |
+
display: grid;
|
| 535 |
+
gap: 8px;
|
| 536 |
+
margin-top: 19px;
|
| 537 |
+
font-size: 11px;
|
| 538 |
+
line-height: 1.7;
|
| 539 |
+
color: var(--muted);
|
| 540 |
+
}
|
| 541 |
+
|
| 542 |
+
.calculation-notes p {
|
| 543 |
+
max-width: 920px;
|
| 544 |
+
}
|
| 545 |
+
|
| 546 |
+
.calculation-notes a {
|
| 547 |
+
text-underline-offset: 3px;
|
| 548 |
+
}
|
| 549 |
+
|
| 550 |
+
.calculation-details:not([hidden]),
|
| 551 |
+
.expert-assessment:not([hidden]) {
|
| 552 |
+
animation: reveal-section var(--motion-standard) var(--motion-ease) both;
|
| 553 |
+
}
|
| 554 |
+
|
| 555 |
+
@keyframes reveal-section {
|
| 556 |
+
from { opacity: 0; transform: translateY(4px); }
|
| 557 |
+
to { opacity: 1; transform: translateY(0); }
|
| 558 |
+
}
|
| 559 |
+
|
| 560 |
+
@media (min-width: 1500px) {
|
| 561 |
+
.score-comparison .score-number { font-size: 54px; }
|
| 562 |
+
.raw-total-number { font-size: 31px; }
|
| 563 |
+
#fold-results.calculation-details { padding: 28px; }
|
| 564 |
+
}
|
| 565 |
+
|
| 566 |
+
@media (max-width: 1190px) and (min-width: 761px) {
|
| 567 |
+
#result-card { padding: 20px 16px 18px; }
|
| 568 |
+
.score-comparison { grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr); gap: 12px; }
|
| 569 |
+
.score-comparison .score-number { font-size: 43px; letter-spacing: -2px; }
|
| 570 |
+
.raw-score { padding-left: 12px; }
|
| 571 |
+
.raw-total-number { font-size: 25px; letter-spacing: -.7px; }
|
| 572 |
+
.score-comparison-cell .score-label,
|
| 573 |
+
.score-comparison-cell > span:first-child { font-size: 11px; }
|
| 574 |
+
.expert-score { padding: 9px 6px 10px; }
|
| 575 |
+
.expert-label { font-size: 11px; }
|
| 576 |
+
.expert-assessment-summary { gap: 8px; }
|
| 577 |
+
.expert-assessment-summary > span { font-size: 11px; }
|
| 578 |
+
#reference-score-value { font-size: 22px; }
|
| 579 |
+
.calculation-step { display: block; padding: 15px 13px; }
|
| 580 |
+
.calculation-step-index { margin-bottom: 10px; }
|
| 581 |
+
.calculation-rule { gap: 20px; }
|
| 582 |
+
.calculation-step:not(:last-child)::after { right: -15px; }
|
| 583 |
+
}
|
| 584 |
+
|
| 585 |
+
@media (max-width: 960px) {
|
| 586 |
+
#fold-results.calculation-details { padding: 21px; }
|
| 587 |
+
.calculation-rule { gap: 17px; }
|
| 588 |
+
.calculation-step { display: block; padding: 14px; }
|
| 589 |
+
.calculation-step-index { margin-bottom: 10px; }
|
| 590 |
+
.calculation-step:not(:last-child)::after { right: -13px; }
|
| 591 |
+
.calculation-summary { gap: 11px; }
|
| 592 |
+
.calculation-summary-item { padding: 15px; }
|
| 593 |
+
.calculation-summary-item > strong { font-size: 25px; }
|
| 594 |
+
}
|
| 595 |
+
|
| 596 |
+
@media (max-width: 760px) {
|
| 597 |
+
.analysis-panel #result-card { order: 0; }
|
| 598 |
+
.brand-mark { width: 29px; height: 31px; }
|
| 599 |
+
.brand-mark svg,
|
| 600 |
+
.brand-mark img { width: 30px; height: 30px; }
|
| 601 |
+
.brand { gap: 7px; }
|
| 602 |
+
#result-card { padding: 24px; }
|
| 603 |
+
.score-comparison { gap: 22px; grid-template-columns: minmax(0, 1fr) minmax(0, .75fr); margin-top: 25px; }
|
| 604 |
+
.score-comparison .score-number { font-size: 58px; letter-spacing: -2.7px; }
|
| 605 |
+
.raw-score { padding: 0 0 5px 22px; }
|
| 606 |
+
.raw-total-number { font-size: 34px; }
|
| 607 |
+
.score-caption { margin-top: 16px; }
|
| 608 |
+
#reference-score.expert-assessment { margin-top: 25px; }
|
| 609 |
+
.expert-scores { grid-template-columns: repeat(6, minmax(0, 1fr)); }
|
| 610 |
+
.expert-score { padding: 11px 7px; }
|
| 611 |
+
.expert-label { font-size: 11px; }
|
| 612 |
+
.result-actions { gap: 16px; }
|
| 613 |
+
#fold-results.calculation-details { margin-top: 0; padding: 22px 18px; }
|
| 614 |
+
.calculation-heading { margin-bottom: 20px; }
|
| 615 |
+
.calculation-heading h2 { font-size: 18px; }
|
| 616 |
+
.calculation-rule { display: flex; flex-direction: column; gap: 15px; margin-bottom: 22px; }
|
| 617 |
+
.calculation-step { display: flex; gap: 12px; padding: 15px; }
|
| 618 |
+
.calculation-step-index { margin-bottom: 0; }
|
| 619 |
+
.calculation-step:not(:last-child)::after { top: auto; right: auto; left: 27px; bottom: -11px; transform: rotate(135deg); width: 5px; height: 5px; }
|
| 620 |
+
.calculation-step strong { font-size: 12px; }
|
| 621 |
+
.calculation-step p { font-size: 11px; margin-top: 4px; }
|
| 622 |
+
.model-breakdown-table { min-width: 680px; }
|
| 623 |
+
.model-breakdown-table th { padding: 12px 14px; }
|
| 624 |
+
.model-breakdown-table td { padding: 14px; }
|
| 625 |
+
.calculation-summary { gap: 10px; }
|
| 626 |
+
.calculation-summary-item { padding: 14px 12px; }
|
| 627 |
+
.calculation-summary-item > strong { font-size: 25px; }
|
| 628 |
+
.calculation-summary-item > span,
|
| 629 |
+
.calculation-summary-item > small { font-size: 11px; }
|
| 630 |
+
.calculation-notes { margin-top: 17px; }
|
| 631 |
+
}
|
| 632 |
+
|
| 633 |
+
@media (max-width: 480px) {
|
| 634 |
+
#result-card { padding: 22px 20px; }
|
| 635 |
+
.score-comparison { grid-template-columns: minmax(0, 1.1fr) minmax(0, .8fr); gap: 18px; }
|
| 636 |
+
.score-comparison .score-number { font-size: 54px; }
|
| 637 |
+
.raw-score { padding-left: 18px; }
|
| 638 |
+
.raw-total-number { font-size: 31px; }
|
| 639 |
+
.expert-scores { grid-template-columns: repeat(3, minmax(0, 1fr)); }
|
| 640 |
+
.expert-score { padding: 11px; }
|
| 641 |
+
.expert-label { font-size: 11px; }
|
| 642 |
+
.calculation-summary { grid-template-columns: 1fr; gap: 10px; }
|
| 643 |
+
.calculation-summary-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 18px; align-items: center; padding: 15px; }
|
| 644 |
+
.calculation-summary-item > span { font-size: 11px; }
|
| 645 |
+
.calculation-summary-item > strong { grid-column: 2; grid-row: 1 / span 2; margin: 0; font-size: 27px; }
|
| 646 |
+
.calculation-summary-item > small { margin-top: 5px; font-size: 11px; }
|
| 647 |
+
}
|
| 648 |
+
|
| 649 |
+
@media (max-width: 380px) {
|
| 650 |
+
#result-card { padding: 20px 17px; }
|
| 651 |
+
.score-comparison { gap: 13px; }
|
| 652 |
+
.score-comparison .score-number { font-size: 48px; letter-spacing: -2px; }
|
| 653 |
+
.raw-score { padding-left: 13px; }
|
| 654 |
+
.raw-total-number { font-size: 28px; }
|
| 655 |
+
.score-comparison-cell .score-label,
|
| 656 |
+
.score-comparison-cell > span:first-child { font-size: 11px; }
|
| 657 |
+
#fold-results.calculation-details { padding: 20px 15px; }
|
| 658 |
+
}
|
| 659 |
+
|
| 660 |
+
@media (prefers-reduced-motion: reduce) {
|
| 661 |
+
*, *::before, *::after {
|
| 662 |
+
animation: none !important;
|
| 663 |
+
transition: none !important;
|
| 664 |
+
scroll-behavior: auto !important;
|
| 665 |
+
}
|
| 666 |
+
}
|