@rr0/ufoathome 0.165.0 → 0.166.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (292) hide show
  1. package/dist-embed-interview/InterviewMessages_en-BNau2xU8.js +1 -0
  2. package/dist-embed-interview/rr0-interview.mjs +6 -6
  3. package/dist-embed-scene/{AdsbLolArchiveProvider-Cea0LAnZ.js → AdsbLolArchiveProvider-C5EeYhpl.js} +1 -1
  4. package/dist-embed-scene/BeamEditor-ClooLylg.js +30 -0
  5. package/dist-embed-scene/BeamKindMessages_en-5RezNkyz.js +1 -0
  6. package/dist-embed-scene/BeamKindMessages_es-B5vSWVjK.js +1 -0
  7. package/dist-embed-scene/BeamKindMessages_fr--28-36OI.js +1 -0
  8. package/dist-embed-scene/BeamKindMessages_it-X53Fuf2U.js +1 -0
  9. package/dist-embed-scene/BeamParameterTexts_en-DZB75ouZ.js +1 -0
  10. package/dist-embed-scene/BeamParameterTexts_es-AeZmsufG.js +1 -0
  11. package/dist-embed-scene/BeamParameterTexts_fr-BHG3fW40.js +1 -0
  12. package/dist-embed-scene/BeamParameterTexts_it-CPwmQX-g.js +1 -0
  13. package/dist-embed-scene/{BeamSystem-B80EaJKx.js → BeamSystem-PF6irYQf.js} +1 -1
  14. package/dist-embed-scene/FlareKindMessages_en-BroHgiwr.js +1 -0
  15. package/dist-embed-scene/FlareKindMessages_es-SraQyQ3Y.js +1 -0
  16. package/dist-embed-scene/FlareKindMessages_fr-Dy5SlSna.js +1 -0
  17. package/dist-embed-scene/FlareKindMessages_it-CF39wmrC.js +1 -0
  18. package/dist-embed-scene/{GLTFLoader-YecOnQON.js → GLTFLoader-DB2upivM.js} +1 -1
  19. package/dist-embed-scene/LanternEditor-DWhJGaQW.js +9 -0
  20. package/dist-embed-scene/LanternKindMessages_en-fUfoRYC0.js +1 -0
  21. package/dist-embed-scene/LanternKindMessages_es-Chyc607D.js +1 -0
  22. package/dist-embed-scene/LanternKindMessages_fr-CDem7PTY.js +1 -0
  23. package/dist-embed-scene/LanternKindMessages_it-yOojym1u.js +1 -0
  24. package/dist-embed-scene/LanternParameterTexts_en-CcnGd8UH.js +1 -0
  25. package/dist-embed-scene/LanternParameterTexts_es-CUTgNutZ.js +1 -0
  26. package/dist-embed-scene/LanternParameterTexts_fr-P2JwYOUy.js +1 -0
  27. package/dist-embed-scene/LanternParameterTexts_it-CzNnIUrX.js +1 -0
  28. package/dist-embed-scene/{LaserBeam-DXzWB-xk.js → LaserBeam-DXZysEYv.js} +1 -1
  29. package/dist-embed-scene/LaunchEditor-DQ-F25le.js +22 -0
  30. package/dist-embed-scene/LaunchKindMessages_en-Batvnyw3.js +1 -0
  31. package/dist-embed-scene/LaunchKindMessages_es-KYyQ9gbu.js +1 -0
  32. package/dist-embed-scene/LaunchKindMessages_fr-CoojboIk.js +1 -0
  33. package/dist-embed-scene/LaunchKindMessages_it-9HA3cjgP.js +1 -0
  34. package/dist-embed-scene/LaunchParameterTexts_en-DvrCwbDM.js +1 -0
  35. package/dist-embed-scene/LaunchParameterTexts_es--RUAegVp.js +1 -0
  36. package/dist-embed-scene/LaunchParameterTexts_fr-Bh_1zVzy.js +1 -0
  37. package/dist-embed-scene/LaunchParameterTexts_it-CWDx9nJy.js +1 -0
  38. package/dist-embed-scene/{LaunchPlume-DwOSrKP_.js → LaunchPlume-lH1zITP-.js} +1 -1
  39. package/dist-embed-scene/{LaunchSimulation-ClGdZJHr.js → LaunchSimulation-BrDxk8DW.js} +1 -1
  40. package/dist-embed-scene/{ModuleSession-DAQNvnRi.js → ModuleSession-fhQ2P9LG.js} +2 -2
  41. package/dist-embed-scene/ModuleThree-Du7Omkv6.js +1 -0
  42. package/dist-embed-scene/{ParameterForm-D0GvLmqx.js → ParameterForm-BNfKnqZ4.js} +14 -14
  43. package/dist-embed-scene/PerceptionMessages_en-B2O6DR64.js +1 -0
  44. package/dist-embed-scene/PerceptionMessages_es-BmkP6OqD.js +1 -0
  45. package/dist-embed-scene/PerceptionMessages_fr-B59TnGBC.js +1 -0
  46. package/dist-embed-scene/PerceptionMessages_it-DPlxRmxu.js +1 -0
  47. package/dist-embed-scene/ReentryEditor-IDlX4mtf.js +27 -0
  48. package/dist-embed-scene/ReentryKindMessages_en-Cbgk3paQ.js +1 -0
  49. package/dist-embed-scene/ReentryKindMessages_es-DwgJQanC.js +1 -0
  50. package/dist-embed-scene/ReentryKindMessages_fr-D9r9x2bK.js +1 -0
  51. package/dist-embed-scene/ReentryKindMessages_it-DQ-J5YpD.js +1 -0
  52. package/dist-embed-scene/ReentryParameterTexts_en-BH1tGP5C.js +1 -0
  53. package/dist-embed-scene/ReentryParameterTexts_es-BDMJ4K1g.js +1 -0
  54. package/dist-embed-scene/ReentryParameterTexts_fr-C8ROK57p.js +1 -0
  55. package/dist-embed-scene/ReentryParameterTexts_it-CwC8vNTI.js +1 -0
  56. package/dist-embed-scene/{ReentrySimulation-rnJU2x1Y.js → ReentrySimulation-BHQBGIr_.js} +1 -1
  57. package/dist-embed-scene/SceneNames_en-MuZS0swp.js +1 -0
  58. package/dist-embed-scene/SceneNames_es-DuwAjd1R.js +1 -0
  59. package/dist-embed-scene/SceneNames_fr-ChDjaMY9.js +1 -0
  60. package/dist-embed-scene/SceneNames_it-CWzCQiEh.js +1 -0
  61. package/{dist-embed-sighting/TimelineTracks-C7uTt9N5.js → dist-embed-scene/TimelineTracks-C02lbugN.js} +1 -1
  62. package/dist-embed-scene/UfoMessages_en-BbYI-msn.js +1 -0
  63. package/dist-embed-scene/UfoMessages_es-DreLXcIR.js +1 -0
  64. package/dist-embed-scene/UfoMessages_fr-D9BCRY2m.js +1 -0
  65. package/dist-embed-scene/UfoMessages_it-C8r0jnJP.js +1 -0
  66. package/dist-embed-scene/rr0-scene.mjs +310 -310
  67. package/dist-embed-scene/{trafficRuntime-C3sA3Jg_.js → trafficRuntime-CdAJY70O.js} +2 -2
  68. package/dist-embed-sighting/{AdsbLolArchiveProvider-BGg8e-TS.js → AdsbLolArchiveProvider-Dfc5WtsT.js} +1 -1
  69. package/dist-embed-sighting/{BallesterGuaspAssessor-DHpHbF6s.js → BallesterGuaspAssessor-VMcyGlQb.js} +1 -1
  70. package/dist-embed-sighting/BeamEditor-Dvqs7sme.js +30 -0
  71. package/dist-embed-sighting/BeamKindMessages_en-5RezNkyz.js +1 -0
  72. package/dist-embed-sighting/BeamKindMessages_es-B5vSWVjK.js +1 -0
  73. package/dist-embed-sighting/BeamKindMessages_fr--28-36OI.js +1 -0
  74. package/dist-embed-sighting/BeamKindMessages_it-X53Fuf2U.js +1 -0
  75. package/dist-embed-sighting/BeamParameterTexts_en-DZB75ouZ.js +1 -0
  76. package/dist-embed-sighting/BeamParameterTexts_es-AeZmsufG.js +1 -0
  77. package/dist-embed-sighting/BeamParameterTexts_fr-BHG3fW40.js +1 -0
  78. package/dist-embed-sighting/BeamParameterTexts_it-CPwmQX-g.js +1 -0
  79. package/dist-embed-sighting/BeamSystem-BSO1d2Na.js +1 -0
  80. package/dist-embed-sighting/ContrailSystem-Bgre4cLs.js +1 -0
  81. package/dist-embed-sighting/FlareKindMessages_en-BroHgiwr.js +1 -0
  82. package/dist-embed-sighting/FlareKindMessages_es-SraQyQ3Y.js +1 -0
  83. package/dist-embed-sighting/FlareKindMessages_fr-Dy5SlSna.js +1 -0
  84. package/dist-embed-sighting/FlareKindMessages_it-CF39wmrC.js +1 -0
  85. package/dist-embed-sighting/GLTFLoader-BkhEomyw.js +1 -0
  86. package/dist-embed-sighting/{HeadlightSystem-CXPE3feA.js → HeadlightSystem-CmppP6Mm.js} +1 -1
  87. package/dist-embed-sighting/HynekAssessor-tNpli5GC.js +1 -0
  88. package/dist-embed-sighting/LanternEditor-DRmWNbXO.js +9 -0
  89. package/dist-embed-sighting/LanternKindMessages_en-fUfoRYC0.js +1 -0
  90. package/dist-embed-sighting/LanternKindMessages_es-Chyc607D.js +1 -0
  91. package/dist-embed-sighting/LanternKindMessages_fr-CDem7PTY.js +1 -0
  92. package/dist-embed-sighting/LanternKindMessages_it-yOojym1u.js +1 -0
  93. package/dist-embed-sighting/LanternParameterTexts_en-CcnGd8UH.js +1 -0
  94. package/dist-embed-sighting/LanternParameterTexts_es-CUTgNutZ.js +1 -0
  95. package/dist-embed-sighting/LanternParameterTexts_fr-P2JwYOUy.js +1 -0
  96. package/dist-embed-sighting/LanternParameterTexts_it-CzNnIUrX.js +1 -0
  97. package/dist-embed-sighting/{LaserBeam-CovzRtac.js → LaserBeam-CT0D5uXQ.js} +1 -1
  98. package/dist-embed-sighting/LaunchEditor-BWm07eFT.js +22 -0
  99. package/dist-embed-sighting/LaunchKindMessages_en-Batvnyw3.js +1 -0
  100. package/dist-embed-sighting/LaunchKindMessages_es-KYyQ9gbu.js +1 -0
  101. package/dist-embed-sighting/LaunchKindMessages_fr-CoojboIk.js +1 -0
  102. package/dist-embed-sighting/LaunchKindMessages_it-9HA3cjgP.js +1 -0
  103. package/dist-embed-sighting/LaunchParameterTexts_en-DvrCwbDM.js +1 -0
  104. package/dist-embed-sighting/LaunchParameterTexts_es--RUAegVp.js +1 -0
  105. package/dist-embed-sighting/LaunchParameterTexts_fr-Bh_1zVzy.js +1 -0
  106. package/dist-embed-sighting/LaunchParameterTexts_it-CWDx9nJy.js +1 -0
  107. package/dist-embed-sighting/{LaunchSimulation-C0cSHpLE.js → LaunchSimulation-otlua1RW.js} +1 -1
  108. package/dist-embed-sighting/{ModuleSession-CRVX-5Br.js → ModuleSession-BfP999ya.js} +2 -2
  109. package/dist-embed-sighting/ModuleThree-ColxHy_y.js +1 -0
  110. package/dist-embed-sighting/{NearestApproach-BOWntoKZ.js → NearestApproach-hO2JFAfU.js} +1 -1
  111. package/dist-embed-sighting/{ParameterForm-BMfViRUv.js → ParameterForm-DxN0Nf1y.js} +1 -1
  112. package/dist-embed-sighting/PerceptionMessages_en-B2O6DR64.js +1 -0
  113. package/dist-embed-sighting/PerceptionMessages_es-BmkP6OqD.js +1 -0
  114. package/dist-embed-sighting/PerceptionMessages_fr-B59TnGBC.js +1 -0
  115. package/dist-embed-sighting/PerceptionMessages_it-DPlxRmxu.js +1 -0
  116. package/dist-embed-sighting/{PoherAssessor-CM7oCyEk.js → PoherAssessor-CxcKyCRu.js} +1 -1
  117. package/dist-embed-sighting/{RailwaySystem-D8yJRUc8.js → RailwaySystem-C920HhY6.js} +1 -1
  118. package/dist-embed-sighting/ReentryEditor-DXrar7b7.js +27 -0
  119. package/dist-embed-sighting/ReentryKindMessages_en-Cbgk3paQ.js +1 -0
  120. package/dist-embed-sighting/ReentryKindMessages_es-DwgJQanC.js +1 -0
  121. package/dist-embed-sighting/ReentryKindMessages_fr-D9r9x2bK.js +1 -0
  122. package/dist-embed-sighting/ReentryKindMessages_it-DQ-J5YpD.js +1 -0
  123. package/dist-embed-sighting/ReentryParameterTexts_en-BH1tGP5C.js +1 -0
  124. package/dist-embed-sighting/ReentryParameterTexts_es-BDMJ4K1g.js +1 -0
  125. package/dist-embed-sighting/ReentryParameterTexts_fr-C8ROK57p.js +1 -0
  126. package/dist-embed-sighting/ReentryParameterTexts_it-CwC8vNTI.js +1 -0
  127. package/dist-embed-sighting/ReentrySimulation-BtiVr8cY.js +1 -0
  128. package/dist-embed-sighting/ReferenceSystem-90M3kYiP.js +1 -0
  129. package/dist-embed-sighting/{RoadMarkings-BC76NPX4.js → RoadMarkings-DDNrriGo.js} +1 -1
  130. package/dist-embed-sighting/SceneNames_en-CryY5Edh.js +1 -0
  131. package/dist-embed-sighting/SceneNames_es-StyJlKmE.js +1 -0
  132. package/dist-embed-sighting/SceneNames_fr-B3c9bWLO.js +1 -0
  133. package/dist-embed-sighting/SceneNames_it--6HUBaRO.js +1 -0
  134. package/dist-embed-sighting/ShareMessages_en-DE1WoeWH.js +1 -0
  135. package/dist-embed-sighting/SightingMessages_en-C6mh8cZI.js +1 -0
  136. package/{dist-embed-scene/TimelineTracks-Bv2FX3_W.js → dist-embed-sighting/TimelineTracks-B1dXX0uV.js} +1 -1
  137. package/dist-embed-sighting/{TraceSystem-Cd2FqhcV.js → TraceSystem-BrpqiAAJ.js} +2 -2
  138. package/dist-embed-sighting/UfoMessages_en-Bau9u8Mz.js +1 -0
  139. package/dist-embed-sighting/UfoMessages_es-DreLXcIR.js +1 -0
  140. package/dist-embed-sighting/UfoMessages_fr-D9BCRY2m.js +1 -0
  141. package/dist-embed-sighting/UfoMessages_it-C8r0jnJP.js +1 -0
  142. package/dist-embed-sighting/{WaterSystem-S81tdPno.js → WaterSystem-D3andNtL.js} +1 -1
  143. package/dist-embed-sighting/rr0-sighting.mjs +358 -358
  144. package/dist-embed-sighting/{trafficRuntime-DL5Zul8z.js → trafficRuntime-dT3zw02J.js} +2 -2
  145. package/dist-embed-sighting-editor/AdsbLolArchiveProvider-DS9ev-HU.js +1 -0
  146. package/dist-embed-sighting-editor/{BallesterGuaspAssessor-CRfTg7iA.js → BallesterGuaspAssessor-Db5otqP1.js} +1 -1
  147. package/dist-embed-sighting-editor/BeamEditor-DsOf0VRe.js +30 -0
  148. package/dist-embed-sighting-editor/BeamKindMessages_en-5RezNkyz.js +1 -0
  149. package/dist-embed-sighting-editor/BeamKindMessages_es-B5vSWVjK.js +1 -0
  150. package/dist-embed-sighting-editor/BeamKindMessages_fr--28-36OI.js +1 -0
  151. package/dist-embed-sighting-editor/BeamKindMessages_it-X53Fuf2U.js +1 -0
  152. package/dist-embed-sighting-editor/BeamParameterTexts_en-DZB75ouZ.js +1 -0
  153. package/dist-embed-sighting-editor/BeamParameterTexts_es-AeZmsufG.js +1 -0
  154. package/dist-embed-sighting-editor/BeamParameterTexts_fr-BHG3fW40.js +1 -0
  155. package/dist-embed-sighting-editor/BeamParameterTexts_it-CPwmQX-g.js +1 -0
  156. package/dist-embed-sighting-editor/{BeamSystem-BQbLn-3t.js → BeamSystem-D5tLjXtH.js} +1 -1
  157. package/dist-embed-sighting-editor/BodyEditor-CamqX5Xg.js +28 -0
  158. package/dist-embed-sighting-editor/BodyParameterTexts_en-CKiFdpaz.js +1 -0
  159. package/dist-embed-sighting-editor/BodyParameterTexts_es-DT9XO1Hc.js +1 -0
  160. package/dist-embed-sighting-editor/BodyParameterTexts_fr-B5jLsE0g.js +1 -0
  161. package/dist-embed-sighting-editor/BodyParameterTexts_it-iyJGx4Ta.js +1 -0
  162. package/dist-embed-sighting-editor/CaseEditorMessages_en-BONSJaQA.js +1 -0
  163. package/dist-embed-sighting-editor/ClaudeNarrativeTexts_en-CBLJZ7b6.js +1 -0
  164. package/dist-embed-sighting-editor/CloudEditorMessages_en-SmcRKW1O.js +1 -0
  165. package/dist-embed-sighting-editor/CloudParameterTexts_en-NIa0gfgA.js +1 -0
  166. package/dist-embed-sighting-editor/CloudParameterTexts_es-DXu4T30p.js +1 -0
  167. package/dist-embed-sighting-editor/CloudParameterTexts_fr-Bv-jc2dq.js +1 -0
  168. package/dist-embed-sighting-editor/CloudParameterTexts_it-C3RrkRwI.js +1 -0
  169. package/dist-embed-sighting-editor/{ContrailSystem-BQXLg_WA.js → ContrailSystem-rUmDVijn.js} +1 -1
  170. package/dist-embed-sighting-editor/{CoverageAssessor-D3HBwZuC.js → CoverageAssessor-cODG-YV9.js} +1 -1
  171. package/dist-embed-sighting-editor/DecorParameterTexts_en-C5dEeI_C.js +1 -0
  172. package/dist-embed-sighting-editor/DecorParameterTexts_es-BysMOaxT.js +1 -0
  173. package/dist-embed-sighting-editor/DecorParameterTexts_fr-CThgxosI.js +1 -0
  174. package/dist-embed-sighting-editor/DecorParameterTexts_it-D0ZsTK16.js +1 -0
  175. package/dist-embed-sighting-editor/FlareKindMessages_en-BroHgiwr.js +1 -0
  176. package/dist-embed-sighting-editor/FlareKindMessages_es-SraQyQ3Y.js +1 -0
  177. package/dist-embed-sighting-editor/FlareKindMessages_fr-Dy5SlSna.js +1 -0
  178. package/dist-embed-sighting-editor/FlareKindMessages_it-CF39wmrC.js +1 -0
  179. package/dist-embed-sighting-editor/{GLTFLoader-CQeR3NC8.js → GLTFLoader-5AJGh-k1.js} +1 -1
  180. package/dist-embed-sighting-editor/{HeadlightSystem-Cy4jSEsq.js → HeadlightSystem-neTrWCCo.js} +1 -1
  181. package/dist-embed-sighting-editor/{HynekAssessor-Covu9I3x.js → HynekAssessor-DRD9zLEH.js} +1 -1
  182. package/dist-embed-sighting-editor/{InterviewEditorElement-IBABfqta.js → InterviewEditorElement-Cs8mzPb7.js} +27 -27
  183. package/dist-embed-sighting-editor/LanternEditor-CnxhMWVp.js +9 -0
  184. package/dist-embed-sighting-editor/LanternKindMessages_en-fUfoRYC0.js +1 -0
  185. package/dist-embed-sighting-editor/LanternKindMessages_es-Chyc607D.js +1 -0
  186. package/dist-embed-sighting-editor/LanternKindMessages_fr-CDem7PTY.js +1 -0
  187. package/dist-embed-sighting-editor/LanternKindMessages_it-yOojym1u.js +1 -0
  188. package/dist-embed-sighting-editor/LanternParameterTexts_en-CcnGd8UH.js +1 -0
  189. package/dist-embed-sighting-editor/LanternParameterTexts_es-CUTgNutZ.js +1 -0
  190. package/dist-embed-sighting-editor/LanternParameterTexts_fr-P2JwYOUy.js +1 -0
  191. package/dist-embed-sighting-editor/LanternParameterTexts_it-CzNnIUrX.js +1 -0
  192. package/dist-embed-sighting-editor/LaserBeam-Be555mrH.js +1 -0
  193. package/dist-embed-sighting-editor/LaunchEditor-7uWzz1to.js +22 -0
  194. package/dist-embed-sighting-editor/LaunchKindMessages_en-Batvnyw3.js +1 -0
  195. package/dist-embed-sighting-editor/LaunchKindMessages_es-KYyQ9gbu.js +1 -0
  196. package/dist-embed-sighting-editor/LaunchKindMessages_fr-CoojboIk.js +1 -0
  197. package/dist-embed-sighting-editor/LaunchKindMessages_it-9HA3cjgP.js +1 -0
  198. package/dist-embed-sighting-editor/LaunchParameterTexts_en-DvrCwbDM.js +1 -0
  199. package/dist-embed-sighting-editor/LaunchParameterTexts_es--RUAegVp.js +1 -0
  200. package/dist-embed-sighting-editor/LaunchParameterTexts_fr-Bh_1zVzy.js +1 -0
  201. package/dist-embed-sighting-editor/LaunchParameterTexts_it-CWDx9nJy.js +1 -0
  202. package/dist-embed-sighting-editor/LaunchPlume-Bc8eFHmR.js +1 -0
  203. package/dist-embed-sighting-editor/{LaunchSimulation-4f9-9d7Z.js → LaunchSimulation-3YNBjyS2.js} +1 -1
  204. package/dist-embed-sighting-editor/{ModelSource-CYfSBTeB.js → ModelSource-D0ZuOymh.js} +1 -1
  205. package/dist-embed-sighting-editor/{ModelThumbnails-DYWQQdaZ.js → ModelThumbnails-BA3zFrn5.js} +1 -1
  206. package/dist-embed-sighting-editor/{ModelViewer-BjIOswb8.js → ModelViewer-BDorZEms.js} +1 -1
  207. package/dist-embed-sighting-editor/{ModuleSession-D3GrBJ3j.js → ModuleSession-CBJWLo9w.js} +2 -2
  208. package/dist-embed-sighting-editor/ModuleThree-Brz-0Orl.js +1 -0
  209. package/dist-embed-sighting-editor/ModulesPanelElement-BdnB0iIX.js +13 -0
  210. package/dist-embed-sighting-editor/{NearestApproach-DCUW8bB4.js → NearestApproach-BfoIDPh8.js} +1 -1
  211. package/dist-embed-sighting-editor/PerceptionMessages_en-B2O6DR64.js +1 -0
  212. package/dist-embed-sighting-editor/PerceptionMessages_es-BmkP6OqD.js +1 -0
  213. package/dist-embed-sighting-editor/PerceptionMessages_fr-B59TnGBC.js +1 -0
  214. package/dist-embed-sighting-editor/PerceptionMessages_it-DPlxRmxu.js +1 -0
  215. package/dist-embed-sighting-editor/{PoherAssessor-BoGGdasd.js → PoherAssessor-Cy0fVE2j.js} +1 -1
  216. package/dist-embed-sighting-editor/{RailwaySystem-C8Dby19B.js → RailwaySystem-J2yWIAbD.js} +1 -1
  217. package/dist-embed-sighting-editor/ReentryEditor-BA4Jirp1.js +27 -0
  218. package/dist-embed-sighting-editor/ReentryKindMessages_en-Cbgk3paQ.js +1 -0
  219. package/dist-embed-sighting-editor/ReentryKindMessages_es-DwgJQanC.js +1 -0
  220. package/dist-embed-sighting-editor/ReentryKindMessages_fr-D9r9x2bK.js +1 -0
  221. package/dist-embed-sighting-editor/ReentryKindMessages_it-DQ-J5YpD.js +1 -0
  222. package/dist-embed-sighting-editor/ReentryParameterTexts_en-BH1tGP5C.js +1 -0
  223. package/dist-embed-sighting-editor/ReentryParameterTexts_es-BDMJ4K1g.js +1 -0
  224. package/dist-embed-sighting-editor/ReentryParameterTexts_fr-C8ROK57p.js +1 -0
  225. package/dist-embed-sighting-editor/ReentryParameterTexts_it-CwC8vNTI.js +1 -0
  226. package/dist-embed-sighting-editor/ReentrySimulation-GEWa9zRD.js +1 -0
  227. package/dist-embed-sighting-editor/{ReferenceSystem-PYF540r7.js → ReferenceSystem-DvWi5osh.js} +1 -1
  228. package/dist-embed-sighting-editor/{RoadMarkings-VqRLMg59.js → RoadMarkings-Ci3fp-tS.js} +1 -1
  229. package/dist-embed-sighting-editor/SceneNames_en-oNPwLOsb.js +1 -0
  230. package/dist-embed-sighting-editor/SceneNames_es-Z_lHKIao.js +1 -0
  231. package/dist-embed-sighting-editor/SceneNames_fr-CTfqBDCK.js +1 -0
  232. package/dist-embed-sighting-editor/SceneNames_it-Bjfu1PyS.js +1 -0
  233. package/dist-embed-sighting-editor/ShareMessages_en-DE1WoeWH.js +1 -0
  234. package/dist-embed-sighting-editor/SightingEditorMessages_en-CAWfFtUQ.js +12 -0
  235. package/dist-embed-sighting-editor/{SightingEditorMessages_es-CQU200Hj.js → SightingEditorMessages_es-Botf2OEe.js} +1 -1
  236. package/dist-embed-sighting-editor/{SightingEditorMessages_fr-Bd4Ht-jW.js → SightingEditorMessages_fr-D5f-KX1w.js} +1 -1
  237. package/dist-embed-sighting-editor/{SightingEditorMessages_it-CSnPiCy2.js → SightingEditorMessages_it-DBMXvC62.js} +1 -1
  238. package/dist-embed-sighting-editor/{TraceSystem-BX0FwUB1.js → TraceSystem-DO70_HjB.js} +2 -2
  239. package/dist-embed-sighting-editor/UfoMessages_en-DVlS5Elx.js +1 -0
  240. package/dist-embed-sighting-editor/UfoMessages_es-DreLXcIR.js +1 -0
  241. package/dist-embed-sighting-editor/UfoMessages_fr-D9BCRY2m.js +1 -0
  242. package/dist-embed-sighting-editor/UfoMessages_it-C8r0jnJP.js +1 -0
  243. package/dist-embed-sighting-editor/{WaterSystem-uWnkivpP.js → WaterSystem-Cx8Lct9F.js} +1 -1
  244. package/dist-embed-sighting-editor/rr0-sighting-editor.mjs +671 -682
  245. package/dist-embed-sighting-editor/trafficRuntime-PSRYgFJb.js +2 -0
  246. package/package.json +2 -1
  247. package/dist-embed-scene/BeamEditor-DcUBLvPh.js +0 -30
  248. package/dist-embed-scene/LanternEditor-DQ9Y_eBl.js +0 -9
  249. package/dist-embed-scene/LaunchEditor-Csb2Pfq3.js +0 -22
  250. package/dist-embed-scene/ModuleThree-Cozd8KlK.js +0 -1
  251. package/dist-embed-scene/ReentryEditor-AsKtWLMw.js +0 -27
  252. package/dist-embed-scene/SceneNames_es-DL0IWHOw.js +0 -1
  253. package/dist-embed-scene/SceneNames_fr-B2NX5JJO.js +0 -1
  254. package/dist-embed-scene/SceneNames_it-wq6fqU10.js +0 -1
  255. package/dist-embed-scene/UfoMessages_es-BxNc9t8X.js +0 -1
  256. package/dist-embed-scene/UfoMessages_fr-DnD6eSjQ.js +0 -1
  257. package/dist-embed-scene/UfoMessages_it-BubvnWTa.js +0 -1
  258. package/dist-embed-sighting/BeamEditor-KLBjeTRU.js +0 -30
  259. package/dist-embed-sighting/BeamSystem-C6YXI9Da.js +0 -1
  260. package/dist-embed-sighting/ContrailSystem-BUKo3qVd.js +0 -1
  261. package/dist-embed-sighting/GLTFLoader-BYMKgQLE.js +0 -1
  262. package/dist-embed-sighting/HynekAssessor-Cc8hHe3R.js +0 -1
  263. package/dist-embed-sighting/LanternEditor-J_d2le0V.js +0 -9
  264. package/dist-embed-sighting/LaunchEditor-DuVZmb3n.js +0 -22
  265. package/dist-embed-sighting/ModuleThree-YgLqKZM9.js +0 -1
  266. package/dist-embed-sighting/ReentryEditor-DCDavAGw.js +0 -27
  267. package/dist-embed-sighting/ReentrySimulation-BzMMTqck.js +0 -1
  268. package/dist-embed-sighting/ReferenceSystem-Dt28-Egu.js +0 -1
  269. package/dist-embed-sighting/SceneNames_es-Cu0CS6c0.js +0 -1
  270. package/dist-embed-sighting/SceneNames_fr-BAQt0-Zp.js +0 -1
  271. package/dist-embed-sighting/SceneNames_it-CeXG9jCC.js +0 -1
  272. package/dist-embed-sighting/UfoMessages_es-BxNc9t8X.js +0 -1
  273. package/dist-embed-sighting/UfoMessages_fr-DnD6eSjQ.js +0 -1
  274. package/dist-embed-sighting/UfoMessages_it-BubvnWTa.js +0 -1
  275. package/dist-embed-sighting-editor/AdsbLolArchiveProvider-k2xqWyaR.js +0 -1
  276. package/dist-embed-sighting-editor/BeamEditor-DTkjy61A.js +0 -30
  277. package/dist-embed-sighting-editor/BodyEditor-D5PfqEg2.js +0 -28
  278. package/dist-embed-sighting-editor/LanternEditor-BoxxG443.js +0 -9
  279. package/dist-embed-sighting-editor/LaserBeam-j5Z4tIOw.js +0 -1
  280. package/dist-embed-sighting-editor/LaunchEditor-rJud4C3y.js +0 -22
  281. package/dist-embed-sighting-editor/LaunchPlume-Dm1YdsZp.js +0 -1
  282. package/dist-embed-sighting-editor/ModuleThree-CkOgRXM2.js +0 -1
  283. package/dist-embed-sighting-editor/ModulesPanelElement-Uz0lPYwu.js +0 -13
  284. package/dist-embed-sighting-editor/ReentryEditor-8sfHq7hY.js +0 -27
  285. package/dist-embed-sighting-editor/ReentrySimulation-KMMVK82G.js +0 -1
  286. package/dist-embed-sighting-editor/SceneNames_es-CLvEspFd.js +0 -1
  287. package/dist-embed-sighting-editor/SceneNames_fr-oYQgZ-TZ.js +0 -1
  288. package/dist-embed-sighting-editor/SceneNames_it-CDTw3VAX.js +0 -1
  289. package/dist-embed-sighting-editor/UfoMessages_es-BxNc9t8X.js +0 -1
  290. package/dist-embed-sighting-editor/UfoMessages_fr-DnD6eSjQ.js +0 -1
  291. package/dist-embed-sighting-editor/UfoMessages_it-BubvnWTa.js +0 -1
  292. package/dist-embed-sighting-editor/trafficRuntime-BeMCM4Ap.js +0 -2
