@rr0/ufoathome 0.165.0 → 0.167.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/ModuleConformance-DqZDQ_RP.js +2 -0
- 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-BrOayCKN.js +15 -0
- package/dist-embed-sighting-editor/ModulesPanelMessages_en-t8LOPRx0.js +1 -0
- package/dist-embed-sighting-editor/ModulesPanelMessages_es-DQFuXaUa.js +1 -0
- package/dist-embed-sighting-editor/ModulesPanelMessages_fr-DZMwqDs0.js +1 -0
- package/dist-embed-sighting-editor/ModulesPanelMessages_it-DfX1ObVK.js +1 -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 +664 -673
- 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/ModulesPanelMessages_en-D97Nh2yy.js +0 -1
- package/dist-embed-sighting-editor/ModulesPanelMessages_es-CE9Ajw2-.js +0 -1
- package/dist-embed-sighting-editor/ModulesPanelMessages_fr-BWsj-7_t.js +0 -1
- package/dist-embed-sighting-editor/ModulesPanelMessages_it-CtKrboEg.js +0 -1
- 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,2 +1,2 @@
|
|
|
1
|
-
import{A as dt,L as pt,T as z,R as L,a as F,M as Z,r as mt,l as $}from"./rr0-sighting.mjs";import{C as x}from"./ContrailGrowth-DwHS8If9.js";class E{static OCTAVES=[63,125,250,500,1e3,2e3,4e3,8e3];static STANDARD={temperatureC:15,relativeHumidity:.7,pressureKPa:101.325};static REFERENCE_PRESSURE_KPA=101.325;static REFERENCE_TEMPERATURE_K=293.15;static TRIPLE_POINT_K=273.16;static speedOfSound(t){return 20.0468*Math.sqrt(t+273.15)}static absorptionDbPerKm(t,e=E.STANDARD){const a=e.temperatureC+273.15,n=E.REFERENCE_TEMPERATURE_K,i=e.pressureKPa/E.REFERENCE_PRESSURE_KPA,o=10**(-6.8346*(E.TRIPLE_POINT_K/a)**1.261+4.6151),s=e.relativeHumidity*100*o/i,r=i*(24+40400*s*(.02+s)/(.391+s)),h=i*(a/n)**-.5*(9+280*s*Math.exp(-4.17*((a/n)**(-1/3)-1))),c=t*t;return 8.686*c*(184e-13*(1/i)*Math.sqrt(a/n)+(a/n)**-2.5*(.01275*Math.exp(-2239.1/a)/(r+c/r)+.1068*Math.exp(-3352/a)/(h+c/h)))*1e3}static aWeightingDb(t){const e=t*t,a=12194**2*e*e/((e+20.6**2)*Math.sqrt((e+107.7**2)*(e+737.9**2))*(e+12194**2));return 20*Math.log10(a)+2}static sumDb(t){return 10*Math.log10(t.reduce((e,a)=>e+10**(a/10),0))}}const gt=.25,Q=.4,tt=6,K=12,Et=3,et=.2,Mt=.2,At=24,ft=3,bt=12,at=1,St=.7,Dt=1.5,Rt=.8,Ot=1.3,nt=.9,it=5,vt=25,It=.5,Tt=.12,st=[.13,.31],Bt=.16,_t=1.6,Nt=3.6,rt=1.1,Ct=.3,wt=1e3,ot=.7;class q{context;noiseBuffer;roughBuffers=new Map;voices=new Map;bus;reverb;reverbOut;level=1;master;paused=!0;requested=[];headingDeg=0;resume(){if(!this.context){if(typeof AudioContext>"u")return;try{this.context=new AudioContext}catch(t){console.warn("AircraftAudio: Web Audio unavailable, aircraft stay silent:",t);return}}dt.unlock(this.context),this.apply()}setLevel(t){this.level=t,this.master&&(this.master.gain.value=t)}setPaused(t){t!==this.paused&&(this.paused=t,this.apply())}setVoices(t,e=0){this.requested=t,this.headingDeg=e,this.apply()}dispose(){for(const t of[...this.voices.keys()])this.release(t);this.context?.close(),this.context=void 0,this.master=void 0,this.bus=void 0}apply(){const t=this.context;if(!t)return;const e=this.paused?[]:this.requested,a=new Set(e.map(n=>n.id));for(const n of[...this.voices.keys()])a.has(n)||this.release(n);for(const n of e){const i=this.voices.get(n.id)??this.build(t,n);this.retarget(t,i,n)}}build(t,e){const a=t.createGain();a.gain.value=0;let n;const i=this.busOf(t);typeof t.createStereoPanner=="function"?(n=t.createStereoPanner(),a.connect(n).connect(i)):a.connect(i);const o=t.createGain(),s=e.character?.modulationDepth??0;o.gain.value=1-s/2;const r=t.createOscillator();r.type="sine";const h=t.createGain();h.gain.value=s/2,r.connect(h).connect(o.gain),o.connect(a);const c=t.createBufferSource();c.buffer=this.noise(t),c.loop=!0,c.loopStart=Math.random()*tt*.5;const d=[],l=[],u=[];for(const v of E.OCTAVES){const T=t.createBiquadFilter();T.type="bandpass",T.frequency.value=v,T.Q.value=at;const N=t.createBiquadFilter();N.type="bandpass",N.frequency.value=v,N.Q.value=at;const k=t.createGain();k.gain.value=0,c.connect(T).connect(N).connect(k).connect(o),d.push(T),l.push(N),u.push(k)}const p=[];for(const[v,T]of[[e.character?.toneHz,e.character?.toneShare],[e.character?.humHz,e.character?.humShare]])if(v!==void 0)for(let N=1;N<=ft;N++){const k=t.createOscillator();k.type="sine",k.frequency.value=v*N;const X=t.createGain();X.gain.value=0,k.connect(X).connect(a),p.push({oscillator:k,gain:X,harmonic:N,baseHz:v,share:T??0})}const m=t.createGain();m.gain.value=0,m.connect(a.gain);const A=st.map(v=>{const T=t.createOscillator();return T.type="sine",T.frequency.value=v,T.connect(m),T}),b=t.createGain();b.gain.value=e.character?.roughness??et;const R=t.createBufferSource();R.buffer=this.roughTable(t,Et),R.loop=!0,R.loopStart=Math.random()*K*.5,R.connect(b).connect(o.gain);const S=t.createGain();S.gain.value=(e.character?.roughness??et)*Mt;const f=t.createBufferSource();f.buffer=this.roughTable(t,At),f.loop=!0,f.loopStart=Math.random()*K*.5,f.connect(S).connect(o.gain);let B;const j=this.busOf(t)&&this.reverb;j&&(B=t.createGain(),B.gain.value=0,a.connect(B).connect(j));const V=[c,R,f,r,...p.map(v=>v.oscillator),...A];for(const v of V)v.start();const J={nodes:[a,o,h,b,S,m,...p.map(v=>v.gain),...d,...l,...u,...B?[B]:[],...n?[n]:[],...V],sources:V,filters:d,seconds:l,gains:u,tones:p,lfo:r,lfoDepth:h,wander:A,wanderDepth:m,roughDepth:b,crackleDepth:S,beat:o,output:a,panner:n,send:B};return this.voices.set(e.id,J),J}retarget(t,e,a){const n=t.currentTime,i=(p,m)=>p.setTargetAtTime(m,n,gt),o=Math.min(Dt,Math.max(St,a.dopplerRatio)),s=Math.min(Ot,Math.max(Rt,Math.sqrt(a.dopplerRatio))),r=t.sampleRate*.45,h=a.bandAmplitudes.map((p,m)=>p*q.unweighting(E.OCTAVES[m])),c=Math.sqrt(h.reduce((p,m)=>p+m*m,0)),d=Math.min(1,Math.max(0,(a.distanceKm-it)/(vt-it)));E.OCTAVES.forEach((p,m)=>{i(e.filters[m].frequency,Math.min(r,p*s)),i(e.seconds[m].frequency,Math.min(r,p*s)),i(e.gains[m].gain,h[m]*Math.sqrt(wt/p))});const l=a.character;for(const{oscillator:p,gain:m,harmonic:A,baseHz:b,share:R}of e.tones){const S=b*A;i(p.frequency,S*o);const f=S*o;i(m.gain,f<r?R*Bt*h[q.bandOf(f)]/A:0)}l?.modulationHz!==void 0&&i(e.lfo.frequency,l.modulationHz*o);const u=c>0?ot*(1-Math.exp(-c/ot))/c:1;if(i(e.output.gain,u*(1-Ct*d)),i(e.wanderDepth.gain,u*Tt*d/st.length),e.send&&i(e.send.gain,_t*d),e.panner){const p=(a.azimuthDeg-this.headingDeg)*Math.PI/180;i(e.panner.pan,Math.max(-nt,Math.min(nt,Math.sin(p)))*(1-It*d))}}static unweighting(t){return 10**(Math.min(bt,Math.max(0,-E.aWeightingDb(t)))/20)}static bandOf(t){let e=0;return E.OCTAVES.forEach((a,n)=>{Math.abs(Math.log(t/a))<Math.abs(Math.log(t/E.OCTAVES[e]))&&(e=n)}),e}roughTable(t,e){const a=this.roughBuffers.get(e);if(a)return a;const n=Math.floor(t.sampleRate*K),i=t.createBuffer(1,n,t.sampleRate),o=i.getChannelData(0),s=Array.from({length:K*e},()=>(Math.random()*2-1)**3),r=t.sampleRate/e;for(let h=0;h<o.length;h++){const c=h/r,d=Math.floor(c),l=c-d,u=l*l*(3-2*l);o[h]=s[d%s.length]*(1-u)+s[(d+1)%s.length]*u}return this.roughBuffers.set(e,i),i}roomImpulse(t){const e=Math.floor(t.sampleRate*Nt),a=t.createBuffer(2,e,t.sampleRate);for(let n=0;n<2;n++){const i=a.getChannelData(n);let o=0;for(let s=0;s<e;s++){const r=s/t.sampleRate,h=.6*Math.exp(-r/(rt*2))+.04;o+=h*(Math.random()*2-1-o),i[s]=o*Math.exp(-r/rt)}}return a}busOf(t){if(this.bus)return this.bus;const e=t.createGain();if(e.gain.value=this.level,e.connect(t.destination),this.master=e,typeof t.createConvolver=="function"){const a=t.createConvolver();a.buffer=this.roomImpulse(t);const n=t.createGain();n.gain.value=.9,a.connect(n),this.reverb=a,this.reverbOut=n}if(typeof t.createDynamicsCompressor=="function"){const a=t.createDynamicsCompressor();a.threshold.value=-6,a.knee.value=3,a.ratio.value=4,a.attack.value=.005,a.release.value=.25,a.connect(e),this.bus=a}else this.bus=e;return this.reverbOut?.connect(this.bus),this.bus}release(t){const e=this.voices.get(t);if(!e)return;this.voices.delete(t);const a=this.context;a&&(e.output.gain.setTargetAtTime(0,a.currentTime,Q/3),setTimeout(()=>{for(const n of e.sources)try{n.stop()}catch{}for(const n of e.nodes)n.disconnect()},Q*1e3*3))}noise(t){if(this.noiseBuffer)return this.noiseBuffer;const e=t.createBuffer(1,t.sampleRate*tt,t.sampleRate),a=e.getChannelData(0);for(let n=0;n<a.length;n++)a[n]=Math.random()*2-1;return this.noiseBuffer=e,e}}class _{static BASE_DB_A=30;static WIND_DB_A=[[0,10],[1,28],[2,36],[3,40],[5,46],[8,52],[12,58],[20,66]];static RAIN_DB_A=[[0,0],[.1,42],[.3,50],[.6,58],[1,65]];static BED_RMS=.2;static MINIMUM_REFERENCE=.008;static WIND_BED_MIN_MS=1;static WIND_BED_FULL_MS=20;static dbA(t){const e=[_.BASE_DB_A,_.along(_.WIND_DB_A,t.windSpeed)];return(t.precipitationType==="rain"||t.precipitationType==="hail")&&e.push(_.along(_.RAIN_DB_A,t.precipitationIntensity)),10*Math.log10(e.filter(a=>a>0).reduce((a,n)=>a+10**(n/10),0))}static bedVolume(t){const e=t.windSpeed>_.WIND_BED_MIN_MS?Math.min(t.windSpeed/_.WIND_BED_FULL_MS,1):0,a=t.precipitationType==="hail"?Math.min(1,t.precipitationIntensity*1.3+.2):t.precipitationType==="rain"?t.precipitationIntensity:0;return Math.hypot(e,a)}static referenceAmplitude(t){return Math.max(_.BED_RMS*_.bedVolume(t),_.MINIMUM_REFERENCE)}static along(t,e){if(e<=t[0][0])return t[0][1];for(let a=1;a<t.length;a++)if(e<=t[a][0]){const[n,i]=t[a-1],[o,s]=t[a];return i+(s-i)*(e-n)/(o-n)}return t[t.length-1][1]}}class y{static TYPES={A318:["Airbus A318","airliner-narrow",34.1,31.4],A319:["Airbus A319","airliner-narrow",34.1,33.8],A320:["Airbus A320","airliner-narrow",34.1,37.6],A321:["Airbus A321","airliner-narrow",34.1,44.5],A19N:["Airbus A319neo","airliner-narrow",35.8,33.8],A20N:["Airbus A320neo","airliner-narrow",35.8,37.6],A21N:["Airbus A321neo","airliner-narrow",35.8,44.5],B737:["Boeing 737-700","airliner-narrow",34.3,33.6],B738:["Boeing 737-800","airliner-narrow",35.8,39.5],B739:["Boeing 737-900","airliner-narrow",35.8,42.1],B38M:["Boeing 737 MAX 8","airliner-narrow",35.9,39.5],B39M:["Boeing 737 MAX 9","airliner-narrow",35.9,42.2],B752:["Boeing 757-200","airliner-narrow",38,47.3],B753:["Boeing 757-300","airliner-narrow",38,54.4],B762:["Boeing 767-200","airliner-wide",47.6,48.5],B763:["Boeing 767-300","airliner-wide",47.6,54.9],B764:["Boeing 767-400","airliner-wide",51.9,61.4],B772:["Boeing 777-200","airliner-wide",60.9,63.7],B77L:["Boeing 777-200LR","airliner-wide",64.8,63.7],B77W:["Boeing 777-300ER","airliner-wide",64.8,73.9],B788:["Boeing 787-8","airliner-wide",60.1,56.7],B789:["Boeing 787-9","airliner-wide",60.1,62.8],B78X:["Boeing 787-10","airliner-wide",60.1,68.3],B744:["Boeing 747-400","airliner-wide",64.4,70.7],B748:["Boeing 747-8","airliner-wide",68.4,76.3],A306:["Airbus A300-600","airliner-wide",44.8,54.1],A310:["Airbus A310","airliner-wide",43.9,46.7],A332:["Airbus A330-200","airliner-wide",60.3,58.8],A333:["Airbus A330-300","airliner-wide",60.3,63.7],A338:["Airbus A330-800","airliner-wide",64,58.8],A339:["Airbus A330-900","airliner-wide",64,63.7],A343:["Airbus A340-300","airliner-wide",60.3,63.7],A346:["Airbus A340-600","airliner-wide",63.5,75.4],A359:["Airbus A350-900","airliner-wide",64.8,66.8],A35K:["Airbus A350-1000","airliner-wide",64.8,73.8],A388:["Airbus A380-800","airliner-wide",79.8,72.7],E170:["Embraer 170","regional-jet",26,29.9],E75L:["Embraer 175","regional-jet",26,31.7],E75S:["Embraer 175","regional-jet",26,31.7],E190:["Embraer 190","regional-jet",28.7,36.2],E195:["Embraer 195","regional-jet",28.7,38.7],E290:["Embraer 190-E2","regional-jet",33.7,36.2],E295:["Embraer 195-E2","regional-jet",33.7,41.5],CRJ2:["Bombardier CRJ200","regional-jet",21.2,26.8],CRJ7:["Bombardier CRJ700","regional-jet",23.2,32.3],CRJ9:["Bombardier CRJ900","regional-jet",24.9,36.2],CRJX:["Bombardier CRJ1000","regional-jet",26.2,39.1],AT72:["ATR 72","regional-turboprop",27.1,27.2],AT76:["ATR 72-600","regional-turboprop",27.1,27.2],AT45:["ATR 42","regional-turboprop",24.6,22.7],DH8D:["Dash 8 Q400","regional-turboprop",28.4,32.8],DH8C:["Dash 8-300","regional-turboprop",27.4,25.7],SF34:["Saab 340","regional-turboprop",21.4,19.7],B190:["Beechcraft 1900","regional-turboprop",17.7,17.6],C25A:["Cessna CitationJet CJ2","business-jet",14.3,14.4],C56X:["Cessna Citation Excel","business-jet",17.2,16],C68A:["Cessna Citation Latitude","business-jet",22,18.9],C550:["Cessna Citation II","business-jet",15.8,14.4],E55P:["Embraer Phenom 300","business-jet",15.9,15.6],E50P:["Embraer Phenom 100","business-jet",12.3,12.8],GLF5:["Gulfstream G550","business-jet",28.5,29.4],FA7X:["Dassault Falcon 7X","business-jet",26.2,23.4],CL60:["Bombardier Challenger 600","business-jet",19.6,20.9],LJ45:["Learjet 45","business-jet",14.6,17.7],H25B:["Hawker 800","business-jet",15.7,15.6],C172:["Cessna 172","light-piston",11,8.3],C152:["Cessna 152","light-piston",10.2,7.3],C182:["Cessna 182","light-piston",10.9,8.8],P28A:["Piper Cherokee","light-piston",10.7,7.2],PA34:["Piper Seneca","light-piston",11.8,8.7],SR20:["Cirrus SR20","light-piston",10.9,7.9],SR22:["Cirrus SR22","light-piston",11.7,7.9],S22T:["Cirrus SR22T","light-piston",11.7,7.9],DA40:["Diamond DA40","light-piston",11.6,8.1],DA42:["Diamond DA42","light-piston",13.4,8.6],BE20:["Beechcraft King Air 200","turboprop-light",16.6,13.3],BE58:["Beechcraft Baron","light-piston",11.5,9.1],C208:["Cessna Caravan","turboprop-light",15.9,11.5],PC12:["Pilatus PC-12","turboprop-light",16.3,14.4],TBM9:["Daher TBM 900","turboprop-light",12.8,10.7],EC35:["Airbus H135","helicopter-light",10.2,12.1],EC45:["Airbus H145","helicopter-medium",11,13.6],AS50:["Airbus H125","helicopter-light",10.7,12.9],EC30:["Airbus H130","helicopter-light",10.7,12.6],B407:["Bell 407","helicopter-light",10.7,12.7],B06:["Bell 206","helicopter-light",10.2,12],B429:["Bell 429","helicopter-medium",10.9,13],B505:["Bell 505","helicopter-light",10.4,11.9],R44:["Robinson R44","helicopter-light",10.1,11.7],R22:["Robinson R22","helicopter-light",7.7,8.8],A109:["Agusta A109","helicopter-medium",11,13],A139:["Leonardo AW139","helicopter-medium",13.8,16.7],S92:["Sikorsky S-92","helicopter-heavy",17.2,20.9],H60:["Sikorsky UH-60 Black Hawk","helicopter-heavy",16.4,19.8],T38:["Northrop T-38 Talon","military-jet",7.7,14.1],HAWK:["BAE Hawk","military-jet",9.4,11.9],GLID:["Glider","glider",17,7],BALL:["Balloon","balloon",15,20],ULAC:["Ultralight","ultralight",9.5,6],C42:["Ikarus C42","ultralight",9.4,6.3],DRON:["Drone","unmanned",1,.6]};static CATEGORIES={A1:["Light aircraft","light-piston",11,8.3],A2:["Small aircraft","business-jet",15,15],A3:["Large aircraft","airliner-narrow",34.1,37.6],A4:["High-vortex large aircraft","airliner-narrow",38,47.3],A5:["Heavy aircraft","airliner-wide",60.3,63.7],A6:["High-performance aircraft","military-jet",8,14],A7:["Rotorcraft","helicopter-medium",10.7,12.7],B1:["Glider","glider",17,7],B2:["Lighter-than-air","balloon",15,20],B4:["Ultralight","ultralight",9.5,6],B6:["Unmanned aircraft","unmanned",1.5,1]};static GENERIC={name:"Airliner",kind:"airliner-narrow",spanM:34.1,lengthM:37.6,basis:"nothing"};static of(t){const e=t?.type?.toUpperCase(),a=e?y.TYPES[e]:void 0;if(a)return{code:e,name:a[0],kind:a[1],spanM:a[2],lengthM:a[3],basis:"type"};const n=t?.category?y.CATEGORIES[t.category]:void 0;return n?{name:n[0],kind:n[1],spanM:n[2],lengthM:n[3],basis:"category"}:{...y.GENERIC}}static isHelicopter(t){return t.kind.startsWith("helicopter")}}class P{static DUSK_SUN_ELEVATION_DEG=-.83;static ALWAYS=new Set(["airliner-narrow","airliner-wide","regional-turboprop","regional-jet","business-jet"]);static NONE=new Set(["glider","balloon"]);static BRIGHTNESS={"light-piston":[.5,.2,.5],"turboprop-light":[.7,.4,.8],ultralight:[.4,.2,.4],unmanned:[0,.05,0],"helicopter-light":[1,1,1],"helicopter-medium":[1,1,1],"helicopter-heavy":[1,1,1],"military-jet":[1,1,1]};static lampsOn(t,e){if(P.NONE.has(t))return{navigation:!1,beacon:!1,strobes:!1};if(P.ALWAYS.has(t))return{navigation:!0,beacon:!0,strobes:!0};const a=e<P.DUSK_SUN_ELEVATION_DEG;return t==="unmanned"?{navigation:!1,beacon:!1,strobes:a}:{navigation:a,beacon:a,strobes:a}}static lights(t,e){const a=P.lampsOn(t.kind,e),n=t.kind.startsWith("helicopter"),i=pt.find(u=>u.id===(n?"helicopter":"airliner")).create(),[o,s]=n?[5,7]:[17,18],r=t.spanM/2/o,h=t.lengthM/2/s,[c,d,l]=P.BRIGHTNESS[t.kind]??[1,1,1];return i.filter(u=>u.id.startsWith("nav")?a.navigation:u.id.startsWith("strobe")?a.strobes:u.id.startsWith("beacon")?a.beacon:!0).filter(u=>!(u.id.startsWith("beacon")&&!a.beacon)).map(u=>{const p=u.id.startsWith("nav")?c:u.id.startsWith("strobe")?d:l;return{...u,offsetM:{x:u.offsetM.x*r,y:u.offsetM.y,z:u.offsetM.z*h},intensity:(u.intensity??1)*p}}).filter(u=>(u.intensity??1)>0)}static bodyColor(t){return t.kind==="military-jet"?"#8a8e94":t.kind.startsWith("helicopter")?"#c8ccd1":t.kind==="unmanned"?"#2c2e33":"#dde0e4"}}class U{static FAMILIES={"amvlab-a320":["A318","A319","A320","A321","A19N","A20N","A21N"],"amvlab-b737":["B732","B733","B734","B735","B736","B737","B738","B739","B37M","B38M","B39M","B3XM"],"amvlab-a350":["A359","A35K"],"amvlab-a380":["A388"],"amvlab-b787":["B788","B789","B78X"]};static BY_TYPE=new Map(Object.entries(U.FAMILIES).flatMap(([t,e])=>e.map(a=>[a,t])));static idOf(t){return t?U.BY_TYPE.get(t.toUpperCase()):void 0}}class D{static ID_PREFIX=z.ID_PREFIX;static MAX_OBJECTS=40;static FT_TO_M=.3048;static DEG=Math.PI/180;static from(t,e,a,n=D.MAX_OBJECTS,i={}){return new yt(t,e,a,n,i).build()}static idOf(t,e){return z.idOf(t,e)}static keyOf(t){return z.keyOf(t)}static HEIGHT_OVER_LENGTH=.29;static sizeOf(t){return{widthM:t.spanM,lengthM:t.lengthM,heightM:t.lengthM*D.HEIGHT_OVER_LENGTH}}static offsetOf(t,e){const a=L.seenFrom(t,{lat:e.lat,lng:e.lng,heightM:e.altitudeFt*D.FT_TO_M}),n=a.distanceKm*1e3,i=n*Math.cos(a.altitudeDeg*D.DEG);return{eastM:i*Math.sin(a.azimuthDeg*D.DEG),northM:i*Math.cos(a.azimuthDeg*D.DEG),upM:n*Math.sin(a.altitudeDeg*D.DEG),altitudeDeg:a.altitudeDeg,distanceKm:a.distanceKm}}static segments(t){const e=[];let a=[];for(const n of t.points){const i=a[a.length-1];i&&n.t-i.t>F.MAX_GAP_S*1e3&&(e.push(a),a=[]),a.push(n)}return e.push(a),e.filter(n=>n.length>=2)}static bearingDeg(t,e){return(Math.atan2(e.eastM-t.eastM,e.northM-t.northM)/D.DEG+360)%360}}class yt{constructor(t,e,a,n,i){this.tracks=t,this.observer=e,this.startMs=a,this.maxObjects=n,this.options=i}build(){const t=[];for(const a of this.tracks){const n=D.keyOf(a),i=this.options.models?.get(n)??y.of(void 0);D.segments(a).forEach((o,s)=>{const r=o.map(u=>({point:u,at:D.offsetOf(this.observer,u)}));if(!r.some(u=>u.at.altitudeDeg>=0))return;const h=r.map((u,p)=>({t:u.point.t-this.startMs,eastM:u.at.eastM,northM:u.at.northM,altitudeM:u.at.upM,headingDeg:u.point.trackDeg??(p+1<r.length?D.bearingDeg(u.at,r[p+1].at):D.bearingDeg(r[p-1].at,u.at))})),c=D.idOf(a,s),d=r[Math.floor(r.length/2)].point,l=this.options.sunElevationAt?.(d)??90;t.push({object:{id:c,kind:"aircraft",eastM:h[0].eastM,northM:h[0].northM,headingDeg:h[0].headingDeg,sizeM:D.sizeOf(i),model:U.idOf(i.code)?{id:U.idOf(i.code)}:void 0,color:P.bodyColor(i),lights:P.lights(i,l),track:h},presence:{fromMs:h[0].t,untilMs:h[h.length-1].t},flight:{icao:a.icao,nonIcao:a.nonIcao,points:o},closestKm:Math.min(...r.map(u=>u.at.distanceKm))})})}t.sort((a,n)=>a.closestKm-n.closestKm);const e=t.slice(0,this.maxObjects);return{objects:e.map(a=>a.object),presence:new Map(e.map(a=>[a.object.id,a.presence])),flights:new Map(e.map(a=>[a.object.id,a.flight])),total:t.length,shown:e.length}}}const ut=[{id:"turbofan-narrow-body",name:"Turbofan airliner, narrow-body",kinds:["airliner-narrow"],totalDbA:148,shapeDb:[-32,-17,-9,-6,-5,-7,-12,-22],character:{toneHz:1800,toneShare:.3,humHz:90,humShare:.7}},{id:"turbofan-wide-body",name:"Turbofan airliner, wide-body",kinds:["airliner-wide"],totalDbA:151,shapeDb:[-28,-14,-7,-4,-3,-6,-12,-22],character:{toneHz:1200,toneShare:.3,humHz:70,humShare:.7}},{id:"regional-jet",name:"Regional jet",kinds:["regional-jet"],totalDbA:144,shapeDb:[-32,-17,-9,-5,-4,-6,-11,-21],character:{toneHz:1900,toneShare:.3,humHz:95,humShare:.7}},{id:"business-jet",name:"Business jet",kinds:["business-jet"],totalDbA:141,shapeDb:[-30,-15,-8,-4,-3,-4,-9,-19],character:{toneHz:2500,toneShare:.25,humHz:110,humShare:.7}},{id:"turboprop",name:"Turboprop",kinds:["regional-turboprop","turboprop-light"],totalDbA:138,shapeDb:[-14,-9,-8,-6,-8,-13,-20,-28],character:{toneHz:80,toneShare:.5}},{id:"light-piston",name:"Light piston aircraft",kinds:["light-piston"],totalDbA:130,shapeDb:[-18,-9,-5,-4,-8,-14,-22,-30],character:{toneHz:80,toneShare:.4}},{id:"ultralight",name:"Ultralight",kinds:["ultralight"],totalDbA:124,shapeDb:[-16,-8,-5,-4,-9,-15,-23,-31],character:{toneHz:140,toneShare:.4}},{id:"helicopter-light",name:"Light helicopter",kinds:["helicopter-light"],totalDbA:134,shapeDb:[-15,-8,-4,-3,-6,-10,-16,-24],character:{modulationHz:20,modulationDepth:.5}},{id:"helicopter-medium",name:"Medium helicopter",kinds:["helicopter-medium"],totalDbA:138,shapeDb:[-14,-7,-4,-3,-6,-10,-16,-24],character:{modulationHz:22,modulationDepth:.5}},{id:"helicopter-heavy",name:"Heavy helicopter",kinds:["helicopter-heavy"],totalDbA:144,shapeDb:[-12,-6,-4,-4,-7,-11,-17,-25],character:{modulationHz:17,modulationDepth:.5}},{id:"military-jet",name:"Military jet",kinds:["military-jet"],totalDbA:152,shapeDb:[-26,-12,-6,-3,-2,-3,-7,-15]},{id:"glider",name:"Glider",kinds:["glider"],totalDbA:85,shapeDb:[-30,-22,-15,-10,-8,-8,-14,-22]},{id:"balloon",name:"Hot-air balloon",kinds:["balloon"],totalDbA:100,shapeDb:[-25,-15,-9,-5,-3,-6,-12,-20]},{id:"unmanned",name:"Unmanned aircraft",kinds:["unmanned"],totalDbA:88,shapeDb:[-40,-30,-20,-12,-6,-3,-3,-8],character:{toneHz:450,toneShare:1}}],ct=ut.map(C=>({id:C.id,name:C.name,soundPowerA:C.shapeDb.map(t=>t+C.totalDbA-E.sumDb(C.shapeDb)),character:C.character}));class g{static DEFAULT_AMBIENT_DB_A=35;static DETECTION_MARGIN_DB=3;static AMBIENT_SHAPE_DB=[-12,-7,-5,-5,-7,-11,-17,-25];static HEARING_FLOOR_DB_A=0;static ITERATIONS=30;static CONVERGED_MS=.5;static VELOCITY_STEP_MS=500;static noiseOfKind(t){const e=ut.find(a=>a.kinds.includes(t));return ct.find(a=>a.id===(e?.id??"turbofan-narrow-body"))}static bandsAt(t,e,a=E.STANDARD){const n=20*Math.log10(Math.max(e*1e3,1))+11;return E.OCTAVES.map((i,o)=>t.soundPowerA[o]-n-E.absorptionDbPerKm(i,a)*e)}static couldBeHeard(t,e,a=g.DEFAULT_AMBIENT_DB_A,n=E.STANDARD){const i=g.ambientBands(a);return g.bandsAt(t,e,n).some((o,s)=>o>=Math.max(i[s]+g.DETECTION_MARGIN_DB,g.HEARING_FLOOR_DB_A))}static ambientBands(t){const e=g.AMBIENT_SHAPE_DB,a=E.sumDb(e);return e.map(n=>t+n-a)}static heardAt(t,e,a,n={}){const i=n.air??E.STANDARD,o=E.speedOfSound(i.temperatureC),s=t.points[t.points.length-1]?.t;if(s===void 0)return;let r=Math.min(a,s),h=F.positionAt(t,r);if(!h)return;let c=L.seenFrom(e,h.geo);for(let f=0;f<g.ITERATIONS;f++){const B=a-c.distanceKm*1e3*1e3/o,j=Math.abs(B-r);if(r=B,h=F.positionAt(t,r),!h)return;if(c=L.seenFrom(e,h.geo),j<g.CONVERGED_MS)break}const d=F.positionAt(t,a),l=d?L.seenFrom(e,d.geo):c,u=n.noise??ct[0],p=n.ambientDbA??g.DEFAULT_AMBIENT_DB_A,m=g.ambientBands(p),A=g.bandsAt(u,c.distanceKm,i),b=A.map((f,B)=>f>=Math.max(m[B]+g.DETECTION_MARGIN_DB,g.HEARING_FLOOR_DB_A)),R=A.indexOf(Math.max(...A)),S=b.lastIndexOf(!0);return{track:t,audible:b.some(Boolean),levelDbA:E.sumDb(A),bandsDbA:A,ambientDbA:p,delayS:(a-r)/1e3,emittedAtMs:r,sound:c,seen:l,lagDeg:g.angleBetween(c,l),dopplerRatio:g.doppler(t,e,r,o),dominantHz:E.OCTAVES[R],cutoffHz:S<0?void 0:E.OCTAVES[S]}}static profile(t,e,a,n,i=2e3,o={}){const s=[];let r,h,c=a;for(let d=a;d<=n;d+=i){const l=g.heardAt(t,e,d,o);l&&(!h||l.levelDbA>h.levelDbA)&&(h=l,c=d),l?.audible?r?r.untilMs=d:s.push(r={fromMs:d,untilMs:d}):r=void 0}return{track:t,audible:s,peakDbA:h?.levelDbA??-1/0,peakAtMs:c,peakDelayS:h?.delayS??0}}static angleBetween(t,e){const a=c=>{const d=c.altitudeDeg*Math.PI/180,l=c.azimuthDeg*Math.PI/180;return[Math.cos(d)*Math.sin(l),Math.cos(d)*Math.cos(l),Math.sin(d)]},[n,i,o]=a(t),[s,r,h]=a(e);return Math.acos(Math.min(1,Math.max(-1,n*s+i*r+o*h)))*180/Math.PI}static doppler(t,e,a,n){const i=g.VELOCITY_STEP_MS,o=F.positionAt(t,a-i),s=F.positionAt(t,a+i);if(!o||!s)return 1;const r=L.seenFrom(e,o.geo).distanceKm*1e3,h=L.seenFrom(e,s.geo).distanceKm*1e3;return 1/(1-(r-h)/(2*i/1e3)/n)}}class Gt{static at(t,e,a,n,i={}){const o=F.seenFrom(t,a,n);if(!o)return;const s=y.of(e),r=g.heardAt(t,a,n,{noise:g.noiseOfKind(s.kind),...i});return{hex:`${t.nonIcao?"~":""}${t.icao.toString(16).padStart(6,"0")}`,registration:e?.registration,typeCode:s.code??e?.type,name:s.basis==="nothing"?void 0:s.name,kind:s.kind,basis:s.basis,military:e?.military===!0,restricted:e?.restricted===!0,altitudeFt:o.altitudeFt,groundSpeedKt:o.groundSpeedKt,trackDeg:o.trackDeg,sky:o.sky,angularRateDegPerS:o.angularRateDegPerS,hearing:r&&{audible:r.audible,levelDbA:r.levelDbA,ambientDbA:r.ambientDbA,delayS:r.delayS,lagDeg:r.lagDeg,dopplerRatio:r.dopplerRatio,cutoffHz:r.cutoffHz,dominantHz:r.dominantHz}}}}class O{static REFERENCE_AMPLITUDE=.02;static MASKING_RANGE_DB=6;static KNEE_DB=20;static COMPRESSION_RATIO=1.5;static EXPANSION_RATIO=1.8;static DEFAULT_MAX_VOICES=4;static candidates(t,e,a,n,i={}){const o=new Set;for(const[s,r]of t){const h=g.noiseOfKind(y.of(e.get(a(r))).kind);let c=1/0;for(const d of r.points)c=Math.min(c,L.seenFrom(n,{lat:d.lat,lng:d.lng,heightM:d.altitudeFt*.3048}).distanceKm);g.couldBeHeard(h,c,i.ambientDbA,i.air)&&o.add(s)}return o}static voices(t,e,a,n,i,o,s={}){const r=[];for(const h of t){const c=e.get(h);if(!c||s.only?.(h)===!1)continue;const d=s.kindOf?.(h)??y.of(a.get(n(c))).kind,l=s.noiseOf?.(h)??g.noiseOfKind(d),u=g.heardAt(c,i,o,{...s,noise:l});u?.audible&&r.push({id:h,kind:d,bandAmplitudes:O.bandAmplitudes(u.bandsDbA,u.ambientDbA,s.referenceAmplitude),levelDbA:u.levelDbA,distanceKm:u.sound.distanceKm,dopplerRatio:u.dopplerRatio,azimuthDeg:u.sound.azimuthDeg,elevationDeg:u.sound.altitudeDeg,character:l.character})}return r.sort((h,c)=>c.levelDbA-h.levelDbA).slice(0,s.maxVoices??O.DEFAULT_MAX_VOICES)}static bandAmplitudes(t,e,a=O.REFERENCE_AMPLITUDE){const n=g.ambientBands(e),i=g.DETECTION_MARGIN_DB,o=E.sumDb(t),s=o-e,r=s>=O.KNEE_DB?O.KNEE_DB+(s-O.KNEE_DB)/O.COMPRESSION_RATIO:O.KNEE_DB-(O.KNEE_DB-s)*O.EXPANSION_RATIO,h=a*10**(r/20);return t.map((c,d)=>{const l=Math.min(1,Math.max(0,(c-n[d]-i+O.MASKING_RANGE_DB)/(2*O.MASKING_RANGE_DB)));return l*l*(3-2*l)*h*10**((c-o)/20)})}static BANDS_HZ=E.OCTAVES}class W{static ENGLISH={unnamed:"Aircraft {hex}",altitude:"{value} ft",speed:"{value} kt",heading:"heading {value}°",position:"{distance} km away, {elevation}° above the horizon, {bearing}",heard:"Heard at {level} dB(A), left the aircraft {delay} s ago, {lag}° behind it: {character}{pitch}",rumble:"a low rumble, nothing above {cutoff} Hz",muffled:"a dull noise, nothing above {cutoff} Hz",broad:"a broad roar",pitchHigher:", pitch {percent} % higher",pitchLower:", pitch {percent} % lower",inaudible:"Not audible here: {level} dB(A) against {ambient} dB(A) of ambient noise",soundUnknown:"Its sound cannot be worked out: the aircraft was not recorded yet when it left",contrailPersistent:"Leaves a trail that lasts: the air is supersaturated over ice ({rhi} % over ice)",contrailShort:"Leaves a short-lived trail: the air is dry over ice ({rhi} % over ice)",military:"military",restricted:"identity withheld by its owner",candidate:"A compatible candidate, not an identification"};static RUMBLE_BELOW_HZ=500;static DULL_BELOW_HZ=2e3;static PITCH_NOTICED=.03;static text(t,e,a,n){const i=(l,u=0)=>l.toLocaleString(n,{maximumFractionDigits:u}),o=(l,u)=>l.replace(/\{(\w+)\}/g,(p,m)=>u[m]??`{${m}}`),s=[],r=[t.registration,t.name].filter(Boolean).join(" · ");s.push(r||o(e.unnamed,{hex:t.hex}));const h=[o(e.altitude,{value:i(Math.round(t.altitudeFt/100)*100)}),t.groundSpeedKt===void 0?void 0:o(e.speed,{value:i(Math.round(t.groundSpeedKt))}),t.trackDeg===void 0?void 0:o(e.heading,{value:i(Math.round(t.trackDeg))})].filter(Boolean);s.push(h.join(" · ")),s.push(o(e.position,{distance:i(t.sky.distanceKm,t.sky.distanceKm<10?1:0),elevation:i(Math.round(t.sky.altitudeDeg)),bearing:a(t.sky.azimuthDeg)}));const c=t.hearing;if(!c)s.push(e.soundUnknown);else if(!c.audible)s.push(o(e.inaudible,{level:i(Math.round(c.levelDbA)),ambient:i(Math.round(c.ambientDbA))}));else{const l=c.cutoffHz??0,u=l<=W.RUMBLE_BELOW_HZ?e.rumble:l<=W.DULL_BELOW_HZ?e.muffled:e.broad,p=c.dopplerRatio-1,m=Math.abs(p)<W.PITCH_NOTICED?"":o(p>0?e.pitchHigher:e.pitchLower,{percent:i(Math.round(Math.abs(p)*100))});s.push(o(e.heard,{level:i(Math.round(c.levelDbA)),delay:i(Math.round(c.delayS)),lag:i(Math.round(c.lagDeg)),character:o(u,{cutoff:i(l)}),pitch:m}))}t.contrail&&s.push(o(t.contrail.persistent?e.contrailPersistent:e.contrailShort,{rhi:i(Math.round(t.contrail.iceRelativeHumidity*100))}));const d=[t.military?e.military:void 0,t.restricted?e.restricted:void 0].filter(Boolean);return d.length>0&&s.push(d.join(" · ")),s.push(e.candidate),s.join(`
|
|
2
|
-
`)}}class Y{static EFFICIENCY={"airliner-narrow":.34,"airliner-wide":.38,"regional-jet":.32,"business-jet":.3,"military-jet":.22,unknown:.34};static efficiencyOf(t){return Y.EFFICIENCY[t]}}class M{static EMISSION_INDEX_WATER=1.25;static COMBUSTION_HEAT=432e5;static AIR_HEAT_CAPACITY=1004;static MOLAR_MASS_RATIO=.622;static FT_TO_M=.3048;static TROPOPAUSE_M=11e3;static TROPOPAUSE_HPA=226.32;static ISOTHERMAL_SCALE_HEIGHT_M=6341.62;static pressureAtAltitudeFt(t){const e=t*M.FT_TO_M;return e<=M.TROPOPAUSE_M?1013.25*(1-225577e-10*e)**5.25588:M.TROPOPAUSE_HPA*Math.exp(-(e-M.TROPOPAUSE_M)/M.ISOTHERMAL_SCALE_HEIGHT_M)}static saturationOverWaterPa(t){const e=t+273.15;return Math.exp(54.842763-6763.22/e-4.21*Math.log(e)+367e-6*e+Math.tanh(.0415*(e-218.8))*(53.878-1331.22/e-9.44523*Math.log(e)+.014025*e))}static saturationOverIcePa(t){const e=t+273.15;return Math.exp(9.550426-5723.265/e+3.53068*Math.log(e)-.00728332*e)}static iceRelativeHumidity(t,e){return e*M.saturationOverWaterPa(t)/M.saturationOverIcePa(t)}static mixingSlope(t,e){return M.EMISSION_INDEX_WATER*M.AIR_HEAT_CAPACITY*t*100/(M.MOLAR_MASS_RATIO*M.COMBUSTION_HEAT*(1-e))}static criticalTemperatureC(t,e){const a=Math.log(M.mixingSlope(t,e)-.053);return-46.46+9.43*a+.72*a*a}static requiredHumidity(t,e,a){const n=M.criticalTemperatureC(t,e);return(M.mixingSlope(t,e)*(a-n)+M.saturationOverWaterPa(n))/M.saturationOverWaterPa(a)}static evaluate(t,e){const a=M.criticalTemperatureC(t.pressureHpa,e),n=M.requiredHumidity(t.pressureHpa,e,t.temperatureC),
|
|
1
|
+
import{A as dt,L as pt,T as z,R as L,a as F,M as Z,r as mt,l as $}from"./rr0-sighting.mjs";import{C as x}from"./ContrailGrowth-DwHS8If9.js";class E{static OCTAVES=[63,125,250,500,1e3,2e3,4e3,8e3];static STANDARD={temperatureC:15,relativeHumidity:.7,pressureKPa:101.325};static REFERENCE_PRESSURE_KPA=101.325;static REFERENCE_TEMPERATURE_K=293.15;static TRIPLE_POINT_K=273.16;static speedOfSound(t){return 20.0468*Math.sqrt(t+273.15)}static absorptionDbPerKm(t,e=E.STANDARD){const a=e.temperatureC+273.15,n=E.REFERENCE_TEMPERATURE_K,s=e.pressureKPa/E.REFERENCE_PRESSURE_KPA,o=10**(-6.8346*(E.TRIPLE_POINT_K/a)**1.261+4.6151),i=e.relativeHumidity*100*o/s,r=s*(24+40400*i*(.02+i)/(.391+i)),h=s*(a/n)**-.5*(9+280*i*Math.exp(-4.17*((a/n)**(-1/3)-1))),c=t*t;return 8.686*c*(184e-13*(1/s)*Math.sqrt(a/n)+(a/n)**-2.5*(.01275*Math.exp(-2239.1/a)/(r+c/r)+.1068*Math.exp(-3352/a)/(h+c/h)))*1e3}static aWeightingDb(t){const e=t*t,a=12194**2*e*e/((e+20.6**2)*Math.sqrt((e+107.7**2)*(e+737.9**2))*(e+12194**2));return 20*Math.log10(a)+2}static sumDb(t){return 10*Math.log10(t.reduce((e,a)=>e+10**(a/10),0))}}const gt=.25,Q=.4,tt=6,K=12,Et=3,et=.2,Mt=.2,At=24,ft=3,bt=12,at=1,St=.7,Dt=1.5,Rt=.8,Ot=1.3,nt=.9,st=5,It=25,Tt=.5,Bt=.12,it=[.13,.31],vt=.16,_t=1.6,Nt=3.6,rt=1.1,Ct=.3,wt=1e3,ot=.7;class q{context;noiseBuffer;roughBuffers=new Map;voices=new Map;bus;reverb;reverbOut;level=1;master;paused=!0;requested=[];headingDeg=0;resume(){if(!this.context){if(typeof AudioContext>"u")return;try{this.context=new AudioContext}catch(t){console.warn("AircraftAudio: Web Audio unavailable, aircraft stay silent:",t);return}}dt.unlock(this.context),this.apply()}setLevel(t){this.level=t,this.master&&(this.master.gain.value=t)}setPaused(t){t!==this.paused&&(this.paused=t,this.apply())}setVoices(t,e=0){this.requested=t,this.headingDeg=e,this.apply()}dispose(){for(const t of[...this.voices.keys()])this.release(t);this.context?.close(),this.context=void 0,this.master=void 0,this.bus=void 0}apply(){const t=this.context;if(!t)return;const e=this.paused?[]:this.requested,a=new Set(e.map(n=>n.id));for(const n of[...this.voices.keys()])a.has(n)||this.release(n);for(const n of e){const s=this.voices.get(n.id)??this.build(t,n);this.retarget(t,s,n)}}build(t,e){const a=t.createGain();a.gain.value=0;let n;const s=this.busOf(t);typeof t.createStereoPanner=="function"?(n=t.createStereoPanner(),a.connect(n).connect(s)):a.connect(s);const o=t.createGain(),i=e.character?.modulationDepth??0;o.gain.value=1-i/2;const r=t.createOscillator();r.type="sine";const h=t.createGain();h.gain.value=i/2,r.connect(h).connect(o.gain),o.connect(a);const c=t.createBufferSource();c.buffer=this.noise(t),c.loop=!0,c.loopStart=Math.random()*tt*.5;const d=[],l=[],u=[];for(const I of E.OCTAVES){const B=t.createBiquadFilter();B.type="bandpass",B.frequency.value=I,B.Q.value=at;const N=t.createBiquadFilter();N.type="bandpass",N.frequency.value=I,N.Q.value=at;const y=t.createGain();y.gain.value=0,c.connect(B).connect(N).connect(y).connect(o),d.push(B),l.push(N),u.push(y)}const p=[];for(const[I,B]of[[e.character?.toneHz,e.character?.toneShare],[e.character?.humHz,e.character?.humShare]])if(I!==void 0)for(let N=1;N<=ft;N++){const y=t.createOscillator();y.type="sine",y.frequency.value=I*N;const X=t.createGain();X.gain.value=0,y.connect(X).connect(a),p.push({oscillator:y,gain:X,harmonic:N,baseHz:I,share:B??0})}const m=t.createGain();m.gain.value=0,m.connect(a.gain);const A=it.map(I=>{const B=t.createOscillator();return B.type="sine",B.frequency.value=I,B.connect(m),B}),b=t.createGain();b.gain.value=e.character?.roughness??et;const R=t.createBufferSource();R.buffer=this.roughTable(t,Et),R.loop=!0,R.loopStart=Math.random()*K*.5,R.connect(b).connect(o.gain);const S=t.createGain();S.gain.value=(e.character?.roughness??et)*Mt;const f=t.createBufferSource();f.buffer=this.roughTable(t,At),f.loop=!0,f.loopStart=Math.random()*K*.5,f.connect(S).connect(o.gain);let v;const j=this.busOf(t)&&this.reverb;j&&(v=t.createGain(),v.gain.value=0,a.connect(v).connect(j));const V=[c,R,f,r,...p.map(I=>I.oscillator),...A];for(const I of V)I.start();const J={nodes:[a,o,h,b,S,m,...p.map(I=>I.gain),...d,...l,...u,...v?[v]:[],...n?[n]:[],...V],sources:V,filters:d,seconds:l,gains:u,tones:p,lfo:r,lfoDepth:h,wander:A,wanderDepth:m,roughDepth:b,crackleDepth:S,beat:o,output:a,panner:n,send:v};return this.voices.set(e.id,J),J}retarget(t,e,a){const n=t.currentTime,s=(p,m)=>p.setTargetAtTime(m,n,gt),o=Math.min(Dt,Math.max(St,a.dopplerRatio)),i=Math.min(Ot,Math.max(Rt,Math.sqrt(a.dopplerRatio))),r=t.sampleRate*.45,h=a.bandAmplitudes.map((p,m)=>p*q.unweighting(E.OCTAVES[m])),c=Math.sqrt(h.reduce((p,m)=>p+m*m,0)),d=Math.min(1,Math.max(0,(a.distanceKm-st)/(It-st)));E.OCTAVES.forEach((p,m)=>{s(e.filters[m].frequency,Math.min(r,p*i)),s(e.seconds[m].frequency,Math.min(r,p*i)),s(e.gains[m].gain,h[m]*Math.sqrt(wt/p))});const l=a.character;for(const{oscillator:p,gain:m,harmonic:A,baseHz:b,share:R}of e.tones){const S=b*A;s(p.frequency,S*o);const f=S*o;s(m.gain,f<r?R*vt*h[q.bandOf(f)]/A:0)}l?.modulationHz!==void 0&&s(e.lfo.frequency,l.modulationHz*o);const u=c>0?ot*(1-Math.exp(-c/ot))/c:1;if(s(e.output.gain,u*(1-Ct*d)),s(e.wanderDepth.gain,u*Bt*d/it.length),e.send&&s(e.send.gain,_t*d),e.panner){const p=(a.azimuthDeg-this.headingDeg)*Math.PI/180;s(e.panner.pan,Math.max(-nt,Math.min(nt,Math.sin(p)))*(1-Tt*d))}}static unweighting(t){return 10**(Math.min(bt,Math.max(0,-E.aWeightingDb(t)))/20)}static bandOf(t){let e=0;return E.OCTAVES.forEach((a,n)=>{Math.abs(Math.log(t/a))<Math.abs(Math.log(t/E.OCTAVES[e]))&&(e=n)}),e}roughTable(t,e){const a=this.roughBuffers.get(e);if(a)return a;const n=Math.floor(t.sampleRate*K),s=t.createBuffer(1,n,t.sampleRate),o=s.getChannelData(0),i=Array.from({length:K*e},()=>(Math.random()*2-1)**3),r=t.sampleRate/e;for(let h=0;h<o.length;h++){const c=h/r,d=Math.floor(c),l=c-d,u=l*l*(3-2*l);o[h]=i[d%i.length]*(1-u)+i[(d+1)%i.length]*u}return this.roughBuffers.set(e,s),s}roomImpulse(t){const e=Math.floor(t.sampleRate*Nt),a=t.createBuffer(2,e,t.sampleRate);for(let n=0;n<2;n++){const s=a.getChannelData(n);let o=0;for(let i=0;i<e;i++){const r=i/t.sampleRate,h=.6*Math.exp(-r/(rt*2))+.04;o+=h*(Math.random()*2-1-o),s[i]=o*Math.exp(-r/rt)}}return a}busOf(t){if(this.bus)return this.bus;const e=t.createGain();if(e.gain.value=this.level,e.connect(t.destination),this.master=e,typeof t.createConvolver=="function"){const a=t.createConvolver();a.buffer=this.roomImpulse(t);const n=t.createGain();n.gain.value=.9,a.connect(n),this.reverb=a,this.reverbOut=n}if(typeof t.createDynamicsCompressor=="function"){const a=t.createDynamicsCompressor();a.threshold.value=-6,a.knee.value=3,a.ratio.value=4,a.attack.value=.005,a.release.value=.25,a.connect(e),this.bus=a}else this.bus=e;return this.reverbOut?.connect(this.bus),this.bus}release(t){const e=this.voices.get(t);if(!e)return;this.voices.delete(t);const a=this.context;a&&(e.output.gain.setTargetAtTime(0,a.currentTime,Q/3),setTimeout(()=>{for(const n of e.sources)try{n.stop()}catch{}for(const n of e.nodes)n.disconnect()},Q*1e3*3))}noise(t){if(this.noiseBuffer)return this.noiseBuffer;const e=t.createBuffer(1,t.sampleRate*tt,t.sampleRate),a=e.getChannelData(0);for(let n=0;n<a.length;n++)a[n]=Math.random()*2-1;return this.noiseBuffer=e,e}}class _{static BASE_DB_A=30;static WIND_DB_A=[[0,10],[1,28],[2,36],[3,40],[5,46],[8,52],[12,58],[20,66]];static RAIN_DB_A=[[0,0],[.1,42],[.3,50],[.6,58],[1,65]];static BED_RMS=.2;static MINIMUM_REFERENCE=.008;static WIND_BED_MIN_MS=1;static WIND_BED_FULL_MS=20;static dbA(t){const e=[_.BASE_DB_A,_.along(_.WIND_DB_A,t.windSpeed)];return(t.precipitationType==="rain"||t.precipitationType==="hail")&&e.push(_.along(_.RAIN_DB_A,t.precipitationIntensity)),10*Math.log10(e.filter(a=>a>0).reduce((a,n)=>a+10**(n/10),0))}static bedVolume(t){const e=t.windSpeed>_.WIND_BED_MIN_MS?Math.min(t.windSpeed/_.WIND_BED_FULL_MS,1):0,a=t.precipitationType==="hail"?Math.min(1,t.precipitationIntensity*1.3+.2):t.precipitationType==="rain"?t.precipitationIntensity:0;return Math.hypot(e,a)}static referenceAmplitude(t){return Math.max(_.BED_RMS*_.bedVolume(t),_.MINIMUM_REFERENCE)}static along(t,e){if(e<=t[0][0])return t[0][1];for(let a=1;a<t.length;a++)if(e<=t[a][0]){const[n,s]=t[a-1],[o,i]=t[a];return s+(i-s)*(e-n)/(o-n)}return t[t.length-1][1]}}class k{static TYPES={A318:["Airbus A318","airliner-narrow",34.1,31.4],A319:["Airbus A319","airliner-narrow",34.1,33.8],A320:["Airbus A320","airliner-narrow",34.1,37.6],A321:["Airbus A321","airliner-narrow",34.1,44.5],A19N:["Airbus A319neo","airliner-narrow",35.8,33.8],A20N:["Airbus A320neo","airliner-narrow",35.8,37.6],A21N:["Airbus A321neo","airliner-narrow",35.8,44.5],B737:["Boeing 737-700","airliner-narrow",34.3,33.6],B738:["Boeing 737-800","airliner-narrow",35.8,39.5],B739:["Boeing 737-900","airliner-narrow",35.8,42.1],B38M:["Boeing 737 MAX 8","airliner-narrow",35.9,39.5],B39M:["Boeing 737 MAX 9","airliner-narrow",35.9,42.2],B752:["Boeing 757-200","airliner-narrow",38,47.3],B753:["Boeing 757-300","airliner-narrow",38,54.4],B762:["Boeing 767-200","airliner-wide",47.6,48.5],B763:["Boeing 767-300","airliner-wide",47.6,54.9],B764:["Boeing 767-400","airliner-wide",51.9,61.4],B772:["Boeing 777-200","airliner-wide",60.9,63.7],B77L:["Boeing 777-200LR","airliner-wide",64.8,63.7],B77W:["Boeing 777-300ER","airliner-wide",64.8,73.9],B788:["Boeing 787-8","airliner-wide",60.1,56.7],B789:["Boeing 787-9","airliner-wide",60.1,62.8],B78X:["Boeing 787-10","airliner-wide",60.1,68.3],B744:["Boeing 747-400","airliner-wide",64.4,70.7],B748:["Boeing 747-8","airliner-wide",68.4,76.3],A306:["Airbus A300-600","airliner-wide",44.8,54.1],A310:["Airbus A310","airliner-wide",43.9,46.7],A332:["Airbus A330-200","airliner-wide",60.3,58.8],A333:["Airbus A330-300","airliner-wide",60.3,63.7],A338:["Airbus A330-800","airliner-wide",64,58.8],A339:["Airbus A330-900","airliner-wide",64,63.7],A343:["Airbus A340-300","airliner-wide",60.3,63.7],A346:["Airbus A340-600","airliner-wide",63.5,75.4],A359:["Airbus A350-900","airliner-wide",64.8,66.8],A35K:["Airbus A350-1000","airliner-wide",64.8,73.8],A388:["Airbus A380-800","airliner-wide",79.8,72.7],E170:["Embraer 170","regional-jet",26,29.9],E75L:["Embraer 175","regional-jet",26,31.7],E75S:["Embraer 175","regional-jet",26,31.7],E190:["Embraer 190","regional-jet",28.7,36.2],E195:["Embraer 195","regional-jet",28.7,38.7],E290:["Embraer 190-E2","regional-jet",33.7,36.2],E295:["Embraer 195-E2","regional-jet",33.7,41.5],CRJ2:["Bombardier CRJ200","regional-jet",21.2,26.8],CRJ7:["Bombardier CRJ700","regional-jet",23.2,32.3],CRJ9:["Bombardier CRJ900","regional-jet",24.9,36.2],CRJX:["Bombardier CRJ1000","regional-jet",26.2,39.1],AT72:["ATR 72","regional-turboprop",27.1,27.2],AT76:["ATR 72-600","regional-turboprop",27.1,27.2],AT45:["ATR 42","regional-turboprop",24.6,22.7],DH8D:["Dash 8 Q400","regional-turboprop",28.4,32.8],DH8C:["Dash 8-300","regional-turboprop",27.4,25.7],SF34:["Saab 340","regional-turboprop",21.4,19.7],B190:["Beechcraft 1900","regional-turboprop",17.7,17.6],C25A:["Cessna CitationJet CJ2","business-jet",14.3,14.4],C56X:["Cessna Citation Excel","business-jet",17.2,16],C68A:["Cessna Citation Latitude","business-jet",22,18.9],C550:["Cessna Citation II","business-jet",15.8,14.4],E55P:["Embraer Phenom 300","business-jet",15.9,15.6],E50P:["Embraer Phenom 100","business-jet",12.3,12.8],GLF5:["Gulfstream G550","business-jet",28.5,29.4],FA7X:["Dassault Falcon 7X","business-jet",26.2,23.4],CL60:["Bombardier Challenger 600","business-jet",19.6,20.9],LJ45:["Learjet 45","business-jet",14.6,17.7],H25B:["Hawker 800","business-jet",15.7,15.6],C172:["Cessna 172","light-piston",11,8.3],C152:["Cessna 152","light-piston",10.2,7.3],C182:["Cessna 182","light-piston",10.9,8.8],P28A:["Piper Cherokee","light-piston",10.7,7.2],PA34:["Piper Seneca","light-piston",11.8,8.7],SR20:["Cirrus SR20","light-piston",10.9,7.9],SR22:["Cirrus SR22","light-piston",11.7,7.9],S22T:["Cirrus SR22T","light-piston",11.7,7.9],DA40:["Diamond DA40","light-piston",11.6,8.1],DA42:["Diamond DA42","light-piston",13.4,8.6],BE20:["Beechcraft King Air 200","turboprop-light",16.6,13.3],BE58:["Beechcraft Baron","light-piston",11.5,9.1],C208:["Cessna Caravan","turboprop-light",15.9,11.5],PC12:["Pilatus PC-12","turboprop-light",16.3,14.4],TBM9:["Daher TBM 900","turboprop-light",12.8,10.7],EC35:["Airbus H135","helicopter-light",10.2,12.1],EC45:["Airbus H145","helicopter-medium",11,13.6],AS50:["Airbus H125","helicopter-light",10.7,12.9],EC30:["Airbus H130","helicopter-light",10.7,12.6],B407:["Bell 407","helicopter-light",10.7,12.7],B06:["Bell 206","helicopter-light",10.2,12],B429:["Bell 429","helicopter-medium",10.9,13],B505:["Bell 505","helicopter-light",10.4,11.9],R44:["Robinson R44","helicopter-light",10.1,11.7],R22:["Robinson R22","helicopter-light",7.7,8.8],A109:["Agusta A109","helicopter-medium",11,13],A139:["Leonardo AW139","helicopter-medium",13.8,16.7],S92:["Sikorsky S-92","helicopter-heavy",17.2,20.9],H60:["Sikorsky UH-60 Black Hawk","helicopter-heavy",16.4,19.8],T38:["Northrop T-38 Talon","military-jet",7.7,14.1],HAWK:["BAE Hawk","military-jet",9.4,11.9],GLID:["Glider","glider",17,7],BALL:["Balloon","balloon",15,20],ULAC:["Ultralight","ultralight",9.5,6],C42:["Ikarus C42","ultralight",9.4,6.3],DRON:["Drone","unmanned",1,.6]};static CATEGORIES={A1:["Light aircraft","light-piston",11,8.3],A2:["Small aircraft","business-jet",15,15],A3:["Large aircraft","airliner-narrow",34.1,37.6],A4:["High-vortex large aircraft","airliner-narrow",38,47.3],A5:["Heavy aircraft","airliner-wide",60.3,63.7],A6:["High-performance aircraft","military-jet",8,14],A7:["Rotorcraft","helicopter-medium",10.7,12.7],B1:["Glider","glider",17,7],B2:["Lighter-than-air","balloon",15,20],B4:["Ultralight","ultralight",9.5,6],B6:["Unmanned aircraft","unmanned",1.5,1]};static GENERIC={name:"Airliner",kind:"airliner-narrow",spanM:34.1,lengthM:37.6,basis:"nothing"};static of(t){const e=t?.type?.toUpperCase(),a=e?k.TYPES[e]:void 0;if(a)return{code:e,name:a[0],kind:a[1],spanM:a[2],lengthM:a[3],basis:"type"};const n=t?.category?k.CATEGORIES[t.category]:void 0;return n?{name:n[0],kind:n[1],spanM:n[2],lengthM:n[3],basis:"category"}:{...k.GENERIC}}static isHelicopter(t){return t.kind.startsWith("helicopter")}}class P{static DUSK_SUN_ELEVATION_DEG=-.83;static ALWAYS=new Set(["airliner-narrow","airliner-wide","regional-turboprop","regional-jet","business-jet"]);static NONE=new Set(["glider","balloon"]);static BRIGHTNESS={"light-piston":[.5,.2,.5],"turboprop-light":[.7,.4,.8],ultralight:[.4,.2,.4],unmanned:[0,.05,0],"helicopter-light":[1,1,1],"helicopter-medium":[1,1,1],"helicopter-heavy":[1,1,1],"military-jet":[1,1,1]};static lampsOn(t,e){if(P.NONE.has(t))return{navigation:!1,beacon:!1,strobes:!1};if(P.ALWAYS.has(t))return{navigation:!0,beacon:!0,strobes:!0};const a=e<P.DUSK_SUN_ELEVATION_DEG;return t==="unmanned"?{navigation:!1,beacon:!1,strobes:a}:{navigation:a,beacon:a,strobes:a}}static lights(t,e){const a=P.lampsOn(t.kind,e),n=t.kind.startsWith("helicopter"),s=pt.find(u=>u.id===(n?"helicopter":"airliner")).create(),[o,i]=n?[5,7]:[17,18],r=t.spanM/2/o,h=t.lengthM/2/i,[c,d,l]=P.BRIGHTNESS[t.kind]??[1,1,1];return s.filter(u=>u.id.startsWith("nav")?a.navigation:u.id.startsWith("strobe")?a.strobes:u.id.startsWith("beacon")?a.beacon:!0).filter(u=>!(u.id.startsWith("beacon")&&!a.beacon)).map(u=>{const p=u.id.startsWith("nav")?c:u.id.startsWith("strobe")?d:l;return{...u,offsetM:{x:u.offsetM.x*r,y:u.offsetM.y,z:u.offsetM.z*h},intensity:(u.intensity??1)*p}}).filter(u=>(u.intensity??1)>0)}static bodyColor(t){return t.kind==="military-jet"?"#8a8e94":t.kind.startsWith("helicopter")?"#c8ccd1":t.kind==="unmanned"?"#2c2e33":"#dde0e4"}}class U{static FAMILIES={"amvlab-a320":["A318","A319","A320","A321","A19N","A20N","A21N"],"amvlab-b737":["B732","B733","B734","B735","B736","B737","B738","B739","B37M","B38M","B39M","B3XM"],"amvlab-a350":["A359","A35K"],"amvlab-a380":["A388"],"amvlab-b787":["B788","B789","B78X"]};static BY_TYPE=new Map(Object.entries(U.FAMILIES).flatMap(([t,e])=>e.map(a=>[a,t])));static idOf(t){return t?U.BY_TYPE.get(t.toUpperCase()):void 0}}class D{static ID_PREFIX=z.ID_PREFIX;static MAX_OBJECTS=40;static FT_TO_M=.3048;static DEG=Math.PI/180;static from(t,e,a,n=D.MAX_OBJECTS,s={}){return new kt(t,e,a,n,s).build()}static idOf(t,e){return z.idOf(t,e)}static keyOf(t){return z.keyOf(t)}static HEIGHT_OVER_LENGTH=.29;static sizeOf(t){return{widthM:t.spanM,lengthM:t.lengthM,heightM:t.lengthM*D.HEIGHT_OVER_LENGTH}}static offsetOf(t,e){const a=L.seenFrom(t,{lat:e.lat,lng:e.lng,heightM:e.altitudeFt*D.FT_TO_M}),n=a.distanceKm*1e3,s=n*Math.cos(a.altitudeDeg*D.DEG);return{eastM:s*Math.sin(a.azimuthDeg*D.DEG),northM:s*Math.cos(a.azimuthDeg*D.DEG),upM:n*Math.sin(a.altitudeDeg*D.DEG),altitudeDeg:a.altitudeDeg,distanceKm:a.distanceKm}}static segments(t){const e=[];let a=[];for(const n of t.points){const s=a[a.length-1];s&&n.t-s.t>F.MAX_GAP_S*1e3&&(e.push(a),a=[]),a.push(n)}return e.push(a),e.filter(n=>n.length>=2)}static bearingDeg(t,e){return(Math.atan2(e.eastM-t.eastM,e.northM-t.northM)/D.DEG+360)%360}}class kt{constructor(t,e,a,n,s){this.tracks=t,this.observer=e,this.startMs=a,this.maxObjects=n,this.options=s}build(){const t=[];for(const a of this.tracks){const n=D.keyOf(a),s=this.options.models?.get(n)??k.of(void 0);D.segments(a).forEach((o,i)=>{const r=o.map(u=>({point:u,at:D.offsetOf(this.observer,u)}));if(!r.some(u=>u.at.altitudeDeg>=0))return;const h=r.map((u,p)=>({t:u.point.t-this.startMs,eastM:u.at.eastM,northM:u.at.northM,altitudeM:u.at.upM,headingDeg:u.point.trackDeg??(p+1<r.length?D.bearingDeg(u.at,r[p+1].at):D.bearingDeg(r[p-1].at,u.at))})),c=D.idOf(a,i),d=r[Math.floor(r.length/2)].point,l=this.options.sunElevationAt?.(d)??90;t.push({object:{id:c,kind:"aircraft",eastM:h[0].eastM,northM:h[0].northM,headingDeg:h[0].headingDeg,sizeM:D.sizeOf(s),model:U.idOf(s.code)?{id:U.idOf(s.code)}:void 0,color:P.bodyColor(s),lights:P.lights(s,l),track:h},presence:{fromMs:h[0].t,untilMs:h[h.length-1].t},flight:{icao:a.icao,nonIcao:a.nonIcao,points:o},closestKm:Math.min(...r.map(u=>u.at.distanceKm))})})}t.sort((a,n)=>a.closestKm-n.closestKm);const e=t.slice(0,this.maxObjects);return{objects:e.map(a=>a.object),presence:new Map(e.map(a=>[a.object.id,a.presence])),flights:new Map(e.map(a=>[a.object.id,a.flight])),total:t.length,shown:e.length}}}const ut=[{id:"turbofan-narrow-body",name:"Turbofan airliner, narrow-body",kinds:["airliner-narrow"],totalDbA:148,shapeDb:[-32,-17,-9,-6,-5,-7,-12,-22],character:{toneHz:1800,toneShare:.3,humHz:90,humShare:.7}},{id:"turbofan-wide-body",name:"Turbofan airliner, wide-body",kinds:["airliner-wide"],totalDbA:151,shapeDb:[-28,-14,-7,-4,-3,-6,-12,-22],character:{toneHz:1200,toneShare:.3,humHz:70,humShare:.7}},{id:"regional-jet",name:"Regional jet",kinds:["regional-jet"],totalDbA:144,shapeDb:[-32,-17,-9,-5,-4,-6,-11,-21],character:{toneHz:1900,toneShare:.3,humHz:95,humShare:.7}},{id:"business-jet",name:"Business jet",kinds:["business-jet"],totalDbA:141,shapeDb:[-30,-15,-8,-4,-3,-4,-9,-19],character:{toneHz:2500,toneShare:.25,humHz:110,humShare:.7}},{id:"turboprop",name:"Turboprop",kinds:["regional-turboprop","turboprop-light"],totalDbA:138,shapeDb:[-14,-9,-8,-6,-8,-13,-20,-28],character:{toneHz:80,toneShare:.5}},{id:"light-piston",name:"Light piston aircraft",kinds:["light-piston"],totalDbA:130,shapeDb:[-18,-9,-5,-4,-8,-14,-22,-30],character:{toneHz:80,toneShare:.4}},{id:"ultralight",name:"Ultralight",kinds:["ultralight"],totalDbA:124,shapeDb:[-16,-8,-5,-4,-9,-15,-23,-31],character:{toneHz:140,toneShare:.4}},{id:"helicopter-light",name:"Light helicopter",kinds:["helicopter-light"],totalDbA:134,shapeDb:[-15,-8,-4,-3,-6,-10,-16,-24],character:{modulationHz:20,modulationDepth:.5}},{id:"helicopter-medium",name:"Medium helicopter",kinds:["helicopter-medium"],totalDbA:138,shapeDb:[-14,-7,-4,-3,-6,-10,-16,-24],character:{modulationHz:22,modulationDepth:.5}},{id:"helicopter-heavy",name:"Heavy helicopter",kinds:["helicopter-heavy"],totalDbA:144,shapeDb:[-12,-6,-4,-4,-7,-11,-17,-25],character:{modulationHz:17,modulationDepth:.5}},{id:"military-jet",name:"Military jet",kinds:["military-jet"],totalDbA:152,shapeDb:[-26,-12,-6,-3,-2,-3,-7,-15]},{id:"glider",name:"Glider",kinds:["glider"],totalDbA:85,shapeDb:[-30,-22,-15,-10,-8,-8,-14,-22]},{id:"balloon",name:"Hot-air balloon",kinds:["balloon"],totalDbA:100,shapeDb:[-25,-15,-9,-5,-3,-6,-12,-20]},{id:"unmanned",name:"Unmanned aircraft",kinds:["unmanned"],totalDbA:88,shapeDb:[-40,-30,-20,-12,-6,-3,-3,-8],character:{toneHz:450,toneShare:1}}],ct=ut.map(C=>({id:C.id,name:C.name,soundPowerA:C.shapeDb.map(t=>t+C.totalDbA-E.sumDb(C.shapeDb)),character:C.character}));class g{static DEFAULT_AMBIENT_DB_A=35;static DETECTION_MARGIN_DB=3;static AMBIENT_SHAPE_DB=[-12,-7,-5,-5,-7,-11,-17,-25];static HEARING_FLOOR_DB_A=0;static ITERATIONS=30;static CONVERGED_MS=.5;static VELOCITY_STEP_MS=500;static noiseOfKind(t){const e=ut.find(a=>a.kinds.includes(t));return ct.find(a=>a.id===(e?.id??"turbofan-narrow-body"))}static bandsAt(t,e,a=E.STANDARD){const n=20*Math.log10(Math.max(e*1e3,1))+11;return E.OCTAVES.map((s,o)=>t.soundPowerA[o]-n-E.absorptionDbPerKm(s,a)*e)}static couldBeHeard(t,e,a=g.DEFAULT_AMBIENT_DB_A,n=E.STANDARD){const s=g.ambientBands(a);return g.bandsAt(t,e,n).some((o,i)=>o>=Math.max(s[i]+g.DETECTION_MARGIN_DB,g.HEARING_FLOOR_DB_A))}static ambientBands(t){const e=g.AMBIENT_SHAPE_DB,a=E.sumDb(e);return e.map(n=>t+n-a)}static heardAt(t,e,a,n={}){const s=n.air??E.STANDARD,o=E.speedOfSound(s.temperatureC),i=t.points[t.points.length-1]?.t;if(i===void 0)return;let r=Math.min(a,i),h=F.positionAt(t,r);if(!h)return;let c=L.seenFrom(e,h.geo);for(let f=0;f<g.ITERATIONS;f++){const v=a-c.distanceKm*1e3*1e3/o,j=Math.abs(v-r);if(r=v,h=F.positionAt(t,r),!h)return;if(c=L.seenFrom(e,h.geo),j<g.CONVERGED_MS)break}const d=F.positionAt(t,a),l=d?L.seenFrom(e,d.geo):c,u=n.noise??ct[0],p=n.ambientDbA??g.DEFAULT_AMBIENT_DB_A,m=g.ambientBands(p),A=g.bandsAt(u,c.distanceKm,s),b=A.map((f,v)=>f>=Math.max(m[v]+g.DETECTION_MARGIN_DB,g.HEARING_FLOOR_DB_A)),R=A.indexOf(Math.max(...A)),S=b.lastIndexOf(!0);return{track:t,audible:b.some(Boolean),levelDbA:E.sumDb(A),bandsDbA:A,ambientDbA:p,delayS:(a-r)/1e3,emittedAtMs:r,sound:c,seen:l,lagDeg:g.angleBetween(c,l),dopplerRatio:g.doppler(t,e,r,o),dominantHz:E.OCTAVES[R],cutoffHz:S<0?void 0:E.OCTAVES[S]}}static profile(t,e,a,n,s=2e3,o={}){const i=[];let r,h,c=a;for(let d=a;d<=n;d+=s){const l=g.heardAt(t,e,d,o);l&&(!h||l.levelDbA>h.levelDbA)&&(h=l,c=d),l?.audible?r?r.untilMs=d:i.push(r={fromMs:d,untilMs:d}):r=void 0}return{track:t,audible:i,peakDbA:h?.levelDbA??-1/0,peakAtMs:c,peakDelayS:h?.delayS??0}}static angleBetween(t,e){const a=c=>{const d=c.altitudeDeg*Math.PI/180,l=c.azimuthDeg*Math.PI/180;return[Math.cos(d)*Math.sin(l),Math.cos(d)*Math.cos(l),Math.sin(d)]},[n,s,o]=a(t),[i,r,h]=a(e);return Math.acos(Math.min(1,Math.max(-1,n*i+s*r+o*h)))*180/Math.PI}static doppler(t,e,a,n){const s=g.VELOCITY_STEP_MS,o=F.positionAt(t,a-s),i=F.positionAt(t,a+s);if(!o||!i)return 1;const r=L.seenFrom(e,o.geo).distanceKm*1e3,h=L.seenFrom(e,i.geo).distanceKm*1e3;return 1/(1-(r-h)/(2*s/1e3)/n)}}class Gt{static at(t,e,a,n,s={}){const o=F.seenFrom(t,a,n);if(!o)return;const i=k.of(e),r=g.heardAt(t,a,n,{noise:g.noiseOfKind(i.kind),...s});return{hex:`${t.nonIcao?"~":""}${t.icao.toString(16).padStart(6,"0")}`,registration:e?.registration,typeCode:i.code??e?.type,name:i.basis==="nothing"?void 0:i.name,kind:i.kind,basis:i.basis,military:e?.military===!0,restricted:e?.restricted===!0,altitudeFt:o.altitudeFt,groundSpeedKt:o.groundSpeedKt,trackDeg:o.trackDeg,sky:o.sky,angularRateDegPerS:o.angularRateDegPerS,hearing:r&&{audible:r.audible,levelDbA:r.levelDbA,ambientDbA:r.ambientDbA,delayS:r.delayS,lagDeg:r.lagDeg,dopplerRatio:r.dopplerRatio,cutoffHz:r.cutoffHz,dominantHz:r.dominantHz}}}}class O{static REFERENCE_AMPLITUDE=.02;static MASKING_RANGE_DB=6;static KNEE_DB=20;static COMPRESSION_RATIO=1.5;static EXPANSION_RATIO=1.8;static DEFAULT_MAX_VOICES=4;static candidates(t,e,a,n,s={}){const o=new Set;for(const[i,r]of t){const h=g.noiseOfKind(k.of(e.get(a(r))).kind);let c=1/0;for(const d of r.points)c=Math.min(c,L.seenFrom(n,{lat:d.lat,lng:d.lng,heightM:d.altitudeFt*.3048}).distanceKm);g.couldBeHeard(h,c,s.ambientDbA,s.air)&&o.add(i)}return o}static voices(t,e,a,n,s,o,i={}){const r=[];for(const h of t){const c=e.get(h);if(!c||i.only?.(h)===!1)continue;const d=i.kindOf?.(h)??k.of(a.get(n(c))).kind,l=i.noiseOf?.(h)??g.noiseOfKind(d),u=g.heardAt(c,s,o,{...i,noise:l});u?.audible&&r.push({id:h,kind:d,bandAmplitudes:O.bandAmplitudes(u.bandsDbA,u.ambientDbA,i.referenceAmplitude),levelDbA:u.levelDbA,distanceKm:u.sound.distanceKm,dopplerRatio:u.dopplerRatio,azimuthDeg:u.sound.azimuthDeg,elevationDeg:u.sound.altitudeDeg,character:l.character})}return r.sort((h,c)=>c.levelDbA-h.levelDbA).slice(0,i.maxVoices??O.DEFAULT_MAX_VOICES)}static bandAmplitudes(t,e,a=O.REFERENCE_AMPLITUDE){const n=g.ambientBands(e),s=g.DETECTION_MARGIN_DB,o=E.sumDb(t),i=o-e,r=i>=O.KNEE_DB?O.KNEE_DB+(i-O.KNEE_DB)/O.COMPRESSION_RATIO:O.KNEE_DB-(O.KNEE_DB-i)*O.EXPANSION_RATIO,h=a*10**(r/20);return t.map((c,d)=>{const l=Math.min(1,Math.max(0,(c-n[d]-s+O.MASKING_RANGE_DB)/(2*O.MASKING_RANGE_DB)));return l*l*(3-2*l)*h*10**((c-o)/20)})}static BANDS_HZ=E.OCTAVES}class W{static RUMBLE_BELOW_HZ=500;static DULL_BELOW_HZ=2e3;static PITCH_NOTICED=.03;static text(t,e,a,n){const s=(l,u=0)=>l.toLocaleString(n,{maximumFractionDigits:u}),o=(l,u)=>l.replace(/\{(\w+)\}/g,(p,m)=>u[m]??`{${m}}`),i=[],r=[t.registration,t.name].filter(Boolean).join(" · ");i.push(r||o(e.unnamed,{hex:t.hex}));const h=[o(e.altitude,{value:s(Math.round(t.altitudeFt/100)*100)}),t.groundSpeedKt===void 0?void 0:o(e.speed,{value:s(Math.round(t.groundSpeedKt))}),t.trackDeg===void 0?void 0:o(e.heading,{value:s(Math.round(t.trackDeg))})].filter(Boolean);i.push(h.join(" · ")),i.push(o(e.position,{distance:s(t.sky.distanceKm,t.sky.distanceKm<10?1:0),elevation:s(Math.round(t.sky.altitudeDeg)),bearing:a(t.sky.azimuthDeg)}));const c=t.hearing;if(!c)i.push(e.soundUnknown);else if(!c.audible)i.push(o(e.inaudible,{level:s(Math.round(c.levelDbA)),ambient:s(Math.round(c.ambientDbA))}));else{const l=c.cutoffHz??0,u=l<=W.RUMBLE_BELOW_HZ?e.rumble:l<=W.DULL_BELOW_HZ?e.muffled:e.broad,p=c.dopplerRatio-1,m=Math.abs(p)<W.PITCH_NOTICED?"":o(p>0?e.pitchHigher:e.pitchLower,{percent:s(Math.round(Math.abs(p)*100))});i.push(o(e.heard,{level:s(Math.round(c.levelDbA)),delay:s(Math.round(c.delayS)),lag:s(Math.round(c.lagDeg)),character:o(u,{cutoff:s(l)}),pitch:m}))}t.contrail&&i.push(o(t.contrail.persistent?e.contrailPersistent:e.contrailShort,{rhi:s(Math.round(t.contrail.iceRelativeHumidity*100))}));const d=[t.military?e.military:void 0,t.restricted?e.restricted:void 0].filter(Boolean);return d.length>0&&i.push(d.join(" · ")),i.push(e.candidate),i.join(`
|
|
2
|
+
`)}}class Y{static EFFICIENCY={"airliner-narrow":.34,"airliner-wide":.38,"regional-jet":.32,"business-jet":.3,"military-jet":.22,unknown:.34};static efficiencyOf(t){return Y.EFFICIENCY[t]}}class M{static EMISSION_INDEX_WATER=1.25;static COMBUSTION_HEAT=432e5;static AIR_HEAT_CAPACITY=1004;static MOLAR_MASS_RATIO=.622;static FT_TO_M=.3048;static TROPOPAUSE_M=11e3;static TROPOPAUSE_HPA=226.32;static ISOTHERMAL_SCALE_HEIGHT_M=6341.62;static pressureAtAltitudeFt(t){const e=t*M.FT_TO_M;return e<=M.TROPOPAUSE_M?1013.25*(1-225577e-10*e)**5.25588:M.TROPOPAUSE_HPA*Math.exp(-(e-M.TROPOPAUSE_M)/M.ISOTHERMAL_SCALE_HEIGHT_M)}static saturationOverWaterPa(t){const e=t+273.15;return Math.exp(54.842763-6763.22/e-4.21*Math.log(e)+367e-6*e+Math.tanh(.0415*(e-218.8))*(53.878-1331.22/e-9.44523*Math.log(e)+.014025*e))}static saturationOverIcePa(t){const e=t+273.15;return Math.exp(9.550426-5723.265/e+3.53068*Math.log(e)-.00728332*e)}static iceRelativeHumidity(t,e){return e*M.saturationOverWaterPa(t)/M.saturationOverIcePa(t)}static mixingSlope(t,e){return M.EMISSION_INDEX_WATER*M.AIR_HEAT_CAPACITY*t*100/(M.MOLAR_MASS_RATIO*M.COMBUSTION_HEAT*(1-e))}static criticalTemperatureC(t,e){const a=Math.log(M.mixingSlope(t,e)-.053);return-46.46+9.43*a+.72*a*a}static requiredHumidity(t,e,a){const n=M.criticalTemperatureC(t,e);return(M.mixingSlope(t,e)*(a-n)+M.saturationOverWaterPa(n))/M.saturationOverWaterPa(a)}static evaluate(t,e){const a=M.criticalTemperatureC(t.pressureHpa,e),n=M.requiredHumidity(t.pressureHpa,e,t.temperatureC),s=M.iceRelativeHumidity(t.temperatureC,t.relativeHumidity),o=t.temperatureC<a&&t.relativeHumidity>=n;return{forms:o,persistent:o&&s>=1,criticalTemperatureC:a,requiredHumidity:n,iceRelativeHumidity:s}}}class w{static HOLD_MS=36e5;static DEG=Math.PI/180;static GAS_CONSTANT_OVER_GRAVITY=287.05/9.80665;static at(t,e,a){if(t.length===0)return;const n=t[0],s=t[t.length-1];if(e<n.t-w.HOLD_MS||e>s.t+w.HOLD_MS)return;const o=t.findIndex(u=>u.t>e),i=o===0?t[0]:t[(o===-1?t.length:o)-1],r=o===-1||o===0?i:t[o],h=w.atLevel(i,a),c=w.atLevel(r,a);if(!h||!c)return;const d=r.t>i.t?Math.min(1,Math.max(0,(e-i.t)/(r.t-i.t))):0,l=(u,p)=>u+(p-u)*d;return{pressureHpa:a,temperatureC:l(h.temperatureC,c.temperatureC),relativeHumidity:l(h.relativeHumidity,c.relativeHumidity),driftEastMs:l(h.driftEastMs,c.driftEastMs),driftNorthMs:l(h.driftNorthMs,c.driftNorthMs),shearPerS:l(h.shearPerS,c.shearPerS)}}static atLevel(t,e){const a=t.levels;for(let n=0;n+1<a.length;n++){const s=a[n],o=a[n+1];if(e>s.pressureHpa||e<o.pressureHpa)continue;const i=(Math.log(s.pressureHpa)-Math.log(e))/(Math.log(s.pressureHpa)-Math.log(o.pressureHpa)),r=(u,p)=>u+(p-u)*i,h=u=>{const p=u.windFromDeg*w.DEG;return{east:-u.windSpeedMs*Math.sin(p),north:-u.windSpeedMs*Math.cos(p)}},c=h(s),d=h(o),l=w.GAS_CONSTANT_OVER_GRAVITY*((s.temperatureC+o.temperatureC)/2+273.15)*Math.log(s.pressureHpa/o.pressureHpa);return{pressureHpa:e,temperatureC:r(s.temperatureC,o.temperatureC),relativeHumidity:r(s.relativeHumidity,o.relativeHumidity),driftEastMs:r(c.east,d.east),driftNorthMs:r(c.north,d.north),shearPerS:Math.hypot(d.east-c.east,d.north-c.north)/l}}}}class H{static MIN_ALTITUDE_FT=2e4;static DENSE_MS=3e5;static SPARSE_STEP_MS=6e4;static SATURATION_HORIZON_MS=3*36e5;static SATURATION_STEP_MS=6e5;static PRESSURE_STEP_HPA=5;static plan(t,e,a,n){if(a.length===0)return[];const s=[],o=new Map,i=(r,h,c)=>{const d=Math.round(h/H.PRESSURE_STEP_HPA)*H.PRESSURE_STEP_HPA,l=H.SATURATION_STEP_MS,u=Math.floor(r/l)*l,p=`${d}|${u}`,m=o.get(p);if(m!==void 0)return m+(u-r)/1e3;let A=1/0;for(let b=l;b<=H.SATURATION_HORIZON_MS;b+=l){const R=w.at(a,u+b,d);if(!R)break;if(M.evaluate(R,c).iceRelativeHumidity<1){A=b/1e3;break}}return o.set(p,A),A+(u-r)/1e3};for(const r of t.objects){const h=t.flights.get(r.id),c=r.track;if(!h||!c||c.length!==h.points.length)continue;const d=e?.get(z.keyOf(h))??k.of(void 0),l=Y.efficiencyOf(d.kind);if(l===void 0)continue;const u=[];let p=-1/0;c.forEach((m,A)=>{if(m.t<-H.DENSE_MS&&A+1<c.length&&m.t-p<H.SPARSE_STEP_MS)return;p=m.t;const b=h.points[A],R=M.pressureAtAltitudeFt(b.altitudeFt),S=w.at(a,n+m.t,R),f=S&&M.evaluate(S,l);u.push({tMs:m.t,eastM:m.eastM,northM:m.northM,upM:m.altitudeM??0,forms:f?.forms??!1,persistent:f?.persistent??!1,lifetimeS:f?x.lifetimeS(f.iceRelativeHumidity):0,driftEastMs:S?.driftEastMs??0,driftNorthMs:S?.driftNorthMs??0,shearPerS:S?.shearPerS??x.TYPICAL_SHEAR_PER_S,iceRelativeHumidity:f?.iceRelativeHumidity??0,saturatedForS:f?.persistent?i(n+m.t,R,l):0})}),u.some((m,A)=>m.forms&&u[A+1]?.forms)&&s.push({id:r.id,spanM:d.spanM,points:u})}return s}}const lt=[500,400,300,250,200,150],yt=["temperature","relative_humidity","wind_speed","wind_direction"],Pt="2022-01-01",ht=.25;class Ht{fetchImpl;baseUrl;cache=new Map;constructor(t={}){this.fetchImpl=t.fetchImpl??fetch.bind(globalThis),this.baseUrl=t.baseUrl??"https://historical-forecast-api.open-meteo.com/v1/forecast"}between(t,e,a){const n=new Date(e).toISOString().slice(0,10);if(n<Pt)return Promise.resolve({status:"outside"});const s=new Date(a).toISOString().slice(0,10),i=`${`${Math.round(t.lat/ht)},${Math.round(t.lng/ht)}`}|${n}|${s}`;let r=this.cache.get(i);return r||(r=this.read(t,n,s),this.cache.set(i,r),r.then(h=>{h.status==="failed"&&this.cache.delete(i)})),r}async read(t,e,a){const n=lt.flatMap(i=>yt.map(r=>`${r}_${i}hPa`)),s=new URLSearchParams({latitude:String(t.lat),longitude:String(t.lng),start_date:e,end_date:a,hourly:n.join(","),wind_speed_unit:"ms",timezone:"UTC"}),o=`${this.baseUrl}?${s}`;try{const i=await this.fetchImpl(o);if(!i.ok)return{status:"failed"};const r=await i.json();return this.decode(r,{id:"open-meteo-forecast",name:"Open-Meteo (historical forecast)",url:o})}catch{return{status:"failed"}}}decode(t,e){const a=t.hourly;if(!a?.time)return{status:"outside"};const n=[];return a.time.forEach((s,o)=>{const i=[];for(const r of lt){const h=p=>a[`${p}_${r}hPa`]?.[o],c=h("temperature"),d=h("relative_humidity"),l=h("wind_speed"),u=h("wind_direction");if([c,d,l,u].some(p=>p==null))return;i.push({pressureHpa:r,temperatureC:c,relativeHumidity:d/100,windSpeedMs:l,windFromDeg:u})}n.push({t:Date.parse(`${s}Z`),levels:i})}),n.length>0?{status:"found",samples:n,source:e}:{status:"outside"}}}const Ut=Z.point("upperAir").provide(Z.BUILT_IN,[{id:"open-meteo-forecast",name:"Open-Meteo (historical forecast)",credit:"Weather data by Open-Meteo.com, CC BY 4.0",creditUrl:"https://open-meteo.com/en/docs/historical-forecast-api",create:()=>new Ht}]);class T{static DEFAULT_KIND="airliner-narrow";static STEP_MS=1e3;static LEAD_MS=12e4;static FT_PER_M=1/.3048;static ID_PREFIX="decor:";tracks=new Map;static kindOf(t,e){if(t.kind!=="aircraft"||!T.flies(t))return;const a=t.aircraftSound??e??T.DEFAULT_KIND;return a==="silent"?void 0:a}static flies(t){return(t.track??[]).some(e=>(e.altitudeM??0)>0)}voices(t,e,a,n={},s=()=>{}){const o=t.event.place?.[0];if(!o)return[];const i=new Map,r=new Map,h=Math.max(t.observerTrack.duration,(t.event.durationSeconds??0)*1e3);for(const c of t.decor){const d=T.kindOf(c,s(c));if(!d)continue;const l=`${T.ID_PREFIX}${c.id}`;i.set(l,this.trackOf(c,l,o,h)),r.set(l,d)}for(const c of this.tracks.keys())i.has(c)||this.tracks.delete(c);return i.size===0?[]:O.voices(new Set(i.keys()),i,new Map,c=>String(c.icao),a,e,{...n,kindOf:c=>r.get(c)})}trackOf(t,e,a,n){const s=JSON.stringify([t.track,t.eastM,t.northM,t.headingDeg,a.lat,a.lng,n]),o=this.tracks.get(e);if(o?.key===s)return o.track;const i=[];for(let l=0;l<=n;l+=T.STEP_MS)i.push(T.pointAt(t,l,a));(i.length===0||i[i.length-1].t<n)&&i.push(T.pointAt(t,n,a));const r=i[0],h=i[1]??r,c=l=>(h[l]-r[l])/(h.t-r.t||1);for(let l=T.STEP_MS*10;l<=T.LEAD_MS;l+=T.STEP_MS*10)i.unshift({t:-l,lat:r.lat-c("lat")*l,lng:r.lng-c("lng")*l,altitudeFt:Math.max(0,r.altitudeFt-c("altitudeFt")*l)});const d={icao:T.hash(e),nonIcao:!0,points:i};return this.tracks.set(e,{key:s,track:d}),d}static pointAt(t,e,a){const n=mt(t,e),s=$(n.eastM,-n.northM,a.lat,a.lng);return{t:e,lat:s.lat,lng:s.lng,altitudeFt:n.altitudeM*T.FT_PER_M}}static hash(t){let e=0;for(let a=0;a<t.length;a++)e=e*31+t.charCodeAt(a)>>>0;return e}}class G{static STEP_MS=250;static FT_PER_M=1/.3048;static ID_PREFIX="body:";tracks=new Map;static noiseOf(t){const e=g.noiseOfKind(t.kind),a=t.quieterDb??0;return a===0?e:{...e,id:`${e.id}-${a}dB`,soundPowerA:e.soundPowerA.map(n=>n-a)}}voices(t,e,a,n,s,o,i={}){const r=new Map,h=new Map,c=new Map;for(const l of t){if(!l.sound)continue;const u=`${G.ID_PREFIX}${l.id}`,p=this.trackOf(l,u,e,n,o);p&&(r.set(u,p),h.set(u,l.sound.kind),c.set(u,G.noiseOf(l.sound)))}for(const l of this.tracks.keys())r.has(l)||this.tracks.delete(l);if(r.size===0)return[];const d=$(a.eastM,-a.northM,n.lat,n.lng);return O.voices(new Set(r.keys()),r,new Map,l=>String(l.icao),{lat:d.lat,lng:d.lng,heightM:a.upM},s,{...i,kindOf:l=>h.get(l),noiseOf:l=>c.get(l)})}trackOf(t,e,a,n,s){const o=`${n.lat},${n.lng},${s}`,i=this.tracks.get(e);if(i&&i.body===t&&i.origin===o)return i.track;const r=[];for(let c=-12e4;c<=s;c+=G.STEP_MS){const d=a(t,c);if(!d)continue;const l=$(d.eastM,-d.northM,n.lat,n.lng);r.push({t:c,lat:l.lat,lng:l.lng,altitudeFt:d.upM*G.FT_PER_M})}if(r.length<2)return;const h={icao:G.hash(e),nonIcao:!0,points:r};return this.tracks.set(e,{body:t,origin:o,track:h}),h}static hash(t){let e=0;for(let a=0;a<t.length;a++)e=e*31+t.charCodeAt(a)>>>0;return e}}export{q as AircraftAudio,H as AircraftContrails,k as AircraftModels,_ as AmbientNoise,G as BodyHearing,T as DecorAircraftHearing,D as TrafficDecor,Gt as TrafficInfos,O as TrafficSound,W as TrafficTooltip,Ut as UPPER_AIR_SOURCES};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a4 as M,a5 as y,a1 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 y.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 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{aM as h,S as p}from"./rr0-sighting-editor.mjs";import{N as m}from"./NearestApproach-BfoIDPh8.js";import{CoverageAssessor as S}from"./CoverageAssessor-cODG-YV9.js";class s{about="observer";static PAGE_WORDS=250;static ARTICLE_WORDS=500;static CLOSE_M=150;static WEIGHTS={witnesses:.25,occupation:.2,relation:.15,geography:.15,activity:.15,age:.1};static OCCUPATIONS={student:.3,worker:.5,farmer:.5,homemaker:.5,merchant:.7,business:.7,employee:.7,artist:.7,technician:.9,police:.9,pilot:.9,military:1};static RELATIONS={friends:.3,family:.6,professional:.8,none:1};static ACTIVITIES={leisure:.3,travelling:.6,cultural:.8,working:1};static FACTORS=h;static PENDING="pending";static WEAKEST_FIRST=["assumed","derived","stated","measured"];async assess(t){const e=t.account??{},i=this.information(t,e),n=this.strangeness(t,e),u=this.reliability(t,e),v=i.value,r=n.filter(d=>d.value>0).length/s.FACTORS.length,c=s.WEIGHTS,a=Object.keys(c).reduce((d,l)=>d+c[l]*u[l].value,0),o=[this.criterion("bg-information",i),...s.FACTORS.map((d,l)=>this.criterion(`bg-${d}`,n[l])),...Object.keys(c).map(d=>this.criterion(`bg-${d}`,u[d]))],b=Object.values(e.strangeness??{}).some(d=>d!==void 0);return e.source===void 0||!b?{verdict:s.PENDING,factors:{q:v,sigma:r,pi:a},criteria:o}:{score:v*r*a,factors:{q:v,sigma:r,pi:a},criteria:o}}criterion(t,e){return{id:t,value:e.value,basis:e.basis,paths:e.basis===void 0?[]:e.paths}}information(t,e){const i=e.source;if(i===void 0)return{value:0,paths:[]};const n=this.basis(t,"account.source"),u=e.enquiryMinutes,v=(a,o,b)=>u===void 0?{value:b,basis:this.weakest(n,"assumed"),paths:["account.source"]}:{value:u>=a?o:b,basis:this.weakest(n,this.basis(t,"account.enquiryMinutes")),paths:["account.source","account.enquiryMinutes"]},r=this.words(t),c=(a,o,b)=>({value:r>=a?o:b,basis:this.weakest(n,"derived"),paths:["account.source","event.description"]});switch(i){case"on-site":return v(120,1,.9);case"interview":return v(60,.9,.8);case"telephone":return v(30,.7,.6);case"questionnaire":return e.followedUp?c(s.PAGE_WORDS,.7,.6):{value:.6,basis:n,paths:["account.source"]};case"letter":case"social-media":return e.followedUp?c(s.PAGE_WORDS,.6,.5):c(s.PAGE_WORDS,.4,.3);case"press":return c(s.ARTICLE_WORDS,.2,.1)}}words(t){return(p.any.read(t.event.description)??"").split(/\s+/).filter(i=>i!=="").length}strangeness(t,e){const i=e.strangeness??{},n=s.FACTORS.map(r=>{const c=i[r];if(c!==void 0){const a=`account.strangeness.${r}`;return{value:c?1:0,basis:this.basis(t,a),paths:[a]}}switch(r){case"detection":{const a=t.instrument.category;return{value:a==="eye"||a==="binoculars"?0:1,basis:"derived",paths:["instrumentId"]}}case"close":{const a=m.of(t);return a===void 0?{value:0,paths:[]}:{value:a.m<=s.CLOSE_M?1:0,basis:a.basis,paths:a.paths}}case"beings":{const a=t.decor.map((o,b)=>({object:o,index:b})).filter(({object:o})=>o.kind==="entity");return a.length>0?{value:1,basis:"stated",paths:a.map(({index:o})=>`decor.${o}`)}:{value:0,basis:"derived",paths:["decor"]}}default:return{value:0,paths:[]}}}),u=s.FACTORS.indexOf("beings");return!["appearance","movement","incongruity"].some(r=>n[s.FACTORS.indexOf(r)].value>0)&&n[u].value>0&&(n[u]={...n[u],value:0}),n}reliability(t,e){const i=t.observerCount,n=i===1,u=i===1?.3:i===2?.5:i<=5?.7:i<=10?.9:1,v=e.observerGraduate?{value:1,basis:this.basis(t,"account.observerGraduate"),paths:["account.observerGraduate"]}:e.observerOccupationKind===void 0?{value:0,paths:[]}:{value:s.OCCUPATIONS[e.observerOccupationKind],basis:this.basis(t,"account.observerOccupationKind"),paths:["account.observerOccupationKind"]},r=n?{value:.6,basis:"derived",paths:["decor"]}:e.observersRelation===void 0?{value:0,paths:[]}:{value:s.RELATIONS[e.observersRelation],basis:this.basis(t,"account.observersRelation"),paths:["account.observersRelation"]},c=e.activity!==void 0?{value:s.ACTIVITIES[e.activity],basis:this.basis(t,"account.activity"),paths:["account.activity"]}:t.vehicle!==void 0?{value:s.ACTIVITIES.travelling,basis:"derived",paths:["vehicle"]}:{value:0,paths:[]},a=e.observerAgeYears,o=a===void 0?{value:0,paths:[]}:{value:a<10||a>75?.2:a<18?.4:a<35?.6:a<65?1:.8,basis:this.basis(t,"account.observerAgeYears"),paths:["account.observerAgeYears"]};return{witnesses:{value:u,basis:"derived",paths:["decor"]},occupation:v,relation:r,geography:{value:.5,basis:"derived",paths:["decor"]},activity:c,age:o}}basis(t,e){return S.basisAt(e,t)??"stated"}weakest(...t){return s.WEAKEST_FIRST.find(e=>t.includes(e))}}export{s as BallesterGuaspAssessor};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import{o as T,_ as c,ak as I,D as p,G as L,c as x,z as w,C as E,J as f,at as M}from"./rr0-sighting-editor.mjs";import{L as u}from"./LaserBeam-Be555mrH.js";import{S as _}from"./SkyEventEditorStyle-CvY_AhbI.js";const O=T.catalog({en:()=>c(()=>import("./BeamParameterTexts_en-DZB75ouZ.js"),[],import.meta.url).then(l=>l.beamParameterTexts_en),fr:()=>c(()=>import("./BeamParameterTexts_fr-BHG3fW40.js"),[],import.meta.url).then(l=>l.beamParameterTexts_fr),es:()=>c(()=>import("./BeamParameterTexts_es-AeZmsufG.js"),[],import.meta.url).then(l=>l.beamParameterTexts_es),it:()=>c(()=>import("./BeamParameterTexts_it-CPwmQX-g.js"),[],import.meta.url).then(l=>l.beamParameterTexts_it)});class h{static LIGHT_TITLE="light";static BEAM="beam";static WHEN="when";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:"beam",parameters:[{type:"said",key:"title",label:"name",group:h.BEAM},{type:"number",key:"divergenceMrad",min:.001,max:1e3,step:.001,unit:"mrad",group:h.BEAM,effective:()=>u.DEFAULT_DIVERGENCE_MRAD,label:"divergence",hint:"howFastItWidensFullAngle"},{type:"number",key:"apertureM",min:.001,max:10,step:.001,unit:"m",group:h.BEAM,effective:()=>u.DEFAULT_APERTURE_M,label:"widthAtTheEmitter"},{type:"number",key:"patchiness",min:0,max:100,step:1,unit:"%",scale:100,group:h.BEAM,effective:()=>u.DEFAULT_PATCHINESS,label:"unevenHaze",hint:"howUnevenlyTheHazeItCrosses"}]};static WAVELENGTH_HINT="itsColour532ForTheGreen";static POWER_HINT="theOpticalPowerItCarriesIts";static WAVELENGTH_LABEL="wavelength";static POWER_LABEL="power";static LIGHT={kind:"beam-light",title:h.LIGHT_TITLE,parameters:[{type:"number",key:"wavelengthNm",min:380,max:780,step:1,unit:"nm",required:!0,label:h.WAVELENGTH_LABEL,hint:h.WAVELENGTH_HINT},{type:"number",key:"powerW",min:.001,max:1e5,step:.001,unit:"W",required:!0,label:h.POWER_LABEL,hint:h.POWER_HINT}]};static LIGHT_KEY={kind:"beam-light-key",title:h.LIGHT_TITLE,parameters:[h.instant("t","time","secondsOfTheRecording",!0),{type:"number",key:"wavelengthNm",min:380,max:780,step:1,unit:"nm",label:h.WAVELENGTH_LABEL,hint:h.WAVELENGTH_HINT,effective:(e,t)=>t?.wavelengthNm},{type:"number",key:"powerW",min:.001,max:1e5,step:.001,unit:"W",label:h.POWER_LABEL,hint:h.POWER_HINT,effective:(e,t)=>t?.powerW}]};static ON={kind:"beam-on",title:h.WHEN,parameters:[h.instant("fromT","onFrom","secondsOfTheRecordingEmptyFrom"),h.instant("untilT","offAt","secondsOfTheRecordingEmptyUntil")]};static MOVE_KEY={kind:"beam-move-key",title:"pathAtAnInstant",parameters:[h.instant("t","time","secondsOfTheRecording",!0)]};static hexOf(e){const t=u.colourOf(e),i=Math.max(...t,1e-9),s=n=>{const o=Math.min(1,Math.max(0,n/i)),a=o<=.0031308?12.92*o:1.055*o**(1/2.4)-.055;return Math.round(a*255).toString(16).padStart(2,"0")};return`#${t.map(s).join("")}`}static wavelengthOf(e){const t=h.hueOf(e);let i=532,s=1/0;for(let n=400;n<=700;n++){const o=Math.abs((h.hueOf(h.hexOf(n))-t+540)%360-180);o<s&&(s=o,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(b=>b/255),o=Math.max(i,s,n),a=Math.min(i,s,n);if(o===a)return 0;const r=o-a;return((o===i?(s-n)/r%6:o===s?(n-i)/r+2:(i-s)/r+4)*60+360)%360}static PLACE={kind:"beam-place",title:"pointOfThePath",parameters:[{type:"position",key:"lat",secondKey:"lng",saidKey:"saidPosition",native:"geo",step:.1,label:"position"},{type:"number",key:"altitudeM",min:-500,max:1e5,step:.1,unit:"m",required:!0,label:"altitude",hint:"aboveTheSeaNotTheGround"}]};static publish(){I.publish(h.SET)}}const A=T.catalog({en:()=>c(()=>import("./BeamEditorMessages_en-DDvPWAdd.js"),[],import.meta.url).then(l=>l.beamEditorMessages_en),fr:()=>c(()=>import("./BeamEditorMessages_fr-CtX6uP-x.js"),[],import.meta.url).then(l=>l.beamEditorMessages_fr),es:()=>c(()=>import("./BeamEditorMessages_es-BhCkhUkN.js"),[],import.meta.url).then(l=>l.beamEditorMessages_es),it:()=>c(()=>import("./BeamEditorMessages_it-DVweRQFi.js"),[],import.meta.url).then(l=>l.beamEditorMessages_it)});class g{constructor(e,t,i){this.container=e,this.host=t,this.language=i,_.attach(e,"beam-editor",g.STYLE),I.of("beam")||h.publish(),this.ready=this.setLanguage(i)}messages;ready;parameterTexts;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,s]=await Promise.all([A.load(e),O.load(e)]);t===this.languageToken&&(this.messages=i,this.parameterTexts=s,this.render(),this.sync())}sync(){if(!this.messages)return;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 p(this.element("beam-parameters"),this.language,"beam.",i),this.form.show(this.resolved(h.SET),this.targetOfBeam(),()=>this.written()),this.syncDetail(!0)}refresh(){if(!this.messages)return;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.messages&&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.messages&&(this.currentId=e,this.row="on",this.lightIndex=void 0,this.moveIndex=void 0,this.placeIndex=0,this.sync())}resolved(e){return L.resolve(e,this.parameterTexts)}render(){if(!this.messages)return;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}">${x.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}">${x.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 w({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 E(this.element("beam-timeline"),t=>this.host.seekTo(t),{addKeyframeHere:e.addHere,keyframeHere:e.here,zoomHint:e.zoomHint}),this.places=new w({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 f(()=>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,o=[{t:s,until:n,label:""}],a=this.sortedLight(e),r=this.sortedMoves(e),v=[{id:"on",label:t.on,color:g.ON_COLOR,times:[s,n],spans:o,active:this.row==="on",open:()=>this.selectRow("on"),pressed:()=>this.selectRow("on"),move:(d,m)=>this.moveEnd(d===s?"fromT":"untilT",m),add:()=>this.moveEnd("fromT",Math.round(this.host.currentTime()))},{id:"light",label:t.light,color:g.LIGHT_COLOR,times:a.map(d=>d.t),spans:a.length?[]:o,active:this.row==="light",selectedTime:this.row==="light"&&this.lightIndex!==void 0?a[this.lightIndex]?.t:void 0,open:()=>this.selectLight(this.lightIndex),pressed:(d,m)=>this.selectLight(m===void 0?this.lightIndex:this.sortedLight(this.current).findIndex(y=>y.t===m)),move:(d,m)=>this.moveLightKey(d,m),add:()=>this.addLightKey(Math.round(this.host.currentTime()))},{id:"path",label:t.path,color:g.PATH_COLOR,times:r.map(d=>d.t),spans:r.length?[]:o,active:this.row==="path",selectedTime:this.row==="path"&&this.moveIndex!==void 0?r[this.moveIndex]?.t:void 0,open:()=>this.selectMove(this.moveIndex),pressed:(d,m)=>this.selectMove(m===void 0?this.moveIndex:this.sortedMoves(this.current).findIndex(y=>y.t===m)),move:(d,m)=>this.moveMoveKey(d,m),add:()=>this.addMoveKey(Math.round(this.host.currentTime()))}],b=[s,n,...a.map(d=>d.t),...r.map(d=>d.t)];this.timeline.show(v,i,this.host.currentTime(),{from:Math.min(0,...b),to:Math.max(i,...b)})}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 p(this.element("beam-on-parameters"),this.language,"beamOn."),this.onForm.show(this.resolved(h.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 p(this.element("beam-light-parameters"),this.language,"beamLight."),this.lightForm.show(this.resolved(h.LIGHT),this.targetOfBeam(),()=>this.syncColour())),this.lightKeyForm?this.lightKeyForm.sync(e):(this.lightKeyForm=new p(this.element("beam-light-key-parameters"),this.language,"beamLightKey."),this.lightKeyForm.show(this.resolved(h.LIGHT_KEY),new f(()=>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=h.hexOf(this.currentLightKey?.wavelengthNm??e.wavelengthNm))}pickColour(e){const t=h.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 o=s.map((a,r)=>r===e?n:a).sort((a,r)=>a.t-r.t);this.editBeam(a=>{a.light=o}),this.lightIndex=o.indexOf(n),this.syncTimeline()}addLightKey(e){const t=this.current;if(!t)return;const i=this.sortedLight(t),s=i.findIndex(r=>Math.abs(r.t-e)<1);if(s>=0){this.selectLight(s);return}const n=u.stateAt(t,e),o={t:e,wavelengthNm:Math.round(n.wavelengthNm),powerW:Number(n.powerW.toFixed(3))},a=[...i,o].sort((r,v)=>r.t-v.t);this.editBeam(r=>{r.light=a}),this.selectLight(a.indexOf(o))}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 p(this.element("beam-move-key-parameters"),this.language,"beamMoveKey."),this.moveKeyForm.show(this.resolved(h.MOVE_KEY),new f(()=>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 o=s.map((a,r)=>r===e?n:a).sort((a,r)=>a.t-r.t);this.editBeam(a=>{a.moves=o}),this.moveIndex=o.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}))},o=[...i,n].sort((a,r)=>a.t-r.t);this.editBeam(a=>{a.moves=o}),this.selectMove(o.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>g.MIN_PLACES),this.placeForm?this.placeForm.sync(e):(this.placeForm=new p(this.element("beam-place-parameters"),this.language,"beamPlace."),this.placeForm.show(this.resolved(h.PLACE),new f(()=>this.shownPath[this.placeIndex],i=>this.editPath(s=>{const n={...s[this.placeIndex]};return i(n),s.map((o,a)=>a===this.placeIndex?n:o)}),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,h.nextPlace(e)]),this.placeIndex=this.shownPath.length-1,this.syncPlaces(!0)}removePlace(){if(this.shownPath.length<=g.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=M.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{g as BeamEditor};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e={title:"Beams",name:"Laser",detail:"{name} ({wavelength} nm, {power} W), {distance}"};export{e as beamKindMessages_en};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e={title:"Haces",name:"Láser",detail:"{name} ({wavelength} nm, {power} W), {distance}"};export{e as beamKindMessages_es};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e={title:"Faisceaux",name:"Laser",detail:"{name} ({wavelength} nm, {power} W), {distance}"};export{e as beamKindMessages_fr};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e={title:"Fasci",name:"Laser",detail:"{name} ({wavelength} nm, {power} W), {distance}"};export{e as beamKindMessages_it};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e={light:"Light",beam:"Beam",when:"When",name:"Name",divergence:"Divergence",howFastItWidensFullAngle:"How fast it widens, full angle: 0.1 mrad is a metre wide at 10 km.",widthAtTheEmitter:"Width at the emitter",unevenHaze:"Uneven haze",howUnevenlyTheHazeItCrosses:"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.",itsColour532ForTheGreen:"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.",theOpticalPowerItCarriesIts:"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.",wavelength:"Wavelength",power:"Power",time:"Time",secondsOfTheRecording:"Seconds of the recording.",onFrom:"On from",secondsOfTheRecordingEmptyFrom:"Seconds of the recording; empty, from its start.",offAt:"Off at",secondsOfTheRecordingEmptyUntil:"Seconds of the recording; empty, until its end.",pathAtAnInstant:"Path at an instant",pointOfThePath:"Point of the path",position:"Position",altitude:"Altitude",aboveTheSeaNotTheGround:"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."};export{e as beamParameterTexts_en};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e={light:"Luz",beam:"Haz",when:"Cuándo",name:"Nombre",divergence:"Divergencia",howFastItWidensFullAngle:"Lo rápido que se ensancha, ángulo total: 0,1 mrad es un metro de ancho a 10 km.",widthAtTheEmitter:"Anchura en el emisor",unevenHaze:"Bruma irregular",howUnevenlyTheHazeItCrosses:"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.",itsColour532ForTheGreen:"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.",theOpticalPowerItCarriesIts:"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.",wavelength:"Longitud de onda",power:"Potencia",time:"Instante",secondsOfTheRecording:"Segundos de la grabación.",onFrom:"Encendido a",secondsOfTheRecordingEmptyFrom:"Segundos de la grabación; vacío, desde su inicio.",offAt:"Apagado a",secondsOfTheRecordingEmptyUntil:"Segundos de la grabación; vacío, hasta su final.",pathAtAnInstant:"Trayecto en un instante",pointOfThePath:"Punto del trayecto",position:"Posición",altitude:"Altitud",aboveTheSeaNotTheGround:"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."};export{e as beamParameterTexts_es};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e={light:"Lumière",beam:"Faisceau",when:"Quand",name:"Nom",divergence:"Divergence",howFastItWidensFullAngle:"À quelle vitesse il s'élargit, angle total : 0,1 mrad fait un mètre de large à 10 km.",widthAtTheEmitter:"Largeur à l'émetteur",unevenHaze:"Brume irrégulière",howUnevenlyTheHazeItCrosses:"À 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.",itsColour532ForTheGreen:"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.",theOpticalPowerItCarriesIts:"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.",wavelength:"Longueur d'onde",power:"Puissance",time:"Instant",secondsOfTheRecording:"Secondes de l'enregistrement.",onFrom:"Allumé à",secondsOfTheRecordingEmptyFrom:"Secondes de l'enregistrement ; vide, dès son début.",offAt:"Éteint à",secondsOfTheRecordingEmptyUntil:"Secondes de l'enregistrement ; vide, jusqu'à sa fin.",pathAtAnInstant:"Trajet à un instant",pointOfThePath:"Point du trajet",position:"Position",altitude:"Altitude",aboveTheSeaNotTheGround:"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."};export{e as beamParameterTexts_fr};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e={light:"Luce",beam:"Fascio",when:"Quando",name:"Nome",divergence:"Divergenza",howFastItWidensFullAngle:"Quanto in fretta si allarga, angolo totale: 0,1 mrad è un metro di larghezza a 10 km.",widthAtTheEmitter:"Larghezza all'emettitore",unevenHaze:"Foschia irregolare",howUnevenlyTheHazeItCrosses:"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.",itsColour532ForTheGreen:"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.",theOpticalPowerItCarriesIts:"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.",wavelength:"Lunghezza d'onda",power:"Potenza",time:"Istante",secondsOfTheRecording:"Secondi della registrazione.",onFrom:"Acceso a",secondsOfTheRecordingEmptyFrom:"Secondi della registrazione; vuoto, dal suo inizio.",offAt:"Spento a",secondsOfTheRecordingEmptyUntil:"Secondi della registrazione; vuoto, fino alla sua fine.",pathAtAnInstant:"Percorso a un istante",pointOfThePath:"Punto del percorso",position:"Posizione",altitude:"Altitudine",aboveTheSeaNotTheGround:"Sul mare, non sul suolo: un emettitore a una finestra a dodici metri d'altezza, su un suolo a 160 m, è a 172 m."};export{e as beamParameterTexts_it};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{a7 as V,am as W,an as H,aa as X,ao as v,ap as k,aq as D}from"./rr0-sighting-editor.mjs";import{L as S}from"./LaserBeam-Be555mrH.js";class x{static MAX_SEGMENTS=12e3;static MIN_PIXELS=2;static VERTICES_PER_SEGMENT=24;static HALO_RAD=.002;static HALO_SHARE=.15;static BRIGHTEST_RELATIVE=6e4;group=new V;mesh;positions=new Float32Array(x.MAX_SEGMENTS*x.VERTICES_PER_SEGMENT*3);colors=new Float32Array(x.MAX_SEGMENTS*x.VERTICES_PER_SEGMENT*3);segments=0;drawn=[];cut;constructor(){const s=new W;s.setAttribute("position",new H(this.positions,3)),s.setAttribute("color",new H(this.colors,3)),s.setDrawRange(0,0),this.mesh=new X(s,new v({vertexColors:!0,transparent:!0,blending:D,depthWrite:!1,fog:!1,side:k})),this.mesh.frustumCulled=!1,this.mesh.renderOrder=8,this.mesh.name="beams",this.group.name="beams",this.group.add(this.mesh)}get segmentCount(){return this.segments}get object(){return this.group}get drawnCount(){return this.segments}pick(s,t,e){return this.pickAt(s,t,e.toleranceRad)}update(s,t,e){const l=this.viewsOf(s,t,e);let r=0;this.segments=0,this.drawn=[];for(const h of l){const c=S.colourOf(h.wavelengthNm),i=this.place(h,t,e);this.drawn.push({id:h.id,points:i});for(let y=0;y+1<i.length&&!(this.segments>=x.MAX_SEGMENTS);y++){const E=this.pushSegment(r,i[y],i[y+1],h.wavelengthNm,c,e);E>r&&this.segments++,r=E}}const o=this.mesh.geometry;o.setDrawRange(0,r);for(const h of["position","color"]){const c=o.getAttribute(h);c.clearUpdateRanges(),r>0&&c.addUpdateRange(0,r*3),c.needsUpdate=!0}}viewsOf(s,t,e){const{lat:l,lng:r}=e.reference;(!this.cut||this.cut.lat!==l||this.cut.lng!==r||this.cut.air!==e.air)&&(this.cut={lat:l,lng:r,air:e.air,views:new Map});const o=this.cut.views,h=new Set(s);return S.onAt(s,t).map(c=>{if(!h.has(c))return S.viewOf(c,e.reference,e.air);let i=o.get(c);return i||o.set(c,i=S.viewOf(c,e.reference,e.air)),i})}place(s,t,e){const l=[],r=e.wind??{eastMS:0,northMS:0};for(const o of s.samples){const h=e.origin.x+o.eastM*e.eastScale,c=e.origin.z-o.northM,i=o.upM-e.siteElevationM;if(l.length>0&&i<e.groundYAt(h,c))break;const y=r.eastMS*o.dirEast+r.northMS*o.dirNorth,E=r.eastMS*o.dirNorth-r.northMS*o.dirEast,g=S.patchAt(o.fromSourceM,t,{windAlongMS:y,windAcrossMS:E,patchiness:s.patchiness});l.push({x:h,y:i,z:c,altitudeM:o.altitudeM,widthM:o.widthM,powerW:o.powerW,haze:g})}return l}static SMOOTH_RATIO=1.08;static MAX_HALVINGS=6;pushSegment(s,t,e,l,r,o,h=0){const c={x:e.x-t.x,y:e.y-t.y,z:e.z-t.z},i=Math.hypot(c.x,c.y,c.z);if(i<1e-6)return s;const y={x:c.x/i,y:c.y/i,z:c.z/i};if(Math.hypot((t.x+e.x)/2-o.eye.x,(t.y+e.y)/2-o.eye.y,(t.z+e.z)/2-o.eye.z)<.001)return s;const E=n=>{const u={x:o.eye.x-n.x,y:o.eye.y-n.y,z:o.eye.z-n.z},z=Math.hypot(u.x,u.y,u.z)||.001,p=(y.x*u.x+y.y*u.y+y.z*u.z)/z,a=Math.sqrt(Math.max(0,1-p*p)),w=S.coefficientsAt(o.air,l,n.altitudeM),d=S.phasedScattering({...w,aerosolPerM:w.aerosolPerM*n.haze},p);return{sinTurn:a,scattered:d,through:o.transmittanceTo(n.x,n.y,n.z)}},g=n=>x.MIN_PIXELS*o.pixelRad*Math.hypot(n.x-o.eye.x,n.y-o.eye.y,n.z-o.eye.z),N=n=>Math.hypot(n.x-o.eye.x,n.y-o.eye.y,n.z-o.eye.z),R=n=>Math.max(n.widthM,x.HALO_RAD*N(n)),f=n=>{const u=R(n)/g(n),z=Math.min(1,Math.max(0,u-1));return x.HALO_SHARE*z*z*(3-2*z)},O=new Map([t,e].map(n=>[n,E(n)])),M=(n,u,z)=>{const p=Math.max(u,g(n)),{sinTurn:a,scattered:w,through:d}=O.get(n),I=2*z*S.luminanceCdM2(n.powerW,l,w,p,a),L=r.map((C,m)=>Math.min(x.BRIGHTEST_RELATIVE,I*o.relativeScale*C*d[m])),_={x:o.eye.x-n.x,y:o.eye.y-n.y,z:o.eye.z-n.z},P=this.normalise(this.cross(y,_));return{point:n,half:p/2,level:L,across:P}},A=[[M(t,t.widthM,1-f(t)),M(e,e.widthM,1-f(e))],[M(t,R(t),f(t)),M(e,R(e),f(e))]],[G,T]=A[0].map(n=>Math.max(...n.level));if(h<x.MAX_HALVINGS&&Math.max(G,T)>x.SMOOTH_RATIO*Math.max(Math.min(G,T),1e-12)){const n={x:(t.x+e.x)/2,y:(t.y+e.y)/2,z:(t.z+e.z)/2,altitudeM:(t.altitudeM+e.altitudeM)/2,widthM:(t.widthM+e.widthM)/2,powerW:Math.sqrt(t.powerW*e.powerW),haze:(t.haze+e.haze)/2};return this.pushSegment(this.pushSegment(s,t,n,l,r,o,h+1),n,e,l,r,o,h+1)}if((s+x.VERTICES_PER_SEGMENT)*3>this.positions.length)return s;for(const n of A){if(n.every(a=>Math.max(...a.level)<=0))continue;const u=(a,w)=>{const d=s*3;this.positions[d]=a.point.x+a.across.x*a.half*w,this.positions[d+1]=a.point.y+a.across.y*a.half*w,this.positions[d+2]=a.point.z+a.across.z*a.half*w;const I=w===0?1:0;this.colors[d]=a.level[0]*I,this.colors[d+1]=a.level[1]*I,this.colors[d+2]=a.level[2]*I,s++},[z,p]=n;for(const a of[-1,1])u(z,a),u(z,0),u(p,a),u(z,0),u(p,0),u(p,a)}return s}pickAt(s,t,e){let l;for(const r of this.drawn)for(let o=0;o+1<r.points.length;o++){const h=r.points[o],c=r.points[o+1],i={x:c.x-h.x,y:c.y-h.y,z:c.z-h.z},y={x:h.x-s.x,y:h.y-s.y,z:h.z-s.z},E=i.x*i.x+i.y*i.y+i.z*i.z,g=i.x*t.x+i.y*t.y+i.z*t.z,N=i.x*y.x+i.y*y.y+i.z*y.z,R=t.x*y.x+t.y*y.y+t.z*y.z,f=E-g*g,O=f>1e-9?Math.min(1,Math.max(0,(g*R-N)/f)):0,M={x:h.x+i.x*O,y:h.y+i.y*O,z:h.z+i.z*O},A=(M.x-s.x)*t.x+(M.y-s.y)*t.y+(M.z-s.z)*t.z;if(A<=0)continue;const G=Math.hypot(M.x-s.x-t.x*A,M.y-s.y-t.y*A,M.z-s.z-t.z*A),T=Math.atan2(G,A);T<=e&&(!l||T<l.angle)&&(l={id:r.id,distanceM:Math.hypot(M.x-s.x,M.y-s.y,M.z-s.z),angle:T})}return l&&{id:l.id,distanceM:l.distanceM}}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(){this.mesh.geometry.dispose(),this.mesh.material.dispose(),this.group.removeFromParent()}}export{x as BeamSystem};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import{o as D,_ as y,B as x,y as m,c as E,z as I,C,D as k,G as w,J as O,K as z,L as $}from"./rr0-sighting-editor.mjs";class b{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=b.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{...b.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:g,...M}=e;return M}}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:"body",parameters:[{type:"text",key:"id",required:!0,label:"iD",validate:(e,o,i)=>!(i?.ids??[]).some(s=>s===e&&s!==o.id)},{type:"said",key:"title",label:"name"},{type:"set",key:"explains",label:"standsForTheShapes",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:"noShape"},{type:"text",key:"outlineNode",label:"partDrawnByTheWitness",placeholder:"nodeOfTheModelE"}]};static KEYFRAME={kind:"body-keyframe",title:"atThePlayhead",parameters:[{type:"choice",key:"mode",required:!0,label:"position",choices:[{value:"observer",label:"fromTheWitness"},{value:"world",label:"inTheWorld"}]},h.number("azimuthDeg","azimuth",0,360,.01,"°",{visibleWhen:e=>e.mode==="observer"}),h.number("elevationDeg","elevation",-90,90,.01,"°",{visibleWhen:e=>e.mode==="observer"}),h.number("distanceM","distance",.1,3e4,.1,"m",{visibleWhen:e=>e.mode==="observer"}),{type:"position",key:"eastM",secondKey:"northM",saidKey:"saidPosition",native:"local",step:.1,label:"inTheWorld",visibleWhen:e=>e.mode==="world"},{type:"boolean",key:"onGround",label:"onTheGround"},h.number("aboveGroundM","aboveTheGround",0,3e4,.1,"m",{visibleWhen:e=>e.mode==="world"&&e.onGround!==!0}),h.number("widthM","width",.01,1e3,.01,"m"),h.number("lengthM","length",.01,1e3,.01,"m"),h.number("heightM","height",.01,1e3,.01,"m"),h.number("headingDeg","heading",0,360,.1,"°"),h.number("pitchDeg","pitch",-90,90,.1,"°"),h.number("rollDeg","roll",-180,180,.1,"°"),{type:"colour",key:"color",label:"colour",fallback:"#c8c8c8",visibleWhen:(e,o)=>o?.drawnFromModel!==!0},h.number("albedo","albedo",0,1,.01,void 0),h.number("luminanceCdM2","lightOfItsOwn",0,1e10,.1,"cd/m²"),h.number("transparency","transparency",0,1,.01,void 0),h.number("haloScale","halo",0,20,.1,"×")]}}const A=D.catalog({en:()=>y(()=>import("./BodyParameterTexts_en-CKiFdpaz.js"),[],import.meta.url).then(u=>u.bodyParameterTexts_en),fr:()=>y(()=>import("./BodyParameterTexts_fr-B5jLsE0g.js"),[],import.meta.url).then(u=>u.bodyParameterTexts_fr),es:()=>y(()=>import("./BodyParameterTexts_es-DT9XO1Hc.js"),[],import.meta.url).then(u=>u.bodyParameterTexts_es),it:()=>y(()=>import("./BodyParameterTexts_it-iyJGx4Ta.js"),[],import.meta.url).then(u=>u.bodyParameterTexts_it)});class p{constructor(e,o,i){this.container=e,this.host=o,this.language=i,this.ready=this.setLanguage(i)}static APPEARANCE_KEYS=["color","albedo","luminanceCdM2","transparency","haloScale"];parameterTexts={};messages;ready;languageToken=0;currentId;catalogueToken=0;shownEntry;syncedId;bodyForm;keyForm;async setLanguage(e){const o=++this.languageToken;this.language=e;const[i,s]=await Promise.all([x.load(e),A.load(e)]);o===this.languageToken&&i!==this.messages&&(this.messages=i,this.parameterTexts=s,this.render())}get selectedId(){return this.currentId}sync(){if(!this.messages)return;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){if(!this.messages)return;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}",p.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:p.KEY_COLOR,times:i,selectedTime:o,open:()=>{},move:(n,t)=>this.moveKeyframe(n,t),add:()=>this.keyframeHere()}],s,this.host.currentTime(),p.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||!m.includes(e.id??"")}}keyframeView(){const e=this.current;if(!e)return;const o=this.host.currentTime(),i=this.host.readingOf(e,o);return i?b.viewOf(e,o,i):void 0}render(){if(!this.messages)return;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}">${E.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 I({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!==""&&!m.includes(t)}),this.timeline=new C(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 k(this.element("body-parameters"),this.language,"body.",n),this.bodyForm.show(w.resolve(h.BODY,this.parameterTexts),new O(()=>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 k(this.element("body-key-parameters"),this.language,"bodyKey."),this.keyForm.show(w.resolve(h.KEYFRAME,this.parameterTexts),new O(()=>this.keyframeView(),(t,r)=>this.editView(t,p.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||m.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(...m.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=b.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(...m.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}),m.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 m.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.messages&&(!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,g=i.northM-Math.cos(i.azimuthDeg*n)*l*i.distanceM,M=Math.hypot(i.eastM-c,i.northM-g),v=a!==void 0?a*Math.cos(o*n):M;if(d.eastM=t(c+Math.sin(e*n)*v),d.northM=t(g+Math.cos(e*n)*v),!d.onGround){const f=T=>Math.max(-89,Math.min(89,T))*n;d.aboveGroundM=t(Math.max(0,i.aboveGroundM+v*(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=z.saysNothing(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{p as BodyEditor};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e={body:"Body",iD:"ID",name:"Name",standsForTheShapes:"Stands for the shapes",noShape:"No shape",partDrawnByTheWitness:"Part drawn by the witness",nodeOfTheModelE:"Node of the model, e.g. hull",atThePlayhead:"At the playhead",position:"Position",fromTheWitness:"From the witness",inTheWorld:"In the world",azimuth:"Azimuth",elevation:"Elevation",distance:"Distance",onTheGround:"On the ground",aboveTheGround:"Above the ground",width:"Width",length:"Length",height:"Height",heading:"Heading",pitch:"Pitch",roll:"Roll",colour:"Colour",albedo:"Albedo",lightOfItsOwn:"Light of its own",transparency:"Transparency",halo:"Halo"};export{e as bodyParameterTexts_en};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e={body:"Cuerpo",iD:"Identificador",name:"Nombre",standsForTheShapes:"Representa las formas",noShape:"Ninguna forma",partDrawnByTheWitness:"Parte dibujada por el testigo",nodeOfTheModelE:"Nodo del modelo, p. ej. hull",atThePlayhead:"En el instante actual",position:"Posición",fromTheWitness:"Desde el testigo",inTheWorld:"En el mundo",azimuth:"Acimut",elevation:"Elevación",distance:"Distancia",onTheGround:"En el suelo",aboveTheGround:"Sobre el suelo",width:"Ancho",length:"Largo",height:"Alto",heading:"Rumbo",pitch:"Cabeceo",roll:"Alabeo",colour:"Color",albedo:"Albedo",lightOfItsOwn:"Luz propia",transparency:"Transparencia",halo:"Halo"};export{e as bodyParameterTexts_es};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e={body:"Corps",iD:"Identifiant",name:"Nom",standsForTheShapes:"Représente les formes",noShape:"Aucune forme",partDrawnByTheWitness:"Partie dessinée par le témoin",nodeOfTheModelE:"Nœud du modèle, par ex. hull",atThePlayhead:"À l'instant courant",position:"Position",fromTheWitness:"Depuis le témoin",inTheWorld:"Dans le monde",azimuth:"Azimut",elevation:"Hauteur",distance:"Distance",onTheGround:"Au sol",aboveTheGround:"Au-dessus du sol",width:"Largeur",length:"Longueur",height:"Hauteur",heading:"Cap",pitch:"Tangage",roll:"Roulis",colour:"Couleur",albedo:"Albédo",lightOfItsOwn:"Lumière propre",transparency:"Transparence",halo:"Halo"};export{e as bodyParameterTexts_fr};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e={body:"Corpo",iD:"Identificativo",name:"Nome",standsForTheShapes:"Rappresenta le forme",noShape:"Nessuna forma",partDrawnByTheWitness:"Parte disegnata dal testimone",nodeOfTheModelE:"Nodo del modello, ad es. hull",atThePlayhead:"All'istante corrente",position:"Posizione",fromTheWitness:"Dal testimone",inTheWorld:"Nel mondo",azimuth:"Azimut",elevation:"Elevazione",distance:"Distanza",onTheGround:"A terra",aboveTheGround:"Sopra il suolo",width:"Larghezza",length:"Lunghezza",height:"Altezza",heading:"Rotta",pitch:"Beccheggio",roll:"Rollio",colour:"Colore",albedo:"Albedo",lightOfItsOwn:"Luce propria",transparency:"Trasparenza",halo:"Alone"};export{e as bodyParameterTexts_it};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e={event:"Event",accountOf:"Observation of",passagesHeading:"Reported in",interviewOf:"Interview of",untitledInterview:"Interview {n}",deleteInterviewQuestion:"Delete this interview from the case? Nothing is written until the case is saved.",untitledReading:"Reading {n}",eventsInTime:"Events · in the order of time",citedMoment:"Moment {k}, quoted in {title}: “{quote}”",backToInterview:"Back to the interview",openEvent:"Open",previousEvent:"Previous event",nextEvent:"Next event",kindReading:"Reading",readingsCount:"{n} reading(s)",untitledObservation:"Observation {n}",deleteRecording:"Delete this recording from the case",deleteReadingQuestion:"Delete this reading? Nothing is written until the case is saved.",deleteObservationQuestion:"Delete this observation from the case? Nothing is written until the case is saved.",deleteRefused:"This observation is interpreted by {n} reading(s): delete them first.",titleField:"Title of the interpretation",authorField:"Author",addTitle:"Add an event",kindField:"Type",kindObservation:"Observation",kindInterview:"Interview",witnessField:"Witness",mediumField:"Medium",interviewerField:"Interviewer",plainTitleField:"Title",sourceField:"Source",sourceBlank:"A blank recording",sourceFile:"An existing recording",observerField:"Witness",fileField:"File",loadFailed:"That recording could not be read.",isACase:"That is a case, not a recording.",ok:"OK",cancel:"Cancel",caseHeading:"Case",caseId:"ID",recordingId:"ID",idTaken:"Another recording of the case has this ID.",idInvalid:"An ID is made of letters, digits, hyphens and underscores, and starts with a letter or a digit.",idNeeded:"A reading names this recording by its ID: it cannot be left empty.",idDuplicated:"Two events of the case have the ID “{id}”: a reading that names it is ambiguous.",readingUnresolved:"A reading names “{id}”, which no event of the case has as its ID, nor any recording it lists.",caseTitle:"Title",caseTime:"When",eventsTab:"Events",fileTab:"File",importFile:"Load case file",inputFileFromFile:"from your disk",inputFileFromUrl:"from an address",inputFileModeHint:"Click to give it the other way: a file of yours, or an address",inputFileLoad:"Load",fileNotACase:"That file is not a case (it has no events).",formatVersionError:"This file states version {found} of its format; this UFO@home reads up to version {supported}. Open it with a newer UFO@home.",fileInvalid:"This text is not valid JSON yet, or not a case: the case keeps what it last understood.",fileLoading:"Loading the editor…",add:"Add",addHint:"Add an event",interpretationOf:"Interpretation of",colon:": ",quoted:"“{text}”",interpretationOfNone:"—",exportButton:"Save",exportTitle:"Save the case",exportAlso:"Also save the observations",addToCase:"Add to a case",unsavedChanges:"Changes not saved",discardQuestion:"Some changes are not saved yet. Load anyway and lose them?",discardTitle:"Unsaved changes",discardOk:"Load anyway",leaveQuestion:"Some changes are not saved yet. Leave anyway and lose them?",leaveOk:"Leave anyway"};export{e as caseEditorMessages_en};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e={keyLabel:"Claude API key",keySuspect:"This does not look like a Claude API key: they begin with sk-ant-",workspaceLabel:"Workspace ID",workspacePlaceholder:"only if your key spans several",workspaceHint:"Only for a key whose scope is the whole organisation. Simpler: leave this empty and create a key scoped to one workspace instead.",modelLabel:"Model",fableChoice:"Claude Fable 5.1 (most capable, dearer)",sonnetChoice:"Claude Sonnet 5.5 (cheaper)",haikuChoice:"Claude Haiku 4.5 (cheapest)"};export{e as claudeNarrativeTexts_en};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e={intro:"Weather records supply coverage and wind when available. Cloud shape, thickness and size are visual estimates; they are not measured individual clouds.",editScope:"Edit scope",scopeInstant:"Current time",scopeObservation:"Whole observation",layer:"Layer",addLayer:"Add layer",deleteLayer:"Delete layer",editHelp:"Edits pause playback and save at the current weather time. Empty layer wind fields inherit the general wind. Whole observation applies the edited property to every weather keyframe.",individualClouds:"Individual clouds",individualCloud:"Individual cloud",addIndividualCloud:"Add individual cloud",pointAtCloud:"Point at cloud",deleteCloud:"Delete cloud",manipulate:"Select and drag clouds in the sky",individualHelp:"Individual clouds remain present at 0% global coverage. Dragging changes position and altitude; numeric fields provide precise dimensions. Clouds follow their layer's wind.",none:"None",cloud:"Cloud",savedAcrossObservation:"Saved across the observation; winds preserved.",savedAtThisTime:"Weather saved at this time.",noCloudHere:"No individual cloud here.",cloudSelected:"Cloud selected. Drag to move it.",cloudAdded:" Individual cloud added, independent of global coverage.",emptyLayers:"No cloud layer"};export{e as cloudEditorMessages_en};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e={cloudLayer:"Cloud layer",cloudType:"Cloud type",unknown:"Unknown",base:"Base",thickness:"Thickness",coverage:"Coverage",cloudSize:"Cloud size",density:"Density",darkness:"Darkness",crystalAlignment:"Crystal alignment",layerWindDirection:"Layer wind direction",generalWind:"General wind",layerWindSpeed:"Layer wind speed",patternSeed:"Pattern seed",individualCloud:"Individual cloud",position:"Position",cloudBase:"Cloud base",cloudThickness:"Cloud thickness",cloudWidth:"Cloud width",cloudDepth:"Cloud depth",cloudRotation:"Cloud rotation",cloudDensity:"Cloud density",layerDarkness:"Layer darkness",cumulus:"Cumulus",stratus:"Stratus",stratocumulus:"Stratocumulus",cirrus:"Cirrus"};export{e as cloudParameterTexts_en};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e={cloudLayer:"Capa de nubes",cloudType:"Tipo de nube",unknown:"Desconocido",base:"Base",thickness:"Espesor",coverage:"Cobertura",cloudSize:"Tamaño de las nubes",density:"Densidad",darkness:"Oscuridad",crystalAlignment:"Alineación de los cristales",layerWindDirection:"Dirección del viento de la capa",generalWind:"Viento general",layerWindSpeed:"Velocidad del viento de la capa",patternSeed:"Semilla del patrón",individualCloud:"Nube individual",position:"Posición",cloudBase:"Base de la nube",cloudThickness:"Espesor de la nube",cloudWidth:"Anchura de la nube",cloudDepth:"Profundidad de la nube",cloudRotation:"Rotación de la nube",cloudDensity:"Densidad de la nube",layerDarkness:"Oscuridad de la capa",cumulus:"Cúmulo",stratus:"Estrato",stratocumulus:"Estratocúmulo",cirrus:"Cirro"};export{e as cloudParameterTexts_es};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e={cloudLayer:"Couche de nuages",cloudType:"Type de nuage",unknown:"Inconnu",base:"Base",thickness:"Épaisseur",coverage:"Couverture",cloudSize:"Taille des nuages",density:"Densité",darkness:"Obscurité",crystalAlignment:"Alignement des cristaux",layerWindDirection:"Direction du vent de la couche",generalWind:"Vent général",layerWindSpeed:"Vitesse du vent de la couche",patternSeed:"Graine du motif",individualCloud:"Nuage individuel",position:"Position",cloudBase:"Base du nuage",cloudThickness:"Épaisseur du nuage",cloudWidth:"Largeur du nuage",cloudDepth:"Profondeur du nuage",cloudRotation:"Rotation du nuage",cloudDensity:"Densité du nuage",layerDarkness:"Obscurité de la couche",cumulus:"Cumulus",stratus:"Stratus",stratocumulus:"Stratocumulus",cirrus:"Cirrus"};export{e as cloudParameterTexts_fr};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e={cloudLayer:"Strato di nuvole",cloudType:"Tipo di nuvola",unknown:"Sconosciuto",base:"Base",thickness:"Spessore",coverage:"Copertura",cloudSize:"Dimensione delle nuvole",density:"Densità",darkness:"Oscurità",crystalAlignment:"Allineamento dei cristalli",layerWindDirection:"Direzione del vento dello strato",generalWind:"Vento generale",layerWindSpeed:"Velocità del vento dello strato",patternSeed:"Seme del motivo",individualCloud:"Nuvola individuale",position:"Posizione",cloudBase:"Base della nuvola",cloudThickness:"Spessore della nuvola",cloudWidth:"Larghezza della nuvola",cloudDepth:"Profondità della nuvola",cloudRotation:"Rotazione della nuvola",cloudDensity:"Densità della nuvola",layerDarkness:"Oscurità dello strato",cumulus:"Cumulo",stratus:"Strato",stratocumulus:"Stratocumulo",cirrus:"Cirro"};export{e as cloudParameterTexts_it};
|
package/dist-embed-sighting-editor/{ContrailSystem-BQXLg_WA.js → ContrailSystem-rUmDVijn.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{a7 as m,am as F,an as I,aa as X,ao as D,ap as L}from"./rr0-sighting-editor.mjs";import{C as x}from"./ContrailGrowth-DwHS8If9.js";class h{static MAX_SEGMENTS=8e3;static MIN_PIXELS=2;static UNRESOLVED_CONTRAST=.5;static STATIONS=[0,.5,1,1.5,2.25];static VERTICES_PER_SEGMENT=12*(h.STATIONS.length-1);static ICE_ASYMMETRY=.75;static phase(t){const s=h.ICE_ASYMMETRY;return(1-s*s)/(1+s*s-2*s*t)**1.5}object;group=new m;trails=[];positions=new Float32Array(h.MAX_SEGMENTS*h.VERTICES_PER_SEGMENT*3);colors=new Float32Array(h.MAX_SEGMENTS*h.VERTICES_PER_SEGMENT*4);segments=0;constructor(){const t=new F;t.setAttribute("position",new I(this.positions,3)),t.setAttribute("color",new I(this.colors,4)),t.setDrawRange(0,0),this.object=new X(t,new D({vertexColors:!0,transparent:!0,depthWrite:!1,side:L})),this.object.frustumCulled=!1,this.object.name="contrails",this.group.name="contrails",this.group.add(this.object)}get segmentCount(){return this.segments}set(t){this.trails=t}update(t,s,c){let p=0;this.segments=0;for(const o of this.trails){const u=this.samplesOf(o,t,s),i=c(o.id);for(let a=0;a+1<u.length;a++){const n=u[a],M=u[a+1];if(!n.forms||!M.forms)continue;if(this.segments>=h.MAX_SEGMENTS)break;const d=this.pushSegment(p,n,M,o.spanM,i,s);d>p&&this.segments++,p=d}}const y=this.object.geometry;y.setDrawRange(0,p);for(const[o,u]of[["position",3],["color",4]]){const i=y.getAttribute(o);i.clearUpdateRanges(),p>0&&i.addUpdateRange(0,p*u),i.needsUpdate=!0}}samplesOf(t,s,c){const p=s-x.FORMATION_S*1e3,y=[],o=(n,M,d,T,l,N)=>({x:M+n.driftEastMs*l+c.origin.x,y:T,z:-(d+n.driftNorthMs*l)+c.origin.z,age:l,forms:N,point:n});let u=-1;t.points.forEach((n,M)=>{n.tMs>p||(u=M,y.push(o(n,n.eastM,n.northM,n.upM,(s-n.tMs)/1e3,n.forms)))});const i=t.points[u],a=t.points[u+1];if(i&&a){const n=(p-i.tMs)/(a.tMs-i.tMs),M=(d,T)=>d+(T-d)*n;y.push(o(i,M(i.eastM,a.eastM),M(i.northM,a.northM),M(i.upM,a.upM),x.FORMATION_S,i.forms&&a.forms))}return y}pushSegment(t,s,c,p,y,o){const u=e=>({persistent:e.point.persistent,lifetimeS:e.point.lifetimeS,spanM:p,shearPerS:e.point.shearPerS,saturatedForS:e.point.saturatedForS}),i=x.opacity(s.age,u(s)),a=x.opacity(c.age,u(c));if(i<=0&&a<=0)return t;const n={x:c.x-s.x,y:c.y-s.y,z:c.z-s.z};if(Math.hypot(n.x,n.y,n.z)<1e-6)return t;const M={x:(s.x+c.x)/2-o.eye.x,y:(s.y+c.y)/2-o.eye.y,z:(s.z+c.z)/2-o.eye.z},d=this.normalise(this.cross(n,M)),T=e=>{if(!o.sun)return y;const r={x:e.x-o.eye.x,y:e.y-o.eye.y,z:e.z-o.eye.z},E=h.phase((o.sun.x*r.x+o.sun.y*r.y+o.sun.z*r.z)/(Math.hypot(r.x,r.y,r.z)||1));return[y[0]*E,y[1]*E,y[2]*E]},l=(e,r)=>{const E=Math.hypot(e.x-o.eye.x,e.y-o.eye.y,e.z-o.eye.z),A=x.widthM(p,e.age,e.point.shearPerS),g=Math.max(A,h.MIN_PIXELS*o.pixelRad*E),z=r*(A/g)**h.UNRESOLVED_CONTRAST,S=x.profileExponent(e.age),G=h.STATIONS.map((j,P)=>P===h.STATIONS.length-1?0:z*Math.exp(-Math.LN2*j**S));return{half:g/2,profile:G,scattered:T(e)}},N=[{sample:s,...l(s,i)},{sample:c,...l(c,a)}],w=h.STATIONS.length-1,f=(e,r,E)=>{const A=h.STATIONS[r],g=e.half*A*E,z=t*3;this.positions[z]=e.sample.x+d.x*g,this.positions[z+1]=e.sample.y+d.y*g,this.positions[z+2]=e.sample.z+d.z*g;const S=t*4;this.colors[S]=e.scattered[0],this.colors[S+1]=e.scattered[1],this.colors[S+2]=e.scattered[2],this.colors[S+3]=e.profile[r],t++},[R,O]=N;for(const e of[-1,1])for(let r=0;r<w;r++)f(R,r+1,e),f(R,r,e),f(O,r+1,e),f(R,r,e),f(O,r,e),f(O,r+1,e);return t}cross(t,s){return{x:t.y*s.z-t.z*s.y,y:t.z*s.x-t.x*s.z,z:t.x*s.y-t.y*s.x}}normalise(t){const s=Math.hypot(t.x,t.y,t.z)||1;return{x:t.x/s,y:t.y/s,z:t.z/s}}dispose(){this.object.geometry.dispose(),this.object.material.dispose(),this.group.removeFromParent()}}export{h as ContrailSystem};
|
package/dist-embed-sighting-editor/{CoverageAssessor-D3HBwZuC.js → CoverageAssessor-cODG-YV9.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{aH as h}from"./rr0-sighting-editor.mjs";const l=[{id:"when",paths:["time"]},{id:"where",paths:["place.locations.*.lat","place.locations.*.lng","observerTrack.keyframes.*.pose.lat","observerTrack.keyframes.*.pose.lng"]},{id:"facing",paths:["observerTrack.keyframes.*.pose.headingDeg"]},{id:"apparent-size",paths:["timeline.keyframes.*.shapes.*.shape.angular.widthDeg","timeline.keyframes.*.shapes.*.shape.angular.heightDeg"]},{id:"sky-position",paths:["timeline.keyframes.*.shapes.*.shape.aim.azimuthDeg","timeline.keyframes.*.shapes.*.shape.aim.altitudeDeg"]},{id:"how-long",paths:["durationSeconds","endTime"]},{id:"appearance",paths:["timeline.keyframes.*.shapes.*.shape.kind","timeline.keyframes.*.shapes.*.shape.title","timeline.keyframes.*.shapes.*.shape.color","timeline.keyframes.*.shapes.*.shape.brightness"]},{id:"movement",paths:["timeline.keyframes.1.t","observerTrack.keyframes.1.t"]},{id:"sound",paths:["soundTrack.keyframes.*.sound.kind"]},{id:"conditions",paths:["weatherTrack.keyframes.*.weather.*","weather.*"]}],d=["assumed","derived","stated","measured"];class p{about="observer";async assess(a){const i=h(a,!0),s=l.map(e=>p.answer(e,i,a));return{score:s.filter(e=>e.basis==="stated").length/s.length,criteria:s}}static answer(a,i,s){const e=a.paths.flatMap(t=>p.resolve(t,i));if(e.length===0)return{id:a.id,paths:[]};const r=e.map(t=>p.basisAt(t,s)??"stated");return{id:a.id,basis:d.find(t=>r.includes(t)),paths:e}}static basisAt(a,i){const s=a.split(".");for(let e=s.length;e>0;e--){const r=i.provenance.at(s.slice(0,e).join("."))?.basis;if(r)return r}}static resolve(a,i){let s=[{path:[],value:i}];for(const e of a.split("."))s=s.flatMap(({path:r,value:t})=>{if(typeof t!="object"||t===null)return[];if(e!=="*"){const n=t[e];return n===void 0?[]:[{path:[...r,e],value:n}]}return Object.entries(t).filter(([,n])=>n!==void 0).map(([n,o])=>({path:[...r,n],value:o}))});return s.filter(({value:e})=>e!==null&&e!==""&&!(Array.isArray(e)&&e.length===0)).map(({path:e})=>e.join("."))}}export{p as CoverageAssessor};
|