@rr0/ufoathome 0.197.0 → 0.198.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (74) hide show
  1. package/dist-embed-scene/rr0-scene.mjs +122 -122
  2. package/dist-embed-sighting/{CaseReportExport-CCjvTS2q.js → CaseReportExport-BetcYOov.js} +1 -1
  3. package/dist-embed-sighting/rr0-sighting.mjs +300 -286
  4. package/dist-embed-sighting-editor/{CaseEditorMessages_en-u4MyW2Ah.js → CaseEditorMessages_en-CpJLWbJD.js} +1 -1
  5. package/{dist-embed-ufoathome/CaseEditorMessages_es-BuLTG_5Q.js → dist-embed-sighting-editor/CaseEditorMessages_es-C5YOqVpF.js} +1 -1
  6. package/{dist-embed-ufoathome/CaseEditorMessages_fr-Car1_lOm.js → dist-embed-sighting-editor/CaseEditorMessages_fr-rMlMgrqV.js} +1 -1
  7. package/{dist-embed-ufoathome/CaseEditorMessages_it-DAHTKU_c.js → dist-embed-sighting-editor/CaseEditorMessages_it-Bkiv2Hun.js} +1 -1
  8. package/dist-embed-sighting-editor/CaseElement-IzaexO7n.js +121 -0
  9. package/dist-embed-sighting-editor/{CaseReportExport-CAEcShgX.js → CaseReportExport-U-dk4A7z.js} +1 -1
  10. package/dist-embed-sighting-editor/{SightingElement-Ddf6hzfp.js → SightingElement-BhyoU_gg.js} +3 -3
  11. package/dist-embed-sighting-editor/rr0-sighting-editor.mjs +214 -192
  12. package/dist-embed-ufoathome/{AdsbLolArchiveProvider-B-IiOm3p.js → AdsbLolArchiveProvider-CUkfGJbL.js} +1 -1
  13. package/dist-embed-ufoathome/{BallesterGuaspAssessor-CKFQRcfa.js → BallesterGuaspAssessor-CB2F8A6P.js} +1 -1
  14. package/dist-embed-ufoathome/{BeamEditor-BWkQrCPy.js → BeamEditor-Q_m3KK0S.js} +1 -1
  15. package/dist-embed-ufoathome/{BeamSystem-D6XsTULo.js → BeamSystem-CVMU5DeE.js} +1 -1
  16. package/dist-embed-ufoathome/{BirdEditor-6vr7bLHy.js → BirdEditor-07sg3Pt0.js} +1 -1
  17. package/dist-embed-ufoathome/{BodyEditor-D1odTty_.js → BodyEditor-BwsMj37A.js} +1 -1
  18. package/dist-embed-ufoathome/{CaseEditorElement-3g_c6R7G.js → CaseEditorElement-BrcX9sp0.js} +130 -113
  19. package/dist-embed-ufoathome/{CaseEditorMessages_en-u4MyW2Ah.js → CaseEditorMessages_en-CpJLWbJD.js} +1 -1
  20. package/{dist-embed-sighting-editor/CaseEditorMessages_es-BuLTG_5Q.js → dist-embed-ufoathome/CaseEditorMessages_es-C5YOqVpF.js} +1 -1
  21. package/{dist-embed-sighting-editor/CaseEditorMessages_fr-Car1_lOm.js → dist-embed-ufoathome/CaseEditorMessages_fr-rMlMgrqV.js} +1 -1
  22. package/{dist-embed-sighting-editor/CaseEditorMessages_it-DAHTKU_c.js → dist-embed-ufoathome/CaseEditorMessages_it-Bkiv2Hun.js} +1 -1
  23. package/dist-embed-ufoathome/CaseElement-Ca8ctACA.js +121 -0
  24. package/dist-embed-ufoathome/{CaseReportExport-ZNhCiJjJ.js → CaseReportExport--IhmS67e.js} +3 -3
  25. package/dist-embed-ufoathome/{ColumnResize-UnDz8hFM.js → ColumnResize-CMfGWQHi.js} +20 -15
  26. package/dist-embed-ufoathome/{ContrailSystem-1Y9tarlk.js → ContrailSystem-CuFduINP.js} +1 -1
  27. package/dist-embed-ufoathome/{ControlPasses-CNOyd9SV.js → ControlPasses-BS7yyZOR.js} +1 -1
  28. package/dist-embed-ufoathome/{CoverageAssessor-BDtOq9aQ.js → CoverageAssessor-BwXJv4OD.js} +1 -1
  29. package/dist-embed-ufoathome/{DroneEditor-C3SH8yYq.js → DroneEditor-ByVlCauS.js} +1 -1
  30. package/dist-embed-ufoathome/{Flightradar24Provider-2yiCbULq.js → Flightradar24Provider-Cd4o260r.js} +1 -1
  31. package/dist-embed-ufoathome/{GLTFLoader-BTxAZ2H9.js → GLTFLoader-BegH9SUA.js} +1 -1
  32. package/dist-embed-ufoathome/{GeoJsonExport-taSDSkPz.js → GeoJsonExport-Czm1iAIW.js} +1 -1
  33. package/dist-embed-ufoathome/{GeographicFigures-BTNgtesN.js → GeographicFigures-CKg7JYgf.js} +1 -1
  34. package/dist-embed-ufoathome/{HeadlightSystem-DrcLjLtQ.js → HeadlightSystem-DIk-C7_5.js} +1 -1
  35. package/dist-embed-ufoathome/{HynekAssessor-B29m-sN8.js → HynekAssessor-BybLMdda.js} +1 -1
  36. package/dist-embed-ufoathome/{InterviewEditorElement-2QYSmoHm.js → InterviewEditorElement-CbTakhyi.js} +1 -1
  37. package/dist-embed-ufoathome/{InterviewElement-dtYF5S-4.js → InterviewElement-fI19BieO.js} +1 -1
  38. package/dist-embed-ufoathome/{KmlExport-BmpKnlBj.js → KmlExport-De-2dnYz.js} +1 -1
  39. package/dist-embed-ufoathome/{LanternEditor-BaRDgTw-.js → LanternEditor-BRqgj1S6.js} +1 -1
  40. package/dist-embed-ufoathome/{LaserBeam-ejbRCvnX.js → LaserBeam-CouNB7Pe.js} +1 -1
  41. package/dist-embed-ufoathome/{LaunchEditor-DlL4ZqRi.js → LaunchEditor-BNInX90c.js} +1 -1
  42. package/dist-embed-ufoathome/{LaunchPlume-oAya2eEa.js → LaunchPlume-DVxzb0wy.js} +1 -1
  43. package/dist-embed-ufoathome/{LaunchSimulation-DkwJLwOo.js → LaunchSimulation-CCvSd6qD.js} +1 -1
  44. package/dist-embed-ufoathome/{ModelSource-B_nU_FPQ.js → ModelSource-BZ1U1VU1.js} +1 -1
  45. package/dist-embed-ufoathome/{ModelThumbnails-DaDiyuM2.js → ModelThumbnails-Ckdb3qoW.js} +1 -1
  46. package/dist-embed-ufoathome/{ModelViewer-iv0GdyTZ.js → ModelViewer-B9PZN5c7.js} +1 -1
  47. package/dist-embed-ufoathome/{ModuleConformance-BDZbbpPz.js → ModuleConformance-8JN5JVgE.js} +2 -2
  48. package/dist-embed-ufoathome/{ModuleSession-DbiU7Mg7.js → ModuleSession-ClSpEZMn.js} +3 -3
  49. package/dist-embed-ufoathome/{ModuleThree-CLOnw_DZ.js → ModuleThree-CRG8PTLA.js} +1 -1
  50. package/dist-embed-ufoathome/{ModulesPanelElement-CMyuCril.js → ModulesPanelElement-D4Hos-mF.js} +3 -3
  51. package/dist-embed-ufoathome/{NearestApproach-DM8py_qI.js → NearestApproach-DrJN7h_1.js} +1 -1
  52. package/dist-embed-ufoathome/{ParameterForm-DfpJQGku.js → ParameterForm-DcVFxrcO.js} +1 -1
  53. package/dist-embed-ufoathome/{PictureRegistration-rU4sVWnY.js → PictureRegistration-LxhNTA4v.js} +1 -1
  54. package/dist-embed-ufoathome/{PoherAssessor-DXsufNSL.js → PoherAssessor-RyKMyps7.js} +1 -1
  55. package/dist-embed-ufoathome/{RailwaySystem-DZ1rEPSL.js → RailwaySystem-BOQvJ2r4.js} +1 -1
  56. package/dist-embed-ufoathome/{ReentryEditor-BVDyVhGo.js → ReentryEditor-B1H_TUMf.js} +1 -1
  57. package/dist-embed-ufoathome/{ReentrySimulation-DFisNsmn.js → ReentrySimulation-C7XZlAED.js} +1 -1
  58. package/dist-embed-ufoathome/{ReferenceSystem-DnHhAxWO.js → ReferenceSystem-BcsjHgaw.js} +1 -1
  59. package/dist-embed-ufoathome/{RoadMarkings-BsN3rh0W.js → RoadMarkings-DDRxawvf.js} +1 -1
  60. package/dist-embed-ufoathome/SaidPosition-CXZLm-ck.js +4 -0
  61. package/dist-embed-ufoathome/{ShareDialogElement-C5QkyK7i.js → ShareDialogElement-DHlxoHWP.js} +13 -13
  62. package/dist-embed-ufoathome/{Sighting-CBpJpdm9.js → Sighting-Ch4eiBNK.js} +1 -1
  63. package/dist-embed-ufoathome/{SightingElement-cd7C-Ge-.js → SightingElement-COJwKNNg.js} +3 -3
  64. package/dist-embed-ufoathome/{TimelineTracks-X_GEZi12.js → TimelineTracks-BgZmkKhn.js} +1 -1
  65. package/dist-embed-ufoathome/{TraceSystem-CM4QYSkU.js → TraceSystem-BBCpq8-v.js} +1 -1
  66. package/dist-embed-ufoathome/{VideoButton-CZlR9Bk0.js → VideoButton-CGQI7iUA.js} +1 -1
  67. package/dist-embed-ufoathome/{WaterSystem-C8MrXEEk.js → WaterSystem-BrIS0Wzy.js} +1 -1
  68. package/dist-embed-ufoathome/rr0-ufoathome.mjs +3 -3
  69. package/dist-embed-ufoathome/{surroundingsSources-CKDz9k9A.js → surroundingsSources-Dg6vMWL7.js} +1 -1
  70. package/dist-embed-ufoathome/{trafficRuntime-AtbE4bAN.js → trafficRuntime-BT5Ol_v5.js} +1 -1
  71. package/package.json +1 -1
  72. package/dist-embed-sighting-editor/CaseElement-DYeBpKhp.js +0 -112
  73. package/dist-embed-ufoathome/CaseElement-CZzC4Bj8.js +0 -112
  74. package/dist-embed-ufoathome/SaidPosition-CWiVNaNW.js +0 -4
