@rr0/ufoathome 0.202.1 → 0.204.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist-embed-interview/InterviewMessages_en-Ikx6GjEd.js +3 -0
- package/dist-embed-interview/InterviewMessages_es-DKWWyrnb.js +3 -0
- package/dist-embed-interview/InterviewMessages_fr-DT0gXAKD.js +3 -0
- package/dist-embed-interview/InterviewMessages_it-CF_9MYPt.js +3 -0
- package/dist-embed-interview/rr0-interview.mjs +1 -1
- package/dist-embed-scene/ModuleSession-Bh6KaOGK.js +3 -0
- package/dist-embed-scene/SceneNames_en--zj8Tlec.js +1 -0
- package/dist-embed-scene/SceneNames_es-toWs7p7i.js +1 -0
- package/dist-embed-scene/SceneNames_fr-w4Xdplid.js +1 -0
- package/dist-embed-scene/SceneNames_it-Cwcscdx7.js +1 -0
- package/dist-embed-scene/rr0-scene.mjs +302 -302
- package/dist-embed-scene/sightingSchema-DoPVOlCB.js +1 -0
- package/dist-embed-sighting/{AdsbLolArchiveProvider-CsuxO9wl.js → AdsbLolArchiveProvider-BSewzrRe.js} +1 -1
- package/dist-embed-sighting/{AirshipEditor-DkDCkwGG.js → AirshipEditor-BiG7EYoB.js} +2 -2
- package/dist-embed-sighting/{AuroraEditor-C4tY9hXK.js → AuroraEditor-C1Y_zbNW.js} +1 -1
- package/dist-embed-sighting/{AuroraSimulation-C7LAHgWM.js → AuroraSimulation-B9GaDXC3.js} +2 -2
- package/dist-embed-sighting/{BallesterGuaspAssessor-BPaiHWd9.js → BallesterGuaspAssessor-BAXmW7XL.js} +1 -1
- package/dist-embed-sighting/BalloonEditor-D54CC7cn.js +24 -0
- package/dist-embed-sighting/{BeamEditor-DDzw-fB_.js → BeamEditor-SHXD10FH.js} +1 -1
- package/dist-embed-sighting/{BeamSystem-CsNwl_vM.js → BeamSystem-CP3J9Jgx.js} +1 -1
- package/dist-embed-sighting/{BirdEditor-BgNNcdhv.js → BirdEditor-BCit7Rs-.js} +1 -1
- package/dist-embed-sighting/{BirdFlock-DBgkxsxp.js → BirdFlock-DhsSOJTg.js} +1 -1
- package/dist-embed-sighting/{CaseReportExport-BtGCWD7H.js → CaseReportExport-CUy_3oyV.js} +2 -2
- package/dist-embed-sighting/{ContrailSystem-Di5w5IVi.js → ContrailSystem-70o5ynhD.js} +1 -1
- package/dist-embed-sighting/ControlPasses-DQMrWqA3.js +29 -0
- package/dist-embed-sighting/{CoverageAssessor-Cu9wP4ZB.js → CoverageAssessor-BdZ85Hmy.js} +1 -1
- package/dist-embed-sighting/{DroneEditor-5nuq52EG.js → DroneEditor-DwQsVj8U.js} +1 -1
- package/dist-embed-sighting/{DroneParameters-DHeJ7KyU.js → DroneParameters-91BBY10Y.js} +1 -1
- package/dist-embed-sighting/{Flightradar24Provider-p4a3_chL.js → Flightradar24Provider-NbfW-lDQ.js} +1 -1
- package/dist-embed-sighting/{GLTFLoader-fbsNsHlp.js → GLTFLoader-CTETHs7e.js} +1 -1
- package/dist-embed-sighting/GenerativeKitMessages-hgIQ_sST.js +1 -0
- package/dist-embed-sighting/{HeadlightSystem-Ce7sHylX.js → HeadlightSystem-ByKGq-30.js} +1 -1
- package/dist-embed-sighting/HvsMessages_en-BiLhEAxJ.js +1 -0
- package/dist-embed-sighting/HvsMessages_es-Cbj_6eFs.js +1 -0
- package/dist-embed-sighting/HvsMessages_fr-DkvE2qm1.js +1 -0
- package/dist-embed-sighting/HvsMessages_it-BIJ87Uyb.js +1 -0
- package/dist-embed-sighting/{HynekAssessor-DWDZGeLY.js → HynekAssessor-O1MFR79v.js} +1 -1
- package/dist-embed-sighting/InterviewMessages_en-Ikx6GjEd.js +3 -0
- package/dist-embed-sighting/InterviewMessages_es-DKWWyrnb.js +3 -0
- package/dist-embed-sighting/InterviewMessages_fr-DT0gXAKD.js +3 -0
- package/dist-embed-sighting/InterviewMessages_it-CF_9MYPt.js +3 -0
- package/dist-embed-sighting/LanternEditor-X0RgF4mn.js +24 -0
- package/dist-embed-sighting/{LaunchEditor-BGyLgkGS.js → LaunchEditor-oTKLz_5C.js} +1 -1
- package/dist-embed-sighting/{LaunchSimulation-DvexI06i.js → LaunchSimulation-ClRFO1uw.js} +1 -1
- package/dist-embed-sighting/ModuleSession-SivjhuIl.js +3 -0
- package/dist-embed-sighting/ModuleThree-TrytNggN.js +1 -0
- package/dist-embed-sighting/{NearestApproach-CONyx4c5.js → NearestApproach-BM7B5PuM.js} +1 -1
- package/dist-embed-sighting/{ParameterForm-DFHcolwG.js → ParameterForm-BghOJXLP.js} +1 -1
- package/dist-embed-sighting/{PoherAssessor-DI86qOCu.js → PoherAssessor-DZMtM2pW.js} +1 -1
- package/dist-embed-sighting/PoherMatrix-C2fcLqDH.js +1 -0
- package/dist-embed-sighting/PoherSelfCheck-PJvhaWFK.js +1 -0
- package/dist-embed-sighting/{RailwaySystem-DcJr9BY_.js → RailwaySystem-Dmx9y4gO.js} +1 -1
- package/dist-embed-sighting/ReadingCheckTexts_en-C5qzU8K7.js +1 -0
- package/dist-embed-sighting/ReadingCheckTexts_es-DdhtmSew.js +1 -0
- package/dist-embed-sighting/ReadingCheckTexts_fr-COtovvqc.js +1 -0
- package/dist-embed-sighting/ReadingCheckTexts_it-Bz32XGh6.js +1 -0
- package/dist-embed-sighting/{ReentryEditor-C6EJJf4l.js → ReentryEditor-DozmlO_l.js} +1 -1
- package/dist-embed-sighting/{ReentrySimulation-BFVBOWrm.js → ReentrySimulation-WXW1IU2E.js} +1 -1
- package/dist-embed-sighting/{ReferenceSystem-zTvTqp5y.js → ReferenceSystem-BD7gXBee.js} +1 -1
- package/dist-embed-sighting/{RoadMarkings-DvWjbrSf.js → RoadMarkings-Bp07bgso.js} +1 -1
- package/dist-embed-sighting/SceneNames_en-BarwWQKA.js +1 -0
- package/dist-embed-sighting/SceneNames_es-CEdDjAb4.js +1 -0
- package/dist-embed-sighting/SceneNames_fr-m5WHqg-1.js +1 -0
- package/dist-embed-sighting/SceneNames_it-D_H_iZnc.js +1 -0
- package/dist-embed-sighting/{SearchlightEditor-By5Z3ef7.js → SearchlightEditor-BGmKCBrG.js} +1 -1
- package/dist-embed-sighting/{SearchlightSystem-PEMBDW1s.js → SearchlightSystem-5FPRRIkH.js} +1 -1
- package/dist-embed-sighting/SightingMessages_en-DKFVZnDu.js +1 -0
- package/dist-embed-sighting/SightingMessages_es-DYQlWvm0.js +1 -0
- package/dist-embed-sighting/SightingMessages_fr-BygVDDY9.js +1 -0
- package/dist-embed-sighting/SightingMessages_it-BI7GnXPz.js +1 -0
- package/dist-embed-sighting/{SkyLantern-yYihsrun.js → SkyLantern-1Rqy6fNz.js} +1 -1
- package/dist-embed-sighting/{TraceSystem-1K0WblAK.js → TraceSystem-DDlP7sxl.js} +2 -2
- package/dist-embed-sighting/{UfoMessages_en-CwRXodRE.js → UfoMessages_en-DvUA0KYR.js} +1 -1
- package/dist-embed-sighting/{WaterSystem-1VlNXZnO.js → WaterSystem-Ik6QzyT_.js} +2 -2
- package/dist-embed-sighting/rr0-sighting.mjs +417 -353
- package/dist-embed-sighting/sightingSchema-DoPVOlCB.js +1 -0
- package/dist-embed-sighting/{trafficRuntime-BUvbWOcl.js → trafficRuntime-CjDwU1Lk.js} +1 -1
- package/dist-embed-sighting-editor/{AdsbLolArchiveProvider-Bz1OjSjY.js → AdsbLolArchiveProvider-CNMGHqqx.js} +1 -1
- package/dist-embed-sighting-editor/{AirshipEditor-BlJXyxlr.js → AirshipEditor-BVlkWwdL.js} +1 -1
- package/dist-embed-sighting-editor/{AirshipFlight-Cx40Y8JT.js → AirshipFlight-Cvl6xWPY.js} +1 -1
- package/dist-embed-sighting-editor/{Aurora-Ldk66p1A.js → Aurora-DOIRpjiG.js} +1 -1
- package/dist-embed-sighting-editor/{AuroraEditor-CGSomAFk.js → AuroraEditor-B0tCM7E7.js} +1 -1
- package/dist-embed-sighting-editor/{AuroraSimulation-vKcv2Hue.js → AuroraSimulation-CX7V0obh.js} +2 -2
- package/dist-embed-sighting-editor/{BallesterGuaspAssessor-CJyRqwvh.js → BallesterGuaspAssessor-DEJId5n8.js} +1 -1
- package/dist-embed-sighting-editor/{BalloonEditor-CgO4LaWn.js → BalloonEditor-Drb5evP5.js} +1 -1
- package/dist-embed-sighting-editor/{BalloonFlight-hLr_4TFU.js → BalloonFlight-CGXmDbNq.js} +1 -1
- package/dist-embed-sighting-editor/{BeamEditor-B8qreA3j.js → BeamEditor-DP2LNObR.js} +1 -1
- package/dist-embed-sighting-editor/{BeamSystem-D0hrju5J.js → BeamSystem-BCaOtm3H.js} +1 -1
- package/dist-embed-sighting-editor/{BirdEditor-BNzrfSqX.js → BirdEditor-CbYZcYyG.js} +1 -1
- package/dist-embed-sighting-editor/{BirdFlock-iSovVEZd.js → BirdFlock-Dv9Awhvf.js} +1 -1
- package/dist-embed-sighting-editor/CaseElement-CC4gimF1.js +132 -0
- package/dist-embed-sighting-editor/{CaseReportExport-Bv6FWPs2.js → CaseReportExport-DmvvH_GH.js} +1 -1
- package/dist-embed-sighting-editor/{ContrailSystem-D3tXAg2r.js → ContrailSystem-ChbOVWp-.js} +1 -1
- package/dist-embed-sighting-editor/{ControlPasses-CaVHMhEY.js → ControlPasses-Dgz_D6DL.js} +1 -1
- package/dist-embed-sighting-editor/{CoverageAssessor-CTfHqAd_.js → CoverageAssessor-CcVuVsG0.js} +1 -1
- package/dist-embed-sighting-editor/{DroneEditor-BFsArPKi.js → DroneEditor-D6k4gYj4.js} +1 -1
- package/dist-embed-sighting-editor/{DroneFlight-B96pVrY1.js → DroneFlight-D-MWhrXa.js} +1 -1
- package/dist-embed-sighting-editor/{DroneParameters-DW-enQUo.js → DroneParameters-CdQbwFKD.js} +1 -1
- package/dist-embed-sighting-editor/{Flightradar24Provider-CBGkjw03.js → Flightradar24Provider-D_eLiI9k.js} +1 -1
- package/dist-embed-sighting-editor/{GLTFLoader-CrRPu-Pt.js → GLTFLoader-BIk0ozTu.js} +1 -1
- package/dist-embed-sighting-editor/{HeadlightSystem-BmPfcHt1.js → HeadlightSystem-C9tLjvpO.js} +1 -1
- package/dist-embed-sighting-editor/HvsMessages_en-BiLhEAxJ.js +1 -0
- package/dist-embed-sighting-editor/HvsMessages_es-Cbj_6eFs.js +1 -0
- package/dist-embed-sighting-editor/HvsMessages_fr-DkvE2qm1.js +1 -0
- package/dist-embed-sighting-editor/HvsMessages_it-BIJ87Uyb.js +1 -0
- package/dist-embed-sighting-editor/{HynekAssessor-nBidt6QV.js → HynekAssessor-B4ej1xgG.js} +1 -1
- package/dist-embed-sighting-editor/{InterviewEditorElement-CQWfYlGL.js → InterviewEditorElement-Bo4OG2ig.js} +7 -7
- package/dist-embed-sighting-editor/InterviewMessages_en-Ikx6GjEd.js +3 -0
- package/dist-embed-sighting-editor/InterviewMessages_es-DKWWyrnb.js +3 -0
- package/dist-embed-sighting-editor/InterviewMessages_fr-DT0gXAKD.js +3 -0
- package/dist-embed-sighting-editor/InterviewMessages_it-CF_9MYPt.js +3 -0
- package/dist-embed-sighting-editor/{LanternEditor-CjQVFowY.js → LanternEditor-Hd-8kmET.js} +1 -1
- package/dist-embed-sighting-editor/{LaserBeam-BVc8Mvhr.js → LaserBeam-Ca2QUeCT.js} +1 -1
- package/dist-embed-sighting-editor/{LaunchEditor-Cz8Mzo4a.js → LaunchEditor-BykQEscN.js} +1 -1
- package/dist-embed-sighting-editor/{LaunchPlume-CvBhTPgN.js → LaunchPlume-Dos-OyTV.js} +1 -1
- package/dist-embed-sighting-editor/{LaunchSimulation-CkZIG-3P.js → LaunchSimulation-B0DgOoJM.js} +1 -1
- package/dist-embed-sighting-editor/{ModelSource-B153oeTu.js → ModelSource-szsl2QtY.js} +1 -1
- package/dist-embed-sighting-editor/{ModelThumbnails-BUL_OLFv.js → ModelThumbnails-dnCeD6UT.js} +1 -1
- package/dist-embed-sighting-editor/{ModelViewer-BzBLcY9s.js → ModelViewer-BNGSukqO.js} +1 -1
- package/dist-embed-sighting-editor/{ModuleConformance-CpMYkYgb.js → ModuleConformance-CEXxsL48.js} +2 -2
- package/dist-embed-sighting-editor/ModuleSession-DOhPD2XZ.js +3 -0
- package/dist-embed-sighting-editor/ModuleThree-BY0cNbGt.js +1 -0
- package/dist-embed-sighting-editor/ModulesPanelElement-DTnJICg0.js +26 -0
- package/dist-embed-sighting-editor/ModulesPanelMessages_en-CXQhQMyu.js +1 -0
- package/dist-embed-sighting-editor/ModulesPanelMessages_es-Bj-cT3f4.js +1 -0
- package/dist-embed-sighting-editor/ModulesPanelMessages_fr-B-eaMXQz.js +1 -0
- package/dist-embed-sighting-editor/ModulesPanelMessages_it-C3fS8UFN.js +1 -0
- package/dist-embed-sighting-editor/{NearestApproach-Bxo_N7a9.js → NearestApproach-jDpDx7cm.js} +1 -1
- package/dist-embed-sighting-editor/{PoherAssessor-CEVA26zd.js → PoherAssessor-yWlnEcoZ.js} +1 -1
- package/dist-embed-sighting-editor/{RailwaySystem-Ceb0_MVz.js → RailwaySystem-CAqOaX1c.js} +1 -1
- package/dist-embed-sighting-editor/ReadingCheckTexts_en-C5qzU8K7.js +1 -0
- package/dist-embed-sighting-editor/ReadingCheckTexts_es-DdhtmSew.js +1 -0
- package/dist-embed-sighting-editor/ReadingCheckTexts_fr-COtovvqc.js +1 -0
- package/dist-embed-sighting-editor/ReadingCheckTexts_it-Bz32XGh6.js +1 -0
- package/dist-embed-sighting-editor/{ReentryEditor-BWCK2g_s.js → ReentryEditor-CNLwoAIZ.js} +2 -2
- package/dist-embed-sighting-editor/{ReentrySimulation-B09JXMu5.js → ReentrySimulation-Q-8h8lRK.js} +1 -1
- package/dist-embed-sighting-editor/{ReferenceSystem-B15kw0uH.js → ReferenceSystem-B0tZDQ1-.js} +1 -1
- package/dist-embed-sighting-editor/SceneNames_en-CTJiUG-r.js +1 -0
- package/dist-embed-sighting-editor/SceneNames_es-DHZMjSqb.js +1 -0
- package/dist-embed-sighting-editor/SceneNames_fr-C36uyjbM.js +1 -0
- package/dist-embed-sighting-editor/SceneNames_it-BQJQm2rT.js +1 -0
- package/dist-embed-sighting-editor/{SearchlightEditor-BpwPOhJ6.js → SearchlightEditor-sQh92hx7.js} +1 -1
- package/dist-embed-sighting-editor/{SearchlightSystem-D7sdsRYn.js → SearchlightSystem-B_RPbGj4.js} +1 -1
- package/dist-embed-sighting-editor/SightingEditorMessages_en-V_dJYjNb.js +12 -0
- package/dist-embed-sighting-editor/SightingEditorMessages_es-DauDuhPa.js +12 -0
- package/dist-embed-sighting-editor/SightingEditorMessages_fr-zxTvQa2I.js +12 -0
- package/dist-embed-sighting-editor/SightingEditorMessages_it-vvaao68O.js +12 -0
- package/dist-embed-sighting-editor/SightingElement-BpYuBmJB.js +694 -0
- package/dist-embed-sighting-editor/{SightingFileEditor-Du3A9uZm.js → SightingFileEditor-tIOJTG_y.js} +1 -1
- package/dist-embed-sighting-editor/SightingLabels_en-dOsFjVRL.js +1 -0
- package/dist-embed-sighting-editor/SightingLabels_es-CKlP2BDO.js +1 -0
- package/{dist-embed-ufoathome/SightingLabels_fr-D69zENbW.js → dist-embed-sighting-editor/SightingLabels_fr-Cpkcf5_9.js} +1 -1
- package/{dist-embed-ufoathome/SightingLabels_it-COLZ2Qth.js → dist-embed-sighting-editor/SightingLabels_it-3127rMXm.js} +1 -1
- package/dist-embed-sighting-editor/{SightingMessages_en-CzICxNU3.js → SightingMessages_en-Drcr3k4V.js} +1 -1
- package/dist-embed-sighting-editor/{SightingMessages_es-CiVFZlgA.js → SightingMessages_es-BcaWM7Oy.js} +1 -1
- package/dist-embed-sighting-editor/{SightingMessages_fr-nopOVDa1.js → SightingMessages_fr-7IYuW095.js} +1 -1
- package/dist-embed-sighting-editor/{SightingMessages_it-Cu0nnPts.js → SightingMessages_it-BhDmZn6p.js} +1 -1
- package/dist-embed-sighting-editor/{SkyLantern-D6bru_e_.js → SkyLantern-Cj60Cn9B.js} +1 -1
- package/dist-embed-sighting-editor/{TraceSystem-Bv4kLpie.js → TraceSystem-BK0y5lRX.js} +2 -2
- package/dist-embed-sighting-editor/{WaterSystem-Bbk_RJKg.js → WaterSystem-DMeMEW3i.js} +2 -2
- package/dist-embed-sighting-editor/{caseSchema-BEJTs2Ld.js → caseSchema-Cukbjeex.js} +1 -1
- package/dist-embed-sighting-editor/rr0-sighting-editor.mjs +508 -439
- package/dist-embed-sighting-editor/sightingSchema-DoPVOlCB.js +1 -0
- package/dist-embed-sighting-editor/{trafficRuntime-Bu3my6S4.js → trafficRuntime-eGXY41n0.js} +1 -1
- package/dist-embed-ufoathome/{AdsbLolArchiveProvider-v1sSwhN1.js → AdsbLolArchiveProvider-Ck345V92.js} +1 -1
- package/dist-embed-ufoathome/{AirshipEditor-CBSrQM3J.js → AirshipEditor-EBfUtSiB.js} +1 -1
- package/dist-embed-ufoathome/{AirshipFlight-Dzpw8HRM.js → AirshipFlight-6yYGIRn8.js} +1 -1
- package/dist-embed-ufoathome/{Aurora-Dc4u2vEw.js → Aurora-CMORgA2p.js} +1 -1
- package/dist-embed-ufoathome/{AuroraEditor-CeLzRDPj.js → AuroraEditor-CDZgVOlI.js} +1 -1
- package/dist-embed-ufoathome/{AuroraSimulation-BT1CdWX5.js → AuroraSimulation-DqfSBul6.js} +1 -1
- package/dist-embed-ufoathome/{BallesterGuaspAssessor-CPW-Omah.js → BallesterGuaspAssessor-DUNQZ9e8.js} +1 -1
- package/dist-embed-ufoathome/{BalloonEditor-dCIjTsIz.js → BalloonEditor-Cx3fRab8.js} +2 -2
- package/dist-embed-ufoathome/{BalloonFlight-CztT6ddg.js → BalloonFlight-CvE7AHlm.js} +1 -1
- package/dist-embed-ufoathome/{BeamEditor-BS73mBZU.js → BeamEditor-gxTjO6Pr.js} +1 -1
- package/dist-embed-ufoathome/{BeamSystem-C5EpRhij.js → BeamSystem-C8jjTJtB.js} +1 -1
- package/dist-embed-ufoathome/{BirdEditor-Dk3huwHa.js → BirdEditor-CBVGyUnK.js} +1 -1
- package/dist-embed-ufoathome/{BodyEditor-BV8WwzAj.js → BodyEditor-DGaBo74A.js} +1 -1
- package/dist-embed-ufoathome/CaseEditorElement-BOp207Tr.js +3182 -0
- package/dist-embed-ufoathome/CaseElement-BGO5UZLP.js +132 -0
- package/dist-embed-ufoathome/{CaseReportExport-XLbFCkPg.js → CaseReportExport-6DFaJzfO.js} +3 -3
- package/dist-embed-ufoathome/ColumnResize-DnX89ynB.js +208 -0
- package/dist-embed-ufoathome/ConsentMessages_en-DBKCeDAn.js +1 -0
- package/dist-embed-ufoathome/ConsentMessages_es-Dby74lUq.js +1 -0
- package/dist-embed-ufoathome/ConsentMessages_fr-FGSpqzMc.js +1 -0
- package/dist-embed-ufoathome/ConsentMessages_it-BJWfXH6I.js +1 -0
- package/dist-embed-ufoathome/{ControlPasses-CKOU_3lG.js → ControlPasses-CeExr5X1.js} +1 -1
- package/dist-embed-ufoathome/{CoverageAssessor-BYMf3Qhv.js → CoverageAssessor-BbqRqh0C.js} +1 -1
- package/dist-embed-ufoathome/{DroneEditor-D60uhSHO.js → DroneEditor-7X9CM_3H.js} +1 -1
- package/dist-embed-ufoathome/{Flightradar24Provider-_QPbhh5s.js → Flightradar24Provider-MzQcuUHn.js} +1 -1
- package/dist-embed-ufoathome/{GLTFLoader-DQeHB-Bk.js → GLTFLoader-CPUffC65.js} +1 -1
- package/dist-embed-ufoathome/{GeoJsonExport-Pq_pPvjK.js → GeoJsonExport-D7QhWNRC.js} +1 -1
- package/dist-embed-ufoathome/{GeographicFigures-KII55iXE.js → GeographicFigures-BvEeCtxr.js} +1 -1
- package/dist-embed-ufoathome/HvsMessages_en-BiLhEAxJ.js +1 -0
- package/dist-embed-ufoathome/HvsMessages_es-Cbj_6eFs.js +1 -0
- package/dist-embed-ufoathome/HvsMessages_fr-DkvE2qm1.js +1 -0
- package/dist-embed-ufoathome/HvsMessages_it-BIJ87Uyb.js +1 -0
- package/dist-embed-ufoathome/HynekAssessor-BwjRkQWT.js +1 -0
- package/dist-embed-ufoathome/{InterviewEditorElement-BSwkegEp.js → InterviewEditorElement-CVCOicLD.js} +6 -6
- package/dist-embed-ufoathome/{InterviewElement-CfkDtybc.js → InterviewElement-ZI42DKRx.js} +2 -2
- package/dist-embed-ufoathome/InterviewMessages_en-Ikx6GjEd.js +3 -0
- package/dist-embed-ufoathome/InterviewMessages_es-DKWWyrnb.js +3 -0
- package/dist-embed-ufoathome/InterviewMessages_fr-DT0gXAKD.js +3 -0
- package/dist-embed-ufoathome/InterviewMessages_it-CF_9MYPt.js +3 -0
- package/dist-embed-ufoathome/{KmlExport-BMNwwys8.js → KmlExport-BX0nxAaA.js} +1 -1
- package/dist-embed-ufoathome/{LanternEditor-BapUZdog.js → LanternEditor-BROUv-vx.js} +1 -1
- package/dist-embed-ufoathome/{LaserBeam-B-tlAzNB.js → LaserBeam-ChD9aV-N.js} +1 -1
- package/dist-embed-ufoathome/LaunchEditor-CM2Wcjv2.js +22 -0
- package/dist-embed-ufoathome/{LaunchPlume-D-vSb8tJ.js → LaunchPlume-DeVRe05u.js} +1 -1
- package/dist-embed-ufoathome/{LaunchSimulation-CZ8Oba00.js → LaunchSimulation-RROdYccW.js} +1 -1
- package/dist-embed-ufoathome/{ModelSource-HSiigkeO.js → ModelSource-nXZ6eIH5.js} +1 -1
- package/dist-embed-ufoathome/{ModelThumbnails-DWvRMmj_.js → ModelThumbnails-CRSm49vm.js} +1 -1
- package/dist-embed-ufoathome/{ModelViewer-CM7qTW8F.js → ModelViewer-BQsl_Nfn.js} +1 -1
- package/dist-embed-ufoathome/ModuleSession-Dac4fD0X.js +3 -0
- package/dist-embed-ufoathome/ModulesPanelElement-BvzY1GUF.js +18 -0
- package/dist-embed-ufoathome/ModulesPanelMessages_en-Dir0ADQe.js +1 -0
- package/dist-embed-ufoathome/ModulesPanelMessages_es-B_ITNG5N.js +1 -0
- package/dist-embed-ufoathome/ModulesPanelMessages_fr-DbKLtD8s.js +1 -0
- package/dist-embed-ufoathome/ModulesPanelMessages_it-CE0q7D2c.js +1 -0
- package/dist-embed-ufoathome/{NearestApproach-PAsV5RlG.js → NearestApproach-DbUpe1iw.js} +1 -1
- package/dist-embed-ufoathome/{PoherAssessor-CniYlhUl.js → PoherAssessor-Dmro58tC.js} +1 -1
- package/dist-embed-ufoathome/PoherMatrix-C2fcLqDH.js +1 -0
- package/dist-embed-ufoathome/PoherSelfCheck-pcYj_hQ1.js +1 -0
- package/dist-embed-ufoathome/QuestionnaireFeed-DmyYcwwf.js +1 -0
- package/dist-embed-ufoathome/QuestionnaireForm-vT3C3qXt.js +1 -0
- package/dist-embed-ufoathome/QuestionnaireImport-BlTDOHWj.js +5 -0
- package/dist-embed-ufoathome/ReadingCheckTexts_en-C5qzU8K7.js +1 -0
- package/dist-embed-ufoathome/ReadingCheckTexts_es-DdhtmSew.js +1 -0
- package/dist-embed-ufoathome/ReadingCheckTexts_fr-COtovvqc.js +1 -0
- package/dist-embed-ufoathome/ReadingCheckTexts_it-Bz32XGh6.js +1 -0
- package/dist-embed-ufoathome/{ReentryEditor-Qax1sT82.js → ReentryEditor-Di0KzYeZ.js} +1 -1
- package/dist-embed-ufoathome/{ReentrySimulation-CTeCaxZl.js → ReentrySimulation-HhdlSVkR.js} +1 -1
- package/dist-embed-ufoathome/{ReferenceSystem-CM27OCUo.js → ReferenceSystem-B30-UBHY.js} +1 -1
- package/dist-embed-ufoathome/ScenarioReadings-EAUAsx9t.js +1 -0
- package/dist-embed-ufoathome/ScenarioSweep-jTxLjnaW.js +1 -0
- package/dist-embed-ufoathome/SceneNames_en-sRbx6EJZ.js +1 -0
- package/dist-embed-ufoathome/SceneNames_es-pnfHB-7D.js +1 -0
- package/dist-embed-ufoathome/SceneNames_fr-BtTlti4C.js +1 -0
- package/dist-embed-ufoathome/SceneNames_it-DQKwdCVD.js +1 -0
- package/dist-embed-ufoathome/{SearchlightEditor-PuLz84pp.js → SearchlightEditor-B6_BW8FD.js} +1 -1
- package/dist-embed-ufoathome/{SearchlightSystem-B-tHvY1M.js → SearchlightSystem-D_DTpDNC.js} +1 -1
- package/dist-embed-ufoathome/{ShareDialogElement-EzLob2Tz.js → ShareDialogElement-C0oFh0X4.js} +150 -132
- package/dist-embed-ufoathome/Sighting-BX_CmDY2.js +1 -0
- package/dist-embed-ufoathome/SightingEditorMessages_en-V_dJYjNb.js +12 -0
- package/dist-embed-ufoathome/SightingEditorMessages_es-DauDuhPa.js +12 -0
- package/dist-embed-ufoathome/SightingEditorMessages_fr-zxTvQa2I.js +12 -0
- package/dist-embed-ufoathome/SightingEditorMessages_it-vvaao68O.js +12 -0
- package/dist-embed-ufoathome/SightingElement-DzxTvvLN.js +694 -0
- package/dist-embed-ufoathome/{SightingFileEditor-DS1DRU2p.js → SightingFileEditor-D5_GwIsn.js} +1 -1
- package/dist-embed-ufoathome/SightingLabels_en-dOsFjVRL.js +1 -0
- package/dist-embed-ufoathome/SightingLabels_es-CKlP2BDO.js +1 -0
- package/{dist-embed-sighting-editor/SightingLabels_fr-D69zENbW.js → dist-embed-ufoathome/SightingLabels_fr-Cpkcf5_9.js} +1 -1
- package/{dist-embed-sighting-editor/SightingLabels_it-COLZ2Qth.js → dist-embed-ufoathome/SightingLabels_it-3127rMXm.js} +1 -1
- package/dist-embed-ufoathome/{SightingMessages_en-CzICxNU3.js → SightingMessages_en-Drcr3k4V.js} +1 -1
- package/dist-embed-ufoathome/{SightingMessages_es-CiVFZlgA.js → SightingMessages_es-BcaWM7Oy.js} +1 -1
- package/dist-embed-ufoathome/{SightingMessages_fr-nopOVDa1.js → SightingMessages_fr-7IYuW095.js} +1 -1
- package/dist-embed-ufoathome/{SightingMessages_it-Cu0nnPts.js → SightingMessages_it-BhDmZn6p.js} +1 -1
- package/dist-embed-ufoathome/{TraceSystem-8XQX03MS.js → TraceSystem-CiBRo1aU.js} +1 -1
- package/dist-embed-ufoathome/UfoAtHomeMessages_en-ByVu39KF.js +1 -0
- package/dist-embed-ufoathome/UfoAtHomeMessages_es-D9bLboxq.js +1 -0
- package/dist-embed-ufoathome/UfoAtHomeMessages_fr-nTqRf0ZK.js +1 -0
- package/dist-embed-ufoathome/UfoAtHomeMessages_it-4cZC5-y5.js +1 -0
- package/dist-embed-ufoathome/{VideoButton-WNtEngz-.js → VideoButton-BseBKx2r.js} +1 -1
- package/dist-embed-ufoathome/{caseSchema-BEJTs2Ld.js → caseSchema-Cukbjeex.js} +1 -1
- package/dist-embed-ufoathome/rr0-ufoathome.mjs +35 -17
- package/dist-embed-ufoathome/sightingSchema-DoPVOlCB.js +1 -0
- package/dist-embed-ufoathome/{surroundingsSources-UHKGesPa.js → surroundingsSources-BSh42KUu.js} +1 -1
- package/dist-embed-ufoathome/{trafficRuntime-CgY_7-NH.js → trafficRuntime-BMTtwn7o.js} +2 -2
- package/package.json +1 -1
- package/dist-embed-interview/InterviewMessages_en-BrnxG2rl.js +0 -3
- package/dist-embed-interview/InterviewMessages_es-Dxfjqrte.js +0 -3
- package/dist-embed-interview/InterviewMessages_fr-DIA-1qu8.js +0 -3
- package/dist-embed-interview/InterviewMessages_it-CYBEIKX-.js +0 -3
- package/dist-embed-scene/ModuleSession-bj7QHWjO.js +0 -3
- package/dist-embed-scene/SceneNames_en-BFJsR6Cc.js +0 -1
- package/dist-embed-scene/SceneNames_es-BHBTwcJ3.js +0 -1
- package/dist-embed-scene/SceneNames_fr-CFsA4XeK.js +0 -1
- package/dist-embed-scene/SceneNames_it-DkIgwviv.js +0 -1
- package/dist-embed-scene/sightingSchema-9MogCcUd.js +0 -1
- package/dist-embed-sighting/BalloonEditor-CaWwqWKK.js +0 -24
- package/dist-embed-sighting/ControlPasses-Dr6eP2Mq.js +0 -29
- package/dist-embed-sighting/GenerativeKitMessages-NbyGMKAR.js +0 -1
- package/dist-embed-sighting/InterviewMessages_en-BrnxG2rl.js +0 -3
- package/dist-embed-sighting/InterviewMessages_es-Dxfjqrte.js +0 -3
- package/dist-embed-sighting/InterviewMessages_fr-DIA-1qu8.js +0 -3
- package/dist-embed-sighting/InterviewMessages_it-CYBEIKX-.js +0 -3
- package/dist-embed-sighting/LanternEditor-Be5Io1J-.js +0 -24
- package/dist-embed-sighting/ModuleSession-DztK084a.js +0 -3
- package/dist-embed-sighting/ModuleThree-BLNSm2eY.js +0 -1
- package/dist-embed-sighting/ReadingCheckTexts_en-eq6teExJ.js +0 -1
- package/dist-embed-sighting/ReadingCheckTexts_es-CR_JJZMV.js +0 -1
- package/dist-embed-sighting/ReadingCheckTexts_fr-pcDleIvY.js +0 -1
- package/dist-embed-sighting/ReadingCheckTexts_it-MFKeoXnq.js +0 -1
- package/dist-embed-sighting/SceneNames_en-BlRTU7Hq.js +0 -1
- package/dist-embed-sighting/SceneNames_es-DMNd9trd.js +0 -1
- package/dist-embed-sighting/SceneNames_fr-DlMcv9D0.js +0 -1
- package/dist-embed-sighting/SceneNames_it-DqlWMlOE.js +0 -1
- package/dist-embed-sighting/SightingMessages_en-D3YVhgUj.js +0 -1
- package/dist-embed-sighting/SightingMessages_es-ME6FeTp-.js +0 -1
- package/dist-embed-sighting/SightingMessages_fr-BgXYuIq4.js +0 -1
- package/dist-embed-sighting/SightingMessages_it-DcE90eAl.js +0 -1
- package/dist-embed-sighting/sightingSchema-9MogCcUd.js +0 -1
- package/dist-embed-sighting-editor/CaseElement-D80gHg4r.js +0 -131
- package/dist-embed-sighting-editor/InterviewMessages_en-BrnxG2rl.js +0 -3
- package/dist-embed-sighting-editor/InterviewMessages_es-Dxfjqrte.js +0 -3
- package/dist-embed-sighting-editor/InterviewMessages_fr-DIA-1qu8.js +0 -3
- package/dist-embed-sighting-editor/InterviewMessages_it-CYBEIKX-.js +0 -3
- package/dist-embed-sighting-editor/ModuleSession-b_pmjUfP.js +0 -3
- package/dist-embed-sighting-editor/ModuleThree-B_FZVqsf.js +0 -1
- package/dist-embed-sighting-editor/ModulesPanelElement-D0gn9Z-y.js +0 -15
- package/dist-embed-sighting-editor/ModulesPanelMessages_en-DuwrY3Pm.js +0 -1
- package/dist-embed-sighting-editor/ModulesPanelMessages_es-Bq5X-XuT.js +0 -1
- package/dist-embed-sighting-editor/ModulesPanelMessages_fr-B8cSDc6o.js +0 -1
- package/dist-embed-sighting-editor/ModulesPanelMessages_it-BdC626aJ.js +0 -1
- package/dist-embed-sighting-editor/ReadingCheckTexts_en-eq6teExJ.js +0 -1
- package/dist-embed-sighting-editor/ReadingCheckTexts_es-CR_JJZMV.js +0 -1
- package/dist-embed-sighting-editor/ReadingCheckTexts_fr-pcDleIvY.js +0 -1
- package/dist-embed-sighting-editor/ReadingCheckTexts_it-MFKeoXnq.js +0 -1
- package/dist-embed-sighting-editor/SceneNames_en-c5zNw0Hi.js +0 -1
- package/dist-embed-sighting-editor/SceneNames_es-CDjoBwy_.js +0 -1
- package/dist-embed-sighting-editor/SceneNames_fr-CoZNmFu3.js +0 -1
- package/dist-embed-sighting-editor/SceneNames_it-CVEahBpq.js +0 -1
- package/dist-embed-sighting-editor/SightingEditorMessages_en-k7_ua2OM.js +0 -12
- package/dist-embed-sighting-editor/SightingEditorMessages_es-Drqbbr5_.js +0 -12
- package/dist-embed-sighting-editor/SightingEditorMessages_fr-B_K5hsuV.js +0 -12
- package/dist-embed-sighting-editor/SightingEditorMessages_it-QCLg1d7x.js +0 -12
- package/dist-embed-sighting-editor/SightingElement-Bp-t_EAF.js +0 -693
- package/dist-embed-sighting-editor/SightingLabels_en-oIpytoq_.js +0 -1
- package/dist-embed-sighting-editor/SightingLabels_es-DUh1CTXl.js +0 -1
- package/dist-embed-sighting-editor/angular-size-CxoysZle.png +0 -0
- package/dist-embed-sighting-editor/azimuth-CvjiPmz0.png +0 -0
- package/dist-embed-sighting-editor/elevation-DPr5S6Jt.png +0 -0
- package/dist-embed-sighting-editor/geipan-qt-2025-B_RUiH8B.js +0 -7
- package/dist-embed-sighting-editor/protractor-DyE30B87.png +0 -0
- package/dist-embed-sighting-editor/sightingSchema-9MogCcUd.js +0 -1
- package/dist-embed-ufoathome/CaseEditorElement-HR8RFluQ.js +0 -3175
- package/dist-embed-ufoathome/CaseElement-vCbCfGOv.js +0 -131
- package/dist-embed-ufoathome/ColumnResize-CEXrq3KB.js +0 -164
- package/dist-embed-ufoathome/HynekAssessor-wCDhgIB8.js +0 -1
- package/dist-embed-ufoathome/InterviewAttachments-BP6Prvdu.js +0 -1
- package/dist-embed-ufoathome/InterviewMessages_en-BrnxG2rl.js +0 -3
- package/dist-embed-ufoathome/InterviewMessages_es-Dxfjqrte.js +0 -3
- package/dist-embed-ufoathome/InterviewMessages_fr-DIA-1qu8.js +0 -3
- package/dist-embed-ufoathome/InterviewMessages_it-CYBEIKX-.js +0 -3
- package/dist-embed-ufoathome/LaunchEditor-Cy5D-gwU.js +0 -22
- package/dist-embed-ufoathome/ModuleSession-BKDWGSEo.js +0 -3
- package/dist-embed-ufoathome/ModulesPanelElement-DsOa2zH0.js +0 -15
- package/dist-embed-ufoathome/ModulesPanelMessages_en-DuwrY3Pm.js +0 -1
- package/dist-embed-ufoathome/ModulesPanelMessages_es-Bq5X-XuT.js +0 -1
- package/dist-embed-ufoathome/ModulesPanelMessages_fr-B8cSDc6o.js +0 -1
- package/dist-embed-ufoathome/ModulesPanelMessages_it-BdC626aJ.js +0 -1
- package/dist-embed-ufoathome/QuestionnaireFeed-CpZqkxlt.js +0 -1
- package/dist-embed-ufoathome/QuestionnaireForm-LkllpNx-.js +0 -1
- package/dist-embed-ufoathome/QuestionnaireImport-CNROmkT2.js +0 -5
- package/dist-embed-ufoathome/ReadingCheckTexts_en-eq6teExJ.js +0 -1
- package/dist-embed-ufoathome/ReadingCheckTexts_es-CR_JJZMV.js +0 -1
- package/dist-embed-ufoathome/ReadingCheckTexts_fr-pcDleIvY.js +0 -1
- package/dist-embed-ufoathome/ReadingCheckTexts_it-MFKeoXnq.js +0 -1
- package/dist-embed-ufoathome/ScenarioReadings-Is3HX0n0.js +0 -1
- package/dist-embed-ufoathome/ScenarioSweep-BbtX26Fi.js +0 -1
- package/dist-embed-ufoathome/SceneNames_en-7OZ7peGc.js +0 -1
- package/dist-embed-ufoathome/SceneNames_es-P5-Mavdi.js +0 -1
- package/dist-embed-ufoathome/SceneNames_fr-qzw0QzD0.js +0 -1
- package/dist-embed-ufoathome/SceneNames_it-Sqf8JFOd.js +0 -1
- package/dist-embed-ufoathome/Sighting-B7bsiTIQ.js +0 -1
- package/dist-embed-ufoathome/SightingEditorMessages_en-k7_ua2OM.js +0 -12
- package/dist-embed-ufoathome/SightingEditorMessages_es-Drqbbr5_.js +0 -12
- package/dist-embed-ufoathome/SightingEditorMessages_fr-B_K5hsuV.js +0 -12
- package/dist-embed-ufoathome/SightingEditorMessages_it-QCLg1d7x.js +0 -12
- package/dist-embed-ufoathome/SightingElement--qpGoyxL.js +0 -693
- package/dist-embed-ufoathome/SightingLabels_en-oIpytoq_.js +0 -1
- package/dist-embed-ufoathome/SightingLabels_es-DUh1CTXl.js +0 -1
- package/dist-embed-ufoathome/UfoAtHomeMessages_en-BK2qJyZN.js +0 -1
- package/dist-embed-ufoathome/UfoAtHomeMessages_es-B1-NDCau.js +0 -1
- package/dist-embed-ufoathome/UfoAtHomeMessages_fr-BTG047qo.js +0 -1
- package/dist-embed-ufoathome/UfoAtHomeMessages_it-Ryxv4HNU.js +0 -1
- package/dist-embed-ufoathome/angular-size-CxoysZle.png +0 -0
- package/dist-embed-ufoathome/azimuth-CvjiPmz0.png +0 -0
- package/dist-embed-ufoathome/elevation-DPr5S6Jt.png +0 -0
- package/dist-embed-ufoathome/geipan-qt-2025-B_RUiH8B.js +0 -7
- package/dist-embed-ufoathome/protractor-DyE30B87.png +0 -0
- package/dist-embed-ufoathome/sightingSchema-9MogCcUd.js +0 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{A as et,c as A,L as vt,T as Z,R as j,d as N,e as Rt,M as st,D as V,f as it,r as Bt,l as at,O as ot}from"./rr0-sighting.mjs";import{C as rt}from"./ContrailGrowth-DwHS8If9.js";const Nt=.25,ct=.4,lt=6,$=12,Ct=3,ht=.2,_t=.2,ut=24,wt=3,Ht=24,dt=1,yt=.7,Pt=1.5,kt=.8,Lt=1.3,pt=.02,Ft=700,jt=-30,mt=.9,Mt=5,Gt=25,Ut=.5,Kt=.12,gt=[.13,.31],zt=.16,Wt=1.6,Vt=2,$t=3.6,At=1.1,Xt=.3,Yt=1e3,bt=.7,qt=.7;class X{context;constructor(t){this.context=t}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}}et.isLive(this.context)&&et.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);et.isLive(this.context)&&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 r=t.createGain(),i=e.character?.modulationDepth??0;r.gain.value=1-i/2;const o=t.createOscillator();o.type="sine";const l=t.createGain();l.gain.value=i/2,o.connect(l).connect(r.gain),r.connect(a);const c=t.createBufferSource();c.buffer=this.noise(t),c.loop=!0,c.loopStart=Math.random()*lt*.5;const u=[],d=[],h=[];for(const D of A.OCTAVES){const I=t.createBiquadFilter();I.type="bandpass",I.frequency.value=D,I.Q.value=dt;const w=t.createBiquadFilter();w.type="bandpass",w.frequency.value=D,w.Q.value=dt;const P=t.createGain();P.gain.value=0,c.connect(I).connect(w).connect(P).connect(r),u.push(I),d.push(w),h.push(P)}const p=[];for(const[D,I]of[[e.character?.toneHz,e.character?.toneShare],[e.character?.humHz,e.character?.humShare]])if(D!==void 0)for(let w=1;w<=wt;w++){const P=t.createOscillator();P.type="sine",P.frequency.value=D*w;const tt=t.createGain();tt.gain.value=0,P.connect(tt).connect(a),p.push({oscillator:P,gain:tt,harmonic:w,baseHz:D,share:I??0})}const m=t.createGain();m.gain.value=0,m.connect(a.gain);const f=gt.map(D=>{const I=t.createOscillator();return I.type="sine",I.frequency.value=D,I.connect(m),I}),O=t.createGain();O.gain.value=e.character?.roughness??ht;const v=t.createBufferSource();v.buffer=this.roughTable(t,Ct),v.loop=!0,v.loopStart=Math.random()*$*.5,v.connect(O).connect(r.gain);const B=t.createGain();B.gain.value=(e.character?.roughness??ht)*_t;const S=t.createBufferSource();S.buffer=this.roughTable(t,ut),S.loop=!0,S.loopStart=Math.random()*$*.5,S.connect(B).connect(r.gain);let F;const J=this.busOf(t)&&this.reverb;J&&(F=t.createGain(),F.gain.value=0,a.connect(F).connect(J));let L,_;if(!e.inside&&typeof t.createDelay=="function"){const D=t.createDelay(pt);D.delayTime.value=0;const I=t.createBiquadFilter();I.type="highshelf",I.frequency.value=Ft,I.gain.value=0;const w=t.createGain();w.gain.value=0,a.connect(D).connect(I).connect(w).connect(n??s);const P=t.createGain();P.gain.value=0,_=t.createBufferSource(),_.buffer=this.roughTable(t,ut),_.loop=!0,_.loopStart=Math.random()*$*.5,_.connect(P).connect(D.delayTime),L={delay:D,jitter:P,shelf:I,gain:w}}const k=[c,v,S,o,...p.map(D=>D.oscillator),...f,..._?[_]:[]];for(const D of k)D.start();const x={nodes:[a,r,l,O,B,m,...L?[L.delay,L.jitter,L.shelf,L.gain]:[],...p.map(D=>D.gain),...u,...d,...h,...F?[F]:[],...n?[n]:[],...k],sources:k,filters:u,seconds:d,gains:h,tones:p,lfo:o,lfoDepth:l,wander:f,wanderDepth:m,roughDepth:O,crackleDepth:B,beat:r,output:a,panner:n,send:F,echo:L};return this.voices.set(e.id,x),x}retarget(t,e,a){const n=t.currentTime,s=(p,m)=>p.setTargetAtTime(m,n,Nt),r=Math.min(Pt,Math.max(yt,a.dopplerRatio)),i=Math.min(Lt,Math.max(kt,Math.sqrt(a.dopplerRatio))),o=t.sampleRate*.45,l=a.bandAmplitudes.map((p,m)=>p*X.unweighting(A.OCTAVES[m])),c=Math.sqrt(l.reduce((p,m)=>p+m*m,0)),u=Math.min(1,Math.max(0,(a.distanceKm-Mt)/(Gt-Mt)));A.OCTAVES.forEach((p,m)=>{s(e.filters[m].frequency,Math.min(o,p*i)),s(e.seconds[m].frequency,Math.min(o,p*i)),s(e.gains[m].gain,l[m]*Math.sqrt(Yt/p))});const d=a.character;for(const{oscillator:p,gain:m,harmonic:f,baseHz:O,share:v}of e.tones){const B=O*f;s(p.frequency,B*r);const S=B*r;s(m.gain,S<o?v*zt*l[X.bandOf(S)]/f:0)}d?.modulationHz!==void 0&&s(e.lfo.frequency,d.modulationHz*r);const h=c>0?X.saturated(c)/c:1;if(s(e.output.gain,h*(1-Xt*u)),s(e.wanderDepth.gain,h*Kt*u/gt.length),e.send&&s(e.send.gain,X.reverbSend(a.distanceKm)),e.echo){const p=a.groundEcho;s(e.echo.gain.gain,p?.lowGain??0),p&&(s(e.echo.delay.delayTime,Math.min(pt,p.delayS)),s(e.echo.jitter.gain,p.jitterS),s(e.echo.shelf.gain,p.lowGain>0?Math.max(jt,20*Math.log10(Math.max(p.highGain,1e-6)/p.lowGain)):0))}if(e.panner){const p=(a.azimuthDeg-this.headingDeg)*Math.PI/180,m=a.inside?0:Math.max(-mt,Math.min(mt,Math.sin(p)))*(1-Ut*u);s(e.panner.pan,m)}}static saturated(t){const e=qt*bt;if(t<=e)return t;const a=bt-e;return e+a*(1-Math.exp(-(t-e)/a))}static reverbSend(t){return Math.min(Wt,Math.sqrt(Math.max(0,t)/Vt))}static unweighting(t){return 10**(Math.min(Ht,Math.max(0,-A.aWeightingDb(t)))/20)}static bandOf(t){let e=0;return A.OCTAVES.forEach((a,n)=>{Math.abs(Math.log(t/a))<Math.abs(Math.log(t/A.OCTAVES[e]))&&(e=n)}),e}roughTable(t,e){const a=this.roughBuffers.get(e);if(a)return a;const n=Math.floor(t.sampleRate*$),s=t.createBuffer(1,n,t.sampleRate),r=s.getChannelData(0),i=Array.from({length:$*e},()=>(Math.random()*2-1)**3),o=t.sampleRate/e;for(let l=0;l<r.length;l++){const c=l/o,u=Math.floor(c),d=c-u,h=d*d*(3-2*d);r[l]=i[u%i.length]*(1-h)+i[(u+1)%i.length]*h}return this.roughBuffers.set(e,s),s}roomImpulse(t){const e=Math.floor(t.sampleRate*$t),a=t.createBuffer(2,e,t.sampleRate);for(let n=0;n<2;n++){const s=a.getChannelData(n);let r=0;for(let i=0;i<e;i++){const o=i/t.sampleRate,l=.6*Math.exp(-o/(At*2))+.04;r+=l*(Math.random()*2-1-r),s[i]=r*Math.exp(-o/At)}}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,ct/3),setTimeout(()=>{for(const n of e.sources)try{n.stop()}catch{}for(const n of e.nodes)n.disconnect()},ct*1e3*3))}noise(t){if(this.noiseBuffer)return this.noiseBuffer;const e=t.createBuffer(1,t.sampleRate*lt,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 U{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],CONC:["Concorde","airliner-supersonic",25.6,61.7],DC3:["Douglas DC-3","piston-heavy",29,19.7],DC4:["Douglas DC-4","piston-heavy",35.8,28.6],P51:["North American P-51 Mustang","piston-heavy",11.3,9.8],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?U.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?U.CATEGORIES[t.category]:void 0;return n?{name:n[0],kind:n[1],spanM:n[2],lengthM:n[3],basis:"category"}:{...U.GENERIC}}static isHelicopter(t){return t.kind.startsWith("helicopter")}}class C{static DUSK_SUN_ELEVATION_DEG=-.83;static ALWAYS=new Set(["airliner-narrow","airliner-wide","airliner-supersonic","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 LANDING_LIGHTS_BELOW_FT=1e4;static LANDING_INTENSITY=600;static LANDING_BEAM_DEG=10;static LANDING_COLOR="#fff1dc";static LANDING_BRIGHTNESS={"airliner-narrow":1,"airliner-wide":1,"airliner-supersonic":1,"regional-jet":.6,"regional-turboprop":.6,"business-jet":.4,"turboprop-light":.2,"light-piston":.1,ultralight:.05,"helicopter-light":.1,"helicopter-medium":.2,"helicopter-heavy":.2};static lampsOn(t,e){if(C.NONE.has(t))return{navigation:!1,beacon:!1,strobes:!1};if(C.ALWAYS.has(t))return{navigation:!0,beacon:!0,strobes:!0};const a=e<C.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=C.lampsOn(t.kind,e),n=t.kind.startsWith("helicopter"),s=vt.find(h=>h.id===(n?"helicopter":"airliner")).create(),[r,i]=n?[5,7]:[17,18],o=t.spanM/2/r,l=t.lengthM/2/i,[c,u,d]=C.BRIGHTNESS[t.kind]??[1,1,1];return s.filter(h=>h.id.startsWith("nav")?a.navigation:h.id.startsWith("strobe")?a.strobes:h.id.startsWith("beacon")?a.beacon:!0).filter(h=>!(h.id.startsWith("beacon")&&!a.beacon)).map(h=>{const p=h.id.startsWith("nav")?c:h.id.startsWith("strobe")?u:d;return{...h,offsetM:{x:h.offsetM.x*o,y:h.offsetM.y,z:h.offsetM.z*l},intensity:(h.intensity??1)*p}}).filter(h=>(h.intensity??1)>0)}static landingLights(t,e,a){const n=C.LANDING_BRIGHTNESS[t.kind]??0;if(n===0||!C.lampsOn(t.kind,e).navigation)return[];const s=c=>c<C.LANDING_LIGHTS_BELOW_FT;if(!a.some(c=>s(c.altitudeFt)))return[];const r=C.LANDING_INTENSITY*n,i=a.flatMap((c,u)=>u>0&&s(c.altitudeFt)!==s(a[u-1].altitudeFt)?[{t:c.t,intensity:s(c.altitudeFt)?r:0}]:[]),o=t.spanM/34,l=t.lengthM/36;return[-1,1].map(c=>({id:c<0?"landing-left":"landing-right",offsetM:{x:c*5*o,y:-1,z:3*l},color:C.LANDING_COLOR,intensity:s(a[0].altitudeFt)?r:0,pattern:{kind:"steady"},beamDeg:C.LANDING_BEAM_DEG,keyframes:i}))}static bodyColor(t){return t.kind==="military-jet"?"#8a8e94":t.kind.startsWith("helicopter")?"#c8ccd1":t.kind==="unmanned"?"#2c2e33":"#dde0e4"}}class q{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(q.FAMILIES).flatMap(([t,e])=>e.map(a=>[a,t])));static idOf(t){return t?q.BY_TYPE.get(t.toUpperCase()):void 0}}class T{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=T.MAX_OBJECTS,s={}){return new Jt(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*T.HEIGHT_OVER_LENGTH}}static offsetOf(t,e){const a=j.seenFrom(t,{lat:e.lat,lng:e.lng,heightM:e.altitudeFt*T.FT_TO_M}),n=a.distanceKm*1e3,s=n*Math.cos(a.altitudeDeg*T.DEG);return{eastM:s*Math.sin(a.azimuthDeg*T.DEG),northM:s*Math.cos(a.azimuthDeg*T.DEG),upM:n*Math.sin(a.altitudeDeg*T.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>N.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)/T.DEG+360)%360}}class Jt{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=T.keyOf(a),s=this.options.models?.get(n)??U.of(void 0);T.segments(a).forEach((r,i)=>{const o=r.map(h=>({point:h,at:T.offsetOf(this.observer,h)}));if(!o.some(h=>h.at.altitudeDeg>=0))return;const l=o.map((h,p)=>({t:h.point.t-this.startMs,eastM:h.at.eastM,northM:h.at.northM,altitudeM:h.at.upM,headingDeg:h.point.trackDeg??(p+1<o.length?T.bearingDeg(h.at,o[p+1].at):T.bearingDeg(o[p-1].at,h.at))})),c=T.idOf(a,i),u=o[Math.floor(o.length/2)].point,d=this.options.sunElevationAt?.(u)??90;t.push({object:{id:c,kind:"aircraft",eastM:l[0].eastM,northM:l[0].northM,headingDeg:l[0].headingDeg,sizeM:T.sizeOf(s),model:q.idOf(s.code)?{id:q.idOf(s.code)}:void 0,color:C.bodyColor(s),lights:[...C.lights(s,d),...C.landingLights(s,d,r.map(h=>({t:h.t-this.startMs,altitudeFt:h.altitudeFt})))],track:l},presence:{fromMs:l[0].t,untilMs:l[l.length-1].t},flight:{icao:a.icao,nonIcao:a.nonIcao,points:r},closestKm:Math.min(...o.map(h=>h.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 xt=[[20,0],[120,0],[130,1.5],[140,4],[150,7.5],[160,7.5]],Zt=[[20,1.5],[40,1],[60,1],[80,0],[120,0],[130,1],[140,1],[150,-3],[160,-6.5],[170,-12]],ft=.16,Qt=1,te=[[0,-2],[10,-1],[20,0],[40,0],[50,-2],[60,-4.5],[70,-7.5],[80,-11],[90,-15],[100,-19.5],[110,-25]],ee=[[60,-15.8],[70,-11.5],[80,-8],[90,-5],[100,-2.7],[110,-1.2],[120,-.3],[130,0],[140,-2],[150,-6],[160,-10],[170,-15],[180,-20]],ae=1.5,Et=-40,ne=1.5,se={takeoff:{jetMps:300,flightMps:80,jetShare:[1,1,.9,.6,.3,.1,0,0]},overflight:{jetMps:280,flightMps:130,jetShare:[1,1,.9,.6,.3,.1,0,0]},approach:{jetMps:180,flightMps:70,jetShare:[.6,.5,.4,.2,.1,0,0,0]}};class H{static bandsDb(t,e,a=340){const n=se[e],s=H.fan(t)-H.fan(90),r=.62*Math.max(0,n.jetMps-n.flightMps)/a,i=-30*Math.log10(1+r/(1+r**5)**.2*Math.cos(t*Math.PI/180));return A.OCTAVES.map((o,l)=>{const c=i+H.jetRemainder(t,o*ne/n.jetMps),u=n.jetShare[l];return 10*Math.log10(u*10**(c/10)+(1-u)*10**(s/10))})}static loudestDb(t){const e=H.loudest.get(t);if(e)return e;const a=A.OCTAVES.map(()=>-1/0);for(let n=0;n<=180;n+=5)H.bandsDb(n,t).forEach((s,r)=>a[r]=Math.max(a[r],s));return H.loudest.set(t,a),a}static loudest=new Map;static angleDeg(t,e){const a=t.reduce((s,r,i)=>s+r*e[i],0),n=Math.hypot(...t)*Math.hypot(...e);return n===0?90:Math.acos(Math.min(1,Math.max(-1,a/n)))*180/Math.PI}static fan(t){const e=H.read(te,t,!0),a=H.read(ee,t,!0)+ae;return 10*Math.log10(10**(e/10)+10**(a/10))}static jetRemainder(t,e){const a=Math.min(1,Math.max(0,Math.log(e/ft)/Math.log(Qt/ft)));return(1-a)*H.read(xt,t)+a*H.read(Zt,t)}static read(t,e,a=!1){const[n,s]=[t[0],t[1]],[r,i]=[t[t.length-2],t[t.length-1]];if(e<=n[0])return a?Math.max(Et,n[1]+(s[1]-n[1])/(s[0]-n[0])*(e-n[0])):n[1];if(e>=i[0])return a?Math.max(Et,i[1]+(i[1]-r[1])/(i[0]-r[0])*(e-i[0])):i[1];for(let o=1;o<t.length;o++){const[l,c]=[t[o-1],t[o]];if(e<=c[0])return l[1]+(c[1]-l[1])*(e-l[0])/(c[0]-l[0])}return i[1]}}class g{static GRASS={flowResistivityKPa:200,earHeightM:1.6};static COHERENCE=.4;static JITTER_S=1e-4;static ECHO_UNDER_S=5e-4;static ECHO_FROM_S=.0015;static LOW_HZ=125;static HIGH_HZ=2e3;static AIR_DENSITY=1.2;static reflection(t,e,a=g.GRASS){const[n,s]=g.impedance(t,a);return g.reflected(n,s,Math.sin(Math.max(0,e)*Math.PI/180))}static impedance(t,e=g.GRASS){const a=g.AIR_DENSITY*t/(e.flowResistivityKPa*1e3);return[1+.0571*a**-.754,-.087*a**-.732]}static reflected(t,e,a){const[n,s,r,i]=[t*a-1,e*a,t*a+1,e*a],o=r*r+i*i;return{re:(n*r+s*i)/o,im:(s*r-n*i)/o}}static delayS(t,e=g.GRASS,a=340){return 2*e.earHeightM*Math.sin(Math.max(0,t)*Math.PI/180)/a}static excessDb(t,e=g.GRASS,a=340){const n=`${e.flowResistivityKPa}|${e.earHeightM}|${a}`;let s=g.overheads.get(n);return s||g.overheads.set(n,s=g.bandsDb(90,e,a)),g.bandsDb(t,e,a).map((r,i)=>r-s[i])}static echo(t,e=g.GRASS,a=340){const n=g.delayS(t,e,a);if(n<=g.ECHO_UNDER_S)return;const s=Math.min(1,(n-g.ECHO_UNDER_S)/(g.ECHO_FROM_S-g.ECHO_UNDER_S)),r=s*s*(3-2*s),i=o=>{const l=g.reflection(o,t,e);return r*g.COHERENCE*Math.hypot(l.re,l.im)};return{delayS:n,lowGain:i(g.LOW_HZ),highGain:i(g.HIGH_HZ),jitterS:g.JITTER_S}}static overheads=new Map;static thirds=A.OCTAVES.map(t=>[-1,0,1].map(e=>{const a=t*2**(e/3);return{middle:a,from:a*2**(-1/6),to:a*2**(1/6)}}));static impedances=new Map;static bandsDb(t,e,a){const n=g.delayS(t,e,a),s=g.COHERENCE,r=Math.sin(Math.max(0,t)*Math.PI/180);let i=g.impedances.get(e.flowResistivityKPa);return i||g.impedances.set(e.flowResistivityKPa,i=g.thirds.map(o=>o.map(l=>g.impedance(l.middle,e)))),g.thirds.map((o,l)=>{let c=0;return o.forEach((u,d)=>{const h=g.reflected(i[l][d][0],i[l][d][1],r),p=2*Math.PI*n*(u.to-u.from),[m,f]=p<1e-9?[1,0]:[(Math.sin(2*Math.PI*u.to*n)-Math.sin(2*Math.PI*u.from*n))/p,(Math.cos(2*Math.PI*u.from*n)-Math.cos(2*Math.PI*u.to*n))/p];c+=1+h.re*h.re+h.im*h.im+2*s*(h.re*m+h.im*f)}),10*Math.log10(c/o.length)})}}const Y={takeoff:{shapeDb:[10,3,-3,-2,-2,-2,5,4],levelDb:0},approach:{shapeDb:[0,0,0,0,0,0,0,0],levelDb:-8}},ie={takeoff:{shapeDb:[0,0,0,0,0,0,0,0],levelDb:0},approach:{shapeDb:[0,0,0,0,0,0,0,0],levelDb:-8}},Tt=[{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},regimes:Y},{id:"turbojet-supersonic",name:"Supersonic turbojet airliner",kinds:["airliner-supersonic"],totalDbA:169.5,shapeDb:[-22,-13,-9,-6,-6,-9,-15,-25],character:{humHz:100,humShare:.7},regimes:ie},{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},regimes:Y},{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},regimes:Y},{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},regimes:Y},{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:[-20,-10,-3,-6,-10,-20,-27,-42],character:{toneHz:80,toneShare:.4,modulationHz:80,modulationDepth:.4}},{id:"piston-heavy",name:"Heavy piston aircraft",kinds:["piston-heavy"],totalDbA:140,shapeDb:[-31,-12,-11,-9,-7,-6,-7,-11],character:{toneHz:84,toneShare:.4,modulationHz:84,modulationDepth:.36}},{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}}],St=(b,t)=>b.map(e=>e+t-A.sumDb(b));function oe(b,t){if(!b)return;const e=t.toneRatio??1,a=t.toneGain??1;return{...b,...b.toneHz!==void 0?{toneHz:b.toneHz*e,toneShare:Math.min(1,(b.toneShare??0)*a)}:{},...b.humHz!==void 0?{humHz:b.humHz*e,humShare:Math.min(1,(b.humShare??0)*a)}:{}}}const Dt=Tt.map(b=>{const t=b.regimes===Y?"turbofan":void 0,e={id:b.id,name:b.name,soundPowerA:St(b.shapeDb,b.totalDbA),character:b.character,directivity:t};if(!b.regimes)return e;const a={overflight:e};for(const[n,s]of Object.entries(b.regimes))a[n]={id:`${b.id}-${n}`,name:`${b.name}, ${n}`,soundPowerA:St(b.shapeDb.map((r,i)=>r+s.shapeDb[i]),b.totalDbA+s.levelDb),character:oe(b.character,s),directivity:t};return{...e,regimes:a}});class M{static DEFAULT_AMBIENT_DB_A=35;static DETECTION_MARGIN_DB=3;static AMBIENT_SHAPE_DB=Rt.OUTDOOR_SHAPE_DB;static HEARING_FLOOR_DB_A=0;static ITERATIONS=30;static CONVERGED_MS=.5;static VELOCITY_STEP_MS=500;static CLIMB_MPS=2.5;static DESCENT_MPS=1.5;static LOW_M=3e3;static CLIMB_SPAN_MS=3e4;static noiseOfKind(t){const e=Tt.find(a=>a.kinds.includes(t));return Dt.find(a=>a.id===(e?.id??"turbofan-narrow-body"))}static bandsAt(t,e,a=A.STANDARD){const n=20*Math.log10(Math.max(e*1e3,1))+11;return A.OCTAVES.map((s,r)=>t.soundPowerA[r]-n-A.absorptionDbPerKm(s,a)*e)}static couldBeHeard(t,e,a=M.DEFAULT_AMBIENT_DB_A,n=A.STANDARD,s){const r=M.ambientBands(a,s);return Object.entries(t.regimes??{overflight:t}).some(([o,l])=>M.bandsAt(l,e,n).map((c,u)=>c+(l.directivity==="turbofan"?H.loudestDb(o)[u]:0)).some((c,u)=>c>=Math.max(r[u]+M.DETECTION_MARGIN_DB,M.HEARING_FLOOR_DB_A)))}static ambientBands(t,e=M.AMBIENT_SHAPE_DB){const a=A.sumDb(e);return e.map(n=>t+n-a)}static heardAt(t,e,a,n={}){const s=n.air??A.STANDARD,r=A.speedOfSound(s.temperatureC),i=t.points[t.points.length-1]?.t;if(i===void 0)return;let o=Math.min(a,i),l=N.positionAt(t,o);if(!l)return;let c=j.seenFrom(e,l.geo);for(let _=0;_<M.ITERATIONS;_++){const k=a-c.distanceKm*1e3*1e3/r,x=Math.abs(k-o);if(o=k,l=N.positionAt(t,o),!l)return;if(c=j.seenFrom(e,l.geo),x<M.CONVERGED_MS)break}const u=N.positionAt(t,a),d=u?j.seenFrom(e,u.geo):c,h=M.regimeAt(t,o,e),p=M.inRegime(n.noise??Dt[0],h),m=n.ambientDbA??M.DEFAULT_AMBIENT_DB_A,f=M.ambientBands(m,n.ambientShapeDb),O=M.emissionAngle(t,e,o),v=p.directivity==="turbofan"?H.bandsDb(O,h,r):void 0,B=n.ground===null?A.OCTAVES.map(()=>0):g.excessDb(c.altitudeDeg,n.ground,r),S=M.bandsAt(p,c.distanceKm,s).map((_,k)=>_+(v?.[k]??0)+B[k]),F=S.map((_,k)=>_>=Math.max(f[k]+M.DETECTION_MARGIN_DB,M.HEARING_FLOOR_DB_A)),J=S.indexOf(Math.max(...S)),L=F.lastIndexOf(!0);return{track:t,audible:F.some(Boolean),levelDbA:A.sumDb(S),bandsDbA:S,ambientDbA:m,delayS:(a-o)/1e3,emittedAtMs:o,sound:c,seen:d,lagDeg:M.angleBetween(c,d),dopplerRatio:M.doppler(t,e,o,r),dominantHz:A.OCTAVES[J],cutoffHz:L<0?void 0:A.OCTAVES[L],regime:h,noise:p,emissionAngleDeg:O}}static emissionAngle(t,e,a){const n=M.VELOCITY_STEP_MS,s=N.positionAt(t,a-n),r=N.positionAt(t,a+n),i=N.positionAt(t,a);if(!s||!r||!i)return 90;const o=d=>{const h=j.seenFrom(e,d),p=h.altitudeDeg*Math.PI/180,m=h.azimuthDeg*Math.PI/180,f=h.distanceKm*1e3;return[f*Math.cos(p)*Math.sin(m),f*Math.cos(p)*Math.cos(m),f*Math.sin(p)]},[l,c,u]=[o(s.geo),o(r.geo),o(i.geo)];return H.angleDeg(c.map((d,h)=>d-l[h]),u.map(d=>-d))}static regimeAt(t,e,a){const n=M.CLIMB_SPAN_MS,s=N.positionAt(t,e-n)??N.positionAt(t,e),r=N.positionAt(t,e+n)??N.positionAt(t,e),i=N.positionAt(t,e);if(!s||!r||!i)return"overflight";const o=(Math.min(e+n,t.points[t.points.length-1].t)-Math.max(e-n,t.points[0].t))/1e3;if(o<=0)return"overflight";const l=(r.altitudeFt-s.altitudeFt)*.3048/o;return i.altitudeFt*.3048-a.heightM>M.LOW_M?"overflight":l>M.CLIMB_MPS?"takeoff":l<-1.5?"approach":"overflight"}static inRegime(t,e){return t.regimes?.[e]??t}static profile(t,e,a,n,s=2e3,r={}){const i=[];let o,l,c=a;for(let u=a;u<=n;u+=s){const d=M.heardAt(t,e,u,r);d&&(!l||d.levelDbA>l.levelDbA)&&(l=d,c=u),d?.audible?o?o.untilMs=u:i.push(o={fromMs:u,untilMs:u}):o=void 0}return{track:t,audible:i,peakDbA:l?.levelDbA??-1/0,peakAtMs:c,peakDelayS:l?.delayS??0}}static angleBetween(t,e){const a=c=>{const u=c.altitudeDeg*Math.PI/180,d=c.azimuthDeg*Math.PI/180;return[Math.cos(u)*Math.sin(d),Math.cos(u)*Math.cos(d),Math.sin(u)]},[n,s,r]=a(t),[i,o,l]=a(e);return Math.acos(Math.min(1,Math.max(-1,n*i+s*o+r*l)))*180/Math.PI}static doppler(t,e,a,n){const s=M.VELOCITY_STEP_MS,r=N.positionAt(t,a-s),i=N.positionAt(t,a+s);if(!r||!i)return 1;const o=j.seenFrom(e,r.geo).distanceKm*1e3,l=j.seenFrom(e,i.geo).distanceKm*1e3;return 1/(1-(o-l)/(2*s/1e3)/n)}}class de{static at(t,e,a,n,s={}){const r=N.seenFrom(t,a,n);if(!r)return;const i=U.of(e),o=M.heardAt(t,a,n,{noise:M.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:r.altitudeFt,groundSpeedKt:r.groundSpeedKt,trackDeg:r.trackDeg,sky:r.sky,angularRateDegPerS:r.angularRateDegPerS,hearing:o&&{audible:o.audible,levelDbA:o.levelDbA,ambientDbA:o.ambientDbA,delayS:o.delayS,lagDeg:o.lagDeg,dopplerRatio:o.dopplerRatio,cutoffHz:o.cutoffHz,dominantHz:o.dominantHz}}}}class R{static REFERENCE_AMPLITUDE=.02;static MASKING_RANGE_DB=6;static KNEE_DB=20;static COMPRESSION_RATIO=1;static EXPANSION_RATIO=1.8;static HEADROOM_DB=Rt.HEADROOM_DB;static DEFAULT_MAX_VOICES=4;static candidates(t,e,a,n,s={}){const r=new Set;for(const[i,o]of t){const l=M.noiseOfKind(U.of(e.get(a(o))).kind);let c=1/0;for(const u of o.points)c=Math.min(c,j.seenFrom(n,{lat:u.lat,lng:u.lng,heightM:u.altitudeFt*.3048}).distanceKm);M.couldBeHeard(l,c,s.ambientDbA,s.air,s.ambientShapeDb)&&r.add(i)}return r}static voices(t,e,a,n,s,r,i={}){const o=[];for(const l of t){const c=e.get(l);if(!c||i.only?.(l)===!1)continue;const u=i.kindOf?.(l)??U.of(a.get(n(c))).kind,d=i.noiseOf?.(l)??M.noiseOfKind(u),h=M.heardAt(c,s,r,{...i,noise:d});if(!h?.audible)continue;const p=i.throughDb,m=p?h.bandsDbA.map((f,O)=>f-(p[O]??0)):h.bandsDbA;p&&!R.noticed(m,h.ambientDbA,i.ambientShapeDb)||o.push({id:l,kind:u,bandAmplitudes:R.bandAmplitudes(m,h.ambientDbA,i.referenceAmplitude,{ambientShapeDb:i.ambientShapeDb,expandUnderKnee:i.expandUnderKnee}),levelDbA:p?A.sumDb(m):h.levelDbA,distanceKm:h.sound.distanceKm,dopplerRatio:h.dopplerRatio,azimuthDeg:h.sound.azimuthDeg,elevationDeg:h.sound.altitudeDeg,character:h.noise.character,groundEcho:i.ground===null?void 0:g.echo(h.sound.altitudeDeg,i.ground,A.speedOfSound((i.air??A.STANDARD).temperatureC))})}return o.sort((l,c)=>c.levelDbA-l.levelDbA).slice(0,i.maxVoices??R.DEFAULT_MAX_VOICES)}static noticed(t,e,a){const n=M.ambientBands(e,a);return t.some((s,r)=>s>=n[r]+M.DETECTION_MARGIN_DB)}static bandAmplitudes(t,e,a=R.REFERENCE_AMPLITUDE,n={}){const s=M.ambientBands(e,n.ambientShapeDb),r=n.expandUnderKnee===!1?1:R.EXPANSION_RATIO,i=M.DETECTION_MARGIN_DB,o=A.sumDb(t),l=o-e,c=l>=R.KNEE_DB?R.KNEE_DB+(l-R.KNEE_DB)/R.COMPRESSION_RATIO:R.KNEE_DB-(R.KNEE_DB-l)*r,u=a*10**((c-R.HEADROOM_DB)/20);return t.map((d,h)=>{const p=Math.min(1,Math.max(0,(d-s[h]-i+R.MASKING_RANGE_DB)/(2*R.MASKING_RANGE_DB)));return p*p*(3-2*p)*u*10**((d-o)/20)})}static BANDS_HZ=A.OCTAVES}class Q{static RUMBLE_BELOW_HZ=500;static DULL_BELOW_HZ=2e3;static PITCH_NOTICED=.03;static text(t,e,a,n){const s=(d,h=0)=>d.toLocaleString(n,{maximumFractionDigits:h}),r=(d,h)=>d.replace(/\{(\w+)\}/g,(p,m)=>h[m]??`{${m}}`),i=[],o=[t.registration,t.name].filter(Boolean).join(" · ");i.push(o||r(e.unnamed,{hex:t.hex}));const l=[r(e.altitude,{value:s(Math.round(t.altitudeFt/100)*100)}),t.groundSpeedKt===void 0?void 0:r(e.speed,{value:s(Math.round(t.groundSpeedKt))}),t.trackDeg===void 0?void 0:r(e.heading,{value:s(Math.round(t.trackDeg))})].filter(Boolean);i.push(l.join(" · ")),i.push(r(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(r(e.inaudible,{level:s(Math.round(c.levelDbA)),ambient:s(Math.round(c.ambientDbA))}));else{const d=c.cutoffHz??0,h=d<=Q.RUMBLE_BELOW_HZ?e.rumble:d<=Q.DULL_BELOW_HZ?e.muffled:e.broad,p=c.dopplerRatio-1,m=Math.abs(p)<Q.PITCH_NOTICED?"":r(p>0?e.pitchHigher:e.pitchLower,{percent:s(Math.round(Math.abs(p)*100))});i.push(r(e.heard,{level:s(Math.round(c.levelDbA)),delay:s(Math.round(c.delayS)),lag:s(Math.round(c.lagDeg)),character:r(h,{cutoff:s(d)}),pitch:m}))}t.contrail&&i.push(r(t.contrail.persistent?e.contrailPersistent:e.contrailShort,{rhi:s(Math.round(t.contrail.iceRelativeHumidity*100))}));const u=[t.military?e.military:void 0,t.restricted?e.restricted:void 0].filter(Boolean);return u.length>0&&i.push(u.join(" · ")),i.push(e.candidate),i.join(`
|
|
1
|
+
import{A as et,e as A,L as vt,T as Z,R as j,f as N,g as Rt,M as st,D as V,h as it,i as Bt,l as at,O as ot}from"./rr0-sighting.mjs";import{C as rt}from"./ContrailGrowth-DwHS8If9.js";const Nt=.25,ct=.4,lt=6,$=12,Ct=3,ht=.2,_t=.2,ut=24,wt=3,Ht=24,dt=1,yt=.7,Pt=1.5,kt=.8,Lt=1.3,pt=.02,Ft=700,jt=-30,mt=.9,Mt=5,Gt=25,Ut=.5,Kt=.12,gt=[.13,.31],zt=.16,Wt=1.6,Vt=2,$t=3.6,At=1.1,Xt=.3,Yt=1e3,bt=.7,qt=.7;class X{context;constructor(t){this.context=t}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}}et.isLive(this.context)&&et.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);et.isLive(this.context)&&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 r=t.createGain(),i=e.character?.modulationDepth??0;r.gain.value=1-i/2;const o=t.createOscillator();o.type="sine";const l=t.createGain();l.gain.value=i/2,o.connect(l).connect(r.gain),r.connect(a);const c=t.createBufferSource();c.buffer=this.noise(t),c.loop=!0,c.loopStart=Math.random()*lt*.5;const u=[],d=[],h=[];for(const D of A.OCTAVES){const I=t.createBiquadFilter();I.type="bandpass",I.frequency.value=D,I.Q.value=dt;const w=t.createBiquadFilter();w.type="bandpass",w.frequency.value=D,w.Q.value=dt;const P=t.createGain();P.gain.value=0,c.connect(I).connect(w).connect(P).connect(r),u.push(I),d.push(w),h.push(P)}const p=[];for(const[D,I]of[[e.character?.toneHz,e.character?.toneShare],[e.character?.humHz,e.character?.humShare]])if(D!==void 0)for(let w=1;w<=wt;w++){const P=t.createOscillator();P.type="sine",P.frequency.value=D*w;const tt=t.createGain();tt.gain.value=0,P.connect(tt).connect(a),p.push({oscillator:P,gain:tt,harmonic:w,baseHz:D,share:I??0})}const m=t.createGain();m.gain.value=0,m.connect(a.gain);const f=gt.map(D=>{const I=t.createOscillator();return I.type="sine",I.frequency.value=D,I.connect(m),I}),O=t.createGain();O.gain.value=e.character?.roughness??ht;const v=t.createBufferSource();v.buffer=this.roughTable(t,Ct),v.loop=!0,v.loopStart=Math.random()*$*.5,v.connect(O).connect(r.gain);const B=t.createGain();B.gain.value=(e.character?.roughness??ht)*_t;const S=t.createBufferSource();S.buffer=this.roughTable(t,ut),S.loop=!0,S.loopStart=Math.random()*$*.5,S.connect(B).connect(r.gain);let F;const J=this.busOf(t)&&this.reverb;J&&(F=t.createGain(),F.gain.value=0,a.connect(F).connect(J));let L,_;if(!e.inside&&typeof t.createDelay=="function"){const D=t.createDelay(pt);D.delayTime.value=0;const I=t.createBiquadFilter();I.type="highshelf",I.frequency.value=Ft,I.gain.value=0;const w=t.createGain();w.gain.value=0,a.connect(D).connect(I).connect(w).connect(n??s);const P=t.createGain();P.gain.value=0,_=t.createBufferSource(),_.buffer=this.roughTable(t,ut),_.loop=!0,_.loopStart=Math.random()*$*.5,_.connect(P).connect(D.delayTime),L={delay:D,jitter:P,shelf:I,gain:w}}const k=[c,v,S,o,...p.map(D=>D.oscillator),...f,..._?[_]:[]];for(const D of k)D.start();const x={nodes:[a,r,l,O,B,m,...L?[L.delay,L.jitter,L.shelf,L.gain]:[],...p.map(D=>D.gain),...u,...d,...h,...F?[F]:[],...n?[n]:[],...k],sources:k,filters:u,seconds:d,gains:h,tones:p,lfo:o,lfoDepth:l,wander:f,wanderDepth:m,roughDepth:O,crackleDepth:B,beat:r,output:a,panner:n,send:F,echo:L};return this.voices.set(e.id,x),x}retarget(t,e,a){const n=t.currentTime,s=(p,m)=>p.setTargetAtTime(m,n,Nt),r=Math.min(Pt,Math.max(yt,a.dopplerRatio)),i=Math.min(Lt,Math.max(kt,Math.sqrt(a.dopplerRatio))),o=t.sampleRate*.45,l=a.bandAmplitudes.map((p,m)=>p*X.unweighting(A.OCTAVES[m])),c=Math.sqrt(l.reduce((p,m)=>p+m*m,0)),u=Math.min(1,Math.max(0,(a.distanceKm-Mt)/(Gt-Mt)));A.OCTAVES.forEach((p,m)=>{s(e.filters[m].frequency,Math.min(o,p*i)),s(e.seconds[m].frequency,Math.min(o,p*i)),s(e.gains[m].gain,l[m]*Math.sqrt(Yt/p))});const d=a.character;for(const{oscillator:p,gain:m,harmonic:f,baseHz:O,share:v}of e.tones){const B=O*f;s(p.frequency,B*r);const S=B*r;s(m.gain,S<o?v*zt*l[X.bandOf(S)]/f:0)}d?.modulationHz!==void 0&&s(e.lfo.frequency,d.modulationHz*r);const h=c>0?X.saturated(c)/c:1;if(s(e.output.gain,h*(1-Xt*u)),s(e.wanderDepth.gain,h*Kt*u/gt.length),e.send&&s(e.send.gain,X.reverbSend(a.distanceKm)),e.echo){const p=a.groundEcho;s(e.echo.gain.gain,p?.lowGain??0),p&&(s(e.echo.delay.delayTime,Math.min(pt,p.delayS)),s(e.echo.jitter.gain,p.jitterS),s(e.echo.shelf.gain,p.lowGain>0?Math.max(jt,20*Math.log10(Math.max(p.highGain,1e-6)/p.lowGain)):0))}if(e.panner){const p=(a.azimuthDeg-this.headingDeg)*Math.PI/180,m=a.inside?0:Math.max(-mt,Math.min(mt,Math.sin(p)))*(1-Ut*u);s(e.panner.pan,m)}}static saturated(t){const e=qt*bt;if(t<=e)return t;const a=bt-e;return e+a*(1-Math.exp(-(t-e)/a))}static reverbSend(t){return Math.min(Wt,Math.sqrt(Math.max(0,t)/Vt))}static unweighting(t){return 10**(Math.min(Ht,Math.max(0,-A.aWeightingDb(t)))/20)}static bandOf(t){let e=0;return A.OCTAVES.forEach((a,n)=>{Math.abs(Math.log(t/a))<Math.abs(Math.log(t/A.OCTAVES[e]))&&(e=n)}),e}roughTable(t,e){const a=this.roughBuffers.get(e);if(a)return a;const n=Math.floor(t.sampleRate*$),s=t.createBuffer(1,n,t.sampleRate),r=s.getChannelData(0),i=Array.from({length:$*e},()=>(Math.random()*2-1)**3),o=t.sampleRate/e;for(let l=0;l<r.length;l++){const c=l/o,u=Math.floor(c),d=c-u,h=d*d*(3-2*d);r[l]=i[u%i.length]*(1-h)+i[(u+1)%i.length]*h}return this.roughBuffers.set(e,s),s}roomImpulse(t){const e=Math.floor(t.sampleRate*$t),a=t.createBuffer(2,e,t.sampleRate);for(let n=0;n<2;n++){const s=a.getChannelData(n);let r=0;for(let i=0;i<e;i++){const o=i/t.sampleRate,l=.6*Math.exp(-o/(At*2))+.04;r+=l*(Math.random()*2-1-r),s[i]=r*Math.exp(-o/At)}}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,ct/3),setTimeout(()=>{for(const n of e.sources)try{n.stop()}catch{}for(const n of e.nodes)n.disconnect()},ct*1e3*3))}noise(t){if(this.noiseBuffer)return this.noiseBuffer;const e=t.createBuffer(1,t.sampleRate*lt,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 U{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],CONC:["Concorde","airliner-supersonic",25.6,61.7],DC3:["Douglas DC-3","piston-heavy",29,19.7],DC4:["Douglas DC-4","piston-heavy",35.8,28.6],P51:["North American P-51 Mustang","piston-heavy",11.3,9.8],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?U.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?U.CATEGORIES[t.category]:void 0;return n?{name:n[0],kind:n[1],spanM:n[2],lengthM:n[3],basis:"category"}:{...U.GENERIC}}static isHelicopter(t){return t.kind.startsWith("helicopter")}}class C{static DUSK_SUN_ELEVATION_DEG=-.83;static ALWAYS=new Set(["airliner-narrow","airliner-wide","airliner-supersonic","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 LANDING_LIGHTS_BELOW_FT=1e4;static LANDING_INTENSITY=600;static LANDING_BEAM_DEG=10;static LANDING_COLOR="#fff1dc";static LANDING_BRIGHTNESS={"airliner-narrow":1,"airliner-wide":1,"airliner-supersonic":1,"regional-jet":.6,"regional-turboprop":.6,"business-jet":.4,"turboprop-light":.2,"light-piston":.1,ultralight:.05,"helicopter-light":.1,"helicopter-medium":.2,"helicopter-heavy":.2};static lampsOn(t,e){if(C.NONE.has(t))return{navigation:!1,beacon:!1,strobes:!1};if(C.ALWAYS.has(t))return{navigation:!0,beacon:!0,strobes:!0};const a=e<C.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=C.lampsOn(t.kind,e),n=t.kind.startsWith("helicopter"),s=vt.find(h=>h.id===(n?"helicopter":"airliner")).create(),[r,i]=n?[5,7]:[17,18],o=t.spanM/2/r,l=t.lengthM/2/i,[c,u,d]=C.BRIGHTNESS[t.kind]??[1,1,1];return s.filter(h=>h.id.startsWith("nav")?a.navigation:h.id.startsWith("strobe")?a.strobes:h.id.startsWith("beacon")?a.beacon:!0).filter(h=>!(h.id.startsWith("beacon")&&!a.beacon)).map(h=>{const p=h.id.startsWith("nav")?c:h.id.startsWith("strobe")?u:d;return{...h,offsetM:{x:h.offsetM.x*o,y:h.offsetM.y,z:h.offsetM.z*l},intensity:(h.intensity??1)*p}}).filter(h=>(h.intensity??1)>0)}static landingLights(t,e,a){const n=C.LANDING_BRIGHTNESS[t.kind]??0;if(n===0||!C.lampsOn(t.kind,e).navigation)return[];const s=c=>c<C.LANDING_LIGHTS_BELOW_FT;if(!a.some(c=>s(c.altitudeFt)))return[];const r=C.LANDING_INTENSITY*n,i=a.flatMap((c,u)=>u>0&&s(c.altitudeFt)!==s(a[u-1].altitudeFt)?[{t:c.t,intensity:s(c.altitudeFt)?r:0}]:[]),o=t.spanM/34,l=t.lengthM/36;return[-1,1].map(c=>({id:c<0?"landing-left":"landing-right",offsetM:{x:c*5*o,y:-1,z:3*l},color:C.LANDING_COLOR,intensity:s(a[0].altitudeFt)?r:0,pattern:{kind:"steady"},beamDeg:C.LANDING_BEAM_DEG,keyframes:i}))}static bodyColor(t){return t.kind==="military-jet"?"#8a8e94":t.kind.startsWith("helicopter")?"#c8ccd1":t.kind==="unmanned"?"#2c2e33":"#dde0e4"}}class q{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(q.FAMILIES).flatMap(([t,e])=>e.map(a=>[a,t])));static idOf(t){return t?q.BY_TYPE.get(t.toUpperCase()):void 0}}class T{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=T.MAX_OBJECTS,s={}){return new Jt(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*T.HEIGHT_OVER_LENGTH}}static offsetOf(t,e){const a=j.seenFrom(t,{lat:e.lat,lng:e.lng,heightM:e.altitudeFt*T.FT_TO_M}),n=a.distanceKm*1e3,s=n*Math.cos(a.altitudeDeg*T.DEG);return{eastM:s*Math.sin(a.azimuthDeg*T.DEG),northM:s*Math.cos(a.azimuthDeg*T.DEG),upM:n*Math.sin(a.altitudeDeg*T.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>N.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)/T.DEG+360)%360}}class Jt{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=T.keyOf(a),s=this.options.models?.get(n)??U.of(void 0);T.segments(a).forEach((r,i)=>{const o=r.map(h=>({point:h,at:T.offsetOf(this.observer,h)}));if(!o.some(h=>h.at.altitudeDeg>=0))return;const l=o.map((h,p)=>({t:h.point.t-this.startMs,eastM:h.at.eastM,northM:h.at.northM,altitudeM:h.at.upM,headingDeg:h.point.trackDeg??(p+1<o.length?T.bearingDeg(h.at,o[p+1].at):T.bearingDeg(o[p-1].at,h.at))})),c=T.idOf(a,i),u=o[Math.floor(o.length/2)].point,d=this.options.sunElevationAt?.(u)??90;t.push({object:{id:c,kind:"aircraft",eastM:l[0].eastM,northM:l[0].northM,headingDeg:l[0].headingDeg,sizeM:T.sizeOf(s),model:q.idOf(s.code)?{id:q.idOf(s.code)}:void 0,color:C.bodyColor(s),lights:[...C.lights(s,d),...C.landingLights(s,d,r.map(h=>({t:h.t-this.startMs,altitudeFt:h.altitudeFt})))],track:l},presence:{fromMs:l[0].t,untilMs:l[l.length-1].t},flight:{icao:a.icao,nonIcao:a.nonIcao,points:r},closestKm:Math.min(...o.map(h=>h.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 xt=[[20,0],[120,0],[130,1.5],[140,4],[150,7.5],[160,7.5]],Zt=[[20,1.5],[40,1],[60,1],[80,0],[120,0],[130,1],[140,1],[150,-3],[160,-6.5],[170,-12]],ft=.16,Qt=1,te=[[0,-2],[10,-1],[20,0],[40,0],[50,-2],[60,-4.5],[70,-7.5],[80,-11],[90,-15],[100,-19.5],[110,-25]],ee=[[60,-15.8],[70,-11.5],[80,-8],[90,-5],[100,-2.7],[110,-1.2],[120,-.3],[130,0],[140,-2],[150,-6],[160,-10],[170,-15],[180,-20]],ae=1.5,Et=-40,ne=1.5,se={takeoff:{jetMps:300,flightMps:80,jetShare:[1,1,.9,.6,.3,.1,0,0]},overflight:{jetMps:280,flightMps:130,jetShare:[1,1,.9,.6,.3,.1,0,0]},approach:{jetMps:180,flightMps:70,jetShare:[.6,.5,.4,.2,.1,0,0,0]}};class H{static bandsDb(t,e,a=340){const n=se[e],s=H.fan(t)-H.fan(90),r=.62*Math.max(0,n.jetMps-n.flightMps)/a,i=-30*Math.log10(1+r/(1+r**5)**.2*Math.cos(t*Math.PI/180));return A.OCTAVES.map((o,l)=>{const c=i+H.jetRemainder(t,o*ne/n.jetMps),u=n.jetShare[l];return 10*Math.log10(u*10**(c/10)+(1-u)*10**(s/10))})}static loudestDb(t){const e=H.loudest.get(t);if(e)return e;const a=A.OCTAVES.map(()=>-1/0);for(let n=0;n<=180;n+=5)H.bandsDb(n,t).forEach((s,r)=>a[r]=Math.max(a[r],s));return H.loudest.set(t,a),a}static loudest=new Map;static angleDeg(t,e){const a=t.reduce((s,r,i)=>s+r*e[i],0),n=Math.hypot(...t)*Math.hypot(...e);return n===0?90:Math.acos(Math.min(1,Math.max(-1,a/n)))*180/Math.PI}static fan(t){const e=H.read(te,t,!0),a=H.read(ee,t,!0)+ae;return 10*Math.log10(10**(e/10)+10**(a/10))}static jetRemainder(t,e){const a=Math.min(1,Math.max(0,Math.log(e/ft)/Math.log(Qt/ft)));return(1-a)*H.read(xt,t)+a*H.read(Zt,t)}static read(t,e,a=!1){const[n,s]=[t[0],t[1]],[r,i]=[t[t.length-2],t[t.length-1]];if(e<=n[0])return a?Math.max(Et,n[1]+(s[1]-n[1])/(s[0]-n[0])*(e-n[0])):n[1];if(e>=i[0])return a?Math.max(Et,i[1]+(i[1]-r[1])/(i[0]-r[0])*(e-i[0])):i[1];for(let o=1;o<t.length;o++){const[l,c]=[t[o-1],t[o]];if(e<=c[0])return l[1]+(c[1]-l[1])*(e-l[0])/(c[0]-l[0])}return i[1]}}class g{static GRASS={flowResistivityKPa:200,earHeightM:1.6};static COHERENCE=.4;static JITTER_S=1e-4;static ECHO_UNDER_S=5e-4;static ECHO_FROM_S=.0015;static LOW_HZ=125;static HIGH_HZ=2e3;static AIR_DENSITY=1.2;static reflection(t,e,a=g.GRASS){const[n,s]=g.impedance(t,a);return g.reflected(n,s,Math.sin(Math.max(0,e)*Math.PI/180))}static impedance(t,e=g.GRASS){const a=g.AIR_DENSITY*t/(e.flowResistivityKPa*1e3);return[1+.0571*a**-.754,-.087*a**-.732]}static reflected(t,e,a){const[n,s,r,i]=[t*a-1,e*a,t*a+1,e*a],o=r*r+i*i;return{re:(n*r+s*i)/o,im:(s*r-n*i)/o}}static delayS(t,e=g.GRASS,a=340){return 2*e.earHeightM*Math.sin(Math.max(0,t)*Math.PI/180)/a}static excessDb(t,e=g.GRASS,a=340){const n=`${e.flowResistivityKPa}|${e.earHeightM}|${a}`;let s=g.overheads.get(n);return s||g.overheads.set(n,s=g.bandsDb(90,e,a)),g.bandsDb(t,e,a).map((r,i)=>r-s[i])}static echo(t,e=g.GRASS,a=340){const n=g.delayS(t,e,a);if(n<=g.ECHO_UNDER_S)return;const s=Math.min(1,(n-g.ECHO_UNDER_S)/(g.ECHO_FROM_S-g.ECHO_UNDER_S)),r=s*s*(3-2*s),i=o=>{const l=g.reflection(o,t,e);return r*g.COHERENCE*Math.hypot(l.re,l.im)};return{delayS:n,lowGain:i(g.LOW_HZ),highGain:i(g.HIGH_HZ),jitterS:g.JITTER_S}}static overheads=new Map;static thirds=A.OCTAVES.map(t=>[-1,0,1].map(e=>{const a=t*2**(e/3);return{middle:a,from:a*2**(-1/6),to:a*2**(1/6)}}));static impedances=new Map;static bandsDb(t,e,a){const n=g.delayS(t,e,a),s=g.COHERENCE,r=Math.sin(Math.max(0,t)*Math.PI/180);let i=g.impedances.get(e.flowResistivityKPa);return i||g.impedances.set(e.flowResistivityKPa,i=g.thirds.map(o=>o.map(l=>g.impedance(l.middle,e)))),g.thirds.map((o,l)=>{let c=0;return o.forEach((u,d)=>{const h=g.reflected(i[l][d][0],i[l][d][1],r),p=2*Math.PI*n*(u.to-u.from),[m,f]=p<1e-9?[1,0]:[(Math.sin(2*Math.PI*u.to*n)-Math.sin(2*Math.PI*u.from*n))/p,(Math.cos(2*Math.PI*u.from*n)-Math.cos(2*Math.PI*u.to*n))/p];c+=1+h.re*h.re+h.im*h.im+2*s*(h.re*m+h.im*f)}),10*Math.log10(c/o.length)})}}const Y={takeoff:{shapeDb:[10,3,-3,-2,-2,-2,5,4],levelDb:0},approach:{shapeDb:[0,0,0,0,0,0,0,0],levelDb:-8}},ie={takeoff:{shapeDb:[0,0,0,0,0,0,0,0],levelDb:0},approach:{shapeDb:[0,0,0,0,0,0,0,0],levelDb:-8}},Tt=[{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},regimes:Y},{id:"turbojet-supersonic",name:"Supersonic turbojet airliner",kinds:["airliner-supersonic"],totalDbA:169.5,shapeDb:[-22,-13,-9,-6,-6,-9,-15,-25],character:{humHz:100,humShare:.7},regimes:ie},{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},regimes:Y},{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},regimes:Y},{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},regimes:Y},{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:[-20,-10,-3,-6,-10,-20,-27,-42],character:{toneHz:80,toneShare:.4,modulationHz:80,modulationDepth:.4}},{id:"piston-heavy",name:"Heavy piston aircraft",kinds:["piston-heavy"],totalDbA:140,shapeDb:[-31,-12,-11,-9,-7,-6,-7,-11],character:{toneHz:84,toneShare:.4,modulationHz:84,modulationDepth:.36}},{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}}],St=(b,t)=>b.map(e=>e+t-A.sumDb(b));function oe(b,t){if(!b)return;const e=t.toneRatio??1,a=t.toneGain??1;return{...b,...b.toneHz!==void 0?{toneHz:b.toneHz*e,toneShare:Math.min(1,(b.toneShare??0)*a)}:{},...b.humHz!==void 0?{humHz:b.humHz*e,humShare:Math.min(1,(b.humShare??0)*a)}:{}}}const Dt=Tt.map(b=>{const t=b.regimes===Y?"turbofan":void 0,e={id:b.id,name:b.name,soundPowerA:St(b.shapeDb,b.totalDbA),character:b.character,directivity:t};if(!b.regimes)return e;const a={overflight:e};for(const[n,s]of Object.entries(b.regimes))a[n]={id:`${b.id}-${n}`,name:`${b.name}, ${n}`,soundPowerA:St(b.shapeDb.map((r,i)=>r+s.shapeDb[i]),b.totalDbA+s.levelDb),character:oe(b.character,s),directivity:t};return{...e,regimes:a}});class M{static DEFAULT_AMBIENT_DB_A=35;static DETECTION_MARGIN_DB=3;static AMBIENT_SHAPE_DB=Rt.OUTDOOR_SHAPE_DB;static HEARING_FLOOR_DB_A=0;static ITERATIONS=30;static CONVERGED_MS=.5;static VELOCITY_STEP_MS=500;static CLIMB_MPS=2.5;static DESCENT_MPS=1.5;static LOW_M=3e3;static CLIMB_SPAN_MS=3e4;static noiseOfKind(t){const e=Tt.find(a=>a.kinds.includes(t));return Dt.find(a=>a.id===(e?.id??"turbofan-narrow-body"))}static bandsAt(t,e,a=A.STANDARD){const n=20*Math.log10(Math.max(e*1e3,1))+11;return A.OCTAVES.map((s,r)=>t.soundPowerA[r]-n-A.absorptionDbPerKm(s,a)*e)}static couldBeHeard(t,e,a=M.DEFAULT_AMBIENT_DB_A,n=A.STANDARD,s){const r=M.ambientBands(a,s);return Object.entries(t.regimes??{overflight:t}).some(([o,l])=>M.bandsAt(l,e,n).map((c,u)=>c+(l.directivity==="turbofan"?H.loudestDb(o)[u]:0)).some((c,u)=>c>=Math.max(r[u]+M.DETECTION_MARGIN_DB,M.HEARING_FLOOR_DB_A)))}static ambientBands(t,e=M.AMBIENT_SHAPE_DB){const a=A.sumDb(e);return e.map(n=>t+n-a)}static heardAt(t,e,a,n={}){const s=n.air??A.STANDARD,r=A.speedOfSound(s.temperatureC),i=t.points[t.points.length-1]?.t;if(i===void 0)return;let o=Math.min(a,i),l=N.positionAt(t,o);if(!l)return;let c=j.seenFrom(e,l.geo);for(let _=0;_<M.ITERATIONS;_++){const k=a-c.distanceKm*1e3*1e3/r,x=Math.abs(k-o);if(o=k,l=N.positionAt(t,o),!l)return;if(c=j.seenFrom(e,l.geo),x<M.CONVERGED_MS)break}const u=N.positionAt(t,a),d=u?j.seenFrom(e,u.geo):c,h=M.regimeAt(t,o,e),p=M.inRegime(n.noise??Dt[0],h),m=n.ambientDbA??M.DEFAULT_AMBIENT_DB_A,f=M.ambientBands(m,n.ambientShapeDb),O=M.emissionAngle(t,e,o),v=p.directivity==="turbofan"?H.bandsDb(O,h,r):void 0,B=n.ground===null?A.OCTAVES.map(()=>0):g.excessDb(c.altitudeDeg,n.ground,r),S=M.bandsAt(p,c.distanceKm,s).map((_,k)=>_+(v?.[k]??0)+B[k]),F=S.map((_,k)=>_>=Math.max(f[k]+M.DETECTION_MARGIN_DB,M.HEARING_FLOOR_DB_A)),J=S.indexOf(Math.max(...S)),L=F.lastIndexOf(!0);return{track:t,audible:F.some(Boolean),levelDbA:A.sumDb(S),bandsDbA:S,ambientDbA:m,delayS:(a-o)/1e3,emittedAtMs:o,sound:c,seen:d,lagDeg:M.angleBetween(c,d),dopplerRatio:M.doppler(t,e,o,r),dominantHz:A.OCTAVES[J],cutoffHz:L<0?void 0:A.OCTAVES[L],regime:h,noise:p,emissionAngleDeg:O}}static emissionAngle(t,e,a){const n=M.VELOCITY_STEP_MS,s=N.positionAt(t,a-n),r=N.positionAt(t,a+n),i=N.positionAt(t,a);if(!s||!r||!i)return 90;const o=d=>{const h=j.seenFrom(e,d),p=h.altitudeDeg*Math.PI/180,m=h.azimuthDeg*Math.PI/180,f=h.distanceKm*1e3;return[f*Math.cos(p)*Math.sin(m),f*Math.cos(p)*Math.cos(m),f*Math.sin(p)]},[l,c,u]=[o(s.geo),o(r.geo),o(i.geo)];return H.angleDeg(c.map((d,h)=>d-l[h]),u.map(d=>-d))}static regimeAt(t,e,a){const n=M.CLIMB_SPAN_MS,s=N.positionAt(t,e-n)??N.positionAt(t,e),r=N.positionAt(t,e+n)??N.positionAt(t,e),i=N.positionAt(t,e);if(!s||!r||!i)return"overflight";const o=(Math.min(e+n,t.points[t.points.length-1].t)-Math.max(e-n,t.points[0].t))/1e3;if(o<=0)return"overflight";const l=(r.altitudeFt-s.altitudeFt)*.3048/o;return i.altitudeFt*.3048-a.heightM>M.LOW_M?"overflight":l>M.CLIMB_MPS?"takeoff":l<-1.5?"approach":"overflight"}static inRegime(t,e){return t.regimes?.[e]??t}static profile(t,e,a,n,s=2e3,r={}){const i=[];let o,l,c=a;for(let u=a;u<=n;u+=s){const d=M.heardAt(t,e,u,r);d&&(!l||d.levelDbA>l.levelDbA)&&(l=d,c=u),d?.audible?o?o.untilMs=u:i.push(o={fromMs:u,untilMs:u}):o=void 0}return{track:t,audible:i,peakDbA:l?.levelDbA??-1/0,peakAtMs:c,peakDelayS:l?.delayS??0}}static angleBetween(t,e){const a=c=>{const u=c.altitudeDeg*Math.PI/180,d=c.azimuthDeg*Math.PI/180;return[Math.cos(u)*Math.sin(d),Math.cos(u)*Math.cos(d),Math.sin(u)]},[n,s,r]=a(t),[i,o,l]=a(e);return Math.acos(Math.min(1,Math.max(-1,n*i+s*o+r*l)))*180/Math.PI}static doppler(t,e,a,n){const s=M.VELOCITY_STEP_MS,r=N.positionAt(t,a-s),i=N.positionAt(t,a+s);if(!r||!i)return 1;const o=j.seenFrom(e,r.geo).distanceKm*1e3,l=j.seenFrom(e,i.geo).distanceKm*1e3;return 1/(1-(o-l)/(2*s/1e3)/n)}}class de{static at(t,e,a,n,s={}){const r=N.seenFrom(t,a,n);if(!r)return;const i=U.of(e),o=M.heardAt(t,a,n,{noise:M.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:r.altitudeFt,groundSpeedKt:r.groundSpeedKt,trackDeg:r.trackDeg,sky:r.sky,angularRateDegPerS:r.angularRateDegPerS,hearing:o&&{audible:o.audible,levelDbA:o.levelDbA,ambientDbA:o.ambientDbA,delayS:o.delayS,lagDeg:o.lagDeg,dopplerRatio:o.dopplerRatio,cutoffHz:o.cutoffHz,dominantHz:o.dominantHz}}}}class R{static REFERENCE_AMPLITUDE=.02;static MASKING_RANGE_DB=6;static KNEE_DB=20;static COMPRESSION_RATIO=1;static EXPANSION_RATIO=1.8;static HEADROOM_DB=Rt.HEADROOM_DB;static DEFAULT_MAX_VOICES=4;static candidates(t,e,a,n,s={}){const r=new Set;for(const[i,o]of t){const l=M.noiseOfKind(U.of(e.get(a(o))).kind);let c=1/0;for(const u of o.points)c=Math.min(c,j.seenFrom(n,{lat:u.lat,lng:u.lng,heightM:u.altitudeFt*.3048}).distanceKm);M.couldBeHeard(l,c,s.ambientDbA,s.air,s.ambientShapeDb)&&r.add(i)}return r}static voices(t,e,a,n,s,r,i={}){const o=[];for(const l of t){const c=e.get(l);if(!c||i.only?.(l)===!1)continue;const u=i.kindOf?.(l)??U.of(a.get(n(c))).kind,d=i.noiseOf?.(l)??M.noiseOfKind(u),h=M.heardAt(c,s,r,{...i,noise:d});if(!h?.audible)continue;const p=i.throughDb,m=p?h.bandsDbA.map((f,O)=>f-(p[O]??0)):h.bandsDbA;p&&!R.noticed(m,h.ambientDbA,i.ambientShapeDb)||o.push({id:l,kind:u,bandAmplitudes:R.bandAmplitudes(m,h.ambientDbA,i.referenceAmplitude,{ambientShapeDb:i.ambientShapeDb,expandUnderKnee:i.expandUnderKnee}),levelDbA:p?A.sumDb(m):h.levelDbA,distanceKm:h.sound.distanceKm,dopplerRatio:h.dopplerRatio,azimuthDeg:h.sound.azimuthDeg,elevationDeg:h.sound.altitudeDeg,character:h.noise.character,groundEcho:i.ground===null?void 0:g.echo(h.sound.altitudeDeg,i.ground,A.speedOfSound((i.air??A.STANDARD).temperatureC))})}return o.sort((l,c)=>c.levelDbA-l.levelDbA).slice(0,i.maxVoices??R.DEFAULT_MAX_VOICES)}static noticed(t,e,a){const n=M.ambientBands(e,a);return t.some((s,r)=>s>=n[r]+M.DETECTION_MARGIN_DB)}static bandAmplitudes(t,e,a=R.REFERENCE_AMPLITUDE,n={}){const s=M.ambientBands(e,n.ambientShapeDb),r=n.expandUnderKnee===!1?1:R.EXPANSION_RATIO,i=M.DETECTION_MARGIN_DB,o=A.sumDb(t),l=o-e,c=l>=R.KNEE_DB?R.KNEE_DB+(l-R.KNEE_DB)/R.COMPRESSION_RATIO:R.KNEE_DB-(R.KNEE_DB-l)*r,u=a*10**((c-R.HEADROOM_DB)/20);return t.map((d,h)=>{const p=Math.min(1,Math.max(0,(d-s[h]-i+R.MASKING_RANGE_DB)/(2*R.MASKING_RANGE_DB)));return p*p*(3-2*p)*u*10**((d-o)/20)})}static BANDS_HZ=A.OCTAVES}class Q{static RUMBLE_BELOW_HZ=500;static DULL_BELOW_HZ=2e3;static PITCH_NOTICED=.03;static text(t,e,a,n){const s=(d,h=0)=>d.toLocaleString(n,{maximumFractionDigits:h}),r=(d,h)=>d.replace(/\{(\w+)\}/g,(p,m)=>h[m]??`{${m}}`),i=[],o=[t.registration,t.name].filter(Boolean).join(" · ");i.push(o||r(e.unnamed,{hex:t.hex}));const l=[r(e.altitude,{value:s(Math.round(t.altitudeFt/100)*100)}),t.groundSpeedKt===void 0?void 0:r(e.speed,{value:s(Math.round(t.groundSpeedKt))}),t.trackDeg===void 0?void 0:r(e.heading,{value:s(Math.round(t.trackDeg))})].filter(Boolean);i.push(l.join(" · ")),i.push(r(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(r(e.inaudible,{level:s(Math.round(c.levelDbA)),ambient:s(Math.round(c.ambientDbA))}));else{const d=c.cutoffHz??0,h=d<=Q.RUMBLE_BELOW_HZ?e.rumble:d<=Q.DULL_BELOW_HZ?e.muffled:e.broad,p=c.dopplerRatio-1,m=Math.abs(p)<Q.PITCH_NOTICED?"":r(p>0?e.pitchHigher:e.pitchLower,{percent:s(Math.round(Math.abs(p)*100))});i.push(r(e.heard,{level:s(Math.round(c.levelDbA)),delay:s(Math.round(c.delayS)),lag:s(Math.round(c.lagDeg)),character:r(h,{cutoff:s(d)}),pitch:m}))}t.contrail&&i.push(r(t.contrail.persistent?e.contrailPersistent:e.contrailShort,{rhi:s(Math.round(t.contrail.iceRelativeHumidity*100))}));const u=[t.military?e.military:void 0,t.restricted?e.restricted:void 0].filter(Boolean);return u.length>0&&i.push(u.join(" · ")),i.push(e.candidate),i.join(`
|
|
2
2
|
`)}}class nt{static EFFICIENCY={"airliner-narrow":.34,"airliner-wide":.38,"regional-jet":.32,"business-jet":.3,"military-jet":.22,unknown:.34};static efficiencyOf(t){return nt.EFFICIENCY[t]}}class E{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*E.FT_TO_M;return e<=E.TROPOPAUSE_M?1013.25*(1-225577e-10*e)**5.25588:E.TROPOPAUSE_HPA*Math.exp(-(e-E.TROPOPAUSE_M)/E.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*E.saturationOverWaterPa(t)/E.saturationOverIcePa(t)}static mixingSlope(t,e){return E.EMISSION_INDEX_WATER*E.AIR_HEAT_CAPACITY*t*100/(E.MOLAR_MASS_RATIO*E.COMBUSTION_HEAT*(1-e))}static criticalTemperatureC(t,e){const a=Math.log(E.mixingSlope(t,e)-.053);return-46.46+9.43*a+.72*a*a}static requiredHumidity(t,e,a){const n=E.criticalTemperatureC(t,e);return(E.mixingSlope(t,e)*(a-n)+E.saturationOverWaterPa(n))/E.saturationOverWaterPa(a)}static evaluate(t,e){const a=E.criticalTemperatureC(t.pressureHpa,e),n=E.requiredHumidity(t.pressureHpa,e,t.temperatureC),s=E.iceRelativeHumidity(t.temperatureC,t.relativeHumidity),r=t.temperatureC<a&&t.relativeHumidity>=n;return{forms:r,persistent:r&&s>=1,criticalTemperatureC:a,requiredHumidity:n,iceRelativeHumidity:s}}}class G{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-G.HOLD_MS||e>s.t+G.HOLD_MS)return;const r=t.findIndex(h=>h.t>e),i=r===0?t[0]:t[(r===-1?t.length:r)-1],o=r===-1||r===0?i:t[r],l=G.atLevel(i,a),c=G.atLevel(o,a);if(!l||!c)return;const u=o.t>i.t?Math.min(1,Math.max(0,(e-i.t)/(o.t-i.t))):0,d=(h,p)=>h+(p-h)*u;return{pressureHpa:a,temperatureC:d(l.temperatureC,c.temperatureC),relativeHumidity:d(l.relativeHumidity,c.relativeHumidity),driftEastMs:d(l.driftEastMs,c.driftEastMs),driftNorthMs:d(l.driftNorthMs,c.driftNorthMs),shearPerS:d(l.shearPerS,c.shearPerS)}}static atLevel(t,e){const a=t.levels;for(let n=0;n+1<a.length;n++){const s=a[n],r=a[n+1];if(e>s.pressureHpa||e<r.pressureHpa)continue;const i=(Math.log(s.pressureHpa)-Math.log(e))/(Math.log(s.pressureHpa)-Math.log(r.pressureHpa)),o=(h,p)=>h+(p-h)*i,l=h=>{const p=h.windFromDeg*G.DEG;return{east:-h.windSpeedMs*Math.sin(p),north:-h.windSpeedMs*Math.cos(p)}},c=l(s),u=l(r),d=G.GAS_CONSTANT_OVER_GRAVITY*((s.temperatureC+r.temperatureC)/2+273.15)*Math.log(s.pressureHpa/r.pressureHpa);return{pressureHpa:e,temperatureC:o(s.temperatureC,r.temperatureC),relativeHumidity:o(s.relativeHumidity,r.relativeHumidity),driftEastMs:o(c.east,u.east),driftNorthMs:o(c.north,u.north),shearPerS:Math.hypot(u.east-c.east,u.north-c.north)/d}}}}class K{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=[],r=new Map,i=(o,l,c)=>{const u=Math.round(l/K.PRESSURE_STEP_HPA)*K.PRESSURE_STEP_HPA,d=K.SATURATION_STEP_MS,h=Math.floor(o/d)*d,p=`${u}|${h}`,m=r.get(p);if(m!==void 0)return m+(h-o)/1e3;let f=1/0;for(let O=d;O<=K.SATURATION_HORIZON_MS;O+=d){const v=G.at(a,h+O,u);if(!v)break;if(E.evaluate(v,c).iceRelativeHumidity<1){f=O/1e3;break}}return r.set(p,f),f+(h-o)/1e3};for(const o of t.objects){const l=t.flights.get(o.id),c=o.track;if(!l||!c||c.length!==l.points.length)continue;const u=e?.get(Z.keyOf(l))??U.of(void 0),d=nt.efficiencyOf(u.kind);if(d===void 0)continue;const h=[];let p=-1/0;c.forEach((m,f)=>{if(m.t<-K.DENSE_MS&&f+1<c.length&&m.t-p<K.SPARSE_STEP_MS)return;p=m.t;const O=l.points[f],v=E.pressureAtAltitudeFt(O.altitudeFt),B=G.at(a,n+m.t,v),S=B&&E.evaluate(B,d);h.push({tMs:m.t,eastM:m.eastM,northM:m.northM,upM:m.altitudeM??0,forms:S?.forms??!1,persistent:S?.persistent??!1,lifetimeS:S?rt.lifetimeS(S.iceRelativeHumidity):0,driftEastMs:B?.driftEastMs??0,driftNorthMs:B?.driftNorthMs??0,shearPerS:B?.shearPerS??rt.TYPICAL_SHEAR_PER_S,iceRelativeHumidity:S?.iceRelativeHumidity??0,saturatedForS:S?.persistent?i(n+m.t,v,d):0})}),h.some((m,f)=>m.forms&&h[f+1]?.forms)&&s.push({id:o.id,spanM:u.spanM,points:h})}return s}}const Ot=[500,400,300,250,200,150],re=["temperature","relative_humidity","wind_speed","wind_direction"],ce="2022-01-01",It=.25;class le{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<ce)return Promise.resolve({status:"outside"});const s=new Date(a).toISOString().slice(0,10),i=`${`${Math.round(t.lat/It)},${Math.round(t.lng/It)}`}|${n}|${s}`;let o=this.cache.get(i);return o||(o=this.read(t,n,s),this.cache.set(i,o),o.then(l=>{l.status==="failed"&&this.cache.delete(i)})),o}async read(t,e,a){const n=Ot.flatMap(i=>re.map(o=>`${o}_${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"}),r=`${this.baseUrl}?${s}`;try{const i=await this.fetchImpl(r);if(!i.ok)return{status:"failed"};const o=await i.json();return this.decode(o,{id:"open-meteo-forecast",name:"Open-Meteo (historical forecast)",url:r})}catch{return{status:"failed"}}}decode(t,e){const a=t.hourly;if(!a?.time)return{status:"outside"};const n=[];return a.time.forEach((s,r)=>{const i=[];for(const o of Ot){const l=p=>a[`${p}_${o}hPa`]?.[r],c=l("temperature"),u=l("relative_humidity"),d=l("wind_speed"),h=l("wind_direction");if([c,u,d,h].some(p=>p==null))return;i.push({pressureHpa:o,temperatureC:c,relativeHumidity:u/100,windSpeedMs:d,windFromDeg:h})}n.push({t:Date.parse(`${s}Z`),levels:i})}),n.length>0?{status:"found",samples:n,source:e}:{status:"outside"}}}const pe=st.point("upperAir").provide(st.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 le}]);class y{static DEFAULT_KIND=V.DEFAULT_KIND;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){return V.kindOf(t,e)}static flies(t){return V.flies(t)}static ridden(t,e,a,n=()=>{}){const s=it.originOf(t);if(s)for(const r of t.decor){const i=V.kindOf(r,n(r));if(!i)continue;const o=r.sizeM,l=Math.max(o?.widthM??0,o?.lengthM??0,o?.heightM??0)/2;if(l<=0)continue;const c=y.pointAt(r,e,s),{distanceKm:u}=j.seenFrom(a,{lat:c.lat,lng:c.lng,heightM:c.altitudeFt/y.FT_PER_M});if(u*1e3<=l)return{decor:r,kind:i}}}voices(t,e,a,n={},s=()=>{}){const r=it.originOf(t);if(!r)return[];const i=new Map,o=new Map,l=Math.max(t.observerTrack.duration,(t.event.durationSeconds??0)*1e3),c=y.ridden(t,e,a,s)?.decor;for(const u of t.decor){const d=u===c?void 0:V.kindOf(u,s(u));if(!d)continue;const h=`${y.ID_PREFIX}${u.id}`;i.set(h,this.trackOf(u,h,r,l)),o.set(h,d)}for(const u of this.tracks.keys())i.has(u)||this.tracks.delete(u);return i.size===0?[]:R.voices(new Set(i.keys()),i,new Map,u=>String(u.icao),a,e,{...n,kindOf:u=>o.get(u)})}trackOf(t,e,a,n){const s=JSON.stringify([t.track,t.eastM,t.northM,t.headingDeg,a.lat,a.lng,n]),r=this.tracks.get(e);if(r?.key===s)return r.track;const i=[];for(let d=0;d<=n;d+=y.STEP_MS)i.push(y.pointAt(t,d,a));(i.length===0||i[i.length-1].t<n)&&i.push(y.pointAt(t,n,a));const o=i[0],l=i[1]??o,c=d=>(l[d]-o[d])/(l.t-o.t||1);for(let d=y.STEP_MS*10;d<=y.LEAD_MS;d+=y.STEP_MS*10)i.unshift({t:-d,lat:o.lat-c("lat")*d,lng:o.lng-c("lng")*d,altitudeFt:Math.max(0,o.altitudeFt-c("altitudeFt")*d)});const u={icao:y.hash(e),nonIcao:!0,points:i};return this.tracks.set(e,{key:s,track:u}),u}static pointAt(t,e,a){const n=Bt(t,e),s=at(n.eastM,-n.northM,a.lat,a.lng);return{t:e,lat:s.lat,lng:s.lng,altitudeFt:n.altitudeM*y.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 z{static CABIN_DB_A={"airliner-wide":76,"airliner-narrow":78,"regional-jet":78,"business-jet":82,"regional-turboprop":84,"turboprop-light":88,"light-piston":92,"piston-heavy":90,"military-jet":95,ultralight:95,"helicopter-light":95,"helicopter-medium":96,"helicopter-heavy":98,glider:70,balloon:60};static JET_CABINS=["airliner-narrow","airliner-wide","airliner-supersonic","regional-jet","business-jet"];static JET_CABIN_SHAPE_DB=[-3,-4,-13,-24,-33,-36,-42,-55];static DEFAULT_DB_A=78;static voice(t,e={}){const a=ot.aircraftOf(t);if(!a)return;const n=M.noiseOfKind(a),s=ot.insulationDb(t),r=z.JET_CABINS.includes(a)&&t?.windowsOpen!==!0?z.JET_CABIN_SHAPE_DB.map((c,u)=>c+A.aWeightingDb(A.OCTAVES[u])):n.soundPowerA.map((c,u)=>c-s[u]),i=A.sumDb(r),o=z.levelDbA(a,t?.noise),l=r.map(c=>c-i+o);return{id:"observer:cabin",kind:a,bandAmplitudes:R.bandAmplitudes(l,e.ambientDbA??0,e.referenceAmplitude,{ambientShapeDb:e.ambientShapeDb,expandUnderKnee:e.expandUnderKnee}),levelDbA:o,inside:!0,distanceKm:0,dopplerRatio:1,azimuthDeg:0,elevationDeg:0,character:n.character}}static levelDbA(t,e){return(z.CABIN_DB_A[t]??z.DEFAULT_DB_A)+20*Math.log10(Math.max(e??1,.01))}}class W{static STEP_MS=250;static FT_PER_M=1/.3048;static ID_PREFIX="body:";tracks=new Map;static noiseOf(t){const e=M.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,r,i={}){const o=new Map,l=new Map,c=new Map;for(const d of t){if(!d.sound)continue;const h=`${W.ID_PREFIX}${d.id}`,p=this.trackOf(d,h,e,n,r);p&&(o.set(h,p),l.set(h,d.sound.kind),c.set(h,W.noiseOf(d.sound)))}for(const d of this.tracks.keys())o.has(d)||this.tracks.delete(d);if(o.size===0)return[];const u=at(a.eastM,-a.northM,n.lat,n.lng);return R.voices(new Set(o.keys()),o,new Map,d=>String(d.icao),{lat:u.lat,lng:u.lng,heightM:a.upM},s,{...i,kindOf:d=>l.get(d),noiseOf:d=>c.get(d)})}trackOf(t,e,a,n,s){const r=`${n.lat},${n.lng},${s}`,i=this.tracks.get(e);if(i&&i.body===t&&i.origin===r)return i.track;const o=[];for(let c=-12e4;c<=s;c+=W.STEP_MS){const u=a(t,c);if(!u)continue;const d=at(u.eastM,-u.northM,n.lat,n.lng);o.push({t:c,lat:d.lat,lng:d.lng,altitudeFt:u.upM*W.FT_PER_M})}if(o.length<2)return;const l={icao:W.hash(e),nonIcao:!0,points:o};return this.tracks.set(e,{body:t,origin:r,track:l}),l}static hash(t){let e=0;for(let a=0;a<t.length;a++)e=e*31+t.charCodeAt(a)>>>0;return e}}export{X as AircraftAudio,K as AircraftContrails,U as AircraftModels,Rt as AmbientNoise,W as BodyHearing,z as CabinHearing,y as DecorAircraftHearing,T as TrafficDecor,de as TrafficInfos,R as TrafficSound,Q as TrafficTooltip,pe as UPPER_AIR_SOURCES};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{a$ as M,b0 as $,aU as I}from"./rr0-sighting-editor.mjs";class d{static RECORD_BYTES=20;static NON_ICAO_FLAG=1<<24;static UNKNOWN=65535;static MAX_DT=35999;static decode(t){if(t.length%d.RECORD_BYTES!==0)throw new Error(`An aircraft tile is a multiple of ${d.RECORD_BYTES} bytes, not ${t.length}`);const e=new DataView(t.buffer,t.byteOffset,t.byteLength),c=[];for(let n=0;n<t.length;n+=d.RECORD_BYTES){const s=e.getUint32(n,!0),a=e.getUint16(n+16,!0),r=e.getUint16(n+18,!0);c.push({icao:s&16777215,nonIcao:(s&d.NON_ICAO_FLAG)!==0,secondsInHour:e.getUint16(n+4,!0)/10,lat:e.getInt32(n+6,!0)/1e5,lng:e.getInt32(n+10,!0)/1e5,altitudeFt:e.getInt16(n+14,!0)*25,groundSpeedKt:a===d.UNKNOWN?void 0:a/10,trackDeg:r===d.UNKNOWN?void 0:r/10})}return c}}const w="https://ufoathome.org/aircraft/index.json";class f{citation=M;static DEFAULT_RADIUS_KM=150;static FLAG_MILITARY=1;static FLAG_PIA=4;static FLAG_LADD=8;static KM_PER_DEG=111.32;static HOUR_MS=36e5;fetchImpl;indexUrls;index;hours=new Map;tiles=new Map;shards=new Map;constructor(t={}){this.fetchImpl=t.fetchImpl??fetch.bind(globalThis),this.indexUrls=t.indexUrls??f.defaultIndexUrls()}static defaultIndexUrls(){const t=[];return typeof location<"u"&&/^https?:$/.test(location.protocol)&&t.push(new URL("/aircraft/index.json",location.href).href),t.includes(w)||t.push(w),t}mayCover(t){return $.mayCover(t)}async between(t,e,c,n=f.DEFAULT_RADIUS_KM){const s=await this.loadIndex();if(!s)return{status:"failed"};const a=[];for(let o=Math.floor(e/f.HOUR_MS);o<=Math.floor(c/f.HOUR_MS);o++)a.push(o);if(!a.every(o=>s.index.days.includes(f.dayOf(o))))return{status:"outside"};const r=f.tilesAround(t,n);try{const o=(await Promise.all(a.flatMap(u=>r.map(i=>this.tileOf(s.base,u,i))))).flat();return{status:"found",tracks:f.merge(o,t,e,c,n)}}catch{return{status:"failed"}}}async describe(t,e){const c=await this.loadIndex();if(!c)return;const n=t.icao.toString(16).padStart(6,"0"),s=t.nonIcao?"non-icao":n.slice(0,2),a=`${e}/${s}`;let r=this.shards.get(a);r||(r=this.fetchImpl(new URL(`${e}/aircraft/${s}.json`,c.base).href).then(g=>g.ok?g.json():{}).catch(()=>({})),this.shards.set(a,r));const o=(await r)[t.nonIcao?`~${n}`:n];if(!o)return;const[u,i,l,h=0]=o,p={registration:u||void 0,type:i||void 0,category:l||void 0,military:(h&f.FLAG_MILITARY)!==0||void 0,restricted:(h&(f.FLAG_PIA|f.FLAG_LADD))!==0||void 0};return Object.values(p).some(g=>g!==void 0)?p:void 0}static tilesAround(t,e){const c=e/f.KM_PER_DEG,n=Math.max(-90,t.lat-c),s=Math.min(90,t.lat+c),a=Math.cos(Math.max(Math.abs(n),Math.abs(s))*Math.PI/180),r=a<1e-6?180:e/(f.KM_PER_DEG*a),o=new Set;if(r>=180)for(let i=-180;i<180;i++)o.add(i);else for(let i=Math.floor(t.lng-r);i<=Math.floor(t.lng+r);i++)o.add(I.wrapLongitude(i));const u=[];for(let i=Math.floor(n);i<=Math.min(89,Math.floor(s));i++)for(const l of o)u.push(`${i}_${l}`);return u}static dayOf(t){return new Date(t*f.HOUR_MS).toISOString().slice(0,10)}static merge(t,e,c,n,s){const a=new Map;for(const o of t){const u=o.points.filter(h=>h.t>=c&&h.t<=n&&I.groundDistanceKm(e,h)<=s);if(u.length===0)continue;const i=`${o.nonIcao?"~":""}${o.icao}`,l=a.get(i);l?l.points.push(...u):a.set(i,{icao:o.icao,nonIcao:o.nonIcao,points:u})}const r=[...a.values()];for(const o of r)o.points.sort((u,i)=>u.t-i.t);return r.sort((o,u)=>o.icao-u.icao)}loadIndex(){return this.index??=(async()=>{for(const t of this.indexUrls)try{const e=await this.fetchImpl(t);if(e.ok)return{index:await e.json(),base:t}}catch{}})(),this.index}tileOf(t,e,c){const n=f.dayOf(e),s=String(e%24).padStart(2,"0"),a=`${n}/${s}/${c}`;let r=this.tiles.get(a);return r||(r=this.hourIndex(t,n,s).then(async o=>{const u=o[c];if(!u)return[];const[i,l]=u,h=await this.fetchImpl(new URL(`${n}/${s}.pack`,t).href,{headers:{Range:`bytes=${i}-${i+l-1}`}});if(!h.ok)throw new Error(`The pack of ${n} ${s} h answered ${h.status}`);const p=new Uint8Array(await h.arrayBuffer()),g=h.status===206?p:p.subarray(i,i+l);return f.tracksOf(await f.gunzip(g),e)}),r.catch(()=>this.tiles.delete(a)),this.tiles.set(a,r)),r}hourIndex(t,e,c){const n=`${e}/${c}`;let s=this.hours.get(n);return s||(s=this.fetchImpl(new URL(`${e}/${c}.json`,t).href).then(a=>{if(a.status===404)return{};if(!a.ok)throw new Error(`The index of ${e} ${c} h answered ${a.status}`);return a.json()}),s.catch(()=>this.hours.delete(n)),this.hours.set(n,s)),s}static async gunzip(t){const e=new Blob([t]).stream().pipeThrough(new DecompressionStream("gzip"));return new Uint8Array(await new Response(e).arrayBuffer())}static tracksOf(t,e){const c=new Map;for(const n of d.decode(t)){const s=`${n.nonIcao?"~":""}${n.icao}`;let a=c.get(s);a||c.set(s,a={icao:n.icao,nonIcao:n.nonIcao,points:[]}),a.points.push({t:e*f.HOUR_MS+n.secondsInHour*1e3,lat:n.lat,lng:n.lng,altitudeFt:n.altitudeFt,groundSpeedKt:n.groundSpeedKt,trackDeg:n.trackDeg})}return[...c.values()]}}export{f as AdsbLolArchiveProvider,w as UFOATHOME_AIRCRAFT_INDEX_URL};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{x as b,_ as d,
|
|
1
|
+
import{x as b,_ as d,bn as m,bj as f,bg as u,a9 as v,ab as y,aa as x,I,a7 as T,a8 as L,n as M,ac as S}from"./rr0-sighting-editor.mjs";import{S as E}from"./SkyEventEditorStyle-CvY_AhbI.js";import{D as g}from"./DroneParameters-CdQbwFKD.js";import{a as P,b as k}from"./DroneFlight-D-MWhrXa.js";import{AirshipFlight as w}from"./AirshipFlight-Cvl6xWPY.js";const R=b.catalog({en:()=>d(()=>import("./AirshipParameterTexts_en-DZxqhSI3.js"),[],import.meta.url).then(a=>a.airshipParameterTexts_en),fr:()=>d(()=>import("./AirshipParameterTexts_fr-Cj-D0Xb_.js"),[],import.meta.url).then(a=>a.airshipParameterTexts_fr),es:()=>d(()=>import("./AirshipParameterTexts_es-BDJUZOmr.js"),[],import.meta.url).then(a=>a.airshipParameterTexts_es),it:()=>d(()=>import("./AirshipParameterTexts_it-BhC9cEbs.js"),[],import.meta.url).then(a=>a.airshipParameterTexts_it)});class o{static AIRSHIP="airship";static FLIGHT="flight";static LOOK="look";static LIGHT_NAMES=[...new Set(m.ALL.flatMap(t=>Object.keys(t.lights)))];static viewOf(t){const{airship:i,sign:e,...r}=structuredClone(t),s={...r,airship:typeof i=="string"?i:i.id};return e===!1?s.signLit=!1:e===!0?s.signLit=!0:e&&(s.signLit=!0,e.color&&(s.signColor=e.color)),s}static fromView(t,i){const{airship:e,signLit:r,signColor:s,...n}=t,h=typeof i.airship=="object"?i.airship:void 0,l={...n,airship:h?{...h,id:e}:e},p=typeof i.sign=="object"?i.sign.luminanceCdM2:void 0;return r===!1?l.sign=!1:s!==void 0||p!==void 0?l.sign={...s?{color:s}:{},...p!==void 0?{luminanceCdM2:p}:{}}:r===!0&&(l.sign=!0),l}static typeOf(t){return w.typeOf(t)}static ownLight(t,i){return o.typeOf(t).lights[i]}static signLit(t){const i=f.read(t,"signLit");return typeof i=="boolean"?i:o.typeOf(t).sign?.lit===!0}static light(t){const i=g.textKey(t),e=n=>o.ownLight(n,t)!==void 0,r=n=>{const h=n.lights?.[t];return h===!1?!0:typeof h?.off=="boolean"?h.off:o.ownLight(n,t)?.off===!0},s=n=>e(n)&&!r(n);return[{type:"boolean",key:`lights.${t}.off`,group:i,label:"switchedOff",visibleWhen:e,effective:n=>n.lights?.[t]===!1||o.ownLight(n,t)?.off===!0},{type:"colour",key:`lights.${t}.color`,group:i,label:"colour",visibleWhen:s,effective:n=>o.ownLight(n,t)?.color},{type:"number",key:`lights.${t}.candela`,min:0,max:1e5,step:.1,unit:"cd",group:i,label:"intensity",hint:"eachLed",visibleWhen:s,effective:n=>o.ownLight(n,t)?.candela},{type:"number",key:`lights.${t}.hz`,min:0,max:50,step:.05,unit:"Hz",group:i,label:"flashesASecond",hint:"steadyAtNought",visibleWhen:s,effective:n=>o.ownLight(n,t)?.hz??0},{type:"number",key:`lights.${t}.flashS`,min:.001,max:60,step:.001,unit:"s",group:i,label:"eachFlashLasts",visibleWhen:n=>s(n)&&(f.read(n,`lights.${t}.hz`)??o.ownLight(n,t)?.hz??0)>0,effective:n=>{const h=o.ownLight(n,t),l=f.read(n,`lights.${t}.hz`)??h?.hz??0;return h?.flashS??(l>0?Math.round(500/l)/1e3:void 0)}}]}static SET={kind:"airships",title:"airships",parameters:[{type:"said",key:"title",label:"name",group:o.AIRSHIP},{type:"choice",key:"airship",required:!0,group:o.AIRSHIP,label:"type",choices:m.ALL.map(t=>({value:t.id,label:g.textKey(t.id)}))},{type:"set",key:"explains",group:o.AIRSHIP,label:"standsForTheShapes",options:(t,i)=>{const e=i?.shapes??[],r=(t.explains??[]).filter(s=>!e.some(n=>n.value===s));return[...e,...r.map(s=>({value:s,label:s}))]},empty:"noShape"},{type:"number",key:"seed",min:0,max:4294967295,step:1,group:o.AIRSHIP,effective:()=>1,label:"draw",hint:"whatTheDrawsStartFrom"},{type:"number",key:"wind.fromDeg",min:0,max:360,step:1,unit:"°",group:o.FLIGHT,label:"windFrom",effective:()=>0,hint:"whatItNosesInto"},{type:"number",key:"wind.speedMS",min:0,max:60,step:.1,unit:"m/s",group:o.FLIGHT,label:"windSpeed",effective:()=>0},{type:"boolean",key:"silent",group:o.FLIGHT,label:"silent",hint:"notEvenItsEngines",visibleWhen:t=>o.typeOf(t).sound!==void 0},{type:"colour",key:"color",group:o.LOOK,label:"envelope",effective:t=>o.typeOf(t).color},{type:"colour",key:"finColor",group:o.LOOK,label:"fins",effective:t=>o.typeOf(t).finColor,visibleWhen:t=>o.typeOf(t).glowCdM2===void 0},{type:"boolean",key:"signLit",group:o.LOOK,label:"signLit",hint:"itsSignOfLamps",visibleWhen:t=>o.typeOf(t).sign!==void 0,effective:t=>o.typeOf(t).sign?.lit===!0},{type:"colour",key:"signColor",group:o.LOOK,label:"signColour",visibleWhen:t=>o.typeOf(t).sign!==void 0&&o.signLit(t),effective:t=>o.typeOf(t).sign?.color},{type:"boolean",key:"lit",group:o.LOOK,label:"litFromWithin",hint:"itsEnvelopeGlows",effective:()=>!0,visibleWhen:t=>o.typeOf(t).glowCdM2!==void 0},...o.LIGHT_NAMES.flatMap(t=>o.light(t))]};static WAYPOINT={...g.WAYPOINT,kind:"airships-waypoint"};static waypointAt(t,i){const e=P.pathOf(t);if(e.length===0)return{t:Math.round(i),eastM:0,northM:0,altitudeM:0};const r=new k(e,!1).at(i),s=n=>Math.round(n*10)/10;return{t:Math.round(i),eastM:s(r.eastM),northM:s(r.northM),altitudeM:s(r.upM)}}static publish(){u.publish(o.SET),u.publish(o.WAYPOINT)}}const H=b.catalog({en:()=>d(()=>import("./AirshipEditorMessages_en-CFafbbN8.js"),[],import.meta.url).then(a=>a.airshipEditorMessages_en),fr:()=>d(()=>import("./AirshipEditorMessages_fr-Bhj6QKCL.js"),[],import.meta.url).then(a=>a.airshipEditorMessages_fr),es:()=>d(()=>import("./AirshipEditorMessages_es-ht4kFQUD.js"),[],import.meta.url).then(a=>a.airshipEditorMessages_es),it:()=>d(()=>import("./AirshipEditorMessages_it-Cfl9mFjn.js"),[],import.meta.url).then(a=>a.airshipEditorMessages_it)});class c{constructor(t,i,e){this.container=t,this.host=i,E.attach(t,"airship-editor-part",c.STYLE),this.language=e,u.of("airships")||o.publish(),this.ready=this.setLanguage(e)}messages;ready;parameterTexts;languageToken=0;currentId;form;list;timeline;pointForm;pointIndex=0;language;shown=[];viewed;static STYLE='.airship-editor-part { flex-basis: 100%; min-width: 0; } .airship-editor-part #airship-list, .airship-editor-part #airship-timeline { flex-basis: 100%; min-width: 0; } .airship-editor-part #airship-timeline { padding: 4px 0; } .airship-editor-part #airship-path > .icon-btn { align-self: flex-end; } .airship-editor-part .launch-editor, .airship-editor-part .launch-fields { display: flex; flex-wrap: wrap; gap: 8px; align-items: end; } .airship-editor-part .launch-fields { flex-basis: 100%; min-width: 0; } .airship-editor-part [hidden] { display: none !important; } .airship-editor-part select { min-width: 0; width: 100%; } .airship-editor-part .launch-intro { flex-basis: 100%; margin: 0; } .airship-editor-part .launch-parameters { flex-basis: 100%; min-width: 0; display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-start; } .airship-editor-part .parameter-group { flex: 1 1 14em; min-width: 0; box-sizing: border-box; margin: 0; display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: flex-start; align-content: flex-start; } .airship-editor-part input, .airship-editor-part select { max-width: 100%; box-sizing: border-box; } .airship-editor-part input[type="text"] { width: 12em; } .airship-editor-part label { min-width: 0; max-width: 100%; } .airship-editor-part input.parameter-derived::placeholder { opacity: .65; } .airship-editor-part .launch-path { flex: 1 1 100%; min-width: 0; box-sizing: border-box; margin: 0; display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: flex-start; }';static PATH_COLOR="#3b82c4";static MIN_POINTS=1;async setLanguage(t){const i=++this.languageToken;this.language=t;const[e,r]=await Promise.all([H.load(t),R.load(t)]);i===this.languageToken&&(this.messages=e,this.parameterTexts=r,this.render(),this.sync())}sync(){if(!this.messages)return;const t=this.flights;this.shown=[...t],t.some(e=>e.id===this.currentId)||(this.currentId=t[0]?.id),this.list?.setItems(t.map(e=>({id:e.id,label:this.labelOf(e)})),this.currentId),this.syncAddState();const i=this.current;this.element("airship-fields").hidden=i===void 0,i&&(this.syncTethered(),this.form??=new v(this.element("airship-parameters"),this.language,"airships.",{said:()=>this.host.said(),writingLanguage:()=>this.host.writingLanguage()}),this.form.show(this.resolved(o.SET),new y(()=>this.view,e=>this.editView(r=>e(r)),()=>({shapes:this.host.shapes().map(e=>({value:e.id,label:e.label}))}),this.host.positionPlace?.()),()=>this.written()),this.syncPoint(!0))}refresh(){if(!this.messages)return;this.syncAddState();const t=this.flights;if(t.length===this.shown.length&&t.every((i,e)=>i.id===this.shown[e].id)){this.syncTimeline();return}this.sync()}setTime(t){this.messages&&this.timeline?.setTime(t)}get current(){return this.flights.find(t=>t.id===this.currentId)}get view(){const t=this.current;if(t)return this.viewed?.of!==t&&(this.viewed={of:t,view:o.viewOf(t)}),this.viewed.view}syncAddState(){const t=this.frontOfObserver()!==void 0;this.list?.setAddState(t,t?void 0:this.messages.addNowhere)}syncTethered(){const t=this.current;this.element("airship-tethered").hidden=!t||!w.typeOf(t).tethered}resolved(t){return x.resolve(t,this.parameterTexts)}render(){if(!this.messages)return;const t=this.messages;this.form=void 0,this.pointForm=void 0,this.container.innerHTML=`<div class="launch-editor">
|
|
2
2
|
<p class="launch-intro">${t.intro}</p>
|
|
3
3
|
<div id="airship-list"></div>
|
|
4
4
|
<div id="airship-fields" class="launch-fields">
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as h,b as J,D as N}from"./DroneFlight-
|
|
1
|
+
import{a as h,b as J,D as N}from"./DroneFlight-D-MWhrXa.js";import{bn as H}from"./rr0-sighting-editor.mjs";class s{static SAMPLE_MS=500;static MAX_KEYFRAMES=2e4;static BANK_SHARE=.25;static MAX_PITCH_DEG=20;static TITLES={blimp:{en:"Blimp",fr:"Dirigeable souple",es:"Dirigible flexible",it:"Dirigibile floscio"},"zeppelin-nt":{en:"Zeppelin NT",fr:"Zeppelin NT",es:"Zeppelin NT",it:"Zeppelin NT"},lightship:{en:"Lightship",fr:"Dirigeable lumineux",es:"Dirigible luminoso",it:"Dirigibile luminoso"},aerostat:{en:"Tethered aerostat",fr:"Aérostat captif",es:"Aeróstato cautivo",it:"Aerostato frenato"},rigid:{en:"Rigid airship",fr:"Dirigeable rigide",es:"Dirigible rígido",it:"Dirigibile rigido"}};static computed=new Map;static bodiesOf(t){const o=JSON.stringify(t);let e=s.computed.get(o);return e||(e=s.compute(t),s.computed.set(o,e),s.computed.size>16&&s.computed.delete(s.computed.keys().next().value)),e}static typeOf(t){const o=t.airship,e=typeof o=="string"?o:o?.id,i=H.byId(e)??H.ALL[0];return typeof o=="string"?i:{...i,...o,id:i.id}}static lightsOf(t){const o={};for(const[e,i]of Object.entries(s.typeOf(t).lights)){const r=t.lights?.[e];if(r===!1)continue;const c={...i,...r??{}};c.off||(o[e]=c)}return o}static signOf(t){const o=s.typeOf(t).sign;if(!o)return;const e=t.sign;if(!(e===!1||e===void 0&&!o.lit))return{color:o.color,luminanceCdM2:o.luminanceCdM2,...typeof e=="object"?e:{}}}static compute(t){const o=h.pathOf(t);if(o.length===0)return[];const e=s.typeOf(t),i=h.randomFrom(t.seed??1),r=o[0].t,c=Math.max(o[o.length-1].t,r),L=Math.max(s.SAMPLE_MS,Math.ceil((c-r)/s.MAX_KEYFRAMES/100)*100),S=(t.wind?.fromDeg??0)*Math.PI/180,w=t.wind?.speedMS??0,j=-w*Math.sin(S),z=-w*Math.cos(S),K=new J(o,!1),M={period:40+40*i(),phase:2*Math.PI*i(),amplitudeDeg:4+4*i()},O=n=>{if(!e.tethered){const d=K.at(n);return{eastM:d.eastM,northM:d.northM,upM:d.upM}}const a=(n-r)/1e3,l=Math.sin(2*Math.PI*a/M.period+M.phase);return{eastM:o[0].eastM+3*l,northM:o[0].northM+3*Math.cos(2*Math.PI*a/M.period*.7),upM:o[0].upM+1.5*l}},u=s.lightsOf(t),y=Object.fromEntries(Object.entries(u).map(([n,a])=>[n,a.phase??i()])),p=[];for(let n=r;n<=c+1e-6;n+=L)p.push(Math.round(n));p[p.length-1]<c&&p.push(Math.round(c));const I=[...new Set([...p,...h.switchesOf(u,y,r,c)])].filter(n=>n>=r&&n<=c).sort((n,a)=>n-a),T=s.signOf(t),R=e.glowCdM2!==void 0&&t.lit!==!1?e.glowCdM2:0,X=e.sizeM.heightM/2;let b;const k=I.map((n,a)=>{const l=O(n),d=O(n-1e3),E=O(n+1e3),m={e:(E.eastM-d.eastM)/2,n:(E.northM-d.northM)/2,u:(E.upM-d.upM)/2},C=m.e-j,x=m.n-z,G=Math.hypot(C,x);let f;if(e.tethered||G<1){const D=w>.3?(t.wind.fromDeg+360)%360:b??0;f=e.tethered?(D+M.amplitudeDeg*Math.sin(2*Math.PI*(n-r)/1e3/M.period+M.phase)+360)%360:D}else f=(Math.atan2(C,x)*180/Math.PI+360)%360;const v=Math.hypot(m.e,m.n),Z=e.tethered?0:Math.max(-s.MAX_PITCH_DEG,Math.min(s.MAX_PITCH_DEG,Math.atan2(m.u,Math.max(v,2))*180/Math.PI)),B=b===void 0?0:((f-b+540)%360-180)/Math.max(.001,(n-(I[a-1]??n))/1e3),Y=e.tethered?0:Math.max(-10,Math.min(10,Math.atan(v*B*Math.PI/180/N.G)*180/Math.PI*s.BANK_SHARE));b=f;const P=h.luminancesAt(u,y,n,I[a+1]===n+1);if(e.sign)for(const D of["left","right"])P[`light-sign-${D}`]=T?.luminanceCdM2??0;return e.glowCdM2!==void 0&&(P.envelope=R),{t:n,eastM:s.round(l.eastM),northM:s.round(l.northM),altitudeM:s.round(l.upM-X),...a===0?{sizeM:e.sizeM,appearance:{color:t.color??e.color,albedo:e.albedo}}:{},attitude:{headingDeg:s.round(f,10),pitchDeg:s.round(Z,10),rollDeg:s.round(Y,10)},lights:P}}),g={envelopeColor:t.color??e.color};e.modelId!=="ufoathome-airship-lightship"&&(g.finColor=t.finColor??e.finColor),e.sign&&(g.signColor=T?.color??e.sign.color);for(const[n,a]of Object.entries(u))g[N.colourKeyOf(n)]=a.color;return[{id:t.id,title:t.title??s.TITLES[e.id],...t.explains?{explains:t.explains}:{},model:{id:e.modelId},modelParameters:g,lamps:h.lampsOf(u,y),...t.silent||!e.sound?{}:{sound:{kind:e.sound}},track:k}]}static round(t,o=100){return Math.round(t*o)/o}}export{s as AirshipFlight};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{bQ as F,bs as y}from"./rr0-sighting-editor.mjs";const N=[1900,1905,1910,1915,1920,1925,1930,1935,1940,1945,1950,1955,1960,1965,1970,1975,1980,1985,1990,1995,2e3,2005,2010,2015,2020,2025],b=[["g",1,0],["g",1,1],["h",1,1],["g",2,0],["g",2,1],["h",2,1],["g",2,2],["h",2,2],["g",3,0],["g",3,1],["h",3,1],["g",3,2],["h",3,2],["g",3,3],["h",3,3],["g",4,0],["g",4,1],["h",4,1],["g",4,2],["h",4,2],["g",4,3],["h",4,3],["g",4,4],["h",4,4],["g",5,0],["g",5,1],["h",5,1],["g",5,2],["h",5,2],["g",5,3],["h",5,3],["g",5,4],["h",5,4],["g",5,5],["h",5,5],["g",6,0],["g",6,1],["h",6,1],["g",6,2],["h",6,2],["g",6,3],["h",6,3],["g",6,4],["h",6,4],["g",6,5],["h",6,5],["g",6,6],["h",6,6],["g",7,0],["g",7,1],["h",7,1],["g",7,2],["h",7,2],["g",7,3],["h",7,3],["g",7,4],["h",7,4],["g",7,5],["h",7,5],["g",7,6],["h",7,6],["g",7,7],["h",7,7],["g",8,0],["g",8,1],["h",8,1],["g",8,2],["h",8,2],["g",8,3],["h",8,3],["g",8,4],["h",8,4],["g",8,5],["h",8,5],["g",8,6],["h",8,6],["g",8,7],["h",8,7],["g",8,8],["h",8,8],["g",9,0],["g",9,1],["h",9,1],["g",9,2],["h",9,2],["g",9,3],["h",9,3],["g",9,4],["h",9,4],["g",9,5],["h",9,5],["g",9,6],["h",9,6],["g",9,7],["h",9,7],["g",9,8],["h",9,8],["g",9,9],["h",9,9],["g",10,0],["g",10,1],["h",10,1],["g",10,2],["h",10,2],["g",10,3],["h",10,3],["g",10,4],["h",10,4],["g",10,5],["h",10,5],["g",10,6],["h",10,6],["g",10,7],["h",10,7],["g",10,8],["h",10,8],["g",10,9],["h",10,9],["g",10,10],["h",10,10],["g",11,0],["g",11,1],["h",11,1],["g",11,2],["h",11,2],["g",11,3],["h",11,3],["g",11,4],["h",11,4],["g",11,5],["h",11,5],["g",11,6],["h",11,6],["g",11,7],["h",11,7],["g",11,8],["h",11,8],["g",11,9],["h",11,9],["g",11,10],["h",11,10],["g",11,11],["h",11,11],["g",12,0],["g",12,1],["h",12,1],["g",12,2],["h",12,2],["g",12,3],["h",12,3],["g",12,4],["h",12,4],["g",12,5],["h",12,5],["g",12,6],["h",12,6],["g",12,7],["h",12,7],["g",12,8],["h",12,8],["g",12,9],["h",12,9],["g",12,10],["h",12,10],["g",12,11],["h",12,11],["g",12,12],["h",12,12],["g",13,0],["g",13,1],["h",13,1],["g",13,2],["h",13,2],["g",13,3],["h",13,3],["g",13,4],["h",13,4],["g",13,5],["h",13,5],["g",13,6],["h",13,6],["g",13,7],["h",13,7],["g",13,8],["h",13,8],["g",13,9],["h",13,9],["g",13,10],["h",13,10],["g",13,11],["h",13,11],["g",13,12],["h",13,12],["g",13,13],["h",13,13]],P=[[-31543,-2298,5922,-677,2905,-1061,924,1121,1022,-1469,-330,1256,3,572,523,876,628,195,660,-69,-361,-210,134,-75,-184,328,-210,264,53,5,-33,-86,-124,-16,3,63,61,-9,-11,83,-217,2,-58,-35,59,36,-90,-69,70,-55,-45,0,-13,34,-10,-41,-1,-21,28,18,-12,6,-22,11,8,8,-4,-14,-9,7,1,-13,2,5,-9,16,5,-5,8,-18,8,10,-20,1,14,-11,5,12,-3,1,-2,-2,8,2,10,-1,-2,-1,2,-3,-4,2,2,1,-5,2,-2,6,6,-4,4,0,0,-2,2,4,2,0,0,-6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[-31464,-2298,5909,-728,2928,-1086,1041,1065,1037,-1494,-357,1239,34,635,480,880,643,203,653,-77,-380,-201,146,-65,-192,328,-193,259,56,-1,-32,-93,-125,-26,11,62,60,-7,-11,86,-221,4,-57,-32,57,32,-92,-67,70,-54,-46,0,-14,33,-11,-41,0,-20,28,18,-12,6,-22,11,8,8,-4,-15,-9,7,1,-13,2,5,-8,16,5,-5,8,-18,8,10,-20,1,14,-11,5,12,-3,1,-2,-2,8,2,10,0,-2,-1,2,-3,-4,2,2,1,-5,2,-2,6,6,-4,4,0,0,-2,2,4,2,0,0,-6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[-31354,-2297,5898,-769,2948,-1128,1176,1e3,1058,-1524,-389,1223,62,705,425,884,660,211,644,-90,-400,-189,160,-55,-201,327,-172,253,57,-9,-33,-102,-126,-38,21,62,58,-5,-11,89,-224,5,-54,-29,54,28,-95,-65,71,-54,-47,1,-14,32,-12,-40,1,-19,28,18,-13,6,-22,11,8,8,-4,-15,-9,6,1,-13,2,5,-8,16,5,-5,8,-18,8,10,-20,1,14,-11,5,12,-3,1,-2,-2,8,2,10,0,-2,-1,2,-3,-4,2,2,1,-5,2,-2,6,6,-4,4,0,0,-2,2,4,2,0,0,-6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[-31212,-2306,5875,-802,2956,-1191,1309,917,1084,-1559,-421,1212,84,778,360,887,678,218,631,-109,-416,-173,178,-51,-211,327,-148,245,58,-16,-34,-111,-126,-51,32,61,57,-2,-10,93,-228,8,-51,-26,49,23,-98,-62,72,-54,-48,2,-14,31,-12,-38,2,-18,28,19,-15,6,-22,11,8,8,-4,-15,-9,6,2,-13,3,5,-8,16,6,-5,8,-18,8,10,-20,1,14,-11,5,12,-3,1,-2,-2,8,2,10,0,-2,-1,2,-3,-4,2,2,1,-5,2,-2,6,6,-4,4,0,0,-2,1,4,2,0,0,-6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[-31060,-2317,5845,-839,2959,-1259,1407,823,1111,-1600,-445,1205,103,839,293,889,695,220,616,-134,-424,-153,199,-57,-221,326,-122,236,58,-23,-38,-119,-125,-62,43,61,55,0,-10,96,-233,11,-46,-22,44,18,-101,-57,73,-54,-49,2,-14,29,-13,-37,4,-16,28,19,-16,6,-22,11,7,8,-3,-15,-9,6,2,-14,4,5,-7,17,6,-5,8,-19,8,10,-20,1,14,-11,5,12,-3,1,-2,-2,9,2,10,0,-2,-1,2,-3,-4,2,2,1,-5,2,-2,6,6,-4,4,0,0,-2,1,4,3,0,0,-6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[-30926,-2318,5817,-893,2969,-1334,1471,728,1140,-1645,-462,1202,119,881,229,891,711,216,601,-163,-426,-130,217,-70,-230,326,-96,226,58,-28,-44,-125,-122,-69,51,61,54,3,-9,99,-238,14,-40,-18,39,13,-103,-52,73,-54,-50,3,-14,27,-14,-35,5,-14,29,19,-17,6,-21,11,7,8,-3,-15,-9,6,2,-14,4,5,-7,17,7,-5,8,-19,8,10,-20,1,14,-11,5,12,-3,1,-2,-2,9,2,10,0,-2,-1,2,-3,-4,2,2,1,-5,2,-2,6,6,-4,4,0,0,-2,1,4,3,0,0,-6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[-30805,-2316,5808,-951,2980,-1424,1517,644,1172,-1692,-480,1205,133,907,166,896,727,205,584,-195,-422,-109,234,-90,-237,327,-72,218,60,-32,-53,-131,-118,-74,58,60,53,4,-9,102,-242,19,-32,-16,32,8,-104,-46,74,-54,-51,4,-15,25,-14,-34,6,-12,29,18,-18,6,-20,11,7,8,-3,-15,-9,5,2,-14,5,5,-6,18,8,-5,8,-19,8,10,-20,1,14,-12,5,12,-3,1,-2,-2,9,3,10,0,-2,-2,2,-3,-4,2,2,1,-5,2,-2,6,6,-4,4,0,0,-2,1,4,3,0,0,-6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[-30715,-2306,5812,-1018,2984,-1520,1550,586,1206,-1740,-494,1215,146,918,101,903,744,188,565,-226,-415,-90,249,-114,-241,329,-51,211,64,-33,-64,-136,-115,-76,64,59,53,4,-8,104,-246,25,-25,-15,25,4,-106,-40,74,-53,-52,4,-17,23,-14,-33,7,-11,29,18,-19,6,-19,11,7,8,-3,-15,-9,5,1,-15,6,5,-6,18,8,-5,7,-19,8,10,-20,1,15,-12,5,11,-3,1,-3,-2,9,3,11,0,-2,-2,2,-3,-4,2,2,1,-5,2,-2,6,6,-4,4,0,0,-1,2,4,3,0,0,-6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[-30654,-2292,5821,-1106,2981,-1614,1566,528,1240,-1790,-499,1232,163,916,43,914,762,169,550,-252,-405,-72,265,-141,-241,334,-33,208,71,-33,-75,-141,-113,-76,69,57,54,4,-7,105,-249,33,-18,-15,18,0,-107,-33,74,-53,-52,4,-18,20,-14,-31,7,-9,29,17,-20,5,-19,11,7,8,-3,-14,-10,5,1,-15,6,5,-5,19,9,-5,7,-19,8,10,-21,1,15,-12,5,11,-3,1,-3,-2,9,3,11,1,-2,-2,2,-3,-4,2,2,1,-5,2,-2,6,6,-4,4,0,0,-1,2,4,3,0,0,-6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[-30594,-2285,5810,-1244,2990,-1702,1578,477,1282,-1834,-499,1255,186,913,-11,944,776,144,544,-276,-421,-55,304,-178,-253,346,-12,194,95,-20,-67,-142,-119,-82,82,59,57,6,6,100,-246,16,-25,-9,21,-16,-104,-39,70,-40,-45,0,-18,0,2,-29,6,-10,28,15,-17,29,-22,13,7,12,-8,-21,-5,-12,9,-7,7,2,-10,18,7,3,2,-11,5,-21,-27,1,17,-11,29,3,-9,16,4,-3,9,-4,6,-3,1,-4,8,-3,11,5,1,1,2,-20,-5,-1,-1,-6,8,6,-1,-4,-3,-2,5,0,-2,-2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[-30554,-2250,5815,-1341,2998,-1810,1576,381,1297,-1889,-476,1274,206,896,-46,954,792,136,528,-278,-408,-37,303,-210,-240,349,3,211,103,-20,-87,-147,-122,-76,80,54,57,-1,4,99,-247,33,-16,-12,12,-12,-105,-30,65,-55,-35,2,-17,1,0,-40,10,-7,36,5,-18,19,-16,22,15,5,-4,-22,-1,0,11,-21,15,-8,-13,17,5,-4,-1,-17,3,-7,-24,-1,19,-25,12,10,2,5,2,-5,8,-2,8,3,-11,8,-7,-8,4,13,-1,-2,13,-10,-4,2,4,-3,12,6,3,-3,2,6,10,11,3,8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[-30500,-2215,5820,-1440,3003,-1898,1581,291,1302,-1944,-462,1288,216,882,-83,958,796,133,510,-274,-397,-23,290,-230,-229,360,15,230,110,-23,-98,-152,-121,-69,78,47,57,-9,3,96,-247,48,-8,-16,7,-12,-107,-24,65,-56,-50,2,-24,10,-4,-32,8,-11,28,9,-20,18,-18,11,9,10,-6,-15,-14,5,6,-23,10,3,-7,23,6,-4,9,-13,4,9,-11,-4,12,-5,7,2,6,4,-2,1,10,2,7,2,-6,5,5,-3,-5,-4,-1,0,2,-8,-3,-2,7,-4,4,1,-2,-3,6,7,-2,-1,0,-3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[-30421,-2169,5791,-1555,3002,-1967,1590,206,1302,-1992,-414,1289,224,878,-130,957,800,135,504,-278,-394,3,269,-255,-222,362,16,242,125,-26,-117,-156,-114,-63,81,46,58,-10,1,99,-237,60,-1,-20,-2,-11,-113,-17,67,-56,-55,5,-28,15,-6,-32,7,-7,23,17,-18,8,-17,15,6,11,-4,-14,-11,7,2,-18,10,4,-5,23,10,1,8,-20,4,6,-18,0,12,-9,2,1,0,4,-3,-1,9,-2,8,3,0,-1,5,1,-3,4,4,1,0,0,-1,2,4,-5,6,1,1,-1,-1,6,2,0,0,-7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[-30334,-2119,5776,-1662,2997,-2016,1594,114,1297,-2038,-404,1292,240,856,-165,957,804,148,479,-269,-390,13,252,-269,-219,358,19,254,128,-31,-126,-157,-97,-62,81,45,61,-11,8,100,-228,68,4,-32,1,-8,-111,-7,75,-57,-61,4,-27,13,-2,-26,6,-6,26,13,-23,1,-12,13,5,7,-4,-12,-14,9,0,-16,8,4,-1,24,11,-3,4,-17,8,10,-22,2,15,-13,7,10,-4,-1,-5,-1,10,5,10,1,-4,-2,1,-2,-3,2,2,1,-5,2,-2,6,4,-4,4,0,0,-2,2,3,2,0,0,-6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[-30220,-2068,5737,-1781,3e3,-2047,1611,25,1287,-2091,-366,1278,251,838,-196,952,800,167,461,-266,-395,26,234,-279,-216,359,26,262,139,-42,-139,-160,-91,-56,83,43,64,-12,15,100,-212,72,2,-37,3,-6,-112,1,72,-57,-70,1,-27,14,-4,-22,8,-2,23,13,-23,-2,-11,14,6,7,-2,-15,-13,6,-3,-17,5,6,0,21,11,-6,3,-16,8,10,-21,2,16,-12,6,10,-4,-1,-5,0,10,3,11,1,-2,-1,1,-3,-3,1,2,1,-5,3,-1,4,6,-4,4,0,1,-1,0,3,3,1,-1,-4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[-30100,-2013,5675,-1902,3010,-2067,1632,-68,1276,-2144,-333,1260,262,830,-223,946,791,191,438,-265,-405,39,216,-288,-218,356,31,264,148,-59,-152,-159,-83,-49,88,45,66,-13,28,99,-198,75,1,-41,6,-4,-111,11,71,-56,-77,1,-26,16,-5,-14,10,0,22,12,-23,-5,-12,14,6,6,-1,-16,-12,4,-8,-19,4,6,0,18,10,-10,1,-17,7,10,-21,2,16,-12,7,10,-4,-1,-5,-1,10,4,11,1,-3,-2,1,-3,-3,1,2,1,-5,3,-2,4,5,-4,4,-1,1,-1,0,3,3,1,-1,-5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[-29992,-1956,5604,-1997,3027,-2129,1663,-200,1281,-2180,-336,1251,271,833,-252,938,782,212,398,-257,-419,53,199,-297,-218,357,46,261,150,-74,-151,-162,-78,-48,92,48,66,-15,42,93,-192,71,4,-43,14,-2,-108,17,72,-59,-82,2,-27,21,-5,-12,16,1,18,11,-23,-2,-10,18,6,7,0,-18,-11,4,-7,-22,4,9,3,16,6,-13,-1,-15,5,10,-21,1,16,-12,9,9,-5,-3,-6,-1,9,7,10,2,-6,-5,2,-4,-4,1,2,0,-5,3,-2,6,5,-4,3,0,1,-1,2,4,3,0,0,-6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[-29873,-1905,5500,-2072,3044,-2197,1687,-306,1296,-2208,-310,1247,284,829,-297,936,780,232,361,-249,-424,69,170,-297,-214,355,47,253,150,-93,-154,-164,-75,-46,95,53,65,-16,51,88,-185,69,4,-48,16,-1,-102,21,74,-62,-83,3,-27,24,-2,-6,20,4,17,10,-23,0,-7,21,6,8,0,-19,-11,5,-9,-23,4,11,4,14,4,-15,-4,-11,5,10,-21,1,15,-12,9,9,-6,-3,-6,-1,9,7,9,1,-7,-5,2,-4,-4,1,3,0,-5,3,-2,6,5,-4,3,0,1,-1,2,4,3,0,0,-6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[-29775,-1848,5406,-2131,3059,-2279,1686,-373,1314,-2239,-284,1248,293,802,-352,939,780,247,325,-240,-423,84,141,-299,-214,353,46,245,154,-109,-153,-165,-69,-36,97,61,65,-16,59,82,-178,69,3,-52,18,1,-96,24,77,-64,-80,2,-26,26,0,-1,21,5,17,9,-23,0,-4,23,5,10,-1,-19,-10,6,-12,-22,3,12,4,12,2,-16,-6,-10,4,9,-20,1,15,-12,11,9,-7,-4,-7,-2,9,7,8,1,-7,-6,2,-3,-4,2,2,1,-5,3,-2,6,4,-4,3,0,1,-2,3,3,3,-1,0,-6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[-29692,-1784,5306,-2200,3070,-2366,1681,-413,1335,-2267,-262,1249,302,759,-427,940,780,262,290,-236,-418,97,122,-306,-214,352,46,235,165,-118,-143,-166,-55,-17,107,68,67,-17,68,72,-170,67,-1,-58,19,1,-93,36,77,-72,-69,1,-25,28,4,5,24,4,17,8,-24,-2,-6,25,6,11,-6,-21,-9,8,-14,-23,9,15,6,11,-5,-16,-7,-4,4,9,-20,3,15,-10,12,8,-6,-8,-8,-1,8,10,5,-2,-8,-8,3,-3,-6,1,2,0,-4,4,-1,5,4,-5,2,-1,2,-2,5,1,1,-2,0,-7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[-29619.4,-1728.2,5186.1,-2267.7,3068.4,-2481.6,1670.9,-458,1339.6,-2288,-227.6,1252.1,293.4,714.5,-491.1,932.3,786.8,272.6,250,-231.9,-403,119.8,111.3,-303.8,-218.8,351.4,43.8,222.3,171.9,-130.4,-133.1,-168.6,-39.3,-12.9,106.3,72.3,68.2,-17.4,74.2,63.7,-160.9,65.1,-5.9,-61.2,16.9,.7,-90.4,43.8,79,-74,-64.6,0,-24.2,33.3,6.2,9.1,24,6.9,14.8,7.3,-25.4,-1.2,-5.8,24.4,6.6,11.9,-9.2,-21.5,-7.9,8.5,-16.6,-21.5,9.1,15.5,7,8.9,-7.9,-14.9,-7,-2.1,5,9.4,-19.7,3,13.4,-8.4,12.5,6.3,-6.2,-8.9,-8.4,-1.5,8.4,9.3,3.8,-4.3,-8.2,-8.2,4.8,-2.6,-6,1.7,1.7,0,-3.1,4,-.5,4.9,3.7,-5.9,1,-1.2,2,-2.9,4.2,.2,.3,-2.2,-1.1,-7.4,2.7,-1.7,.1,-1.9,1.3,1.5,-.9,-.1,-2.6,.1,.9,-.7,-.7,.7,-2.8,1.7,-.9,.1,-1.2,1.2,-1.9,4,-.9,-2.2,-.3,-.4,.2,.3,.9,2.5,-.2,-2.6,.9,.7,-.5,.3,.3,0,-.3,0,-.4,.3,-.1,-.9,-.2,-.4,-.4,.8,-.2,-.9,-.9,.3,.2,.1,1.8,-.4,-.4,1.3,-1,-.4,-.1,.7,.7,-.4,.3,.3,.6,-.1,.3,.4,-.2,0,-.5,.1,-.9],[-29554.63,-1669.05,5077.99,-2337.24,3047.69,-2594.5,1657.76,-515.43,1336.3,-2305.83,-198.86,1246.39,269.72,672.51,-524.72,920.55,797.96,282.07,210.65,-225.23,-379.86,145.15,100,-305.36,-227,354.41,42.72,208.95,180.25,-136.54,-123.45,-168.05,-19.57,-13.55,103.85,73.6,69.56,-20.33,76.74,54.75,-151.34,63.63,-14.58,-63.53,14.58,.24,-86.36,50.94,79.88,-74.46,-61.14,-1.65,-22.57,38.73,6.82,12.3,25.35,9.37,10.93,5.42,-26.32,1.94,-4.64,24.8,7.62,11.2,-11.73,-20.88,-6.88,9.83,-18.11,-19.71,10.17,16.22,9.36,7.61,-11.25,-12.76,-4.87,-.06,5.58,9.76,-20.11,3.58,12.69,-6.94,12.67,5.01,-6.72,-10.76,-8.16,-1.25,8.1,8.76,2.92,-6.66,-7.73,-9.22,6.01,-2.17,-6.12,2.19,1.42,.1,-2.35,4.46,-.15,4.76,3.06,-6.58,.29,-1.01,2.06,-3.47,3.77,-.86,-.21,-2.31,-2.09,-7.93,2.95,-1.6,.26,-1.88,1.44,1.44,-.77,-.31,-2.27,.29,.9,-.79,-.58,.53,-2.69,1.8,-1.08,.16,-1.58,.96,-1.9,3.99,-1.39,-2.15,-.29,-.55,.21,.23,.89,2.38,-.38,-2.63,.96,.61,-.3,.4,.46,.01,-.35,.02,-.36,.28,.08,-.87,-.49,-.34,-.08,.88,-.16,-.88,-.76,.3,.33,.28,1.72,-.43,-.54,1.18,-1.07,-.37,-.04,.75,.63,-.26,.21,.35,.53,-.05,.38,.41,-.22,-.1,-.57,-.18,-.82],[-29496.57,-1586.42,4944.26,-2396.06,3026.34,-2708.54,1668.17,-575.73,1339.85,-2326.54,-160.4,1232.1,251.75,633.73,-537.03,912.66,808.97,286.48,166.58,-211.03,-356.83,164.46,89.4,-309.72,-230.87,357.29,44.58,200.26,189.01,-141.05,-118.06,-163.17,-.01,-8.03,101.04,72.78,68.69,-20.9,75.92,44.18,-141.4,61.54,-22.83,-66.26,13.1,3.02,-78.09,55.4,80.44,-75,-57.8,-4.55,-21.2,45.24,6.54,14,24.96,10.46,7.03,1.64,-27.61,4.92,-3.28,24.41,8.21,10.84,-14.5,-20.03,-5.59,11.83,-19.34,-17.41,11.61,16.71,10.85,6.96,-14.05,-10.74,-3.54,1.64,5.5,9.45,-20.54,3.45,11.51,-5.27,12.75,3.13,-7.14,-12.38,-7.42,-.76,7.97,8.43,2.14,-8.42,-6.08,-10.08,7.01,-1.94,-6.24,2.73,.89,-.1,-1.07,4.71,-.16,4.44,2.45,-7.22,-.33,-.96,2.13,-3.95,3.09,-1.99,-1.03,-1.97,-2.8,-8.31,3.05,-1.48,.13,-2.03,1.67,1.65,-.66,-.51,-1.76,.54,.85,-.79,-.39,.37,-2.51,1.79,-1.27,.12,-2.11,.75,-1.94,3.75,-1.86,-2.12,-.21,-.87,.3,.27,1.04,2.13,-.63,-2.49,.95,.49,-.11,.59,.52,0,-.39,.13,-.37,.27,.21,-.86,-.77,-.23,.04,.87,-.09,-.89,-.87,.31,.3,.42,1.66,-.45,-.59,1.08,-1.14,-.31,-.07,.78,.54,-.18,.1,.38,.49,.02,.44,.42,-.25,-.26,-.53,-.26,-.79],[-29441.46,-1501.77,4795.99,-2445.88,3012.2,-2845.41,1676.35,-642.17,1350.33,-2352.26,-115.29,1225.85,245.04,581.69,-538.7,907.42,813.68,283.54,120.49,-188.43,-334.85,180.95,70.38,-329.23,-232.91,360.14,46.98,192.35,196.98,-140.94,-119.14,-157.4,15.98,4.3,100.12,69.55,67.57,-20.61,72.79,33.3,-129.85,58.74,-28.93,-66.64,13.14,7.35,-70.85,62.41,81.29,-75.99,-54.27,-6.79,-19.53,51.82,5.59,15.07,24.45,9.32,3.27,-2.88,-27.5,6.61,-2.32,23.98,8.89,10.04,-16.78,-18.26,-3.16,13.18,-20.56,-14.6,13.33,16.16,11.76,5.69,-15.98,-9.1,-2.02,2.26,5.33,8.83,-21.77,3.02,10.76,-3.22,11.74,.67,-6.74,-13.2,-6.88,-.1,7.79,8.68,1.04,-9.06,-3.89,-10.54,8.44,-2.01,-6.26,3.28,.17,-.4,.55,4.55,-.55,4.4,1.7,-7.92,-.67,-.61,2.13,-4.16,2.33,-2.85,-1.8,-1.12,-3.59,-8.72,3,-1.4,0,-2.3,2.11,2.08,-.6,-.79,-1.05,.58,.76,-.7,-.2,.14,-2.12,1.7,-1.44,-.22,-2.57,.44,-2.01,3.49,-2.34,-2.09,-.16,-1.08,.46,.37,1.23,1.75,-.89,-2.19,.85,.27,.1,.72,.54,-.09,-.37,.29,-.43,.23,.22,-.89,-.94,-.16,-.03,.72,-.02,-.92,-.88,.42,.49,.63,1.56,-.42,-.5,.96,-1.24,-.19,-.1,.81,.42,-.13,-.04,.38,.48,.08,.48,.46,-.3,-.35,-.43,-.36,-.71],[-29403.41,-1451.37,4653.35,-2499.78,2981.96,-2991.72,1676.85,-734.62,1363,-2380.8,-81.96,1236.06,241.8,525.6,-542.52,902.82,809.47,282.1,86.18,-158.5,-309.47,199.75,47.44,-350.3,-234.42,363.26,47.52,187.86,208.36,-140.73,-121.43,-151.16,32.09,13.98,99.14,65.97,65.56,-19.22,72.96,25.02,-121.57,52.76,-36.06,-64.4,13.6,8.96,-64.8,68.04,80.54,-76.63,-51.5,-8.23,-16.85,56.45,2.36,15.8,23.56,6.3,-2.19,-7.21,-27.19,9.77,-1.9,23.66,9.74,8.43,-17.49,-15.23,-.49,12.83,-21.07,-11.76,15.28,14.94,13.65,3.62,-16.59,-6.9,-.34,2.9,5.03,8.36,-23.44,2.84,11.04,-1.48,9.86,-1.14,-5.13,-13.22,-6.2,1.08,7.79,8.82,.4,-9.23,-1.44,-11.86,9.6,-1.84,-6.25,3.38,-.11,-.18,1.66,3.5,-.86,4.86,.65,-8.62,-.88,-.11,1.88,-4.26,1.44,-3.43,-2.38,-.1,-3.84,-8.84,2.96,-1.36,-.02,-2.51,2.5,2.31,-.55,-.85,-.39,.28,.62,-.66,-.21,-.07,-1.66,1.44,-1.6,-.59,-2.98,.18,-1.97,3.09,-2.51,-2,-.13,-1.15,.43,.52,1.28,1.37,-1.14,-1.81,.71,.08,.31,.71,.49,-.15,-.26,.55,-.47,.16,.09,-.93,-1.13,-.04,-.33,.52,.08,-.93,-.88,.53,.64,.72,1.4,-.3,-.38,.75,-1.31,-.01,-.09,.76,.29,-.05,-.11,.37,.47,.13,.54,.45,-.41,-.46,-.36,-.4,-.6],[-29350,-1410.3,4545.5,-2556.2,2950.9,-3133.6,1648.7,-814.2,1360.9,-2404.2,-56.9,1243.8,237.6,453.4,-549.6,894.7,799.6,278.6,55.8,-134,-281.1,212,12,-375.4,-232.9,369,45.3,187.2,220,-138.7,-122.9,-141.9,42.9,20.9,106.2,64.3,63.8,-18.4,76.7,16.8,-115.7,48.9,-40.9,-59.8,14.9,10.9,-60.8,72.8,79.6,-76.9,-48.9,-8.8,-14.4,59.3,-1,15.8,23.5,2.5,-7.4,-11.2,-25.1,14.3,-2.2,23.1,10.9,7.2,-17.5,-12.6,2,11.5,-21.8,-9.7,16.9,12.7,14.9,.7,-16.8,-5.2,1,3.9,4.7,8,-24.8,3,12.1,-.2,8.3,-2.5,-3.4,-13.1,-5.3,2.4,7.2,8.6,-.6,-8.7,.8,-12.8,9.8,-1.3,-6.4,3.3,.2,.1,2,2.5,-1,5.4,-.5,-9,-.9,.4,1.5,-4.2,.9,-3.8,-2.6,.9,-3.9,-9,3,-1.4,0,-2.5,2.8,2.4,-.6,-.6,.1,0,.5,-.6,-.3,-.1,-1.2,1.1,-1.7,-1,-2.9,-.1,-1.8,2.6,-2.3,-2,-.1,-1.2,.4,.6,1.2,1,-1.2,-1.5,.6,0,.5,.6,.5,-.2,-.1,.8,-.5,.1,-.2,-.9,-1.2,.1,-.7,.2,.2,-.9,-.9,.6,.7,.7,1.2,-.2,-.3,.5,-1.3,.1,-.1,.7,.2,0,-.2,.3,.5,.2,.6,.4,-.6,-.5,-.3,-.4,-.5]],B=[12.6,10,-21.5,-11.2,-5.3,-27.3,-8.3,-11.1,-1.5,-4.4,3.8,.4,-.2,-15.6,-3.9,-1.7,-2.3,-1.3,-5.8,4.1,5.4,1.6,-6.8,-4.1,.6,1.3,-.5,0,2.1,.7,.5,2.3,1.7,1,1.9,-.2,-.3,.3,.8,-1.6,1.2,-.4,-.8,.8,.4,.7,.9,.9,-.1,-.1,.6,-.1,.5,.5,-.7,-.1,0,-.8,-.9,-.8,.5,.9,-.3,-.1,.2,-.3,0,.4,.4,-.3,-.1,.4,.3,-.5,.1,-.6,0,.3,.3,.2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];class d{static A_KM=6371.2;static MAX_DEGREE=13;static coefficientsAt(t){const a=t.getUTCFullYear()+(t.getUTCMonth()+t.getUTCDate()/31)/12,s=N;let n;if(a<=s[0])n=[...P[0]];else if(a>=s[s.length-1]){const e=Math.min(a-s[s.length-1],5);n=P[s.length-1].map((l,o)=>l+B[o]*e)}else{const e=s.findIndex(o=>o>a),l=(a-s[e-1])/(s[e]-s[e-1]);n=P[e-1].map((o,g)=>o+(P[e][g]-o)*l)}const i=Array.from({length:d.MAX_DEGREE+1},()=>new Array(d.MAX_DEGREE+1).fill(0)),r=Array.from({length:d.MAX_DEGREE+1},()=>new Array(d.MAX_DEGREE+1).fill(0));return b.forEach(([e,l,o],g)=>{(e==="g"?i:r)[l][o]=n[g]}),{g:i,h:r}}static fieldAt(t,a,s,n,i=d.MAX_DEGREE){const r=Math.hypot(a,s,n),e=n/r,l=Math.max(Math.sqrt(Math.max(0,1-e*e)),1e-9),o=Math.atan2(s,a),g=d.p,c=d.dp;g[0][0]=1,c[0][0]=0;let f=0,K=0,E=0,_=(d.A_KM/r)**2;for(let h=1;h<=i;h++){_*=d.A_KM/r;for(let M=0;M<=h;M++){if(h===M){const O=h===1?1:Math.sqrt(1-1/(2*h));g[h][h]=O*l*g[h-1][h-1],c[h][h]=O*(l*c[h-1][h-1]+e*g[h-1][h-1])}else{const O=Math.sqrt(h*h-M*M),L=h-2>=M?Math.sqrt((h-1)**2-M*M):0,U=h-2>=M?g[h-2][M]:0,C=h-2>=M?c[h-2][M]:0;g[h][M]=((2*h-1)*e*g[h-1][M]-L*U)/O,c[h][M]=((2*h-1)*(e*c[h-1][M]-l*g[h-1][M])-L*C)/O}const T=Math.cos(M*o),x=Math.sin(M*o),G=t.g[h][M],H=t.h[h][M],k=G*T+H*x;f+=(h+1)*_*k*g[h][M],K-=_*k*c[h][M],E+=_*M*(G*x-H*T)*g[h][M]/l}}const m=Math.cos(o),R=Math.sin(o);return[f*l*m+K*e*m-E*R,f*l*R+K*e*R+E*m,f*e-K*l]}static p=Array.from({length:d.MAX_DEGREE+1},()=>new Array(d.MAX_DEGREE+1).fill(0));static dp=Array.from({length:d.MAX_DEGREE+1},()=>new Array(d.MAX_DEGREE+1).fill(0));static apexLatitude(t,a,s){const n=d.coefficientsAt(s),i=t*Math.PI/180,r=a*Math.PI/180;let e=[d.A_KM*Math.cos(i)*Math.cos(r),d.A_KM*Math.cos(i)*Math.sin(r),d.A_KM*Math.sin(i)];const l=d.fieldAt(n,...e),o=l[0]*e[0]+l[1]*e[1]+l[2]*e[2]<0?-1:1,g=K=>{const E=d.fieldAt(n,K[0],K[1],K[2],8),_=Math.hypot(E[0],E[1],E[2]);return[o*E[0]/_,o*E[1]/_,o*E[2]/_]};let c=d.A_KM,f=c;for(let K=0;K<4e3;K++){const E=.01*c,_=g(e),m=g([e[0]+_[0]*E/2,e[1]+_[1]*E/2,e[2]+_[2]*E/2]),R=g([e[0]+m[0]*E/2,e[1]+m[1]*E/2,e[2]+m[2]*E/2]),h=g([e[0]+R[0]*E,e[1]+R[1]*E,e[2]+R[2]*E]);if(e=[0,1,2].map(M=>e[M]+E/6*(_[M]+2*m[M]+2*R[M]+h[M])),c=Math.hypot(e[0],e[1],e[2]),c>30*d.A_KM)return Math.sign(t||1)*80;if(c<f)break;f=c}return Math.sign(o===-1?1:-1)*(Math.acos(Math.sqrt(Math.min(1,d.A_KM/f)))*180)/Math.PI}}class S{static PHOTONS_PER_KR=1e13/(4*Math.PI);static GREEN=S.line(557.7);static RED=S.line(631.5);static BLUE=S.line(427.8);static line(t){const a=y.colourMatching(t),s=662607015e-42*299792458/(t*1e-9),n=S.PHOTONS_PER_KR*s,i=y.linearSrgbOf(a).map(e=>Math.max(e,0)),r=.2126*i[0]+.7152*i[1]+.0722*i[2];return{wavelengthNm:t,cdM2PerKR:683*a[1]*n,colour:i.map(e=>e/r)}}}class D{static DEFAULT_KP=3;static NOON_SHIFT_DEG=8;static equatorwardEdgeDeg(t){return 66.5-2.04*Math.max(0,Math.min(12,t))}static widthDeg(t){return 8+1.2*Math.max(0,Math.min(12,t))}static diffuseKR(t){return .5+.15*Math.max(0,t)}static arcsOf(t){return t<1?1:Math.min(4,Math.round(1+t/2.5))}static arcKROf(t){return 10*2**(Math.max(0,t)/2.5)}static arcRedOf(t){const a=Math.max(0,t-6);return{share:.1+.25*a,peakKm:250+40*a,widthKm:70+30*a}}static redKROf(t){return t<=5?0:.5*(t-5)**1.5}static edgeAt(t,a){return t+D.NOON_SHIFT_DEG*(1-Math.cos(a*Math.PI/12))/2}}class p{static EARTH_KM=6371;static BOTTOM_KM=90;static TOP_KM=900;static ARC_BASE_KM=105;static ARC_SCALE_KM=35;static DIFFUSE_BASE_KM=115;static DIFFUSE_SCALE_KM=45;static RED_PEAK_KM=250;static RED_WIDTH_KM=70;static STORM_RED_PEAK_KM=380;static STORM_RED_WIDTH_KM=150;static ARC_THICKNESS_DEG=.06;static RED_OF_GREEN=.25;static BLUE_OF_GREEN=.12;static SUNLIT_BLUE_OF_GREEN=.2;static exponential(t,a,s){if(t<a-8)return 0;const n=Math.min(1,Math.max(0,(t-(a-8))/10));return n*n*(3-2*n)*Math.exp(-Math.max(0,t-a)/s)/(s+5)}static gaussian(t,a,s){const n=(t-a)/s;return Math.exp(-.5*n*n)/(s*Math.sqrt(2*Math.PI))}}class A{static FADE_MS=6e4;static OUT_OF_SIGHT_DEG=28;static kpAt(t,a){const s=t.activity;if(!s||s.length===0)return t.kp??D.DEFAULT_KP;if(a<=s[0].t)return s[0].kp;for(let n=1;n<s.length;n++){if(a>s[n].t)continue;const i=s[n-1],r=s[n];return i.kp+(r.kp-i.kp)*(a-i.t)/Math.max(r.t-i.t,1)}return s[s.length-1].kp}static fadeAt(t,a){const s=t.fromT===void 0?1:Math.min(1,Math.max(0,(a-t.fromT)/A.FADE_MS)),n=t.untilT===void 0?1:Math.min(1,Math.max(0,(t.untilT-a)/A.FADE_MS));return s*n}static apexes=new Map;static apexLatitude(t,a,s){const n=`${t.toFixed(2)},${a.toFixed(2)},${s.toISOString().slice(0,10)}`;let i=A.apexes.get(n);return i===void 0&&(i=d.apexLatitude(t,a,s),A.apexes.size>64&&A.apexes.clear(),A.apexes.set(n,i)),i}static seed(t){let a=2166136261;for(let s=0;s<t.length;s++)a=Math.imul(a^t.charCodeAt(s),16777619);return(a>>>0)%1e4/1e4}static viewAt(t,a,s,n,i){const r=A.fadeAt(t,a);if(r<=0)return;const e=A.kpAt(t,a),l=A.seed(t.id),o=a/1e3,g=Math.max(0,Math.min(4,Math.round(t.arcs??D.arcsOf(e)))),c=t.arcKR??D.arcKROf(e),f=D.widthDeg(e),K=[];for(let R=0;R<g;R++){const h=l*37+R*2.3,M=.7+.3*Math.sin(2*Math.PI*o/(90+40*R)+h);K.push({offsetDeg:f*(g===1?.15:.1+.8*R/(g-1)),kr:c*M/(1+.6*R),foldPhase:h,rayPhase:l*1e3+R*131})}const E=Math.abs(A.apexLatitude(s.lat,s.lng,n));if((t.edgeLatDeg??D.equatorwardEdgeDeg(e))-E>A.OUT_OF_SIGHT_DEG)return;const _=F.latitudeOf(s.lat,s.lng,n),m=_-E*Math.sign(_||1);return{id:t.id,kp:e,edgeDeg:(t.edgeLatDeg??D.equatorwardEdgeDeg(e))+m,widthDeg:f,diffuseKR:D.diffuseKR(e),redKR:t.redKR??D.redKROf(e),arcRed:D.arcRedOf(e),arcs:K,axis:F.axisAt(s.lat,s.lng,n),sun:i,observerLatitudeDeg:_-m,observerHeightKm:s.heightM/1e3,fade:r,timeS:o}}}class u{static STEPS=160;static along(t,a,s=u.STEPS){const i=p.EARTH_KM+t.observerHeightKm,r=u.shellRange(i,a[1]);if(!r)return[0,0,0];const[e,l]=r,o=(l-e)/s,g=[0,0,0];for(let c=0;c<s;c++){const f=e+(c+.5)*o,K=[a[0]*f,i+a[1]*f,a[2]*f],E=u.emission(t,K);g[0]+=E[0]*o,g[1]+=E[1]*o,g[2]+=E[2]*o}return[g[0]*t.fade,g[1]*t.fade,g[2]*t.fade]}static shellRange(t,a){const s=p.EARTH_KM,n=l=>{const o=t*a,g=t*t-l*l,c=o*o-g;if(c<0)return;const f=Math.sqrt(c);return[-o-f,-o+f]},i=n(s);if(i&&i[0]>0)return;const r=n(s+p.BOTTOM_KM),e=n(s+p.TOP_KM);return[Math.max(0,r[1]),e[1]]}static emission(t,a){const s=Math.hypot(a[0],a[1],a[2]),n=s-p.EARTH_KM;if(n<p.BOTTOM_KM-10||n>p.TOP_KM)return[0,0,0];const i=[a[0]/s,a[1]/s,a[2]/s],r=Math.asin(Math.max(-1,Math.min(1,i[0]*t.axis[0]+i[1]*t.axis[1]+i[2]*t.axis[2])))*180/Math.PI,e=Math.abs(F.footLatitude(r,n)),l=F.localTime(i,t.axis,t.sun),o=D.edgeAt(t.edgeDeg,l),g=t.widthDeg*(1-.4*(1-Math.cos(l*Math.PI/12))/2),c=p,f=u.smoothstep(o-1,o+.5,e)*(1-u.smoothstep(o+g-1,o+g+1.5,e));let K=t.diffuseKR*f*c.exponential(n,c.DIFFUSE_BASE_KM,c.DIFFUSE_SCALE_KM),E=t.diffuseKR*f*c.RED_OF_GREEN*c.gaussian(n,c.RED_PEAK_KM,c.RED_WIDTH_KM),_=0;const m=u.sunlit(a,t.sun);for(const R of t.arcs){const h=(e-(o+R.offsetDeg))/c.ARC_THICKNESS_DEG,M=Math.exp(-.5*h*h);if(M<1e-4)continue;const T=R.kr*M,x=T*c.exponential(n,c.ARC_BASE_KM,c.ARC_SCALE_KM);K+=x,E+=T*t.arcRed.share*c.gaussian(n,t.arcRed.peakKm,t.arcRed.widthKm),_+=x*c.BLUE_OF_GREEN+T*m*c.SUNLIT_BLUE_OF_GREEN*c.gaussian(n,300,120)}if(t.redKR>0){const R=(e-(o-1))/3;E+=t.redKR*Math.exp(-.5*R*R)*c.gaussian(n,c.STORM_RED_PEAK_KM,c.STORM_RED_WIDTH_KM)}return[K,E,_]}static sunlit(t,a){const s=t[0]*a[0]+t[1]*a[1]+t[2]*a[2];if(s>0)return 1;const n=Math.hypot(t[0]-s*a[0],t[1]-s*a[1],t[2]-s*a[2]);return u.smoothstep(p.EARTH_KM+20,p.EARTH_KM+80,n)}static smoothstep(t,a,s){const n=Math.min(1,Math.max(0,(s-t)/(a-t)));return n*n*(3-2*n)}}export{p as A,S as a,u as b,A as c,D as d};
|
|
1
|
+
import{bS as F,bu as y}from"./rr0-sighting-editor.mjs";const N=[1900,1905,1910,1915,1920,1925,1930,1935,1940,1945,1950,1955,1960,1965,1970,1975,1980,1985,1990,1995,2e3,2005,2010,2015,2020,2025],b=[["g",1,0],["g",1,1],["h",1,1],["g",2,0],["g",2,1],["h",2,1],["g",2,2],["h",2,2],["g",3,0],["g",3,1],["h",3,1],["g",3,2],["h",3,2],["g",3,3],["h",3,3],["g",4,0],["g",4,1],["h",4,1],["g",4,2],["h",4,2],["g",4,3],["h",4,3],["g",4,4],["h",4,4],["g",5,0],["g",5,1],["h",5,1],["g",5,2],["h",5,2],["g",5,3],["h",5,3],["g",5,4],["h",5,4],["g",5,5],["h",5,5],["g",6,0],["g",6,1],["h",6,1],["g",6,2],["h",6,2],["g",6,3],["h",6,3],["g",6,4],["h",6,4],["g",6,5],["h",6,5],["g",6,6],["h",6,6],["g",7,0],["g",7,1],["h",7,1],["g",7,2],["h",7,2],["g",7,3],["h",7,3],["g",7,4],["h",7,4],["g",7,5],["h",7,5],["g",7,6],["h",7,6],["g",7,7],["h",7,7],["g",8,0],["g",8,1],["h",8,1],["g",8,2],["h",8,2],["g",8,3],["h",8,3],["g",8,4],["h",8,4],["g",8,5],["h",8,5],["g",8,6],["h",8,6],["g",8,7],["h",8,7],["g",8,8],["h",8,8],["g",9,0],["g",9,1],["h",9,1],["g",9,2],["h",9,2],["g",9,3],["h",9,3],["g",9,4],["h",9,4],["g",9,5],["h",9,5],["g",9,6],["h",9,6],["g",9,7],["h",9,7],["g",9,8],["h",9,8],["g",9,9],["h",9,9],["g",10,0],["g",10,1],["h",10,1],["g",10,2],["h",10,2],["g",10,3],["h",10,3],["g",10,4],["h",10,4],["g",10,5],["h",10,5],["g",10,6],["h",10,6],["g",10,7],["h",10,7],["g",10,8],["h",10,8],["g",10,9],["h",10,9],["g",10,10],["h",10,10],["g",11,0],["g",11,1],["h",11,1],["g",11,2],["h",11,2],["g",11,3],["h",11,3],["g",11,4],["h",11,4],["g",11,5],["h",11,5],["g",11,6],["h",11,6],["g",11,7],["h",11,7],["g",11,8],["h",11,8],["g",11,9],["h",11,9],["g",11,10],["h",11,10],["g",11,11],["h",11,11],["g",12,0],["g",12,1],["h",12,1],["g",12,2],["h",12,2],["g",12,3],["h",12,3],["g",12,4],["h",12,4],["g",12,5],["h",12,5],["g",12,6],["h",12,6],["g",12,7],["h",12,7],["g",12,8],["h",12,8],["g",12,9],["h",12,9],["g",12,10],["h",12,10],["g",12,11],["h",12,11],["g",12,12],["h",12,12],["g",13,0],["g",13,1],["h",13,1],["g",13,2],["h",13,2],["g",13,3],["h",13,3],["g",13,4],["h",13,4],["g",13,5],["h",13,5],["g",13,6],["h",13,6],["g",13,7],["h",13,7],["g",13,8],["h",13,8],["g",13,9],["h",13,9],["g",13,10],["h",13,10],["g",13,11],["h",13,11],["g",13,12],["h",13,12],["g",13,13],["h",13,13]],P=[[-31543,-2298,5922,-677,2905,-1061,924,1121,1022,-1469,-330,1256,3,572,523,876,628,195,660,-69,-361,-210,134,-75,-184,328,-210,264,53,5,-33,-86,-124,-16,3,63,61,-9,-11,83,-217,2,-58,-35,59,36,-90,-69,70,-55,-45,0,-13,34,-10,-41,-1,-21,28,18,-12,6,-22,11,8,8,-4,-14,-9,7,1,-13,2,5,-9,16,5,-5,8,-18,8,10,-20,1,14,-11,5,12,-3,1,-2,-2,8,2,10,-1,-2,-1,2,-3,-4,2,2,1,-5,2,-2,6,6,-4,4,0,0,-2,2,4,2,0,0,-6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[-31464,-2298,5909,-728,2928,-1086,1041,1065,1037,-1494,-357,1239,34,635,480,880,643,203,653,-77,-380,-201,146,-65,-192,328,-193,259,56,-1,-32,-93,-125,-26,11,62,60,-7,-11,86,-221,4,-57,-32,57,32,-92,-67,70,-54,-46,0,-14,33,-11,-41,0,-20,28,18,-12,6,-22,11,8,8,-4,-15,-9,7,1,-13,2,5,-8,16,5,-5,8,-18,8,10,-20,1,14,-11,5,12,-3,1,-2,-2,8,2,10,0,-2,-1,2,-3,-4,2,2,1,-5,2,-2,6,6,-4,4,0,0,-2,2,4,2,0,0,-6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[-31354,-2297,5898,-769,2948,-1128,1176,1e3,1058,-1524,-389,1223,62,705,425,884,660,211,644,-90,-400,-189,160,-55,-201,327,-172,253,57,-9,-33,-102,-126,-38,21,62,58,-5,-11,89,-224,5,-54,-29,54,28,-95,-65,71,-54,-47,1,-14,32,-12,-40,1,-19,28,18,-13,6,-22,11,8,8,-4,-15,-9,6,1,-13,2,5,-8,16,5,-5,8,-18,8,10,-20,1,14,-11,5,12,-3,1,-2,-2,8,2,10,0,-2,-1,2,-3,-4,2,2,1,-5,2,-2,6,6,-4,4,0,0,-2,2,4,2,0,0,-6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[-31212,-2306,5875,-802,2956,-1191,1309,917,1084,-1559,-421,1212,84,778,360,887,678,218,631,-109,-416,-173,178,-51,-211,327,-148,245,58,-16,-34,-111,-126,-51,32,61,57,-2,-10,93,-228,8,-51,-26,49,23,-98,-62,72,-54,-48,2,-14,31,-12,-38,2,-18,28,19,-15,6,-22,11,8,8,-4,-15,-9,6,2,-13,3,5,-8,16,6,-5,8,-18,8,10,-20,1,14,-11,5,12,-3,1,-2,-2,8,2,10,0,-2,-1,2,-3,-4,2,2,1,-5,2,-2,6,6,-4,4,0,0,-2,1,4,2,0,0,-6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[-31060,-2317,5845,-839,2959,-1259,1407,823,1111,-1600,-445,1205,103,839,293,889,695,220,616,-134,-424,-153,199,-57,-221,326,-122,236,58,-23,-38,-119,-125,-62,43,61,55,0,-10,96,-233,11,-46,-22,44,18,-101,-57,73,-54,-49,2,-14,29,-13,-37,4,-16,28,19,-16,6,-22,11,7,8,-3,-15,-9,6,2,-14,4,5,-7,17,6,-5,8,-19,8,10,-20,1,14,-11,5,12,-3,1,-2,-2,9,2,10,0,-2,-1,2,-3,-4,2,2,1,-5,2,-2,6,6,-4,4,0,0,-2,1,4,3,0,0,-6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[-30926,-2318,5817,-893,2969,-1334,1471,728,1140,-1645,-462,1202,119,881,229,891,711,216,601,-163,-426,-130,217,-70,-230,326,-96,226,58,-28,-44,-125,-122,-69,51,61,54,3,-9,99,-238,14,-40,-18,39,13,-103,-52,73,-54,-50,3,-14,27,-14,-35,5,-14,29,19,-17,6,-21,11,7,8,-3,-15,-9,6,2,-14,4,5,-7,17,7,-5,8,-19,8,10,-20,1,14,-11,5,12,-3,1,-2,-2,9,2,10,0,-2,-1,2,-3,-4,2,2,1,-5,2,-2,6,6,-4,4,0,0,-2,1,4,3,0,0,-6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[-30805,-2316,5808,-951,2980,-1424,1517,644,1172,-1692,-480,1205,133,907,166,896,727,205,584,-195,-422,-109,234,-90,-237,327,-72,218,60,-32,-53,-131,-118,-74,58,60,53,4,-9,102,-242,19,-32,-16,32,8,-104,-46,74,-54,-51,4,-15,25,-14,-34,6,-12,29,18,-18,6,-20,11,7,8,-3,-15,-9,5,2,-14,5,5,-6,18,8,-5,8,-19,8,10,-20,1,14,-12,5,12,-3,1,-2,-2,9,3,10,0,-2,-2,2,-3,-4,2,2,1,-5,2,-2,6,6,-4,4,0,0,-2,1,4,3,0,0,-6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[-30715,-2306,5812,-1018,2984,-1520,1550,586,1206,-1740,-494,1215,146,918,101,903,744,188,565,-226,-415,-90,249,-114,-241,329,-51,211,64,-33,-64,-136,-115,-76,64,59,53,4,-8,104,-246,25,-25,-15,25,4,-106,-40,74,-53,-52,4,-17,23,-14,-33,7,-11,29,18,-19,6,-19,11,7,8,-3,-15,-9,5,1,-15,6,5,-6,18,8,-5,7,-19,8,10,-20,1,15,-12,5,11,-3,1,-3,-2,9,3,11,0,-2,-2,2,-3,-4,2,2,1,-5,2,-2,6,6,-4,4,0,0,-1,2,4,3,0,0,-6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[-30654,-2292,5821,-1106,2981,-1614,1566,528,1240,-1790,-499,1232,163,916,43,914,762,169,550,-252,-405,-72,265,-141,-241,334,-33,208,71,-33,-75,-141,-113,-76,69,57,54,4,-7,105,-249,33,-18,-15,18,0,-107,-33,74,-53,-52,4,-18,20,-14,-31,7,-9,29,17,-20,5,-19,11,7,8,-3,-14,-10,5,1,-15,6,5,-5,19,9,-5,7,-19,8,10,-21,1,15,-12,5,11,-3,1,-3,-2,9,3,11,1,-2,-2,2,-3,-4,2,2,1,-5,2,-2,6,6,-4,4,0,0,-1,2,4,3,0,0,-6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[-30594,-2285,5810,-1244,2990,-1702,1578,477,1282,-1834,-499,1255,186,913,-11,944,776,144,544,-276,-421,-55,304,-178,-253,346,-12,194,95,-20,-67,-142,-119,-82,82,59,57,6,6,100,-246,16,-25,-9,21,-16,-104,-39,70,-40,-45,0,-18,0,2,-29,6,-10,28,15,-17,29,-22,13,7,12,-8,-21,-5,-12,9,-7,7,2,-10,18,7,3,2,-11,5,-21,-27,1,17,-11,29,3,-9,16,4,-3,9,-4,6,-3,1,-4,8,-3,11,5,1,1,2,-20,-5,-1,-1,-6,8,6,-1,-4,-3,-2,5,0,-2,-2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[-30554,-2250,5815,-1341,2998,-1810,1576,381,1297,-1889,-476,1274,206,896,-46,954,792,136,528,-278,-408,-37,303,-210,-240,349,3,211,103,-20,-87,-147,-122,-76,80,54,57,-1,4,99,-247,33,-16,-12,12,-12,-105,-30,65,-55,-35,2,-17,1,0,-40,10,-7,36,5,-18,19,-16,22,15,5,-4,-22,-1,0,11,-21,15,-8,-13,17,5,-4,-1,-17,3,-7,-24,-1,19,-25,12,10,2,5,2,-5,8,-2,8,3,-11,8,-7,-8,4,13,-1,-2,13,-10,-4,2,4,-3,12,6,3,-3,2,6,10,11,3,8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[-30500,-2215,5820,-1440,3003,-1898,1581,291,1302,-1944,-462,1288,216,882,-83,958,796,133,510,-274,-397,-23,290,-230,-229,360,15,230,110,-23,-98,-152,-121,-69,78,47,57,-9,3,96,-247,48,-8,-16,7,-12,-107,-24,65,-56,-50,2,-24,10,-4,-32,8,-11,28,9,-20,18,-18,11,9,10,-6,-15,-14,5,6,-23,10,3,-7,23,6,-4,9,-13,4,9,-11,-4,12,-5,7,2,6,4,-2,1,10,2,7,2,-6,5,5,-3,-5,-4,-1,0,2,-8,-3,-2,7,-4,4,1,-2,-3,6,7,-2,-1,0,-3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[-30421,-2169,5791,-1555,3002,-1967,1590,206,1302,-1992,-414,1289,224,878,-130,957,800,135,504,-278,-394,3,269,-255,-222,362,16,242,125,-26,-117,-156,-114,-63,81,46,58,-10,1,99,-237,60,-1,-20,-2,-11,-113,-17,67,-56,-55,5,-28,15,-6,-32,7,-7,23,17,-18,8,-17,15,6,11,-4,-14,-11,7,2,-18,10,4,-5,23,10,1,8,-20,4,6,-18,0,12,-9,2,1,0,4,-3,-1,9,-2,8,3,0,-1,5,1,-3,4,4,1,0,0,-1,2,4,-5,6,1,1,-1,-1,6,2,0,0,-7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[-30334,-2119,5776,-1662,2997,-2016,1594,114,1297,-2038,-404,1292,240,856,-165,957,804,148,479,-269,-390,13,252,-269,-219,358,19,254,128,-31,-126,-157,-97,-62,81,45,61,-11,8,100,-228,68,4,-32,1,-8,-111,-7,75,-57,-61,4,-27,13,-2,-26,6,-6,26,13,-23,1,-12,13,5,7,-4,-12,-14,9,0,-16,8,4,-1,24,11,-3,4,-17,8,10,-22,2,15,-13,7,10,-4,-1,-5,-1,10,5,10,1,-4,-2,1,-2,-3,2,2,1,-5,2,-2,6,4,-4,4,0,0,-2,2,3,2,0,0,-6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[-30220,-2068,5737,-1781,3e3,-2047,1611,25,1287,-2091,-366,1278,251,838,-196,952,800,167,461,-266,-395,26,234,-279,-216,359,26,262,139,-42,-139,-160,-91,-56,83,43,64,-12,15,100,-212,72,2,-37,3,-6,-112,1,72,-57,-70,1,-27,14,-4,-22,8,-2,23,13,-23,-2,-11,14,6,7,-2,-15,-13,6,-3,-17,5,6,0,21,11,-6,3,-16,8,10,-21,2,16,-12,6,10,-4,-1,-5,0,10,3,11,1,-2,-1,1,-3,-3,1,2,1,-5,3,-1,4,6,-4,4,0,1,-1,0,3,3,1,-1,-4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[-30100,-2013,5675,-1902,3010,-2067,1632,-68,1276,-2144,-333,1260,262,830,-223,946,791,191,438,-265,-405,39,216,-288,-218,356,31,264,148,-59,-152,-159,-83,-49,88,45,66,-13,28,99,-198,75,1,-41,6,-4,-111,11,71,-56,-77,1,-26,16,-5,-14,10,0,22,12,-23,-5,-12,14,6,6,-1,-16,-12,4,-8,-19,4,6,0,18,10,-10,1,-17,7,10,-21,2,16,-12,7,10,-4,-1,-5,-1,10,4,11,1,-3,-2,1,-3,-3,1,2,1,-5,3,-2,4,5,-4,4,-1,1,-1,0,3,3,1,-1,-5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[-29992,-1956,5604,-1997,3027,-2129,1663,-200,1281,-2180,-336,1251,271,833,-252,938,782,212,398,-257,-419,53,199,-297,-218,357,46,261,150,-74,-151,-162,-78,-48,92,48,66,-15,42,93,-192,71,4,-43,14,-2,-108,17,72,-59,-82,2,-27,21,-5,-12,16,1,18,11,-23,-2,-10,18,6,7,0,-18,-11,4,-7,-22,4,9,3,16,6,-13,-1,-15,5,10,-21,1,16,-12,9,9,-5,-3,-6,-1,9,7,10,2,-6,-5,2,-4,-4,1,2,0,-5,3,-2,6,5,-4,3,0,1,-1,2,4,3,0,0,-6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[-29873,-1905,5500,-2072,3044,-2197,1687,-306,1296,-2208,-310,1247,284,829,-297,936,780,232,361,-249,-424,69,170,-297,-214,355,47,253,150,-93,-154,-164,-75,-46,95,53,65,-16,51,88,-185,69,4,-48,16,-1,-102,21,74,-62,-83,3,-27,24,-2,-6,20,4,17,10,-23,0,-7,21,6,8,0,-19,-11,5,-9,-23,4,11,4,14,4,-15,-4,-11,5,10,-21,1,15,-12,9,9,-6,-3,-6,-1,9,7,9,1,-7,-5,2,-4,-4,1,3,0,-5,3,-2,6,5,-4,3,0,1,-1,2,4,3,0,0,-6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[-29775,-1848,5406,-2131,3059,-2279,1686,-373,1314,-2239,-284,1248,293,802,-352,939,780,247,325,-240,-423,84,141,-299,-214,353,46,245,154,-109,-153,-165,-69,-36,97,61,65,-16,59,82,-178,69,3,-52,18,1,-96,24,77,-64,-80,2,-26,26,0,-1,21,5,17,9,-23,0,-4,23,5,10,-1,-19,-10,6,-12,-22,3,12,4,12,2,-16,-6,-10,4,9,-20,1,15,-12,11,9,-7,-4,-7,-2,9,7,8,1,-7,-6,2,-3,-4,2,2,1,-5,3,-2,6,4,-4,3,0,1,-2,3,3,3,-1,0,-6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[-29692,-1784,5306,-2200,3070,-2366,1681,-413,1335,-2267,-262,1249,302,759,-427,940,780,262,290,-236,-418,97,122,-306,-214,352,46,235,165,-118,-143,-166,-55,-17,107,68,67,-17,68,72,-170,67,-1,-58,19,1,-93,36,77,-72,-69,1,-25,28,4,5,24,4,17,8,-24,-2,-6,25,6,11,-6,-21,-9,8,-14,-23,9,15,6,11,-5,-16,-7,-4,4,9,-20,3,15,-10,12,8,-6,-8,-8,-1,8,10,5,-2,-8,-8,3,-3,-6,1,2,0,-4,4,-1,5,4,-5,2,-1,2,-2,5,1,1,-2,0,-7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[-29619.4,-1728.2,5186.1,-2267.7,3068.4,-2481.6,1670.9,-458,1339.6,-2288,-227.6,1252.1,293.4,714.5,-491.1,932.3,786.8,272.6,250,-231.9,-403,119.8,111.3,-303.8,-218.8,351.4,43.8,222.3,171.9,-130.4,-133.1,-168.6,-39.3,-12.9,106.3,72.3,68.2,-17.4,74.2,63.7,-160.9,65.1,-5.9,-61.2,16.9,.7,-90.4,43.8,79,-74,-64.6,0,-24.2,33.3,6.2,9.1,24,6.9,14.8,7.3,-25.4,-1.2,-5.8,24.4,6.6,11.9,-9.2,-21.5,-7.9,8.5,-16.6,-21.5,9.1,15.5,7,8.9,-7.9,-14.9,-7,-2.1,5,9.4,-19.7,3,13.4,-8.4,12.5,6.3,-6.2,-8.9,-8.4,-1.5,8.4,9.3,3.8,-4.3,-8.2,-8.2,4.8,-2.6,-6,1.7,1.7,0,-3.1,4,-.5,4.9,3.7,-5.9,1,-1.2,2,-2.9,4.2,.2,.3,-2.2,-1.1,-7.4,2.7,-1.7,.1,-1.9,1.3,1.5,-.9,-.1,-2.6,.1,.9,-.7,-.7,.7,-2.8,1.7,-.9,.1,-1.2,1.2,-1.9,4,-.9,-2.2,-.3,-.4,.2,.3,.9,2.5,-.2,-2.6,.9,.7,-.5,.3,.3,0,-.3,0,-.4,.3,-.1,-.9,-.2,-.4,-.4,.8,-.2,-.9,-.9,.3,.2,.1,1.8,-.4,-.4,1.3,-1,-.4,-.1,.7,.7,-.4,.3,.3,.6,-.1,.3,.4,-.2,0,-.5,.1,-.9],[-29554.63,-1669.05,5077.99,-2337.24,3047.69,-2594.5,1657.76,-515.43,1336.3,-2305.83,-198.86,1246.39,269.72,672.51,-524.72,920.55,797.96,282.07,210.65,-225.23,-379.86,145.15,100,-305.36,-227,354.41,42.72,208.95,180.25,-136.54,-123.45,-168.05,-19.57,-13.55,103.85,73.6,69.56,-20.33,76.74,54.75,-151.34,63.63,-14.58,-63.53,14.58,.24,-86.36,50.94,79.88,-74.46,-61.14,-1.65,-22.57,38.73,6.82,12.3,25.35,9.37,10.93,5.42,-26.32,1.94,-4.64,24.8,7.62,11.2,-11.73,-20.88,-6.88,9.83,-18.11,-19.71,10.17,16.22,9.36,7.61,-11.25,-12.76,-4.87,-.06,5.58,9.76,-20.11,3.58,12.69,-6.94,12.67,5.01,-6.72,-10.76,-8.16,-1.25,8.1,8.76,2.92,-6.66,-7.73,-9.22,6.01,-2.17,-6.12,2.19,1.42,.1,-2.35,4.46,-.15,4.76,3.06,-6.58,.29,-1.01,2.06,-3.47,3.77,-.86,-.21,-2.31,-2.09,-7.93,2.95,-1.6,.26,-1.88,1.44,1.44,-.77,-.31,-2.27,.29,.9,-.79,-.58,.53,-2.69,1.8,-1.08,.16,-1.58,.96,-1.9,3.99,-1.39,-2.15,-.29,-.55,.21,.23,.89,2.38,-.38,-2.63,.96,.61,-.3,.4,.46,.01,-.35,.02,-.36,.28,.08,-.87,-.49,-.34,-.08,.88,-.16,-.88,-.76,.3,.33,.28,1.72,-.43,-.54,1.18,-1.07,-.37,-.04,.75,.63,-.26,.21,.35,.53,-.05,.38,.41,-.22,-.1,-.57,-.18,-.82],[-29496.57,-1586.42,4944.26,-2396.06,3026.34,-2708.54,1668.17,-575.73,1339.85,-2326.54,-160.4,1232.1,251.75,633.73,-537.03,912.66,808.97,286.48,166.58,-211.03,-356.83,164.46,89.4,-309.72,-230.87,357.29,44.58,200.26,189.01,-141.05,-118.06,-163.17,-.01,-8.03,101.04,72.78,68.69,-20.9,75.92,44.18,-141.4,61.54,-22.83,-66.26,13.1,3.02,-78.09,55.4,80.44,-75,-57.8,-4.55,-21.2,45.24,6.54,14,24.96,10.46,7.03,1.64,-27.61,4.92,-3.28,24.41,8.21,10.84,-14.5,-20.03,-5.59,11.83,-19.34,-17.41,11.61,16.71,10.85,6.96,-14.05,-10.74,-3.54,1.64,5.5,9.45,-20.54,3.45,11.51,-5.27,12.75,3.13,-7.14,-12.38,-7.42,-.76,7.97,8.43,2.14,-8.42,-6.08,-10.08,7.01,-1.94,-6.24,2.73,.89,-.1,-1.07,4.71,-.16,4.44,2.45,-7.22,-.33,-.96,2.13,-3.95,3.09,-1.99,-1.03,-1.97,-2.8,-8.31,3.05,-1.48,.13,-2.03,1.67,1.65,-.66,-.51,-1.76,.54,.85,-.79,-.39,.37,-2.51,1.79,-1.27,.12,-2.11,.75,-1.94,3.75,-1.86,-2.12,-.21,-.87,.3,.27,1.04,2.13,-.63,-2.49,.95,.49,-.11,.59,.52,0,-.39,.13,-.37,.27,.21,-.86,-.77,-.23,.04,.87,-.09,-.89,-.87,.31,.3,.42,1.66,-.45,-.59,1.08,-1.14,-.31,-.07,.78,.54,-.18,.1,.38,.49,.02,.44,.42,-.25,-.26,-.53,-.26,-.79],[-29441.46,-1501.77,4795.99,-2445.88,3012.2,-2845.41,1676.35,-642.17,1350.33,-2352.26,-115.29,1225.85,245.04,581.69,-538.7,907.42,813.68,283.54,120.49,-188.43,-334.85,180.95,70.38,-329.23,-232.91,360.14,46.98,192.35,196.98,-140.94,-119.14,-157.4,15.98,4.3,100.12,69.55,67.57,-20.61,72.79,33.3,-129.85,58.74,-28.93,-66.64,13.14,7.35,-70.85,62.41,81.29,-75.99,-54.27,-6.79,-19.53,51.82,5.59,15.07,24.45,9.32,3.27,-2.88,-27.5,6.61,-2.32,23.98,8.89,10.04,-16.78,-18.26,-3.16,13.18,-20.56,-14.6,13.33,16.16,11.76,5.69,-15.98,-9.1,-2.02,2.26,5.33,8.83,-21.77,3.02,10.76,-3.22,11.74,.67,-6.74,-13.2,-6.88,-.1,7.79,8.68,1.04,-9.06,-3.89,-10.54,8.44,-2.01,-6.26,3.28,.17,-.4,.55,4.55,-.55,4.4,1.7,-7.92,-.67,-.61,2.13,-4.16,2.33,-2.85,-1.8,-1.12,-3.59,-8.72,3,-1.4,0,-2.3,2.11,2.08,-.6,-.79,-1.05,.58,.76,-.7,-.2,.14,-2.12,1.7,-1.44,-.22,-2.57,.44,-2.01,3.49,-2.34,-2.09,-.16,-1.08,.46,.37,1.23,1.75,-.89,-2.19,.85,.27,.1,.72,.54,-.09,-.37,.29,-.43,.23,.22,-.89,-.94,-.16,-.03,.72,-.02,-.92,-.88,.42,.49,.63,1.56,-.42,-.5,.96,-1.24,-.19,-.1,.81,.42,-.13,-.04,.38,.48,.08,.48,.46,-.3,-.35,-.43,-.36,-.71],[-29403.41,-1451.37,4653.35,-2499.78,2981.96,-2991.72,1676.85,-734.62,1363,-2380.8,-81.96,1236.06,241.8,525.6,-542.52,902.82,809.47,282.1,86.18,-158.5,-309.47,199.75,47.44,-350.3,-234.42,363.26,47.52,187.86,208.36,-140.73,-121.43,-151.16,32.09,13.98,99.14,65.97,65.56,-19.22,72.96,25.02,-121.57,52.76,-36.06,-64.4,13.6,8.96,-64.8,68.04,80.54,-76.63,-51.5,-8.23,-16.85,56.45,2.36,15.8,23.56,6.3,-2.19,-7.21,-27.19,9.77,-1.9,23.66,9.74,8.43,-17.49,-15.23,-.49,12.83,-21.07,-11.76,15.28,14.94,13.65,3.62,-16.59,-6.9,-.34,2.9,5.03,8.36,-23.44,2.84,11.04,-1.48,9.86,-1.14,-5.13,-13.22,-6.2,1.08,7.79,8.82,.4,-9.23,-1.44,-11.86,9.6,-1.84,-6.25,3.38,-.11,-.18,1.66,3.5,-.86,4.86,.65,-8.62,-.88,-.11,1.88,-4.26,1.44,-3.43,-2.38,-.1,-3.84,-8.84,2.96,-1.36,-.02,-2.51,2.5,2.31,-.55,-.85,-.39,.28,.62,-.66,-.21,-.07,-1.66,1.44,-1.6,-.59,-2.98,.18,-1.97,3.09,-2.51,-2,-.13,-1.15,.43,.52,1.28,1.37,-1.14,-1.81,.71,.08,.31,.71,.49,-.15,-.26,.55,-.47,.16,.09,-.93,-1.13,-.04,-.33,.52,.08,-.93,-.88,.53,.64,.72,1.4,-.3,-.38,.75,-1.31,-.01,-.09,.76,.29,-.05,-.11,.37,.47,.13,.54,.45,-.41,-.46,-.36,-.4,-.6],[-29350,-1410.3,4545.5,-2556.2,2950.9,-3133.6,1648.7,-814.2,1360.9,-2404.2,-56.9,1243.8,237.6,453.4,-549.6,894.7,799.6,278.6,55.8,-134,-281.1,212,12,-375.4,-232.9,369,45.3,187.2,220,-138.7,-122.9,-141.9,42.9,20.9,106.2,64.3,63.8,-18.4,76.7,16.8,-115.7,48.9,-40.9,-59.8,14.9,10.9,-60.8,72.8,79.6,-76.9,-48.9,-8.8,-14.4,59.3,-1,15.8,23.5,2.5,-7.4,-11.2,-25.1,14.3,-2.2,23.1,10.9,7.2,-17.5,-12.6,2,11.5,-21.8,-9.7,16.9,12.7,14.9,.7,-16.8,-5.2,1,3.9,4.7,8,-24.8,3,12.1,-.2,8.3,-2.5,-3.4,-13.1,-5.3,2.4,7.2,8.6,-.6,-8.7,.8,-12.8,9.8,-1.3,-6.4,3.3,.2,.1,2,2.5,-1,5.4,-.5,-9,-.9,.4,1.5,-4.2,.9,-3.8,-2.6,.9,-3.9,-9,3,-1.4,0,-2.5,2.8,2.4,-.6,-.6,.1,0,.5,-.6,-.3,-.1,-1.2,1.1,-1.7,-1,-2.9,-.1,-1.8,2.6,-2.3,-2,-.1,-1.2,.4,.6,1.2,1,-1.2,-1.5,.6,0,.5,.6,.5,-.2,-.1,.8,-.5,.1,-.2,-.9,-1.2,.1,-.7,.2,.2,-.9,-.9,.6,.7,.7,1.2,-.2,-.3,.5,-1.3,.1,-.1,.7,.2,0,-.2,.3,.5,.2,.6,.4,-.6,-.5,-.3,-.4,-.5]],B=[12.6,10,-21.5,-11.2,-5.3,-27.3,-8.3,-11.1,-1.5,-4.4,3.8,.4,-.2,-15.6,-3.9,-1.7,-2.3,-1.3,-5.8,4.1,5.4,1.6,-6.8,-4.1,.6,1.3,-.5,0,2.1,.7,.5,2.3,1.7,1,1.9,-.2,-.3,.3,.8,-1.6,1.2,-.4,-.8,.8,.4,.7,.9,.9,-.1,-.1,.6,-.1,.5,.5,-.7,-.1,0,-.8,-.9,-.8,.5,.9,-.3,-.1,.2,-.3,0,.4,.4,-.3,-.1,.4,.3,-.5,.1,-.6,0,.3,.3,.2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];class d{static A_KM=6371.2;static MAX_DEGREE=13;static coefficientsAt(t){const a=t.getUTCFullYear()+(t.getUTCMonth()+t.getUTCDate()/31)/12,s=N;let n;if(a<=s[0])n=[...P[0]];else if(a>=s[s.length-1]){const e=Math.min(a-s[s.length-1],5);n=P[s.length-1].map((l,o)=>l+B[o]*e)}else{const e=s.findIndex(o=>o>a),l=(a-s[e-1])/(s[e]-s[e-1]);n=P[e-1].map((o,g)=>o+(P[e][g]-o)*l)}const i=Array.from({length:d.MAX_DEGREE+1},()=>new Array(d.MAX_DEGREE+1).fill(0)),r=Array.from({length:d.MAX_DEGREE+1},()=>new Array(d.MAX_DEGREE+1).fill(0));return b.forEach(([e,l,o],g)=>{(e==="g"?i:r)[l][o]=n[g]}),{g:i,h:r}}static fieldAt(t,a,s,n,i=d.MAX_DEGREE){const r=Math.hypot(a,s,n),e=n/r,l=Math.max(Math.sqrt(Math.max(0,1-e*e)),1e-9),o=Math.atan2(s,a),g=d.p,c=d.dp;g[0][0]=1,c[0][0]=0;let f=0,K=0,E=0,_=(d.A_KM/r)**2;for(let h=1;h<=i;h++){_*=d.A_KM/r;for(let M=0;M<=h;M++){if(h===M){const O=h===1?1:Math.sqrt(1-1/(2*h));g[h][h]=O*l*g[h-1][h-1],c[h][h]=O*(l*c[h-1][h-1]+e*g[h-1][h-1])}else{const O=Math.sqrt(h*h-M*M),L=h-2>=M?Math.sqrt((h-1)**2-M*M):0,U=h-2>=M?g[h-2][M]:0,C=h-2>=M?c[h-2][M]:0;g[h][M]=((2*h-1)*e*g[h-1][M]-L*U)/O,c[h][M]=((2*h-1)*(e*c[h-1][M]-l*g[h-1][M])-L*C)/O}const T=Math.cos(M*o),x=Math.sin(M*o),G=t.g[h][M],H=t.h[h][M],k=G*T+H*x;f+=(h+1)*_*k*g[h][M],K-=_*k*c[h][M],E+=_*M*(G*x-H*T)*g[h][M]/l}}const m=Math.cos(o),R=Math.sin(o);return[f*l*m+K*e*m-E*R,f*l*R+K*e*R+E*m,f*e-K*l]}static p=Array.from({length:d.MAX_DEGREE+1},()=>new Array(d.MAX_DEGREE+1).fill(0));static dp=Array.from({length:d.MAX_DEGREE+1},()=>new Array(d.MAX_DEGREE+1).fill(0));static apexLatitude(t,a,s){const n=d.coefficientsAt(s),i=t*Math.PI/180,r=a*Math.PI/180;let e=[d.A_KM*Math.cos(i)*Math.cos(r),d.A_KM*Math.cos(i)*Math.sin(r),d.A_KM*Math.sin(i)];const l=d.fieldAt(n,...e),o=l[0]*e[0]+l[1]*e[1]+l[2]*e[2]<0?-1:1,g=K=>{const E=d.fieldAt(n,K[0],K[1],K[2],8),_=Math.hypot(E[0],E[1],E[2]);return[o*E[0]/_,o*E[1]/_,o*E[2]/_]};let c=d.A_KM,f=c;for(let K=0;K<4e3;K++){const E=.01*c,_=g(e),m=g([e[0]+_[0]*E/2,e[1]+_[1]*E/2,e[2]+_[2]*E/2]),R=g([e[0]+m[0]*E/2,e[1]+m[1]*E/2,e[2]+m[2]*E/2]),h=g([e[0]+R[0]*E,e[1]+R[1]*E,e[2]+R[2]*E]);if(e=[0,1,2].map(M=>e[M]+E/6*(_[M]+2*m[M]+2*R[M]+h[M])),c=Math.hypot(e[0],e[1],e[2]),c>30*d.A_KM)return Math.sign(t||1)*80;if(c<f)break;f=c}return Math.sign(o===-1?1:-1)*(Math.acos(Math.sqrt(Math.min(1,d.A_KM/f)))*180)/Math.PI}}class S{static PHOTONS_PER_KR=1e13/(4*Math.PI);static GREEN=S.line(557.7);static RED=S.line(631.5);static BLUE=S.line(427.8);static line(t){const a=y.colourMatching(t),s=662607015e-42*299792458/(t*1e-9),n=S.PHOTONS_PER_KR*s,i=y.linearSrgbOf(a).map(e=>Math.max(e,0)),r=.2126*i[0]+.7152*i[1]+.0722*i[2];return{wavelengthNm:t,cdM2PerKR:683*a[1]*n,colour:i.map(e=>e/r)}}}class D{static DEFAULT_KP=3;static NOON_SHIFT_DEG=8;static equatorwardEdgeDeg(t){return 66.5-2.04*Math.max(0,Math.min(12,t))}static widthDeg(t){return 8+1.2*Math.max(0,Math.min(12,t))}static diffuseKR(t){return .5+.15*Math.max(0,t)}static arcsOf(t){return t<1?1:Math.min(4,Math.round(1+t/2.5))}static arcKROf(t){return 10*2**(Math.max(0,t)/2.5)}static arcRedOf(t){const a=Math.max(0,t-6);return{share:.1+.25*a,peakKm:250+40*a,widthKm:70+30*a}}static redKROf(t){return t<=5?0:.5*(t-5)**1.5}static edgeAt(t,a){return t+D.NOON_SHIFT_DEG*(1-Math.cos(a*Math.PI/12))/2}}class p{static EARTH_KM=6371;static BOTTOM_KM=90;static TOP_KM=900;static ARC_BASE_KM=105;static ARC_SCALE_KM=35;static DIFFUSE_BASE_KM=115;static DIFFUSE_SCALE_KM=45;static RED_PEAK_KM=250;static RED_WIDTH_KM=70;static STORM_RED_PEAK_KM=380;static STORM_RED_WIDTH_KM=150;static ARC_THICKNESS_DEG=.06;static RED_OF_GREEN=.25;static BLUE_OF_GREEN=.12;static SUNLIT_BLUE_OF_GREEN=.2;static exponential(t,a,s){if(t<a-8)return 0;const n=Math.min(1,Math.max(0,(t-(a-8))/10));return n*n*(3-2*n)*Math.exp(-Math.max(0,t-a)/s)/(s+5)}static gaussian(t,a,s){const n=(t-a)/s;return Math.exp(-.5*n*n)/(s*Math.sqrt(2*Math.PI))}}class A{static FADE_MS=6e4;static OUT_OF_SIGHT_DEG=28;static kpAt(t,a){const s=t.activity;if(!s||s.length===0)return t.kp??D.DEFAULT_KP;if(a<=s[0].t)return s[0].kp;for(let n=1;n<s.length;n++){if(a>s[n].t)continue;const i=s[n-1],r=s[n];return i.kp+(r.kp-i.kp)*(a-i.t)/Math.max(r.t-i.t,1)}return s[s.length-1].kp}static fadeAt(t,a){const s=t.fromT===void 0?1:Math.min(1,Math.max(0,(a-t.fromT)/A.FADE_MS)),n=t.untilT===void 0?1:Math.min(1,Math.max(0,(t.untilT-a)/A.FADE_MS));return s*n}static apexes=new Map;static apexLatitude(t,a,s){const n=`${t.toFixed(2)},${a.toFixed(2)},${s.toISOString().slice(0,10)}`;let i=A.apexes.get(n);return i===void 0&&(i=d.apexLatitude(t,a,s),A.apexes.size>64&&A.apexes.clear(),A.apexes.set(n,i)),i}static seed(t){let a=2166136261;for(let s=0;s<t.length;s++)a=Math.imul(a^t.charCodeAt(s),16777619);return(a>>>0)%1e4/1e4}static viewAt(t,a,s,n,i){const r=A.fadeAt(t,a);if(r<=0)return;const e=A.kpAt(t,a),l=A.seed(t.id),o=a/1e3,g=Math.max(0,Math.min(4,Math.round(t.arcs??D.arcsOf(e)))),c=t.arcKR??D.arcKROf(e),f=D.widthDeg(e),K=[];for(let R=0;R<g;R++){const h=l*37+R*2.3,M=.7+.3*Math.sin(2*Math.PI*o/(90+40*R)+h);K.push({offsetDeg:f*(g===1?.15:.1+.8*R/(g-1)),kr:c*M/(1+.6*R),foldPhase:h,rayPhase:l*1e3+R*131})}const E=Math.abs(A.apexLatitude(s.lat,s.lng,n));if((t.edgeLatDeg??D.equatorwardEdgeDeg(e))-E>A.OUT_OF_SIGHT_DEG)return;const _=F.latitudeOf(s.lat,s.lng,n),m=_-E*Math.sign(_||1);return{id:t.id,kp:e,edgeDeg:(t.edgeLatDeg??D.equatorwardEdgeDeg(e))+m,widthDeg:f,diffuseKR:D.diffuseKR(e),redKR:t.redKR??D.redKROf(e),arcRed:D.arcRedOf(e),arcs:K,axis:F.axisAt(s.lat,s.lng,n),sun:i,observerLatitudeDeg:_-m,observerHeightKm:s.heightM/1e3,fade:r,timeS:o}}}class u{static STEPS=160;static along(t,a,s=u.STEPS){const i=p.EARTH_KM+t.observerHeightKm,r=u.shellRange(i,a[1]);if(!r)return[0,0,0];const[e,l]=r,o=(l-e)/s,g=[0,0,0];for(let c=0;c<s;c++){const f=e+(c+.5)*o,K=[a[0]*f,i+a[1]*f,a[2]*f],E=u.emission(t,K);g[0]+=E[0]*o,g[1]+=E[1]*o,g[2]+=E[2]*o}return[g[0]*t.fade,g[1]*t.fade,g[2]*t.fade]}static shellRange(t,a){const s=p.EARTH_KM,n=l=>{const o=t*a,g=t*t-l*l,c=o*o-g;if(c<0)return;const f=Math.sqrt(c);return[-o-f,-o+f]},i=n(s);if(i&&i[0]>0)return;const r=n(s+p.BOTTOM_KM),e=n(s+p.TOP_KM);return[Math.max(0,r[1]),e[1]]}static emission(t,a){const s=Math.hypot(a[0],a[1],a[2]),n=s-p.EARTH_KM;if(n<p.BOTTOM_KM-10||n>p.TOP_KM)return[0,0,0];const i=[a[0]/s,a[1]/s,a[2]/s],r=Math.asin(Math.max(-1,Math.min(1,i[0]*t.axis[0]+i[1]*t.axis[1]+i[2]*t.axis[2])))*180/Math.PI,e=Math.abs(F.footLatitude(r,n)),l=F.localTime(i,t.axis,t.sun),o=D.edgeAt(t.edgeDeg,l),g=t.widthDeg*(1-.4*(1-Math.cos(l*Math.PI/12))/2),c=p,f=u.smoothstep(o-1,o+.5,e)*(1-u.smoothstep(o+g-1,o+g+1.5,e));let K=t.diffuseKR*f*c.exponential(n,c.DIFFUSE_BASE_KM,c.DIFFUSE_SCALE_KM),E=t.diffuseKR*f*c.RED_OF_GREEN*c.gaussian(n,c.RED_PEAK_KM,c.RED_WIDTH_KM),_=0;const m=u.sunlit(a,t.sun);for(const R of t.arcs){const h=(e-(o+R.offsetDeg))/c.ARC_THICKNESS_DEG,M=Math.exp(-.5*h*h);if(M<1e-4)continue;const T=R.kr*M,x=T*c.exponential(n,c.ARC_BASE_KM,c.ARC_SCALE_KM);K+=x,E+=T*t.arcRed.share*c.gaussian(n,t.arcRed.peakKm,t.arcRed.widthKm),_+=x*c.BLUE_OF_GREEN+T*m*c.SUNLIT_BLUE_OF_GREEN*c.gaussian(n,300,120)}if(t.redKR>0){const R=(e-(o-1))/3;E+=t.redKR*Math.exp(-.5*R*R)*c.gaussian(n,c.STORM_RED_PEAK_KM,c.STORM_RED_WIDTH_KM)}return[K,E,_]}static sunlit(t,a){const s=t[0]*a[0]+t[1]*a[1]+t[2]*a[2];if(s>0)return 1;const n=Math.hypot(t[0]-s*a[0],t[1]-s*a[1],t[2]-s*a[2]);return u.smoothstep(p.EARTH_KM+20,p.EARTH_KM+80,n)}static smoothstep(t,a,s){const n=Math.min(1,Math.max(0,(s-t)/(a-t)));return n*n*(3-2*n)}}export{p as A,S as a,u as b,A as c,D as d};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{x as h,_ as o,
|
|
1
|
+
import{x as h,_ as o,bg as d,aa as p,a9 as g,a7 as c,bv as f}from"./rr0-sighting-editor.mjs";import{S as _}from"./SkyEventEditorStyle-CvY_AhbI.js";import{c as u,d as n}from"./Aurora-DOIRpjiG.js";const v=h.catalog({en:()=>o(()=>import("./AuroraParameterTexts_en-shkUd-dT.js"),[],import.meta.url).then(a=>a.auroraParameterTexts_en),fr:()=>o(()=>import("./AuroraParameterTexts_fr-CoJnicWs.js"),[],import.meta.url).then(a=>a.auroraParameterTexts_fr),es:()=>o(()=>import("./AuroraParameterTexts_es-CwGYyafK.js"),[],import.meta.url).then(a=>a.auroraParameterTexts_es),it:()=>o(()=>import("./AuroraParameterTexts_it-DHniBj_2.js"),[],import.meta.url).then(a=>a.auroraParameterTexts_it)}),x=h.catalog({en:()=>o(()=>import("./AuroraEditorMessages_en-CpU3BS-B.js"),[],import.meta.url).then(a=>a.auroraEditorMessages_en),fr:()=>o(()=>import("./AuroraEditorMessages_fr-0DtPXXAs.js"),[],import.meta.url).then(a=>a.auroraEditorMessages_fr),es:()=>o(()=>import("./AuroraEditorMessages_es-i8-psDHN.js"),[],import.meta.url).then(a=>a.auroraEditorMessages_es),it:()=>o(()=>import("./AuroraEditorMessages_it-Dn2UHyk9.js"),[],import.meta.url).then(a=>a.auroraEditorMessages_it)});class s{static fromKp(t){return r=>t(u.kpAt(r,0))}static time(t,r,e){return{type:"number",key:t,min:-36e3,max:36e3,step:1,unit:"s",scale:.001,label:r,hint:e,group:"when"}}static SET={kind:"aurora",title:"aurora",parameters:[{type:"said",key:"title",label:"name",group:"field"},{type:"number",key:"kp",min:0,max:12,step:.33,label:"kp",hint:"kpHint",effective:t=>t.activity?.length?u.kpAt(t,0):n.DEFAULT_KP,group:"field"},{type:"number",key:"edgeLatDeg",min:20,max:75,step:.1,unit:"°",label:"edge",hint:"edgeHint",effective:s.fromKp(t=>Math.round(n.equatorwardEdgeDeg(t)*10)/10),group:"field"},{type:"number",key:"arcs",min:0,max:4,step:1,label:"arcs",hint:"arcsHint",effective:s.fromKp(n.arcsOf),group:"light"},{type:"number",key:"arcKR",min:.1,max:1e3,step:.1,unit:"kR",label:"arcBrightness",hint:"arcBrightnessHint",effective:s.fromKp(t=>Math.round(n.arcKROf(t)*10)/10),group:"light"},{type:"number",key:"redKR",min:0,max:100,step:.1,unit:"kR",label:"red",hint:"redHint",effective:s.fromKp(t=>Math.round(n.redKROf(t)*10)/10),group:"light"},s.time("fromT","from","fromHint"),s.time("untilT","until","untilHint")]};static publish(){d.publish(s.SET)}}class l{constructor(t,r,e){this.container=t,this.host=r,_.attach(t,"aurora-editor-part",l.STYLE),this.language=e,d.of("aurora")||s.publish(),this.ready=this.setLanguage(e)}messages;parameterTexts;ready;languageToken=0;currentId;form;list;language;shown=[];static STYLE=".aurora-editor-part { flex-basis: 100%; min-width: 0; } .aurora-editor-part .aurora-editor, .aurora-editor-part .aurora-fields { display: flex; flex-wrap: wrap; gap: 8px; align-items: end; } .aurora-editor-part #aurora-list, .aurora-editor-part .aurora-fields { flex-basis: 100%; min-width: 0; } .aurora-editor-part [hidden] { display: none !important; } .aurora-editor-part .aurora-intro { flex-basis: 100%; margin: 0; } .aurora-editor-part .aurora-parameters { flex-basis: 100%; min-width: 0; display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-start; } .aurora-editor-part .parameter-group { flex: 1 1 14em; min-width: 0; box-sizing: border-box; margin: 0; display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: flex-start; align-content: flex-start; } .aurora-editor-part input, .aurora-editor-part select { max-width: 100%; box-sizing: border-box; } .aurora-editor-part label { min-width: 0; max-width: 100%; } .aurora-editor-part input.parameter-derived::placeholder { opacity: .65; }";async setLanguage(t){const r=++this.languageToken;this.language=t;const[e,i]=await Promise.all([x.load(t),v.load(t)]);r===this.languageToken&&(this.messages=e,this.parameterTexts=i,this.render(),this.sync())}sync(){if(!this.messages)return;const t=this.auroras;this.shown=[...t],t.some(i=>i.id===this.currentId)||(this.currentId=t[0]?.id),this.list?.setItems(t.map(i=>({id:i.id,label:this.labelOf(i)})),this.currentId);const r=this.current;if(this.element("aurora-fields").hidden=r===void 0,!r)return;const e=p.resolve(d.of("aurora"),this.parameterTexts);this.form??=new g(this.element("aurora-parameters"),this.language,"",{said:()=>this.host.said(),writingLanguage:()=>this.host.writingLanguage()}),this.form.show(e,r,()=>this.host.changed())}refresh(){if(!this.messages)return;const t=this.auroras;t.length===this.shown.length&&t.every((r,e)=>r===this.shown[e])||this.sync()}setTime(t){}get current(){return this.auroras.find(t=>t.id===this.currentId)}render(){const t=this.messages;this.form=void 0,this.container.innerHTML=`<div class="aurora-editor">
|
|
2
2
|
<p class="aurora-intro">${t.intro}</p>
|
|
3
3
|
<div id="aurora-list"></div>
|
|
4
4
|
<div id="aurora-fields" class="aurora-fields">
|
package/dist-embed-sighting-editor/{AuroraSimulation-vKcv2Hue.js → AuroraSimulation-CX7V0obh.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{bO as O,bP as z,bs as P,Y as h,bQ as $,b6 as L,bR as _,bN as I,bx as b}from"./rr0-sighting-editor.mjs";import{A as p,a as c,b as A,c as G}from"./Aurora-DOIRpjiG.js";class r{static RADIUS=885;static MAX_ARCS=4;static STEPS=56;static ALTITUDES=[-3,0,1,2,4,7,12,20,35,60,90];object;material;shown=!1;constructor(){const e=p,a=i=>i.toFixed(6);this.material=new O({uniforms:{uAxis:{value:new h(0,1,0)},uSun:{value:new h(0,-1,0)},uObserverKm:{value:e.EARTH_KM},uEdge:{value:60},uWidth:{value:8},uDiffuse:{value:0},uRed:{value:0},uArcRed:{value:new h(.1,250,70)},uArcs:{value:Array.from({length:r.MAX_ARCS},()=>new $)},uArcCount:{value:0},uTime:{value:0},uGreenLight:{value:new h},uRedLight:{value:new h},uBlueLight:{value:new h},uAir:{value:r.ALTITUDES.map(()=>new h(1,1,1))}},vertexShader:`
|
|
2
2
|
varying vec3 vDirection;
|
|
3
3
|
void main() {
|
|
4
4
|
vDirection = (modelMatrix * vec4(position, 1.0)).xyz - cameraPosition;
|
|
@@ -154,4 +154,4 @@ import{bM as O,bN as z,bq as L,Y as h,bO as P,b4 as $,bP as _,bL as I,bv as b}fr
|
|
|
154
154
|
if (max(light.r, max(light.g, light.b)) <= 0.0) discard;
|
|
155
155
|
gl_FragColor = vec4(min(light, vec3(60000.0)), 1.0);
|
|
156
156
|
}
|
|
157
|
-
`,transparent:!0,blending:
|
|
157
|
+
`,transparent:!0,blending:P,depthWrite:!1,side:z,fog:!1}),this.object=new L(new _(r.RADIUS,96,48),this.material),this.object.name="aurora",this.object.renderOrder=-1,this.object.frustumCulled=!1,this.object.visible=!1}get count(){return this.shown?1:0}set(e,a,i){if(this.shown=e!==void 0,this.object.visible=this.shown,!e)return;const t=this.material.uniforms;t.uAxis.value.set(...e.axis),t.uSun.value.set(...e.sun).normalize(),t.uObserverKm.value=p.EARTH_KM+e.observerHeightKm,t.uEdge.value=e.edgeDeg,t.uWidth.value=e.widthDeg,t.uDiffuse.value=e.diffuseKR,t.uRed.value=e.redKR,t.uArcRed.value.set(e.arcRed.share,e.arcRed.peakKm,e.arcRed.widthKm);const l=e.arcs.slice(0,r.MAX_ARCS);t.uArcCount.value=l.length,l.forEach((o,d)=>t.uArcs.value[d].set(o.offsetDeg,o.kr,o.foldPhase,o.rayPhase)),t.uTime.value=e.timeS;const u=a*e.fade,s=(o,d)=>d.set(o.colour[0],o.colour[1],o.colour[2]).multiplyScalar(o.cdM2PerKR*u);s(c.GREEN,t.uGreenLight.value),s(c.RED,t.uRedLight.value),s(c.BLUE,t.uBlueLight.value),r.ALTITUDES.forEach((o,d)=>{const n=i({altitudeDeg:Math.max(o,0),azimuthDeg:0});t.uAir.value[d].set(n[0],n[1],n[2])})}dispose(){this.object.geometry.dispose(),this.material.dispose(),this.object.removeFromParent()}}class E{inSky=!0;static DAYLIGHT_DEG=-4;system=new r;lit;get object(){return this.system.object}get drawnCount(){return this.system.count}drawn;update(e,a,i){const t=i.date?this.viewOf(e,a,i):void 0;this.system.set(t,i.relativeScale,l=>i.transmittanceFromSpace(l)),this.drawn=t&&{view:t,relativeScale:i.relativeScale},this.lightGround(t,i)}pick(e,a,i){if(!this.drawn)return;const{view:t,relativeScale:l}=this.drawn,[u,s,o]=A.along(t,[a.x,a.y,a.z]);if(!((u*c.GREEN.cdM2PerKR+s*c.RED.cdM2PerKR+o*c.BLUE.cdM2PerKR)*l<.1*i.skyLightTowards(a)))return{id:t.id,detail:{kp:t.kp,green:u,red:s}}}viewOf(e,a,i){const t=new Date(i.date.getTime()),l=I("Sun",t,{lat:i.observer.lat,lng:i.observer.lng,elevationM:i.observer.heightM});if(l.altitudeDeg>E.DAYLIGHT_DEG)return;const u=b(l.altitudeDeg,l.azimuthDeg,1);for(const s of e){const o=G.viewAt(s,a,i.observer,t,[u.x,u.y,u.z]);if(o)return o}}lightGround(e,a){if(!e){this.lit&&a.lightFrom([]),this.lit=void 0;return}const i=`${e.kp.toFixed(1)}:${e.fade.toFixed(2)}:${Math.floor(e.timeS/10)}:${a.observer.lat.toFixed(2)}:${a.observer.lng.toFixed(2)}`;if(this.lit?.key===i)return;let t=0,l=0,u={altitudeDeg:90,azimuthDeg:0};const s=[3,10,22,40,62,82],o=12;for(let n=0;n<s.length;n++){const T=n===0?0:(s[n-1]+s[n])/2,R=n===s.length-1?90:(s[n]+s[n+1])/2,x=2*Math.PI*(Math.sin(R*Math.PI/180)-Math.sin(T*Math.PI/180))/o,D=Math.sin(s[n]*Math.PI/180);for(let g=0;g<o;g++){const f={altitudeDeg:s[n],azimuthDeg:360*g/o},m=b(f.altitudeDeg,f.azimuthDeg,1),[S,M,w]=A.along(e,[m.x,m.y,m.z],48),K=a.transmittanceFromSpace(f)[1]*a.cloudTransmission(f),v=(S*c.GREEN.cdM2PerKR+M*c.RED.cdM2PerKR+w*c.BLUE.cdM2PerKR)*K;t+=v*x*D,v>l&&(l=v,u=f)}}const d=t<1e-4?[]:[{position:u,magnitude:-14.18-2.5*Math.log10(t)}];this.lit={key:i,sources:d},a.lightFrom(d)}dispose(){this.system.dispose()}}export{E as AuroraSimulation};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{bY as h,a as p}from"./rr0-sighting-editor.mjs";import{N as m}from"./NearestApproach-jDpDx7cm.js";import{CoverageAssessor as S}from"./CoverageAssessor-CcVuVsG0.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=["fitted","assumed","derived","stated","measured","established"];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};
|