@rr0/ufoathome 0.202.0 → 0.203.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/InterviewMessages_en-Ikx6GjEd.js +3 -0
- package/dist-embed-interview/InterviewMessages_es-DKWWyrnb.js +3 -0
- package/dist-embed-interview/InterviewMessages_fr-DT0gXAKD.js +3 -0
- package/dist-embed-interview/InterviewMessages_it-CF_9MYPt.js +3 -0
- package/dist-embed-interview/rr0-interview.mjs +1 -1
- package/dist-embed-scene/{AirshipEditor-BnRmKeVs.js → AirshipEditor-guE_ib3z.js} +1 -1
- package/dist-embed-scene/{AirshipFlight-C9DSPGwk.js → AirshipFlight-DzW0313e.js} +1 -1
- package/dist-embed-scene/{BalloonEditor-BehJs6H-.js → BalloonEditor-BIsCy_y4.js} +2 -2
- package/dist-embed-scene/{BalloonFlight-BYn4diw1.js → BalloonFlight-gunghgAq.js} +1 -1
- package/dist-embed-scene/{BirdEditor-dOp1sGsz.js → BirdEditor-CuLv4Ij5.js} +1 -1
- package/dist-embed-scene/{BirdFlock-CfJeXvWu.js → BirdFlock-L3dYU2K_.js} +1 -1
- package/dist-embed-scene/{DroneEditor-CBoR4fJ_.js → DroneEditor-BQWPhTyf.js} +1 -1
- package/dist-embed-scene/{DroneFlight-DSE1OXqh.js → DroneFlight-ERYah68l.js} +1 -1
- package/dist-embed-scene/{DroneParameters-D3EOg4oe.js → DroneParameters-CoWQympS.js} +1 -1
- package/dist-embed-scene/{LanternEditor-CbcA7K8y.js → LanternEditor-BpCyb79i.js} +1 -1
- package/dist-embed-scene/ModuleSession-Bh6KaOGK.js +3 -0
- package/dist-embed-scene/ModuleThree-DRsA8rtL.js +1 -0
- package/dist-embed-scene/SearchlightSystem-Ddws2hQY.js +1 -0
- package/dist-embed-scene/{SkyLantern-Dp_B40X0.js → SkyLantern-C3BSxHtq.js} +1 -1
- package/dist-embed-scene/rr0-scene.mjs +113 -92
- package/dist-embed-sighting/{CaseReportExport-CkWf0HNx.js → CaseReportExport--iqqhu1e.js} +1 -1
- package/dist-embed-sighting/HvsMessages_en-BiLhEAxJ.js +1 -0
- package/dist-embed-sighting/HvsMessages_es-Cbj_6eFs.js +1 -0
- package/dist-embed-sighting/HvsMessages_fr-DkvE2qm1.js +1 -0
- package/dist-embed-sighting/HvsMessages_it-BIJ87Uyb.js +1 -0
- package/dist-embed-sighting/InterviewMessages_en-Ikx6GjEd.js +3 -0
- package/dist-embed-sighting/InterviewMessages_es-DKWWyrnb.js +3 -0
- package/dist-embed-sighting/InterviewMessages_fr-DT0gXAKD.js +3 -0
- package/dist-embed-sighting/InterviewMessages_it-CF_9MYPt.js +3 -0
- package/dist-embed-sighting/ModuleSession-_kHZ7Tx3.js +3 -0
- package/dist-embed-sighting/{ModuleThree-whEZoXYF.js → ModuleThree-BLNSm2eY.js} +1 -1
- package/dist-embed-sighting/ReadingCheckTexts_en-C5qzU8K7.js +1 -0
- package/dist-embed-sighting/ReadingCheckTexts_es-DdhtmSew.js +1 -0
- package/dist-embed-sighting/ReadingCheckTexts_fr-COtovvqc.js +1 -0
- package/dist-embed-sighting/ReadingCheckTexts_it-Bz32XGh6.js +1 -0
- package/dist-embed-sighting/SearchlightSystem-PEMBDW1s.js +1 -0
- package/dist-embed-sighting/rr0-sighting.mjs +432 -366
- package/dist-embed-sighting-editor/{AdsbLolArchiveProvider-Bz1OjSjY.js → AdsbLolArchiveProvider-DNYpHE9t.js} +1 -1
- package/dist-embed-sighting-editor/{AirshipEditor-BlJXyxlr.js → AirshipEditor-B_TQEcNk.js} +1 -1
- package/dist-embed-sighting-editor/{AirshipFlight-Cx40Y8JT.js → AirshipFlight-zrtPXNvX.js} +1 -1
- package/dist-embed-sighting-editor/{Aurora-Ldk66p1A.js → Aurora-wHi_XgNK.js} +1 -1
- package/dist-embed-sighting-editor/{AuroraEditor-CGSomAFk.js → AuroraEditor-CHAo9LbG.js} +1 -1
- package/dist-embed-sighting-editor/{AuroraSimulation-vKcv2Hue.js → AuroraSimulation-CMoKbd0k.js} +2 -2
- package/dist-embed-sighting-editor/{BalloonEditor-CgO4LaWn.js → BalloonEditor-DOmOj25v.js} +1 -1
- package/dist-embed-sighting-editor/{BalloonFlight-hLr_4TFU.js → BalloonFlight-DkhpbdZV.js} +1 -1
- package/dist-embed-sighting-editor/{BeamEditor-B8qreA3j.js → BeamEditor-CwC6pRPq.js} +1 -1
- package/dist-embed-sighting-editor/{BeamSystem-D0hrju5J.js → BeamSystem-Zsq9zuJa.js} +1 -1
- package/dist-embed-sighting-editor/{BirdEditor-BNzrfSqX.js → BirdEditor-DslUOI4x.js} +1 -1
- package/dist-embed-sighting-editor/{BirdFlock-iSovVEZd.js → BirdFlock-BoXaV-S_.js} +1 -1
- package/dist-embed-sighting-editor/{CaseElement-DPlro-7S.js → CaseElement-DFnjs2AU.js} +6 -5
- package/dist-embed-sighting-editor/{CaseReportExport-C1g5C8hi.js → CaseReportExport-CX87uNr9.js} +1 -1
- package/dist-embed-sighting-editor/{ContrailSystem-D3tXAg2r.js → ContrailSystem-hUtlCEq-.js} +1 -1
- package/dist-embed-sighting-editor/{ControlPasses-BMEmppip.js → ControlPasses-C8qq_tSL.js} +1 -1
- package/dist-embed-sighting-editor/{DroneEditor-BFsArPKi.js → DroneEditor-M2V3FKbS.js} +1 -1
- package/dist-embed-sighting-editor/{DroneFlight-B96pVrY1.js → DroneFlight-C1bur42A.js} +1 -1
- package/dist-embed-sighting-editor/{DroneParameters-DW-enQUo.js → DroneParameters-DRfoxMx8.js} +1 -1
- package/dist-embed-sighting-editor/{Flightradar24Provider-CBGkjw03.js → Flightradar24Provider-BJDB9e9p.js} +1 -1
- package/dist-embed-sighting-editor/{GLTFLoader-2Zbfb3kh.js → GLTFLoader-CQrldtm5.js} +1 -1
- package/dist-embed-sighting-editor/{HeadlightSystem-CBmEcC9f.js → HeadlightSystem-BzXjwGDi.js} +1 -1
- package/dist-embed-sighting-editor/HvsMessages_en-BiLhEAxJ.js +1 -0
- package/dist-embed-sighting-editor/HvsMessages_es-Cbj_6eFs.js +1 -0
- package/dist-embed-sighting-editor/HvsMessages_fr-DkvE2qm1.js +1 -0
- package/dist-embed-sighting-editor/HvsMessages_it-BIJ87Uyb.js +1 -0
- package/dist-embed-sighting-editor/{HynekAssessor-uub2VxTi.js → HynekAssessor-Bpze0IeH.js} +1 -1
- package/dist-embed-sighting-editor/{InterviewEditorElement-_1fa2bG7.js → InterviewEditorElement-C6y-8Wze.js} +6 -6
- package/dist-embed-sighting-editor/InterviewMessages_en-Ikx6GjEd.js +3 -0
- package/dist-embed-sighting-editor/InterviewMessages_es-DKWWyrnb.js +3 -0
- package/dist-embed-sighting-editor/InterviewMessages_fr-DT0gXAKD.js +3 -0
- package/dist-embed-sighting-editor/InterviewMessages_it-CF_9MYPt.js +3 -0
- package/dist-embed-sighting-editor/{LanternEditor-CjQVFowY.js → LanternEditor-6fXL9oHW.js} +1 -1
- package/dist-embed-sighting-editor/{LaserBeam-BVc8Mvhr.js → LaserBeam-Cl4c8oJt.js} +1 -1
- package/dist-embed-sighting-editor/{LaunchEditor-Cz8Mzo4a.js → LaunchEditor-C9swLaSJ.js} +1 -1
- package/dist-embed-sighting-editor/{LaunchPlume-CvBhTPgN.js → LaunchPlume-CPBS4JLE.js} +1 -1
- package/dist-embed-sighting-editor/{LaunchSimulation-CkZIG-3P.js → LaunchSimulation-zjImyFHC.js} +1 -1
- package/dist-embed-sighting-editor/{ModelSource-B153oeTu.js → ModelSource-ZiTya13j.js} +1 -1
- package/dist-embed-sighting-editor/{ModelThumbnails-BUL_OLFv.js → ModelThumbnails-BKl0Wk33.js} +1 -1
- package/dist-embed-sighting-editor/{ModelViewer-BzBLcY9s.js → ModelViewer-ZZnOiYz4.js} +1 -1
- package/dist-embed-sighting-editor/{ModuleConformance-Cr6fM28A.js → ModuleConformance-CYQ-Mn8w.js} +2 -2
- package/dist-embed-sighting-editor/ModuleSession-BklqVucx.js +3 -0
- package/dist-embed-sighting-editor/ModuleThree-jNUgMjnf.js +1 -0
- package/dist-embed-sighting-editor/ModulesPanelElement-MEFltyZr.js +26 -0
- package/dist-embed-sighting-editor/ModulesPanelMessages_en-CXQhQMyu.js +1 -0
- package/dist-embed-sighting-editor/ModulesPanelMessages_es-Bj-cT3f4.js +1 -0
- package/dist-embed-sighting-editor/ModulesPanelMessages_fr-B-eaMXQz.js +1 -0
- package/dist-embed-sighting-editor/ModulesPanelMessages_it-C3fS8UFN.js +1 -0
- package/dist-embed-sighting-editor/{RailwaySystem-6bwbv8UB.js → RailwaySystem-Dn-v2OAb.js} +1 -1
- package/dist-embed-sighting-editor/ReadingCheckTexts_en-C5qzU8K7.js +1 -0
- package/dist-embed-sighting-editor/ReadingCheckTexts_es-DdhtmSew.js +1 -0
- package/dist-embed-sighting-editor/ReadingCheckTexts_fr-COtovvqc.js +1 -0
- package/dist-embed-sighting-editor/ReadingCheckTexts_it-Bz32XGh6.js +1 -0
- package/dist-embed-sighting-editor/{ReentryEditor-BWCK2g_s.js → ReentryEditor-DPt4At81.js} +1 -1
- package/dist-embed-sighting-editor/{ReentrySimulation-B09JXMu5.js → ReentrySimulation-DwaQrNN5.js} +1 -1
- package/dist-embed-sighting-editor/{ReferenceSystem-8QgwbbAG.js → ReferenceSystem-DlaF5KWz.js} +1 -1
- package/dist-embed-sighting-editor/{SearchlightEditor-BpwPOhJ6.js → SearchlightEditor-CdTMwgER.js} +1 -1
- package/dist-embed-sighting-editor/SearchlightSystem-jipCae7J.js +1 -0
- package/dist-embed-sighting-editor/SightingEditorMessages_en-BmqJK2u_.js +12 -0
- package/dist-embed-sighting-editor/SightingEditorMessages_es-avQMqPMq.js +12 -0
- package/dist-embed-sighting-editor/SightingEditorMessages_fr-ClEadK1E.js +12 -0
- package/dist-embed-sighting-editor/SightingEditorMessages_it-Co5behaA.js +12 -0
- package/dist-embed-sighting-editor/{SightingElement-BQdiez39.js → SightingElement-C6CT6DBZ.js} +2 -2
- package/dist-embed-sighting-editor/{SkyLantern-D6bru_e_.js → SkyLantern-CYhqKOnv.js} +1 -1
- package/dist-embed-sighting-editor/{TraceSystem-DZMUxSn-.js → TraceSystem-Bj0G3fL7.js} +1 -1
- package/dist-embed-sighting-editor/{WaterSystem-CB5jE7qB.js → WaterSystem-Cv4v7PXz.js} +2 -2
- package/{dist-embed-ufoathome/caseSchema-BEJTs2Ld.js → dist-embed-sighting-editor/caseSchema-Cukbjeex.js} +1 -1
- package/dist-embed-sighting-editor/rr0-sighting-editor.mjs +521 -452
- package/dist-embed-sighting-editor/{trafficRuntime-Bu3my6S4.js → trafficRuntime-BdBceXei.js} +1 -1
- package/dist-embed-ufoathome/{AdsbLolArchiveProvider-KbJPyJ97.js → AdsbLolArchiveProvider-D169IKdZ.js} +1 -1
- package/dist-embed-ufoathome/{AirshipEditor-CBSrQM3J.js → AirshipEditor-EBfUtSiB.js} +1 -1
- package/dist-embed-ufoathome/{AirshipFlight-Dzpw8HRM.js → AirshipFlight-6yYGIRn8.js} +1 -1
- package/dist-embed-ufoathome/{Aurora-C_mCH4JM.js → Aurora-CP_Xi-9o.js} +1 -1
- package/dist-embed-ufoathome/{AuroraEditor-Dzvgh6e0.js → AuroraEditor-B_Rxo_6I.js} +1 -1
- package/dist-embed-ufoathome/{AuroraSimulation-BRUnHmlp.js → AuroraSimulation-KHkJyuus.js} +1 -1
- package/dist-embed-ufoathome/{BallesterGuaspAssessor-DurdUgbG.js → BallesterGuaspAssessor-58lmGHUw.js} +1 -1
- package/dist-embed-ufoathome/{BalloonEditor-dCIjTsIz.js → BalloonEditor-CAKXO8DQ.js} +2 -2
- package/dist-embed-ufoathome/{BalloonFlight-CztT6ddg.js → BalloonFlight-CvE7AHlm.js} +1 -1
- package/dist-embed-ufoathome/{BeamEditor-Ccvx7l7x.js → BeamEditor-BOsTgbHL.js} +1 -1
- package/dist-embed-ufoathome/{BeamSystem-CPM8m17q.js → BeamSystem-C7OL1VWr.js} +1 -1
- package/dist-embed-ufoathome/{BirdEditor-Dk3huwHa.js → BirdEditor-CBVGyUnK.js} +1 -1
- package/dist-embed-ufoathome/{BodyEditor-BG--NjnZ.js → BodyEditor-DZ9-YBfo.js} +1 -1
- package/dist-embed-ufoathome/{CaseEditorElement-0J_TCeiq.js → CaseEditorElement-BgT6HnpX.js} +73 -69
- package/dist-embed-ufoathome/CaseElement-DVXLO8mr.js +132 -0
- package/dist-embed-ufoathome/{CaseReportExport-DKrBXPgZ.js → CaseReportExport-Dui5KDc5.js} +3 -3
- package/dist-embed-ufoathome/ColumnResize-CO4e1m-q.js +208 -0
- package/dist-embed-ufoathome/ConsentMessages_en-DBKCeDAn.js +1 -0
- package/dist-embed-ufoathome/ConsentMessages_es-Dby74lUq.js +1 -0
- package/dist-embed-ufoathome/ConsentMessages_fr-FGSpqzMc.js +1 -0
- package/dist-embed-ufoathome/ConsentMessages_it-BJWfXH6I.js +1 -0
- package/dist-embed-ufoathome/{ControlPasses-CKvTCqTI.js → ControlPasses-CJ2jMdlf.js} +1 -1
- package/dist-embed-ufoathome/{CoverageAssessor-MeOMUjkZ.js → CoverageAssessor-CzhOt6fv.js} +1 -1
- package/dist-embed-ufoathome/{DroneEditor-D60uhSHO.js → DroneEditor-7X9CM_3H.js} +1 -1
- package/dist-embed-ufoathome/{Flightradar24Provider-DxTfswSh.js → Flightradar24Provider-TCNh_VXc.js} +1 -1
- package/dist-embed-ufoathome/{GLTFLoader-pi-JKaNa.js → GLTFLoader-BaIfBICM.js} +1 -1
- package/dist-embed-ufoathome/{GeoJsonExport-iyhoKOUU.js → GeoJsonExport-B5AFUVEM.js} +1 -1
- package/dist-embed-ufoathome/GeographicFigures-DrlbDt4f.js +1 -0
- package/dist-embed-ufoathome/HvsMessages_en-BiLhEAxJ.js +1 -0
- package/dist-embed-ufoathome/HvsMessages_es-Cbj_6eFs.js +1 -0
- package/dist-embed-ufoathome/HvsMessages_fr-DkvE2qm1.js +1 -0
- package/dist-embed-ufoathome/HvsMessages_it-BIJ87Uyb.js +1 -0
- package/dist-embed-ufoathome/{HynekAssessor-Bda6csgM.js → HynekAssessor-DaCcWwTH.js} +1 -1
- package/dist-embed-ufoathome/{InterviewEditorElement-BA060rqJ.js → InterviewEditorElement-o21YUvNz.js} +6 -6
- package/dist-embed-ufoathome/{InterviewElement-DvqsCA3I.js → InterviewElement-K_oIXneA.js} +2 -2
- package/dist-embed-ufoathome/InterviewMessages_en-Ikx6GjEd.js +3 -0
- package/dist-embed-ufoathome/InterviewMessages_es-DKWWyrnb.js +3 -0
- package/dist-embed-ufoathome/InterviewMessages_fr-DT0gXAKD.js +3 -0
- package/dist-embed-ufoathome/InterviewMessages_it-CF_9MYPt.js +3 -0
- package/dist-embed-ufoathome/{KmlExport-DEPgRRWe.js → KmlExport-BfiqE1s2.js} +1 -1
- package/dist-embed-ufoathome/{LanternEditor-BapUZdog.js → LanternEditor-CepeoImr.js} +1 -1
- package/dist-embed-ufoathome/{LaserBeam--dquPX_h.js → LaserBeam-IRXmv6wc.js} +1 -1
- package/dist-embed-ufoathome/{LaunchEditor-D3P0GkLr.js → LaunchEditor-C4hq0VUw.js} +1 -1
- package/dist-embed-ufoathome/{LaunchPlume-w4l4TR4A.js → LaunchPlume-CujlF3wZ.js} +1 -1
- package/dist-embed-ufoathome/{LaunchSimulation-BpZd-Nov.js → LaunchSimulation-58_ZZy8q.js} +1 -1
- package/dist-embed-ufoathome/{ModelSource-Csnm3RH_.js → ModelSource-Bz25TN6e.js} +1 -1
- package/dist-embed-ufoathome/{ModelThumbnails-Cnt2GxTb.js → ModelThumbnails-CcYlw6gA.js} +1 -1
- package/dist-embed-ufoathome/{ModelViewer-DOfAkPgK.js → ModelViewer-CD90RTYi.js} +1 -1
- package/dist-embed-ufoathome/ModuleSession-Dac4fD0X.js +3 -0
- package/dist-embed-ufoathome/ModulesPanelElement-DZxFsuuG.js +18 -0
- package/dist-embed-ufoathome/ModulesPanelMessages_en-Dir0ADQe.js +1 -0
- package/dist-embed-ufoathome/ModulesPanelMessages_es-B_ITNG5N.js +1 -0
- package/dist-embed-ufoathome/ModulesPanelMessages_fr-DbKLtD8s.js +1 -0
- package/dist-embed-ufoathome/ModulesPanelMessages_it-CE0q7D2c.js +1 -0
- package/dist-embed-ufoathome/NearestApproach-DsszB5Rd.js +1 -0
- package/dist-embed-ufoathome/{PoherAssessor-4zSdFnFp.js → PoherAssessor-BkCJ1UTQ.js} +1 -1
- package/dist-embed-ufoathome/QuestionnaireFeed-DmyYcwwf.js +1 -0
- package/dist-embed-ufoathome/QuestionnaireForm-vT3C3qXt.js +1 -0
- package/dist-embed-ufoathome/QuestionnaireImport-BlTDOHWj.js +5 -0
- package/dist-embed-ufoathome/ReadingCheckTexts_en-C5qzU8K7.js +1 -0
- package/dist-embed-ufoathome/ReadingCheckTexts_es-DdhtmSew.js +1 -0
- package/dist-embed-ufoathome/ReadingCheckTexts_fr-COtovvqc.js +1 -0
- package/dist-embed-ufoathome/ReadingCheckTexts_it-Bz32XGh6.js +1 -0
- package/dist-embed-ufoathome/{ReentryEditor-DEi9nT0z.js → ReentryEditor-BjyUUZGU.js} +1 -1
- package/dist-embed-ufoathome/{ReentrySimulation-CSO1vgro.js → ReentrySimulation-5VI9Dla4.js} +1 -1
- package/dist-embed-ufoathome/{ReferenceSystem--tiMGm4e.js → ReferenceSystem-C0ZXvatV.js} +1 -1
- package/dist-embed-ufoathome/ScenarioReadings-CBWjF8TY.js +1 -0
- package/dist-embed-ufoathome/ScenarioSweep-MaryBOLs.js +1 -0
- package/dist-embed-ufoathome/{SearchlightEditor--1uL8bTa.js → SearchlightEditor-DPU1PgfT.js} +1 -1
- package/dist-embed-ufoathome/SearchlightSystem-m0a11CEu.js +1 -0
- package/dist-embed-ufoathome/{ShareDialogElement-Dlfy9NCE.js → ShareDialogElement-DqCoQwtn.js} +97 -76
- package/dist-embed-ufoathome/{Sighting-B7bsiTIQ.js → Sighting-D-_IYi9n.js} +1 -1
- package/dist-embed-ufoathome/SightingEditorMessages_en-BmqJK2u_.js +12 -0
- package/dist-embed-ufoathome/SightingEditorMessages_es-avQMqPMq.js +12 -0
- package/dist-embed-ufoathome/SightingEditorMessages_fr-ClEadK1E.js +12 -0
- package/dist-embed-ufoathome/SightingEditorMessages_it-Co5behaA.js +12 -0
- package/dist-embed-ufoathome/{SightingElement-BJSNmFM6.js → SightingElement-CUrYpWRD.js} +2 -2
- package/dist-embed-ufoathome/{TraceSystem-Cq2TgP-u.js → TraceSystem-BLumvnJD.js} +1 -1
- package/dist-embed-ufoathome/UfoAtHomeMessages_en-ByVu39KF.js +1 -0
- package/dist-embed-ufoathome/UfoAtHomeMessages_es-D9bLboxq.js +1 -0
- package/dist-embed-ufoathome/UfoAtHomeMessages_fr-nTqRf0ZK.js +1 -0
- package/dist-embed-ufoathome/UfoAtHomeMessages_it-4cZC5-y5.js +1 -0
- package/dist-embed-ufoathome/{VideoButton-MRJlVNm_.js → VideoButton-hYfTEunC.js} +1 -1
- package/{dist-embed-sighting-editor/caseSchema-BEJTs2Ld.js → dist-embed-ufoathome/caseSchema-Cukbjeex.js} +1 -1
- package/dist-embed-ufoathome/rr0-ufoathome.mjs +35 -17
- package/dist-embed-ufoathome/{surroundingsSources--qffL_nJ.js → surroundingsSources-BWHnZ_qg.js} +1 -1
- package/dist-embed-ufoathome/{trafficRuntime-CTCGr90P.js → trafficRuntime-Xpncp71U.js} +2 -2
- package/package.json +1 -1
- package/dist-embed-interview/InterviewMessages_en-BrnxG2rl.js +0 -3
- package/dist-embed-interview/InterviewMessages_es-Dxfjqrte.js +0 -3
- package/dist-embed-interview/InterviewMessages_fr-DIA-1qu8.js +0 -3
- package/dist-embed-interview/InterviewMessages_it-CYBEIKX-.js +0 -3
- package/dist-embed-scene/ModuleSession-XnOI5Mcr.js +0 -3
- package/dist-embed-scene/ModuleThree-BTQgimAj.js +0 -1
- package/dist-embed-scene/SearchlightSystem-CX1_nBkz.js +0 -1
- package/dist-embed-sighting/InterviewMessages_en-BrnxG2rl.js +0 -3
- package/dist-embed-sighting/InterviewMessages_es-Dxfjqrte.js +0 -3
- package/dist-embed-sighting/InterviewMessages_fr-DIA-1qu8.js +0 -3
- package/dist-embed-sighting/InterviewMessages_it-CYBEIKX-.js +0 -3
- package/dist-embed-sighting/ModuleSession-ChJsGuTn.js +0 -3
- package/dist-embed-sighting/ReadingCheckTexts_en-eq6teExJ.js +0 -1
- package/dist-embed-sighting/ReadingCheckTexts_es-CR_JJZMV.js +0 -1
- package/dist-embed-sighting/ReadingCheckTexts_fr-pcDleIvY.js +0 -1
- package/dist-embed-sighting/ReadingCheckTexts_it-MFKeoXnq.js +0 -1
- package/dist-embed-sighting/SearchlightSystem-B2-MzG4x.js +0 -1
- package/dist-embed-sighting-editor/InterviewMessages_en-BrnxG2rl.js +0 -3
- package/dist-embed-sighting-editor/InterviewMessages_es-Dxfjqrte.js +0 -3
- package/dist-embed-sighting-editor/InterviewMessages_fr-DIA-1qu8.js +0 -3
- package/dist-embed-sighting-editor/InterviewMessages_it-CYBEIKX-.js +0 -3
- package/dist-embed-sighting-editor/ModuleSession-WA6lqfV6.js +0 -3
- package/dist-embed-sighting-editor/ModuleThree-CB_EjTOI.js +0 -1
- package/dist-embed-sighting-editor/ModulesPanelElement-BsRg3mzl.js +0 -15
- package/dist-embed-sighting-editor/ModulesPanelMessages_en-DuwrY3Pm.js +0 -1
- package/dist-embed-sighting-editor/ModulesPanelMessages_es-Bq5X-XuT.js +0 -1
- package/dist-embed-sighting-editor/ModulesPanelMessages_fr-B8cSDc6o.js +0 -1
- package/dist-embed-sighting-editor/ModulesPanelMessages_it-BdC626aJ.js +0 -1
- package/dist-embed-sighting-editor/ReadingCheckTexts_en-eq6teExJ.js +0 -1
- package/dist-embed-sighting-editor/ReadingCheckTexts_es-CR_JJZMV.js +0 -1
- package/dist-embed-sighting-editor/ReadingCheckTexts_fr-pcDleIvY.js +0 -1
- package/dist-embed-sighting-editor/ReadingCheckTexts_it-MFKeoXnq.js +0 -1
- package/dist-embed-sighting-editor/SearchlightSystem-CEG52QDx.js +0 -1
- package/dist-embed-sighting-editor/SightingEditorMessages_en-k7_ua2OM.js +0 -12
- package/dist-embed-sighting-editor/SightingEditorMessages_es-Drqbbr5_.js +0 -12
- package/dist-embed-sighting-editor/SightingEditorMessages_fr-B_K5hsuV.js +0 -12
- package/dist-embed-sighting-editor/SightingEditorMessages_it-QCLg1d7x.js +0 -12
- package/dist-embed-sighting-editor/angular-size-CxoysZle.png +0 -0
- package/dist-embed-sighting-editor/azimuth-CvjiPmz0.png +0 -0
- package/dist-embed-sighting-editor/elevation-DPr5S6Jt.png +0 -0
- package/dist-embed-sighting-editor/geipan-qt-2025-B_RUiH8B.js +0 -7
- package/dist-embed-sighting-editor/protractor-DyE30B87.png +0 -0
- package/dist-embed-ufoathome/CaseElement-CRXPyMMR.js +0 -131
- package/dist-embed-ufoathome/ColumnResize-DV-byvDt.js +0 -164
- package/dist-embed-ufoathome/GeographicFigures-DBmuFlvH.js +0 -1
- package/dist-embed-ufoathome/InterviewAttachments-BP6Prvdu.js +0 -1
- package/dist-embed-ufoathome/InterviewMessages_en-BrnxG2rl.js +0 -3
- package/dist-embed-ufoathome/InterviewMessages_es-Dxfjqrte.js +0 -3
- package/dist-embed-ufoathome/InterviewMessages_fr-DIA-1qu8.js +0 -3
- package/dist-embed-ufoathome/InterviewMessages_it-CYBEIKX-.js +0 -3
- package/dist-embed-ufoathome/ModuleSession-BKDWGSEo.js +0 -3
- package/dist-embed-ufoathome/ModulesPanelElement-DH1oroWm.js +0 -15
- package/dist-embed-ufoathome/ModulesPanelMessages_en-DuwrY3Pm.js +0 -1
- package/dist-embed-ufoathome/ModulesPanelMessages_es-Bq5X-XuT.js +0 -1
- package/dist-embed-ufoathome/ModulesPanelMessages_fr-B8cSDc6o.js +0 -1
- package/dist-embed-ufoathome/ModulesPanelMessages_it-BdC626aJ.js +0 -1
- package/dist-embed-ufoathome/NearestApproach-DJ98M81-.js +0 -1
- package/dist-embed-ufoathome/QuestionnaireFeed-W69udpmT.js +0 -1
- package/dist-embed-ufoathome/QuestionnaireForm-U78nFPn5.js +0 -1
- package/dist-embed-ufoathome/QuestionnaireImport-Q5uHxQwU.js +0 -5
- package/dist-embed-ufoathome/ReadingCheckTexts_en-eq6teExJ.js +0 -1
- package/dist-embed-ufoathome/ReadingCheckTexts_es-CR_JJZMV.js +0 -1
- package/dist-embed-ufoathome/ReadingCheckTexts_fr-pcDleIvY.js +0 -1
- package/dist-embed-ufoathome/ReadingCheckTexts_it-MFKeoXnq.js +0 -1
- package/dist-embed-ufoathome/ScenarioReadings-Dzdgopl3.js +0 -1
- package/dist-embed-ufoathome/ScenarioSweep-CMcleprC.js +0 -1
- package/dist-embed-ufoathome/SearchlightSystem-7bntVtp_.js +0 -1
- package/dist-embed-ufoathome/SightingEditorMessages_en-k7_ua2OM.js +0 -12
- package/dist-embed-ufoathome/SightingEditorMessages_es-Drqbbr5_.js +0 -12
- package/dist-embed-ufoathome/SightingEditorMessages_fr-B_K5hsuV.js +0 -12
- package/dist-embed-ufoathome/SightingEditorMessages_it-QCLg1d7x.js +0 -12
- package/dist-embed-ufoathome/UfoAtHomeMessages_en-BK2qJyZN.js +0 -1
- package/dist-embed-ufoathome/UfoAtHomeMessages_es-B1-NDCau.js +0 -1
- package/dist-embed-ufoathome/UfoAtHomeMessages_fr-BTG047qo.js +0 -1
- package/dist-embed-ufoathome/UfoAtHomeMessages_it-Ryxv4HNU.js +0 -1
- package/dist-embed-ufoathome/angular-size-CxoysZle.png +0 -0
- package/dist-embed-ufoathome/azimuth-CvjiPmz0.png +0 -0
- package/dist-embed-ufoathome/elevation-DPr5S6Jt.png +0 -0
- package/dist-embed-ufoathome/geipan-qt-2025-B_RUiH8B.js +0 -7
- package/dist-embed-ufoathome/protractor-DyE30B87.png +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
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","./QuestionnaireForm-
|
|
2
|
-
import{g as P,_ as w,r as
|
|
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","./QuestionnaireForm-vT3C3qXt.js","./rr0-ufoathome.mjs","./interviewJson-D-i14LTf.js","./interviewImport-ym5iXO4Z.js","./SightingFileEditor-DS1DRU2p.js","./index-C8cdeM8E.js","./sightingSchema-9MogCcUd.js","./QuestionnaireImport-BlTDOHWj.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{g as P,_ as w,r as V,S as $,h as C,H as z,s as J,U as j,Y as G,i as y,I as M,a as I,Z as K}from"./rr0-ufoathome.mjs";import{ao as A,H as O,Y as L}from"./ShareDialogElement-DqCoQwtn.js";import{InterviewMedia as N}from"./InterviewMedia-CGVsMdje.js";import{c as S,Q as Y,d as X}from"./ColumnResize-CO4e1m-q.js";import{I as Le}from"./ColumnResize-CO4e1m-q.js";import{register as Z}from"./InterviewElement-K_oIXneA.js";import{InterviewFile as v}from"./interviewJson-D-i14LTf.js";import{I as x}from"./SaidPosition-OJEYhVKN.js";import{W as B,A as F}from"./ParameterForm-XbqxCLRn.js";import{I as ee}from"./CaseEditorElement-BgT6HnpX.js";import"./Sighting-D-_IYi9n.js";import"./VisualAids-DI-hEL46.js";import"./three.module-CbaHqYFq.js";import"./Decor-Dn-cvniW.js";import"./GeoProjection-DvqDbRIx.js";import"./RecordingIssue-BlWT8Xsu.js";import"./xyzImageryRaster-Dhxs0B26.js";import"./Obstacles-v9SkfBD7.js";import"./TimelineTracks-Daaqw9ly.js";import"./ReentryArchive-CeXHrU7L.js";import"./ReferenceTimeline-2kBldQeG.js";import"./upperAirSources-BU0pD84c.js";import"./Account-C4jhsVtN.js";class b{static partsOf(e){return e.parts?e.parts:e.redacted?[]:[{text:e.text??""}]}static shownRanges(e){const t=[];let r="",i=0;return e.forEach((s,n)=>{const a="redacted"in s?"▮":v.plain(s.text);/[\p{L}\p{N}.,;:!?)»”…▮]$/u.test(r)&&/^[\p{L}\p{N}(«“▮]/u.test(a)&&(i+=1);const o="redacted"in s?0:a.length;t.push({part:n,from:i,to:i+o}),i+=o,r=a}),t}static words(e){return e.trim()===""?0:e.trim().split(/\s+/u).length}static redact(e,t,r,i){const s=[...b.partsOf(e)],n=b.shownRanges(s).find(g=>!("redacted"in s[g.part])&&t>=g.from&&r<=g.to);if(!n)return;const a=v.plain(s[n.part].text),o=/[\p{L}\p{N}'’-]/u;let p=t-n.from,d=r-n.from;for(;p>0&&o.test(a[p-1])&&o.test(a[p]);)p--;for(;d<a.length&&o.test(a[d])&&o.test(a[d-1]);)d++;const h=a.slice(p,d);if(h.trim()==="")return;const l=a.slice(0,p).trimEnd(),c=a.slice(d).trimStart(),u=[...l!==""?[{text:l}]:[],{redacted:{reason:i,words:b.words(h)}},...c!==""?[{text:c}]:[]],m=s.slice(0,n.part).filter(g=>"redacted"in g).length;return s.splice(n.part,1,...u),b.setParts(e,s),{text:h.trim(),nth:m}}static redactWhole(e,t){const r=JSON.stringify({text:e.text,parts:e.parts}),i=b.partsOf(e).reduce((s,n)=>s+("redacted"in n?n.redacted.words??0:b.words(v.plain(n.text))),0);if(delete e.text,delete e.parts,e.redacted={reason:t,...i>0?{words:i}:{}},e.refs)for(const s of e.refs)delete s.range;return r}static restoreWhole(e,t){const{text:r,parts:i}=JSON.parse(t);delete e.redacted,i?e.parts=i:e.text=r??""}static restorePart(e,t,r){const i=[...b.partsOf(e)];let s=-1;const n=i.findIndex(a=>"redacted"in a&&++s===t);n!==-1&&(i.splice(n,1,{text:r}),b.setParts(e,i))}static raw(e,t=()=>{}){let r=-1,i="",s="";for(const n of b.partsOf(e)){const a="redacted"in n?`⟦${t(++r)??"…"}⟧`:n.text;i!==""&&!/\s$/u.test(s)&&!/^\s/u.test(a)&&(i+=" "),i+=a,s=a}return i}static fromRaw(e,t,r){const i=b.partsOf(e).filter(o=>"redacted"in o),s=[],n=new Map;let a=-1;return t.split(/⟦([^⟧]*)⟧/u).forEach((o,p)=>{if(p%2===0){o.trim()!==""&&s.push({text:o.trim()});return}a++;const d=o.trim();d===""||d==="…"||d==="..."?s.push({redacted:i[a]?.redacted??{reason:r}}):(s.push({redacted:{reason:r,words:b.words(d)}}),n.set(a,d))}),delete e.redacted,b.setParts(e,s),n}static setParts(e,t){const r=[];for(const i of t){const s=r[r.length-1],n=!("redacted"in i)&&/^[,.;:!?)»”…]/u.test(i.text)?"":" ";s&&!("redacted"in s)&&!("redacted"in i)?r[r.length-1]={text:`${s.text}${n}${i.text}`.replace(/\s+/gu," ").trim()}:r.push(i)}if(r.some(i=>"redacted"in i)){if(e.parts=r,delete e.text,e.refs)for(const i of e.refs)delete i.range}else e.text=r.map(i=>i.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
3
|
<div class="player-bar">
|
|
4
4
|
<button type="button" class="icon-btn player-play" disabled>${x.PLAY}</button>
|
|
5
5
|
<span class="player-time">0:00</span>
|
|
@@ -33,7 +33,7 @@ import{g as P,_ as w,r as Q,S as $,h as C,H as z,s as J,U as j,T as G,i as y,a a
|
|
|
33
33
|
.recording-row .with-unit { display: flex; align-items: center; gap: 4px; font-weight: 400; color: var(--ink); }
|
|
34
34
|
.recording-status { grid-column: 1 / -1; margin: -4px 0 0; font-size: 12px; color: var(--ink-faint); }
|
|
35
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 i=()=>{const s=!r.paused;this.play.innerHTML=s?x.PAUSE:x.PLAY;const n=s?this.messages.pause:this.messages.play;this.play.title=n,this.play.setAttribute("aria-label",n)};r.addEventListener("play",i),r.addEventListener("pause",i),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(s=>s.start!==void 0);this.track.replaceChildren(...r.map(s=>{const n=document.createElement("span"),a=e?.speakers?.[s.speaker]?.role;n.className=s.redacted?"seg redacted":"seg",n.dataset.role=a==="witness"||a==="interviewer"?a:"other";const o=s.start??0,p=s.end??o+1;return n.style.left=`${o/t*100}%`,n.style.width=`${Math.max(.3,(p-o)/t*100)}%`,n}));const i=document.createElement("span");i.className="head",this.track.append(i),this.track.setAttribute("aria-valuemax",String(Math.round(t))),this.end.textContent=v.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=v.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,B.dialog(this.window,e.close,()=>this.window.close()),this.window.querySelector(".recording-rows").replaceChildren(...this.recordings.map((i,s)=>{const n=document.createElement("div");n.className="recording-row";const a=document.createElement("select");a.append(new Option(e.recordingAudio,"audio"),new Option(e.recordingVideo,"video")),a.value=i.kind,a.addEventListener("change",()=>this.edit(m=>{m[s].kind=a.value}));const o=document.createElement("input");o.type="text",o.value=i.src,o.placeholder="interview.mp3",o.addEventListener("change",()=>this.edit(m=>{m[s].src=o.value.trim()})),s===this.recordings.length-1&&o.addEventListener("input",()=>this.allowAdding(o.value.trim()!==""));const p=document.createElement("input");p.type="file",p.accept="audio/*,video/*",p.hidden=!0,p.addEventListener("change",()=>{const m=p.files?.[0];m&&(this.picked.set(m.name,URL.createObjectURL(m)),this.edit(
|
|
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 i=()=>{const s=!r.paused;this.play.innerHTML=s?x.PAUSE:x.PLAY;const n=s?this.messages.pause:this.messages.play;this.play.title=n,this.play.setAttribute("aria-label",n)};r.addEventListener("play",i),r.addEventListener("pause",i),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(s=>s.start!==void 0);this.track.replaceChildren(...r.map(s=>{const n=document.createElement("span"),a=e?.speakers?.[s.speaker]?.role;n.className=s.redacted?"seg redacted":"seg",n.dataset.role=a==="witness"||a==="interviewer"?a:"other";const o=s.start??0,p=s.end??o+1;return n.style.left=`${o/t*100}%`,n.style.width=`${Math.max(.3,(p-o)/t*100)}%`,n}));const i=document.createElement("span");i.className="head",this.track.append(i),this.track.setAttribute("aria-valuemax",String(Math.round(t))),this.end.textContent=v.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=v.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,B.dialog(this.window,e.close,()=>this.window.close()),this.window.querySelector(".recording-rows").replaceChildren(...this.recordings.map((i,s)=>{const n=document.createElement("div");n.className="recording-row";const a=document.createElement("select");a.append(new Option(e.recordingAudio,"audio"),new Option(e.recordingVideo,"video")),a.value=i.kind,a.addEventListener("change",()=>this.edit(m=>{m[s].kind=a.value}));const o=document.createElement("input");o.type="text",o.value=i.src,o.placeholder="interview.mp3",o.addEventListener("change",()=>this.edit(m=>{m[s].src=o.value.trim()})),s===this.recordings.length-1&&o.addEventListener("input",()=>this.allowAdding(o.value.trim()!==""));const p=document.createElement("input");p.type="file",p.accept="audio/*,video/*",p.hidden=!0,p.addEventListener("change",()=>{const m=p.files?.[0];m&&(this.picked.set(m.name,URL.createObjectURL(m)),this.edit(g=>{g[s].src=m.name,m.type.startsWith("video/")&&(g[s].kind="video")}))});const d=document.createElement("button");d.type="button",d.className="icon-btn",d.title=e.recordingFile,d.setAttribute("aria-label",e.recordingFile),d.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>',d.addEventListener("click",()=>p.click());const h=document.createElement("span");h.className="recording-file",h.append(o,d,p);const l=document.createElement("input");l.type="number",l.step="0.1",l.value=i.offset!==void 0?String(i.offset):"",l.placeholder="0",l.addEventListener("change",()=>this.edit(m=>{const g=Number(l.value);l.value.trim()===""||!Number.isFinite(g)||g===0?delete m[s].offset:m[s].offset=g}));const c=document.createElement("button");c.type="button",c.className="icon-btn",c.innerHTML=x.TRASH,c.title=e.recordingRemove,c.setAttribute("aria-label",e.recordingRemove),c.addEventListener("click",()=>this.edit(m=>{m.splice(s,1)}));const u=document.createElement("p");return u.className="recording-status",this.check(i,u),n.append(this.labelled(e.recordingKind,a),this.labelled(e.recordingFile,h),this.labelled(e.recordingOffset,l,"s"),c,u),n}));const r=this.recordings[this.recordings.length-1];this.allowAdding(r===void 0||r.src!=="")}allowAdding(e){const t=this.window.querySelector(".recording-add");t.disabled=!e,t.title=e?"":this.messages.recordingAddFirst}labelled(e,t,r){const i=document.createElement("label"),s=document.createElement("span");if(s.textContent=e,r){const n=document.createElement("span");n.className="with-unit",n.append(t,r),i.append(s,n)}else i.append(s,t);return i}check(e,t){if(e.src==="")return;const r=document.createElement(e.kind==="video"?"video":"audio");r.preload="metadata",r.addEventListener("loadedmetadata",()=>{t.textContent=v.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 R{constructor(e,t,r,i){this.sendsAudio=e,this.engine=t,this.load=r,this.downloadBytes=i}loaded;transcribe(e){return this.loaded??=this.load().catch(t=>{throw this.loaded=void 0,t}),this.loaded.then(t=>t.transcribe(e))}}const _="groq",U="openai",q="assemblyai",T=P.point("transcription").provide(P.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 R(!1,"whisper-large-v3-turbo (Transformers.js, in the browser)",async()=>new(await w(async()=>{const{BrowserWhisperProvider:E}=await import("./BrowserWhisperProvider-Dn44ZE45.js");return{BrowserWhisperProvider:E}},__vite__mapDeps([0,1,2]),import.meta.url)).BrowserWhisperProvider,76e7)},{id:_,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 R(!0,"whisper-large-v3-turbo (Groq)",async()=>new(await w(async()=>{const{OpenAiTranscriptionProvider:E}=await import("./OpenAiTranscriptionProvider-DDW446tK.js");return{OpenAiTranscriptionProvider:E}},__vite__mapDeps([3,1,2]),import.meta.url)).OpenAiTranscriptionProvider({base:"https://api.groq.com/openai/v1",model:"whisper-large-v3-turbo",key:()=>A.of(_)}))},{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 R(!0,"whisper-1 (OpenAI)",async()=>new(await w(async()=>{const{OpenAiTranscriptionProvider:E}=await import("./OpenAiTranscriptionProvider-DDW446tK.js");return{OpenAiTranscriptionProvider:E}},__vite__mapDeps([3,1,2]),import.meta.url)).OpenAiTranscriptionProvider({base:"https://api.openai.com/v1",model:"whisper-1",key:()=>A.of(U)}))},{id:q,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 R(!0,"AssemblyAI (speaker labels)",async()=>new(await w(async()=>{const{AssemblyAiTranscriptionProvider:E}=await import("./AssemblyAiTranscriptionProvider-o2kkPD5o.js");return{AssemblyAiTranscriptionProvider:E}},__vite__mapDeps([4,1,2]),import.meta.url)).AssemblyAiTranscriptionProvider({base:"https://api.assemblyai.com",key:()=>A.of(q)}))}]),H="rr0-interview-editor",te=`
|
|
37
37
|
<style>
|
|
38
38
|
:host { display: block; }
|
|
39
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. */
|
|
@@ -288,7 +288,7 @@ import{g as P,_ as w,r as Q,S as $,h as C,H as z,s as J,U as j,T as G,i as y,a a
|
|
|
288
288
|
<div id="file-editor" class="file-editor"></div>
|
|
289
289
|
</section>
|
|
290
290
|
</div>
|
|
291
|
-
`;class f 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=T[0].id;transcribing;constructor(){super(),this.shadow.innerHTML=te,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(f.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 i=r.detail;i.file?this.importFromFile(i.file):this.importFromUrl(i.url)}),this.shadow.getElementById("save").addEventListener("click",()=>this.save()),this.shadow.getElementById("form-feed").addEventListener("click",()=>this.feedObservation()),this.shadow.getElementById("form-send").addEventListener("click",()=>this.sendQuestionnaire()),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=>{f.transcriptionSourceId=r.target.value,this.transcribeOutcome=void 0,this.renderTranscribe()}),this.shadow.getElementById("transcribe-key").addEventListener("input",r=>{A.set(f.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 i=r.target.closest(".bar.redacted-label");i&&this.openBar(i)}),e.addEventListener("keydown",r=>{const i=r.target.closest(".bar.redacted-label");i&&(r.key==="Enter"||r.key===" ")&&(r.preventDefault(),this.openBar(i))}),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-form":"form","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){const t=e!==this.current;t&&(this.shownFor=void 0),this.current=e,this.render(),t&&this.heldThroughQuestionnaire?this.openGroup("form"):this.group==="form"&&(this.formShown=this.showForm()),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,j),i=await G.load(r);e===this.localeToken&&(this.language=r,this.said=new $(t),this.messages=i,this.player||(this.player=new D(this.shadow.getElementById("player"),{timeChanged:s=>this.markCurrentTurn(s),recordingsChanged:s=>void this.editTranscript(n=>{s.length===0?delete n.recordings:n.recordings=s})},i),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.renderTranscribe()}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,h)=>{this.shadow.getElementById(l).textContent=h};t("label-summary-group",e.summaryTab),t("label-file-group",e.fileTab),t("label-exchanges-group",e.exchangesTab),t("label-form-group",e.questionnaireTab),t("form-feed",e.feed),O.say(this.shadow.getElementById("form-feed-hint"),"",e.feedHint);const r=this.shadow.getElementById("form-tab");r.hidden=!this.heldThroughQuestionnaire,!this.heldThroughQuestionnaire&&this.group==="form"&&this.openGroup("summary"),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),O.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 i=this.field("redact-reason");i.placeholder=e.redactReason,i.title=e.redactReasonHint,t("transcribe-start",e.transcribe),this.shadow.getElementById("transcribe-hint").replaceChildren(O.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,n=this.shadow.activeElement,a=(l,h)=>{this.field(l)!==n&&(this.field(l).value=h)};a("title",this.said.read(s?.title)??""),a("time",s?.time??""),a("by",f.byText(s?.by)),a("url",s?.url??""),a("summary",this.said.read(s?.summary)??"");const o=[s?.interviewOf].flat().filter(l=>typeof l=="string"),p=this.shadow.getElementById("witness"),d=[...this.options,...o.filter(l=>!this.options.some(h=>h.id===l)).map(l=>({id:l,label:l}))];p.replaceChildren(p.querySelector("legend"),...d.map(l=>{const h=document.createElement("label"),u=document.createElement("input");return u.type="checkbox",u.value=l.id,u.checked=o.includes(l.id),h.append(u,l.label),h}));const c=this.shadow.getElementById("medium");if(c.replaceChildren(...N.ALL.map(l=>new Option(N.label(l,this.language),l))),s?.medium!==void 0&&!N.ALL.includes(s.medium)&&c.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,c.prepend(l)}c.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 i=this.said.write(t.title,r,this.language);i===void 0?delete t.title:t.title=i;break}case"summary":{const i=this.said.write(t.summary,r,this.language);i===void 0?delete t.summary:t.summary=i;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 i=r.split(",").map(s=>s.trim()).filter(s=>s!=="");i.length===0?delete t.by:t.by=i.map(s=>({people:s}));break}case"witness":{const i=[...this.shadow.querySelectorAll("#witness input:checked")].map(s=>s.value);if(i.length===0){this.render();return}t.interviewOf=i.length===1?i[0]:i;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",form:"group-form",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,i]of Object.entries(t))this.shadow.getElementById(i).hidden=r!==e;e==="file"&&this.showTranscript(),e==="exchanges"&&this.showExchanges(),e==="form"&&(this.formShown=this.showForm())}form;formToken=0;formShown=Promise.resolve();get heldThroughQuestionnaire(){return this.current?.medium==="questionnaire"}async showForm(){const e=this.current;if(!e||!this.heldThroughQuestionnaire)return;const t=++this.formToken,[{QuestionnaireForm:r},{QuestionnaireTemplates:i},s]=await Promise.all([w(()=>import("./QuestionnaireForm-U78nFPn5.js"),__vite__mapDeps([5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26]),import.meta.url),w(()=>import("./CaseEditorElement-0J_TCeiq.js").then(u=>u.a),__vite__mapDeps([6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25]),import.meta.url),this.transcriptJson(e)]);await this.ready;const n=s?.questionnaire?.id??i.DEFAULT,a=await i.load(n);if(t!==this.formToken||this.current!==e)return;const o=this.messages,p=this.shadow.getElementById("form-note");y.show(p,a?void 0:o.unknownQuestionnaire.replace("{id}",n),"warning"),this.form??=new r(this.shadow.getElementById("form-fields"),(u,m,b)=>void this.answerField(u,m,b),(u,m,b)=>void this.giveFiles(u,m,b));const d=this.transcriptUrl(e)??new URL(`${e.id??"interview"}.json`,this.base??location.href).href;this.form.show(a??{id:n,title:n,sections:[]},s,o.questionnaire,this.language,this.hasAttribute("readonly"),u=>this.confidentialAnswers.get(this.confidentialKey(e,u)),{add:u=>M.add(u,d),shown:u=>M.shown(u,d),messages:o});const c=this.shadow.getElementById("form-feed");c.disabled=this.hasAttribute("readonly"),this.formRecipient=s?.questionnaire?.recipient,this.formTitle=a?i.text(a.title,this.language):n;const l=this.shadow.getElementById("form-send"),h=this.formRecipient?this.said.read(this.formRecipient.name)??"":void 0;l.textContent=h?o.send.replace("{name}",h):o.sendPrepare,l.disabled=this.hasAttribute("readonly"),O.say(this.shadow.getElementById("form-send-hint"),"",h&&this.formRecipient?.email?o.sendHint.replace("{email}",this.formRecipient.email):o.sendPrepareHint)}async answerField(e,t,r,i){const{QuestionnaireTemplates:s}=await w(async()=>{const{QuestionnaireTemplates:c}=await import("./CaseEditorElement-0J_TCeiq.js").then(l=>l.a);return{QuestionnaireTemplates:c}},__vite__mapDeps([6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25]),import.meta.url),n=this.current;if(!n)return;const a=await this.transcriptJson(n),o=await s.load(a?.questionnaire?.id??s.DEFAULT),p=o?s.field(o,e)?.confidential:void 0;let d;if(p){const c=this.confidentialKey(n,e),l=t.trim();if(l==="")this.confidentialAnswers.delete(c);else{this.confidentialAnswers.set(c,l);const h=a?.questionnaire?.recipient,{QuestionnaireSeal:u}=await w(async()=>{const{QuestionnaireSeal:m}=await import("./QuestionnaireSeal-DpZYUhnf.js");return{QuestionnaireSeal:m}},[],import.meta.url);d={reason:p.reason,...h?{sealed:await u.seal(l,h)}:{}}}}await this.editTranscript(c=>{if(o&&!c.segments.some(l=>l.field!==void 0)){const l=s.interview(o);c.segments=l.segments,c.questionnaire=l.questionnaire,l.language&&!c.language&&(c.language=l.language);for(const[h,u]of Object.entries(l.speakers))c.speakers[h]??=u}c.medium="questionnaire",i?i(c):s.answer(c,e,t,r,d)})}async giveFiles(e,t,r){const{QuestionnaireTemplates:i}=await w(async()=>{const{QuestionnaireTemplates:s}=await import("./CaseEditorElement-0J_TCeiq.js").then(n=>n.a);return{QuestionnaireTemplates:s}},__vite__mapDeps([6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25]),import.meta.url);this.current&&await this.answerField(e,"",r,s=>i.answerFiles(s,e,t,r))}static openers=new Map;static openerFor(e){for(const t of P.point("sealed").sources){let r=f.openers.get(t);if(r||f.openers.set(t,r=t.create()),r.recipient===e)return{source:t,opener:r}}}offerOpening(e,t,r){const i=f.openerFor(r.for),s=this.current;if(!i||!s)return;const n=this.messages,a=t.field!==void 0?this.confidentialKey(s,t.field):void 0,o=document.createElement("div");o.className="sealed-open";const p=c=>{const l=document.createElement("p");l.className="opened",l.textContent=c;const h=document.createElement("p");h.className="opened-note",h.textContent=n.sealOpened.replace("{name}",i.source.name),o.replaceChildren(l,h)},d=a!==void 0?this.confidentialAnswers.get(a):void 0;if(d!==void 0)p(d);else{const c=document.createElement("button");c.type="button",c.className="pill-btn",c.textContent=n.sealOpen.replace("{name}",i.source.name),c.addEventListener("click",()=>{i.opener.open(r).then(h=>{h!==void 0&&(a!==void 0&&this.confidentialAnswers.set(a,h),p(h))},()=>y.show(l,n.sealFailed,"error"))});const l=document.createElement("p");l.className="opened-note",o.replaceChildren(c,l)}e.append(o)}confidentialAnswers=new Map;confidentialKey(e,t){return`${e.id??e.url??""}\0${t}`}formRecipient;formTitle="";sendQuestionnaire(){const e=this.messages,t=this.formRecipient,r=t?this.said.read(t.name)??"":"",i=this.shadow.getElementById("form-sent"),s={...t?.email?{email:t.email}:{},subject:e.sendSubject.replace("{title}",this.formTitle),body:e.sendBody.replace("{title}",this.formTitle)+(t?`
|
|
291
|
+
`;class f 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=T[0].id;transcribing;constructor(){super(),this.shadow.innerHTML=te,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(f.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 i=r.detail;i.file?this.importFromFile(i.file):this.importFromUrl(i.url)}),this.shadow.getElementById("save").addEventListener("click",()=>this.save()),this.shadow.getElementById("form-feed").addEventListener("click",()=>this.feedObservation()),this.shadow.getElementById("form-send").addEventListener("click",()=>this.sendQuestionnaire()),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=>{f.transcriptionSourceId=r.target.value,this.transcribeOutcome=void 0,this.renderTranscribe()}),this.shadow.getElementById("transcribe-key").addEventListener("input",r=>{A.set(f.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 i=r.target.closest(".bar.redacted-label");i&&this.openBar(i)}),e.addEventListener("keydown",r=>{const i=r.target.closest(".bar.redacted-label");i&&(r.key==="Enter"||r.key===" ")&&(r.preventDefault(),this.openBar(i))}),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-form":"form","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){const t=e!==this.current;t&&(this.shownFor=void 0),this.current=e,this.render(),t&&this.heldThroughQuestionnaire?this.openGroup("form"):this.group==="form"&&(this.formShown=this.showForm()),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,j),i=await G.load(r);e===this.localeToken&&(this.language=r,this.said=new $(t),this.messages=i,this.player||(this.player=new D(this.shadow.getElementById("player"),{timeChanged:s=>this.markCurrentTurn(s),recordingsChanged:s=>void this.editTranscript(n=>{s.length===0?delete n.recordings:n.recordings=s})},i),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.renderTranscribe()}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-form-group",e.questionnaireTab),t("form-feed",e.feed),O.say(this.shadow.getElementById("form-feed-hint"),"",e.feedHint);const r=this.shadow.getElementById("form-tab");r.hidden=!this.heldThroughQuestionnaire,!this.heldThroughQuestionnaire&&this.group==="form"&&this.openGroup("summary"),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),O.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 i=this.field("redact-reason");i.placeholder=e.redactReason,i.title=e.redactReasonHint,t("transcribe-start",e.transcribe),this.shadow.getElementById("transcribe-hint").replaceChildren(O.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,n=this.shadow.activeElement,a=(l,c)=>{this.field(l)!==n&&(this.field(l).value=c)};a("title",this.said.read(s?.title)??""),a("time",s?.time??""),a("by",f.byText(s?.by)),a("url",s?.url??""),a("summary",this.said.read(s?.summary)??"");const o=[s?.interviewOf].flat().filter(l=>typeof l=="string"),p=this.shadow.getElementById("witness"),d=[...this.options,...o.filter(l=>!this.options.some(c=>c.id===l)).map(l=>({id:l,label:l}))];p.replaceChildren(p.querySelector("legend"),...d.map(l=>{const c=document.createElement("label"),u=document.createElement("input");return u.type="checkbox",u.value=l.id,u.checked=o.includes(l.id),c.append(u,l.label),c}));const h=this.shadow.getElementById("medium");if(h.replaceChildren(...N.ALL.map(l=>new Option(N.label(l,this.language),l))),s?.medium!==void 0&&!N.ALL.includes(s.medium)&&h.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,h.prepend(l)}h.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 i=this.said.write(t.title,r,this.language);i===void 0?delete t.title:t.title=i;break}case"summary":{const i=this.said.write(t.summary,r,this.language);i===void 0?delete t.summary:t.summary=i;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 i=r.split(",").map(s=>s.trim()).filter(s=>s!=="");i.length===0?delete t.by:t.by=i.map(s=>({people:s}));break}case"witness":{const i=[...this.shadow.querySelectorAll("#witness input:checked")].map(s=>s.value);if(i.length===0){this.render();return}t.interviewOf=i.length===1?i[0]:i;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",form:"group-form",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,i]of Object.entries(t))this.shadow.getElementById(i).hidden=r!==e;e==="file"&&this.showTranscript(),e==="exchanges"&&this.showExchanges(),e==="form"&&(this.formShown=this.showForm())}form;formToken=0;formShown=Promise.resolve();get heldThroughQuestionnaire(){return this.current?.medium==="questionnaire"}async showForm(){const e=this.current;if(!e||!this.heldThroughQuestionnaire)return;const t=++this.formToken,[{QuestionnaireForm:r},{QuestionnaireTemplates:i},s]=await Promise.all([w(()=>import("./QuestionnaireForm-vT3C3qXt.js"),__vite__mapDeps([5,6,7]),import.meta.url),w(()=>import("./rr0-ufoathome.mjs").then(u=>u.a6),[],import.meta.url),this.transcriptJson(e)]);await this.ready;const n=s?.questionnaire?.id??"",a=n?await i.load(n):void 0;if(t!==this.formToken||this.current!==e)return;const o=this.messages,p=this.shadow.getElementById("form-note");y.show(p,a?void 0:n?o.unknownQuestionnaire.replace("{id}",n):o.noQuestionnaire,"warning"),this.form??=new r(this.shadow.getElementById("form-fields"),(u,m,g)=>void this.answerField(u,m,g),(u,m,g)=>void this.giveFiles(u,m,g));const d=this.transcriptUrl(e)??new URL(`${e.id??"interview"}.json`,this.base??location.href).href;this.form.show(a??{id:n,title:n,sections:[]},s,o.questionnaire,this.language,this.hasAttribute("readonly"),u=>this.confidentialAnswers.get(this.confidentialKey(e,u)),{add:u=>M.add(u,d),shown:u=>M.shown(u,d),messages:o});const h=this.shadow.getElementById("form-feed");h.disabled=this.hasAttribute("readonly"),this.formRecipient=s?.questionnaire?.recipient,this.formTitle=a?i.text(a.title,this.language):n;const l=this.shadow.getElementById("form-send"),c=this.formRecipient?this.said.read(this.formRecipient.name)??"":void 0;l.textContent=c?o.send.replace("{name}",c):o.sendPrepare,l.disabled=this.hasAttribute("readonly"),O.say(this.shadow.getElementById("form-send-hint"),"",c&&this.formRecipient?.email?o.sendHint.replace("{email}",this.formRecipient.email):o.sendPrepareHint)}async answerField(e,t,r,i){const{QuestionnaireTemplates:s}=await w(async()=>{const{QuestionnaireTemplates:l}=await import("./rr0-ufoathome.mjs").then(c=>c.a6);return{QuestionnaireTemplates:l}},[],import.meta.url),n=this.current;if(!n)return;const a=await this.transcriptJson(n),o=a?.questionnaire?.id,p=o?await s.load(o):void 0,d=p?s.field(p,e)?.confidential:void 0;let h;if(d){const l=this.confidentialKey(n,e),c=t.trim();if(c==="")this.confidentialAnswers.delete(l);else{this.confidentialAnswers.set(l,c);const u=a?.questionnaire?.recipient,{QuestionnaireSeal:m}=await w(async()=>{const{QuestionnaireSeal:g}=await import("./QuestionnaireSeal-DpZYUhnf.js");return{QuestionnaireSeal:g}},[],import.meta.url);h={reason:d.reason,...u?{sealed:await m.seal(c,u)}:{}}}}await this.editTranscript(l=>{if(p&&!l.segments.some(c=>c.field!==void 0)){const c=s.interview(p);l.segments=c.segments,l.questionnaire=c.questionnaire,c.language&&!l.language&&(l.language=c.language);for(const[u,m]of Object.entries(c.speakers))l.speakers[u]??=m}l.medium="questionnaire",i?i(l):s.answer(l,e,t,r,h)})}async giveFiles(e,t,r){const{QuestionnaireTemplates:i}=await w(async()=>{const{QuestionnaireTemplates:s}=await import("./rr0-ufoathome.mjs").then(n=>n.a6);return{QuestionnaireTemplates:s}},[],import.meta.url);this.current&&await this.answerField(e,"",r,s=>i.answerFiles(s,e,t,r))}static openers=new Map;static openerFor(e){for(const t of P.point("sealed").sources){let r=f.openers.get(t);if(r||f.openers.set(t,r=t.create()),r.recipient===e)return{source:t,opener:r}}}offerOpening(e,t,r){const i=f.openerFor(r.for),s=this.current;if(!i||!s)return;const n=this.messages,a=t.field!==void 0?this.confidentialKey(s,t.field):void 0,o=document.createElement("div");o.className="sealed-open";const p=h=>{const l=document.createElement("p");l.className="opened",l.textContent=h;const c=document.createElement("p");c.className="opened-note",c.textContent=n.sealOpened.replace("{name}",i.source.name),o.replaceChildren(l,c)},d=a!==void 0?this.confidentialAnswers.get(a):void 0;if(d!==void 0)p(d);else{const h=document.createElement("button");h.type="button",h.className="pill-btn",h.textContent=n.sealOpen.replace("{name}",i.source.name),h.addEventListener("click",()=>{i.opener.open(r).then(c=>{c!==void 0&&(a!==void 0&&this.confidentialAnswers.set(a,c),p(c))},()=>y.show(l,n.sealFailed,"error"))});const l=document.createElement("p");l.className="opened-note",o.replaceChildren(h,l)}e.append(o)}confidentialAnswers=new Map;confidentialKey(e,t){return`${e.id??e.url??""}\0${t}`}formRecipient;formTitle="";sendQuestionnaire(){const e=this.messages,t=this.formRecipient,r=t?this.said.read(t.name)??"":"",i=this.shadow.getElementById("form-sent"),s={...t?.email?{email:t.email}:{},subject:e.sendSubject.replace("{title}",this.formTitle),body:e.sendBody.replace("{title}",this.formTitle)+(t?`
|
|
292
292
|
|
|
293
|
-
${e.sendSealed.replace("{name}",r)}`:""),attach:e.sendAttach,report:(n,a)=>y.show(i,(n==="shared"?e.sent:n==="prepared"?e.sendPrepared:e.sendFailed).replace("{file}",a).replace("{error}",a),n==="failed"?"error":"info")};this.dispatchEvent(new CustomEvent(Y,{bubbles:!0,composed:!0,detail:s}))}feedObservation(){const e=this.current;e&&this.transcriptJson(e).then(t=>{const r=this.shadow.getElementById("form-fed"),i=s=>y.show(r,s>0?this.messages.fed.replace("{n}",String(s)):this.messages.fedNothing,s>0?"info":"warning");if(!t){i(0);return}this.dispatchEvent(new CustomEvent(X,{bubbles:!0,composed:!0,detail:{event:e,json:t,report:i}}))})}exchangesToken=0;async transcriptJson(e){try{const t=this.fileEditor?.text??this.text;if(t!==void 0)return v.read(JSON.parse(t));const r=this.transcriptUrl(e);if(r!==void 0)return v.read(await I.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 i=f.pretty(f.withEventFields(r,t));this.fileEditor?.replaceText(i,!1),this.onEdited(i),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 i of[r.redacted,...(r.parts??[]).map(s=>"redacted"in s?s.redacted:void 0)]){if(!i)continue;const s=JSON.stringify(i.reason),n=t.get(s);n?n.n++:t.set(s,{reason:i.reason,n:1})}return[...t.values()].sort((r,i)=>i.n-r.n).map(r=>r.reason)}renderRedactReasons(e){const t=this.messages;if(!t)return;const r=this.givenReasons(e).map(n=>this.said.read(n)??"").filter(n=>n!==""),i=t.redactReasons.filter(n=>!r.some(a=>a.toLowerCase().startsWith(n.toLowerCase()))),s=[...new Set([...r,...i])];this.shadow.getElementById("redact-reasons").replaceChildren(...s.map(n=>new Option(n,n)))}speakerLabel(e,t){const r=v.speakerName(e,t),i=e.speakers?.[t]?.role;return i===v.UNATTRIBUTED&&e.speakers[t].title?this.messages.voiceNamed.replace("{name}",r):r===i&&i in this.messages.roles?this.messages.roles[i]:r}renderReview(e){const t=this.shadow.getElementById("review"),r=Object.entries(e?.speakers??{}).filter(([,o])=>o.role!==v.UNATTRIBUTED).map(([o])=>o);if(t.hidden=!e||r.length===0,!e||r.length===0)return;const i=o=>["approved","covered"].includes(e.proofreading?.[o]?.status??""),s=r.filter(o=>!i(o)),n=document.createElement("span");n.textContent=s.length===0?this.messages.proofreadAll:this.messages.proofreadPending.replace("{names}",s.map(o=>this.speakerLabel(e,o)).join(", ")),t.toggleAttribute("data-done",s.length===0);const a=document.createElement("span");a.className="review-boxes";for(const o of r){const p=document.createElement("label"),d=document.createElement("input");d.type="checkbox",d.checked=i(o),d.disabled=this.hasAttribute("readonly"),d.addEventListener("change",()=>void this.editTranscript(c=>{c.proofreading??={},d.checked?c.proofreading[o]={status:"approved",date:new Date().toISOString().slice(0,10)}:c.proofreading[o]={status:"pending"}})),p.append(d,this.messages.reviewedBy.replace("{name}",this.speakerLabel(e,o))),a.append(p)}t.replaceChildren(n,a)}momentsOf(e,t){const r=e.speakers?.[t]?.of??v.sightingsOf(e)[0];return this.options.find(i=>i.id===r)?.moments??this.options.flatMap(i=>i.moments??[])}decorateExchanges(e){if(!e)return;const t=this.messages,r=this.hasAttribute("readonly");for(const i of this.shadow.querySelectorAll("#exchanges .turn[data-segment]")){const s=Number(i.dataset.segment),n=e.segments[s];if(!n)continue;if(n.start!==void 0){const d=document.createElement("button");d.type="button",d.className="turn-time",d.textContent=v.clock(n.start),d.addEventListener("click",()=>this.player?.seek(n.start)),i.prepend(d)}const a=n.redacted?[n.redacted]:g.partsOf(n).flatMap(d=>"redacted"in d?[d.redacted]:[]);i.querySelectorAll(".bar").forEach((d,c)=>{const l=a[c]?.words;d.textContent=l!==void 0?t.redactedWords.replace("{n}",String(l)):t.redacted,d.classList.add("redacted-label");const h=n.redacted?`${s}:all`:`${s}:${c}`;this.takenOut.has(h)&&(d.dataset.restorable=h)});const o=n.redacted?.sealed;o&&this.offerOpening(i,n,o);const p=this.momentsOf(e,n.speaker);i.querySelectorAll(".ref").forEach((d,c)=>{const l=n.refs?.[c];if(!l)return;const h=p.find(m=>Math.abs(m.at-l.at)<.05);if(h){const m=document.createElement("span");m.className="moment-letter",m.textContent=h.label.slice(0,2),d.replaceChildren(m,t.momentLabel.replace("{k}",h.label).replace("{text}",h.note??v.clock(l.at)))}if(r)return;const u=document.createElement("button");u.type="button",u.className="ref-unlink",u.textContent="×",u.title=t.unlinkMoment,u.setAttribute("aria-label",t.unlinkMoment),u.addEventListener("click",()=>void this.editTranscript(m=>{m.segments[s].refs?.splice(c,1),m.segments[s].refs?.length===0&&delete m.segments[s].refs})),d.after(u)}),r||i.append(this.turnTools(e,s,n,p))}}turnTools(e,t,r,i){const s=this.messages,n=document.createElement("div");n.className="turn-tools";const a=(d,c)=>{const l=document.createElement("button");return l.type="button",l.textContent=d,l.addEventListener("click",c),l};if(e.speakers?.[r.speaker]?.role==="witness"&&!r.redacted){const d=a(s.linkMoment,()=>{});n.append(d),new F(d,`moment-menu-${t}`,l=>void this.editTranscript(h=>{const u=h.segments[t].refs??[];u.some(m=>Math.abs(m.at-Number(l))<.05)||u.push({at:Number(l)}),h.segments[t].refs=u}),l=>`moment-${t}-${l}`).setKinds(i.length>0?i.map(l=>({value:String(l.at),label:s.momentLabel.replace("{k}",l.label).replace("{text}",l.note??v.clock(l.at))})):[{value:"",label:s.noMoments,disabledReason:s.noMoments}])}if(r.redacted||n.append(a(s.editTurn,()=>this.editTurn(t))),!r.redacted&&!this.hasAttribute("readonly")){const d=a(s.whoSpeaks,()=>{});n.append(d),new F(d,`speaker-menu-${t}`,l=>void w(async()=>{const{InterviewImport:h}=await import("./interviewImport-ym5iXO4Z.js");return{InterviewImport:h}},__vite__mapDeps([27,26,7]),import.meta.url).then(({InterviewImport:h})=>this.editTranscript(u=>{h.attribute(u,t,l)})),l=>`speaker-${t}-${l}`).setKinds(Object.keys(e.speakers??{}).map(l=>({value:l,label:this.speakerLabel(e,l),...l===r.speaker?{disabledReason:this.speakerLabel(e,l)}:{}})))}const o=this.takenOut.has(`${t}:all`)||[...this.takenOut.keys()].some(d=>d.startsWith(`${t}:`));if(r.redacted||r.parts&&o){const d=a(s.restoreAll,()=>void this.restoreAll(t));d.disabled=!o,n.append(d)}else n.append(a(s.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 p=a("",()=>void this.editTranscript(d=>{d.segments.splice(t,1),this.shiftTakenOut(t)}));return p.className="icon-btn",p.innerHTML=x.TRASH,p.title=s.deleteTurn,p.setAttribute("aria-label",s.deleteTurn),n.append(p),n}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,i=this.shadow.getElementById("exchanges");if(!r||r.collapsed||!i.contains(r.startContainer)||!i.contains(r.endContainer))return;const s=l=>l instanceof Element?l:l.parentElement,n=s(r.startContainer)?.closest(".said");if(!n&&!s(r.endContainer)?.closest(".said"))return;const a=n&&s(r.endContainer)?.closest(".said")===n&&!s(r.startContainer)?.closest(".bar")&&!s(r.endContainer)?.closest(".bar"),o=r.getBoundingClientRect();if(!a){this.openRedactPop({kind:"selection",index:-1,from:0,to:0},o,e.selectionOnePassage);return}const p=Number(n.closest(".turn").dataset.segment),d=f.offsetIn(n,r.startContainer,r.startOffset),c=f.offsetIn(n,r.endContainer,r.endOffset);this.openRedactPop({kind:"selection",index:p,from:Math.min(d,c),to:Math.max(d,c)},o),f.markPending(r)}static PENDING="rr0-redact-pending";static markPending(e){const t=globalThis.CSS?.highlights,r=globalThis.Highlight;!t||!r||(e?t.set(f.PENDING,new r(e.cloneRange())):t.delete(f.PENDING))}openBar(e){if(this.hasAttribute("readonly"))return;const t=e.closest(".turn");if(!t)return;const r=Number(t.dataset.segment),i=[...t.querySelectorAll(".bar")].indexOf(e),s=this.drawn?.segments[r];if(!s)return;const n=s.redacted?"all":i,a=`${r}:${n}`;this.openRedactPop({kind:"bar",index:r,nth:n,restorable:this.takenOut.has(a)?a:void 0},e.getBoundingClientRect())}openRedactPop(e,t,r){const i=this.shadow.getElementById("redact-pop"),s=this.field("redact-reason");f.markPending(),this.redactTarget=e;const n=this.shadow.getElementById("redact-take"),a=this.shadow.getElementById("redact-restore");n.hidden=e.kind!=="selection",n.disabled=!!r,a.hidden=e.kind!=="bar"||!e.restorable,s.disabled=!!r,s.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),i.hidden=!1,typeof i.showPopover=="function"&&i.isConnected&&(i.setAttribute("popover","manual"),i.matches(":popover-open")||i.showPopover());const p=i.offsetWidth||320,d=i.offsetHeight||120,c=t.bottom+6+d<=window.innerHeight;i.style.top=`${Math.max(8,c?t.bottom+6:t.top-6-d)}px`,i.style.left=`${Math.max(8,Math.min(t.left,window.innerWidth-p-8))}px`,r||s.focus({preventScroll:!0})}closeRedactPop(){const e=this.shadow.getElementById("redact-pop");this.redactTarget=void 0,f.markPending(),typeof e.hidePopover=="function"&&e.matches?.(":popover-open")&&e.hidePopover(),e.hidden=!0}redactionAt(e,t,r){const i=e?.segments[t];if(i)return r==="all"?i.redacted:g.partsOf(i).flatMap(s=>"redacted"in s?[s.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(i=>{if(e.nth!=="all"){const n=this.redactionAt(i,e.index,e.nth);n&&(n.reason=t);return}const s=JSON.stringify(i.segments[e.index].redacted?.reason);for(let n=e.index;n<i.segments.length;n++){const a=i.segments[n].redacted;if(!a||n>e.index&&JSON.stringify(a.reason)!==s)break;a.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 i=!1;if(await this.editTranscript(s=>{const n=g.redact(s.segments[t.index],t.from,t.to,r);n&&(i=!0,this.shiftParts(t.index,n.nth),this.takenOut.set(`${t.index}:${n.nth}`,n.text))}),!i){const s=this.shadow.getElementById("redact-note");s.textContent=e.selectionOnePassage,s.classList.add("error");return}this.closeRedactPop(),(this.shadow.getSelection?.()??document.getSelection())?.removeAllRanges()}static offsetIn(e,t,r){let i=0;const s=document.createTreeWalker(e,NodeFilter.SHOW_TEXT,{acceptNode:n=>n.parentElement?.closest(".bar")?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT});for(let n=s.nextNode();n;n=s.nextNode()){if(n===t)return i+r;if(t.contains(n)&&t!==n){const o=[...t.childNodes].slice(0,r);return i+o.reduce((p,d)=>p+(d instanceof Element&&d.closest(".bar")?0:(d.textContent??"").length),0)}i+=(n.textContent??"").length}return i}async restore(e){const t=this.takenOut.get(e);if(t===void 0)return;const[r,i]=e.split(":"),s=Number(r);await this.editTranscript(n=>{i==="all"?g.restoreWhole(n.segments[s],t):(g.restorePart(n.segments[s],Number(i),t),this.shiftParts(s,Number(i),-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,i)=>i-r);for(const r of t)await this.restore(`${e}:${r}`)}editTurn(e){const r=this.drawn?.segments[e],i=this.shadow.querySelector(`#exchanges .turn[data-segment="${e}"] .said`);if(!r||!i)return;const s=this.messages,n=document.createElement("div");n.className="turn-edit";const a=document.createElement("textarea");a.value=g.raw(r,l=>this.takenOut.get(`${e}:${l}`));const o=document.createElement("span");o.className="hint",o.textContent=s.turnEditHint;const p=document.createElement("div");p.className="buttons";const d=document.createElement("button");d.type="button",d.className="pill-btn primary",d.textContent=s.saveTurn,d.addEventListener("click",()=>void this.editTranscript(l=>{const h=g.fromRaw(l.segments[e],a.value,this.redactReason);this.forget(e);for(const[u,m]of h)this.takenOut.set(`${e}:${u}`,m)}));const c=document.createElement("button");c.type="button",c.className="pill-btn",c.textContent=s.cancelTurn,c.addEventListener("click",()=>this.drawExchanges(this.drawn)),p.append(d,c),n.append(a,o,p),i.replaceWith(n),a.focus()}forget(e){for(const t of[...this.takenOut.keys()])t.startsWith(`${e}:`)&&this.takenOut.delete(t)}shiftParts(e,t,r=1){const i=[...this.takenOut].filter(([s])=>s.startsWith(`${e}:`)&&s!==`${e}:all`&&Number(s.split(":")[1])>=t+(r<0?1:0));for(const[s]of i)this.takenOut.delete(s);for(const[s,n]of i)this.takenOut.set(`${e}:${Number(s.split(":")[1])+r}`,n)}shiftTakenOut(e){const t=[...this.takenOut];this.takenOut.clear();for(const[r,i]of t){const[s,n]=r.split(":"),a=Number(s);a<e?this.takenOut.set(r,i):a>e&&this.takenOut.set(`${a-1}:${n}`,i)}}markCurrentTurn(e){const t=this.drawn?.segments??[];let r=-1;t.forEach((n,a)=>{n.start!==void 0&&n.start<=e&&(r=a)});for(const n of this.shadow.querySelectorAll("#exchanges .turn.current"))n.classList.remove("current");const i=this.shadow.querySelector(`#exchanges .turn[data-segment="${r}"]`);if(!i)return;i.classList.add("current");const s=i.closest(".rr0-interview-turns");s&&(i.offsetTop<s.scrollTop||i.offsetTop>s.scrollTop+s.clientHeight-i.offsetHeight)&&s.scrollTo({top:i.offsetTop-s.clientHeight/3,behavior:"smooth"})}async revealSegment(e){this.openGroup("exchanges"),await this.showExchanges(),this.shadow.getElementById("exchanges").revealSegment(e)}transcribeOutcome;renderTranscribe(){this.shadow.getElementById("transcribe").hidden=this.hasAttribute("readonly")||!this.transcribing&&!this.player?.recordingUrl();const e=this.messages;if(!e)return;const t=this.shadow.getElementById("transcribe-source");[...t.options].map(d=>d.value).join()!==T.map(d=>d.id).join()&&t.replaceChildren(...T.map(d=>{const c=new Option(d.name,d.id);return c.title=d.credit,c}));const r=L(T,f.transcriptionSourceId);t.value=r.id;const i=this.shadow.getElementById("transcribe-credit");i.href=r.creditUrl,i.textContent=r.credit,this.shadow.getElementById("transcribe-key-row").hidden=!r.keyUrl,this.shadow.getElementById("transcribe-key-get").href=r.keyUrl??"";const s=this.field("transcribe-key");if(s!==this.shadow.activeElement&&(s.value=A.of(r.id)??""),this.transcribing)return;const n=this.player?.recordingUrl();this.renderTranscribeStart();const a=this.shadow.getElementById("transcribe-note");if(this.transcribeOutcome){y.show(a,this.transcribeOutcome.text,this.transcribeOutcome.kind);return}if(!n){y.show(a,e.transcribeNoRecording);return}const o=r.create(),p=[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&&p.push(e.transcribeReplaces),y.show(a,p.join(" "),o.sendsAudio?"warning":"info")}renderTranscribeStart(){if(this.transcribing||!this.messages)return;const e=L(T,f.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"),i=this.shadow.getElementById("transcribe-progress"),s=n=>String(Math.round(n/1e6));if(e==="reading")i.removeAttribute("value"),y.show(r,t.transcribeReading);else if(e.stage==="loading")e.total?(i.max=e.total,i.value=e.loaded,y.show(r,t.transcribeLoading.replace("{loaded}",s(e.loaded)).replace("{total}",s(e.total)))):(i.removeAttribute("value"),y.show(r,t.transcribeLoadingSoFar.replace("{loaded}",s(e.loaded))));else if(e.stage==="sending"||e.stage==="waiting"){i.removeAttribute("value");const n=L(T,f.transcriptionSourceId).name;y.show(r,(e.stage==="sending"?t.transcribeSending:t.transcribeWaiting).replace("{name}",n))}else i.max=e.total,i.value=e.done,y.show(r,t.transcribeProgress.replace("{done}",v.clock(Math.round(e.done))).replace("{total}",v.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 i=L(T,f.transcriptionSourceId),s=i.create(),n=this.transcribing=new AbortController;this.transcribeOutcome=void 0,this.showTranscribing(!0),this.showProgress("reading");try{const[{TranscriptionAudio:a},{TranscriptionError:o},{InterviewImport:p}]=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([27,26,7]),import.meta.url)]),d=await fetch(r,{signal:n.signal});if(!d.ok)throw new o("failed",`HTTP ${d.status}`);if(Number(d.headers.get("content-length")??0)>a.MAX_BYTES)throw new o("tooLarge");const c=await d.arrayBuffer();if(c.byteLength>a.MAX_BYTES)throw new o("tooLarge");const l=await a.decode(c).catch(()=>{throw new o("failed",e.loadFailed)}),h=this.drawn?.language??this.language,u=await s.transcribe({samples:l,language:h,signal:n.signal,progress:k=>this.showProgress(k)}),m=[t.interviewOf].flat().filter(k=>typeof k=="string"),b=p.transcribed(u,{by:(t.by??[]).flatMap(k=>"people"in k?[k.people]:[]),witnesses:this.options.filter(k=>m.length===0||m.includes(k.id)).map(({id:k,label:V})=>({id:k,label:V}))});if(!b)throw new o("failed",e.exchangesEmpty);if(n.signal.aborted||this.current!==t)throw new DOMException("Aborted","AbortError");const{anonymization:re,...W}=await this.transcriptJson(t)??{};await this.take({...W,...b,language:h,transcription:{method:"automatic",engine:s.engine,note:`Transcribed in UFO@home by ${s.engine}: whose each voice is was not known, to be attributed, then proofread.`}}),this.transcribeOutcome={text:e.transcribeDone.replace("{engine}",i.name),kind:"info"}}catch(a){const o=a;n.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??a)),kind:"error"}}finally{this.transcribing=void 0,this.showTranscribing(!1),this.renderTranscribe()}}note(e,t="info"){y.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)+`
|
|
294
|
-
`}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 f.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 s of f.SHARED)t[s]===void 0?delete r[s]:r[s]=structuredClone(t[s]);const i=r.speakers;if(typeof i=="object"&&i!==null){const s={...i},n=(a,o,p)=>{p.forEach((d,
|
|
293
|
+
${e.sendSealed.replace("{name}",r)}`:""),attach:e.sendAttach,report:(n,a)=>y.show(i,(n==="shared"?e.sent:n==="prepared"?e.sendPrepared:e.sendFailed).replace("{file}",a).replace("{error}",a),n==="failed"?"error":"info")};this.dispatchEvent(new CustomEvent(Y,{bubbles:!0,composed:!0,detail:s}))}feedObservation(){const e=this.current;e&&this.transcriptJson(e).then(t=>{const r=this.shadow.getElementById("form-fed"),i=s=>y.show(r,s>0?this.messages.fed.replace("{n}",String(s)):this.messages.fedNothing,s>0?"info":"warning");if(!t){i(0);return}this.dispatchEvent(new CustomEvent(X,{bubbles:!0,composed:!0,detail:{event:e,json:t,report:i}}))})}exchangesToken=0;async transcriptJson(e){try{const t=this.fileEditor?.text??this.text;if(t!==void 0)return v.read(JSON.parse(t));const r=this.transcriptUrl(e);if(r!==void 0)return v.read(await I.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 i=f.pretty(f.withEventFields(r,t));this.fileEditor?.replaceText(i,!1),this.onEdited(i),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 i of[r.redacted,...(r.parts??[]).map(s=>"redacted"in s?s.redacted:void 0)]){if(!i)continue;const s=JSON.stringify(i.reason),n=t.get(s);n?n.n++:t.set(s,{reason:i.reason,n:1})}return[...t.values()].sort((r,i)=>i.n-r.n).map(r=>r.reason)}renderRedactReasons(e){const t=this.messages;if(!t)return;const r=this.givenReasons(e).map(n=>this.said.read(n)??"").filter(n=>n!==""),i=t.redactReasons.filter(n=>!r.some(a=>a.toLowerCase().startsWith(n.toLowerCase()))),s=[...new Set([...r,...i])];this.shadow.getElementById("redact-reasons").replaceChildren(...s.map(n=>new Option(n,n)))}speakerLabel(e,t){const r=v.speakerName(e,t),i=e.speakers?.[t]?.role;return i===v.UNATTRIBUTED&&e.speakers[t].title?this.messages.voiceNamed.replace("{name}",r):r===i&&i in this.messages.roles?this.messages.roles[i]:r}renderReview(e){const t=this.shadow.getElementById("review"),r=Object.entries(e?.speakers??{}).filter(([,o])=>o.role!==v.UNATTRIBUTED).map(([o])=>o);if(t.hidden=!e||r.length===0,!e||r.length===0)return;const i=o=>["approved","covered"].includes(e.proofreading?.[o]?.status??""),s=r.filter(o=>!i(o)),n=document.createElement("span");n.textContent=s.length===0?this.messages.proofreadAll:this.messages.proofreadPending.replace("{names}",s.map(o=>this.speakerLabel(e,o)).join(", ")),t.toggleAttribute("data-done",s.length===0);const a=document.createElement("span");a.className="review-boxes";for(const o of r){const p=document.createElement("label"),d=document.createElement("input");d.type="checkbox",d.checked=i(o),d.disabled=this.hasAttribute("readonly"),d.addEventListener("change",()=>void this.editTranscript(h=>{h.proofreading??={},d.checked?h.proofreading[o]={status:"approved",date:new Date().toISOString().slice(0,10)}:h.proofreading[o]={status:"pending"}})),p.append(d,this.messages.reviewedBy.replace("{name}",this.speakerLabel(e,o))),a.append(p)}t.replaceChildren(n,a)}momentsOf(e,t){const r=e.speakers?.[t]?.of??v.sightingsOf(e)[0];return this.options.find(i=>i.id===r)?.moments??this.options.flatMap(i=>i.moments??[])}decorateExchanges(e){if(!e)return;const t=this.messages,r=this.hasAttribute("readonly");for(const i of this.shadow.querySelectorAll("#exchanges .turn[data-segment]")){const s=Number(i.dataset.segment),n=e.segments[s];if(!n)continue;if(n.start!==void 0){const d=document.createElement("button");d.type="button",d.className="turn-time",d.textContent=v.clock(n.start),d.addEventListener("click",()=>this.player?.seek(n.start)),i.prepend(d)}const a=n.redacted?[n.redacted]:b.partsOf(n).flatMap(d=>"redacted"in d?[d.redacted]:[]);i.querySelectorAll(".bar").forEach((d,h)=>{const l=a[h]?.words;d.textContent=l!==void 0?t.redactedWords.replace("{n}",String(l)):t.redacted,d.classList.add("redacted-label");const c=n.redacted?`${s}:all`:`${s}:${h}`;this.takenOut.has(c)&&(d.dataset.restorable=c)});const o=n.redacted?.sealed;o&&this.offerOpening(i,n,o);const p=this.momentsOf(e,n.speaker);i.querySelectorAll(".ref").forEach((d,h)=>{const l=n.refs?.[h];if(!l)return;const c=p.find(m=>Math.abs(m.at-l.at)<.05);if(c){const m=document.createElement("span");m.className="moment-letter",m.textContent=c.label.slice(0,2),d.replaceChildren(m,t.momentLabel.replace("{k}",c.label).replace("{text}",c.note??v.clock(l.at)))}if(r)return;const u=document.createElement("button");u.type="button",u.className="ref-unlink",u.textContent="×",u.title=t.unlinkMoment,u.setAttribute("aria-label",t.unlinkMoment),u.addEventListener("click",()=>void this.editTranscript(m=>{m.segments[s].refs?.splice(h,1),m.segments[s].refs?.length===0&&delete m.segments[s].refs})),d.after(u)}),r||i.append(this.turnTools(e,s,n,p))}}turnTools(e,t,r,i){const s=this.messages,n=document.createElement("div");n.className="turn-tools";const a=(d,h)=>{const l=document.createElement("button");return l.type="button",l.textContent=d,l.addEventListener("click",h),l};if(e.speakers?.[r.speaker]?.role==="witness"&&!r.redacted){const d=a(s.linkMoment,()=>{});n.append(d),new F(d,`moment-menu-${t}`,l=>void this.editTranscript(c=>{const u=c.segments[t].refs??[];u.some(m=>Math.abs(m.at-Number(l))<.05)||u.push({at:Number(l)}),c.segments[t].refs=u}),l=>`moment-${t}-${l}`).setKinds(i.length>0?i.map(l=>({value:String(l.at),label:s.momentLabel.replace("{k}",l.label).replace("{text}",l.note??v.clock(l.at))})):[{value:"",label:s.noMoments,disabledReason:s.noMoments}])}if(r.redacted||n.append(a(s.editTurn,()=>this.editTurn(t))),!r.redacted&&!this.hasAttribute("readonly")){const d=a(s.whoSpeaks,()=>{});n.append(d),new F(d,`speaker-menu-${t}`,l=>void w(async()=>{const{InterviewImport:c}=await import("./interviewImport-ym5iXO4Z.js");return{InterviewImport:c}},__vite__mapDeps([8,7,6]),import.meta.url).then(({InterviewImport:c})=>this.editTranscript(u=>{c.attribute(u,t,l)})),l=>`speaker-${t}-${l}`).setKinds(Object.keys(e.speakers??{}).map(l=>({value:l,label:this.speakerLabel(e,l),...l===r.speaker?{disabledReason:this.speakerLabel(e,l)}:{}})))}const o=this.takenOut.has(`${t}:all`)||[...this.takenOut.keys()].some(d=>d.startsWith(`${t}:`));if(r.redacted||r.parts&&o){const d=a(s.restoreAll,()=>void this.restoreAll(t));d.disabled=!o,n.append(d)}else n.append(a(s.redactAll,()=>void this.editTranscript(d=>{this.forget(t),this.takenOut.set(`${t}:all`,b.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 p=a("",()=>void this.editTranscript(d=>{d.segments.splice(t,1),this.shiftTakenOut(t)}));return p.className="icon-btn",p.innerHTML=x.TRASH,p.title=s.deleteTurn,p.setAttribute("aria-label",s.deleteTurn),n.append(p),n}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,i=this.shadow.getElementById("exchanges");if(!r||r.collapsed||!i.contains(r.startContainer)||!i.contains(r.endContainer))return;const s=l=>l instanceof Element?l:l.parentElement,n=s(r.startContainer)?.closest(".said");if(!n&&!s(r.endContainer)?.closest(".said"))return;const a=n&&s(r.endContainer)?.closest(".said")===n&&!s(r.startContainer)?.closest(".bar")&&!s(r.endContainer)?.closest(".bar"),o=r.getBoundingClientRect();if(!a){this.openRedactPop({kind:"selection",index:-1,from:0,to:0},o,e.selectionOnePassage);return}const p=Number(n.closest(".turn").dataset.segment),d=f.offsetIn(n,r.startContainer,r.startOffset),h=f.offsetIn(n,r.endContainer,r.endOffset);this.openRedactPop({kind:"selection",index:p,from:Math.min(d,h),to:Math.max(d,h)},o),f.markPending(r)}static PENDING="rr0-redact-pending";static markPending(e){const t=globalThis.CSS?.highlights,r=globalThis.Highlight;!t||!r||(e?t.set(f.PENDING,new r(e.cloneRange())):t.delete(f.PENDING))}openBar(e){if(this.hasAttribute("readonly"))return;const t=e.closest(".turn");if(!t)return;const r=Number(t.dataset.segment),i=[...t.querySelectorAll(".bar")].indexOf(e),s=this.drawn?.segments[r];if(!s)return;const n=s.redacted?"all":i,a=`${r}:${n}`;this.openRedactPop({kind:"bar",index:r,nth:n,restorable:this.takenOut.has(a)?a:void 0},e.getBoundingClientRect())}openRedactPop(e,t,r){const i=this.shadow.getElementById("redact-pop"),s=this.field("redact-reason");f.markPending(),this.redactTarget=e;const n=this.shadow.getElementById("redact-take"),a=this.shadow.getElementById("redact-restore");n.hidden=e.kind!=="selection",n.disabled=!!r,a.hidden=e.kind!=="bar"||!e.restorable,s.disabled=!!r,s.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),i.hidden=!1,typeof i.showPopover=="function"&&i.isConnected&&(i.setAttribute("popover","manual"),i.matches(":popover-open")||i.showPopover());const p=i.offsetWidth||320,d=i.offsetHeight||120,h=t.bottom+6+d<=window.innerHeight;i.style.top=`${Math.max(8,h?t.bottom+6:t.top-6-d)}px`,i.style.left=`${Math.max(8,Math.min(t.left,window.innerWidth-p-8))}px`,r||s.focus({preventScroll:!0})}closeRedactPop(){const e=this.shadow.getElementById("redact-pop");this.redactTarget=void 0,f.markPending(),typeof e.hidePopover=="function"&&e.matches?.(":popover-open")&&e.hidePopover(),e.hidden=!0}redactionAt(e,t,r){const i=e?.segments[t];if(i)return r==="all"?i.redacted:b.partsOf(i).flatMap(s=>"redacted"in s?[s.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(i=>{if(e.nth!=="all"){const n=this.redactionAt(i,e.index,e.nth);n&&(n.reason=t);return}const s=JSON.stringify(i.segments[e.index].redacted?.reason);for(let n=e.index;n<i.segments.length;n++){const a=i.segments[n].redacted;if(!a||n>e.index&&JSON.stringify(a.reason)!==s)break;a.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 i=!1;if(await this.editTranscript(s=>{const n=b.redact(s.segments[t.index],t.from,t.to,r);n&&(i=!0,this.shiftParts(t.index,n.nth),this.takenOut.set(`${t.index}:${n.nth}`,n.text))}),!i){const s=this.shadow.getElementById("redact-note");s.textContent=e.selectionOnePassage,s.classList.add("error");return}this.closeRedactPop(),(this.shadow.getSelection?.()??document.getSelection())?.removeAllRanges()}static offsetIn(e,t,r){let i=0;const s=document.createTreeWalker(e,NodeFilter.SHOW_TEXT,{acceptNode:n=>n.parentElement?.closest(".bar")?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT});for(let n=s.nextNode();n;n=s.nextNode()){if(n===t)return i+r;if(t.contains(n)&&t!==n){const o=[...t.childNodes].slice(0,r);return i+o.reduce((p,d)=>p+(d instanceof Element&&d.closest(".bar")?0:(d.textContent??"").length),0)}i+=(n.textContent??"").length}return i}async restore(e){const t=this.takenOut.get(e);if(t===void 0)return;const[r,i]=e.split(":"),s=Number(r);await this.editTranscript(n=>{i==="all"?b.restoreWhole(n.segments[s],t):(b.restorePart(n.segments[s],Number(i),t),this.shiftParts(s,Number(i),-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,i)=>i-r);for(const r of t)await this.restore(`${e}:${r}`)}editTurn(e){const r=this.drawn?.segments[e],i=this.shadow.querySelector(`#exchanges .turn[data-segment="${e}"] .said`);if(!r||!i)return;const s=this.messages,n=document.createElement("div");n.className="turn-edit";const a=document.createElement("textarea");a.value=b.raw(r,l=>this.takenOut.get(`${e}:${l}`));const o=document.createElement("span");o.className="hint",o.textContent=s.turnEditHint;const p=document.createElement("div");p.className="buttons";const d=document.createElement("button");d.type="button",d.className="pill-btn primary",d.textContent=s.saveTurn,d.addEventListener("click",()=>void this.editTranscript(l=>{const c=b.fromRaw(l.segments[e],a.value,this.redactReason);this.forget(e);for(const[u,m]of c)this.takenOut.set(`${e}:${u}`,m)}));const h=document.createElement("button");h.type="button",h.className="pill-btn",h.textContent=s.cancelTurn,h.addEventListener("click",()=>this.drawExchanges(this.drawn)),p.append(d,h),n.append(a,o,p),i.replaceWith(n),a.focus()}forget(e){for(const t of[...this.takenOut.keys()])t.startsWith(`${e}:`)&&this.takenOut.delete(t)}shiftParts(e,t,r=1){const i=[...this.takenOut].filter(([s])=>s.startsWith(`${e}:`)&&s!==`${e}:all`&&Number(s.split(":")[1])>=t+(r<0?1:0));for(const[s]of i)this.takenOut.delete(s);for(const[s,n]of i)this.takenOut.set(`${e}:${Number(s.split(":")[1])+r}`,n)}shiftTakenOut(e){const t=[...this.takenOut];this.takenOut.clear();for(const[r,i]of t){const[s,n]=r.split(":"),a=Number(s);a<e?this.takenOut.set(r,i):a>e&&this.takenOut.set(`${a-1}:${n}`,i)}}markCurrentTurn(e){const t=this.drawn?.segments??[];let r=-1;t.forEach((n,a)=>{n.start!==void 0&&n.start<=e&&(r=a)});for(const n of this.shadow.querySelectorAll("#exchanges .turn.current"))n.classList.remove("current");const i=this.shadow.querySelector(`#exchanges .turn[data-segment="${r}"]`);if(!i)return;i.classList.add("current");const s=i.closest(".rr0-interview-turns");s&&(i.offsetTop<s.scrollTop||i.offsetTop>s.scrollTop+s.clientHeight-i.offsetHeight)&&s.scrollTo({top:i.offsetTop-s.clientHeight/3,behavior:"smooth"})}async revealSegment(e){this.openGroup("exchanges"),await this.showExchanges(),this.shadow.getElementById("exchanges").revealSegment(e)}transcribeOutcome;renderTranscribe(){this.shadow.getElementById("transcribe").hidden=this.hasAttribute("readonly")||!this.transcribing&&!this.player?.recordingUrl();const e=this.messages;if(!e)return;const t=this.shadow.getElementById("transcribe-source");[...t.options].map(d=>d.value).join()!==T.map(d=>d.id).join()&&t.replaceChildren(...T.map(d=>{const h=new Option(d.name,d.id);return h.title=d.credit,h}));const r=L(T,f.transcriptionSourceId);t.value=r.id;const i=this.shadow.getElementById("transcribe-credit");i.href=r.creditUrl,i.textContent=r.credit,this.shadow.getElementById("transcribe-key-row").hidden=!r.keyUrl,this.shadow.getElementById("transcribe-key-get").href=r.keyUrl??"";const s=this.field("transcribe-key");if(s!==this.shadow.activeElement&&(s.value=A.of(r.id)??""),this.transcribing)return;const n=this.player?.recordingUrl();this.renderTranscribeStart();const a=this.shadow.getElementById("transcribe-note");if(this.transcribeOutcome){y.show(a,this.transcribeOutcome.text,this.transcribeOutcome.kind);return}if(!n){y.show(a,e.transcribeNoRecording);return}const o=r.create(),p=[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&&p.push(e.transcribeReplaces),y.show(a,p.join(" "),o.sendsAudio?"warning":"info")}renderTranscribeStart(){if(this.transcribing||!this.messages)return;const e=L(T,f.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"),i=this.shadow.getElementById("transcribe-progress"),s=n=>String(Math.round(n/1e6));if(e==="reading")i.removeAttribute("value"),y.show(r,t.transcribeReading);else if(e.stage==="loading")e.total?(i.max=e.total,i.value=e.loaded,y.show(r,t.transcribeLoading.replace("{loaded}",s(e.loaded)).replace("{total}",s(e.total)))):(i.removeAttribute("value"),y.show(r,t.transcribeLoadingSoFar.replace("{loaded}",s(e.loaded))));else if(e.stage==="sending"||e.stage==="waiting"){i.removeAttribute("value");const n=L(T,f.transcriptionSourceId).name;y.show(r,(e.stage==="sending"?t.transcribeSending:t.transcribeWaiting).replace("{name}",n))}else i.max=e.total,i.value=e.done,y.show(r,t.transcribeProgress.replace("{done}",v.clock(Math.round(e.done))).replace("{total}",v.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 i=L(T,f.transcriptionSourceId),s=i.create(),n=this.transcribing=new AbortController;this.transcribeOutcome=void 0,this.showTranscribing(!0),this.showProgress("reading");try{const[{TranscriptionAudio:a},{TranscriptionError:o},{InterviewImport:p}]=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([8,7,6]),import.meta.url)]),d=await fetch(r,{signal:n.signal});if(!d.ok)throw new o("failed",`HTTP ${d.status}`);if(Number(d.headers.get("content-length")??0)>a.MAX_BYTES)throw new o("tooLarge");const h=await d.arrayBuffer();if(h.byteLength>a.MAX_BYTES)throw new o("tooLarge");const l=await a.decode(h).catch(()=>{throw new o("failed",e.loadFailed)}),c=this.drawn?.language??this.language,u=await s.transcribe({samples:l,language:c,signal:n.signal,progress:k=>this.showProgress(k)}),m=[t.interviewOf].flat().filter(k=>typeof k=="string"),g=p.transcribed(u,{by:(t.by??[]).flatMap(k=>"people"in k?[k.people]:[]),witnesses:this.options.filter(k=>m.length===0||m.includes(k.id)).map(({id:k,label:Q})=>({id:k,label:Q}))});if(!g)throw new o("failed",e.exchangesEmpty);if(n.signal.aborted||this.current!==t)throw new DOMException("Aborted","AbortError");const{anonymization:re,...W}=await this.transcriptJson(t)??{};await this.take({...W,...g,language:c,transcription:{method:"automatic",engine:s.engine,note:`Transcribed in UFO@home by ${s.engine}: whose each voice is was not known, to be attributed, then proofread.`}}),this.transcribeOutcome={text:e.transcribeDone.replace("{engine}",i.name),kind:"info"}}catch(a){const o=a;n.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??a)),kind:"error"}}finally{this.transcribing=void 0,this.showTranscribing(!1),this.renderTranscribe()}}note(e,t="info"){y.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)+`
|
|
294
|
+
`}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 f.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 s of f.SHARED)t[s]===void 0?delete r[s]:r[s]=structuredClone(t[s]);const i=r.speakers;if(typeof i=="object"&&i!==null){const s={...i},n=(a,o,p)=>{p.forEach((d,h)=>{const l=h===0?a:`${a}${h+1}`;s[l]?s[l]={...s[l],[o]:d}:h>0&&(s[l]={role:a,[o]:d})})};n("interviewer","by",t.by??[]),n("witness","of",f.witnessesOf(t.interviewOf)),r.speakers=s}return f.ordered(r)}applyFileToEvent(e,t){const r=this.current;if(!r)return!1;const i=JSON.stringify(f.SHARED.map(a=>r[a])),s=a=>typeof a=="string"||typeof a=="object"&&a!==null&&!Array.isArray(a),n={title:s,summary:s,time:a=>typeof a=="string",medium:a=>typeof a=="string",by:a=>Array.isArray(a),interviewOf:a=>typeof a=="string"||Array.isArray(a)};for(const a of f.SHARED){const o=e[a];o!==void 0&&n[a](o)?r[a]=structuredClone(o):t&&delete r[a]}return JSON.stringify(f.SHARED.map(a=>r[a]))!==i}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 i=f.pretty(f.withEventFields(r,e));i!==t&&(this.text=i,this.fileEditor?.replaceText(i,!1),this.dispatchEvent(new CustomEvent(S,{bubbles:!0,composed:!0,detail:{field:"transcript",event:e,text:i}})))}template(e){return f.pretty(f.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},i]=await Promise.all([w(()=>import("./SightingFileEditor-DS1DRU2p.js"),__vite__mapDeps([9,10,11]),import.meta.url),w(()=>import("./interviewSchema-r5bW7skq.js"),[],import.meta.url),K(this.language)]);return this.fileEditor=new t(this.shadow.getElementById("file-editor"),e,s=>this.onEdited(s),this.messages.editorLabel,{baseline:e,phrases:i.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 i=await I.json(r);this.current===e&&typeof i=="object"&&i!==null&&!Array.isArray(i)?(this.applyFileToEvent(i,!1)&&this.fileChangedEvent(),t=f.pretty(f.withEventFields(i,e))):t=f.pretty(i)}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 i=this.current;if(r&&i&&typeof t=="object"&&t!==null&&!Array.isArray(t)&&this.applyFileToEvent(t,!0)&&this.fileChangedEvent(),i&&!i.url&&e.trim()!==""){const s=i.id??"1";i.url=`${s.startsWith("interview")?s:`interview-${s}`}.json`,this.field("url").value=i.url,this.dispatchEvent(new CustomEvent(S,{bubbles:!0,composed:!0,detail:{field:"url",event:i}}))}this.dispatchEvent(new CustomEvent(S,{bubbles:!0,composed:!0,detail:{field:"transcript",event:i,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=f.pretty(t?f.withEventFields(e,t):e);await this.loadFileEditor(r).then(i=>i.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}const i=this.importHints();if(this.isQuestionnaire(r)){await this.takeQuestionnaire(r??t,e.name);return}if(typeof r!="object"||r===null){const{InterviewImport:s}=await w(async()=>{const{InterviewImport:a}=await import("./interviewImport-ym5iXO4Z.js");return{InterviewImport:a}},__vite__mapDeps([8,7,6]),import.meta.url),n=s.parse(t,i);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")}}importHints(){const e=this.current,t=[e?.interviewOf].flat().filter(r=>typeof r=="string");return{by:(e?.by??[]).map(r=>f.byText([r])).filter(r=>r!==""),witnesses:this.options.filter(r=>t.length===0||t.includes(r.id))}}isQuestionnaire(e){const t=typeof e=="object"&&e!==null&&Array.isArray(e.segments);return this.current?.medium==="questionnaire"&&!t}async takeQuestionnaire(e,t){const[{QuestionnaireImport:r},{QuestionnaireTemplates:i}]=await Promise.all([w(()=>import("./QuestionnaireImport-BlTDOHWj.js"),__vite__mapDeps([12,7,6]),import.meta.url),w(()=>import("./rr0-ufoathome.mjs").then(p=>p.a6),[],import.meta.url)]),n=(this.current?await this.transcriptJson(this.current):void 0)?.questionnaire?.id,a=n?await i.load(n):void 0,o=r.parse(e,this.importHints(),a);if(!o){this.note(this.messages.notAQuestionnaire,"error");return}await this.take({...o,transcription:{method:"manual",note:`Imported from ${t}: one question and its answer per field, as the witness filled it in.`}})}async importFromUrl(e){try{const t=new URL(e,this.base??location.href).href,r=await I.json(t);this.isQuestionnaire(r)?await this.takeQuestionnaire(r,t.split("/").pop()??t):await this.take(r)}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"})),i=document.createElement("a");i.href=r,i.download=t,i.click(),URL.revokeObjectURL(r)}}function Ae(){Z(),V(),customElements.get(H)||customElements.define(H,f)}export{S as INTERVIEW_CHANGE_EVENT,H as INTERVIEW_EDITOR_ELEMENT_NAME,Le as INTERVIEW_SEEK_EVENT,f as InterviewEditorElement,Ae as register};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{S as x,a as T,H as I,s as L,U as S,
|
|
1
|
+
import{S as x,a as T,H as I,s as L,U as S,Y as A,I as b}from"./rr0-ufoathome.mjs";import{I as j}from"./ColumnResize-CO4e1m-q.js";import{InterviewFile as p}from"./interviewJson-D-i14LTf.js";import{P as C}from"./ShareDialogElement-DqCoQwtn.js";import"./SaidPosition-OJEYhVKN.js";import"./GeoProjection-DvqDbRIx.js";import"./Sighting-D-_IYi9n.js";import"./VisualAids-DI-hEL46.js";import"./three.module-CbaHqYFq.js";import"./Decor-Dn-cvniW.js";import"./RecordingIssue-BlWT8Xsu.js";import"./xyzImageryRaster-Dhxs0B26.js";import"./Obstacles-v9SkfBD7.js";const N="rr0-interview",R=`
|
|
2
2
|
rr0-interview { display: block; --rr0-interview-line: color-mix(in srgb, currentColor 35%, transparent); }
|
|
3
3
|
rr0-interview [hidden] { display: none !important; }
|
|
4
4
|
rr0-interview .rr0-interview-status { font-size: .85em; opacity: .85; margin: 0 0 .5em; }
|
|
@@ -32,4 +32,4 @@ rr0-interview .turn .refs { display: flex; flex-wrap: wrap; gap: .25em; }
|
|
|
32
32
|
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;
|
|
33
33
|
padding: 0 .35em; font-variant-numeric: tabular-nums; white-space: nowrap; display: inline-flex; align-items: center; gap: .15em; }
|
|
34
34
|
rr0-interview .turn .ref svg { width: 1.1em; height: 1.1em; }
|
|
35
|
-
`;class k extends HTMLElement{messages;said=new x(["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(){k.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=R,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 T.json(s))}catch{r=void 0}e===this.loadToken&&(this.base=s,this.json=r,this.draw())}async loadLocale(){const t=++this.localeToken,e=I.preferencesFor(this),s=L(e,S),r=await A.load(s);t===this.localeToken&&(this.said=new x(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(j,{bubbles:!0,composed:!0,detail:i}));const a=this.getAttribute("player");if(!a)return;const d=this.getRootNode().getElementById?.(a);typeof d?.seekTo=="function"&&(d.scrollIntoView?.({block:"center",behavior:"smooth"}),d.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(
|
|
35
|
+
`;class k extends HTMLElement{messages;said=new x(["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(){k.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=R,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 T.json(s))}catch{r=void 0}e===this.loadToken&&(this.base=s,this.json=r,this.draw())}async loadLocale(){const t=++this.localeToken,e=I.preferencesFor(this),s=L(e,S),r=await A.load(s);t===this.localeToken&&(this.said=new x(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(j,{bubbles:!0,composed:!0,detail:i}));const a=this.getAttribute("player");if(!a)return;const d=this.getRootNode().getElementById?.(a);typeof d?.seekTo=="function"&&(d.scrollIntoView?.({block:"center",behavior:"smooth"}),d.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(u=>!["approved","covered"].includes(e.proofreading?.[u]?.status??""));this.status.textContent=n.length===0?t.proofreadAll:t.proofreadPending.replace("{names}",n.map(u=>this.speakerName(e,u)).join(", ")),this.status.hidden=!1}else this.status.hidden=!0;const a=[];let o,d=!1,m,v;s.forEach((n,u)=>{const g=n.redacted?JSON.stringify(n.redacted.reason):void 0;if(g!==void 0&&m?.reason===g){this.blocks.set(u,m.block),n.speaker!==v&&(v=void 0);return}const l=document.createElement("div");l.className="turn",l.dataset.segment=String(u);const w=document.createElement("div");w.className="who";const y=document.createElement("span");if(y.textContent=n.redacted?"":this.speakerName(e,n.speaker),n.start!==void 0&&(l.dataset.time=p.clock(n.start,!0)),v!==n.speaker&&(o=document.createElement("div"),o.className="intervention",o.style.setProperty("--speaker-hue",String((Math.max(0,i.indexOf(n.speaker))*67+210)%360)),a.push(o),d=!1),n.redacted||(d&&l.classList.add("goes-on"),d=!0),o.append(l),v=n.speaker,w.append(y),n.redacted){l.classList.add("is-redacted");const c=this.gap(n.redacted.reason,"p");c.className="redacted",m={block:l,reason:g},l.append(w,c)}else{const c=document.createElement("p");if(c.className="said",n.parts){let f="";for(const h of n.parts){const E="redacted"in h?"▮":p.plain(h.text);/[\p{L}\p{N}.,;:!?)»”…▮]$/u.test(f)&&/^[\p{L}\p{N}(«“▮]/u.test(E)&&c.append(" "),"redacted"in h?c.append(this.gap(h.redacted.reason,"span")):c.append(...this.saidNodes(h.text)),f=E}}else c.append(...this.saidNodes(n.text??""));m=void 0,l.append(w,c)}if(n.files?.length&&!n.redacted&&l.append(this.given(n.files)),n.refs?.length){const c=document.createElement("div");c.className="refs";for(const f of n.refs){const h=document.createElement("button");h.type="button",h.className="ref",h.innerHTML=C.PLAY,h.append(p.clock(f.at,!0)),h.addEventListener("click",()=>this.seek(f,n)),c.append(h)}l.append(c)}this.blocks.set(u,l)}),this.turns.replaceChildren(...a)}given(t){const e=document.createElement("div");e.className="files";for(const s of t){const r=b.fileName(s),i=b.shown(s,this.base),a=document.createElement("a");if(a.className="file",a.href=i,a.target="_blank",a.rel="noopener noreferrer",b.isImage(s)){const o=document.createElement("img");o.src=i,o.alt=r,o.loading="lazy",a.title=r,a.append(o)}else{const o=document.createElement("span");o.textContent=r,a.append(o)}e.append(a)}return e}revealAt(t,e){const s=this.json;if(!s)return;const r=p.sightingsOf(s)[0];let i;if(s.segments?.forEach((a,o)=>{for(const d of a.refs??[]){const m=d.sighting??r;e!==void 0&&m!==void 0&&m!==e||d.at>t+.001||(!i||d.at>i.at)&&(i={index:o,at:d.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 a of i.refs??[]){const o=a.sighting??s;t!==void 0&&o!==void 0&&o!==t||r.push({at:a.at,quote:p.said(i)??""})}return r.sort((i,a)=>i.at-a.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 G(){customElements.get(N)||customElements.define(N,k)}export{N as INTERVIEW_ELEMENT_NAME,j as INTERVIEW_SEEK_EVENT,k as InterviewElement,G as register};
|
|
@@ -0,0 +1,3 @@
|
|
|
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; a filled questionnaire (JSON, CSV, text) when the medium is Questionnaire: each field becomes a question and its answer",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).",questionnaireTab:"Questionnaire",questionnaire:{intro:"Fill in the {title}: each answer is kept as the witness's words, and a question left empty stays unanswered.",source:"The questionnaire as {publisher} publishes it",other:"Other questions",required:"Asked of every witness",precise:"precise",imprecise:"imprecise",preciseHint:"Say it in your own words instead: a rough date or time, or one you are not sure of",impreciseHint:"Pick an exact date or time instead",impreciseDate:"e.g. early July 1965, a Saturday, I'm not sure of the day",impreciseTime:"e.g. around 9 pm, shortly after sunset",confidentialSealed:"Confidential: sealed for {name}, who alone can read it; it is in no file in clear.",confidentialSealedBefore:"An answer sealed for {name} has been given already: it cannot be shown again, and writing another replaces it.",confidentialNowhere:"Confidential: this case names no recipient to seal it for, so it is kept in no file.",addFile:"Add:",removeFile:"Take {name} out of the answer",sectionAnswered:"{n}/{total} answered"},feed:"Set in the observation",feedHint:"What the answers say of when, how long, the colour and where it was in the sky is set in the witness's observation, each value citing its answer",send:"Send to {name}",sendHint:"The case, with your answers and the files you gave, goes to {email}: attached by your device's sharing where it can, else saved and a message prepared for you to attach it to.",sendPrepare:"Prepare a message",sendPrepareHint:"The case, with your answers and the files you gave, is shared by your device or saved, and a message prepared for you to address and attach it to.",sendSubject:"Testimony: {title}",sendBody:`Hello,
|
|
2
|
+
|
|
3
|
+
Here is my testimony, filled in with UFO@home: the file {file} holds the {title}, my answers and the files I gave.`,sendSealed:"My confidential answers are sealed in it for {name}, who alone can read them.",sendAttach:"{file} has just been saved: please attach it to this message before sending it.",sent:"Shared by your device.",sendPrepared:"{file} is saved and a message prepared in your mail: attach the file to it before sending it.",sendFailed:"The message could not be prepared: {error}",fed:"{n} values set in the observation, each citing its answer.",fedNothing:"Nothing in the answers the observation can be given yet (date, time, duration, colour, direction, height).",unknownQuestionnaire:"The questionnaire {id} is not known to this page (a case template brings it, or its address): its questions are shown as the interview has them.",noQuestionnaire:"This interview names no questionnaire: its questions are shown as it has them.",notAQuestionnaire:"That file holds no field of a questionnaire (a question and its answer).",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",recordingAddFirst:"Give the file of the recording above first",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)",sealOpen:"Open with {name}",sealOpened:"Confidential, read with {name}: kept in this page only, never written.",sealFailed:"This key does not open this answer: it was sealed for another.",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,3 @@
|
|
|
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; un cuestionario rellenado (JSON, CSV, texto) si el medio es Cuestionario: cada campo pasa a ser una pregunta y su respuesta",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).",questionnaireTab:"Cuestionario",questionnaire:{intro:"Rellene el {title}: cada respuesta se guarda con las palabras del testigo, y una pregunta dejada vacía queda sin respuesta.",source:"El cuestionario tal como lo publica {publisher}",other:"Otras preguntas",required:"Se pregunta a todo testigo",precise:"precisa",imprecise:"imprecisa",preciseHint:"Decirla mejor con sus palabras: una fecha o una hora aproximada, o de la que no está seguro",impreciseHint:"Elegir mejor una fecha o una hora exacta",impreciseDate:"p. ej. a principios de julio de 1965, un sábado, no estoy seguro del día",impreciseTime:"p. ej. hacia las 21 h, poco después de la puesta del sol",confidentialSealed:"Confidencial: sellada para {name}, el único que puede leerla; no figura en claro en ningún archivo.",confidentialSealedBefore:"Ya se dio una respuesta sellada para {name}: no puede volver a mostrarse, y escribir otra la sustituye.",confidentialNowhere:"Confidencial: este caso no nombra ningún destinatario para quien sellarla, así que no se guarda en ningún archivo.",addFile:"Añadir:",removeFile:"Quitar {name} de la respuesta",sectionAnswered:"{n}/{total} respondidas"},feed:"Pasar a la observación",feedHint:"Lo que las respuestas dicen del momento, la duración, el color y la posición en el cielo se pasa a la observación del testigo, cada valor citando su respuesta",send:"Enviar a {name}",sendHint:"El caso, con sus respuestas y los archivos que dio, va a {email}: adjunto mediante la función de compartir de su dispositivo cuando puede, si no guardado y un mensaje preparado para que lo adjunte.",sendPrepare:"Preparar un mensaje",sendPrepareHint:"El caso, con sus respuestas y los archivos que dio, se comparte desde su dispositivo o se guarda, y se prepara un mensaje para que lo dirija y lo adjunte.",sendSubject:"Testimonio: {title}",sendBody:`Hola:
|
|
2
|
+
|
|
3
|
+
Este es mi testimonio, rellenado con UFO@home: el archivo {file} contiene el {title}, mis respuestas y los archivos que adjunté.`,sendSealed:"Mis respuestas confidenciales están selladas en él para {name}, el único que puede leerlas.",sendAttach:"{file} acaba de guardarse: adjúntelo a este mensaje antes de enviarlo.",sent:"Compartido desde su dispositivo.",sendPrepared:"{file} está guardado y hay un mensaje preparado en su correo: adjunte el archivo antes de enviarlo.",sendFailed:"No se pudo preparar el mensaje: {error}",fed:"{n} valores pasados a la observación, cada uno citando su respuesta.",fedNothing:"Nada en las respuestas puede pasarse aún a la observación (fecha, hora, duración, color, dirección, altura).",unknownQuestionnaire:"El cuestionario {id} no lo conoce esta página (lo trae una plantilla de caso, o su dirección): sus preguntas se muestran tal como las tiene la entrevista.",noQuestionnaire:"Esta entrevista no nombra ningún cuestionario: sus preguntas se muestran tal como las tiene.",notAQuestionnaire:"Ese archivo no contiene ningún campo de cuestionario (una pregunta y su respuesta).",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",recordingAddFirst:"Indique primero el archivo de la grabación de arriba",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)",sealOpen:"Abrir con {name}",sealOpened:"Confidencial, leída con {name}: se guarda solo en esta página, nunca se escribe.",sealFailed:"Esta clave no abre esta respuesta: se selló para otra.",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,3 @@
|
|
|
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 ; un questionnaire rempli (JSON, CSV, texte) si le moyen est Questionnaire : chaque champ devient une question et sa réponse",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).",questionnaireTab:"Questionnaire",questionnaire:{intro:"Remplissez le {title} : chaque réponse est gardée dans les mots du témoin, et une question laissée vide reste sans réponse.",source:"Le questionnaire tel que le publie {publisher}",other:"Autres questions",required:"Demandé à tout témoin",precise:"précise",imprecise:"imprécise",preciseHint:"La dire plutôt dans vos mots : une date ou une heure approximative, ou dont vous n'êtes pas sûr",impreciseHint:"Choisir plutôt une date ou une heure exacte",impreciseDate:"ex. début juillet 1965, un samedi, je ne suis pas sûr du jour",impreciseTime:"ex. vers 21 h, peu après le coucher du soleil",confidentialSealed:"Confidentielle : scellée pour {name}, qui seul peut la lire ; elle ne figure en clair dans aucun fichier.",confidentialSealedBefore:"Une réponse scellée pour {name} a déjà été donnée : elle ne peut plus être affichée, et en écrire une autre la remplace.",confidentialNowhere:"Confidentielle : ce dossier ne nomme aucun destinataire pour qui la sceller, elle n'est donc gardée dans aucun fichier.",addFile:"Ajouter :",removeFile:"Retirer {name} de la réponse",sectionAnswered:"{n}/{total} répondues"},feed:"Reporter dans l'observation",feedHint:"Ce que les réponses disent du moment, de la durée, de la couleur et de la position dans le ciel est reporté dans l'observation du témoin, chaque valeur citant sa réponse",send:"Envoyer à {name}",sendHint:"Le dossier, avec vos réponses et les fichiers que vous avez donnés, part à {email} : joint par le partage de votre appareil quand il le peut, sinon enregistré et un message préparé pour que vous l'y joigniez.",sendPrepare:"Préparer un message",sendPrepareHint:"Le dossier, avec vos réponses et les fichiers que vous avez donnés, est partagé par votre appareil ou enregistré, et un message préparé pour que vous l'adressiez et l'y joigniez.",sendSubject:"Témoignage : {title}",sendBody:`Bonjour,
|
|
2
|
+
|
|
3
|
+
Voici mon témoignage, rempli avec UFO@home : le fichier {file} contient le {title}, mes réponses et les fichiers que j'ai joints.`,sendSealed:"Mes réponses confidentielles y sont scellées pour {name}, qui seul peut les lire.",sendAttach:"{file} vient d'être enregistré : joignez-le à ce message avant de l'envoyer.",sent:"Partagé par votre appareil.",sendPrepared:"{file} est enregistré et un message est préparé dans votre messagerie : joignez-y ce fichier avant de l'envoyer.",sendFailed:"Le message n'a pas pu être préparé : {error}",fed:"{n} valeurs reportées dans l'observation, chacune citant sa réponse.",fedNothing:"Rien dans les réponses ne peut encore être reporté dans l'observation (date, heure, durée, couleur, direction, hauteur).",unknownQuestionnaire:"Le questionnaire {id} n'est pas connu de cette page (un modèle de dossier l'apporte, ou son adresse) : ses questions sont montrées telles que l'interview les a.",noQuestionnaire:"Cette interview ne nomme aucun questionnaire : ses questions sont montrées telles qu'elle les a.",notAQuestionnaire:"Ce fichier ne contient aucun champ de questionnaire (une question et sa réponse).",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",recordingAddFirst:"Donnez d'abord le fichier de l'enregistrement ci-dessus",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)",sealOpen:"Ouvrir avec {name}",sealOpened:"Confidentielle, lue avec {name} : gardée dans cette page seulement, jamais écrite.",sealFailed:"Cette clé n'ouvre pas cette réponse : elle a été scellée pour une autre.",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,3 @@
|
|
|
1
|
+
const e={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; un questionario compilato (JSON, CSV, testo) se il mezzo è Questionario: ogni campo diventa una domanda e la sua risposta",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).",questionnaireTab:"Questionario",questionnaire:{intro:"Compili il {title}: ogni risposta è conservata con le parole del testimone, e una domanda lasciata vuota resta senza risposta.",source:"Il questionario come lo pubblica {publisher}",other:"Altre domande",required:"Chiesto a ogni testimone",precise:"precisa",imprecise:"imprecisa",preciseHint:"Dirla piuttosto con parole sue: una data o un'ora approssimativa, o di cui non è sicuro",impreciseHint:"Scegliere piuttosto una data o un'ora esatta",impreciseDate:"es. inizio luglio 1965, un sabato, non sono sicuro del giorno",impreciseTime:"es. verso le 21, poco dopo il tramonto",confidentialSealed:"Riservata: sigillata per {name}, l'unico che può leggerla; non compare in chiaro in nessun file.",confidentialSealedBefore:"Una risposta sigillata per {name} è già stata data: non può più essere mostrata, e scriverne un'altra la sostituisce.",confidentialNowhere:"Riservata: questo caso non nomina alcun destinatario per cui sigillarla, quindi non è conservata in nessun file.",addFile:"Aggiungere:",removeFile:"Togliere {name} dalla risposta",sectionAnswered:"{n}/{total} con risposta"},feed:"Riporta nell'osservazione",feedHint:"Ciò che le risposte dicono del momento, della durata, del colore e della posizione nel cielo è riportato nell'osservazione del testimone, ogni valore citando la sua risposta",send:"Inviare a {name}",sendHint:"Il caso, con le sue risposte e i file forniti, va a {email}: allegato tramite la condivisione del dispositivo quando possibile, altrimenti salvato e un messaggio preparato perché lo alleghi.",sendPrepare:"Preparare un messaggio",sendPrepareHint:"Il caso, con le sue risposte e i file forniti, è condiviso dal dispositivo o salvato, e un messaggio è preparato perché lo indirizzi e lo alleghi.",sendSubject:"Testimonianza: {title}",sendBody:`Buongiorno,
|
|
2
|
+
|
|
3
|
+
ecco la mia testimonianza, compilata con UFO@home: il file {file} contiene il {title}, le mie risposte e i file che ho allegato.`,sendSealed:"Le mie risposte riservate vi sono sigillate per {name}, l'unico che può leggerle.",sendAttach:"{file} è appena stato salvato: lo alleghi a questo messaggio prima di inviarlo.",sent:"Condiviso dal dispositivo.",sendPrepared:"{file} è salvato e un messaggio è pronto nella sua posta: alleghi il file prima di inviarlo.",sendFailed:"Non è stato possibile preparare il messaggio: {error}",fed:"{n} valori riportati nell'osservazione, ciascuno citando la sua risposta.",fedNothing:"Nulla nelle risposte può ancora essere riportato nell'osservazione (data, ora, durata, colore, direzione, altezza).",unknownQuestionnaire:"Il questionario {id} non è noto a questa pagina (lo porta un modello di caso, o il suo indirizzo): le sue domande sono mostrate come le ha l'intervista.",noQuestionnaire:"Questa intervista non nomina alcun questionario: le sue domande sono mostrate come le ha.",notAQuestionnaire:"Quel file non contiene alcun campo di questionario (una domanda e la sua risposta).",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",recordingAddFirst:"Indichi prima il file della registrazione qui sopra",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",sealOpen:"Aprire con {name}",sealOpened:"Riservata, letta con {name}: conservata solo in questa pagina, mai scritta.",sealFailed:"Questa chiave non apre questa risposta: è stata sigillata per un'altra.",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{e as interviewMessages_it};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{G as s}from"./GeographicFigures-
|
|
1
|
+
import{G as s}from"./GeographicFigures-DrlbDt4f.js";import"./Sighting-D-_IYi9n.js";import"./VisualAids-DI-hEL46.js";import"./rr0-ufoathome.mjs";import"./SaidPosition-OJEYhVKN.js";import"./GeoProjection-DvqDbRIx.js";import"./ShareDialogElement-DqCoQwtn.js";import"./three.module-CbaHqYFq.js";import"./Decor-Dn-cvniW.js";import"./RecordingIssue-BlWT8Xsu.js";import"./xyzImageryRaster-Dhxs0B26.js";import"./Obstacles-v9SkfBD7.js";class t{static GROUPS=["observer","sight-line","body","trace"];static of(o,e,i,l){const n=s.of(o,i,l),c=t.GROUPS.map(r=>n.filter(a=>a.group===r)).filter(r=>r.length>0).map(r=>t.folder(r[0].groupName,r.map(a=>t.placemark(a))));return`<?xml version="1.0" encoding="UTF-8"?>
|
|
2
2
|
<kml xmlns="http://www.opengis.net/kml/2.2">
|
|
3
3
|
<Document>
|
|
4
4
|
<name>${t.xml(s.fill(i.document,{name:e}))}</name>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{M as u,_ as h,
|
|
1
|
+
import{M as u,_ as h,q as g,t as f}from"./rr0-ufoathome.mjs";import{b as p,P as y}from"./SaidPosition-OJEYhVKN.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-D-_IYi9n.js";import{P as A,a as E,E as v}from"./ParameterForm-XbqxCLRn.js";import"./GeoProjection-DvqDbRIx.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
2
|
.lantern-editor-part, .lantern-editor-part #lantern-list, .lantern-editor-part .launch-fields { flex-basis: 100%; min-width: 0; }
|
|
3
3
|
.lantern-editor-part .launch-editor, .lantern-editor-part .launch-fields { display: flex; flex-wrap: wrap; gap: 12px; align-items: end; }
|
|
4
4
|
.lantern-editor-part [hidden] { display: none !important; }
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{t as O,b8 as D,b9 as y}from"./ShareDialogElement-DqCoQwtn.js";class l{static DEFAULT_DIVERGENCE_MRAD=.1;static DEFAULT_APERTURE_M=.01;static AEROSOL_SINGLE_SCATTERING_ALBEDO=.9;static AEROSOL_ASYMMETRY=.7;static DEFAULT_PATCHINESS=.35;static PATCH_M=120;static STEP_M=25;static MAX_SAMPLES=2e3;static viewsAt(n,o,t,s){return l.onAt(n,o).map(c=>l.viewOf(c,t,s))}static viewOf(n,o,t){return{id:n.id,wavelengthNm:n.wavelengthNm,patchiness:n.patchiness??l.DEFAULT_PATCHINESS,samples:l.samplesOf(n,o,t)}}static onAt(n,o){return n.filter(t=>(t.fromT===void 0||o>=t.fromT)&&(t.untilT===void 0||o<=t.untilT)).map(t=>l.stateAt(t,o)).filter(t=>t.path.length>=2)}static stateAt(n,o){if(!n.light?.length&&!n.moves?.length)return n;const t={...n};if(n.light?.length){const s=l.joined(n.light.filter(e=>e.wavelengthNm!==void 0),o,e=>e.wavelengthNm),c=l.joined(n.light.filter(e=>e.powerW!==void 0),o,e=>e.powerW);s!==void 0&&(t.wavelengthNm=s),c!==void 0&&(t.powerW=c)}return n.moves?.length&&(t.path=l.pathAt(n.moves,o)),t}static joined(n,o,t){if(n.length===0)return;const s=[...n].sort((a,i)=>a.t-i.t);if(o<=s[0].t)return t(s[0]);const c=s[s.length-1];if(o>=c.t)return t(c);const e=s.findIndex(a=>a.t>o),r=s[e-1],h=s[e],M=(o-r.t)/(h.t-r.t);return t(r)+(t(h)-t(r))*M}static pathAt(n,o){const t=[...n].sort((a,i)=>a.t-i.t);if(o<=t[0].t)return t[0].path;const s=t[t.length-1];if(o>=s.t)return s.path;const c=t.findIndex(a=>a.t>o),e=t[c-1],r=t[c];if(e.path.length!==r.path.length)return e.path;const h=(o-e.t)/(r.t-e.t),M=(a,i)=>a+(i-a)*h;return e.path.map((a,i)=>({lat:M(a.lat,r.path[i].lat),lng:M(a.lng,r.path[i].lng),altitudeM:M(a.altitudeM,r.path[i].altitudeM)}))}static patchAt(n,o,t){if(t.patchiness<=0)return 1;const s=o/1e3,c=(r,h)=>{const M=(n-t.windAlongMS*s)/r,a=(Math.abs(t.windAcrossMS)+.3)*s/r+h;return l.valueNoise(M,a)},e=(2*c(l.PATCH_M,0)+c(l.PATCH_M/3,17.3))/3;return 1+t.patchiness*(2*e-1)}static valueNoise(n,o){const t=Math.floor(n),s=Math.floor(o),c=n-t,e=o-s,r=i=>i*i*(3-2*i),h=(i,g)=>{const v=Math.sin(i*127.1+g*311.7)*43758.5453;return v-Math.floor(v)},M=h(t,s)+(h(t+1,s)-h(t,s))*r(c),a=h(t,s+1)+(h(t+1,s+1)-h(t,s+1))*r(c);return M+(a-M)*r(e)}static samplesOf(n,o,t){const s=O.ecef({lat:o.lat,lng:o.lng,heightM:0}),c=o.lat*Math.PI/180,e=o.lng*Math.PI/180,r=u=>{const p=u[0]-s[0],A=u[1]-s[1],f=u[2]-s[2];return[-Math.sin(e)*p+Math.cos(e)*A,-Math.sin(c)*Math.cos(e)*p-Math.sin(c)*Math.sin(e)*A+Math.cos(c)*f,Math.cos(c)*Math.cos(e)*p+Math.cos(c)*Math.sin(e)*A+Math.sin(c)*f]},h=(n.divergenceMrad??l.DEFAULT_DIVERGENCE_MRAD)/1e3,M=n.apertureM??l.DEFAULT_APERTURE_M,a=[];let i=0,g=n.powerW,v=0;for(let u=0;u+1<n.path.length;u++){const p=n.path[u],A=n.path[u+1],f=O.ecef({lat:p.lat,lng:p.lng,heightM:p.altitudeM}),w=O.ecef({lat:A.lat,lng:A.lng,heightM:A.altitudeM}),d=Math.hypot(w[0]-f[0],w[1]-f[1],w[2]-f[2]),[C,S]=(()=>{const[E,R]=r(f),[N,T]=r(w);return[(N-E)/(d||1),(T-R)/(d||1)]})(),I=Math.max(1,Math.min(l.MAX_SAMPLES,Math.ceil(d/l.STEP_M)));for(let E=u===0?0:1;E<=I;E++){const R=E/I,N=[0,1,2].map(P=>f[P]+(w[P]-f[P])*R),T=R*d,x=p.altitudeM+(A.altitudeM-p.altitudeM)*R+l.bulgeM(T,d);if(E>0){const P=a[a.length-1],W=T+i-P.fromSourceM,H=l.extinctionAt(t,n.wavelengthNm,(P.altitudeM+x)/2);v+=H*W,g=n.powerW*Math.exp(-v)}const[U,F,G]=r(N);a.push({eastM:U,northM:F,upM:G,altitudeM:x,fromSourceM:i+T,dirEast:C,dirNorth:S,widthM:M+h*(i+T),powerW:g})}i+=d}return a}static bulgeM(n,o){return n*(o-n)/(2*6371e3)}static extinctionAt(n,o,t){const{rayleighPerM:s,aerosolPerM:c}=l.coefficientsAt(n,o,t);return s+c}static coefficientsAt(n,o,t){const s=D.rayleighAt(o)*D.rayleighDensity(t),c=n.aerosol[1]*(o/550)**-1.3*D.aerosolDensity(t);return{rayleighPerM:s,aerosolPerM:c}}static phasedScattering(n,o){const t=3/(16*Math.PI)*(1+o*o),s=l.AEROSOL_ASYMMETRY,c=(1-s*s)/(4*Math.PI*(1+s*s-2*s*o)**1.5);return n.rayleighPerM*t+n.aerosolPerM*l.AEROSOL_SINGLE_SCATTERING_ALBEDO*c}static efficacy(n){return 683*Math.max(0,y.colourMatching(n)[1])}static colourOf(n){const[o,t,s]=y.colourMatching(n);if(t<=0)return[0,0,0];const c=y.linearSrgbOf([o/t,1,s/t]).map(r=>Math.max(0,r)),e=.2126*c[0]+.7152*c[1]+.0722*c[2];return c.map(r=>r/e)}static luminanceCdM2(n,o,t,s,c){return l.efficacy(o)*n*t/(s*Math.max(c,.001))}}export{l as L};
|