@@ -0,0 +1,9 @@
1
+ import{ae as d,_ as l,af as o,ag as u,ah as m,ai as g,aj as f,ak as y}from"./rr0-sighting.mjs";import{S as T,P as b,a as A,E}from"./ParameterForm-DxN0Nf1y.js";const w=d.catalog({en:()=>l(()=>import("./LanternParameterTexts_en-CcnGd8UH.js"),[],import.meta.url).then(a=>a.lanternParameterTexts_en),fr:()=>l(()=>import("./LanternParameterTexts_fr-P2JwYOUy.js"),[],import.meta.url).then(a=>a.lanternParameterTexts_fr),es:()=>l(()=>import("./LanternParameterTexts_es-CUTgNutZ.js"),[],import.meta.url).then(a=>a.lanternParameterTexts_es),it:()=>l(()=>import("./LanternParameterTexts_it-CzNnIUrX.js"),[],import.meta.url).then(a=>a.lanternParameterTexts_it)});class i{static RELEASE="letGo";static LANTERNS="lanterns";static AIR="air";static LANTERN="eachLantern";static instant(e,t,n){return{type:"number",key:e,min:-36e3,max:36e3,step:1,unit:"s",scale:.001,required:!0,label:t,hint:n,group:i.LANTERNS}}static wind(e,t,n,s){return[{type:"number",key:`${e}.towardDeg`,min:0,max:360,step:1,unit:"°",group:i.AIR,hint:s,label:t},{type:"number",key:`${e}.speedMS`,min:0,max:60,step:.1,unit:"m/s",group:i.AIR,label:n}]}static SET={kind:"lantern",title:"skyLanterns",parameters:[{type:"said",key:"title",label:"name",group:i.RELEASE},{type:"position",key:"site.eastM",secondKey:"site.northM",saidKey:"site.saidPosition",native:"local",step:1,rangeM:1e5,group:i.RELEASE,label:"whereTheyAreLetGo",hint:"whereTheyAreLetGoFrom"},{type:"number",key:"site.altitudeM",min:-1e3,max:5e3,step:.1,unit:"m",group:i.RELEASE,effective:()=>0,label:"heightAboveThePlaceSGround",hint:"aGardenOnAHillAbove"},{type:"number",key:"site.originElevationM",min:-500,max:6e3,step:1,unit:"m",group:i.RELEASE,effective:()=>0,label:"thePlaceSGroundAboveThe",hint:"whatSetsHowThinTheAir"},{type:"number",key:"group.count",min:1,max:200,step:1,required:!0,group:i.LANTERNS,label:"howMany"},i.instant("group.fromT","firstLetGoAt","secondsOfTheRecordingBeforeIts"),i.instant("group.untilT","lastLetGoAt","secondsOfTheRecordingTheOthers"),{type:"number",key:"group.radiusM",min:0,max:5e3,step:1,unit:"m",group:i.LANTERNS,effective:()=>20,label:"letGoWithin",hint:"aCrowdLetsThemGoA"},{type:"number",key:"group.burnS.min",min:10,max:3600,step:1,unit:"s",group:i.LANTERNS,effective:()=>480,label:"burnsAtLeast",hint:"howLongEachBurnsFromWhen"},{type:"number",key:"group.burnS.max",min:10,max:3600,step:1,unit:"s",group:i.LANTERNS,effective:()=>900,label:"burnsAtMost"},{type:"number",key:"group.insideExcessK.min",min:10,max:400,step:1,unit:"K",group:i.LANTERNS,effective:()=>125,label:"hotterThanTheAirAtLeast",hint:"howMuchHotterThanTheAir"},{type:"number",key:"group.insideExcessK.max",min:10,max:400,step:1,unit:"K",group:i.LANTERNS,effective:()=>175,label:"hotterThanTheAirAtMost"},{type:"number",key:"group.burnedS",min:0,max:3600,step:1,unit:"s",group:i.LANTERNS,effective:()=>0,label:"alreadyBurntWhenLetGo",hint:"forLanternsTheAccountOnlyHas"},{type:"number",key:"group.seed",min:0,max:4294967295,step:1,group:i.LANTERNS,effective:()=>1,label:"draw",hint:"whatTheDrawsStartFromAnother"},{type:"set",key:"group.explains",group:i.LANTERNS,label:"standForTheShapes",options:(e,t)=>{const n=t?.shapes??[],s=(e.group?.explains??[]).filter(r=>!n.some(h=>h.value===r));return[...n,...s.map(r=>({value:r,label:r}))]},empty:"noShape"},...i.wind("wind","windAtTheGroundTowards","windAtTheGroundSpeed","whereItBlowsTowardsWhichIs"),...i.wind("windAloft","windAloftTowards","windAloftSpeed","theWindHigherUpBlendedWith"),{type:"number",key:"windAloft.atM",min:10,max:1e4,step:10,unit:"m",group:i.AIR,label:"windAloftAt",hint:"metresAboveWhereTheyAreLet"},{type:"number",key:"airTemperatureC",min:-60,max:50,step:.5,unit:"°C",group:i.AIR,effective:()=>10,label:"airTemperature",hint:"atTheGroundFallingBy6"},{type:"number",key:"turbulence.horizontalMS",min:0,max:10,step:.1,unit:"m/s",group:i.AIR,effective:()=>o.TURBULENCE.horizontalMS,label:"gustsAcross",hint:"howFarTheAirSSpeed"},{type:"number",key:"turbulence.verticalMS",min:0,max:10,step:.1,unit:"m/s",group:i.AIR,effective:()=>o.TURBULENCE.verticalMS,label:"gustsUpAndDown"},{type:"number",key:"turbulence.timescaleS",min:1,max:600,step:1,unit:"s",group:i.AIR,effective:()=>o.TURBULENCE.timescaleS,label:"aGustLasts"},{type:"number",key:"lantern.luminousIntensityCd",min:.1,max:1e3,step:.1,unit:"cd",group:i.LANTERN,effective:()=>o.COMMON.luminousIntensityCd,label:"light",hint:"itsFlameSLightThroughThe"},{type:"choice",key:"lantern.shape",group:i.LANTERN,effective:()=>o.COMMON.shape,label:"shape",choices:[{value:"classic",label:"roundAtTheMouthSquareAt"},{value:"balloon",label:"balloonLobedTop"}]},{type:"colour",key:"lantern.paperColor",group:i.LANTERN,fallback:o.COMMON.paperColor,label:"paperColour",hint:"whatItLooksLikeByDay"},{type:"colour",key:"lantern.color",group:i.LANTERN,fallback:o.COMMON.color,label:"flameLight",hint:"itsFlameSLightThroughWhite"},{type:"number",key:"lantern.envelopeVolumeM3",min:.01,max:10,step:.01,unit:"m³",group:i.LANTERN,effective:()=>o.COMMON.envelopeVolumeM3,label:"airItHolds"},{type:"number",key:"lantern.massKg",min:.005,max:5,step:.001,unit:"kg",group:i.LANTERN,effective:()=>o.COMMON.massKg,label:"weightWhenLetGo"}]};static publish(){u.publish(i.SET)}}const v=d.catalog({en:()=>l(()=>import("./LanternEditorMessages_en-DaT3UNfD.js"),[],import.meta.url).then(a=>a.lanternEditorMessages_en),fr:()=>l(()=>import("./LanternEditorMessages_fr-9mByTFMG.js"),[],import.meta.url).then(a=>a.lanternEditorMessages_fr),es:()=>l(()=>import("./LanternEditorMessages_es-TDV5lKeJ.js"),[],import.meta.url).then(a=>a.lanternEditorMessages_es),it:()=>l(()=>import("./LanternEditorMessages_it-MRkJnDQp.js"),[],import.meta.url).then(a=>a.lanternEditorMessages_it)});class p{constructor(e,t,n){this.container=e,this.host=t,T.attach(e,"lantern-editor-part",p.STYLE),this.language=n,u.of("lantern")||i.publish(),this.ready=this.setLanguage(n)}messages;ready;parameterTexts;languageToken=0;currentId;form;list;language;shown=[];static STYLE='.lantern-editor-part { flex-basis: 100%; min-width: 0; } .lantern-editor-part #lantern-list { flex-basis: 100%; min-width: 0; } .lantern-editor-part .launch-editor, .lantern-editor-part .launch-fields { display: flex; flex-wrap: wrap; gap: 8px; align-items: end; } .lantern-editor-part .launch-fields { flex-basis: 100%; min-width: 0; } .lantern-editor-part [hidden] { display: none !important; } .lantern-editor-part select { min-width: 0; width: 100%; } .lantern-editor-part .launch-intro { flex-basis: 100%; margin: 0; } .lantern-editor-part .launch-parameters { flex-basis: 100%; min-width: 0; display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-start; } .lantern-editor-part .parameter-group { flex: 1 1 14em; min-width: 0; box-sizing: border-box; margin: 0; display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: flex-start; align-content: flex-start; } .lantern-editor-part input, .lantern-editor-part select { max-width: 100%; box-sizing: border-box; } .lantern-editor-part input[type="text"] { width: 12em; } .lantern-editor-part label { min-width: 0; max-width: 100%; } .lantern-editor-part input.parameter-derived::placeholder { opacity: .65; }';async setLanguage(e){const t=++this.languageToken;this.language=e;const[n,s]=await Promise.all([v.load(e),w.load(e)]);t===this.languageToken&&(this.messages=n,this.parameterTexts=s,this.render(),this.sync())}sync(){if(!this.messages)return;const e=this.launches;this.shown=[...e],e.some(r=>r.id===this.currentId)||(this.currentId=e[0]?.id),this.list?.setItems(e.map(r=>({id:r.id,label:this.labelOf(r)})),this.currentId),this.syncAddState();const t=this.current;if(this.element("lantern-fields").hidden=t===void 0,!t)return;const n=t.releases?.length??0,s=this.element("lantern-releases");s.hidden=n===0,s.textContent=this.messages.releasesNote.replace("{n}",String(n)),this.form??=new b(this.element("lantern-parameters"),this.language,"lantern.",{said:()=>this.host.said(),writingLanguage:()=>this.host.writingLanguage()}),this.form.show(this.resolved(i.SET),new A(()=>this.current,r=>this.editLaunch(h=>r(h)),()=>({shapes:this.host.shapes().map(r=>({value:r.id,label:r.label}))}),this.host.positionPlace?.()),()=>this.written())}refresh(){if(!this.messages)return;this.syncAddState();const e=this.launches;e.length===this.shown.length&&e.every((t,n)=>t.id===this.shown[n].id)||this.sync()}syncAddState(){const e=this.siteOfNew()!==void 0;this.list?.setAddState(e,e?void 0:this.messages.addLaunchNowhere)}get current(){return this.launches.find(e=>e.id===this.currentId)}resolved(e){return m.resolve(e,this.parameterTexts)}render(){if(!this.messages)return;const e=this.messages;this.form=void 0,this.container.innerHTML=`<div class="launch-editor">
2
+ <p class="launch-intro">${e.intro}</p>
3
+ <div id="lantern-list"></div>
4
+ <div id="lantern-fields" class="launch-fields">
5
+ <div id="lantern-parameters" class="launch-parameters"></div>
6
+ <p id="lantern-releases" class="launch-intro" hidden></p>
7
+ <p class="launch-intro">${e.derivedNote}</p>
8
+ </div>
9
+ </div>`,this.list=new E({header:this.element("lantern-list"),body:this.element("lantern-fields"),ids:{list:"lantern-select",remove:"lantern-delete",add:"lantern-add"},onSelect:t=>{this.currentId=t,this.sync()},onAdd:()=>this.addLaunch(),onRemove:()=>this.deleteCurrent()}),this.list.setLabels({list:e.launch,remove:e.deleteLaunch,add:e.addLaunch,empty:e.none})}written(){const e=this.current;e&&this.list?.rename(e.id,this.labelOf(e))}editLaunch(e){const t=this.current;if(!t)return;const n=structuredClone(t);e(n),this.writeLaunches(this.launches.map(s=>s===t?n:s)),this.host.changed()}siteOfNew(){const e=this.host.sighting(),t=e.event?.place?.[0];if(t?.lat===void 0||t.lng===void 0)return;const n=e.observerTrack?.getInterpolatedPoseAt(0),s=(n?.headingDeg??0)*Math.PI/180,r=111320,h=n?.lng!==void 0?(n.lng-t.lng)*r*Math.cos(t.lat*Math.PI/180):0,c=n?.lat!==void 0?(n.lat-t.lat)*r:0;return{eastM:Math.round(h+1500*Math.sin(s)),northM:Math.round(c+1500*Math.cos(s))}}addLaunch(){const e=this.siteOfNew();if(!e)return;let t=this.launches.length+1;for(;this.launches.some(r=>r.id===`lanterns-${t}`);)t++;const n=g(this.host.sighting(),0),s={id:`lanterns-${t}`,site:e,group:{count:12,fromT:0,untilT:12e4,seed:t},wind:{towardDeg:Math.round((n.windDirectionDeg+180)%360),speedMS:Math.round(n.windSpeed*10)/10}};this.writeLaunches([...this.launches,s]),this.currentId=s.id,this.host.changed(),this.sync()}deleteCurrent(){const e=this.current;e&&(this.currentId=void 0,this.writeLaunches(this.launches.filter(t=>t!==e)),this.host.changed(),this.sync())}writeLaunches(e){const t=this.host.sighting(),n={...t.interpretation??{bodies:[]},lanterns:e.length>0?e:void 0};n.lanterns===void 0&&delete n.lanterns;const s=f.saysNothing(n,y.kinds());t.interpretation=s?void 0:n}labelOf(e){const t=this.host.said().read(e.title);return t?`${t} (${e.id})`:e.id}get launches(){return this.host.sighting().interpretation?.lanterns??[]}element(e){return this.container.querySelector(`#${e}`)}}export{p as LanternEditor};
@@ -0,0 +1 @@
1
+ const e={title:"Lanterns"};export{e as lanternKindMessages_en};
@@ -0,0 +1 @@
1
+ const e={title:"Farolillos"};export{e as lanternKindMessages_es};
@@ -0,0 +1 @@
1
+ const e={title:"Lanternes"};export{e as lanternKindMessages_fr};
@@ -0,0 +1 @@
1
+ const e={title:"Lanterne"};export{e as lanternKindMessages_it};
@@ -0,0 +1 @@
1
+ const e={letGo:"Let go",lanterns:"Lanterns",air:"Air",eachLantern:"Each lantern",skyLanterns:"Sky lanterns",name:"Name",whereTheyAreLetGo:"Where they are let go",whereTheyAreLetGoFrom:"Where they are let go: from the witness, from something else in the scene, or as a latitude and a longitude.",heightAboveThePlaceSGround:"Height above the place's ground",aGardenOnAHillAbove:"A garden on a hill above the place, a roof.",thePlaceSGroundAboveThe:"The place's ground above the sea",whatSetsHowThinTheAir:"What sets how thin the air they climb into is: a lantern climbs less high from a mountain town.",howMany:"How many",firstLetGoAt:"First let go at",secondsOfTheRecordingBeforeIts:"Seconds of the recording: before its start (negative) for lanterns already up when it begins.",lastLetGoAt:"Last let go at",secondsOfTheRecordingTheOthers:"Seconds of the recording; the others in between, about evenly.",letGoWithin:"Let go within",aCrowdLetsThemGoA:"A crowd lets them go a few metres apart.",burnsAtLeast:"Burns at least",howLongEachBurnsFromWhen:"How long each burns from when it is let go, drawn between the two: 8 to 15 minutes by the sellers. It vanishes when it goes out.",burnsAtMost:"Burns at most",hotterThanTheAirAtLeast:"Hotter than the air, at least",howMuchHotterThanTheAir:"How much hotter than the air its air is at full burn, drawn between the two: what sets how fast it climbs, and so how high it gets.",hotterThanTheAirAtMost:"Hotter than the air, at most",alreadyBurntWhenLetGo:"Already burnt when let go",forLanternsTheAccountOnlyHas:"For lanterns the account only has from where they were first seen, already up and partly burnt.",draw:"Draw",whatTheDrawsStartFromAnother:"What the draws start from: another number, other lanterns within the same bounds, the same each time for the same number.",standForTheShapes:"Stand for the shapes",noShape:"No shape",windAtTheGroundTowards:"Wind at the ground, towards",windAtTheGroundSpeed:"Wind at the ground, speed",whereItBlowsTowardsWhichIs:"Where it blows TOWARDS, which is where the lanterns go: the opposite of where a weather report says it comes from.",windAloftTowards:"Wind aloft, towards",windAloftSpeed:"Wind aloft, speed",theWindHigherUpBlendedWith:"The wind higher up, blended with the ground's in between: what makes lanterns let go at one spot part ways as they climb.",windAloftAt:"Wind aloft, at",metresAboveWhereTheyAreLet:"Metres above where they are let go.",airTemperature:"Air temperature",atTheGroundFallingBy6:"At the ground, falling by 6.5 °C a kilometre above: what their hot air is lighter than. A cold night lifts them higher.",gustsAcross:"Gusts, across",howFarTheAirSSpeed:"How far the air's speed strays from the wind's, each lantern meeting its own gusts: what stretches a group into a shifting string. 0 for a still air.",gustsUpAndDown:"Gusts, up and down",aGustLasts:"A gust lasts",light:"Light",itsFlameSLightThroughThe:"Its flame's light through the paper, at full burn.",shape:"Shape",roundAtTheMouthSquareAt:"Round at the mouth, square at the top",balloonLobedTop:"Balloon, lobed top",paperColour:"Paper colour",whatItLooksLikeByDay:"What it looks like by day; by night, what its flame's light comes through.",flameLight:"Flame light",itsFlameSLightThroughWhite:"Its flame's light through white paper.",airItHolds:"Air it holds",weightWhenLetGo:"Weight when let go"};export{e as lanternParameterTexts_en};
@@ -0,0 +1 @@
1
+ const e={letGo:"Suelta",lanterns:"Farolillos",air:"Aire",eachLantern:"Cada farolillo",skyLanterns:"Farolillos voladores",name:"Nombre",whereTheyAreLetGo:"Lugar de la suelta",whereTheyAreLetGoFrom:"Desde dónde se sueltan: respecto al testigo, a otra cosa de la escena, o en latitud y longitud.",heightAboveThePlaceSGround:"Altura sobre el suelo del lugar",aGardenOnAHillAbove:"Un jardín en una colina sobre el lugar, un tejado.",thePlaceSGroundAboveThe:"Suelo del lugar sobre el mar",whatSetsHowThinTheAir:"Lo que fija lo enrarecido del aire en que suben: un farolillo sube menos desde un pueblo de montaña.",howMany:"Cuántos",firstLetGoAt:"Primero soltado a",secondsOfTheRecordingBeforeIts:"Segundos de la grabación: antes de su inicio (negativo) para farolillos ya en el aire cuando empieza.",lastLetGoAt:"Último soltado a",secondsOfTheRecordingTheOthers:"Segundos de la grabación; los demás entre ambos, más o menos regularmente.",letGoWithin:"Soltados en un radio de",aCrowdLetsThemGoA:"Una multitud los suelta a pocos metros unos de otros.",burnsAtLeast:"Arde al menos",howLongEachBurnsFromWhen:"Cuánto arde cada uno desde que se suelta, sorteado entre ambos: de 8 a 15 minutos según los vendedores. Desaparece al apagarse.",burnsAtMost:"Arde como mucho",hotterThanTheAirAtLeast:"Más caliente que el aire, al menos",howMuchHotterThanTheAir:"Cuánto más caliente que el aire está su aire a pleno fuego, sorteado entre ambos: lo que fija lo rápido que sube, y por tanto hasta dónde.",hotterThanTheAirAtMost:"Más caliente que el aire, como mucho",alreadyBurntWhenLetGo:"Ya ardido al soltarlo",forLanternsTheAccountOnlyHas:"Para farolillos que el relato solo tiene desde donde se vieron por primera vez, ya en el aire y en parte consumidos.",draw:"Sorteo",whatTheDrawsStartFromAnother:"De qué parten los sorteos: otro número, otros farolillos dentro de los mismos límites, los mismos cada vez para el mismo número.",standForTheShapes:"Representan las formas",noShape:"Ninguna forma",windAtTheGroundTowards:"Viento en el suelo, hacia",windAtTheGroundSpeed:"Viento en el suelo, velocidad",whereItBlowsTowardsWhichIs:"Hacia DÓNDE sopla, que es adonde van los farolillos: lo contrario de donde un parte dice que viene.",windAloftTowards:"Viento en altura, hacia",windAloftSpeed:"Viento en altura, velocidad",theWindHigherUpBlendedWith:"El viento más arriba, mezclado con el del suelo en medio: lo que separa al subir farolillos soltados en el mismo sitio.",windAloftAt:"Viento en altura, a",metresAboveWhereTheyAreLet:"Metros sobre donde se sueltan.",airTemperature:"Temperatura del aire",atTheGroundFallingBy6:"En el suelo, bajando 6,5 °C por kilómetro: de lo que su aire caliente es más ligero. Una noche fría los sube más.",gustsAcross:"Ráfagas, en horizontal",howFarTheAirSSpeed:"Cuánto se aparta la velocidad del aire de la del viento, cada farolillo en sus propias ráfagas: lo que estira un grupo en una fila cambiante. 0 para un aire quieto.",gustsUpAndDown:"Ráfagas, arriba y abajo",aGustLasts:"Una ráfaga dura",light:"Luz",itsFlameSLightThroughThe:"La luz de su llama a través del papel, a pleno fuego.",shape:"Forma",roundAtTheMouthSquareAt:"Redonda en la base, cuadrada arriba",balloonLobedTop:"Globo, cima lobulada",paperColour:"Color del papel",whatItLooksLikeByDay:"Su aspecto de día; de noche, lo que atraviesa la luz de su llama.",flameLight:"Luz de la llama",itsFlameSLightThroughWhite:"La luz de su llama a través de un papel blanco.",airItHolds:"Aire que contiene",weightWhenLetGo:"Peso al soltarlo"};export{e as lanternParameterTexts_es};
@@ -0,0 +1 @@
1
+ const e={letGo:"Lâcher",lanterns:"Lanternes",air:"Air",eachLantern:"Chaque lanterne",skyLanterns:"Lanternes célestes",name:"Nom",whereTheyAreLetGo:"Lieu du lâcher",whereTheyAreLetGoFrom:"D'où elles sont lâchées : par rapport au témoin, à autre chose dans la scène, ou en latitude et longitude.",heightAboveThePlaceSGround:"Hauteur au-dessus du sol du lieu",aGardenOnAHillAbove:"Un jardin sur une colline au-dessus du lieu, un toit.",thePlaceSGroundAboveThe:"Sol du lieu au-dessus de la mer",whatSetsHowThinTheAir:"Ce qui règle la raréfaction de l'air où elles montent : une lanterne monte moins haut depuis une ville de montagne.",howMany:"Combien",firstLetGoAt:"Première lâchée à",secondsOfTheRecordingBeforeIts:"Secondes de l'enregistrement : avant son début (négatif) pour des lanternes déjà en l'air quand il commence.",lastLetGoAt:"Dernière lâchée à",secondsOfTheRecordingTheOthers:"Secondes de l'enregistrement ; les autres entre les deux, à peu près régulièrement.",letGoWithin:"Lâchées dans un rayon de",aCrowdLetsThemGoA:"Une foule les lâche à quelques mètres les unes des autres.",burnsAtLeast:"Brûle au moins",howLongEachBurnsFromWhen:"Combien de temps chacune brûle après son lâcher, tiré entre les deux : 8 à 15 minutes selon les vendeurs. Elle disparaît en s'éteignant.",burnsAtMost:"Brûle au plus",hotterThanTheAirAtLeast:"Plus chaude que l'air, au moins",howMuchHotterThanTheAir:"De combien son air est plus chaud que l'air autour à plein feu, tiré entre les deux : ce qui règle à quelle vitesse elle monte, et donc jusqu'où.",hotterThanTheAirAtMost:"Plus chaude que l'air, au plus",alreadyBurntWhenLetGo:"Déjà brûlé au lâcher",forLanternsTheAccountOnlyHas:"Pour des lanternes que le compte rendu n'a que depuis là où elles ont été vues la première fois, déjà en l'air et en partie consumées.",draw:"Tirage",whatTheDrawsStartFromAnother:"Ce dont partent les tirages : un autre nombre, d'autres lanternes dans les mêmes bornes, les mêmes à chaque fois pour le même nombre.",standForTheShapes:"Représentent les formes",noShape:"Aucune forme",windAtTheGroundTowards:"Vent au sol, vers",windAtTheGroundSpeed:"Vent au sol, vitesse",whereItBlowsTowardsWhichIs:"Là où il souffle, VERS où, qui est où vont les lanternes : l'inverse d'où un bulletin météo dit qu'il vient.",windAloftTowards:"Vent en altitude, vers",windAloftSpeed:"Vent en altitude, vitesse",theWindHigherUpBlendedWith:"Le vent plus haut, mêlé à celui du sol entre les deux : ce qui fait se séparer en montant des lanternes lâchées au même endroit.",windAloftAt:"Vent en altitude, à",metresAboveWhereTheyAreLet:"Mètres au-dessus d'où elles sont lâchées.",airTemperature:"Température de l'air",atTheGroundFallingBy6:"Au sol, baissant de 6,5 °C par kilomètre au-dessus : ce dont leur air chaud est plus léger. Une nuit froide les porte plus haut.",gustsAcross:"Rafales, à l'horizontale",howFarTheAirSSpeed:"De combien la vitesse de l'air s'écarte de celle du vent, chaque lanterne prise dans ses propres rafales : ce qui étire un groupe en une file mouvante. 0 pour un air immobile.",gustsUpAndDown:"Rafales, de haut en bas",aGustLasts:"Une rafale dure",light:"Lumière",itsFlameSLightThroughThe:"La lumière de sa flamme à travers le papier, à plein feu.",shape:"Forme",roundAtTheMouthSquareAt:"Ronde à la base, carrée au sommet",balloonLobedTop:"Montgolfière, sommet en lobes",paperColour:"Couleur du papier",whatItLooksLikeByDay:"Son aspect de jour ; de nuit, ce que traverse la lumière de sa flamme.",flameLight:"Lumière de la flamme",itsFlameSLightThroughWhite:"La lumière de sa flamme à travers un papier blanc.",airItHolds:"Air qu'elle contient",weightWhenLetGo:"Poids au lâcher"};export{e as lanternParameterTexts_fr};
@@ -0,0 +1 @@
1
+ const a={letGo:"Lancio",lanterns:"Lanterne",air:"Aria",eachLantern:"Ogni lanterna",skyLanterns:"Lanterne volanti",name:"Nome",whereTheyAreLetGo:"Luogo del rilascio",whereTheyAreLetGoFrom:"Da dove vengono lasciate andare: rispetto al testimone, a qualcos'altro nella scena, o in latitudine e longitudine.",heightAboveThePlaceSGround:"Altezza sul suolo del luogo",aGardenOnAHillAbove:"Un giardino su una collina sopra il luogo, un tetto.",thePlaceSGroundAboveThe:"Suolo del luogo sul mare",whatSetsHowThinTheAir:"Ciò che fissa la rarefazione dell'aria in cui salgono: una lanterna sale meno in alto da un paese di montagna.",howMany:"Quante",firstLetGoAt:"Prima lasciata a",secondsOfTheRecordingBeforeIts:"Secondi della registrazione: prima del suo inizio (negativo) per lanterne già in aria quando inizia.",lastLetGoAt:"Ultima lasciata a",secondsOfTheRecordingTheOthers:"Secondi della registrazione; le altre in mezzo, più o meno regolarmente.",letGoWithin:"Lasciate entro",aCrowdLetsThemGoA:"Una folla le lascia andare a pochi metri l'una dall'altra.",burnsAtLeast:"Brucia almeno",howLongEachBurnsFromWhen:"Quanto brucia ciascuna da quando è lasciata andare, estratto tra i due: da 8 a 15 minuti secondo i venditori. Scompare spegnendosi.",burnsAtMost:"Brucia al massimo",hotterThanTheAirAtLeast:"Più calda dell'aria, almeno",howMuchHotterThanTheAir:"Di quanto la sua aria è più calda dell'aria intorno a piena fiamma, estratto tra i due: ciò che fissa quanto in fretta sale, e quindi fin dove.",hotterThanTheAirAtMost:"Più calda dell'aria, al massimo",alreadyBurntWhenLetGo:"Già bruciato al lancio",forLanternsTheAccountOnlyHas:"Per lanterne che il resoconto ha solo da dove sono state viste la prima volta, già in aria e in parte consumate.",draw:"Estrazione",whatTheDrawsStartFromAnother:"Da cosa partono le estrazioni: un altro numero, altre lanterne negli stessi limiti, le stesse ogni volta per lo stesso numero.",standForTheShapes:"Rappresentano le forme",noShape:"Nessuna forma",windAtTheGroundTowards:"Vento al suolo, verso",windAtTheGroundSpeed:"Vento al suolo, velocità",whereItBlowsTowardsWhichIs:"VERSO dove soffia, che è dove vanno le lanterne: l'opposto di da dove un bollettino dice che viene.",windAloftTowards:"Vento in quota, verso",windAloftSpeed:"Vento in quota, velocità",theWindHigherUpBlendedWith:"Il vento più in alto, mescolato a quello al suolo nel mezzo: ciò che separa salendo lanterne lasciate andare nello stesso punto.",windAloftAt:"Vento in quota, a",metresAboveWhereTheyAreLet:"Metri sopra dove vengono lasciate andare.",airTemperature:"Temperatura dell'aria",atTheGroundFallingBy6:"Al suolo, calando di 6,5 °C per chilometro: ciò di cui la loro aria calda è più leggera. Una notte fredda le porta più in alto.",gustsAcross:"Raffiche, in orizzontale",howFarTheAirSSpeed:"Di quanto la velocità dell'aria si scosta da quella del vento, ogni lanterna nelle proprie raffiche: ciò che allunga un gruppo in una fila mutevole. 0 per un'aria ferma.",gustsUpAndDown:"Raffiche, in su e in giù",aGustLasts:"Una raffica dura",light:"Luce",itsFlameSLightThroughThe:"La luce della sua fiamma attraverso la carta, a piena fiamma.",shape:"Forma",roundAtTheMouthSquareAt:"Rotonda alla base, quadrata in cima",balloonLobedTop:"Mongolfiera, cima a lobi",paperColour:"Colore della carta",whatItLooksLikeByDay:"Il suo aspetto di giorno; di notte, ciò che attraversa la luce della sua fiamma.",flameLight:"Luce della fiamma",itsFlameSLightThroughWhite:"La luce della sua fiamma attraverso una carta bianca.",airItHolds:"Aria che contiene",weightWhenLetGo:"Peso al lancio"};export{a as lanternParameterTexts_it};
@@ -1 +1 @@
1
- import{R as O,b2 as D,b3 as y}from"./rr0-sighting.mjs";class l{static DEFAULT_DIVERGENCE_MRAD=.1;static DEFAULT_APERTURE_M=.01;static AEROSOL_SINGLE_SCATTERING_ALBEDO=.9;static AEROSOL_ASYMMETRY=.7;static DEFAULT_PATCHINESS=.35;static PATCH_M=120;static STEP_M=25;static MAX_SAMPLES=2e3;static viewsAt(n,o,t,s){return l.onAt(n,o).map(c=>l.viewOf(c,t,s))}static viewOf(n,o,t){return{id:n.id,wavelengthNm:n.wavelengthNm,patchiness:n.patchiness??l.DEFAULT_PATCHINESS,samples:l.samplesOf(n,o,t)}}static onAt(n,o){return n.filter(t=>(t.fromT===void 0||o>=t.fromT)&&(t.untilT===void 0||o<=t.untilT)).map(t=>l.stateAt(t,o)).filter(t=>t.path.length>=2)}static stateAt(n,o){if(!n.light?.length&&!n.moves?.length)return n;const t={...n};if(n.light?.length){const s=l.joined(n.light.filter(e=>e.wavelengthNm!==void 0),o,e=>e.wavelengthNm),c=l.joined(n.light.filter(e=>e.powerW!==void 0),o,e=>e.powerW);s!==void 0&&(t.wavelengthNm=s),c!==void 0&&(t.powerW=c)}return n.moves?.length&&(t.path=l.pathAt(n.moves,o)),t}static joined(n,o,t){if(n.length===0)return;const s=[...n].sort((a,i)=>a.t-i.t);if(o<=s[0].t)return t(s[0]);const c=s[s.length-1];if(o>=c.t)return t(c);const e=s.findIndex(a=>a.t>o),r=s[e-1],h=s[e],M=(o-r.t)/(h.t-r.t);return t(r)+(t(h)-t(r))*M}static pathAt(n,o){const t=[...n].sort((a,i)=>a.t-i.t);if(o<=t[0].t)return t[0].path;const s=t[t.length-1];if(o>=s.t)return s.path;const c=t.findIndex(a=>a.t>o),e=t[c-1],r=t[c];if(e.path.length!==r.path.length)return e.path;const h=(o-e.t)/(r.t-e.t),M=(a,i)=>a+(i-a)*h;return e.path.map((a,i)=>({lat:M(a.lat,r.path[i].lat),lng:M(a.lng,r.path[i].lng),altitudeM:M(a.altitudeM,r.path[i].altitudeM)}))}static patchAt(n,o,t){if(t.patchiness<=0)return 1;const s=o/1e3,c=(r,h)=>{const M=(n-t.windAlongMS*s)/r,a=(Math.abs(t.windAcrossMS)+.3)*s/r+h;return l.valueNoise(M,a)},e=(2*c(l.PATCH_M,0)+c(l.PATCH_M/3,17.3))/3;return 1+t.patchiness*(2*e-1)}static valueNoise(n,o){const t=Math.floor(n),s=Math.floor(o),c=n-t,e=o-s,r=i=>i*i*(3-2*i),h=(i,g)=>{const v=Math.sin(i*127.1+g*311.7)*43758.5453;return v-Math.floor(v)},M=h(t,s)+(h(t+1,s)-h(t,s))*r(c),a=h(t,s+1)+(h(t+1,s+1)-h(t,s+1))*r(c);return M+(a-M)*r(e)}static samplesOf(n,o,t){const s=O.ecef({lat:o.lat,lng:o.lng,heightM:0}),c=o.lat*Math.PI/180,e=o.lng*Math.PI/180,r=u=>{const p=u[0]-s[0],A=u[1]-s[1],f=u[2]-s[2];return[-Math.sin(e)*p+Math.cos(e)*A,-Math.sin(c)*Math.cos(e)*p-Math.sin(c)*Math.sin(e)*A+Math.cos(c)*f,Math.cos(c)*Math.cos(e)*p+Math.cos(c)*Math.sin(e)*A+Math.sin(c)*f]},h=(n.divergenceMrad??l.DEFAULT_DIVERGENCE_MRAD)/1e3,M=n.apertureM??l.DEFAULT_APERTURE_M,a=[];let i=0,g=n.powerW,v=0;for(let u=0;u+1<n.path.length;u++){const p=n.path[u],A=n.path[u+1],f=O.ecef({lat:p.lat,lng:p.lng,heightM:p.altitudeM}),w=O.ecef({lat:A.lat,lng:A.lng,heightM:A.altitudeM}),d=Math.hypot(w[0]-f[0],w[1]-f[1],w[2]-f[2]),[C,S]=(()=>{const[E,R]=r(f),[N,T]=r(w);return[(N-E)/(d||1),(T-R)/(d||1)]})(),I=Math.max(1,Math.min(l.MAX_SAMPLES,Math.ceil(d/l.STEP_M)));for(let E=u===0?0:1;E<=I;E++){const R=E/I,N=[0,1,2].map(P=>f[P]+(w[P]-f[P])*R),T=R*d,x=p.altitudeM+(A.altitudeM-p.altitudeM)*R+l.bulgeM(T,d);if(E>0){const P=a[a.length-1],W=T+i-P.fromSourceM,H=l.extinctionAt(t,n.wavelengthNm,(P.altitudeM+x)/2);v+=H*W,g=n.powerW*Math.exp(-v)}const[U,F,G]=r(N);a.push({eastM:U,northM:F,upM:G,altitudeM:x,fromSourceM:i+T,dirEast:C,dirNorth:S,widthM:M+h*(i+T),powerW:g})}i+=d}return a}static bulgeM(n,o){return n*(o-n)/(2*6371e3)}static extinctionAt(n,o,t){const{rayleighPerM:s,aerosolPerM:c}=l.coefficientsAt(n,o,t);return s+c}static coefficientsAt(n,o,t){const s=D.rayleighAt(o)*D.rayleighDensity(t),c=n.aerosol[1]*(o/550)**-1.3*D.aerosolDensity(t);return{rayleighPerM:s,aerosolPerM:c}}static phasedScattering(n,o){const t=3/(16*Math.PI)*(1+o*o),s=l.AEROSOL_ASYMMETRY,c=(1-s*s)/(4*Math.PI*(1+s*s-2*s*o)**1.5);return n.rayleighPerM*t+n.aerosolPerM*l.AEROSOL_SINGLE_SCATTERING_ALBEDO*c}static efficacy(n){return 683*Math.max(0,y.colourMatching(n)[1])}static colourOf(n){const[o,t,s]=y.colourMatching(n);if(t<=0)return[0,0,0];const c=y.linearSrgbOf([o/t,1,s/t]).map(r=>Math.max(0,r)),e=.2126*c[0]+.7152*c[1]+.0722*c[2];return c.map(r=>r/e)}static luminanceCdM2(n,o,t,s,c){return l.efficacy(o)*n*t/(s*Math.max(c,.001))}}export{l as L};
1
+ import{R as O,b3 as D,b4 as y}from"./rr0-sighting.mjs";class l{static DEFAULT_DIVERGENCE_MRAD=.1;static DEFAULT_APERTURE_M=.01;static AEROSOL_SINGLE_SCATTERING_ALBEDO=.9;static AEROSOL_ASYMMETRY=.7;static DEFAULT_PATCHINESS=.35;static PATCH_M=120;static STEP_M=25;static MAX_SAMPLES=2e3;static viewsAt(n,o,t,s){return l.onAt(n,o).map(c=>l.viewOf(c,t,s))}static viewOf(n,o,t){return{id:n.id,wavelengthNm:n.wavelengthNm,patchiness:n.patchiness??l.DEFAULT_PATCHINESS,samples:l.samplesOf(n,o,t)}}static onAt(n,o){return n.filter(t=>(t.fromT===void 0||o>=t.fromT)&&(t.untilT===void 0||o<=t.untilT)).map(t=>l.stateAt(t,o)).filter(t=>t.path.length>=2)}static stateAt(n,o){if(!n.light?.length&&!n.moves?.length)return n;const t={...n};if(n.light?.length){const s=l.joined(n.light.filter(e=>e.wavelengthNm!==void 0),o,e=>e.wavelengthNm),c=l.joined(n.light.filter(e=>e.powerW!==void 0),o,e=>e.powerW);s!==void 0&&(t.wavelengthNm=s),c!==void 0&&(t.powerW=c)}return n.moves?.length&&(t.path=l.pathAt(n.moves,o)),t}static joined(n,o,t){if(n.length===0)return;const s=[...n].sort((a,i)=>a.t-i.t);if(o<=s[0].t)return t(s[0]);const c=s[s.length-1];if(o>=c.t)return t(c);const e=s.findIndex(a=>a.t>o),r=s[e-1],h=s[e],M=(o-r.t)/(h.t-r.t);return t(r)+(t(h)-t(r))*M}static pathAt(n,o){const t=[...n].sort((a,i)=>a.t-i.t);if(o<=t[0].t)return t[0].path;const s=t[t.length-1];if(o>=s.t)return s.path;const c=t.findIndex(a=>a.t>o),e=t[c-1],r=t[c];if(e.path.length!==r.path.length)return e.path;const h=(o-e.t)/(r.t-e.t),M=(a,i)=>a+(i-a)*h;return e.path.map((a,i)=>({lat:M(a.lat,r.path[i].lat),lng:M(a.lng,r.path[i].lng),altitudeM:M(a.altitudeM,r.path[i].altitudeM)}))}static patchAt(n,o,t){if(t.patchiness<=0)return 1;const s=o/1e3,c=(r,h)=>{const M=(n-t.windAlongMS*s)/r,a=(Math.abs(t.windAcrossMS)+.3)*s/r+h;return l.valueNoise(M,a)},e=(2*c(l.PATCH_M,0)+c(l.PATCH_M/3,17.3))/3;return 1+t.patchiness*(2*e-1)}static valueNoise(n,o){const t=Math.floor(n),s=Math.floor(o),c=n-t,e=o-s,r=i=>i*i*(3-2*i),h=(i,g)=>{const v=Math.sin(i*127.1+g*311.7)*43758.5453;return v-Math.floor(v)},M=h(t,s)+(h(t+1,s)-h(t,s))*r(c),a=h(t,s+1)+(h(t+1,s+1)-h(t,s+1))*r(c);return M+(a-M)*r(e)}static samplesOf(n,o,t){const s=O.ecef({lat:o.lat,lng:o.lng,heightM:0}),c=o.lat*Math.PI/180,e=o.lng*Math.PI/180,r=u=>{const p=u[0]-s[0],A=u[1]-s[1],f=u[2]-s[2];return[-Math.sin(e)*p+Math.cos(e)*A,-Math.sin(c)*Math.cos(e)*p-Math.sin(c)*Math.sin(e)*A+Math.cos(c)*f,Math.cos(c)*Math.cos(e)*p+Math.cos(c)*Math.sin(e)*A+Math.sin(c)*f]},h=(n.divergenceMrad??l.DEFAULT_DIVERGENCE_MRAD)/1e3,M=n.apertureM??l.DEFAULT_APERTURE_M,a=[];let i=0,g=n.powerW,v=0;for(let u=0;u+1<n.path.length;u++){const p=n.path[u],A=n.path[u+1],f=O.ecef({lat:p.lat,lng:p.lng,heightM:p.altitudeM}),w=O.ecef({lat:A.lat,lng:A.lng,heightM:A.altitudeM}),d=Math.hypot(w[0]-f[0],w[1]-f[1],w[2]-f[2]),[C,S]=(()=>{const[E,R]=r(f),[N,T]=r(w);return[(N-E)/(d||1),(T-R)/(d||1)]})(),I=Math.max(1,Math.min(l.MAX_SAMPLES,Math.ceil(d/l.STEP_M)));for(let E=u===0?0:1;E<=I;E++){const R=E/I,N=[0,1,2].map(P=>f[P]+(w[P]-f[P])*R),T=R*d,x=p.altitudeM+(A.altitudeM-p.altitudeM)*R+l.bulgeM(T,d);if(E>0){const P=a[a.length-1],W=T+i-P.fromSourceM,H=l.extinctionAt(t,n.wavelengthNm,(P.altitudeM+x)/2);v+=H*W,g=n.powerW*Math.exp(-v)}const[U,F,G]=r(N);a.push({eastM:U,northM:F,upM:G,altitudeM:x,fromSourceM:i+T,dirEast:C,dirNorth:S,widthM:M+h*(i+T),powerW:g})}i+=d}return a}static bulgeM(n,o){return n*(o-n)/(2*6371e3)}static extinctionAt(n,o,t){const{rayleighPerM:s,aerosolPerM:c}=l.coefficientsAt(n,o,t);return s+c}static coefficientsAt(n,o,t){const s=D.rayleighAt(o)*D.rayleighDensity(t),c=n.aerosol[1]*(o/550)**-1.3*D.aerosolDensity(t);return{rayleighPerM:s,aerosolPerM:c}}static phasedScattering(n,o){const t=3/(16*Math.PI)*(1+o*o),s=l.AEROSOL_ASYMMETRY,c=(1-s*s)/(4*Math.PI*(1+s*s-2*s*o)**1.5);return n.rayleighPerM*t+n.aerosolPerM*l.AEROSOL_SINGLE_SCATTERING_ALBEDO*c}static efficacy(n){return 683*Math.max(0,y.colourMatching(n)[1])}static colourOf(n){const[o,t,s]=y.colourMatching(n);if(t<=0)return[0,0,0];const c=y.linearSrgbOf([o/t,1,s/t]).map(r=>Math.max(0,r)),e=.2126*c[0]+.7152*c[1]+.0722*c[2];return c.map(r=>r/e)}static luminanceCdM2(n,o,t,s,c){return l.efficacy(o)*n*t/(s*Math.max(c,.001))}}export{l as L};
@@ -0,0 +1,22 @@
1
+ import{ae as y,_ as d,ag as b,ah as E,b5 as w}from"./rr0-sighting.mjs";import{S as j,P as x,I as g,E as k,a as v}from"./ParameterForm-DxN0Nf1y.js";import{L as T}from"./LaunchPlume-DONCQxUE.js";import{T as I}from"./TimelineTracks-B1dXX0uV.js";const S=y.catalog({en:()=>d(()=>import("./LaunchParameterTexts_en-DvrCwbDM.js"),[],import.meta.url).then(r=>r.launchParameterTexts_en),fr:()=>d(()=>import("./LaunchParameterTexts_fr-Bh_1zVzy.js"),[],import.meta.url).then(r=>r.launchParameterTexts_fr),es:()=>d(()=>import("./LaunchParameterTexts_es--RUAegVp.js"),[],import.meta.url).then(r=>r.launchParameterTexts_es),it:()=>d(()=>import("./LaunchParameterTexts_it-CWDx9nJy.js"),[],import.meta.url).then(r=>r.launchParameterTexts_it)});class n{static plumeValue(e){return t=>T.plumeOf(t)[e]}static plume(e,t){return{type:"number",key:`plume.${e}`,effective:n.plumeValue(e),...t}}static burn(e,t){return{type:"number",key:e,min:-3600,max:36e3,step:.1,unit:"s",scale:.001,label:t.label,hint:t.hint,group:"engine",effective:i=>t.ends(i.track??[])?.t}}static placeAt(e,t){if(e.length===0)return{t,lat:0,lng:0,altitudeKm:0};if(e.length===1)return{t,lat:e[0].lat,lng:e[0].lng,altitudeKm:e[0].altitudeKm};let i=0;for(;i<e.length-2&&e[i+1].t<t;)i++;const s=e[i],a=e[i+1],l=a.t===s.t?0:(t-s.t)/(a.t-s.t),o=(m,h)=>m+(h-m)*l;return{t,lat:o(s.lat,a.lat),lng:o(s.lng,a.lng),altitudeKm:Math.max(0,o(s.altitudeKm,a.altitudeKm))}}static instantsOf(e){return[...e.track.map(t=>t.t),...[e.burnFromT,e.burnUntilT].filter(t=>t!==void 0),...(e.jets??[]).flatMap(t=>[t.fromT,t.untilT])]}static SET={kind:"launch",title:"launch",parameters:[{type:"said",key:"title",label:"name",group:"vehicle"},{type:"text",key:"vehicle.mission",label:"mission",placeholder:"Starlink Group 10-49",group:"vehicle"},{type:"number",key:"vehicle.engine.thrustKN",min:1,max:1e5,step:1,unit:"kN",label:"thrustVacuum",hint:"merlinVacuum934Rl10110A",group:"engine"},{type:"number",key:"vehicle.engine.specificImpulseS",min:100,max:500,step:1,unit:"s",label:"specificImpulseVacuum",hint:"times981MSIt",group:"engine"},{type:"choice",key:"vehicle.engine.propellant",label:"propellant",hint:"whatTheExhaustIsMadeOf",choices:[{value:"rp1-lox",label:"keroseneAndOxygen"},{value:"methane-lox",label:"methaneAndOxygen"},{value:"hydrogen-lox",label:"hydrogenAndOxygen"},{value:"hypergolic",label:"hypergolic"},{value:"solid",label:"solid"}],group:"engine"},n.burn("burnFromT",{label:"engineStart",hint:"whenTheEngineStartedInSeconds",ends:e=>e[0]}),n.burn("burnUntilT",{label:"engineCutOff",hint:"whenTheEngineStoppedInSeconds",ends:e=>e[e.length-1]}),n.plume("exhaustKgPerS",{min:.1,max:1e5,step:.1,unit:"kg/s",label:"exhaustFlow",hint:"howMuchExhaustLeavesTheEngine",group:"plume"}),n.plume("condensedShare",{min:0,max:1,step:.01,label:"shareThatScatters",hint:"theShareOfTheExhaustThat",group:"plume"}),n.plume("particleRadiusUm",{min:.05,max:5,step:.05,unit:"µm",label:"particleRadius",group:"plume"}),n.plume("lifetimeS",{min:10,max:3600,step:10,unit:"s",label:"trailLifetime",hint:"howLongTheNarrowTrailLasts",group:"plume"}),n.plume("expansionKmPerS",{min:0,max:5,step:.01,unit:"km/s",label:"trailSpreading",group:"plume"}),n.plume("initialRadiusKm",{min:0,max:50,step:.1,unit:"km",label:"radiusAtRelease",group:"plume"}),n.plume("collarShare",{min:0,max:1,step:.01,label:"shareInTheCollar",hint:"theCollarIsTheExhaustJust",group:"collar"}),n.plume("collarExpansionKmPerS",{min:0,max:10,step:.05,unit:"km/s",label:"collarSpreading",hint:"howFastTheCollarWidensThree",group:"collar"}),n.plume("collarLifetimeS",{min:1,max:300,step:1,unit:"s",label:"collarLifetime",group:"collar"})]};static PLACE={kind:"launch-place",title:"placeOfThePath",parameters:[{type:"number",key:"t",min:-3600,max:36e3,step:.1,unit:"s",scale:.001,required:!0,label:"time",hint:"secondsOfTheRecordingNegativeBefore"},{type:"position",key:"lat",secondKey:"lng",saidKey:"saidPosition",native:"geo",step:1,label:"position"},{type:"number",key:"altitudeKm",min:0,max:2e3,step:.1,unit:"km",required:!0,label:"altitude"}]};static jetContext(e,t){return{launch:e,index:t}}static jetValue(e){return(t,i)=>{const{launch:s,index:a}=i??{};return s?e(T.releaseOf(s,t,a)):void 0}}static JET_GROUP="jet";static JET={kind:"launch-jet",title:"jet",parameters:[{type:"choice",key:"kind",required:!0,label:"what",choices:[{value:"burn",label:"engineBurn"},{value:"vent",label:"propellantVented"}],group:n.JET_GROUP},{type:"number",key:"fromT",min:-36e3,max:36e3,step:.1,unit:"s",scale:.001,required:!0,label:"from",hint:"secondsOfTheRecordingNegativeBefore2",group:n.JET_GROUP},{type:"number",key:"untilT",min:-36e3,max:36e3,step:.1,unit:"s",scale:.001,required:!0,label:"until",group:n.JET_GROUP},{type:"number",key:"angleDeg",min:0,max:180,step:1,unit:"°",effective:()=>0,label:"directionFromAft",hint:"t0StraightBackAlongTheStage",group:n.JET_GROUP},{type:"number",key:"azimuthDeg",min:-360,max:360,step:1,unit:"°",effective:()=>0,label:"side",hint:"roundTheLineOfMotionWhich",group:n.JET_GROUP},{type:"number",key:"spinPeriodS",min:-3600,max:3600,step:.1,unit:"s",label:"spinPeriod",hint:"howLongTheStageTakesTo",group:n.JET_GROUP},{type:"number",key:"speedKmPerS",min:0,max:10,step:.01,unit:"km/s",effective:n.jetValue(e=>e.speedKmPerS),label:"speed",hint:"howFastItLeavesTheStage",group:n.JET_GROUP},{type:"number",key:"massKgPerS",min:0,max:1e5,step:.1,unit:"kg/s",effective:n.jetValue(e=>e.massKgPerS),label:"flow",group:n.JET_GROUP},{type:"number",key:"condensedShare",min:0,max:1,step:.01,effective:n.jetValue(e=>e.condensedShare),label:"shareThatScatters",group:n.JET_GROUP},{type:"number",key:"particleRadiusUm",min:.05,max:5,step:.05,unit:"µm",effective:n.jetValue(e=>e.particleRadiusUm),label:"particleRadius",group:n.JET_GROUP},{type:"number",key:"expansionKmPerS",min:0,max:5,step:.01,unit:"km/s",effective:n.jetValue(e=>e.populations[0].expansionKmPerS),label:"spreading",hint:"howFastEachPuffOfIt",group:n.JET_GROUP},{type:"number",key:"initialRadiusKm",min:0,max:50,step:.1,unit:"km",effective:n.jetValue(e=>e.initialRadiusKm),label:"radiusAtRelease",group:n.JET_GROUP},{type:"number",key:"lifetimeS",min:1,max:7200,step:1,unit:"s",effective:n.jetValue(e=>e.populations[0].lifetimeS),label:"lifetime",group:n.JET_GROUP}]};static publish(){b.publish(n.SET)}}const O=y.catalog({en:()=>d(()=>import("./LaunchEditorMessages_en-BnzNAYW9.js"),[],import.meta.url).then(r=>r.launchEditorMessages_en),fr:()=>d(()=>import("./LaunchEditorMessages_fr-Ds_VOB8c.js"),[],import.meta.url).then(r=>r.launchEditorMessages_fr),es:()=>d(()=>import("./LaunchEditorMessages_es-BE0dEl7I.js"),[],import.meta.url).then(r=>r.launchEditorMessages_es),it:()=>d(()=>import("./LaunchEditorMessages_it-DPQaR8HY.js"),[],import.meta.url).then(r=>r.launchEditorMessages_it)});class u{constructor(e,t,i){this.container=e,this.host=t,j.attach(e,"launch-editor-part",u.STYLE),this.language=i,b.of("launch")||n.publish(),this.ready=this.setLanguage(i)}messages;ready;parameterTexts;languageToken=0;currentId;form;list;timeline;row="path";placeForm;placeIndex=0;jetForm;jetIndex=0;language;shown=[];static STYLE='.launch-editor-part { flex-basis: 100%; min-width: 0; } .launch-editor-part #launch-timeline { flex-basis: 100%; min-width: 0; padding: 4px 0; } .launch-editor-part .launch-path > .icon-btn { align-self: flex-end; } .launch-editor-part #launch-list, .launch-editor-part #launch-places { flex-basis: 100%; min-width: 0; } .launch-editor-part .launch-editor, .launch-editor-part .launch-fields { display: flex; flex-wrap: wrap; gap: 8px; align-items: end; } .launch-editor-part .launch-fields { flex-basis: 100%; min-width: 0; } .launch-editor-part [hidden] { display: none !important; } .launch-editor-part select { min-width: 0; width: 100%; } .launch-editor-part .launch-intro { flex-basis: 100%; margin: 0; } .launch-editor-part .launch-track { flex-basis: 100%; margin: 0; } .launch-editor-part .launch-parameters { flex-basis: 100%; min-width: 0; display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-start; } .launch-editor-part .parameter-group { flex: 1 1 14em; min-width: 0; box-sizing: border-box; margin: 0; display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: flex-start; align-content: flex-start; } .launch-editor-part input, .launch-editor-part select { max-width: 100%; box-sizing: border-box; } .launch-editor-part input[type="text"] { width: 12em; } .launch-editor-part #launch-title { width: 18em; } .launch-editor-part label { min-width: 0; max-width: 100%; } .launch-editor-part input.parameter-derived::placeholder { opacity: .65; } .launch-editor-part .launch-path { flex: 1 1 100%; min-width: 0; box-sizing: border-box; margin: 0; display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: flex-start; }';async setLanguage(e){const t=++this.languageToken;this.language=e;const[i,s]=await Promise.all([O.load(e),S.load(e)]);t===this.languageToken&&(this.messages=i,this.parameterTexts=s,this.render(),this.sync())}sync(){if(!this.messages)return;const e=this.launches;this.shown=[...e],e.some(s=>s.id===this.currentId)||(this.currentId=e[0]?.id),this.list?.setItems(e.map(s=>({id:s.id,label:this.labelOf(s)})),this.currentId),this.syncAddState();const t=this.current;if(this.element("launch-fields").hidden=t===void 0,!t)return;this.syncPlace(!0),this.syncJet(!0);const i=this.resolved(b.of("launch"));this.form??=new x(this.element("launch-parameters"),this.language,"",{said:()=>this.host.said(),writingLanguage:()=>this.host.writingLanguage()}),this.form.show(i,t,()=>this.written())}refresh(){if(!this.messages)return;this.syncAddState();const e=this.launches;if(e.length===this.shown.length&&e.every((t,i)=>t===this.shown[i])){this.syncTimeline();return}this.sync()}setTime(e){this.messages&&this.timeline?.setTime(e)}syncAddState(){const e=this.startOfNew()!==void 0;this.list?.setAddState(e,e?void 0:this.messages.addLaunchNowhere)}get current(){return this.launches.find(e=>e.id===this.currentId)}show(e){this.messages&&(this.currentId=e,this.row="path",this.placeIndex=0,this.jetIndex=0,this.sync())}resolved(e){return E.resolve(e,this.parameterTexts)}render(){if(!this.messages)return;const e=this.messages;this.form=void 0,this.container.innerHTML=`<div class="launch-editor">
2
+ <p class="launch-intro">${e.intro}</p>
3
+ <div id="launch-list"></div>
4
+ <div id="launch-fields" class="launch-fields">
5
+ <div id="launch-parameters" class="launch-parameters"></div>
6
+ <div id="launch-timeline" class="launch-timeline"></div>
7
+ <button id="launch-jet-add-burn" type="button" title="${e.addJet}">${g.PLUS} ${e.jetBurn}</button>
8
+ <button id="launch-jet-add-vent" type="button" title="${e.addJet}">${g.PLUS} ${e.jetVent}</button>
9
+ <p class="launch-intro">${e.timelineNote}</p>
10
+ <fieldset id="launch-path" class="launch-path">
11
+ <legend>${e.path}</legend>
12
+ <div id="launch-place-parameters" class="launch-parameters"></div>
13
+ <button id="launch-place-delete" class="icon-btn" type="button" title="${e.deletePlace}" aria-label="${e.deletePlace}">${g.TRASH}</button>
14
+ </fieldset>
15
+ <fieldset id="launch-jets" class="launch-path">
16
+ <legend id="launch-jet-legend">${e.jet}</legend>
17
+ <div id="launch-jet-parameters" class="launch-parameters"></div>
18
+ <button id="launch-jet-delete" class="icon-btn" type="button" title="${e.deleteJet}" aria-label="${e.deleteJet}">${g.TRASH}</button>
19
+ </fieldset>
20
+ <p class="launch-intro">${e.derivedNote}</p>
21
+ </div>
22
+ </div>`;const t=this.element("launch-list");this.list=new k({header:t,body:this.element("launch-fields"),ids:{list:"launch-select",remove:"launch-delete",add:"launch-add",kinds:"launch-add-kind",kind:i=>`launch-add-${i}`},onSelect:i=>this.show(i),onAdd:i=>this.addLaunch(i??u.VEHICLES[0].id),onRemove:()=>this.deleteCurrent()}),this.list.setLabels({list:e.launch,remove:e.deleteLaunch,add:e.addLaunch,empty:e.none}),this.list.setKinds(u.VEHICLES.map(i=>({value:i.id,label:i.vehicle.name??i.id}))),this.timeline=new I(this.element("launch-timeline"),i=>this.host.seekTo(i),{addKeyframeHere:e.addHere,keyframeHere:e.here,zoomHint:e.zoomHint}),this.element("launch-jet-add-burn").addEventListener("click",()=>this.addJet("burn",this.host.currentTime())),this.element("launch-jet-add-vent").addEventListener("click",()=>this.addJet("vent",this.host.currentTime())),this.element("launch-place-delete").addEventListener("click",()=>this.removePlace()),this.element("launch-jet-delete").addEventListener("click",()=>this.removeJet()),this.placeForm=void 0,this.jetForm=void 0}written(){this.host.changed();const e=this.current;e&&(this.list?.rename(e.id,this.labelOf(e)),this.syncTimeline())}static PATH_COLOR="#e08a1e";static JET_COLOR="#4f8fd6";jetLabel(e,t){return`${e.kind==="vent"?this.messages.jetVent:this.messages.jetBurn} ${t+1}`}syncTimeline(){const e=this.current;if(!this.timeline||!e)return;const i={id:"path",label:this.messages.path,color:u.PATH_COLOR,times:e.track.map(h=>h.t),active:this.row==="path",selectedTime:this.row==="path"?e.track[this.placeIndex]?.t:void 0,open:()=>this.selectPlace(this.placeIndex),pressed:(h,c)=>{const p=c===void 0?-1:(this.current?.track??[]).findIndex(f=>f.t===c);this.selectPlace(p>=0?p:this.placeIndex)},move:(h,c)=>this.movePlace(h,c),add:()=>this.addPlaceAt(this.host.currentTime())},s=(e.jets??[]).map((h,c)=>({id:`jet-${c}`,label:this.jetLabel(h,c),color:u.JET_COLOR,times:[h.fromT,h.untilT],spans:[{t:h.fromT,until:h.untilT,label:""}],active:this.row==="jet"&&c===this.jetIndex,open:()=>this.selectJet(c),pressed:()=>this.selectJet(c),move:(p,f)=>this.moveJetEnd(c,p,f),add:()=>this.addJet(h.kind??"burn",this.host.currentTime())})),a=n.instantsOf(e),l=Math.min(...a),o=Math.max(...a),m=Math.max(500,(o-l)/10);this.timeline.show([i,...s],this.host.duration(),this.host.currentTime(),{from:l-m,to:o+m})}syncDetail(){const t=this.current?.jets?.[this.jetIndex];this.row==="jet"&&!t&&(this.row="path"),this.element("launch-path").hidden=this.row!=="path",this.element("launch-jets").hidden=this.row!=="jet",this.element("launch-jet-legend").textContent=t?this.jetLabel(t,this.jetIndex):this.messages.jet}static MIN_PLACES=2;syncPlace(e=!1){const t=this.current?.track??[];this.placeIndex=Math.max(0,Math.min(this.placeIndex,t.length-1)),this.element("launch-place-delete").disabled=t.length<=u.MIN_PLACES,this.placeForm?this.placeForm.sync(e):(this.placeForm=new x(this.element("launch-place-parameters"),this.language,"launchPlace."),this.placeForm.show(this.resolved(n.PLACE),new v(()=>this.current?.track[this.placeIndex],i=>this.editPlace(this.placeIndex,i),void 0,this.host.positionPlace?.()),()=>{})),this.syncDetail(),this.syncTimeline()}selectPlace(e){this.row="path",this.placeIndex=e,this.syncPlace(!0)}editPlace(e,t){const i=this.current;if(!i)return;const s={...i.track[e]};t(s),i.track=i.track.map((a,l)=>l===e?s:a).sort((a,l)=>a.t-l.t),this.placeIndex=i.track.indexOf(s),this.syncPlace(),this.written()}movePlace(e,t){const i=this.current?.track.findIndex(s=>s.t===e)??-1;i<0||(this.editPlace(i,s=>{s.t=t}),this.syncPlace(!0))}addPlaceAt(e){const t=this.current;if(!t)return;const i=t.track.findIndex(s=>Math.abs(s.t-e)<1);if(i<0){const s=n.placeAt(t.track,Math.round(e));t.track=[...t.track,s].sort((a,l)=>a.t-l.t),this.host.changed(),this.selectPlace(t.track.indexOf(s));return}this.selectPlace(i)}removePlace(){const e=this.current;!e||e.track.length<=u.MIN_PLACES||(e.track=e.track.filter((t,i)=>i!==this.placeIndex),this.syncPlace(!0),this.host.changed())}syncJet(e=!1){const t=this.current?.jets??[];this.jetIndex=Math.max(0,Math.min(this.jetIndex,t.length-1)),this.jetForm?this.jetForm.sync(e):(this.jetForm=new x(this.element("launch-jet-parameters"),this.language,"launchJet."),this.jetForm.show(this.resolved(n.JET),new v(()=>this.current?.jets?.[this.jetIndex],i=>this.editJet(this.jetIndex,i),()=>this.current?n.jetContext(this.current,this.jetIndex):void 0),()=>{})),this.syncDetail(),this.syncTimeline()}selectJet(e){this.row="jet",this.jetIndex=e,this.syncJet(!0)}editJet(e,t){const i=this.current;if(!i?.jets)return;const s={...i.jets[e]};t(s),i.jets=i.jets.map((a,l)=>l===e?s:a),this.written()}moveJetEnd(e,t,i){const s=this.current?.jets?.[e];s&&(this.editJet(e,a=>{const l=t===s.fromT?[i,s.untilT]:[s.fromT,i];a.fromT=Math.min(l[0],l[1]),a.untilT=Math.max(l[0],l[1])}),this.selectJet(e))}addJet(e,t){const i=this.current;if(!i)return;const s=i.track,a=Math.round(t),l=e==="vent"?{kind:e,fromT:a,untilT:a+3e4,angleDeg:90}:{kind:e,fromT:a,untilT:a+3e4};!i.jets?.length&&i.burnFromT===void 0&&i.burnUntilT===void 0&&(i.burnFromT=s[0].t,i.burnUntilT=s[s.length-1].t),i.jets=[...i.jets??[],l],this.form?.sync(!0),this.host.changed(),this.selectJet(i.jets.length-1)}removeJet(){const e=this.current;if(!e?.jets?.length)return;const t=e.jets.filter((i,s)=>s!==this.jetIndex);t.length?e.jets=t:delete e.jets,this.host.changed(),t.length?this.selectJet(Math.min(this.jetIndex,t.length-1)):this.selectPlace(this.placeIndex)}startOfNew(){const e=this.host.sighting(),t=e.event?.place?.[0];if(t?.lat===void 0||t.lng===void 0)return;const i=(e.observerTrack?.getInterpolatedPoseAt(0)?.headingDeg??0)*Math.PI/180,s=a=>({lat:t.lat+a*Math.cos(i)/111.32,lng:t.lng+a*Math.sin(i)/(111.32*Math.max(.05,Math.cos(t.lat*Math.PI/180)))});return[{t:0,...s(300),altitudeKm:80},{t:6e4,...s(450),altitudeKm:160}]}static VEHICLES=[{id:"falcon-9",vehicle:{name:"Falcon 9"}}];addLaunch(e){const t=this.startOfNew();if(!t)return;const i=u.VEHICLES.find(o=>o.id===e)??u.VEHICLES[0];let s=this.launches.length+1;for(;this.launches.some(o=>o.id===`launch-${s}`);)s++;const a={id:`launch-${s}`,vehicle:{...i.vehicle},track:t},l=this.host.sighting();l.skyEvents={...l.skyEvents,launches:[...this.launches,a]},this.currentId=a.id,this.row="path",this.placeIndex=0,this.host.changed(),this.sync()}deleteCurrent(){const e=this.current;if(!e)return;this.currentId=void 0;const t=this.host.sighting();t.skyEvents=w.written({...t.skyEvents,launches:this.launches.filter(i=>i!==e)}),this.host.changed(),this.sync()}labelOf(e){const t=this.host.said().read(e.title)??e.vehicle?.mission??e.vehicle?.name;return t?`${t} (${e.id})`:e.id}get launches(){return this.host.sighting().skyEvents?.launches??[]}element(e){return this.container.querySelector(`#${e}`)}}export{u as LaunchEditor};
@@ -0,0 +1 @@
1
+ const e={title:"Launches",name:"Rocket plume",detail:"{name} — {part}, {distance} away, {height} km up",ascent:"exhaust of the ascent",burn:"exhaust of an engine burn",vent:"vented propellant"};export{e as launchKindMessages_en};
@@ -0,0 +1 @@
1
+ const e={title:"Lanzamientos",name:"Estela de cohete",detail:"{name} — {part}, a {distance}, a {height} km de altitud",ascent:"escape del ascenso",burn:"escape de un encendido",vent:"propelentes purgados"};export{e as launchKindMessages_es};
@@ -0,0 +1 @@
1
+ const e={title:"Lancements",name:"Panache de fusée",detail:"{name} — {part}, à {distance}, à {height} km d'altitude",ascent:"échappement de la montée",burn:"échappement d'un allumage",vent:"ergols vidangés"};export{e as launchKindMessages_fr};
@@ -0,0 +1 @@
1
+ const a={title:"Lanci",name:"Scia di razzo",detail:"{name} — {part}, a {distance}, a {height} km di quota",ascent:"scarico dell'ascesa",burn:"scarico di un'accensione",vent:"propellenti scaricati"};export{a as launchKindMessages_it};
@@ -0,0 +1 @@
1
+ const e={engine:"Engine",launch:"Launch",name:"Name",vehicle:"Vehicle",mission:"Mission",thrustVacuum:"Thrust (vacuum)",merlinVacuum934Rl10110A:"Merlin Vacuum 934, RL10 110, a solid booster several thousand. With the specific impulse, it sets how much exhaust leaves each second.",specificImpulseVacuum:"Specific impulse (vacuum)",times981MSIt:"Times 9.81 m/s² it is the exhaust velocity, which sets how fast the exhaust spreads round the stage: 348 s is 3.4 km/s.",propellant:"Propellant",whatTheExhaustIsMadeOf:"What the exhaust is made of decides how much of it turns into particles that scatter light.",keroseneAndOxygen:"Kerosene and oxygen",methaneAndOxygen:"Methane and oxygen",hydrogenAndOxygen:"Hydrogen and oxygen",hypergolic:"Hypergolic",solid:"Solid",engineStart:"Engine start",whenTheEngineStartedInSeconds:"When the engine started, in seconds of the recording; it may be before it. Empty: the first point of the path.",engineCutOff:"Engine cut-off",whenTheEngineStoppedInSeconds:"When the engine stopped, in seconds of the recording. Empty: the last point of the path. Nothing is let go after it.",exhaustFlow:"Exhaust flow",howMuchExhaustLeavesTheEngine:"How much exhaust leaves the engine each second: how bright the plume is. Thrust over exhaust velocity when the engine is stated.",plume:"Plume",shareThatScatters:"Share that scatters",theShareOfTheExhaustThat:"The share of the exhaust that ends up as particles that scatter the Sun's light. Nobody has measured it for a launch: the one number to fit against a photograph.",particleRadius:"Particle radius",trailLifetime:"Trail lifetime",howLongTheNarrowTrailLasts:"How long the narrow trail lasts before the particles have gone.",trailSpreading:"Trail spreading",radiusAtRelease:"Radius at release",shareInTheCollar:"Share in the collar",theCollarIsTheExhaustJust:"The collar is the exhaust just let go, which spreads fast into a wide short-lived shell round the stage; the rest stays behind as the narrow trail.",collar:"Collar",collarSpreading:"Collar spreading",howFastTheCollarWidensThree:"How fast the collar widens: three quarters of the exhaust velocity when the engine is stated.",collarLifetime:"Collar lifetime",placeOfThePath:"Place of the path",time:"Time",secondsOfTheRecordingNegativeBefore:"Seconds of the recording; negative before it began: a stage seen minutes after its launch was already high when the recording started.",position:"Position",altitude:"Altitude",jet:"Jet",what:"What",engineBurn:"Engine burn",propellantVented:"Propellant vented",from:"From",secondsOfTheRecordingNegativeBefore2:"Seconds of the recording; negative before it began.",until:"Until",directionFromAft:"Direction from aft",t0StraightBackAlongTheStage:"0 straight back along the stage's motion (an engine pushing it on), 90 sideways, 180 straight ahead (an engine braking it).",side:"Side",roundTheLineOfMotionWhich:"Round the line of motion, which side it leaves on at the start: 0 away from the Earth, 90 to the right of the motion.",spinPeriod:"Spin period",howLongTheStageTakesTo:"How long the stage takes to turn once round its line of motion; the jet turns with it and vented propellant draws a spiral. Negative turns the other way. Empty: it does not turn.",speed:"Speed",howFastItLeavesTheStage:"How fast it leaves the stage. A burn: the engine's exhaust velocity.",flow:"Flow",spreading:"Spreading",howFastEachPuffOfIt:"How fast each puff of it widens: a narrow jet keeps the arms of a spiral apart.",lifetime:"Lifetime"};export{e as launchParameterTexts_en};
@@ -0,0 +1 @@
1
+ const e={engine:"Motor",launch:"Lanzamiento",name:"Nombre",vehicle:"Lanzador",mission:"Misión",thrustVacuum:"Empuje (en el vacío)",merlinVacuum934Rl10110A:"Merlin Vacuum 934, RL10 110, un propulsor sólido varios miles. Con el impulso específico, fija el caudal de escape.",specificImpulseVacuum:"Impulso específico (en el vacío)",times981MSIt:"Multiplicado por 9,81 m/s² es la velocidad de escape, que fija la rapidez con que el escape se extiende alrededor de la etapa: 348 s son 3,4 km/s.",propellant:"Propelentes",whatTheExhaustIsMadeOf:"De qué está hecho el escape decide qué parte se vuelve partículas que difunden la luz.",keroseneAndOxygen:"Queroseno y oxígeno",methaneAndOxygen:"Metano y oxígeno",hydrogenAndOxygen:"Hidrógeno y oxígeno",hypergolic:"Hipergólico",solid:"Sólido",engineStart:"Encendido del motor",whenTheEngineStartedInSeconds:"Cuándo se encendió el motor, en segundos de la grabación; puede ser antes. Vacío: el primer punto de la trayectoria.",engineCutOff:"Apagado del motor",whenTheEngineStoppedInSeconds:"Cuándo se apagó el motor, en segundos de la grabación. Vacío: el último punto de la trayectoria. Nada se suelta después.",exhaustFlow:"Caudal de escape",howMuchExhaustLeavesTheEngine:"La masa de escape que sale del motor cada segundo: el brillo de la estela. El empuje sobre la velocidad de escape cuando se da el motor.",plume:"Estela",shareThatScatters:"Parte que difunde",theShareOfTheExhaustThat:"La parte del escape que acaba como partículas que difunden la luz del Sol. Nadie la ha medido para un lanzamiento: el único número que ajustar con una fotografía.",particleRadius:"Radio de las partículas",trailLifetime:"Duración de la estela",howLongTheNarrowTrailLasts:"Cuánto dura la estela estrecha antes de que las partículas hayan desaparecido.",trailSpreading:"Expansión de la estela",radiusAtRelease:"Radio al soltar",shareInTheCollar:"Parte en el collar",theCollarIsTheExhaustJust:"El collar es el escape recién soltado, que se extiende rápido en una envoltura ancha y breve alrededor de la etapa; el resto queda detrás como estela estrecha.",collar:"Collar",collarSpreading:"Expansión del collar",howFastTheCollarWidensThree:"La rapidez con que el collar se ensancha: tres cuartos de la velocidad de escape cuando se da el motor.",collarLifetime:"Duración del collar",placeOfThePath:"Punto de la trayectoria",time:"Instante",secondsOfTheRecordingNegativeBefore:"Segundos de la grabación; negativos antes de que empezara: una etapa vista minutos después de su lanzamiento ya estaba alta cuando empezó la grabación.",position:"Posición",altitude:"Altitud",jet:"Chorro",what:"Qué",engineBurn:"Encendido del motor",propellantVented:"Propelentes purgados",from:"Desde",secondsOfTheRecordingNegativeBefore2:"Segundos de la grabación; negativos antes de que empezara.",until:"Hasta",directionFromAft:"Dirección desde atrás",t0StraightBackAlongTheStage:"0 hacia atrás del movimiento de la etapa (un motor que la empuja), 90 de lado, 180 hacia delante (un motor que la frena).",side:"Lado",roundTheLineOfMotionWhich:"Alrededor de la línea del movimiento, el lado por el que sale al principio: 0 opuesto a la Tierra, 90 a la derecha del movimiento.",spinPeriod:"Período de giro",howLongTheStageTakesTo:"Lo que tarda la etapa en dar una vuelta alrededor de su línea de movimiento; el chorro gira con ella y los propelentes purgados dibujan una espiral. Negativo: en el otro sentido. Vacío: no gira.",speed:"Velocidad",howFastItLeavesTheStage:"La velocidad con que sale de la etapa. Un encendido: la velocidad de escape del motor.",flow:"Caudal",spreading:"Expansión",howFastEachPuffOfIt:"La rapidez con que se ensancha cada bocanada: un chorro estrecho mantiene separados los brazos de una espiral.",lifetime:"Duración"};export{e as launchParameterTexts_es};
@@ -0,0 +1 @@
1
+ const e={engine:"Moteur",launch:"Lancement",name:"Nom",vehicle:"Lanceur",mission:"Mission",thrustVacuum:"Poussée (dans le vide)",merlinVacuum934Rl10110A:"Merlin Vacuum 934, RL10 110, un booster à poudre plusieurs milliers. Avec l'impulsion spécifique, elle fixe le débit d'échappement.",specificImpulseVacuum:"Impulsion spécifique (dans le vide)",times981MSIt:"Multipliée par 9,81 m/s², c'est la vitesse d'éjection, qui fixe la vitesse à laquelle l'échappement s'étale autour de l'étage : 348 s font 3,4 km/s.",propellant:"Ergols",whatTheExhaustIsMadeOf:"Ce dont l'échappement est fait décide quelle part devient des particules qui diffusent la lumière.",keroseneAndOxygen:"Kérosène et oxygène",methaneAndOxygen:"Méthane et oxygène",hydrogenAndOxygen:"Hydrogène et oxygène",hypergolic:"Hypergolique",solid:"Poudre",engineStart:"Allumage du moteur",whenTheEngineStartedInSeconds:"Quand le moteur s'est allumé, en secondes de l'enregistrement ; avant lui si besoin. Vide : le premier point du chemin.",engineCutOff:"Extinction du moteur",whenTheEngineStoppedInSeconds:"Quand le moteur s'est éteint, en secondes de l'enregistrement. Vide : le dernier point du chemin. Rien n'est lâché après.",exhaustFlow:"Débit d'échappement",howMuchExhaustLeavesTheEngine:"La masse d'échappement qui sort du moteur chaque seconde : la luminosité du panache. La poussée sur la vitesse d'éjection quand le moteur est donné.",plume:"Panache",shareThatScatters:"Part qui diffuse",theShareOfTheExhaustThat:"La part de l'échappement qui devient des particules diffusant la lumière du Soleil. Personne ne l'a mesurée pour un lancement : le seul nombre à caler sur une photographie.",particleRadius:"Rayon des particules",trailLifetime:"Durée de la traînée",howLongTheNarrowTrailLasts:"Combien de temps la traînée étroite dure avant que les particules aient disparu.",trailSpreading:"Étalement de la traînée",radiusAtRelease:"Rayon au lâcher",shareInTheCollar:"Part dans la collerette",theCollarIsTheExhaustJust:"La collerette est l'échappement qui vient d'être lâché, qui s'étale vite en une coque large et brève autour de l'étage ; le reste demeure derrière en traînée étroite.",collar:"Collerette",collarSpreading:"Étalement de la collerette",howFastTheCollarWidensThree:"La vitesse à laquelle la collerette s'élargit : les trois quarts de la vitesse d'éjection quand le moteur est donné.",collarLifetime:"Durée de la collerette",placeOfThePath:"Point du chemin",time:"Instant",secondsOfTheRecordingNegativeBefore:"Secondes de l'enregistrement ; négatives avant son début : un étage vu des minutes après son lancement était déjà haut quand l'enregistrement a commencé.",position:"Position",altitude:"Altitude",jet:"Jet",what:"Quoi",engineBurn:"Allumage du moteur",propellantVented:"Ergols vidangés",from:"Début",secondsOfTheRecordingNegativeBefore2:"Secondes de l'enregistrement ; négatives avant son début.",until:"Fin",directionFromAft:"Direction depuis l'arrière",t0StraightBackAlongTheStage:"0 droit vers l'arrière du mouvement de l'étage (un moteur qui le pousse), 90 sur le côté, 180 droit devant (un moteur qui le freine).",side:"Côté",roundTheLineOfMotionWhich:"Autour de la ligne du mouvement, le côté par lequel il part au début : 0 à l'opposé de la Terre, 90 à droite du mouvement.",spinPeriod:"Période de rotation",howLongTheStageTakesTo:"Le temps que met l'étage à faire un tour autour de sa ligne de mouvement ; le jet tourne avec lui et les ergols vidangés dessinent une spirale. Négative : dans l'autre sens. Vide : il ne tourne pas.",speed:"Vitesse",howFastItLeavesTheStage:"La vitesse à laquelle il quitte l'étage. Un allumage : la vitesse d'éjection du moteur.",flow:"Débit",spreading:"Étalement",howFastEachPuffOfIt:"La vitesse à laquelle chaque bouffée s'élargit : un jet étroit garde les bras d'une spirale séparés.",lifetime:"Durée"};export{e as launchParameterTexts_fr};
@@ -0,0 +1 @@
1
+ const e={engine:"Motore",launch:"Lancio",name:"Nome",vehicle:"Lanciatore",mission:"Missione",thrustVacuum:"Spinta (nel vuoto)",merlinVacuum934Rl10110A:"Merlin Vacuum 934, RL10 110, un booster solido diverse migliaia. Con l'impulso specifico, fissa la portata dello scarico.",specificImpulseVacuum:"Impulso specifico (nel vuoto)",times981MSIt:"Moltiplicato per 9,81 m/s² è la velocità di scarico, che fissa quanto in fretta lo scarico si allarga attorno allo stadio: 348 s sono 3,4 km/s.",propellant:"Propellenti",whatTheExhaustIsMadeOf:"Di cosa è fatto lo scarico decide quanta parte diventa particelle che diffondono la luce.",keroseneAndOxygen:"Cherosene e ossigeno",methaneAndOxygen:"Metano e ossigeno",hydrogenAndOxygen:"Idrogeno e ossigeno",hypergolic:"Ipergolico",solid:"Solido",engineStart:"Accensione del motore",whenTheEngineStartedInSeconds:"Quando si è acceso il motore, in secondi della registrazione; può essere prima. Vuoto: il primo punto del percorso.",engineCutOff:"Spegnimento del motore",whenTheEngineStoppedInSeconds:"Quando si è spento il motore, in secondi della registrazione. Vuoto: l'ultimo punto del percorso. Dopo non si rilascia nulla.",exhaustFlow:"Portata di scarico",howMuchExhaustLeavesTheEngine:"La massa di scarico che esce dal motore ogni secondo: la luminosità della scia. La spinta sulla velocità di scarico quando il motore è dato.",plume:"Scia",shareThatScatters:"Parte che diffonde",theShareOfTheExhaustThat:"La parte dello scarico che diventa particelle che diffondono la luce del Sole. Nessuno l'ha misurata per un lancio: l'unico numero da tarare su una fotografia.",particleRadius:"Raggio delle particelle",trailLifetime:"Durata della scia",howLongTheNarrowTrailLasts:"Quanto dura la scia stretta prima che le particelle siano sparite.",trailSpreading:"Espansione della scia",radiusAtRelease:"Raggio al rilascio",shareInTheCollar:"Parte nel collare",theCollarIsTheExhaustJust:"Il collare è lo scarico appena rilasciato, che si allarga in fretta in un guscio largo e breve attorno allo stadio; il resto resta dietro come scia stretta.",collar:"Collare",collarSpreading:"Espansione del collare",howFastTheCollarWidensThree:"Quanto in fretta il collare si allarga: tre quarti della velocità di scarico quando il motore è dato.",collarLifetime:"Durata del collare",placeOfThePath:"Punto del percorso",time:"Istante",secondsOfTheRecordingNegativeBefore:"Secondi della registrazione; negativi prima del suo inizio: uno stadio visto minuti dopo il lancio era già alto quando la registrazione è iniziata.",position:"Posizione",altitude:"Altitudine",jet:"Getto",what:"Cosa",engineBurn:"Accensione del motore",propellantVented:"Propellenti scaricati",from:"Da",secondsOfTheRecordingNegativeBefore2:"Secondi della registrazione; negativi prima del suo inizio.",until:"Fino a",directionFromAft:"Direzione da dietro",t0StraightBackAlongTheStage:"0 dritto all'indietro rispetto al moto dello stadio (un motore che lo spinge), 90 di lato, 180 dritto in avanti (un motore che lo frena).",side:"Lato",roundTheLineOfMotionWhich:"Attorno alla linea del moto, il lato da cui esce all'inizio: 0 opposto alla Terra, 90 a destra del moto.",spinPeriod:"Periodo di rotazione",howLongTheStageTakesTo:"Il tempo che lo stadio impiega a fare un giro attorno alla sua linea di moto; il getto gira con lui e i propellenti scaricati disegnano una spirale. Negativo: nell'altro verso. Vuoto: non gira.",speed:"Velocità",howFastItLeavesTheStage:"La velocità con cui lascia lo stadio. Un'accensione: la velocità di scarico del motore.",flow:"Portata",spreading:"Espansione",howFastEachPuffOfIt:"Quanto in fretta si allarga ogni sbuffo: un getto stretto tiene separati i bracci di una spirale.",lifetime:"Durata"};export{e as launchParameterTexts_it};
@@ -1 +1 @@
1
- import{L as M}from"./LaunchPlume-DONCQxUE.js";import{G as T,m as z,o as f,i as C,b6 as w,b7 as A}from"./rr0-sighting.mjs";class n{static RADIUS=840;static MAX_PUFFS=1e3;static RINGS=[0,.25,.5,.75,1,1.25];static COLUMN=n.RINGS.map(t=>{const i=o=>Math.exp(-((o/M.SIGMA_OF_RADIUS)**2)/2),s=i(n.RINGS[n.RINGS.length-1]);return Math.max(0,(i(t)-s)/(1-s))});static SECTORS=12;static VERTICES_PER_PUFF=n.SECTORS*(3+6*(n.RINGS.length-2));static BRIGHTEST_RELATIVE=6e4;object=new T;mesh;positions=new Float32Array(n.MAX_PUFFS*n.VERTICES_PER_PUFF*3);colors=new Float32Array(n.MAX_PUFFS*n.VERTICES_PER_PUFF*3);shown=0;drawn=[];static VISIBLE_CONTRAST=.1;constructor(){this.object.name="plumes";const t=new z;t.setAttribute("position",new f(this.positions,3)),t.setAttribute("color",new f(this.colors,3)),t.setDrawRange(0,0),this.mesh=new C(t,w.material()),this.mesh.frustumCulled=!1,w.track(this.mesh),this.object.add(this.mesh)}get count(){return this.shown}set(t,i,s,o){let h=0,c=0;this.drawn=[];for(const p of t){if(c>=n.MAX_PUFFS)break;const d=o(p.centre);if(d<=0)continue;const a=s(p.centre),r=[0,1,2].map(g=>Math.min(n.BRIGHTEST_RELATIVE,p.luminanceCdM2*(p.colour?.[g]??1)*i*p.sunTransmittance[g]*a[g]*d));Math.max(...r)<=0||(h=this.pushPuff(h,p,r),this.drawn.push({view:p,direction:this.normalise(A(p.centre.altitudeDeg,p.centre.azimuthDeg,1)),radiusRad:p.radiusDeg*Math.PI/180,luminance:.2126*r[0]+.7152*r[1]+.0722*r[2]}),c++)}this.shown=c;const u=this.mesh.geometry;u.setDrawRange(0,h),u.getAttribute("position").needsUpdate=!0,u.getAttribute("color").needsUpdate=!0}pushPuff(t,i,s){const o=A(i.centre.altitudeDeg,i.centre.azimuthDeg,n.RADIUS),h=this.normalise(o),c=this.normalise(this.cross({x:0,y:1,z:0},h)),u=this.cross(h,c),p=n.RADIUS*Math.tan(i.radiusDeg*Math.PI/180),d=(r,g)=>{const e=g/n.SECTORS*2*Math.PI,I=n.RINGS[r]*p,R=Math.cos(e)*I,l=Math.sin(e)*I;return{x:o.x+c.x*R+u.x*l,y:o.y+c.y*R+u.y*l,z:o.z+c.z*R+u.z*l}},a=r=>n.COLUMN[r];for(let r=0;r<n.SECTORS;r++){const g=(r+1)%n.SECTORS;t=this.push(t,o,s,a(0)),t=this.push(t,d(1,r),s,a(1)),t=this.push(t,d(1,g),s,a(1));for(let e=1;e<n.RINGS.length-1;e++){const I=d(e,r),R=d(e,g),l=d(e+1,r),E=d(e+1,g);t=this.push(t,I,s,a(e)),t=this.push(t,R,s,a(e)),t=this.push(t,l,s,a(e+1)),t=this.push(t,R,s,a(e)),t=this.push(t,E,s,a(e+1)),t=this.push(t,l,s,a(e+1))}}return t}pickAt(t,i,s=0){const o=this.normalise(t);let h=0,c;for(const u of this.drawn){const p=Math.max(-1,Math.min(1,o.x*u.direction.x+o.y*u.direction.y+o.z*u.direction.z)),d=Math.max(0,Math.acos(p)-i)/Math.max(u.radiusRad,1e-9),a=u.luminance*n.profile(d);a<=0||(h+=a,(!c||a>c.light)&&(c={view:u.view,light:a}))}return c&&h>=n.VISIBLE_CONTRAST*s?c.view:void 0}static profile(t){const i=n.RINGS;if(t>=i[i.length-1])return 0;let s=0;for(;t>i[s+1];)s++;const o=(t-i[s])/(i[s+1]-i[s]);return n.COLUMN[s]+(n.COLUMN[s+1]-n.COLUMN[s])*o}push(t,i,s,o){const h=t*3;return this.positions[h]=i.x,this.positions[h+1]=i.y,this.positions[h+2]=i.z,this.colors[h]=s[0]*o,this.colors[h+1]=s[1]*o,this.colors[h+2]=s[2]*o,t+1}cross(t,i){return this.normalise({x:t.y*i.z-t.z*i.y,y:t.z*i.x-t.x*i.z,z:t.x*i.y-t.y*i.x})}normalise(t){const i=Math.hypot(t.x,t.y,t.z)||1;return{x:t.x/i,y:t.y/i,z:t.z/i}}dispose(){this.mesh.geometry.dispose(),this.mesh.material.dispose(),this.object.removeFromParent()}}class b{inSky=!0;plumes=new n;get object(){return this.plumes.object}get drawnCount(){return this.plumes.count}update(t,i,s){const o=t.length===0||!s.date?[]:M.viewsAt(t,i,s.observer,M.sunDirectionAt(s.date));o.length===0&&this.plumes.count===0||this.plumes.set(o,s.relativeScale,h=>s.transmittanceFromSpace(h),h=>s.cloudTransmission(h))}pick(t,i,s){const o=this.plumes.pickAt(i,s.toleranceRad,s.skyLightTowards(i));return o&&{id:o.launchId,detail:o}}dispose(){this.plumes.dispose()}}export{b as LaunchSimulation};
1
+ import{L as M}from"./LaunchPlume-DONCQxUE.js";import{G as T,n as z,q as f,j as C,b6 as w,b7 as A}from"./rr0-sighting.mjs";class n{static RADIUS=840;static MAX_PUFFS=1e3;static RINGS=[0,.25,.5,.75,1,1.25];static COLUMN=n.RINGS.map(t=>{const i=o=>Math.exp(-((o/M.SIGMA_OF_RADIUS)**2)/2),s=i(n.RINGS[n.RINGS.length-1]);return Math.max(0,(i(t)-s)/(1-s))});static SECTORS=12;static VERTICES_PER_PUFF=n.SECTORS*(3+6*(n.RINGS.length-2));static BRIGHTEST_RELATIVE=6e4;object=new T;mesh;positions=new Float32Array(n.MAX_PUFFS*n.VERTICES_PER_PUFF*3);colors=new Float32Array(n.MAX_PUFFS*n.VERTICES_PER_PUFF*3);shown=0;drawn=[];static VISIBLE_CONTRAST=.1;constructor(){this.object.name="plumes";const t=new z;t.setAttribute("position",new f(this.positions,3)),t.setAttribute("color",new f(this.colors,3)),t.setDrawRange(0,0),this.mesh=new C(t,w.material()),this.mesh.frustumCulled=!1,w.track(this.mesh),this.object.add(this.mesh)}get count(){return this.shown}set(t,i,s,o){let h=0,c=0;this.drawn=[];for(const p of t){if(c>=n.MAX_PUFFS)break;const d=o(p.centre);if(d<=0)continue;const a=s(p.centre),r=[0,1,2].map(g=>Math.min(n.BRIGHTEST_RELATIVE,p.luminanceCdM2*(p.colour?.[g]??1)*i*p.sunTransmittance[g]*a[g]*d));Math.max(...r)<=0||(h=this.pushPuff(h,p,r),this.drawn.push({view:p,direction:this.normalise(A(p.centre.altitudeDeg,p.centre.azimuthDeg,1)),radiusRad:p.radiusDeg*Math.PI/180,luminance:.2126*r[0]+.7152*r[1]+.0722*r[2]}),c++)}this.shown=c;const u=this.mesh.geometry;u.setDrawRange(0,h),u.getAttribute("position").needsUpdate=!0,u.getAttribute("color").needsUpdate=!0}pushPuff(t,i,s){const o=A(i.centre.altitudeDeg,i.centre.azimuthDeg,n.RADIUS),h=this.normalise(o),c=this.normalise(this.cross({x:0,y:1,z:0},h)),u=this.cross(h,c),p=n.RADIUS*Math.tan(i.radiusDeg*Math.PI/180),d=(r,g)=>{const e=g/n.SECTORS*2*Math.PI,I=n.RINGS[r]*p,R=Math.cos(e)*I,l=Math.sin(e)*I;return{x:o.x+c.x*R+u.x*l,y:o.y+c.y*R+u.y*l,z:o.z+c.z*R+u.z*l}},a=r=>n.COLUMN[r];for(let r=0;r<n.SECTORS;r++){const g=(r+1)%n.SECTORS;t=this.push(t,o,s,a(0)),t=this.push(t,d(1,r),s,a(1)),t=this.push(t,d(1,g),s,a(1));for(let e=1;e<n.RINGS.length-1;e++){const I=d(e,r),R=d(e,g),l=d(e+1,r),E=d(e+1,g);t=this.push(t,I,s,a(e)),t=this.push(t,R,s,a(e)),t=this.push(t,l,s,a(e+1)),t=this.push(t,R,s,a(e)),t=this.push(t,E,s,a(e+1)),t=this.push(t,l,s,a(e+1))}}return t}pickAt(t,i,s=0){const o=this.normalise(t);let h=0,c;for(const u of this.drawn){const p=Math.max(-1,Math.min(1,o.x*u.direction.x+o.y*u.direction.y+o.z*u.direction.z)),d=Math.max(0,Math.acos(p)-i)/Math.max(u.radiusRad,1e-9),a=u.luminance*n.profile(d);a<=0||(h+=a,(!c||a>c.light)&&(c={view:u.view,light:a}))}return c&&h>=n.VISIBLE_CONTRAST*s?c.view:void 0}static profile(t){const i=n.RINGS;if(t>=i[i.length-1])return 0;let s=0;for(;t>i[s+1];)s++;const o=(t-i[s])/(i[s+1]-i[s]);return n.COLUMN[s]+(n.COLUMN[s+1]-n.COLUMN[s])*o}push(t,i,s,o){const h=t*3;return this.positions[h]=i.x,this.positions[h+1]=i.y,this.positions[h+2]=i.z,this.colors[h]=s[0]*o,this.colors[h+1]=s[1]*o,this.colors[h+2]=s[2]*o,t+1}cross(t,i){return this.normalise({x:t.y*i.z-t.z*i.y,y:t.z*i.x-t.x*i.z,z:t.x*i.y-t.y*i.x})}normalise(t){const i=Math.hypot(t.x,t.y,t.z)||1;return{x:t.x/i,y:t.y/i,z:t.z/i}}dispose(){this.mesh.geometry.dispose(),this.mesh.material.dispose(),this.object.removeFromParent()}}class b{inSky=!0;plumes=new n;get object(){return this.plumes.object}get drawnCount(){return this.plumes.count}update(t,i,s){const o=t.length===0||!s.date?[]:M.viewsAt(t,i,s.observer,M.sunDirectionAt(s.date));o.length===0&&this.plumes.count===0||this.plumes.set(o,s.relativeScale,h=>s.transmittanceFromSpace(h),h=>s.cloudTransmission(h))}pick(t,i,s){const o=this.plumes.pickAt(i,s.toleranceRad,s.skyLightTowards(i));return o&&{id:o.launchId,detail:o}}dispose(){this.plumes.dispose()}}export{b as LaunchSimulation};
@@ -1,3 +1,3 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./ModuleThree-YgLqKZM9.js","./rr0-sighting.mjs"])))=>i.map(i=>d[i]);
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./ModuleThree-ColxHy_y.js","./rr0-sighting.mjs"])))=>i.map(i=>d[i]);
2
2
  import{f as g,b as w,_ as b,M as p}from"./rr0-sighting.mjs";class n{static STORAGE_KEY="ufoathome.modules";static FORMAT=1;static empty(){return{format:1,modules:[]}}static read(t=n.storage()){try{const e=t?.getItem(n.STORAGE_KEY);return e?n.parse(e):n.empty()}catch{return n.empty()}}static write(t,e=n.storage()){try{return e?(t.modules.length===0?e.removeItem(n.STORAGE_KEY):e.setItem(n.STORAGE_KEY,n.text(t)),!0):!1}catch{return!1}}static parse(t){const e=JSON.parse(t);if(e===null||typeof e!="object"||!Array.isArray(e.modules))throw new Error("not a UFO@home module list");if(typeof e.format=="number"&&e.format>n.FORMAT)throw new Error(`format ${e.format} is newer than ${n.FORMAT}`);const r=new Set,s=[];for(const i of e.modules)typeof i?.url!="string"||r.has(i.url)||(r.add(i.url),s.push({url:i.url,enabled:i.enabled!==!1}));return{format:1,modules:s}}static text(t){return JSON.stringify({format:n.FORMAT,modules:t.modules},null,2)+`
3
- `}static storage(){try{return typeof localStorage>"u"?void 0:localStorage}catch{return}}}class E{constructor(t,e){this.attribution=t,this.models=e}async entries(t){return t?this.models.filter(e=>[e.kind].flat().includes(t)):[...this.models]}async entry(t){return this.models.find(e=>e.id===t)}}class f{attribution;fetchImpl;tileUrlTemplate;constructor(t){this.attribution=t.attribution,this.tileUrlTemplate=t.tileUrlTemplate,this.fetchImpl=t.fetchImpl??fetch.bind(globalThis)}getImageryTexture(t,e){return g(t,e,r=>f.tileUrl(this.tileUrlTemplate,r),this.fetchImpl)}static tileUrl(t,e){return t.replaceAll("{z}",String(e.z)).replaceAll("{x}",String(e.x)).replaceAll("{y}",String(e.y))}}class v extends Error{constructor(t,e){super(`${t}: ${e}`),this.url=t,this.reason=e,this.name="ModuleManifestError"}}class d{static FORMAT=1;static check(t,e){const r=o=>{throw new v(e,o)};(t===null||typeof t!="object"||Array.isArray(t))&&r("not a JSON object");const s=t;typeof s.format!="number"&&r('no "format"'),s.format>d.FORMAT&&r(`format ${s.format} is newer than ${d.FORMAT}, which this version reads`),(typeof s.id!="string"||!/^[a-z0-9][a-z0-9._-]*$/.test(s.id))&&r(`"id" must be lowercase letters, digits, '.', '_' or '-'`),(typeof s.name!="string"||s.name.trim()==="")&&r('no "name"'),s.script!==void 0&&typeof s.script!="string"&&r('"script" must be an address');const i=s.contributes??{};for(const o of["imagery","elevation"]){const c=i[o];c!==void 0&&(Array.isArray(c)||r(`"contributes.${o}" must be a list`),c.forEach((l,h)=>{for(const m of["id","name","credit","creditUrl","tiles"])(typeof l?.[m]!="string"||l[m]==="")&&r(`"contributes.${o}[${h}].${m}" is missing`);["{z}","{x}","{y}"].every(m=>l.tiles.includes(m))||r(`"contributes.${o}[${h}].tiles" must hold {z}, {x} and {y}`)}))}const a=i.models;return a!==void 0&&(Array.isArray(a)||r('"contributes.models" must be a list'),a.forEach((o,c)=>{for(const l of["id","name","file"])(typeof o?.[l]!="string"||o[l]==="")&&r(`"contributes.models[${c}].${l}" is missing`);o.kind===void 0&&r(`"contributes.models[${c}].kind" is missing`),(!o.credit||typeof o.credit!="object")&&r(`"contributes.models[${c}].credit" is missing: a model is shown with its author and licence`)})),s}static contributions(t,e){const r=t.contributes??{},s={};if(r.imagery?.length&&(s.imagery=r.imagery.map(i=>({id:i.id,name:i.name,credit:i.credit,creditUrl:i.creditUrl,create:a=>new f({tileUrlTemplate:d.absoluteTemplate(i.tiles,e),attribution:i.credit,fetchImpl:a})}))),r.elevation?.length&&(s.elevation=r.elevation.map(i=>({id:i.id,name:i.name,credit:i.credit,creditUrl:i.creditUrl,create:a=>new w({tileUrlTemplate:d.absoluteTemplate(i.tiles,e),fetchImpl:a})}))),r.models?.length){const i=r.models.map(({file:o,...c})=>({...c,url:new URL(o,e).href})),a=t.credit??t.name;s.decorModels=[{id:`${t.id}-models`,name:t.name,credit:a,creditUrl:t.creditUrl??e,create:()=>new E(a,i)}]}return s}static module(t,e,r={}){const s=d.contributions(t,e);for(const[i,a]of Object.entries(r))Array.isArray(a)&&(s[i]=[...s[i]??[],...a]);return{id:t.id,name:t.name,credit:t.credit,creditUrl:t.creditUrl,url:e,contributes:s}}static absoluteTemplate(t,e){const r=t.replaceAll("{z}","__Z__").replaceAll("{x}","__X__").replaceAll("{y}","__Y__");return new URL(r,e).href.replaceAll("__Z__","{z}").replaceAll("__X__","{x}").replaceAll("__Y__","{y}")}}class T{fetchImpl;importImpl;constructor(t={}){this.fetchImpl=t.fetchImpl??fetch.bind(globalThis),this.importImpl=t.importImpl??(e=>import(e))}async load(t,e){const r=await this.fetchImpl(t);if(!r.ok)throw new Error(`${t}: HTTP ${r.status}`);const s=d.check(await r.json(),t),i=s.script!==void 0;let a={};if(i&&e.runScript){const o=new URL(s.script,t).href,c=await this.importImpl(o);if(typeof c.default!="function")throw new Error(`${o}: its default export is not a function`);const{MODULE_THREE:l}=await b(async()=>{const{MODULE_THREE:h}=await import("./ModuleThree-YgLqKZM9.js");return{MODULE_THREE:h}},__vite__mapDeps([0,1]),import.meta.url);a=await c.default({manifestUrl:t,three:l})??{}}return{url:t,manifest:s,module:d.module(s,t,a),hasScript:i,scriptRun:i&&e.runScript}}}class y{constructor(t=new T,e){this.loader=t,this.storage=e}static shared=new y;changes=new EventTarget;states=new Map;config=n.empty();started;list(){const t=[...this.states.values()];return[...t.filter(e=>e.addedByPerson),...t.filter(e=>!e.addedByPerson)]}state(t){return this.states.get(t)}start(){return this.started??=this.applyConfig(n.read(this.storage)),this.started}async add(t){await this.start();const e=new URL(t,typeof location>"u"?void 0:location.href).href;return this.config.modules.some(r=>r.url===e)||(this.config={...this.config,modules:[...this.config.modules,{url:e,enabled:!0}]},this.save()),this.reload(e)}async remove(t){this.config={...this.config,modules:this.config.modules.filter(e=>e.url!==t)},this.save(),await this.reload(t)}async setEnabled(t,e){this.config={...this.config,modules:this.config.modules.map(r=>r.url===t?{...r,enabled:e}:r)},this.save(),await this.reload(t)}exportText(){return n.text(this.config)}async importText(t){const e=n.parse(t);await this.start();const r=this.config.modules.map(s=>s.url);this.config=e,this.save(),await Promise.all([...new Set([...r,...e.modules.map(s=>s.url)])].map(s=>this.reload(s)))}async require(t,e){t?.length&&(await this.start(),await Promise.all(t.map(async r=>{let s;try{s=new URL(r,e??(typeof location>"u"?void 0:location.href)).href}catch{return}const i=this.states.get(s);if(i&&i.status!=="off")return i.status==="loading"?this.pending.get(s):void 0;this.named.add(s),await this.reload(s)})))}named=new Set;pending=new Map;async applyConfig(t){this.config=t,await Promise.all(t.modules.map(e=>this.reload(e.url)))}reload(t){const e=this.reloadNow(t);return this.pending.set(t,e),e}async reloadNow(t){const e=this.config.modules.find(a=>a.url===t),r=this.states.get(t);r?.loaded&&p.uninstall(r.loaded.module.id);const s=e!==void 0,i=e?.enabled??!0;if(!s&&!this.named.has(t))return this.states.delete(t),this.announce(),{url:t,addedByPerson:s,enabled:i,status:"off"};if(s&&!i&&!this.named.has(t))return this.set({url:t,addedByPerson:s,enabled:i,status:"off"});this.set({url:t,addedByPerson:s,enabled:i,status:"loading"});try{const a=await this.loader.load(t,{runScript:s&&i});return p.install(a.module),this.set({url:t,addedByPerson:s,enabled:i,status:"installed",loaded:a})}catch(a){return this.set({url:t,addedByPerson:s,enabled:i,status:"failed",error:a instanceof Error?a.message:String(a)})}}set(t){return this.states.set(t.url,t),this.announce(),t}save(){n.write(this.config,this.storage)}announce(){this.changes.dispatchEvent(new Event("change"))}}export{y as ModuleSession};
3
+ `}static storage(){try{return typeof localStorage>"u"?void 0:localStorage}catch{return}}}class E{constructor(t,e){this.attribution=t,this.models=e}async entries(t){return t?this.models.filter(e=>[e.kind].flat().includes(t)):[...this.models]}async entry(t){return this.models.find(e=>e.id===t)}}class f{attribution;fetchImpl;tileUrlTemplate;constructor(t){this.attribution=t.attribution,this.tileUrlTemplate=t.tileUrlTemplate,this.fetchImpl=t.fetchImpl??fetch.bind(globalThis)}getImageryTexture(t,e){return g(t,e,r=>f.tileUrl(this.tileUrlTemplate,r),this.fetchImpl)}static tileUrl(t,e){return t.replaceAll("{z}",String(e.z)).replaceAll("{x}",String(e.x)).replaceAll("{y}",String(e.y))}}class v extends Error{constructor(t,e){super(`${t}: ${e}`),this.url=t,this.reason=e,this.name="ModuleManifestError"}}class d{static FORMAT=1;static check(t,e){const r=o=>{throw new v(e,o)};(t===null||typeof t!="object"||Array.isArray(t))&&r("not a JSON object");const s=t;typeof s.format!="number"&&r('no "format"'),s.format>d.FORMAT&&r(`format ${s.format} is newer than ${d.FORMAT}, which this version reads`),(typeof s.id!="string"||!/^[a-z0-9][a-z0-9._-]*$/.test(s.id))&&r(`"id" must be lowercase letters, digits, '.', '_' or '-'`),(typeof s.name!="string"||s.name.trim()==="")&&r('no "name"'),s.script!==void 0&&typeof s.script!="string"&&r('"script" must be an address');const i=s.contributes??{};for(const o of["imagery","elevation"]){const c=i[o];c!==void 0&&(Array.isArray(c)||r(`"contributes.${o}" must be a list`),c.forEach((l,h)=>{for(const m of["id","name","credit","creditUrl","tiles"])(typeof l?.[m]!="string"||l[m]==="")&&r(`"contributes.${o}[${h}].${m}" is missing`);["{z}","{x}","{y}"].every(m=>l.tiles.includes(m))||r(`"contributes.${o}[${h}].tiles" must hold {z}, {x} and {y}`)}))}const a=i.models;return a!==void 0&&(Array.isArray(a)||r('"contributes.models" must be a list'),a.forEach((o,c)=>{for(const l of["id","name","file"])(typeof o?.[l]!="string"||o[l]==="")&&r(`"contributes.models[${c}].${l}" is missing`);o.kind===void 0&&r(`"contributes.models[${c}].kind" is missing`),(!o.credit||typeof o.credit!="object")&&r(`"contributes.models[${c}].credit" is missing: a model is shown with its author and licence`)})),s}static contributions(t,e){const r=t.contributes??{},s={};if(r.imagery?.length&&(s.imagery=r.imagery.map(i=>({id:i.id,name:i.name,credit:i.credit,creditUrl:i.creditUrl,create:a=>new f({tileUrlTemplate:d.absoluteTemplate(i.tiles,e),attribution:i.credit,fetchImpl:a})}))),r.elevation?.length&&(s.elevation=r.elevation.map(i=>({id:i.id,name:i.name,credit:i.credit,creditUrl:i.creditUrl,create:a=>new w({tileUrlTemplate:d.absoluteTemplate(i.tiles,e),fetchImpl:a})}))),r.models?.length){const i=r.models.map(({file:o,...c})=>({...c,url:new URL(o,e).href})),a=t.credit??t.name;s.decorModels=[{id:`${t.id}-models`,name:t.name,credit:a,creditUrl:t.creditUrl??e,create:()=>new E(a,i)}]}return s}static module(t,e,r={}){const s=d.contributions(t,e);for(const[i,a]of Object.entries(r))Array.isArray(a)&&(s[i]=[...s[i]??[],...a]);return{id:t.id,name:t.name,credit:t.credit,creditUrl:t.creditUrl,url:e,contributes:s}}static absoluteTemplate(t,e){const r=t.replaceAll("{z}","__Z__").replaceAll("{x}","__X__").replaceAll("{y}","__Y__");return new URL(r,e).href.replaceAll("__Z__","{z}").replaceAll("__X__","{x}").replaceAll("__Y__","{y}")}}class T{fetchImpl;importImpl;constructor(t={}){this.fetchImpl=t.fetchImpl??fetch.bind(globalThis),this.importImpl=t.importImpl??(e=>import(e))}async load(t,e){const r=await this.fetchImpl(t);if(!r.ok)throw new Error(`${t}: HTTP ${r.status}`);const s=d.check(await r.json(),t),i=s.script!==void 0;let a={};if(i&&e.runScript){const o=new URL(s.script,t).href,c=await this.importImpl(o);if(typeof c.default!="function")throw new Error(`${o}: its default export is not a function`);const{MODULE_THREE:l}=await b(async()=>{const{MODULE_THREE:h}=await import("./ModuleThree-ColxHy_y.js");return{MODULE_THREE:h}},__vite__mapDeps([0,1]),import.meta.url);a=await c.default({manifestUrl:t,three:l})??{}}return{url:t,manifest:s,module:d.module(s,t,a),hasScript:i,scriptRun:i&&e.runScript}}}class y{constructor(t=new T,e){this.loader=t,this.storage=e}static shared=new y;changes=new EventTarget;states=new Map;config=n.empty();started;list(){const t=[...this.states.values()];return[...t.filter(e=>e.addedByPerson),...t.filter(e=>!e.addedByPerson)]}state(t){return this.states.get(t)}start(){return this.started??=this.applyConfig(n.read(this.storage)),this.started}async add(t){await this.start();const e=new URL(t,typeof location>"u"?void 0:location.href).href;return this.config.modules.some(r=>r.url===e)||(this.config={...this.config,modules:[...this.config.modules,{url:e,enabled:!0}]},this.save()),this.reload(e)}async remove(t){this.config={...this.config,modules:this.config.modules.filter(e=>e.url!==t)},this.save(),await this.reload(t)}async setEnabled(t,e){this.config={...this.config,modules:this.config.modules.map(r=>r.url===t?{...r,enabled:e}:r)},this.save(),await this.reload(t)}exportText(){return n.text(this.config)}async importText(t){const e=n.parse(t);await this.start();const r=this.config.modules.map(s=>s.url);this.config=e,this.save(),await Promise.all([...new Set([...r,...e.modules.map(s=>s.url)])].map(s=>this.reload(s)))}async require(t,e){t?.length&&(await this.start(),await Promise.all(t.map(async r=>{let s;try{s=new URL(r,e??(typeof location>"u"?void 0:location.href)).href}catch{return}const i=this.states.get(s);if(i&&i.status!=="off")return i.status==="loading"?this.pending.get(s):void 0;this.named.add(s),await this.reload(s)})))}named=new Set;pending=new Map;async applyConfig(t){this.config=t,await Promise.all(t.modules.map(e=>this.reload(e.url)))}reload(t){const e=this.reloadNow(t);return this.pending.set(t,e),e}async reloadNow(t){const e=this.config.modules.find(a=>a.url===t),r=this.states.get(t);r?.loaded&&p.uninstall(r.loaded.module.id);const s=e!==void 0,i=e?.enabled??!0;if(!s&&!this.named.has(t))return this.states.delete(t),this.announce(),{url:t,addedByPerson:s,enabled:i,status:"off"};if(s&&!i&&!this.named.has(t))return this.set({url:t,addedByPerson:s,enabled:i,status:"off"});this.set({url:t,addedByPerson:s,enabled:i,status:"loading"});try{const a=await this.loader.load(t,{runScript:s&&i});return p.install(a.module),this.set({url:t,addedByPerson:s,enabled:i,status:"installed",loaded:a})}catch(a){return this.set({url:t,addedByPerson:s,enabled:i,status:"failed",error:a instanceof Error?a.message:String(a)})}}set(t){return this.states.set(t.url,t),this.announce(),t}save(){n.write(this.config,this.storage)}announce(){this.changes.dispatchEvent(new Event("change"))}}export{y as ModuleSession};
@@ -0,0 +1 @@
1
+ import{y as a,k as e,bh as s,Y as t,$ as r,a9 as i,z as o,ax as n,Q as l,X as b,au as u,aa as m,ab as d,bi as M,o as y,a0 as B,j as G,N as S,aO as c,aL as f,aP as h,G as p,b1 as x,F as L,bj as C,a1 as P,bk as g,bl as D,bm as E,C as T,Z as j,n as k,q as A,bn as F,a8 as O,a4 as v}from"./rr0-sighting.mjs";const Q={AdditiveBlending:v,BackSide:O,BoxGeometry:F,BufferAttribute:A,BufferGeometry:k,CanvasTexture:j,Color:T,ConeGeometry:E,CylinderGeometry:D,DataTexture:g,DoubleSide:P,Euler:C,Float32BufferAttribute:L,FrontSide:x,Group:p,Line:h,LineBasicMaterial:f,LineSegments:c,Matrix4:S,Mesh:G,MeshBasicMaterial:B,MeshStandardMaterial:y,NormalBlending:M,Object3D:d,PlaneGeometry:m,PointLight:u,Points:b,PointsMaterial:l,Quaternion:n,ShaderMaterial:o,SphereGeometry:i,Sprite:r,SpriteMaterial:t,TorusGeometry:s,Vector2:e,Vector3:a};export{Q as MODULE_THREE};
@@ -1 +1 @@
1
- import{S as y,B as h}from"./rr0-sighting.mjs";class c{static FLAT={heightAt:()=>0};static of(e){const s=e.timeline.sourceIds.map(n=>y.of(e,n)?.nearestM).filter(n=>n!==void 0);return s.length>0?{m:Math.min(...s),basis:"derived",paths:["timeline","observerTrack"]}:c.interpreted(e)}static interpreted(e){const s=(e.interpretation?.bodies??[]).map((t,i)=>({body:t,index:i})).filter(({body:t})=>Array.isArray(t.track)),n=s.filter(({body:t})=>(t.explains?.length??0)>0),u=n.length>0?n:s,d=c.FLAT,l=t=>h.eyeOf(e,t,d);let o;const p=[];for(const{body:t,index:i}of u){const M=new h(t,d,l);for(const{t:f}of t.track){const r=M.at(f),a=l(f);if(!r||!a)continue;const m=Math.hypot(r.eastM-a.eastM,r.northM-a.northM,r.upM-a.upM);(o===void 0||m<o)&&(o=m)}p.push(`interpretation.bodies.${i}`)}return o===void 0?void 0:{m:o,basis:"assumed",paths:p}}}export{c as N};
1
+ import{e as y,B as h}from"./rr0-sighting.mjs";class c{static FLAT={heightAt:()=>0};static of(e){const s=e.timeline.sourceIds.map(n=>y.of(e,n)?.nearestM).filter(n=>n!==void 0);return s.length>0?{m:Math.min(...s),basis:"derived",paths:["timeline","observerTrack"]}:c.interpreted(e)}static interpreted(e){const s=(e.interpretation?.bodies??[]).map((t,i)=>({body:t,index:i})).filter(({body:t})=>Array.isArray(t.track)),n=s.filter(({body:t})=>(t.explains?.length??0)>0),u=n.length>0?n:s,d=c.FLAT,l=t=>h.eyeOf(e,t,d);let o;const p=[];for(const{body:t,index:i}of u){const M=new h(t,d,l);for(const{t:f}of t.track){const r=M.at(f),a=l(f);if(!r||!a)continue;const m=Math.hypot(r.eastM-a.eastM,r.northM-a.northM,r.upM-a.upM);(o===void 0||m<o)&&(o=m)}p.push(`interpretation.bodies.${i}`)}return o===void 0?void 0:{m:o,basis:"assumed",paths:p}}}export{c as N};
@@ -1,4 +1,4 @@
1
- import{ak as p,d as D,al as f}from"./rr0-sighting.mjs";class Y{static attach(t,e,i){t.classList.add(e);const n=`${e}-style`;if(t.parentElement?.querySelector(`:scope > style.${n}`))return;const s=t.ownerDocument.createElement("style");s.className=n,s.textContent=i,t.before(s)}}class V{constructor(t,e,i,n){this.button=t,this.onPick=i,this.idOf=n;const s=this.panel=t.ownerDocument.createElement("div");s.id=e,s.className="add-menu",s.setAttribute("popover",""),s.setAttribute("role","menu");const o=`--add-menu-${e}`;t.style.setProperty("anchor-name",o),s.style.setProperty("position-anchor",o),t.setAttribute("popovertarget",e),t.setAttribute("aria-haspopup","menu"),t.after(s)}static CSS=`
1
+ import{al as p,S as D,am as f}from"./rr0-sighting.mjs";class Y{static attach(t,e,i){t.classList.add(e);const n=`${e}-style`;if(t.parentElement?.querySelector(`:scope > style.${n}`))return;const s=t.ownerDocument.createElement("style");s.className=n,s.textContent=i,t.before(s)}}class V{constructor(t,e,i,n){this.button=t,this.onPick=i,this.idOf=n;const s=this.panel=t.ownerDocument.createElement("div");s.id=e,s.className="add-menu",s.setAttribute("popover",""),s.setAttribute("role","menu");const o=`--add-menu-${e}`;t.style.setProperty("anchor-name",o),s.style.setProperty("position-anchor",o),t.setAttribute("popovertarget",e),t.setAttribute("aria-haspopup","menu"),t.after(s)}static CSS=`
2
2
  .add-menu { padding: .3em 0; border: 1px solid color-mix(in srgb, CanvasText 30%, transparent); border-radius: 4px; background: Canvas; color: CanvasText;
3
3
  box-shadow: 0 2px 8px rgba(0, 0, 0, .25); max-height: 60vh; overflow-y: auto; font-size: .9em; }
4
4
  @supports (position-area: bottom span-left) {
@@ -0,0 +1 @@
1
+ const o={"color-vision":"Colour vision","color-vision.hint":"How colours look to someone whose cones differ, from Machado et al. 2009. Only recolours: it does not change brightness or what the eye can resolve.","color-vision.type":"Type","color-vision.type.normal":"Typical","color-vision.type.protan":"Protan (red-weak or red-blind)","color-vision.type.deutan":"Deutan (green-weak or green-blind)","color-vision.type.tritan":"Tritan (blue-weak or blue-blind)","color-vision.severity":"Severity",intoxication:"Alcohol","intoxication.hint":"Lowers contrast sensitivity by about 0.9 dB at 0.08 % blood alcohol (one controlled study, results vary), drawn up to 0.1 % at most: a higher level is recorded but shown as 0.1 %, since nothing was measured past it. Double vision, narrowed field and other drugs are not modelled: no source quantifies them.","intoxication.bloodAlcohol":"Blood alcohol",fatigue:"Fatigue","fatigue.hint":"Stated only: sleep loss has not been shown to change what a healthy eye receives, so the picture is unchanged. It bears on attention and memory, not on vision.","fatigue.hoursAwake":"Awake for"};export{o as perceptionMessages_en};
@@ -0,0 +1 @@
1
+ const o={"color-vision":"Visión del color","color-vision.hint":"Cómo se ven los colores con conos distintos (Machado et al. 2009). Solo recolorea: brillo y resolución no cambian.","color-vision.type":"Tipo","color-vision.type.normal":"Típica","color-vision.type.protan":"Protán (rojo débil o ciego)","color-vision.type.deutan":"Deután (verde débil o ciego)","color-vision.type.tritan":"Tritán (azul débil o ciego)","color-vision.severity":"Gravedad",intoxication:"Alcohol","intoxication.hint":"Reduce la sensibilidad al contraste unos 0,9 dB con 0,08 % de alcohol en sangre (un estudio controlado; los resultados varían), mostrado hasta 0,1 % como máximo: un nivel mayor se registra pero se muestra como 0,1 %, ya que nada se midió por encima. La visión doble, el campo reducido y otras drogas no se modelan: ninguna fuente los cuantifica.","intoxication.bloodAlcohol":"Alcoholemia",fatigue:"Fatiga","fatigue.hint":"Solo declarada: no se ha demostrado que la falta de sueño cambie lo que recibe un ojo sano, así que la imagen no cambia. Afecta a la atención y la memoria, no a la vista.","fatigue.hoursAwake":"Despierto desde hace"};export{o as perceptionMessages_es};
@@ -0,0 +1 @@
1
+ const e={"color-vision":"Vision des couleurs","color-vision.hint":"Comment les couleurs apparaissent à qui a des cônes différents (Machado et al. 2009). Ne fait que recolorer : luminosité et résolution inchangées.","color-vision.type":"Type","color-vision.type.normal":"Typique","color-vision.type.protan":"Protan (rouge faible ou aveugle)","color-vision.type.deutan":"Deutan (vert faible ou aveugle)","color-vision.type.tritan":"Tritan (bleu faible ou aveugle)","color-vision.severity":"Sévérité",intoxication:"Alcool","intoxication.hint":"Abaisse la sensibilité au contraste d'environ 0,9 dB à 0,08 % d'alcool dans le sang (une étude contrôlée ; les résultats varient), montré jusqu'à 0,1 % au plus : un taux supérieur est consigné mais montré comme 0,1 %, rien n'ayant été mesuré au-delà. Vision double, champ rétréci et autres drogues ne sont pas modélisés : aucune source ne les chiffre.","intoxication.bloodAlcohol":"Alcoolémie",fatigue:"Fatigue","fatigue.hint":"Énoncée seulement : le manque de sommeil n'a pas été montré comme changeant ce que reçoit un œil sain, l'image est donc inchangée. Il touche l'attention et la mémoire, pas la vue.","fatigue.hoursAwake":"Éveillé depuis"};export{e as perceptionMessages_fr};
@@ -0,0 +1 @@
1
+ const o={"color-vision":"Visione dei colori","color-vision.hint":"Come appaiono i colori a chi ha coni diversi (Machado et al. 2009). Ricolora soltanto: luminosità e risoluzione restano uguali.","color-vision.type":"Tipo","color-vision.type.normal":"Tipica","color-vision.type.protan":"Protan (rosso debole o cieco)","color-vision.type.deutan":"Deutan (verde debole o cieco)","color-vision.type.tritan":"Tritan (blu debole o cieco)","color-vision.severity":"Gravità",intoxication:"Alcol","intoxication.hint":"Riduce la sensibilità al contrasto di circa 0,9 dB a 0,08 % di alcol nel sangue (uno studio controllato; i risultati variano), mostrato fino a 0,1 % al massimo: un livello più alto viene registrato ma mostrato come 0,1 %, poiché oltre non è stato misurato nulla. Visione doppia, campo ristretto e altre droghe non sono modellati: nessuna fonte li quantifica.","intoxication.bloodAlcohol":"Alcolemia",fatigue:"Stanchezza","fatigue.hint":"Solo dichiarata: non è dimostrato che la mancanza di sonno cambi ciò che riceve un occhio sano, quindi l'immagine non cambia. Riguarda attenzione e memoria, non la vista.","fatigue.hoursAwake":"Sveglio da"};export{o as perceptionMessages_it};
@@ -1 +1 @@
1
- import{e as u}from"./rr0-sighting.mjs";class o{about="shape";static STEP_DEG=2;static TURN_DEG=60;static ERRATIC_TURNS=3;static OSCILLATIONS=["vibrate","spiral","roll"];async assess(n){const t=this.trajectory(n),s=this.vanish(n),e=this.oscillation(n),a=this.landing(n),c=this.judged(n,"traces"),r=this.occupants(n),h=a.shown&&r.shown?5:a.shown&&c.shown?4:a.shown||t.value==="erratic"||s.shown||e.shown?3:t.value==="abnormal"?2:t.value==="straight"?1:0,i=[{id:"poher-trajectory",basis:t.basis,paths:t.paths,value:o.TRAJECTORIES.indexOf(t.value)},this.criterion("poher-vanish",s),this.criterion("poher-oscillation",e),{...this.criterion("poher-landing",a),unsupported:a.basis===void 0},this.criterion("poher-traces",c),this.criterion("poher-occupants",r)];return{verdict:String(h),criteria:i}}static TRAJECTORIES=["unknown","still","straight","abnormal","erratic"];criterion(n,t){return{id:n,value:t.shown?1:0,basis:t.basis,paths:t.basis===void 0?[]:t.paths}}trajectory(n){let t="unknown";for(const s of n.timeline.sourceIds){const e=this.seen(n,s).filter(i=>i.aim!==void 0).map(i=>i.aim);if(e.length<2)continue;const a=[o.unit(e[0])];for(const i of e.slice(1)){const l=o.unit(i);o.angleDeg(a[a.length-1],l)>=o.STEP_DEG&&a.push(l)}const c=a.length-1;let r=0;for(let i=1;i<a.length-1;i++){const l=o.cross(a[i-1],a[i]),d=o.cross(a[i],a[i+1]);o.angleDeg(l,d)>=o.TURN_DEG&&r++}const h=c===0?"still":r>=o.ERRATIC_TURNS?"erratic":r>0?"abnormal":"straight";o.TRAJECTORIES.indexOf(h)>o.TRAJECTORIES.indexOf(t)&&(t=h)}return t==="unknown"?{value:t,paths:[]}:{value:t,basis:"derived",paths:["timeline"]}}vanish(n){const t=(n.events??[]).findIndex(s=>s.eventType==="vanish"&&u.isPhenomenon(n,s));return t>=0?{shown:!0,basis:"stated",paths:[`events.${t}`]}:{shown:!1,paths:[]}}oscillation(n){const t=new Set((n.interpretation?.bodies??[]).map(e=>e.id)),s=(n.events??[]).findIndex(e=>o.OSCILLATIONS.includes(e.eventType)&&(u.isPhenomenon(n,e)||t.has(e.who?.split("/")[0]??"")));return s>=0?{shown:!0,basis:"stated",paths:[`events.${s}`]}:{shown:!1,paths:[]}}landing(n){const t=e=>!e.onGround&&((e.altitudeAboveGroundM??0)>0||(e.altitudeM??0)>0),s=(n.interpretation?.bodies??[]).findIndex(e=>Array.isArray(e.track)&&e.track.some(a=>a.onGround)&&e.track.some(t));return s>=0?{shown:!0,basis:"assumed",paths:[`interpretation.bodies.${s}`]}:{shown:!1,paths:[]}}occupants(n){const t=n.decor.findIndex(s=>s.kind==="entity");return t>=0?{shown:!0,basis:"stated",paths:[`decor.${t}`]}:this.judged(n,"beings")}judged(n,t){const s=n.account?.strangeness?.[t];return s===void 0?{shown:!1,paths:[]}:{shown:s,basis:"stated",paths:[`account.strangeness.${t}`]}}instants(n,t){return n.timeline.allKeyframes.map(s=>({t:s.t,shape:s.shapes.find(e=>e.sourceId===t)?.shape})).filter(({shape:s})=>s!==void 0).map(({t:s,shape:e})=>({t:s,aim:e.aim,visible:e.transparency<1})).sort((s,e)=>s.t-e.t)}seen(n,t){return this.instants(n,t).filter(s=>s.visible)}static unit(n){const[t,s]=[n.azimuthDeg*Math.PI/180,n.altitudeDeg*Math.PI/180];return[Math.cos(s)*Math.sin(t),Math.cos(s)*Math.cos(t),Math.sin(s)]}static cross(n,t){return[n[1]*t[2]-n[2]*t[1],n[2]*t[0]-n[0]*t[2],n[0]*t[1]-n[1]*t[0]]}static angleDeg(n,t){const s=Math.hypot(...n)*Math.hypot(...t);if(s===0)return 0;const e=(n[0]*t[0]+n[1]*t[1]+n[2]*t[2])/s;return Math.acos(Math.max(-1,Math.min(1,e)))*180/Math.PI}}export{o as PoherAssessor};
1
+ import{g as u}from"./rr0-sighting.mjs";class o{about="shape";static STEP_DEG=2;static TURN_DEG=60;static ERRATIC_TURNS=3;static OSCILLATIONS=["vibrate","spiral","roll"];async assess(n){const t=this.trajectory(n),s=this.vanish(n),e=this.oscillation(n),a=this.landing(n),c=this.judged(n,"traces"),r=this.occupants(n),h=a.shown&&r.shown?5:a.shown&&c.shown?4:a.shown||t.value==="erratic"||s.shown||e.shown?3:t.value==="abnormal"?2:t.value==="straight"?1:0,i=[{id:"poher-trajectory",basis:t.basis,paths:t.paths,value:o.TRAJECTORIES.indexOf(t.value)},this.criterion("poher-vanish",s),this.criterion("poher-oscillation",e),{...this.criterion("poher-landing",a),unsupported:a.basis===void 0},this.criterion("poher-traces",c),this.criterion("poher-occupants",r)];return{verdict:String(h),criteria:i}}static TRAJECTORIES=["unknown","still","straight","abnormal","erratic"];criterion(n,t){return{id:n,value:t.shown?1:0,basis:t.basis,paths:t.basis===void 0?[]:t.paths}}trajectory(n){let t="unknown";for(const s of n.timeline.sourceIds){const e=this.seen(n,s).filter(i=>i.aim!==void 0).map(i=>i.aim);if(e.length<2)continue;const a=[o.unit(e[0])];for(const i of e.slice(1)){const l=o.unit(i);o.angleDeg(a[a.length-1],l)>=o.STEP_DEG&&a.push(l)}const c=a.length-1;let r=0;for(let i=1;i<a.length-1;i++){const l=o.cross(a[i-1],a[i]),d=o.cross(a[i],a[i+1]);o.angleDeg(l,d)>=o.TURN_DEG&&r++}const h=c===0?"still":r>=o.ERRATIC_TURNS?"erratic":r>0?"abnormal":"straight";o.TRAJECTORIES.indexOf(h)>o.TRAJECTORIES.indexOf(t)&&(t=h)}return t==="unknown"?{value:t,paths:[]}:{value:t,basis:"derived",paths:["timeline"]}}vanish(n){const t=(n.events??[]).findIndex(s=>s.eventType==="vanish"&&u.isPhenomenon(n,s));return t>=0?{shown:!0,basis:"stated",paths:[`events.${t}`]}:{shown:!1,paths:[]}}oscillation(n){const t=new Set((n.interpretation?.bodies??[]).map(e=>e.id)),s=(n.events??[]).findIndex(e=>o.OSCILLATIONS.includes(e.eventType)&&(u.isPhenomenon(n,e)||t.has(e.who?.split("/")[0]??"")));return s>=0?{shown:!0,basis:"stated",paths:[`events.${s}`]}:{shown:!1,paths:[]}}landing(n){const t=e=>!e.onGround&&((e.altitudeAboveGroundM??0)>0||(e.altitudeM??0)>0),s=(n.interpretation?.bodies??[]).findIndex(e=>Array.isArray(e.track)&&e.track.some(a=>a.onGround)&&e.track.some(t));return s>=0?{shown:!0,basis:"assumed",paths:[`interpretation.bodies.${s}`]}:{shown:!1,paths:[]}}occupants(n){const t=n.decor.findIndex(s=>s.kind==="entity");return t>=0?{shown:!0,basis:"stated",paths:[`decor.${t}`]}:this.judged(n,"beings")}judged(n,t){const s=n.account?.strangeness?.[t];return s===void 0?{shown:!1,paths:[]}:{shown:s,basis:"stated",paths:[`account.strangeness.${t}`]}}instants(n,t){return n.timeline.allKeyframes.map(s=>({t:s.t,shape:s.shapes.find(e=>e.sourceId===t)?.shape})).filter(({shape:s})=>s!==void 0).map(({t:s,shape:e})=>({t:s,aim:e.aim,visible:e.transparency<1})).sort((s,e)=>s.t-e.t)}seen(n,t){return this.instants(n,t).filter(s=>s.visible)}static unit(n){const[t,s]=[n.azimuthDeg*Math.PI/180,n.altitudeDeg*Math.PI/180];return[Math.cos(s)*Math.sin(t),Math.cos(s)*Math.cos(t),Math.sin(s)]}static cross(n,t){return[n[1]*t[2]-n[2]*t[1],n[2]*t[0]-n[0]*t[2],n[0]*t[1]-n[1]*t[0]]}static angleDeg(n,t){const s=Math.hypot(...n)*Math.hypot(...t);if(s===0)return 0;const e=(n[0]*t[0]+n[1]*t[1]+n[2]*t[2])/s;return Math.acos(Math.max(-1,Math.min(1,e)))*180/Math.PI}}export{o as PoherAssessor};
@@ -1,4 +1,4 @@
1
- import{G as F,n as P,C as H,h as K,m as w,o as N,i as U,q as k}from"./rr0-sighting.mjs";class b{static HOLLOW_M=1;static COVERED_M=3;static WINDOW_M=30;static SAMPLE_M=4;static MAX_GRADE={rail:.025,highSpeed:.035,subway:.04,light_rail:.06,tram:.08,funicular:1/0};static heights(t,s,e){const n=t.map(a=>a.level===0),o=t.map((a,i)=>n[i]?b.targets(a,s,e):[]),c=t.map((a,i)=>n[i]?b.samples(a,o[i]):[]),r=new Map;t.forEach((a,i)=>{if(n[i])for(const h of b.ends(a)){const u=b.key(h),p=r.get(u);p?p.push(i):r.set(u,[i])}});const M=a=>{const i=r.get(b.key(a));if(i)return b.median(i.flatMap(h=>c[h]),a)};return t.map((a,i)=>{if(n[i]){const h=[...new Set([i,...b.ends(a).flatMap(d=>r.get(b.key(d))??[])])].flatMap(d=>c[d]),u=a.centre.map((d,O)=>b.median(h,d)??o[i][O]),[p,A]=b.ends(a);return u[0]=M(p)??u[0],u[u.length-1]=M(A)??u[u.length-1],b.graded(u,a.along,a.highSpeed?b.MAX_GRADE.highSpeed:b.MAX_GRADE[a.kind])}return b.carried(a,s,e,M)})}static targets(t,s,e){return t.centre.map(n=>{const o=s(n.x,n.z);if(e===void 0||n.altitudeM===void 0)return o;const c=n.altitudeM+e;return c-o>b.HOLLOW_M||o-c>b.COVERED_M?c:o})}static samples(t,s){const e=[];let n=0;return t.centre.forEach((o,c)=>{t.along[c]+1e-6<n&&c<t.centre.length-1||(e.push({x:o.x,z:o.z,y:s[c]}),n=t.along[c]+b.SAMPLE_M)}),e}static median(t,s){const e=[];for(const o of t)Math.hypot(o.x-s.x,o.z-s.z)<=b.WINDOW_M&&e.push(o.y);if(e.length===0)return;e.sort((o,c)=>o-c);const n=e.length>>1;return e.length%2===1?e[n]:(e[n-1]+e[n])/2}static graded(t,s,e){if(!Number.isFinite(e)||t.length<3)return t;const n=[...t],o=n.length-1,c=s[o];if(Math.abs(n[o]-n[0])>e*c)return s.map(r=>n[0]+(n[o]-n[0])*r/c);for(let r=1;r<o;r++){const M=e*(s[r]-s[r-1]);n[r]=Math.min(n[r-1]+M,Math.max(n[r-1]-M,n[r]))}for(let r=o-1;r>0;r--){const M=e*(s[r+1]-s[r]);n[r]=Math.min(n[r+1]+M,Math.max(n[r+1]-M,n[r]))}return n}static carried(t,s,e,n){const[o,c]=b.ends(t),r=t.along[t.along.length-1],M=n(o),a=n(c);if(e!==void 0&&t.centre.every(u=>u.altitudeM!==void 0)){const u=t.centre.map(d=>d.altitudeM+e),p=M!==void 0?M-u[0]:0,A=a!==void 0?a-u[u.length-1]:0;return u.map((d,O)=>d+p+(A-p)*t.along[O]/r)}const i=M??s(o.x,o.z),h=a??s(c.x,c.z);return t.along.map(u=>i+(h-i)*u/r)}static ends(t){return[t.centre[0],t.centre[t.centre.length-1]]}static key(t){return`${Math.round(t.x*2)},${Math.round(t.z*2)}`}}class B{positions=[];indices=[];along=[];get vertexCount(){return this.positions.length/3}strip(t,s,e){const n=this.vertexCount;for(let o=0;o<t.length;o++)this.positions.push(t[o].x,t[o].y,t[o].z,s[o].x,s[o].y,s[o].z),e&&this.along.push(e[o],e[o]);for(let o=0;o<t.length-1;o++){const c=n+o*2;this.indices.push(c,c+2,c+1,c+1,c+2,c+3)}}beam(t,s,e,n=!0){const o=s.x-t.x,c=s.y-t.y,r=s.z-t.z,M=Math.hypot(o,c,r);if(M<1e-6)return;const a={x:o/M,y:c/M,z:r/M},i=Math.abs(a.y)>.9?{x:1,y:0,z:0}:{x:0,y:1,z:0},h=a.y*i.z-a.z*i.y,u=a.z*i.x-a.x*i.z,p=a.x*i.y-a.y*i.x,A=Math.hypot(h,u,p),d={x:h/A*e/2,y:u/A*e/2,z:p/A*e/2},O={x:a.y*d.z-a.z*d.y,y:a.z*d.x-a.x*d.z,z:a.x*d.y-a.y*d.x},g=(f,x,E)=>({x:f.x+d.x*x+O.x*E,y:f.y+d.y*x+O.y*E,z:f.z+d.z*x+O.z*E}),_=[[1,1],[-1,1],[-1,-1],[1,-1]];for(let f=0;f<4;f++){const[x,E]=_[f],[z,v]=_[(f+1)%4];this.quad(g(t,x,E),g(t,z,v),g(s,z,v),g(s,x,E))}n&&(this.quad(...[..._].reverse().map(([f,x])=>g(t,f,x))),this.quad(..._.map(([f,x])=>g(s,f,x))))}quad(t,s,e,n){const o=this.vertexCount;this.positions.push(t.x,t.y,t.z,s.x,s.y,s.z,e.x,e.y,e.z,n.x,n.y,n.z),this.indices.push(o,o+1,o+2,o,o+2,o+3)}}class l{static STEP_M=6;static BALLAST_HEIGHT_M=.5;static BALLAST_SLOPE=1.5;static BALLAST_SHOULDER_M=.45;static DECK_DEPTH_M=.8;static BANK_SLOPE=1.5;static SLEEPER_LENGTH_M=2.4;static SLEEPER_WIDTH_M=.29;static SLEEPER_SPACING_M=.6;static RAIL_HEAD_M=.072;static RAIL_HEIGHT_M=.18;static TRAM_RAIL_HEIGHT_M=.03;static LIFT_M=.06;static CATENARY={rail:{contactM:5.5,systemM:1.4,spanM:54,staggerM:.2},highSpeed:{contactM:5.08,systemM:1.4,spanM:63,staggerM:.2},service:{contactM:5.5,systemM:1.2,spanM:45,staggerM:.2},tram:{contactM:6,systemM:0,spanM:30,staggerM:.2}};static MESSENGER_SAG_M=.55;static MAST_SIDE_M=.26;static MAST_OFFSET_M=3.1;static MAST_ABOVE_M=.6;static CONTACT_DIAMETER_M=.012;static MESSENGER_DIAMETER_M=.011;static ARM_SIDE_M=.06;static TRACK_SPACING_M={rail:3.7,highSpeed:4.5,tram:3.1,subway:3.4,light_rail:3.4,funicular:3.2};static BALLAST_ALBEDO=[.17,.16,.15];static BANK_ALBEDO=[.085,.09,.05];static DECK_ALBEDO=[.26,.255,.24];static CONCRETE_ALBEDO=[.36,.35,.33];static WOOD_ALBEDO=[.07,.055,.045];static RUST_ALBEDO=[.085,.068,.058];static STEEL_ALBEDO=[.3,.31,.32];static COPPER_ALBEDO=[.09,.085,.07];static LINE_REACH_M=20;group=new F;stepM=l.STEP_M;drawn=0;laid=[];ballastMaterial=l.pebbled(l.lambert(l.BALLAST_ALBEDO,!0));earthMaterial=l.lambert(l.BANK_ALBEDO,!0);deckMaterial=l.lambert(l.DECK_ALBEDO,!1);concreteSleepers=l.sleeperMaterial(l.CONCRETE_ALBEDO);woodSleepers=l.sleeperMaterial(l.WOOD_ALBEDO);rustMaterial=l.lambert(l.RUST_ALBEDO,!0);headMaterial=new P({color:new H(.62,.62,.62),metalness:1,roughness:.28,polygonOffset:!0,polygonOffsetFactor:-2,polygonOffsetUnits:-2});steelMaterial=l.lambert(l.STEEL_ALBEDO,!1);wireMaterial=l.lambert(l.COPPER_ALBEDO,!1);constructor(){this.group.name="railways"}get count(){return this.drawn}setGroundSpacing(t){this.stepM=Number.isFinite(t)&&t>0?Math.min(l.STEP_M,Math.max(1.5,t/2)):l.STEP_M}set(t,s,e,n,o=1/0){this.clear();const r=t.map(p=>({line:p,path:p.points.map(A=>({...K(A.lat,A.lng,s,e),altitudeM:A.altitudeM}))})).filter(({line:p,path:A})=>p.level>=0&&l.within(A,o)),M=l.altitudeOffset(r,n),a=r.flatMap(({line:p,path:A})=>{const d=this.layoutOf(p,A);return d?[{line:p,layout:d}]:[]}),i=b.heights(a.map(({layout:p})=>p),n,M),h={ballast:new B,earth:new B,deck:new B,concrete:new B,wood:new B,rust:new B,head:new B,steel:new B,wire:new B};a.forEach(({line:p,layout:A},d)=>{this.lay(p,{...A,y:i[d]},n,h),this.laid.push({line:p,centre:A.centre}),this.drawn++});const u=[[h.ballast,this.ballastMaterial,"ballast",!1],[h.earth,this.earthMaterial,"embankments",!1],[h.deck,this.deckMaterial,"decks",!0],[h.concrete,this.concreteSleepers,"sleepers",!1],[h.wood,this.woodSleepers,"sleepers wood",!1],[h.rust,this.rustMaterial,"rails",!1],[h.head,this.headMaterial,"rail heads",!1],[h.steel,this.steelMaterial,"catenary masts",!0],[h.wire,this.wireMaterial,"catenary wires",!1]];for(const[p,A,d,O]of u){const g=l.meshOf(p,A);g&&(g.name=`railways ${d}`,g.castShadow=O,g.receiveShadow=!0,this.group.add(g))}}clear(){for(const t of[...this.group.children])this.group.remove(t),t.geometry?.dispose();this.drawn=0,this.laid=[]}lineAt(t,s){let e;for(const{line:n,centre:o}of this.laid)for(let c=0;c<o.length-1;c++){const r=o[c],M=o[c+1],a=M.x-r.x,i=M.z-r.z,h=a*a+i*i,u=h===0?0:Math.max(0,Math.min(1,((t-r.x)*a+(s-r.z)*i)/h)),p=Math.hypot(t-(r.x+a*u),s-(r.z+i*u));p<=l.LINE_REACH_M&&(!e||p<e.distance)&&(e={line:n,distance:p})}return e?.line}mayMeet(t,s,e,n){const o=Math.hypot(s.x,s.z);if(o<1e-6)return this.lineAt(t.x,t.z)!==void 0;const c=s.x/o,r=s.z/o,M=l.LINE_REACH_M;for(const{centre:a}of this.laid)for(let i=0;i<a.length-1;i++){const h=a[i],u=a[i+1];for(const p of[0,.5,1]){const A=h.x+(u.x-h.x)*p,d=h.z+(u.z-h.z)*p,O=(A-t.x)*c+(d-t.z)*r;if(O<0)continue;const g=Math.abs((A-t.x)*r-(d-t.z)*c),_=Math.hypot(u.x-h.x,u.z-h.z)/2;if(g>M+_)continue;if(t.y+s.y*(O/o)<=e(A,d)+n)return!0}}return!1}contactHeightM(t){if(!(t.electrification!=="overhead"||t.kind==="subway"||t.kind==="funicular"))return l.catenaryOf(t).contactM}static catenaryOf(t){return t.kind==="tram"?l.CATENARY.tram:t.highSpeed?l.CATENARY.highSpeed:t.service?l.CATENARY.service:l.CATENARY.rail}dispose(){this.clear();for(const t of[this.ballastMaterial,this.earthMaterial,this.deckMaterial,this.concreteSleepers,this.woodSleepers,this.rustMaterial,this.headMaterial,this.steelMaterial,this.wireMaterial])t.dispose()}static within(t,s){if(!Number.isFinite(s))return!0;const e=s*1.1+100;return t.some((n,o)=>Math.hypot(n.x,n.z)<=e||o>0&&Math.hypot((n.x+t[o-1].x)/2,(n.z+t[o-1].z)/2)<=e)}static altitudeOffset(t,s){const e=[];for(const{line:n,path:o}of t)if(n.level===0)for(const c of o)c.altitudeM!==void 0&&e.push(s(c.x,c.z)-c.altitudeM);if(!(e.length<5))return e.sort((n,o)=>n-o),e[Math.floor(e.length/2)]}layoutOf(t,s){const e=[];for(let c=0;c<s.length-1;c++){const r=s[c],M=s[c+1],a=Math.max(1,Math.ceil(Math.hypot(M.x-r.x,M.z-r.z)/this.stepM));for(let i=0;i<a;i++){const h=i/a,u=r.altitudeM!==void 0&&M.altitudeM!==void 0?r.altitudeM+(M.altitudeM-r.altitudeM)*h:void 0;e.push({x:r.x+(M.x-r.x)*h,z:r.z+(M.z-r.z)*h,altitudeM:u})}}if(e.push(s[s.length-1]),e.length<2)return;const n=[0];for(let c=1;c<e.length;c++)n.push(n[c-1]+Math.hypot(e[c].x-e[c-1].x,e[c].z-e[c-1].z));if(n[n.length-1]<.5)return;const o=e.map((c,r)=>{const M=e[Math.max(0,r-1)],a=e[Math.min(e.length-1,r+1)],i=a.x-M.x,h=a.z-M.z,u=Math.hypot(i,h);return u<1e-6?{x:1,z:0}:{x:i/u,z:h/u}});return{kind:t.kind,...t.highSpeed?{highSpeed:!0}:{},level:t.level,centre:e,along:n,dir:o}}lay(t,s,e,n){const o=t.highSpeed?l.TRACK_SPACING_M.highSpeed:l.TRACK_SPACING_M[t.kind],c=Math.min(8,Math.max(1,t.tracks)),r=Array.from({length:c},(g,_)=>(_-(c-1)/2)*o),M=t.kind==="tram",a=M?0:l.BALLAST_HEIGHT_M,i=l.LIFT_M,h=(g,_,f)=>({x:s.centre[g].x-s.dir[g].z*_,y:s.y[g]+f,z:s.centre[g].z+s.dir[g].x*_}),u=s.centre.map((g,_)=>_);if(!M){const g=l.SLEEPER_LENGTH_M/2+l.BALLAST_SHOULDER_M+(r[r.length-1]??0),_=u.map(x=>h(x,g,a+i)),f=u.map(x=>h(x,-g,a+i));if(n.ballast.strip(_,f),t.level===0){const x=g+a*l.BALLAST_SLOPE;for(const E of[1,-1]){const z=[],v=[];let m=!1;for(const L of u){const C=h(L,E*x,i),S=e(C.x,C.z)+i,T=C.y-S;T<0&&(C.y=Math.min(S,s.y[L]+a-.05+i)),z.push(C);const I=h(L,E*(x+Math.max(0,T)*l.BANK_SLOPE),i);I.y=Math.min(e(I.x,I.z)+i,C.y),C.y-I.y>.02&&(m=!0),v.push(I)}const D=E>0?_:f;E>0?n.ballast.strip(z,D):n.ballast.strip(D,z),m&&(E>0?n.earth.strip(v,z):n.earth.strip(z,v))}}else{const x=-l.DECK_DEPTH_M,E=g+.15,z=u.map(L=>h(L,E,a+i+.1)),v=u.map(L=>h(L,-E,a+i+.1)),m=u.map(L=>h(L,E,x)),D=u.map(L=>h(L,-E,x));n.deck.strip(m,z),n.deck.strip(v,D),n.deck.strip(D,m),n.deck.strip(z,u.map(L=>h(L,g,a+i+.1))),n.deck.strip(u.map(L=>h(L,-g,a+i+.1)),v)}}const p=t.service?n.wood:n.concrete,A=t.gaugeMm/2e3+l.RAIL_HEAD_M/2,d=M?l.TRAM_RAIL_HEIGHT_M:l.RAIL_HEIGHT_M,O=a+i;for(const g of r){if(!M){const _=l.SLEEPER_LENGTH_M/2;p.strip(u.map(f=>h(f,g+_,O+.004)),u.map(f=>h(f,g-_,O+.004)),s.along)}for(const _ of[1,-1]){const f=g+_*A,x=l.RAIL_HEAD_M/2,E=u.map(v=>h(v,f+x,O+d)),z=u.map(v=>h(v,f-x,O+d));n.head.strip(E,z),n.rust.strip(u.map(v=>h(v,f+x,O)),E),n.rust.strip(z,u.map(v=>h(v,f-x,O)))}}t.electrification==="overhead"&&t.kind!=="subway"&&t.kind!=="funicular"&&this.catenary(t,s,r,O+d,h,e,n)}catenary(t,s,e,n,o,c,r){const M=l.catenaryOf(t),a=s.along[s.along.length-1],i=Math.max(1,Math.round(a/M.spanM)),h=a/i,u=Array.from({length:i},(E,z)=>(z+.5)*h),p=n+M.contactM,A=p+M.systemM,d=(M.systemM>0?A:p)+l.MAST_ABOVE_M,O=e[e.length-1],g=e.length>2,_=e.length===1?[1]:[1,-1],f=(E,z,v)=>{let m=0,D=s.along.length-2;for(;m<D;){const T=m+D+1>>1;s.along[T]<=E?m=T:D=T-1}const L=Math.min(1,Math.max(0,(E-s.along[m])/Math.max(1e-6,s.along[m+1]-s.along[m]))),C=o(m,z,v),S=o(m+1,z,v);return{x:C.x+(S.x-C.x)*L,y:C.y+(S.y-C.y)*L,z:C.z+(S.z-C.z)*L}};for(const E of u){const z=f(E,0,p);if(!(t.level===0&&c(z.x,z.z)>z.y)){for(const v of _){const m=v*(O+l.MAST_OFFSET_M),D=f(E,m,0);t.level===0&&(D.y=Math.min(D.y,c(D.x,D.z)));const L=f(E,m,d);if(r.steel.beam(D,L,l.MAST_SIDE_M),g)continue;const S=(_.length===1?e[0]:v*O)-v*.6,T=M.systemM>0?A:p+.3;r.steel.beam(f(E,m,T),f(E,S,T),l.ARM_SIDE_M),r.steel.beam(f(E,m,p-.4),f(E,S,T),l.ARM_SIDE_M)}if(g){const v=O+l.MAST_OFFSET_M;r.steel.beam(f(E,v,d-.2),f(E,-v,d-.2),l.MAST_SIDE_M*.8)}}}const x=[0,...u,a];for(const[E,z]of e.entries()){const v=m=>m===0||m===x.length-1?0:((m+E)%2===0?1:-1)*M.staggerM;for(let m=0;m<x.length-1;m++){const D=x[m],L=x[m+1];if(L-D<.1||(r.wire.beam(f(D,z+v(m),p),f(L,z+v(m+1),p),l.CONTACT_DIAMETER_M,!1),M.systemM<=0))continue;const C=4,S=T=>{const I=m===0?.5+T/2:m===x.length-2?T/2:T;return A-l.MESSENGER_SAG_M*4*I*(1-I)};for(let T=0;T<C;T++){const I=T/C,G=(T+1)/C;r.wire.beam(f(D+(L-D)*I,z,S(I)),f(D+(L-D)*G,z,S(G)),l.MESSENGER_DIAMETER_M,!1)}}}}static meshOf(t,s){if(t.indices.length===0)return;const e=new w;return e.setAttribute("position",new N(new Float32Array(t.positions),3)),t.along.length>0&&e.setAttribute("aAlong",new N(new Float32Array(t.along),1)),e.setIndex(new N(new Uint32Array(t.indices),1)),e.computeVertexNormals(),new U(e,s)}static lambert(t,s){return new k({color:new H(...t),...s?{polygonOffset:!0,polygonOffsetFactor:-2,polygonOffsetUnits:-2}:{}})}static pebbled(t){return t.onBeforeCompile=s=>{s.vertexShader=s.vertexShader.replace("#include <common>",`#include <common>
1
+ import{G as F,o as P,C as H,i as K,n as w,q as N,j as U,t as k}from"./rr0-sighting.mjs";class b{static HOLLOW_M=1;static COVERED_M=3;static WINDOW_M=30;static SAMPLE_M=4;static MAX_GRADE={rail:.025,highSpeed:.035,subway:.04,light_rail:.06,tram:.08,funicular:1/0};static heights(t,s,e){const n=t.map(a=>a.level===0),o=t.map((a,i)=>n[i]?b.targets(a,s,e):[]),c=t.map((a,i)=>n[i]?b.samples(a,o[i]):[]),r=new Map;t.forEach((a,i)=>{if(n[i])for(const h of b.ends(a)){const u=b.key(h),p=r.get(u);p?p.push(i):r.set(u,[i])}});const M=a=>{const i=r.get(b.key(a));if(i)return b.median(i.flatMap(h=>c[h]),a)};return t.map((a,i)=>{if(n[i]){const h=[...new Set([i,...b.ends(a).flatMap(d=>r.get(b.key(d))??[])])].flatMap(d=>c[d]),u=a.centre.map((d,O)=>b.median(h,d)??o[i][O]),[p,A]=b.ends(a);return u[0]=M(p)??u[0],u[u.length-1]=M(A)??u[u.length-1],b.graded(u,a.along,a.highSpeed?b.MAX_GRADE.highSpeed:b.MAX_GRADE[a.kind])}return b.carried(a,s,e,M)})}static targets(t,s,e){return t.centre.map(n=>{const o=s(n.x,n.z);if(e===void 0||n.altitudeM===void 0)return o;const c=n.altitudeM+e;return c-o>b.HOLLOW_M||o-c>b.COVERED_M?c:o})}static samples(t,s){const e=[];let n=0;return t.centre.forEach((o,c)=>{t.along[c]+1e-6<n&&c<t.centre.length-1||(e.push({x:o.x,z:o.z,y:s[c]}),n=t.along[c]+b.SAMPLE_M)}),e}static median(t,s){const e=[];for(const o of t)Math.hypot(o.x-s.x,o.z-s.z)<=b.WINDOW_M&&e.push(o.y);if(e.length===0)return;e.sort((o,c)=>o-c);const n=e.length>>1;return e.length%2===1?e[n]:(e[n-1]+e[n])/2}static graded(t,s,e){if(!Number.isFinite(e)||t.length<3)return t;const n=[...t],o=n.length-1,c=s[o];if(Math.abs(n[o]-n[0])>e*c)return s.map(r=>n[0]+(n[o]-n[0])*r/c);for(let r=1;r<o;r++){const M=e*(s[r]-s[r-1]);n[r]=Math.min(n[r-1]+M,Math.max(n[r-1]-M,n[r]))}for(let r=o-1;r>0;r--){const M=e*(s[r+1]-s[r]);n[r]=Math.min(n[r+1]+M,Math.max(n[r+1]-M,n[r]))}return n}static carried(t,s,e,n){const[o,c]=b.ends(t),r=t.along[t.along.length-1],M=n(o),a=n(c);if(e!==void 0&&t.centre.every(u=>u.altitudeM!==void 0)){const u=t.centre.map(d=>d.altitudeM+e),p=M!==void 0?M-u[0]:0,A=a!==void 0?a-u[u.length-1]:0;return u.map((d,O)=>d+p+(A-p)*t.along[O]/r)}const i=M??s(o.x,o.z),h=a??s(c.x,c.z);return t.along.map(u=>i+(h-i)*u/r)}static ends(t){return[t.centre[0],t.centre[t.centre.length-1]]}static key(t){return`${Math.round(t.x*2)},${Math.round(t.z*2)}`}}class B{positions=[];indices=[];along=[];get vertexCount(){return this.positions.length/3}strip(t,s,e){const n=this.vertexCount;for(let o=0;o<t.length;o++)this.positions.push(t[o].x,t[o].y,t[o].z,s[o].x,s[o].y,s[o].z),e&&this.along.push(e[o],e[o]);for(let o=0;o<t.length-1;o++){const c=n+o*2;this.indices.push(c,c+2,c+1,c+1,c+2,c+3)}}beam(t,s,e,n=!0){const o=s.x-t.x,c=s.y-t.y,r=s.z-t.z,M=Math.hypot(o,c,r);if(M<1e-6)return;const a={x:o/M,y:c/M,z:r/M},i=Math.abs(a.y)>.9?{x:1,y:0,z:0}:{x:0,y:1,z:0},h=a.y*i.z-a.z*i.y,u=a.z*i.x-a.x*i.z,p=a.x*i.y-a.y*i.x,A=Math.hypot(h,u,p),d={x:h/A*e/2,y:u/A*e/2,z:p/A*e/2},O={x:a.y*d.z-a.z*d.y,y:a.z*d.x-a.x*d.z,z:a.x*d.y-a.y*d.x},g=(f,x,E)=>({x:f.x+d.x*x+O.x*E,y:f.y+d.y*x+O.y*E,z:f.z+d.z*x+O.z*E}),_=[[1,1],[-1,1],[-1,-1],[1,-1]];for(let f=0;f<4;f++){const[x,E]=_[f],[z,v]=_[(f+1)%4];this.quad(g(t,x,E),g(t,z,v),g(s,z,v),g(s,x,E))}n&&(this.quad(...[..._].reverse().map(([f,x])=>g(t,f,x))),this.quad(..._.map(([f,x])=>g(s,f,x))))}quad(t,s,e,n){const o=this.vertexCount;this.positions.push(t.x,t.y,t.z,s.x,s.y,s.z,e.x,e.y,e.z,n.x,n.y,n.z),this.indices.push(o,o+1,o+2,o,o+2,o+3)}}class l{static STEP_M=6;static BALLAST_HEIGHT_M=.5;static BALLAST_SLOPE=1.5;static BALLAST_SHOULDER_M=.45;static DECK_DEPTH_M=.8;static BANK_SLOPE=1.5;static SLEEPER_LENGTH_M=2.4;static SLEEPER_WIDTH_M=.29;static SLEEPER_SPACING_M=.6;static RAIL_HEAD_M=.072;static RAIL_HEIGHT_M=.18;static TRAM_RAIL_HEIGHT_M=.03;static LIFT_M=.06;static CATENARY={rail:{contactM:5.5,systemM:1.4,spanM:54,staggerM:.2},highSpeed:{contactM:5.08,systemM:1.4,spanM:63,staggerM:.2},service:{contactM:5.5,systemM:1.2,spanM:45,staggerM:.2},tram:{contactM:6,systemM:0,spanM:30,staggerM:.2}};static MESSENGER_SAG_M=.55;static MAST_SIDE_M=.26;static MAST_OFFSET_M=3.1;static MAST_ABOVE_M=.6;static CONTACT_DIAMETER_M=.012;static MESSENGER_DIAMETER_M=.011;static ARM_SIDE_M=.06;static TRACK_SPACING_M={rail:3.7,highSpeed:4.5,tram:3.1,subway:3.4,light_rail:3.4,funicular:3.2};static BALLAST_ALBEDO=[.17,.16,.15];static BANK_ALBEDO=[.085,.09,.05];static DECK_ALBEDO=[.26,.255,.24];static CONCRETE_ALBEDO=[.36,.35,.33];static WOOD_ALBEDO=[.07,.055,.045];static RUST_ALBEDO=[.085,.068,.058];static STEEL_ALBEDO=[.3,.31,.32];static COPPER_ALBEDO=[.09,.085,.07];static LINE_REACH_M=20;group=new F;stepM=l.STEP_M;drawn=0;laid=[];ballastMaterial=l.pebbled(l.lambert(l.BALLAST_ALBEDO,!0));earthMaterial=l.lambert(l.BANK_ALBEDO,!0);deckMaterial=l.lambert(l.DECK_ALBEDO,!1);concreteSleepers=l.sleeperMaterial(l.CONCRETE_ALBEDO);woodSleepers=l.sleeperMaterial(l.WOOD_ALBEDO);rustMaterial=l.lambert(l.RUST_ALBEDO,!0);headMaterial=new P({color:new H(.62,.62,.62),metalness:1,roughness:.28,polygonOffset:!0,polygonOffsetFactor:-2,polygonOffsetUnits:-2});steelMaterial=l.lambert(l.STEEL_ALBEDO,!1);wireMaterial=l.lambert(l.COPPER_ALBEDO,!1);constructor(){this.group.name="railways"}get count(){return this.drawn}setGroundSpacing(t){this.stepM=Number.isFinite(t)&&t>0?Math.min(l.STEP_M,Math.max(1.5,t/2)):l.STEP_M}set(t,s,e,n,o=1/0){this.clear();const r=t.map(p=>({line:p,path:p.points.map(A=>({...K(A.lat,A.lng,s,e),altitudeM:A.altitudeM}))})).filter(({line:p,path:A})=>p.level>=0&&l.within(A,o)),M=l.altitudeOffset(r,n),a=r.flatMap(({line:p,path:A})=>{const d=this.layoutOf(p,A);return d?[{line:p,layout:d}]:[]}),i=b.heights(a.map(({layout:p})=>p),n,M),h={ballast:new B,earth:new B,deck:new B,concrete:new B,wood:new B,rust:new B,head:new B,steel:new B,wire:new B};a.forEach(({line:p,layout:A},d)=>{this.lay(p,{...A,y:i[d]},n,h),this.laid.push({line:p,centre:A.centre}),this.drawn++});const u=[[h.ballast,this.ballastMaterial,"ballast",!1],[h.earth,this.earthMaterial,"embankments",!1],[h.deck,this.deckMaterial,"decks",!0],[h.concrete,this.concreteSleepers,"sleepers",!1],[h.wood,this.woodSleepers,"sleepers wood",!1],[h.rust,this.rustMaterial,"rails",!1],[h.head,this.headMaterial,"rail heads",!1],[h.steel,this.steelMaterial,"catenary masts",!0],[h.wire,this.wireMaterial,"catenary wires",!1]];for(const[p,A,d,O]of u){const g=l.meshOf(p,A);g&&(g.name=`railways ${d}`,g.castShadow=O,g.receiveShadow=!0,this.group.add(g))}}clear(){for(const t of[...this.group.children])this.group.remove(t),t.geometry?.dispose();this.drawn=0,this.laid=[]}lineAt(t,s){let e;for(const{line:n,centre:o}of this.laid)for(let c=0;c<o.length-1;c++){const r=o[c],M=o[c+1],a=M.x-r.x,i=M.z-r.z,h=a*a+i*i,u=h===0?0:Math.max(0,Math.min(1,((t-r.x)*a+(s-r.z)*i)/h)),p=Math.hypot(t-(r.x+a*u),s-(r.z+i*u));p<=l.LINE_REACH_M&&(!e||p<e.distance)&&(e={line:n,distance:p})}return e?.line}mayMeet(t,s,e,n){const o=Math.hypot(s.x,s.z);if(o<1e-6)return this.lineAt(t.x,t.z)!==void 0;const c=s.x/o,r=s.z/o,M=l.LINE_REACH_M;for(const{centre:a}of this.laid)for(let i=0;i<a.length-1;i++){const h=a[i],u=a[i+1];for(const p of[0,.5,1]){const A=h.x+(u.x-h.x)*p,d=h.z+(u.z-h.z)*p,O=(A-t.x)*c+(d-t.z)*r;if(O<0)continue;const g=Math.abs((A-t.x)*r-(d-t.z)*c),_=Math.hypot(u.x-h.x,u.z-h.z)/2;if(g>M+_)continue;if(t.y+s.y*(O/o)<=e(A,d)+n)return!0}}return!1}contactHeightM(t){if(!(t.electrification!=="overhead"||t.kind==="subway"||t.kind==="funicular"))return l.catenaryOf(t).contactM}static catenaryOf(t){return t.kind==="tram"?l.CATENARY.tram:t.highSpeed?l.CATENARY.highSpeed:t.service?l.CATENARY.service:l.CATENARY.rail}dispose(){this.clear();for(const t of[this.ballastMaterial,this.earthMaterial,this.deckMaterial,this.concreteSleepers,this.woodSleepers,this.rustMaterial,this.headMaterial,this.steelMaterial,this.wireMaterial])t.dispose()}static within(t,s){if(!Number.isFinite(s))return!0;const e=s*1.1+100;return t.some((n,o)=>Math.hypot(n.x,n.z)<=e||o>0&&Math.hypot((n.x+t[o-1].x)/2,(n.z+t[o-1].z)/2)<=e)}static altitudeOffset(t,s){const e=[];for(const{line:n,path:o}of t)if(n.level===0)for(const c of o)c.altitudeM!==void 0&&e.push(s(c.x,c.z)-c.altitudeM);if(!(e.length<5))return e.sort((n,o)=>n-o),e[Math.floor(e.length/2)]}layoutOf(t,s){const e=[];for(let c=0;c<s.length-1;c++){const r=s[c],M=s[c+1],a=Math.max(1,Math.ceil(Math.hypot(M.x-r.x,M.z-r.z)/this.stepM));for(let i=0;i<a;i++){const h=i/a,u=r.altitudeM!==void 0&&M.altitudeM!==void 0?r.altitudeM+(M.altitudeM-r.altitudeM)*h:void 0;e.push({x:r.x+(M.x-r.x)*h,z:r.z+(M.z-r.z)*h,altitudeM:u})}}if(e.push(s[s.length-1]),e.length<2)return;const n=[0];for(let c=1;c<e.length;c++)n.push(n[c-1]+Math.hypot(e[c].x-e[c-1].x,e[c].z-e[c-1].z));if(n[n.length-1]<.5)return;const o=e.map((c,r)=>{const M=e[Math.max(0,r-1)],a=e[Math.min(e.length-1,r+1)],i=a.x-M.x,h=a.z-M.z,u=Math.hypot(i,h);return u<1e-6?{x:1,z:0}:{x:i/u,z:h/u}});return{kind:t.kind,...t.highSpeed?{highSpeed:!0}:{},level:t.level,centre:e,along:n,dir:o}}lay(t,s,e,n){const o=t.highSpeed?l.TRACK_SPACING_M.highSpeed:l.TRACK_SPACING_M[t.kind],c=Math.min(8,Math.max(1,t.tracks)),r=Array.from({length:c},(g,_)=>(_-(c-1)/2)*o),M=t.kind==="tram",a=M?0:l.BALLAST_HEIGHT_M,i=l.LIFT_M,h=(g,_,f)=>({x:s.centre[g].x-s.dir[g].z*_,y:s.y[g]+f,z:s.centre[g].z+s.dir[g].x*_}),u=s.centre.map((g,_)=>_);if(!M){const g=l.SLEEPER_LENGTH_M/2+l.BALLAST_SHOULDER_M+(r[r.length-1]??0),_=u.map(x=>h(x,g,a+i)),f=u.map(x=>h(x,-g,a+i));if(n.ballast.strip(_,f),t.level===0){const x=g+a*l.BALLAST_SLOPE;for(const E of[1,-1]){const z=[],v=[];let m=!1;for(const L of u){const C=h(L,E*x,i),S=e(C.x,C.z)+i,T=C.y-S;T<0&&(C.y=Math.min(S,s.y[L]+a-.05+i)),z.push(C);const I=h(L,E*(x+Math.max(0,T)*l.BANK_SLOPE),i);I.y=Math.min(e(I.x,I.z)+i,C.y),C.y-I.y>.02&&(m=!0),v.push(I)}const D=E>0?_:f;E>0?n.ballast.strip(z,D):n.ballast.strip(D,z),m&&(E>0?n.earth.strip(v,z):n.earth.strip(z,v))}}else{const x=-l.DECK_DEPTH_M,E=g+.15,z=u.map(L=>h(L,E,a+i+.1)),v=u.map(L=>h(L,-E,a+i+.1)),m=u.map(L=>h(L,E,x)),D=u.map(L=>h(L,-E,x));n.deck.strip(m,z),n.deck.strip(v,D),n.deck.strip(D,m),n.deck.strip(z,u.map(L=>h(L,g,a+i+.1))),n.deck.strip(u.map(L=>h(L,-g,a+i+.1)),v)}}const p=t.service?n.wood:n.concrete,A=t.gaugeMm/2e3+l.RAIL_HEAD_M/2,d=M?l.TRAM_RAIL_HEIGHT_M:l.RAIL_HEIGHT_M,O=a+i;for(const g of r){if(!M){const _=l.SLEEPER_LENGTH_M/2;p.strip(u.map(f=>h(f,g+_,O+.004)),u.map(f=>h(f,g-_,O+.004)),s.along)}for(const _ of[1,-1]){const f=g+_*A,x=l.RAIL_HEAD_M/2,E=u.map(v=>h(v,f+x,O+d)),z=u.map(v=>h(v,f-x,O+d));n.head.strip(E,z),n.rust.strip(u.map(v=>h(v,f+x,O)),E),n.rust.strip(z,u.map(v=>h(v,f-x,O)))}}t.electrification==="overhead"&&t.kind!=="subway"&&t.kind!=="funicular"&&this.catenary(t,s,r,O+d,h,e,n)}catenary(t,s,e,n,o,c,r){const M=l.catenaryOf(t),a=s.along[s.along.length-1],i=Math.max(1,Math.round(a/M.spanM)),h=a/i,u=Array.from({length:i},(E,z)=>(z+.5)*h),p=n+M.contactM,A=p+M.systemM,d=(M.systemM>0?A:p)+l.MAST_ABOVE_M,O=e[e.length-1],g=e.length>2,_=e.length===1?[1]:[1,-1],f=(E,z,v)=>{let m=0,D=s.along.length-2;for(;m<D;){const T=m+D+1>>1;s.along[T]<=E?m=T:D=T-1}const L=Math.min(1,Math.max(0,(E-s.along[m])/Math.max(1e-6,s.along[m+1]-s.along[m]))),C=o(m,z,v),S=o(m+1,z,v);return{x:C.x+(S.x-C.x)*L,y:C.y+(S.y-C.y)*L,z:C.z+(S.z-C.z)*L}};for(const E of u){const z=f(E,0,p);if(!(t.level===0&&c(z.x,z.z)>z.y)){for(const v of _){const m=v*(O+l.MAST_OFFSET_M),D=f(E,m,0);t.level===0&&(D.y=Math.min(D.y,c(D.x,D.z)));const L=f(E,m,d);if(r.steel.beam(D,L,l.MAST_SIDE_M),g)continue;const S=(_.length===1?e[0]:v*O)-v*.6,T=M.systemM>0?A:p+.3;r.steel.beam(f(E,m,T),f(E,S,T),l.ARM_SIDE_M),r.steel.beam(f(E,m,p-.4),f(E,S,T),l.ARM_SIDE_M)}if(g){const v=O+l.MAST_OFFSET_M;r.steel.beam(f(E,v,d-.2),f(E,-v,d-.2),l.MAST_SIDE_M*.8)}}}const x=[0,...u,a];for(const[E,z]of e.entries()){const v=m=>m===0||m===x.length-1?0:((m+E)%2===0?1:-1)*M.staggerM;for(let m=0;m<x.length-1;m++){const D=x[m],L=x[m+1];if(L-D<.1||(r.wire.beam(f(D,z+v(m),p),f(L,z+v(m+1),p),l.CONTACT_DIAMETER_M,!1),M.systemM<=0))continue;const C=4,S=T=>{const I=m===0?.5+T/2:m===x.length-2?T/2:T;return A-l.MESSENGER_SAG_M*4*I*(1-I)};for(let T=0;T<C;T++){const I=T/C,G=(T+1)/C;r.wire.beam(f(D+(L-D)*I,z,S(I)),f(D+(L-D)*G,z,S(G)),l.MESSENGER_DIAMETER_M,!1)}}}}static meshOf(t,s){if(t.indices.length===0)return;const e=new w;return e.setAttribute("position",new N(new Float32Array(t.positions),3)),t.along.length>0&&e.setAttribute("aAlong",new N(new Float32Array(t.along),1)),e.setIndex(new N(new Uint32Array(t.indices),1)),e.computeVertexNormals(),new U(e,s)}static lambert(t,s){return new k({color:new H(...t),...s?{polygonOffset:!0,polygonOffsetFactor:-2,polygonOffsetUnits:-2}:{}})}static pebbled(t){return t.onBeforeCompile=s=>{s.vertexShader=s.vertexShader.replace("#include <common>",`#include <common>
2
2
  varying vec3 vBallast;`).replace("#include <begin_vertex>",`#include <begin_vertex>
3
3
  vBallast = position;`),s.fragmentShader=s.fragmentShader.replace("#include <common>",`#include <common>
4
4
  varying vec3 vBallast;
@@ -0,0 +1,27 @@
1
+ import{ae as w,_ as u,R as v,ah as P,b5 as M}from"./rr0-sighting.mjs";import{S as C,P as b,a as x,I as T,E as F}from"./ParameterForm-DxN0Nf1y.js";import{T as _}from"./TimelineTracks-B1dXX0uV.js";const A=w.catalog({en:()=>u(()=>import("./ReentryParameterTexts_en-BH1tGP5C.js"),[],import.meta.url).then(h=>h.reentryParameterTexts_en),fr:()=>u(()=>import("./ReentryParameterTexts_fr-C8ROK57p.js"),[],import.meta.url).then(h=>h.reentryParameterTexts_fr),es:()=>u(()=>import("./ReentryParameterTexts_es-BDMJ4K1g.js"),[],import.meta.url).then(h=>h.reentryParameterTexts_es),it:()=>u(()=>import("./ReentryParameterTexts_it-CwC8vNTI.js"),[],import.meta.url).then(h=>h.reentryParameterTexts_it)});class a{static NAME="name";static OBJECT="object";static LIGHT="light";static WHEN="when";static placeAt(e,t){const r=v.leadAt(e,t);if(r)return{t,lat:r.lat,lng:r.lng,altitudeKm:r.heightM/1e3};const i=e.track,[n,s]=t<(i[0]?.t??0)?[i[0],i[1]]:[i[i.length-2],i[i.length-1]];if(!n||!s||s.t===n.t){const d=n??s??{lat:0,lng:0,altitudeKm:80};return{t,lat:d.lat,lng:d.lng,altitudeKm:d.altitudeKm}}const l=(t-n.t)/(s.t-n.t);return{t,lat:n.lat+(s.lat-n.lat)*l,lng:n.lng+(s.lng-n.lng)*l,altitudeKm:Math.max(0,n.altitudeKm+(s.altitudeKm-n.altitudeKm)*l)}}static curvePointAt(e,t){return{t,absoluteMagnitude:Math.round(v.absoluteMagnitudeAt(e,t)*10)/10}}static instantsOf(e){return[...e.track.map(t=>t.t),...e.fragments.flatMap(t=>[...t.fromT===void 0?[]:[t.fromT],...t.untilT===void 0?[]:[t.untilT],...(t.lightCurve??[]).map(r=>r.t)])]}static instant(e,t,r,i={}){return{type:"number",key:e,min:-3600,max:36e3,step:.1,unit:"s",scale:.001,label:t,hint:r,...i}}static SET={kind:"reentry",title:"fireballOrReEntry",parameters:[{type:"said",key:"title",label:a.NAME},{type:"text",key:"object.name",group:a.OBJECT,label:"catalogueName",hint:"forAReEntryThePiece"},{type:"text",key:"object.cosparId",group:a.OBJECT,label:"cosparId",placeholder:"t1968013c"},{type:"number",key:"object.norad",min:1,max:999999,step:1,group:a.OBJECT,label:"noradNumber"}]};static PLACE={kind:"reentry-place",title:"pointOfThePath",parameters:[a.instant("t","time","secondsOfTheRecordingNegativeBefore",{required:!0}),{type:"position",key:"lat",secondKey:"lng",saidKey:"saidPosition",native:"geo",step:1,rangeM:2e6,label:"position"},{type:"number",key:"altitudeKm",min:0,max:300,step:.1,unit:"km",required:!0,label:"altitude",hint:"aboveTheEllipsoidAMeteorBegins"}]};static trackEnd(e,t){const r=e?.track;if(r?.length)return t==="first"?r[0].t:r[r.length-1].t}static FRAGMENT={kind:"reentry-fragment",title:"piece",parameters:[{type:"text",key:"id",label:"id",validate:(e,t,r)=>!r?.fragments.some(i=>i!==t&&i.id===e)},{type:"number",key:"absoluteMagnitude",min:-40,max:10,step:.1,required:!0,group:a.LIGHT,label:"absoluteMagnitude",hint:"itsBrightnessSeenFrom100Km"},{type:"colour",key:"color",group:a.LIGHT,fallback:v.DEFAULT_COLOR,label:"colour"},{type:"number",key:"trainS",min:0,max:600,step:.1,unit:"s",group:a.LIGHT,effective:()=>v.DEFAULT_TRAIN_S,label:"train",hint:"howLongAStretchOfIts"},{type:"number",key:"lagS",min:0,max:600,step:.1,unit:"s",group:a.WHEN,effective:()=>0,label:"behindTheLead",hint:"secondsBehindTheLeadingPointAlong"},a.instant("fromT","seenFrom","whenItBreaksOffOrBegins",{group:a.WHEN,effective:(e,t)=>a.trackEnd(t,"first")}),a.instant("untilT","outAt","whenItHasBurnedUpOr",{group:a.WHEN,effective:(e,t)=>a.trackEnd(t,"last")})]};static CURVE_POINT={kind:"reentry-curve-point",title:"pointOfTheLightCurve",parameters:[a.instant("t","time","secondsOfTheRecording",{required:!0}),{type:"number",key:"absoluteMagnitude",min:-40,max:10,step:.1,required:!0,label:"absoluteMagnitude"}]}}const L=w.catalog({en:()=>u(()=>import("./ReentryEditorMessages_en-O-YSmHxv.js"),[],import.meta.url).then(h=>h.reentryEditorMessages_en),fr:()=>u(()=>import("./ReentryEditorMessages_fr-xuC-qZ6M.js"),[],import.meta.url).then(h=>h.reentryEditorMessages_fr),es:()=>u(()=>import("./ReentryEditorMessages_es-CvO9Jwz5.js"),[],import.meta.url).then(h=>h.reentryEditorMessages_es),it:()=>u(()=>import("./ReentryEditorMessages_it-B7vyCX9o.js"),[],import.meta.url).then(h=>h.reentryEditorMessages_it)});class m{constructor(e,t,r){this.container=e,this.host=t,C.attach(e,"reentry-editor-part",m.STYLE),this.language=r,this.ready=this.setLanguage(r)}messages;ready;parameterTexts;languageToken=0;currentId;form;list;timeline;placeForm;placeIndex=0;row="path";fragmentForm;fragmentIndex=0;curveForm;curveIndex=0;language;shown=[];static STYLE='.reentry-editor-part { flex-basis: 100%; min-width: 0; } .reentry-editor-part #reentry-timeline { flex-basis: 100%; min-width: 0; padding: 4px 0; } .reentry-editor-part #reentry-path > .icon-btn, .reentry-editor-part #reentry-curve > .icon-btn { align-self: flex-end; } .reentry-editor-part #reentry-list, .reentry-editor-part #reentry-places, .reentry-editor-part #reentry-fragment-list, .reentry-editor-part #reentry-curve-list { flex-basis: 100%; min-width: 0; } .reentry-editor-part .launch-editor, .reentry-editor-part .launch-fields { display: flex; flex-wrap: wrap; gap: 8px; align-items: end; } .reentry-editor-part .launch-fields { flex-basis: 100%; min-width: 0; } .reentry-editor-part [hidden] { display: none !important; } .reentry-editor-part select { min-width: 0; width: 100%; } .reentry-editor-part .launch-intro { flex-basis: 100%; margin: 0; } .reentry-editor-part .launch-track { flex-basis: 100%; margin: 0; } .reentry-editor-part .launch-parameters { flex-basis: 100%; min-width: 0; display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-start; } .reentry-editor-part .parameter-group { flex: 1 1 14em; min-width: 0; box-sizing: border-box; margin: 0; display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: flex-start; align-content: flex-start; } .reentry-editor-part input, .reentry-editor-part select { max-width: 100%; box-sizing: border-box; } .reentry-editor-part input[type="text"] { width: 12em; } .reentry-editor-part input[data-key="title"] { width: 18em; } .reentry-editor-part label { min-width: 0; max-width: 100%; } .reentry-editor-part input.parameter-derived::placeholder { opacity: .65; } .reentry-editor-part .launch-path { flex: 1 1 100%; min-width: 0; box-sizing: border-box; margin: 0; display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: flex-start; }';async setLanguage(e){const t=++this.languageToken;this.language=e;const[r,i]=await Promise.all([L.load(e),A.load(e)]);t===this.languageToken&&(this.messages=r,this.parameterTexts=i,this.render(),this.sync())}sync(){if(!this.messages)return;const e=this.reentries;this.shown=[...e],e.some(r=>r.id===this.currentId)||(this.currentId=e[0]?.id),this.list?.setItems(e.map(r=>({id:r.id,label:this.labelOf(r)})),this.currentId),this.syncAddState();const t=this.current;this.element("reentry-fields").hidden=t===void 0,t&&(this.syncPlace(!0),this.syncFragments(t,!0),this.form??=new b(this.element("reentry-parameters"),this.language,"reentry.",{said:()=>this.host.said(),writingLanguage:()=>this.host.writingLanguage()}),this.form.show(this.resolved(a.SET),new x(()=>this.current,r=>this.editReentry(i=>{i.object&&(i.object={...i.object}),r(i),i.object&&Object.values(i.object).every(n=>n===void 0||n==="")&&delete i.object})),()=>this.written()))}refresh(){if(!this.messages)return;this.syncAddState();const e=this.reentries;if(e.length===this.shown.length&&e.every((t,r)=>t.id===this.shown[r].id)){this.syncTimeline();return}this.sync()}setTime(e){this.messages&&this.timeline?.setTime(e)}syncAddState(){const e=this.origin()!==void 0;this.list?.setAddState(e,e?void 0:this.messages.addNowhere)}get current(){return this.reentries.find(e=>e.id===this.currentId)}show(e){this.messages&&(this.currentId=e,this.row="path",this.placeIndex=0,this.fragmentIndex=0,this.curveIndex=0,this.sync())}resolved(e){return P.resolve(e,this.parameterTexts)}render(){if(!this.messages)return;const e=this.messages;this.form=void 0,this.container.innerHTML=`<div class="launch-editor">
2
+ <p class="launch-intro">${e.intro}</p>
3
+ <div id="reentry-list"></div>
4
+ <div id="reentry-fields" class="launch-fields">
5
+ <div id="reentry-parameters" class="launch-parameters"></div>
6
+ <div id="reentry-timeline"></div>
7
+ <button id="reentry-fragment-add" type="button" title="${e.addFragment}">${T.PLUS} ${e.fragment}</button>
8
+ <p class="launch-intro">${e.timelineNote}</p>
9
+ <fieldset id="reentry-path" class="launch-path">
10
+ <legend>${e.path}</legend>
11
+ <div id="reentry-place-parameters" class="launch-parameters"></div>
12
+ <button id="reentry-place-delete" class="icon-btn" type="button" title="${e.deletePlace}" aria-label="${e.deletePlace}">${T.TRASH}</button>
13
+ </fieldset>
14
+ <fieldset id="reentry-fragments" class="launch-path">
15
+ <legend id="reentry-fragment-legend">${e.fragment}</legend>
16
+ <div id="reentry-fragment-parameters" class="launch-parameters"></div>
17
+ <button id="reentry-fragment-delete" class="icon-btn" type="button" title="${e.deleteFragment}" aria-label="${e.deleteFragment}">${T.TRASH}</button>
18
+ <fieldset id="reentry-curve" class="launch-path">
19
+ <legend>${e.curve}</legend>
20
+ <p id="reentry-curve-empty" class="launch-intro">${e.noCurve}</p>
21
+ <div id="reentry-curve-parameters" class="launch-parameters"></div>
22
+ <button id="reentry-curve-delete" class="icon-btn" type="button" title="${e.deleteCurvePoint}" aria-label="${e.deleteCurvePoint}">${T.TRASH}</button>
23
+ </fieldset>
24
+ </fieldset>
25
+ <p class="launch-intro">${e.derivedNote}</p>
26
+ </div>
27
+ </div>`,this.list=new F({header:this.element("reentry-list"),body:this.element("reentry-fields"),ids:{list:"reentry-select",remove:"reentry-delete",add:"reentry-add",kinds:"reentry-add-kind",kind:t=>`reentry-add-${t}`},onSelect:t=>this.show(t),onAdd:t=>this.addReentry(t==="reentry"?"reentry":"fireball"),onRemove:()=>this.deleteCurrent()}),this.list.setLabels({list:e.reentry,remove:e.deleteReentry,add:e.addReentry,empty:e.none}),this.list.setKinds([{value:"fireball",label:e.kindFireball},{value:"reentry",label:e.kindReentry}]),this.timeline=new _(this.element("reentry-timeline"),t=>this.host.seekTo(t),{addKeyframeHere:e.addPointHere,keyframeHere:e.pointHere,zoomHint:e.zoomHint}),this.element("reentry-place-delete").addEventListener("click",()=>this.removePlace()),this.element("reentry-curve-delete").addEventListener("click",()=>this.removeCurvePoint()),this.placeForm=void 0,this.element("reentry-fragment-add").addEventListener("click",()=>this.addFragment()),this.element("reentry-fragment-delete").addEventListener("click",()=>this.removeFragment()),this.fragmentForm=void 0,this.curveForm=void 0}written(){const e=this.current;e&&this.list?.rename(e.id,this.labelOf(e))}syncTimeline(){const e=this.current;if(!this.timeline||!e)return;const t=this.messages,r=e.track[0]?.t??0,i=e.track[e.track.length-1]?.t??0,n={id:"path",label:t.path,color:m.PATH_COLOR,times:e.track.map(c=>c.t),active:this.row==="path",selectedTime:this.row==="path"?e.track[this.placeIndex]?.t:void 0,open:()=>this.selectPlace(this.placeIndex),pressed:(c,o)=>{const p=o===void 0?-1:(this.current?.track??[]).findIndex(g=>g.t===o);this.selectPlace(p>=0?p:this.placeIndex)},move:(c,o)=>this.movePlace(c,o),add:()=>this.addPlaceAt(this.host.currentTime())},s=e.fragments.map((c,o)=>{const p=c.lightCurve??[];return{id:`fragment-${o}`,label:this.fragmentLabel(c,o),color:m.PIECE_COLOR,times:p.map(g=>g.t),spans:[{t:c.fromT??r,until:c.untilT??i,label:""}],active:this.row==="fragment"&&o===this.fragmentIndex,selectedTime:this.row==="fragment"&&o===this.fragmentIndex?p[this.curveIndex]?.t:void 0,open:()=>this.selectFragment(o),pressed:(g,y)=>{const E=y===void 0?-1:(this.current?.fragments[o]?.lightCurve??[]).findIndex(k=>k.t===y);this.selectFragment(o,E>=0?E:void 0)},move:(g,y)=>this.moveCurvePoint(o,g,y),add:()=>this.addCurvePointAt(o,this.host.currentTime())}}),l=a.instantsOf(e),d=Math.min(...l),f=Math.max(...l),I=Math.max(500,(f-d)/10);this.timeline.show([n,...s],this.host.duration(),this.host.currentTime(),{from:d-I,to:f+I})}static PATH_COLOR="#e08a1e";static PIECE_COLOR="#c0581b";static MIN_PLACES=2;syncPlace(e=!1){const t=this.current?.track??[];this.placeIndex=Math.max(0,Math.min(this.placeIndex,t.length-1)),this.element("reentry-place-delete").disabled=t.length<=m.MIN_PLACES,this.placeForm?this.placeForm.sync(e):(this.placeForm=new b(this.element("reentry-place-parameters"),this.language,"reentryPlace."),this.placeForm.show(this.resolved(a.PLACE),new x(()=>this.current?.track[this.placeIndex],r=>this.editPlace(this.placeIndex,r),void 0,this.host.positionPlace?.()),()=>{})),this.syncTimeline()}selectPlace(e){this.row="path",this.placeIndex=e,this.syncDetail(),this.syncPlace(!0)}syncDetail(){this.element("reentry-path").hidden=this.row!=="path",this.element("reentry-fragments").hidden=this.row!=="fragment";const e=this.currentFragment;this.element("reentry-fragment-legend").textContent=e?`${this.messages.fragment} ${this.fragmentLabel(e,this.fragmentIndex)}`:this.messages.fragment}editPlace(e,t){let r;this.editReentry(i=>{r={...i.track[e]},t(r),i.track=i.track.map((n,s)=>s===e?r:n).sort((n,s)=>n.t-s.t)}),r&&(this.placeIndex=this.current?.track.indexOf(r)??0),this.syncPlace()}movePlace(e,t){const r=this.current?.track.findIndex(i=>i.t===e)??-1;r<0||(this.editPlace(r,i=>{i.t=t}),this.syncPlace(!0))}addPlaceAt(e){const t=this.current;if(!t)return;const r=t.track.findIndex(n=>Math.abs(n.t-e)<1);if(r>=0){this.selectPlace(r);return}const i=a.placeAt(t,e);this.editReentry(n=>{n.track=[...n.track,i].sort((s,l)=>s.t-l.t)}),this.selectPlace(this.current?.track.indexOf(i)??0)}removePlace(){if((this.current?.track.length??0)<=m.MIN_PLACES)return;const e=this.placeIndex;this.editReentry(t=>{t.track=t.track.filter((r,i)=>i!==e)}),this.syncPlace(!0)}static MIN_FRAGMENTS=1;fragmentLabel(e,t){return e.id??String(t+1)}syncFragments(e,t=!1){const r=e.fragments;this.fragmentIndex=Math.max(0,Math.min(this.fragmentIndex,r.length-1)),this.element("reentry-fragment-delete").disabled=r.length<=m.MIN_FRAGMENTS,this.syncDetail(),this.fragmentForm?this.fragmentForm.sync(t):(this.fragmentForm=new b(this.element("reentry-fragment-parameters"),this.language,"reentryFragment."),this.fragmentForm.show(this.resolved(a.FRAGMENT),new x(()=>this.currentFragment,i=>this.editFragment(n=>i(n)),()=>this.current),()=>{})),this.syncCurve(t)}selectFragment(e,t){const r=e!==this.fragmentIndex;this.row="fragment",this.fragmentIndex=e,t!==void 0?this.curveIndex=t:r&&(this.curveIndex=0),this.current&&this.syncFragments(this.current,!0)}get currentFragment(){return this.current?.fragments[this.fragmentIndex]}editFragment(e,t=this.fragmentIndex){this.editReentry(r=>{const i={...r.fragments[t]};i.lightCurve&&(i.lightCurve=[...i.lightCurve]),e(i),r.fragments=r.fragments.map((n,s)=>s===t?i:n)}),this.syncDetail(),this.syncTimeline()}addFragment(){const e=this.current;if(!e)return;const t=e.fragments[e.fragments.length-1];let r=e.fragments.length+1;for(;e.fragments.some(n=>n.id===`piece-${r}`);)r++;const i={id:`piece-${r}`,lagS:(t?.lagS??0)+1,absoluteMagnitude:(t?.absoluteMagnitude??-4)+1};this.editReentry(n=>{n.fragments=[...n.fragments,i]}),this.selectFragment((this.current?.fragments.length??1)-1)}removeFragment(){if((this.current?.fragments.length??0)<=m.MIN_FRAGMENTS)return;const e=this.fragmentIndex;this.editReentry(t=>{t.fragments=t.fragments.filter((r,i)=>i!==e)}),this.curveIndex=0,this.selectFragment(Math.min(e,(this.current?.fragments.length??1)-1))}syncCurve(e=!1){const t=this.currentFragment?.lightCurve??[];this.curveIndex=Math.max(0,Math.min(this.curveIndex,t.length-1)),this.element("reentry-curve-empty").hidden=t.length>0,this.element("reentry-curve-parameters").hidden=t.length===0,this.element("reentry-curve-delete").hidden=t.length===0,this.curveForm?this.curveForm.sync(e):(this.curveForm=new b(this.element("reentry-curve-parameters"),this.language,"reentryCurve."),this.curveForm.show(this.resolved(a.CURVE_POINT),new x(()=>this.currentFragment?.lightCurve?.[this.curveIndex],r=>this.editCurvePoint(this.fragmentIndex,this.curveIndex,r)),()=>{})),this.syncTimeline()}editCurvePoint(e,t,r){let i;this.editFragment(n=>{const s=n.lightCurve??[];i={...s[t]},r(i),n.lightCurve=s.map((l,d)=>d===t?i:l).sort((l,d)=>l.t-d.t)},e),i&&(this.curveIndex=this.current?.fragments[e]?.lightCurve?.indexOf(i)??0),this.syncCurve()}moveCurvePoint(e,t,r){const i=this.current?.fragments[e]?.lightCurve?.findIndex(n=>n.t===t)??-1;i<0||(this.fragmentIndex=e,this.editCurvePoint(e,i,n=>{n.t=r}),this.syncFragments(this.current,!0))}addCurvePointAt(e,t){const r=this.current?.fragments[e];if(!r)return;const i=(r.lightCurve??[]).findIndex(s=>Math.abs(s.t-t)<1);if(i>=0){this.selectFragment(e,i);return}const n=a.curvePointAt(r,t);this.editFragment(s=>{s.lightCurve=[...s.lightCurve??[],n].sort((l,d)=>l.t-d.t)},e),this.selectFragment(e,this.current?.fragments[e]?.lightCurve?.indexOf(n)??0)}removeCurvePoint(){if(!this.currentFragment?.lightCurve?.length)return;const e=this.curveIndex;this.editFragment(t=>{const r=(t.lightCurve??[]).filter((i,n)=>n!==e);r.length?t.lightCurve=r:delete t.lightCurve}),this.syncCurve(!0)}editReentry(e){const t=this.current;if(!t)return;const r={...t,track:[...t.track],fragments:[...t.fragments]};e(r),this.writeReentries(this.reentries.map(i=>i===t?r:i)),this.host.changed()}origin(){const e=this.host.sighting(),t=e.event?.place?.[0];if(!(t?.lat===void 0||t.lng===void 0))return{lat:t.lat,lng:t.lng,headingRad:(e.observerTrack?.getInterpolatedPoseAt(0)?.headingDeg??0)*Math.PI/180}}newOf(e){const t=this.origin();if(!t)return;const r=Math.round(this.host.currentTime()),i=Math.max(.05,Math.cos(t.lat*Math.PI/180)),n=(s,l)=>{const d=s*Math.cos(t.headingRad)-l*Math.sin(t.headingRad),f=s*Math.sin(t.headingRad)+l*Math.cos(t.headingRad);return{lat:t.lat+d/111.32,lng:t.lng+f/(111.32*i)}};return e==="fireball"?{track:[{t:r,...n(150,-45),altitudeKm:100},{t:r+3e3,...n(150,45),altitudeKm:60}],fragments:[{id:"main",absoluteMagnitude:-6}]}:{track:[{t:r,...n(300,-225),altitudeKm:82},{t:r+6e4,...n(300,225),altitudeKm:72}],fragments:[{id:"main",absoluteMagnitude:-4},{id:"piece-2",lagS:1.5,absoluteMagnitude:-2.5},{id:"piece-3",lagS:3,absoluteMagnitude:-1.5}]}}addReentry(e){const t=this.newOf(e);if(!t)return;let r=this.reentries.length+1;for(;this.reentries.some(n=>n.id===`${e}-${r}`);)r++;const i={id:`${e}-${r}`,...t};this.writeReentries([...this.reentries,i]),this.host.changed(),this.show(i.id)}deleteCurrent(){const e=this.current;e&&(this.currentId=void 0,this.writeReentries(this.reentries.filter(t=>t!==e)),this.host.changed(),this.sync())}writeReentries(e){const t=this.host.sighting();t.skyEvents=M.written({...t.skyEvents,reentries:e})}labelOf(e){const t=this.host.said().read(e.title)||e.object?.name;return t?`${t} (${e.id})`:e.id}get reentries(){return this.host.sighting().skyEvents?.reentries??[]}element(e){return this.container.querySelector(`#${e}`)}}export{m as ReentryEditor};
@@ -0,0 +1 @@
1
+ const e={title:"Fireballs",name:"Re-entry",piece:"{name} — mag {mag}, {height} km up, {distance} km away",fragment:"{name}, a fragment — mag {mag}, {height} km up, {distance} km away"};export{e as reentryKindMessages_en};
@@ -0,0 +1 @@
1
+ const e={title:"Bólidos",name:"Reentrada atmosférica",piece:"{name} — mag {mag}, a {height} km de altitud y {distance} km",fragment:"{name}, un fragmento — mag {mag}, a {height} km de altitud y {distance} km"};export{e as reentryKindMessages_es};
@@ -0,0 +1 @@
1
+ const e={title:"Bolides",name:"Rentrée atmosphérique",piece:"{name} — mag {mag}, à {height} km d'altitude et {distance} km",fragment:"{name}, un fragment — mag {mag}, à {height} km d'altitude et {distance} km"};export{e as reentryKindMessages_fr};
@@ -0,0 +1 @@
1
+ const e={title:"Bolidi",name:"Rientro atmosferico",piece:"{name} — mag {mag}, a {height} km di quota e {distance} km",fragment:"{name}, un frammento — mag {mag}, a {height} km di quota e {distance} km"};export{e as reentryKindMessages_it};
@@ -0,0 +1 @@
1
+ const e={name:"Name",object:"Object",light:"Light",when:"When",fireballOrReEntry:"Fireball or re-entry",catalogueName:"Catalogue name",forAReEntryThePiece:'For a re-entry, the piece as the satellite catalogue names it: "SL-12 R/B". Empty for a meteor.',cosparId:"COSPAR id",t1968013c:"1968-013C",noradNumber:"NORAD number",pointOfThePath:"Point of the path",time:"Time",secondsOfTheRecordingNegativeBefore:"Seconds of the recording; negative before it began.",position:"Position",altitude:"Altitude",aboveTheEllipsoidAMeteorBegins:"Above the ellipsoid. A meteor begins to glow between 120 and 80 km; a satellite breaks up near 80.",piece:"Piece",id:"Id",absoluteMagnitude:"Absolute magnitude",itsBrightnessSeenFrom100Km:"Its brightness seen from 100 km, as fireball reports give it: −4 or brighter is a fireball, −17 a superbolide. Its light curve, when it has one, stands instead.",colour:"Colour",train:"Train",howLongAStretchOfIts:"How long a stretch of its own past path still glows behind it, seconds.",behindTheLead:"Behind the lead",secondsBehindTheLeadingPointAlong:"Seconds behind the leading point along the same path: 0 is the leading piece itself.",seenFrom:"Seen from",whenItBreaksOffOrBegins:"When it breaks off or begins to glow; empty, the start of the path.",outAt:"Out at",whenItHasBurnedUpOr:"When it has burned up or slowed below glowing; empty, the end of the path.",pointOfTheLightCurve:"Point of the light curve",secondsOfTheRecording:"Seconds of the recording."};export{e as reentryParameterTexts_en};
@@ -0,0 +1 @@
1
+ const e={name:"Nombre",object:"Objeto",light:"Luz",when:"Cuándo",fireballOrReEntry:"Bólido o reentrada",catalogueName:"Nombre en el catálogo",forAReEntryThePiece:"Para una reentrada, la pieza como la nombra el catálogo de satélites: «SL-12 R/B». Vacío para un meteoro.",cosparId:"Identificador COSPAR",t1968013c:"1968-013C",noradNumber:"Número NORAD",pointOfThePath:"Punto del trayecto",time:"Instante",secondsOfTheRecordingNegativeBefore:"Segundos de la grabación; negativos antes de su inicio.",position:"Posición",altitude:"Altitud",aboveTheEllipsoidAMeteorBegins:"Sobre el elipsoide. Un meteoro se enciende entre 120 y 80 km; un satélite se rompe hacia los 80.",piece:"Pieza",id:"Identificador",absoluteMagnitude:"Magnitud absoluta",itsBrightnessSeenFrom100Km:"Su brillo visto a 100 km, como lo dan los informes de bólidos: −4 o más brillante es un bólido, −17 un superbólido. Su curva de luz, cuando la tiene, vale en su lugar.",colour:"Color",train:"Estela",howLongAStretchOfIts:"Cuántos segundos de su propio trayecto siguen brillando detrás de él.",behindTheLead:"Retraso sobre la cabeza",secondsBehindTheLeadingPointAlong:"Segundos de retraso sobre el punto de cabeza, en el mismo trayecto: 0 es la propia pieza de cabeza.",seenFrom:"Visto desde",whenItBreaksOffOrBegins:"Cuando se desprende o se enciende; vacío, el inicio del trayecto.",outAt:"Apagado a",whenItHasBurnedUpOr:"Cuando se ha consumido o ha frenado demasiado para brillar; vacío, el final del trayecto.",pointOfTheLightCurve:"Punto de la curva de luz",secondsOfTheRecording:"Segundos de la grabación."};export{e as reentryParameterTexts_es};
@@ -0,0 +1 @@
1
+ const e={name:"Nom",object:"Objet",light:"Lumière",when:"Quand",fireballOrReEntry:"Bolide ou rentrée",catalogueName:"Nom au catalogue",forAReEntryThePiece:"Pour une rentrée, la pièce comme le catalogue des satellites la nomme : « SL-12 R/B ». Vide pour un météore.",cosparId:"Identifiant COSPAR",t1968013c:"1968-013C",noradNumber:"Numéro NORAD",pointOfThePath:"Point du trajet",time:"Instant",secondsOfTheRecordingNegativeBefore:"Secondes de l'enregistrement ; négatives avant son début.",position:"Position",altitude:"Altitude",aboveTheEllipsoidAMeteorBegins:"Au-dessus de l'ellipsoïde. Un météore s'allume entre 120 et 80 km ; un satellite se brise vers 80.",piece:"Pièce",id:"Identifiant",absoluteMagnitude:"Magnitude absolue",itsBrightnessSeenFrom100Km:"Son éclat vu à 100 km, comme le donnent les rapports de bolides : −4 ou plus brillant est un bolide, −17 un superbolide. Sa courbe de lumière, quand il en a une, vaut à la place.",colour:"Couleur",train:"Traînée",howLongAStretchOfIts:"Combien de secondes de son propre trajet brillent encore derrière lui.",behindTheLead:"Retard sur la tête",secondsBehindTheLeadingPointAlong:"Secondes de retard sur le point de tête, sur le même trajet : 0 est la pièce de tête elle-même.",seenFrom:"Vu à partir de",whenItBreaksOffOrBegins:"Quand il se détache ou s'allume ; vide, le début du trajet.",outAt:"Éteint à",whenItHasBurnedUpOr:"Quand il s'est consumé ou a trop ralenti pour briller ; vide, la fin du trajet.",pointOfTheLightCurve:"Point de la courbe de lumière",secondsOfTheRecording:"Secondes de l'enregistrement."};export{e as reentryParameterTexts_fr};