@rr0/ufoathome 0.192.0 → 0.193.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist-embed-interview/rr0-interview.mjs +3 -3
- package/dist-embed-scene/rr0-scene.mjs +306 -306
- package/dist-embed-sighting/CaseMessages_en-BbbbikHH.js +1 -0
- package/dist-embed-sighting/CaseMessages_es-AHBxl8Ka.js +1 -0
- package/dist-embed-sighting/CaseMessages_fr-CD33PQCH.js +1 -0
- package/dist-embed-sighting/CaseMessages_it-DyMACGSU.js +1 -0
- package/dist-embed-sighting/{CaseReportExport-dMWWJNIh.js → CaseReportExport-CYeoYzU0.js} +1 -1
- package/dist-embed-sighting/rr0-sighting.mjs +345 -330
- package/dist-embed-sighting-editor/{AdsbLolArchiveProvider-BrZzIuec.js → AdsbLolArchiveProvider--KjPxNqw.js} +1 -1
- package/dist-embed-sighting-editor/{BallesterGuaspAssessor-CXvIvYxV.js → BallesterGuaspAssessor-BTmq0r-G.js} +1 -1
- package/dist-embed-sighting-editor/{BeamEditor-5-OlhNfL.js → BeamEditor-CI8-9VOc.js} +1 -1
- package/dist-embed-sighting-editor/{BeamSystem-BGdR-Xez.js → BeamSystem-odg570aR.js} +1 -1
- package/dist-embed-sighting-editor/BirdEditor-DV3ndYff.js +16 -0
- package/dist-embed-sighting-editor/{BirdFlock-DtshFXGT.js → BirdFlock-O7K_g8y7.js} +1 -1
- package/dist-embed-sighting-editor/{BodyEditor-Dn5HrH2t.js → BodyEditor-COLTBHzX.js} +1 -1
- package/dist-embed-sighting-editor/{CaseEditorMessages_en-DrJY0M8h.js → CaseEditorMessages_en-CoFukfwf.js} +1 -1
- package/dist-embed-sighting-editor/{CaseEditorMessages_es-j8EeOBq6.js → CaseEditorMessages_es-DZptbzB7.js} +1 -1
- package/dist-embed-sighting-editor/{CaseEditorMessages_fr-BkwEF9mu.js → CaseEditorMessages_fr-DXl2GNmR.js} +1 -1
- package/dist-embed-sighting-editor/{CaseEditorMessages_it-d3Z0PBEw.js → CaseEditorMessages_it-ss10VmRM.js} +1 -1
- package/dist-embed-sighting-editor/CaseElement-Bo31UxpS.js +100 -0
- package/dist-embed-sighting-editor/CaseMessages_en-BbbbikHH.js +1 -0
- package/dist-embed-sighting-editor/CaseMessages_es-AHBxl8Ka.js +1 -0
- package/dist-embed-sighting-editor/CaseMessages_fr-CD33PQCH.js +1 -0
- package/dist-embed-sighting-editor/CaseMessages_it-DyMACGSU.js +1 -0
- package/dist-embed-sighting-editor/{CaseReportExport-ByPXoIiq.js → CaseReportExport-DpsJ5_r9.js} +2 -2
- package/dist-embed-sighting-editor/{ContrailSystem-BTVyJpmn.js → ContrailSystem-BddkU7fj.js} +1 -1
- package/dist-embed-sighting-editor/{ControlPasses-DiQAXMzD.js → ControlPasses-CNlCUT1L.js} +1 -1
- package/dist-embed-sighting-editor/{CoverageAssessor-CJQzNdyr.js → CoverageAssessor-DjY8iKp5.js} +1 -1
- package/dist-embed-sighting-editor/DroneEditor-DRsM2ash.js +16 -0
- package/dist-embed-sighting-editor/{DroneFlight-tXCk1Tg1.js → DroneFlight-Fr4Vgso3.js} +1 -1
- package/dist-embed-sighting-editor/{Flightradar24Provider-DUVcPAF2.js → Flightradar24Provider-BxeduRam.js} +1 -1
- package/dist-embed-sighting-editor/GLTFLoader-C6nlGTTi.js +1 -0
- package/dist-embed-sighting-editor/{GenerativeKitMessages-I8xH2ec9.js → GenerativeKitMessages-B8L7U7gD.js} +1 -1
- package/dist-embed-sighting-editor/{GeoExportTexts-DAllttgw.js → GeoExportTexts-DrGdI2OF.js} +1 -1
- package/dist-embed-sighting-editor/{GeoJsonExport-_yjIEd4F.js → GeoJsonExport-BZ-0v8fM.js} +1 -1
- package/dist-embed-sighting-editor/GeographicFigures-DqhWddS9.js +1 -0
- package/dist-embed-sighting-editor/{HeadlightSystem-DRq40K7R.js → HeadlightSystem-DI5wHYZu.js} +1 -1
- package/dist-embed-sighting-editor/{HynekAssessor-PxE7JR1h.js → HynekAssessor-DlXalbph.js} +1 -1
- package/dist-embed-sighting-editor/InterviewEditorElement-Bbkze5KE.js +240 -0
- package/dist-embed-sighting-editor/InterviewElement-B3tm7y49.js +31 -0
- package/dist-embed-sighting-editor/{KmlExport-dpml2tIJ.js → KmlExport-Bh4eTycx.js} +1 -1
- package/dist-embed-sighting-editor/LanternEditor-M887ltwe.js +24 -0
- package/dist-embed-sighting-editor/{LaserBeam-CadJcSMd.js → LaserBeam-Drpkr84G.js} +1 -1
- package/dist-embed-sighting-editor/LaunchEditor-BjAk4XZR.js +22 -0
- package/dist-embed-sighting-editor/{LaunchPlume-C7My5ccR.js → LaunchPlume-CrzPcqw7.js} +1 -1
- package/dist-embed-sighting-editor/{LaunchSimulation-45Z9GUBF.js → LaunchSimulation-C1ZWpKZT.js} +1 -1
- package/dist-embed-sighting-editor/{ModelSource-CzGHu4XS.js → ModelSource-Bko_3OJt.js} +1 -1
- package/dist-embed-sighting-editor/{ModelThumbnails-CNO_j-KM.js → ModelThumbnails-DSshyLu2.js} +1 -1
- package/dist-embed-sighting-editor/{ModelViewer-yfIxofpG.js → ModelViewer-_yhAYvNy.js} +1 -1
- package/dist-embed-sighting-editor/{ModuleConformance-C9DED8Lk.js → ModuleConformance-B6iFVb8X.js} +2 -2
- package/dist-embed-sighting-editor/{ModuleSession-Cxe0BJue.js → ModuleSession-jKFl1FMo.js} +3 -3
- package/dist-embed-sighting-editor/ModuleThree-Fvr5G-Yh.js +1 -0
- package/dist-embed-sighting-editor/{ModulesPanelElement-DgbOYqaS.js → ModulesPanelElement-VPRCdjmv.js} +3 -3
- package/dist-embed-sighting-editor/{NearestApproach-EbQIYGTt.js → NearestApproach-O8k2n_qL.js} +1 -1
- package/dist-embed-sighting-editor/PictureRegistration-DBBH_E6I.js +1 -0
- package/dist-embed-sighting-editor/{PoherAssessor-BisQ5ybV.js → PoherAssessor-sTJEnlmb.js} +1 -1
- package/dist-embed-sighting-editor/{RailwaySystem-CIAIBvLT.js → RailwaySystem-BZqNSSFA.js} +1 -1
- package/dist-embed-sighting-editor/ReentryEditor-DfDGpL5C.js +28 -0
- package/dist-embed-sighting-editor/{ReentrySimulation-Crd-CW_o.js → ReentrySimulation-BuUK0niI.js} +1 -1
- package/dist-embed-sighting-editor/{ReferenceSystem-DUIJceGg.js → ReferenceSystem-DvcQp167.js} +1 -1
- package/dist-embed-sighting-editor/{RoadMarkings-D9-6Cy9S.js → RoadMarkings-BGK7ToZP.js} +1 -1
- package/dist-embed-sighting-editor/SightingEditorMessages_en-CTQYcybj.js +12 -0
- package/dist-embed-sighting-editor/SightingEditorMessages_es-D-ASD5a3.js +12 -0
- package/dist-embed-sighting-editor/SightingEditorMessages_fr-DjUByAq4.js +12 -0
- package/dist-embed-sighting-editor/SightingEditorMessages_it-Eat0U-4p.js +12 -0
- package/dist-embed-sighting-editor/SightingElement-FJvhqoCj.js +693 -0
- package/dist-embed-sighting-editor/SightingLabels_en-oIpytoq_.js +1 -0
- package/dist-embed-sighting-editor/SightingLabels_es-DUh1CTXl.js +1 -0
- package/dist-embed-sighting-editor/SightingLabels_fr-D69zENbW.js +1 -0
- package/dist-embed-sighting-editor/SightingLabels_it-COLZ2Qth.js +1 -0
- package/dist-embed-sighting-editor/SightingMessages_en-CYzanHjT.js +1 -0
- package/dist-embed-sighting-editor/SightingMessages_es-hjvESK6f.js +1 -0
- package/dist-embed-sighting-editor/SightingMessages_fr-BtfWbIP7.js +1 -0
- package/dist-embed-sighting-editor/SightingMessages_it-Bqm4pewZ.js +1 -0
- package/dist-embed-sighting-editor/{SkyLantern-De_MXfQz.js → SkyLantern-B7UlFgmB.js} +1 -1
- package/dist-embed-sighting-editor/{TraceSystem-Ba5H90GB.js → TraceSystem-vZF4B5EC.js} +2 -2
- package/dist-embed-sighting-editor/{UfoMessages_en-FAvzKxmR.js → UfoMessages_en-JeMK-39o.js} +1 -1
- package/dist-embed-sighting-editor/VideoButton-Kxg7pF1Y.js +1 -0
- package/dist-embed-sighting-editor/{WaterSystem-Dpdw46hF.js → WaterSystem-DSWmZbiL.js} +2 -2
- package/dist-embed-sighting-editor/{interviewImport-CgWyTdKb.js → interviewImport-BlSMFEw_.js} +1 -1
- package/dist-embed-sighting-editor/interviewJson-CsMHIcZ-.js +8 -0
- package/dist-embed-sighting-editor/rr0-sighting-editor.mjs +440 -393
- package/dist-embed-sighting-editor/{surroundingsSources-YIawBCws.js → surroundingsSources-z7680fTA.js} +1 -1
- package/dist-embed-sighting-editor/{trafficRuntime-DwnTE9-7.js → trafficRuntime-C5BXL-G6.js} +1 -1
- package/dist-embed-ufoathome/Account-C4jhsVtN.js +1 -0
- package/dist-embed-ufoathome/AdsbLolArchiveProvider-886uuL_s.js +1 -0
- package/dist-embed-ufoathome/AssemblyAiTranscriptionProvider-o2kkPD5o.js +1 -0
- package/dist-embed-ufoathome/BallesterGuaspAssessor-BSKybYn0.js +1 -0
- package/dist-embed-ufoathome/BeamEditor-U2XQEG_6.js +30 -0
- package/dist-embed-ufoathome/BeamEditorMessages_en-DDvPWAdd.js +1 -0
- package/dist-embed-ufoathome/BeamEditorMessages_es-BhCkhUkN.js +1 -0
- package/dist-embed-ufoathome/BeamEditorMessages_fr-CtX6uP-x.js +1 -0
- package/dist-embed-ufoathome/BeamEditorMessages_it-DVweRQFi.js +1 -0
- package/dist-embed-ufoathome/BeamKindMessages_en-5RezNkyz.js +1 -0
- package/dist-embed-ufoathome/BeamKindMessages_es-B5vSWVjK.js +1 -0
- package/dist-embed-ufoathome/BeamKindMessages_fr--28-36OI.js +1 -0
- package/dist-embed-ufoathome/BeamKindMessages_it-X53Fuf2U.js +1 -0
- package/dist-embed-ufoathome/BeamParameterTexts_en-DZB75ouZ.js +1 -0
- package/dist-embed-ufoathome/BeamParameterTexts_es-AeZmsufG.js +1 -0
- package/dist-embed-ufoathome/BeamParameterTexts_fr-BHG3fW40.js +1 -0
- package/dist-embed-ufoathome/BeamParameterTexts_it-CPwmQX-g.js +1 -0
- package/dist-embed-ufoathome/BeamSystem-eYdKPRQZ.js +1 -0
- package/dist-embed-ufoathome/BirdEditor-6vr7bLHy.js +16 -0
- package/dist-embed-ufoathome/BirdEditorMessages_en-CN1OJud9.js +1 -0
- package/dist-embed-ufoathome/BirdEditorMessages_es-DDEnjRrz.js +1 -0
- package/dist-embed-ufoathome/BirdEditorMessages_fr-hL72V8wm.js +1 -0
- package/dist-embed-ufoathome/BirdEditorMessages_it-BmLyiPYp.js +1 -0
- package/dist-embed-ufoathome/BirdFlock-ByBkJV35.js +1 -0
- package/dist-embed-ufoathome/BirdKindMessages_en-c_-L7frF.js +1 -0
- package/dist-embed-ufoathome/BirdKindMessages_es-8Zo2t0o4.js +1 -0
- package/dist-embed-ufoathome/BirdKindMessages_fr-C1TuqqEj.js +1 -0
- package/dist-embed-ufoathome/BirdKindMessages_it-DQZcrCkf.js +1 -0
- package/dist-embed-ufoathome/BirdParameterTexts_en-C6FkYUww.js +1 -0
- package/dist-embed-ufoathome/BirdParameterTexts_es-T8JyeNlI.js +1 -0
- package/dist-embed-ufoathome/BirdParameterTexts_fr-BiTR-olu.js +1 -0
- package/dist-embed-ufoathome/BirdParameterTexts_it-oQY4DX6B.js +1 -0
- package/dist-embed-ufoathome/BodyEditor-CRlKW7yl.js +28 -0
- package/dist-embed-ufoathome/BodyEditorMessages_en-CckxSS1L.js +1 -0
- package/dist-embed-ufoathome/BodyEditorMessages_es-B8GlFFBo.js +1 -0
- package/dist-embed-ufoathome/BodyEditorMessages_fr-638ypdqf.js +1 -0
- package/dist-embed-ufoathome/BodyEditorMessages_it-SKpMkHFI.js +1 -0
- package/dist-embed-ufoathome/BodyParameterTexts_en-CKiFdpaz.js +1 -0
- package/dist-embed-ufoathome/BodyParameterTexts_es-DT9XO1Hc.js +1 -0
- package/dist-embed-ufoathome/BodyParameterTexts_fr-B5jLsE0g.js +1 -0
- package/dist-embed-ufoathome/BodyParameterTexts_it-iyJGx4Ta.js +1 -0
- package/dist-embed-ufoathome/BrowserWhisperProvider-Dn44ZE45.js +1 -0
- package/dist-embed-ufoathome/CaseEditorElement-Ds4yB5UC.js +3033 -0
- package/dist-embed-ufoathome/CaseEditorMessages_en-CoFukfwf.js +1 -0
- package/dist-embed-ufoathome/CaseEditorMessages_es-DZptbzB7.js +1 -0
- package/dist-embed-ufoathome/CaseEditorMessages_fr-DXl2GNmR.js +1 -0
- package/dist-embed-ufoathome/CaseEditorMessages_it-ss10VmRM.js +1 -0
- package/dist-embed-ufoathome/CaseElement-fKdvuMAp.js +100 -0
- package/dist-embed-ufoathome/CaseExportMessages_en-jHlu58Y7.js +1 -0
- package/dist-embed-ufoathome/CaseExportMessages_es-dCQQFgjq.js +1 -0
- package/dist-embed-ufoathome/CaseExportMessages_fr-sDfEgjWg.js +1 -0
- package/dist-embed-ufoathome/CaseExportMessages_it-BJaglZtP.js +1 -0
- package/dist-embed-ufoathome/CaseMessages_en-BbbbikHH.js +1 -0
- package/dist-embed-ufoathome/CaseMessages_es-AHBxl8Ka.js +1 -0
- package/dist-embed-ufoathome/CaseMessages_fr-CD33PQCH.js +1 -0
- package/dist-embed-ufoathome/CaseMessages_it-DyMACGSU.js +1 -0
- package/dist-embed-ufoathome/CaseReportExport-Dy1xmhTI.js +66 -0
- package/dist-embed-ufoathome/CaseReportTexts_en-DlN7p1pC.js +1 -0
- package/dist-embed-ufoathome/CaseReportTexts_es-CncAEaey.js +1 -0
- package/dist-embed-ufoathome/CaseReportTexts_fr-B5nP6RlP.js +1 -0
- package/dist-embed-ufoathome/CaseReportTexts_it-Dc-oPmXB.js +1 -0
- package/dist-embed-ufoathome/CaseTimeline-Dq1H2Ucy.js +142 -0
- package/dist-embed-ufoathome/ClaudeNarrativeTexts_en-CBLJZ7b6.js +1 -0
- package/dist-embed-ufoathome/ClaudeNarrativeTexts_es-BDV0GimU.js +1 -0
- package/dist-embed-ufoathome/ClaudeNarrativeTexts_fr-DiKzTF9T.js +1 -0
- package/dist-embed-ufoathome/ClaudeNarrativeTexts_it-DwxjRDVG.js +1 -0
- package/dist-embed-ufoathome/CloudEditorMessages_en-SmcRKW1O.js +1 -0
- package/dist-embed-ufoathome/CloudEditorMessages_es-DFCuS9Qg.js +1 -0
- package/dist-embed-ufoathome/CloudEditorMessages_fr-SvL-CR04.js +1 -0
- package/dist-embed-ufoathome/CloudEditorMessages_it-BvfiHWV9.js +1 -0
- package/dist-embed-ufoathome/CloudParameterTexts_en-NIa0gfgA.js +1 -0
- package/dist-embed-ufoathome/CloudParameterTexts_es-DXu4T30p.js +1 -0
- package/dist-embed-ufoathome/CloudParameterTexts_fr-Bv-jc2dq.js +1 -0
- package/dist-embed-ufoathome/CloudParameterTexts_it-C3RrkRwI.js +1 -0
- package/dist-embed-ufoathome/ContrailGrowth-DwHS8If9.js +1 -0
- package/dist-embed-ufoathome/ContrailSystem-pwF1XPex.js +1 -0
- package/dist-embed-ufoathome/ControlPasses-ApTdQK9r.js +29 -0
- package/dist-embed-ufoathome/CoverageAssessor-DFMo5umu.js +1 -0
- package/dist-embed-ufoathome/Decor-Dn-cvniW.js +1 -0
- package/dist-embed-ufoathome/DecorParameterTexts_en-idbdHsFG.js +1 -0
- package/dist-embed-ufoathome/DecorParameterTexts_es-CIkkLQc2.js +1 -0
- package/dist-embed-ufoathome/DecorParameterTexts_fr-D9GeuW_Y.js +1 -0
- package/dist-embed-ufoathome/DecorParameterTexts_it-v7TBrnsr.js +1 -0
- package/dist-embed-ufoathome/DecoyFlare-DUt1_LcW.js +1 -0
- package/dist-embed-ufoathome/DroneEditor-C3SH8yYq.js +16 -0
- package/dist-embed-ufoathome/DroneEditorMessages_en-BViHK30c.js +1 -0
- package/dist-embed-ufoathome/DroneEditorMessages_es-D6bhIOAa.js +1 -0
- package/dist-embed-ufoathome/DroneEditorMessages_fr-CvV0RyOT.js +1 -0
- package/dist-embed-ufoathome/DroneEditorMessages_it-CYi-jmVN.js +1 -0
- package/dist-embed-ufoathome/DroneFlight-CGNIh9XS.js +1 -0
- package/dist-embed-ufoathome/DroneKindMessages_en-CLygXcsv.js +1 -0
- package/dist-embed-ufoathome/DroneKindMessages_es-B9XFRYnQ.js +1 -0
- package/dist-embed-ufoathome/DroneKindMessages_fr-CAX15_pk.js +1 -0
- package/dist-embed-ufoathome/DroneKindMessages_it-CSGsCaJQ.js +1 -0
- package/dist-embed-ufoathome/DroneParameterTexts_en-sL1dR2RG.js +1 -0
- package/dist-embed-ufoathome/DroneParameterTexts_es-Bg8_8XVE.js +1 -0
- package/dist-embed-ufoathome/DroneParameterTexts_fr-B8Ym7Yz6.js +1 -0
- package/dist-embed-ufoathome/DroneParameterTexts_it-DfvWjvoc.js +1 -0
- package/dist-embed-ufoathome/FilmChrome-DYiyzoB_.js +1 -0
- package/dist-embed-ufoathome/FlareKindMessages_en-j3CY_TxX.js +1 -0
- package/dist-embed-ufoathome/FlareKindMessages_es-CZgrFIOO.js +1 -0
- package/dist-embed-ufoathome/FlareKindMessages_fr-B2MezoN2.js +1 -0
- package/dist-embed-ufoathome/FlareKindMessages_it-CmZmb3RP.js +1 -0
- package/dist-embed-ufoathome/Flightradar24Provider-BT0RC4qJ.js +1 -0
- package/dist-embed-ufoathome/GLTFLoader-DpXgTKpb.js +1 -0
- package/dist-embed-ufoathome/GenerativeKit-BmhvjjzB.js +9 -0
- package/dist-embed-ufoathome/GenerativeKitMessages-BwG7cWZX.js +1 -0
- package/dist-embed-ufoathome/GenerativeKitMessages_en-BY4B6yas.js +34 -0
- package/dist-embed-ufoathome/GenerativeKitMessages_es-_iYkoRhK.js +34 -0
- package/dist-embed-ufoathome/GenerativeKitMessages_fr-BY5yUJwK.js +34 -0
- package/dist-embed-ufoathome/GenerativeKitMessages_it-DAgB31P1.js +34 -0
- package/dist-embed-ufoathome/GeoExportTexts-3a51cuxQ.js +1 -0
- package/dist-embed-ufoathome/GeoExportTexts_en-Dq0fSJQp.js +1 -0
- package/dist-embed-ufoathome/GeoExportTexts_es-CoVHdOo0.js +1 -0
- package/dist-embed-ufoathome/GeoExportTexts_fr-DVAMpZIR.js +1 -0
- package/dist-embed-ufoathome/GeoExportTexts_it-Bh1uJBQp.js +1 -0
- package/dist-embed-ufoathome/GeoJsonExport-bpBmwqb7.js +2 -0
- package/dist-embed-ufoathome/GeoJsonImport-CIftC0ws.js +1 -0
- package/dist-embed-ufoathome/GeographicFigures-B0Bqeh10.js +1 -0
- package/dist-embed-ufoathome/GhostSearchView-Dlhj3xWa.js +1 -0
- package/dist-embed-ufoathome/HeadlightSystem-CMT7XiIH.js +34 -0
- package/dist-embed-ufoathome/HynekAssessor-qlHGyZnD.js +1 -0
- package/dist-embed-ufoathome/InterviewEditorElement-B33-sGHI.js +240 -0
- package/dist-embed-ufoathome/InterviewElement-CiZNhb70.js +31 -0
- package/dist-embed-ufoathome/InterviewMedia-CvAxC62V.js +1 -0
- package/dist-embed-ufoathome/InterviewMessages_en-ru7GkZlQ.js +1 -0
- package/dist-embed-ufoathome/InterviewMessages_es-DkJurNrG.js +1 -0
- package/dist-embed-ufoathome/InterviewMessages_fr-DAYgf8Ms.js +1 -0
- package/dist-embed-ufoathome/InterviewMessages_it-6lenkmSg.js +1 -0
- package/dist-embed-ufoathome/KmlExport-gFuPcL9A.js +19 -0
- package/dist-embed-ufoathome/KmlImport-BMAfiqoV.js +1 -0
- package/dist-embed-ufoathome/LanternEditor-BaRDgTw-.js +24 -0
- package/dist-embed-ufoathome/LanternEditorMessages_en-DaT3UNfD.js +1 -0
- package/dist-embed-ufoathome/LanternEditorMessages_es-TDV5lKeJ.js +1 -0
- package/dist-embed-ufoathome/LanternEditorMessages_fr-9mByTFMG.js +1 -0
- package/dist-embed-ufoathome/LanternEditorMessages_it-MRkJnDQp.js +1 -0
- package/dist-embed-ufoathome/LanternKindMessages_en-CQXdJ-k6.js +1 -0
- package/dist-embed-ufoathome/LanternKindMessages_es-BOO6kPjs.js +1 -0
- package/dist-embed-ufoathome/LanternKindMessages_fr-D7tQa_tQ.js +1 -0
- package/dist-embed-ufoathome/LanternKindMessages_it-B8J-29Mj.js +1 -0
- package/dist-embed-ufoathome/LanternParameterTexts_en-CcnGd8UH.js +1 -0
- package/dist-embed-ufoathome/LanternParameterTexts_es-CUTgNutZ.js +1 -0
- package/dist-embed-ufoathome/LanternParameterTexts_fr-P2JwYOUy.js +1 -0
- package/dist-embed-ufoathome/LanternParameterTexts_it-CzNnIUrX.js +1 -0
- package/dist-embed-ufoathome/LaserBeam-BKuiBaAN.js +1 -0
- package/dist-embed-ufoathome/LaunchEditor-CFsq327k.js +22 -0
- package/dist-embed-ufoathome/LaunchEditorMessages_en-BnzNAYW9.js +1 -0
- package/dist-embed-ufoathome/LaunchEditorMessages_es-BE0dEl7I.js +1 -0
- package/dist-embed-ufoathome/LaunchEditorMessages_fr-Ds_VOB8c.js +1 -0
- package/dist-embed-ufoathome/LaunchEditorMessages_it-DPQaR8HY.js +1 -0
- package/dist-embed-ufoathome/LaunchKindMessages_en-Batvnyw3.js +1 -0
- package/dist-embed-ufoathome/LaunchKindMessages_es-KYyQ9gbu.js +1 -0
- package/dist-embed-ufoathome/LaunchKindMessages_fr-CoojboIk.js +1 -0
- package/dist-embed-ufoathome/LaunchKindMessages_it-9HA3cjgP.js +1 -0
- package/dist-embed-ufoathome/LaunchParameterTexts_en-DvrCwbDM.js +1 -0
- package/dist-embed-ufoathome/LaunchParameterTexts_es--RUAegVp.js +1 -0
- package/dist-embed-ufoathome/LaunchParameterTexts_fr-Bh_1zVzy.js +1 -0
- package/dist-embed-ufoathome/LaunchParameterTexts_it-CWDx9nJy.js +1 -0
- package/dist-embed-ufoathome/LaunchPlume-p7V7Yg6y.js +1 -0
- package/dist-embed-ufoathome/LaunchSimulation-3vTsM_A7.js +1 -0
- package/dist-embed-ufoathome/ModelSource-Cd7ByLN1.js +1 -0
- package/dist-embed-ufoathome/ModelThumbnails-CASGbavJ.js +1 -0
- package/dist-embed-ufoathome/ModelViewer-DEaj6_6R.js +1 -0
- package/dist-embed-ufoathome/ModuleConformance-CSg3Ac74.js +2 -0
- package/dist-embed-ufoathome/ModuleSession-BaaLmhnz.js +3 -0
- package/dist-embed-ufoathome/ModuleThree-DF_JfVBK.js +1 -0
- package/dist-embed-ufoathome/ModulesPanelElement-BqF6eK1X.js +15 -0
- package/dist-embed-ufoathome/ModulesPanelMessages_en-DuwrY3Pm.js +1 -0
- package/dist-embed-ufoathome/ModulesPanelMessages_es-Bq5X-XuT.js +1 -0
- package/dist-embed-ufoathome/ModulesPanelMessages_fr-B8cSDc6o.js +1 -0
- package/dist-embed-ufoathome/ModulesPanelMessages_it-BdC626aJ.js +1 -0
- package/dist-embed-ufoathome/NearestApproach-DnGPayAo.js +1 -0
- package/dist-embed-ufoathome/Obstacles-v9SkfBD7.js +1 -0
- package/dist-embed-ufoathome/OffThreadTracer-ByPLWaYU.js +6 -0
- package/dist-embed-ufoathome/OpenAiTranscriptionProvider-DDW446tK.js +1 -0
- package/dist-embed-ufoathome/PanoramaxPictures-CELY3Ecc.js +1 -0
- package/dist-embed-ufoathome/ParameterForm-DfpJQGku.js +91 -0
- package/dist-embed-ufoathome/PerceptionMessages_en-B2O6DR64.js +1 -0
- package/dist-embed-ufoathome/PerceptionMessages_es-BmkP6OqD.js +1 -0
- package/dist-embed-ufoathome/PerceptionMessages_fr-B59TnGBC.js +1 -0
- package/dist-embed-ufoathome/PerceptionMessages_it-DPlxRmxu.js +1 -0
- package/dist-embed-ufoathome/PictureFetch-C3wgf1ZV.js +1 -0
- package/dist-embed-ufoathome/PictureRegistration-BFn75haQ.js +1 -0
- package/dist-embed-ufoathome/PoherAssessor-DRTvhhZp.js +1 -0
- package/dist-embed-ufoathome/RailwaySystem-CUJHpW5y.js +41 -0
- package/dist-embed-ufoathome/ReadingCheckTexts_en-eq6teExJ.js +1 -0
- package/dist-embed-ufoathome/ReadingCheckTexts_es-CR_JJZMV.js +1 -0
- package/dist-embed-ufoathome/ReadingCheckTexts_fr-pcDleIvY.js +1 -0
- package/dist-embed-ufoathome/ReadingCheckTexts_it-MFKeoXnq.js +1 -0
- package/dist-embed-ufoathome/ReadingSensitivityMessages_en-ChQHFyxb.js +1 -0
- package/dist-embed-ufoathome/ReadingSensitivityMessages_es-BbFqHsvR.js +1 -0
- package/dist-embed-ufoathome/ReadingSensitivityMessages_fr-Dl4a8udu.js +1 -0
- package/dist-embed-ufoathome/ReadingSensitivityMessages_it-CwiJfUo_.js +1 -0
- package/dist-embed-ufoathome/RecordingIssue-BlWT8Xsu.js +3 -0
- package/dist-embed-ufoathome/ReentryArchive-CeXHrU7L.js +1 -0
- package/dist-embed-ufoathome/ReentryEditor-DynYe51Y.js +28 -0
- package/dist-embed-ufoathome/ReentryEditorMessages_en-BmTZMr-m.js +1 -0
- package/dist-embed-ufoathome/ReentryEditorMessages_es-edid__Jo.js +1 -0
- package/dist-embed-ufoathome/ReentryEditorMessages_fr-DHbcY0tN.js +1 -0
- package/dist-embed-ufoathome/ReentryEditorMessages_it-CIzkIU4G.js +1 -0
- package/dist-embed-ufoathome/ReentryKindMessages_en-BGZgya17.js +1 -0
- package/dist-embed-ufoathome/ReentryKindMessages_es--UxzPNfj.js +1 -0
- package/dist-embed-ufoathome/ReentryKindMessages_fr-7mer-cdj.js +1 -0
- package/dist-embed-ufoathome/ReentryKindMessages_it-BBVQXE1M.js +1 -0
- package/dist-embed-ufoathome/ReentryParameterTexts_en-5BOfwCsS.js +1 -0
- package/dist-embed-ufoathome/ReentryParameterTexts_es-ze1-U4jB.js +1 -0
- package/dist-embed-ufoathome/ReentryParameterTexts_fr-BgUJROXF.js +1 -0
- package/dist-embed-ufoathome/ReentryParameterTexts_it-MTb9Vuq0.js +1 -0
- package/dist-embed-ufoathome/ReentrySimulation-BTcyhCCG.js +1 -0
- package/dist-embed-ufoathome/ReentryTypeNames_en-CBu890Bd.js +1 -0
- package/dist-embed-ufoathome/ReentryTypeNames_es-_LnketjJ.js +1 -0
- package/dist-embed-ufoathome/ReentryTypeNames_fr-BXq89mrz.js +1 -0
- package/dist-embed-ufoathome/ReentryTypeNames_it-Yfq-TDip.js +1 -0
- package/dist-embed-ufoathome/ReferenceSystem-WdAT5UCN.js +1 -0
- package/dist-embed-ufoathome/ReferenceTimeline-2kBldQeG.js +1 -0
- package/dist-embed-ufoathome/RoadMarkings-BsN3rh0W.js +1 -0
- package/dist-embed-ufoathome/SaidPosition-CWiVNaNW.js +4 -0
- package/dist-embed-ufoathome/SatellitePasses-Pfro2-0Z.js +1 -0
- package/dist-embed-ufoathome/SceneNames_en-7OZ7peGc.js +1 -0
- package/dist-embed-ufoathome/SceneNames_es-P5-Mavdi.js +1 -0
- package/dist-embed-ufoathome/SceneNames_fr-qzw0QzD0.js +1 -0
- package/dist-embed-ufoathome/SceneNames_it-Sqf8JFOd.js +1 -0
- package/dist-embed-ufoathome/ShareCodeEditor-DyEYu_9d.js +13 -0
- package/dist-embed-ufoathome/ShareDialogElement-C3HL-Smq.js +9222 -0
- package/dist-embed-ufoathome/ShareMessages_en-B43x8LgJ.js +1 -0
- package/dist-embed-ufoathome/ShareMessages_es-DZCJojSc.js +1 -0
- package/dist-embed-ufoathome/ShareMessages_fr-CzZyVbbX.js +1 -0
- package/dist-embed-ufoathome/ShareMessages_it-C_Z6eDQK.js +1 -0
- package/dist-embed-ufoathome/Sighting-CBpJpdm9.js +1 -0
- package/dist-embed-ufoathome/SightingEditorMessages_en-CTQYcybj.js +12 -0
- package/dist-embed-ufoathome/SightingEditorMessages_es-D-ASD5a3.js +12 -0
- package/dist-embed-ufoathome/SightingEditorMessages_fr-DjUByAq4.js +12 -0
- package/dist-embed-ufoathome/SightingEditorMessages_it-Eat0U-4p.js +12 -0
- package/dist-embed-ufoathome/SightingElement-CexCUTjH.js +693 -0
- package/dist-embed-ufoathome/SightingFileEditor-Cllslp2u.js +8 -0
- package/dist-embed-ufoathome/SightingLabels_en-oIpytoq_.js +1 -0
- package/dist-embed-ufoathome/SightingLabels_es-DUh1CTXl.js +1 -0
- package/dist-embed-ufoathome/SightingLabels_fr-D69zENbW.js +1 -0
- package/dist-embed-ufoathome/SightingLabels_it-COLZ2Qth.js +1 -0
- package/dist-embed-ufoathome/SightingMessages_en-CYzanHjT.js +1 -0
- package/dist-embed-ufoathome/SightingMessages_es-hjvESK6f.js +1 -0
- package/dist-embed-ufoathome/SightingMessages_fr-BtfWbIP7.js +1 -0
- package/dist-embed-ufoathome/SightingMessages_it-Bqm4pewZ.js +1 -0
- package/dist-embed-ufoathome/SkyEventEditorStyle-CvY_AhbI.js +1 -0
- package/dist-embed-ufoathome/SkyLantern-DJT_Ibzh.js +1 -0
- package/dist-embed-ufoathome/TagNames_es-BfnMpc3D.js +1 -0
- package/dist-embed-ufoathome/TagNames_fr-Dnqq6HQ5.js +1 -0
- package/dist-embed-ufoathome/TagNames_it-n6E4EGYO.js +1 -0
- package/dist-embed-ufoathome/TimelineTracks-X_GEZi12.js +35 -0
- package/dist-embed-ufoathome/TraceImport-CntRHXoJ.js +2 -0
- package/dist-embed-ufoathome/TraceSystem-Bm9JDfkW.js +393 -0
- package/dist-embed-ufoathome/TranscriptionAudio-C_xvRUv2.js +5 -0
- package/dist-embed-ufoathome/TranscriptionError-D_TCbYbt.js +1 -0
- package/dist-embed-ufoathome/UfoAtHomeMessages_en-dlx_C679.js +1 -0
- package/dist-embed-ufoathome/UfoAtHomeMessages_es-uLOvtAD0.js +1 -0
- package/dist-embed-ufoathome/UfoAtHomeMessages_fr-LR76-eHS.js +1 -0
- package/dist-embed-ufoathome/UfoAtHomeMessages_it-CQl4uTnG.js +1 -0
- package/dist-embed-ufoathome/UfoMessages_en-D5OYWJ3K.js +1 -0
- package/dist-embed-ufoathome/UfoMessages_es-CO-v8Jl6.js +1 -0
- package/dist-embed-ufoathome/UfoMessages_fr-CGkQBn5r.js +1 -0
- package/dist-embed-ufoathome/UfoMessages_it-BScqxIaH.js +1 -0
- package/dist-embed-ufoathome/VideoButton-CH3rw9kX.js +1 -0
- package/dist-embed-ufoathome/VideoExport-B8ZhHNnd.js +169 -0
- package/dist-embed-ufoathome/VisualAids-DI-hEL46.js +1 -0
- package/dist-embed-ufoathome/WaterSystem-CraSRAgB.js +19 -0
- package/dist-embed-ufoathome/browser-CltifEM0.js +1 -0
- package/dist-embed-ufoathome/caseSchema-ChUB1-9j.js +1 -0
- package/dist-embed-ufoathome/index-C8cdeM8E.js +11 -0
- package/dist-embed-ufoathome/index-DqGmxMZD.js +42 -0
- package/dist-embed-ufoathome/interviewImport-ym5iXO4Z.js +4 -0
- package/{dist-embed-sighting-editor/interviewJson-iURHP4Zk.js → dist-embed-ufoathome/interviewJson-D-i14LTf.js} +1 -1
- package/dist-embed-ufoathome/interviewSchema-Dk0AWHwc.js +1 -0
- package/dist-embed-ufoathome/logo-h2-w4Mwu.png +0 -0
- package/dist-embed-ufoathome/lunar-relief.bin-ByThqxUn.gz +0 -0
- package/dist-embed-ufoathome/node.browser-AK49Qif5.js +1 -0
- package/dist-embed-ufoathome/node.browser-HEqoqodz.js +1 -0
- package/dist-embed-ufoathome/rain-BvWZrB9h.ogg +0 -0
- package/dist-embed-ufoathome/rr0-ufoathome.mjs +159 -0
- package/dist-embed-ufoathome/sightingSchema-CgwoRMl-.js +1 -0
- package/dist-embed-ufoathome/stars-mag7.5-9-BLV2tFmZ.bin +0 -0
- package/dist-embed-ufoathome/stars-mag7.5-B43R6Wvg.bin +0 -0
- package/dist-embed-ufoathome/surroundingsSources-kPwp7ewe.js +1 -0
- package/dist-embed-ufoathome/thunder-DA48qs_v.wav +0 -0
- package/dist-embed-ufoathome/trafficRuntime-DM6gQGDZ.js +2 -0
- package/dist-embed-ufoathome/upperAirSources-BGuLpdwu.js +1 -0
- package/dist-embed-ufoathome/wind-BjklexY7.ogg +0 -0
- package/package.json +9 -6
- package/dist-embed-sighting/CaseMessages_en-Bv5lKWl_.js +0 -1
- package/dist-embed-sighting/CaseMessages_es-BhZv_CtC.js +0 -1
- package/dist-embed-sighting/CaseMessages_fr-C5V5YNc_.js +0 -1
- package/dist-embed-sighting/CaseMessages_it-NPdAZwa_.js +0 -1
- package/dist-embed-sighting-editor/BirdEditor-ESUliJEN.js +0 -16
- package/dist-embed-sighting-editor/DroneEditor-DDaJO8FS.js +0 -16
- package/dist-embed-sighting-editor/GLTFLoader-DdijxzcI.js +0 -1
- package/dist-embed-sighting-editor/GeographicFigures-DC6Tw3ja.js +0 -1
- package/dist-embed-sighting-editor/InterviewEditorElement-D-UDHU0L.js +0 -270
- package/dist-embed-sighting-editor/LanternEditor-DDcI5Kv1.js +0 -24
- package/dist-embed-sighting-editor/LaunchEditor-Pkk0K648.js +0 -22
- package/dist-embed-sighting-editor/ModuleThree-DSghL4fp.js +0 -1
- package/dist-embed-sighting-editor/PictureRegistration-CbfytwCX.js +0 -1
- package/dist-embed-sighting-editor/ReentryEditor-NE8z5aZT.js +0 -28
- package/dist-embed-sighting-editor/SightingEditorMessages_en-DSPvgYFi.js +0 -12
- package/dist-embed-sighting-editor/SightingEditorMessages_es-Bl3DipHr.js +0 -12
- package/dist-embed-sighting-editor/SightingEditorMessages_fr-BTmWQX0n.js +0 -12
- package/dist-embed-sighting-editor/SightingEditorMessages_it-lzbDsHjx.js +0 -12
- package/dist-embed-sighting-editor/VideoButton-CqCZ65oK.js +0 -1
|
@@ -0,0 +1,240 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./BrowserWhisperProvider-Dn44ZE45.js","./TranscriptionAudio-C_xvRUv2.js","./TranscriptionError-D_TCbYbt.js","./OpenAiTranscriptionProvider-DDW446tK.js","./AssemblyAiTranscriptionProvider-o2kkPD5o.js","./interviewImport-ym5iXO4Z.js","./interviewJson-D-i14LTf.js","./rr0-ufoathome.mjs","./SightingFileEditor-Cllslp2u.js","./index-C8cdeM8E.js","./sightingSchema-CgwoRMl-.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{e as M,_ as w,r as j,f as R,H as z,s as J,U as V,B as G,S as C,g as v,D as K}from"./rr0-ufoathome.mjs";import{an as A,l as I,X as O}from"./ShareDialogElement-C3HL-Smq.js";import{I as T,S as $}from"./SaidPosition-CWiVNaNW.js";import{InterviewMedia as N}from"./InterviewMedia-CvAxC62V.js";import{b as S}from"./CaseTimeline-Dq1H2Ucy.js";import{I as ke}from"./CaseTimeline-Dq1H2Ucy.js";import{register as X}from"./InterviewElement-CiZNhb70.js";import{InterviewFile as f}from"./interviewJson-D-i14LTf.js";import{W as P,A as B}from"./ParameterForm-DfpJQGku.js";import{I as Y}from"./CaseEditorElement-Ds4yB5UC.js";import"./Sighting-CBpJpdm9.js";import"./VisualAids-DI-hEL46.js";import"./Decor-Dn-cvniW.js";import"./RecordingIssue-BlWT8Xsu.js";import"./Obstacles-v9SkfBD7.js";import"./TimelineTracks-X_GEZi12.js";import"./ReentryArchive-CeXHrU7L.js";import"./ReferenceTimeline-2kBldQeG.js";import"./upperAirSources-BGuLpdwu.js";import"./Account-C4jhsVtN.js";class g{static partsOf(e){return e.parts?e.parts:e.redacted?[]:[{text:e.text??""}]}static shownRanges(e){const t=[];let r="",s=0;return e.forEach((i,a)=>{const n="redacted"in i?"▮":f.plain(i.text);/[\p{L}\p{N}.,;:!?)»”…▮]$/u.test(r)&&/^[\p{L}\p{N}(«“▮]/u.test(n)&&(s+=1);const o="redacted"in i?0:n.length;t.push({part:a,from:s,to:s+o}),s+=o,r=n}),t}static words(e){return e.trim()===""?0:e.trim().split(/\s+/u).length}static redact(e,t,r,s){const i=[...g.partsOf(e)],a=g.shownRanges(i).find(k=>!("redacted"in i[k.part])&&t>=k.from&&r<=k.to);if(!a)return;const n=f.plain(i[a.part].text),o=/[\p{L}\p{N}'’-]/u;let h=t-a.from,d=r-a.from;for(;h>0&&o.test(n[h-1])&&o.test(n[h]);)h--;for(;d<n.length&&o.test(n[d])&&o.test(n[d-1]);)d++;const l=n.slice(h,d);if(l.trim()==="")return;const c=n.slice(0,h).trimEnd(),m=n.slice(d).trimStart(),p=[...c!==""?[{text:c}]:[],{redacted:{reason:s,words:g.words(l)}},...m!==""?[{text:m}]:[]],b=i.slice(0,a.part).filter(k=>"redacted"in k).length;return i.splice(a.part,1,...p),g.setParts(e,i),{text:l.trim(),nth:b}}static redactWhole(e,t){const r=JSON.stringify({text:e.text,parts:e.parts}),s=g.partsOf(e).reduce((i,a)=>i+("redacted"in a?a.redacted.words??0:g.words(f.plain(a.text))),0);if(delete e.text,delete e.parts,e.redacted={reason:t,...s>0?{words:s}:{}},e.refs)for(const i of e.refs)delete i.range;return r}static restoreWhole(e,t){const{text:r,parts:s}=JSON.parse(t);delete e.redacted,s?e.parts=s:e.text=r??""}static restorePart(e,t,r){const s=[...g.partsOf(e)];let i=-1;const a=s.findIndex(n=>"redacted"in n&&++i===t);a!==-1&&(s.splice(a,1,{text:r}),g.setParts(e,s))}static raw(e,t=()=>{}){let r=-1,s="",i="";for(const a of g.partsOf(e)){const n="redacted"in a?`⟦${t(++r)??"…"}⟧`:a.text;s!==""&&!/\s$/u.test(i)&&!/^\s/u.test(n)&&(s+=" "),s+=n,i=n}return s}static fromRaw(e,t,r){const s=g.partsOf(e).filter(o=>"redacted"in o),i=[],a=new Map;let n=-1;return t.split(/⟦([^⟧]*)⟧/u).forEach((o,h)=>{if(h%2===0){o.trim()!==""&&i.push({text:o.trim()});return}n++;const d=o.trim();d===""||d==="…"||d==="..."?i.push({redacted:s[n]?.redacted??{reason:r}}):(i.push({redacted:{reason:r,words:g.words(d)}}),a.set(n,d))}),delete e.redacted,g.setParts(e,i),a}static setParts(e,t){const r=[];for(const s of t){const i=r[r.length-1],a=!("redacted"in s)&&/^[,.;:!?)»”…]/u.test(s.text)?"":" ";i&&!("redacted"in i)&&!("redacted"in s)?r[r.length-1]={text:`${i.text}${a}${s.text}`.replace(/\s+/gu," ").trim()}:r.push(s)}if(r.some(s=>"redacted"in s)){if(e.parts=r,delete e.text,e.refs)for(const s of e.refs)delete s.range}else e.text=r.map(s=>s.text).join(" "),delete e.parts}}class D{constructor(e,t,r){this.host=t,this.messages=r,e.classList.add("player"),e.innerHTML=`<div class="player-video" hidden></div>
|
|
3
|
+
<div class="player-bar">
|
|
4
|
+
<button type="button" class="icon-btn player-play" disabled>${T.PLAY}</button>
|
|
5
|
+
<span class="player-time">0:00</span>
|
|
6
|
+
<div class="speaker-track" role="slider" tabindex="0" aria-valuemin="0"></div>
|
|
7
|
+
<span class="player-time player-end">0:00</span>
|
|
8
|
+
<button type="button" class="pill-btn player-recordings"></button>
|
|
9
|
+
</div>
|
|
10
|
+
<p class="player-empty"></p>
|
|
11
|
+
<dialog class="recordings-window"><h3></h3><div class="recording-rows"></div><button type="button" class="pill-btn recording-add">${T.PLUS}<span></span></button></dialog>`,this.play=e.querySelector(".player-play"),this.time=e.querySelector(".player-time"),this.end=e.querySelector(".player-end"),this.track=e.querySelector(".speaker-track"),this.video=e.querySelector(".player-video"),this.empty=e.querySelector(".player-empty"),this.open=e.querySelector(".player-recordings"),this.window=e.querySelector(".recordings-window"),this.play.addEventListener("click",()=>{this.media&&(this.media.paused?this.media.play().catch(()=>{}):this.media.pause())}),this.track.addEventListener("pointerdown",s=>{const i=this.track.getBoundingClientRect();i.width>0&&this.seek((s.clientX-i.left)/i.width*this.duration)}),this.track.addEventListener("keydown",s=>{(s.key==="ArrowRight"||s.key==="ArrowLeft")&&this.seek(this.now+(s.key==="ArrowRight"?5:-5))}),this.open.addEventListener("click",()=>this.showWindow()),e.querySelector(".recording-add").addEventListener("click",()=>this.edit(s=>s.push({kind:"audio",src:""}))),P.dialog(this.window,r.close,()=>this.window.close())}static CSS=`
|
|
12
|
+
.player { margin: 0 0 4px; border-radius: 12px; }
|
|
13
|
+
.player-video { aspect-ratio: 16 / 9; margin-bottom: 8px; border-radius: 10px; overflow: hidden; background: #0b1020; }
|
|
14
|
+
.player-video video { width: 100%; height: 100%; display: block; }
|
|
15
|
+
.player-bar { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--ground-sunken); }
|
|
16
|
+
.player-time { font: 500 13px/1 var(--mono); color: var(--ink-dim); font-variant-numeric: tabular-nums; }
|
|
17
|
+
.speaker-track { position: relative; flex: 1 1 auto; height: 28px; border-radius: 6px; cursor: pointer; overflow: hidden;
|
|
18
|
+
background: repeating-linear-gradient(90deg, var(--line) 0 1px, transparent 1px 4px); }
|
|
19
|
+
.speaker-track .seg { position: absolute; top: 4px; bottom: 4px; border-radius: 2px; }
|
|
20
|
+
.speaker-track .seg[data-role="witness"] { background: #c9a14a; }
|
|
21
|
+
.speaker-track .seg[data-role="interviewer"] { background: #5b8fc4; }
|
|
22
|
+
.speaker-track .seg[data-role="other"] { background: var(--ink-faint); }
|
|
23
|
+
.speaker-track .seg.redacted { background: repeating-linear-gradient(135deg, var(--ink-faint) 0 3px, transparent 3px 6px); }
|
|
24
|
+
.speaker-track .head { position: absolute; top: 0; bottom: 0; width: 2px; margin-left: -1px; background: #f5c451; }
|
|
25
|
+
.player-empty { margin: 6px 2px 0; font-size: 13px; color: var(--ink-faint); }
|
|
26
|
+
.recordings-window { max-width: min(36em, 94vw); padding: 18px 20px; border: 1px solid var(--line-strong); border-radius: 12px; background: var(--ground-raised); color: var(--ink); }
|
|
27
|
+
.recordings-window::backdrop { background: rgba(7, 10, 18, .5); }
|
|
28
|
+
.recordings-window h3 { margin: 0 0 12px; font: 600 19px/1.3 var(--serif); }
|
|
29
|
+
.recording-row { display: grid; grid-template-columns: 8em minmax(0, 1fr) 7em auto; gap: 8px; align-items: end; margin-bottom: 10px; }
|
|
30
|
+
.recording-row label { display: flex; flex-direction: column; gap: 4px; font: 600 12px/1.3 var(--sans); color: var(--ink-dim); }
|
|
31
|
+
.recording-row input, .recording-row select { box-sizing: border-box; width: 100%; font-weight: 400; }
|
|
32
|
+
.recording-file { display: flex; gap: 6px; }
|
|
33
|
+
.recording-row .with-unit { display: flex; align-items: center; gap: 4px; font-weight: 400; color: var(--ink); }
|
|
34
|
+
.recording-status { grid-column: 1 / -1; margin: -4px 0 0; font-size: 12px; color: var(--ink-faint); }
|
|
35
|
+
.recording-status.error { color: var(--error); }
|
|
36
|
+
`;json;base;media;mediaFor="";picked=new Map;messages;play;time;end;track;video;empty;open;window;setMessages(e){this.messages=e,this.render()}show(e,t){this.json=e,this.base=t,this.render()}get now(){return this.media?Math.max(0,this.media.currentTime-(this.recordings[0]?.offset??0)):this.position}seek(e){this.position=Math.min(this.duration,Math.max(0,e)),this.media&&(this.media.currentTime=this.position+(this.recordings[0]?.offset??0)),this.placeHead(),this.host.timeChanged(this.position)}position=0;get recordings(){return Array.isArray(this.json?.recordings)?this.json.recordings:[]}get duration(){const e=this.media&&Number.isFinite(this.media.duration)?this.media.duration-(this.recordings[0]?.offset??0):0,t=Math.max(0,...(this.json?.segments??[]).map(r=>r.end??r.start??0));return Math.max(1,e,t)}render(){const e=this.messages,t=this.recordings;this.open.innerHTML='<svg class="icon" viewBox="0 0 16 16" width="16" height="16" aria-hidden="true" fill="none" stroke="currentColor" stroke-width="1.7" stroke-linecap="round" stroke-linejoin="round"><path d="M6 12V3.5l7-1.5V10.5"/><circle cx="4.5" cy="12" r="1.5"/><circle cx="11.5" cy="10.5" r="1.5"/></svg>',this.open.append(e.recordings.replace("{n}",String(t.length))),this.empty.textContent=t.length===0?e.noRecording:"",this.empty.hidden=t.length>0,this.play.title=e.play,this.play.setAttribute("aria-label",e.play),this.track.setAttribute("aria-label",e.recordingsTitle),this.ensureMedia(),this.drawTrack(),this.window.open&&this.drawRows()}ensureMedia(){const e=this.recordings[0],t=e?`${e.kind}|${e.src}`:"";if(t===this.mediaFor||(this.mediaFor=t,this.media?.pause(),this.media=void 0,this.video.replaceChildren(),this.video.hidden=!0,this.play.disabled=!0,!e||e.src===""))return;const r=document.createElement(e.kind==="video"?"video":"audio");r.preload="metadata",r.src=this.urlOf(e.src),r.addEventListener("loadedmetadata",()=>this.drawTrack()),r.addEventListener("timeupdate",()=>{this.placeHead(),this.host.timeChanged(this.now)});const s=()=>{const i=!r.paused;this.play.innerHTML=i?T.PAUSE:T.PLAY;const a=i?this.messages.pause:this.messages.play;this.play.title=a,this.play.setAttribute("aria-label",a)};r.addEventListener("play",s),r.addEventListener("pause",s),e.kind==="video"&&(this.video.append(r),this.video.hidden=!1),this.media=r,this.play.disabled=!1}recordingUrl(){const e=this.recordings[0];return e&&e.src!==""?this.urlOf(e.src):void 0}urlOf(e){const t=this.picked.get(e);if(t)return t;try{return new URL(e,this.base??location.href).href}catch{return e}}drawTrack(){const e=this.json,t=this.duration,r=(e?.segments??[]).filter(i=>i.start!==void 0);this.track.replaceChildren(...r.map(i=>{const a=document.createElement("span"),n=e?.speakers?.[i.speaker]?.role;a.className=i.redacted?"seg redacted":"seg",a.dataset.role=n==="witness"||n==="interviewer"?n:"other";const o=i.start??0,h=i.end??o+1;return a.style.left=`${o/t*100}%`,a.style.width=`${Math.max(.3,(h-o)/t*100)}%`,a}));const s=document.createElement("span");s.className="head",this.track.append(s),this.track.setAttribute("aria-valuemax",String(Math.round(t))),this.end.textContent=f.clock(t),this.placeHead()}placeHead(){const e=this.now,t=this.track.querySelector(".head");t&&(t.style.left=`${Math.min(e,this.duration)/this.duration*100}%`),this.time.textContent=f.clock(Math.floor(e)),this.track.setAttribute("aria-valuenow",String(Math.round(e)))}showWindow(){this.drawRows(),typeof this.window.showModal=="function"?this.window.showModal():this.window.setAttribute("open","")}drawRows(){const e=this.messages;this.window.querySelector("h3").textContent=e.recordingsTitle,this.window.querySelector(".recording-add span").textContent=e.recordingAdd,P.dialog(this.window,e.close,()=>this.window.close()),this.window.querySelector(".recording-rows").replaceChildren(...this.recordings.map((r,s)=>{const i=document.createElement("div");i.className="recording-row";const a=document.createElement("select");a.append(new Option(e.recordingAudio,"audio"),new Option(e.recordingVideo,"video")),a.value=r.kind,a.addEventListener("change",()=>this.edit(p=>{p[s].kind=a.value}));const n=document.createElement("input");n.type="text",n.value=r.src,n.placeholder="interview.mp3",n.addEventListener("change",()=>this.edit(p=>{p[s].src=n.value.trim()}));const o=document.createElement("input");o.type="file",o.accept="audio/*,video/*",o.hidden=!0,o.addEventListener("change",()=>{const p=o.files?.[0];p&&(this.picked.set(p.name,URL.createObjectURL(p)),this.edit(b=>{b[s].src=p.name,p.type.startsWith("video/")&&(b[s].kind="video")}))});const h=document.createElement("button");h.type="button",h.className="icon-btn",h.title=e.recordingFile,h.setAttribute("aria-label",e.recordingFile),h.innerHTML='<svg class="icon" viewBox="0 0 16 16" width="16" height="16" aria-hidden="true" fill="none" stroke="currentColor" stroke-width="1.7" stroke-linecap="round" stroke-linejoin="round"><path d="M2.5 4.5h4l1.5 1.5h5.5v6.5h-11z"/></svg>',h.addEventListener("click",()=>o.click());const d=document.createElement("span");d.className="recording-file",d.append(n,h,o);const l=document.createElement("input");l.type="number",l.step="0.1",l.value=r.offset!==void 0?String(r.offset):"",l.placeholder="0",l.addEventListener("change",()=>this.edit(p=>{const b=Number(l.value);l.value.trim()===""||!Number.isFinite(b)||b===0?delete p[s].offset:p[s].offset=b}));const c=document.createElement("button");c.type="button",c.className="icon-btn",c.innerHTML=T.TRASH,c.title=e.recordingRemove,c.setAttribute("aria-label",e.recordingRemove),c.addEventListener("click",()=>this.edit(p=>{p.splice(s,1)}));const m=document.createElement("p");return m.className="recording-status",this.check(r,m),i.append(this.labelled(e.recordingKind,a),this.labelled(e.recordingFile,d),this.labelled(e.recordingOffset,l,"s"),c,m),i}))}labelled(e,t,r){const s=document.createElement("label"),i=document.createElement("span");if(i.textContent=e,r){const a=document.createElement("span");a.className="with-unit",a.append(t,r),s.append(i,a)}else s.append(i,t);return s}check(e,t){if(e.src==="")return;const r=document.createElement(e.kind==="video"?"video":"audio");r.preload="metadata",r.addEventListener("loadedmetadata",()=>{t.textContent=f.clock(Math.round(r.duration)),t.classList.remove("error")}),r.addEventListener("error",()=>{t.textContent=this.messages.loadFailed,t.classList.add("error")}),r.src=this.urlOf(e.src)}edit(e){const t=structuredClone(this.recordings);e(t),this.host.recordingsChanged(t)}}class L{constructor(e,t,r,s){this.sendsAudio=e,this.engine=t,this.load=r,this.downloadBytes=s}loaded;transcribe(e){return this.loaded??=this.load().catch(t=>{throw this.loaded=void 0,t}),this.loaded.then(t=>t.transcribe(e))}}const F="groq",U="openai",H="assemblyai",E=M.point("transcription").provide(M.BUILT_IN,[{id:"whisper-browser",name:"Whisper",credit:"OpenAI Whisper large-v3-turbo (MIT), run by Transformers.js (Apache 2.0)",creditUrl:"https://huggingface.co/onnx-community/whisper-large-v3-turbo",create:()=>new L(!1,"whisper-large-v3-turbo (Transformers.js, in the browser)",async()=>new(await w(async()=>{const{BrowserWhisperProvider:x}=await import("./BrowserWhisperProvider-Dn44ZE45.js");return{BrowserWhisperProvider:x}},__vite__mapDeps([0,1,2]),import.meta.url)).BrowserWhisperProvider,76e7)},{id:F,name:"Groq",credit:"Groq, Whisper large-v3-turbo, on your own key",creditUrl:"https://groq.com/terms-of-use",keyUrl:"https://console.groq.com/keys",create:()=>new L(!0,"whisper-large-v3-turbo (Groq)",async()=>new(await w(async()=>{const{OpenAiTranscriptionProvider:x}=await import("./OpenAiTranscriptionProvider-DDW446tK.js");return{OpenAiTranscriptionProvider:x}},__vite__mapDeps([3,1,2]),import.meta.url)).OpenAiTranscriptionProvider({base:"https://api.groq.com/openai/v1",model:"whisper-large-v3-turbo",key:()=>A.of(F)}))},{id:U,name:"OpenAI",credit:"OpenAI, Whisper, on your own key",creditUrl:"https://openai.com/policies/row-terms-of-use/",keyUrl:"https://platform.openai.com/api-keys",create:()=>new L(!0,"whisper-1 (OpenAI)",async()=>new(await w(async()=>{const{OpenAiTranscriptionProvider:x}=await import("./OpenAiTranscriptionProvider-DDW446tK.js");return{OpenAiTranscriptionProvider:x}},__vite__mapDeps([3,1,2]),import.meta.url)).OpenAiTranscriptionProvider({base:"https://api.openai.com/v1",model:"whisper-1",key:()=>A.of(U)}))},{id:H,name:"AssemblyAI",credit:"AssemblyAI, voices told apart, on your own key",creditUrl:"https://www.assemblyai.com/legal/terms-of-service",keyUrl:"https://www.assemblyai.com/app/api-keys",create:()=>new L(!0,"AssemblyAI (speaker labels)",async()=>new(await w(async()=>{const{AssemblyAiTranscriptionProvider:x}=await import("./AssemblyAiTranscriptionProvider-o2kkPD5o.js");return{AssemblyAiTranscriptionProvider:x}},__vite__mapDeps([4,1,2]),import.meta.url)).AssemblyAiTranscriptionProvider({base:"https://api.assemblyai.com",key:()=>A.of(H)}))}]),_="rr0-interview-editor",Q=`
|
|
37
|
+
<style>
|
|
38
|
+
:host { display: block; }
|
|
39
|
+
/* The colours of the transcript's text editor (see SightingFileEditor): a key, a string, a number or a word, and a mistake. Dark mode redefines them. */
|
|
40
|
+
:host { --file-key: #1a5fb4; --file-string: #26662f; --file-literal: #a5321f; --rr0-alert: #c33; }
|
|
41
|
+
@media (prefers-color-scheme: dark) { :host { --file-key: #8cb8ff; --file-string: #8fd39a; --file-literal: #ffa08a; } }
|
|
42
|
+
[hidden] { display: none !important; }
|
|
43
|
+
/* Two groups as the recording's editor has its own (see sightingEditorTemplate): the open tab raised and joined to its panel. */
|
|
44
|
+
.group-tabs { --tab-line: color-mix(in srgb, CanvasText 35%, transparent); --tab-surface: color-mix(in srgb, CanvasText 5%, Canvas);
|
|
45
|
+
--tab-recessed: color-mix(in srgb, CanvasText 11%, Canvas); --tab-accent: #4a9eff;
|
|
46
|
+
display: flex; flex-wrap: wrap; align-items: flex-end; gap: 0; margin: 0; padding: 0; border-bottom: 1px solid var(--tab-line); }
|
|
47
|
+
.group-tab { -webkit-user-select: none; user-select: none; font: inherit; font-weight: 600; cursor: pointer; color: color-mix(in srgb, CanvasText 70%, transparent); background: var(--tab-recessed);
|
|
48
|
+
border: 1px solid var(--tab-line); border-radius: 8px 8px 0 0; padding: .4em .6em; margin: 0 0 -1px -1px; position: relative; }
|
|
49
|
+
.group-tab:hover { color: CanvasText; background: color-mix(in srgb, CanvasText 16%, Canvas); }
|
|
50
|
+
.group-tab[aria-expanded="true"] { color: CanvasText; background: var(--tab-surface); border-bottom-color: var(--tab-surface); box-shadow: inset 0 2px 0 var(--tab-accent); z-index: 1; }
|
|
51
|
+
.group-tab:focus-visible { outline: 2px solid #4af; outline-offset: -2px; }
|
|
52
|
+
.group-panel { border: 1px solid var(--tab-line, color-mix(in srgb, CanvasText 35%, transparent)); border-top: 0; border-radius: 0 0 4px 4px;
|
|
53
|
+
background: color-mix(in srgb, CanvasText 5%, Canvas); padding: .5em .75em; margin: 0 0 .5em; }
|
|
54
|
+
.row { display: flex; align-items: center; gap: .5em; flex-wrap: wrap; margin-bottom: .5em; }
|
|
55
|
+
.group-panel > .row:last-child { margin-bottom: 0; }
|
|
56
|
+
label { display: flex; align-items: center; gap: .4em; }
|
|
57
|
+
label.wide { flex: 1 1 100%; align-items: flex-start; }
|
|
58
|
+
label.wide textarea { flex: 1 1 auto; min-width: 0; min-height: 9em; }
|
|
59
|
+
label.fill { flex: 1 1 100%; }
|
|
60
|
+
label.fill input { flex: 1 1 auto; }
|
|
61
|
+
input[type="text"] { min-width: 0; }
|
|
62
|
+
#by { width: 16em; }
|
|
63
|
+
input[type="url"] { width: 18em; max-width: 100%; }
|
|
64
|
+
${Y.CSS}
|
|
65
|
+
select { min-width: 0; max-width: 100%; text-overflow: ellipsis; }
|
|
66
|
+
fieldset.witnesses { display: flex; flex-wrap: wrap; align-items: center; gap: .25em .75em; border: 0; margin: 0; padding: 0; min-width: 0; }
|
|
67
|
+
fieldset.witnesses legend { float: left; padding: 0; margin-right: .4em; }
|
|
68
|
+
#exchanges { --rr0-interview-max-height: 32em; --rr0-interview-overflow: auto; }
|
|
69
|
+
.file-note { margin: .3em 0; }
|
|
70
|
+
${v.rules([".file-note"])}
|
|
71
|
+
.file-editor { min-height: 18em; margin-top: .5em; }
|
|
72
|
+
/* ---- The design handoff's look (design_handoff_editeurs_ufoathome, §2 and §5) ---- */
|
|
73
|
+
:host {
|
|
74
|
+
${R.TOKENS}
|
|
75
|
+
--rr0-field-radius: 8px;
|
|
76
|
+
--rr0-input-font-size: 15px;
|
|
77
|
+
container-type: inline-size;
|
|
78
|
+
font: 400 15px/1.5 var(--sans);
|
|
79
|
+
color: var(--ink);
|
|
80
|
+
}
|
|
81
|
+
${R.HEAD}
|
|
82
|
+
${R.fields(".interview-app")}
|
|
83
|
+
.recordings-window :is(button, input, select) { font: inherit; }
|
|
84
|
+
.recordings-window .pill-btn { min-height: 36px; }
|
|
85
|
+
/* Its parts, underlined, as the case's are. */
|
|
86
|
+
#tabs { display: flex; gap: 6px; padding: 0; border-bottom: 1px solid var(--line); }
|
|
87
|
+
#tabs .group-tab {
|
|
88
|
+
display: inline-flex; align-items: center; gap: 8px; min-height: 0; margin: 0 0 -1px; padding: 12px 10px;
|
|
89
|
+
border: 0; border-bottom: 2px solid transparent; border-radius: 0; background: none; box-shadow: none; color: var(--ink-dim); font: 600 15px/1.2 var(--sans);
|
|
90
|
+
}
|
|
91
|
+
#tabs .group-tab:hover { background: none; color: var(--ink); }
|
|
92
|
+
#tabs .group-tab[aria-expanded="true"] { color: var(--ink); border-bottom-color: var(--glow-solid); background: none; box-shadow: none; }
|
|
93
|
+
.interview-app > .group-panel { margin: 0; padding: 18px 0 0; border: 0; border-radius: 0; background: none; color: var(--ink); }
|
|
94
|
+
/* Fields: the label above, the value under it, on a grid that fills the width; the title and what was established the whole width. */
|
|
95
|
+
#group-summary { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px 16px; }
|
|
96
|
+
#group-summary > .row { display: contents; }
|
|
97
|
+
#group-summary label, #group-transcript label { display: flex; flex-direction: column; align-items: stretch; gap: 6px; font: 600 13px/1.3 var(--sans); color: var(--ink-dim); }
|
|
98
|
+
#group-summary :is(label.fill, label.wide) { grid-column: 1 / -1; }
|
|
99
|
+
#group-summary :is(input, select, textarea), #group-transcript input[type="text"] { box-sizing: border-box; width: 100%; font-weight: 400; }
|
|
100
|
+
#group-summary input[type="text"], #group-transcript input[type="text"] { height: 38px; }
|
|
101
|
+
#group-summary textarea { min-height: 9em; }
|
|
102
|
+
fieldset.witnesses { flex-direction: column; align-items: flex-start; gap: 6px; font: 600 13px/1.3 var(--sans); color: var(--ink-dim); }
|
|
103
|
+
/* A witness's name stays on one line beside its box: shrunk to its words, the label broke "Q. B." in two. */
|
|
104
|
+
#group-summary fieldset.witnesses label { flex-direction: row; align-items: center; gap: 8px; font-weight: 400; color: var(--ink); white-space: nowrap; }
|
|
105
|
+
/* The exchanges, one card an intervention, the speaker's colour down its side: a list that scrolls past 520 px (440 on a phone). */
|
|
106
|
+
#exchanges { --rr0-interview-max-height: 520px; --rr0-interview-line: var(--line-strong); }
|
|
107
|
+
#exchanges .rr0-interview-turns { padding-right: 4px; }
|
|
108
|
+
#exchanges .intervention { margin: 0 0 10px; padding: 6px 4px; border: 1px solid var(--line-strong); border-left: 3px solid var(--speaker); border-radius: 10px; background: var(--ground); }
|
|
109
|
+
#exchanges .intervention:hover { background: var(--ground-sunken); }
|
|
110
|
+
#exchanges .turn .who { display: inline-block; margin-bottom: 4px; padding: 1px 9px; border-radius: 999px; background: color-mix(in srgb, var(--speaker) 18%, transparent); color: var(--ink); font: 700 12px/1.5 var(--sans); }
|
|
111
|
+
#exchanges .turn .said { font-size: 15px; line-height: 1.55; color: var(--ink); }
|
|
112
|
+
#exchanges .turn .ref { border-color: var(--glow-dim); background: var(--warn-bg); color: var(--ink); font: 600 12px/1.6 var(--sans); padding: 1px 9px; }
|
|
113
|
+
#exchanges .turn.flash { background: var(--warn-bg); }
|
|
114
|
+
#exchanges .rr0-interview-status { padding: 8px 12px; border-radius: 8px; background: var(--warn-bg); color: var(--ink-dim); font-size: 13px; }
|
|
115
|
+
#group-transcript > .row { margin-bottom: 12px; }
|
|
116
|
+
@container (max-width: 640px) { #exchanges { --rr0-interview-max-height: 440px; } }
|
|
117
|
+
${D.CSS}
|
|
118
|
+
${I.CSS}
|
|
119
|
+
${P.CSS}
|
|
120
|
+
${B.CSS}
|
|
121
|
+
${T.CSS}
|
|
122
|
+
/* Who has proofread it, said once above the exchanges, with a box each to say they have (see renderReview); the reader's own line goes. */
|
|
123
|
+
#exchanges .rr0-interview-status { display: none; }
|
|
124
|
+
.review { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; margin: 0 0 10px; padding: 10px 14px;
|
|
125
|
+
border-radius: 10px; background: var(--warn-bg); font-size: 13px; color: var(--ink-dim); }
|
|
126
|
+
.review[data-done] { background: var(--neutral-bg); }
|
|
127
|
+
.review-boxes { display: flex; flex-wrap: wrap; gap: 14px; }
|
|
128
|
+
.review-boxes label { display: inline-flex; align-items: center; gap: 6px; color: var(--ink); }
|
|
129
|
+
/* Where the words selected, or the passage taken out pressed, are: why it is taken out, and what to do with it. Fixed, as it is placed
|
|
130
|
+
against what it is about (see openRedactPop); in the top layer where popovers are known. */
|
|
131
|
+
.redact-pop { position: fixed; inset: auto; margin: 0; text-align: start; width: min(24em, calc(100vw - 32px)); box-sizing: border-box; padding: 10px 12px;
|
|
132
|
+
border: 1px solid var(--line-strong); border-radius: 10px; background: var(--ground-raised); color: var(--ink); box-shadow: 0 6px 24px rgba(0, 0, 0, .18); }
|
|
133
|
+
.redact-pop[hidden] { display: none; }
|
|
134
|
+
/* The words the popover is about, still marked once typing the reason has taken the selection away. */
|
|
135
|
+
::highlight(rr0-redact-pending) { background-color: var(--warn-bg, #fde9b0); color: inherit; text-decoration: underline 2px var(--glow-dim, #c90); }
|
|
136
|
+
.redact-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; margin-top: 8px; }
|
|
137
|
+
.redact-actions button[hidden] { display: none; }
|
|
138
|
+
.transcribe { margin: 0 0 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; }
|
|
139
|
+
.transcribe-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
|
|
140
|
+
.transcribe-row label { display: inline-flex; align-items: center; gap: 6px; font: 600 13px/1.3 var(--sans); color: var(--ink-dim); }
|
|
141
|
+
.transcribe-row input[type="password"] { width: 14em; }
|
|
142
|
+
.transcribe .source-credit { font-size: 12px; color: var(--ink-faint); }
|
|
143
|
+
.transcribe-note { margin: .4em 0 0; }
|
|
144
|
+
.transcribe progress { width: 100%; margin-top: 6px; }
|
|
145
|
+
.redact-reason { display: flex; flex-direction: column; align-items: stretch; gap: 4px; text-align: start; font: 600 12px/1.3 var(--sans); color: var(--ink-dim); }
|
|
146
|
+
.redact-reason input { box-sizing: border-box; width: 100%; font-weight: 400; }
|
|
147
|
+
.redact-note { margin: 6px 0 0; font-size: 13px; color: var(--ink-faint); }
|
|
148
|
+
.redact-note:empty { display: none; }
|
|
149
|
+
.redact-note.error { color: var(--error); }
|
|
150
|
+
/* Each turn: its time, which plays from there; what is taken out as a label that says how much, and puts it back while it is known. */
|
|
151
|
+
#exchanges .turn { display: grid; grid-template-columns: 7.5em minmax(0, 1fr); column-gap: 14px; padding: 8px 10px; }
|
|
152
|
+
#exchanges .turn > .turn-time { grid-row: 1; grid-column: 1; }
|
|
153
|
+
#exchanges .turn > .who { grid-column: 1; align-self: start; }
|
|
154
|
+
#exchanges .turn > :not(.who, .turn-time) { grid-column: 2; }
|
|
155
|
+
#exchanges .turn > .said, #exchanges .turn > .redacted { grid-row: 1 / span 2; }
|
|
156
|
+
#exchanges .turn.goes-on > .who, #exchanges .turn.is-redacted > .who { display: block; visibility: hidden; }
|
|
157
|
+
/* The time is on the turn itself here: the reader's tooltip of it would say it twice. */
|
|
158
|
+
#exchanges .turn[data-time]::after { content: none !important; display: none !important; }
|
|
159
|
+
.turn-time { justify-self: start; min-height: 0; padding: 0; border: 0; background: none; color: var(--sky); font: 600 13px/1.4 var(--mono); cursor: pointer; }
|
|
160
|
+
.turn-time:hover:not(:disabled) { background: none; text-decoration: underline; }
|
|
161
|
+
#exchanges .bar.redacted-label { width: auto; height: auto; padding: 0 8px; border: 1px dashed var(--line-strong); border-radius: 999px; background: none; color: var(--ink-faint);
|
|
162
|
+
font: 600 12px/1.6 var(--sans); vertical-align: baseline; cursor: default; }
|
|
163
|
+
#exchanges .bar.redacted-label { cursor: pointer; }
|
|
164
|
+
#exchanges .bar.redacted-label:hover { border-color: var(--glow-dim); color: var(--ink); }
|
|
165
|
+
.turn-tools { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 4px 12px; margin-top: 6px; }
|
|
166
|
+
.turn-tools button { min-height: 0; padding: 2px 4px; border: 0; background: none; color: var(--ink-faint); font: 600 13px/1.4 var(--sans); }
|
|
167
|
+
.turn-tools button:hover:not(:disabled) { background: none; color: var(--ink); }
|
|
168
|
+
.turn-tools .icon-btn { min-width: 0; }
|
|
169
|
+
#exchanges .turn.current { background: var(--warn-bg); border-radius: 8px; }
|
|
170
|
+
#exchanges .intervention:has(.turn.current) { border-color: var(--glow-dim); }
|
|
171
|
+
#exchanges .turn .refs { align-items: center; }
|
|
172
|
+
#exchanges .turn .ref { display: inline-block; max-width: calc(100% - 2em); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
173
|
+
#exchanges .turn .ref .moment-letter { display: inline-grid; place-items: center; width: 1.4em; height: 1.4em; margin-right: 4px; border-radius: 50%; background: var(--glow-solid); color: var(--glow-on-solid); font: 700 11px/1 var(--sans); }
|
|
174
|
+
#exchanges .turn .ref-unlink { min-height: 0; padding: 0 4px; border: 0; background: none; color: var(--ink-faint); font: 600 13px/1 var(--sans); }
|
|
175
|
+
.turn-edit { display: flex; flex-direction: column; gap: 6px; }
|
|
176
|
+
.turn-edit textarea { box-sizing: border-box; width: 100%; min-height: 6em; }
|
|
177
|
+
.turn-edit .hint { font-size: 12px; color: var(--ink-faint); }
|
|
178
|
+
.turn-edit .buttons { display: flex; gap: 8px; }
|
|
179
|
+
</style>
|
|
180
|
+
<div class="interview-app">
|
|
181
|
+
<!-- The player: what plays the interview's recordings, with who speaks along it (see InterviewPlayer). -->
|
|
182
|
+
<div id="player"></div>
|
|
183
|
+
<div id="tabs" class="group-tabs">
|
|
184
|
+
<button class="group-tab" type="button" aria-controls="group-summary" aria-expanded="true"><span id="label-summary-group"></span></button>
|
|
185
|
+
<button class="group-tab" type="button" aria-controls="group-exchanges" aria-expanded="false"><span id="label-exchanges-group"></span></button>
|
|
186
|
+
<button class="group-tab" type="button" aria-controls="group-transcript" aria-expanded="false"><span id="label-file-group"></span></button>
|
|
187
|
+
</div>
|
|
188
|
+
<section class="group-panel" id="group-summary" aria-labelledby="label-summary-group">
|
|
189
|
+
<div class="row">
|
|
190
|
+
<label class="fill"><span id="label-title"></span> <input id="title" type="text"/></label>
|
|
191
|
+
</div>
|
|
192
|
+
<div class="row">
|
|
193
|
+
<fieldset id="witness" class="witnesses"><legend id="label-witness"></legend></fieldset>
|
|
194
|
+
<label><span id="label-medium"></span> <select id="medium"></select></label>
|
|
195
|
+
<label><span id="label-time"></span> <input id="time" type="text" size="16" placeholder="2026-10-13 21:27"/></label>
|
|
196
|
+
<label><span id="label-by"></span> <input id="by" type="text" autocomplete="off" spellcheck="false"/></label>
|
|
197
|
+
</div>
|
|
198
|
+
<div class="row">
|
|
199
|
+
<label class="wide"><span id="label-summary"></span> <textarea id="summary"></textarea></label>
|
|
200
|
+
</div>
|
|
201
|
+
</section>
|
|
202
|
+
<section class="group-panel" id="group-exchanges" aria-labelledby="label-exchanges-group" hidden>
|
|
203
|
+
<!-- Transcribing the recording (see TranscriptionProvider): what with, what it sends or downloads, how far it has got. -->
|
|
204
|
+
<div id="transcribe" class="transcribe">
|
|
205
|
+
<div class="transcribe-row">
|
|
206
|
+
<span><button id="transcribe-start" type="button" class="pill-btn primary"></button> <span id="transcribe-hint"></span></span>
|
|
207
|
+
<label><span id="label-transcribe-with"></span> <select id="transcribe-source"></select></label>
|
|
208
|
+
<a id="transcribe-credit" class="source-credit" target="_blank" rel="noopener noreferrer"></a>
|
|
209
|
+
<label id="transcribe-key-row" hidden><span id="label-transcribe-key"></span> <input id="transcribe-key" type="password" autocomplete="off" spellcheck="false"/> <a id="transcribe-key-get" class="source-credit" target="_blank" rel="noopener noreferrer"></a></label>
|
|
210
|
+
<button id="transcribe-stop" type="button" class="pill-btn" hidden></button>
|
|
211
|
+
</div>
|
|
212
|
+
<p id="transcribe-note" class="transcribe-note" role="status"></p>
|
|
213
|
+
<progress id="transcribe-progress" hidden></progress>
|
|
214
|
+
</div>
|
|
215
|
+
<div id="review" class="review" hidden></div>
|
|
216
|
+
<div id="redact-pop" class="redact-pop" role="dialog" hidden>
|
|
217
|
+
<label class="redact-reason"><span id="label-redact-reason"></span><input id="redact-reason" type="text" list="redact-reasons" autocomplete="off"/></label>
|
|
218
|
+
<datalist id="redact-reasons"></datalist>
|
|
219
|
+
<p id="redact-note" class="redact-note" role="status"></p>
|
|
220
|
+
<div class="redact-actions">
|
|
221
|
+
<button id="redact-restore" type="button" class="pill-btn"></button>
|
|
222
|
+
<button id="redact-take" type="button" class="pill-btn primary"></button>
|
|
223
|
+
</div>
|
|
224
|
+
</div>
|
|
225
|
+
<rr0-interview id="exchanges"></rr0-interview>
|
|
226
|
+
</section>
|
|
227
|
+
<section class="group-panel" id="group-transcript" aria-labelledby="label-file-group" hidden>
|
|
228
|
+
<div class="row">
|
|
229
|
+
<label class="fill"><span id="label-url"></span> <input id="url" type="text" autocomplete="off" spellcheck="false" placeholder="interview-….json"/></label>
|
|
230
|
+
</div>
|
|
231
|
+
<div class="row toolbar">
|
|
232
|
+
<span class="input-file-row"><span id="label-import-file"></span> <rr0-input-file id="import" name="import" accept="application/json,.json,.txt,.md,.vtt,.srt,text/*" placeholder="https://…/interview.json"></rr0-input-file></span>
|
|
233
|
+
<button id="save" type="button"></button>
|
|
234
|
+
</div>
|
|
235
|
+
<p id="file-note" class="file-note" hidden role="status"></p>
|
|
236
|
+
<div id="file-editor" class="file-editor"></div>
|
|
237
|
+
</section>
|
|
238
|
+
</div>
|
|
239
|
+
`;class u extends HTMLElement{shadow=this.attachShadow({mode:"open"});get importInput(){return this.shadow.getElementById("import")}messages;said=new $(["en"]);language="en";localeToken=0;current;options=[];group="summary";base;text;fileEditor;fileEditorLoading;shownFor;ready=Promise.resolve();player;drawn;takenOut=new Map;redactTarget;exchangesShown=Promise.resolve();lastReason;static transcriptionSourceId=E[0].id;transcribing;constructor(){super(),this.shadow.innerHTML=Q,customElements.upgrade(this.shadow),this.importInput.build();for(const r of["title","time","by","url","summary","witness","medium"])this.shadow.getElementById(r).addEventListener(r==="witness"||r==="medium"?"change":"input",()=>this.write(r));for(const r of this.shadow.querySelectorAll("#tabs .group-tab"))r.addEventListener("click",()=>this.openGroup(u.GROUPS[r.getAttribute("aria-controls")]??"summary"));this.shadow.getElementById("url").addEventListener("change",()=>{this.shownFor=void 0,this.text===void 0&&this.group==="file"&&this.showTranscript()}),this.importInput.addEventListener("filepick",r=>{const s=r.detail;s.file?this.importFromFile(s.file):this.importFromUrl(s.url)}),this.shadow.getElementById("save").addEventListener("click",()=>this.save()),this.shadow.getElementById("transcribe-start").addEventListener("click",()=>void this.transcribe()),this.shadow.getElementById("transcribe-stop").addEventListener("click",()=>this.transcribing?.abort()),this.shadow.getElementById("transcribe-source").addEventListener("change",r=>{u.transcriptionSourceId=r.target.value,this.transcribeOutcome=void 0,this.renderTranscribe()}),this.shadow.getElementById("transcribe-key").addEventListener("input",r=>{A.set(u.transcriptionSourceId,r.target.value),this.renderTranscribeStart()});const e=this.shadow.getElementById("exchanges");e.addEventListener("pointerup",()=>setTimeout(()=>this.selectionMade(),0)),e.addEventListener("keyup",r=>{r.shiftKey&&this.selectionMade()}),e.addEventListener("click",r=>{const s=r.target.closest(".bar.redacted-label");s&&this.openBar(s)}),e.addEventListener("keydown",r=>{const s=r.target.closest(".bar.redacted-label");s&&(r.key==="Enter"||r.key===" ")&&(r.preventDefault(),this.openBar(s))}),this.shadow.getElementById("redact-take").addEventListener("click",()=>void this.redactSelection()),this.shadow.getElementById("redact-restore").addEventListener("click",()=>{const r=this.redactTarget;this.closeRedactPop(),r?.kind==="bar"&&r.restorable&&this.restore(r.restorable)});const t=this.field("redact-reason");t.addEventListener("change",()=>{this.redactTarget?.kind==="bar"&&this.changeReason()}),t.addEventListener("keydown",r=>{r.key==="Escape"&&this.closeRedactPop(),r.key==="Enter"&&(r.preventDefault(),this.redactTarget?.kind==="selection"?this.redactSelection():this.changeReason().then(()=>this.closeRedactPop()))})}static GROUPS={"group-summary":"summary","group-exchanges":"exchanges","group-transcript":"file"};static get observedAttributes(){return["readonly"]}attributeChangedCallback(){this.applyReadonly()}connectedCallback(){this.ready=this.loadLocale(),document.addEventListener("pointerdown",this.pressedElsewhere,!0)}pressedElsewhere=e=>{const t=this.shadow.getElementById("redact-pop");t&&!t.hidden&&!e.composedPath().includes(t)&&this.closeRedactPop()};disconnectedCallback(){document.removeEventListener("pointerdown",this.pressedElsewhere,!0),queueMicrotask(()=>{this.isConnected||this.releaseFileEditor()})}releaseFileEditor(){this.fileEditor&&(this.text=this.fileEditor.text,this.fileEditor.destroy(),this.fileEditor=void 0,this.fileEditorLoading=void 0,this.shownFor=void 0)}get event(){return this.current}set event(e){e!==this.current&&(this.shownFor=void 0),this.current=e,this.render(),this.takenOut.clear(),this.group==="file"&&this.showTranscript(),queueMicrotask(()=>{this.current===e&&this.showExchanges()})}set witnesses(e){this.options=e,this.render()}set documentUrl(e){this.base=e}get transcriptText(){return this.text}set transcriptText(e){this.text=e,this.shownFor=void 0}field(e){return this.shadow.getElementById(e)}async loadLocale(){const e=++this.localeToken,t=z.preferencesFor(this),r=J(t,V),s=await G.load(r);e===this.localeToken&&(this.language=r,this.said=new $(t),this.messages=s,this.player||(this.player=new D(this.shadow.getElementById("player"),{timeChanged:i=>this.markCurrentTurn(i),recordingsChanged:i=>void this.editTranscript(a=>{i.length===0?delete a.recordings:a.recordings=i})},s),this.render()),this.render())}applyReadonly(){const e=this.hasAttribute("readonly");for(const t of["title","time","by","url","summary"])this.field(t).readOnly=e;for(const t of this.shadow.querySelectorAll("#witness input"))t.disabled=e;this.field("medium").disabled=e,this.importInput.disabled=e,this.shadow.getElementById("transcribe").hidden=e}static byText(e){return(e??[]).map(t=>"people"in t?t.people:"org"in t?t.org:t.title??"").filter(t=>t!=="").join(", ")}render(){const e=this.messages;if(!e)return;const t=(l,c)=>{this.shadow.getElementById(l).textContent=c};t("label-summary-group",e.summaryTab),t("label-file-group",e.fileTab),t("label-exchanges-group",e.exchangesTab),t("label-title",e.title),t("label-witness",e.witness),t("label-medium",e.medium),t("label-time",e.time),t("label-by",e.by),t("label-summary",e.summary),t("label-url",e.transcript),I.say(this.shadow.getElementById("label-import-file"),e.importFile,e.importFileHint),t("redact-take",e.redactSelection),t("redact-restore",e.redactRestore),t("label-redact-reason",e.redactReasonLabel);const r=this.field("redact-reason");r.placeholder=e.redactReason,r.title=e.redactReasonHint,t("transcribe-start",e.transcribe),this.shadow.getElementById("transcribe-hint").replaceChildren(I.of(e.transcribeHint)),t("label-transcribe-with",e.transcribeWith),t("label-transcribe-key",e.transcribeKey),t("transcribe-key-get",e.transcribeKeyGet),t("transcribe-stop",e.transcribeStop),this.field("transcribe-key").title=e.transcribeKeyHint,this.renderTranscribe(),this.player?.setMessages(e),this.importInput.messages=e,t("save",e.saveButton),this.field("url").title=e.transcriptHint,this.field("by").title=e.byHint;const s=this.current,i=this.shadow.activeElement,a=(l,c)=>{this.field(l)!==i&&(this.field(l).value=c)};a("title",this.said.read(s?.title)??""),a("time",s?.time??""),a("by",u.byText(s?.by)),a("url",s?.url??""),a("summary",this.said.read(s?.summary)??"");const n=[s?.interviewOf].flat().filter(l=>typeof l=="string"),o=this.shadow.getElementById("witness"),h=[...this.options,...n.filter(l=>!this.options.some(c=>c.id===l)).map(l=>({id:l,label:l}))];o.replaceChildren(o.querySelector("legend"),...h.map(l=>{const c=document.createElement("label"),m=document.createElement("input");return m.type="checkbox",m.value=l.id,m.checked=n.includes(l.id),c.append(m,l.label),c}));const d=this.shadow.getElementById("medium");if(d.replaceChildren(...N.ALL.map(l=>new Option(N.label(l,this.language),l))),s?.medium!==void 0&&!N.ALL.includes(s.medium)&&d.append(new Option(String(s.medium),String(s.medium))),s?.medium===void 0){const l=new Option(e.witnessNone,"");l.disabled=!0,l.hidden=!0,d.prepend(l)}d.value=s?.medium??"",this.applyReadonly()}write(e){const t=this.current;if(!t)return;const r=e==="witness"?"":this.field(e).value;switch(e){case"title":{const s=this.said.write(t.title,r,this.language);s===void 0?delete t.title:t.title=s;break}case"summary":{const s=this.said.write(t.summary,r,this.language);s===void 0?delete t.summary:t.summary=s;break}case"time":r.trim()===""?delete t.time:t.time=r.trim();break;case"url":r.trim()===""?delete t.url:t.url=r.trim();break;case"by":{const s=r.split(",").map(i=>i.trim()).filter(i=>i!=="");s.length===0?delete t.by:t.by=s.map(i=>({people:i}));break}case"witness":{const s=[...this.shadow.querySelectorAll("#witness input:checked")].map(i=>i.value);if(s.length===0){this.render();return}t.interviewOf=s.length===1?s[0]:s;break}case"medium":r===""?delete t.medium:t.medium=r;break}this.dispatchEvent(new CustomEvent(S,{bubbles:!0,composed:!0,detail:{field:e,event:t}})),e==="medium"&&this.render(),e!=="url"&&this.syncFileFromEvent()}openGroup(e){this.group=e;const t={summary:"group-summary",exchanges:"group-exchanges",file:"group-transcript"};for(const r of this.shadow.querySelectorAll("#tabs .group-tab"))r.setAttribute("aria-expanded",String(r.getAttribute("aria-controls")===t[e]));for(const[r,s]of Object.entries(t))this.shadow.getElementById(s).hidden=r!==e;e==="file"&&this.showTranscript(),e==="exchanges"&&this.showExchanges()}exchangesToken=0;async transcriptJson(e){try{const t=this.fileEditor?.text??this.text;if(t!==void 0)return f.read(JSON.parse(t));const r=this.transcriptUrl(e);if(r!==void 0)return f.read(await C.json(r))}catch{}}async showExchanges(){const e=this.current;if(!e)return;const t=++this.exchangesToken,r=await this.transcriptJson(e);await this.ready,!(t!==this.exchangesToken||this.current!==e)&&this.drawExchanges(r)}drawExchanges(e){const t=this.shadow.getElementById("exchanges");t.documentUrl=this.current?this.transcriptUrl(this.current):void 0,t.interview=e,this.drawn=e,this.player?.show(e,this.current?this.transcriptUrl(this.current):void 0),this.renderReview(e),this.renderRedactReasons(e),this.decorateExchanges(e),this.renderTranscribe()}async editTranscript(e){const t=this.current;if(!t||this.hasAttribute("readonly"))return;const r=await this.transcriptJson(t)??JSON.parse(this.template(t));Array.isArray(r.segments)||(r.segments=[]),e(r);const s=u.pretty(u.withEventFields(r,t));this.fileEditor?.replaceText(s,!1),this.onEdited(s),await this.exchangesShown}get redactReason(){return this.reasonOf(this.lastReason)}reasonOf(e){e=e?.trim()||this.messages.redactReason;const t=this.givenReasons(this.drawn).find(r=>this.said.read(r)===e);return t!==void 0?typeof t=="string"?t:{...t}:this.said.write(void 0,e,this.language)??e}givenReasons(e){const t=new Map;for(const r of e?.segments??[])for(const s of[r.redacted,...(r.parts??[]).map(i=>"redacted"in i?i.redacted:void 0)]){if(!s)continue;const i=JSON.stringify(s.reason),a=t.get(i);a?a.n++:t.set(i,{reason:s.reason,n:1})}return[...t.values()].sort((r,s)=>s.n-r.n).map(r=>r.reason)}renderRedactReasons(e){const t=this.messages;if(!t)return;const r=this.givenReasons(e).map(a=>this.said.read(a)??"").filter(a=>a!==""),s=t.redactReasons.filter(a=>!r.some(n=>n.toLowerCase().startsWith(a.toLowerCase()))),i=[...new Set([...r,...s])];this.shadow.getElementById("redact-reasons").replaceChildren(...i.map(a=>new Option(a,a)))}speakerLabel(e,t){const r=f.speakerName(e,t),s=e.speakers?.[t]?.role;return s===f.UNATTRIBUTED&&e.speakers[t].title?this.messages.voiceNamed.replace("{name}",r):r===s&&s in this.messages.roles?this.messages.roles[s]:r}renderReview(e){const t=this.shadow.getElementById("review"),r=Object.entries(e?.speakers??{}).filter(([,o])=>o.role!==f.UNATTRIBUTED).map(([o])=>o);if(t.hidden=!e||r.length===0,!e||r.length===0)return;const s=o=>["approved","covered"].includes(e.proofreading?.[o]?.status??""),i=r.filter(o=>!s(o)),a=document.createElement("span");a.textContent=i.length===0?this.messages.proofreadAll:this.messages.proofreadPending.replace("{names}",i.map(o=>this.speakerLabel(e,o)).join(", ")),t.toggleAttribute("data-done",i.length===0);const n=document.createElement("span");n.className="review-boxes";for(const o of r){const h=document.createElement("label"),d=document.createElement("input");d.type="checkbox",d.checked=s(o),d.disabled=this.hasAttribute("readonly"),d.addEventListener("change",()=>void this.editTranscript(l=>{l.proofreading??={},d.checked?l.proofreading[o]={status:"approved",date:new Date().toISOString().slice(0,10)}:l.proofreading[o]={status:"pending"}})),h.append(d,this.messages.reviewedBy.replace("{name}",this.speakerLabel(e,o))),n.append(h)}t.replaceChildren(a,n)}momentsOf(e,t){const r=e.speakers?.[t]?.of??f.sightingsOf(e)[0];return this.options.find(s=>s.id===r)?.moments??this.options.flatMap(s=>s.moments??[])}decorateExchanges(e){if(!e)return;const t=this.messages,r=this.hasAttribute("readonly");for(const s of this.shadow.querySelectorAll("#exchanges .turn[data-segment]")){const i=Number(s.dataset.segment),a=e.segments[i];if(!a)continue;if(a.start!==void 0){const h=document.createElement("button");h.type="button",h.className="turn-time",h.textContent=f.clock(a.start),h.addEventListener("click",()=>this.player?.seek(a.start)),s.prepend(h)}const n=a.redacted?[a.redacted]:g.partsOf(a).flatMap(h=>"redacted"in h?[h.redacted]:[]);s.querySelectorAll(".bar").forEach((h,d)=>{const l=n[d]?.words;h.textContent=l!==void 0?t.redactedWords.replace("{n}",String(l)):t.redacted,h.classList.add("redacted-label");const c=a.redacted?`${i}:all`:`${i}:${d}`;this.takenOut.has(c)&&(h.dataset.restorable=c)});const o=this.momentsOf(e,a.speaker);s.querySelectorAll(".ref").forEach((h,d)=>{const l=a.refs?.[d];if(!l)return;const c=o.find(p=>Math.abs(p.at-l.at)<.05);if(c){const p=document.createElement("span");p.className="moment-letter",p.textContent=c.label.slice(0,2),h.replaceChildren(p,t.momentLabel.replace("{k}",c.label).replace("{text}",c.note??f.clock(l.at)))}if(r)return;const m=document.createElement("button");m.type="button",m.className="ref-unlink",m.textContent="×",m.title=t.unlinkMoment,m.setAttribute("aria-label",t.unlinkMoment),m.addEventListener("click",()=>void this.editTranscript(p=>{p.segments[i].refs?.splice(d,1),p.segments[i].refs?.length===0&&delete p.segments[i].refs})),h.after(m)}),r||s.append(this.turnTools(e,i,a,o))}}turnTools(e,t,r,s){const i=this.messages,a=document.createElement("div");a.className="turn-tools";const n=(d,l)=>{const c=document.createElement("button");return c.type="button",c.textContent=d,c.addEventListener("click",l),c};if(e.speakers?.[r.speaker]?.role==="witness"&&!r.redacted){const d=n(i.linkMoment,()=>{});a.append(d),new B(d,`moment-menu-${t}`,c=>void this.editTranscript(m=>{const p=m.segments[t].refs??[];p.some(b=>Math.abs(b.at-Number(c))<.05)||p.push({at:Number(c)}),m.segments[t].refs=p}),c=>`moment-${t}-${c}`).setKinds(s.length>0?s.map(c=>({value:String(c.at),label:i.momentLabel.replace("{k}",c.label).replace("{text}",c.note??f.clock(c.at))})):[{value:"",label:i.noMoments,disabledReason:i.noMoments}])}if(r.redacted||a.append(n(i.editTurn,()=>this.editTurn(t))),!r.redacted&&!this.hasAttribute("readonly")){const d=n(i.whoSpeaks,()=>{});a.append(d),new B(d,`speaker-menu-${t}`,c=>void w(async()=>{const{InterviewImport:m}=await import("./interviewImport-ym5iXO4Z.js");return{InterviewImport:m}},__vite__mapDeps([5,6,7]),import.meta.url).then(({InterviewImport:m})=>this.editTranscript(p=>{m.attribute(p,t,c)})),c=>`speaker-${t}-${c}`).setKinds(Object.keys(e.speakers??{}).map(c=>({value:c,label:this.speakerLabel(e,c),...c===r.speaker?{disabledReason:this.speakerLabel(e,c)}:{}})))}const o=this.takenOut.has(`${t}:all`)||[...this.takenOut.keys()].some(d=>d.startsWith(`${t}:`));if(r.redacted||r.parts&&o){const d=n(i.restoreAll,()=>void this.restoreAll(t));d.disabled=!o,a.append(d)}else a.append(n(i.redactAll,()=>void this.editTranscript(d=>{this.forget(t),this.takenOut.set(`${t}:all`,g.redactWhole(d.segments[t],this.redactReason))}).then(()=>{const d=this.shadow.querySelector(`#exchanges .turn[data-segment="${t}"] .bar.redacted-label`);d&&this.openBar(d)})));const h=n("",()=>void this.editTranscript(d=>{d.segments.splice(t,1),this.shiftTakenOut(t)}));return h.className="icon-btn",h.innerHTML=T.TRASH,h.title=i.deleteTurn,h.setAttribute("aria-label",i.deleteTurn),a.append(h),a}selectionMade(){const e=this.messages;if(!e||this.hasAttribute("readonly"))return;const t=this.shadow.getSelection?.()??document.getSelection(),r=t&&t.rangeCount>0?t.getRangeAt(0):void 0,s=this.shadow.getElementById("exchanges");if(!r||r.collapsed||!s.contains(r.startContainer)||!s.contains(r.endContainer))return;const i=c=>c instanceof Element?c:c.parentElement,a=i(r.startContainer)?.closest(".said");if(!a&&!i(r.endContainer)?.closest(".said"))return;const n=a&&i(r.endContainer)?.closest(".said")===a&&!i(r.startContainer)?.closest(".bar")&&!i(r.endContainer)?.closest(".bar"),o=r.getBoundingClientRect();if(!n){this.openRedactPop({kind:"selection",index:-1,from:0,to:0},o,e.selectionOnePassage);return}const h=Number(a.closest(".turn").dataset.segment),d=u.offsetIn(a,r.startContainer,r.startOffset),l=u.offsetIn(a,r.endContainer,r.endOffset);this.openRedactPop({kind:"selection",index:h,from:Math.min(d,l),to:Math.max(d,l)},o),u.markPending(r)}static PENDING="rr0-redact-pending";static markPending(e){const t=globalThis.CSS?.highlights,r=globalThis.Highlight;!t||!r||(e?t.set(u.PENDING,new r(e.cloneRange())):t.delete(u.PENDING))}openBar(e){if(this.hasAttribute("readonly"))return;const t=e.closest(".turn");if(!t)return;const r=Number(t.dataset.segment),s=[...t.querySelectorAll(".bar")].indexOf(e),i=this.drawn?.segments[r];if(!i)return;const a=i.redacted?"all":s,n=`${r}:${a}`;this.openRedactPop({kind:"bar",index:r,nth:a,restorable:this.takenOut.has(n)?n:void 0},e.getBoundingClientRect())}openRedactPop(e,t,r){const s=this.shadow.getElementById("redact-pop"),i=this.field("redact-reason");u.markPending(),this.redactTarget=e;const a=this.shadow.getElementById("redact-take"),n=this.shadow.getElementById("redact-restore");a.hidden=e.kind!=="selection",a.disabled=!!r,n.hidden=e.kind!=="bar"||!e.restorable,i.disabled=!!r,i.value=e.kind==="bar"?this.said.read(this.redactionAt(this.drawn,e.index,e.nth)?.reason)??"":this.lastReason??"";const o=this.shadow.getElementById("redact-note");o.textContent=r??"",o.classList.toggle("error",!!r),s.hidden=!1,typeof s.showPopover=="function"&&s.isConnected&&(s.setAttribute("popover","manual"),s.matches(":popover-open")||s.showPopover());const h=s.offsetWidth||320,d=s.offsetHeight||120,l=t.bottom+6+d<=window.innerHeight;s.style.top=`${Math.max(8,l?t.bottom+6:t.top-6-d)}px`,s.style.left=`${Math.max(8,Math.min(t.left,window.innerWidth-h-8))}px`,r||i.focus({preventScroll:!0})}closeRedactPop(){const e=this.shadow.getElementById("redact-pop");this.redactTarget=void 0,u.markPending(),typeof e.hidePopover=="function"&&e.matches?.(":popover-open")&&e.hidePopover(),e.hidden=!0}redactionAt(e,t,r){const s=e?.segments[t];if(s)return r==="all"?s.redacted:g.partsOf(s).flatMap(i=>"redacted"in i?[i.redacted]:[])[r]}async changeReason(){const e=this.redactTarget;if(e?.kind!=="bar")return;const t=this.reasonOf(this.field("redact-reason").value),r=this.redactionAt(this.drawn,e.index,e.nth);!r||JSON.stringify(r.reason)===JSON.stringify(t)||await this.editTranscript(s=>{if(e.nth!=="all"){const a=this.redactionAt(s,e.index,e.nth);a&&(a.reason=t);return}const i=JSON.stringify(s.segments[e.index].redacted?.reason);for(let a=e.index;a<s.segments.length;a++){const n=s.segments[a].redacted;if(!n||a>e.index&&JSON.stringify(n.reason)!==i)break;n.reason=t}})}async redactSelection(){const e=this.messages,t=this.redactTarget;if(t?.kind!=="selection"||t.index<0)return;this.lastReason=this.field("redact-reason").value.trim()||void 0;const r=this.redactReason;let s=!1;if(await this.editTranscript(i=>{const a=g.redact(i.segments[t.index],t.from,t.to,r);a&&(s=!0,this.shiftParts(t.index,a.nth),this.takenOut.set(`${t.index}:${a.nth}`,a.text))}),!s){const i=this.shadow.getElementById("redact-note");i.textContent=e.selectionOnePassage,i.classList.add("error");return}this.closeRedactPop(),(this.shadow.getSelection?.()??document.getSelection())?.removeAllRanges()}static offsetIn(e,t,r){let s=0;const i=document.createTreeWalker(e,NodeFilter.SHOW_TEXT,{acceptNode:a=>a.parentElement?.closest(".bar")?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT});for(let a=i.nextNode();a;a=i.nextNode()){if(a===t)return s+r;if(t.contains(a)&&t!==a){const o=[...t.childNodes].slice(0,r);return s+o.reduce((h,d)=>h+(d instanceof Element&&d.closest(".bar")?0:(d.textContent??"").length),0)}s+=(a.textContent??"").length}return s}async restore(e){const t=this.takenOut.get(e);if(t===void 0)return;const[r,s]=e.split(":"),i=Number(r);await this.editTranscript(a=>{s==="all"?g.restoreWhole(a.segments[i],t):(g.restorePart(a.segments[i],Number(s),t),this.shiftParts(i,Number(s),-1)),this.takenOut.delete(e)})}async restoreAll(e){if(this.takenOut.has(`${e}:all`)){await this.restore(`${e}:all`);return}const t=[...this.takenOut.keys()].filter(r=>r.startsWith(`${e}:`)).map(r=>Number(r.split(":")[1])).sort((r,s)=>s-r);for(const r of t)await this.restore(`${e}:${r}`)}editTurn(e){const r=this.drawn?.segments[e],s=this.shadow.querySelector(`#exchanges .turn[data-segment="${e}"] .said`);if(!r||!s)return;const i=this.messages,a=document.createElement("div");a.className="turn-edit";const n=document.createElement("textarea");n.value=g.raw(r,c=>this.takenOut.get(`${e}:${c}`));const o=document.createElement("span");o.className="hint",o.textContent=i.turnEditHint;const h=document.createElement("div");h.className="buttons";const d=document.createElement("button");d.type="button",d.className="pill-btn primary",d.textContent=i.saveTurn,d.addEventListener("click",()=>void this.editTranscript(c=>{const m=g.fromRaw(c.segments[e],n.value,this.redactReason);this.forget(e);for(const[p,b]of m)this.takenOut.set(`${e}:${p}`,b)}));const l=document.createElement("button");l.type="button",l.className="pill-btn",l.textContent=i.cancelTurn,l.addEventListener("click",()=>this.drawExchanges(this.drawn)),h.append(d,l),a.append(n,o,h),s.replaceWith(a),n.focus()}forget(e){for(const t of[...this.takenOut.keys()])t.startsWith(`${e}:`)&&this.takenOut.delete(t)}shiftParts(e,t,r=1){const s=[...this.takenOut].filter(([i])=>i.startsWith(`${e}:`)&&i!==`${e}:all`&&Number(i.split(":")[1])>=t+(r<0?1:0));for(const[i]of s)this.takenOut.delete(i);for(const[i,a]of s)this.takenOut.set(`${e}:${Number(i.split(":")[1])+r}`,a)}shiftTakenOut(e){const t=[...this.takenOut];this.takenOut.clear();for(const[r,s]of t){const[i,a]=r.split(":"),n=Number(i);n<e?this.takenOut.set(r,s):n>e&&this.takenOut.set(`${n-1}:${a}`,s)}}markCurrentTurn(e){const t=this.drawn?.segments??[];let r=-1;t.forEach((a,n)=>{a.start!==void 0&&a.start<=e&&(r=n)});for(const a of this.shadow.querySelectorAll("#exchanges .turn.current"))a.classList.remove("current");const s=this.shadow.querySelector(`#exchanges .turn[data-segment="${r}"]`);if(!s)return;s.classList.add("current");const i=s.closest(".rr0-interview-turns");i&&(s.offsetTop<i.scrollTop||s.offsetTop>i.scrollTop+i.clientHeight-s.offsetHeight)&&i.scrollTo({top:s.offsetTop-i.clientHeight/3,behavior:"smooth"})}async revealSegment(e){this.openGroup("exchanges"),await this.showExchanges(),this.shadow.getElementById("exchanges").revealSegment(e)}transcribeOutcome;renderTranscribe(){const e=this.messages;if(!e)return;const t=this.shadow.getElementById("transcribe-source");[...t.options].map(d=>d.value).join()!==E.map(d=>d.id).join()&&t.replaceChildren(...E.map(d=>{const l=new Option(d.name,d.id);return l.title=d.credit,l}));const r=O(E,u.transcriptionSourceId);t.value=r.id;const s=this.shadow.getElementById("transcribe-credit");s.href=r.creditUrl,s.textContent=r.credit,this.shadow.getElementById("transcribe-key-row").hidden=!r.keyUrl,this.shadow.getElementById("transcribe-key-get").href=r.keyUrl??"";const i=this.field("transcribe-key");if(i!==this.shadow.activeElement&&(i.value=A.of(r.id)??""),this.transcribing)return;const a=this.player?.recordingUrl();this.renderTranscribeStart();const n=this.shadow.getElementById("transcribe-note");if(this.transcribeOutcome){v.show(n,this.transcribeOutcome.text,this.transcribeOutcome.kind);return}if(!a){v.show(n,e.transcribeNoRecording);return}const o=r.create(),h=[o.sendsAudio?e.transcribeSends.replace("{name}",r.name):e.transcribeLocal.replace("{mb}",String(Math.round((o.downloadBytes??0)/1e6)))];(this.drawn?.segments?.length??0)>0&&h.push(e.transcribeReplaces),v.show(n,h.join(" "),o.sendsAudio?"warning":"info")}renderTranscribeStart(){if(this.transcribing||!this.messages)return;const e=O(E,u.transcriptionSourceId),t=this.shadow.getElementById("transcribe-start");t.disabled=!!e.keyUrl&&!A.of(e.id),t.title=t.disabled?this.messages.transcribeErrors.noKey:""}showTranscribing(e){this.shadow.getElementById("transcribe-start").disabled=e,this.shadow.getElementById("transcribe-stop").hidden=!e,this.shadow.getElementById("transcribe-source").disabled=e,this.field("transcribe-key").disabled=e,this.shadow.getElementById("transcribe-progress").hidden=!e}showProgress(e){const t=this.messages,r=this.shadow.getElementById("transcribe-note"),s=this.shadow.getElementById("transcribe-progress"),i=a=>String(Math.round(a/1e6));if(e==="reading")s.removeAttribute("value"),v.show(r,t.transcribeReading);else if(e.stage==="loading")e.total?(s.max=e.total,s.value=e.loaded,v.show(r,t.transcribeLoading.replace("{loaded}",i(e.loaded)).replace("{total}",i(e.total)))):(s.removeAttribute("value"),v.show(r,t.transcribeLoadingSoFar.replace("{loaded}",i(e.loaded))));else if(e.stage==="sending"||e.stage==="waiting"){s.removeAttribute("value");const a=O(E,u.transcriptionSourceId).name;v.show(r,(e.stage==="sending"?t.transcribeSending:t.transcribeWaiting).replace("{name}",a))}else s.max=e.total,s.value=e.done,v.show(r,t.transcribeProgress.replace("{done}",f.clock(Math.round(e.done))).replace("{total}",f.clock(Math.round(e.total))))}async transcribe(){const e=this.messages,t=this.current,r=this.player?.recordingUrl();if(!e||!t||this.transcribing||this.hasAttribute("readonly"))return;if(!r){this.player?.showWindow();return}const s=O(E,u.transcriptionSourceId),i=s.create(),a=this.transcribing=new AbortController;this.transcribeOutcome=void 0,this.showTranscribing(!0),this.showProgress("reading");try{const[{TranscriptionAudio:n},{TranscriptionError:o},{InterviewImport:h}]=await Promise.all([w(()=>import("./TranscriptionAudio-C_xvRUv2.js"),[],import.meta.url),w(()=>import("./TranscriptionError-D_TCbYbt.js"),[],import.meta.url),w(()=>import("./interviewImport-ym5iXO4Z.js"),__vite__mapDeps([5,6,7]),import.meta.url)]),d=await fetch(r,{signal:a.signal});if(!d.ok)throw new o("failed",`HTTP ${d.status}`);if(Number(d.headers.get("content-length")??0)>n.MAX_BYTES)throw new o("tooLarge");const l=await d.arrayBuffer();if(l.byteLength>n.MAX_BYTES)throw new o("tooLarge");const c=await n.decode(l).catch(()=>{throw new o("failed",e.loadFailed)}),m=this.drawn?.language??this.language,p=await i.transcribe({samples:c,language:m,signal:a.signal,progress:y=>this.showProgress(y)}),b=[t.interviewOf].flat().filter(y=>typeof y=="string"),k=h.transcribed(p,{by:(t.by??[]).flatMap(y=>"people"in y?[y.people]:[]),witnesses:this.options.filter(y=>b.length===0||b.includes(y.id)).map(({id:y,label:q})=>({id:y,label:q}))});if(!k)throw new o("failed",e.exchangesEmpty);if(a.signal.aborted||this.current!==t)throw new DOMException("Aborted","AbortError");const{anonymization:Z,...W}=await this.transcriptJson(t)??{};await this.take({...W,...k,language:m,transcription:{method:"automatic",engine:i.engine,note:`Transcribed in UFO@home by ${i.engine}: whose each voice is was not known, to be attributed, then proofread.`}}),this.transcribeOutcome={text:e.transcribeDone.replace("{engine}",s.name),kind:"info"}}catch(n){const o=n;a.signal.aborted||o?.name==="AbortError"?this.transcribeOutcome={text:e.transcribeStopped,kind:"info"}:o?.name==="TranscriptionError"&&o.code?this.transcribeOutcome={text:e.transcribeErrors[o.code].replace("{detail}",o.detail??""),kind:"error"}:this.transcribeOutcome={text:e.transcribeErrors.failed.replace("{detail}",String(o?.message??n)),kind:"error"}}finally{this.transcribing=void 0,this.showTranscribing(!1),this.renderTranscribe()}}note(e,t="info"){v.show(this.shadow.getElementById("file-note"),e,t)}transcriptUrl(e){return e.url?new URL(e.url,this.base??location.href).href:void 0}static pretty(e){return JSON.stringify(e,null,2)+`
|
|
240
|
+
`}static SHARED=["title","time","medium","by","interviewOf","summary"];static ORDER=["version","id","language","title","time","medium","by","interviewOf","summary","speakers","transcription","proofreading","anonymization","recordings","segments"];static ordered(e){const t={};for(const r of u.ORDER)r in e&&(t[r]=e[r]);for(const r of Object.keys(e))r in t||(t[r]=e[r]);return t}static witnessesOf(e){return[e].flat().filter(t=>typeof t=="string")}static withEventFields(e,t){const r={...e};for(const i of u.SHARED)t[i]===void 0?delete r[i]:r[i]=structuredClone(t[i]);const s=r.speakers;if(typeof s=="object"&&s!==null){const i={...s},a=(n,o,h)=>{h.forEach((d,l)=>{const c=l===0?n:`${n}${l+1}`;i[c]?i[c]={...i[c],[o]:d}:l>0&&(i[c]={role:n,[o]:d})})};a("interviewer","by",t.by??[]),a("witness","of",u.witnessesOf(t.interviewOf)),r.speakers=i}return u.ordered(r)}applyFileToEvent(e,t){const r=this.current;if(!r)return!1;const s=JSON.stringify(u.SHARED.map(n=>r[n])),i=n=>typeof n=="string"||typeof n=="object"&&n!==null&&!Array.isArray(n),a={title:i,summary:i,time:n=>typeof n=="string",medium:n=>typeof n=="string",by:n=>Array.isArray(n),interviewOf:n=>typeof n=="string"||Array.isArray(n)};for(const n of u.SHARED){const o=e[n];o!==void 0&&a[n](o)?r[n]=structuredClone(o):t&&delete r[n]}return JSON.stringify(u.SHARED.map(n=>r[n]))!==s}syncFileFromEvent(){const e=this.current,t=this.fileEditor?.text??this.text;if(!e||t===void 0)return;let r;try{r=JSON.parse(t)}catch{return}if(typeof r!="object"||r===null||Array.isArray(r))return;const s=u.pretty(u.withEventFields(r,e));s!==t&&(this.text=s,this.fileEditor?.replaceText(s,!1),this.dispatchEvent(new CustomEvent(S,{bubbles:!0,composed:!0,detail:{field:"transcript",event:e,text:s}})))}template(e){return u.pretty(u.withEventFields({version:1,language:this.language,speakers:{interviewer:{role:"interviewer"},witness:{role:"witness"}},segments:[]},e))}loadFileEditor(e){return this.fileEditorLoading??=(async()=>{try{const[{SightingFileEditor:t},{default:r},s]=await Promise.all([w(()=>import("./SightingFileEditor-Cllslp2u.js"),__vite__mapDeps([8,9,10]),import.meta.url),w(()=>import("./interviewSchema-Dk0AWHwc.js"),[],import.meta.url),K(this.language)]);return this.fileEditor=new t(this.shadow.getElementById("file-editor"),e,i=>this.onEdited(i),this.messages.editorLabel,{baseline:e,phrases:s.fileSearchPhrases,schema:r}),this.fileEditor}catch(t){throw this.fileEditorLoading=void 0,t}})(),this.fileEditorLoading}async showTranscript(){const e=this.current;if(!e||this.shownFor===e)return;this.note(this.messages.loading);let t=this.text;if(t===void 0){const r=this.transcriptUrl(e);if(r!==void 0)try{const s=await C.json(r);this.current===e&&typeof s=="object"&&s!==null&&!Array.isArray(s)?(this.applyFileToEvent(s,!1)&&this.fileChangedEvent(),t=u.pretty(u.withEventFields(s,e))):t=u.pretty(s)}catch{this.note(this.messages.loadFailed,"error")}t??=this.template(e)}if(this.current===e)try{const r=await this.loadFileEditor(t);if(this.current!==e)return;r.replaceText(t,!1),this.shownFor=e,this.text!==void 0||this.transcriptUrl(e)===void 0?this.note(void 0):this.shadow.getElementById("file-note").textContent===this.messages.loading&&this.note(void 0)}catch{this.note(this.messages.loadFailed,"error")}}onEdited(e){this.text=e;let t,r=!0;try{t=JSON.parse(e)}catch{r=!1}this.note(r?void 0:this.messages.invalid,"error");const s=this.current;if(r&&s&&typeof t=="object"&&t!==null&&!Array.isArray(t)&&this.applyFileToEvent(t,!0)&&this.fileChangedEvent(),s&&!s.url&&e.trim()!==""){const i=s.id??"1";s.url=`${i.startsWith("interview")?i:`interview-${i}`}.json`,this.field("url").value=s.url,this.dispatchEvent(new CustomEvent(S,{bubbles:!0,composed:!0,detail:{field:"url",event:s}}))}this.dispatchEvent(new CustomEvent(S,{bubbles:!0,composed:!0,detail:{field:"transcript",event:s,text:e}})),this.exchangesShown=this.showExchanges()}fileChangedEvent(){this.render(),this.dispatchEvent(new CustomEvent(S,{bubbles:!0,composed:!0,detail:{field:"file",event:this.current}}))}async take(e){if(typeof e!="object"||e===null||!Array.isArray(e.segments)){this.note(this.messages.notATranscript,"error");return}const t=this.current;t&&this.applyFileToEvent(e,!1)&&this.fileChangedEvent();const r=u.pretty(t?u.withEventFields(e,t):e);await this.loadFileEditor(r).then(s=>s.replaceText(r,!1),()=>{}),this.shownFor=this.current,this.note(void 0),this.onEdited(r)}async importFromFile(e){try{const t=await e.text();let r;try{r=JSON.parse(t)}catch{r=void 0}if(typeof r!="object"||r===null){const{InterviewImport:s}=await w(async()=>{const{InterviewImport:o}=await import("./interviewImport-ym5iXO4Z.js");return{InterviewImport:o}},__vite__mapDeps([5,6,7]),import.meta.url),i=this.current,a=[i?.interviewOf].flat().filter(o=>typeof o=="string"),n=s.parse(t,{by:(i?.by??[]).map(o=>u.byText([o])).filter(o=>o!==""),witnesses:this.options.filter(o=>a.length===0||a.includes(o.id))});r=n&&{...n,transcription:{note:`Imported from ${e.name}: who speaks and when are as the file gave them, to be checked.`}}}r===void 0?this.note(this.messages.notATranscript,"error"):await this.take(r)}catch{this.note(this.messages.loadFailed,"error")}}async importFromUrl(e){try{await this.take(await C.json(new URL(e,this.base??location.href).href))}catch{this.note(this.messages.loadFailed,"error")}}save(){const e=this.fileEditor?.text??this.text;if(e===void 0)return;const t=(this.current?.url??"").split("/").pop()||`${this.current?.id??"interview"}.json`,r=URL.createObjectURL(new Blob([e],{type:"application/json"})),s=document.createElement("a");s.href=r,s.download=t,s.click(),URL.revokeObjectURL(r)}}function ye(){X(),j(),customElements.get(_)||customElements.define(_,u)}export{S as INTERVIEW_CHANGE_EVENT,_ as INTERVIEW_EDITOR_ELEMENT_NAME,ke as INTERVIEW_SEEK_EVENT,u as InterviewEditorElement,ye as register};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import{S as E}from"./SaidPosition-CWiVNaNW.js";import{S as N,H as T,s as S,U as L,B as A}from"./rr0-ufoathome.mjs";import{I}from"./CaseTimeline-Dq1H2Ucy.js";import{InterviewFile as p}from"./interviewJson-D-i14LTf.js";import{P as j}from"./ShareDialogElement-C3HL-Smq.js";import"./Sighting-CBpJpdm9.js";import"./VisualAids-DI-hEL46.js";import"./Decor-Dn-cvniW.js";import"./RecordingIssue-BlWT8Xsu.js";import"./Obstacles-v9SkfBD7.js";const x="rr0-interview",C=`
|
|
2
|
+
rr0-interview { display: block; --rr0-interview-line: color-mix(in srgb, currentColor 35%, transparent); }
|
|
3
|
+
rr0-interview [hidden] { display: none !important; }
|
|
4
|
+
rr0-interview .rr0-interview-status { font-size: .85em; opacity: .85; margin: 0 0 .5em; }
|
|
5
|
+
/* Scrolling only where a height is asked for: a box that scrolls keeps clear of the page's floated figures for all its height. */
|
|
6
|
+
rr0-interview .rr0-interview-turns { max-height: var(--rr0-interview-max-height, none); overflow-y: var(--rr0-interview-overflow, visible); }
|
|
7
|
+
/* An intervention: what one speaker says before another speaks, one turn or several; pointed at as a whole. */
|
|
8
|
+
rr0-interview .intervention { margin: 0 0 .4em; border-left: 3px solid var(--speaker); --speaker: hsl(var(--speaker-hue, 0) 55% 38%); transition: background-color .15s; }
|
|
9
|
+
@media (prefers-color-scheme: dark) { rr0-interview .intervention { --speaker: hsl(var(--speaker-hue, 0) 65% 70%); } }
|
|
10
|
+
rr0-interview .intervention:hover { background: color-mix(in srgb, var(--speaker) 7%, transparent); }
|
|
11
|
+
rr0-interview .turn { position: relative; padding: .2em .5em; }
|
|
12
|
+
rr0-interview .turn.flash { background: color-mix(in srgb, #fc3 28%, transparent); }
|
|
13
|
+
/* The passage the replay is inside stays lit while it is there, instead of a flash that is over before anyone looks. Nothing marks the
|
|
14
|
+
passages that are merely tied to a moment: each already carries its timecode, which says it (dicté). */
|
|
15
|
+
rr0-interview .turn.synced { background: color-mix(in srgb, #fc3 12%, transparent); }
|
|
16
|
+
rr0-interview .turn .who { font-size: .85em; font-weight: 600; color: var(--speaker); overflow-wrap: anywhere; }
|
|
17
|
+
rr0-interview .turn.is-redacted .who, rr0-interview .turn.goes-on .who { display: none; }
|
|
18
|
+
rr0-interview .turn .said, rr0-interview .turn .redacted { margin: 0; padding: 0; text-indent: 0; white-space: pre-wrap; }
|
|
19
|
+
rr0-interview .turn .said::before, rr0-interview .turn .said::after { content: none; }
|
|
20
|
+
/* Tooltips drawn here rather than left to the browser's own, which some hosts (an embedded pane) never show. */
|
|
21
|
+
rr0-interview .turn[data-time]:hover:not(:has(.bar:hover, .bar:focus, .said a:hover))::after { content: attr(data-time); position: absolute; right: .3em; top: .2em; z-index: 2;
|
|
22
|
+
padding: 0 .4em; border-radius: 3px; font-size: .8em; font-variant-numeric: tabular-nums; background: #222; color: #fff; pointer-events: none; }
|
|
23
|
+
rr0-interview .bar { position: relative; display: inline-block; width: 3em; height: .9em; vertical-align: -.1em; border-radius: 2px; background: currentColor; margin: 0 .2em; cursor: help; }
|
|
24
|
+
rr0-interview .bar::after { content: attr(data-tip); display: none; position: absolute; left: 0; top: 1.4em; z-index: 3; width: max-content; max-width: 22em; padding: .3em .5em;
|
|
25
|
+
border-radius: 4px; background: #222; color: #fff; font-size: .85em; line-height: 1.3; white-space: normal; }
|
|
26
|
+
rr0-interview .bar:hover::after, rr0-interview .bar:focus::after { display: block; }
|
|
27
|
+
rr0-interview .turn .refs { display: flex; flex-wrap: wrap; gap: .25em; }
|
|
28
|
+
rr0-interview .turn .ref { font: inherit; font-size: .8em; cursor: pointer; border: 1px solid var(--rr0-interview-line); border-radius: 999px; background: transparent; color: inherit;
|
|
29
|
+
padding: 0 .35em; font-variant-numeric: tabular-nums; white-space: nowrap; display: inline-flex; align-items: center; gap: .15em; }
|
|
30
|
+
rr0-interview .turn .ref svg { width: 1.1em; height: 1.1em; }
|
|
31
|
+
`;class b extends HTMLElement{messages;said=new E(["en"]);localeToken=0;loadToken=0;json;loading;base;status=document.createElement("p");turns=document.createElement("div");blocks=new Map;lastRevealed;syncedIndex;constructor(){super(),this.status.className="rr0-interview-status",this.status.setAttribute("role","status"),this.turns.className="rr0-interview-turns"}static get observedAttributes(){return["src"]}attributeChangedCallback(t,e,s){t==="src"&&s!==e&&this.isConnected&&this.load()}connectedCallback(){b.styleRoot(this.getRootNode()),this.contains(this.turns)||this.replaceChildren(this.status,this.turns),this.loadLocale(),this.hasAttribute("src")&&this.json===void 0&&this.loading!==this.getAttribute("src")&&this.load()}get interview(){return this.json}set interview(t){this.loadToken++,this.json=t,this.draw()}set documentUrl(t){this.base=t}static styleRoot(t){const e=t instanceof ShadowRoot?t:document.head;if(e.querySelector("style[data-rr0-interview]"))return;const s=document.createElement("style");s.dataset.rr0Interview="",s.textContent=C,e.append(s)}async load(){const t=this.getAttribute("src"),e=++this.loadToken;if(this.loading=t??void 0,!t)return;const s=new URL(t,location.href).href;let r;try{r=p.read(await N.json(s))}catch{r=void 0}e===this.loadToken&&(this.base=s,this.json=r,this.draw())}async loadLocale(){const t=++this.localeToken,e=T.preferencesFor(this),s=S(e,L),r=await A.load(s);t===this.localeToken&&(this.said=new E(e),this.messages=r,this.draw())}speakerName(t,e){const s=p.speakerName(t,e),r=t.speakers?.[e]?.role;return s===r&&r in this.messages.roles?this.messages.roles[r]:s}seek(t,e){const s=this.json,r=e?p.said(e):void 0,i={sighting:t.sighting??p.sightingsOf(s)[0],at:t.at,...r?{quote:r}:{}};this.dispatchEvent(new CustomEvent(I,{bubbles:!0,composed:!0,detail:i}));const o=this.getAttribute("player");if(!o)return;const c=this.getRootNode().getElementById?.(o);typeof c?.seekTo=="function"&&(c.scrollIntoView?.({block:"center",behavior:"smooth"}),c.seekTo(i.at,i.sighting))}gap(t,e){const s=document.createElement(e),r=document.createElement("span");r.className="bar";const i=`${this.messages.redacted}${this.messages.colon}${this.said.read(t)??""}`;return r.dataset.tip=i,r.tabIndex=0,r.setAttribute("role","img"),r.setAttribute("aria-label",i),s.append(r),s}saidNodes(t){if(!/[<&]/.test(t))return[document.createTextNode(t)];const e=document.createElement("template");e.innerHTML=t;for(const s of e.content.querySelectorAll("*")){if(["SCRIPT","STYLE","IFRAME","OBJECT","EMBED"].includes(s.tagName)){s.remove();continue}for(const r of[...s.attributes])if(/^on/i.test(r.name)||/^\s*javascript:/i.test(r.value))s.removeAttribute(r.name);else if(["href","src"].includes(r.name))try{r.value=new URL(r.value,this.base??location.href).href}catch{}}return[...e.content.childNodes]}draw(){if(!this.messages)return;const t=this.messages,e=this.json;this.blocks.clear();const s=Array.isArray(e?.segments)?e.segments:[];if(!e||s.length===0){this.status.hidden=!0;const n=document.createElement("p");n.textContent=t.exchangesEmpty,this.turns.replaceChildren(n);return}const r=e.speakers??{},i=Object.keys(r);if(e.proofreading){const n=i.filter(m=>!["approved","covered"].includes(e.proofreading?.[m]?.status??""));this.status.textContent=n.length===0?t.proofreadAll:t.proofreadPending.replace("{names}",n.map(m=>this.speakerName(e,m)).join(", ")),this.status.hidden=!1}else this.status.hidden=!0;const o=[];let l,c=!1,u,v;s.forEach((n,m)=>{const w=n.redacted?JSON.stringify(n.redacted.reason):void 0;if(w!==void 0&&u?.reason===w){this.blocks.set(m,u.block),n.speaker!==v&&(v=void 0);return}const h=document.createElement("div");h.className="turn",h.dataset.segment=String(m);const g=document.createElement("div");g.className="who";const k=document.createElement("span");if(k.textContent=n.redacted?"":this.speakerName(e,n.speaker),n.start!==void 0&&(h.dataset.time=p.clock(n.start,!0)),v!==n.speaker&&(l=document.createElement("div"),l.className="intervention",l.style.setProperty("--speaker-hue",String((Math.max(0,i.indexOf(n.speaker))*67+210)%360)),o.push(l),c=!1),n.redacted||(c&&h.classList.add("goes-on"),c=!0),l.append(h),v=n.speaker,g.append(k),n.redacted){h.classList.add("is-redacted");const a=this.gap(n.redacted.reason,"p");a.className="redacted",u={block:h,reason:w},h.append(g,a)}else{const a=document.createElement("p");if(a.className="said",n.parts){let f="";for(const d of n.parts){const y="redacted"in d?"▮":p.plain(d.text);/[\p{L}\p{N}.,;:!?)»”…▮]$/u.test(f)&&/^[\p{L}\p{N}(«“▮]/u.test(y)&&a.append(" "),"redacted"in d?a.append(this.gap(d.redacted.reason,"span")):a.append(...this.saidNodes(d.text)),f=y}}else a.append(...this.saidNodes(n.text??""));u=void 0,h.append(g,a)}if(n.refs?.length){const a=document.createElement("div");a.className="refs";for(const f of n.refs){const d=document.createElement("button");d.type="button",d.className="ref",d.innerHTML=j.PLAY,d.append(p.clock(f.at,!0)),d.addEventListener("click",()=>this.seek(f,n)),a.append(d)}h.append(a)}this.blocks.set(m,h)}),this.turns.replaceChildren(...o)}revealAt(t,e){const s=this.json;if(!s)return;const r=p.sightingsOf(s)[0];let i;if(s.segments?.forEach((o,l)=>{for(const c of o.refs??[]){const u=c.sighting??r;e!==void 0&&u!==void 0&&u!==e||c.at>t+.001||(!i||c.at>i.at)&&(i={index:l,at:c.at})}}),!!i)return i.index!==this.lastRevealed&&(this.lastRevealed=i.index,this.revealSegment(i.index)),this.markSynced(i.index),i.index}momentsCited(t){const e=this.json;if(!e)return[];const s=p.sightingsOf(e)[0],r=[];for(const i of e.segments??[])for(const o of i.refs??[]){const l=o.sighting??s;t!==void 0&&l!==void 0&&l!==t||r.push({at:o.at,quote:p.said(i)??""})}return r.sort((i,o)=>i.at-o.at)}markSynced(t){t!==this.syncedIndex&&(this.syncedIndex!==void 0&&this.blocks.get(this.syncedIndex)?.classList.remove("synced"),this.syncedIndex=t,this.blocks.get(t)?.classList.add("synced"))}revealSegment(t){const e=this.blocks.get(t);e&&(e.scrollIntoView?.({block:"center"}),e.classList.add("flash"),window.setTimeout(()=>e.classList.remove("flash"),1600))}}function H(){customElements.get(x)||customElements.define(x,b)}export{x as INTERVIEW_ELEMENT_NAME,I as INTERVIEW_SEEK_EVENT,b as InterviewElement,H as register};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
class t{static LABELS={en:{"in-person":"In person",phone:"Phone",video:"Video call",chat:"Chat",email:"Email",letter:"Letter",other:"Other"},fr:{"in-person":"Face à face",phone:"Téléphone",video:"Visioconférence",chat:"Chat",email:"Mail",letter:"Courrier",other:"Autre"},es:{"in-person":"En persona",phone:"Teléfono",video:"Videollamada",chat:"Chat",email:"Correo electrónico",letter:"Carta",other:"Otro"},it:{"in-person":"Di persona",phone:"Telefono",video:"Videochiamata",chat:"Chat",email:"Email",letter:"Lettera",other:"Altro"}};static ALL=["in-person","phone","video","chat","email","letter","other"];static label(e,o){return t.LABELS[o][e]??e}}export{t as InterviewMedia};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e={title:"Title",time:"When",by:"Interviewer",medium:"Medium",witness:"Witness",witnessNone:"—",summary:"Description",transcript:"Transcript",transcriptHint:"Address of the anonymised transcript file (optional)",summaryTab:"Summary",fileTab:"File",importFile:"Load a file",importFileHint:"JSON, text, WebVTT, SRT",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",saveButton:"Save",loading:"Loading the transcript…",invalid:"This text is not valid JSON yet: the interview keeps the last transcript it understood.",notATranscript:"That file is not an interview transcript (it has no segments).",loadFailed:"That transcript could not be read.",editorLabel:"Interview transcript as JSON",byHint:"RR0 people ids, separated by commas",exchangesTab:"Exchanges",exchangesEmpty:"Nothing was said yet.",redacted:"Passage removed",colon:": ",proofreadAll:"Proofread by everyone.",proofreadPending:"Not proofread yet by: {names}",play:"Play",pause:"Pause",recordings:"Recordings ({n})",recordingsTitle:"Recordings",recordingKind:"Type",recordingAudio:"Audio",recordingVideo:"Video",recordingFile:"File",recordingOffset:"Offset",recordingRemove:"Remove",recordingAdd:"Add a recording",close:"Close",noRecording:"No recording: add the audio or video file of the interview to listen to it.",redactSelection:"Take out the selection",redactedWords:"passage taken out · {n} word(s)",redactAll:"Take all out",redactRestore:"Restore",restoreAll:"Restore all",editTurn:"Edit",deleteTurn:"Delete this turn",saveTurn:"Save",cancelTurn:"Cancel",turnEditHint:"⟦ … ⟧ marks a passage taken out",selectionOnePassage:"The selection has to stay within one passage not taken out.",reviewedBy:"{name} has proofread",linkMoment:"Link to a moment…",momentLabel:"Moment {k} · {text}",unlinkMoment:"Remove this link",noMoments:"The observation has no named moment yet.",redactReasonLabel:"Reason",redactReasonHint:"Said of every passage taken out next: the reader of the published interview sees it in the passage's place",redactReasons:["private life","identifying detail","off topic","recognition error"],redactReason:"taken out at proofreading",roles:{interviewer:"Interviewer",interviewee:"Interviewee",witness:"Witness",unattributed:"Voice to attribute"},transcribe:"Transcribe the recording",transcribeWith:"with",transcribeHint:"Turns the interview's recording into turns of speech, with their times. Whose each voice is stays to say, turn by turn (Who speaks), then to have proofread.",transcribeLocal:"Nothing leaves your computer. The first time, the model (about {mb} MB) is downloaded, then kept by the browser.",transcribeSends:"The recording will be sent to {name} to be transcribed.",transcribeReplaces:"The current transcript will be replaced.",transcribeNoRecording:"There is no recording of the interview yet: the button opens the window where you add it.",transcribeKey:"Key",transcribeKeyGet:"get a key",transcribeKeyHint:"Kept in memory until the page is reloaded, never stored",transcribeReading:"Reading the recording…",transcribeLoading:"Downloading the model: {loaded} of {total} MB",transcribeLoadingSoFar:"Downloading the model: {loaded} MB",transcribeSending:"Sending the recording to {name}…",transcribeWaiting:"{name} is transcribing the recording…",transcribeProgress:"Transcribing: {done} of {total}",transcribeStop:"Stop",transcribeDone:"Transcribed by {engine}. Say whose each voice is (Who speaks), then have it proofread.",transcribeStopped:"Transcription stopped: nothing was changed.",transcribeErrors:{noKey:"Type your key for this service first.",key:"The service refused the key.",rateLimited:"The service asks to wait (its quota is reached): try again later.",tooLarge:"The recording is too large to be read in the page: give its audio alone.",unsupported:"This browser cannot run the transcription.",failed:"The transcription failed: {detail}"},voiceNamed:"Voice {name}",whoSpeaks:"Who speaks…"};export{e as interviewMessages_en};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e={title:"Título",time:"Fecha",by:"Entrevistador",medium:"Medio",witness:"Testigo",witnessNone:"—",summary:"Descripción",transcript:"Transcripción",transcriptHint:"Dirección del archivo de transcripción anonimizada (opcional)",summaryTab:"Resumen",fileTab:"Archivo",importFile:"Cargar un archivo",importFileHint:"JSON, texto, WebVTT, SRT",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",saveButton:"Guardar",loading:"Cargando la transcripción…",invalid:"Este texto aún no es JSON válido: la entrevista conserva la última transcripción que entendió.",notATranscript:"Ese archivo no es una transcripción de entrevista (no tiene turnos de palabra).",loadFailed:"No se pudo leer esa transcripción.",editorLabel:"Transcripción de la entrevista en JSON",byHint:"Identificadores de personas de RR0, separados por comas",exchangesTab:"Intercambios",exchangesEmpty:"Todavía no se ha dicho nada.",redacted:"Pasaje eliminado",colon:": ",proofreadAll:"Revisado por todos.",proofreadPending:"Aún no revisado por: {names}",play:"Reproducir",pause:"Pausa",recordings:"Grabaciones ({n})",recordingsTitle:"Grabaciones",recordingKind:"Tipo",recordingAudio:"Audio",recordingVideo:"Vídeo",recordingFile:"Archivo",recordingOffset:"Desfase",recordingRemove:"Quitar",recordingAdd:"Añadir una grabación",close:"Cerrar",noRecording:"Sin grabación: añada el archivo de audio o vídeo de la entrevista para poder escucharla.",redactSelection:"Retirar la selección",redactedWords:"pasaje retirado · {n} palabra(s)",redactAll:"Retirar todo",redactRestore:"Restablecer",restoreAll:"Restablecer todo",editTurn:"Modificar",deleteTurn:"Eliminar este turno de palabra",saveTurn:"Guardar",cancelTurn:"Cancelar",turnEditHint:"⟦ … ⟧ marca un pasaje retirado",selectionOnePassage:"La selección debe caber en un solo pasaje no retirado.",reviewedBy:"{name} ha revisado",linkMoment:"Vincular a un momento…",momentLabel:"Momento {k} · {text}",unlinkMoment:"Quitar este vínculo",noMoments:"La observación aún no tiene momentos con nombre.",redactReasonLabel:"Motivo",redactReasonHint:"Se dice de cada pasaje retirado a continuación: el lector de la entrevista publicada lo ve en lugar del pasaje",redactReasons:["vida privada","dato que identifica","fuera de tema","error de reconocimiento"],redactReason:"retirado en la revisión",roles:{interviewer:"Entrevistador",interviewee:"Entrevistado",witness:"Testigo",unattributed:"Voz por atribuir"},transcribe:"Transcribir la grabación",transcribeWith:"con",transcribeHint:"Convierte la grabación de la entrevista en turnos de palabra, con sus tiempos. De quién es cada voz queda por decir, turno por turno (Quién habla), y luego por hacer revisar.",transcribeLocal:"Nada sale de su ordenador. La primera vez, el modelo (unos {mb} MB) se descarga y el navegador lo conserva.",transcribeSends:"La grabación se enviará a {name} para ser transcrita.",transcribeReplaces:"La transcripción actual será reemplazada.",transcribeNoRecording:"La entrevista aún no tiene grabación: el botón abre la ventana donde añadirla.",transcribeKey:"Clave",transcribeKeyGet:"obtener una clave",transcribeKeyHint:"Se guarda en memoria hasta que se recarga la página, nunca se almacena",transcribeReading:"Leyendo la grabación…",transcribeLoading:"Descargando el modelo: {loaded} de {total} MB",transcribeLoadingSoFar:"Descargando el modelo: {loaded} MB",transcribeSending:"Enviando la grabación a {name}…",transcribeWaiting:"{name} transcribe la grabación…",transcribeProgress:"Transcribiendo: {done} de {total}",transcribeStop:"Detener",transcribeDone:"Transcrito por {engine}. Indique de quién es cada voz (Quién habla) y luego hágalo revisar.",transcribeStopped:"Transcripción detenida: no se ha cambiado nada.",transcribeErrors:{noKey:"Escriba primero su clave para este servicio.",key:"El servicio rechazó la clave.",rateLimited:"El servicio pide esperar (cuota alcanzada): inténtelo más tarde.",tooLarge:"La grabación es demasiado grande para leerse en la página: proporcione solo su audio.",unsupported:"Este navegador no puede ejecutar la transcripción.",failed:"La transcripción ha fallado: {detail}"},voiceNamed:"Voz {name}",whoSpeaks:"Quién habla…"};export{e as interviewMessages_es};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e={title:"Titre",time:"Date",by:"Enquêteur",medium:"Moyen",witness:"Témoin",witnessNone:"—",summary:"Description",transcript:"Transcription",transcriptHint:"Adresse du fichier de transcription anonymisée (facultative)",summaryTab:"Résumé",fileTab:"Fichier",importFile:"Charger un fichier",importFileHint:"JSON, texte, WebVTT, SRT",inputFileFromFile:"depuis votre disque",inputFileFromUrl:"depuis une adresse",inputFileModeHint:"Cliquer pour le donner autrement : un fichier à vous, ou une adresse",inputFileLoad:"Charger",saveButton:"Sauver",loading:"Chargement de la transcription…",invalid:"Ce texte n'est pas encore du JSON valide : l'interview garde la dernière transcription qu'elle a comprise.",notATranscript:"Ce fichier n'est pas une transcription d'interview (il n'a pas de tours de parole).",loadFailed:"Cette transcription n'a pas pu être lue.",editorLabel:"Transcription de l'interview en JSON",byHint:"Identifiants de personnes RR0, séparés par des virgules",exchangesTab:"Échanges",exchangesEmpty:"Rien n'a encore été dit.",redacted:"Passage retiré",colon:" : ",proofreadAll:"Relu par tous les participants.",proofreadPending:"Pas encore relu par : {names}",play:"Lecture",pause:"Pause",recordings:"Enregistrements ({n})",recordingsTitle:"Enregistrements",recordingKind:"Type",recordingAudio:"Audio",recordingVideo:"Vidéo",recordingFile:"Fichier",recordingOffset:"Décalage",recordingRemove:"Retirer",recordingAdd:"Ajouter un enregistrement",close:"Fermer",noRecording:"Aucun enregistrement : ajoutez le fichier audio ou vidéo de l'entretien pour pouvoir l'écouter.",redactSelection:"Retirer la sélection",redactedWords:"passage retiré · {n} mot(s)",redactAll:"Retirer tout",redactRestore:"Rétablir",restoreAll:"Rétablir tout",editTurn:"Modifier",deleteTurn:"Supprimer ce tour de parole",saveTurn:"Enregistrer",cancelTurn:"Annuler",turnEditHint:"⟦ … ⟧ marque un passage retiré",selectionOnePassage:"La sélection doit tenir dans un seul passage non retiré.",reviewedBy:"{name} a relu",linkMoment:"Relier à un moment…",momentLabel:"Moment {k} · {text}",unlinkMoment:"Retirer ce lien",noMoments:"L'observation n'a pas encore de moment nommé.",redactReasonLabel:"Raison",redactReasonHint:"Dite de chaque passage retiré ensuite : le lecteur de l'interview publiée la voit à la place du passage",redactReasons:["vie privée","détail qui identifie","hors sujet","erreur de reconnaissance"],redactReason:"retiré à la relecture",roles:{interviewer:"Intervieweur",interviewee:"Interviewé",witness:"Témoin",unattributed:"Voix à attribuer"},transcribe:"Transcrire l'enregistrement",transcribeWith:"avec",transcribeHint:"Fait de l'enregistrement de l'entretien des tours de parole, avec leurs instants. À qui est chaque voix reste à dire, tour par tour (Qui parle), puis à faire relire.",transcribeLocal:"Rien ne quitte votre ordinateur. La première fois, le modèle (environ {mb} Mo) est téléchargé, puis gardé par le navigateur.",transcribeSends:"L'enregistrement sera envoyé à {name} pour être transcrit.",transcribeReplaces:"La transcription actuelle sera remplacée.",transcribeNoRecording:"L'interview n'a pas encore d'enregistrement : le bouton ouvre la fenêtre où l'ajouter.",transcribeKey:"Clé",transcribeKeyGet:"obtenir une clé",transcribeKeyHint:"Gardée en mémoire jusqu'au rechargement de la page, jamais enregistrée",transcribeReading:"Lecture de l'enregistrement…",transcribeLoading:"Téléchargement du modèle : {loaded} sur {total} Mo",transcribeLoadingSoFar:"Téléchargement du modèle : {loaded} Mo",transcribeSending:"Envoi de l'enregistrement à {name}…",transcribeWaiting:"{name} transcrit l'enregistrement…",transcribeProgress:"Transcription : {done} sur {total}",transcribeStop:"Arrêter",transcribeDone:"Transcrit par {engine}. Dites à qui est chaque voix (Qui parle), puis faites relire.",transcribeStopped:"Transcription arrêtée : rien n'a été changé.",transcribeErrors:{noKey:"Saisissez d'abord votre clé pour ce service.",key:"Le service a refusé la clé.",rateLimited:"Le service demande d'attendre (quota atteint) : réessayez plus tard.",tooLarge:"L'enregistrement est trop gros pour être lu dans la page : donnez-en l'audio seul.",unsupported:"Ce navigateur ne peut pas faire tourner la transcription.",failed:"La transcription a échoué : {detail}"},voiceNamed:"Voix {name}",whoSpeaks:"Qui parle…"};export{e as interviewMessages_fr};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const i={title:"Titolo",time:"Data",by:"Intervistatore",medium:"Mezzo",witness:"Testimone",witnessNone:"—",summary:"Descrizione",transcript:"Trascrizione",transcriptHint:"Indirizzo del file di trascrizione anonimizzata (facoltativo)",summaryTab:"Riepilogo",fileTab:"File",importFile:"Carica un file",importFileHint:"JSON, testo, WebVTT, SRT",inputFileFromFile:"dal proprio disco",inputFileFromUrl:"da un indirizzo",inputFileModeHint:"Fare clic per darlo nell'altro modo: un proprio file o un indirizzo",inputFileLoad:"Carica",saveButton:"Salva",loading:"Caricamento della trascrizione…",invalid:"Questo testo non è ancora JSON valido: l'intervista conserva l'ultima trascrizione che ha capito.",notATranscript:"Quel file non è una trascrizione di intervista (non ha turni di parola).",loadFailed:"Impossibile leggere quella trascrizione.",editorLabel:"Trascrizione dell'intervista in JSON",byHint:"Identificatori di persone RR0, separati da virgole",exchangesTab:"Scambi",exchangesEmpty:"Non è stato ancora detto nulla.",redacted:"Passaggio rimosso",colon:": ",proofreadAll:"Rivisto da tutti.",proofreadPending:"Non ancora rivisto da: {names}",play:"Riproduci",pause:"Pausa",recordings:"Registrazioni ({n})",recordingsTitle:"Registrazioni",recordingKind:"Tipo",recordingAudio:"Audio",recordingVideo:"Video",recordingFile:"File",recordingOffset:"Scarto",recordingRemove:"Rimuovi",recordingAdd:"Aggiungi una registrazione",close:"Chiudi",noRecording:"Nessuna registrazione: aggiungi il file audio o video dell'intervista per poterla ascoltare.",redactSelection:"Rimuovi la selezione",redactedWords:"passaggio rimosso · {n} parola/e",redactAll:"Rimuovi tutto",redactRestore:"Ripristina",restoreAll:"Ripristina tutto",editTurn:"Modifica",deleteTurn:"Elimina questo turno",saveTurn:"Salva",cancelTurn:"Annulla",turnEditHint:"⟦ … ⟧ indica un passaggio rimosso",selectionOnePassage:"La selezione deve restare in un solo passaggio non rimosso.",reviewedBy:"{name} ha riletto",linkMoment:"Collega a un momento…",momentLabel:"Momento {k} · {text}",unlinkMoment:"Rimuovi questo collegamento",noMoments:"L'osservazione non ha ancora momenti con nome.",redactReasonLabel:"Motivo",redactReasonHint:"Detto di ogni passaggio rimosso in seguito: il lettore dell'intervista pubblicata lo vede al posto del passaggio",redactReasons:["vita privata","dettaglio che identifica","fuori tema","errore di riconoscimento"],redactReason:"rimosso in rilettura",roles:{interviewer:"Intervistatore",interviewee:"Intervistato",witness:"Testimone",unattributed:"Voce da attribuire"},transcribe:"Trascrivi la registrazione",transcribeWith:"con",transcribeHint:"Trasforma la registrazione dell'intervista in turni di parola, con i loro tempi. Di chi sia ogni voce resta da dire, turno per turno (Chi parla), e poi da far rileggere.",transcribeLocal:"Nulla lascia il tuo computer. La prima volta il modello (circa {mb} MB) viene scaricato e poi conservato dal browser.",transcribeSends:"La registrazione sarà inviata a {name} per essere trascritta.",transcribeReplaces:"La trascrizione attuale sarà sostituita.",transcribeNoRecording:"L'intervista non ha ancora una registrazione: il pulsante apre la finestra dove aggiungerla.",transcribeKey:"Chiave",transcribeKeyGet:"ottieni una chiave",transcribeKeyHint:"Tenuta in memoria fino al ricaricamento della pagina, mai salvata",transcribeReading:"Lettura della registrazione…",transcribeLoading:"Download del modello: {loaded} di {total} MB",transcribeLoadingSoFar:"Download del modello: {loaded} MB",transcribeSending:"Invio della registrazione a {name}…",transcribeWaiting:"{name} trascrive la registrazione…",transcribeProgress:"Trascrizione: {done} di {total}",transcribeStop:"Interrompi",transcribeDone:"Trascritto da {engine}. Indica di chi è ogni voce (Chi parla), poi fai rileggere.",transcribeStopped:"Trascrizione interrotta: non è stato cambiato nulla.",transcribeErrors:{noKey:"Inserisci prima la tua chiave per questo servizio.",key:"Il servizio ha rifiutato la chiave.",rateLimited:"Il servizio chiede di attendere (quota raggiunta): riprova più tardi.",tooLarge:"La registrazione è troppo grande per essere letta nella pagina: fornisci solo il suo audio.",unsupported:"Questo browser non può eseguire la trascrizione.",failed:"La trascrizione non è riuscita: {detail}"},voiceNamed:"Voce {name}",whoSpeaks:"Chi parla…"};export{i as interviewMessages_it};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import{G as s}from"./GeographicFigures-B0Bqeh10.js";import"./Sighting-CBpJpdm9.js";import"./VisualAids-DI-hEL46.js";import"./rr0-ufoathome.mjs";import"./SaidPosition-CWiVNaNW.js";import"./ShareDialogElement-C3HL-Smq.js";import"./Decor-Dn-cvniW.js";import"./RecordingIssue-BlWT8Xsu.js";import"./Obstacles-v9SkfBD7.js";class e{static GROUPS=["observer","sight-line","body","trace"];static of(o,t,a,l){const n=s.of(o,a,l),c=e.GROUPS.map(r=>n.filter(i=>i.group===r)).filter(r=>r.length>0).map(r=>e.folder(r[0].groupName,r.map(i=>e.placemark(i))));return`<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<kml xmlns="http://www.opengis.net/kml/2.2">
|
|
3
|
+
<Document>
|
|
4
|
+
<name>${e.xml(s.fill(a.document,{name:t}))}</name>
|
|
5
|
+
<description>${e.xml(`${a.documentNote} ${a.heightNote}`)}</description>
|
|
6
|
+
${c.join(`
|
|
7
|
+
`)}
|
|
8
|
+
</Document>
|
|
9
|
+
</kml>
|
|
10
|
+
`}static folder(o,t){return`<Folder>
|
|
11
|
+
<name>${e.xml(o)}</name>
|
|
12
|
+
${t.join(`
|
|
13
|
+
`)}
|
|
14
|
+
</Folder>`}static placemark(o){const t=e.mode(o),l=(o.kind==="polygon"&&o.points.length>0?[...o.points,o.points[0]]:o.points).map(i=>`${s.round(i.lng,7)},${s.round(i.lat,7)},${s.round(i.altM,2)}`).join(" "),n=o.kind==="point"?"Point":o.kind==="line"?"LineString":"Polygon",c=n==="Polygon"?`<Polygon><altitudeMode>${t}</altitudeMode><outerBoundaryIs><LinearRing><coordinates>${l}</coordinates></LinearRing></outerBoundaryIs></Polygon>`:`<${n}>${n==="LineString"?"<tessellate>1</tessellate>":""}<altitudeMode>${t}</altitudeMode><coordinates>${l}</coordinates></${n}>`,r=o.color?`
|
|
15
|
+
<Style><LineStyle><color>${e.abgr(o.color)}</color><width>2</width></LineStyle><PolyStyle><color>${e.abgr(o.color)}</color></PolyStyle></Style>`:"";return`<Placemark>
|
|
16
|
+
<name>${e.xml(o.name)}</name>${o.note?`
|
|
17
|
+
<description>${e.xml(o.note)}</description>`:""}${r}
|
|
18
|
+
${c}
|
|
19
|
+
</Placemark>`}static mode(o){switch(o.heights){case"absolute":return"absolute";case"ground":return"clampToGround";default:return"relativeToGround"}}static abgr(o){const t=/^#?([0-9a-f]{6})$/i.exec(o.trim());if(!t)return"ff0000ff";const[a,l,n]=[0,2,4].map(c=>t[1].slice(c,c+2).toLowerCase());return`ff${n}${l}${a}`}static xml(o){return o.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")}}export{e as KmlExport};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{_ as h}from"./rr0-ufoathome.mjs";class t{static ZIP_MAGIC=[80,75,3,4];static GEOMETRY=new Set(["Point","LineString","LinearRing","Polygon","MultiGeometry","Track","MultiTrack"]);static UNSUPPORTED=new Set(["GroundOverlay","ScreenOverlay","PhotoOverlay","Model","Tour","NetworkLink"]);static async fromBytes(e){if(t.ZIP_MAGIC.every((i,o)=>e[o]===i)){const{unzipSync:i,strFromU8:o}=await h(async()=>{const{unzipSync:c,strFromU8:s}=await import("./browser-CltifEM0.js");return{unzipSync:c,strFromU8:s}},[],import.meta.url),n=i(e),r=Object.keys(n),a=r.find(c=>c.toLowerCase()==="doc.kml")??r.find(c=>c.toLowerCase().endsWith(".kml"));if(!a)throw new Error("This KMZ holds no KML file.");return t.fromText(o(n[a]))}return t.fromText(new TextDecoder("utf-8").decode(e))}static fromText(e){const i=new DOMParser().parseFromString(e,"application/xml");if(i.getElementsByTagName("parsererror").length>0||!i.documentElement)throw new Error("This is not a readable KML file.");const o=t.styleColours(i),n=[],r=new Set,a=s=>{for(const f of Array.from(s.children)){const u=t.local(f);u==="Placemark"?t.placemark(f,o,n,r):u==="Document"||u==="Folder"?a(f):t.UNSUPPORTED.has(u)&&r.add(u)}};a(i.documentElement);const c=t.text(t.firstChild(t.firstChild(i.documentElement,"Document")??i.documentElement,"name"));return{traces:n,skipped:[...r],documentName:c}}static placemark(e,i,o,n){const r=t.text(t.firstChild(e,"name")),a=t.colourOf(e,i);for(const c of Array.from(e.children)){const s=t.local(c);t.GEOMETRY.has(s)?t.geometry(c,r,a,o):t.UNSUPPORTED.has(s)&&n.add(s)}}static geometry(e,i,o,n){const r=t.local(e);if(r==="MultiGeometry"||r==="MultiTrack"){for(const l of Array.from(e.children))t.GEOMETRY.has(t.local(l))&&t.geometry(l,i,o,n);return}const a=r==="Polygon"?t.firstChild(t.firstChild(e,"outerBoundaryIs")??e,"LinearRing"):e,c=t.firstChild(a??e,"coordinates"),s=r==="Track"?Array.from(e.children).filter(l=>t.local(l)==="coord").flatMap(l=>t.points((l.textContent??"").trim().split(/\s+/).join(","))):c?t.points(c.textContent??""):[],f=r==="Point"?"point":r==="LineString"||r==="Track"?"line":"polygon";if(f==="polygon"&&s.length>1){const l=s[0],d=s[s.length-1];l.lat===d.lat&&l.lng===d.lng&&l.altM===d.altM&&s.pop()}if(s.length===0||f==="line"&&s.length<2||f==="polygon"&&s.length<3)return;const u=t.altitudeOf(e);n.push({kind:f,points:s,...i?{title:i}:{},...u!=="ground"?{altitude:u}:{},...o?{color:o}:{}})}static points(e){const i=[];for(const o of e.trim().split(/\s+/)){const[n,r,a]=o.split(",").map(Number);!Number.isFinite(n)||!Number.isFinite(r)||Math.abs(r)>90||Math.abs(n)>180||i.push(Number.isFinite(a)&&a!==0?{lat:r,lng:n,altM:a}:{lat:r,lng:n})}return i}static altitudeOf(e){const i=t.text(t.firstChild(e,"altitudeMode")??t.firstChild(e,"altitudeMode",!0));return i==="absolute"?"absolute":i==="relativeToGround"?"relative":"ground"}static colourOf(e,i){const o=t.styleColour(t.firstChild(e,"Style"));if(o)return o;const n=t.text(t.firstChild(e,"styleUrl"));return n?i.get(n.replace(/^#/,"")):void 0}static styleColours(e){const i=new Map,o=Array.from(e.getElementsByTagName("*"));for(const n of o){if(t.local(n)!=="Style")continue;const r=n.getAttribute("id"),a=t.styleColour(n);r&&a&&i.set(r,a)}for(const n of o){if(t.local(n)!=="StyleMap")continue;const r=n.getAttribute("id");if(r)for(const a of Array.from(n.children)){if(t.text(t.firstChild(a,"key"))!=="normal")continue;const c=t.text(t.firstChild(a,"styleUrl"))?.replace(/^#/,""),s=c?i.get(c):void 0;s&&i.set(r,s)}}return i}static styleColour(e){if(e)for(const i of["LineStyle","PolyStyle","IconStyle"]){const o=t.text(t.firstChild(t.firstChild(e,i)??e,"color"));if(o)return t.cssColour(o)}}static cssColour(e){const i=/^([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})$/i.exec(e.trim());return i?`#${i[4]}${i[3]}${i[2]}`.toLowerCase():void 0}static local(e){return e.localName||e.nodeName.replace(/^.*:/,"")}static firstChild(e,i,o=!1){if(e){for(const n of Array.from(o?e.getElementsByTagName("*"):e.children))if(t.local(n)===i)return n}}static text(e){const i=e?.textContent?.trim();return i||void 0}}export{t as KmlImport};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import{M as u,_ as h,n as g,o as f}from"./rr0-ufoathome.mjs";import{d as p,P as y}from"./SaidPosition-CWiVNaNW.js";import{S as b}from"./SkyEventEditorStyle-CvY_AhbI.js";import{SkyLantern as o}from"./SkyLantern-DJT_Ibzh.js";import{s as T,b as w}from"./Sighting-CBpJpdm9.js";import{P as A,a as E,E as v}from"./ParameterForm-DfpJQGku.js";import"./Obstacles-v9SkfBD7.js";import"./VisualAids-DI-hEL46.js";const x=u.catalog({en:()=>h(()=>import("./LanternParameterTexts_en-CcnGd8UH.js"),[],import.meta.url).then(a=>a.lanternParameterTexts_en),fr:()=>h(()=>import("./LanternParameterTexts_fr-P2JwYOUy.js"),[],import.meta.url).then(a=>a.lanternParameterTexts_fr),es:()=>h(()=>import("./LanternParameterTexts_es-CUTgNutZ.js"),[],import.meta.url).then(a=>a.lanternParameterTexts_es),it:()=>h(()=>import("./LanternParameterTexts_it-CzNnIUrX.js"),[],import.meta.url).then(a=>a.lanternParameterTexts_it)});class i{static RELEASE="letGo";static LANTERNS="lanterns";static AIR="air";static LANTERN="eachLantern";static instant(e,t,n){return{type:"number",key:e,min:-36e3,max:36e3,step:1,unit:"s",scale:.001,required:!0,label:t,hint:n,group:i.LANTERNS}}static wind(e,t,n,s){return[{type:"number",key:`${e}.towardDeg`,min:0,max:360,step:1,unit:"°",group:i.AIR,hint:s,label:t},{type:"number",key:`${e}.speedMS`,min:0,max:60,step:.1,unit:"m/s",group:i.AIR,label:n}]}static SET={kind:"lantern",title:"skyLanterns",parameters:[{type:"said",key:"title",label:"name",group:i.RELEASE},{type:"position",key:"site.eastM",secondKey:"site.northM",saidKey:"site.saidPosition",native:"local",step:1,rangeM:1e5,group:i.RELEASE,label:"whereTheyAreLetGo",hint:"whereTheyAreLetGoFrom"},{type:"number",key:"site.altitudeM",min:-1e3,max:5e3,step:.1,unit:"m",group:i.RELEASE,effective:()=>0,label:"heightAboveThePlaceSGround",hint:"aGardenOnAHillAbove"},{type:"number",key:"site.originElevationM",min:-500,max:6e3,step:1,unit:"m",group:i.RELEASE,effective:()=>0,label:"thePlaceSGroundAboveThe",hint:"whatSetsHowThinTheAir"},{type:"number",key:"group.count",min:1,max:200,step:1,required:!0,group:i.LANTERNS,label:"howMany"},i.instant("group.fromT","firstLetGoAt","secondsOfTheRecordingBeforeIts"),i.instant("group.untilT","lastLetGoAt","secondsOfTheRecordingTheOthers"),{type:"number",key:"group.radiusM",min:0,max:5e3,step:1,unit:"m",group:i.LANTERNS,effective:()=>20,label:"letGoWithin",hint:"aCrowdLetsThemGoA"},{type:"number",key:"group.burnS.min",min:10,max:3600,step:1,unit:"s",group:i.LANTERNS,effective:()=>480,label:"burnsAtLeast",hint:"howLongEachBurnsFromWhen"},{type:"number",key:"group.burnS.max",min:10,max:3600,step:1,unit:"s",group:i.LANTERNS,effective:()=>900,label:"burnsAtMost"},{type:"number",key:"group.insideExcessK.min",min:10,max:400,step:1,unit:"K",group:i.LANTERNS,effective:()=>125,label:"hotterThanTheAirAtLeast",hint:"howMuchHotterThanTheAir"},{type:"number",key:"group.insideExcessK.max",min:10,max:400,step:1,unit:"K",group:i.LANTERNS,effective:()=>175,label:"hotterThanTheAirAtMost"},{type:"number",key:"group.burnedS",min:0,max:3600,step:1,unit:"s",group:i.LANTERNS,effective:()=>0,label:"alreadyBurntWhenLetGo",hint:"forLanternsTheAccountOnlyHas"},{type:"number",key:"group.seed",min:0,max:4294967295,step:1,group:i.LANTERNS,effective:()=>1,label:"draw",hint:"whatTheDrawsStartFromAnother"},{type:"set",key:"group.explains",group:i.LANTERNS,label:"standForTheShapes",options:(e,t)=>{const n=t?.shapes??[],s=(e.group?.explains??[]).filter(r=>!n.some(l=>l.value===r));return[...n,...s.map(r=>({value:r,label:r}))]},empty:"noShape"},...i.wind("wind","windAtTheGroundTowards","windAtTheGroundSpeed","whereItBlowsTowardsWhichIs"),...i.wind("windAloft","windAloftTowards","windAloftSpeed","theWindHigherUpBlendedWith"),{type:"number",key:"windAloft.atM",min:10,max:1e4,step:10,unit:"m",group:i.AIR,label:"windAloftAt",hint:"metresAboveWhereTheyAreLet"},{type:"number",key:"airTemperatureC",min:-60,max:50,step:.5,unit:"°C",group:i.AIR,effective:()=>10,label:"airTemperature",hint:"atTheGroundFallingBy6"},{type:"number",key:"turbulence.horizontalMS",min:0,max:10,step:.1,unit:"m/s",group:i.AIR,effective:()=>o.TURBULENCE.horizontalMS,label:"gustsAcross",hint:"howFarTheAirSSpeed"},{type:"number",key:"turbulence.verticalMS",min:0,max:10,step:.1,unit:"m/s",group:i.AIR,effective:()=>o.TURBULENCE.verticalMS,label:"gustsUpAndDown"},{type:"number",key:"turbulence.timescaleS",min:1,max:600,step:1,unit:"s",group:i.AIR,effective:()=>o.TURBULENCE.timescaleS,label:"aGustLasts"},{type:"number",key:"lantern.luminousIntensityCd",min:.1,max:1e3,step:.1,unit:"cd",group:i.LANTERN,effective:()=>o.COMMON.luminousIntensityCd,label:"light",hint:"itsFlameSLightThroughThe"},{type:"choice",key:"lantern.shape",group:i.LANTERN,effective:()=>o.COMMON.shape,label:"shape",choices:[{value:"classic",label:"roundAtTheMouthSquareAt"},{value:"balloon",label:"balloonLobedTop"}]},{type:"colour",key:"lantern.paperColor",group:i.LANTERN,fallback:o.COMMON.paperColor,label:"paperColour",hint:"whatItLooksLikeByDay"},{type:"colour",key:"lantern.color",group:i.LANTERN,fallback:o.COMMON.color,label:"flameLight",hint:"itsFlameSLightThroughWhite"},{type:"number",key:"lantern.envelopeVolumeM3",min:.01,max:10,step:.01,unit:"m³",group:i.LANTERN,effective:()=>o.COMMON.envelopeVolumeM3,label:"airItHolds"},{type:"number",key:"lantern.massKg",min:.005,max:5,step:.001,unit:"kg",group:i.LANTERN,effective:()=>o.COMMON.massKg,label:"weightWhenLetGo"}]};static publish(){p.publish(i.SET)}}const S=u.catalog({en:()=>h(()=>import("./LanternEditorMessages_en-DaT3UNfD.js"),[],import.meta.url).then(a=>a.lanternEditorMessages_en),fr:()=>h(()=>import("./LanternEditorMessages_fr-9mByTFMG.js"),[],import.meta.url).then(a=>a.lanternEditorMessages_fr),es:()=>h(()=>import("./LanternEditorMessages_es-TDV5lKeJ.js"),[],import.meta.url).then(a=>a.lanternEditorMessages_es),it:()=>h(()=>import("./LanternEditorMessages_it-MRkJnDQp.js"),[],import.meta.url).then(a=>a.lanternEditorMessages_it)});class m{constructor(e,t,n){this.container=e,this.host=t,b.attach(e,"lantern-editor-part",m.STYLE),this.language=n,p.of("lantern")||i.publish(),this.ready=this.setLanguage(n)}messages;ready;parameterTexts;languageToken=0;currentId;form;list;language;shown=[];static STYLE=`
|
|
2
|
+
.lantern-editor-part, .lantern-editor-part #lantern-list, .lantern-editor-part .launch-fields { flex-basis: 100%; min-width: 0; }
|
|
3
|
+
.lantern-editor-part .launch-editor, .lantern-editor-part .launch-fields { display: flex; flex-wrap: wrap; gap: 12px; align-items: end; }
|
|
4
|
+
.lantern-editor-part [hidden] { display: none !important; }
|
|
5
|
+
.lantern-editor-part .launch-intro { flex-basis: 100%; margin: 0; }
|
|
6
|
+
.lantern-editor-part .launch-parameters { flex-basis: 100%; min-width: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 20em), 1fr)); gap: 12px; align-items: start; }
|
|
7
|
+
.lantern-editor-part .parameter-group { min-width: 0; box-sizing: border-box; margin: 0; display: flex; flex-direction: column; gap: 10px; align-items: stretch; }
|
|
8
|
+
.lantern-editor-part .parameter-group > label { display: flex; flex-wrap: wrap; align-items: center; gap: .35em .5em; min-width: 0; max-width: 100%; }
|
|
9
|
+
.lantern-editor-part .parameter-group > label > span { flex: 1 1 11em; min-width: 0; overflow-wrap: anywhere; }
|
|
10
|
+
.lantern-editor-part .parameter-row { width: 100%; min-width: 0; }
|
|
11
|
+
.lantern-editor-part rr0-input-position { min-width: 0; max-width: 100%; }
|
|
12
|
+
.lantern-editor-part rr0-input-position .position-from { flex-wrap: wrap; white-space: normal; min-width: 0; max-width: 100%; }
|
|
13
|
+
.lantern-editor-part input, .lantern-editor-part select { min-width: 0; max-width: 100%; box-sizing: border-box; }
|
|
14
|
+
.lantern-editor-part input[type="text"] { width: 12em; }
|
|
15
|
+
.lantern-editor-part input.parameter-derived::placeholder { opacity: .65; }
|
|
16
|
+
`;async setLanguage(e){const t=++this.languageToken;this.language=e;const[n,s]=await Promise.all([S.load(e),x.load(e)]);t===this.languageToken&&(this.messages=n,this.parameterTexts=s,this.render(),this.sync())}sync(){if(!this.messages)return;const e=this.launches;this.shown=[...e],e.some(r=>r.id===this.currentId)||(this.currentId=e[0]?.id),this.list?.setItems(e.map(r=>({id:r.id,label:this.labelOf(r)})),this.currentId),this.syncAddState();const t=this.current;if(this.element("lantern-fields").hidden=t===void 0,!t)return;const n=t.releases?.length??0,s=this.element("lantern-releases");s.hidden=n===0,s.textContent=this.messages.releasesNote.replace("{n}",String(n)),this.form??=new A(this.element("lantern-parameters"),this.language,"lantern.",{said:()=>this.host.said(),writingLanguage:()=>this.host.writingLanguage()}),this.form.show(this.resolved(i.SET),new E(()=>this.current,r=>this.editLaunch(l=>r(l)),()=>({shapes:this.host.shapes().map(r=>({value:r.id,label:r.label}))}),this.host.positionPlace?.()),()=>this.written())}refresh(){if(!this.messages)return;this.syncAddState();const e=this.launches;e.length===this.shown.length&&e.every((t,n)=>t.id===this.shown[n].id)||this.sync()}syncAddState(){const e=this.siteOfNew()!==void 0;this.list?.setAddState(e,e?void 0:this.messages.addLaunchNowhere)}get current(){return this.launches.find(e=>e.id===this.currentId)}resolved(e){return y.resolve(e,this.parameterTexts)}render(){if(!this.messages)return;const e=this.messages;this.form=void 0,this.container.innerHTML=`<div class="launch-editor">
|
|
17
|
+
<p class="launch-intro">${e.intro}</p>
|
|
18
|
+
<div id="lantern-list"></div>
|
|
19
|
+
<div id="lantern-fields" class="launch-fields">
|
|
20
|
+
<div id="lantern-parameters" class="launch-parameters"></div>
|
|
21
|
+
<p id="lantern-releases" class="launch-intro" hidden></p>
|
|
22
|
+
<p class="launch-intro">${e.derivedNote}</p>
|
|
23
|
+
</div>
|
|
24
|
+
</div>`,this.list=new v({header:this.element("lantern-list"),body:this.element("lantern-fields"),ids:{list:"lantern-select",remove:"lantern-delete",add:"lantern-add"},onSelect:t=>{this.currentId=t,this.sync()},onAdd:()=>this.addLaunch(),onRemove:()=>this.deleteCurrent()}),this.list.setLabels({list:e.launch,remove:e.deleteLaunch,add:e.addLaunch,empty:e.none})}written(){const e=this.current;e&&this.list?.rename(e.id,this.labelOf(e))}editLaunch(e){const t=this.current;if(!t)return;const n=structuredClone(t);e(n),this.writeLaunches(this.launches.map(s=>s===t?n:s)),this.host.changed()}siteOfNew(){const e=this.host.sighting(),t=e.event?.place?.[0];if(t?.lat===void 0||t.lng===void 0)return;const n=e.observerTrack?.getInterpolatedPoseAt(0),s=111320,r=n?.lng!==void 0?(n.lng-t.lng)*s*Math.cos(t.lat*Math.PI/180):0,l=n?.lat!==void 0?(n.lat-t.lat)*s:0;return{eastM:Math.round(r),northM:Math.round(l)}}addLaunch(){const e=this.siteOfNew();if(!e)return;let t=this.launches.length+1;for(;this.launches.some(c=>c.id===`lanterns-${t}`);)t++;const n=this.host.sighting(),s=T(n.event)??this.host.duration?.()??n.timeline?.duration,r=s!==void 0&&Number.isFinite(s)&&s>0?Math.min(s,12e4):12e4,l=w(n,0),d={id:`lanterns-${t}`,site:e,group:{count:12,fromT:0,untilT:r,seed:t},wind:{towardDeg:Math.round((l.windDirectionDeg+180)%360),speedMS:Math.round(l.windSpeed*10)/10}};this.writeLaunches([...this.launches,d]),this.currentId=d.id,this.host.changed(),this.sync()}deleteCurrent(){const e=this.current;e&&(this.currentId=void 0,this.writeLaunches(this.launches.filter(t=>t!==e)),this.host.changed(),this.sync())}writeLaunches(e){const t=this.host.sighting(),n={...t.interpretation??{bodies:[]},lanterns:e.length>0?e:void 0};n.lanterns===void 0&&delete n.lanterns;const s=g.saysNothing(n,f.kinds());t.interpretation=s?void 0:n}labelOf(e){const t=this.host.said().read(e.title);return t?`${t} (${e.id})`:e.id}get launches(){return this.host.sighting().interpretation?.lanterns??[]}element(e){return this.container.querySelector(`#${e}`)}}export{m as LanternEditor};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e={intro:"Sky lanterns let go from the ground, as a reading of the account: these lights were lanterns. Each climbs while its hot air lifts more than it weighs, goes with the wind of its height and its own gusts, and vanishes when its fuel is spent — computed, not drawn.",none:"No lanterns in this recording",launch:"Lanterns",deleteLaunch:"Delete these lanterns",addLaunch:"Add lanterns",addLaunchNowhere:"Give the recording a place first: lanterns are let go in front of the witness",releasesNote:"These lanterns also state {n} let go one by one, kept as they are: edit them in the recording's file.",derivedNote:"An empty field shows, greyed, the value used. Empty a field to go back to it."};export{e as lanternEditorMessages_en};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const a={intro:"Farolillos voladores soltados desde el suelo, como lectura del relato: esas luces eran farolillos. Cada uno sube mientras su aire caliente lo sostiene más de lo que pesa, sigue el viento de su altura y sus propias ráfagas, y desaparece cuando se agota su combustible: calculado, no dibujado.",none:"Ningún farolillo en esta grabación",launch:"Farolillos",deleteLaunch:"Eliminar estos farolillos",addLaunch:"Añadir farolillos",addLaunchNowhere:"Dale primero un lugar a la grabación: los farolillos se sueltan delante del testigo",releasesNote:"Estos farolillos indican también {n} soltados uno a uno, conservados tal cual: edítalos en el archivo de la grabación.",derivedNote:"Un campo vacío muestra, en gris, el valor usado. Vacía un campo para volver a él."};export{a as lanternEditorMessages_es};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e={intro:"Des lanternes célestes lâchées du sol, comme lecture du compte rendu : ces lumières étaient des lanternes. Chacune monte tant que son air chaud la porte plus qu'elle ne pèse, suit le vent de sa hauteur et ses propres rafales, et disparaît quand son combustible est épuisé — calculé, pas dessiné.",none:"Aucune lanterne dans cet enregistrement",launch:"Lanternes",deleteLaunch:"Supprimer ces lanternes",addLaunch:"Ajouter des lanternes",addLaunchNowhere:"Donnez d'abord un lieu à l'enregistrement : les lanternes sont lâchées devant le témoin",releasesNote:"Ces lanternes en indiquent aussi {n} lâchées une à une, gardées telles quelles : modifiez-les dans le fichier de l'enregistrement.",derivedNote:"Un champ vide montre, en grisé, la valeur utilisée. Videz un champ pour y revenir."};export{e as lanternEditorMessages_fr};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e={intro:"Lanterne volanti lasciate andare da terra, come lettura del resoconto: quelle luci erano lanterne. Ciascuna sale finché la sua aria calda la sostiene più di quanto pesi, segue il vento della sua quota e le proprie raffiche, e scompare quando il combustibile è finito: calcolato, non disegnato.",none:"Nessuna lanterna in questa registrazione",launch:"Lanterne",deleteLaunch:"Elimina queste lanterne",addLaunch:"Aggiungi lanterne",addLaunchNowhere:"Dai prima un luogo alla registrazione: le lanterne vengono lasciate andare davanti al testimone",releasesNote:"Queste lanterne ne indicano anche {n} lasciate andare una per una, mantenute così: modificale nel file della registrazione.",derivedNote:"Un campo vuoto mostra, in grigio, il valore usato. Svuota un campo per tornarvi."};export{e as lanternEditorMessages_it};
|