@rr0/ufoathome 0.165.0 → 0.166.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-BNau2xU8.js +1 -0
- package/dist-embed-interview/rr0-interview.mjs +6 -6
- package/dist-embed-scene/{AdsbLolArchiveProvider-Cea0LAnZ.js → AdsbLolArchiveProvider-C5EeYhpl.js} +1 -1
- package/dist-embed-scene/BeamEditor-ClooLylg.js +30 -0
- package/dist-embed-scene/BeamKindMessages_en-5RezNkyz.js +1 -0
- package/dist-embed-scene/BeamKindMessages_es-B5vSWVjK.js +1 -0
- package/dist-embed-scene/BeamKindMessages_fr--28-36OI.js +1 -0
- package/dist-embed-scene/BeamKindMessages_it-X53Fuf2U.js +1 -0
- package/dist-embed-scene/BeamParameterTexts_en-DZB75ouZ.js +1 -0
- package/dist-embed-scene/BeamParameterTexts_es-AeZmsufG.js +1 -0
- package/dist-embed-scene/BeamParameterTexts_fr-BHG3fW40.js +1 -0
- package/dist-embed-scene/BeamParameterTexts_it-CPwmQX-g.js +1 -0
- package/dist-embed-scene/{BeamSystem-B80EaJKx.js → BeamSystem-PF6irYQf.js} +1 -1
- package/dist-embed-scene/FlareKindMessages_en-BroHgiwr.js +1 -0
- package/dist-embed-scene/FlareKindMessages_es-SraQyQ3Y.js +1 -0
- package/dist-embed-scene/FlareKindMessages_fr-Dy5SlSna.js +1 -0
- package/dist-embed-scene/FlareKindMessages_it-CF39wmrC.js +1 -0
- package/dist-embed-scene/{GLTFLoader-YecOnQON.js → GLTFLoader-DB2upivM.js} +1 -1
- package/dist-embed-scene/LanternEditor-DWhJGaQW.js +9 -0
- package/dist-embed-scene/LanternKindMessages_en-fUfoRYC0.js +1 -0
- package/dist-embed-scene/LanternKindMessages_es-Chyc607D.js +1 -0
- package/dist-embed-scene/LanternKindMessages_fr-CDem7PTY.js +1 -0
- package/dist-embed-scene/LanternKindMessages_it-yOojym1u.js +1 -0
- package/dist-embed-scene/LanternParameterTexts_en-CcnGd8UH.js +1 -0
- package/dist-embed-scene/LanternParameterTexts_es-CUTgNutZ.js +1 -0
- package/dist-embed-scene/LanternParameterTexts_fr-P2JwYOUy.js +1 -0
- package/dist-embed-scene/LanternParameterTexts_it-CzNnIUrX.js +1 -0
- package/dist-embed-scene/{LaserBeam-DXzWB-xk.js → LaserBeam-DXZysEYv.js} +1 -1
- package/dist-embed-scene/LaunchEditor-DQ-F25le.js +22 -0
- package/dist-embed-scene/LaunchKindMessages_en-Batvnyw3.js +1 -0
- package/dist-embed-scene/LaunchKindMessages_es-KYyQ9gbu.js +1 -0
- package/dist-embed-scene/LaunchKindMessages_fr-CoojboIk.js +1 -0
- package/dist-embed-scene/LaunchKindMessages_it-9HA3cjgP.js +1 -0
- package/dist-embed-scene/LaunchParameterTexts_en-DvrCwbDM.js +1 -0
- package/dist-embed-scene/LaunchParameterTexts_es--RUAegVp.js +1 -0
- package/dist-embed-scene/LaunchParameterTexts_fr-Bh_1zVzy.js +1 -0
- package/dist-embed-scene/LaunchParameterTexts_it-CWDx9nJy.js +1 -0
- package/dist-embed-scene/{LaunchPlume-DwOSrKP_.js → LaunchPlume-lH1zITP-.js} +1 -1
- package/dist-embed-scene/{LaunchSimulation-ClGdZJHr.js → LaunchSimulation-BrDxk8DW.js} +1 -1
- package/dist-embed-scene/{ModuleSession-DAQNvnRi.js → ModuleSession-fhQ2P9LG.js} +2 -2
- package/dist-embed-scene/ModuleThree-Du7Omkv6.js +1 -0
- package/dist-embed-scene/{ParameterForm-D0GvLmqx.js → ParameterForm-BNfKnqZ4.js} +14 -14
- package/dist-embed-scene/PerceptionMessages_en-B2O6DR64.js +1 -0
- package/dist-embed-scene/PerceptionMessages_es-BmkP6OqD.js +1 -0
- package/dist-embed-scene/PerceptionMessages_fr-B59TnGBC.js +1 -0
- package/dist-embed-scene/PerceptionMessages_it-DPlxRmxu.js +1 -0
- package/dist-embed-scene/ReentryEditor-IDlX4mtf.js +27 -0
- package/dist-embed-scene/ReentryKindMessages_en-Cbgk3paQ.js +1 -0
- package/dist-embed-scene/ReentryKindMessages_es-DwgJQanC.js +1 -0
- package/dist-embed-scene/ReentryKindMessages_fr-D9r9x2bK.js +1 -0
- package/dist-embed-scene/ReentryKindMessages_it-DQ-J5YpD.js +1 -0
- package/dist-embed-scene/ReentryParameterTexts_en-BH1tGP5C.js +1 -0
- package/dist-embed-scene/ReentryParameterTexts_es-BDMJ4K1g.js +1 -0
- package/dist-embed-scene/ReentryParameterTexts_fr-C8ROK57p.js +1 -0
- package/dist-embed-scene/ReentryParameterTexts_it-CwC8vNTI.js +1 -0
- package/dist-embed-scene/{ReentrySimulation-rnJU2x1Y.js → ReentrySimulation-BHQBGIr_.js} +1 -1
- package/dist-embed-scene/SceneNames_en-MuZS0swp.js +1 -0
- package/dist-embed-scene/SceneNames_es-DuwAjd1R.js +1 -0
- package/dist-embed-scene/SceneNames_fr-ChDjaMY9.js +1 -0
- package/dist-embed-scene/SceneNames_it-CWzCQiEh.js +1 -0
- package/{dist-embed-sighting/TimelineTracks-C7uTt9N5.js → dist-embed-scene/TimelineTracks-C02lbugN.js} +1 -1
- package/dist-embed-scene/UfoMessages_en-BbYI-msn.js +1 -0
- package/dist-embed-scene/UfoMessages_es-DreLXcIR.js +1 -0
- package/dist-embed-scene/UfoMessages_fr-D9BCRY2m.js +1 -0
- package/dist-embed-scene/UfoMessages_it-C8r0jnJP.js +1 -0
- package/dist-embed-scene/rr0-scene.mjs +310 -310
- package/dist-embed-scene/{trafficRuntime-C3sA3Jg_.js → trafficRuntime-CdAJY70O.js} +2 -2
- package/dist-embed-sighting/{AdsbLolArchiveProvider-BGg8e-TS.js → AdsbLolArchiveProvider-Dfc5WtsT.js} +1 -1
- package/dist-embed-sighting/{BallesterGuaspAssessor-DHpHbF6s.js → BallesterGuaspAssessor-VMcyGlQb.js} +1 -1
- package/dist-embed-sighting/BeamEditor-Dvqs7sme.js +30 -0
- package/dist-embed-sighting/BeamKindMessages_en-5RezNkyz.js +1 -0
- package/dist-embed-sighting/BeamKindMessages_es-B5vSWVjK.js +1 -0
- package/dist-embed-sighting/BeamKindMessages_fr--28-36OI.js +1 -0
- package/dist-embed-sighting/BeamKindMessages_it-X53Fuf2U.js +1 -0
- package/dist-embed-sighting/BeamParameterTexts_en-DZB75ouZ.js +1 -0
- package/dist-embed-sighting/BeamParameterTexts_es-AeZmsufG.js +1 -0
- package/dist-embed-sighting/BeamParameterTexts_fr-BHG3fW40.js +1 -0
- package/dist-embed-sighting/BeamParameterTexts_it-CPwmQX-g.js +1 -0
- package/dist-embed-sighting/BeamSystem-BSO1d2Na.js +1 -0
- package/dist-embed-sighting/ContrailSystem-Bgre4cLs.js +1 -0
- package/dist-embed-sighting/FlareKindMessages_en-BroHgiwr.js +1 -0
- package/dist-embed-sighting/FlareKindMessages_es-SraQyQ3Y.js +1 -0
- package/dist-embed-sighting/FlareKindMessages_fr-Dy5SlSna.js +1 -0
- package/dist-embed-sighting/FlareKindMessages_it-CF39wmrC.js +1 -0
- package/dist-embed-sighting/GLTFLoader-BkhEomyw.js +1 -0
- package/dist-embed-sighting/{HeadlightSystem-CXPE3feA.js → HeadlightSystem-CmppP6Mm.js} +1 -1
- package/dist-embed-sighting/HynekAssessor-tNpli5GC.js +1 -0
- package/dist-embed-sighting/LanternEditor-DRmWNbXO.js +9 -0
- package/dist-embed-sighting/LanternKindMessages_en-fUfoRYC0.js +1 -0
- package/dist-embed-sighting/LanternKindMessages_es-Chyc607D.js +1 -0
- package/dist-embed-sighting/LanternKindMessages_fr-CDem7PTY.js +1 -0
- package/dist-embed-sighting/LanternKindMessages_it-yOojym1u.js +1 -0
- package/dist-embed-sighting/LanternParameterTexts_en-CcnGd8UH.js +1 -0
- package/dist-embed-sighting/LanternParameterTexts_es-CUTgNutZ.js +1 -0
- package/dist-embed-sighting/LanternParameterTexts_fr-P2JwYOUy.js +1 -0
- package/dist-embed-sighting/LanternParameterTexts_it-CzNnIUrX.js +1 -0
- package/dist-embed-sighting/{LaserBeam-CovzRtac.js → LaserBeam-CT0D5uXQ.js} +1 -1
- package/dist-embed-sighting/LaunchEditor-BWm07eFT.js +22 -0
- package/dist-embed-sighting/LaunchKindMessages_en-Batvnyw3.js +1 -0
- package/dist-embed-sighting/LaunchKindMessages_es-KYyQ9gbu.js +1 -0
- package/dist-embed-sighting/LaunchKindMessages_fr-CoojboIk.js +1 -0
- package/dist-embed-sighting/LaunchKindMessages_it-9HA3cjgP.js +1 -0
- package/dist-embed-sighting/LaunchParameterTexts_en-DvrCwbDM.js +1 -0
- package/dist-embed-sighting/LaunchParameterTexts_es--RUAegVp.js +1 -0
- package/dist-embed-sighting/LaunchParameterTexts_fr-Bh_1zVzy.js +1 -0
- package/dist-embed-sighting/LaunchParameterTexts_it-CWDx9nJy.js +1 -0
- package/dist-embed-sighting/{LaunchSimulation-C0cSHpLE.js → LaunchSimulation-otlua1RW.js} +1 -1
- package/dist-embed-sighting/{ModuleSession-CRVX-5Br.js → ModuleSession-BfP999ya.js} +2 -2
- package/dist-embed-sighting/ModuleThree-ColxHy_y.js +1 -0
- package/dist-embed-sighting/{NearestApproach-BOWntoKZ.js → NearestApproach-hO2JFAfU.js} +1 -1
- package/dist-embed-sighting/{ParameterForm-BMfViRUv.js → ParameterForm-DxN0Nf1y.js} +1 -1
- package/dist-embed-sighting/PerceptionMessages_en-B2O6DR64.js +1 -0
- package/dist-embed-sighting/PerceptionMessages_es-BmkP6OqD.js +1 -0
- package/dist-embed-sighting/PerceptionMessages_fr-B59TnGBC.js +1 -0
- package/dist-embed-sighting/PerceptionMessages_it-DPlxRmxu.js +1 -0
- package/dist-embed-sighting/{PoherAssessor-CM7oCyEk.js → PoherAssessor-CxcKyCRu.js} +1 -1
- package/dist-embed-sighting/{RailwaySystem-D8yJRUc8.js → RailwaySystem-C920HhY6.js} +1 -1
- package/dist-embed-sighting/ReentryEditor-DXrar7b7.js +27 -0
- package/dist-embed-sighting/ReentryKindMessages_en-Cbgk3paQ.js +1 -0
- package/dist-embed-sighting/ReentryKindMessages_es-DwgJQanC.js +1 -0
- package/dist-embed-sighting/ReentryKindMessages_fr-D9r9x2bK.js +1 -0
- package/dist-embed-sighting/ReentryKindMessages_it-DQ-J5YpD.js +1 -0
- package/dist-embed-sighting/ReentryParameterTexts_en-BH1tGP5C.js +1 -0
- package/dist-embed-sighting/ReentryParameterTexts_es-BDMJ4K1g.js +1 -0
- package/dist-embed-sighting/ReentryParameterTexts_fr-C8ROK57p.js +1 -0
- package/dist-embed-sighting/ReentryParameterTexts_it-CwC8vNTI.js +1 -0
- package/dist-embed-sighting/ReentrySimulation-BtiVr8cY.js +1 -0
- package/dist-embed-sighting/ReferenceSystem-90M3kYiP.js +1 -0
- package/dist-embed-sighting/{RoadMarkings-BC76NPX4.js → RoadMarkings-DDNrriGo.js} +1 -1
- package/dist-embed-sighting/SceneNames_en-CryY5Edh.js +1 -0
- package/dist-embed-sighting/SceneNames_es-StyJlKmE.js +1 -0
- package/dist-embed-sighting/SceneNames_fr-B3c9bWLO.js +1 -0
- package/dist-embed-sighting/SceneNames_it--6HUBaRO.js +1 -0
- package/dist-embed-sighting/ShareMessages_en-DE1WoeWH.js +1 -0
- package/dist-embed-sighting/SightingMessages_en-C6mh8cZI.js +1 -0
- package/{dist-embed-scene/TimelineTracks-Bv2FX3_W.js → dist-embed-sighting/TimelineTracks-B1dXX0uV.js} +1 -1
- package/dist-embed-sighting/{TraceSystem-Cd2FqhcV.js → TraceSystem-BrpqiAAJ.js} +2 -2
- package/dist-embed-sighting/UfoMessages_en-Bau9u8Mz.js +1 -0
- package/dist-embed-sighting/UfoMessages_es-DreLXcIR.js +1 -0
- package/dist-embed-sighting/UfoMessages_fr-D9BCRY2m.js +1 -0
- package/dist-embed-sighting/UfoMessages_it-C8r0jnJP.js +1 -0
- package/dist-embed-sighting/{WaterSystem-S81tdPno.js → WaterSystem-D3andNtL.js} +1 -1
- package/dist-embed-sighting/rr0-sighting.mjs +358 -358
- package/dist-embed-sighting/{trafficRuntime-DL5Zul8z.js → trafficRuntime-dT3zw02J.js} +2 -2
- package/dist-embed-sighting-editor/AdsbLolArchiveProvider-DS9ev-HU.js +1 -0
- package/dist-embed-sighting-editor/{BallesterGuaspAssessor-CRfTg7iA.js → BallesterGuaspAssessor-Db5otqP1.js} +1 -1
- package/dist-embed-sighting-editor/BeamEditor-DsOf0VRe.js +30 -0
- package/dist-embed-sighting-editor/BeamKindMessages_en-5RezNkyz.js +1 -0
- package/dist-embed-sighting-editor/BeamKindMessages_es-B5vSWVjK.js +1 -0
- package/dist-embed-sighting-editor/BeamKindMessages_fr--28-36OI.js +1 -0
- package/dist-embed-sighting-editor/BeamKindMessages_it-X53Fuf2U.js +1 -0
- package/dist-embed-sighting-editor/BeamParameterTexts_en-DZB75ouZ.js +1 -0
- package/dist-embed-sighting-editor/BeamParameterTexts_es-AeZmsufG.js +1 -0
- package/dist-embed-sighting-editor/BeamParameterTexts_fr-BHG3fW40.js +1 -0
- package/dist-embed-sighting-editor/BeamParameterTexts_it-CPwmQX-g.js +1 -0
- package/dist-embed-sighting-editor/{BeamSystem-BQbLn-3t.js → BeamSystem-D5tLjXtH.js} +1 -1
- package/dist-embed-sighting-editor/BodyEditor-CamqX5Xg.js +28 -0
- package/dist-embed-sighting-editor/BodyParameterTexts_en-CKiFdpaz.js +1 -0
- package/dist-embed-sighting-editor/BodyParameterTexts_es-DT9XO1Hc.js +1 -0
- package/dist-embed-sighting-editor/BodyParameterTexts_fr-B5jLsE0g.js +1 -0
- package/dist-embed-sighting-editor/BodyParameterTexts_it-iyJGx4Ta.js +1 -0
- package/dist-embed-sighting-editor/CaseEditorMessages_en-BONSJaQA.js +1 -0
- package/dist-embed-sighting-editor/ClaudeNarrativeTexts_en-CBLJZ7b6.js +1 -0
- package/dist-embed-sighting-editor/CloudEditorMessages_en-SmcRKW1O.js +1 -0
- package/dist-embed-sighting-editor/CloudParameterTexts_en-NIa0gfgA.js +1 -0
- package/dist-embed-sighting-editor/CloudParameterTexts_es-DXu4T30p.js +1 -0
- package/dist-embed-sighting-editor/CloudParameterTexts_fr-Bv-jc2dq.js +1 -0
- package/dist-embed-sighting-editor/CloudParameterTexts_it-C3RrkRwI.js +1 -0
- package/dist-embed-sighting-editor/{ContrailSystem-BQXLg_WA.js → ContrailSystem-rUmDVijn.js} +1 -1
- package/dist-embed-sighting-editor/{CoverageAssessor-D3HBwZuC.js → CoverageAssessor-cODG-YV9.js} +1 -1
- package/dist-embed-sighting-editor/DecorParameterTexts_en-C5dEeI_C.js +1 -0
- package/dist-embed-sighting-editor/DecorParameterTexts_es-BysMOaxT.js +1 -0
- package/dist-embed-sighting-editor/DecorParameterTexts_fr-CThgxosI.js +1 -0
- package/dist-embed-sighting-editor/DecorParameterTexts_it-D0ZsTK16.js +1 -0
- package/dist-embed-sighting-editor/FlareKindMessages_en-BroHgiwr.js +1 -0
- package/dist-embed-sighting-editor/FlareKindMessages_es-SraQyQ3Y.js +1 -0
- package/dist-embed-sighting-editor/FlareKindMessages_fr-Dy5SlSna.js +1 -0
- package/dist-embed-sighting-editor/FlareKindMessages_it-CF39wmrC.js +1 -0
- package/dist-embed-sighting-editor/{GLTFLoader-CQeR3NC8.js → GLTFLoader-5AJGh-k1.js} +1 -1
- package/dist-embed-sighting-editor/{HeadlightSystem-Cy4jSEsq.js → HeadlightSystem-neTrWCCo.js} +1 -1
- package/dist-embed-sighting-editor/{HynekAssessor-Covu9I3x.js → HynekAssessor-DRD9zLEH.js} +1 -1
- package/dist-embed-sighting-editor/{InterviewEditorElement-IBABfqta.js → InterviewEditorElement-Cs8mzPb7.js} +27 -27
- package/dist-embed-sighting-editor/LanternEditor-CnxhMWVp.js +9 -0
- package/dist-embed-sighting-editor/LanternKindMessages_en-fUfoRYC0.js +1 -0
- package/dist-embed-sighting-editor/LanternKindMessages_es-Chyc607D.js +1 -0
- package/dist-embed-sighting-editor/LanternKindMessages_fr-CDem7PTY.js +1 -0
- package/dist-embed-sighting-editor/LanternKindMessages_it-yOojym1u.js +1 -0
- package/dist-embed-sighting-editor/LanternParameterTexts_en-CcnGd8UH.js +1 -0
- package/dist-embed-sighting-editor/LanternParameterTexts_es-CUTgNutZ.js +1 -0
- package/dist-embed-sighting-editor/LanternParameterTexts_fr-P2JwYOUy.js +1 -0
- package/dist-embed-sighting-editor/LanternParameterTexts_it-CzNnIUrX.js +1 -0
- package/dist-embed-sighting-editor/LaserBeam-Be555mrH.js +1 -0
- package/dist-embed-sighting-editor/LaunchEditor-7uWzz1to.js +22 -0
- package/dist-embed-sighting-editor/LaunchKindMessages_en-Batvnyw3.js +1 -0
- package/dist-embed-sighting-editor/LaunchKindMessages_es-KYyQ9gbu.js +1 -0
- package/dist-embed-sighting-editor/LaunchKindMessages_fr-CoojboIk.js +1 -0
- package/dist-embed-sighting-editor/LaunchKindMessages_it-9HA3cjgP.js +1 -0
- package/dist-embed-sighting-editor/LaunchParameterTexts_en-DvrCwbDM.js +1 -0
- package/dist-embed-sighting-editor/LaunchParameterTexts_es--RUAegVp.js +1 -0
- package/dist-embed-sighting-editor/LaunchParameterTexts_fr-Bh_1zVzy.js +1 -0
- package/dist-embed-sighting-editor/LaunchParameterTexts_it-CWDx9nJy.js +1 -0
- package/dist-embed-sighting-editor/LaunchPlume-Bc8eFHmR.js +1 -0
- package/dist-embed-sighting-editor/{LaunchSimulation-4f9-9d7Z.js → LaunchSimulation-3YNBjyS2.js} +1 -1
- package/dist-embed-sighting-editor/{ModelSource-CYfSBTeB.js → ModelSource-D0ZuOymh.js} +1 -1
- package/dist-embed-sighting-editor/{ModelThumbnails-DYWQQdaZ.js → ModelThumbnails-BA3zFrn5.js} +1 -1
- package/dist-embed-sighting-editor/{ModelViewer-BjIOswb8.js → ModelViewer-BDorZEms.js} +1 -1
- package/dist-embed-sighting-editor/{ModuleSession-D3GrBJ3j.js → ModuleSession-CBJWLo9w.js} +2 -2
- package/dist-embed-sighting-editor/ModuleThree-Brz-0Orl.js +1 -0
- package/dist-embed-sighting-editor/ModulesPanelElement-BdnB0iIX.js +13 -0
- package/dist-embed-sighting-editor/{NearestApproach-DCUW8bB4.js → NearestApproach-BfoIDPh8.js} +1 -1
- package/dist-embed-sighting-editor/PerceptionMessages_en-B2O6DR64.js +1 -0
- package/dist-embed-sighting-editor/PerceptionMessages_es-BmkP6OqD.js +1 -0
- package/dist-embed-sighting-editor/PerceptionMessages_fr-B59TnGBC.js +1 -0
- package/dist-embed-sighting-editor/PerceptionMessages_it-DPlxRmxu.js +1 -0
- package/dist-embed-sighting-editor/{PoherAssessor-BoGGdasd.js → PoherAssessor-Cy0fVE2j.js} +1 -1
- package/dist-embed-sighting-editor/{RailwaySystem-C8Dby19B.js → RailwaySystem-J2yWIAbD.js} +1 -1
- package/dist-embed-sighting-editor/ReentryEditor-BA4Jirp1.js +27 -0
- package/dist-embed-sighting-editor/ReentryKindMessages_en-Cbgk3paQ.js +1 -0
- package/dist-embed-sighting-editor/ReentryKindMessages_es-DwgJQanC.js +1 -0
- package/dist-embed-sighting-editor/ReentryKindMessages_fr-D9r9x2bK.js +1 -0
- package/dist-embed-sighting-editor/ReentryKindMessages_it-DQ-J5YpD.js +1 -0
- package/dist-embed-sighting-editor/ReentryParameterTexts_en-BH1tGP5C.js +1 -0
- package/dist-embed-sighting-editor/ReentryParameterTexts_es-BDMJ4K1g.js +1 -0
- package/dist-embed-sighting-editor/ReentryParameterTexts_fr-C8ROK57p.js +1 -0
- package/dist-embed-sighting-editor/ReentryParameterTexts_it-CwC8vNTI.js +1 -0
- package/dist-embed-sighting-editor/ReentrySimulation-GEWa9zRD.js +1 -0
- package/dist-embed-sighting-editor/{ReferenceSystem-PYF540r7.js → ReferenceSystem-DvWi5osh.js} +1 -1
- package/dist-embed-sighting-editor/{RoadMarkings-VqRLMg59.js → RoadMarkings-Ci3fp-tS.js} +1 -1
- package/dist-embed-sighting-editor/SceneNames_en-oNPwLOsb.js +1 -0
- package/dist-embed-sighting-editor/SceneNames_es-Z_lHKIao.js +1 -0
- package/dist-embed-sighting-editor/SceneNames_fr-CTfqBDCK.js +1 -0
- package/dist-embed-sighting-editor/SceneNames_it-Bjfu1PyS.js +1 -0
- package/dist-embed-sighting-editor/ShareMessages_en-DE1WoeWH.js +1 -0
- package/dist-embed-sighting-editor/SightingEditorMessages_en-CAWfFtUQ.js +12 -0
- package/dist-embed-sighting-editor/{SightingEditorMessages_es-CQU200Hj.js → SightingEditorMessages_es-Botf2OEe.js} +1 -1
- package/dist-embed-sighting-editor/{SightingEditorMessages_fr-Bd4Ht-jW.js → SightingEditorMessages_fr-D5f-KX1w.js} +1 -1
- package/dist-embed-sighting-editor/{SightingEditorMessages_it-CSnPiCy2.js → SightingEditorMessages_it-DBMXvC62.js} +1 -1
- package/dist-embed-sighting-editor/{TraceSystem-BX0FwUB1.js → TraceSystem-DO70_HjB.js} +2 -2
- package/dist-embed-sighting-editor/UfoMessages_en-DVlS5Elx.js +1 -0
- package/dist-embed-sighting-editor/UfoMessages_es-DreLXcIR.js +1 -0
- package/dist-embed-sighting-editor/UfoMessages_fr-D9BCRY2m.js +1 -0
- package/dist-embed-sighting-editor/UfoMessages_it-C8r0jnJP.js +1 -0
- package/dist-embed-sighting-editor/{WaterSystem-uWnkivpP.js → WaterSystem-Cx8Lct9F.js} +1 -1
- package/dist-embed-sighting-editor/rr0-sighting-editor.mjs +671 -682
- package/dist-embed-sighting-editor/trafficRuntime-PSRYgFJb.js +2 -0
- package/package.json +2 -1
- package/dist-embed-scene/BeamEditor-DcUBLvPh.js +0 -30
- package/dist-embed-scene/LanternEditor-DQ9Y_eBl.js +0 -9
- package/dist-embed-scene/LaunchEditor-Csb2Pfq3.js +0 -22
- package/dist-embed-scene/ModuleThree-Cozd8KlK.js +0 -1
- package/dist-embed-scene/ReentryEditor-AsKtWLMw.js +0 -27
- package/dist-embed-scene/SceneNames_es-DL0IWHOw.js +0 -1
- package/dist-embed-scene/SceneNames_fr-B2NX5JJO.js +0 -1
- package/dist-embed-scene/SceneNames_it-wq6fqU10.js +0 -1
- package/dist-embed-scene/UfoMessages_es-BxNc9t8X.js +0 -1
- package/dist-embed-scene/UfoMessages_fr-DnD6eSjQ.js +0 -1
- package/dist-embed-scene/UfoMessages_it-BubvnWTa.js +0 -1
- package/dist-embed-sighting/BeamEditor-KLBjeTRU.js +0 -30
- package/dist-embed-sighting/BeamSystem-C6YXI9Da.js +0 -1
- package/dist-embed-sighting/ContrailSystem-BUKo3qVd.js +0 -1
- package/dist-embed-sighting/GLTFLoader-BYMKgQLE.js +0 -1
- package/dist-embed-sighting/HynekAssessor-Cc8hHe3R.js +0 -1
- package/dist-embed-sighting/LanternEditor-J_d2le0V.js +0 -9
- package/dist-embed-sighting/LaunchEditor-DuVZmb3n.js +0 -22
- package/dist-embed-sighting/ModuleThree-YgLqKZM9.js +0 -1
- package/dist-embed-sighting/ReentryEditor-DCDavAGw.js +0 -27
- package/dist-embed-sighting/ReentrySimulation-BzMMTqck.js +0 -1
- package/dist-embed-sighting/ReferenceSystem-Dt28-Egu.js +0 -1
- package/dist-embed-sighting/SceneNames_es-Cu0CS6c0.js +0 -1
- package/dist-embed-sighting/SceneNames_fr-BAQt0-Zp.js +0 -1
- package/dist-embed-sighting/SceneNames_it-CeXG9jCC.js +0 -1
- package/dist-embed-sighting/UfoMessages_es-BxNc9t8X.js +0 -1
- package/dist-embed-sighting/UfoMessages_fr-DnD6eSjQ.js +0 -1
- package/dist-embed-sighting/UfoMessages_it-BubvnWTa.js +0 -1
- package/dist-embed-sighting-editor/AdsbLolArchiveProvider-k2xqWyaR.js +0 -1
- package/dist-embed-sighting-editor/BeamEditor-DTkjy61A.js +0 -30
- package/dist-embed-sighting-editor/BodyEditor-D5PfqEg2.js +0 -28
- package/dist-embed-sighting-editor/LanternEditor-BoxxG443.js +0 -9
- package/dist-embed-sighting-editor/LaserBeam-j5Z4tIOw.js +0 -1
- package/dist-embed-sighting-editor/LaunchEditor-rJud4C3y.js +0 -22
- package/dist-embed-sighting-editor/LaunchPlume-Dm1YdsZp.js +0 -1
- package/dist-embed-sighting-editor/ModuleThree-CkOgRXM2.js +0 -1
- package/dist-embed-sighting-editor/ModulesPanelElement-Uz0lPYwu.js +0 -13
- package/dist-embed-sighting-editor/ReentryEditor-8sfHq7hY.js +0 -27
- package/dist-embed-sighting-editor/ReentrySimulation-KMMVK82G.js +0 -1
- package/dist-embed-sighting-editor/SceneNames_es-CLvEspFd.js +0 -1
- package/dist-embed-sighting-editor/SceneNames_fr-oYQgZ-TZ.js +0 -1
- package/dist-embed-sighting-editor/SceneNames_it-CDTw3VAX.js +0 -1
- package/dist-embed-sighting-editor/UfoMessages_es-BxNc9t8X.js +0 -1
- package/dist-embed-sighting-editor/UfoMessages_fr-DnD6eSjQ.js +0 -1
- package/dist-embed-sighting-editor/UfoMessages_it-BubvnWTa.js +0 -1
- package/dist-embed-sighting-editor/trafficRuntime-BeMCM4Ap.js +0 -2
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{V as a,D as o}from"./rr0-sighting.mjs";const l={bodies:{sun:"Sole",moon:"Luna",Venus:"Venere",Mars:"Marte",Jupiter:"Giove",Saturn:"Saturno"},stars:{Sirius:"Sirio",Canopus:"Canopo",Arcturus:"Arturo",Procyon:"Procione",Pollux:"Polluce",Castor:"Castore",Regulus:"Regolo"},comets:{"halley-1910":"cometa di Halley","brooks-1911":"cometa Brooks","skjellerup-maristany-1927":"cometa Skjellerup-Maristany","de-kock-paraskevopoulos-1941":"cometa de Kock-Paraskevopoulos","southern-1947":"cometa australe","eclipse-1948":"cometa dell'eclisse","arend-roland-1957":"cometa Arend-Roland","mrkos-1957":"cometa Mrkos","seki-lines-1962":"cometa Seki-Lines","ikeya-seki-1965":"cometa Ikeya-Seki","bennett-1970":"cometa Bennett","white-ortiz-bolelli-1970":"cometa White-Ortiz-Bolelli","kohoutek-1973":"cometa Kohoutek","west-1976":"cometa West","iras-araki-alcock-1983":"cometa IRAS-Araki-Alcock","halley-1986":"cometa di Halley","hyakutake-1996":"cometa Hyakutake","hale-bopp-1997":"cometa Hale-Bopp","mcnaught-2007":"cometa McNaught","lovejoy-2011":"cometa Lovejoy","panstarrs-2013":"cometa PANSTARRS","neowise-2020":"cometa NEOWISE","tsuchinshan-atlas-2024":"cometa Tsuchinshan-ATLAS"},novae:{"sn-1006":"supernova del 1006","sn-1054":"supernova del 1054","sn-1181":"supernova del 1181","sn-1572":"supernova di Tycho","sn-1604":"supernova di Keplero","t-crb-1866":"nova della Corona Boreale 1866","t-aur-1891":"nova dell'Auriga 1891","gk-per-1901":"nova di Perseo 1901","dn-gem-1912":"nova dei Gemelli 1912","v603-aql-1918":"nova dell'Aquila 1918","v476-cyg-1920":"nova del Cigno 1920","rr-pic-1925":"nova del Pittore 1925","dq-her-1934":"nova di Ercole 1934","cp-lac-1936":"nova della Lucertola 1936","cp-pup-1942":"nova della Poppa 1942","t-crb-1946":"nova della Corona Boreale 1946","v446-her-1960":"nova di Ercole 1960","v533-her-1963":"nova di Ercole 1963","hr-del-1967":"nova del Delfino 1967","lv-vul-1968":"nova della Volpetta 1968","fh-ser-1970":"nova del Serpente 1970","v1500-cyg-1975":"nova del Cigno 1975","v842-cen-1986":"nova del Centauro 1986","sn-1987a":"supernova 1987A","v1974-cyg-1992":"nova del Cigno 1992","v382-vel-1999":"nova delle Vele 1999","v1494-aql-1999":"nova dell'Aquila 1999","v4743-sgr-2002":"nova del Sagittario 2002","rs-oph-2006":"nova di Ofiuco 2006","v1280-sco-2007":"nova dello Scorpione 2007","v339-del-2013":"nova del Delfino 2013","v1369-cen-2013":"nova del Centauro 2013","rs-oph-2021":"nova di Ofiuco 2021"},satelliteClasses:{echo:"i palloni Echo","iridium-flares":"i lampi degli Iridium",iss:"la Stazione Spaziale Internazionale","starlink-trains":"i treni di Starlink"},showers:{quadrantids:"Quadrantidi",lyrids:"Liridi di aprile","eta-aquariids":"Eta Aquaridi","alpha-capricornids":"Alfa Capricornidi","southern-delta-aquariids":"Delta Aquaridi australi",perseids:"Perseidi","southern-taurids":"Tauridi australi",draconids:"Draconidi di ottobre",orionids:"Orionidi","northern-taurids":"Tauridi boreali",leonids:"Leonidi",geminids:"Geminidi",ursids:"Ursidi"},lightRigs:{airliner:"Aereo di linea",helicopter:"Elicottero","car-headlights":"Auto, fari accesi","car-hazards":"Auto, luci di emergenza","emergency-beacons":"Lampeggianti di veicolo di soccorso","traffic-signal":"Semaforo","pedestrian-signal":"Semaforo pedonale",streetlamp:"Lampione"},instruments:{eye:"Occhio nudo","rectilinear-lens":"Fotocamera, modello sconosciuto","roamer-1-120":"Roamer 1, pellicola 120","instamatic-126":"Instamatic, pellicola 126","slr-35mm-50":"Reflex 35 mm, obiettivo 50 mm","slr-35mm-zoom":"Reflex 35 mm, zoom 70-210 mm","phone-landscape":"Telefono, in orizzontale","phone-portrait":"Telefono, in verticale",dashcam:"Dashcam",cctv:"Telecamera di sorveglianza",...o.names(),...a.names()},decorKinds:{building:"Edificio",tree:"Albero",shrub:"Arbusto",bridge:"Ponte",wire:"Linea aerea",crop:"Filare di coltura",terrace:"Terrazzamento",mound:"Mucchio di pietre",wall:"Muretto a secco",streetlight:"Lampione",trafficlight:"Semaforo",crossing:"Attraversamento pedonale",roadsign:"Segnale stradale",vehicle:"Veicolo",observer:"Testimone",aircraft:"Aeromobile",entity:"Essere"},compassPoints:["N","NNE","NE","ENE","E","ESE","SE","SSE","S","SSO","SO","OSO","O","ONO","NO","NNO"],towards:e=>`verso ${e}`,starTooltip:"{name} — mag {mag}, {alt}° sopra l'orizzonte",starTooltipBelow:"{name} — mag {mag}, {alt}° sotto l'orizzontale",decorTooltip:"{name} — {size}, a {distance}",satelliteTooltip:"{name} — satellite, mag {mag}, a {height} km di quota",reentryTooltip:{name:"Rientro atmosferico",piece:"{name} — mag {mag}, a {height} km di quota e {distance} km",fragment:"{name}, un frammento — mag {mag}, a {height} km di quota e {distance} km"},afterimageTooltip:{name:"Immagine residua, nell'occhio",detail:"{name}: dove è caduta l'immagine di una luce più brillante del Sole, il pigmento della retina è sbiadito: per qualche secondo continua a brillare, bianca e poi colorata, poi ciò che vi si vede appare più scuro. Resta nello stesso punto del campo visivo ovunque si volga lo sguardo, e impiega minuti a svanire."},plumeTooltip:{name:"Scia di razzo",detail:"{name} — {part}, a {distance}, a {height} km di quota",ascent:"scarico dell'ascesa",burn:"scarico di un'accensione",vent:"propellenti scaricati"},ghostTooltip:{ghost:"Riflesso: {name}",halo:"Alone: {name}",double:"Doppio: {name}",unnamed:"una luce",detail:"{name}. {cause}, {where}.",causes:{lens:"Riflesso tra due superfici dell'obiettivo",sensor:"Riflesso del sensore rimandato dal suo vetro protettivo",filter:"Riflesso del sensore rimandato dal filtro",glass:"Riflesso tra le due facce del vetro davanti all'obiettivo",drops:"Luce diffusa dalle gocce sul vetro",condensation:"Luce diffusa dalla condensa sul vetro",dirt:"Luce diffusa dallo sporco sul vetro"},opposite:"dall'altra parte del centro dell'immagine rispetto alla luce",sameSide:"dallo stesso lato del centro della luce",around:"attorno alla luce",drop:{lens:"Goccia sull'obiettivo",filter:"Goccia sul filtro",window:"Goccia sul vetro",windscreen:"Goccia sul parabrezza"},dropDetail:"{name}. Come una piccola lente, mostra capovolto e sfocato ciò che c'è dall'altra parte di essa, invece di ciò che c'è dietro."},opticsTooltips:{halo22:"Alone di 22° — un anello attorno al Sole, dovuto alla luce deviata da cristalli di ghiaccio esagonali nei cirri; il bordo interno è rosso, a 21,7°",halo46:"Alone di 46° — un anello più raro e debole: la luce entra da una faccia laterale del cristallo ed esce da una faccia di estremità",oddRadius:"Alone di {angle}° — un anello a raggio dispari, raro e debole, prodotto da cristalli di ghiaccio con estremità piramidali",parhelion:"Parelio — una macchia luminosa colorata accanto al Sole, alla sua altezza, da lastrine di ghiaccio che cadono piatte; rosso verso il Sole",parhelion120:"Parelio di 120° — una debole macchia bianca a 120° dal Sole, da luce riflessa dentro lastrine piatte",upperTangentArc:"Arco tangente superiore — un arco luminoso appoggiato sull'alone di 22°, da colonne coricate in orizzontale",lowerTangentArc:"Arco tangente inferiore — un arco che tocca la base dell'alone di 22°, da colonne coricate in orizzontale",circumzenithal:"Arco circumzenitale — una banda di colori vivi vicino allo zenit, da luce che entra dalla faccia superiore di lastrine piatte (solo con il Sole sotto i 32°)",circumhorizontal:"Arco circumorizzontale — una banda colorata bassa nel cielo, da luce che entra dalla faccia laterale di lastrine piatte (solo con il Sole sopra i 58°)",parhelicCircle:"Cerchio parelico — un cerchio bianco attorno a tutto il cielo all'altezza del Sole, da riflessi sulle facce verticali di lastrine piatte",pillar:"Colonna di luce — un fascio di luce sopra il Sole, da riflessi su lastrine piatte leggermente inclinate",subsun:"Sotto-sole — un'immagine del Sole sotto l'orizzonte, da riflessi sulle facce piatte delle lastrine"},trafficTooltip:{unnamed:"Aeromobile {hex}",altitude:"{value} ft",speed:"{value} kt",heading:"prua {value}°",position:"a {distance} km, {elevation}° sopra l'orizzonte, {bearing}",heard:"Si sente a {level} dB(A), partito dall'aereo {delay} s fa, {lag}° dietro di esso: {character}{pitch}",rumble:"un rombo grave, nulla oltre {cutoff} Hz",muffled:"un rumore sordo, nulla oltre {cutoff} Hz",broad:"un fragore ampio",pitchHigher:", suono più acuto del {percent} %",pitchLower:", suono più grave del {percent} %",inaudible:"Non si sente qui: {level} dB(A) contro {ambient} dB(A) di rumore ambientale",soundUnknown:"Suono non calcolabile: l'aereo non era ancora registrato quando è partito",contrailPersistent:"Lascia una scia che dura: l'aria è sovrasatura rispetto al ghiaccio ({rhi} % rispetto al ghiaccio)",contrailShort:"Lascia una scia breve: l'aria è secca rispetto al ghiaccio ({rhi} % rispetto al ghiaccio)",military:"militare",restricted:"identità nascosta dal proprietario",candidate:"Un candidato compatibile, non un'identificazione"},railwayTooltip:{kinds:{rail:"Ferrovia",light_rail:"Metropolitana leggera",tram:"Tranvia",subway:"Metropolitana",funicular:"Funicolare"},highSpeed:"Linea ad alta velocità",service:"Binario di servizio",singleTrack:"binario unico",tracks:"{count} binari",overhead:"linea aerea, filo di contatto a {height} m sopra la rotaia",overheadVoltage:"linea aerea a {voltage}, filo di contatto a {height} m sopra la rotaia",thirdRail:"terza rotaia",thirdRailVoltage:"terza rotaia a {voltage}",notElectrified:"non elettrificata",gauge:"scartamento di {mm} mm",metreGauge:"scartamento metrico",distance:"a {distance}"},credits:"Crediti",notAVideo:"Questo non è un video",isASimulation:"È una simulazione in tempo reale."};export{l as sceneNames_it};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const e={play:"Reproducir",clickToPlay:"Haz clic para reproducir",pause:"Pausa",noDuration:"Sin duración de observación",currentPosition:"Posición actual",duration:"Duración",switchToElapsed:"haz clic para mostrar el tiempo transcurrido",switchToClockTime:"haz clic para mostrar la hora del día",fullscreen:"Pantalla completa",exitFullscreen:"Salir de pantalla completa",mute:"Silenciar",unmute:"Activar el sonido",noSound:"Sin sonido registrado",moments:"Momentos",moreControls:"Más controles",fewerControls:"Menos controles",showObserverMap:"Ver dónde estaba el testigo",hideObserverMap:"Ocultar dónde estaba el testigo",mapImageryUnavailable:"Vista aérea no disponible",zoomMapIn:"Acercar",zoomMapOut:"Alejar",fitMap:"Volver al trayecto completo",placeObserverHere:"Poner al testigo aquí",showReferences:"Ver las fotos del lugar",hideReferences:"Ocultar las fotos del lugar",showTraces:"Ver los trazos del investigador",hideTraces:"Ocultar los trazos del investigador",referenceOpacity:"Opacidad de las fotos",referencesMenu:"Fotos del lugar",showMilestones:"Ver los momentos del relato",hideMilestones:"Ocultar los momentos del relato",observerHere:"El testigo, aquí",decorHere:"Elemento del decorado",recordingIssues:"{count} problema(s) en esta grabación: puede que no se reproduzca como su autor quería",issueTemplates:{"unknown-key":"{path}: clave desconocida, ignorada","wrong-type":"{path}: se esperaba {expected}, se encontró {found}","not-in-list":"{path}: {found} no es uno de {expected}",defaulted:"{path}: ausente, se usa {expected}",unplaced:"{path}: sin aim (ni bounds), dibujado en el centro de la vista",unsized:"{path}: sin tamaño angular (ni bounds), dibujado de un píxel de ancho","pixels-over-angles":"{path}: bounds repetido sin aim ni angular, así que la forma sigue los píxeles"}};export{e as ufoMessages_es};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const e={play:"Lecture",clickToPlay:"Cliquer pour lire",pause:"Pause",noDuration:"Aucune durée d'observation",currentPosition:"Position actuelle",duration:"Durée",switchToElapsed:"cliquer pour afficher la durée écoulée",switchToClockTime:"cliquer pour afficher l'heure de l'observation",fullscreen:"Plein écran",exitFullscreen:"Quitter le plein écran",mute:"Couper le son",unmute:"Rétablir le son",noSound:"Pas de son enregistré",moments:"Moments",moreControls:"Plus de commandes",fewerControls:"Moins de commandes",showObserverMap:"Voir où était le témoin",hideObserverMap:"Masquer où était le témoin",mapImageryUnavailable:"Vue aérienne indisponible",zoomMapIn:"Zoomer",zoomMapOut:"Dézoomer",fitMap:"Revenir au trajet entier",placeObserverHere:"Placer le témoin ici",showReferences:"Voir les photos des lieux",hideReferences:"Masquer les photos des lieux",showTraces:"Voir les tracés d'enquêteur",hideTraces:"Masquer les tracés d'enquêteur",referenceOpacity:"Opacité des photos",referencesMenu:"Photos des lieux",showMilestones:"Voir les moments du récit",hideMilestones:"Masquer les moments du récit",observerHere:"Le témoin, ici",decorHere:"Élément de décor",recordingIssues:"{count} problème(s) dans cet enregistrement : il peut ne pas jouer ce que son auteur voulait",issueTemplates:{"unknown-key":"{path} : clé inconnue, ignorée","wrong-type":"{path} : {expected} attendu, {found} trouvé","not-in-list":"{path} : {found} ne fait pas partie de {expected}",defaulted:"{path} : absent, {expected} utilisé",unplaced:"{path} : ni aim ni bounds, dessiné au milieu de la vue",unsized:"{path} : ni taille angulaire ni bounds, dessiné large d'un pixel","pixels-over-angles":"{path} : bounds redonné sans aim ni angular, la forme suit les pixels"}};export{e as ufoMessages_fr};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const e={play:"Riproduci",clickToPlay:"Clicca per riprodurre",pause:"Pausa",noDuration:"Nessuna durata di osservazione",currentPosition:"Posizione attuale",duration:"Durata",switchToElapsed:"fai clic per mostrare il tempo trascorso",switchToClockTime:"fai clic per mostrare l'ora del giorno",fullscreen:"Schermo intero",exitFullscreen:"Esci dallo schermo intero",mute:"Disattiva audio",unmute:"Attiva audio",noSound:"Nessun suono registrato",moments:"Momenti",moreControls:"Altri controlli",fewerControls:"Meno controlli",showObserverMap:"Mostra dove si trovava il testimone",hideObserverMap:"Nascondi dove si trovava il testimone",mapImageryUnavailable:"Vista aerea non disponibile",zoomMapIn:"Ingrandisci",zoomMapOut:"Riduci",fitMap:"Torna all'intero percorso",placeObserverHere:"Metti qui il testimone",showReferences:"Mostra le foto del luogo",hideReferences:"Nascondi le foto del luogo",showTraces:"Mostra i tracciati dell'investigatore",hideTraces:"Nascondi i tracciati dell'investigatore",referenceOpacity:"Opacità delle foto",referencesMenu:"Foto del luogo",showMilestones:"Mostra i momenti del resoconto",hideMilestones:"Nascondi i momenti del resoconto",observerHere:"Il testimone, qui",decorHere:"Elemento della scenografia",recordingIssues:"{count} problema/i in questa registrazione: potrebbe non essere riprodotta come voleva il suo autore",issueTemplates:{"unknown-key":"{path}: chiave sconosciuta, ignorata","wrong-type":"{path}: atteso {expected}, trovato {found}","not-in-list":"{path}: {found} non è tra {expected}",defaulted:"{path}: assente, usato {expected}",unplaced:"{path}: nessun aim (né bounds), disegnato al centro della vista",unsized:"{path}: nessuna dimensione angolare (né bounds), disegnato largo un pixel","pixels-over-angles":"{path}: bounds ripetuto senza aim né angular, quindi la forma segue i pixel"}};export{e as ufoMessages_it};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a2 as M,a3 as $,$ as I}from"./rr0-sighting-editor.mjs";class d{static RECORD_BYTES=20;static NON_ICAO_FLAG=1<<24;static UNKNOWN=65535;static MAX_DT=35999;static decode(t){if(t.length%d.RECORD_BYTES!==0)throw new Error(`An aircraft tile is a multiple of ${d.RECORD_BYTES} bytes, not ${t.length}`);const e=new DataView(t.buffer,t.byteOffset,t.byteLength),c=[];for(let n=0;n<t.length;n+=d.RECORD_BYTES){const s=e.getUint32(n,!0),a=e.getUint16(n+16,!0),r=e.getUint16(n+18,!0);c.push({icao:s&16777215,nonIcao:(s&d.NON_ICAO_FLAG)!==0,secondsInHour:e.getUint16(n+4,!0)/10,lat:e.getInt32(n+6,!0)/1e5,lng:e.getInt32(n+10,!0)/1e5,altitudeFt:e.getInt16(n+14,!0)*25,groundSpeedKt:a===d.UNKNOWN?void 0:a/10,trackDeg:r===d.UNKNOWN?void 0:r/10})}return c}}const w="https://ufoathome.org/aircraft/index.json";class f{citation=M;static DEFAULT_RADIUS_KM=150;static FLAG_MILITARY=1;static FLAG_PIA=4;static FLAG_LADD=8;static KM_PER_DEG=111.32;static HOUR_MS=36e5;fetchImpl;indexUrls;index;hours=new Map;tiles=new Map;shards=new Map;constructor(t={}){this.fetchImpl=t.fetchImpl??fetch.bind(globalThis),this.indexUrls=t.indexUrls??f.defaultIndexUrls()}static defaultIndexUrls(){const t=[];return typeof location<"u"&&/^https?:$/.test(location.protocol)&&t.push(new URL("/aircraft/index.json",location.href).href),t.includes(w)||t.push(w),t}mayCover(t){return $.mayCover(t)}async between(t,e,c,n=f.DEFAULT_RADIUS_KM){const s=await this.loadIndex();if(!s)return{status:"failed"};const a=[];for(let o=Math.floor(e/f.HOUR_MS);o<=Math.floor(c/f.HOUR_MS);o++)a.push(o);if(!a.every(o=>s.index.days.includes(f.dayOf(o))))return{status:"outside"};const r=f.tilesAround(t,n);try{const o=(await Promise.all(a.flatMap(u=>r.map(i=>this.tileOf(s.base,u,i))))).flat();return{status:"found",tracks:f.merge(o,t,e,c,n)}}catch{return{status:"failed"}}}async describe(t,e){const c=await this.loadIndex();if(!c)return;const n=t.icao.toString(16).padStart(6,"0"),s=t.nonIcao?"non-icao":n.slice(0,2),a=`${e}/${s}`;let r=this.shards.get(a);r||(r=this.fetchImpl(new URL(`${e}/aircraft/${s}.json`,c.base).href).then(g=>g.ok?g.json():{}).catch(()=>({})),this.shards.set(a,r));const o=(await r)[t.nonIcao?`~${n}`:n];if(!o)return;const[u,i,l,h=0]=o,p={registration:u||void 0,type:i||void 0,category:l||void 0,military:(h&f.FLAG_MILITARY)!==0||void 0,restricted:(h&(f.FLAG_PIA|f.FLAG_LADD))!==0||void 0};return Object.values(p).some(g=>g!==void 0)?p:void 0}static tilesAround(t,e){const c=e/f.KM_PER_DEG,n=Math.max(-90,t.lat-c),s=Math.min(90,t.lat+c),a=Math.cos(Math.max(Math.abs(n),Math.abs(s))*Math.PI/180),r=a<1e-6?180:e/(f.KM_PER_DEG*a),o=new Set;if(r>=180)for(let i=-180;i<180;i++)o.add(i);else for(let i=Math.floor(t.lng-r);i<=Math.floor(t.lng+r);i++)o.add(I.wrapLongitude(i));const u=[];for(let i=Math.floor(n);i<=Math.min(89,Math.floor(s));i++)for(const l of o)u.push(`${i}_${l}`);return u}static dayOf(t){return new Date(t*f.HOUR_MS).toISOString().slice(0,10)}static merge(t,e,c,n,s){const a=new Map;for(const o of t){const u=o.points.filter(h=>h.t>=c&&h.t<=n&&I.groundDistanceKm(e,h)<=s);if(u.length===0)continue;const i=`${o.nonIcao?"~":""}${o.icao}`,l=a.get(i);l?l.points.push(...u):a.set(i,{icao:o.icao,nonIcao:o.nonIcao,points:u})}const r=[...a.values()];for(const o of r)o.points.sort((u,i)=>u.t-i.t);return r.sort((o,u)=>o.icao-u.icao)}loadIndex(){return this.index??=(async()=>{for(const t of this.indexUrls)try{const e=await this.fetchImpl(t);if(e.ok)return{index:await e.json(),base:t}}catch{}})(),this.index}tileOf(t,e,c){const n=f.dayOf(e),s=String(e%24).padStart(2,"0"),a=`${n}/${s}/${c}`;let r=this.tiles.get(a);return r||(r=this.hourIndex(t,n,s).then(async o=>{const u=o[c];if(!u)return[];const[i,l]=u,h=await this.fetchImpl(new URL(`${n}/${s}.pack`,t).href,{headers:{Range:`bytes=${i}-${i+l-1}`}});if(!h.ok)throw new Error(`The pack of ${n} ${s} h answered ${h.status}`);const p=new Uint8Array(await h.arrayBuffer()),g=h.status===206?p:p.subarray(i,i+l);return f.tracksOf(await f.gunzip(g),e)}),r.catch(()=>this.tiles.delete(a)),this.tiles.set(a,r)),r}hourIndex(t,e,c){const n=`${e}/${c}`;let s=this.hours.get(n);return s||(s=this.fetchImpl(new URL(`${e}/${c}.json`,t).href).then(a=>{if(a.status===404)return{};if(!a.ok)throw new Error(`The index of ${e} ${c} h answered ${a.status}`);return a.json()}),s.catch(()=>this.hours.delete(n)),this.hours.set(n,s)),s}static async gunzip(t){const e=new Blob([t]).stream().pipeThrough(new DecompressionStream("gzip"));return new Uint8Array(await new Response(e).arrayBuffer())}static tracksOf(t,e){const c=new Map;for(const n of d.decode(t)){const s=`${n.nonIcao?"~":""}${n.icao}`;let a=c.get(s);a||c.set(s,a={icao:n.icao,nonIcao:n.nonIcao,points:[]}),a.points.push({t:e*f.HOUR_MS+n.secondsInHour*1e3,lat:n.lat,lng:n.lng,altitudeFt:n.altitudeFt,groundSpeedKt:n.groundSpeedKt,trackDeg:n.trackDeg})}return[...c.values()]}}export{f as AdsbLolArchiveProvider,w as UFOATHOME_AIRCRAFT_INDEX_URL};
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import{L as u}from"./LaserBeam-j5Z4tIOw.js";import{ai as x,as as L,D as c,b,z as y,C as I,G as v,at as T,U as M}from"./rr0-sighting-editor.mjs";import{S as E}from"./SkyEventEditorStyle-CvY_AhbI.js";import{beamEditorMessages_en as w}from"./BeamEditorMessages_en-DDvPWAdd.js";class o{static LIGHT_TITLE={en:"Light",fr:"Lumière",es:"Luz",it:"Luce"};static BEAM={en:"Beam",fr:"Faisceau",es:"Haz",it:"Fascio"};static WHEN={en:"When",fr:"Quand",es:"Cuándo",it:"Quando"};static nextPlace(e){const t=e[e.length-1]??{lat:0,lng:0,altitudeM:0},i=e[e.length-2];return i?{lat:2*t.lat-i.lat,lng:2*t.lng-i.lng,altitudeM:2*t.altitudeM-i.altitudeM}:{lat:t.lat,lng:t.lng+500/(111320*Math.max(.05,Math.cos(t.lat*Math.PI/180))),altitudeM:t.altitudeM}}static instant(e,t,i,s=!1){return{type:"number",key:e,min:-3600,max:36e3,step:.1,unit:"s",scale:.001,label:t,hint:i,...s?{required:s}:{}}}static SET={kind:"beam",title:{en:"Beam",fr:"Faisceau",es:"Haz",it:"Fascio"},parameters:[{type:"said",key:"title",label:{en:"Name",fr:"Nom",es:"Nombre",it:"Nome"},group:o.BEAM},{type:"number",key:"divergenceMrad",min:.001,max:1e3,step:.001,unit:"mrad",group:o.BEAM,effective:()=>u.DEFAULT_DIVERGENCE_MRAD,label:{en:"Divergence",fr:"Divergence",es:"Divergencia",it:"Divergenza"},hint:{en:"How fast it widens, full angle: 0.1 mrad is a metre wide at 10 km.",fr:"À quelle vitesse il s'élargit, angle total : 0,1 mrad fait un mètre de large à 10 km.",es:"Lo rápido que se ensancha, ángulo total: 0,1 mrad es un metro de ancho a 10 km.",it:"Quanto in fretta si allarga, angolo totale: 0,1 mrad è un metro di larghezza a 10 km."}},{type:"number",key:"apertureM",min:.001,max:10,step:.001,unit:"m",group:o.BEAM,effective:()=>u.DEFAULT_APERTURE_M,label:{en:"Width at the emitter",fr:"Largeur à l'émetteur",es:"Anchura en el emisor",it:"Larghezza all'emettitore"}},{type:"number",key:"patchiness",min:0,max:100,step:1,unit:"%",scale:100,group:o.BEAM,effective:()=>u.DEFAULT_PATCHINESS,label:{en:"Uneven haze",fr:"Brume irrégulière",es:"Bruma irregular",it:"Foschia irregolare"},hint:{en:"How unevenly the haze it crosses is spread: the beam seen from the side is brighter where it crosses a denser patch, the patches drifting with the wind. 0 is an even haze; the default is judged on photographs, not measured.",fr:"À quel point la brume qu'il traverse est inégale : vu de côté, le faisceau est plus brillant là où il traverse une poche plus dense, les poches dérivant avec le vent. 0 est une brume égale ; la valeur par défaut est jugée sur des photographies, pas mesurée.",es:"Lo desigual que es la bruma que cruza: visto de lado, el haz es más brillante donde cruza una bolsa más densa, y las bolsas derivan con el viento. 0 es una bruma uniforme; el valor por defecto se juzga en fotografías, no se mide.",it:"Quanto è irregolare la foschia che attraversa: visto di lato, il fascio è più brillante dove attraversa una sacca più densa, e le sacche derivano col vento. 0 è una foschia uniforme; il valore predefinito è giudicato su fotografie, non misurato."}}]};static WAVELENGTH_HINT={en:"Its colour: 532 for the green of a frequency-doubled laser, 520 for a green diode, 638 for a red one, 450 for a blue one.",fr:"Sa couleur : 532 pour le vert d'un laser doublé en fréquence, 520 pour une diode verte, 638 pour une rouge, 450 pour une bleue.",es:"Su color: 532 para el verde de un láser doblado en frecuencia, 520 para un diodo verde, 638 para uno rojo, 450 para uno azul.",it:"Il suo colore: 532 per il verde di un laser a frequenza raddoppiata, 520 per un diodo verde, 638 per uno rosso, 450 per uno blu."};static POWER_HINT={en:"The optical power it carries, its mean for a pulsed laser, whose pulses no eye tells apart. What is seen of it is what the air scatters.",fr:"La puissance optique qu'il porte, sa moyenne pour un laser pulsé, dont aucun œil ne distingue les impulsions. Ce qui s'en voit est ce que l'air en diffuse.",es:"La potencia óptica que lleva, su media para un láser pulsado, cuyos pulsos ningún ojo distingue. Lo que se ve de él es lo que el aire difunde.",it:"La potenza ottica che porta, la sua media per un laser pulsato, i cui impulsi nessun occhio distingue. Ciò che se ne vede è ciò che l'aria diffonde."};static WAVELENGTH_LABEL={en:"Wavelength",fr:"Longueur d'onde",es:"Longitud de onda",it:"Lunghezza d'onda"};static POWER_LABEL={en:"Power",fr:"Puissance",es:"Potencia",it:"Potenza"};static LIGHT={kind:"beam-light",title:o.LIGHT_TITLE,parameters:[{type:"number",key:"wavelengthNm",min:380,max:780,step:1,unit:"nm",required:!0,label:o.WAVELENGTH_LABEL,hint:o.WAVELENGTH_HINT},{type:"number",key:"powerW",min:.001,max:1e5,step:.001,unit:"W",required:!0,label:o.POWER_LABEL,hint:o.POWER_HINT}]};static LIGHT_KEY={kind:"beam-light-key",title:o.LIGHT_TITLE,parameters:[o.instant("t",{en:"Time",fr:"Instant",es:"Instante",it:"Istante"},{en:"Seconds of the recording.",fr:"Secondes de l'enregistrement.",es:"Segundos de la grabación.",it:"Secondi della registrazione."},!0),{type:"number",key:"wavelengthNm",min:380,max:780,step:1,unit:"nm",label:o.WAVELENGTH_LABEL,hint:o.WAVELENGTH_HINT,effective:(e,t)=>t?.wavelengthNm},{type:"number",key:"powerW",min:.001,max:1e5,step:.001,unit:"W",label:o.POWER_LABEL,hint:o.POWER_HINT,effective:(e,t)=>t?.powerW}]};static ON={kind:"beam-on",title:o.WHEN,parameters:[o.instant("fromT",{en:"On from",fr:"Allumé à",es:"Encendido a",it:"Acceso a"},{en:"Seconds of the recording; empty, from its start.",fr:"Secondes de l'enregistrement ; vide, dès son début.",es:"Segundos de la grabación; vacío, desde su inicio.",it:"Secondi della registrazione; vuoto, dal suo inizio."}),o.instant("untilT",{en:"Off at",fr:"Éteint à",es:"Apagado a",it:"Spento a"},{en:"Seconds of the recording; empty, until its end.",fr:"Secondes de l'enregistrement ; vide, jusqu'à sa fin.",es:"Segundos de la grabación; vacío, hasta su final.",it:"Secondi della registrazione; vuoto, fino alla sua fine."})]};static MOVE_KEY={kind:"beam-move-key",title:{en:"Path at an instant",fr:"Trajet à un instant",es:"Trayecto en un instante",it:"Percorso a un istante"},parameters:[o.instant("t",{en:"Time",fr:"Instant",es:"Instante",it:"Istante"},{en:"Seconds of the recording.",fr:"Secondes de l'enregistrement.",es:"Segundos de la grabación.",it:"Secondi della registrazione."},!0)]};static hexOf(e){const t=u.colourOf(e),i=Math.max(...t,1e-9),s=n=>{const r=Math.min(1,Math.max(0,n/i)),a=r<=.0031308?12.92*r:1.055*r**(1/2.4)-.055;return Math.round(a*255).toString(16).padStart(2,"0")};return`#${t.map(s).join("")}`}static wavelengthOf(e){const t=o.hueOf(e);let i=532,s=1/0;for(let n=400;n<=700;n++){const r=Math.abs((o.hueOf(o.hexOf(n))-t+540)%360-180);r<s&&(s=r,i=n)}return i}static hueOf(e){const t=Number.parseInt(e.replace("#",""),16),[i,s,n]=[t>>16&255,t>>8&255,t&255].map(p=>p/255),r=Math.max(i,s,n),a=Math.min(i,s,n);if(r===a)return 0;const h=r-a;return((r===i?(s-n)/h%6:r===s?(n-i)/h+2:(i-s)/h+4)*60+360)%360}static PLACE={kind:"beam-place",title:{en:"Point of the path",fr:"Point du trajet",es:"Punto del trayecto",it:"Punto del percorso"},parameters:[{type:"position",key:"lat",secondKey:"lng",saidKey:"saidPosition",native:"geo",step:.1,label:{en:"Position",fr:"Position",es:"Posición",it:"Posizione"}},{type:"number",key:"altitudeM",min:-500,max:1e5,step:.1,unit:"m",required:!0,label:{en:"Altitude",fr:"Altitude",es:"Altitud",it:"Altitudine"},hint:{en:"Above the sea, not the ground: an emitter at a window twelve metres up a building on ground at 160 m is at 172 m.",fr:"Au-dessus de la mer, pas du sol : un émetteur à une fenêtre à douze mètres de haut, sur un sol à 160 m, est à 172 m.",es:"Sobre el mar, no sobre el suelo: un emisor en una ventana a doce metros de altura, sobre un suelo a 160 m, está a 172 m.",it:"Sul mare, non sul suolo: un emettitore a una finestra a dodici metri d'altezza, su un suolo a 160 m, è a 172 m."}}]};static publish(){x.publish(o.SET)}}class m{constructor(e,t,i){this.container=e,this.host=t,this.language=i,E.attach(e,"beam-editor",m.STYLE),x.of("beam")||o.publish(),this.render(),this.setLanguage(i)}messages=w;languageToken=0;currentId;form;list;timeline;row="on";onForm;lightForm;lightKeyForm;lightIndex;moveKeyForm;moveIndex;places;placeForm;placeIndex=0;language;shown=[];static STYLE='.beam-editor { flex-basis: 100%; min-width: 0; } .beam-editor #beam-timeline { flex-basis: 100%; min-width: 0; padding: 4px 0; } .beam-editor #beam-list, .beam-editor #beam-places { flex-basis: 100%; min-width: 0; } .beam-editor .launch-editor, .beam-editor .launch-fields { display: flex; flex-wrap: wrap; gap: 8px; align-items: end; } .beam-editor .launch-fields { flex-basis: 100%; min-width: 0; } .beam-editor [hidden] { display: none !important; } .beam-editor select { min-width: 0; width: 100%; } .beam-editor .launch-intro { flex-basis: 100%; margin: 0; } .beam-editor .launch-track { flex-basis: 100%; margin: 0; } .beam-editor .launch-parameters { flex-basis: 100%; min-width: 0; display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-start; } .beam-editor .parameter-group { flex: 1 1 14em; min-width: 0; box-sizing: border-box; margin: 0; display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: flex-start; align-content: flex-start; } .beam-editor input, .beam-editor select { max-width: 100%; box-sizing: border-box; } .beam-editor input[type="text"] { width: 12em; } .beam-editor #launch-title { width: 18em; } .beam-editor label { min-width: 0; max-width: 100%; } .beam-editor input.parameter-derived::placeholder { opacity: .65; } .beam-editor .launch-path { flex: 1 1 100%; min-width: 0; box-sizing: border-box; margin: 0; display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: flex-start; }';async setLanguage(e){const t=++this.languageToken;this.language=e;const i=M.includes(e)?e:"en",s=i==="en"?w:await L(i);t===this.languageToken&&(this.messages=s,this.render(),this.sync())}sync(){const e=this.beams;this.shown=[...e],e.some(s=>s.id===this.currentId)||(this.currentId=e[0]?.id),this.list?.setItems(e.map(s=>({id:s.id,label:this.labelOf(s)})),this.currentId),this.syncAddState();const t=this.current;if(this.element("beam-fields").hidden=t===void 0,!t)return;const i={said:()=>this.host.said(),writingLanguage:()=>this.host.writingLanguage()};this.form??=new c(this.element("beam-parameters"),this.language,"beam.",i),this.form.show(o.SET,this.targetOfBeam(),()=>this.written()),this.syncDetail(!0)}refresh(){this.syncAddState();const e=this.beams;if(e.length===this.shown.length&&e.every((t,i)=>t.id===this.shown[i].id)){this.syncTimeline();return}this.sync()}setTime(e){this.timeline?.setTime(e)}syncAddState(){const e=this.pathOfNew()!==void 0;this.list?.setAddState(e,e?void 0:this.messages.addBeamNowhere)}get current(){return this.beams.find(e=>e.id===this.currentId)}show(e){this.currentId=e,this.row="on",this.lightIndex=void 0,this.moveIndex=void 0,this.placeIndex=0,this.sync()}render(){const e=this.messages;this.form=void 0,this.container.innerHTML=`<div class="launch-editor">
|
|
2
|
-
<p class="launch-intro">${e.intro}</p>
|
|
3
|
-
<div id="beam-list"></div>
|
|
4
|
-
<div id="beam-fields" class="launch-fields">
|
|
5
|
-
<div id="beam-parameters" class="launch-parameters"></div>
|
|
6
|
-
<div id="beam-timeline" class="launch-timeline"></div>
|
|
7
|
-
<p class="launch-intro">${e.timelineNote}</p>
|
|
8
|
-
<fieldset id="beam-on" class="launch-path">
|
|
9
|
-
<legend>${e.on}</legend>
|
|
10
|
-
<div id="beam-on-parameters" class="launch-parameters"></div>
|
|
11
|
-
</fieldset>
|
|
12
|
-
<fieldset id="beam-light" class="launch-path">
|
|
13
|
-
<legend>${e.light}</legend>
|
|
14
|
-
<p id="beam-light-note" class="launch-intro"></p>
|
|
15
|
-
<div id="beam-light-parameters" class="launch-parameters"></div>
|
|
16
|
-
<div id="beam-light-key-parameters" class="launch-parameters"></div>
|
|
17
|
-
<label class="beam-colour"><span>${e.colour}</span> <input id="beam-colour" type="color" title="${e.colourHint}"/></label>
|
|
18
|
-
<button id="beam-light-delete" class="icon-btn" type="button" title="${e.deleteKey}" aria-label="${e.deleteKey}">${b.TRASH}</button>
|
|
19
|
-
</fieldset>
|
|
20
|
-
<fieldset id="beam-path" class="launch-path">
|
|
21
|
-
<legend>${e.path}</legend>
|
|
22
|
-
<p id="beam-path-note" class="launch-intro"></p>
|
|
23
|
-
<div id="beam-move-key-parameters" class="launch-parameters"></div>
|
|
24
|
-
<button id="beam-move-delete" class="icon-btn" type="button" title="${e.deleteKey}" aria-label="${e.deleteKey}">${b.TRASH}</button>
|
|
25
|
-
<div id="beam-places"></div>
|
|
26
|
-
<div id="beam-place-parameters" class="launch-parameters"></div>
|
|
27
|
-
</fieldset>
|
|
28
|
-
<p class="launch-intro">${e.derivedNote}</p>
|
|
29
|
-
</div>
|
|
30
|
-
</div>`,this.list=new y({header:this.element("beam-list"),body:this.element("beam-fields"),ids:{list:"beam-select",remove:"beam-delete",add:"beam-add"},onSelect:t=>this.show(t),onAdd:()=>this.addBeam(),onRemove:()=>this.deleteCurrent()}),this.list.setLabels({list:e.beam,remove:e.deleteBeam,add:e.addBeam,empty:e.none}),this.timeline=new I(this.element("beam-timeline"),t=>this.host.seekTo(t),{addKeyframeHere:e.addHere,keyframeHere:e.here,zoomHint:e.zoomHint}),this.places=new y({header:this.element("beam-places"),body:this.element("beam-place-parameters"),ids:{list:"beam-place",remove:"beam-place-delete",add:"beam-place-add"},navigation:{scope:this.element("beam-path"),onStep:t=>this.selectPlace(this.placeIndex+t)},onSelect:t=>this.selectPlace(Number(t)),onAdd:()=>this.addPlace(),onRemove:()=>this.removePlace()}),this.places.setLabels({list:e.place,remove:e.deletePlace,add:e.addPlace,previous:e.previousPlace,next:e.nextPlace}),this.element("beam-colour").addEventListener("input",t=>this.pickColour(t.target.value)),this.element("beam-light-delete").addEventListener("click",()=>this.removeLightKey()),this.element("beam-move-delete").addEventListener("click",()=>this.removeMoveKey()),this.onForm=void 0,this.lightForm=void 0,this.lightKeyForm=void 0,this.moveKeyForm=void 0,this.placeForm=void 0}written(){const e=this.current;e&&this.list?.rename(e.id,this.labelOf(e)),this.syncTimeline()}targetOfBeam(){return new v(()=>this.current,e=>this.editBeam(t=>e(t)))}static ON_COLOR="#2f9e5a";static LIGHT_COLOR="#c0581b";static PATH_COLOR="#4f8fd6";syncTimeline(){const e=this.current;if(!this.timeline||!e)return;const t=this.messages,i=this.host.duration(),s=e.fromT??0,n=e.untilT??i,r=[{t:s,until:n,label:""}],a=this.sortedLight(e),h=this.sortedMoves(e),g=[{id:"on",label:t.on,color:m.ON_COLOR,times:[s,n],spans:r,active:this.row==="on",open:()=>this.selectRow("on"),pressed:()=>this.selectRow("on"),move:(l,d)=>this.moveEnd(l===s?"fromT":"untilT",d),add:()=>this.moveEnd("fromT",Math.round(this.host.currentTime()))},{id:"light",label:t.light,color:m.LIGHT_COLOR,times:a.map(l=>l.t),spans:a.length?[]:r,active:this.row==="light",selectedTime:this.row==="light"&&this.lightIndex!==void 0?a[this.lightIndex]?.t:void 0,open:()=>this.selectLight(this.lightIndex),pressed:(l,d)=>this.selectLight(d===void 0?this.lightIndex:this.sortedLight(this.current).findIndex(f=>f.t===d)),move:(l,d)=>this.moveLightKey(l,d),add:()=>this.addLightKey(Math.round(this.host.currentTime()))},{id:"path",label:t.path,color:m.PATH_COLOR,times:h.map(l=>l.t),spans:h.length?[]:r,active:this.row==="path",selectedTime:this.row==="path"&&this.moveIndex!==void 0?h[this.moveIndex]?.t:void 0,open:()=>this.selectMove(this.moveIndex),pressed:(l,d)=>this.selectMove(d===void 0?this.moveIndex:this.sortedMoves(this.current).findIndex(f=>f.t===d)),move:(l,d)=>this.moveMoveKey(l,d),add:()=>this.addMoveKey(Math.round(this.host.currentTime()))}],p=[s,n,...a.map(l=>l.t),...h.map(l=>l.t)];this.timeline.show(g,i,this.host.currentTime(),{from:Math.min(0,...p),to:Math.max(i,...p)})}sortedLight(e){return[...e.light??[]].sort((t,i)=>t.t-i.t)}sortedMoves(e){return[...e.moves??[]].sort((t,i)=>t.t-i.t)}selectRow(e){this.row=e,this.syncDetail(!0)}syncDetail(e=!1){this.current&&(this.element("beam-on").hidden=this.row!=="on",this.element("beam-light").hidden=this.row!=="light",this.element("beam-path").hidden=this.row!=="path",this.row==="on"&&this.syncOn(e),this.row==="light"&&this.syncLight(e),this.row==="path"&&this.syncPath(e),this.syncTimeline())}syncOn(e){this.onForm?this.onForm.sync(e):(this.onForm=new c(this.element("beam-on-parameters"),this.language,"beamOn."),this.onForm.show(o.ON,this.targetOfBeam(),()=>this.syncTimeline()))}moveEnd(e,t){this.editBeam(i=>{i[e]=t,i.fromT!==void 0&&i.untilT!==void 0&&i.untilT<i.fromT&&(e==="fromT"?delete i.untilT:[i.fromT,i.untilT]=[i.untilT,i.fromT])}),this.selectRow("on")}selectLight(e){const t=this.current?this.sortedLight(this.current):[];this.lightIndex=e!==void 0&&e>=0&&e<t.length?e:t.length?0:void 0,this.selectRow("light")}get currentLightKey(){const e=this.current;return e&&this.lightIndex!==void 0?this.sortedLight(e)[this.lightIndex]:void 0}syncLight(e){const t=this.messages,i=this.currentLightKey;this.element("beam-light-note").textContent=i?t.lightKeyNote:t.lightNoKeyNote,this.element("beam-light-parameters").hidden=i!==void 0,this.element("beam-light-key-parameters").hidden=i===void 0,this.element("beam-light-delete").hidden=i===void 0,this.lightForm?this.lightForm.sync(e):(this.lightForm=new c(this.element("beam-light-parameters"),this.language,"beamLight."),this.lightForm.show(o.LIGHT,this.targetOfBeam(),()=>this.syncColour())),this.lightKeyForm?this.lightKeyForm.sync(e):(this.lightKeyForm=new c(this.element("beam-light-key-parameters"),this.language,"beamLightKey."),this.lightKeyForm.show(o.LIGHT_KEY,new v(()=>this.currentLightKey,s=>this.editLightKey(this.lightIndex,s),()=>this.current),()=>this.syncColour())),this.syncColour()}syncColour(){const e=this.current;e&&(this.element("beam-colour").value=o.hexOf(this.currentLightKey?.wavelengthNm??e.wavelengthNm))}pickColour(e){const t=o.wavelengthOf(e);this.lightIndex===void 0?(this.editBeam(i=>{i.wavelengthNm=t}),this.lightForm?.sync(!0)):(this.editLightKey(this.lightIndex,i=>{i.wavelengthNm=t}),this.lightKeyForm?.sync(!0))}editLightKey(e,t){const i=this.current;if(!i)return;const s=this.sortedLight(i),n={...s[e]};t(n);const r=s.map((a,h)=>h===e?n:a).sort((a,h)=>a.t-h.t);this.editBeam(a=>{a.light=r}),this.lightIndex=r.indexOf(n),this.syncTimeline()}addLightKey(e){const t=this.current;if(!t)return;const i=this.sortedLight(t),s=i.findIndex(h=>Math.abs(h.t-e)<1);if(s>=0){this.selectLight(s);return}const n=u.stateAt(t,e),r={t:e,wavelengthNm:Math.round(n.wavelengthNm),powerW:Number(n.powerW.toFixed(3))},a=[...i,r].sort((h,g)=>h.t-g.t);this.editBeam(h=>{h.light=a}),this.selectLight(a.indexOf(r))}moveLightKey(e,t){const i=this.current?this.sortedLight(this.current).findIndex(s=>s.t===e):-1;i<0||(this.editLightKey(i,s=>{s.t=t}),this.selectRow("light"))}removeLightKey(){const e=this.current,t=this.lightIndex;if(!e||t===void 0)return;const i=this.sortedLight(e).filter((s,n)=>n!==t);this.editBeam(s=>{i.length?s.light=i:delete s.light}),this.selectLight(i.length?Math.min(t,i.length-1):void 0)}selectMove(e){const t=this.current?this.sortedMoves(this.current):[],i=e!==void 0&&e>=0&&e<t.length?e:t.length?0:void 0;i!==this.moveIndex&&(this.placeIndex=0),this.moveIndex=i,this.selectRow("path")}get currentMoveKey(){const e=this.current;return e&&this.moveIndex!==void 0?this.sortedMoves(e)[this.moveIndex]:void 0}get shownPath(){return this.currentMoveKey?.path??this.current?.path??[]}syncPath(e){const t=this.messages,i=this.currentMoveKey;this.element("beam-path-note").textContent=i?t.pathKeyNote:t.pathNoKeyNote,this.element("beam-move-key-parameters").hidden=i===void 0,this.element("beam-move-delete").hidden=i===void 0,this.moveKeyForm?this.moveKeyForm.sync(e):(this.moveKeyForm=new c(this.element("beam-move-key-parameters"),this.language,"beamMoveKey."),this.moveKeyForm.show(o.MOVE_KEY,new v(()=>this.currentMoveKey,s=>this.editMoveKey(this.moveIndex,n=>s(n))),()=>{})),this.syncPlaces(e)}editMoveKey(e,t){const i=this.current;if(!i)return;const s=this.sortedMoves(i),n={...s[e],path:[...s[e].path]};t(n);const r=s.map((a,h)=>h===e?n:a).sort((a,h)=>a.t-h.t);this.editBeam(a=>{a.moves=r}),this.moveIndex=r.indexOf(n),this.syncTimeline()}addMoveKey(e){const t=this.current;if(!t)return;const i=this.sortedMoves(t),s=i.findIndex(a=>Math.abs(a.t-e)<1);if(s>=0){this.selectMove(s);return}const n={t:e,path:u.stateAt(t,e).path.map(a=>({...a}))},r=[...i,n].sort((a,h)=>a.t-h.t);this.editBeam(a=>{a.moves=r}),this.selectMove(r.indexOf(n))}moveMoveKey(e,t){const i=this.current?this.sortedMoves(this.current).findIndex(s=>s.t===e):-1;i<0||(this.editMoveKey(i,s=>{s.t=t}),this.selectRow("path"))}removeMoveKey(){const e=this.current,t=this.moveIndex;if(!e||t===void 0)return;const i=this.sortedMoves(e).filter((s,n)=>n!==t);this.editBeam(s=>{i.length?s.moves=i:delete s.moves}),this.selectMove(i.length?Math.min(t,i.length-1):void 0)}syncPlaces(e=!1){const t=this.shownPath;this.placeIndex=Math.max(0,Math.min(this.placeIndex,t.length-1)),this.places?.setItems(t.map((i,s)=>({id:String(s),label:`${s+1}/${t.length}`})),String(this.placeIndex)),this.places?.setStepState(this.placeIndex>0,this.placeIndex<t.length-1),this.places?.setRemoveEnabled(t.length>m.MIN_PLACES),this.placeForm?this.placeForm.sync(e):(this.placeForm=new c(this.element("beam-place-parameters"),this.language,"beamPlace."),this.placeForm.show(o.PLACE,new v(()=>this.shownPath[this.placeIndex],i=>this.editPath(s=>{const n={...s[this.placeIndex]};return i(n),s.map((r,a)=>a===this.placeIndex?n:r)}),void 0,this.host.positionPlace?.()),()=>{}))}editPath(e){this.moveIndex!==void 0?this.editMoveKey(this.moveIndex,t=>{t.path=e(t.path)}):this.editBeam(t=>{t.path=e(t.path)})}static MIN_PLACES=2;selectPlace(e){const t=this.shownPath;e<0||e>=t.length||(this.placeIndex=e,this.syncPlaces(!0))}addPlace(){this.editPath(e=>[...e,o.nextPlace(e)]),this.placeIndex=this.shownPath.length-1,this.syncPlaces(!0)}removePlace(){if(this.shownPath.length<=m.MIN_PLACES)return;const e=this.placeIndex;this.editPath(t=>t.filter((i,s)=>s!==e)),this.syncPlaces(!0)}editBeam(e){const t=this.current;if(!t)return;const i={...t,path:[...t.path]};e(i),this.writeBeams(this.beams.map(s=>s===t?i:s)),this.host.changed()}pathOfNew(){const e=this.host.sighting(),t=e.event?.place?.[0];if(t?.lat===void 0||t.lng===void 0)return;const i=(e.observerTrack?.getInterpolatedPoseAt(0)?.headingDeg??0)*Math.PI/180,s=111320;return[{lat:t.lat,lng:t.lng,altitudeM:0},{lat:t.lat+2e3*Math.cos(i)/s,lng:t.lng+2e3*Math.sin(i)/(s*Math.max(.05,Math.cos(t.lat*Math.PI/180))),altitudeM:100}]}addBeam(){const e=this.pathOfNew();if(!e)return;let t=this.beams.length+1;for(;this.beams.some(s=>s.id===`beam-${t}`);)t++;const i={id:`beam-${t}`,path:e,wavelengthNm:532,powerW:5};this.writeBeams([...this.beams,i]),this.host.changed(),this.show(i.id)}deleteCurrent(){const e=this.current;e&&(this.currentId=void 0,this.writeBeams(this.beams.filter(t=>t!==e)),this.host.changed(),this.sync())}writeBeams(e){const t=this.host.sighting();t.skyEvents=T.written({...t.skyEvents,beams:e})}labelOf(e){const t=this.host.said().read(e.title);return t?`${t} (${e.id})`:e.id}get beams(){return this.host.sighting().skyEvents?.beams??[]}element(e){return this.container.querySelector(`#${e}`)}}export{m as BeamEditor};
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import{U as D,y as O,B as u,b as A,z as x,C as z,D as M,G as v,J as C,K as E}from"./rr0-sighting-editor.mjs";import{bodyEditorMessages_en as w}from"./BodyEditorMessages_en-zfy3BJb5.js";class p{static before(e,o){const i=[...e.track].sort((s,n)=>s.t-n.t);return[...i].reverse().find(s=>s.t<=o)??i[0]}static viewOf(e,o,i){const s=p.before(e,o),n=t=>Number(t.toFixed(2));return{mode:s?.eastM!==void 0&&s.northM!==void 0?"world":"observer",azimuthDeg:n(i.azimuthDeg),elevationDeg:n(i.altitudeDeg),distanceM:n(i.distanceM),eastM:n(i.eastM),northM:n(i.northM),saidPosition:e.track.find(t=>t.t===o)?.saidPosition,aboveGroundM:n(i.aboveGroundM),onGround:s?.onGround===!0,widthM:n(i.sizeM.widthM),lengthM:n(i.sizeM.lengthM),heightM:n(i.sizeM.heightM),headingDeg:n(i.attitude.headingDeg),pitchDeg:n(i.attitude.pitchDeg),rollDeg:n(i.attitude.rollDeg),color:i.appearance.color,albedo:n(i.appearance.albedo),luminanceCdM2:n(i.appearance.luminanceCdM2),transparency:n(i.appearance.transparency??0),haloScale:n(i.appearance.haloScale??1)}}static keyframeOf(e,o,i,s){const n=d=>Number.isFinite(d)?d:0,t=e.mode==="world"?{t:o,eastM:n(e.eastM),northM:n(e.northM),...e.saidPosition?{saidPosition:e.saidPosition}:{},...e.onGround?{onGround:!0}:{altitudeAboveGroundM:n(e.aboveGroundM)}}:{t:o,azimuthDeg:n(e.azimuthDeg),altitudeDeg:n(e.elevationDeg),distanceM:Math.max(.1,n(e.distanceM)),...e.onGround?{onGround:!0}:{}},r=s?{color:e.color,albedo:Math.max(0,Math.min(1,n(e.albedo))),luminanceCdM2:Math.max(0,n(e.luminanceCdM2)),transparency:Math.max(0,Math.min(1,n(e.transparency))),haloScale:Math.max(0,n(e.haloScale))}:i?.appearance;return{...p.withoutPlacement(i),...t,sizeM:{widthM:Math.max(.01,n(e.widthM)),lengthM:Math.max(.01,n(e.lengthM)),heightM:Math.max(.01,n(e.heightM))},attitude:{headingDeg:n(e.headingDeg),pitchDeg:n(e.pitchDeg),rollDeg:n(e.rollDeg)},...r?{appearance:r}:{}}}static withoutPlacement(e){if(!e)return{};const{eastM:o,northM:i,saidPosition:s,azimuthDeg:n,altitudeDeg:t,distanceM:r,onGround:d,altitudeAboveGroundM:a,sizeM:l,attitude:c,appearance:b,...y}=e;return y}}class h{static number(e,o,i,s,n,t,r={}){return{type:"number",key:e,label:o,min:i,max:s,step:n,unit:t,required:!0,...r}}static BODY={kind:"body",title:{en:"Body",fr:"Corps",es:"Cuerpo",it:"Corpo"},parameters:[{type:"text",key:"id",required:!0,label:{en:"ID",fr:"Identifiant",es:"Identificador",it:"Identificativo"},validate:(e,o,i)=>!(i?.ids??[]).some(s=>s===e&&s!==o.id)},{type:"said",key:"title",label:{en:"Name",fr:"Nom",es:"Nombre",it:"Nome"}},{type:"set",key:"explains",label:{en:"Stands for the shapes",fr:"Représente les formes",es:"Representa las formas",it:"Rappresenta le forme"},options:(e,o)=>{const i=o?.shapes??[],s=(e.explains??[]).filter(n=>!i.some(t=>t.value===n));return[...i,...s.map(n=>({value:n,label:n}))]},empty:{en:"No shape",fr:"Aucune forme",es:"Ninguna forma",it:"Nessuna forma"}},{type:"text",key:"outlineNode",label:{en:"Part drawn by the witness",fr:"Partie dessinée par le témoin",es:"Parte dibujada por el testigo",it:"Parte disegnata dal testimone"},placeholder:{en:"Node of the model, e.g. hull",fr:"Nœud du modèle, par ex. hull",es:"Nodo del modelo, p. ej. hull",it:"Nodo del modello, ad es. hull"}}]};static KEYFRAME={kind:"body-keyframe",title:{en:"At the playhead",fr:"À l'instant courant",es:"En el instante actual",it:"All'istante corrente"},parameters:[{type:"choice",key:"mode",required:!0,label:{en:"Position",fr:"Position",es:"Posición",it:"Posizione"},choices:[{value:"observer",label:{en:"From the witness",fr:"Depuis le témoin",es:"Desde el testigo",it:"Dal testimone"}},{value:"world",label:{en:"In the world",fr:"Dans le monde",es:"En el mundo",it:"Nel mondo"}}]},h.number("azimuthDeg",{en:"Azimuth",fr:"Azimut",es:"Acimut",it:"Azimut"},0,360,.01,"°",{visibleWhen:e=>e.mode==="observer"}),h.number("elevationDeg",{en:"Elevation",fr:"Hauteur",es:"Elevación",it:"Elevazione"},-90,90,.01,"°",{visibleWhen:e=>e.mode==="observer"}),h.number("distanceM",{en:"Distance",fr:"Distance",es:"Distancia",it:"Distanza"},.1,3e4,.1,"m",{visibleWhen:e=>e.mode==="observer"}),{type:"position",key:"eastM",secondKey:"northM",saidKey:"saidPosition",native:"local",step:.1,label:{en:"In the world",fr:"Dans le monde",es:"En el mundo",it:"Nel mondo"},visibleWhen:e=>e.mode==="world"},{type:"boolean",key:"onGround",label:{en:"On the ground",fr:"Au sol",es:"En el suelo",it:"A terra"}},h.number("aboveGroundM",{en:"Above the ground",fr:"Au-dessus du sol",es:"Sobre el suelo",it:"Sopra il suolo"},0,3e4,.1,"m",{visibleWhen:e=>e.mode==="world"&&e.onGround!==!0}),h.number("widthM",{en:"Width",fr:"Largeur",es:"Ancho",it:"Larghezza"},.01,1e3,.01,"m"),h.number("lengthM",{en:"Length",fr:"Longueur",es:"Largo",it:"Lunghezza"},.01,1e3,.01,"m"),h.number("heightM",{en:"Height",fr:"Hauteur",es:"Alto",it:"Altezza"},.01,1e3,.01,"m"),h.number("headingDeg",{en:"Heading",fr:"Cap",es:"Rumbo",it:"Rotta"},0,360,.1,"°"),h.number("pitchDeg",{en:"Pitch",fr:"Tangage",es:"Cabeceo",it:"Beccheggio"},-90,90,.1,"°"),h.number("rollDeg",{en:"Roll",fr:"Roulis",es:"Alabeo",it:"Rollio"},-180,180,.1,"°"),{type:"colour",key:"color",label:{en:"Colour",fr:"Couleur",es:"Color",it:"Colore"},fallback:"#c8c8c8",visibleWhen:(e,o)=>o?.drawnFromModel!==!0},h.number("albedo",{en:"Albedo",fr:"Albédo",es:"Albedo",it:"Albedo"},0,1,.01,void 0),h.number("luminanceCdM2",{en:"Light of its own",fr:"Lumière propre",es:"Luz propia",it:"Luce propria"},0,1e10,.1,"cd/m²"),h.number("transparency",{en:"Transparency",fr:"Transparence",es:"Transparencia",it:"Trasparenza"},0,1,.01,void 0),h.number("haloScale",{en:"Halo",fr:"Halo",es:"Halo",it:"Alone"},0,20,.1,"×")]}}class m{constructor(e,o,i){this.container=e,this.host=o,this.language=i,this.render(),this.setLanguage(i)}static APPEARANCE_KEYS=["color","albedo","luminanceCdM2","transparency","haloScale"];messages=w;languageToken=0;currentId;catalogueToken=0;shownEntry;syncedId;bodyForm;keyForm;async setLanguage(e){const o=++this.languageToken;this.language=e;const i=D.includes(e)?e:"en",s=i==="en"?w:await O(i);o===this.languageToken&&s!==this.messages&&(this.messages=s,this.render())}get selectedId(){return this.currentId}sync(){const e=this.bodies;e.some(t=>t.id===this.currentId)||(this.currentId=e[0]?.id),this.input("body-interpretation-title").value=this.host.said().read(this.interpretation?.title)??"",this.list?.setItems(e.map(t=>({id:t.id,label:this.labelOf(t)})),this.currentId),this.host.bodySelected?.(this.currentId);const o=this.host.newBodyStart();this.list?.setAddState(o!==void 0,o?o.label!==void 0?this.messages.addBodyHint.replace("{shape}",o.label):this.messages.addBodyHintView:void 0),this.input("body-interpretation-title").closest("label").hidden=!1;const i=this.current;if(this.element("body-fields").hidden=i===void 0,!i)return;this.bodyForm?.sync(),this.syncModelOptions(i);const s=i.model;this.input("body-model-url").value=s.url??"",this.input("body-model-title").value=s.credit?.title??"",this.input("body-model-author").value=s.credit?.author??"",this.input("body-model-license").value=s.credit?.license??"",this.input("body-model-source").value=s.credit?.sourceUrl??"";const n=this.element("body-model-advanced");n.open=s.url!==void 0||n.open&&i.id===this.syncedId,this.syncedId=i.id,this.element("body-model-incomplete").hidden=s.url===void 0||s.credit?.title!==void 0&&s.credit.license!==void 0,this.syncKeyframe()}syncKeyframe(e=!1){const o=this.current;if(!o)return;const i=this.host.currentTime(),s=this.messages,n=this.host.readingOf(o,i),t=o.track.find(r=>r.t===i);this.element("body-key-legend").textContent=s.atPlayhead.replace("{t}",m.seconds(i)),this.element("body-key-note").textContent=n?t?s.keyframeHere:s.keyframeAdded:s.notPlaced,this.element("body-key-delete").disabled=t===void 0,this.syncTimeline(o,t?.t),this.element("body-key-parameters").hidden=!n,n&&this.keyForm?.sync(e)}syncTimeline(e,o){if(!this.timeline)return;const i=e.track.map(n=>n.t),s=this.host.duration?.()??Math.max(1,...i);this.timeline.show([{id:"keys",label:this.messages.keyframes,color:m.KEY_COLOR,times:i,selectedTime:o,open:()=>{},move:(n,t)=>this.moveKeyframe(n,t),add:()=>this.keyframeHere()}],s,this.host.currentTime(),m.extentOf(i,s))}static extentOf(e,o){if(e.length<2)return{from:Math.min(0,...e),to:Math.max(o,...e)};const i=Math.min(...e),s=Math.max(...e),n=Math.max(500,(s-i)/10);return{from:i-n,to:s+n}}static KEY_COLOR="#c0581b";moveKeyframe(e,o){const i=this.current;if(!i)return;const s=i.track.find(t=>t.t===e);if(!s)return;const n=[...i.track.filter(t=>t!==s&&t.t!==o),{...s,t:o}].sort((t,r)=>t.t-r.t);this.write({...this.interpretation,bodies:this.bodies.map(t=>t===i?{...i,track:n}:t)},!0),this.host.seekTo(o),this.syncKeyframe(!0)}keyframeContext(){const e=this.current?.model;return{drawnFromModel:e===void 0||e.url!==void 0||!u.includes(e.id??"")}}keyframeView(){const e=this.current;if(!e)return;const o=this.host.currentTime(),i=this.host.readingOf(e,o);return i?p.viewOf(e,o,i):void 0}render(){const e=this.messages,o=(t,r,d="text",a="",l="",c="")=>`<label><span>${r}</span> <input id="${t}" type="${d}" placeholder="${a}" ${c} autocomplete="off"/>${l?` ${l}`:""}</label>`;this.container.innerHTML=`<div class="body-editor">
|
|
2
|
-
<p class="body-intro">${e.intro}</p>
|
|
3
|
-
${o("body-interpretation-title",e.interpretationTitle)}
|
|
4
|
-
<div id="body-list" class="body-list"></div>
|
|
5
|
-
<div id="body-fields" class="body-fields">
|
|
6
|
-
<div id="body-parameters" class="body-parameters"></div>
|
|
7
|
-
<label><span>${e.model}</span> <select id="body-model"></select></label>
|
|
8
|
-
<details id="body-model-advanced" class="decor-model-advanced" hidden>
|
|
9
|
-
<summary>${e.modelAdvanced}</summary>
|
|
10
|
-
${o("body-model-url",e.modelUrl,"text",e.modelUrlHint)}
|
|
11
|
-
${o("body-model-title",e.modelTitle)}
|
|
12
|
-
${o("body-model-author",e.modelAuthor)}
|
|
13
|
-
${o("body-model-license",e.modelLicense,"text","CC0 1.0")}
|
|
14
|
-
${o("body-model-source",e.modelSource,"url","https://…")}
|
|
15
|
-
<p id="body-model-incomplete" class="body-intro" hidden>${e.modelIncomplete}</p>
|
|
16
|
-
<p id="body-model-catalogue" class="body-intro" hidden>${e.modelFromCatalogue}</p>
|
|
17
|
-
</details>
|
|
18
|
-
<div id="body-keys" class="body-keys"></div>
|
|
19
|
-
<fieldset class="body-key">
|
|
20
|
-
<legend id="body-key-legend"></legend>
|
|
21
|
-
<button id="body-key-delete" class="icon-btn" type="button" title="${e.deleteKeyframe}" aria-label="${e.deleteKeyframe}">${A.TRASH}</button>
|
|
22
|
-
<p id="body-key-note" class="body-intro"></p>
|
|
23
|
-
<div id="body-key-parameters" class="body-parameters"></div>
|
|
24
|
-
<p class="body-intro">${e.appearanceNote}</p>
|
|
25
|
-
<p class="body-intro">${e.pictureHint}</p>
|
|
26
|
-
</fieldset>
|
|
27
|
-
</div>
|
|
28
|
-
</div>`;const i=this.element("body-list");this.list=new x({header:i,body:this.element("body-fields"),ids:{list:"body-select",remove:"body-delete",add:"body-add"},actions:[{id:"body-look",glyph:"🎯",onClick:()=>{const t=this.current;t&&this.host.lookAt(t)}}],onSelect:t=>{this.currentId=t,this.sync()},onAdd:()=>void this.addBody(),onRemove:()=>this.deleteCurrent()}),this.list.setLabels({list:e.body,remove:e.deleteBody,add:e.addBody,empty:e.none,actions:{"body-look":e.lookAtBody}}),this.input("body-interpretation-title").addEventListener("change",()=>this.updateInterpretationTitle());for(const t of["body-model-url","body-model-title","body-model-author","body-model-license","body-model-source"])this.input(t).addEventListener("change",()=>this.updateCurrent());this.select("body-model").addEventListener("change",()=>{const t=this.select("body-model").value;t!==""&&(this.input("body-model-url").value=""),this.updateCurrent(),this.syncModelOptions(this.current),t!==""&&this.adoptCatalogueSize(t),this.element("body-model-advanced").open=t!==""&&!u.includes(t)}),this.timeline=new z(this.element("body-keys"),t=>{this.host.seekTo(t),this.syncKeyframe(!0)},{addKeyframeHere:e.addKeyframe,keyframeHere:e.keyframeHere,zoomHint:e.zoomHint}),this.element("body-key-delete").addEventListener("click",()=>this.deleteKeyframe()),this.host.modelPicker().enhance(this.select("body-model"),t=>this.modelSourceOf(t),{current:()=>{const t=this.current?.model;return t?.url===void 0?void 0:{url:t.url,title:t.credit?.title??"",author:t.credit?.author??"",license:t.credit?.license??"",source:t.credit?.sourceUrl??""}},apply:t=>{this.input("body-model-url").value=t.url,this.input("body-model-title").value=t.title,this.input("body-model-author").value=t.author,this.input("body-model-license").value=t.license,this.input("body-model-source").value=t.source,this.shownEntry=void 0,this.select("body-model").value="",this.updateCurrent(),this.syncModelOptions(this.current)}});const s=this.select("body-model").nextElementSibling;s&&(s.disabled=!0,s.title=e.modelFixed),this.input("body-model-url").readOnly=!0;const n={said:()=>this.host.said(),writingLanguage:()=>this.host.writingLanguage()};this.bodyForm=new M(this.element("body-parameters"),this.language,"body.",n),this.bodyForm.show(h.BODY,new v(()=>this.current,t=>this.editBody(t),()=>({ids:this.bodies.map(t=>t.id),shapes:this.host.shapes().map(t=>({value:t.id,label:t.label}))})),()=>{}),this.keyForm=new M(this.element("body-key-parameters"),this.language,"bodyKey."),this.keyForm.show(h.KEYFRAME,new v(()=>this.keyframeView(),(t,r)=>this.editView(t,m.APPEARANCE_KEYS.includes(r.key)),()=>this.keyframeContext(),this.host.positionPlace?.()),()=>{}),this.sync()}async syncModelOptions(e){const o=++this.catalogueToken,i=await this.host.modelProvider().entries().catch(()=>[]);if(o!==this.catalogueToken)return;const s=this.messages,n=this.select("body-model"),t=e.model.url===void 0?e.model.id:void 0,r=t===void 0||u.includes(t)||i.some(a=>a.id===t),d=[s.primitives,s.catalogue,i.map(a=>`${a.id}:${a.name}`).join(),e.model.url!==void 0,r?"":t].join("|");if(n.dataset.signature!==d){n.dataset.signature=d;const a=document.createElement("optgroup");a.label=s.primitives,a.append(...u.map(c=>new Option(s.primitive[c],c)));const l=document.createElement("optgroup");l.label=s.catalogue,l.append(...i.map(c=>new Option(c.name,c.id))),n.replaceChildren(a,l),e.model.url!==void 0&&n.prepend(new Option(s.modelAdvanced,"")),r||n.append(new Option(t,t))}n.value=t??"",this.showCatalogueModel(e.model.url===void 0?i.find(a=>a.id===e.model.id):void 0)}showCatalogueModel(e){const o=this.current;if(!o||o.model.url!==void 0){this.shownEntry=void 0,this.element("body-model-catalogue").hidden=!0;return}this.shownEntry=e;const i=this.container.getRootNode().activeElement,s=[["body-model-url",e?.url],["body-model-title",e?.credit.title],["body-model-author",e?.credit.author],["body-model-license",e?.credit.license],["body-model-source",e?.credit.sourceUrl]];for(const[n,t]of s)this.input(n)!==i&&(this.input(n).value=t??"");this.element("body-model-catalogue").hidden=e===void 0,this.element("body-model-incomplete").hidden=!0}updateInterpretationTitle(){const e=this.interpretation??{bodies:[]},o=this.host.said().write(e.title,this.input("body-interpretation-title").value,this.host.writingLanguage());this.write({...e,title:o})}updateCurrent(){const e=this.current;e&&this.write({...this.interpretation,bodies:this.bodies.map(o=>o===e?{...e,model:this.statedModel(e.model)}:o)})}editBody(e){const o=this.current;if(!o)return;const i=structuredClone(o);e(i),this.currentId=i.id,this.write({...this.interpretation,bodies:this.bodies.map(s=>s===o?i:s)})}editView(e,o=!1){const i=this.current,s=this.keyframeView();if(!i||!s)return;const n=this.host.currentTime();e(s);const t=p.keyframeOf(s,n,i.track.find(d=>d.t===n),o),r=[...i.track.filter(d=>d.t!==n),t].sort((d,a)=>d.t-a.t);this.write({...this.interpretation,bodies:this.bodies.map(d=>d===i?{...i,track:r}:d)}),this.syncKeyframe()}async addBody(){if(!this.host.newBodyStart())return;const e=this.messages,o=await this.host.modelProvider().entries().catch(()=>[]),i=document.createElement("select"),s=document.createElement("optgroup");s.label=e.primitives,s.append(...u.map(t=>new Option(e.primitive[t],t)));const n=document.createElement("optgroup");n.label=e.catalogue,n.append(...o.map(t=>new Option(t.name,t.id))),i.append(s,n),this.host.modelPicker().chooseFrom(i,t=>this.modelSourceOf(t),t=>{this.createBody({id:t}),u.includes(t)||this.adoptCatalogueSize(t)},{current:()=>{},apply:t=>this.createBody({url:t.url,credit:t.title!==""&&t.license!==""?{title:t.title,license:t.license,author:t.author||void 0,sourceUrl:t.source||void 0}:void 0})})}createBody(e){const o=this.host.newBodyStart();if(!o)return;const i=new Set(this.bodies.map(r=>r.id));let s=i.size+1;for(;i.has(`body-${s}`);)s++;const n={id:`body-${s}`,explains:o.sourceId!==void 0?[o.sourceId]:void 0,model:e,track:[o.keyframe]};this.currentId=n.id;const t=this.interpretation??{bodies:[]};this.write({...t,bodies:[...this.bodies,n]},!0)}modelSourceOf(e){return u.includes(e)?Promise.resolve({shape:e}):this.host.modelProvider().entry(e).then(o=>o&&{url:o.url,headingOffsetDeg:o.headingOffsetDeg})}async adoptCatalogueSize(e){const i=(await this.host.modelProvider().entry(e).catch(()=>{}))?.sizeM,s=this.current;if(!i||!s||s.model.id!==e)return;if(!s.track.some(t=>t.sizeM)&&s.track.length>0){const[t,...r]=[...s.track].sort((l,c)=>l.t-c.t),d={widthM:i.widthM??1,lengthM:i.lengthM??i.widthM??1,heightM:i.heightM??1},a=[{...t,sizeM:d},...r];this.write({...this.interpretation,bodies:this.bodies.map(l=>l===s?{...s,track:a}:l)},!0);return}const n=s.track.map(t=>{const r=t.sizeM?.widthM,d=i.widthM??r;if(!t.sizeM||r===void 0||d===void 0||r<=0)return t;const a=d/r,l={widthM:i.widthM??t.sizeM.widthM*a,lengthM:i.lengthM??t.sizeM.lengthM*a,heightM:i.heightM??t.sizeM.heightM*a};return t.distanceM!==void 0&&t.azimuthDeg!==void 0?{...t,sizeM:l,distanceM:Number((t.distanceM*a).toFixed(1))}:{...t,sizeM:l}});this.write({...this.interpretation,bodies:this.bodies.map(t=>t===s?{...s,track:n}:t)},!0)}keyframeHere(){this.editView(()=>{})}get currentBodyId(){return this.current?.id}resize(e){const o=i=>Number(Math.max(.01,i).toFixed(2));this.editView(i=>Object.assign(i,{widthM:o(e.widthM),lengthM:o(e.lengthM),heightM:o(e.heightM)}))}turnTo(e){const o=i=>((i+180)%360+360)%360-180;this.editView(i=>Object.assign(i,{headingDeg:Number(((e.headingDeg%360+360)%360).toFixed(1)),pitchDeg:Number(Math.max(-90,Math.min(90,e.pitchDeg)).toFixed(1)),rollDeg:Number(o(e.rollDeg).toFixed(1))}))}show(e){!this.bodies.some(o=>o.id===e)||e===this.currentId||(this.currentId=e,this.sync())}readingNow(){const e=this.current;return e&&this.host.readingOf(e,this.host.currentTime())}dragTo(e,o){const i=this.readingNow();if(!i)return;const s=this.host.currentTime(),n=Math.PI/180,t=r=>Number(r.toFixed(2));this.editView(r=>{const d=r,a=d.onGround?this.host.groundAlong(e,o,s):void 0;if(d.mode==="world"){const l=Math.cos(i.altitudeDeg*n),c=i.eastM-Math.sin(i.azimuthDeg*n)*l*i.distanceM,b=i.northM-Math.cos(i.azimuthDeg*n)*l*i.distanceM,y=Math.hypot(i.eastM-c,i.northM-b),g=a!==void 0?a*Math.cos(o*n):y;if(d.eastM=t(c+Math.sin(e*n)*g),d.northM=t(b+Math.cos(e*n)*g),!d.onGround){const f=k=>Math.max(-89,Math.min(89,k))*n;d.aboveGroundM=t(Math.max(0,i.aboveGroundM+g*(Math.tan(f(o))-Math.tan(f(i.altitudeDeg)))))}}else d.azimuthDeg=t((e%360+360)%360),d.elevationDeg=t(Math.max(-90,Math.min(90,o))),a!==void 0&&(d.distanceM=t(a))})}scaleDistance(e){const o=this.readingNow();if(!o)return;const i=s=>Number(s.toFixed(2));this.editView(s=>{const n=s;if(n.mode==="world"){const t=Math.PI/180,r=Math.cos(o.altitudeDeg*t),d=o.eastM-Math.sin(o.azimuthDeg*t)*r*o.distanceM,a=o.northM-Math.cos(o.azimuthDeg*t)*r*o.distanceM;n.eastM=i(d+(o.eastM-d)*e),n.northM=i(a+(o.northM-a)*e)}else n.distanceM=i(Math.max(.1,o.distanceM*e))})}deleteKeyframe(){const e=this.current;if(!e)return;const o=this.host.currentTime(),i=e.track.filter(s=>s.t!==o);i.length!==e.track.length&&this.write({...this.interpretation,bodies:this.bodies.map(s=>s===e?{...e,track:i}:s)},!0)}static seconds(e){return`${Math.round(e/100)/10} s`}deleteCurrent(){const e=this.current;e&&(this.currentId=void 0,this.write({...this.interpretation,bodies:this.bodies.filter(o=>o!==e)},!0))}statedModel(e){const o=this.stringOrUndefined(this.input("body-model-url").value),i=this.shownEntry,s=t=>this.stringOrUndefined(this.input(t).value);if(i&&o===i.url&&s("body-model-title")===i.credit.title&&s("body-model-author")===i.credit.author&&s("body-model-license")===i.credit.license&&s("body-model-source")===i.credit.sourceUrl)return{id:i.id};if(o){const t=this.stringOrUndefined(this.input("body-model-title").value),r=this.stringOrUndefined(this.input("body-model-license").value);return{url:o,headingOffsetDeg:e.url!==void 0?e.headingOffsetDeg:void 0,credit:t!==void 0&&r!==void 0?{title:t,license:r,author:this.stringOrUndefined(this.input("body-model-author").value),sourceUrl:this.stringOrUndefined(this.input("body-model-source").value)}:void 0}}return{id:this.stringOrUndefined(this.select("body-model").value)??e.id??"ellipsoid"}}write(e,o=!1){const i=C.saysNothing(e,E.kinds());if(this.host.sighting().interpretation=i?void 0:e,this.host.changed(),o){this.sync();return}this.list?.setItems(this.bodies.map(n=>({id:n.id,label:this.labelOf(n)})),this.currentId);const s=this.current;s&&(this.element("body-model-incomplete").hidden=s.model.url===void 0||s.model.credit!==void 0,this.syncModelOptions(s))}labelOf(e){const o=this.host.said().read(e.title);return o?`${o} (${e.id})`:e.id}get interpretation(){return this.host.sighting().interpretation}get bodies(){return this.interpretation?.bodies??[]}get current(){return this.bodies.find(e=>e.id===this.currentId)}stringOrUndefined(e){const o=e.trim();return o===""?void 0:o}list;timeline;element(e){return this.container.querySelector("#"+e)}input(e){return this.element(e)}select(e){return this.element(e)}}export{m as BodyEditor};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import{S as c}from"./SkyEventEditorStyle-CvY_AhbI.js";import{ah as r,ai as u,aj as m,D as p,G as f,z as g,ak as b,J as v,K as y,U as w}from"./rr0-sighting-editor.mjs";import{lanternEditorMessages_en as o}from"./LanternEditorMessages_en-DaT3UNfD.js";class a{static RELEASE={en:"Let go",fr:"Lâcher",es:"Suelta",it:"Lancio"};static LANTERNS={en:"Lanterns",fr:"Lanternes",es:"Farolillos",it:"Lanterne"};static AIR={en:"Air",fr:"Air",es:"Aire",it:"Aria"};static LANTERN={en:"Each lantern",fr:"Chaque lanterne",es:"Cada farolillo",it:"Ogni lanterna"};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:a.LANTERNS}}static wind(e,t,n){return[{type:"number",key:`${e}.towardDeg`,min:0,max:360,step:1,unit:"°",group:a.AIR,hint:n,label:{en:`${t.en}, towards`,fr:`${t.fr}, vers`,es:`${t.es}, hacia`,it:`${t.it}, verso`}},{type:"number",key:`${e}.speedMS`,min:0,max:60,step:.1,unit:"m/s",group:a.AIR,label:{en:`${t.en}, speed`,fr:`${t.fr}, vitesse`,es:`${t.es}, velocidad`,it:`${t.it}, velocità`}}]}static SET={kind:"lantern",title:{en:"Sky lanterns",fr:"Lanternes célestes",es:"Farolillos voladores",it:"Lanterne volanti"},parameters:[{type:"said",key:"title",label:{en:"Name",fr:"Nom",es:"Nombre",it:"Nome"},group:a.RELEASE},{type:"position",key:"site.eastM",secondKey:"site.northM",saidKey:"site.saidPosition",native:"local",step:1,rangeM:1e5,group:a.RELEASE,label:{en:"Where they are let go",fr:"Lieu du lâcher",es:"Lugar de la suelta",it:"Luogo del rilascio"},hint:{en:"Where they are let go: from the witness, from something else in the scene, or as a latitude and a longitude.",fr:"D'où elles sont lâchées : par rapport au témoin, à autre chose dans la scène, ou en latitude et longitude.",es:"Desde dónde se sueltan: respecto al testigo, a otra cosa de la escena, o en latitud y longitud.",it:"Da dove vengono lasciate andare: rispetto al testimone, a qualcos'altro nella scena, o in latitudine e longitudine."}},{type:"number",key:"site.altitudeM",min:-1e3,max:5e3,step:.1,unit:"m",group:a.RELEASE,effective:()=>0,label:{en:"Height above the place's ground",fr:"Hauteur au-dessus du sol du lieu",es:"Altura sobre el suelo del lugar",it:"Altezza sul suolo del luogo"},hint:{en:"A garden on a hill above the place, a roof.",fr:"Un jardin sur une colline au-dessus du lieu, un toit.",es:"Un jardín en una colina sobre el lugar, un tejado.",it:"Un giardino su una collina sopra il luogo, un tetto."}},{type:"number",key:"site.originElevationM",min:-500,max:6e3,step:1,unit:"m",group:a.RELEASE,effective:()=>0,label:{en:"The place's ground above the sea",fr:"Sol du lieu au-dessus de la mer",es:"Suelo del lugar sobre el mar",it:"Suolo del luogo sul mare"},hint:{en:"What sets how thin the air they climb into is: a lantern climbs less high from a mountain town.",fr:"Ce qui règle la raréfaction de l'air où elles montent : une lanterne monte moins haut depuis une ville de montagne.",es:"Lo que fija lo enrarecido del aire en que suben: un farolillo sube menos desde un pueblo de montaña.",it:"Ciò che fissa la rarefazione dell'aria in cui salgono: una lanterna sale meno in alto da un paese di montagna."}},{type:"number",key:"group.count",min:1,max:200,step:1,required:!0,group:a.LANTERNS,label:{en:"How many",fr:"Combien",es:"Cuántos",it:"Quante"}},a.instant("group.fromT",{en:"First let go at",fr:"Première lâchée à",es:"Primero soltado a",it:"Prima lasciata a"},{en:"Seconds of the recording: before its start (negative) for lanterns already up when it begins.",fr:"Secondes de l'enregistrement : avant son début (négatif) pour des lanternes déjà en l'air quand il commence.",es:"Segundos de la grabación: antes de su inicio (negativo) para farolillos ya en el aire cuando empieza.",it:"Secondi della registrazione: prima del suo inizio (negativo) per lanterne già in aria quando inizia."}),a.instant("group.untilT",{en:"Last let go at",fr:"Dernière lâchée à",es:"Último soltado a",it:"Ultima lasciata a"},{en:"Seconds of the recording; the others in between, about evenly.",fr:"Secondes de l'enregistrement ; les autres entre les deux, à peu près régulièrement.",es:"Segundos de la grabación; los demás entre ambos, más o menos regularmente.",it:"Secondi della registrazione; le altre in mezzo, più o meno regolarmente."}),{type:"number",key:"group.radiusM",min:0,max:5e3,step:1,unit:"m",group:a.LANTERNS,effective:()=>20,label:{en:"Let go within",fr:"Lâchées dans un rayon de",es:"Soltados en un radio de",it:"Lasciate entro"},hint:{en:"A crowd lets them go a few metres apart.",fr:"Une foule les lâche à quelques mètres les unes des autres.",es:"Una multitud los suelta a pocos metros unos de otros.",it:"Una folla le lascia andare a pochi metri l'una dall'altra."}},{type:"number",key:"group.burnS.min",min:10,max:3600,step:1,unit:"s",group:a.LANTERNS,effective:()=>480,label:{en:"Burns at least",fr:"Brûle au moins",es:"Arde al menos",it:"Brucia almeno"},hint:{en:"How long each burns from when it is let go, drawn between the two: 8 to 15 minutes by the sellers. It vanishes when it goes out.",fr:"Combien de temps chacune brûle après son lâcher, tiré entre les deux : 8 à 15 minutes selon les vendeurs. Elle disparaît en s'éteignant.",es:"Cuánto arde cada uno desde que se suelta, sorteado entre ambos: de 8 a 15 minutos según los vendedores. Desaparece al apagarse.",it:"Quanto brucia ciascuna da quando è lasciata andare, estratto tra i due: da 8 a 15 minuti secondo i venditori. Scompare spegnendosi."}},{type:"number",key:"group.burnS.max",min:10,max:3600,step:1,unit:"s",group:a.LANTERNS,effective:()=>900,label:{en:"Burns at most",fr:"Brûle au plus",es:"Arde como mucho",it:"Brucia al massimo"}},{type:"number",key:"group.insideExcessK.min",min:10,max:400,step:1,unit:"K",group:a.LANTERNS,effective:()=>125,label:{en:"Hotter than the air, at least",fr:"Plus chaude que l'air, au moins",es:"Más caliente que el aire, al menos",it:"Più calda dell'aria, almeno"},hint:{en:"How much hotter than the air its air is at full burn, drawn between the two: what sets how fast it climbs, and so how high it gets.",fr:"De combien son air est plus chaud que l'air autour à plein feu, tiré entre les deux : ce qui règle à quelle vitesse elle monte, et donc jusqu'où.",es:"Cuánto más caliente que el aire está su aire a pleno fuego, sorteado entre ambos: lo que fija lo rápido que sube, y por tanto hasta dónde.",it:"Di quanto la sua aria è più calda dell'aria intorno a piena fiamma, estratto tra i due: ciò che fissa quanto in fretta sale, e quindi fin dove."}},{type:"number",key:"group.insideExcessK.max",min:10,max:400,step:1,unit:"K",group:a.LANTERNS,effective:()=>175,label:{en:"Hotter than the air, at most",fr:"Plus chaude que l'air, au plus",es:"Más caliente que el aire, como mucho",it:"Più calda dell'aria, al massimo"}},{type:"number",key:"group.burnedS",min:0,max:3600,step:1,unit:"s",group:a.LANTERNS,effective:()=>0,label:{en:"Already burnt when let go",fr:"Déjà brûlé au lâcher",es:"Ya ardido al soltarlo",it:"Già bruciato al lancio"},hint:{en:"For lanterns the account only has from where they were first seen, already up and partly burnt.",fr:"Pour des lanternes que le compte rendu n'a que depuis là où elles ont été vues la première fois, déjà en l'air et en partie consumées.",es:"Para farolillos que el relato solo tiene desde donde se vieron por primera vez, ya en el aire y en parte consumidos.",it:"Per lanterne che il resoconto ha solo da dove sono state viste la prima volta, già in aria e in parte consumate."}},{type:"number",key:"group.seed",min:0,max:4294967295,step:1,group:a.LANTERNS,effective:()=>1,label:{en:"Draw",fr:"Tirage",es:"Sorteo",it:"Estrazione"},hint:{en:"What the draws start from: another number, other lanterns within the same bounds, the same each time for the same number.",fr:"Ce dont partent les tirages : un autre nombre, d'autres lanternes dans les mêmes bornes, les mêmes à chaque fois pour le même nombre.",es:"De qué parten los sorteos: otro número, otros farolillos dentro de los mismos límites, los mismos cada vez para el mismo número.",it:"Da cosa partono le estrazioni: un altro numero, altre lanterne negli stessi limiti, le stesse ogni volta per lo stesso numero."}},{type:"set",key:"group.explains",group:a.LANTERNS,label:{en:"Stand for the shapes",fr:"Représentent les formes",es:"Representan las formas",it:"Rappresentano le forme"},options:(e,t)=>{const n=t?.shapes??[],s=(e.group?.explains??[]).filter(i=>!n.some(l=>l.value===i));return[...n,...s.map(i=>({value:i,label:i}))]},empty:{en:"No shape",fr:"Aucune forme",es:"Ninguna forma",it:"Nessuna forma"}},...a.wind("wind",{en:"Wind at the ground",fr:"Vent au sol",es:"Viento en el suelo",it:"Vento al suolo"},{en:"Where it blows TOWARDS, which is where the lanterns go: the opposite of where a weather report says it comes from.",fr:"Là où il souffle, VERS où, qui est où vont les lanternes : l'inverse d'où un bulletin météo dit qu'il vient.",es:"Hacia DÓNDE sopla, que es adonde van los farolillos: lo contrario de donde un parte dice que viene.",it:"VERSO dove soffia, che è dove vanno le lanterne: l'opposto di da dove un bollettino dice che viene."}),...a.wind("windAloft",{en:"Wind aloft",fr:"Vent en altitude",es:"Viento en altura",it:"Vento in quota"},{en:"The wind higher up, blended with the ground's in between: what makes lanterns let go at one spot part ways as they climb.",fr:"Le vent plus haut, mêlé à celui du sol entre les deux : ce qui fait se séparer en montant des lanternes lâchées au même endroit.",es:"El viento más arriba, mezclado con el del suelo en medio: lo que separa al subir farolillos soltados en el mismo sitio.",it:"Il vento più in alto, mescolato a quello al suolo nel mezzo: ciò che separa salendo lanterne lasciate andare nello stesso punto."}),{type:"number",key:"windAloft.atM",min:10,max:1e4,step:10,unit:"m",group:a.AIR,label:{en:"Wind aloft, at",fr:"Vent en altitude, à",es:"Viento en altura, a",it:"Vento in quota, a"},hint:{en:"Metres above where they are let go.",fr:"Mètres au-dessus d'où elles sont lâchées.",es:"Metros sobre donde se sueltan.",it:"Metri sopra dove vengono lasciate andare."}},{type:"number",key:"airTemperatureC",min:-60,max:50,step:.5,unit:"°C",group:a.AIR,effective:()=>10,label:{en:"Air temperature",fr:"Température de l'air",es:"Temperatura del aire",it:"Temperatura dell'aria"},hint:{en:"At the ground, falling by 6.5 °C a kilometre above: what their hot air is lighter than. A cold night lifts them higher.",fr:"Au sol, baissant de 6,5 °C par kilomètre au-dessus : ce dont leur air chaud est plus léger. Une nuit froide les porte plus haut.",es:"En el suelo, bajando 6,5 °C por kilómetro: de lo que su aire caliente es más ligero. Una noche fría los sube más.",it:"Al suolo, calando di 6,5 °C per chilometro: ciò di cui la loro aria calda è più leggera. Una notte fredda le porta più in alto."}},{type:"number",key:"turbulence.horizontalMS",min:0,max:10,step:.1,unit:"m/s",group:a.AIR,effective:()=>r.TURBULENCE.horizontalMS,label:{en:"Gusts, across",fr:"Rafales, à l'horizontale",es:"Ráfagas, en horizontal",it:"Raffiche, in orizzontale"},hint:{en:"How far the air's speed strays from the wind's, each lantern meeting its own gusts: what stretches a group into a shifting string. 0 for a still air.",fr:"De combien la vitesse de l'air s'écarte de celle du vent, chaque lanterne prise dans ses propres rafales : ce qui étire un groupe en une file mouvante. 0 pour un air immobile.",es:"Cuánto se aparta la velocidad del aire de la del viento, cada farolillo en sus propias ráfagas: lo que estira un grupo en una fila cambiante. 0 para un aire quieto.",it:"Di quanto la velocità dell'aria si scosta da quella del vento, ogni lanterna nelle proprie raffiche: ciò che allunga un gruppo in una fila mutevole. 0 per un'aria ferma."}},{type:"number",key:"turbulence.verticalMS",min:0,max:10,step:.1,unit:"m/s",group:a.AIR,effective:()=>r.TURBULENCE.verticalMS,label:{en:"Gusts, up and down",fr:"Rafales, de haut en bas",es:"Ráfagas, arriba y abajo",it:"Raffiche, in su e in giù"}},{type:"number",key:"turbulence.timescaleS",min:1,max:600,step:1,unit:"s",group:a.AIR,effective:()=>r.TURBULENCE.timescaleS,label:{en:"A gust lasts",fr:"Une rafale dure",es:"Una ráfaga dura",it:"Una raffica dura"}},{type:"number",key:"lantern.luminousIntensityCd",min:.1,max:1e3,step:.1,unit:"cd",group:a.LANTERN,effective:()=>r.COMMON.luminousIntensityCd,label:{en:"Light",fr:"Lumière",es:"Luz",it:"Luce"},hint:{en:"Its flame's light through the paper, at full burn.",fr:"La lumière de sa flamme à travers le papier, à plein feu.",es:"La luz de su llama a través del papel, a pleno fuego.",it:"La luce della sua fiamma attraverso la carta, a piena fiamma."}},{type:"choice",key:"lantern.shape",group:a.LANTERN,effective:()=>r.COMMON.shape,label:{en:"Shape",fr:"Forme",es:"Forma",it:"Forma"},choices:[{value:"classic",label:{en:"Round at the mouth, square at the top",fr:"Ronde à la base, carrée au sommet",es:"Redonda en la base, cuadrada arriba",it:"Rotonda alla base, quadrata in cima"}},{value:"balloon",label:{en:"Balloon, lobed top",fr:"Montgolfière, sommet en lobes",es:"Globo, cima lobulada",it:"Mongolfiera, cima a lobi"}}]},{type:"colour",key:"lantern.paperColor",group:a.LANTERN,fallback:r.COMMON.paperColor,label:{en:"Paper colour",fr:"Couleur du papier",es:"Color del papel",it:"Colore della carta"},hint:{en:"What it looks like by day; by night, what its flame's light comes through.",fr:"Son aspect de jour ; de nuit, ce que traverse la lumière de sa flamme.",es:"Su aspecto de día; de noche, lo que atraviesa la luz de su llama.",it:"Il suo aspetto di giorno; di notte, ciò che attraversa la luce della sua fiamma."}},{type:"colour",key:"lantern.color",group:a.LANTERN,fallback:r.COMMON.color,label:{en:"Flame light",fr:"Lumière de la flamme",es:"Luz de la llama",it:"Luce della fiamma"},hint:{en:"Its flame's light through white paper.",fr:"La lumière de sa flamme à travers un papier blanc.",es:"La luz de su llama a través de un papel blanco.",it:"La luce della sua fiamma attraverso una carta bianca."}},{type:"number",key:"lantern.envelopeVolumeM3",min:.01,max:10,step:.01,unit:"m³",group:a.LANTERN,effective:()=>r.COMMON.envelopeVolumeM3,label:{en:"Air it holds",fr:"Air qu'elle contient",es:"Aire que contiene",it:"Aria che contiene"}},{type:"number",key:"lantern.massKg",min:.005,max:5,step:.001,unit:"kg",group:a.LANTERN,effective:()=>r.COMMON.massKg,label:{en:"Weight when let go",fr:"Poids au lâcher",es:"Peso al soltarlo",it:"Peso al lancio"}}]};static publish(){u.publish(a.SET)}}class d{constructor(e,t,n){this.container=e,this.host=t,c.attach(e,"lantern-editor-part",d.STYLE),this.language=n,u.of("lantern")||a.publish(),this.render(),this.setLanguage(n)}messages=o;languageToken=0;currentId;form;list;language;shown=[];static STYLE='.lantern-editor-part { flex-basis: 100%; min-width: 0; } .lantern-editor-part #lantern-list { flex-basis: 100%; min-width: 0; } .lantern-editor-part .launch-editor, .lantern-editor-part .launch-fields { display: flex; flex-wrap: wrap; gap: 8px; align-items: end; } .lantern-editor-part .launch-fields { flex-basis: 100%; min-width: 0; } .lantern-editor-part [hidden] { display: none !important; } .lantern-editor-part select { min-width: 0; width: 100%; } .lantern-editor-part .launch-intro { flex-basis: 100%; margin: 0; } .lantern-editor-part .launch-parameters { flex-basis: 100%; min-width: 0; display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-start; } .lantern-editor-part .parameter-group { flex: 1 1 14em; min-width: 0; box-sizing: border-box; margin: 0; display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: flex-start; align-content: flex-start; } .lantern-editor-part input, .lantern-editor-part select { max-width: 100%; box-sizing: border-box; } .lantern-editor-part input[type="text"] { width: 12em; } .lantern-editor-part label { min-width: 0; max-width: 100%; } .lantern-editor-part input.parameter-derived::placeholder { opacity: .65; }';async setLanguage(e){const t=++this.languageToken;this.language=e;const n=w.includes(e)?e:"en",s=n==="en"?o:await m(n);t===this.languageToken&&(this.messages=s,this.render(),this.sync())}sync(){const e=this.launches;this.shown=[...e],e.some(i=>i.id===this.currentId)||(this.currentId=e[0]?.id),this.list?.setItems(e.map(i=>({id:i.id,label:this.labelOf(i)})),this.currentId),this.syncAddState();const t=this.current;if(this.element("lantern-fields").hidden=t===void 0,!t)return;const n=t.releases?.length??0,s=this.element("lantern-releases");s.hidden=n===0,s.textContent=this.messages.releasesNote.replace("{n}",String(n)),this.form??=new p(this.element("lantern-parameters"),this.language,"lantern.",{said:()=>this.host.said(),writingLanguage:()=>this.host.writingLanguage()}),this.form.show(a.SET,new f(()=>this.current,i=>this.editLaunch(l=>i(l)),()=>({shapes:this.host.shapes().map(i=>({value:i.id,label:i.label}))}),this.host.positionPlace?.()),()=>this.written())}refresh(){this.syncAddState();const e=this.launches;e.length===this.shown.length&&e.every((t,n)=>t.id===this.shown[n].id)||this.sync()}syncAddState(){const e=this.siteOfNew()!==void 0;this.list?.setAddState(e,e?void 0:this.messages.addLaunchNowhere)}get current(){return this.launches.find(e=>e.id===this.currentId)}render(){const e=this.messages;this.form=void 0,this.container.innerHTML=`<div class="launch-editor">
|
|
2
|
-
<p class="launch-intro">${e.intro}</p>
|
|
3
|
-
<div id="lantern-list"></div>
|
|
4
|
-
<div id="lantern-fields" class="launch-fields">
|
|
5
|
-
<div id="lantern-parameters" class="launch-parameters"></div>
|
|
6
|
-
<p id="lantern-releases" class="launch-intro" hidden></p>
|
|
7
|
-
<p class="launch-intro">${e.derivedNote}</p>
|
|
8
|
-
</div>
|
|
9
|
-
</div>`,this.list=new g({header:this.element("lantern-list"),body:this.element("lantern-fields"),ids:{list:"lantern-select",remove:"lantern-delete",add:"lantern-add"},onSelect:t=>{this.currentId=t,this.sync()},onAdd:()=>this.addLaunch(),onRemove:()=>this.deleteCurrent()}),this.list.setLabels({list:e.launch,remove:e.deleteLaunch,add:e.addLaunch,empty:e.none})}written(){const e=this.current;e&&this.list?.rename(e.id,this.labelOf(e))}editLaunch(e){const t=this.current;if(!t)return;const n=structuredClone(t);e(n),this.writeLaunches(this.launches.map(s=>s===t?n:s)),this.host.changed()}siteOfNew(){const e=this.host.sighting(),t=e.event?.place?.[0];if(t?.lat===void 0||t.lng===void 0)return;const n=e.observerTrack?.getInterpolatedPoseAt(0),s=(n?.headingDeg??0)*Math.PI/180,i=111320,l=n?.lng!==void 0?(n.lng-t.lng)*i*Math.cos(t.lat*Math.PI/180):0,h=n?.lat!==void 0?(n.lat-t.lat)*i:0;return{eastM:Math.round(l+1500*Math.sin(s)),northM:Math.round(h+1500*Math.cos(s))}}addLaunch(){const e=this.siteOfNew();if(!e)return;let t=this.launches.length+1;for(;this.launches.some(i=>i.id===`lanterns-${t}`);)t++;const n=b(this.host.sighting(),0),s={id:`lanterns-${t}`,site:e,group:{count:12,fromT:0,untilT:12e4,seed:t},wind:{towardDeg:Math.round((n.windDirectionDeg+180)%360),speedMS:Math.round(n.windSpeed*10)/10}};this.writeLaunches([...this.launches,s]),this.currentId=s.id,this.host.changed(),this.sync()}deleteCurrent(){const e=this.current;e&&(this.currentId=void 0,this.writeLaunches(this.launches.filter(t=>t!==e)),this.host.changed(),this.sync())}writeLaunches(e){const t=this.host.sighting(),n={...t.interpretation??{bodies:[]},lanterns:e.length>0?e:void 0};n.lanterns===void 0&&delete n.lanterns;const s=v.saysNothing(n,y.kinds());t.interpretation=s?void 0:n}labelOf(e){const t=this.host.said().read(e.title);return t?`${t} (${e.id})`:e.id}get launches(){return this.host.sighting().interpretation?.lanterns??[]}element(e){return this.container.querySelector(`#${e}`)}}export{d as LanternEditor};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{Z as O,aq as D,ar as y}from"./rr0-sighting-editor.mjs";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};
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import{S as y}from"./SkyEventEditorStyle-CvY_AhbI.js";import{L as v}from"./LaunchPlume-Dm1YdsZp.js";import{ai as f,aA as w,D as g,b as p,z as j,C as T,G as b,at as k,U as E}from"./rr0-sighting-editor.mjs";import{launchEditorMessages_en as x}from"./LaunchEditorMessages_en-BnzNAYW9.js";class n{static plumeValue(e){return t=>v.plumeOf(t)[e]}static plume(e,t){return{type:"number",key:`plume.${e}`,effective:n.plumeValue(e),...t}}static burn(e,t){return{type:"number",key:e,min:-3600,max:36e3,step:.1,unit:"s",scale:.001,label:t.label,hint:t.hint,group:{en:"Engine",fr:"Moteur",es:"Motor",it:"Motore"},effective:i=>t.ends(i.track??[])?.t}}static placeAt(e,t){if(e.length===0)return{t,lat:0,lng:0,altitudeKm:0};if(e.length===1)return{t,lat:e[0].lat,lng:e[0].lng,altitudeKm:e[0].altitudeKm};let i=0;for(;i<e.length-2&&e[i+1].t<t;)i++;const a=e[i],s=e[i+1],l=s.t===a.t?0:(t-a.t)/(s.t-a.t),d=(u,r)=>u+(r-u)*l;return{t,lat:d(a.lat,s.lat),lng:d(a.lng,s.lng),altitudeKm:Math.max(0,d(a.altitudeKm,s.altitudeKm))}}static instantsOf(e){return[...e.track.map(t=>t.t),...[e.burnFromT,e.burnUntilT].filter(t=>t!==void 0),...(e.jets??[]).flatMap(t=>[t.fromT,t.untilT])]}static SET={kind:"launch",title:{en:"Launch",fr:"Lancement",es:"Lanzamiento",it:"Lancio"},parameters:[{type:"said",key:"title",label:{en:"Name",fr:"Nom",es:"Nombre",it:"Nome"},group:{en:"Vehicle",fr:"Lanceur",es:"Lanzador",it:"Lanciatore"}},{type:"text",key:"vehicle.mission",label:{en:"Mission",fr:"Mission",es:"Misión",it:"Missione"},placeholder:"Starlink Group 10-49",group:{en:"Vehicle",fr:"Lanceur",es:"Lanzador",it:"Lanciatore"}},{type:"number",key:"vehicle.engine.thrustKN",min:1,max:1e5,step:1,unit:"kN",label:{en:"Thrust (vacuum)",fr:"Poussée (dans le vide)",es:"Empuje (en el vacío)",it:"Spinta (nel vuoto)"},hint:{en:"Merlin Vacuum 934, RL10 110, a solid booster several thousand. With the specific impulse, it sets how much exhaust leaves each second.",fr:"Merlin Vacuum 934, RL10 110, un booster à poudre plusieurs milliers. Avec l'impulsion spécifique, elle fixe le débit d'échappement.",es:"Merlin Vacuum 934, RL10 110, un propulsor sólido varios miles. Con el impulso específico, fija el caudal de escape.",it:"Merlin Vacuum 934, RL10 110, un booster solido diverse migliaia. Con l'impulso specifico, fissa la portata dello scarico."},group:{en:"Engine",fr:"Moteur",es:"Motor",it:"Motore"}},{type:"number",key:"vehicle.engine.specificImpulseS",min:100,max:500,step:1,unit:"s",label:{en:"Specific impulse (vacuum)",fr:"Impulsion spécifique (dans le vide)",es:"Impulso específico (en el vacío)",it:"Impulso specifico (nel vuoto)"},hint:{en:"Times 9.81 m/s² it is the exhaust velocity, which sets how fast the exhaust spreads round the stage: 348 s is 3.4 km/s.",fr:"Multipliée par 9,81 m/s², c'est la vitesse d'éjection, qui fixe la vitesse à laquelle l'échappement s'étale autour de l'étage : 348 s font 3,4 km/s.",es:"Multiplicado por 9,81 m/s² es la velocidad de escape, que fija la rapidez con que el escape se extiende alrededor de la etapa: 348 s son 3,4 km/s.",it:"Moltiplicato per 9,81 m/s² è la velocità di scarico, che fissa quanto in fretta lo scarico si allarga attorno allo stadio: 348 s sono 3,4 km/s."},group:{en:"Engine",fr:"Moteur",es:"Motor",it:"Motore"}},{type:"choice",key:"vehicle.engine.propellant",label:{en:"Propellant",fr:"Ergols",es:"Propelentes",it:"Propellenti"},hint:{en:"What the exhaust is made of decides how much of it turns into particles that scatter light.",fr:"Ce dont l'échappement est fait décide quelle part devient des particules qui diffusent la lumière.",es:"De qué está hecho el escape decide qué parte se vuelve partículas que difunden la luz.",it:"Di cosa è fatto lo scarico decide quanta parte diventa particelle che diffondono la luce."},choices:[{value:"rp1-lox",label:{en:"Kerosene and oxygen",fr:"Kérosène et oxygène",es:"Queroseno y oxígeno",it:"Cherosene e ossigeno"}},{value:"methane-lox",label:{en:"Methane and oxygen",fr:"Méthane et oxygène",es:"Metano y oxígeno",it:"Metano e ossigeno"}},{value:"hydrogen-lox",label:{en:"Hydrogen and oxygen",fr:"Hydrogène et oxygène",es:"Hidrógeno y oxígeno",it:"Idrogeno e ossigeno"}},{value:"hypergolic",label:{en:"Hypergolic",fr:"Hypergolique",es:"Hipergólico",it:"Ipergolico"}},{value:"solid",label:{en:"Solid",fr:"Poudre",es:"Sólido",it:"Solido"}}],group:{en:"Engine",fr:"Moteur",es:"Motor",it:"Motore"}},n.burn("burnFromT",{label:{en:"Engine start",fr:"Allumage du moteur",es:"Encendido del motor",it:"Accensione del motore"},hint:{en:"When the engine started, in seconds of the recording; it may be before it. Empty: the first point of the path.",fr:"Quand le moteur s'est allumé, en secondes de l'enregistrement ; avant lui si besoin. Vide : le premier point du chemin.",es:"Cuándo se encendió el motor, en segundos de la grabación; puede ser antes. Vacío: el primer punto de la trayectoria.",it:"Quando si è acceso il motore, in secondi della registrazione; può essere prima. Vuoto: il primo punto del percorso."},ends:e=>e[0]}),n.burn("burnUntilT",{label:{en:"Engine cut-off",fr:"Extinction du moteur",es:"Apagado del motor",it:"Spegnimento del motore"},hint:{en:"When the engine stopped, in seconds of the recording. Empty: the last point of the path. Nothing is let go after it.",fr:"Quand le moteur s'est éteint, en secondes de l'enregistrement. Vide : le dernier point du chemin. Rien n'est lâché après.",es:"Cuándo se apagó el motor, en segundos de la grabación. Vacío: el último punto de la trayectoria. Nada se suelta después.",it:"Quando si è spento il motore, in secondi della registrazione. Vuoto: l'ultimo punto del percorso. Dopo non si rilascia nulla."},ends:e=>e[e.length-1]}),n.plume("exhaustKgPerS",{min:.1,max:1e5,step:.1,unit:"kg/s",label:{en:"Exhaust flow",fr:"Débit d'échappement",es:"Caudal de escape",it:"Portata di scarico"},hint:{en:"How much exhaust leaves the engine each second: how bright the plume is. Thrust over exhaust velocity when the engine is stated.",fr:"La masse d'échappement qui sort du moteur chaque seconde : la luminosité du panache. La poussée sur la vitesse d'éjection quand le moteur est donné.",es:"La masa de escape que sale del motor cada segundo: el brillo de la estela. El empuje sobre la velocidad de escape cuando se da el motor.",it:"La massa di scarico che esce dal motore ogni secondo: la luminosità della scia. La spinta sulla velocità di scarico quando il motore è dato."},group:{en:"Plume",fr:"Panache",es:"Estela",it:"Scia"}}),n.plume("condensedShare",{min:0,max:1,step:.01,label:{en:"Share that scatters",fr:"Part qui diffuse",es:"Parte que difunde",it:"Parte che diffonde"},hint:{en:"The share of the exhaust that ends up as particles that scatter the Sun's light. Nobody has measured it for a launch: the one number to fit against a photograph.",fr:"La part de l'échappement qui devient des particules diffusant la lumière du Soleil. Personne ne l'a mesurée pour un lancement : le seul nombre à caler sur une photographie.",es:"La parte del escape que acaba como partículas que difunden la luz del Sol. Nadie la ha medido para un lanzamiento: el único número que ajustar con una fotografía.",it:"La parte dello scarico che diventa particelle che diffondono la luce del Sole. Nessuno l'ha misurata per un lancio: l'unico numero da tarare su una fotografia."},group:{en:"Plume",fr:"Panache",es:"Estela",it:"Scia"}}),n.plume("particleRadiusUm",{min:.05,max:5,step:.05,unit:"µm",label:{en:"Particle radius",fr:"Rayon des particules",es:"Radio de las partículas",it:"Raggio delle particelle"},group:{en:"Plume",fr:"Panache",es:"Estela",it:"Scia"}}),n.plume("lifetimeS",{min:10,max:3600,step:10,unit:"s",label:{en:"Trail lifetime",fr:"Durée de la traînée",es:"Duración de la estela",it:"Durata della scia"},hint:{en:"How long the narrow trail lasts before the particles have gone.",fr:"Combien de temps la traînée étroite dure avant que les particules aient disparu.",es:"Cuánto dura la estela estrecha antes de que las partículas hayan desaparecido.",it:"Quanto dura la scia stretta prima che le particelle siano sparite."},group:{en:"Plume",fr:"Panache",es:"Estela",it:"Scia"}}),n.plume("expansionKmPerS",{min:0,max:5,step:.01,unit:"km/s",label:{en:"Trail spreading",fr:"Étalement de la traînée",es:"Expansión de la estela",it:"Espansione della scia"},group:{en:"Plume",fr:"Panache",es:"Estela",it:"Scia"}}),n.plume("initialRadiusKm",{min:0,max:50,step:.1,unit:"km",label:{en:"Radius at release",fr:"Rayon au lâcher",es:"Radio al soltar",it:"Raggio al rilascio"},group:{en:"Plume",fr:"Panache",es:"Estela",it:"Scia"}}),n.plume("collarShare",{min:0,max:1,step:.01,label:{en:"Share in the collar",fr:"Part dans la collerette",es:"Parte en el collar",it:"Parte nel collare"},hint:{en:"The collar is the exhaust just let go, which spreads fast into a wide short-lived shell round the stage; the rest stays behind as the narrow trail.",fr:"La collerette est l'échappement qui vient d'être lâché, qui s'étale vite en une coque large et brève autour de l'étage ; le reste demeure derrière en traînée étroite.",es:"El collar es el escape recién soltado, que se extiende rápido en una envoltura ancha y breve alrededor de la etapa; el resto queda detrás como estela estrecha.",it:"Il collare è lo scarico appena rilasciato, che si allarga in fretta in un guscio largo e breve attorno allo stadio; il resto resta dietro come scia stretta."},group:{en:"Collar",fr:"Collerette",es:"Collar",it:"Collare"}}),n.plume("collarExpansionKmPerS",{min:0,max:10,step:.05,unit:"km/s",label:{en:"Collar spreading",fr:"Étalement de la collerette",es:"Expansión del collar",it:"Espansione del collare"},hint:{en:"How fast the collar widens: three quarters of the exhaust velocity when the engine is stated.",fr:"La vitesse à laquelle la collerette s'élargit : les trois quarts de la vitesse d'éjection quand le moteur est donné.",es:"La rapidez con que el collar se ensancha: tres cuartos de la velocidad de escape cuando se da el motor.",it:"Quanto in fretta il collare si allarga: tre quarti della velocità di scarico quando il motore è dato."},group:{en:"Collar",fr:"Collerette",es:"Collar",it:"Collare"}}),n.plume("collarLifetimeS",{min:1,max:300,step:1,unit:"s",label:{en:"Collar lifetime",fr:"Durée de la collerette",es:"Duración del collar",it:"Durata del collare"},group:{en:"Collar",fr:"Collerette",es:"Collar",it:"Collare"}})]};static PLACE={kind:"launch-place",title:{en:"Place of the path",fr:"Point du chemin",es:"Punto de la trayectoria",it:"Punto del percorso"},parameters:[{type:"number",key:"t",min:-3600,max:36e3,step:.1,unit:"s",scale:.001,required:!0,label:{en:"Time",fr:"Instant",es:"Instante",it:"Istante"},hint:{en:"Seconds of the recording; negative before it began: a stage seen minutes after its launch was already high when the recording started.",fr:"Secondes de l'enregistrement ; négatives avant son début : un étage vu des minutes après son lancement était déjà haut quand l'enregistrement a commencé.",es:"Segundos de la grabación; negativos antes de que empezara: una etapa vista minutos después de su lanzamiento ya estaba alta cuando empezó la grabación.",it:"Secondi della registrazione; negativi prima del suo inizio: uno stadio visto minuti dopo il lancio era già alto quando la registrazione è iniziata."}},{type:"position",key:"lat",secondKey:"lng",saidKey:"saidPosition",native:"geo",step:1,label:{en:"Position",fr:"Position",es:"Posición",it:"Posizione"}},{type:"number",key:"altitudeKm",min:0,max:2e3,step:.1,unit:"km",required:!0,label:{en:"Altitude",fr:"Altitude",es:"Altitud",it:"Altitudine"}}]};static jetContext(e,t){return{launch:e,index:t}}static jetValue(e){return(t,i)=>{const{launch:a,index:s}=i??{};return a?e(v.releaseOf(a,t,s)):void 0}}static JET_GROUP={en:"Jet",fr:"Jet",es:"Chorro",it:"Getto"};static JET={kind:"launch-jet",title:{en:"Jet",fr:"Jet",es:"Chorro",it:"Getto"},parameters:[{type:"choice",key:"kind",required:!0,label:{en:"What",fr:"Quoi",es:"Qué",it:"Cosa"},choices:[{value:"burn",label:{en:"Engine burn",fr:"Allumage du moteur",es:"Encendido del motor",it:"Accensione del motore"}},{value:"vent",label:{en:"Propellant vented",fr:"Ergols vidangés",es:"Propelentes purgados",it:"Propellenti scaricati"}}],group:n.JET_GROUP},{type:"number",key:"fromT",min:-36e3,max:36e3,step:.1,unit:"s",scale:.001,required:!0,label:{en:"From",fr:"Début",es:"Desde",it:"Da"},hint:{en:"Seconds of the recording; negative before it began.",fr:"Secondes de l'enregistrement ; négatives avant son début.",es:"Segundos de la grabación; negativos antes de que empezara.",it:"Secondi della registrazione; negativi prima del suo inizio."},group:n.JET_GROUP},{type:"number",key:"untilT",min:-36e3,max:36e3,step:.1,unit:"s",scale:.001,required:!0,label:{en:"Until",fr:"Fin",es:"Hasta",it:"Fino a"},group:n.JET_GROUP},{type:"number",key:"angleDeg",min:0,max:180,step:1,unit:"°",effective:()=>0,label:{en:"Direction from aft",fr:"Direction depuis l'arrière",es:"Dirección desde atrás",it:"Direzione da dietro"},hint:{en:"0 straight back along the stage's motion (an engine pushing it on), 90 sideways, 180 straight ahead (an engine braking it).",fr:"0 droit vers l'arrière du mouvement de l'étage (un moteur qui le pousse), 90 sur le côté, 180 droit devant (un moteur qui le freine).",es:"0 hacia atrás del movimiento de la etapa (un motor que la empuja), 90 de lado, 180 hacia delante (un motor que la frena).",it:"0 dritto all'indietro rispetto al moto dello stadio (un motore che lo spinge), 90 di lato, 180 dritto in avanti (un motore che lo frena)."},group:n.JET_GROUP},{type:"number",key:"azimuthDeg",min:-360,max:360,step:1,unit:"°",effective:()=>0,label:{en:"Side",fr:"Côté",es:"Lado",it:"Lato"},hint:{en:"Round the line of motion, which side it leaves on at the start: 0 away from the Earth, 90 to the right of the motion.",fr:"Autour de la ligne du mouvement, le côté par lequel il part au début : 0 à l'opposé de la Terre, 90 à droite du mouvement.",es:"Alrededor de la línea del movimiento, el lado por el que sale al principio: 0 opuesto a la Tierra, 90 a la derecha del movimiento.",it:"Attorno alla linea del moto, il lato da cui esce all'inizio: 0 opposto alla Terra, 90 a destra del moto."},group:n.JET_GROUP},{type:"number",key:"spinPeriodS",min:-3600,max:3600,step:.1,unit:"s",label:{en:"Spin period",fr:"Période de rotation",es:"Período de giro",it:"Periodo di rotazione"},hint:{en:"How long the stage takes to turn once round its line of motion; the jet turns with it and vented propellant draws a spiral. Negative turns the other way. Empty: it does not turn.",fr:"Le temps que met l'étage à faire un tour autour de sa ligne de mouvement ; le jet tourne avec lui et les ergols vidangés dessinent une spirale. Négative : dans l'autre sens. Vide : il ne tourne pas.",es:"Lo que tarda la etapa en dar una vuelta alrededor de su línea de movimiento; el chorro gira con ella y los propelentes purgados dibujan una espiral. Negativo: en el otro sentido. Vacío: no gira.",it:"Il tempo che lo stadio impiega a fare un giro attorno alla sua linea di moto; il getto gira con lui e i propellenti scaricati disegnano una spirale. Negativo: nell'altro verso. Vuoto: non gira."},group:n.JET_GROUP},{type:"number",key:"speedKmPerS",min:0,max:10,step:.01,unit:"km/s",effective:n.jetValue(e=>e.speedKmPerS),label:{en:"Speed",fr:"Vitesse",es:"Velocidad",it:"Velocità"},hint:{en:"How fast it leaves the stage. A burn: the engine's exhaust velocity.",fr:"La vitesse à laquelle il quitte l'étage. Un allumage : la vitesse d'éjection du moteur.",es:"La velocidad con que sale de la etapa. Un encendido: la velocidad de escape del motor.",it:"La velocità con cui lascia lo stadio. Un'accensione: la velocità di scarico del motore."},group:n.JET_GROUP},{type:"number",key:"massKgPerS",min:0,max:1e5,step:.1,unit:"kg/s",effective:n.jetValue(e=>e.massKgPerS),label:{en:"Flow",fr:"Débit",es:"Caudal",it:"Portata"},group:n.JET_GROUP},{type:"number",key:"condensedShare",min:0,max:1,step:.01,effective:n.jetValue(e=>e.condensedShare),label:{en:"Share that scatters",fr:"Part qui diffuse",es:"Parte que difunde",it:"Parte che diffonde"},group:n.JET_GROUP},{type:"number",key:"particleRadiusUm",min:.05,max:5,step:.05,unit:"µm",effective:n.jetValue(e=>e.particleRadiusUm),label:{en:"Particle radius",fr:"Rayon des particules",es:"Radio de las partículas",it:"Raggio delle particelle"},group:n.JET_GROUP},{type:"number",key:"expansionKmPerS",min:0,max:5,step:.01,unit:"km/s",effective:n.jetValue(e=>e.populations[0].expansionKmPerS),label:{en:"Spreading",fr:"Étalement",es:"Expansión",it:"Espansione"},hint:{en:"How fast each puff of it widens: a narrow jet keeps the arms of a spiral apart.",fr:"La vitesse à laquelle chaque bouffée s'élargit : un jet étroit garde les bras d'une spirale séparés.",es:"La rapidez con que se ensancha cada bocanada: un chorro estrecho mantiene separados los brazos de una espiral.",it:"Quanto in fretta si allarga ogni sbuffo: un getto stretto tiene separati i bracci di una spirale."},group:n.JET_GROUP},{type:"number",key:"initialRadiusKm",min:0,max:50,step:.1,unit:"km",effective:n.jetValue(e=>e.initialRadiusKm),label:{en:"Radius at release",fr:"Rayon au lâcher",es:"Radio al soltar",it:"Raggio al rilascio"},group:n.JET_GROUP},{type:"number",key:"lifetimeS",min:1,max:7200,step:1,unit:"s",effective:n.jetValue(e=>e.populations[0].lifetimeS),label:{en:"Lifetime",fr:"Durée",es:"Duración",it:"Durata"},group:n.JET_GROUP}]};static publish(){f.publish(n.SET)}}class c{constructor(e,t,i){this.container=e,this.host=t,y.attach(e,"launch-editor-part",c.STYLE),this.language=i,f.of("launch")||n.publish(),this.render(),this.setLanguage(i)}messages=x;languageToken=0;currentId;form;list;timeline;row="path";placeForm;placeIndex=0;jetForm;jetIndex=0;language;shown=[];static STYLE='.launch-editor-part { flex-basis: 100%; min-width: 0; } .launch-editor-part #launch-timeline { flex-basis: 100%; min-width: 0; padding: 4px 0; } .launch-editor-part .launch-path > .icon-btn { align-self: flex-end; } .launch-editor-part #launch-list, .launch-editor-part #launch-places { flex-basis: 100%; min-width: 0; } .launch-editor-part .launch-editor, .launch-editor-part .launch-fields { display: flex; flex-wrap: wrap; gap: 8px; align-items: end; } .launch-editor-part .launch-fields { flex-basis: 100%; min-width: 0; } .launch-editor-part [hidden] { display: none !important; } .launch-editor-part select { min-width: 0; width: 100%; } .launch-editor-part .launch-intro { flex-basis: 100%; margin: 0; } .launch-editor-part .launch-track { flex-basis: 100%; margin: 0; } .launch-editor-part .launch-parameters { flex-basis: 100%; min-width: 0; display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-start; } .launch-editor-part .parameter-group { flex: 1 1 14em; min-width: 0; box-sizing: border-box; margin: 0; display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: flex-start; align-content: flex-start; } .launch-editor-part input, .launch-editor-part select { max-width: 100%; box-sizing: border-box; } .launch-editor-part input[type="text"] { width: 12em; } .launch-editor-part #launch-title { width: 18em; } .launch-editor-part label { min-width: 0; max-width: 100%; } .launch-editor-part input.parameter-derived::placeholder { opacity: .65; } .launch-editor-part .launch-path { flex: 1 1 100%; min-width: 0; box-sizing: border-box; margin: 0; display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: flex-start; }';async setLanguage(e){const t=++this.languageToken;this.language=e;const i=E.includes(e)?e:"en",a=i==="en"?x:await w(i);t===this.languageToken&&(this.messages=a,this.render(),this.sync())}sync(){const e=this.launches;this.shown=[...e],e.some(a=>a.id===this.currentId)||(this.currentId=e[0]?.id),this.list?.setItems(e.map(a=>({id:a.id,label:this.labelOf(a)})),this.currentId),this.syncAddState();const t=this.current;if(this.element("launch-fields").hidden=t===void 0,!t)return;this.syncPlace(!0),this.syncJet(!0);const i=f.of("launch");this.form??=new g(this.element("launch-parameters"),this.language,"",{said:()=>this.host.said(),writingLanguage:()=>this.host.writingLanguage()}),this.form.show(i,t,()=>this.written())}refresh(){this.syncAddState();const e=this.launches;if(e.length===this.shown.length&&e.every((t,i)=>t===this.shown[i])){this.syncTimeline();return}this.sync()}setTime(e){this.timeline?.setTime(e)}syncAddState(){const e=this.startOfNew()!==void 0;this.list?.setAddState(e,e?void 0:this.messages.addLaunchNowhere)}get current(){return this.launches.find(e=>e.id===this.currentId)}show(e){this.currentId=e,this.row="path",this.placeIndex=0,this.jetIndex=0,this.sync()}render(){const e=this.messages;this.form=void 0,this.container.innerHTML=`<div class="launch-editor">
|
|
2
|
-
<p class="launch-intro">${e.intro}</p>
|
|
3
|
-
<div id="launch-list"></div>
|
|
4
|
-
<div id="launch-fields" class="launch-fields">
|
|
5
|
-
<div id="launch-parameters" class="launch-parameters"></div>
|
|
6
|
-
<div id="launch-timeline" class="launch-timeline"></div>
|
|
7
|
-
<button id="launch-jet-add-burn" type="button" title="${e.addJet}">${p.PLUS} ${e.jetBurn}</button>
|
|
8
|
-
<button id="launch-jet-add-vent" type="button" title="${e.addJet}">${p.PLUS} ${e.jetVent}</button>
|
|
9
|
-
<p class="launch-intro">${e.timelineNote}</p>
|
|
10
|
-
<fieldset id="launch-path" class="launch-path">
|
|
11
|
-
<legend>${e.path}</legend>
|
|
12
|
-
<div id="launch-place-parameters" class="launch-parameters"></div>
|
|
13
|
-
<button id="launch-place-delete" class="icon-btn" type="button" title="${e.deletePlace}" aria-label="${e.deletePlace}">${p.TRASH}</button>
|
|
14
|
-
</fieldset>
|
|
15
|
-
<fieldset id="launch-jets" class="launch-path">
|
|
16
|
-
<legend id="launch-jet-legend">${e.jet}</legend>
|
|
17
|
-
<div id="launch-jet-parameters" class="launch-parameters"></div>
|
|
18
|
-
<button id="launch-jet-delete" class="icon-btn" type="button" title="${e.deleteJet}" aria-label="${e.deleteJet}">${p.TRASH}</button>
|
|
19
|
-
</fieldset>
|
|
20
|
-
<p class="launch-intro">${e.derivedNote}</p>
|
|
21
|
-
</div>
|
|
22
|
-
</div>`;const t=this.element("launch-list");this.list=new j({header:t,body:this.element("launch-fields"),ids:{list:"launch-select",remove:"launch-delete",add:"launch-add",kinds:"launch-add-kind",kind:i=>`launch-add-${i}`},onSelect:i=>this.show(i),onAdd:i=>this.addLaunch(i??c.VEHICLES[0].id),onRemove:()=>this.deleteCurrent()}),this.list.setLabels({list:e.launch,remove:e.deleteLaunch,add:e.addLaunch,empty:e.none}),this.list.setKinds(c.VEHICLES.map(i=>({value:i.id,label:i.vehicle.name??i.id}))),this.timeline=new T(this.element("launch-timeline"),i=>this.host.seekTo(i),{addKeyframeHere:e.addHere,keyframeHere:e.here,zoomHint:e.zoomHint}),this.element("launch-jet-add-burn").addEventListener("click",()=>this.addJet("burn",this.host.currentTime())),this.element("launch-jet-add-vent").addEventListener("click",()=>this.addJet("vent",this.host.currentTime())),this.element("launch-place-delete").addEventListener("click",()=>this.removePlace()),this.element("launch-jet-delete").addEventListener("click",()=>this.removeJet()),this.placeForm=void 0,this.jetForm=void 0}written(){this.host.changed();const e=this.current;e&&(this.list?.rename(e.id,this.labelOf(e)),this.syncTimeline())}static PATH_COLOR="#e08a1e";static JET_COLOR="#4f8fd6";jetLabel(e,t){return`${e.kind==="vent"?this.messages.jetVent:this.messages.jetBurn} ${t+1}`}syncTimeline(){const e=this.current;if(!this.timeline||!e)return;const i={id:"path",label:this.messages.path,color:c.PATH_COLOR,times:e.track.map(r=>r.t),active:this.row==="path",selectedTime:this.row==="path"?e.track[this.placeIndex]?.t:void 0,open:()=>this.selectPlace(this.placeIndex),pressed:(r,o)=>{const h=o===void 0?-1:(this.current?.track??[]).findIndex(m=>m.t===o);this.selectPlace(h>=0?h:this.placeIndex)},move:(r,o)=>this.movePlace(r,o),add:()=>this.addPlaceAt(this.host.currentTime())},a=(e.jets??[]).map((r,o)=>({id:`jet-${o}`,label:this.jetLabel(r,o),color:c.JET_COLOR,times:[r.fromT,r.untilT],spans:[{t:r.fromT,until:r.untilT,label:""}],active:this.row==="jet"&&o===this.jetIndex,open:()=>this.selectJet(o),pressed:()=>this.selectJet(o),move:(h,m)=>this.moveJetEnd(o,h,m),add:()=>this.addJet(r.kind??"burn",this.host.currentTime())})),s=n.instantsOf(e),l=Math.min(...s),d=Math.max(...s),u=Math.max(500,(d-l)/10);this.timeline.show([i,...a],this.host.duration(),this.host.currentTime(),{from:l-u,to:d+u})}syncDetail(){const t=this.current?.jets?.[this.jetIndex];this.row==="jet"&&!t&&(this.row="path"),this.element("launch-path").hidden=this.row!=="path",this.element("launch-jets").hidden=this.row!=="jet",this.element("launch-jet-legend").textContent=t?this.jetLabel(t,this.jetIndex):this.messages.jet}static MIN_PLACES=2;syncPlace(e=!1){const t=this.current?.track??[];this.placeIndex=Math.max(0,Math.min(this.placeIndex,t.length-1)),this.element("launch-place-delete").disabled=t.length<=c.MIN_PLACES,this.placeForm?this.placeForm.sync(e):(this.placeForm=new g(this.element("launch-place-parameters"),this.language,"launchPlace."),this.placeForm.show(n.PLACE,new b(()=>this.current?.track[this.placeIndex],i=>this.editPlace(this.placeIndex,i),void 0,this.host.positionPlace?.()),()=>{})),this.syncDetail(),this.syncTimeline()}selectPlace(e){this.row="path",this.placeIndex=e,this.syncPlace(!0)}editPlace(e,t){const i=this.current;if(!i)return;const a={...i.track[e]};t(a),i.track=i.track.map((s,l)=>l===e?a:s).sort((s,l)=>s.t-l.t),this.placeIndex=i.track.indexOf(a),this.syncPlace(),this.written()}movePlace(e,t){const i=this.current?.track.findIndex(a=>a.t===e)??-1;i<0||(this.editPlace(i,a=>{a.t=t}),this.syncPlace(!0))}addPlaceAt(e){const t=this.current;if(!t)return;const i=t.track.findIndex(a=>Math.abs(a.t-e)<1);if(i<0){const a=n.placeAt(t.track,Math.round(e));t.track=[...t.track,a].sort((s,l)=>s.t-l.t),this.host.changed(),this.selectPlace(t.track.indexOf(a));return}this.selectPlace(i)}removePlace(){const e=this.current;!e||e.track.length<=c.MIN_PLACES||(e.track=e.track.filter((t,i)=>i!==this.placeIndex),this.syncPlace(!0),this.host.changed())}syncJet(e=!1){const t=this.current?.jets??[];this.jetIndex=Math.max(0,Math.min(this.jetIndex,t.length-1)),this.jetForm?this.jetForm.sync(e):(this.jetForm=new g(this.element("launch-jet-parameters"),this.language,"launchJet."),this.jetForm.show(n.JET,new b(()=>this.current?.jets?.[this.jetIndex],i=>this.editJet(this.jetIndex,i),()=>this.current?n.jetContext(this.current,this.jetIndex):void 0),()=>{})),this.syncDetail(),this.syncTimeline()}selectJet(e){this.row="jet",this.jetIndex=e,this.syncJet(!0)}editJet(e,t){const i=this.current;if(!i?.jets)return;const a={...i.jets[e]};t(a),i.jets=i.jets.map((s,l)=>l===e?a:s),this.written()}moveJetEnd(e,t,i){const a=this.current?.jets?.[e];a&&(this.editJet(e,s=>{const l=t===a.fromT?[i,a.untilT]:[a.fromT,i];s.fromT=Math.min(l[0],l[1]),s.untilT=Math.max(l[0],l[1])}),this.selectJet(e))}addJet(e,t){const i=this.current;if(!i)return;const a=i.track,s=Math.round(t),l=e==="vent"?{kind:e,fromT:s,untilT:s+3e4,angleDeg:90}:{kind:e,fromT:s,untilT:s+3e4};!i.jets?.length&&i.burnFromT===void 0&&i.burnUntilT===void 0&&(i.burnFromT=a[0].t,i.burnUntilT=a[a.length-1].t),i.jets=[...i.jets??[],l],this.form?.sync(!0),this.host.changed(),this.selectJet(i.jets.length-1)}removeJet(){const e=this.current;if(!e?.jets?.length)return;const t=e.jets.filter((i,a)=>a!==this.jetIndex);t.length?e.jets=t:delete e.jets,this.host.changed(),t.length?this.selectJet(Math.min(this.jetIndex,t.length-1)):this.selectPlace(this.placeIndex)}startOfNew(){const e=this.host.sighting(),t=e.event?.place?.[0];if(t?.lat===void 0||t.lng===void 0)return;const i=(e.observerTrack?.getInterpolatedPoseAt(0)?.headingDeg??0)*Math.PI/180,a=s=>({lat:t.lat+s*Math.cos(i)/111.32,lng:t.lng+s*Math.sin(i)/(111.32*Math.max(.05,Math.cos(t.lat*Math.PI/180)))});return[{t:0,...a(300),altitudeKm:80},{t:6e4,...a(450),altitudeKm:160}]}static VEHICLES=[{id:"falcon-9",vehicle:{name:"Falcon 9"}}];addLaunch(e){const t=this.startOfNew();if(!t)return;const i=c.VEHICLES.find(d=>d.id===e)??c.VEHICLES[0];let a=this.launches.length+1;for(;this.launches.some(d=>d.id===`launch-${a}`);)a++;const s={id:`launch-${a}`,vehicle:{...i.vehicle},track:t},l=this.host.sighting();l.skyEvents={...l.skyEvents,launches:[...this.launches,s]},this.currentId=s.id,this.row="path",this.placeIndex=0,this.host.changed(),this.sync()}deleteCurrent(){const e=this.current;if(!e)return;this.currentId=void 0;const t=this.host.sighting();t.skyEvents=k.written({...t.skyEvents,launches:this.launches.filter(i=>i!==e)}),this.host.changed(),this.sync()}labelOf(e){const t=this.host.said().read(e.title)??e.vehicle?.mission??e.vehicle?.name;return t?`${t} (${e.id})`:e.id}get launches(){return this.host.sighting().skyEvents?.launches??[]}element(e){return this.container.querySelector(`#${e}`)}}export{c as LaunchEditor};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{aw as F,ax as v,ay as b,az as Y,Z as H}from"./rr0-sighting-editor.mjs";class K{static MU=398600.4418;static OMEGA=72921159e-12;static EARTH_RADIUS_KM=6371;static STEP_S=1;static DENSITY=[[0,1.225],[20,.0889],[40,.004],[60,31e-5],[80,185e-7],[100,56e-8],[120,222e-10],[150,208e-11],[200,254e-12],[250,607e-13],[300,192e-13],[400,28e-13],[500,522e-15],[600,114e-15],[700,307e-16],[800,114e-16],[900,576e-17],[1e3,356e-17]];static FREE_PATH_TIMES_DENSITY=68e-9;static ICE_DENSITY=917;static airDensity(s){const t=K.DENSITY;if(s<=t[0][0])return t[0][1];let e=0;for(;e<t.length-2&&t[e+1][0]<s;)e++;const[a,i]=t[e],[o,n]=t[e+1];return i*Math.exp(Math.log(n/i)*(s-a)/(o-a))}static dragPerKm(s,t,e,a=.5){const i=K.airDensity(s),o=K.FREE_PATH_TIMES_DENSITY/i/1e3,n=Math.exp(-o/t),p=i*1e9*Math.PI*t*t/Math.max(e,1e-9),d=3*i/(4*a*1e-6*K.ICE_DENSITY)*1e3;return n*p+(1-n)*d}static step(s,t,e,a,i){const[o,n,p,d,R,h]=s,m=Math.hypot(o,n,p),T=K.OMEGA,M=-398600.4418/(m*m*m),y=M*o+2*T*R+T*T*o,U=M*n-2*T*d+T*T*n,I=M*p,E=Math.hypot(d,R,h),c=1/(1+K.dragPerKm(m-K.EARTH_RADIUS_KM,e,a,i)*E*t);s[3]=(d+y*t)*c,s[4]=(R+U*t)*c,s[5]=(h+I*t)*c,s[0]=o+s[3]*t,s[1]=n+s[4]*t,s[2]=p+s[5]*t;const f=Math.hypot(s[0],s[1],s[2]);if(f<K.EARTH_RADIUS_KM){const A=K.EARTH_RADIUS_KM/f;s[0]*=A,s[1]*=A,s[2]*=A,s[3]=s[4]=s[5]=0}}}class _{constructor(s,t,e,a,i=.5){this.massKg=e,this.radiusAt=a,this.particleRadiusUm=i,this.state=Float64Array.of(...s,...t),this.positions=new Float64Array(192),this.positions.set(s,0)}positions;steps=0;state;at(s){const t=K.STEP_S,e=Math.max(0,s/t),a=Math.ceil(e);for(;this.steps<a;){if(K.step(this.state,t,this.radiusAt(this.steps*t),this.massKg,this.particleRadiusUm),this.steps++,3*(this.steps+1)>this.positions.length){const p=new Float64Array(this.positions.length*2);p.set(this.positions),this.positions=p}this.positions.set(this.state.subarray(0,3),3*this.steps)}const i=Math.floor(e),o=e-i,n=this.positions;return o===0||i>=this.steps?[n[3*i],n[3*i+1],n[3*i+2]]:[0,1,2].map(p=>n[3*i+p]+(n[3*i+3+p]-n[3*i+p])*o)}}class r{static EARTH_RADIUS_KM=6371;static SHADOW_RADIUS_KM=r.EARTH_RADIUS_KM+15;static PENUMBRA_KM=10;static SUN_ILLUMINANCE_LUX=127e3;static RAYLEIGH_PER_M=[58e-7,135e-7,331e-7];static SCALE_HEIGHT_M=8e3;static OZONE_GRAZING_DEPTH=[2.4,1.8,.24];static ANISOTROPY=.7;static ALBEDO=.99;static WAVELENGTHS_UM=[.61,.55,.465];static ICE_INDEX=1.31;static DEFAULTS={exhaustKgPerS:273,condensedShare:.065,particleRadiusUm:.5,expansionKmPerS:.15,initialRadiusKm:.5,lifetimeS:420,collarShare:.85,collarExpansionKmPerS:2.5,collarLifetimeS:20};static PROPELLANTS={"rp1-lox":{condensedShare:.065,particleRadiusUm:.5},"methane-lox":{condensedShare:.09,particleRadiusUm:.5},"hydrogen-lox":{condensedShare:.13,particleRadiusUm:.5},hypergolic:{condensedShare:.079,particleRadiusUm:.4},solid:{condensedShare:.27,particleRadiusUm:.8}};static G0=9.80665;static COLLAR_SPREAD_OF_EXHAUST_VELOCITY=.735;static plumeOf(s){const t={},e=s.vehicle?.engine;if(e){const a=e.specificImpulseS===void 0?void 0:e.specificImpulseS*r.G0;e.thrustKN!==void 0&&a&&(t.exhaustKgPerS=e.thrustKN*1e3/a),a&&(t.collarExpansionKmPerS=a/1e3*r.COLLAR_SPREAD_OF_EXHAUST_VELOCITY),e.propellant&&Object.assign(t,r.PROPELLANTS[e.propellant])}return{...r.DEFAULTS,...t,...s.plume}}static PUFF_EVERY_S=.5;static SIGMA_OF_RADIUS=.5;static MAX_PUFFS=320;static DEG=Math.PI/180;static EARTH_ROTATION=72921159e-12;static VENT_DEFAULTS={speedKmPerS:.7,massKgPerS:20,condensedShare:.5,particleRadiusUm:.5,expansionKmPerS:.1,initialRadiusKm:.2,lifetimeS:600};static paths=new WeakMap;static exhaustVelocityKmPerS(s){return(s.vehicle?.engine?.specificImpulseS??348)*r.G0/1e3}static releasesOf(s){const t=[],e=s.jets??[];if(e.length===0||s.burnFromT!==void 0||s.burnUntilT!==void 0){const a=s.track[0]?.t??0,i=s.track[s.track.length-1]?.t??0;t.push(r.engineRelease(s,"burn",{fromT:s.burnFromT??a,untilT:s.burnUntilT??i}))}return e.forEach((a,i)=>t.push(r.releaseOf(s,a,i))),t}static releaseOf(s,t,e){const a=`jet:${t.id??e}`;if((t.kind??"burn")==="burn")return r.engineRelease(s,a,t);const i=r.VENT_DEFAULTS;return{key:a,fromT:t.fromT,untilT:t.untilT,angleDeg:t.angleDeg??0,azimuthDeg:t.azimuthDeg??0,spinPeriodS:t.spinPeriodS,speedKmPerS:t.speedKmPerS??i.speedKmPerS,massKgPerS:t.massKgPerS??i.massKgPerS,condensedShare:t.condensedShare??i.condensedShare,particleRadiusUm:t.particleRadiusUm??i.particleRadiusUm,initialRadiusKm:t.initialRadiusKm??i.initialRadiusKm,populations:[{share:1,expansionKmPerS:t.expansionKmPerS??i.expansionKmPerS,lifetimeS:t.lifetimeS??i.lifetimeS}]}}static engineRelease(s,t,e){const a=r.plumeOf(s);return{key:t,fromT:e.fromT,untilT:e.untilT,angleDeg:e.angleDeg??0,azimuthDeg:e.azimuthDeg??0,spinPeriodS:e.spinPeriodS,speedKmPerS:e.speedKmPerS??r.exhaustVelocityKmPerS(s),massKgPerS:e.massKgPerS??a.exhaustKgPerS,condensedShare:e.condensedShare??a.condensedShare,particleRadiusUm:e.particleRadiusUm??a.particleRadiusUm,initialRadiusKm:e.initialRadiusKm??a.initialRadiusKm,populations:[{share:1-a.collarShare,expansionKmPerS:e.expansionKmPerS??a.expansionKmPerS,lifetimeS:e.lifetimeS??a.lifetimeS},{share:a.collarShare,expansionKmPerS:a.collarExpansionKmPerS,lifetimeS:a.collarLifetimeS}]}}static extinctionEfficiency(s,t){const e=2*Math.PI*s/t,a=r.ICE_INDEX**2,i=8/3*e**4*((a-1)/(a+2))**2,o=2*e*(r.ICE_INDEX-1),n=o<.001?o*o/2:2-4/o*Math.sin(o)+4/(o*o)*(1-Math.cos(o));return Math.min(i,n)}static scatteringColour(s){const t=r.extinctionEfficiency(s,r.WAVELENGTHS_UM[1]);return r.WAVELENGTHS_UM.map(e=>r.extinctionEfficiency(s,e)/t)}static sunDirectionAt(s){const t=new F(0,0,-6378137),e=v(b.Sun,s,t,!0,!0),a=(e.ra-Y(s))*15*r.DEG,i=e.dec*r.DEG;return[Math.cos(i)*Math.cos(a),Math.cos(i)*Math.sin(a),Math.sin(i)]}static puffsAt(s,t){const e=[];for(const a of s){let i=r.paths.get(a);i||r.paths.set(a,i=new Map);for(const o of r.releasesOf(a)){const n=Math.min(o.untilT,t);if(n<=o.fromT)continue;const p=Math.max(r.PUFF_EVERY_S*1e3,(o.untilT-o.fromT)/r.MAX_PUFFS),d=[];for(let M=o.fromT;M<n;M+=p)d.push(M);d.push(n);const R=o.massKgPerS*(p/1e3),m=3*r.extinctionEfficiency(o.particleRadiusUm,r.WAVELENGTHS_UM[1])/(4*917*o.particleRadiusUm*1e-6),T=r.scatteringColour(o.particleRadiusUm);o.populations.forEach((M,y)=>{if(M.share<=0)return;const U=E=>o.initialRadiusKm+M.expansionKmPerS*E,I=[];for(const E of d){const D=(t-E)/1e3;if(D>M.lifetimeS)continue;const c=E!==n||n===o.untilT,f=`${o.key}|${y}|${E}`;let A=c?i.get(f):void 0;if(!A){if(A=r.launchPuff(a,o,E,R*M.share,U),!A)continue;c&&i.set(f,A)}I.push({ageS:D,position:A.at(D)})}for(let E=I.length-1;E>=0;E--){const{ageS:D,position:c}=I[E],f=I[E-1]??I[E+1],A=f?Math.hypot(c[0]-f.position[0],c[1]-f.position[1],c[2]-f.position[2]):0,l=U(D)+A/2,O=r.SIGMA_OF_RADIUS*l*1e3,N=R*o.condensedShare*M.share*m/(2*Math.PI*O*O),x=Math.max(0,1-(D/M.lifetimeS)**2);N*x<=0||e.push({launchId:a.id,release:o.key,at:r.geoPoint(c),radiusKm:l,opticalDepth:N*x,colour:T,ageS:D})}})}}return e}static viewsAt(s,t,e,a){const i=[];for(const o of r.puffsAt(s,t)){const n=H.seenFrom(e,o.at);if(n.altitudeDeg<0)continue;const p=r.sunlightAt(o.at,a);if(p.lit<=0)continue;const d=r.scatteringPhase(e,o.at,a),R=r.SUN_ILLUMINANCE_LUX*r.ALBEDO*d*o.opticalDepth*p.lit;R<=0||i.push({launchId:o.launchId,release:o.release,heightKm:o.at.heightM/1e3,centre:n,radiusDeg:Math.atan2(o.radiusKm,n.distanceKm)/r.DEG,luminanceCdM2:R,sunTransmittance:p.transmittance,colour:o.colour,lit:p.lit,ageS:o.ageS})}return i}static launchPuff(s,t,e,a,i){const o={id:s.id,track:s.track,fragments:[]},n=H.leadAt(o,e);if(!n)return;const p=s.track[0].t,d=s.track[s.track.length-1].t,R=Math.max(p,e-500),h=Math.min(d,e+500),m=r.earthCentred(n),T=r.earthCentred(H.leadAt(o,R)),M=r.earthCentred(H.leadAt(o,h)),y=Math.max(.001,(h-R)/1e3),U=[0,1,2].map(S=>(M[S]-T[S])/y),I=r.EARTH_ROTATION,E=[U[0]-I*m[1],U[1]+I*m[0],U[2]],D=S=>{const w=Math.hypot(S[0],S[1],S[2])||1;return S.map(k=>k/w)},c=D(E),f=D(m),A=f[0]*c[0]+f[1]*c[1]+f[2]*c[2];let l=[f[0]-A*c[0],f[1]-A*c[1],f[2]-A*c[2]];Math.hypot(l[0],l[1],l[2])<1e-6&&(l=[-c[2]*c[0],-c[2]*c[1],1-c[2]*c[2]]),l=D(l);const O=[c[1]*l[2]-c[2]*l[1],c[2]*l[0]-c[0]*l[2],c[0]*l[1]-c[1]*l[0]],N=t.spinPeriodS?360*((e-t.fromT)/1e3)/t.spinPeriodS:0,x=(t.azimuthDeg+N)*r.DEG,G=t.angleDeg*r.DEG,C=[0,1,2].map(S=>-c[S]*Math.cos(G)+Math.sin(G)*(Math.cos(x)*l[S]+Math.sin(x)*O[S])),P=[0,1,2].map(S=>U[S]+t.speedKmPerS*C[S]);return new _(m,P,a,i,t.particleRadiusUm)}static geoPoint(s){const t=Math.hypot(s[0],s[1],s[2]);return{lat:Math.asin(s[2]/t)/r.DEG,lng:Math.atan2(s[1],s[0])/r.DEG,heightM:(t-K.EARTH_RADIUS_KM)*1e3}}static sunlightAt(s,t){const e=r.earthCentred(s),a=e[0]*t[0]+e[1]*t[1]+e[2]*t[2];if(a>=0)return{lit:1,transmittance:[1,1,1]};const i=Math.hypot(e[0]-a*t[0],e[1]-a*t[1],e[2]-a*t[2]),o=r.PENUMBRA_KM,n=Math.min(1,Math.max(0,(i-(r.SHADOW_RADIUS_KM-o/2))/o));if(n<=0)return{lit:0,transmittance:[0,0,0]};const p=Math.max(0,(i-r.EARTH_RADIUS_KM)*1e3),d=Math.exp(-p/r.SCALE_HEIGHT_M),R=Math.sqrt(2*Math.PI*r.EARTH_RADIUS_KM*1e3*r.SCALE_HEIGHT_M),h=Math.exp(-(((p/1e3-25)/15)**2)),m=[0,1,2].map(T=>Math.exp(-r.RAYLEIGH_PER_M[T]*d*R-r.OZONE_GRAZING_DEPTH[T]*h));return{lit:n,transmittance:m}}static scatteringPhase(s,t,e){const a=r.earthCentred(s),i=r.earthCentred(t),o=[a[0]-i[0],a[1]-i[1],a[2]-i[2]],n=Math.hypot(o[0],o[1],o[2])||1,p=-(o[0]*e[0]+o[1]*e[1]+o[2]*e[2])/n,d=r.ANISOTROPY;return(1-d*d)/(4*Math.PI*(1+d*d-2*d*p)**1.5)}static earthCentred(s){const t=s.lat*r.DEG,e=s.lng*r.DEG,a=r.EARTH_RADIUS_KM+s.heightM/1e3;return[a*Math.cos(t)*Math.cos(e),a*Math.cos(t)*Math.sin(e),a*Math.sin(t)]}}export{r as L};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{V as a,aS as e,bX as s,b7 as t,b9 as r,bg as i,a_ as o,Q as b,b6 as n,aC as l,bp as u,bh as m,u as d,bY as M,aa as S,an as B,a8 as c,w as f,bH as p,bE as y,bI as G,a5 as h,bV as E,aU as g,v as x,ao as C,bZ as L,b_ as D,b$ as P,aE as T,b8 as V,al as v,am as A,c0 as _,bf as F,ap as H}from"./rr0-sighting-editor.mjs";const Q={AdditiveBlending:H,BackSide:F,BoxGeometry:_,BufferAttribute:A,BufferGeometry:v,CanvasTexture:V,Color:T,ConeGeometry:P,CylinderGeometry:D,DataTexture:L,DoubleSide:C,Euler:x,Float32BufferAttribute:g,FrontSide:E,Group:h,Line:G,LineBasicMaterial:y,LineSegments:p,Matrix4:f,Mesh:c,MeshBasicMaterial:B,MeshStandardMaterial:S,NormalBlending:M,Object3D:d,PlaneGeometry:m,PointLight:u,Points:l,PointsMaterial:n,Quaternion:b,ShaderMaterial:o,SphereGeometry:i,Sprite:r,SpriteMaterial:t,TorusGeometry:s,Vector2:e,Vector3:a};export{Q as MODULE_THREE};
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import{ModuleSession as y}from"./ModuleSession-D3GrBJ3j.js";import{U as k,o as C,p as L,M as r}from"./rr0-sighting-editor.mjs";import{modulesPanelMessages_en as N}from"./ModulesPanelMessages_en-D97Nh2yy.js";const w="rr0-modules-panel",M=`
|
|
2
|
-
rr0-modules-panel { display: block; }
|
|
3
|
-
rr0-modules-panel .mp-add { display: flex; gap: .4em; align-items: center; margin: .4em 0; }
|
|
4
|
-
rr0-modules-panel .mp-add input { flex: 1 1 16em; min-width: 0; }
|
|
5
|
-
rr0-modules-panel .mp-list { list-style: none; margin: .5em 0; padding: 0; }
|
|
6
|
-
rr0-modules-panel .mp-module { padding: .4em 0; border-top: 1px solid color-mix(in srgb, CanvasText 15%, transparent); }
|
|
7
|
-
rr0-modules-panel .mp-head { display: flex; gap: .6em; align-items: center; flex-wrap: wrap; }
|
|
8
|
-
rr0-modules-panel .mp-name { font-weight: 600; }
|
|
9
|
-
rr0-modules-panel .mp-url { overflow-wrap: anywhere; }
|
|
10
|
-
rr0-modules-panel .mp-head .mp-remove { margin-left: auto; }
|
|
11
|
-
rr0-modules-panel .mp-module p { margin: .2em 0; }
|
|
12
|
-
rr0-modules-panel .mp-files { display: flex; gap: .6em; flex-wrap: wrap; align-items: center; margin-top: .6em; }
|
|
13
|
-
`;class B extends HTMLElement{session=y.shared;messages=N;named=[];recordingBase;note;languageToken=0;draft="";onChange=()=>this.render();set moduleSession(e){this.session.changes.removeEventListener("change",this.onChange),this.session=e,this.isConnected&&this.session.changes.addEventListener("change",this.onChange),this.render()}get recordingModules(){return[...this.named]}set recordingModules(e){this.named=[...e??[]],this.render()}set base(e){this.recordingBase=e,this.render()}async setLanguage(e){const t=++this.languageToken,n=k.includes(e)?e:"en",i=n==="en"?N:await C(n);t===this.languageToken&&(this.messages=i,this.render())}connectedCallback(){this.session.changes.addEventListener("change",this.onChange),this.session.start(),this.render()}disconnectedCallback(){this.session.changes.removeEventListener("change",this.onChange)}absolute(e){try{return new URL(e,this.recordingBase??location.href).href}catch{return}}isNamed(e){return this.named.some(t=>this.absolute(t)===e)}setNamed(e,t){t!==this.isNamed(e)&&(this.named=t?[...this.named,L.of(e,this.recordingBase)]:this.named.filter(n=>this.absolute(n)!==e),t&&this.session.require([e]),this.dispatchEvent(new Event("recordingmoduleschange",{bubbles:!0})),this.render())}render(){if(!this.isConnected)return;const e=this.messages,t=this.ownerDocument,n=t.createElement("style");n.textContent=M;const i=t.createElement("p");i.className=r.INFO,i.textContent=e.intro;const d=t.createElement("form");d.className="mp-add";const a=t.createElement("input");a.type="url",a.id="module-url",a.required=!0,a.placeholder=e.urlPlaceholder,a.value=this.draft,a.addEventListener("input",()=>{this.draft=a.value}),a.setAttribute("aria-label",e.urlPlaceholder);const E=t.createElement("button");E.type="submit",E.textContent=e.add,d.append(a,E),d.addEventListener("submit",o=>{o.preventDefault();const x=a.value.trim();x&&(this.draft="",this.session.add(x))});const l=t.createElement("p");l.className=r.WARNING,l.textContent=e.codeWarning;const f=this.session.list(),u=new Set(f.map(o=>o.url)),b=this.named.map(o=>this.absolute(o)).filter(o=>o!==void 0&&!u.has(o)),m=t.createElement("ul");m.className="mp-list",m.append(...f.map(o=>this.item(o)),...b.map(o=>this.item({url:o,addedByPerson:!1,enabled:!0,status:"loading"})));const g=t.createElement("p");g.className=r.INFO,g.textContent=e.none,g.hidden=m.childElementCount>0;const p=t.createElement("div");p.className="mp-files";const h=t.createElement("button");h.type="button",h.id="modules-export",h.textContent=e.exportConfig,h.disabled=!f.some(o=>o.addedByPerson),h.addEventListener("click",()=>this.download());const s=t.createElement("input");s.type="file",s.id="modules-import",s.accept="application/json,.json",s.hidden=!0;const c=t.createElement("button");c.type="button",c.textContent=e.importConfig,c.addEventListener("click",()=>s.click()),s.addEventListener("change",()=>{const o=s.files?.[0];o&&this.importFile(o),s.value=""}),p.append(h,c,s);const v=t.createElement("p");v.id="modules-note",v.setAttribute("role","status"),r.show(v,this.note?.text,this.note?.kind),this.replaceChildren(n,i,d,l,m,g,p,v)}item(e){const t=this.messages,n=this.ownerDocument,i=n.createElement("li");i.className="mp-module",i.dataset.url=e.url;const d=n.createElement("div");if(d.className="mp-head",e.addedByPerson){const s=n.createElement("label"),c=n.createElement("input");c.type="checkbox",c.className="mp-enabled",c.checked=e.enabled,c.addEventListener("change",()=>void this.session.setEnabled(e.url,c.checked)),s.append(c,n.createTextNode(` ${t.enabled}`)),d.append(s)}const a=n.createElement("span");a.className="mp-name",a.textContent=e.loaded?.module.name??e.url,d.append(a);const E=e.loaded?.module.credit;if(E){const s=n.createElement(e.loaded?.module.creditUrl?"a":"span");s.className=r.INFO,s.textContent=E,s instanceof HTMLAnchorElement&&(s.href=e.loaded.module.creditUrl,s.target="_blank",s.rel="noopener noreferrer"),d.append(s)}const l=n.createElement("button");l.type="button",l.className="mp-remove",e.addedByPerson?(l.textContent=t.remove,l.addEventListener("click",()=>void this.session.remove(e.url))):(l.textContent=t.addToMine,l.addEventListener("click",()=>void this.session.add(e.url))),d.append(l);const f=n.createElement("p");f.className=`${r.INFO} mp-url`,f.textContent=e.url;const u=n.createElement("p");u.className="mp-status";const b=e.loaded;e.status==="loading"?r.show(u,t.loading):e.status==="failed"?r.show(u,t.failed.replace("{error}",e.error??""),"error"):e.status==="off"?r.show(u,t.off):r.show(u,this.brings(e));const m=n.createElement("p");m.className="mp-code",b?.scriptRun?r.show(m,t.runsCode,"warning"):b?.hasScript?r.show(m,t.codeNotRun,"info"):m.hidden=!0;const g=n.createElement("label");g.title=t.namedByRecordingHint;const p=n.createElement("input");p.type="checkbox",p.className="mp-named",p.checked=this.isNamed(e.url),p.addEventListener("change",()=>this.setNamed(e.url,p.checked)),g.append(p,n.createTextNode(` ${t.namedByRecording}`));const h=n.createElement("p");return h.append(g),i.append(d,f,u,m,h),i}brings(e){const t=Object.entries(e.loaded?.module.contributes??{}).filter(([,n])=>Array.isArray(n)&&n.length>0).map(([n,i])=>`${this.messages.points[n]??n} (${i.length})`);return t.length>0?this.messages.brings.replace("{points}",t.join(", ")):this.messages.bringsNothing}download(){const e=new Blob([this.session.exportText()],{type:"application/json"}),t=URL.createObjectURL(e),n=this.ownerDocument.createElement("a");n.href=t,n.download="ufoathome-modules.json",n.click(),URL.revokeObjectURL(t)}async importFile(e){try{await this.session.importText(await e.text());const t=this.session.list().filter(n=>n.addedByPerson).length;this.note={text:this.messages.imported.replace("{count}",String(t)),kind:"info"}}catch(t){this.note={text:this.messages.importFailed.replace("{error}",t instanceof Error?t.message:String(t)),kind:"error"}}this.render()}}function A(){customElements.get(w)||customElements.define(w,B)}export{w as MODULES_PANEL_ELEMENT_NAME,B as ModulesPanelElement,A as register};
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import{S as C}from"./SkyEventEditorStyle-CvY_AhbI.js";import{Z as f,aI as P,D as v,G as y,b,z as S,C as T,at as F,U as M}from"./rr0-sighting-editor.mjs";import{reentryEditorMessages_en as I}from"./ReentryEditorMessages_en-O-YSmHxv.js";class a{static NAME={en:"Name",fr:"Nom",es:"Nombre",it:"Nome"};static OBJECT={en:"Object",fr:"Objet",es:"Objeto",it:"Oggetto"};static LIGHT={en:"Light",fr:"Lumière",es:"Luz",it:"Luce"};static WHEN={en:"When",fr:"Quand",es:"Cuándo",it:"Quando"};static placeAt(e,t){const i=f.leadAt(e,t);if(i)return{t,lat:i.lat,lng:i.lng,altitudeKm:i.heightM/1e3};const r=e.track,[n,s]=t<(r[0]?.t??0)?[r[0],r[1]]:[r[r.length-2],r[r.length-1]];if(!n||!s||s.t===n.t){const o=n??s??{lat:0,lng:0,altitudeKm:80};return{t,lat:o.lat,lng:o.lng,altitudeKm:o.altitudeKm}}const l=(t-n.t)/(s.t-n.t);return{t,lat:n.lat+(s.lat-n.lat)*l,lng:n.lng+(s.lng-n.lng)*l,altitudeKm:Math.max(0,n.altitudeKm+(s.altitudeKm-n.altitudeKm)*l)}}static curvePointAt(e,t){return{t,absoluteMagnitude:Math.round(f.absoluteMagnitudeAt(e,t)*10)/10}}static instantsOf(e){return[...e.track.map(t=>t.t),...e.fragments.flatMap(t=>[...t.fromT===void 0?[]:[t.fromT],...t.untilT===void 0?[]:[t.untilT],...(t.lightCurve??[]).map(i=>i.t)])]}static instant(e,t,i,r={}){return{type:"number",key:e,min:-3600,max:36e3,step:.1,unit:"s",scale:.001,label:t,hint:i,...r}}static SET={kind:"reentry",title:{en:"Fireball or re-entry",fr:"Bolide ou rentrée",es:"Bólido o reentrada",it:"Bolide o rientro"},parameters:[{type:"said",key:"title",label:a.NAME},{type:"text",key:"object.name",group:a.OBJECT,label:{en:"Catalogue name",fr:"Nom au catalogue",es:"Nombre en el catálogo",it:"Nome a catalogo"},hint:{en:'For a re-entry, the piece as the satellite catalogue names it: "SL-12 R/B". Empty for a meteor.',fr:"Pour une rentrée, la pièce comme le catalogue des satellites la nomme : « SL-12 R/B ». Vide pour un météore.",es:"Para una reentrada, la pieza como la nombra el catálogo de satélites: «SL-12 R/B». Vacío para un meteoro.",it:"Per un rientro, il pezzo come lo chiama il catalogo dei satelliti: «SL-12 R/B». Vuoto per una meteora."}},{type:"text",key:"object.cosparId",group:a.OBJECT,label:{en:"COSPAR id",fr:"Identifiant COSPAR",es:"Identificador COSPAR",it:"Identificativo COSPAR"},placeholder:{en:"1968-013C",fr:"1968-013C",es:"1968-013C",it:"1968-013C"}},{type:"number",key:"object.norad",min:1,max:999999,step:1,group:a.OBJECT,label:{en:"NORAD number",fr:"Numéro NORAD",es:"Número NORAD",it:"Numero NORAD"}}]};static PLACE={kind:"reentry-place",title:{en:"Point of the path",fr:"Point du trajet",es:"Punto del trayecto",it:"Punto del percorso"},parameters:[a.instant("t",{en:"Time",fr:"Instant",es:"Instante",it:"Istante"},{en:"Seconds of the recording; negative before it began.",fr:"Secondes de l'enregistrement ; négatives avant son début.",es:"Segundos de la grabación; negativos antes de su inicio.",it:"Secondi della registrazione; negativi prima del suo inizio."},{required:!0}),{type:"position",key:"lat",secondKey:"lng",saidKey:"saidPosition",native:"geo",step:1,rangeM:2e6,label:{en:"Position",fr:"Position",es:"Posición",it:"Posizione"}},{type:"number",key:"altitudeKm",min:0,max:300,step:.1,unit:"km",required:!0,label:{en:"Altitude",fr:"Altitude",es:"Altitud",it:"Altitudine"},hint:{en:"Above the ellipsoid. A meteor begins to glow between 120 and 80 km; a satellite breaks up near 80.",fr:"Au-dessus de l'ellipsoïde. Un météore s'allume entre 120 et 80 km ; un satellite se brise vers 80.",es:"Sobre el elipsoide. Un meteoro se enciende entre 120 y 80 km; un satélite se rompe hacia los 80.",it:"Sopra l'ellissoide. Una meteora si accende tra 120 e 80 km; un satellite si spezza verso gli 80."}}]};static trackEnd(e,t){const i=e?.track;if(i?.length)return t==="first"?i[0].t:i[i.length-1].t}static FRAGMENT={kind:"reentry-fragment",title:{en:"Piece",fr:"Pièce",es:"Pieza",it:"Pezzo"},parameters:[{type:"text",key:"id",label:{en:"Id",fr:"Identifiant",es:"Identificador",it:"Identificativo"},validate:(e,t,i)=>!i?.fragments.some(r=>r!==t&&r.id===e)},{type:"number",key:"absoluteMagnitude",min:-40,max:10,step:.1,required:!0,group:a.LIGHT,label:{en:"Absolute magnitude",fr:"Magnitude absolue",es:"Magnitud absoluta",it:"Magnitudine assoluta"},hint:{en:"Its brightness seen from 100 km, as fireball reports give it: −4 or brighter is a fireball, −17 a superbolide. Its light curve, when it has one, stands instead.",fr:"Son éclat vu à 100 km, comme le donnent les rapports de bolides : −4 ou plus brillant est un bolide, −17 un superbolide. Sa courbe de lumière, quand il en a une, vaut à la place.",es:"Su brillo visto a 100 km, como lo dan los informes de bólidos: −4 o más brillante es un bólido, −17 un superbólido. Su curva de luz, cuando la tiene, vale en su lugar.",it:"La sua luminosità vista da 100 km, come la danno i rapporti sui bolidi: −4 o più brillante è un bolide, −17 un superbolide. La sua curva di luce, quando ce l'ha, vale al suo posto."}},{type:"colour",key:"color",group:a.LIGHT,fallback:f.DEFAULT_COLOR,label:{en:"Colour",fr:"Couleur",es:"Color",it:"Colore"}},{type:"number",key:"trainS",min:0,max:600,step:.1,unit:"s",group:a.LIGHT,effective:()=>f.DEFAULT_TRAIN_S,label:{en:"Train",fr:"Traînée",es:"Estela",it:"Scia"},hint:{en:"How long a stretch of its own past path still glows behind it, seconds.",fr:"Combien de secondes de son propre trajet brillent encore derrière lui.",es:"Cuántos segundos de su propio trayecto siguen brillando detrás de él.",it:"Quanti secondi del suo stesso percorso brillano ancora dietro di lui."}},{type:"number",key:"lagS",min:0,max:600,step:.1,unit:"s",group:a.WHEN,effective:()=>0,label:{en:"Behind the lead",fr:"Retard sur la tête",es:"Retraso sobre la cabeza",it:"Ritardo sulla testa"},hint:{en:"Seconds behind the leading point along the same path: 0 is the leading piece itself.",fr:"Secondes de retard sur le point de tête, sur le même trajet : 0 est la pièce de tête elle-même.",es:"Segundos de retraso sobre el punto de cabeza, en el mismo trayecto: 0 es la propia pieza de cabeza.",it:"Secondi di ritardo sul punto di testa, sullo stesso percorso: 0 è il pezzo di testa stesso."}},a.instant("fromT",{en:"Seen from",fr:"Vu à partir de",es:"Visto desde",it:"Visto da"},{en:"When it breaks off or begins to glow; empty, the start of the path.",fr:"Quand il se détache ou s'allume ; vide, le début du trajet.",es:"Cuando se desprende o se enciende; vacío, el inicio del trayecto.",it:"Quando si stacca o si accende; vuoto, l'inizio del percorso."},{group:a.WHEN,effective:(e,t)=>a.trackEnd(t,"first")}),a.instant("untilT",{en:"Out at",fr:"Éteint à",es:"Apagado a",it:"Spento a"},{en:"When it has burned up or slowed below glowing; empty, the end of the path.",fr:"Quand il s'est consumé ou a trop ralenti pour briller ; vide, la fin du trajet.",es:"Cuando se ha consumido o ha frenado demasiado para brillar; vacío, el final del trayecto.",it:"Quando si è consumato o ha rallentato troppo per brillare; vuoto, la fine del percorso."},{group:a.WHEN,effective:(e,t)=>a.trackEnd(t,"last")})]};static CURVE_POINT={kind:"reentry-curve-point",title:{en:"Point of the light curve",fr:"Point de la courbe de lumière",es:"Punto de la curva de luz",it:"Punto della curva di luce"},parameters:[a.instant("t",{en:"Time",fr:"Instant",es:"Instante",it:"Istante"},{en:"Seconds of the recording.",fr:"Secondes de l'enregistrement.",es:"Segundos de la grabación.",it:"Secondi della registrazione."},{required:!0}),{type:"number",key:"absoluteMagnitude",min:-40,max:10,step:.1,required:!0,label:{en:"Absolute magnitude",fr:"Magnitude absolue",es:"Magnitud absoluta",it:"Magnitudine assoluta"}}]}}class h{constructor(e,t,i){this.container=e,this.host=t,C.attach(e,"reentry-editor-part",h.STYLE),this.language=i,this.render(),this.setLanguage(i)}messages=I;languageToken=0;currentId;form;list;timeline;placeForm;placeIndex=0;row="path";fragmentForm;fragmentIndex=0;curveForm;curveIndex=0;language;shown=[];static STYLE='.reentry-editor-part { flex-basis: 100%; min-width: 0; } .reentry-editor-part #reentry-timeline { flex-basis: 100%; min-width: 0; padding: 4px 0; } .reentry-editor-part #reentry-path > .icon-btn, .reentry-editor-part #reentry-curve > .icon-btn { align-self: flex-end; } .reentry-editor-part #reentry-list, .reentry-editor-part #reentry-places, .reentry-editor-part #reentry-fragment-list, .reentry-editor-part #reentry-curve-list { flex-basis: 100%; min-width: 0; } .reentry-editor-part .launch-editor, .reentry-editor-part .launch-fields { display: flex; flex-wrap: wrap; gap: 8px; align-items: end; } .reentry-editor-part .launch-fields { flex-basis: 100%; min-width: 0; } .reentry-editor-part [hidden] { display: none !important; } .reentry-editor-part select { min-width: 0; width: 100%; } .reentry-editor-part .launch-intro { flex-basis: 100%; margin: 0; } .reentry-editor-part .launch-track { flex-basis: 100%; margin: 0; } .reentry-editor-part .launch-parameters { flex-basis: 100%; min-width: 0; display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-start; } .reentry-editor-part .parameter-group { flex: 1 1 14em; min-width: 0; box-sizing: border-box; margin: 0; display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: flex-start; align-content: flex-start; } .reentry-editor-part input, .reentry-editor-part select { max-width: 100%; box-sizing: border-box; } .reentry-editor-part input[type="text"] { width: 12em; } .reentry-editor-part input[data-key="title"] { width: 18em; } .reentry-editor-part label { min-width: 0; max-width: 100%; } .reentry-editor-part input.parameter-derived::placeholder { opacity: .65; } .reentry-editor-part .launch-path { flex: 1 1 100%; min-width: 0; box-sizing: border-box; margin: 0; display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: flex-start; }';async setLanguage(e){const t=++this.languageToken;this.language=e;const i=M.includes(e)?e:"en",r=i==="en"?I:await P(i);t===this.languageToken&&(this.messages=r,this.render(),this.sync())}sync(){const e=this.reentries;this.shown=[...e],e.some(i=>i.id===this.currentId)||(this.currentId=e[0]?.id),this.list?.setItems(e.map(i=>({id:i.id,label:this.labelOf(i)})),this.currentId),this.syncAddState();const t=this.current;this.element("reentry-fields").hidden=t===void 0,t&&(this.syncPlace(!0),this.syncFragments(t,!0),this.form??=new v(this.element("reentry-parameters"),this.language,"reentry.",{said:()=>this.host.said(),writingLanguage:()=>this.host.writingLanguage()}),this.form.show(a.SET,new y(()=>this.current,i=>this.editReentry(r=>{r.object&&(r.object={...r.object}),i(r),r.object&&Object.values(r.object).every(n=>n===void 0||n==="")&&delete r.object})),()=>this.written()))}refresh(){this.syncAddState();const e=this.reentries;if(e.length===this.shown.length&&e.every((t,i)=>t.id===this.shown[i].id)){this.syncTimeline();return}this.sync()}setTime(e){this.timeline?.setTime(e)}syncAddState(){const e=this.origin()!==void 0;this.list?.setAddState(e,e?void 0:this.messages.addNowhere)}get current(){return this.reentries.find(e=>e.id===this.currentId)}show(e){this.currentId=e,this.row="path",this.placeIndex=0,this.fragmentIndex=0,this.curveIndex=0,this.sync()}render(){const e=this.messages;this.form=void 0,this.container.innerHTML=`<div class="launch-editor">
|
|
2
|
-
<p class="launch-intro">${e.intro}</p>
|
|
3
|
-
<div id="reentry-list"></div>
|
|
4
|
-
<div id="reentry-fields" class="launch-fields">
|
|
5
|
-
<div id="reentry-parameters" class="launch-parameters"></div>
|
|
6
|
-
<div id="reentry-timeline"></div>
|
|
7
|
-
<button id="reentry-fragment-add" type="button" title="${e.addFragment}">${b.PLUS} ${e.fragment}</button>
|
|
8
|
-
<p class="launch-intro">${e.timelineNote}</p>
|
|
9
|
-
<fieldset id="reentry-path" class="launch-path">
|
|
10
|
-
<legend>${e.path}</legend>
|
|
11
|
-
<div id="reentry-place-parameters" class="launch-parameters"></div>
|
|
12
|
-
<button id="reentry-place-delete" class="icon-btn" type="button" title="${e.deletePlace}" aria-label="${e.deletePlace}">${b.TRASH}</button>
|
|
13
|
-
</fieldset>
|
|
14
|
-
<fieldset id="reentry-fragments" class="launch-path">
|
|
15
|
-
<legend id="reentry-fragment-legend">${e.fragment}</legend>
|
|
16
|
-
<div id="reentry-fragment-parameters" class="launch-parameters"></div>
|
|
17
|
-
<button id="reentry-fragment-delete" class="icon-btn" type="button" title="${e.deleteFragment}" aria-label="${e.deleteFragment}">${b.TRASH}</button>
|
|
18
|
-
<fieldset id="reentry-curve" class="launch-path">
|
|
19
|
-
<legend>${e.curve}</legend>
|
|
20
|
-
<p id="reentry-curve-empty" class="launch-intro">${e.noCurve}</p>
|
|
21
|
-
<div id="reentry-curve-parameters" class="launch-parameters"></div>
|
|
22
|
-
<button id="reentry-curve-delete" class="icon-btn" type="button" title="${e.deleteCurvePoint}" aria-label="${e.deleteCurvePoint}">${b.TRASH}</button>
|
|
23
|
-
</fieldset>
|
|
24
|
-
</fieldset>
|
|
25
|
-
<p class="launch-intro">${e.derivedNote}</p>
|
|
26
|
-
</div>
|
|
27
|
-
</div>`,this.list=new S({header:this.element("reentry-list"),body:this.element("reentry-fields"),ids:{list:"reentry-select",remove:"reentry-delete",add:"reentry-add",kinds:"reentry-add-kind",kind:t=>`reentry-add-${t}`},onSelect:t=>this.show(t),onAdd:t=>this.addReentry(t==="reentry"?"reentry":"fireball"),onRemove:()=>this.deleteCurrent()}),this.list.setLabels({list:e.reentry,remove:e.deleteReentry,add:e.addReentry,empty:e.none}),this.list.setKinds([{value:"fireball",label:e.kindFireball},{value:"reentry",label:e.kindReentry}]),this.timeline=new T(this.element("reentry-timeline"),t=>this.host.seekTo(t),{addKeyframeHere:e.addPointHere,keyframeHere:e.pointHere,zoomHint:e.zoomHint}),this.element("reentry-place-delete").addEventListener("click",()=>this.removePlace()),this.element("reentry-curve-delete").addEventListener("click",()=>this.removeCurvePoint()),this.placeForm=void 0,this.element("reentry-fragment-add").addEventListener("click",()=>this.addFragment()),this.element("reentry-fragment-delete").addEventListener("click",()=>this.removeFragment()),this.fragmentForm=void 0,this.curveForm=void 0}written(){const e=this.current;e&&this.list?.rename(e.id,this.labelOf(e))}syncTimeline(){const e=this.current;if(!this.timeline||!e)return;const t=this.messages,i=e.track[0]?.t??0,r=e.track[e.track.length-1]?.t??0,n={id:"path",label:t.path,color:h.PATH_COLOR,times:e.track.map(c=>c.t),active:this.row==="path",selectedTime:this.row==="path"?e.track[this.placeIndex]?.t:void 0,open:()=>this.selectPlace(this.placeIndex),pressed:(c,d)=>{const m=d===void 0?-1:(this.current?.track??[]).findIndex(u=>u.t===d);this.selectPlace(m>=0?m:this.placeIndex)},move:(c,d)=>this.movePlace(c,d),add:()=>this.addPlaceAt(this.host.currentTime())},s=e.fragments.map((c,d)=>{const m=c.lightCurve??[];return{id:`fragment-${d}`,label:this.fragmentLabel(c,d),color:h.PIECE_COLOR,times:m.map(u=>u.t),spans:[{t:c.fromT??i,until:c.untilT??r,label:""}],active:this.row==="fragment"&&d===this.fragmentIndex,selectedTime:this.row==="fragment"&&d===this.fragmentIndex?m[this.curveIndex]?.t:void 0,open:()=>this.selectFragment(d),pressed:(u,p)=>{const k=p===void 0?-1:(this.current?.fragments[d]?.lightCurve??[]).findIndex(w=>w.t===p);this.selectFragment(d,k>=0?k:void 0)},move:(u,p)=>this.moveCurvePoint(d,u,p),add:()=>this.addCurvePointAt(d,this.host.currentTime())}}),l=a.instantsOf(e),o=Math.min(...l),g=Math.max(...l),x=Math.max(500,(g-o)/10);this.timeline.show([n,...s],this.host.duration(),this.host.currentTime(),{from:o-x,to:g+x})}static PATH_COLOR="#e08a1e";static PIECE_COLOR="#c0581b";static MIN_PLACES=2;syncPlace(e=!1){const t=this.current?.track??[];this.placeIndex=Math.max(0,Math.min(this.placeIndex,t.length-1)),this.element("reentry-place-delete").disabled=t.length<=h.MIN_PLACES,this.placeForm?this.placeForm.sync(e):(this.placeForm=new v(this.element("reentry-place-parameters"),this.language,"reentryPlace."),this.placeForm.show(a.PLACE,new y(()=>this.current?.track[this.placeIndex],i=>this.editPlace(this.placeIndex,i),void 0,this.host.positionPlace?.()),()=>{})),this.syncTimeline()}selectPlace(e){this.row="path",this.placeIndex=e,this.syncDetail(),this.syncPlace(!0)}syncDetail(){this.element("reentry-path").hidden=this.row!=="path",this.element("reentry-fragments").hidden=this.row!=="fragment";const e=this.currentFragment;this.element("reentry-fragment-legend").textContent=e?`${this.messages.fragment} ${this.fragmentLabel(e,this.fragmentIndex)}`:this.messages.fragment}editPlace(e,t){let i;this.editReentry(r=>{i={...r.track[e]},t(i),r.track=r.track.map((n,s)=>s===e?i:n).sort((n,s)=>n.t-s.t)}),i&&(this.placeIndex=this.current?.track.indexOf(i)??0),this.syncPlace()}movePlace(e,t){const i=this.current?.track.findIndex(r=>r.t===e)??-1;i<0||(this.editPlace(i,r=>{r.t=t}),this.syncPlace(!0))}addPlaceAt(e){const t=this.current;if(!t)return;const i=t.track.findIndex(n=>Math.abs(n.t-e)<1);if(i>=0){this.selectPlace(i);return}const r=a.placeAt(t,e);this.editReentry(n=>{n.track=[...n.track,r].sort((s,l)=>s.t-l.t)}),this.selectPlace(this.current?.track.indexOf(r)??0)}removePlace(){if((this.current?.track.length??0)<=h.MIN_PLACES)return;const e=this.placeIndex;this.editReentry(t=>{t.track=t.track.filter((i,r)=>r!==e)}),this.syncPlace(!0)}static MIN_FRAGMENTS=1;fragmentLabel(e,t){return e.id??String(t+1)}syncFragments(e,t=!1){const i=e.fragments;this.fragmentIndex=Math.max(0,Math.min(this.fragmentIndex,i.length-1)),this.element("reentry-fragment-delete").disabled=i.length<=h.MIN_FRAGMENTS,this.syncDetail(),this.fragmentForm?this.fragmentForm.sync(t):(this.fragmentForm=new v(this.element("reentry-fragment-parameters"),this.language,"reentryFragment."),this.fragmentForm.show(a.FRAGMENT,new y(()=>this.currentFragment,r=>this.editFragment(n=>r(n)),()=>this.current),()=>{})),this.syncCurve(t)}selectFragment(e,t){const i=e!==this.fragmentIndex;this.row="fragment",this.fragmentIndex=e,t!==void 0?this.curveIndex=t:i&&(this.curveIndex=0),this.current&&this.syncFragments(this.current,!0)}get currentFragment(){return this.current?.fragments[this.fragmentIndex]}editFragment(e,t=this.fragmentIndex){this.editReentry(i=>{const r={...i.fragments[t]};r.lightCurve&&(r.lightCurve=[...r.lightCurve]),e(r),i.fragments=i.fragments.map((n,s)=>s===t?r:n)}),this.syncDetail(),this.syncTimeline()}addFragment(){const e=this.current;if(!e)return;const t=e.fragments[e.fragments.length-1];let i=e.fragments.length+1;for(;e.fragments.some(n=>n.id===`piece-${i}`);)i++;const r={id:`piece-${i}`,lagS:(t?.lagS??0)+1,absoluteMagnitude:(t?.absoluteMagnitude??-4)+1};this.editReentry(n=>{n.fragments=[...n.fragments,r]}),this.selectFragment((this.current?.fragments.length??1)-1)}removeFragment(){if((this.current?.fragments.length??0)<=h.MIN_FRAGMENTS)return;const e=this.fragmentIndex;this.editReentry(t=>{t.fragments=t.fragments.filter((i,r)=>r!==e)}),this.curveIndex=0,this.selectFragment(Math.min(e,(this.current?.fragments.length??1)-1))}syncCurve(e=!1){const t=this.currentFragment?.lightCurve??[];this.curveIndex=Math.max(0,Math.min(this.curveIndex,t.length-1)),this.element("reentry-curve-empty").hidden=t.length>0,this.element("reentry-curve-parameters").hidden=t.length===0,this.element("reentry-curve-delete").hidden=t.length===0,this.curveForm?this.curveForm.sync(e):(this.curveForm=new v(this.element("reentry-curve-parameters"),this.language,"reentryCurve."),this.curveForm.show(a.CURVE_POINT,new y(()=>this.currentFragment?.lightCurve?.[this.curveIndex],i=>this.editCurvePoint(this.fragmentIndex,this.curveIndex,i)),()=>{})),this.syncTimeline()}editCurvePoint(e,t,i){let r;this.editFragment(n=>{const s=n.lightCurve??[];r={...s[t]},i(r),n.lightCurve=s.map((l,o)=>o===t?r:l).sort((l,o)=>l.t-o.t)},e),r&&(this.curveIndex=this.current?.fragments[e]?.lightCurve?.indexOf(r)??0),this.syncCurve()}moveCurvePoint(e,t,i){const r=this.current?.fragments[e]?.lightCurve?.findIndex(n=>n.t===t)??-1;r<0||(this.fragmentIndex=e,this.editCurvePoint(e,r,n=>{n.t=i}),this.syncFragments(this.current,!0))}addCurvePointAt(e,t){const i=this.current?.fragments[e];if(!i)return;const r=(i.lightCurve??[]).findIndex(s=>Math.abs(s.t-t)<1);if(r>=0){this.selectFragment(e,r);return}const n=a.curvePointAt(i,t);this.editFragment(s=>{s.lightCurve=[...s.lightCurve??[],n].sort((l,o)=>l.t-o.t)},e),this.selectFragment(e,this.current?.fragments[e]?.lightCurve?.indexOf(n)??0)}removeCurvePoint(){if(!this.currentFragment?.lightCurve?.length)return;const e=this.curveIndex;this.editFragment(t=>{const i=(t.lightCurve??[]).filter((r,n)=>n!==e);i.length?t.lightCurve=i:delete t.lightCurve}),this.syncCurve(!0)}editReentry(e){const t=this.current;if(!t)return;const i={...t,track:[...t.track],fragments:[...t.fragments]};e(i),this.writeReentries(this.reentries.map(r=>r===t?i:r)),this.host.changed()}origin(){const e=this.host.sighting(),t=e.event?.place?.[0];if(!(t?.lat===void 0||t.lng===void 0))return{lat:t.lat,lng:t.lng,headingRad:(e.observerTrack?.getInterpolatedPoseAt(0)?.headingDeg??0)*Math.PI/180}}newOf(e){const t=this.origin();if(!t)return;const i=Math.round(this.host.currentTime()),r=Math.max(.05,Math.cos(t.lat*Math.PI/180)),n=(s,l)=>{const o=s*Math.cos(t.headingRad)-l*Math.sin(t.headingRad),g=s*Math.sin(t.headingRad)+l*Math.cos(t.headingRad);return{lat:t.lat+o/111.32,lng:t.lng+g/(111.32*r)}};return e==="fireball"?{track:[{t:i,...n(150,-45),altitudeKm:100},{t:i+3e3,...n(150,45),altitudeKm:60}],fragments:[{id:"main",absoluteMagnitude:-6}]}:{track:[{t:i,...n(300,-225),altitudeKm:82},{t:i+6e4,...n(300,225),altitudeKm:72}],fragments:[{id:"main",absoluteMagnitude:-4},{id:"piece-2",lagS:1.5,absoluteMagnitude:-2.5},{id:"piece-3",lagS:3,absoluteMagnitude:-1.5}]}}addReentry(e){const t=this.newOf(e);if(!t)return;let i=this.reentries.length+1;for(;this.reentries.some(n=>n.id===`${e}-${i}`);)i++;const r={id:`${e}-${i}`,...t};this.writeReentries([...this.reentries,r]),this.host.changed(),this.show(r.id)}deleteCurrent(){const e=this.current;e&&(this.currentId=void 0,this.writeReentries(this.reentries.filter(t=>t!==e)),this.host.changed(),this.sync())}writeReentries(e){const t=this.host.sighting();t.skyEvents=F.written({...t.skyEvents,reentries:e})}labelOf(e){const t=this.host.said().read(e.title)||e.object?.name;return t?`${t} (${e.id})`:e.id}get reentries(){return this.host.sighting().skyEvents?.reentries??[]}element(e){return this.container.querySelector(`#${e}`)}}export{h as ReentryEditor};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a5 as G,aB as S,aC as F,al as M,aD as f,am as w,a8 as _,au as R,av as I,V as H,aE as N,aF as y,aG as C,aH as B,Z as L}from"./rr0-sighting-editor.mjs";class h{static RADIUS=840;static MAX_SEGMENTS=1024;static VERTICES_PER_SEGMENT=12;static MIN_HALF_WIDTH_DEG=.1;static BRIGHT_HALF_WIDTH_DEG=.22;static TRAIN_SHARE=.9;static TRAIN_FALLOFF=1.2;object=new G;tiers;trains;positions;colors;shown=0;drawn=[];constructor(){this.object.name="reentries",this.tiers=S.map(i=>{const o=new F(new M,f.material(i.size,!1));return f.track(o),o.frustumCulled=!1,this.object.add(o),o});const s=h.MAX_SEGMENTS*h.VERTICES_PER_SEGMENT;this.positions=new Float32Array(s*3),this.colors=new Float32Array(s*3);const t=new M;t.setAttribute("position",new w(this.positions,3)),t.setAttribute("color",new w(this.colors,3)),t.setDrawRange(0,0),this.trains=new _(t,R.material()),this.trains.frustumCulled=!1,R.track(this.trains),this.object.add(this.trains)}nearest(s,t){let i,o=t;for(const e of this.drawn){const n=e.direction.dot(s);(n>o||i&&n===o&&e.magnitude<i.magnitude)&&(o=n,i=e)}return i}static directionOf(s){const{x:t,y:i,z:o}=I(s.altitudeDeg,s.azimuthDeg,1);return new H(t,i,o)}get count(){return this.shown}set(s,t,i,o){const e=this.tiers.map(()=>[]);let n=0,E=0;const r=new N;this.drawn=[];for(const a of s){const u=i(a.head);if(u<=0)continue;const c=a.magnitude-2.5*Math.log10(u);if(c>t)continue;E++,this.drawn.push({direction:h.directionOf(a.head),view:a,magnitude:c}),r.set(a.color);const d=y(c,t)*a.fade,{x:m,y:A,z:p}=I(a.head.altitudeDeg,a.head.azimuthDeg,h.RADIUS),[l,T,z]=o(a.head,c),D=a.fade,b=Math.max(r.r,r.g,r.b)||1;e[C(d)].push({x:m,y:A,z:p,r:l*r.r*D/b,g:T*r.g*D/b,b:z*r.b*D/b}),n=this.pushTrain(n,a.train,d,r)}this.shown=E,this.tiers.forEach((a,u)=>{const c=e[u],d=new Float32Array(c.length*3),m=new Float32Array(c.length*3);c.forEach((p,l)=>{d.set([p.x,p.y,p.z],l*3),m.set([p.r,p.g,p.b],l*3)}),a.geometry.dispose();const A=new M;A.setAttribute("position",new w(d,3)),A.setAttribute("color",new w(m,3)),a.geometry=A});const g=this.trains.geometry;g.setDrawRange(0,n),g.getAttribute("position").needsUpdate=!0,g.getAttribute("color").needsUpdate=!0}pushTrain(s,t,i,o){const e=t.length-1;for(let n=0;n<e;n++){if(s+h.VERTICES_PER_SEGMENT>h.MAX_SEGMENTS*h.VERTICES_PER_SEGMENT)return s;const E=1-n/e,r=1-(n+1)/e,g=I(t[n].altitudeDeg,t[n].azimuthDeg,h.RADIUS),a=I(t[n+1].altitudeDeg,t[n+1].azimuthDeg,h.RADIUS),u=d=>h.RADIUS*((h.MIN_HALF_WIDTH_DEG+h.BRIGHT_HALF_WIDTH_DEG*i*d)*Math.PI/180),c=d=>h.TRAIN_SHARE*i*d**h.TRAIN_FALLOFF;s=this.pushRibbon(s,g,a,u(E),u(r),c(E),c(r),o)}return s}pushRibbon(s,t,i,o,e,n,E,r){const g={x:i.x-t.x,y:i.y-t.y,z:i.z-t.z};if(Math.hypot(g.x,g.y,g.z)<1e-9)return s;const a=this.normalise(this.cross(this.normalise(t),this.normalise(g)));for(const[u,c]of[[-1,0],[0,1]]){const d=this.across(t,a,o,u),m=this.across(i,a,e,u),A=this.across(t,a,o,c),p=this.across(i,a,e,c),l=(T,z)=>T===0?z:0;s=this.push(s,d,l(u,n),r),s=this.push(s,m,l(u,E),r),s=this.push(s,A,l(c,n),r),s=this.push(s,m,l(u,E),r),s=this.push(s,p,l(c,E),r),s=this.push(s,A,l(c,n),r)}return s}across(s,t,i,o){return{x:s.x+t.x*i*o,y:s.y+t.y*i*o,z:s.z+t.z*i*o}}push(s,t,i,o){const e=s*3;this.positions[e]=t.x,this.positions[e+1]=t.y,this.positions[e+2]=t.z;const n=B.relativeOfResponse(Math.max(0,Math.min(1,i)));return this.colors[e]=n*o.r,this.colors[e+1]=n*o.g,this.colors[e+2]=n*o.b,s+1}cross(s,t){return{x:s.y*t.z-s.z*t.y,y:s.z*t.x-s.x*t.z,z:s.x*t.y-s.y*t.x}}normalise(s){const t=Math.hypot(s.x,s.y,s.z)||1;return{x:s.x/t,y:s.y/t,z:s.z/t}}dispose(){for(const s of this.tiers)s.geometry.dispose(),s.material.dispose();this.trains.geometry.dispose(),this.trains.material.dispose(),this.object.removeFromParent()}}class k{inSky=!0;hiddenFromEye=!0;pieces=new h;get object(){return this.pieces.object}get drawnCount(){return this.pieces.count}update(s,t,i){const o=s.length===0?[]:L.viewsAt(s,t,i.observer);o.length===0&&this.pieces.count===0||(this.pieces.set(o,i.magnitudeLimit,e=>i.cloudTransmission(e),(e,n)=>i.arrivingIlluminance(e,n,1)),i.lightFrom(o.map(e=>({position:e.head,magnitude:e.magnitude}))),i.glareFrom(o.map(e=>({key:`${e.reentryId}:${e.fragmentId}`,position:e.head,magnitude:e.magnitude,fade:e.fade}))))}pick(s,t,i){const o=this.pieces.nearest(t,i.nearestCos);return o&&{id:o.view.reentryId,detail:o}}dispose(){this.pieces.dispose()}}export{k as ReentrySimulation};
|