@@ -1 +1 @@
1
- const e={event:"Event",accountOf:"Observation of",passagesHeading:"Reported in",interviewOf:"Interview of",untitledInterview:"Interview {n}",deleteInterviewQuestion:"Delete this interview from the case? Nothing is written until the case is saved.",untitledReading:"Reading {n}",eventsInTime:"Events · in the order of time",citedMoment:"Moment {k}, quoted in {title}: “{quote}”",backToInterview:"Back to the interview",openEvent:"Open",kindObservations:"Observations",kindReadings:"Readings",kindInterviews:"Interviews",linkAnd:"and",byAuthor:"by",kindReading:"Reading",readingsCount:"{n} reading(s)",readingVerdict:{incompatible:"Contradicts what is established",unsettled:"Not settled",compatible:"Compatible"},findingOutcome:{holds:"Holds",fails:"Fails",untested:"Could not be tested"},findingAgainst:{established:"against what is established",supposed:"against a supposition"},untitledObservation:"Observation {n}",deleteRecording:"Delete this recording from the case",cloneEvent:"Copy this event: the copy is what you carry on with",freezeEvent:"Freeze this event, so that work resting on it stays true",unfreezeEvent:"Thaw this event, to edit it again",sealedChip:"Frozen",deleteFrozen:"Frozen: thaw it to delete it",frozenNote:"This event is frozen: nothing can be edited in it, so that an interview or a hypothesis resting on it is not invalidated. Copy it to carry on, or thaw it.",thawButton:"Thaw",deleteReadingQuestion:"Delete this reading? Nothing is written until the case is saved.",deleteObservationQuestion:"Delete this observation from the case? Nothing is written until the case is saved.",deleteRefused:"This observation is read by {n} reading(s): delete them first.",titleField:"Title of the reading",authorField:"Author",investigatorField:"Investigator",addTitle:"Add an event",kindField:"Type",kindObservation:"Observation",kindInterview:"Interview",witnessField:"Witness",mediumField:"Medium",interviewerField:"Interviewer",plainTitleField:"Title",sourceField:"Source",sourceBlank:"A blank recording",sourceFile:"An existing recording",observerField:"Witness",fileField:"File",loadFailed:"That recording could not be read.",isACase:"That is a case, not a recording.",ok:"OK",cancel:"Cancel",caseHeading:"Case",caseId:"ID",idDuplicated:"Two events of the case have the ID “{id}”: a reading that names it is ambiguous.",readingUnresolved:"A reading names “{id}”, which no event of the case has as its ID, nor any recording it lists.",caseTitle:"Title",caseTime:"When",eventsTab:"Events",fileTab:"File",importFile:"Load case file",inputFileFromFile:"from your disk",inputFileFromUrl:"from an address",inputFileModeHint:"Click to give it the other way: a file of yours, or an address",inputFileLoad:"Load",fileNotACase:"That file is not a case (it has no events).",formatVersionError:"This file states version {found} of its format; this UFO@home reads up to version {supported}. Open it with a newer UFO@home.",fileInvalid:"This text is not valid JSON yet, or not a case: the case keeps what it last understood.",fileLoading:"Loading the editor…",add:"Add",addHint:"Add an event",interpretationOf:"Reading of",colon:": ",quoted:"“{text}”",interpretationOfNone:"—",groupReadings:"Group the readings under their observation",resizeColumns:"Resize the history column (double-click: back to its width)",foldColumn:"Fold the case's column away",unfoldColumn:"Unfold the case's column",alsoAbout:"Also about",foldReadings:"Fold its readings away",unfoldReadings:"Unfold its readings",exportButton:"Save",readButton:"Read",readTitle:"Read what is edited, as a reader sees it",exportTitle:"Save the case",exportAlso:"Also save the observations",saveOptions:"Save options",addToCase:"Add to a case",unsavedChanges:"Changes not saved",discardQuestion:"Some changes are not saved yet. Load anyway and lose them?",discardTitle:"Unsaved changes",discardOk:"Load anyway",leaveQuestion:"Some changes are not saved yet. Leave anyway and lose them?",leaveOk:"Leave anyway"};export{e as caseEditorMessages_en};
1
+ const e={event:"Event",accountOf:"Observation of",passagesHeading:"Reported in",interviewOf:"Interview of",untitledInterview:"Interview {n}",deleteInterviewQuestion:"Delete this interview from the case? Nothing is written until the case is saved.",untitledReading:"Reading {n}",eventsInTime:"Events · in the order of time",citedMoment:"Moment {k}, quoted in {title}: “{quote}”",backToInterview:"Back to the interview",openEvent:"Open",kindObservations:"Observations",kindReadings:"Readings",kindInterviews:"Interviews",linkAnd:"and",byAuthor:"by",kindReading:"Reading",readingsCount:"{n} reading(s)",readingVerdict:{incompatible:"Contradicts what is established",unsettled:"Not settled",compatible:"Compatible"},findingOutcome:{holds:"Holds",fails:"Fails",untested:"Could not be tested"},findingAgainst:{established:"against what is established",supposed:"against a supposition"},untitledObservation:"Observation {n}",deleteRecording:"Delete this recording from the case",cloneEvent:"Copy this event: the copy is what you carry on with",freezeEvent:"Freeze this event, so that work resting on it stays true",unfreezeEvent:"Thaw this event, to edit it again",sealedChip:"Frozen",deleteFrozen:"Frozen: thaw it to delete it",frozenNote:"This event is frozen: nothing can be edited in it, so that an interview or a hypothesis resting on it is not invalidated. Copy it to carry on, or thaw it.",thawButton:"Thaw",deleteReadingQuestion:"Delete this reading? Nothing is written until the case is saved.",deleteObservationQuestion:"Delete this observation from the case? Nothing is written until the case is saved.",deleteRefused:"This observation is read by {n} reading(s): delete them first.",titleField:"Title of the reading",authorField:"Author",investigatorField:"Investigator",addTitle:"Add an event",kindField:"Type",kindObservation:"Observation",kindInterview:"Interview",witnessField:"Witness",mediumField:"Medium",interviewerField:"Interviewer",plainTitleField:"Title",sourceField:"Source",sourceBlank:"A blank recording",sourceFile:"An existing recording",observerField:"Witness",fileField:"File",loadFailed:"That recording could not be read.",isACase:"That is a case, not a recording.",ok:"OK",cancel:"Cancel",caseHeading:"Case",caseId:"ID",idDuplicated:"Two events of the case have the ID “{id}”: a reading that names it is ambiguous.",readingUnresolved:"A reading names “{id}”, which no event of the case has as its ID, nor any recording it lists.",caseTitle:"Title",caseTime:"When",eventsTab:"Events",fileTab:"File",importFile:"Load case file",inputFileFromFile:"from your disk",inputFileFromUrl:"from an address",inputFileModeHint:"Click to give it the other way: a file of yours, or an address",inputFileLoad:"Load",fileNotACase:"That file is not a case (it has no events).",formatVersionError:"This file states version {found} of its format; this UFO@home reads up to version {supported}. Open it with a newer UFO@home.",fileInvalid:"This text is not valid JSON yet, or not a case: the case keeps what it last understood.",fileLoading:"Loading the editor…",add:"Add",addHint:"Add an event",interpretationOf:"Reading of",colon:": ",quoted:"“{text}”",interpretationOfNone:"—",groupReadings:"Group the readings under their observation",resizeColumns:"Resize the history column (double-click: back to its width)",alsoAbout:"Also about",foldReadings:"Fold its readings away",unfoldReadings:"Unfold its readings",exportButton:"Save",readButton:"Read",readTitle:"Read what is edited, as a reader sees it",exportTitle:"Save the case",exportAlso:"Also save the observations",saveOptions:"Save options",addToCase:"Add to a case",unsavedChanges:"Changes not saved",discardQuestion:"Some changes are not saved yet. Load anyway and lose them?",discardTitle:"Unsaved changes",discardOk:"Load anyway",leaveQuestion:"Some changes are not saved yet. Leave anyway and lose them?",leaveOk:"Leave anyway"};export{e as caseEditorMessages_en};
@@ -1 +1 @@
1
- const e={event:"Evento",accountOf:"Observación de",passagesHeading:"Relatado en",interviewOf:"Entrevista a",untitledInterview:"Entrevista {n}",deleteInterviewQuestion:"¿Eliminar esta entrevista del caso? Nada se escribe hasta guardar el caso.",untitledReading:"Lectura {n}",eventsInTime:"Eventos · en orden cronológico",citedMoment:"Momento {k}, citado en {title}: «{quote}»",backToInterview:"Volver a la entrevista",openEvent:"Abrir",kindObservations:"Observaciones",kindReadings:"Lecturas",kindInterviews:"Entrevistas",linkAnd:"y",byAuthor:"por",kindReading:"Lectura",readingsCount:"{n} lectura(s)",readingVerdict:{incompatible:"Contradice lo establecido",unsettled:"Sin resolver",compatible:"Compatible"},findingOutcome:{holds:"Se sostiene",fails:"Falla",untested:"No se pudo probar"},findingAgainst:{established:"contra un elemento establecido",supposed:"contra una suposición"},untitledObservation:"Observación {n}",deleteRecording:"Quitar esta grabación del caso",cloneEvent:"Clonar este evento: el clon es lo que continúas",freezeEvent:"Congelar este evento, para que lo que se apoya en él siga siendo cierto",unfreezeEvent:"Descongelar este evento, para volver a editarlo",sealedChip:"Congelado",deleteFrozen:"Congelado: descongélalo para quitarlo",frozenNote:"Este evento está congelado: nada se edita en él, para que una entrevista o una hipótesis que se apoye en él no quede invalidada. Clónalo para continuar, o descongélalo.",thawButton:"Descongelar",deleteReadingQuestion:"¿Eliminar esta lectura? Nada se escribe hasta guardar el caso.",deleteObservationQuestion:"¿Eliminar esta observación del caso? Nada se escribe hasta guardar el caso.",deleteRefused:"Esta observación es leída por {n} lectura(s): elimínelas primero.",titleField:"Título de la lectura",authorField:"Autor",investigatorField:"Investigador",addTitle:"Añadir un evento",kindField:"Tipo",kindObservation:"Observación",kindInterview:"Entrevista",witnessField:"Testigo",mediumField:"Medio",interviewerField:"Entrevistador",plainTitleField:"Título",sourceField:"Origen",sourceBlank:"Una grabación en blanco",sourceFile:"Un registro existente",observerField:"Testigo",fileField:"Archivo",loadFailed:"No se pudo leer esa grabación.",isACase:"Eso es un caso, no una grabación.",ok:"Aceptar",cancel:"Cancelar",caseHeading:"Caso",caseId:"Identificador",idDuplicated:"Dos eventos del caso tienen el identificador «{id}»: una lectura que lo designa es ambigua.",readingUnresolved:"Una lectura designa «{id}», que ningún evento del caso tiene como identificador, ni ninguna grabación que enumera.",caseTitle:"Título",caseTime:"Fecha",eventsTab:"Eventos",fileTab:"Archivo",importFile:"Cargar un archivo de caso",inputFileFromFile:"desde su disco",inputFileFromUrl:"desde una dirección",inputFileModeHint:"Pulsar para darlo de la otra forma: un archivo suyo o una dirección",inputFileLoad:"Cargar",fileNotACase:"Ese archivo no es un caso (no tiene eventos).",formatVersionError:"Este archivo indica la versión {found} de su formato; este UFO@home lee hasta la versión {supported}. Ábralo con un UFO@home más reciente.",fileInvalid:"Este texto aún no es JSON válido, o no es un caso: el caso conserva lo último que entendió.",fileLoading:"Cargando el editor…",add:"Añadir",addHint:"Añadir un evento",interpretationOf:"Lectura de",colon:": ",quoted:"«{text}»",interpretationOfNone:"—",groupReadings:"Agrupar las lecturas por observación",resizeColumns:"Cambiar el ancho de la columna del historial (doble clic: ancho por defecto)",foldColumn:"Plegar la columna del caso",unfoldColumn:"Desplegar la columna del caso",alsoAbout:"También trata de",foldReadings:"Plegar sus lecturas",unfoldReadings:"Desplegar sus lecturas",exportButton:"Guardar",readButton:"Leer",readTitle:"Leer lo que se edita, tal como lo ve un lector",exportTitle:"Guardar el caso",exportAlso:"Guardar también las observaciones",saveOptions:"Opciones de guardado",addToCase:"Añadir a un caso",unsavedChanges:"Cambios sin guardar",discardQuestion:"Hay cambios que aún no se han guardado. ¿Cargar de todos modos y perderlos?",discardTitle:"Cambios sin guardar",discardOk:"Cargar de todos modos",leaveQuestion:"Hay cambios que aún no se han guardado. ¿Salir de todos modos y perderlos?",leaveOk:"Salir de todos modos"};export{e as caseEditorMessages_es};
1
+ const e={event:"Evento",accountOf:"Observación de",passagesHeading:"Relatado en",interviewOf:"Entrevista a",untitledInterview:"Entrevista {n}",deleteInterviewQuestion:"¿Eliminar esta entrevista del caso? Nada se escribe hasta guardar el caso.",untitledReading:"Lectura {n}",eventsInTime:"Eventos · en orden cronológico",citedMoment:"Momento {k}, citado en {title}: «{quote}»",backToInterview:"Volver a la entrevista",openEvent:"Abrir",kindObservations:"Observaciones",kindReadings:"Lecturas",kindInterviews:"Entrevistas",linkAnd:"y",byAuthor:"por",kindReading:"Lectura",readingsCount:"{n} lectura(s)",readingVerdict:{incompatible:"Contradice lo establecido",unsettled:"Sin resolver",compatible:"Compatible"},findingOutcome:{holds:"Se sostiene",fails:"Falla",untested:"No se pudo probar"},findingAgainst:{established:"contra un elemento establecido",supposed:"contra una suposición"},untitledObservation:"Observación {n}",deleteRecording:"Quitar esta grabación del caso",cloneEvent:"Clonar este evento: el clon es lo que continúas",freezeEvent:"Congelar este evento, para que lo que se apoya en él siga siendo cierto",unfreezeEvent:"Descongelar este evento, para volver a editarlo",sealedChip:"Congelado",deleteFrozen:"Congelado: descongélalo para quitarlo",frozenNote:"Este evento está congelado: nada se edita en él, para que una entrevista o una hipótesis que se apoye en él no quede invalidada. Clónalo para continuar, o descongélalo.",thawButton:"Descongelar",deleteReadingQuestion:"¿Eliminar esta lectura? Nada se escribe hasta guardar el caso.",deleteObservationQuestion:"¿Eliminar esta observación del caso? Nada se escribe hasta guardar el caso.",deleteRefused:"Esta observación es leída por {n} lectura(s): elimínelas primero.",titleField:"Título de la lectura",authorField:"Autor",investigatorField:"Investigador",addTitle:"Añadir un evento",kindField:"Tipo",kindObservation:"Observación",kindInterview:"Entrevista",witnessField:"Testigo",mediumField:"Medio",interviewerField:"Entrevistador",plainTitleField:"Título",sourceField:"Origen",sourceBlank:"Una grabación en blanco",sourceFile:"Un registro existente",observerField:"Testigo",fileField:"Archivo",loadFailed:"No se pudo leer esa grabación.",isACase:"Eso es un caso, no una grabación.",ok:"Aceptar",cancel:"Cancelar",caseHeading:"Caso",caseId:"Identificador",idDuplicated:"Dos eventos del caso tienen el identificador «{id}»: una lectura que lo designa es ambigua.",readingUnresolved:"Una lectura designa «{id}», que ningún evento del caso tiene como identificador, ni ninguna grabación que enumera.",caseTitle:"Título",caseTime:"Fecha",eventsTab:"Eventos",fileTab:"Archivo",importFile:"Cargar un archivo de caso",inputFileFromFile:"desde su disco",inputFileFromUrl:"desde una dirección",inputFileModeHint:"Pulsar para darlo de la otra forma: un archivo suyo o una dirección",inputFileLoad:"Cargar",fileNotACase:"Ese archivo no es un caso (no tiene eventos).",formatVersionError:"Este archivo indica la versión {found} de su formato; este UFO@home lee hasta la versión {supported}. Ábralo con un UFO@home más reciente.",fileInvalid:"Este texto aún no es JSON válido, o no es un caso: el caso conserva lo último que entendió.",fileLoading:"Cargando el editor…",add:"Añadir",addHint:"Añadir un evento",interpretationOf:"Lectura de",colon:": ",quoted:"«{text}»",interpretationOfNone:"—",groupReadings:"Agrupar las lecturas por observación",resizeColumns:"Cambiar el ancho de la columna del historial (doble clic: ancho por defecto)",alsoAbout:"También trata de",foldReadings:"Plegar sus lecturas",unfoldReadings:"Desplegar sus lecturas",exportButton:"Guardar",readButton:"Leer",readTitle:"Leer lo que se edita, tal como lo ve un lector",exportTitle:"Guardar el caso",exportAlso:"Guardar también las observaciones",saveOptions:"Opciones de guardado",addToCase:"Añadir a un caso",unsavedChanges:"Cambios sin guardar",discardQuestion:"Hay cambios que aún no se han guardado. ¿Cargar de todos modos y perderlos?",discardTitle:"Cambios sin guardar",discardOk:"Cargar de todos modos",leaveQuestion:"Hay cambios que aún no se han guardado. ¿Salir de todos modos y perderlos?",leaveOk:"Salir de todos modos"};export{e as caseEditorMessages_es};
@@ -1 +1 @@
1
- const e={event:"Événement",accountOf:"Observation de",passagesHeading:"Relaté dans",interviewOf:"Interview de",untitledInterview:"Interview {n}",deleteInterviewQuestion:"Supprimer cet entretien du dossier ? Rien n'est écrit avant la sauvegarde du dossier.",untitledReading:"Lecture {n}",eventsInTime:"Événements · dans l'ordre du temps",citedMoment:"Moment {k}, cité dans {title} : « {quote} »",backToInterview:"Revenir à l'entretien",openEvent:"Ouvrir",kindObservations:"Observations",kindReadings:"Lectures",kindInterviews:"Interviews",linkAnd:"et",byAuthor:"par",kindReading:"Lecture",readingsCount:"{n} lecture(s)",readingVerdict:{incompatible:"Contredit ce qui est établi",unsettled:"Non tranchée",compatible:"Compatible"},findingOutcome:{holds:"Tient",fails:"Échoue",untested:"Non testable"},findingAgainst:{established:"contre un élément établi",supposed:"contre une supposition"},untitledObservation:"Observation {n}",deleteRecording:"Retirer cet enregistrement du dossier",cloneEvent:"Cloner cet événement : c'est le clone que vous continuez",freezeEvent:"Geler cet événement, pour que ce qui s'appuie dessus reste vrai",unfreezeEvent:"Dégeler cet événement, pour le modifier à nouveau",sealedChip:"Gelé",deleteFrozen:"Gelé : le dégeler pour le retirer",frozenNote:"Cet événement est gelé : rien ne s'y modifie, afin qu'une interview ou une hypothèse qui s'appuie dessus ne soit pas invalidée. Clonez-le pour continuer, ou dégelez-le.",thawButton:"Dégeler",deleteReadingQuestion:"Supprimer cette lecture ? Rien n'est écrit avant la sauvegarde du dossier.",deleteObservationQuestion:"Supprimer cette observation du dossier ? Rien n'est écrit avant la sauvegarde du dossier.",deleteRefused:"Cette observation est lue par {n} lecture(s) : supprimez-les d'abord.",titleField:"Titre de la lecture",authorField:"Auteur",investigatorField:"Enquêteur",addTitle:"Ajouter un événement",kindField:"Type",kindObservation:"Observation",kindInterview:"Interview",witnessField:"Témoin",mediumField:"Moyen",interviewerField:"Enquêteur",plainTitleField:"Titre",sourceField:"Source",sourceBlank:"Un enregistrement vierge",sourceFile:"Un enregistrement existant",observerField:"Témoin",fileField:"Fichier",loadFailed:"Cet enregistrement n'a pas pu être lu.",isACase:"C'est un dossier, pas un enregistrement.",ok:"OK",cancel:"Annuler",caseHeading:"Dossier",caseId:"Identifiant",idDuplicated:"Deux événements du dossier portent l'identifiant « {id} » : une lecture qui le désigne est ambiguë.",readingUnresolved:"Une lecture désigne « {id} », qu'aucun événement du dossier ne porte comme identifiant, ni aucun enregistrement qu'il liste.",caseTitle:"Titre",caseTime:"Date",eventsTab:"Événements",fileTab:"Fichier",importFile:"Charger un fichier de dossier",inputFileFromFile:"depuis votre disque",inputFileFromUrl:"depuis une adresse",inputFileModeHint:"Cliquer pour le donner autrement : un fichier à vous, ou une adresse",inputFileLoad:"Charger",fileNotACase:"Ce fichier n'est pas un dossier (il n'a pas d'événements).",formatVersionError:"Ce fichier indique la version {found} de son format ; cet UFO@home lit jusqu'à la version {supported}. Ouvrez-le avec un UFO@home plus récent.",fileInvalid:"Ce texte n'est pas encore du JSON valide, ou pas un dossier : le dossier garde ce qu'il a compris en dernier.",fileLoading:"Chargement de l'éditeur…",add:"Ajouter",addHint:"Ajouter un événement",interpretationOf:"Lecture de",colon:" : ",quoted:"« {text} »",interpretationOfNone:"—",groupReadings:"Regrouper les lectures par observation",resizeColumns:"Redimensionner la colonne de l'historique (double-clic : largeur par défaut)",foldColumn:"Replier la colonne du dossier",unfoldColumn:"Déplier la colonne du dossier",alsoAbout:"Porte aussi sur",foldReadings:"Replier ses lectures",unfoldReadings:"Déplier ses lectures",exportButton:"Sauver",readButton:"Lire",readTitle:"Lire ce qui est édité, tel qu'un lecteur le voit",exportTitle:"Sauver le dossier",exportAlso:"Sauver aussi les observations",saveOptions:"Options de sauvegarde",addToCase:"Ajouter à un dossier",unsavedChanges:"Modifications non sauvées",discardQuestion:"Des modifications ne sont pas encore sauvées. Charger quand même et les perdre ?",discardTitle:"Modifications non sauvées",discardOk:"Charger quand même",leaveQuestion:"Des modifications ne sont pas encore sauvées. Quitter quand même et les perdre ?",leaveOk:"Quitter quand même"};export{e as caseEditorMessages_fr};
1
+ const e={event:"Événement",accountOf:"Observation de",passagesHeading:"Relaté dans",interviewOf:"Interview de",untitledInterview:"Interview {n}",deleteInterviewQuestion:"Supprimer cet entretien du dossier ? Rien n'est écrit avant la sauvegarde du dossier.",untitledReading:"Lecture {n}",eventsInTime:"Événements · dans l'ordre du temps",citedMoment:"Moment {k}, cité dans {title} : « {quote} »",backToInterview:"Revenir à l'entretien",openEvent:"Ouvrir",kindObservations:"Observations",kindReadings:"Lectures",kindInterviews:"Interviews",linkAnd:"et",byAuthor:"par",kindReading:"Lecture",readingsCount:"{n} lecture(s)",readingVerdict:{incompatible:"Contredit ce qui est établi",unsettled:"Non tranchée",compatible:"Compatible"},findingOutcome:{holds:"Tient",fails:"Échoue",untested:"Non testable"},findingAgainst:{established:"contre un élément établi",supposed:"contre une supposition"},untitledObservation:"Observation {n}",deleteRecording:"Retirer cet enregistrement du dossier",cloneEvent:"Cloner cet événement : c'est le clone que vous continuez",freezeEvent:"Geler cet événement, pour que ce qui s'appuie dessus reste vrai",unfreezeEvent:"Dégeler cet événement, pour le modifier à nouveau",sealedChip:"Gelé",deleteFrozen:"Gelé : le dégeler pour le retirer",frozenNote:"Cet événement est gelé : rien ne s'y modifie, afin qu'une interview ou une hypothèse qui s'appuie dessus ne soit pas invalidée. Clonez-le pour continuer, ou dégelez-le.",thawButton:"Dégeler",deleteReadingQuestion:"Supprimer cette lecture ? Rien n'est écrit avant la sauvegarde du dossier.",deleteObservationQuestion:"Supprimer cette observation du dossier ? Rien n'est écrit avant la sauvegarde du dossier.",deleteRefused:"Cette observation est lue par {n} lecture(s) : supprimez-les d'abord.",titleField:"Titre de la lecture",authorField:"Auteur",investigatorField:"Enquêteur",addTitle:"Ajouter un événement",kindField:"Type",kindObservation:"Observation",kindInterview:"Interview",witnessField:"Témoin",mediumField:"Moyen",interviewerField:"Enquêteur",plainTitleField:"Titre",sourceField:"Source",sourceBlank:"Un enregistrement vierge",sourceFile:"Un enregistrement existant",observerField:"Témoin",fileField:"Fichier",loadFailed:"Cet enregistrement n'a pas pu être lu.",isACase:"C'est un dossier, pas un enregistrement.",ok:"OK",cancel:"Annuler",caseHeading:"Dossier",caseId:"Identifiant",idDuplicated:"Deux événements du dossier portent l'identifiant « {id} » : une lecture qui le désigne est ambiguë.",readingUnresolved:"Une lecture désigne « {id} », qu'aucun événement du dossier ne porte comme identifiant, ni aucun enregistrement qu'il liste.",caseTitle:"Titre",caseTime:"Date",eventsTab:"Événements",fileTab:"Fichier",importFile:"Charger un fichier de dossier",inputFileFromFile:"depuis votre disque",inputFileFromUrl:"depuis une adresse",inputFileModeHint:"Cliquer pour le donner autrement : un fichier à vous, ou une adresse",inputFileLoad:"Charger",fileNotACase:"Ce fichier n'est pas un dossier (il n'a pas d'événements).",formatVersionError:"Ce fichier indique la version {found} de son format ; cet UFO@home lit jusqu'à la version {supported}. Ouvrez-le avec un UFO@home plus récent.",fileInvalid:"Ce texte n'est pas encore du JSON valide, ou pas un dossier : le dossier garde ce qu'il a compris en dernier.",fileLoading:"Chargement de l'éditeur…",add:"Ajouter",addHint:"Ajouter un événement",interpretationOf:"Lecture de",colon:" : ",quoted:"« {text} »",interpretationOfNone:"—",groupReadings:"Regrouper les lectures par observation",resizeColumns:"Redimensionner la colonne de l'historique (double-clic : largeur par défaut)",alsoAbout:"Porte aussi sur",foldReadings:"Replier ses lectures",unfoldReadings:"Déplier ses lectures",exportButton:"Sauver",readButton:"Lire",readTitle:"Lire ce qui est édité, tel qu'un lecteur le voit",exportTitle:"Sauver le dossier",exportAlso:"Sauver aussi les observations",saveOptions:"Options de sauvegarde",addToCase:"Ajouter à un dossier",unsavedChanges:"Modifications non sauvées",discardQuestion:"Des modifications ne sont pas encore sauvées. Charger quand même et les perdre ?",discardTitle:"Modifications non sauvées",discardOk:"Charger quand même",leaveQuestion:"Des modifications ne sont pas encore sauvées. Quitter quand même et les perdre ?",leaveOk:"Quitter quand même"};export{e as caseEditorMessages_fr};
@@ -1 +1 @@
1
- const e={event:"Evento",accountOf:"Osservazione di",passagesHeading:"Riportato in",interviewOf:"Intervista a",untitledInterview:"Intervista {n}",deleteInterviewQuestion:"Eliminare questa intervista dal caso? Nulla viene scritto prima del salvataggio del caso.",untitledReading:"Lettura {n}",eventsInTime:"Eventi · in ordine di tempo",citedMoment:"Momento {k}, citato in {title}: «{quote}»",backToInterview:"Torna all'intervista",openEvent:"Apri",kindObservations:"Osservazioni",kindReadings:"Letture",kindInterviews:"Interviste",linkAnd:"e",byAuthor:"di",kindReading:"Lettura",readingsCount:"{n} lettura/e",readingVerdict:{incompatible:"Contraddice ciò che è accertato",unsettled:"Non decisa",compatible:"Compatibile"},findingOutcome:{holds:"Regge",fails:"Fallisce",untested:"Non verificabile"},findingAgainst:{established:"contro un elemento accertato",supposed:"contro una supposizione"},untitledObservation:"Osservazione {n}",deleteRecording:"Togliere questa registrazione dal caso",cloneEvent:"Clonare questo evento: è il clone che continui",freezeEvent:"Congelare questo evento, perché ciò che si basa su di esso resti vero",unfreezeEvent:"Scongelare questo evento, per modificarlo di nuovo",sealedChip:"Congelato",deleteFrozen:"Congelato: scongelalo per toglierlo",frozenNote:"Questo evento è congelato: nulla vi si modifica, perché un'intervista o un'ipotesi che si basa su di esso non sia invalidata. Clonalo per continuare, o scongelalo.",thawButton:"Scongelare",deleteReadingQuestion:"Eliminare questa lettura? Nulla viene scritto prima del salvataggio del caso.",deleteObservationQuestion:"Eliminare questa osservazione dal caso? Nulla viene scritto prima del salvataggio del caso.",deleteRefused:"Questa osservazione è letta da {n} lettura/e: eliminale prima.",titleField:"Titolo della lettura",authorField:"Autore",investigatorField:"Investigatore",addTitle:"Aggiungi un evento",kindField:"Tipo",kindObservation:"Osservazione",kindInterview:"Intervista",witnessField:"Testimone",mediumField:"Mezzo",interviewerField:"Intervistatore",plainTitleField:"Titolo",sourceField:"Origine",sourceBlank:"Una registrazione vuota",sourceFile:"Una registrazione esistente",observerField:"Testimone",fileField:"File",loadFailed:"Impossibile leggere quella registrazione.",isACase:"Questo è un caso, non una registrazione.",ok:"OK",cancel:"Annulla",caseHeading:"Caso",caseId:"Identificativo",idDuplicated:"Due eventi del caso hanno l'identificativo «{id}»: una lettura che lo designa è ambigua.",readingUnresolved:"Una lettura designa «{id}», che nessun evento del caso ha come identificativo, né alcuna registrazione che elenca.",caseTitle:"Titolo",caseTime:"Data",eventsTab:"Eventi",fileTab:"File",importFile:"Carica un file di caso",inputFileFromFile:"dal proprio disco",inputFileFromUrl:"da un indirizzo",inputFileModeHint:"Fare clic per darlo nell'altro modo: un proprio file o un indirizzo",inputFileLoad:"Carica",fileNotACase:"Quel file non è un caso (non ha eventi).",formatVersionError:"Questo file indica la versione {found} del suo formato; questo UFO@home legge fino alla versione {supported}. Lo apra con un UFO@home più recente.",fileInvalid:"Questo testo non è ancora JSON valido, o non è un caso: il caso conserva l'ultimo che ha capito.",fileLoading:"Caricamento dell'editor…",add:"Aggiungi",addHint:"Aggiungi un evento",interpretationOf:"Lettura di",colon:": ",quoted:"«{text}»",interpretationOfNone:"—",groupReadings:"Raggruppa le letture per osservazione",resizeColumns:"Ridimensiona la colonna della cronologia (doppio clic: larghezza predefinita)",foldColumn:"Ripiega la colonna del caso",unfoldColumn:"Apri la colonna del caso",alsoAbout:"Riguarda anche",foldReadings:"Chiudi le sue letture",unfoldReadings:"Apri le sue letture",exportButton:"Salva",readButton:"Leggi",readTitle:"Leggere ciò che si modifica, come lo vede un lettore",exportTitle:"Salva il caso",exportAlso:"Salva anche le osservazioni",saveOptions:"Opzioni di salvataggio",addToCase:"Aggiungi a un caso",unsavedChanges:"Modifiche non salvate",discardQuestion:"Alcune modifiche non sono ancora state salvate. Caricare comunque e perderle?",discardTitle:"Modifiche non salvate",discardOk:"Carica comunque",leaveQuestion:"Alcune modifiche non sono ancora state salvate. Uscire comunque e perderle?",leaveOk:"Esci comunque"};export{e as caseEditorMessages_it};
1
+ const e={event:"Evento",accountOf:"Osservazione di",passagesHeading:"Riportato in",interviewOf:"Intervista a",untitledInterview:"Intervista {n}",deleteInterviewQuestion:"Eliminare questa intervista dal caso? Nulla viene scritto prima del salvataggio del caso.",untitledReading:"Lettura {n}",eventsInTime:"Eventi · in ordine di tempo",citedMoment:"Momento {k}, citato in {title}: «{quote}»",backToInterview:"Torna all'intervista",openEvent:"Apri",kindObservations:"Osservazioni",kindReadings:"Letture",kindInterviews:"Interviste",linkAnd:"e",byAuthor:"di",kindReading:"Lettura",readingsCount:"{n} lettura/e",readingVerdict:{incompatible:"Contraddice ciò che è accertato",unsettled:"Non decisa",compatible:"Compatibile"},findingOutcome:{holds:"Regge",fails:"Fallisce",untested:"Non verificabile"},findingAgainst:{established:"contro un elemento accertato",supposed:"contro una supposizione"},untitledObservation:"Osservazione {n}",deleteRecording:"Togliere questa registrazione dal caso",cloneEvent:"Clonare questo evento: è il clone che continui",freezeEvent:"Congelare questo evento, perché ciò che si basa su di esso resti vero",unfreezeEvent:"Scongelare questo evento, per modificarlo di nuovo",sealedChip:"Congelato",deleteFrozen:"Congelato: scongelalo per toglierlo",frozenNote:"Questo evento è congelato: nulla vi si modifica, perché un'intervista o un'ipotesi che si basa su di esso non sia invalidata. Clonalo per continuare, o scongelalo.",thawButton:"Scongelare",deleteReadingQuestion:"Eliminare questa lettura? Nulla viene scritto prima del salvataggio del caso.",deleteObservationQuestion:"Eliminare questa osservazione dal caso? Nulla viene scritto prima del salvataggio del caso.",deleteRefused:"Questa osservazione è letta da {n} lettura/e: eliminale prima.",titleField:"Titolo della lettura",authorField:"Autore",investigatorField:"Investigatore",addTitle:"Aggiungi un evento",kindField:"Tipo",kindObservation:"Osservazione",kindInterview:"Intervista",witnessField:"Testimone",mediumField:"Mezzo",interviewerField:"Intervistatore",plainTitleField:"Titolo",sourceField:"Origine",sourceBlank:"Una registrazione vuota",sourceFile:"Una registrazione esistente",observerField:"Testimone",fileField:"File",loadFailed:"Impossibile leggere quella registrazione.",isACase:"Questo è un caso, non una registrazione.",ok:"OK",cancel:"Annulla",caseHeading:"Caso",caseId:"Identificativo",idDuplicated:"Due eventi del caso hanno l'identificativo «{id}»: una lettura che lo designa è ambigua.",readingUnresolved:"Una lettura designa «{id}», che nessun evento del caso ha come identificativo, né alcuna registrazione che elenca.",caseTitle:"Titolo",caseTime:"Data",eventsTab:"Eventi",fileTab:"File",importFile:"Carica un file di caso",inputFileFromFile:"dal proprio disco",inputFileFromUrl:"da un indirizzo",inputFileModeHint:"Fare clic per darlo nell'altro modo: un proprio file o un indirizzo",inputFileLoad:"Carica",fileNotACase:"Quel file non è un caso (non ha eventi).",formatVersionError:"Questo file indica la versione {found} del suo formato; questo UFO@home legge fino alla versione {supported}. Lo apra con un UFO@home più recente.",fileInvalid:"Questo testo non è ancora JSON valido, o non è un caso: il caso conserva l'ultimo che ha capito.",fileLoading:"Caricamento dell'editor…",add:"Aggiungi",addHint:"Aggiungi un evento",interpretationOf:"Lettura di",colon:": ",quoted:"«{text}»",interpretationOfNone:"—",groupReadings:"Raggruppa le letture per osservazione",resizeColumns:"Ridimensiona la colonna della cronologia (doppio clic: larghezza predefinita)",alsoAbout:"Riguarda anche",foldReadings:"Chiudi le sue letture",unfoldReadings:"Apri le sue letture",exportButton:"Salva",readButton:"Leggi",readTitle:"Leggere ciò che si modifica, come lo vede un lettore",exportTitle:"Salva il caso",exportAlso:"Salva anche le osservazioni",saveOptions:"Opzioni di salvataggio",addToCase:"Aggiungi a un caso",unsavedChanges:"Modifiche non salvate",discardQuestion:"Alcune modifiche non sono ancora state salvate. Caricare comunque e perderle?",discardTitle:"Modifiche non salvate",discardOk:"Carica comunque",leaveQuestion:"Alcune modifiche non sono ancora state salvate. Uscire comunque e perderle?",leaveOk:"Esci comunque"};export{e as caseEditorMessages_it};
@@ -0,0 +1,121 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./InterviewElement-fI19BieO.js","./SaidPosition-CXZLm-ck.js","./rr0-ufoathome.mjs","./ColumnResize-CMfGWQHi.js","./ShareDialogElement-DHlxoHWP.js","./Sighting-Ch4eiBNK.js","./VisualAids-DI-hEL46.js","./Decor-Dn-cvniW.js","./RecordingIssue-BlWT8Xsu.js","./Obstacles-v9SkfBD7.js","./interviewJson-D-i14LTf.js"])))=>i.map(i=>d[i]);
2
+ import{S as E,O as I,R as M,E as _,s as L,U as $,H,l as U,C as k,_ as j}from"./rr0-ufoathome.mjs";import{C as f,a as p,R as P,b as V,I as z}from"./ColumnResize-CMfGWQHi.js";import{S,I as q}from"./SaidPosition-CXZLm-ck.js";import{T as B,S as G,P as D,A as K}from"./ShareDialogElement-DHlxoHWP.js";import{SHOW_INFO_ATTRIBUTE as A,OBSERVER_ATTRIBUTE as m,registerSighting as F,HIDE_PICKERS_ATTRIBUTE as C,SIGHTING_ELEMENT_NAME as c,INTERPRETATION_ATTRIBUTE as b,CASE_NAMED_ATTRIBUTE as W,OBSERVER_CHANGE_EVENT as O,INTERPRETATION_CHANGE_EVENT as Y}from"./SightingElement-COJwKNNg.js";import"./Sighting-Ch4eiBNK.js";import"./VisualAids-DI-hEL46.js";import"./Decor-Dn-cvniW.js";import"./RecordingIssue-BlWT8Xsu.js";import"./Obstacles-v9SkfBD7.js";const Z=`
3
+ <header class="case-head">
4
+ <div class="case-bar">
5
+ <p id="case-kind" class="case-kind"></p>
6
+ <h2 id="case-title" class="case-title"></h2>
7
+ <!-- The same pair the observation carries, for the case: the way into the editor, and what the case says of itself. -->
8
+ <!-- The same three in the same order as an observation carries (see sightingTemplate): the way into the editor, this element's own
9
+ toggle, and what it says of itself. A reader moving between a case and an observation finds the buttons where they were. -->
10
+ <span class="case-actions">
11
+ <!-- Sharing the case: its address and the element that shows it whole (an observation of it is shared from its own player). -->
12
+ <button id="share" type="button" class="icon-btn" aria-haspopup="dialog"></button>
13
+ <rr0-case-export id="export" class="case-export"></rr0-case-export>
14
+ <button id="edit" type="button" class="icon-btn"><svg viewBox="0 0 16 16" width="14" height="14" aria-hidden="true"><path d="M11.3 1.3a1 1 0 0 1 1.4 0l2 2a1 1 0 0 1 0 1.4l-8.5 8.5-3.4.9.9-3.4 8.6-8.4Zm-7 9.2-.5 1.7 1.7-.5 6.9-6.9-1.2-1.2-6.9 6.9Z" fill="currentColor"/></svg></button>
15
+ <button id="timeline-button" type="button" class="icon-btn" aria-pressed="true"><svg viewBox="0 0 16 16" width="14" height="14" aria-hidden="true" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round"><circle cx="8" cy="8" r="6"/><path d="M8 4.6V8l2.4 1.6"/></svg></button>
16
+ <button id="info" type="button" class="icon-btn" aria-expanded="false"><svg viewBox="0 0 16 16" width="14" height="14" aria-hidden="true"><circle cx="8" cy="3.6" r="1.4" fill="currentColor"/><path d="M6 6.5h3v6h1.5V14h-4.5v-1.5H7.5V8H6Z" fill="currentColor"/></svg></button>
17
+ </span>
18
+ </div>
19
+ <p id="case-summary" class="case-summary" hidden></p>
20
+ <rr0-share-dialog id="share-dialog"></rr0-share-dialog>
21
+ </header>
22
+ <!-- The chronology and what is open, one above the other; side by side when the case is given the width for both (see .case-layout). -->
23
+ <div class="case-layout">
24
+ <!-- The chronology, in the upper part: choosing an event opens it alone below; its mark on the rail shows it beside what is open, or puts
25
+ it away. Several can be open at once that way. -->
26
+ <section class="case-timeline">
27
+ <div class="events-bar">
28
+ <h3 class="events-heading"><span id="events-icon" class="events-icon" aria-hidden="true"></span><span id="events-heading"></span></h3>
29
+ <!-- Each reading under the observation it reads, or every event in the order of time: the reader's choice, remembered. -->
30
+ <button id="group-readings" type="button" class="icon-btn" aria-pressed="false"><svg viewBox="0 0 16 16" width="14" height="14" aria-hidden="true" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round"><circle cx="4" cy="3.5" r="1.6"/><path d="M4 5.1v7.4M4 8.5h3.5M4 12.5h3.5"/><path d="M9.5 8.5h4M9.5 12.5h4"/></svg></button>
31
+ </div>
32
+ <ol id="case-events" class="event-list"></ol>
33
+ <rr0-readings-comparison id="readings-comparison" class="readings-comparison"></rr0-readings-comparison>
34
+ </section>
35
+ <!-- The grip between the two, on the history's edge: its width, dragged. -->
36
+ <div id="column-resize" class="column-resize"></div>
37
+ <!-- What is open, in the order of time whatever the order they were opened in. -->
38
+ <div id="open-events" class="open-events"></div>
39
+ </div>
40
+ `,J=`
41
+ :host { display: block; color: var(--rr0-ink, inherit); container-type: inline-size; }
42
+ /* The buttons' own colours, light and dark, the very ones an observation's popups are drawn with (see sightingTemplate's --pop-*): a page
43
+ that gives its own (--rr0-button-bg, -fg, -border, -hover, -on, -ring, inherited from anywhere, :root included) has them win. */
44
+ :host { --btn-bg: #f2f2f2; --btn-fg: #222; --btn-border: #ccc; --btn-hover: #e4e4e4; --btn-on: #dbe6f7; --btn-ring: #9bb6e0; }
45
+ @media (prefers-color-scheme: dark) {
46
+ :host { --btn-bg: #2c2e33; --btn-fg: #e6e6e6; --btn-border: #4a4c52; --btn-hover: #3a3d43; --btn-on: #274066; --btn-ring: #4f7bc4; }
47
+ }
48
+ .case-head { display: grid; gap: 6px; margin: 0 0 12px; }
49
+ .case-bar { display: flex; align-items: baseline; gap: 10px; }
50
+ .case-kind { margin: 0; font: 600 12px/1.4 var(--rr0-sans, system-ui, sans-serif); letter-spacing: .08em; text-transform: uppercase; opacity: .7; }
51
+ .case-title { margin: 0; font: 600 24px/1.25 var(--rr0-serif, Georgia, serif); }
52
+ .case-actions { display: flex; gap: 4px; margin-left: auto; }
53
+ /* The very square the observation's own row wears (see sightingTemplate's .edit-link and .info-btn): same size, same border, same
54
+ background, so that the two rows are one set of buttons seen in two places. */
55
+ .icon-btn {
56
+ flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; width: 1.8em; height: 1.8em; box-sizing: border-box;
57
+ padding: 0; border: 1px solid var(--rr0-button-border, var(--btn-border)); border-radius: 3px; background: var(--rr0-button-bg, var(--btn-bg));
58
+ color: var(--rr0-button-fg, var(--btn-fg)); cursor: pointer;
59
+ }
60
+ .icon-btn:hover, .icon-btn:focus-visible { background: var(--rr0-button-hover, var(--btn-hover)); }
61
+ /* The report's export wears the same square, its button being its own (see CaseExportElement). */
62
+ .case-export { display: inline-flex; }
63
+ .case-export::part(button) {
64
+ display: inline-flex; align-items: center; justify-content: center; width: 1.8em; height: 1.8em; box-sizing: border-box;
65
+ padding: 0; border: 1px solid var(--rr0-button-border, var(--btn-border)); border-radius: 3px; background: var(--rr0-button-bg, var(--btn-bg));
66
+ color: var(--rr0-button-fg, var(--btn-fg));
67
+ }
68
+ .case-export::part(button):hover { background: var(--rr0-button-hover, var(--btn-hover)); }
69
+ .icon-btn[aria-expanded="true"], .icon-btn[aria-pressed="false"] { background: var(--rr0-button-on, var(--btn-on)); }
70
+ .case-summary { margin: 0; font-size: 15px; line-height: 1.5; opacity: .85; }
71
+ .case-summary[hidden] { display: none; }
72
+ /* The chronology itself is common to the editor (see CaseTimeline): what cannot be done while reading is absent, not greyed out. */
73
+ .case-timeline { margin: 0 0 14px; }
74
+ .case-timeline[hidden] { display: none; }
75
+ .readings-comparison { margin-top: 12px; }
76
+ .events-bar { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; }
77
+ .events-bar .icon-btn { margin-left: auto; }
78
+ /* Lit when grouping, as a switch is: not the history's own button, which is lit when the history is put away. */
79
+ #group-readings[aria-pressed="false"] { background: var(--rr0-button-bg, var(--btn-bg)); }
80
+ #group-readings:is(:hover, :focus-visible) { background: var(--rr0-button-hover, var(--btn-hover)); }
81
+ #group-readings[aria-pressed="true"] { background: var(--rr0-button-on, var(--btn-on)); }
82
+ #group-readings[hidden], #share[hidden] { display: none; }
83
+ .events-heading { display: flex; align-items: center; gap: 6px; margin: 0; font: 600 12px/1.4 var(--rr0-sans, system-ui, sans-serif); letter-spacing: .08em; text-transform: uppercase; opacity: .7; }
84
+ .events-icon { display: inline-flex; }
85
+ .events-icon svg { width: 14px; height: 14px; }
86
+ /* What is open: one block per event, each saying which it is, in the order of time. */
87
+ /* One column as wide as the case, never as wide as what is in it: an implicit "auto" column grew to the player's own widest content,
88
+ McMinnville's longest reading in its choice (228 letters), and the stage, 16:9 of that, put the photograph beyond the case's edge. */
89
+ .open-events { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
90
+ /* Given the width (the app on a computer), the chronology in a column of its own beside what is open, kept in view as that scrolls; the
91
+ whole width to what is open when the chronology is put away. The width the case is given, never the window's. */
92
+ @container (min-width: 760px) {
93
+ .case-layout { display: grid; grid-template-columns: var(${f.PROPERTY}, minmax(16rem, 1fr)) minmax(0, 2.6fr); gap: 20px; align-items: start; }
94
+ .case-layout > .case-timeline { grid-column: 1; grid-row: 1; }
95
+ .case-layout > .open-events { grid-column: 2; grid-row: 1; }
96
+ .case-layout > .column-resize { display: block; grid-column: 1; grid-row: 1; margin-right: -16px; }
97
+ .case-layout:has(> .case-timeline[hidden]) { grid-template-columns: minmax(0, 1fr); }
98
+ .case-layout:has(> .case-timeline[hidden]) > :is(.open-events, .column-resize) { grid-column: 1; }
99
+ .case-layout:has(> .case-timeline[hidden]) > .column-resize { display: none; }
100
+ /* Narrower than its cards, the history is its events' marks alone (see CaseTimeline.CSS). */
101
+ .case-layout > .case-timeline { container: case-history / inline-size; }
102
+ .case-layout > .case-timeline { position: sticky; top: 0; max-height: 100dvh; overflow-y: auto; margin: 0; }
103
+ /* A column that scrolls clips what passes its edge: the marks on the rail stand half outside the list, so the list is set in by as much
104
+ as they and their ring stick out (as narrowed below, and in the case editor). */
105
+ .case-layout > .case-timeline > .event-list { padding-left: 30px; }
106
+ /* A dialogue open alone beside the chronology has the height the chronology has (dicté : « toute la hauteur »), not the 22 lines kept
107
+ under a player when they are one above the other; kept in view as the page scrolls, as the chronology is. */
108
+ .case-layout > .open-events:has(> .open-event:only-child rr0-interview) { position: sticky; top: 0; }
109
+ .open-event:only-child rr0-interview { max-height: calc(var(--rr0-editor-height, 100dvh) - 3rem); }
110
+ }
111
+ .open-event { display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; }
112
+ .open-event > .open-title { margin: 0; font: 600 13px/1.4 var(--rr0-sans, system-ui, sans-serif); letter-spacing: .04em; text-transform: uppercase; opacity: .7; }
113
+ .open-event rr0-interview { padding: 10px 12px; border: 1px solid color-mix(in srgb, currentColor 18%, transparent); border-radius: 10px;
114
+ font-size: 14px; line-height: 1.5; max-height: 22em; overflow-y: auto; }
115
+ ${p.CSS}
116
+ ${f.CSS}
117
+ @container case-history (max-width: 6rem) {
118
+ .case-timeline > :not(.event-list) { display: none !important; }
119
+ .case-timeline > .event-list { padding-left: 30px; }
120
+ }
121
+ `,g="rr0-case",w="show-timeline",y="open-events",Q="openchange";class u extends HTMLElement{static get observedAttributes(){return["src","show-labels",A,w,y,m]}static PASSED_ON=["show-labels"];shadow;openEvents;timeline;shown=new Map;messages;said=new S(["en"]);json;url;shareMessages;entries=[];grouping=!1;folded=new Set;columns;constructor(){super(),this.shadow=this.attachShadow({mode:"open"});const e=document.createElement("style");e.textContent=J;const i=document.createElement("div");i.innerHTML=Z,this.shadow.append(e,i),F(),this.timeline=new p(this.byId("case-events"),n=>void this.only(n),n=>void this.only(n),n=>void this.toggle(n),n=>{this.folded.delete(n)||this.folded.add(n),this.draw()}),this.grouping=p.groupingRemembered(),this.columns=new f(this.byId("column-resize"),this.shadow.querySelector(".case-layout"),()=>this.shadow.querySelector(".case-timeline"),f.CASE_HISTORY_KEY,f.PROPERTY,44),this.byId("group-readings").addEventListener("click",()=>{this.grouping=!this.grouping,p.rememberGrouping(this.grouping),this.order(),this.draw()}),P.register(),V.register(),this.byId("export").source=async()=>{const n=this.json,o=new Map;return await Promise.all(this.entries.filter(a=>a.kind!=="interview"&&a.url).map(async a=>{try{o.set(a.url,await E.recording(a.url))}catch{}})),{caseJson:n,caseUrl:this.url,recordings:o}},this.openEvents=this.byId("open-events"),this.openEvents.addEventListener(z,n=>{const{at:o,sighting:a}=n.detail;this.seekObservation(o,a)}),this.openEvents.addEventListener(B,n=>{const o=n.target?.closest?.(".open-event");this.followReplay(o??void 0)}),G.register();const t=this.byId("share");t.innerHTML=D.SHARE;const s=this.byId("share-dialog");s.subject=this.shareSubject,t.addEventListener("click",()=>{this.url&&(s.note=I.changed(this.url,...this.entries.map(n=>n.url))?this.shareMessages?.unsaved:void 0,s.open())}),this.byId("edit").addEventListener("click",()=>{if(this.url&&M.ask(this,_,{src:this.url}))return;const n=this.editorUrl();n&&window.open(n,"_blank","noopener")}),this.byId("info").addEventListener("click",()=>this.showSummary(this.byId("case-summary").hidden)),this.byId("timeline-button").addEventListener("click",()=>{this.showTimeline(this.byId("case-events").parentElement.hidden)})}shareSubject={module:"rr0-sighting",link:()=>{const e=this.openKeys();return`${K.home()}/play/?file=${encodeURIComponent(this.url??"")}${e?`&events=${encodeURIComponent(e)}`:""}`+(this.timelineShown()?"":"&timeline=0")},element:()=>{const e=this.openKeys();return`<${g} src="${this.url??""}"${e?` ${y}="${e}"`:""}${this.timelineShown()?"":` ${w}="false"`}></${g}>`}};timelineShown(){return!this.byId("case-events").parentElement.hidden}openKeys(){const e=[...this.shown.keys()].sort((i,t)=>i-t);return e.length===1&&e[0]===this.firstObservation()?"":e.map(i=>u.keyOf(this.entries[i])).join(",")}static keyOf(e){return e.event.id??u.fileNameOf(e)}static fileNameOf(e){return(e.url??"").split("/").pop().replace(/[.]json$/i,"")}asked(e){if(e===null)return[];if(e.trim()==="all")return this.entries.map((t,s)=>s);const i=e.split(",").map(t=>t.trim().replace(/[.]json$/i,"")).filter(t=>t!=="");return this.entries.map((t,s)=>({entry:t,at:s})).filter(({entry:t})=>i.some(s=>s===t.event.id||s===u.fileNameOf(t))).map(({at:t})=>t)}firstObservation(){return this.entries.findIndex(e=>e.kind!=="interview")}byId(e){return this.shadow.getElementById(e)}showSummary(e){this.byId("case-summary").hidden=!e,this.byId("info").setAttribute("aria-expanded",String(e))}showTimeline(e){this.byId("case-events").parentElement.hidden=!e,this.byId("timeline-button").setAttribute("aria-pressed",String(e));for(const i of this.players())i.toggleAttribute(C,e)}connectedCallback(){this.loadMessages(),this.showTimeline(this.getAttribute(w)!=="false"),this.showSummary(this.hasAttribute(A));const e=this.getAttribute("src");e&&this.load(e).catch(i=>console.warn(`<${g}> could not read ${e}:`,i))}attributeChangedCallback(e,i,t){if(!(!this.isConnected||t===i))if(e==="src"&&t)this.load(t);else if(e===w)this.showTimeline(t!=="false");else if(e===y)for(const s of this.asked(t))this.open(s);else for(const s of this.players())t===null?s.removeAttribute(e):s.setAttribute(e,t)}async loadMessages(){const e=L(H.preferencesFor(this),$);this.said=new S([e,"en"]),this.messages=await U(e),this.shareMessages=await this.byId("share-dialog").useLanguage(e),this.draw()}async load(e){this.url=new URL(e,location.href).href;const i=await E.recording(this.url);if(!k.isCase(i))throw new Error(`${e} is not a case: <${g}> reads a case.json`);this.json=i,this.byId("share").hidden=I.local(this.url),this.entries=u.inTime((i.events??[]).map(r=>this.entryOf(r)).filter(r=>r!==void 0)),this.shown.clear(),this.folded.clear(),this.openEvents.replaceChildren(),this.draw(),this.compareReadings();const t=this.asked(this.getAttribute(y));if(t.length>0){for(const r of t)await this.open(r);return}const s=this.firstObservation();s>=0&&this.open(s)}static inTime(e){const i=new Map(e.filter(t=>t.event.id!==void 0).map(t=>[t.event.id,t]));return p.inTime(e,{when:t=>t.when,kind:t=>t.kind,read:t=>[t.event.interpretationOf].flat().map(s=>s===void 0?void 0:i.get(s)).filter(s=>s!==void 0)}).map(({item:t})=>t)}entryOf(e){if(typeof e.url!="string"||e.url==="")return;const i=e.eventType===k.INTERVIEW_EVENT?"interview":e.eventType===k.SIGHTING_EVENT?e.interpretationOf===void 0?"observation":"reading":void 0;if(i)return{event:e,kind:i,url:new URL(e.url,this.url??location.href).href,title:this.said.read(e.title)??e.id??"",when:String(e.time??"")}}compareReadings(){const e=this.byId("readings-comparison"),i=new Map,t=r=>{let n=i.get(r);return n||(n=E.recording(r).then(o=>o,()=>{}),i.set(r,n)),n},s=async r=>Promise.all(this.entries.flatMap((n,o)=>{if(n.kind!=="reading")return[];const a=this.accountOf(n);return[(async()=>({title:n.title,witness:a?.title??"",...r&&a?.url&&n.url?{account:await t(a.url),reading:await t(n.url)}:{},open:()=>void this.only(o).then(()=>this.shown.get(o)?.scrollIntoView({block:"start",behavior:"smooth"}))}))()]}));s(!1).then(r=>e.show(r,()=>s(!0)))}accountOf(e){return this.accountsOf(e)[0]}accountsOf(e){const i=[e.event.interpretationOf].flat().filter(t=>t!==void 0);return this.entries.filter(t=>t.kind==="observation"&&i.includes(t.event.id??""))}editorUrl(){if(!this.url)return;const e=new URL("/edit/",location.href);return e.searchParams.set("file",this.url),e.href}async only(e){const i=this.turn(e);for(const t of[...this.shown.keys()])t!==e&&this.shut(t);i||await this.open(e)}turn(e){const i=this.entries[e];if(!i?.url||this.shown.has(e)||i.kind!=="observation"&&i.kind!=="reading")return!1;const[t,s]=[...this.shown.entries()].find(([n,o])=>{const a=this.entries[n]?.kind;return(a==="observation"||a==="reading")&&o.querySelector(c)})??[],r=s?.querySelector(c);return t===void 0||!s||!r?!1:(this.shown.delete(t),this.shown.set(e,s),s.dataset.at=String(e),i.kind==="reading"?(r.setAttribute(b,i.url),r.setAttribute(m,this.accountOf(i)?.url??i.url)):(r.setAttribute(m,i.url),r.removeAttribute(b)),this.order(),this.draw(),window.setTimeout(()=>this.markCitedMoments(),300),this.announceOpen(),!0)}async toggle(e){this.shown.has(e)?this.shut(e):await this.open(e)}async open(e){const i=this.entries[e];if(!i||!i.url||this.shown.has(e))return;const t=document.createElement("section");if(t.className="open-event",t.dataset.at=String(e),i.kind==="interview"){const s=document.createElement("p");s.className="open-title",s.textContent=i.title,t.append(s)}if(i.kind==="interview"){const{register:s}=await j(async()=>{const{register:n}=await import("./InterviewElement-fI19BieO.js");return{register:n}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10]),import.meta.url);s();const r=document.createElement("rr0-interview");r.setAttribute("src",i.url),t.append(r),window.setTimeout(()=>{this.followReplay(),this.markCitedMoments()},300)}else{const s=document.createElement(c);s.setAttribute(W,""),s.toggleAttribute(C,!this.byId("case-events").parentElement.hidden),s.setAttribute("src",this.url??"");const r=i.kind==="reading"?this.accountOf(i):void 0;s.setAttribute(m,(r??i).url??""),i.kind==="reading"&&s.setAttribute(b,i.url),queueMicrotask(()=>{for(const n of u.PASSED_ON){const o=this.getAttribute(n);o!==null&&s.setAttribute(n,o)}}),s.addEventListener(O,n=>{this.dispatchEvent(new CustomEvent(O,{detail:n.detail})),this.follow(t,s)}),s.addEventListener(Y,()=>this.follow(t,s)),t.append(s)}this.shown.set(e,t),this.order(),this.draw(),i.kind!=="interview"&&window.setTimeout(()=>this.markCitedMoments(),300),this.announceOpen()}follow(e,i){const t=Number(e.dataset.at),s=i.shownReadingUrl,r=i.shownRecordingUrl,n=(h,v)=>h!==void 0&&v!==void 0&&new URL(h,this.url??location.href).href===new URL(v,this.url??location.href).href,o=s?this.entries.findIndex(h=>h.kind==="reading"&&n(h.url,s)):this.entries.findIndex(h=>h.kind==="observation"&&n(h.url,r));if(o<0||o===t||this.shown.get(t)!==e||this.shown.has(o))return;this.shown.delete(t),this.shown.set(o,e),e.dataset.at=String(o);const a=this.entries[o];a.kind==="reading"?i.setAttribute(b,a.url):(i.removeAttribute(b),a.url&&i.setAttribute(m,a.url)),this.order(),this.draw(),this.announceOpen()}announceOpen(){this.dispatchEvent(new CustomEvent(Q,{detail:{events:this.openKeys()}}))}followReplay(e){const i=e??[...this.shown.values()].find(n=>n.querySelector(c)),t=i?Number(i.dataset.at):NaN,s=Number.isNaN(t)?void 0:this.entries[t],r=i?.querySelector(c);if(!(!s||!r)){for(const[n,o]of this.shown){if(this.entries[n]?.kind!=="interview")continue;o.querySelector("rr0-interview")?.revealAt?.(r.playedSeconds,s.event.id)}return i}}markCitedMoments(){for(const[e,i]of this.shown){const t=this.entries[e],s=i.querySelector(c);if(!t||!s)continue;const r=[];for(const[n,o]of this.shown){if(this.entries[n]?.kind!=="interview")continue;const a=o.querySelector("rr0-interview");r.push(...a?.momentsCited?.(t.event.id)??[])}s.citedMoments=r.sort((n,o)=>n.at-o.at)}}shut(e){this.shown.get(e)?.remove(),this.shown.delete(e),this.markCitedMoments(),this.draw(),this.announceOpen()}order(){const e=new Map(this.listed().map(({index:t},s)=>[t,s])),i=[...this.shown.entries()].sort(([t],[s])=>(e.get(t)??t)-(e.get(s)??s)).map(([,t])=>t);i.length===this.openEvents.children.length&&i.every((t,s)=>this.openEvents.children[s]===t)||this.openEvents.replaceChildren(...i)}listed(){const e=this.entries.map((i,t)=>({item:i,index:t}));return this.grouping?p.grouped(e,{kind:i=>i.kind,read:i=>this.accountsOf(i)}):e}async seekObservation(e,i){const t=this.entries.findIndex(n=>n.kind!=="interview"&&(n.event.id===i||i!==void 0&&n.url?.endsWith(`/${i}.json`))),s=t>=0?t:this.entries.findIndex(n=>n.kind!=="interview");if(s<0)return;this.shown.has(s)||await this.open(s),this.shown.get(s)?.querySelector(c)?.seekTo(e,i),this.shown.get(s)?.scrollIntoView({block:"nearest",behavior:"smooth"})}authors(e){const i=this.messages,t=(e??[]).map(s=>"people"in s?s.people:"org"in s?s.org:this.said.read(s.title)??"").filter(s=>s!=="");return t.length<2||!i?t.join(", "):`${t.slice(0,-1).join(", ")} ${i.linkAnd} ${t[t.length-1]}`}linkedTo(e){const i=this.messages;if(i){if(e.kind==="reading"){const t=[e.event.interpretationOf].flat().filter(r=>r!==void 0),s=this.entries.map((r,n)=>t.includes(r.event.id??"")?n:-1).filter(r=>r>=0);return s.length>0?{heading:i.interpretationOf,to:s}:void 0}if(e.kind==="observation"){const t=this.entries.map((s,r)=>s.kind==="interview"&&[s.event.interviewOf].flat().includes(e.event.id)?r:-1).filter(s=>s>=0);return t.length>0?{heading:i.passagesHeading,to:t}:void 0}}}draw(){const e=this.messages,i=this.json;if(!e||!i)return;this.byId("case-kind").textContent=e.caseHeading,this.byId("case-title").textContent=this.said.read(i.title)??i.id??"";const t=this.said.read(i.summary)??"",s=this.byId("case-summary");s.textContent=t;const r=this.byId("info");r.hidden=t==="",r.title=e.caseSummary,r.setAttribute("aria-label",e.caseSummary),t===""&&this.showSummary(!1),this.byId("events-heading").textContent=e.eventsHeading,this.byId("events-icon").innerHTML=q.CLOCK;const n=this.byId("share");n.title=e.shareCase,n.setAttribute("aria-label",e.shareCase);const o=this.byId("edit");o.title=e.editCase,o.setAttribute("aria-label",e.editCase);const a=this.byId("group-readings");a.title=e.groupReadings,a.setAttribute("aria-label",e.groupReadings),this.columns.label(e.resizeColumns),a.setAttribute("aria-pressed",String(this.grouping)),a.hidden=!this.entries.some(d=>d.kind==="reading");const h=this.listed(),v=d=>h.filter(({under:l})=>l===d).length,R=new Map(this.entries.map((d,l)=>[d,l]));this.timeline.render(h.filter(({index:d,under:l})=>l===void 0||!this.folded.has(R.get(l))||this.shown.has(d)).map(({item:d,index:l,under:N})=>{const x=this.card(d,l,N),T=this.grouping&&d.kind==="observation"?v(d):0;return T>0?{...x,readings:{count:T,folded:this.folded.has(l)}}:x}),e)}card(e,i,t){const s=this.linkedTo(e),r=(s?.to??[]).filter(o=>this.entries[o]!==t),n=t?this.messages.alsoAbout:s?.heading??"";return{at:i,kind:e.kind,title:e.title,meta:e.when.replace("T"," "),open:this.shown.has(i),...r.length>0?{links:{heading:n,to:r.map(o=>({at:o,title:this.entries[o].title}))}}:{},by:e.kind==="observation"?"":this.authors(e.event.by),...t?{nested:!0}:{}}}async loadFromSrc(e){await this.load(e),await this.player?.loaded}get scene(){return this.players()[0]?.scene}players(){return[...this.shown.entries()].sort(([e],[i])=>e-i).map(([,e])=>e.querySelector(c)).filter(e=>e!==null)}get sightingData(){return this.players()[0]?.sightingData}get player(){return this.players()[0]}}function de(){customElements.get(g)||customElements.define(g,u)}export{g as CASE_ELEMENT_NAME,u as CaseElement,Q as OPEN_CHANGE_EVENT,y as OPEN_EVENTS_ATTRIBUTE,w as SHOW_TIMELINE_ATTRIBUTE,de as register};
@@ -1,5 +1,5 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./ShareDialogElement-C5QkyK7i.js","./rr0-ufoathome.mjs","./SaidPosition-CWiVNaNW.js","./Sighting-CBpJpdm9.js","./VisualAids-DI-hEL46.js","./Decor-Dn-cvniW.js","./RecordingIssue-BlWT8Xsu.js","./Obstacles-v9SkfBD7.js"])))=>i.map(i=>d[i]);
2
- import{P as W,M as Y,_ as Z}from"./rr0-ufoathome.mjs";import{aR as B,a7 as K,aS as H,W as Q,c as P,d as J}from"./ShareDialogElement-C5QkyK7i.js";import{g as C,S as F}from"./SaidPosition-CWiVNaNW.js";import"./Sighting-CBpJpdm9.js";import"./VisualAids-DI-hEL46.js";import"./Decor-Dn-cvniW.js";import"./RecordingIssue-BlWT8Xsu.js";import"./Obstacles-v9SkfBD7.js";class A{static of(t,n,a,s,i,e=new Date){const r=t.events??[],c=f=>f.url?new URL(f.url,n).href:void 0,o=r.filter(f=>f.eventType==="sighting"&&c(f)),u=o.filter(f=>f.interpretationOf===void 0),p=u.map(f=>A.witnessOf(f,c(f),a.get(c(f)),s)),l=f=>{const w=[f.interpretationOf].flat().filter(b=>typeof b=="string");return u.find(b=>b.id!==void 0&&w.includes(b.id))??u.find(b=>w.includes(a.get(c(b))?.id??""))},m=o.filter(f=>f.interpretationOf!==void 0).map(f=>{const w=l(f),b=w?p[u.indexOf(w)]:void 0;return A.readingOf(f,c(f),a.get(c(f)),b,w?a.get(c(w)):void 0,s,i)}),d=r.filter(f=>f.eventType==="interview").map(f=>{const w=u.find(b=>b.id!==void 0&&[f.interviewOf].flat().includes(b.id));return{title:s.read(f.title)??f.id??"",...w?{witness:p[u.indexOf(w)].title}:{},...f.time?{time:f.time}:{},by:A.names(f.by,s),...f.medium?{medium:f.medium}:{}}});A.placeOnMap(p,m);const g=s.read(t.summary);return{generatedAt:e.toISOString(),case:{...t.id?{id:t.id}:{},...t.title?{title:t.title}:{},...t.time?{time:t.time}:{},url:n,...g?{summary:g}:{}},witnesses:p,readings:m,interviews:d}}static witnessOf(t,n,a,s){const i=s.read(t.title)??s.read(a?.observer?.title)??t.id??n,e={...t.id?{id:t.id}:{},title:i,url:n,...t.time?{time:t.time}:{},indications:[],values:[],sources:[],moments:[]};if(!a)return e;const{recording:r,provenance:c}=W.strip(a),o=s.read(r.description);o&&(e.description=o);const u=r.place?.name;u&&(e.place=u),!e.time&&r.time&&(e.time=r.time),typeof r.durationSeconds=="number"&&(e.durationSeconds=r.durationSeconds),r.instrument&&(e.instrument=r.instrument),e.sources=(r.sources??[]).map(b=>{const v=b,y=s.read(v.title);return{...y?{title:y}:{},...v.authors?.length?{authors:v.authors}:{},...v.publication?.publisher?{publisher:v.publication.publisher}:{},...v.publication?.time?{time:v.publication.time}:{},...v.url?{url:v.url}:{},...v.index?{index:v.index}:{}}}),e.moments=[...r.milestones??[]].sort((b,v)=>b.t-v.t).map(b=>{const v=s.read(b.note);return{t:b.t,label:s.read(b.label)??"",...v?{note:v}:{}}});const p=r.observerTrack?.keyframes?.[0]?.pose,l=r.place?.locations?.[0],m=p?.lat??l?.lat,d=p?.lng??l?.lng;typeof m=="number"&&typeof d=="number"&&Object.assign(e,{lat:m,lng:d}),e.values=A.valuesOf(c,r,()=>!0,s);const g=Q.MODELS[0],f=r.account?.conditions,w=new Map;for(const b of r.timeline?.keyframes??[])for(const v of b.shapes){const y=s.read(v.shape.title);y&&!w.has(v.sourceId)&&w.set(v.sourceId,y)}return e.phenomena=Object.fromEntries(w),(r.timeline?.keyframes??[]).forEach((b,v)=>b.shapes.forEach((y,h)=>{const M=`timeline.keyframes.${v}.shapes.${h}.shape`,E=B.traced(c,`${M}.aim`),O=B.traced(c,`${M}.angular`);if(!E&&!O)return;const $=y.shape,x=c.at(`${M}.aim`)??c.at(`${M}.angular`),I={t:b.t,sourceId:y.sourceId,directionSaid:E,sizeSaid:O,...w.has(y.sourceId)?{phenomenon:w.get(y.sourceId)}:{},...$.aim?{aim:{azimuthDeg:$.aim.azimuthDeg,altitudeDeg:$.aim.altitudeDeg}}:{},...$.angular?{angular:$.angular}:{},...x?{basis:x.basis}:{},...x?.rationale?{rationale:s.read(x.rationale)??""}:{},...x?.source?{source:x.source}:{}};if(E&&$.aim){const L=(G,j,R)=>{const V=c.at(`${M}.aim.${R}`)??c.at(`${M}.aim`),q=g.law({kind:G,value:j,basis:V?.basis,how:V?.how},f);return[q.low??j,q.high??j]};I.uncertainty={azimuthDeg:L("heading",$.aim.azimuthDeg,"azimuthDeg"),altitudeDeg:L("elevation",$.aim.altitudeDeg,"altitudeDeg")}}e.indications.push(I)})),e}static readingOf(t,n,a,s,i,e,r){const c={...t.id?{id:t.id}:{},title:e.read(t.title)??e.read(a?.interpretation?.title)??n,url:n,reads:s?.title??"",by:A.names(t.by,e),...t.time?{time:t.time}:{},supposed:[],findings:[],comparisons:[],paths:[]};if(!a)return c;const{recording:o,provenance:u}=W.strip(a),p=e.read(o.description)??e.read(o.summary);p&&(c.description=p),c.supposed=A.valuesOf(u,o,(d,g)=>d.startsWith("interpretation")&&(g==="assumed"||g==="fitted"),e);const l=d=>typeof d=="string"?d:e.read(d)??"";if(c.findings=(o.interpretation?.findings??[]).map(d=>({text:l(d.text),outcome:d.outcome,...d.against?{against:d.against}:{},written:!0})),!i)return c;r&&c.findings.push(...r.findingsOf(i,a).map(d=>({text:l(d.text),outcome:d.outcome,...d.against?{against:d.against}:{},written:!1})));const m=o.interpretation?.bodies??[];if(m.length>0)try{const d=B.forAccount(i);c.sensitivity=d.of(m,u),c.comparisons=d.comparisons(m),c.paths=A.pathsOf(m,i,c.comparisons.map(g=>g.t))}catch{}return c}static pathsOf(t,n,a){const s=K(n),i={heightAt:()=>0},e=r=>H.eyeOf(s,r,i);return t.filter(r=>(r.explains?.length??0)>0).map(r=>{const c=new H(r,i,e),u=[...new Set([...r.track.map(p=>p.t),...a])].sort((p,l)=>p-l).map(p=>({t:p,state:c.at(p)})).filter(p=>p.state!==void 0).map(({t:p,state:l})=>({t:p,eastM:l.eastM,northM:l.northM}));return{bodyId:r.id,points:u}}).filter(r=>r.points.length>0)}static placeOnMap(t,n){const a=t.find(s=>s.lat!==void 0&&s.lng!==void 0);if(a){for(const s of t){if(s.lat===void 0||s.lng===void 0)continue;const i=C(s.lat,s.lng,a.lat,a.lng);s.at={eastM:i.x,northM:-i.z}}for(const s of n){const i=t.find(e=>e.title===s.reads)?.at;if(!i){s.paths=[];continue}for(const e of s.paths)for(const r of e.points)r.eastM+=i.eastM,r.northM+=i.northM}}}static valuesOf(t,n,a,s){return t.paths().flatMap(i=>{const e=t.at(i);return a(i,e.basis)?[{path:i,value:i.split(".").reduce((r,c)=>r?.[c],n),basis:e.basis,...e.rationale?{rationale:s.read(e.rationale)??""}:{},...e.source?{source:e.source}:{}}]:[]})}static names(t,n){const a=s=>s.replace(/([a-z])([A-Z])/g,"$1 $2");return(t??[]).map(s=>{if("people"in s){const[e,...r]=a(s.people).split(" ");return[...r,e].join(" ")}if("org"in s)return a(s.org);const i=s;return n.read(i.title)??i.id??""}).filter(s=>s!=="")}}class X{constructor(t,n){this.texts=t,this.language=n,this.decimal=new Intl.NumberFormat(n,{maximumFractionDigits:1}),this.signed=new Intl.NumberFormat(n,{maximumFractionDigits:2,signDisplay:"exceptZero"})}decimal;signed;number(t){return t===void 0||!Number.isFinite(t)?"":this.decimal.format(t)}degrees(t){return t===void 0?"":`${this.number(t)}°`}azimuth(t){return t===void 0?"":this.degrees((t%360+360)%360)}instant(t){return`${this.number(t/1e3)} s`}amount(t,n){switch(t){case"azimuth":case"altitude":return`${this.signed.format(n)}°`;case"time":return`${this.signed.format(n/1e3)} s`;default:return`×${new Intl.NumberFormat(this.language,{maximumFractionDigits:2}).format(n)}`}}rests(t){const n=t.source;return[n?[n.said?`interview ${n.said.interview??""} #${n.said.segment}`.replace(" "," "):void 0,typeof n.document=="string"?n.document:void 0,n.at,n.picture,n.tool,n.url].filter(Boolean).join(", "):"",t.rationale].filter(s=>s&&s!=="").join(" : ")}value(t){const n=t.value;return typeof n=="number"?this.number(n):typeof n=="string"?n:Array.isArray(n)?`[${n.length}]`:n===void 0?"":JSON.stringify(n)}robustness(t){const n=this.texts.robustness;return!t||t.compared===0?{kind:"nothing",text:n.nothing}:B.measurable(t)?t.sufficient===!0?{kind:"sufficient",text:n.sufficient}:t.sufficient===!1?{kind:"fine-tuned",text:n.fineTuned.replace("{knob}",this.texts.knobs[t.margins[0].knob])}:{kind:"unjudged",text:n.unjudged}:{kind:"too-few",text:n.tooFew}}reproduced(t){return t&&t.compared>0?`${Math.round(t.agreement*t.compared)} / ${t.compared}`:""}ends(t){const n=(a,s)=>`${s?"≥ ":""}${this.amount(t.knob,a)}`;return{from:n(t.lower,t.lowerReached),to:n(t.upper,t.upperReached)}}fill(t,n){return t.replace(/\{(\w+)\}/g,(a,s)=>s in n?n[s]:a)}}class T{static FORMAT="ufoathome-case-report";static VERSION=1;static json(t,n){return JSON.stringify({format:T.FORMAT,version:T.VERSION,generator:`UFO@home ${n}`,...t},null,2)}static csv(t,n,a){const s=new X(n,a),i=n.columns,e=c=>c===void 0||!Number.isFinite(c)?"":String(Math.round(c*1e3)/1e3),r={};return r["indications.csv"]=T.table([i.witness,`${i.instant} (s)`,i.phenomenon,`${i.azimuth} (°)`,`${i.altitude} (°)`,`${i.azimuth} min`,`${i.azimuth} max`,`${i.altitude} min`,`${i.altitude} max`,`${i.size} (°)`,i.basis,i.rests],t.witnesses.flatMap(c=>c.indications.map(o=>[c.title,e(o.t/1e3),o.phenomenon??o.sourceId,e(o.aim?.azimuthDeg),e(o.aim?.altitudeDeg),e(o.uncertainty?.azimuthDeg[0]),e(o.uncertainty?.azimuthDeg[1]),e(o.uncertainty?.altitudeDeg[0]),e(o.uncertainty?.altitudeDeg[1]),o.sizeSaid?e(o.angular?.widthDeg):"",o.basis?n.bases[o.basis]:"",s.rests(o)]))),r["values.csv"]=T.table([i.witness,i.reading,i.path,i.value,i.basis,i.rests],[...t.witnesses.flatMap(c=>c.values.map(o=>[c.title,"",o.path,s.value(o),n.bases[o.basis],s.rests(o)])),...t.readings.flatMap(c=>c.supposed.map(o=>[c.reads,c.title,o.path,s.value(o),n.bases[o.basis],s.rests(o)]))]),r["readings.csv"]=T.table([i.reading,i.reads,i.by,i.time,i.reproduced,i.compared,`${i.gap} (°)`,i.robustness,i.supposedCount],t.readings.map(c=>[c.title,c.reads,c.by.join(", "),c.time??"",c.sensitivity&&c.sensitivity.compared>0?String(Math.round(c.sensitivity.agreement*c.sensitivity.compared)):"",c.sensitivity&&c.sensitivity.compared>0?String(c.sensitivity.compared):"",e(c.sensitivity?.medianSeparationDeg),s.robustness(c.sensitivity).text,String(c.supposed.length)])),r["margins.csv"]=T.table([i.reading,i.reads,i.knob,i.from,i.to,`${i.reference} min`,`${i.reference} max`,i.covered],t.readings.flatMap(c=>(c.sensitivity?.margins??[]).map(o=>[c.title,c.reads,n.knobs[o.knob],e(o.lower),e(o.upper),e(o.reference?.lower),e(o.reference?.upper),o.coverage===void 0?"":e(o.coverage)]))),r["comparisons.csv"]=T.table([i.reading,i.reads,`${i.instant} (s)`,i.phenomenon,`${i.said} ${i.azimuth}`,`${i.said} ${i.altitude}`,`${i.read} ${i.azimuth}`,`${i.read} ${i.altitude}`,`${i.separation} (°)`,i.agrees],t.readings.flatMap(c=>c.comparisons.map(o=>[c.title,c.reads,e(o.t/1e3),t.witnesses.find(u=>u.title===c.reads)?.phenomena?.[o.sourceId]??o.sourceId,e(o.said?.azimuthDeg),e(o.said?.altitudeDeg),e(o.predicted.azimuthDeg),e(o.predicted.altitudeDeg),e(o.separationDeg),o.agrees?n.yes:n.no]))),r["findings.csv"]=T.table([i.reading,i.reads,i.finding,i.outcome,i.against,i.origin],t.readings.flatMap(c=>c.findings.map(o=>[c.title,c.reads,o.text,n.outcomes[o.outcome],o.outcome==="fails"?n.grounds[o.against??"established"]:"",n.origins[o.written?"written":"computed"]]))),r}static table(t,n){const a=s=>/[",\r\n]/.test(s)?`"${s.replace(/"/g,'""')}"`:s;return[t,...n].map(s=>s.map(a).join(",")).join(`\r
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./ShareDialogElement-DHlxoHWP.js","./rr0-ufoathome.mjs","./SaidPosition-CXZLm-ck.js","./Sighting-Ch4eiBNK.js","./VisualAids-DI-hEL46.js","./Decor-Dn-cvniW.js","./RecordingIssue-BlWT8Xsu.js","./Obstacles-v9SkfBD7.js"])))=>i.map(i=>d[i]);
2
+ import{P as W,M as Y,_ as Z}from"./rr0-ufoathome.mjs";import{aR as B,a7 as K,aS as H,W as Q,c as P,d as J}from"./ShareDialogElement-DHlxoHWP.js";import{g as C,S as F}from"./SaidPosition-CXZLm-ck.js";import"./Sighting-Ch4eiBNK.js";import"./VisualAids-DI-hEL46.js";import"./Decor-Dn-cvniW.js";import"./RecordingIssue-BlWT8Xsu.js";import"./Obstacles-v9SkfBD7.js";class A{static of(t,n,a,s,i,e=new Date){const r=t.events??[],c=f=>f.url?new URL(f.url,n).href:void 0,o=r.filter(f=>f.eventType==="sighting"&&c(f)),u=o.filter(f=>f.interpretationOf===void 0),p=u.map(f=>A.witnessOf(f,c(f),a.get(c(f)),s)),l=f=>{const w=[f.interpretationOf].flat().filter(b=>typeof b=="string");return u.find(b=>b.id!==void 0&&w.includes(b.id))??u.find(b=>w.includes(a.get(c(b))?.id??""))},m=o.filter(f=>f.interpretationOf!==void 0).map(f=>{const w=l(f),b=w?p[u.indexOf(w)]:void 0;return A.readingOf(f,c(f),a.get(c(f)),b,w?a.get(c(w)):void 0,s,i)}),d=r.filter(f=>f.eventType==="interview").map(f=>{const w=u.find(b=>b.id!==void 0&&[f.interviewOf].flat().includes(b.id));return{title:s.read(f.title)??f.id??"",...w?{witness:p[u.indexOf(w)].title}:{},...f.time?{time:f.time}:{},by:A.names(f.by,s),...f.medium?{medium:f.medium}:{}}});A.placeOnMap(p,m);const g=s.read(t.summary);return{generatedAt:e.toISOString(),case:{...t.id?{id:t.id}:{},...t.title?{title:t.title}:{},...t.time?{time:t.time}:{},url:n,...g?{summary:g}:{}},witnesses:p,readings:m,interviews:d}}static witnessOf(t,n,a,s){const i=s.read(t.title)??s.read(a?.observer?.title)??t.id??n,e={...t.id?{id:t.id}:{},title:i,url:n,...t.time?{time:t.time}:{},indications:[],values:[],sources:[],moments:[]};if(!a)return e;const{recording:r,provenance:c}=W.strip(a),o=s.read(r.description);o&&(e.description=o);const u=r.place?.name;u&&(e.place=u),!e.time&&r.time&&(e.time=r.time),typeof r.durationSeconds=="number"&&(e.durationSeconds=r.durationSeconds),r.instrument&&(e.instrument=r.instrument),e.sources=(r.sources??[]).map(b=>{const v=b,y=s.read(v.title);return{...y?{title:y}:{},...v.authors?.length?{authors:v.authors}:{},...v.publication?.publisher?{publisher:v.publication.publisher}:{},...v.publication?.time?{time:v.publication.time}:{},...v.url?{url:v.url}:{},...v.index?{index:v.index}:{}}}),e.moments=[...r.milestones??[]].sort((b,v)=>b.t-v.t).map(b=>{const v=s.read(b.note);return{t:b.t,label:s.read(b.label)??"",...v?{note:v}:{}}});const p=r.observerTrack?.keyframes?.[0]?.pose,l=r.place?.locations?.[0],m=p?.lat??l?.lat,d=p?.lng??l?.lng;typeof m=="number"&&typeof d=="number"&&Object.assign(e,{lat:m,lng:d}),e.values=A.valuesOf(c,r,()=>!0,s);const g=Q.MODELS[0],f=r.account?.conditions,w=new Map;for(const b of r.timeline?.keyframes??[])for(const v of b.shapes){const y=s.read(v.shape.title);y&&!w.has(v.sourceId)&&w.set(v.sourceId,y)}return e.phenomena=Object.fromEntries(w),(r.timeline?.keyframes??[]).forEach((b,v)=>b.shapes.forEach((y,h)=>{const M=`timeline.keyframes.${v}.shapes.${h}.shape`,E=B.traced(c,`${M}.aim`),O=B.traced(c,`${M}.angular`);if(!E&&!O)return;const $=y.shape,x=c.at(`${M}.aim`)??c.at(`${M}.angular`),I={t:b.t,sourceId:y.sourceId,directionSaid:E,sizeSaid:O,...w.has(y.sourceId)?{phenomenon:w.get(y.sourceId)}:{},...$.aim?{aim:{azimuthDeg:$.aim.azimuthDeg,altitudeDeg:$.aim.altitudeDeg}}:{},...$.angular?{angular:$.angular}:{},...x?{basis:x.basis}:{},...x?.rationale?{rationale:s.read(x.rationale)??""}:{},...x?.source?{source:x.source}:{}};if(E&&$.aim){const L=(G,j,R)=>{const V=c.at(`${M}.aim.${R}`)??c.at(`${M}.aim`),q=g.law({kind:G,value:j,basis:V?.basis,how:V?.how},f);return[q.low??j,q.high??j]};I.uncertainty={azimuthDeg:L("heading",$.aim.azimuthDeg,"azimuthDeg"),altitudeDeg:L("elevation",$.aim.altitudeDeg,"altitudeDeg")}}e.indications.push(I)})),e}static readingOf(t,n,a,s,i,e,r){const c={...t.id?{id:t.id}:{},title:e.read(t.title)??e.read(a?.interpretation?.title)??n,url:n,reads:s?.title??"",by:A.names(t.by,e),...t.time?{time:t.time}:{},supposed:[],findings:[],comparisons:[],paths:[]};if(!a)return c;const{recording:o,provenance:u}=W.strip(a),p=e.read(o.description)??e.read(o.summary);p&&(c.description=p),c.supposed=A.valuesOf(u,o,(d,g)=>d.startsWith("interpretation")&&(g==="assumed"||g==="fitted"),e);const l=d=>typeof d=="string"?d:e.read(d)??"";if(c.findings=(o.interpretation?.findings??[]).map(d=>({text:l(d.text),outcome:d.outcome,...d.against?{against:d.against}:{},written:!0})),!i)return c;r&&c.findings.push(...r.findingsOf(i,a).map(d=>({text:l(d.text),outcome:d.outcome,...d.against?{against:d.against}:{},written:!1})));const m=o.interpretation?.bodies??[];if(m.length>0)try{const d=B.forAccount(i);c.sensitivity=d.of(m,u),c.comparisons=d.comparisons(m),c.paths=A.pathsOf(m,i,c.comparisons.map(g=>g.t))}catch{}return c}static pathsOf(t,n,a){const s=K(n),i={heightAt:()=>0},e=r=>H.eyeOf(s,r,i);return t.filter(r=>(r.explains?.length??0)>0).map(r=>{const c=new H(r,i,e),u=[...new Set([...r.track.map(p=>p.t),...a])].sort((p,l)=>p-l).map(p=>({t:p,state:c.at(p)})).filter(p=>p.state!==void 0).map(({t:p,state:l})=>({t:p,eastM:l.eastM,northM:l.northM}));return{bodyId:r.id,points:u}}).filter(r=>r.points.length>0)}static placeOnMap(t,n){const a=t.find(s=>s.lat!==void 0&&s.lng!==void 0);if(a){for(const s of t){if(s.lat===void 0||s.lng===void 0)continue;const i=C(s.lat,s.lng,a.lat,a.lng);s.at={eastM:i.x,northM:-i.z}}for(const s of n){const i=t.find(e=>e.title===s.reads)?.at;if(!i){s.paths=[];continue}for(const e of s.paths)for(const r of e.points)r.eastM+=i.eastM,r.northM+=i.northM}}}static valuesOf(t,n,a,s){return t.paths().flatMap(i=>{const e=t.at(i);return a(i,e.basis)?[{path:i,value:i.split(".").reduce((r,c)=>r?.[c],n),basis:e.basis,...e.rationale?{rationale:s.read(e.rationale)??""}:{},...e.source?{source:e.source}:{}}]:[]})}static names(t,n){const a=s=>s.replace(/([a-z])([A-Z])/g,"$1 $2");return(t??[]).map(s=>{if("people"in s){const[e,...r]=a(s.people).split(" ");return[...r,e].join(" ")}if("org"in s)return a(s.org);const i=s;return n.read(i.title)??i.id??""}).filter(s=>s!=="")}}class X{constructor(t,n){this.texts=t,this.language=n,this.decimal=new Intl.NumberFormat(n,{maximumFractionDigits:1}),this.signed=new Intl.NumberFormat(n,{maximumFractionDigits:2,signDisplay:"exceptZero"})}decimal;signed;number(t){return t===void 0||!Number.isFinite(t)?"":this.decimal.format(t)}degrees(t){return t===void 0?"":`${this.number(t)}°`}azimuth(t){return t===void 0?"":this.degrees((t%360+360)%360)}instant(t){return`${this.number(t/1e3)} s`}amount(t,n){switch(t){case"azimuth":case"altitude":return`${this.signed.format(n)}°`;case"time":return`${this.signed.format(n/1e3)} s`;default:return`×${new Intl.NumberFormat(this.language,{maximumFractionDigits:2}).format(n)}`}}rests(t){const n=t.source;return[n?[n.said?`interview ${n.said.interview??""} #${n.said.segment}`.replace(" "," "):void 0,typeof n.document=="string"?n.document:void 0,n.at,n.picture,n.tool,n.url].filter(Boolean).join(", "):"",t.rationale].filter(s=>s&&s!=="").join(" : ")}value(t){const n=t.value;return typeof n=="number"?this.number(n):typeof n=="string"?n:Array.isArray(n)?`[${n.length}]`:n===void 0?"":JSON.stringify(n)}robustness(t){const n=this.texts.robustness;return!t||t.compared===0?{kind:"nothing",text:n.nothing}:B.measurable(t)?t.sufficient===!0?{kind:"sufficient",text:n.sufficient}:t.sufficient===!1?{kind:"fine-tuned",text:n.fineTuned.replace("{knob}",this.texts.knobs[t.margins[0].knob])}:{kind:"unjudged",text:n.unjudged}:{kind:"too-few",text:n.tooFew}}reproduced(t){return t&&t.compared>0?`${Math.round(t.agreement*t.compared)} / ${t.compared}`:""}ends(t){const n=(a,s)=>`${s?"≥ ":""}${this.amount(t.knob,a)}`;return{from:n(t.lower,t.lowerReached),to:n(t.upper,t.upperReached)}}fill(t,n){return t.replace(/\{(\w+)\}/g,(a,s)=>s in n?n[s]:a)}}class T{static FORMAT="ufoathome-case-report";static VERSION=1;static json(t,n){return JSON.stringify({format:T.FORMAT,version:T.VERSION,generator:`UFO@home ${n}`,...t},null,2)}static csv(t,n,a){const s=new X(n,a),i=n.columns,e=c=>c===void 0||!Number.isFinite(c)?"":String(Math.round(c*1e3)/1e3),r={};return r["indications.csv"]=T.table([i.witness,`${i.instant} (s)`,i.phenomenon,`${i.azimuth} (°)`,`${i.altitude} (°)`,`${i.azimuth} min`,`${i.azimuth} max`,`${i.altitude} min`,`${i.altitude} max`,`${i.size} (°)`,i.basis,i.rests],t.witnesses.flatMap(c=>c.indications.map(o=>[c.title,e(o.t/1e3),o.phenomenon??o.sourceId,e(o.aim?.azimuthDeg),e(o.aim?.altitudeDeg),e(o.uncertainty?.azimuthDeg[0]),e(o.uncertainty?.azimuthDeg[1]),e(o.uncertainty?.altitudeDeg[0]),e(o.uncertainty?.altitudeDeg[1]),o.sizeSaid?e(o.angular?.widthDeg):"",o.basis?n.bases[o.basis]:"",s.rests(o)]))),r["values.csv"]=T.table([i.witness,i.reading,i.path,i.value,i.basis,i.rests],[...t.witnesses.flatMap(c=>c.values.map(o=>[c.title,"",o.path,s.value(o),n.bases[o.basis],s.rests(o)])),...t.readings.flatMap(c=>c.supposed.map(o=>[c.reads,c.title,o.path,s.value(o),n.bases[o.basis],s.rests(o)]))]),r["readings.csv"]=T.table([i.reading,i.reads,i.by,i.time,i.reproduced,i.compared,`${i.gap} (°)`,i.robustness,i.supposedCount],t.readings.map(c=>[c.title,c.reads,c.by.join(", "),c.time??"",c.sensitivity&&c.sensitivity.compared>0?String(Math.round(c.sensitivity.agreement*c.sensitivity.compared)):"",c.sensitivity&&c.sensitivity.compared>0?String(c.sensitivity.compared):"",e(c.sensitivity?.medianSeparationDeg),s.robustness(c.sensitivity).text,String(c.supposed.length)])),r["margins.csv"]=T.table([i.reading,i.reads,i.knob,i.from,i.to,`${i.reference} min`,`${i.reference} max`,i.covered],t.readings.flatMap(c=>(c.sensitivity?.margins??[]).map(o=>[c.title,c.reads,n.knobs[o.knob],e(o.lower),e(o.upper),e(o.reference?.lower),e(o.reference?.upper),o.coverage===void 0?"":e(o.coverage)]))),r["comparisons.csv"]=T.table([i.reading,i.reads,`${i.instant} (s)`,i.phenomenon,`${i.said} ${i.azimuth}`,`${i.said} ${i.altitude}`,`${i.read} ${i.azimuth}`,`${i.read} ${i.altitude}`,`${i.separation} (°)`,i.agrees],t.readings.flatMap(c=>c.comparisons.map(o=>[c.title,c.reads,e(o.t/1e3),t.witnesses.find(u=>u.title===c.reads)?.phenomena?.[o.sourceId]??o.sourceId,e(o.said?.azimuthDeg),e(o.said?.altitudeDeg),e(o.predicted.azimuthDeg),e(o.predicted.altitudeDeg),e(o.separationDeg),o.agrees?n.yes:n.no]))),r["findings.csv"]=T.table([i.reading,i.reads,i.finding,i.outcome,i.against,i.origin],t.readings.flatMap(c=>c.findings.map(o=>[c.title,c.reads,o.text,n.outcomes[o.outcome],o.outcome==="fails"?n.grounds[o.against??"established"]:"",n.origins[o.written?"written":"computed"]]))),r}static table(t,n){const a=s=>/[",\r\n]/.test(s)?`"${s.replace(/"/g,'""')}"`:s;return[t,...n].map(s=>s.map(a).join(",")).join(`\r
3
3
  `)+`\r
4
4
  `}}class D{static COLOURS=["#c2410c","#1d4ed8","#15803d","#7e22ce","#b91c1c","#0f766e"];static WIDTH=640;static HEIGHT=320;static MARGIN={left:44,right:12,top:12,bottom:34};static svg(t,n,a){const s=t.indications.filter(h=>h.directionSaid&&h.aim);if(s.length===0)return;const i=D.circularMean(s.map(h=>h.aim.azimuthDeg)),e=h=>i+((h-i)%360+540)%360-180,r=[];for(const h of s){const{azimuthDeg:M,altitudeDeg:E}=h.uncertainty??{azimuthDeg:[h.aim.azimuthDeg,h.aim.azimuthDeg],altitudeDeg:[h.aim.altitudeDeg,h.aim.altitudeDeg]};r.push({x:e(h.aim.azimuthDeg),y:h.aim.altitudeDeg}),r.push({x:e(h.aim.azimuthDeg)+(M[0]-h.aim.azimuthDeg),y:E[0]}),r.push({x:e(h.aim.azimuthDeg)+(M[1]-h.aim.azimuthDeg),y:E[1]})}for(const h of n)for(const M of h.comparisons)r.push({x:e(M.predicted.azimuthDeg),y:M.predicted.altitudeDeg});const c=r.map(h=>h.x),o=r.map(h=>h.y),[u,p]=D.padded(Math.min(...c),Math.max(...c),10),[l,m]=D.padded(Math.max(-10,Math.min(...o)),Math.min(90,Math.max(...o)),5),d=D.MARGIN,g=D.WIDTH-d.left-d.right,f=D.HEIGHT-d.top-d.bottom,w=h=>d.left+(h-u)/(p-u)*g,b=h=>d.top+(1-(h-l)/(m-l))*f,v=h=>Math.round(h*10)/10,y=[];for(const h of D.ticks(u,p))y.push(`<line x1="${v(w(h))}" y1="${d.top}" x2="${v(w(h))}" y2="${d.top+f}" class="grid"/>`),y.push(`<text x="${v(w(h))}" y="${d.top+f+14}" text-anchor="middle" class="tick">${a.number((h%360+360)%360)}°</text>`);for(const h of D.ticks(l,m))y.push(`<line x1="${d.left}" y1="${v(b(h))}" x2="${d.left+g}" y2="${v(b(h))}" class="${h===0?"horizon":"grid"}"/>`),y.push(`<text x="${d.left-6}" y="${v(b(h))+4}" text-anchor="end" class="tick">${a.number(h)}°</text>`);y.push(`<text x="${d.left+g/2}" y="${D.HEIGHT-4}" text-anchor="middle" class="axis">${a.texts.azimuth}</text>`),y.push(`<text x="12" y="${d.top+f/2}" text-anchor="middle" class="axis" transform="rotate(-90 12 ${d.top+f/2})">${a.texts.altitude}</text>`);for(const h of s){const M=h.uncertainty;if(!M)continue;const E=e(h.aim.azimuthDeg),O=w(E+M.azimuthDeg[0]-h.aim.azimuthDeg),$=w(E+M.azimuthDeg[1]-h.aim.azimuthDeg);y.push(`<rect x="${v(Math.min(O,$))}" y="${v(b(M.altitudeDeg[1]))}" width="${v(Math.abs($-O))}" height="${v(Math.max(1,b(M.altitudeDeg[0])-b(M.altitudeDeg[1])))}" class="uncertainty"/>`)}n.forEach((h,M)=>{const E=D.COLOURS[M%D.COLOURS.length];for(const O of h.comparisons){const $=w(e(O.predicted.azimuthDeg)),x=b(O.predicted.altitudeDeg);O.said&&y.push(`<line x1="${v(w(e(O.said.azimuthDeg)))}" y1="${v(b(O.said.altitudeDeg))}" x2="${v($)}" y2="${v(x)}" stroke="${E}" class="gap"/>`),y.push(D.mark(M,$,x,E,O.agrees))}});for(const h of s)y.push(`<circle cx="${v(w(e(h.aim.azimuthDeg)))}" cy="${v(b(h.aim.altitudeDeg))}" r="4" class="said"><title>${a.instant(h.t)}</title></circle>`);return`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 ${D.WIDTH} ${D.HEIGHT}" role="img" class="sky">${y.join("")}</svg>`}static mark(t,n,a,s,i){const r=o=>Math.round(o*10)/10,c=i?s:"none";switch(t%3){case 0:return`<path d="M${r(n-5)} ${r(a-5)}L${r(n+5)} ${r(a+5)}M${r(n-5)} ${r(a+5)}L${r(n+5)} ${r(a-5)}" stroke="${s}" stroke-width="${i?2.4:1.2}"/>`;case 1:return`<rect x="${r(n-5)}" y="${r(a-5)}" width="10" height="10" stroke="${s}" fill="${c}" stroke-width="1.4"/>`;default:return`<path d="M${r(n)} ${r(a-5-1)}L${r(n+5+1)} ${r(a+5)}L${r(n-5-1)} ${r(a+5)}Z" stroke="${s}" fill="${c}" stroke-width="1.4"/>`}}static legendMark(t){const n=D.COLOURS[t%D.COLOURS.length];return`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 14 14" width="14" height="14" aria-hidden="true">${D.mark(t,7,7,n,!0)}</svg>`}static circularMean(t){const n=Math.PI/180,a=t.reduce((i,e)=>i+Math.cos(e*n),0),s=t.reduce((i,e)=>i+Math.sin(e*n),0);return Math.atan2(s,a)/n}static padded(t,n,a){const s=Math.max(n-t,a),i=(t+n)/2;return[i-s/2-s*.08,i+s/2+s*.08]}static ticks(t,n){const a=n-t,s=[1,2,5,10,15,20,30,45,90].find(e=>a/e<=10)??90,i=[];for(let e=Math.ceil(t/s)*s;e<=n;e+=s)i.push(e);return i}}class k{static SIZE=520;static count=0;static MARGIN=28;static svg(t,n,a){const s=t.filter($=>$.at);if(s.length===0)return;const i=n.filter($=>$.paths.length>0),e=[...s.map($=>$.at),...i.flatMap($=>$.paths.flatMap(x=>x.points))],r=e.map($=>$.eastM),c=e.map($=>$.northM),o=Math.max(200,Math.max(...r)-Math.min(...r),Math.max(...c)-Math.min(...c))*1.25,u=(Math.max(...r)+Math.min(...r))/2,p=(Math.max(...c)+Math.min(...c))/2,l=k.SIZE-2*k.MARGIN,m=$=>k.MARGIN+($-u+o/2)/o*l,d=$=>k.MARGIN+(1-($-p+o/2)/o)*l,g=$=>Math.round($*10)/10,f=o*.75,w=Math.PI/180,b=($,x)=>({eastM:$.eastM+f*Math.sin(x*w),northM:$.northM+f*Math.cos(x*w)}),v=`plan-clip-${k.count++}`,y=[`<defs><clipPath id="${v}"><rect x="${k.MARGIN}" y="${k.MARGIN}" width="${l}" height="${l}"/></clipPath></defs>`,`<rect x="${k.MARGIN}" y="${k.MARGIN}" width="${l}" height="${l}" class="frame"/>`,`<g clip-path="url(#${v})">`];for(const $ of s)for(const x of $.indications){if(!x.directionSaid||!x.aim)continue;const I=$.at,L=x.uncertainty?.azimuthDeg;if(L&&L[1]-L[0]<180){const j=b(I,L[0]),R=b(I,L[1]);y.push(`<path d="M${g(m(I.eastM))} ${g(d(I.northM))}L${g(m(j.eastM))} ${g(d(j.northM))}L${g(m(R.eastM))} ${g(d(R.northM))}Z" class="fan"/>`)}const G=b(I,x.aim.azimuthDeg);y.push(`<line x1="${g(m(I.eastM))}" y1="${g(d(I.northM))}" x2="${g(m(G.eastM))}" y2="${g(d(G.northM))}" class="sight"><title>${a.instant(x.t)}</title></line>`)}i.forEach($=>{const x=D.COLOURS[n.indexOf($)%D.COLOURS.length];for(const I of $.paths){const L=I.points.map((j,R)=>`${R===0?"M":"L"}${g(m(j.eastM))} ${g(d(j.northM))}`).join("");y.push(`<path d="${L}" stroke="${x}" class="track"/>`);const G=I.points[I.points.length-1];y.push(`<circle cx="${g(m(G.eastM))}" cy="${g(d(G.northM))}" r="2.5" fill="${x}"/>`)}}),y.push("</g>");const h=[];for(const $ of s){const x=h.find(I=>Math.hypot(I.at.eastM-$.at.eastM,I.at.northM-$.at.northM)<o/100);x?x.names.push($.title):h.push({at:$.at,names:[$.title]})}for(const $ of h)y.push(`<circle cx="${g(m($.at.eastM))}" cy="${g(d($.at.northM))}" r="4.5" class="witness"/>`),y.push(`<text x="${g(m($.at.eastM)+7)}" y="${g(d($.at.northM)-7)}" class="name">${k.escape($.names.join(", "))}</text>`);const M=k.round(o/5),E=M/o*l,O=k.SIZE-10;return y.push(`<line x1="${k.MARGIN}" y1="${O}" x2="${g(k.MARGIN+E)}" y2="${O}" class="scale"/>`),y.push(`<text x="${g(k.MARGIN+E+6)}" y="${O+4}" class="tick">${k.escape(a.fill(a.texts.scale,{metres:a.number(M)}))}</text>`),y.push(`<path d="M${k.SIZE-18} 34L${k.SIZE-12} 18L${k.SIZE-6} 34Z" class="north"/><text x="${k.SIZE-12}" y="14" text-anchor="middle" class="tick">N</text>`),`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 ${k.SIZE} ${k.SIZE}" role="img" class="plan">${y.join("")}</svg>`}static round(t){const n=10**Math.floor(Math.log10(t));return[5,2,1].map(a=>a*n).find(a=>a<=t)??n}static escape(t){return t.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}}class S{static WIDTH=640;static HEIGHT=74;static LEFT=16;static RIGHT=16;static svg(t,n){const a=t.indications.map(l=>l.t),s=t.moments;if(a.length===0&&s.length===0)return;const i=Math.max(1e3,(t.durationSeconds??0)*1e3,...a,...s.map(l=>l.t)),e=S.WIDTH-S.LEFT-S.RIGHT,r=l=>S.LEFT+l/i*e,c=l=>Math.round(l*10)/10,o=40,u=[`<line x1="${S.LEFT}" y1="${o}" x2="${S.LEFT+e}" y2="${o}" class="axis-line"/>`],p=[.5,1,2,5,10,15,30,60,120,300,600].find(l=>i/1e3/l<=10)??600;for(let l=0;l*1e3<=i;l+=p)u.push(`<line x1="${c(r(l*1e3))}" y1="${o-3}" x2="${c(r(l*1e3))}" y2="${o+3}" class="axis-line"/>`),u.push(`<text x="${c(r(l*1e3))}" y="${o+16}" text-anchor="middle" class="tick">${n.instant(l*1e3)}</text>`);for(const l of s)u.push(`<line x1="${c(r(l.t))}" y1="8" x2="${c(r(l.t))}" y2="${o}" class="moment"/>`),u.push(`<text x="${c(r(l.t)+3)}" y="16" class="moment-label">${S.escape(l.label)}${l.note?`<title>${S.escape(l.note)}</title>`:""}</text>`);for(const l of a)u.push(`<circle cx="${c(r(l))}" cy="${o}" r="3.5" class="said"><title>${n.instant(l)}</title></circle>`);return`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 ${S.WIDTH} ${S.HEIGHT}" role="img" class="timeline">${u.join("")}</svg>`}static escape(t){return t.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}}class z{static CSS=`
5
5
  :root { color-scheme: light; --ink: #1b1d22; --dim: #5b6070; --line: #d6d9e0; --ok: #15803d; --warn: #b45309; --error: #b91c1c; }
@@ -63,4 +63,4 @@ ${o.join(`
63
63
  `)}
64
64
  </body>
65
65
  </html>
66
- `}static comparedTable(t,n){const a=n.texts.columns,s=z.escape;return z.table([a.reading,a.reads,a.reproduced,a.gap,a.robustness,a.supposedCount],t.readings.map(i=>{const e=n.robustness(i.sensitivity);return[s(i.title),s(i.reads),`<span class="n">${n.reproduced(i.sensitivity)}</span>`,n.degrees(i.sensitivity?.medianSeparationDeg),`<span class="${e.kind}">${s(e.text)}</span>`,String(i.supposed.length)]}),[2,3,5])}static witness(t,n,a){const s=a.texts,i=s.columns,e=z.escape,r=[`<h3>${e(a.fill(s.witnessHeading,{witness:t.title}))}</h3>`],o=[[s.columns.time,t.time??""],[s.place,t.place??""],[s.duration,t.durationSeconds!==void 0?a.instant(t.durationSeconds*1e3):""],[s.instrument,t.instrument??""]].filter(([,m])=>m!=="");o.length&&r.push(`<dl class="facts">${o.map(([m,d])=>`<dt>${e(m)}</dt><dd>${e(d)}</dd>`).join("")}</dl>`),t.description&&r.push(`<h4>${e(s.account)}</h4>`,`<blockquote>${e(t.description)}</blockquote>`),t.sources.length&&r.push(`<h4>${e(s.sources)}</h4>`,`<ul class="sources">${t.sources.map(m=>`<li>${[m.authors?.join(", "),m.title?`<em>${e(m.title)}</em>`:"",m.publisher,m.time,m.index].filter(Boolean).map(g=>g.startsWith("<em>")?g:e(g)).join(", ")}${m.url?` <a href="${e(m.url)}">${e(m.url)}</a>`:""}</li>`).join("")}</ul>`);const u=S.svg(t,a);u&&r.push(`<figure>${u}<figcaption>${e(s.timelineCaption)}</figcaption></figure>`),n=n.filter(m=>m.comparisons.length>0);const p=D.svg(t,n,a);if(p){const m=[`<li><svg viewBox="0 0 14 14" width="14" height="14" aria-hidden="true"><circle cx="7" cy="7" r="4" fill="#111827"/></svg>${e(s.saidLegend)}</li>`,...n.map((d,g)=>`<li>${D.legendMark(g)}${e(d.title)}</li>`)];r.push(`<figure>${p}<ul class="legend">${m.join("")}</ul><figcaption>${e(s.figureCaption)}</figcaption></figure>`)}if(t.pictures?.length){const m=t.pictures[0].views.map(d=>d.label);r.push(`<h4>${e(s.pictures)}</h4>`,`<div class="scroll"><table class="pictures"><thead><tr><th scope="col">${e(s.columns.instant)}</th>${m.map(d=>`<th scope="col">${e(d)}</th>`).join("")}</tr></thead><tbody>${t.pictures.map(d=>`<tr><td class="n">${a.instant(d.t)}</td>${d.views.map(g=>`<td>${g.image?`<img src="${g.image}" alt="${e(g.label)}, ${a.instant(d.t)}">`:`<span class="nothing">${e(s.noPicture)}</span>`}</td>`).join("")}</tr>`).join("")}</tbody></table></div>`,`<p class="caption">${e(s.picturesCaption)}</p>`)}r.push(`<h4>${e(s.indications)}</h4>`),t.indications.length===0?r.push(`<p>${e(s.noIndication)}</p>`):r.push(z.table([i.instant,i.phenomenon,i.azimuth,i.altitude,i.uncertainty,i.size,i.basis,i.rests],t.indications.map(m=>{const d=m.uncertainty;return[a.instant(m.t),e(m.phenomenon??m.sourceId),m.directionSaid?a.azimuth(m.aim?.azimuthDeg):"",m.directionSaid?a.degrees(m.aim?.altitudeDeg):"",d?`${a.azimuth(d.azimuthDeg[0])} … ${a.azimuth(d.azimuthDeg[1])} ; ${a.degrees(d.altitudeDeg[0])} … ${a.degrees(d.altitudeDeg[1])}`:"",m.sizeSaid?a.degrees(m.angular?.widthDeg):"",m.basis?e(s.bases[m.basis]):"",e(a.rests(m))]}),[0,2,3,5]));const l=t.values.filter(m=>!/^timeline\.keyframes\.\d+\.shapes\.\d+\.shape\.(aim|angular)/.test(m.path));return l.length>0&&r.push(`<h4>${e(s.values)}</h4>`,z.valuesTable(l,a)),r}static reading(t,n,a){const s=a.texts,i=s.columns,e=z.escape,r=[`<h2>${e(a.fill(s.readingHeading,{title:t.title,witness:t.reads}))}</h2>`],c=[t.by.length?a.fill(s.by,{names:t.by.join(", ")}):"",t.time?a.fill(s.made,{time:t.time}):""].filter(Boolean).join(" ");c&&r.push(`<p class="meta">${e(c)}</p>`),t.description&&r.push(`<blockquote>${e(t.description)}</blockquote>`),r.push(`<h4>${e(s.supposed)}</h4>`,t.supposed.length?z.valuesTable(t.supposed,a):`<p>${e(s.noneSupposed)}</p>`),r.push(`<h4>${e(s.findings)}</h4>`),r.push(t.findings.length?z.table([i.finding,i.outcome,i.against,i.origin],t.findings.map(u=>[e(u.text),`<span class="${u.outcome}">${e(s.outcomes[u.outcome])}</span>`,u.outcome==="fails"?e(s.grounds[u.against??"established"]):"",e(s.origins[u.written?"written":"computed"])])):`<p>${e(s.noFinding)}</p>`);const o=t.sensitivity;if(o){const u=a.robustness(o);if(r.push(`<h4>${e(s.sensitivity)}</h4>`,`<p>${e(i.reproduced)} : ${a.reproduced(o)||"–"} · ${e(i.gap)} : ${a.degrees(o.medianSeparationDeg)||"–"} · <span class="${u.kind}">${e(u.text)}</span></p>`),u.kind!=="too-few"&&u.kind!=="nothing"&&o.margins.length>0&&r.push(z.table([i.knob,i.from,i.to,i.reference,i.covered],o.margins.map(p=>{const l=a.ends(p),m=p.reference?`${a.amount(p.knob,p.reference.lower)} … ${a.amount(p.knob,p.reference.upper)}`:s.noLaw;return[e(s.knobs[p.knob]),l.from,l.to,e(m),p.coverage===void 0?"":`${Math.round(p.coverage*100)} %`]}),[1,2,4])),o.better){const{knob:p,amount:l,agreement:m}=o.better;r.push(`<p class="fine-tuned">${e(a.fill(s.better,{knob:s.knobs[p],amount:a.amount(p,l),agreed:String(Math.round(m*o.compared)),compared:String(o.compared)}))}</p>`)}}return t.comparisons.length>0&&r.push(`<h4>${e(s.comparisons)}</h4>`,z.table([i.instant,i.phenomenon,`${i.said} (${i.azimuth}, ${i.altitude})`,`${i.read} (${i.azimuth}, ${i.altitude})`,i.separation,i.agrees],t.comparisons.map(u=>[a.instant(u.t),e(n?.phenomena?.[u.sourceId]??u.sourceId),u.said?`${a.azimuth(u.said.azimuthDeg)}, ${a.degrees(u.said.altitudeDeg)}`:"",`${a.azimuth(u.predicted.azimuthDeg)}, ${a.degrees(u.predicted.altitudeDeg)}`,a.degrees(u.separationDeg),`<span class="${u.agrees?"holds":"fails"}">${e(u.agrees?s.yes:s.no)}</span>`]),[0,4])),r}static valuesTable(t,n){const a=n.texts,s=a.columns,i=z.escape;return z.table([s.path,s.value,s.basis,s.rests],t.map(e=>[`<code>${i(e.path)}</code>`,i(n.value(e)),i(a.bases[e.basis]),i(n.rests(e))]))}static table(t,n,a=[]){const s=z.escape,i=`<tr>${t.map(r=>`<th scope="col">${s(r)}</th>`).join("")}</tr>`,e=n.map(r=>`<tr>${r.map((c,o)=>`<td${a.includes(o)?' class="n"':""}>${c}</td>`).join("")}</tr>`);return`<div class="scroll"><table><thead>${i}</thead><tbody>${e.join("")}</tbody></table></div>`}static escape(t){return t.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;")}}const _=Y.catalog({en:()=>Z(()=>import("./CaseReportTexts_en-DlN7p1pC.js"),[],import.meta.url).then(N=>N.caseReportTexts_en),fr:()=>Z(()=>import("./CaseReportTexts_fr-B5nP6RlP.js"),[],import.meta.url).then(N=>N.caseReportTexts_fr),es:()=>Z(()=>import("./CaseReportTexts_es-CncAEaey.js"),[],import.meta.url).then(N=>N.caseReportTexts_es),it:()=>Z(()=>import("./CaseReportTexts_it-Dc-oPmXB.js"),[],import.meta.url).then(N=>N.caseReportTexts_it)});class U{static async make(t,n,a,s,i=!1,e){const[r,c]=await Promise.all([_.load(a),P.load(a)]),o=A.of(n.caseJson,n.caseUrl,n.recordings,new F([...s]),new J(c));i&&t!=="csv"&&await U.pictures(o,n,r,e);const u=`${n.caseJson.id??"case"}-report`;switch(t){case"html":U.download(new Blob([z.of(o,r,a,"0.197.0")],{type:"text/html"}),`${u}.html`);return;case"print":U.print(z.of(o,r,a,"0.197.0"));return;case"json":U.download(new Blob([T.json(o,"0.197.0")],{type:"application/json"}),`${u}.json`);return;case"csv":{const{zipSync:p,strToU8:l}=await Z(async()=>{const{zipSync:d,strToU8:g}=await import("./browser-CltifEM0.js");return{zipSync:d,strToU8:g}},[],import.meta.url),m=Object.fromEntries(Object.entries(T.csv(o,r,a)).map(([d,g])=>[d,l(`\uFEFF${g}`)]));U.download(new Blob([p(m)],{type:"application/zip"}),`${u}-tables.zip`)}}}static PICTURED_INSTANTS=3;static async pictures(t,n,a,s){const{registerScene:i,SCENE_ELEMENT_NAME:e}=await Z(async()=>{const{registerScene:p,SCENE_ELEMENT_NAME:l}=await import("./ShareDialogElement-C5QkyK7i.js").then(m=>m.d6);return{registerScene:p,SCENE_ELEMENT_NAME:l}},__vite__mapDeps([0,1,2,3,4,5,6,7]),import.meta.url);i();const r=t.witnesses.map(p=>{const l=p.indications.filter(f=>f.directionSaid).map(f=>f.t),m=l.length<=U.PICTURED_INSTANTS?l:[l[0],l[Math.floor(l.length/2)],l[l.length-1]],d=t.readings.filter(f=>f.reads===p.title&&f.comparisons.length>0),g=[{label:a.accountView,url:p.url,reading:void 0},...d.map(f=>({label:f.title,url:p.url,reading:f.url}))];return{witness:p,instants:[...new Set(m)],recordings:g}}).filter(p=>p.instants.length>0),c=r.reduce((p,l)=>p+l.instants.length*l.recordings.length,0);if(c===0)return;const o=document.createElement(e);o.setAttribute("max-pixel-ratio","1"),o.setAttribute("always-live",""),Object.assign(o.style,{position:"fixed",left:"-10000px",top:"0",width:"640px",height:"360px",visibility:"hidden",pointerEvents:"none"}),document.body.appendChild(o);let u=0;s?.(u,c);try{for(const p of r){const l=p.instants.map(d=>({t:d,views:[]})),m=n.recordings.get(p.witness.url);m&&(o.documentUrl=p.witness.url,o.sightingData=m);for(const d of p.recordings){const g=m,f=d.reading?n.recordings.get(d.reading):void 0;for(const w of l){let b;g&&(!d.reading||f)&&(w===l[0]&&(o.interpretation=U.bodiesOf(f??g,d.reading??p.witness.url)),b=await o.pictureAt(w.t,480).catch(()=>{})),w.views.push({label:d.label,...b?{image:b}:{}}),s?.(++u,c)}}p.witness.pictures=l}}finally{o.remove()}}static bodiesOf(t,n){const a=W.strip(t).recording.interpretation;if(a)return{...a,bodies:a.bodies.map(s=>s.model?.url?{...s,model:{...s.model,url:new URL(s.model.url,n).href}}:s)}}static print(t){const n=document.createElement("iframe");n.setAttribute("aria-hidden","true"),n.style.cssText="position: fixed; right: 0; bottom: 0; width: 0; height: 0; border: 0",n.addEventListener("load",()=>{const a=n.contentWindow;a&&(a.addEventListener("afterprint",()=>n.remove()),a.focus(),a.print(),window.setTimeout(()=>n.remove(),6e4))},{once:!0}),n.srcdoc=t,document.body.append(n)}static download(t,n){const a=URL.createObjectURL(t),s=document.createElement("a");s.href=a,s.download=n,s.click(),window.setTimeout(()=>URL.revokeObjectURL(a),1e3)}}export{U as CaseReportExport};
66
+ `}static comparedTable(t,n){const a=n.texts.columns,s=z.escape;return z.table([a.reading,a.reads,a.reproduced,a.gap,a.robustness,a.supposedCount],t.readings.map(i=>{const e=n.robustness(i.sensitivity);return[s(i.title),s(i.reads),`<span class="n">${n.reproduced(i.sensitivity)}</span>`,n.degrees(i.sensitivity?.medianSeparationDeg),`<span class="${e.kind}">${s(e.text)}</span>`,String(i.supposed.length)]}),[2,3,5])}static witness(t,n,a){const s=a.texts,i=s.columns,e=z.escape,r=[`<h3>${e(a.fill(s.witnessHeading,{witness:t.title}))}</h3>`],o=[[s.columns.time,t.time??""],[s.place,t.place??""],[s.duration,t.durationSeconds!==void 0?a.instant(t.durationSeconds*1e3):""],[s.instrument,t.instrument??""]].filter(([,m])=>m!=="");o.length&&r.push(`<dl class="facts">${o.map(([m,d])=>`<dt>${e(m)}</dt><dd>${e(d)}</dd>`).join("")}</dl>`),t.description&&r.push(`<h4>${e(s.account)}</h4>`,`<blockquote>${e(t.description)}</blockquote>`),t.sources.length&&r.push(`<h4>${e(s.sources)}</h4>`,`<ul class="sources">${t.sources.map(m=>`<li>${[m.authors?.join(", "),m.title?`<em>${e(m.title)}</em>`:"",m.publisher,m.time,m.index].filter(Boolean).map(g=>g.startsWith("<em>")?g:e(g)).join(", ")}${m.url?` <a href="${e(m.url)}">${e(m.url)}</a>`:""}</li>`).join("")}</ul>`);const u=S.svg(t,a);u&&r.push(`<figure>${u}<figcaption>${e(s.timelineCaption)}</figcaption></figure>`),n=n.filter(m=>m.comparisons.length>0);const p=D.svg(t,n,a);if(p){const m=[`<li><svg viewBox="0 0 14 14" width="14" height="14" aria-hidden="true"><circle cx="7" cy="7" r="4" fill="#111827"/></svg>${e(s.saidLegend)}</li>`,...n.map((d,g)=>`<li>${D.legendMark(g)}${e(d.title)}</li>`)];r.push(`<figure>${p}<ul class="legend">${m.join("")}</ul><figcaption>${e(s.figureCaption)}</figcaption></figure>`)}if(t.pictures?.length){const m=t.pictures[0].views.map(d=>d.label);r.push(`<h4>${e(s.pictures)}</h4>`,`<div class="scroll"><table class="pictures"><thead><tr><th scope="col">${e(s.columns.instant)}</th>${m.map(d=>`<th scope="col">${e(d)}</th>`).join("")}</tr></thead><tbody>${t.pictures.map(d=>`<tr><td class="n">${a.instant(d.t)}</td>${d.views.map(g=>`<td>${g.image?`<img src="${g.image}" alt="${e(g.label)}, ${a.instant(d.t)}">`:`<span class="nothing">${e(s.noPicture)}</span>`}</td>`).join("")}</tr>`).join("")}</tbody></table></div>`,`<p class="caption">${e(s.picturesCaption)}</p>`)}r.push(`<h4>${e(s.indications)}</h4>`),t.indications.length===0?r.push(`<p>${e(s.noIndication)}</p>`):r.push(z.table([i.instant,i.phenomenon,i.azimuth,i.altitude,i.uncertainty,i.size,i.basis,i.rests],t.indications.map(m=>{const d=m.uncertainty;return[a.instant(m.t),e(m.phenomenon??m.sourceId),m.directionSaid?a.azimuth(m.aim?.azimuthDeg):"",m.directionSaid?a.degrees(m.aim?.altitudeDeg):"",d?`${a.azimuth(d.azimuthDeg[0])} … ${a.azimuth(d.azimuthDeg[1])} ; ${a.degrees(d.altitudeDeg[0])} … ${a.degrees(d.altitudeDeg[1])}`:"",m.sizeSaid?a.degrees(m.angular?.widthDeg):"",m.basis?e(s.bases[m.basis]):"",e(a.rests(m))]}),[0,2,3,5]));const l=t.values.filter(m=>!/^timeline\.keyframes\.\d+\.shapes\.\d+\.shape\.(aim|angular)/.test(m.path));return l.length>0&&r.push(`<h4>${e(s.values)}</h4>`,z.valuesTable(l,a)),r}static reading(t,n,a){const s=a.texts,i=s.columns,e=z.escape,r=[`<h2>${e(a.fill(s.readingHeading,{title:t.title,witness:t.reads}))}</h2>`],c=[t.by.length?a.fill(s.by,{names:t.by.join(", ")}):"",t.time?a.fill(s.made,{time:t.time}):""].filter(Boolean).join(" ");c&&r.push(`<p class="meta">${e(c)}</p>`),t.description&&r.push(`<blockquote>${e(t.description)}</blockquote>`),r.push(`<h4>${e(s.supposed)}</h4>`,t.supposed.length?z.valuesTable(t.supposed,a):`<p>${e(s.noneSupposed)}</p>`),r.push(`<h4>${e(s.findings)}</h4>`),r.push(t.findings.length?z.table([i.finding,i.outcome,i.against,i.origin],t.findings.map(u=>[e(u.text),`<span class="${u.outcome}">${e(s.outcomes[u.outcome])}</span>`,u.outcome==="fails"?e(s.grounds[u.against??"established"]):"",e(s.origins[u.written?"written":"computed"])])):`<p>${e(s.noFinding)}</p>`);const o=t.sensitivity;if(o){const u=a.robustness(o);if(r.push(`<h4>${e(s.sensitivity)}</h4>`,`<p>${e(i.reproduced)} : ${a.reproduced(o)||"–"} · ${e(i.gap)} : ${a.degrees(o.medianSeparationDeg)||"–"} · <span class="${u.kind}">${e(u.text)}</span></p>`),u.kind!=="too-few"&&u.kind!=="nothing"&&o.margins.length>0&&r.push(z.table([i.knob,i.from,i.to,i.reference,i.covered],o.margins.map(p=>{const l=a.ends(p),m=p.reference?`${a.amount(p.knob,p.reference.lower)} … ${a.amount(p.knob,p.reference.upper)}`:s.noLaw;return[e(s.knobs[p.knob]),l.from,l.to,e(m),p.coverage===void 0?"":`${Math.round(p.coverage*100)} %`]}),[1,2,4])),o.better){const{knob:p,amount:l,agreement:m}=o.better;r.push(`<p class="fine-tuned">${e(a.fill(s.better,{knob:s.knobs[p],amount:a.amount(p,l),agreed:String(Math.round(m*o.compared)),compared:String(o.compared)}))}</p>`)}}return t.comparisons.length>0&&r.push(`<h4>${e(s.comparisons)}</h4>`,z.table([i.instant,i.phenomenon,`${i.said} (${i.azimuth}, ${i.altitude})`,`${i.read} (${i.azimuth}, ${i.altitude})`,i.separation,i.agrees],t.comparisons.map(u=>[a.instant(u.t),e(n?.phenomena?.[u.sourceId]??u.sourceId),u.said?`${a.azimuth(u.said.azimuthDeg)}, ${a.degrees(u.said.altitudeDeg)}`:"",`${a.azimuth(u.predicted.azimuthDeg)}, ${a.degrees(u.predicted.altitudeDeg)}`,a.degrees(u.separationDeg),`<span class="${u.agrees?"holds":"fails"}">${e(u.agrees?s.yes:s.no)}</span>`]),[0,4])),r}static valuesTable(t,n){const a=n.texts,s=a.columns,i=z.escape;return z.table([s.path,s.value,s.basis,s.rests],t.map(e=>[`<code>${i(e.path)}</code>`,i(n.value(e)),i(a.bases[e.basis]),i(n.rests(e))]))}static table(t,n,a=[]){const s=z.escape,i=`<tr>${t.map(r=>`<th scope="col">${s(r)}</th>`).join("")}</tr>`,e=n.map(r=>`<tr>${r.map((c,o)=>`<td${a.includes(o)?' class="n"':""}>${c}</td>`).join("")}</tr>`);return`<div class="scroll"><table><thead>${i}</thead><tbody>${e.join("")}</tbody></table></div>`}static escape(t){return t.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;")}}const _=Y.catalog({en:()=>Z(()=>import("./CaseReportTexts_en-DlN7p1pC.js"),[],import.meta.url).then(N=>N.caseReportTexts_en),fr:()=>Z(()=>import("./CaseReportTexts_fr-B5nP6RlP.js"),[],import.meta.url).then(N=>N.caseReportTexts_fr),es:()=>Z(()=>import("./CaseReportTexts_es-CncAEaey.js"),[],import.meta.url).then(N=>N.caseReportTexts_es),it:()=>Z(()=>import("./CaseReportTexts_it-Dc-oPmXB.js"),[],import.meta.url).then(N=>N.caseReportTexts_it)});class U{static async make(t,n,a,s,i=!1,e){const[r,c]=await Promise.all([_.load(a),P.load(a)]),o=A.of(n.caseJson,n.caseUrl,n.recordings,new F([...s]),new J(c));i&&t!=="csv"&&await U.pictures(o,n,r,e);const u=`${n.caseJson.id??"case"}-report`;switch(t){case"html":U.download(new Blob([z.of(o,r,a,"0.198.1")],{type:"text/html"}),`${u}.html`);return;case"print":U.print(z.of(o,r,a,"0.198.1"));return;case"json":U.download(new Blob([T.json(o,"0.198.1")],{type:"application/json"}),`${u}.json`);return;case"csv":{const{zipSync:p,strToU8:l}=await Z(async()=>{const{zipSync:d,strToU8:g}=await import("./browser-CltifEM0.js");return{zipSync:d,strToU8:g}},[],import.meta.url),m=Object.fromEntries(Object.entries(T.csv(o,r,a)).map(([d,g])=>[d,l(`\uFEFF${g}`)]));U.download(new Blob([p(m)],{type:"application/zip"}),`${u}-tables.zip`)}}}static PICTURED_INSTANTS=3;static async pictures(t,n,a,s){const{registerScene:i,SCENE_ELEMENT_NAME:e}=await Z(async()=>{const{registerScene:p,SCENE_ELEMENT_NAME:l}=await import("./ShareDialogElement-DHlxoHWP.js").then(m=>m.d6);return{registerScene:p,SCENE_ELEMENT_NAME:l}},__vite__mapDeps([0,1,2,3,4,5,6,7]),import.meta.url);i();const r=t.witnesses.map(p=>{const l=p.indications.filter(f=>f.directionSaid).map(f=>f.t),m=l.length<=U.PICTURED_INSTANTS?l:[l[0],l[Math.floor(l.length/2)],l[l.length-1]],d=t.readings.filter(f=>f.reads===p.title&&f.comparisons.length>0),g=[{label:a.accountView,url:p.url,reading:void 0},...d.map(f=>({label:f.title,url:p.url,reading:f.url}))];return{witness:p,instants:[...new Set(m)],recordings:g}}).filter(p=>p.instants.length>0),c=r.reduce((p,l)=>p+l.instants.length*l.recordings.length,0);if(c===0)return;const o=document.createElement(e);o.setAttribute("max-pixel-ratio","1"),o.setAttribute("always-live",""),Object.assign(o.style,{position:"fixed",left:"-10000px",top:"0",width:"640px",height:"360px",visibility:"hidden",pointerEvents:"none"}),document.body.appendChild(o);let u=0;s?.(u,c);try{for(const p of r){const l=p.instants.map(d=>({t:d,views:[]})),m=n.recordings.get(p.witness.url);m&&(o.documentUrl=p.witness.url,o.sightingData=m);for(const d of p.recordings){const g=m,f=d.reading?n.recordings.get(d.reading):void 0;for(const w of l){let b;g&&(!d.reading||f)&&(w===l[0]&&(o.interpretation=U.bodiesOf(f??g,d.reading??p.witness.url)),b=await o.pictureAt(w.t,480).catch(()=>{})),w.views.push({label:d.label,...b?{image:b}:{}}),s?.(++u,c)}}p.witness.pictures=l}}finally{o.remove()}}static bodiesOf(t,n){const a=W.strip(t).recording.interpretation;if(a)return{...a,bodies:a.bodies.map(s=>s.model?.url?{...s,model:{...s.model,url:new URL(s.model.url,n).href}}:s)}}static print(t){const n=document.createElement("iframe");n.setAttribute("aria-hidden","true"),n.style.cssText="position: fixed; right: 0; bottom: 0; width: 0; height: 0; border: 0",n.addEventListener("load",()=>{const a=n.contentWindow;a&&(a.addEventListener("afterprint",()=>n.remove()),a.focus(),a.print(),window.setTimeout(()=>n.remove(),6e4))},{once:!0}),n.srcdoc=t,document.body.append(n)}static download(t,n){const a=URL.createObjectURL(t),s=document.createElement("a");s.href=a,s.download=n,s.click(),window.setTimeout(()=>URL.revokeObjectURL(a),1e3)}}export{U as CaseReportExport};
@@ -1,5 +1,5 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./CaseReportExport-ZNhCiJjJ.js","./rr0-ufoathome.mjs","./ShareDialogElement-C5QkyK7i.js","./SaidPosition-CWiVNaNW.js","./Sighting-CBpJpdm9.js","./VisualAids-DI-hEL46.js","./Decor-Dn-cvniW.js","./RecordingIssue-BlWT8Xsu.js","./Obstacles-v9SkfBD7.js"])))=>i.map(i=>d[i]);
2
- import{l as C,R as T,aR as L,H as y}from"./ShareDialogElement-C5QkyK7i.js";import{s as I,U as N,H as R,x as O,P as E,y as M,_ as P}from"./rr0-ufoathome.mjs";import{I as A}from"./SaidPosition-CWiVNaNW.js";class f extends HTMLElement{static TAG="rr0-readings-comparison";static CSS=`
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./CaseReportExport--IhmS67e.js","./rr0-ufoathome.mjs","./ShareDialogElement-DHlxoHWP.js","./SaidPosition-CXZLm-ck.js","./Sighting-Ch4eiBNK.js","./VisualAids-DI-hEL46.js","./Decor-Dn-cvniW.js","./RecordingIssue-BlWT8Xsu.js","./Obstacles-v9SkfBD7.js"])))=>i.map(i=>d[i]);
2
+ import{l as C,R as T,aR as L,H as y}from"./ShareDialogElement-DHlxoHWP.js";import{s as N,U as R,H as I,x as O,P as E,y as M,_ as P}from"./rr0-ufoathome.mjs";import{I as A}from"./SaidPosition-CXZLm-ck.js";class v extends HTMLElement{static TAG="rr0-readings-comparison";static CSS=`
3
3
  :host { display: block; font-size: 13px; line-height: 1.4; }
4
4
  :host([hidden]) { display: none; }
5
5
  summary { cursor: pointer; list-style-position: inside; font: 600 12px/1.4 var(--rr0-sans, system-ui, sans-serif); letter-spacing: .08em; text-transform: uppercase; opacity: .8; }
@@ -15,7 +15,7 @@ th button.sort { padding: 0; border: 0; background: none; color: inherit; font:
15
15
  th button.sort:hover, th[aria-sort] button.sort { text-decoration: underline; text-underline-offset: 2px; }
16
16
  button.link { padding: 0; border: 0; background: none; color: inherit; font: inherit; text-align: left; text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
17
17
  ${C.CSS}
18
- `;messages;language="en";rows=[];load;loaded=!1;opened=!1;sort={key:"reproduced",descending:!0};static register(){customElements.get(f.TAG)||customElements.define(f.TAG,f)}static create(){return f.register(),document.createElement(f.TAG)}constructor(){super(),this.attachShadow({mode:"open"})}connectedCallback(){this.messages||this.loadLocale()}show(t,e){this.rows=t,this.load=e,this.loaded=t.every(o=>o.account&&o.reading),this.draw(),this.opened&&this.loadRows()}async loadLocale(){const t=I(R.preferencesFor(this),N);this.messages=await O.load(t),this.language=t,this.draw()}async loadRows(){this.loaded||!this.load||(this.loaded=!0,this.rows=await this.load(),this.draw())}draw(){const t=this.messages;if(this.hidden=this.rows.length===0,!t||this.rows.length===0){this.shadowRoot.replaceChildren();return}const e=t.comparison,o=document.createElement("style");o.textContent=f.CSS;const i=document.createElement("details");i.open=this.opened,i.addEventListener("toggle",()=>{this.opened=i.open,i.open&&this.loadRows()});const a=document.createElement("summary");a.append(e.heading.replace("{n}",String(this.rows.length)),C.of(e.hint));const n=document.createElement("table"),s=n.createTHead().insertRow(),l=[[e.reading,"case"],[e.witness,void 0],[e.reproduced,"reproduced"],[e.gap,"gap"],[e.robustness,"robustness"],[e.supposed,"supposed"]];for(const[p,u]of l){const g=document.createElement("th");if(g.scope="col",!u)g.textContent=p;else{const b=this.sort.key===u;b&&u!=="case"&&g.setAttribute("aria-sort",this.sort.descending?"descending":"ascending"),b&&u==="case"&&g.setAttribute("aria-sort","other");const m=document.createElement("button");m.type="button",m.className="sort",m.title=e.sortBy.replace("{column}",p),m.textContent=b&&u!=="case"?`${p} ${this.sort.descending?"▾":"▴"}`:p,m.addEventListener("click",()=>{this.sort=b?{key:u,descending:!this.sort.descending}:{key:u,descending:u!=="gap"&&u!=="supposed"},this.draw()}),g.append(m)}s.append(g)}const c=n.createTBody(),d=this.ordered(),r=this.sort.key==="case"||this.sort.key==="reproduced",v=[...new Set(d.map(p=>p.title))],h=r?v.flatMap(p=>d.filter(u=>u.title===p)):d;h.forEach((p,u)=>{const b=!r||u===0||h[u-1].title!==p.title?r?h.filter(m=>m.title===p.title).length:1:0;this.drawRow(c.insertRow(),p,t,b)});const k=document.createElement("div");k.className="scroll",k.append(n),i.append(a,k),this.shadowRoot.replaceChildren(o,i)}ordered(){const{key:t,descending:e}=this.sort;if(t==="case")return[...this.rows];const o=new Map(this.rows.map(n=>[n,this.standingOf(n)])),i=e?-1:1,a={reproduced:(n,s)=>i*(n.agreement-s.agreement)||(s.robustness-n.robustness)*i||((n.gapDeg??1/0)-(s.gapDeg??1/0))*-i||(n.supposed-s.supposed)*-i,gap:(n,s)=>(n.gapDeg===void 0?1:0)-(s.gapDeg===void 0?1:0)||i*((n.gapDeg??0)-(s.gapDeg??0)),robustness:(n,s)=>-i*(n.robustness-s.robustness),supposed:(n,s)=>i*(n.supposed-s.supposed)}[t];return this.rows.map((n,s)=>({row:n,index:s})).sort((n,s)=>{const l=o.get(n.row),c=o.get(s.row);return!l||!c?(l?0:1)-(c?0:1)||n.index-s.index:a(l,c)||n.index-s.index}).map(n=>n.row)}standingOf(t){if(!t.account||!t.reading)return;const e=T.resultOf(t.account,t.reading);if(!e||e.compared===0)return;const{provenance:o}=E.strip(t.reading),i=o.paths().filter(n=>n.startsWith("interpretation")&&E.free(o.at(n))).length,a=L.measurable(e)?e.sufficient===!0?0:e.sufficient===!1?2:1:3;return{agreement:e.agreement,robustness:a,...e.medianSeparationDeg===void 0?{}:{gapDeg:e.medianSeparationDeg},supposed:i}}drawTitle(t,e,o){const i=t.insertCell();i.rowSpan=o,i.textContent=e.title}drawWitness(t,e){const o=t.insertCell();if(!e.open){o.textContent=e.witness;return}const i=document.createElement("button");i.type="button",i.className="link",i.textContent=e.witness,i.addEventListener("click",e.open),o.append(i)}drawRow(t,e,o,i){const a=o.comparison,n=(h,k=!1)=>{const p=t.insertCell();return p.textContent=h,k&&(p.className="number"),p};if(i>0&&this.drawTitle(t,e,i),this.drawWitness(t,e),!e.account||!e.reading){for(let h=0;h<4;h++)n(a.loading);return}const s=T.resultOf(e.account,e.reading),{provenance:l}=E.strip(e.reading),c=l.paths().filter(h=>h.startsWith("interpretation")&&E.free(l.at(h)));if(!s||s.compared===0){const h=n(a.nothing);h.colSpan=3,h.dataset.robustness="none",n(String(c.length),!0);return}const d=Math.round(s.agreement*s.compared);n(`${d} / ${s.compared}`,!0);const r=new Intl.NumberFormat(this.language,{maximumFractionDigits:1});n(s.medianSeparationDeg===void 0?"–":`${r.format(s.medianSeparationDeg)}°`,!0);const v=L.measurable(s)?s.sufficient===!0?{kind:"sufficient",text:a.sufficient}:s.sufficient===!1?{kind:"fine-tuned",text:a.fineTuned.replace("{knob}",o.knobs[s.margins[0].knob])}:{kind:"none",text:a.unjudged}:{kind:"too-few",text:a.tooFew};n(v.text).dataset.robustness=v.kind,n(String(c.length),!0)}}class x extends HTMLElement{static TAG="rr0-case-export";static ICON='<svg viewBox="0 0 16 16" width="14" height="14" aria-hidden="true" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round"><path d="M4 1.8h5.2L12.5 5v9.2H4z"/><path d="M9 1.8V5h3.5M6 8.2h4.5M6 10.6h4.5M6 12.9h2.5"/></svg>';static CSS=`
18
+ `;messages;language="en";rows=[];load;loaded=!1;opened=!1;sort={key:"reproduced",descending:!0};static register(){customElements.get(v.TAG)||customElements.define(v.TAG,v)}static create(){return v.register(),document.createElement(v.TAG)}constructor(){super(),this.attachShadow({mode:"open"})}connectedCallback(){this.messages||this.loadLocale()}show(e,n){this.rows=e,this.load=n,this.loaded=e.every(s=>s.account&&s.reading),this.draw(),this.opened&&this.loadRows()}async loadLocale(){const e=N(I.preferencesFor(this),R);this.messages=await O.load(e),this.language=e,this.draw()}async loadRows(){this.loaded||!this.load||(this.loaded=!0,this.rows=await this.load(),this.draw())}draw(){const e=this.messages;if(this.hidden=this.rows.length===0,!e||this.rows.length===0){this.shadowRoot.replaceChildren();return}const n=e.comparison,s=document.createElement("style");s.textContent=v.CSS;const i=document.createElement("details");i.open=this.opened,i.addEventListener("toggle",()=>{this.opened=i.open,i.open&&this.loadRows()});const o=document.createElement("summary");o.append(n.heading.replace("{n}",String(this.rows.length)),C.of(n.hint));const t=document.createElement("table"),a=t.createTHead().insertRow(),l=[[n.reading,"case"],[n.witness,void 0],[n.reproduced,"reproduced"],[n.gap,"gap"],[n.robustness,"robustness"],[n.supposed,"supposed"]];for(const[p,u]of l){const g=document.createElement("th");if(g.scope="col",!u)g.textContent=p;else{const b=this.sort.key===u;b&&u!=="case"&&g.setAttribute("aria-sort",this.sort.descending?"descending":"ascending"),b&&u==="case"&&g.setAttribute("aria-sort","other");const m=document.createElement("button");m.type="button",m.className="sort",m.title=n.sortBy.replace("{column}",p),m.textContent=b&&u!=="case"?`${p} ${this.sort.descending?"▾":"▴"}`:p,m.addEventListener("click",()=>{this.sort=b?{key:u,descending:!this.sort.descending}:{key:u,descending:u!=="gap"&&u!=="supposed"},this.draw()}),g.append(m)}a.append(g)}const c=t.createTBody(),d=this.ordered(),r=this.sort.key==="case"||this.sort.key==="reproduced",f=[...new Set(d.map(p=>p.title))],h=r?f.flatMap(p=>d.filter(u=>u.title===p)):d;h.forEach((p,u)=>{const b=!r||u===0||h[u-1].title!==p.title?r?h.filter(m=>m.title===p.title).length:1:0;this.drawRow(c.insertRow(),p,e,b)});const k=document.createElement("div");k.className="scroll",k.append(t),i.append(o,k),this.shadowRoot.replaceChildren(s,i)}ordered(){const{key:e,descending:n}=this.sort;if(e==="case")return[...this.rows];const s=new Map(this.rows.map(t=>[t,this.standingOf(t)])),i=n?-1:1,o={reproduced:(t,a)=>i*(t.agreement-a.agreement)||(a.robustness-t.robustness)*i||((t.gapDeg??1/0)-(a.gapDeg??1/0))*-i||(t.supposed-a.supposed)*-i,gap:(t,a)=>(t.gapDeg===void 0?1:0)-(a.gapDeg===void 0?1:0)||i*((t.gapDeg??0)-(a.gapDeg??0)),robustness:(t,a)=>-i*(t.robustness-a.robustness),supposed:(t,a)=>i*(t.supposed-a.supposed)}[e];return this.rows.map((t,a)=>({row:t,index:a})).sort((t,a)=>{const l=s.get(t.row),c=s.get(a.row);return!l||!c?(l?0:1)-(c?0:1)||t.index-a.index:o(l,c)||t.index-a.index}).map(t=>t.row)}standingOf(e){if(!e.account||!e.reading)return;const n=T.resultOf(e.account,e.reading);if(!n||n.compared===0)return;const{provenance:s}=E.strip(e.reading),i=s.paths().filter(t=>t.startsWith("interpretation")&&E.free(s.at(t))).length,o=L.measurable(n)?n.sufficient===!0?0:n.sufficient===!1?2:1:3;return{agreement:n.agreement,robustness:o,...n.medianSeparationDeg===void 0?{}:{gapDeg:n.medianSeparationDeg},supposed:i}}drawTitle(e,n,s){const i=e.insertCell();i.rowSpan=s,i.textContent=n.title}drawWitness(e,n){const s=e.insertCell();if(!n.open){s.textContent=n.witness;return}const i=document.createElement("button");i.type="button",i.className="link",i.textContent=n.witness,i.addEventListener("click",n.open),s.append(i)}drawRow(e,n,s,i){const o=s.comparison,t=(h,k=!1)=>{const p=e.insertCell();return p.textContent=h,k&&(p.className="number"),p};if(i>0&&this.drawTitle(e,n,i),this.drawWitness(e,n),!n.account||!n.reading){for(let h=0;h<4;h++)t(o.loading);return}const a=T.resultOf(n.account,n.reading),{provenance:l}=E.strip(n.reading),c=l.paths().filter(h=>h.startsWith("interpretation")&&E.free(l.at(h)));if(!a||a.compared===0){const h=t(o.nothing);h.colSpan=3,h.dataset.robustness="none",t(String(c.length),!0);return}const d=Math.round(a.agreement*a.compared);t(`${d} / ${a.compared}`,!0);const r=new Intl.NumberFormat(this.language,{maximumFractionDigits:1});t(a.medianSeparationDeg===void 0?"–":`${r.format(a.medianSeparationDeg)}°`,!0);const f=L.measurable(a)?a.sufficient===!0?{kind:"sufficient",text:o.sufficient}:a.sufficient===!1?{kind:"fine-tuned",text:o.fineTuned.replace("{knob}",s.knobs[a.margins[0].knob])}:{kind:"none",text:o.unjudged}:{kind:"too-few",text:o.tooFew};t(f.text).dataset.robustness=f.kind,t(String(c.length),!0)}}class x extends HTMLElement{static TAG="rr0-case-export";static ICON='<svg viewBox="0 0 16 16" width="14" height="14" aria-hidden="true" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round"><path d="M4 1.8h5.2L12.5 5v9.2H4z"/><path d="M9 1.8V5h3.5M6 8.2h4.5M6 10.6h4.5M6 12.9h2.5"/></svg>';static CSS=`
19
19
  :host { display: inline-block; position: relative; }
20
20
  :host([hidden]) { display: none; }
21
21
  /* A button's own type, as its neighbours keep theirs: a size in em taken from the bar's text made it taller than they are. */
@@ -31,7 +31,7 @@ button.open { display: inline-flex; align-items: center; gap: 6px; cursor: point
31
31
  .option input { margin: 2px 0 0; }
32
32
  ${y.css(".menu")}
33
33
  .menu:popover-open { position-area: bottom span-left; margin: .35em 0 0; }
34
- `;source;messages;language="en";preferences=["en"];status;withPictures;static register(){customElements.get(x.TAG)||customElements.define(x.TAG,x)}constructor(){super(),this.attachShadow({mode:"open"})}connectedCallback(){this.messages||this.loadLocale()}async loadLocale(){this.preferences=R.preferencesFor(this),this.language=I([...this.preferences],N),this.messages=await M.load(this.language),this.draw()}draw(){const t=this.messages,e=document.createElement("style");e.textContent=x.CSS;const o=document.createElement("button");o.type="button",o.className="open",o.setAttribute("part","button"),o.title=t.hint,o.setAttribute("aria-label",t.hint),o.setAttribute("aria-haspopup","menu"),o.innerHTML=x.ICON,this.getAttribute("variant")==="pill"&&o.append(Object.assign(document.createElement("span"),{textContent:t.button}));const i=document.createElement("div");i.className="menu",i.setAttribute("role","menu"),y.attach(o,i);const a=[["html",t.html,t.htmlHint],["print",t.print,t.printHint],["json",t.json,t.jsonHint],["csv",t.csv,t.csvHint]];i.append(...a.map(([l,c,d])=>{const r=document.createElement("button");return r.type="button",r.setAttribute("role","menuitem"),r.append(Object.assign(document.createElement("strong"),{textContent:c}),Object.assign(document.createElement("small"),{textContent:d})),r.addEventListener("click",()=>void this.export(l,i)),r}));const n=document.createElement("label");n.className="option",this.withPictures=Object.assign(document.createElement("input"),{type:"checkbox"});const s=document.createElement("span");s.append(Object.assign(document.createElement("strong"),{textContent:t.pictures}),Object.assign(document.createElement("small"),{textContent:t.picturesHint})),n.append(this.withPictures,s),i.append(n),this.status=Object.assign(document.createElement("p"),{className:"status",hidden:!0}),this.status.setAttribute("role","status"),i.append(this.status),o.addEventListener("click",()=>y.show(i,i.hidden)),this.shadowRoot.replaceChildren(e,o,i)}async export(t,e){const o=this.messages;if(this.source){this.status.textContent=o.working,this.status.hidden=!1;try{const[{CaseReportExport:i},a]=await Promise.all([P(()=>import("./CaseReportExport-ZNhCiJjJ.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8]),import.meta.url),this.source()]);await i.make(t,a,this.language,this.preferences,this.withPictures?.checked??!1,(n,s)=>{this.status.textContent=o.drawing.replace("{done}",String(n)).replace("{total}",String(s))}),this.status.hidden=!0,y.show(e,!1)}catch{this.status.textContent=o.failed}}}}const $="interviewchange",j="interviewseek";class w{constructor(t,e,o=e,i,a){this.list=t,this.choose=e,this.follow=o,this.toggle=i,this.fold=a}static CSS=`
34
+ `;source;messages;language="en";preferences=["en"];status;withPictures;static register(){customElements.get(x.TAG)||customElements.define(x.TAG,x)}constructor(){super(),this.attachShadow({mode:"open"})}connectedCallback(){this.messages||this.loadLocale()}async loadLocale(){this.preferences=I.preferencesFor(this),this.language=N([...this.preferences],R),this.messages=await M.load(this.language),this.draw()}draw(){const e=this.messages,n=document.createElement("style");n.textContent=x.CSS;const s=document.createElement("button");s.type="button",s.className="open",s.setAttribute("part","button"),s.title=e.hint,s.setAttribute("aria-label",e.hint),s.setAttribute("aria-haspopup","menu"),s.innerHTML=x.ICON,this.getAttribute("variant")==="pill"&&s.append(Object.assign(document.createElement("span"),{textContent:e.button}));const i=document.createElement("div");i.className="menu",i.setAttribute("role","menu"),y.attach(s,i);const o=[["html",e.html,e.htmlHint],["print",e.print,e.printHint],["json",e.json,e.jsonHint],["csv",e.csv,e.csvHint]];i.append(...o.map(([l,c,d])=>{const r=document.createElement("button");return r.type="button",r.setAttribute("role","menuitem"),r.append(Object.assign(document.createElement("strong"),{textContent:c}),Object.assign(document.createElement("small"),{textContent:d})),r.addEventListener("click",()=>void this.export(l,i)),r}));const t=document.createElement("label");t.className="option",this.withPictures=Object.assign(document.createElement("input"),{type:"checkbox"});const a=document.createElement("span");a.append(Object.assign(document.createElement("strong"),{textContent:e.pictures}),Object.assign(document.createElement("small"),{textContent:e.picturesHint})),t.append(this.withPictures,a),i.append(t),this.status=Object.assign(document.createElement("p"),{className:"status",hidden:!0}),this.status.setAttribute("role","status"),i.append(this.status),s.addEventListener("click",()=>y.show(i,i.hidden)),this.shadowRoot.replaceChildren(n,s,i)}async export(e,n){const s=this.messages;if(this.source){this.status.textContent=s.working,this.status.hidden=!1;try{const[{CaseReportExport:i},o]=await Promise.all([P(()=>import("./CaseReportExport--IhmS67e.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8]),import.meta.url),this.source()]);await i.make(e,o,this.language,this.preferences,this.withPictures?.checked??!1,(t,a)=>{this.status.textContent=s.drawing.replace("{done}",String(t)).replace("{total}",String(a))}),this.status.hidden=!0,y.show(n,!1)}catch{this.status.textContent=s.failed}}}}const j="interviewchange",$="interviewseek";class w{constructor(e,n,s=n,i,o){this.list=e,this.choose=n,this.follow=s,this.toggle=i,this.fold=o}static CSS=`
35
35
  :host {
36
36
  --tl-ink: currentColor;
37
37
  --tl-ink-dim: color-mix(in srgb, currentColor 80%, transparent);
@@ -84,6 +84,20 @@ button.event-mark:focus-visible { outline: 2px solid var(--tl-sky); outline-offs
84
84
  bottom: calc(100% - var(--dot-y) - 1px); width: 1px; transform: translateX(-50%); background: var(--tl-line); pointer-events: none; }
85
85
  .event-card[data-nested]:has(+ .event-card[data-nested])::before { bottom: -1px; }
86
86
  .event-card[data-nested] .event-open::after { left: calc(-24px - 1px - var(--nest)); }
87
+ /* A column made narrower than its cards (dicté 2026-11-21 : « afficher les icônes seulement »): the marks alone on the rail, one under
88
+ the other, each opening its event by the title's hit area, which still covers it; the title said by its tooltip (see card). */
89
+ @container (max-width: 3rem) {
90
+ .event-list { gap: 6px; }
91
+ .event-card { min-height: 26px; border-color: transparent; background: none; overflow: visible; }
92
+ .event-card[data-nested] { margin-left: 0; }
93
+ .event-card[data-nested]::before { display: none; }
94
+ .event-card[data-nested]::after { left: calc(var(--rail) - 24px - 1px); }
95
+ .event-card[data-nested] > .event-mark { left: calc(var(--rail) - 24px - 1px); }
96
+ .event-card > :not(.event-body, .event-mark), .event-body > :not(.event-main), .event-main > :not(.event-open) { display: none !important; }
97
+ .event-body, .event-main { display: block !important; padding: 0 !important; margin: 0 !important; }
98
+ .event-open { display: block; height: 26px; font-size: 0 !important; color: transparent; }
99
+ .event-card[data-nested] .event-open::after { left: calc(-24px - 1px); }
100
+ }
87
101
  /* What folds an observation's readings away or unfolds them: above the title's hit area, at the card's end. */
88
102
  .event-fold { position: relative; z-index: 1; display: inline-flex; align-items: center; gap: 4px; justify-self: end; grid-column: -2 / -1;
89
103
  grid-row: 1; padding: 2px 8px; border: 1px solid var(--tl-line); border-radius: 999px; background: none; color: var(--tl-ink-dim);
@@ -139,20 +153,11 @@ button.event-mark:focus-visible { outline: 2px solid var(--tl-sky); outline-offs
139
153
  --tl-sky: var(--sky);
140
154
  --tl-glow: var(--glow-solid);
141
155
  --tl-sans: var(--sans);
142
- `;static MARKS={observation:A.WITNESS,reading:A.SUMMARY,interview:A.INTERVIEW};static inTime(t,e){const o=a=>{const n=e.when(a);return n!==""||e.kind(a)!=="reading"?n:e.read(a).map(s=>e.when(s)).find(s=>s!=="")??""},i=a=>e.kind(a)==="reading"?1:0;return t.map((a,n)=>({item:a,index:n,when:o(a)})).sort((a,n)=>a.when.localeCompare(n.when)||i(a.item)-i(n.item)||a.index-n.index).map(({item:a,index:n})=>({item:a,index:n}))}static grouped(t,e){const o=new Set(t.filter(({item:n})=>e.kind(n)==="observation").map(({item:n})=>n)),i=new Map;for(const{item:n}of t){if(e.kind(n)!=="reading")continue;const s=e.read(n).find(l=>o.has(l));s!==void 0&&i.set(n,s)}const a=[];for(const n of t)if(!i.has(n.item)&&(a.push(n),!!o.has(n.item)))for(const s of t)i.get(s.item)===n.item&&a.push({...s,under:n.item});return a}static GROUPING_KEY="rr0-case-group-readings";static groupingRemembered(){try{return localStorage.getItem(w.GROUPING_KEY)==="1"}catch{return!1}}static rememberGrouping(t){try{localStorage.setItem(w.GROUPING_KEY,t?"1":"0")}catch{}}static kindLabel(t,e){return{observation:e.kindObservation,reading:e.kindReading,interview:e.kindInterview}[t]}render(t,e,o){this.list.replaceChildren(...t.map(i=>{const a=this.card(i,e);return o?.(i,a),a.card}))}card(t,e){const o=document.createElement("li");o.className="event-card",o.dataset.kind=t.kind,o.dataset.at=String(t.at),t.open&&(o.dataset.open=""),t.nested&&(o.dataset.nested="");const i=document.createElement("span");i.className="kind-pill",i.dataset.kind=t.kind,i.textContent=w.kindLabel(t.kind,e);const a=document.createElement("div");a.className="event-main";const n=document.createElement("button");n.type="button",n.className="event-open",n.textContent=t.title,n.title=e.openEvent,n.addEventListener("click",()=>this.choose(t.at));const s=document.createElement("span");s.className="event-meta",s.textContent=t.meta,a.append(n,s);const l=document.createElement("span");l.className="event-links",l.append(...this.said(t,e));const c=document.createElement("div");if(c.className="event-body",c.append(i,a),t.readings&&t.readings.count>0&&this.fold){const r=document.createElement("button");r.type="button",r.className="event-fold",r.setAttribute("aria-expanded",String(!t.readings.folded)),r.title=(t.readings.folded?e.unfoldReadings:e.foldReadings)??"",r.innerHTML='<svg viewBox="0 0 16 16" aria-hidden="true" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M4 6l4 4 4-4"/></svg>',r.append(String(t.readings.count)),r.addEventListener("click",()=>this.fold(t.at)),c.append(r)}c.append(l);const d=document.createElement(this.toggle?"button":"span");return d.className="event-mark",d.innerHTML=w.MARKS[t.kind],d instanceof HTMLButtonElement?(d.type="button",d.title=e.toggleEvent??e.openEvent,d.setAttribute("aria-label",`${d.title} — ${t.title}`),d.setAttribute("aria-pressed",String(t.open===!0)),d.addEventListener("click",()=>this.toggle(t.at))):d.setAttribute("aria-hidden","true"),o.append(c,d),{card:o,body:c,links:l}}said(t,e){const o=[],i=t.links?.to??[];if(t.links&&i.length>0){const a=i.map(n=>this.renvoi(n.at,n.title,e));o.push(`${t.links.heading} `,...a.flatMap((n,s)=>s===0?[n]:[document.createTextNode(s===a.length-1?` ${e.linkAnd} `:", "),n]))}return t.by&&o.push(`${o.length>0?" ":""}${e.byAuthor} ${t.by}`),o}renvoi(t,e,o){const i=document.createElement("a");i.href="#",i.className="event-ref",i.textContent=e,i.title=o.openEvent,i.addEventListener("click",n=>{n.preventDefault(),this.follow(t)});const a=n=>this.list.querySelectorAll(`.event-card[data-at="${t}"]`).forEach(s=>s.classList.toggle("event-aimed",n));for(const[n,s]of[["mouseenter",!0],["mouseleave",!1],["focus",!0],["blur",!1]])i.addEventListener(n,()=>a(s));return i}}class S{constructor(t,e,o,i,a=S.PROPERTY,n=S.MIN_PX){this.grip=t,this.host=e,this.column=o,this.key=i,this.property=a,this.minPx=n;try{const s=localStorage.getItem(i);s&&/^\d+px$/.test(s)&&e.style.setProperty(a,s)}catch{}t.setAttribute("role","separator"),t.setAttribute("aria-orientation","vertical"),t.tabIndex=0,t.addEventListener("pointerdown",s=>{s.preventDefault();const l=s.clientX,c=this.column().getBoundingClientRect().width;t.setPointerCapture?.(s.pointerId),t.classList.add("dragging");const d=v=>this.set(c+v.clientX-l),r=()=>{t.classList.remove("dragging"),t.removeEventListener("pointermove",d),t.removeEventListener("pointerup",r),t.removeEventListener("pointercancel",r)};t.addEventListener("pointermove",d),t.addEventListener("pointerup",r),t.addEventListener("pointercancel",r)}),t.addEventListener("keydown",s=>{s.key!=="ArrowLeft"&&s.key!=="ArrowRight"||(s.preventDefault(),this.set(this.column().getBoundingClientRect().width+(s.key==="ArrowLeft"?-20:20)))}),t.addEventListener("dblclick",()=>this.set(void 0))}static CASE_HISTORY_KEY="rr0-case-list-width";static PROPERTY="--rr0-list-width";static CSS=`
156
+ `;static MARKS={observation:A.WITNESS,reading:A.SUMMARY,interview:A.INTERVIEW};static inTime(e,n){const s=o=>{const t=n.when(o);return t!==""||n.kind(o)!=="reading"?t:n.read(o).map(a=>n.when(a)).find(a=>a!=="")??""},i=o=>n.kind(o)==="reading"?1:0;return e.map((o,t)=>({item:o,index:t,when:s(o)})).sort((o,t)=>o.when.localeCompare(t.when)||i(o.item)-i(t.item)||o.index-t.index).map(({item:o,index:t})=>({item:o,index:t}))}static grouped(e,n){const s=new Set(e.filter(({item:t})=>n.kind(t)==="observation").map(({item:t})=>t)),i=new Map;for(const{item:t}of e){if(n.kind(t)!=="reading")continue;const a=n.read(t).find(l=>s.has(l));a!==void 0&&i.set(t,a)}const o=[];for(const t of e)if(!i.has(t.item)&&(o.push(t),!!s.has(t.item)))for(const a of e)i.get(a.item)===t.item&&o.push({...a,under:t.item});return o}static GROUPING_KEY="rr0-case-group-readings";static groupingRemembered(){try{return localStorage.getItem(w.GROUPING_KEY)==="1"}catch{return!1}}static rememberGrouping(e){try{localStorage.setItem(w.GROUPING_KEY,e?"1":"0")}catch{}}static kindLabel(e,n){return{observation:n.kindObservation,reading:n.kindReading,interview:n.kindInterview}[e]}render(e,n,s){this.list.replaceChildren(...e.map(i=>{const o=this.card(i,n);return s?.(i,o),o.card}))}card(e,n){const s=document.createElement("li");s.className="event-card",s.dataset.kind=e.kind,s.dataset.at=String(e.at),e.open&&(s.dataset.open=""),e.nested&&(s.dataset.nested="");const i=document.createElement("span");i.className="kind-pill",i.dataset.kind=e.kind,i.textContent=w.kindLabel(e.kind,n);const o=document.createElement("div");o.className="event-main";const t=document.createElement("button");t.type="button",t.className="event-open",t.textContent=e.title,t.title=e.title||n.openEvent,t.addEventListener("click",()=>this.choose(e.at));const a=document.createElement("span");a.className="event-meta",a.textContent=e.meta,o.append(t,a);const l=document.createElement("span");l.className="event-links",l.append(...this.said(e,n));const c=document.createElement("div");if(c.className="event-body",c.append(i,o),e.readings&&e.readings.count>0&&this.fold){const r=document.createElement("button");r.type="button",r.className="event-fold",r.setAttribute("aria-expanded",String(!e.readings.folded)),r.title=(e.readings.folded?n.unfoldReadings:n.foldReadings)??"",r.innerHTML='<svg viewBox="0 0 16 16" aria-hidden="true" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M4 6l4 4 4-4"/></svg>',r.append(String(e.readings.count)),r.addEventListener("click",()=>this.fold(e.at)),c.append(r)}c.append(l);const d=document.createElement(this.toggle?"button":"span");return d.className="event-mark",d.innerHTML=w.MARKS[e.kind],d instanceof HTMLButtonElement?(d.type="button",d.title=n.toggleEvent??n.openEvent,d.setAttribute("aria-label",`${d.title} — ${e.title}`),d.setAttribute("aria-pressed",String(e.open===!0)),d.addEventListener("click",()=>this.toggle(e.at))):d.setAttribute("aria-hidden","true"),s.append(c,d),{card:s,body:c,links:l}}said(e,n){const s=[],i=e.links?.to??[];if(e.links&&i.length>0){const o=i.map(t=>this.renvoi(t.at,t.title,n));s.push(`${e.links.heading} `,...o.flatMap((t,a)=>a===0?[t]:[document.createTextNode(a===o.length-1?` ${n.linkAnd} `:", "),t]))}return e.by&&s.push(`${s.length>0?" ":""}${n.byAuthor} ${e.by}`),s}renvoi(e,n,s){const i=document.createElement("a");i.href="#",i.className="event-ref",i.textContent=n,i.title=s.openEvent,i.addEventListener("click",t=>{t.preventDefault(),this.follow(e)});const o=t=>this.list.querySelectorAll(`.event-card[data-at="${e}"]`).forEach(a=>a.classList.toggle("event-aimed",t));for(const[t,a]of[["mouseenter",!0],["mouseleave",!1],["focus",!0],["blur",!1]])i.addEventListener(t,()=>o(a));return i}}class S{constructor(e,n,s,i,o=S.PROPERTY,t=S.MIN_PX){this.grip=e,this.host=n,this.column=s,this.key=i,this.property=o,this.minPx=t;try{const a=localStorage.getItem(i);a&&/^\d+px$/.test(a)&&n.style.setProperty(o,a)}catch{}e.setAttribute("role","separator"),e.setAttribute("aria-orientation","vertical"),e.tabIndex=0,e.addEventListener("pointerdown",a=>{a.preventDefault();const l=a.clientX,c=this.column().getBoundingClientRect().width;e.setPointerCapture?.(a.pointerId),e.classList.add("dragging");const d=f=>this.set(c+f.clientX-l),r=()=>{e.classList.remove("dragging"),e.removeEventListener("pointermove",d),e.removeEventListener("pointerup",r),e.removeEventListener("pointercancel",r)};e.addEventListener("pointermove",d),e.addEventListener("pointerup",r),e.addEventListener("pointercancel",r)}),e.addEventListener("keydown",a=>{a.key!=="ArrowLeft"&&a.key!=="ArrowRight"||(a.preventDefault(),this.set(this.column().getBoundingClientRect().width+(a.key==="ArrowLeft"?-20:20)))}),e.addEventListener("dblclick",()=>this.set(void 0))}static CASE_HISTORY_KEY="rr0-case-list-width";static PROPERTY="--rr0-list-width";static CSS=`
143
157
  .column-resize { display: none; position: relative; justify-self: end; align-self: stretch; width: 12px; z-index: 3; cursor: col-resize;
144
158
  touch-action: none; }
145
159
  .column-resize::after { content: ""; position: absolute; top: 0; bottom: 0; left: 50%; width: 3px; margin-left: -1.5px; border-radius: 2px;
146
160
  background: var(--line-strong, rgba(127, 127, 127, .5)); opacity: 0; transition: opacity .15s ease; }
147
161
  .column-resize:is(:hover, :focus-visible, .dragging)::after { opacity: 1; }
148
162
  .column-resize:focus-visible { outline: none; }
149
- /* The button that folds the column away and back, at the top of the grip, on its line: in the gap between the columns, as wide as the
150
- gap (18px), so that it stands over neither of them (wider, it covered the kind of the event open). A grid with another gap moves it. */
151
- .column-fold { display: none; position: sticky; top: 2px; z-index: 4; align-self: start; justify-self: end; box-sizing: border-box; width: 18px; height: 18px;
152
- min-width: 0; min-height: 0; margin: 0 var(--rr0-column-fold-margin, -18px) 0 0; padding: 0; border: 1px solid var(--line-strong, rgba(127, 127, 127, .5));
153
- border-radius: 50%; background: var(--ground-raised, Canvas); color: var(--ink-dim, inherit); font: 600 13px/1 var(--sans, inherit); cursor: pointer; }
154
- .column-fold::before { content: "‹"; display: block; margin-top: -1px; }
155
- [data-folded] > .column-fold::before { content: "›"; }
156
- .column-fold:hover { color: var(--ink, CanvasText); }
157
- .column-fold:focus-visible { outline: 2px solid var(--sky, Highlight); outline-offset: 2px; }
158
- `;static MIN_PX=200;static OTHER_MIN_PX=320;label(t){this.grip.title=t,this.grip.setAttribute("aria-label",t)}fold;foldWith(t){this.fold={button:t,fold:"",unfold:""};let e=!1;try{e=localStorage.getItem(`${this.key}-folded`)==="true"}catch{}this.setFolded(e),t.addEventListener("click",()=>this.setFolded(!this.folded))}foldLabels(t,e){this.fold&&(this.fold.fold=t,this.fold.unfold=e,this.setFolded(this.folded))}get folded(){return this.host.hasAttribute("data-folded")}setFolded(t){this.host.toggleAttribute("data-folded",t);const e=this.fold;if(e){const o=t?e.unfold:e.fold;e.button.title=o,e.button.setAttribute("aria-label",o),e.button.setAttribute("aria-expanded",String(!t))}try{t?localStorage.setItem(`${this.key}-folded`,"true"):localStorage.removeItem(`${this.key}-folded`)}catch{}}set(t){const e=this.host;if(t===void 0)e.style.removeProperty(this.property);else{const o=Math.max(this.minPx,e.getBoundingClientRect().width-S.OTHER_MIN_PX);e.style.setProperty(this.property,`${Math.round(Math.min(o,Math.max(this.minPx,t)))}px`)}try{t===void 0?localStorage.removeItem(this.key):localStorage.setItem(this.key,e.style.getPropertyValue(this.property))}catch{}}}export{S as C,j as I,f as R,w as a,x as b,$ as c};
163
+ `;static MIN_PX=200;static OTHER_MIN_PX=320;label(e){this.grip.title=e,this.grip.setAttribute("aria-label",e)}set(e){const n=this.host;if(e===void 0)n.style.removeProperty(this.property);else{const s=Math.max(this.minPx,n.getBoundingClientRect().width-S.OTHER_MIN_PX);n.style.setProperty(this.property,`${Math.round(Math.min(s,Math.max(this.minPx,e)))}px`)}try{e===void 0?localStorage.removeItem(this.key):localStorage.setItem(this.key,n.style.getPropertyValue(this.property))}catch{}}}export{S as C,$ as I,v as R,w as a,x as b,j as c};