@rr0/ufoathome 0.177.2 → 0.178.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 (264) hide show
  1. package/dist-embed-interview/rr0-interview.mjs +3 -3
  2. package/dist-embed-scene/{AdsbLolArchiveProvider-BHGe8FVN.js → AdsbLolArchiveProvider-B0Yi081_.js} +1 -1
  3. package/dist-embed-scene/{BeamEditor-zq64GorX.js → BeamEditor-DFGRzRny.js} +1 -1
  4. package/dist-embed-scene/{BeamSystem-BXee1GYk.js → BeamSystem-ebEMoYD3.js} +1 -1
  5. package/dist-embed-scene/{ContrailSystem-BSbI2jUe.js → ContrailSystem-Bn--uCNU.js} +1 -1
  6. package/dist-embed-scene/ControlPasses-BMma2JRm.js +29 -0
  7. package/dist-embed-scene/FilmChrome-DYiyzoB_.js +1 -0
  8. package/dist-embed-scene/{Flightradar24Provider-Dx2Fb8yO.js → Flightradar24Provider-CpwhYfIE.js} +1 -1
  9. package/dist-embed-scene/GLTFLoader-BxToReDu.js +1 -0
  10. package/dist-embed-scene/GenerativeKit-DR6C3LMC.js +4 -0
  11. package/dist-embed-scene/GenerativeKitMessages-Cu7wXgYa.js +1 -0
  12. package/dist-embed-scene/GenerativeKitMessages_en-Cl3kA96x.js +33 -0
  13. package/dist-embed-scene/GenerativeKitMessages_es-CEU93Cl3.js +33 -0
  14. package/dist-embed-scene/GenerativeKitMessages_fr-DmW0OAmF.js +33 -0
  15. package/dist-embed-scene/GenerativeKitMessages_it-Ba87kumS.js +33 -0
  16. package/dist-embed-scene/{HeadlightSystem-_BIIKhQ2.js → HeadlightSystem-l2XbBvXf.js} +1 -1
  17. package/dist-embed-scene/LanternEditor-H8VYYbRn.js +9 -0
  18. package/dist-embed-scene/{LaserBeam-DmH2JeMa.js → LaserBeam-B48FKTrt.js} +1 -1
  19. package/dist-embed-scene/LaunchEditor-CIYcS0Y-.js +22 -0
  20. package/dist-embed-scene/{LaunchPlume-BRnjFVcY.js → LaunchPlume-eEIp7_hM.js} +1 -1
  21. package/dist-embed-scene/{LaunchSimulation-DL7QBfEl.js → LaunchSimulation-DNNEzmzs.js} +1 -1
  22. package/dist-embed-scene/{ModuleSession-BvQABNEZ.js → ModuleSession-DLoAutYP.js} +2 -2
  23. package/dist-embed-scene/ModuleThree-R2LhnY95.js +1 -0
  24. package/dist-embed-scene/{ParameterForm-BMIW4Gkh.js → ParameterForm-ez-n_0Dw.js} +9 -9
  25. package/dist-embed-scene/{RailwaySystem-DZQr_rS_.js → RailwaySystem-C3Y0a9aT.js} +1 -1
  26. package/dist-embed-scene/{ReentryEditor-DJO_M-8-.js → ReentryEditor-CwY4oANp.js} +1 -1
  27. package/dist-embed-scene/{ReentrySimulation-pWRgNLjt.js → ReentrySimulation-BDgEPekW.js} +1 -1
  28. package/dist-embed-scene/ReferenceSystem-D9IdSvFM.js +1 -0
  29. package/dist-embed-scene/{SceneNames_en-CqzjDgS4.js → SceneNames_en-BCTAMSLj.js} +1 -1
  30. package/dist-embed-scene/{SceneNames_es-DMfxIS0T.js → SceneNames_es-BOWBdXXS.js} +1 -1
  31. package/dist-embed-scene/{SceneNames_fr-DydzEE4a.js → SceneNames_fr-De6iQ9ff.js} +1 -1
  32. package/dist-embed-scene/{SceneNames_it-DJAACEvb.js → SceneNames_it-DfBWbCPR.js} +1 -1
  33. package/dist-embed-scene/{TimelineTracks-B-bXAaF7.js → TimelineTracks-BQXJMJaJ.js} +1 -1
  34. package/dist-embed-scene/{TraceSystem-gVZk_ffU.js → TraceSystem-BD6YpW6g.js} +2 -2
  35. package/dist-embed-scene/UfoMessages_en-CXQNZd8v.js +1 -0
  36. package/dist-embed-scene/UfoMessages_es-CO-v8Jl6.js +1 -0
  37. package/dist-embed-scene/UfoMessages_fr-CGkQBn5r.js +1 -0
  38. package/dist-embed-scene/UfoMessages_it-BScqxIaH.js +1 -0
  39. package/dist-embed-scene/VideoButton-Cy_r767Z.js +1 -0
  40. package/dist-embed-scene/VideoExport-B8ZhHNnd.js +169 -0
  41. package/dist-embed-scene/{WaterSystem-DI_NBDfH.js → WaterSystem-DbyWlKho.js} +1 -1
  42. package/dist-embed-scene/browser-CltifEM0.js +1 -0
  43. package/dist-embed-scene/logo-h2-w4Mwu.png +0 -0
  44. package/dist-embed-scene/rr0-scene.mjs +426 -296
  45. package/dist-embed-scene/{sightingSchema-BfOYR_OD.js → sightingSchema-pBDQNwMz.js} +1 -1
  46. package/dist-embed-scene/trafficRuntime-CJIPy2oO.js +2 -0
  47. package/dist-embed-sighting/{AdsbLolArchiveProvider-DK4qEYPv.js → AdsbLolArchiveProvider-BqLvFUVC.js} +1 -1
  48. package/dist-embed-sighting/{BallesterGuaspAssessor-FGskpWWG.js → BallesterGuaspAssessor-CLQvJKlm.js} +1 -1
  49. package/dist-embed-sighting/{BeamEditor-BglkfKa6.js → BeamEditor-CcOf6lNz.js} +1 -1
  50. package/dist-embed-sighting/{BeamSystem-DDtPjozC.js → BeamSystem-B5d0Ymn5.js} +1 -1
  51. package/dist-embed-sighting/CaseExportMessages_en-jHlu58Y7.js +1 -0
  52. package/dist-embed-sighting/CaseExportMessages_es-dCQQFgjq.js +1 -0
  53. package/dist-embed-sighting/CaseExportMessages_fr-sDfEgjWg.js +1 -0
  54. package/dist-embed-sighting/CaseExportMessages_it-BJaglZtP.js +1 -0
  55. package/dist-embed-sighting/CaseMessages_en-CBS5QChl.js +1 -0
  56. package/dist-embed-sighting/CaseMessages_es-DAMl4aTC.js +1 -0
  57. package/dist-embed-sighting/CaseMessages_fr-C3wQxAk_.js +1 -0
  58. package/dist-embed-sighting/CaseMessages_it-CyrREg6v.js +1 -0
  59. package/dist-embed-sighting/CaseReportExport-Uf7Bs2Qz.js +65 -0
  60. package/dist-embed-sighting/CaseReportTexts_en-DlN7p1pC.js +1 -0
  61. package/dist-embed-sighting/CaseReportTexts_es-CncAEaey.js +1 -0
  62. package/dist-embed-sighting/CaseReportTexts_fr-B5nP6RlP.js +1 -0
  63. package/dist-embed-sighting/CaseReportTexts_it-Dc-oPmXB.js +1 -0
  64. package/dist-embed-sighting/{ContrailSystem-DXV0DnrQ.js → ContrailSystem-CqpZgLkb.js} +1 -1
  65. package/dist-embed-sighting/ControlPasses-BxgSO3B9.js +29 -0
  66. package/dist-embed-sighting/FilmChrome-DYiyzoB_.js +1 -0
  67. package/dist-embed-sighting/{Flightradar24Provider-Ch4GdVJG.js → Flightradar24Provider-DQtEJ3tX.js} +1 -1
  68. package/dist-embed-sighting/GLTFLoader-VIIHsteW.js +1 -0
  69. package/dist-embed-sighting/GenerativeKit-DR6C3LMC.js +4 -0
  70. package/dist-embed-sighting/GenerativeKitMessages-BudEc93g.js +1 -0
  71. package/dist-embed-sighting/GenerativeKitMessages_en-Cl3kA96x.js +33 -0
  72. package/dist-embed-sighting/GenerativeKitMessages_es-CEU93Cl3.js +33 -0
  73. package/dist-embed-sighting/GenerativeKitMessages_fr-DmW0OAmF.js +33 -0
  74. package/dist-embed-sighting/GenerativeKitMessages_it-Ba87kumS.js +33 -0
  75. package/dist-embed-sighting/HeadlightSystem-B4RR270O.js +34 -0
  76. package/dist-embed-sighting/{HynekAssessor-Cb8mZ9Ib.js → HynekAssessor-CJ9APziM.js} +1 -1
  77. package/dist-embed-sighting/LanternEditor-D1BA5pRP.js +9 -0
  78. package/dist-embed-sighting/{LaserBeam-DkKFSSp_.js → LaserBeam-BjjC_CzP.js} +1 -1
  79. package/dist-embed-sighting/LaunchEditor-TTSgWqbE.js +22 -0
  80. package/dist-embed-sighting/LaunchPlume-B2Fjd2_C.js +1 -0
  81. package/dist-embed-sighting/{LaunchSimulation-DUvH6_BB.js → LaunchSimulation-BcmPicEe.js} +1 -1
  82. package/dist-embed-sighting/{ModuleSession-GzfQ8_LE.js → ModuleSession-CY9_UusZ.js} +2 -2
  83. package/dist-embed-sighting/ModuleThree-BhryLUjX.js +1 -0
  84. package/dist-embed-sighting/{NearestApproach-BeKwz4vK.js → NearestApproach-iBLl7o1g.js} +1 -1
  85. package/dist-embed-sighting/ParameterForm-BaUeWd7v.js +91 -0
  86. package/dist-embed-sighting/{PoherAssessor-JLqDISRf.js → PoherAssessor-DDRUgnRW.js} +1 -1
  87. package/dist-embed-sighting/RailwaySystem-C1nfRJfj.js +41 -0
  88. package/dist-embed-sighting/ReadingSensitivityMessages_en-CF6XauSj.js +1 -0
  89. package/dist-embed-sighting/ReadingSensitivityMessages_es-Ca-13TTT.js +1 -0
  90. package/dist-embed-sighting/ReadingSensitivityMessages_fr-Djdd6Hdq.js +1 -0
  91. package/dist-embed-sighting/ReadingSensitivityMessages_it-CPUXxMqD.js +1 -0
  92. package/dist-embed-sighting/{ReentryEditor-BHgPXlx3.js → ReentryEditor-CGN3ewTE.js} +1 -1
  93. package/dist-embed-sighting/ReentrySimulation-C2kIulZ6.js +1 -0
  94. package/dist-embed-sighting/{ReferenceSystem-B5diz1Lt.js → ReferenceSystem-BRTCOQHk.js} +1 -1
  95. package/dist-embed-sighting/{RoadMarkings-Dv3xdtFG.js → RoadMarkings-CNLt-BEg.js} +1 -1
  96. package/dist-embed-sighting/{SceneNames_en-BbQ55UYu.js → SceneNames_en-ChY7v63o.js} +1 -1
  97. package/dist-embed-sighting/{SceneNames_es-DsJpGSDK.js → SceneNames_es-DH4YgJV5.js} +1 -1
  98. package/dist-embed-sighting/{SceneNames_fr-CKr5m8QL.js → SceneNames_fr-Ca52lykk.js} +1 -1
  99. package/dist-embed-sighting/{SceneNames_it-qSw1j95v.js → SceneNames_it-BQe9GLaj.js} +1 -1
  100. package/dist-embed-sighting/{SightingMessages_en-DuokT218.js → SightingMessages_en-Xm6PILcs.js} +1 -1
  101. package/dist-embed-sighting/{SightingMessages_es-JO8WQ1_V.js → SightingMessages_es-DMp0MUjJ.js} +1 -1
  102. package/dist-embed-sighting/{SightingMessages_fr-3C2RZVNA.js → SightingMessages_fr-NvQKGPaf.js} +1 -1
  103. package/dist-embed-sighting/{SightingMessages_it-BEMBUACg.js → SightingMessages_it-CKIf49Zt.js} +1 -1
  104. package/dist-embed-sighting/{TimelineTracks-XzShW15O.js → TimelineTracks-Ddv5sZHp.js} +1 -1
  105. package/{dist-embed-sighting-editor/TraceSystem-CDHG18il.js → dist-embed-sighting/TraceSystem-BkUPo1Xf.js} +2 -2
  106. package/dist-embed-sighting/UfoMessages_en-cLvtpfIC.js +1 -0
  107. package/dist-embed-sighting/UfoMessages_es-CO-v8Jl6.js +1 -0
  108. package/dist-embed-sighting/UfoMessages_fr-CGkQBn5r.js +1 -0
  109. package/dist-embed-sighting/UfoMessages_it-BScqxIaH.js +1 -0
  110. package/dist-embed-sighting/VideoButton-C62NkJrH.js +1 -0
  111. package/dist-embed-sighting/VideoExport-B8ZhHNnd.js +169 -0
  112. package/dist-embed-sighting/{WaterSystem-CcLIPQfy.js → WaterSystem-DrSAhM5g.js} +1 -1
  113. package/dist-embed-sighting/browser-CltifEM0.js +1 -0
  114. package/dist-embed-sighting/logo-h2-w4Mwu.png +0 -0
  115. package/dist-embed-sighting/rr0-sighting.mjs +531 -337
  116. package/dist-embed-sighting/{sightingSchema-BfOYR_OD.js → sightingSchema-pBDQNwMz.js} +1 -1
  117. package/dist-embed-sighting/trafficRuntime-CFgDqQz4.js +2 -0
  118. package/dist-embed-sighting-editor/{AdsbLolArchiveProvider-CXB-CDQ2.js → AdsbLolArchiveProvider-fZkxLAHp.js} +1 -1
  119. package/dist-embed-sighting-editor/{BallesterGuaspAssessor-Bb8Kl2FU.js → BallesterGuaspAssessor-DASadJjI.js} +1 -1
  120. package/dist-embed-sighting-editor/{BeamEditor-DJtZYFp0.js → BeamEditor-B2diaX_e.js} +1 -1
  121. package/dist-embed-sighting-editor/{BeamSystem-C6Wk_vNQ.js → BeamSystem-BfNJfayv.js} +1 -1
  122. package/dist-embed-sighting-editor/{BodyEditor-Cj7TgjV-.js → BodyEditor-CCBXFuuL.js} +1 -1
  123. package/dist-embed-sighting-editor/BodyEditorMessages_en-CckxSS1L.js +1 -0
  124. package/dist-embed-sighting-editor/BodyEditorMessages_es-B8GlFFBo.js +1 -0
  125. package/dist-embed-sighting-editor/BodyEditorMessages_fr-638ypdqf.js +1 -0
  126. package/dist-embed-sighting-editor/BodyEditorMessages_it-SKpMkHFI.js +1 -0
  127. package/dist-embed-sighting-editor/CaseEditorMessages_en-DrJY0M8h.js +1 -0
  128. package/dist-embed-sighting-editor/CaseEditorMessages_es-j8EeOBq6.js +1 -0
  129. package/dist-embed-sighting-editor/CaseEditorMessages_fr-BkwEF9mu.js +1 -0
  130. package/dist-embed-sighting-editor/CaseEditorMessages_it-d3Z0PBEw.js +1 -0
  131. package/dist-embed-sighting-editor/CaseExportMessages_en-jHlu58Y7.js +1 -0
  132. package/dist-embed-sighting-editor/CaseExportMessages_es-dCQQFgjq.js +1 -0
  133. package/dist-embed-sighting-editor/CaseExportMessages_fr-sDfEgjWg.js +1 -0
  134. package/dist-embed-sighting-editor/CaseExportMessages_it-BJaglZtP.js +1 -0
  135. package/dist-embed-sighting-editor/CaseReportExport-iCzv1W9B.js +65 -0
  136. package/dist-embed-sighting-editor/CaseReportTexts_en-DlN7p1pC.js +1 -0
  137. package/dist-embed-sighting-editor/CaseReportTexts_es-CncAEaey.js +1 -0
  138. package/dist-embed-sighting-editor/CaseReportTexts_fr-B5nP6RlP.js +1 -0
  139. package/dist-embed-sighting-editor/CaseReportTexts_it-Dc-oPmXB.js +1 -0
  140. package/dist-embed-sighting-editor/{ContrailSystem-e-OLIzTk.js → ContrailSystem-BWvO9taK.js} +1 -1
  141. package/dist-embed-sighting-editor/ControlPasses-BQ_DUxa_.js +29 -0
  142. package/dist-embed-sighting-editor/{CoverageAssessor-DUDmS-aG.js → CoverageAssessor-CSktyUlP.js} +1 -1
  143. package/dist-embed-sighting-editor/FilmChrome-DYiyzoB_.js +1 -0
  144. package/dist-embed-sighting-editor/{Flightradar24Provider-DtcvpdT3.js → Flightradar24Provider-OvRZWZWj.js} +1 -1
  145. package/dist-embed-sighting-editor/{GLTFLoader-AHdd-c6G.js → GLTFLoader-CM7Uk25s.js} +1 -1
  146. package/dist-embed-sighting-editor/GenerativeKit-DR6C3LMC.js +4 -0
  147. package/dist-embed-sighting-editor/GenerativeKitMessages-BNXaLr1m.js +1 -0
  148. package/dist-embed-sighting-editor/GenerativeKitMessages_en-Cl3kA96x.js +33 -0
  149. package/dist-embed-sighting-editor/GenerativeKitMessages_es-CEU93Cl3.js +33 -0
  150. package/dist-embed-sighting-editor/GenerativeKitMessages_fr-DmW0OAmF.js +33 -0
  151. package/dist-embed-sighting-editor/GenerativeKitMessages_it-Ba87kumS.js +33 -0
  152. package/dist-embed-sighting-editor/{GeoExportTexts-DAllttgw.js → GeoExportTexts-DBGGdRnP.js} +1 -1
  153. package/dist-embed-sighting-editor/{GeoJsonExport-3snOe-2J.js → GeoJsonExport-BZ-0v8fM.js} +1 -1
  154. package/dist-embed-sighting-editor/GeographicFigures-DqhWddS9.js +1 -0
  155. package/dist-embed-sighting-editor/{HeadlightSystem-CLhqQjbe.js → HeadlightSystem-C-8Gl3vu.js} +1 -1
  156. package/dist-embed-sighting-editor/{HynekAssessor-DvVp-CLS.js → HynekAssessor-CH2E88xV.js} +1 -1
  157. package/dist-embed-sighting-editor/{InterviewEditorElement-44XFadV4.js → InterviewEditorElement-Bz3hyZ-m.js} +2 -2
  158. package/dist-embed-sighting-editor/{KmlExport-B0SKgn4U.js → KmlExport-Bh4eTycx.js} +1 -1
  159. package/dist-embed-sighting-editor/{KmlImport-B9mAzJwr.js → KmlImport-CKxaATTA.js} +1 -1
  160. package/dist-embed-sighting-editor/LanternEditor-tTk1vUZm.js +9 -0
  161. package/dist-embed-sighting-editor/{LaserBeam-QJPhnVO_.js → LaserBeam-CtogDP38.js} +1 -1
  162. package/dist-embed-sighting-editor/LaunchEditor-CteAalch.js +22 -0
  163. package/dist-embed-sighting-editor/{LaunchPlume-C_r62XTj.js → LaunchPlume-BtRrJTP9.js} +1 -1
  164. package/dist-embed-sighting-editor/{LaunchSimulation-BSDTfZTv.js → LaunchSimulation-xKwguVJt.js} +1 -1
  165. package/dist-embed-sighting-editor/{ModelSource-B85niY1n.js → ModelSource-CnKzaNDn.js} +1 -1
  166. package/dist-embed-sighting-editor/{ModelThumbnails-uYh2sUIb.js → ModelThumbnails-UE_Er5EW.js} +1 -1
  167. package/dist-embed-sighting-editor/{ModelViewer-DLZhhuq5.js → ModelViewer-DoCshJc6.js} +1 -1
  168. package/dist-embed-sighting-editor/{ModuleConformance-CBMdTSVo.js → ModuleConformance-BKvZnuw9.js} +2 -2
  169. package/dist-embed-sighting-editor/{ModuleSession-rFLStWcj.js → ModuleSession-CJstaNEN.js} +3 -3
  170. package/dist-embed-sighting-editor/ModuleThree-1hxqvWFa.js +1 -0
  171. package/dist-embed-sighting-editor/{ModulesPanelElement-CGp6DrpQ.js → ModulesPanelElement-DdGqqdn4.js} +3 -3
  172. package/dist-embed-sighting-editor/{NearestApproach-Ctw1-XBO.js → NearestApproach-BH3Yw8Qz.js} +1 -1
  173. package/dist-embed-sighting-editor/{PictureRegistration-ZyvGfReK.js → PictureRegistration-B9C6iY17.js} +1 -1
  174. package/dist-embed-sighting-editor/{PoherAssessor-CLKwvgUL.js → PoherAssessor-DWcCWUfa.js} +1 -1
  175. package/dist-embed-sighting-editor/RailwaySystem-D3VBmx1X.js +41 -0
  176. package/dist-embed-sighting-editor/ReadingSensitivityMessages_en-CF6XauSj.js +1 -0
  177. package/dist-embed-sighting-editor/ReadingSensitivityMessages_es-Ca-13TTT.js +1 -0
  178. package/dist-embed-sighting-editor/ReadingSensitivityMessages_fr-Djdd6Hdq.js +1 -0
  179. package/dist-embed-sighting-editor/ReadingSensitivityMessages_it-CPUXxMqD.js +1 -0
  180. package/dist-embed-sighting-editor/{ReentryEditor-DXe8wen6.js → ReentryEditor-BDyG-48K.js} +2 -2
  181. package/dist-embed-sighting-editor/{ReentrySimulation-BxVE5Dsn.js → ReentrySimulation-BQj0wWXW.js} +1 -1
  182. package/dist-embed-sighting-editor/ReferenceSystem-C9NRL7UY.js +1 -0
  183. package/dist-embed-sighting-editor/RoadMarkings-ByQL2MTo.js +1 -0
  184. package/dist-embed-sighting-editor/SceneNames_en-BdRB6cjg.js +1 -0
  185. package/dist-embed-sighting-editor/SceneNames_es-Dk0UmXHp.js +1 -0
  186. package/dist-embed-sighting-editor/SceneNames_fr-_z2iZ8Bm.js +1 -0
  187. package/dist-embed-sighting-editor/SceneNames_it-CE7fanb3.js +1 -0
  188. package/dist-embed-sighting-editor/{SightingEditorMessages_en-G8-sD56V.js → SightingEditorMessages_en-jinQLW0J.js} +1 -1
  189. package/dist-embed-sighting-editor/{SightingEditorMessages_es-DEmsmIRU.js → SightingEditorMessages_es-CsrGiJYn.js} +1 -1
  190. package/dist-embed-sighting-editor/{SightingEditorMessages_fr-D2HXab_N.js → SightingEditorMessages_fr-cQ6KnPU1.js} +1 -1
  191. package/dist-embed-sighting-editor/{SightingEditorMessages_it-LpFdlGY5.js → SightingEditorMessages_it-D3Rqso5s.js} +1 -1
  192. package/dist-embed-sighting-editor/{SightingFileEditor-CnKF2ndt.js → SightingFileEditor-BCjntT4l.js} +1 -1
  193. package/dist-embed-sighting-editor/{TraceImport-CL8lefw6.js → TraceImport-uGVIjCrc.js} +2 -2
  194. package/{dist-embed-sighting/TraceSystem-XybhI4uJ.js → dist-embed-sighting-editor/TraceSystem-g262KZ3G.js} +2 -2
  195. package/dist-embed-sighting-editor/UfoMessages_en-JeMK-39o.js +1 -0
  196. package/dist-embed-sighting-editor/UfoMessages_es-CO-v8Jl6.js +1 -0
  197. package/dist-embed-sighting-editor/UfoMessages_fr-CGkQBn5r.js +1 -0
  198. package/dist-embed-sighting-editor/UfoMessages_it-BScqxIaH.js +1 -0
  199. package/dist-embed-sighting-editor/VideoButton-CqCZ65oK.js +1 -0
  200. package/dist-embed-sighting-editor/VideoExport-B8ZhHNnd.js +169 -0
  201. package/dist-embed-sighting-editor/WaterSystem-CIbQPMqE.js +1 -0
  202. package/dist-embed-sighting-editor/browser-CltifEM0.js +1 -0
  203. package/dist-embed-sighting-editor/logo-h2-w4Mwu.png +0 -0
  204. package/dist-embed-sighting-editor/rr0-sighting-editor.mjs +610 -398
  205. package/dist-embed-sighting-editor/{sightingSchema-9xw8srxN.js → sightingSchema-RamhmoRU.js} +1 -1
  206. package/dist-embed-sighting-editor/{surroundingsSources-DXpzMDPy.js → surroundingsSources-BExFsNzP.js} +1 -1
  207. package/dist-embed-sighting-editor/trafficRuntime-CPRQW0Ho.js +2 -0
  208. package/package.json +2 -1
  209. package/dist-embed-scene/GLTFLoader-DDba3PaV.js +0 -1
  210. package/dist-embed-scene/LanternEditor-2q5seAWj.js +0 -9
  211. package/dist-embed-scene/LaunchEditor-Cupksu8A.js +0 -22
  212. package/dist-embed-scene/ModuleThree-12Uq6OyD.js +0 -1
  213. package/dist-embed-scene/ReferenceSystem-D9agTeWl.js +0 -1
  214. package/dist-embed-scene/UfoMessages_en-CRIdIMYy.js +0 -1
  215. package/dist-embed-scene/UfoMessages_es-BoulVpJw.js +0 -1
  216. package/dist-embed-scene/UfoMessages_fr-8f6FJbk6.js +0 -1
  217. package/dist-embed-scene/UfoMessages_it-cngzFg3N.js +0 -1
  218. package/dist-embed-scene/browser-_Ncw3Jhn.js +0 -1
  219. package/dist-embed-scene/trafficRuntime-BDtw1Kqi.js +0 -2
  220. package/dist-embed-sighting/CaseMessages_en-DEyvxYxv.js +0 -1
  221. package/dist-embed-sighting/CaseMessages_es-DDsQ93tK.js +0 -1
  222. package/dist-embed-sighting/CaseMessages_fr-DoHbDEkG.js +0 -1
  223. package/dist-embed-sighting/CaseMessages_it-CF8sKknV.js +0 -1
  224. package/dist-embed-sighting/GLTFLoader-BDyucwJ-.js +0 -1
  225. package/dist-embed-sighting/HeadlightSystem-DGUfgm2c.js +0 -34
  226. package/dist-embed-sighting/LanternEditor-CaZ1JhZS.js +0 -9
  227. package/dist-embed-sighting/LaunchEditor-QRG2uHH8.js +0 -22
  228. package/dist-embed-sighting/LaunchPlume-DBINBQgQ.js +0 -1
  229. package/dist-embed-sighting/ModuleThree-tnKi-oul.js +0 -1
  230. package/dist-embed-sighting/ParameterForm-DW6cQmYI.js +0 -91
  231. package/dist-embed-sighting/RailwaySystem-BfTJvmf3.js +0 -41
  232. package/dist-embed-sighting/ReentrySimulation-C3BR2hs3.js +0 -1
  233. package/dist-embed-sighting/UfoMessages_en-CoSqGYwb.js +0 -1
  234. package/dist-embed-sighting/UfoMessages_es-BoulVpJw.js +0 -1
  235. package/dist-embed-sighting/UfoMessages_fr-8f6FJbk6.js +0 -1
  236. package/dist-embed-sighting/UfoMessages_it-cngzFg3N.js +0 -1
  237. package/dist-embed-sighting/browser-_Ncw3Jhn.js +0 -1
  238. package/dist-embed-sighting/trafficRuntime-BAuwwA-Z.js +0 -2
  239. package/dist-embed-sighting-editor/BodyEditorMessages_en-zfy3BJb5.js +0 -1
  240. package/dist-embed-sighting-editor/BodyEditorMessages_es-w95anMnI.js +0 -1
  241. package/dist-embed-sighting-editor/BodyEditorMessages_fr-ixsDgTbt.js +0 -1
  242. package/dist-embed-sighting-editor/BodyEditorMessages_it-B3oQzqHE.js +0 -1
  243. package/dist-embed-sighting-editor/CaseEditorMessages_en-D47ntA6R.js +0 -1
  244. package/dist-embed-sighting-editor/CaseEditorMessages_es-CyIdBeD_.js +0 -1
  245. package/dist-embed-sighting-editor/CaseEditorMessages_fr-DXaZI1jZ.js +0 -1
  246. package/dist-embed-sighting-editor/CaseEditorMessages_it-Cp1-Jm34.js +0 -1
  247. package/dist-embed-sighting-editor/GeographicFigures-CLBS2HJ-.js +0 -1
  248. package/dist-embed-sighting-editor/LanternEditor-ngKN2Zt3.js +0 -9
  249. package/dist-embed-sighting-editor/LaunchEditor-B8KlP5eo.js +0 -22
  250. package/dist-embed-sighting-editor/ModuleThree-DrKN6B-3.js +0 -1
  251. package/dist-embed-sighting-editor/RailwaySystem-C67LdkZv.js +0 -41
  252. package/dist-embed-sighting-editor/ReferenceSystem-B201fXMC.js +0 -1
  253. package/dist-embed-sighting-editor/RoadMarkings-DJ2HL-6g.js +0 -1
  254. package/dist-embed-sighting-editor/SceneNames_en-DggkchR4.js +0 -1
  255. package/dist-embed-sighting-editor/SceneNames_es-BtXXqtTk.js +0 -1
  256. package/dist-embed-sighting-editor/SceneNames_fr-I6FOP0oQ.js +0 -1
  257. package/dist-embed-sighting-editor/SceneNames_it-DrW4eXBX.js +0 -1
  258. package/dist-embed-sighting-editor/UfoMessages_en-BxhQNf5z.js +0 -1
  259. package/dist-embed-sighting-editor/UfoMessages_es-BoulVpJw.js +0 -1
  260. package/dist-embed-sighting-editor/UfoMessages_fr-8f6FJbk6.js +0 -1
  261. package/dist-embed-sighting-editor/UfoMessages_it-cngzFg3N.js +0 -1
  262. package/dist-embed-sighting-editor/WaterSystem-B2xlCmn2.js +0 -1
  263. package/dist-embed-sighting-editor/browser-_Ncw3Jhn.js +0 -1
  264. package/dist-embed-sighting-editor/trafficRuntime-_7Uw8kC_.js +0 -2
@@ -1 +0,0 @@
1
- import{o as a,V as e,bd as s,z as t,H as r,a3 as i,p as o,Y as n,P as l,y as d,aj as u,a4 as b,a5 as m,be as M,e as B,J as y,d as G,v as S,aC as f,az as h,aD as c,G as p,aR as C,F as g,bf as x,K as D,bg as E,bh as L,bi as P,C as T,E as j,B as v,h as A,bj as F,a2 as V,X as z}from"./rr0-scene.mjs";const O={AdditiveBlending:z,BackSide:V,BoxGeometry:F,BufferAttribute:A,BufferGeometry:v,CanvasTexture:j,Color:T,ConeGeometry:P,CylinderGeometry:L,DataTexture:E,DoubleSide:D,Euler:x,Float32BufferAttribute:g,FrontSide:C,Group:p,Line:c,LineBasicMaterial:h,LineSegments:f,Matrix4:S,Mesh:G,MeshBasicMaterial:y,MeshStandardMaterial:B,NormalBlending:M,Object3D:m,PlaneGeometry:b,PointLight:u,Points:d,PointsMaterial:l,Quaternion:n,ShaderMaterial:o,SphereGeometry:i,Sprite:r,SpriteMaterial:t,TorusGeometry:s,Vector2:e,Vector3:a};export{O as MODULE_THREE};
@@ -1 +0,0 @@
1
- import{g as D,Y as A,Z as b,$ as M,a0 as p,a1 as O,d as I,J as x,a2 as T,a3 as S,a4 as N,a5 as F}from"./rr0-scene.mjs";class h{static SEEK_BEYOND_S=.25;static SAME_FRAME_S=1/60;static CATCH_UP_SHARE=.1;static MIN_RATE=.0625;static MAX_RATE=16;static rollOfPicture(t){return t&&-t}static kindOfSource(t){if(t.type?.startsWith("video/"))return"video";if(t.type?.startsWith("image/"))return"photo";const i=t.url??"";if(i.startsWith("data:video/")||/\.(mp4|m4v|webm|ogv|mov)(?:[?#].*)?$/i.test(i))return"video";if(i.startsWith("data:image/")||/\.(jpe?g|png|gif|webp|avif)(?:[?#].*)?$/i.test(i))return"photo"}static mediaSecondsAt(t,i,s,a){const e=t.video?.fromS??0,o=t.video?.toS??a??Number.POSITIVE_INFINITY,n=i-(t.t??0);if(n<0)return;const r=e+n/(h.positive(s)*1e3)*h.rateOf(t);return r<=o?r:void 0}static rateOf(t){return h.positive(t.video?.rate??1)}static registrationAt(t,i){const s=t.registration,a=t.registrationTrack;if(!a||a.length===0)return s;let e=a.findIndex(E=>E.t>i);e===-1&&(e=a.length);const o=a[Math.max(e-1,0)],n=a[Math.min(e,a.length-1)],r=n.t>o.t?Math.min(Math.max((i-o.t)/(n.t-o.t),0),1):0,c=((n.headingDeg-o.headingDeg)%360+540)%360-180,f=o.rollDeg??0,y=n.rollDeg??0,v=f+(y-f)*r,w=o.fovDeg??s.fovDeg;return{headingDeg:((o.headingDeg+c*r)%360+360)%360,pitchDeg:o.pitchDeg+(n.pitchDeg-o.pitchDeg)*r,rollDeg:v===0?void 0:v,fovDeg:w+((n.fovDeg??s.fovDeg)-w)*r}}static keyIndexAt(t,i){return(t.registrationTrack??[]).findIndex(s=>Math.abs(s.t-i)<20)}static withKey(t,i,s){const a={t:i,...s},e=h.keyIndexAt(t,i),n=[...(t.registrationTrack??[]).filter((r,c)=>c!==e),e>=0?{...a,t:t.registrationTrack[e].t}:a].sort((r,c)=>r.t-c.t);return{...t,registrationTrack:n,registration:h.plainOf(n[0],t.registration)}}static withoutKey(t,i){const s=h.keyIndexAt(t,i);if(s<0)return t;const a=t.registrationTrack.filter((e,o)=>o!==s);return a.length===0?{...t,registrationTrack:void 0}:{...t,registrationTrack:a,registration:h.plainOf(a[0],t.registration)}}static plainOf(t,i){return{headingDeg:t.headingDeg,pitchDeg:t.pitchDeg,rollDeg:t.rollDeg,fovDeg:t.fovDeg??i.fovDeg}}static command(t,i,s,a){const e=Math.min(Math.max(a,h.MIN_RATE),h.MAX_RATE),o=i-t;if(!s)return{seekS:Math.abs(o)>h.SAME_FRAME_S?i:void 0,play:!1,rate:e};if(Math.abs(o)>h.SEEK_BEYOND_S)return{seekS:i,play:!0,rate:e};const n=Math.min(Math.max(o/h.SEEK_BEYOND_S,-1),1)*h.CATCH_UP_SHARE;return{play:!0,rate:Math.min(Math.max(e*(1+n),h.MIN_RATE),h.MAX_RATE)}}static positive(t){return t>0?t:1}}class u extends Error{constructor(t,i){super(`${t}: ${i.kind==="status"?i.status:i.kind}`),this.src=t,this.failure=i}}class g{static async blob(t){let i;try{i=await fetch(t)}catch{throw new u(t,await g.whyUnread(t))}if(!i.ok)throw new u(t,{kind:"status",status:i.status});const s=await i.blob();if(s.type&&!s.type.startsWith("image/"))throw new u(t,{kind:"notPicture"});return s}static failureOf(t){return t instanceof u?t.failure:{kind:"notPicture"}}static async whyVideoUnread(t){if(t.startsWith("data:")||t.startsWith("blob:"))return{kind:"notVideo"};let i;try{i=await fetch(t,{method:"HEAD"})}catch{return g.whyUnread(t)}return i.ok?{kind:"notVideo"}:{kind:"status",status:i.status}}static async whyUnread(t){try{return await fetch(t,{mode:"no-cors"}),{kind:"notShared"}}catch{return{kind:"unreachable"}}}}const k=3,m=800,l=Math.PI/180;class d{constructor(t,i,s=d.fetchImage,a=d.openVideo){this.scene=t,this.onImageLoaded=i,this.loadImage=s,this.loadVideo=a}meshes=new Map;signatures=new Map;images=new Map;loading=new Map;failed=new Map;references=[];views=new Map;shown=!0;observerAt;clock={t:0,playing:!1,timeScale:1};static PRESENT_WITHIN_M=2;static GONE_BEYOND_M=20;static presenceAt(t,i){if(!t.from||!i)return 1;const s=D(i.lat,i.lng,t.from.lat,t.from.lng),e=(Math.hypot(s.x,s.z)-d.PRESENT_WITHIN_M)/(d.GONE_BEYOND_M-d.PRESENT_WITHIN_M),o=Math.min(Math.max(e,0),1);return 1-o*o*(3-2*o)}set(t,i=this.views,s){this.references=t,this.observerAt=s,this.views=i;const a=new Set(t.map(e=>e.id));for(const[e,o]of this.meshes)a.has(e)||(this.dispose(o),this.meshes.delete(e),this.signatures.delete(e));for(const[e,o]of this.images){const n=t.find(c=>c.id===e);if(n&&n.src===o.texture.userData.src&&n.kind==="video"==(o.video!==void 0))continue;d.release(o),this.images.delete(e);const r=this.meshes.get(e);r&&(this.dispose(r),this.meshes.delete(e),this.signatures.delete(e))}for(const e of t){const o=this.images.get(e.id);if(!o){this.load(e);continue}this.build(e,o)}this.follow()}setTime(t){this.clock=t,this.follow()}setShown(t){this.shown=t;for(const i of this.meshes.values())i.visible=t&&this.opacityOf(i.userData.id)>0}setView(t,i){this.views.set(t,i);const s=this.meshes.get(t);s&&this.applyOpacity(s,t)}layer=k;get any(){for(const t of this.meshes.values())if(t.visible)return!0;return!1}place(t){const i=this.held;i&&t.getWorldQuaternion(this.cameraTurn);for(const s of this.meshes.values()){if(!s.visible)continue;s.position.copy(t.position);const a=i?.get(s);a&&s.quaternion.copy(this.cameraTurn).multiply(a),s.updateMatrixWorld()}}hold(t){t.getWorldQuaternion(this.cameraTurn);const i=this.cameraTurn.clone().invert();this.held=new Map([...this.meshes.values()].map(s=>[s,i.clone().multiply(s.quaternion)])),this.registered=new Map([...this.meshes.values()].map(s=>[s,s.quaternion.clone()]))}release(){if(this.held){for(const[t,i]of this.registered??[])t.quaternion.copy(i);this.held=void 0,this.registered=void 0}}registered;held;cameraTurn=new A;get furthestM(){return this.meshes.size>0?m:0}directionOfPixel(t,i,s,a){const e=this.images.get(t.id),o=e?e.width/e.height:1,n=h.registrationAt(t,this.clock.t),r=Math.tan(n.fovDeg/2*l),c=r*o;return a.set((i*2-1)*c,(1-s*2)*r,-1).normalize(),a.applyQuaternion(d.orientation(n))}aspectOf(t){const i=this.images.get(t);return i?i.width/i.height:void 0}failureOf(t){return this.failed.get(t)}follow(){for(const t of this.references){const i=this.meshes.get(t.id),s=this.images.get(t.id)?.video;s&&this.sync(t,s),i&&(t.registrationTrack?.length&&d.point(i,t,h.registrationAt(t,this.clock.t)),t.kind==="video"&&this.applyOpacity(i,t.id))}}sync(t,i){const s=h.mediaSecondsAt(t,this.clock.t,this.clock.timeScale,Number.isFinite(i.duration)?i.duration:void 0);if(s===void 0){i.paused||i.pause();return}const a=h.command(i.currentTime,s,this.clock.playing,h.rateOf(t));i.playbackRate=a.rate,a.seekS!==void 0&&!i.seeking&&(i.currentTime=a.seekS),a.play&&i.paused&&i.play().catch(()=>{}),!a.play&&!i.paused&&i.pause()}load(t){const i=t.src;if(this.loading.has(t.id)||this.failed.has(i))return;const s=t.kind==="video",e=(s?this.loadVideo(i,()=>this.onVideoFrame()):this.loadImage(i)).then(o=>{this.loading.delete(t.id);const n=this.references.find(r=>r.id===t.id);if(!n||n.src!==i||n.kind==="video"!==s){d.release(o);return}o.texture.userData.src=i,this.images.set(t.id,o),this.build(n,o),this.follow(),this.onImageLoaded()},o=>{this.loading.delete(t.id),this.failed.set(i,g.failureOf(o)),this.onImageLoaded()});this.loading.set(t.id,e)}onVideoFrame(){this.follow(),this.onFrame?.()}onFrame;static openVideo(t,i){return new Promise((s,a)=>{const e=document.createElement("video");e.crossOrigin="anonymous",e.muted=!0,e.playsInline=!0,e.preload="auto",e.addEventListener("loadeddata",()=>{const o=new b(e);o.colorSpace=M,o.minFilter=p,o.magFilter=p,o.generateMipmaps=!1,e.addEventListener("seeked",i);const n=()=>{e.paused&&i(),e.src&&e.requestVideoFrameCallback(n)};"requestVideoFrameCallback"in e&&e.requestVideoFrameCallback(n),s({texture:o,width:e.videoWidth,height:e.videoHeight,video:e})},{once:!0}),e.addEventListener("error",()=>{g.whyVideoUnread(t).then(o=>a(new u(t,o)))},{once:!0}),e.src=t})}static release(t){t.texture.dispose();const i=t.video;i&&(i.pause(),i.removeAttribute?.("src"),i.load?.())}static async fetchImage(t){const i=await g.blob(t),s=await createImageBitmap(i,{imageOrientation:"flipY"}).catch(()=>{throw new u(t,{kind:"notPicture"})}),a=new O(s);return a.flipY=!1,a.colorSpace=M,a.minFilter=p,a.magFilter=p,a.generateMipmaps=!1,a.needsUpdate=!0,{texture:a,width:s.width,height:s.height}}build(t,i){const s=d.signatureOf(t,i);let a=this.meshes.get(t.id);if(a&&this.signatures.get(t.id)===s){this.applyOpacity(a,t.id);return}a&&(this.dispose(a),this.meshes.delete(t.id)),a=new I(d.geometryOf(t,i),new x({map:i.texture,transparent:!0,depthTest:!1,depthWrite:!1,fog:!1,toneMapped:!1})),t.kind==="panorama"&&(a.material.side=T),a.frustumCulled=!1,a.layers.set(k),a.userData.id=t.id,d.point(a,t,h.registrationAt(t,this.clock.t)),this.scene.add(a),this.meshes.set(t.id,a),this.signatures.set(t.id,s),this.applyOpacity(a,t.id)}static geometryOf(t,i){if(t.kind==="panorama"){const o=new S(m,64,32,Math.PI/2,Math.PI*2),n=o.attributes.uv;for(let r=0;r<n.count;r++)n.setX(r,1-n.getX(r));return n.needsUpdate=!0,o}const s=2*m*Math.tan(t.registration.fovDeg/2*l),a=s*(i.width/Math.max(i.height,1)),e=new N(a,s);return e.translate(0,0,-m),e}static orientation({headingDeg:t,pitchDeg:i,rollDeg:s}){const a=new F;return a.rotation.set(i*l,-t*l,-(s??0)*l,"YXZ"),a.quaternion}static point(t,i,s){if(t.quaternion.copy(d.orientation(s)),i.kind==="panorama")return;const a=Math.tan(s.fovDeg/2*l)/Math.tan(i.registration.fovDeg/2*l);t.scale.set(a,a,1)}inTime(t){if(t.kind!=="video")return!0;const i=this.images.get(t.id)?.video?.duration;return h.mediaSecondsAt(t,this.clock.t,this.clock.timeScale,i!==void 0&&Number.isFinite(i)?i:void 0)!==void 0}opacityOf(t){const i=this.references.find(e=>e.id===t);if(i&&!this.inTime(i))return 0;const s=this.views.get(t),a=i?d.presenceAt(i,this.observerAt):1;return(s?.opacity??i?.opacity??0)*a}applyOpacity(t,i){const s=this.opacityOf(i);t.material.opacity=s,t.visible=this.shown&&s>0}static signatureOf(t,i){const{headingDeg:s,pitchDeg:a,rollDeg:e,fovDeg:o}=t.registration;return[t.kind,t.src,i.width,i.height,s,a,e??0,o].join("|")}dispose(t){this.scene.remove(t),t.geometry.dispose(),t.material.dispose()}disposeAll(){for(const t of this.meshes.values())this.dispose(t);this.meshes.clear(),this.signatures.clear();for(const t of this.images.values())d.release(t);this.images.clear()}}export{k as REFERENCE_LAYER,d as ReferenceSystem};
@@ -1 +0,0 @@
1
- import{a6 as e}from"./rr0-scene.mjs";const s={play:"Play",clickToPlay:"Click to play",pause:"Pause",noDuration:"No observation duration",currentPosition:"Current position",duration:"Duration",switchToElapsed:"click to show elapsed time",switchToClockTime:"click to show the time of day",fullscreen:"Fullscreen",exitFullscreen:"Exit fullscreen",mute:"Mute",volume:"Volume",unmute:"Unmute",noSound:"No sound recorded",moments:"Moments",moreControls:"More controls",fewerControls:"Fewer controls",showObserverMap:"Show where the witness was",hideObserverMap:"Hide where the witness was",mapImageryUnavailable:"Aerial imagery unavailable",zoomMapIn:"Zoom in",zoomMapOut:"Zoom out",fitMap:"Back to the whole path",placeObserverHere:"Put the witness here",showReferences:"Show the pictures of the place",hideReferences:"Hide the pictures of the place",showTraces:"Show the investigator's lines",hideTraces:"Hide the investigator's lines",referenceOpacity:"Picture opacity",referencesMenu:"Pictures of the place",showMilestones:"Show the account's moments",hideMilestones:"Hide the account's moments",observerHere:"The witness, here",decorHere:"Scenery",recordingIssues:"{count} problem(s) in this recording: it may not play as its author meant",issueTemplates:e.EN};export{s as ufoMessages_en};
@@ -1 +0,0 @@
1
- const e={play:"Reproducir",clickToPlay:"Haz clic para reproducir",pause:"Pausa",noDuration:"Sin duración de observación",currentPosition:"Posición actual",duration:"Duración",switchToElapsed:"haz clic para mostrar el tiempo transcurrido",switchToClockTime:"haz clic para mostrar la hora del día",fullscreen:"Pantalla completa",exitFullscreen:"Salir de pantalla completa",mute:"Silenciar",volume:"Volumen",unmute:"Activar el sonido",noSound:"Sin sonido registrado",moments:"Momentos",moreControls:"Más controles",fewerControls:"Menos controles",showObserverMap:"Ver dónde estaba el testigo",hideObserverMap:"Ocultar dónde estaba el testigo",mapImageryUnavailable:"Vista aérea no disponible",zoomMapIn:"Acercar",zoomMapOut:"Alejar",fitMap:"Volver al trayecto completo",placeObserverHere:"Poner al testigo aquí",showReferences:"Ver las fotos del lugar",hideReferences:"Ocultar las fotos del lugar",showTraces:"Ver los trazos del investigador",hideTraces:"Ocultar los trazos del investigador",referenceOpacity:"Opacidad de las fotos",referencesMenu:"Fotos del lugar",showMilestones:"Ver los momentos del relato",hideMilestones:"Ocultar los momentos del relato",observerHere:"El testigo, aquí",decorHere:"Elemento del decorado",recordingIssues:"{count} problema(s) en esta grabación: puede que no se reproduzca como su autor quería",issueTemplates:{"unknown-key":"{path}: clave desconocida, ignorada","wrong-type":"{path}: se esperaba {expected}, se encontró {found}","not-in-list":"{path}: {found} no es uno de {expected}","out-of-range":"{path}: {found} está fuera de {expected}",defaulted:"{path}: ausente, se usa {expected}",unplaced:"{path}: sin aim (ni bounds), dibujado en el centro de la vista",unsized:"{path}: sin tamaño angular (ni bounds), dibujado de un píxel de ancho","pixels-over-angles":"{path}: bounds repetido sin aim ni angular, así que la forma sigue los píxeles"}};export{e as ufoMessages_es};
@@ -1 +0,0 @@
1
- const e={play:"Lecture",clickToPlay:"Cliquer pour lire",pause:"Pause",noDuration:"Aucune durée d'observation",currentPosition:"Position actuelle",duration:"Durée",switchToElapsed:"cliquer pour afficher la durée écoulée",switchToClockTime:"cliquer pour afficher l'heure de l'observation",fullscreen:"Plein écran",exitFullscreen:"Quitter le plein écran",mute:"Couper le son",volume:"Volume",unmute:"Rétablir le son",noSound:"Pas de son enregistré",moments:"Moments",moreControls:"Plus de commandes",fewerControls:"Moins de commandes",showObserverMap:"Voir où était le témoin",hideObserverMap:"Masquer où était le témoin",mapImageryUnavailable:"Vue aérienne indisponible",zoomMapIn:"Zoomer",zoomMapOut:"Dézoomer",fitMap:"Revenir au trajet entier",placeObserverHere:"Placer le témoin ici",showReferences:"Voir les photos des lieux",hideReferences:"Masquer les photos des lieux",showTraces:"Voir les tracés d'enquêteur",hideTraces:"Masquer les tracés d'enquêteur",referenceOpacity:"Opacité des photos",referencesMenu:"Photos des lieux",showMilestones:"Voir les moments du récit",hideMilestones:"Masquer les moments du récit",observerHere:"Le témoin, ici",decorHere:"Élément de décor",recordingIssues:"{count} problème(s) dans cet enregistrement : il peut ne pas jouer ce que son auteur voulait",issueTemplates:{"unknown-key":"{path} : clé inconnue, ignorée","wrong-type":"{path} : {expected} attendu, {found} trouvé","not-in-list":"{path} : {found} ne fait pas partie de {expected}","out-of-range":"{path} : {found} sort de {expected}",defaulted:"{path} : absent, {expected} utilisé",unplaced:"{path} : ni aim ni bounds, dessiné au milieu de la vue",unsized:"{path} : ni taille angulaire ni bounds, dessiné large d'un pixel","pixels-over-angles":"{path} : bounds redonné sans aim ni angular, la forme suit les pixels"}};export{e as ufoMessages_fr};
@@ -1 +0,0 @@
1
- const e={play:"Riproduci",clickToPlay:"Clicca per riprodurre",pause:"Pausa",noDuration:"Nessuna durata di osservazione",currentPosition:"Posizione attuale",duration:"Durata",switchToElapsed:"fai clic per mostrare il tempo trascorso",switchToClockTime:"fai clic per mostrare l'ora del giorno",fullscreen:"Schermo intero",exitFullscreen:"Esci dallo schermo intero",mute:"Disattiva audio",volume:"Volume",unmute:"Attiva audio",noSound:"Nessun suono registrato",moments:"Momenti",moreControls:"Altri controlli",fewerControls:"Meno controlli",showObserverMap:"Mostra dove si trovava il testimone",hideObserverMap:"Nascondi dove si trovava il testimone",mapImageryUnavailable:"Vista aerea non disponibile",zoomMapIn:"Ingrandisci",zoomMapOut:"Riduci",fitMap:"Torna all'intero percorso",placeObserverHere:"Metti qui il testimone",showReferences:"Mostra le foto del luogo",hideReferences:"Nascondi le foto del luogo",showTraces:"Mostra i tracciati dell'investigatore",hideTraces:"Nascondi i tracciati dell'investigatore",referenceOpacity:"Opacità delle foto",referencesMenu:"Foto del luogo",showMilestones:"Mostra i momenti del resoconto",hideMilestones:"Nascondi i momenti del resoconto",observerHere:"Il testimone, qui",decorHere:"Elemento della scenografia",recordingIssues:"{count} problema/i in questa registrazione: potrebbe non essere riprodotta come voleva il suo autore",issueTemplates:{"unknown-key":"{path}: chiave sconosciuta, ignorata","wrong-type":"{path}: atteso {expected}, trovato {found}","not-in-list":"{path}: {found} non è tra {expected}","out-of-range":"{path}: {found} è fuori da {expected}",defaulted:"{path}: assente, usato {expected}",unplaced:"{path}: nessun aim (né bounds), disegnato al centro della vista",unsized:"{path}: nessuna dimensione angolare (né bounds), disegnato largo un pixel","pixels-over-angles":"{path}: bounds ripetuto senza aim né angular, quindi la forma segue i pixel"}};export{e as ufoMessages_it};
@@ -1 +0,0 @@
1
- var z=Uint8Array,Q=Uint16Array,Tr=Int32Array,gr=new z([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),wr=new z([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),Mr=new z([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),Hr=function(r,e){for(var n=new Q(31),a=0;a<31;++a)n[a]=e+=1<<r[a-1];for(var v=new Tr(n[30]),a=1;a<30;++a)for(var f=n[a];f<n[a+1];++f)v[f]=f-n[a]<<5|a;return{b:n,r:v}},Or=Hr(gr,2),Vr=Or.b,Sr=Or.r;Vr[28]=258,Sr[258]=28;var Yr=Hr(wr,0),Pr=Yr.b,Br=Yr.r,Ar=new Q(32768);for(var C=0;C<32768;++C){var b=(C&43690)>>1|(C&21845)<<1;b=(b&52428)>>2|(b&13107)<<2,b=(b&61680)>>4|(b&3855)<<4,Ar[C]=((b&65280)>>8|(b&255)<<8)>>1}var j=(function(r,e,n){for(var a=r.length,v=0,f=new Q(e);v<a;++v)r[v]&&++f[r[v]-1];var o=new Q(e);for(v=1;v<e;++v)o[v]=o[v-1]+f[v-1]<<1;var t;if(n){t=new Q(1<<e);var g=15-e;for(v=0;v<a;++v)if(r[v])for(var u=v<<4|r[v],l=e-r[v],i=o[r[v]-1]++<<l,h=i|(1<<l)-1;i<=h;++i)t[Ar[i]>>g]=u}else for(t=new Q(a),v=0;v<a;++v)r[v]&&(t[v]=Ar[o[r[v]-1]++]>>15-r[v]);return t}),d=new z(288);for(var C=0;C<144;++C)d[C]=8;for(var C=144;C<256;++C)d[C]=9;for(var C=256;C<280;++C)d[C]=7;for(var C=280;C<288;++C)d[C]=8;var or=new z(32);for(var C=0;C<32;++C)or[C]=5;var Qr=j(d,9,0),Rr=j(d,9,1),Wr=j(or,5,0),Xr=j(or,5,1),sr=function(r){for(var e=r[0],n=1;n<r.length;++n)r[n]>e&&(e=r[n]);return e},X=function(r,e,n){var a=e/8|0;return(r[a]|r[a+1]<<8)>>(e&7)&n},xr=function(r,e){var n=e/8|0;return(r[n]|r[n+1]<<8|r[n+2]<<16)>>(e&7)},mr=function(r){return(r+7)/8|0},tr=function(r,e,n){return(e==null||e<0)&&(e=0),(n==null||n>r.length)&&(n=r.length),new z(r.subarray(e,n))},Zr=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],Y=function(r,e,n){var a=new Error(e||Zr[r]);if(a.code=r,Error.captureStackTrace&&Error.captureStackTrace(a,Y),!n)throw a;return a},$r=function(r,e,n,a){var v=r.length,f=a?a.length:0;if(!v||e.f&&!e.l)return n||new z(0);var o=!n,t=o||e.i!=2,g=e.i;o&&(n=new z(v*3));var u=function(vr){var fr=n.length;if(vr>fr){var nr=new z(Math.max(fr*2,vr));nr.set(n),n=nr}},l=e.f||0,i=e.p||0,h=e.b||0,c=e.l,y=e.d,x=e.m,M=e.n,m=v*8;do{if(!c){l=X(r,i,1);var O=X(r,i+1,3);if(i+=3,O)if(O==1)c=Rr,y=Xr,x=9,M=5;else if(O==2){var U=X(r,i,31)+257,T=X(r,i+10,15)+4,s=U+X(r,i+5,31)+1;i+=14;for(var w=new z(s),D=new z(19),B=0;B<T;++B)D[Mr[B]]=X(r,i+B*3,7);i+=T*3;for(var V=sr(D),p=(1<<V)-1,K=j(D,V,1),B=0;B<s;){var G=K[X(r,i,p)];i+=G&15;var F=G>>4;if(F<16)w[B++]=F;else{var I=0,S=0;for(F==16?(S=3+X(r,i,3),i+=2,I=w[B-1]):F==17?(S=3+X(r,i,7),i+=3):F==18&&(S=11+X(r,i,127),i+=7);S--;)w[B++]=I}}var J=w.subarray(0,U),q=w.subarray(U);x=sr(J),M=sr(q),c=j(J,x,1),y=j(q,M,1)}else Y(1);else{var F=mr(i)+4,k=r[F-4]|r[F-3]<<8,E=F+k;if(E>v){g&&Y(0);break}t&&u(h+k),n.set(r.subarray(F,E),h),e.b=h+=k,e.p=i=E*8,e.f=l;continue}if(i>m){g&&Y(0);break}}t&&u(h+131072);for(var ar=(1<<x)-1,R=(1<<M)-1,L=i;;L=i){var I=c[xr(r,i)&ar],N=I>>4;if(i+=I&15,i>m){g&&Y(0);break}if(I||Y(2),N<256)n[h++]=N;else if(N==256){L=i,c=null;break}else{var P=N-254;if(N>264){var B=N-257,A=gr[B];P=X(r,i,(1<<A)-1)+Vr[B],i+=A}var Z=y[xr(r,i)&R],rr=Z>>4;Z||Y(3),i+=Z&15;var q=Pr[rr];if(rr>3){var A=wr[rr];q+=xr(r,i)&(1<<A)-1,i+=A}if(i>m){g&&Y(0);break}t&&u(h+131072);var er=h+P;if(h<q){var ur=f-q,hr=Math.min(q,er);for(ur+h<0&&Y(3);h<hr;++h)n[h]=a[ur+h]}for(;h<er;++h)n[h]=n[h-q]}}e.l=c,e.p=L,e.b=h,e.f=l,c&&(l=1,e.m=x,e.d=y,e.n=M)}while(!l);return h!=n.length&&o?tr(n,0,h):n.subarray(0,h)},_=function(r,e,n){n<<=e&7;var a=e/8|0;r[a]|=n,r[a+1]|=n>>8},ir=function(r,e,n){n<<=e&7;var a=e/8|0;r[a]|=n,r[a+1]|=n>>8,r[a+2]|=n>>16},yr=function(r,e){for(var n=[],a=0;a<r.length;++a)r[a]&&n.push({s:a,f:r[a]});var v=n.length,f=n.slice();if(!v)return{t:Jr,l:0};if(v==1){var o=new z(n[0].s+1);return o[n[0].s]=1,{t:o,l:1}}n.sort(function(E,U){return E.f-U.f}),n.push({s:-1,f:25001});var t=n[0],g=n[1],u=0,l=1,i=2;for(n[0]={s:-1,f:t.f+g.f,l:t,r:g};l!=v-1;)t=n[n[u].f<n[i].f?u++:i++],g=n[u!=l&&n[u].f<n[i].f?u++:i++],n[l++]={s:-1,f:t.f+g.f,l:t,r:g};for(var h=f[0].s,a=1;a<v;++a)f[a].s>h&&(h=f[a].s);var c=new Q(h+1),y=zr(n[l-1],c,0);if(y>e){var a=0,x=0,M=y-e,m=1<<M;for(f.sort(function(U,T){return c[T.s]-c[U.s]||U.f-T.f});a<v;++a){var O=f[a].s;if(c[O]>e)x+=m-(1<<y-c[O]),c[O]=e;else break}for(x>>=M;x>0;){var F=f[a].s;c[F]<e?x-=1<<e-c[F]++-1:++a}for(;a>=0&&x;--a){var k=f[a].s;c[k]==e&&(--c[k],++x)}y=e}return{t:new z(c),l:y}},zr=function(r,e,n){return r.s==-1?Math.max(zr(r.l,e,n+1),zr(r.r,e,n+1)):e[r.s]=n},Er=function(r){for(var e=r.length;e&&!r[--e];);for(var n=new Q(++e),a=0,v=r[0],f=1,o=function(g){n[a++]=g},t=1;t<=e;++t)if(r[t]==v&&t!=e)++f;else{if(!v&&f>2){for(;f>138;f-=138)o(32754);f>2&&(o(f>10?f-11<<5|28690:f-3<<5|12305),f=0)}else if(f>3){for(o(v),--f;f>6;f-=6)o(8304);f>2&&(o(f-3<<5|8208),f=0)}for(;f--;)o(v);f=1,v=r[t]}return{c:n.subarray(0,a),n:e}},lr=function(r,e){for(var n=0,a=0;a<e.length;++a)n+=r[a]*e[a];return n},Gr=function(r,e,n){var a=n.length,v=mr(e+2);r[v]=a&255,r[v+1]=a>>8,r[v+2]=r[v]^255,r[v+3]=r[v+1]^255;for(var f=0;f<a;++f)r[v+f+4]=n[f];return(v+4+a)*8},Ur=function(r,e,n,a,v,f,o,t,g,u,l){_(e,l++,n),++v[256];for(var i=yr(v,15),h=i.t,c=i.l,y=yr(f,15),x=y.t,M=y.l,m=Er(h),O=m.c,F=m.n,k=Er(x),E=k.c,U=k.n,T=new Q(19),s=0;s<O.length;++s)++T[O[s]&31];for(var s=0;s<E.length;++s)++T[E[s]&31];for(var w=yr(T,7),D=w.t,B=w.l,V=19;V>4&&!D[Mr[V-1]];--V);var p=u+5<<3,K=lr(v,d)+lr(f,or)+o,G=lr(v,h)+lr(f,x)+o+14+3*V+lr(T,D)+2*T[16]+3*T[17]+7*T[18];if(g>=0&&p<=K&&p<=G)return Gr(e,l,r.subarray(g,g+u));var I,S,J,q;if(_(e,l,1+(G<K)),l+=2,G<K){I=j(h,c,0),S=h,J=j(x,M,0),q=x;var ar=j(D,B,0);_(e,l,F-257),_(e,l+5,U-1),_(e,l+10,V-4),l+=14;for(var s=0;s<V;++s)_(e,l+3*s,D[Mr[s]]);l+=3*V;for(var R=[O,E],L=0;L<2;++L)for(var N=R[L],s=0;s<N.length;++s){var P=N[s]&31;_(e,l,ar[P]),l+=D[P],P>15&&(_(e,l,N[s]>>5&127),l+=N[s]>>12)}}else I=Qr,S=d,J=Wr,q=or;for(var s=0;s<t;++s){var A=a[s];if(A>255){var P=A>>18&31;ir(e,l,I[P+257]),l+=S[P+257],P>7&&(_(e,l,A>>23&31),l+=gr[P]);var Z=A&31;ir(e,l,J[Z]),l+=q[Z],Z>3&&(ir(e,l,A>>5&8191),l+=wr[Z])}else ir(e,l,I[A]),l+=S[A]}return ir(e,l,I[256]),l+S[256]},jr=new Tr([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),Jr=new z(0),Lr=function(r,e,n,a,v,f){var o=f.z||r.length,t=new z(a+o+5*(1+Math.ceil(o/7e3))+v),g=t.subarray(a,t.length-v),u=f.l,l=(f.r||0)&7;if(e){l&&(g[0]=f.r>>3);for(var i=jr[e-1],h=i>>13,c=i&8191,y=(1<<n)-1,x=f.p||new Q(32768),M=f.h||new Q(y+1),m=Math.ceil(n/3),O=2*m,F=function(cr){return(r[cr]^r[cr+1]<<m^r[cr+2]<<O)&y},k=new Tr(25e3),E=new Q(288),U=new Q(32),T=0,s=0,w=f.i||0,D=0,B=f.w||0,V=0;w+2<o;++w){var p=F(w),K=w&32767,G=M[p];if(x[K]=G,M[p]=K,B<=w){var I=o-w;if((T>7e3||D>24576)&&(I>423||!u)){l=Ur(r,g,0,k,E,U,s,D,V,w-V,l),D=T=s=0,V=w;for(var S=0;S<286;++S)E[S]=0;for(var S=0;S<30;++S)U[S]=0}var J=2,q=0,ar=c,R=K-G&32767;if(I>2&&p==F(w-R))for(var L=Math.min(h,I)-1,N=Math.min(32767,w),P=Math.min(258,I);R<=N&&--ar&&K!=G;){if(r[w+J]==r[w+J-R]){for(var A=0;A<P&&r[w+A]==r[w+A-R];++A);if(A>J){if(J=A,q=R,A>L)break;for(var Z=Math.min(R,A-2),rr=0,S=0;S<Z;++S){var er=w-R+S&32767,ur=x[er],hr=er-ur&32767;hr>rr&&(rr=hr,G=er)}}}K=G,G=x[K],R+=K-G&32767}if(q){k[D++]=268435456|Sr[J]<<18|Br[q];var vr=Sr[J]&31,fr=Br[q]&31;s+=gr[vr]+wr[fr],++E[257+vr],++U[fr],B=w+J,++T}else k[D++]=r[w],++E[r[w]]}}for(w=Math.max(w,B);w<o;++w)k[D++]=r[w],++E[r[w]];l=Ur(r,g,u,k,E,U,s,D,V,w-V,l),u||(f.r=l&7|g[l/8|0]<<3,l-=7,f.h=M,f.p=x,f.i=w,f.w=B)}else{for(var w=f.w||0;w<o+u;w+=65535){var nr=w+65535;nr>=o&&(g[l/8|0]=u,nr=o),l=Gr(g,l+1,r.subarray(w,nr))}f.i=o}return tr(t,0,a+mr(l)+v)},_r=(function(){for(var r=new Int32Array(256),e=0;e<256;++e){for(var n=e,a=9;--a;)n=(n&1&&-306674912)^n>>>1;r[e]=n}return r})(),pr=function(){var r=-1;return{p:function(e){for(var n=r,a=0;a<e.length;++a)n=_r[n&255^e[a]]^n>>>8;r=n},d:function(){return~r}}},br=function(r,e,n,a,v){if(!v&&(v={l:1},e.dictionary)){var f=e.dictionary.subarray(-32768),o=new z(f.length+r.length);o.set(f),o.set(r,f.length),r=o,v.w=f.length}return Lr(r,e.level==null?6:e.level,e.mem==null?v.l?Math.ceil(Math.max(8,Math.min(13,Math.log(r.length)))*1.5):20:12+e.mem,n,a,v)},Kr=function(r,e){var n={};for(var a in r)n[a]=r[a];for(var a in e)n[a]=e[a];return n},$=function(r,e){return r[e]|r[e+1]<<8},W=function(r,e){return(r[e]|r[e+1]<<8|r[e+2]<<16|r[e+3]<<24)>>>0},Cr=function(r,e){return W(r,e)+W(r,e+4)*4294967296},H=function(r,e,n){for(;n;++e)r[e]=n,n>>>=8};function dr(r,e){return br(r,e||{},0,0)}function re(r,e){return $r(r,{i:2},e&&e.out,e&&e.dictionary)}var Nr=function(r,e,n,a){for(var v in r){var f=r[v],o=e+v,t=a;Array.isArray(f)&&(t=Kr(a,f[1]),f=f[0]),ArrayBuffer.isView(f)?n[o]=[f,t]:(n[o+="/"]=[new z(0),t],Nr(f,o,n,a))}},Dr=typeof TextEncoder<"u"&&new TextEncoder,Fr=typeof TextDecoder<"u"&&new TextDecoder,ee=0;try{Fr.decode(Jr,{stream:!0}),ee=1}catch{}var ne=function(r){for(var e="",n=0;;){var a=r[n++],v=(a>127)+(a>223)+(a>239);if(n+v>r.length)return{s:e,r:tr(r,n-1)};v?v==3?(a=((a&15)<<18|(r[n++]&63)<<12|(r[n++]&63)<<6|r[n++]&63)-65536,e+=String.fromCharCode(55296|a>>10,56320|a&1023)):v&1?e+=String.fromCharCode((a&31)<<6|r[n++]&63):e+=String.fromCharCode((a&15)<<12|(r[n++]&63)<<6|r[n++]&63):e+=String.fromCharCode(a)}};function Ir(r,e){if(e){for(var n=new z(r.length),a=0;a<r.length;++a)n[a]=r.charCodeAt(a);return n}if(Dr)return Dr.encode(r);for(var v=r.length,f=new z(r.length+(r.length>>1)),o=0,t=function(l){f[o++]=l},a=0;a<v;++a){if(o+5>f.length){var g=new z(o+8+(v-a<<1));g.set(f),f=g}var u=r.charCodeAt(a);u<128||e?t(u):u<2048?(t(192|u>>6),t(128|u&63)):u>55295&&u<57344?(u=65536+(u&1047552)|r.charCodeAt(++a)&1023,t(240|u>>18),t(128|u>>12&63),t(128|u>>6&63),t(128|u&63)):(t(224|u>>12),t(128|u>>6&63),t(128|u&63))}return tr(f,0,o)}function ae(r,e){if(e){for(var n="",a=0;a<r.length;a+=16384)n+=String.fromCharCode.apply(null,r.subarray(a,a+16384));return n}else{if(Fr)return Fr.decode(r);var v=ne(r),f=v.s,n=v.r;return n.length&&Y(8),f}}var ve=function(r,e){return e+30+$(r,e+26)+$(r,e+28)},fe=function(r,e,n){var a=$(r,e+28),v=$(r,e+30),f=ae(r.subarray(e+46,e+46+a),!($(r,e+8)&2048)),o=e+46+a,t=ie(r,o,v,n,W(r,e+20),W(r,e+24),W(r,e+42)),g=t[0],u=t[1],l=t[2];return[$(r,e+10),g,u,f,o+v+$(r,e+32),l]},ie=function(r,e,n,a,v,f,o){var t=v==4294967295,g=f==4294967295,u=o==4294967295,l=e+n,i=t+g+u;if(a&&i){for(;e+4<l;e+=4+$(r,e+2))if($(r,e)==1)return[t?Cr(r,e+4+8*g):v,g?Cr(r,e+4):f,u?Cr(r,e+4+8*(g+t)):o,1];a<2&&Y(13)}return[v,f,o,0]},kr=function(r){var e=0;if(r)for(var n in r){var a=r[n].length;a>65535&&Y(9),e+=a+4}return e},qr=function(r,e,n,a,v,f,o,t){var g=a.length,u=n.extra,l=t&&t.length,i=kr(u);H(r,e,o!=null?33639248:67324752),e+=4,o!=null&&(r[e++]=20,r[e++]=n.os),r[e]=20,e+=2,r[e++]=n.flag<<1|(f<0&&8),r[e++]=v&&8,r[e++]=n.compression&255,r[e++]=n.compression>>8;var h=new Date(n.mtime==null?Date.now():n.mtime),c=h.getFullYear()-1980;if((c<0||c>119)&&Y(10),H(r,e,c<<25|h.getMonth()+1<<21|h.getDate()<<16|h.getHours()<<11|h.getMinutes()<<5|h.getSeconds()>>1),e+=4,f!=-1&&(H(r,e,n.crc),H(r,e+4,f<0?-f-2:f),H(r,e+8,n.size)),H(r,e+12,g),H(r,e+14,i),e+=16,o!=null&&(H(r,e,l),H(r,e+6,n.attrs),H(r,e+10,o),e+=14),r.set(a,e),e+=g,i)for(var y in u){var x=u[y],M=x.length;H(r,e,+y),H(r,e+2,M),r.set(x,e+4),e+=4+M}return l&&(r.set(t,e),e+=l),e},le=function(r,e,n,a,v){H(r,e,101010256),H(r,e+8,n),H(r,e+10,n),H(r,e+12,a),H(r,e+16,v)};function oe(r,e){e||(e={});var n={},a=[];Nr(r,"",n,e);var v=0,f=0;for(var o in n){var t=n[o],g=t[0],u=t[1],l=u.level==0?0:8,i=Ir(o),h=i.length,c=u.comment,y=c&&Ir(c),x=y&&y.length,M=kr(u.extra);h>65535&&Y(11);var m=l?dr(g,u):g,O=m.length,F=pr();F.p(g),a.push(Kr(u,{size:g.length,crc:F.d(),c:m,f:i,m:y,u:h!=o.length||y&&c.length!=x,o:v,compression:l})),v+=30+h+M+O,f+=76+2*(h+M)+(x||0)+O}for(var k=new z(f+22),E=v,U=f-v,T=0;T<a.length;++T){var i=a[T];qr(k,i.o,i,i.f,i.u,i.c.length);var s=30+i.f.length+kr(i.extra);k.set(i.c,i.o+s),qr(k,v,i,i.f,i.u,i.c.length,i.o,i.m),v+=16+s+(i.m?i.m.length:0)}return le(k,v,a.length,U,E),k}function te(r,e){for(var n={},a=r.length-22;W(r,a)!=101010256;--a)(!a||r.length-a>65558)&&Y(13);var v=$(r,a+8);if(!v)return{};var f=W(r,a+16),o=W(r,a-20)==117853008;if(o){var t=W(r,a-12);o=W(r,t)==101075792,o&&(v=W(r,t+32),f=W(r,t+48))}for(var g=e&&e.filter,u=0;u<v;++u){var l=fe(r,f,o),i=l[0],h=l[1],c=l[2],y=l[3],x=l[4],M=l[5],m=ve(r,M);f=x,(!g||g({name:y,size:h,originalSize:c,compression:i}))&&(i?i==8?n[y]=re(r.subarray(m,m+h),{out:new z(c)}):Y(14,"unknown compression type "+i):n[y]=tr(r,m,m+h))}return n}export{dr as deflateSync,re as inflateSync,ae as strFromU8,Ir as strToU8,te as unzipSync,oe as zipSync};
@@ -1,2 +0,0 @@
1
- import{A as gt,L as At,T as W,R as L,a as F,M as Q,D as K,r as Et,l as Y,O as tt}from"./rr0-scene.mjs";import{C as et}from"./ContrailGrowth-DwHS8If9.js";class A{static OCTAVES=[63,125,250,500,1e3,2e3,4e3,8e3];static STANDARD={temperatureC:15,relativeHumidity:.7,pressureKPa:101.325};static REFERENCE_PRESSURE_KPA=101.325;static REFERENCE_TEMPERATURE_K=293.15;static TRIPLE_POINT_K=273.16;static speedOfSound(t){return 20.0468*Math.sqrt(t+273.15)}static absorptionDbPerKm(t,e=A.STANDARD){const a=e.temperatureC+273.15,n=A.REFERENCE_TEMPERATURE_K,s=e.pressureKPa/A.REFERENCE_PRESSURE_KPA,c=10**(-6.8346*(A.TRIPLE_POINT_K/a)**1.261+4.6151),i=e.relativeHumidity*100*c/s,r=s*(24+40400*i*(.02+i)/(.391+i)),l=s*(a/n)**-.5*(9+280*i*Math.exp(-4.17*((a/n)**(-1/3)-1))),o=t*t;return 8.686*o*(184e-13*(1/s)*Math.sqrt(a/n)+(a/n)**-2.5*(.01275*Math.exp(-2239.1/a)/(r+o/r)+.1068*Math.exp(-3352/a)/(l+o/l)))*1e3}static aWeightingDb(t){const e=t*t,a=12194**2*e*e/((e+20.6**2)*Math.sqrt((e+107.7**2)*(e+737.9**2))*(e+12194**2));return 20*Math.log10(a)+2}static sumDb(t){return 10*Math.log10(t.reduce((e,a)=>e+10**(a/10),0))}}const Mt=.25,at=.4,nt=6,z=12,bt=3,st=.2,ft=.2,Dt=24,St=3,Rt=12,it=1,It=.7,Ot=1.5,Tt=.8,Bt=1.3,rt=.9,ot=5,_t=25,vt=.5,Nt=.12,ct=[.13,.31],Ct=.16,wt=1.6,yt=3.6,lt=1.1,kt=.3,Pt=1e3,ut=.7;class J{context;noiseBuffer;roughBuffers=new Map;voices=new Map;bus;reverb;reverbOut;level=1;master;paused=!0;requested=[];headingDeg=0;resume(){if(!this.context){if(typeof AudioContext>"u")return;try{this.context=new AudioContext}catch(t){console.warn("AircraftAudio: Web Audio unavailable, aircraft stay silent:",t);return}}gt.unlock(this.context),this.apply()}setLevel(t){this.level=t,this.master&&(this.master.gain.value=t)}setPaused(t){t!==this.paused&&(this.paused=t,this.apply())}setVoices(t,e=0){this.requested=t,this.headingDeg=e,this.apply()}dispose(){for(const t of[...this.voices.keys()])this.release(t);this.context?.close(),this.context=void 0,this.master=void 0,this.bus=void 0}apply(){const t=this.context;if(!t)return;const e=this.paused?[]:this.requested,a=new Set(e.map(n=>n.id));for(const n of[...this.voices.keys()])a.has(n)||this.release(n);for(const n of e){const s=this.voices.get(n.id)??this.build(t,n);this.retarget(t,s,n)}}build(t,e){const a=t.createGain();a.gain.value=0;let n;const s=this.busOf(t);typeof t.createStereoPanner=="function"?(n=t.createStereoPanner(),a.connect(n).connect(s)):a.connect(s);const c=t.createGain(),i=e.character?.modulationDepth??0;c.gain.value=1-i/2;const r=t.createOscillator();r.type="sine";const l=t.createGain();l.gain.value=i/2,r.connect(l).connect(c.gain),c.connect(a);const o=t.createBufferSource();o.buffer=this.noise(t),o.loop=!0,o.loopStart=Math.random()*nt*.5;const d=[],u=[],h=[];for(const T of A.OCTAVES){const B=t.createBiquadFilter();B.type="bandpass",B.frequency.value=T,B.Q.value=it;const N=t.createBiquadFilter();N.type="bandpass",N.frequency.value=T,N.Q.value=it;const P=t.createGain();P.gain.value=0,o.connect(B).connect(N).connect(P).connect(c),d.push(B),u.push(N),h.push(P)}const p=[];for(const[T,B]of[[e.character?.toneHz,e.character?.toneShare],[e.character?.humHz,e.character?.humShare]])if(T!==void 0)for(let N=1;N<=St;N++){const P=t.createOscillator();P.type="sine",P.frequency.value=T*N;const q=t.createGain();q.gain.value=0,P.connect(q).connect(a),p.push({oscillator:P,gain:q,harmonic:N,baseHz:T,share:B??0})}const m=t.createGain();m.gain.value=0,m.connect(a.gain);const M=ct.map(T=>{const B=t.createOscillator();return B.type="sine",B.frequency.value=T,B.connect(m),B}),f=t.createGain();f.gain.value=e.character?.roughness??st;const I=t.createBufferSource();I.buffer=this.roughTable(t,bt),I.loop=!0,I.loopStart=Math.random()*z*.5,I.connect(f).connect(c.gain);const S=t.createGain();S.gain.value=(e.character?.roughness??st)*ft;const b=t.createBufferSource();b.buffer=this.roughTable(t,Dt),b.loop=!0,b.loopStart=Math.random()*z*.5,b.connect(S).connect(c.gain);let _;const j=this.busOf(t)&&this.reverb;j&&(_=t.createGain(),_.gain.value=0,a.connect(_).connect(j));const $=[o,I,b,r,...p.map(T=>T.oscillator),...M];for(const T of $)T.start();const x={nodes:[a,c,l,f,S,m,...p.map(T=>T.gain),...d,...u,...h,..._?[_]:[],...n?[n]:[],...$],sources:$,filters:d,seconds:u,gains:h,tones:p,lfo:r,lfoDepth:l,wander:M,wanderDepth:m,roughDepth:f,crackleDepth:S,beat:c,output:a,panner:n,send:_};return this.voices.set(e.id,x),x}retarget(t,e,a){const n=t.currentTime,s=(p,m)=>p.setTargetAtTime(m,n,Mt),c=Math.min(Ot,Math.max(It,a.dopplerRatio)),i=Math.min(Bt,Math.max(Tt,Math.sqrt(a.dopplerRatio))),r=t.sampleRate*.45,l=a.bandAmplitudes.map((p,m)=>p*J.unweighting(A.OCTAVES[m])),o=Math.sqrt(l.reduce((p,m)=>p+m*m,0)),d=Math.min(1,Math.max(0,(a.distanceKm-ot)/(_t-ot)));A.OCTAVES.forEach((p,m)=>{s(e.filters[m].frequency,Math.min(r,p*i)),s(e.seconds[m].frequency,Math.min(r,p*i)),s(e.gains[m].gain,l[m]*Math.sqrt(Pt/p))});const u=a.character;for(const{oscillator:p,gain:m,harmonic:M,baseHz:f,share:I}of e.tones){const S=f*M;s(p.frequency,S*c);const b=S*c;s(m.gain,b<r?I*Ct*l[J.bandOf(b)]/M:0)}u?.modulationHz!==void 0&&s(e.lfo.frequency,u.modulationHz*c);const h=o>0?ut*(1-Math.exp(-o/ut))/o:1;if(s(e.output.gain,h*(1-kt*d)),s(e.wanderDepth.gain,h*Nt*d/ct.length),e.send&&s(e.send.gain,wt*d),e.panner){const p=(a.azimuthDeg-this.headingDeg)*Math.PI/180,m=a.inside?0:Math.max(-rt,Math.min(rt,Math.sin(p)))*(1-vt*d);s(e.panner.pan,m)}}static unweighting(t){return 10**(Math.min(Rt,Math.max(0,-A.aWeightingDb(t)))/20)}static bandOf(t){let e=0;return A.OCTAVES.forEach((a,n)=>{Math.abs(Math.log(t/a))<Math.abs(Math.log(t/A.OCTAVES[e]))&&(e=n)}),e}roughTable(t,e){const a=this.roughBuffers.get(e);if(a)return a;const n=Math.floor(t.sampleRate*z),s=t.createBuffer(1,n,t.sampleRate),c=s.getChannelData(0),i=Array.from({length:z*e},()=>(Math.random()*2-1)**3),r=t.sampleRate/e;for(let l=0;l<c.length;l++){const o=l/r,d=Math.floor(o),u=o-d,h=u*u*(3-2*u);c[l]=i[d%i.length]*(1-h)+i[(d+1)%i.length]*h}return this.roughBuffers.set(e,s),s}roomImpulse(t){const e=Math.floor(t.sampleRate*yt),a=t.createBuffer(2,e,t.sampleRate);for(let n=0;n<2;n++){const s=a.getChannelData(n);let c=0;for(let i=0;i<e;i++){const r=i/t.sampleRate,l=.6*Math.exp(-r/(lt*2))+.04;c+=l*(Math.random()*2-1-c),s[i]=c*Math.exp(-r/lt)}}return a}busOf(t){if(this.bus)return this.bus;const e=t.createGain();if(e.gain.value=this.level,e.connect(t.destination),this.master=e,typeof t.createConvolver=="function"){const a=t.createConvolver();a.buffer=this.roomImpulse(t);const n=t.createGain();n.gain.value=.9,a.connect(n),this.reverb=a,this.reverbOut=n}if(typeof t.createDynamicsCompressor=="function"){const a=t.createDynamicsCompressor();a.threshold.value=-6,a.knee.value=3,a.ratio.value=4,a.attack.value=.005,a.release.value=.25,a.connect(e),this.bus=a}else this.bus=e;return this.reverbOut?.connect(this.bus),this.bus}release(t){const e=this.voices.get(t);if(!e)return;this.voices.delete(t);const a=this.context;a&&(e.output.gain.setTargetAtTime(0,a.currentTime,at/3),setTimeout(()=>{for(const n of e.sources)try{n.stop()}catch{}for(const n of e.nodes)n.disconnect()},at*1e3*3))}noise(t){if(this.noiseBuffer)return this.noiseBuffer;const e=t.createBuffer(1,t.sampleRate*nt,t.sampleRate),a=e.getChannelData(0);for(let n=0;n<a.length;n++)a[n]=Math.random()*2-1;return this.noiseBuffer=e,e}}class v{static BASE_DB_A=30;static WIND_DB_A=[[0,10],[1,28],[2,36],[3,40],[5,46],[8,52],[12,58],[20,66]];static RAIN_DB_A=[[0,0],[.1,42],[.3,50],[.6,58],[1,65]];static BED_RMS=.2;static MINIMUM_REFERENCE=.008;static WIND_BED_MIN_MS=1;static WIND_BED_FULL_MS=20;static dbA(t){const e=[v.BASE_DB_A,v.along(v.WIND_DB_A,t.windSpeed)];return(t.precipitationType==="rain"||t.precipitationType==="hail")&&e.push(v.along(v.RAIN_DB_A,t.precipitationIntensity)),10*Math.log10(e.filter(a=>a>0).reduce((a,n)=>a+10**(n/10),0))}static bedVolume(t){const e=t.windSpeed>v.WIND_BED_MIN_MS?Math.min(t.windSpeed/v.WIND_BED_FULL_MS,1):0,a=t.precipitationType==="hail"?Math.min(1,t.precipitationIntensity*1.3+.2):t.precipitationType==="rain"?t.precipitationIntensity:0;return Math.hypot(e,a)}static referenceAmplitude(t){return Math.max(v.BED_RMS*v.bedVolume(t),v.MINIMUM_REFERENCE)}static along(t,e){if(e<=t[0][0])return t[0][1];for(let a=1;a<t.length;a++)if(e<=t[a][0]){const[n,s]=t[a-1],[c,i]=t[a];return s+(i-s)*(e-n)/(c-n)}return t[t.length-1][1]}}class k{static TYPES={A318:["Airbus A318","airliner-narrow",34.1,31.4],A319:["Airbus A319","airliner-narrow",34.1,33.8],A320:["Airbus A320","airliner-narrow",34.1,37.6],A321:["Airbus A321","airliner-narrow",34.1,44.5],A19N:["Airbus A319neo","airliner-narrow",35.8,33.8],A20N:["Airbus A320neo","airliner-narrow",35.8,37.6],A21N:["Airbus A321neo","airliner-narrow",35.8,44.5],B737:["Boeing 737-700","airliner-narrow",34.3,33.6],B738:["Boeing 737-800","airliner-narrow",35.8,39.5],B739:["Boeing 737-900","airliner-narrow",35.8,42.1],B38M:["Boeing 737 MAX 8","airliner-narrow",35.9,39.5],B39M:["Boeing 737 MAX 9","airliner-narrow",35.9,42.2],B752:["Boeing 757-200","airliner-narrow",38,47.3],B753:["Boeing 757-300","airliner-narrow",38,54.4],B762:["Boeing 767-200","airliner-wide",47.6,48.5],B763:["Boeing 767-300","airliner-wide",47.6,54.9],B764:["Boeing 767-400","airliner-wide",51.9,61.4],B772:["Boeing 777-200","airliner-wide",60.9,63.7],B77L:["Boeing 777-200LR","airliner-wide",64.8,63.7],B77W:["Boeing 777-300ER","airliner-wide",64.8,73.9],B788:["Boeing 787-8","airliner-wide",60.1,56.7],B789:["Boeing 787-9","airliner-wide",60.1,62.8],B78X:["Boeing 787-10","airliner-wide",60.1,68.3],B744:["Boeing 747-400","airliner-wide",64.4,70.7],B748:["Boeing 747-8","airliner-wide",68.4,76.3],A306:["Airbus A300-600","airliner-wide",44.8,54.1],A310:["Airbus A310","airliner-wide",43.9,46.7],A332:["Airbus A330-200","airliner-wide",60.3,58.8],A333:["Airbus A330-300","airliner-wide",60.3,63.7],A338:["Airbus A330-800","airliner-wide",64,58.8],A339:["Airbus A330-900","airliner-wide",64,63.7],A343:["Airbus A340-300","airliner-wide",60.3,63.7],A346:["Airbus A340-600","airliner-wide",63.5,75.4],A359:["Airbus A350-900","airliner-wide",64.8,66.8],A35K:["Airbus A350-1000","airliner-wide",64.8,73.8],A388:["Airbus A380-800","airliner-wide",79.8,72.7],E170:["Embraer 170","regional-jet",26,29.9],E75L:["Embraer 175","regional-jet",26,31.7],E75S:["Embraer 175","regional-jet",26,31.7],E190:["Embraer 190","regional-jet",28.7,36.2],E195:["Embraer 195","regional-jet",28.7,38.7],E290:["Embraer 190-E2","regional-jet",33.7,36.2],E295:["Embraer 195-E2","regional-jet",33.7,41.5],CRJ2:["Bombardier CRJ200","regional-jet",21.2,26.8],CRJ7:["Bombardier CRJ700","regional-jet",23.2,32.3],CRJ9:["Bombardier CRJ900","regional-jet",24.9,36.2],CRJX:["Bombardier CRJ1000","regional-jet",26.2,39.1],AT72:["ATR 72","regional-turboprop",27.1,27.2],AT76:["ATR 72-600","regional-turboprop",27.1,27.2],AT45:["ATR 42","regional-turboprop",24.6,22.7],DH8D:["Dash 8 Q400","regional-turboprop",28.4,32.8],DH8C:["Dash 8-300","regional-turboprop",27.4,25.7],SF34:["Saab 340","regional-turboprop",21.4,19.7],B190:["Beechcraft 1900","regional-turboprop",17.7,17.6],C25A:["Cessna CitationJet CJ2","business-jet",14.3,14.4],C56X:["Cessna Citation Excel","business-jet",17.2,16],C68A:["Cessna Citation Latitude","business-jet",22,18.9],C550:["Cessna Citation II","business-jet",15.8,14.4],E55P:["Embraer Phenom 300","business-jet",15.9,15.6],E50P:["Embraer Phenom 100","business-jet",12.3,12.8],GLF5:["Gulfstream G550","business-jet",28.5,29.4],FA7X:["Dassault Falcon 7X","business-jet",26.2,23.4],CL60:["Bombardier Challenger 600","business-jet",19.6,20.9],LJ45:["Learjet 45","business-jet",14.6,17.7],H25B:["Hawker 800","business-jet",15.7,15.6],C172:["Cessna 172","light-piston",11,8.3],C152:["Cessna 152","light-piston",10.2,7.3],C182:["Cessna 182","light-piston",10.9,8.8],P28A:["Piper Cherokee","light-piston",10.7,7.2],PA34:["Piper Seneca","light-piston",11.8,8.7],SR20:["Cirrus SR20","light-piston",10.9,7.9],SR22:["Cirrus SR22","light-piston",11.7,7.9],S22T:["Cirrus SR22T","light-piston",11.7,7.9],DA40:["Diamond DA40","light-piston",11.6,8.1],DA42:["Diamond DA42","light-piston",13.4,8.6],BE20:["Beechcraft King Air 200","turboprop-light",16.6,13.3],BE58:["Beechcraft Baron","light-piston",11.5,9.1],C208:["Cessna Caravan","turboprop-light",15.9,11.5],PC12:["Pilatus PC-12","turboprop-light",16.3,14.4],TBM9:["Daher TBM 900","turboprop-light",12.8,10.7],EC35:["Airbus H135","helicopter-light",10.2,12.1],EC45:["Airbus H145","helicopter-medium",11,13.6],AS50:["Airbus H125","helicopter-light",10.7,12.9],EC30:["Airbus H130","helicopter-light",10.7,12.6],B407:["Bell 407","helicopter-light",10.7,12.7],B06:["Bell 206","helicopter-light",10.2,12],B429:["Bell 429","helicopter-medium",10.9,13],B505:["Bell 505","helicopter-light",10.4,11.9],R44:["Robinson R44","helicopter-light",10.1,11.7],R22:["Robinson R22","helicopter-light",7.7,8.8],A109:["Agusta A109","helicopter-medium",11,13],A139:["Leonardo AW139","helicopter-medium",13.8,16.7],S92:["Sikorsky S-92","helicopter-heavy",17.2,20.9],H60:["Sikorsky UH-60 Black Hawk","helicopter-heavy",16.4,19.8],T38:["Northrop T-38 Talon","military-jet",7.7,14.1],HAWK:["BAE Hawk","military-jet",9.4,11.9],GLID:["Glider","glider",17,7],BALL:["Balloon","balloon",15,20],ULAC:["Ultralight","ultralight",9.5,6],C42:["Ikarus C42","ultralight",9.4,6.3],DRON:["Drone","unmanned",1,.6]};static CATEGORIES={A1:["Light aircraft","light-piston",11,8.3],A2:["Small aircraft","business-jet",15,15],A3:["Large aircraft","airliner-narrow",34.1,37.6],A4:["High-vortex large aircraft","airliner-narrow",38,47.3],A5:["Heavy aircraft","airliner-wide",60.3,63.7],A6:["High-performance aircraft","military-jet",8,14],A7:["Rotorcraft","helicopter-medium",10.7,12.7],B1:["Glider","glider",17,7],B2:["Lighter-than-air","balloon",15,20],B4:["Ultralight","ultralight",9.5,6],B6:["Unmanned aircraft","unmanned",1.5,1]};static GENERIC={name:"Airliner",kind:"airliner-narrow",spanM:34.1,lengthM:37.6,basis:"nothing"};static of(t){const e=t?.type?.toUpperCase(),a=e?k.TYPES[e]:void 0;if(a)return{code:e,name:a[0],kind:a[1],spanM:a[2],lengthM:a[3],basis:"type"};const n=t?.category?k.CATEGORIES[t.category]:void 0;return n?{name:n[0],kind:n[1],spanM:n[2],lengthM:n[3],basis:"category"}:{...k.GENERIC}}static isHelicopter(t){return t.kind.startsWith("helicopter")}}class O{static DUSK_SUN_ELEVATION_DEG=-.83;static ALWAYS=new Set(["airliner-narrow","airliner-wide","regional-turboprop","regional-jet","business-jet"]);static NONE=new Set(["glider","balloon"]);static BRIGHTNESS={"light-piston":[.5,.2,.5],"turboprop-light":[.7,.4,.8],ultralight:[.4,.2,.4],unmanned:[0,.05,0],"helicopter-light":[1,1,1],"helicopter-medium":[1,1,1],"helicopter-heavy":[1,1,1],"military-jet":[1,1,1]};static LANDING_LIGHTS_BELOW_FT=1e4;static LANDING_INTENSITY=600;static LANDING_BEAM_DEG=10;static LANDING_COLOR="#fff1dc";static LANDING_BRIGHTNESS={"airliner-narrow":1,"airliner-wide":1,"regional-jet":.6,"regional-turboprop":.6,"business-jet":.4,"turboprop-light":.2,"light-piston":.1,ultralight:.05,"helicopter-light":.1,"helicopter-medium":.2,"helicopter-heavy":.2};static lampsOn(t,e){if(O.NONE.has(t))return{navigation:!1,beacon:!1,strobes:!1};if(O.ALWAYS.has(t))return{navigation:!0,beacon:!0,strobes:!0};const a=e<O.DUSK_SUN_ELEVATION_DEG;return t==="unmanned"?{navigation:!1,beacon:!1,strobes:a}:{navigation:a,beacon:a,strobes:a}}static lights(t,e){const a=O.lampsOn(t.kind,e),n=t.kind.startsWith("helicopter"),s=At.find(h=>h.id===(n?"helicopter":"airliner")).create(),[c,i]=n?[5,7]:[17,18],r=t.spanM/2/c,l=t.lengthM/2/i,[o,d,u]=O.BRIGHTNESS[t.kind]??[1,1,1];return s.filter(h=>h.id.startsWith("nav")?a.navigation:h.id.startsWith("strobe")?a.strobes:h.id.startsWith("beacon")?a.beacon:!0).filter(h=>!(h.id.startsWith("beacon")&&!a.beacon)).map(h=>{const p=h.id.startsWith("nav")?o:h.id.startsWith("strobe")?d:u;return{...h,offsetM:{x:h.offsetM.x*r,y:h.offsetM.y,z:h.offsetM.z*l},intensity:(h.intensity??1)*p}}).filter(h=>(h.intensity??1)>0)}static landingLights(t,e,a){const n=O.LANDING_BRIGHTNESS[t.kind]??0;if(n===0||!O.lampsOn(t.kind,e).navigation)return[];const s=o=>o<O.LANDING_LIGHTS_BELOW_FT;if(!a.some(o=>s(o.altitudeFt)))return[];const c=O.LANDING_INTENSITY*n,i=a.flatMap((o,d)=>d>0&&s(o.altitudeFt)!==s(a[d-1].altitudeFt)?[{t:o.t,intensity:s(o.altitudeFt)?c:0}]:[]),r=t.spanM/34,l=t.lengthM/36;return[-1,1].map(o=>({id:o<0?"landing-left":"landing-right",offsetM:{x:o*5*r,y:-1,z:3*l},color:O.LANDING_COLOR,intensity:s(a[0].altitudeFt)?c:0,pattern:{kind:"steady"},beamDeg:O.LANDING_BEAM_DEG,keyframes:i}))}static bodyColor(t){return t.kind==="military-jet"?"#8a8e94":t.kind.startsWith("helicopter")?"#c8ccd1":t.kind==="unmanned"?"#2c2e33":"#dde0e4"}}class U{static FAMILIES={"amvlab-a320":["A318","A319","A320","A321","A19N","A20N","A21N"],"amvlab-b737":["B732","B733","B734","B735","B736","B737","B738","B739","B37M","B38M","B39M","B3XM"],"amvlab-a350":["A359","A35K"],"amvlab-a380":["A388"],"amvlab-b787":["B788","B789","B78X"]};static BY_TYPE=new Map(Object.entries(U.FAMILIES).flatMap(([t,e])=>e.map(a=>[a,t])));static idOf(t){return t?U.BY_TYPE.get(t.toUpperCase()):void 0}}class R{static ID_PREFIX=W.ID_PREFIX;static MAX_OBJECTS=40;static FT_TO_M=.3048;static DEG=Math.PI/180;static from(t,e,a,n=R.MAX_OBJECTS,s={}){return new Ht(t,e,a,n,s).build()}static idOf(t,e){return W.idOf(t,e)}static keyOf(t){return W.keyOf(t)}static HEIGHT_OVER_LENGTH=.29;static sizeOf(t){return{widthM:t.spanM,lengthM:t.lengthM,heightM:t.lengthM*R.HEIGHT_OVER_LENGTH}}static offsetOf(t,e){const a=L.seenFrom(t,{lat:e.lat,lng:e.lng,heightM:e.altitudeFt*R.FT_TO_M}),n=a.distanceKm*1e3,s=n*Math.cos(a.altitudeDeg*R.DEG);return{eastM:s*Math.sin(a.azimuthDeg*R.DEG),northM:s*Math.cos(a.azimuthDeg*R.DEG),upM:n*Math.sin(a.altitudeDeg*R.DEG),altitudeDeg:a.altitudeDeg,distanceKm:a.distanceKm}}static segments(t){const e=[];let a=[];for(const n of t.points){const s=a[a.length-1];s&&n.t-s.t>F.MAX_GAP_S*1e3&&(e.push(a),a=[]),a.push(n)}return e.push(a),e.filter(n=>n.length>=2)}static bearingDeg(t,e){return(Math.atan2(e.eastM-t.eastM,e.northM-t.northM)/R.DEG+360)%360}}class Ht{constructor(t,e,a,n,s){this.tracks=t,this.observer=e,this.startMs=a,this.maxObjects=n,this.options=s}build(){const t=[];for(const a of this.tracks){const n=R.keyOf(a),s=this.options.models?.get(n)??k.of(void 0);R.segments(a).forEach((c,i)=>{const r=c.map(h=>({point:h,at:R.offsetOf(this.observer,h)}));if(!r.some(h=>h.at.altitudeDeg>=0))return;const l=r.map((h,p)=>({t:h.point.t-this.startMs,eastM:h.at.eastM,northM:h.at.northM,altitudeM:h.at.upM,headingDeg:h.point.trackDeg??(p+1<r.length?R.bearingDeg(h.at,r[p+1].at):R.bearingDeg(r[p-1].at,h.at))})),o=R.idOf(a,i),d=r[Math.floor(r.length/2)].point,u=this.options.sunElevationAt?.(d)??90;t.push({object:{id:o,kind:"aircraft",eastM:l[0].eastM,northM:l[0].northM,headingDeg:l[0].headingDeg,sizeM:R.sizeOf(s),model:U.idOf(s.code)?{id:U.idOf(s.code)}:void 0,color:O.bodyColor(s),lights:[...O.lights(s,u),...O.landingLights(s,u,c.map(h=>({t:h.t-this.startMs,altitudeFt:h.altitudeFt})))],track:l},presence:{fromMs:l[0].t,untilMs:l[l.length-1].t},flight:{icao:a.icao,nonIcao:a.nonIcao,points:c},closestKm:Math.min(...r.map(h=>h.at.distanceKm))})})}t.sort((a,n)=>a.closestKm-n.closestKm);const e=t.slice(0,this.maxObjects);return{objects:e.map(a=>a.object),presence:new Map(e.map(a=>[a.object.id,a.presence])),flights:new Map(e.map(a=>[a.object.id,a.flight])),total:t.length,shown:e.length}}}const mt=[{id:"turbofan-narrow-body",name:"Turbofan airliner, narrow-body",kinds:["airliner-narrow"],totalDbA:148,shapeDb:[-32,-17,-9,-6,-5,-7,-12,-22],character:{toneHz:1800,toneShare:.3,humHz:90,humShare:.7}},{id:"turbofan-wide-body",name:"Turbofan airliner, wide-body",kinds:["airliner-wide"],totalDbA:151,shapeDb:[-28,-14,-7,-4,-3,-6,-12,-22],character:{toneHz:1200,toneShare:.3,humHz:70,humShare:.7}},{id:"regional-jet",name:"Regional jet",kinds:["regional-jet"],totalDbA:144,shapeDb:[-32,-17,-9,-5,-4,-6,-11,-21],character:{toneHz:1900,toneShare:.3,humHz:95,humShare:.7}},{id:"business-jet",name:"Business jet",kinds:["business-jet"],totalDbA:141,shapeDb:[-30,-15,-8,-4,-3,-4,-9,-19],character:{toneHz:2500,toneShare:.25,humHz:110,humShare:.7}},{id:"turboprop",name:"Turboprop",kinds:["regional-turboprop","turboprop-light"],totalDbA:138,shapeDb:[-14,-9,-8,-6,-8,-13,-20,-28],character:{toneHz:80,toneShare:.5}},{id:"light-piston",name:"Light piston aircraft",kinds:["light-piston"],totalDbA:130,shapeDb:[-18,-9,-5,-4,-8,-14,-22,-30],character:{toneHz:80,toneShare:.4}},{id:"ultralight",name:"Ultralight",kinds:["ultralight"],totalDbA:124,shapeDb:[-16,-8,-5,-4,-9,-15,-23,-31],character:{toneHz:140,toneShare:.4}},{id:"helicopter-light",name:"Light helicopter",kinds:["helicopter-light"],totalDbA:134,shapeDb:[-15,-8,-4,-3,-6,-10,-16,-24],character:{modulationHz:20,modulationDepth:.5}},{id:"helicopter-medium",name:"Medium helicopter",kinds:["helicopter-medium"],totalDbA:138,shapeDb:[-14,-7,-4,-3,-6,-10,-16,-24],character:{modulationHz:22,modulationDepth:.5}},{id:"helicopter-heavy",name:"Heavy helicopter",kinds:["helicopter-heavy"],totalDbA:144,shapeDb:[-12,-6,-4,-4,-7,-11,-17,-25],character:{modulationHz:17,modulationDepth:.5}},{id:"military-jet",name:"Military jet",kinds:["military-jet"],totalDbA:152,shapeDb:[-26,-12,-6,-3,-2,-3,-7,-15]},{id:"glider",name:"Glider",kinds:["glider"],totalDbA:85,shapeDb:[-30,-22,-15,-10,-8,-8,-14,-22]},{id:"balloon",name:"Hot-air balloon",kinds:["balloon"],totalDbA:100,shapeDb:[-25,-15,-9,-5,-3,-6,-12,-20]},{id:"unmanned",name:"Unmanned aircraft",kinds:["unmanned"],totalDbA:88,shapeDb:[-40,-30,-20,-12,-6,-3,-3,-8],character:{toneHz:450,toneShare:1}}],ht=mt.map(w=>({id:w.id,name:w.name,soundPowerA:w.shapeDb.map(t=>t+w.totalDbA-A.sumDb(w.shapeDb)),character:w.character}));class g{static DEFAULT_AMBIENT_DB_A=35;static DETECTION_MARGIN_DB=3;static AMBIENT_SHAPE_DB=[-12,-7,-5,-5,-7,-11,-17,-25];static HEARING_FLOOR_DB_A=0;static ITERATIONS=30;static CONVERGED_MS=.5;static VELOCITY_STEP_MS=500;static noiseOfKind(t){const e=mt.find(a=>a.kinds.includes(t));return ht.find(a=>a.id===(e?.id??"turbofan-narrow-body"))}static bandsAt(t,e,a=A.STANDARD){const n=20*Math.log10(Math.max(e*1e3,1))+11;return A.OCTAVES.map((s,c)=>t.soundPowerA[c]-n-A.absorptionDbPerKm(s,a)*e)}static couldBeHeard(t,e,a=g.DEFAULT_AMBIENT_DB_A,n=A.STANDARD){const s=g.ambientBands(a);return g.bandsAt(t,e,n).some((c,i)=>c>=Math.max(s[i]+g.DETECTION_MARGIN_DB,g.HEARING_FLOOR_DB_A))}static ambientBands(t){const e=g.AMBIENT_SHAPE_DB,a=A.sumDb(e);return e.map(n=>t+n-a)}static heardAt(t,e,a,n={}){const s=n.air??A.STANDARD,c=A.speedOfSound(s.temperatureC),i=t.points[t.points.length-1]?.t;if(i===void 0)return;let r=Math.min(a,i),l=F.positionAt(t,r);if(!l)return;let o=L.seenFrom(e,l.geo);for(let b=0;b<g.ITERATIONS;b++){const _=a-o.distanceKm*1e3*1e3/c,j=Math.abs(_-r);if(r=_,l=F.positionAt(t,r),!l)return;if(o=L.seenFrom(e,l.geo),j<g.CONVERGED_MS)break}const d=F.positionAt(t,a),u=d?L.seenFrom(e,d.geo):o,h=n.noise??ht[0],p=n.ambientDbA??g.DEFAULT_AMBIENT_DB_A,m=g.ambientBands(p),M=g.bandsAt(h,o.distanceKm,s),f=M.map((b,_)=>b>=Math.max(m[_]+g.DETECTION_MARGIN_DB,g.HEARING_FLOOR_DB_A)),I=M.indexOf(Math.max(...M)),S=f.lastIndexOf(!0);return{track:t,audible:f.some(Boolean),levelDbA:A.sumDb(M),bandsDbA:M,ambientDbA:p,delayS:(a-r)/1e3,emittedAtMs:r,sound:o,seen:u,lagDeg:g.angleBetween(o,u),dopplerRatio:g.doppler(t,e,r,c),dominantHz:A.OCTAVES[I],cutoffHz:S<0?void 0:A.OCTAVES[S]}}static profile(t,e,a,n,s=2e3,c={}){const i=[];let r,l,o=a;for(let d=a;d<=n;d+=s){const u=g.heardAt(t,e,d,c);u&&(!l||u.levelDbA>l.levelDbA)&&(l=u,o=d),u?.audible?r?r.untilMs=d:i.push(r={fromMs:d,untilMs:d}):r=void 0}return{track:t,audible:i,peakDbA:l?.levelDbA??-1/0,peakAtMs:o,peakDelayS:l?.delayS??0}}static angleBetween(t,e){const a=o=>{const d=o.altitudeDeg*Math.PI/180,u=o.azimuthDeg*Math.PI/180;return[Math.cos(d)*Math.sin(u),Math.cos(d)*Math.cos(u),Math.sin(d)]},[n,s,c]=a(t),[i,r,l]=a(e);return Math.acos(Math.min(1,Math.max(-1,n*i+s*r+c*l)))*180/Math.PI}static doppler(t,e,a,n){const s=g.VELOCITY_STEP_MS,c=F.positionAt(t,a-s),i=F.positionAt(t,a+s);if(!c||!i)return 1;const r=L.seenFrom(e,c.geo).distanceKm*1e3,l=L.seenFrom(e,i.geo).distanceKm*1e3;return 1/(1-(r-l)/(2*s/1e3)/n)}}class Kt{static at(t,e,a,n,s={}){const c=F.seenFrom(t,a,n);if(!c)return;const i=k.of(e),r=g.heardAt(t,a,n,{noise:g.noiseOfKind(i.kind),...s});return{hex:`${t.nonIcao?"~":""}${t.icao.toString(16).padStart(6,"0")}`,registration:e?.registration,typeCode:i.code??e?.type,name:i.basis==="nothing"?void 0:i.name,kind:i.kind,basis:i.basis,military:e?.military===!0,restricted:e?.restricted===!0,altitudeFt:c.altitudeFt,groundSpeedKt:c.groundSpeedKt,trackDeg:c.trackDeg,sky:c.sky,angularRateDegPerS:c.angularRateDegPerS,hearing:r&&{audible:r.audible,levelDbA:r.levelDbA,ambientDbA:r.ambientDbA,delayS:r.delayS,lagDeg:r.lagDeg,dopplerRatio:r.dopplerRatio,cutoffHz:r.cutoffHz,dominantHz:r.dominantHz}}}}class D{static REFERENCE_AMPLITUDE=.02;static MASKING_RANGE_DB=6;static KNEE_DB=20;static COMPRESSION_RATIO=1.5;static EXPANSION_RATIO=1.8;static DEFAULT_MAX_VOICES=4;static candidates(t,e,a,n,s={}){const c=new Set;for(const[i,r]of t){const l=g.noiseOfKind(k.of(e.get(a(r))).kind);let o=1/0;for(const d of r.points)o=Math.min(o,L.seenFrom(n,{lat:d.lat,lng:d.lng,heightM:d.altitudeFt*.3048}).distanceKm);g.couldBeHeard(l,o,s.ambientDbA,s.air)&&c.add(i)}return c}static voices(t,e,a,n,s,c,i={}){const r=[];for(const l of t){const o=e.get(l);if(!o||i.only?.(l)===!1)continue;const d=i.kindOf?.(l)??k.of(a.get(n(o))).kind,u=i.noiseOf?.(l)??g.noiseOfKind(d),h=g.heardAt(o,s,c,{...i,noise:u});if(!h?.audible)continue;const p=i.throughDb,m=p?h.bandsDbA.map((M,f)=>M-(p[f]??0)):h.bandsDbA;p&&!D.noticed(m,h.ambientDbA)||r.push({id:l,kind:d,bandAmplitudes:D.bandAmplitudes(m,h.ambientDbA,i.referenceAmplitude),levelDbA:p?A.sumDb(m):h.levelDbA,distanceKm:h.sound.distanceKm,dopplerRatio:h.dopplerRatio,azimuthDeg:h.sound.azimuthDeg,elevationDeg:h.sound.altitudeDeg,character:u.character})}return r.sort((l,o)=>o.levelDbA-l.levelDbA).slice(0,i.maxVoices??D.DEFAULT_MAX_VOICES)}static noticed(t,e){const a=g.ambientBands(e);return t.some((n,s)=>n>=a[s]+g.DETECTION_MARGIN_DB)}static bandAmplitudes(t,e,a=D.REFERENCE_AMPLITUDE){const n=g.ambientBands(e),s=g.DETECTION_MARGIN_DB,c=A.sumDb(t),i=c-e,r=i>=D.KNEE_DB?D.KNEE_DB+(i-D.KNEE_DB)/D.COMPRESSION_RATIO:D.KNEE_DB-(D.KNEE_DB-i)*D.EXPANSION_RATIO,l=a*10**(r/20);return t.map((o,d)=>{const u=Math.min(1,Math.max(0,(o-n[d]-s+D.MASKING_RANGE_DB)/(2*D.MASKING_RANGE_DB)));return u*u*(3-2*u)*l*10**((o-c)/20)})}static BANDS_HZ=A.OCTAVES}class V{static RUMBLE_BELOW_HZ=500;static DULL_BELOW_HZ=2e3;static PITCH_NOTICED=.03;static text(t,e,a,n){const s=(u,h=0)=>u.toLocaleString(n,{maximumFractionDigits:h}),c=(u,h)=>u.replace(/\{(\w+)\}/g,(p,m)=>h[m]??`{${m}}`),i=[],r=[t.registration,t.name].filter(Boolean).join(" · ");i.push(r||c(e.unnamed,{hex:t.hex}));const l=[c(e.altitude,{value:s(Math.round(t.altitudeFt/100)*100)}),t.groundSpeedKt===void 0?void 0:c(e.speed,{value:s(Math.round(t.groundSpeedKt))}),t.trackDeg===void 0?void 0:c(e.heading,{value:s(Math.round(t.trackDeg))})].filter(Boolean);i.push(l.join(" · ")),i.push(c(e.position,{distance:s(t.sky.distanceKm,t.sky.distanceKm<10?1:0),elevation:s(Math.round(t.sky.altitudeDeg)),bearing:a(t.sky.azimuthDeg)}));const o=t.hearing;if(!o)i.push(e.soundUnknown);else if(!o.audible)i.push(c(e.inaudible,{level:s(Math.round(o.levelDbA)),ambient:s(Math.round(o.ambientDbA))}));else{const u=o.cutoffHz??0,h=u<=V.RUMBLE_BELOW_HZ?e.rumble:u<=V.DULL_BELOW_HZ?e.muffled:e.broad,p=o.dopplerRatio-1,m=Math.abs(p)<V.PITCH_NOTICED?"":c(p>0?e.pitchHigher:e.pitchLower,{percent:s(Math.round(Math.abs(p)*100))});i.push(c(e.heard,{level:s(Math.round(o.levelDbA)),delay:s(Math.round(o.delayS)),lag:s(Math.round(o.lagDeg)),character:c(h,{cutoff:s(u)}),pitch:m}))}t.contrail&&i.push(c(t.contrail.persistent?e.contrailPersistent:e.contrailShort,{rhi:s(Math.round(t.contrail.iceRelativeHumidity*100))}));const d=[t.military?e.military:void 0,t.restricted?e.restricted:void 0].filter(Boolean);return d.length>0&&i.push(d.join(" · ")),i.push(e.candidate),i.join(`
2
- `)}}class Z{static EFFICIENCY={"airliner-narrow":.34,"airliner-wide":.38,"regional-jet":.32,"business-jet":.3,"military-jet":.22,unknown:.34};static efficiencyOf(t){return Z.EFFICIENCY[t]}}class E{static EMISSION_INDEX_WATER=1.25;static COMBUSTION_HEAT=432e5;static AIR_HEAT_CAPACITY=1004;static MOLAR_MASS_RATIO=.622;static FT_TO_M=.3048;static TROPOPAUSE_M=11e3;static TROPOPAUSE_HPA=226.32;static ISOTHERMAL_SCALE_HEIGHT_M=6341.62;static pressureAtAltitudeFt(t){const e=t*E.FT_TO_M;return e<=E.TROPOPAUSE_M?1013.25*(1-225577e-10*e)**5.25588:E.TROPOPAUSE_HPA*Math.exp(-(e-E.TROPOPAUSE_M)/E.ISOTHERMAL_SCALE_HEIGHT_M)}static saturationOverWaterPa(t){const e=t+273.15;return Math.exp(54.842763-6763.22/e-4.21*Math.log(e)+367e-6*e+Math.tanh(.0415*(e-218.8))*(53.878-1331.22/e-9.44523*Math.log(e)+.014025*e))}static saturationOverIcePa(t){const e=t+273.15;return Math.exp(9.550426-5723.265/e+3.53068*Math.log(e)-.00728332*e)}static iceRelativeHumidity(t,e){return e*E.saturationOverWaterPa(t)/E.saturationOverIcePa(t)}static mixingSlope(t,e){return E.EMISSION_INDEX_WATER*E.AIR_HEAT_CAPACITY*t*100/(E.MOLAR_MASS_RATIO*E.COMBUSTION_HEAT*(1-e))}static criticalTemperatureC(t,e){const a=Math.log(E.mixingSlope(t,e)-.053);return-46.46+9.43*a+.72*a*a}static requiredHumidity(t,e,a){const n=E.criticalTemperatureC(t,e);return(E.mixingSlope(t,e)*(a-n)+E.saturationOverWaterPa(n))/E.saturationOverWaterPa(a)}static evaluate(t,e){const a=E.criticalTemperatureC(t.pressureHpa,e),n=E.requiredHumidity(t.pressureHpa,e,t.temperatureC),s=E.iceRelativeHumidity(t.temperatureC,t.relativeHumidity),c=t.temperatureC<a&&t.relativeHumidity>=n;return{forms:c,persistent:c&&s>=1,criticalTemperatureC:a,requiredHumidity:n,iceRelativeHumidity:s}}}class y{static HOLD_MS=36e5;static DEG=Math.PI/180;static GAS_CONSTANT_OVER_GRAVITY=287.05/9.80665;static at(t,e,a){if(t.length===0)return;const n=t[0],s=t[t.length-1];if(e<n.t-y.HOLD_MS||e>s.t+y.HOLD_MS)return;const c=t.findIndex(h=>h.t>e),i=c===0?t[0]:t[(c===-1?t.length:c)-1],r=c===-1||c===0?i:t[c],l=y.atLevel(i,a),o=y.atLevel(r,a);if(!l||!o)return;const d=r.t>i.t?Math.min(1,Math.max(0,(e-i.t)/(r.t-i.t))):0,u=(h,p)=>h+(p-h)*d;return{pressureHpa:a,temperatureC:u(l.temperatureC,o.temperatureC),relativeHumidity:u(l.relativeHumidity,o.relativeHumidity),driftEastMs:u(l.driftEastMs,o.driftEastMs),driftNorthMs:u(l.driftNorthMs,o.driftNorthMs),shearPerS:u(l.shearPerS,o.shearPerS)}}static atLevel(t,e){const a=t.levels;for(let n=0;n+1<a.length;n++){const s=a[n],c=a[n+1];if(e>s.pressureHpa||e<c.pressureHpa)continue;const i=(Math.log(s.pressureHpa)-Math.log(e))/(Math.log(s.pressureHpa)-Math.log(c.pressureHpa)),r=(h,p)=>h+(p-h)*i,l=h=>{const p=h.windFromDeg*y.DEG;return{east:-h.windSpeedMs*Math.sin(p),north:-h.windSpeedMs*Math.cos(p)}},o=l(s),d=l(c),u=y.GAS_CONSTANT_OVER_GRAVITY*((s.temperatureC+c.temperatureC)/2+273.15)*Math.log(s.pressureHpa/c.pressureHpa);return{pressureHpa:e,temperatureC:r(s.temperatureC,c.temperatureC),relativeHumidity:r(s.relativeHumidity,c.relativeHumidity),driftEastMs:r(o.east,d.east),driftNorthMs:r(o.north,d.north),shearPerS:Math.hypot(d.east-o.east,d.north-o.north)/u}}}}class H{static MIN_ALTITUDE_FT=2e4;static DENSE_MS=3e5;static SPARSE_STEP_MS=6e4;static SATURATION_HORIZON_MS=3*36e5;static SATURATION_STEP_MS=6e5;static PRESSURE_STEP_HPA=5;static plan(t,e,a,n){if(a.length===0)return[];const s=[],c=new Map,i=(r,l,o)=>{const d=Math.round(l/H.PRESSURE_STEP_HPA)*H.PRESSURE_STEP_HPA,u=H.SATURATION_STEP_MS,h=Math.floor(r/u)*u,p=`${d}|${h}`,m=c.get(p);if(m!==void 0)return m+(h-r)/1e3;let M=1/0;for(let f=u;f<=H.SATURATION_HORIZON_MS;f+=u){const I=y.at(a,h+f,d);if(!I)break;if(E.evaluate(I,o).iceRelativeHumidity<1){M=f/1e3;break}}return c.set(p,M),M+(h-r)/1e3};for(const r of t.objects){const l=t.flights.get(r.id),o=r.track;if(!l||!o||o.length!==l.points.length)continue;const d=e?.get(W.keyOf(l))??k.of(void 0),u=Z.efficiencyOf(d.kind);if(u===void 0)continue;const h=[];let p=-1/0;o.forEach((m,M)=>{if(m.t<-H.DENSE_MS&&M+1<o.length&&m.t-p<H.SPARSE_STEP_MS)return;p=m.t;const f=l.points[M],I=E.pressureAtAltitudeFt(f.altitudeFt),S=y.at(a,n+m.t,I),b=S&&E.evaluate(S,u);h.push({tMs:m.t,eastM:m.eastM,northM:m.northM,upM:m.altitudeM??0,forms:b?.forms??!1,persistent:b?.persistent??!1,lifetimeS:b?et.lifetimeS(b.iceRelativeHumidity):0,driftEastMs:S?.driftEastMs??0,driftNorthMs:S?.driftNorthMs??0,shearPerS:S?.shearPerS??et.TYPICAL_SHEAR_PER_S,iceRelativeHumidity:b?.iceRelativeHumidity??0,saturatedForS:b?.persistent?i(n+m.t,I,u):0})}),h.some((m,M)=>m.forms&&h[M+1]?.forms)&&s.push({id:r.id,spanM:d.spanM,points:h})}return s}}const dt=[500,400,300,250,200,150],Lt=["temperature","relative_humidity","wind_speed","wind_direction"],Ft="2022-01-01",pt=.25;class Gt{fetchImpl;baseUrl;cache=new Map;constructor(t={}){this.fetchImpl=t.fetchImpl??fetch.bind(globalThis),this.baseUrl=t.baseUrl??"https://historical-forecast-api.open-meteo.com/v1/forecast"}between(t,e,a){const n=new Date(e).toISOString().slice(0,10);if(n<Ft)return Promise.resolve({status:"outside"});const s=new Date(a).toISOString().slice(0,10),i=`${`${Math.round(t.lat/pt)},${Math.round(t.lng/pt)}`}|${n}|${s}`;let r=this.cache.get(i);return r||(r=this.read(t,n,s),this.cache.set(i,r),r.then(l=>{l.status==="failed"&&this.cache.delete(i)})),r}async read(t,e,a){const n=dt.flatMap(i=>Lt.map(r=>`${r}_${i}hPa`)),s=new URLSearchParams({latitude:String(t.lat),longitude:String(t.lng),start_date:e,end_date:a,hourly:n.join(","),wind_speed_unit:"ms",timezone:"UTC"}),c=`${this.baseUrl}?${s}`;try{const i=await this.fetchImpl(c);if(!i.ok)return{status:"failed"};const r=await i.json();return this.decode(r,{id:"open-meteo-forecast",name:"Open-Meteo (historical forecast)",url:c})}catch{return{status:"failed"}}}decode(t,e){const a=t.hourly;if(!a?.time)return{status:"outside"};const n=[];return a.time.forEach((s,c)=>{const i=[];for(const r of dt){const l=p=>a[`${p}_${r}hPa`]?.[c],o=l("temperature"),d=l("relative_humidity"),u=l("wind_speed"),h=l("wind_direction");if([o,d,u,h].some(p=>p==null))return;i.push({pressureHpa:r,temperatureC:o,relativeHumidity:d/100,windSpeedMs:u,windFromDeg:h})}n.push({t:Date.parse(`${s}Z`),levels:i})}),n.length>0?{status:"found",samples:n,source:e}:{status:"outside"}}}const zt=Q.point("upperAir").provide(Q.BUILT_IN,[{id:"open-meteo-forecast",name:"Open-Meteo (historical forecast)",credit:"Weather data by Open-Meteo.com, CC BY 4.0",creditUrl:"https://open-meteo.com/en/docs/historical-forecast-api",create:()=>new Gt}]);class C{static DEFAULT_KIND=K.DEFAULT_KIND;static STEP_MS=1e3;static LEAD_MS=12e4;static FT_PER_M=1/.3048;static ID_PREFIX="decor:";tracks=new Map;static kindOf(t,e){return K.kindOf(t,e)}static flies(t){return K.flies(t)}voices(t,e,a,n={},s=()=>{}){const c=t.event.place?.[0];if(!c)return[];const i=new Map,r=new Map,l=Math.max(t.observerTrack.duration,(t.event.durationSeconds??0)*1e3);for(const o of t.decor){const d=K.kindOf(o,s(o));if(!d)continue;const u=`${C.ID_PREFIX}${o.id}`;i.set(u,this.trackOf(o,u,c,l)),r.set(u,d)}for(const o of this.tracks.keys())i.has(o)||this.tracks.delete(o);return i.size===0?[]:D.voices(new Set(i.keys()),i,new Map,o=>String(o.icao),a,e,{...n,kindOf:o=>r.get(o)})}trackOf(t,e,a,n){const s=JSON.stringify([t.track,t.eastM,t.northM,t.headingDeg,a.lat,a.lng,n]),c=this.tracks.get(e);if(c?.key===s)return c.track;const i=[];for(let u=0;u<=n;u+=C.STEP_MS)i.push(C.pointAt(t,u,a));(i.length===0||i[i.length-1].t<n)&&i.push(C.pointAt(t,n,a));const r=i[0],l=i[1]??r,o=u=>(l[u]-r[u])/(l.t-r.t||1);for(let u=C.STEP_MS*10;u<=C.LEAD_MS;u+=C.STEP_MS*10)i.unshift({t:-u,lat:r.lat-o("lat")*u,lng:r.lng-o("lng")*u,altitudeFt:Math.max(0,r.altitudeFt-o("altitudeFt")*u)});const d={icao:C.hash(e),nonIcao:!0,points:i};return this.tracks.set(e,{key:s,track:d}),d}static pointAt(t,e,a){const n=Et(t,e),s=Y(n.eastM,-n.northM,a.lat,a.lng);return{t:e,lat:s.lat,lng:s.lng,altitudeFt:n.altitudeM*C.FT_PER_M}}static hash(t){let e=0;for(let a=0;a<t.length;a++)e=e*31+t.charCodeAt(a)>>>0;return e}}class X{static CABIN_DB_A={"airliner-wide":76,"airliner-narrow":78,"regional-jet":78,"business-jet":82,"regional-turboprop":84,"turboprop-light":88,"light-piston":92,"military-jet":95,ultralight:95,"helicopter-light":95,"helicopter-medium":96,"helicopter-heavy":98,glider:70,balloon:60};static DEFAULT_DB_A=78;static voice(t,e={}){const a=tt.aircraftOf(t);if(!a)return;const n=g.noiseOfKind(a),s=tt.insulationDb(t),c=n.soundPowerA.map((o,d)=>o-s[d]),i=A.sumDb(c),r=X.levelDbA(a,t?.noise),l=c.map(o=>o-i+r);return{id:"observer:cabin",kind:a,bandAmplitudes:D.bandAmplitudes(l,e.ambientDbA??0,e.referenceAmplitude),levelDbA:r,inside:!0,distanceKm:0,dopplerRatio:1,azimuthDeg:0,elevationDeg:0,character:n.character}}static levelDbA(t,e){return(X.CABIN_DB_A[t]??X.DEFAULT_DB_A)+20*Math.log10(Math.max(e??1,.01))}}class G{static STEP_MS=250;static FT_PER_M=1/.3048;static ID_PREFIX="body:";tracks=new Map;static noiseOf(t){const e=g.noiseOfKind(t.kind),a=t.quieterDb??0;return a===0?e:{...e,id:`${e.id}-${a}dB`,soundPowerA:e.soundPowerA.map(n=>n-a)}}voices(t,e,a,n,s,c,i={}){const r=new Map,l=new Map,o=new Map;for(const u of t){if(!u.sound)continue;const h=`${G.ID_PREFIX}${u.id}`,p=this.trackOf(u,h,e,n,c);p&&(r.set(h,p),l.set(h,u.sound.kind),o.set(h,G.noiseOf(u.sound)))}for(const u of this.tracks.keys())r.has(u)||this.tracks.delete(u);if(r.size===0)return[];const d=Y(a.eastM,-a.northM,n.lat,n.lng);return D.voices(new Set(r.keys()),r,new Map,u=>String(u.icao),{lat:d.lat,lng:d.lng,heightM:a.upM},s,{...i,kindOf:u=>l.get(u),noiseOf:u=>o.get(u)})}trackOf(t,e,a,n,s){const c=`${n.lat},${n.lng},${s}`,i=this.tracks.get(e);if(i&&i.body===t&&i.origin===c)return i.track;const r=[];for(let o=-12e4;o<=s;o+=G.STEP_MS){const d=a(t,o);if(!d)continue;const u=Y(d.eastM,-d.northM,n.lat,n.lng);r.push({t:o,lat:u.lat,lng:u.lng,altitudeFt:d.upM*G.FT_PER_M})}if(r.length<2)return;const l={icao:G.hash(e),nonIcao:!0,points:r};return this.tracks.set(e,{body:t,origin:c,track:l}),l}static hash(t){let e=0;for(let a=0;a<t.length;a++)e=e*31+t.charCodeAt(a)>>>0;return e}}export{J as AircraftAudio,H as AircraftContrails,k as AircraftModels,v as AmbientNoise,G as BodyHearing,X as CabinHearing,C as DecorAircraftHearing,R as TrafficDecor,Kt as TrafficInfos,D as TrafficSound,V as TrafficTooltip,zt as UPPER_AIR_SOURCES};
@@ -1 +0,0 @@
1
- const e={caseHeading:"Case",eventsHeading:"History",kindObservation:"Observation",kindReading:"Reading",kindInterview:"Interview",openEvent:"Open this event",interpretationOf:"Interpretation of",passagesHeading:"Told in",byAuthor:"by",linkAnd:"and",caseSummary:"What this case says of itself",editCase:"Edit this case"};export{e as caseMessages_en};
@@ -1 +0,0 @@
1
- const e={caseHeading:"Caso",eventsHeading:"Historial",kindObservation:"Observación",kindReading:"Lectura",kindInterview:"Entrevista",openEvent:"Abrir este evento",interpretationOf:"Interpretación de",passagesHeading:"Relatado en",byAuthor:"por",linkAnd:"y",caseSummary:"Lo que este caso dice de sí mismo",editCase:"Editar este caso"};export{e as caseMessages_es};
@@ -1 +0,0 @@
1
- const e={caseHeading:"Dossier",eventsHeading:"Historique",kindObservation:"Observation",kindReading:"Lecture",kindInterview:"Interview",openEvent:"Ouvrir cet événement",interpretationOf:"Interprétation de",passagesHeading:"Relaté dans",byAuthor:"par",linkAnd:"et",caseSummary:"Ce que ce dossier dit de lui-même",editCase:"Modifier ce dossier"};export{e as caseMessages_fr};
@@ -1 +0,0 @@
1
- const e={caseHeading:"Caso",eventsHeading:"Cronologia",kindObservation:"Osservazione",kindReading:"Lettura",kindInterview:"Intervista",openEvent:"Aprire questo evento",interpretationOf:"Interpretazione di",passagesHeading:"Raccontato in",byAuthor:"di",linkAnd:"e",caseSummary:"Ciò che questo caso dice di sé",editCase:"Modificare questo caso"};export{e as caseMessages_it};
@@ -1 +0,0 @@
1
- import{aC as Le,aD as Q,aE as he,aF as Me,aG as v,aH as de,m as b,q as pe,C as F,aI as w,ah as U,ac as Se,aJ as ye,aK as be,a2 as K,aL as we,Q as C,af as me,aM as Ne,an as ge,aN as Ie,aO as Oe,x as V,aP as Ce,aQ as Te,aR as Fe,aS as Pe,aT as He,ai as J,aU as Re,aV as Z,aW as ke,aX as De,a5 as Ge,aY as X,aZ as ve,w as Ee,ab as Ue,aa as G,a_ as Ke,u as Be,a$ as je,o as Ve,b0 as Xe,b1 as ze,b2 as qe,a6 as We,G as z,b3 as Ye,a3 as Qe,b4 as Je,b5 as Ze,b6 as $e,b7 as en,b8 as nn,b9 as tn,ba as xe,J as sn,aj as ne,bb as te,bc as se,bd as ie,be as re,bf as rn,bg as on,K as an,N as cn}from"./rr0-sighting.mjs";function oe(f,n){if(n===Le)return console.warn("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Geometry already defined as triangles."),f;if(n===Q||n===he){let e=f.getIndex();if(e===null){const r=[],a=f.getAttribute("position");if(a!==void 0){for(let o=0;o<a.count;o++)r.push(o);f.setIndex(r),e=f.getIndex()}else return console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Undefined position attribute. Processing not possible."),f}const s=e.count-2,t=[];if(n===Q)for(let r=1;r<=s;r++)t.push(e.getX(0)),t.push(e.getX(r)),t.push(e.getX(r+1));else for(let r=0;r<s;r++)r%2===0?(t.push(e.getX(r)),t.push(e.getX(r+1)),t.push(e.getX(r+2))):(t.push(e.getX(r+2)),t.push(e.getX(r+1)),t.push(e.getX(r)));t.length/3!==s&&console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Unable to generate correct amount of triangles.");const i=f.clone();return i.setIndex(t),i.clearGroups(),i}else return console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Unknown draw mode:",n),f}class jn extends Me{constructor(n){super(n),this.dracoLoader=null,this.ktx2Loader=null,this.meshoptDecoder=null,this.pluginCallbacks=[],this.register(function(e){return new dn(e)}),this.register(function(e){return new pn(e)}),this.register(function(e){return new Ln(e)}),this.register(function(e){return new Mn(e)}),this.register(function(e){return new Sn(e)}),this.register(function(e){return new gn(e)}),this.register(function(e){return new Tn(e)}),this.register(function(e){return new Rn(e)}),this.register(function(e){return new En(e)}),this.register(function(e){return new hn(e)}),this.register(function(e){return new xn(e)}),this.register(function(e){return new mn(e)}),this.register(function(e){return new An(e)}),this.register(function(e){return new _n(e)}),this.register(function(e){return new ln(e)}),this.register(function(e){return new ae(e,g.EXT_MESHOPT_COMPRESSION)}),this.register(function(e){return new ae(e,g.KHR_MESHOPT_COMPRESSION)}),this.register(function(e){return new yn(e)})}load(n,e,s,t){const i=this;let r;if(this.resourcePath!=="")r=this.resourcePath;else if(this.path!==""){const c=v.extractUrlBase(n);r=v.resolveURL(c,this.path)}else r=v.extractUrlBase(n);this.manager.itemStart(n);const a=function(c){t?t(c):console.error(c),i.manager.itemError(n),i.manager.itemEnd(n)},o=new de(this.manager);o.setPath(this.path),o.setResponseType("arraybuffer"),o.setRequestHeader(this.requestHeader),o.setWithCredentials(this.withCredentials),o.load(n,function(c){try{i.parse(c,r,function(u){e(u),i.manager.itemEnd(n)},a)}catch(u){a(u)}},s,a)}setDRACOLoader(n){return this.dracoLoader=n,this}setKTX2Loader(n){return this.ktx2Loader=n,this}setMeshoptDecoder(n){return this.meshoptDecoder=n,this}register(n){return this.pluginCallbacks.indexOf(n)===-1&&this.pluginCallbacks.push(n),this}unregister(n){return this.pluginCallbacks.indexOf(n)!==-1&&this.pluginCallbacks.splice(this.pluginCallbacks.indexOf(n),1),this}parse(n,e,s,t){let i;const r={},a={},o=new TextDecoder;if(typeof n=="string")i=JSON.parse(n);else if(n instanceof ArrayBuffer)if(o.decode(new Uint8Array(n,0,4))===_e){try{r[g.KHR_BINARY_GLTF]=new bn(n)}catch(l){t&&t(l);return}i=JSON.parse(r[g.KHR_BINARY_GLTF].content)}else i=JSON.parse(o.decode(n));else i=n;if(i.asset===void 0||i.asset.version[0]<2){t&&t(new Error("THREE.GLTFLoader: Unsupported asset. glTF versions >=2.0 are supported."));return}const c=new Un(i,{path:e||this.resourcePath||"",crossOrigin:this.crossOrigin,requestHeader:this.requestHeader,manager:this.manager,ktx2Loader:this.ktx2Loader,meshoptDecoder:this.meshoptDecoder});c.fileLoader.setRequestHeader(this.requestHeader);for(let u=0;u<this.pluginCallbacks.length;u++){const l=this.pluginCallbacks[u](c);l.name||console.error("THREE.GLTFLoader: Invalid plugin found: missing name"),a[l.name]=l,r[l.name]=!0}if(i.extensionsUsed)for(let u=0;u<i.extensionsUsed.length;++u){const l=i.extensionsUsed[u],h=i.extensionsRequired||[];switch(l){case g.KHR_MATERIALS_UNLIT:r[l]=new fn;break;case g.KHR_DRACO_MESH_COMPRESSION:r[l]=new wn(i,this.dracoLoader);break;case g.KHR_TEXTURE_TRANSFORM:r[l]=new Nn;break;case g.KHR_MESH_QUANTIZATION:r[l]=new In;break;default:h.indexOf(l)>=0&&a[l]===void 0&&console.warn('THREE.GLTFLoader: Unknown extension "'+l+'".')}}c.setExtensions(r),c.setPlugins(a),c.parse(s,t)}parseAsync(n,e){const s=this;return new Promise(function(t,i){s.parse(n,e,t,i)})}}function un(){let f={};return{get:function(n){return f[n]},add:function(n,e){f[n]=e},remove:function(n){delete f[n]},removeAll:function(){f={}}}}function A(f,n,e){const s=f.json.materials[n];return s.extensions&&s.extensions[e]?s.extensions[e]:null}const g={KHR_BINARY_GLTF:"KHR_binary_glTF",KHR_DRACO_MESH_COMPRESSION:"KHR_draco_mesh_compression",KHR_LIGHTS_PUNCTUAL:"KHR_lights_punctual",KHR_MATERIALS_CLEARCOAT:"KHR_materials_clearcoat",KHR_MATERIALS_DISPERSION:"KHR_materials_dispersion",KHR_MATERIALS_IOR:"KHR_materials_ior",KHR_MATERIALS_SHEEN:"KHR_materials_sheen",KHR_MATERIALS_SPECULAR:"KHR_materials_specular",KHR_MATERIALS_TRANSMISSION:"KHR_materials_transmission",KHR_MATERIALS_IRIDESCENCE:"KHR_materials_iridescence",KHR_MATERIALS_ANISOTROPY:"KHR_materials_anisotropy",KHR_MATERIALS_UNLIT:"KHR_materials_unlit",KHR_MATERIALS_VOLUME:"KHR_materials_volume",KHR_TEXTURE_BASISU:"KHR_texture_basisu",KHR_TEXTURE_TRANSFORM:"KHR_texture_transform",KHR_MESH_QUANTIZATION:"KHR_mesh_quantization",KHR_MATERIALS_EMISSIVE_STRENGTH:"KHR_materials_emissive_strength",EXT_MATERIALS_BUMP:"EXT_materials_bump",EXT_TEXTURE_WEBP:"EXT_texture_webp",EXT_TEXTURE_AVIF:"EXT_texture_avif",EXT_MESHOPT_COMPRESSION:"EXT_meshopt_compression",KHR_MESHOPT_COMPRESSION:"KHR_meshopt_compression",EXT_MESH_GPU_INSTANCING:"EXT_mesh_gpu_instancing"};class ln{constructor(n){this.parser=n,this.name=g.KHR_LIGHTS_PUNCTUAL,this.cache={refs:{},uses:{}}}_markDefs(){const n=this.parser,e=this.parser.json.nodes||[];for(let s=0,t=e.length;s<t;s++){const i=e[s];i.extensions&&i.extensions[this.name]&&i.extensions[this.name].light!==void 0&&n._addNodeRef(this.cache,i.extensions[this.name].light)}}_loadLight(n){const e=this.parser,s="light:"+n;let t=e.cache.get(s);if(t)return t;const i=e.json,o=((i.extensions&&i.extensions[this.name]||{}).lights||[])[n];let c;const u=new F(16777215);o.color!==void 0&&u.setRGB(o.color[0],o.color[1],o.color[2],w);const l=o.range!==void 0?o.range:0;switch(o.type){case"directional":c=new be(u),c.target.position.set(0,0,-1),c.add(c.target);break;case"point":c=new ye(u),c.distance=l;break;case"spot":c=new Se(u),c.distance=l,o.spot=o.spot||{},o.spot.innerConeAngle=o.spot.innerConeAngle!==void 0?o.spot.innerConeAngle:0,o.spot.outerConeAngle=o.spot.outerConeAngle!==void 0?o.spot.outerConeAngle:Math.PI/4,c.angle=o.spot.outerConeAngle,c.penumbra=1-o.spot.innerConeAngle/o.spot.outerConeAngle,c.target.position.set(0,0,-1),c.add(c.target);break;default:throw new Error("THREE.GLTFLoader: Unexpected light type: "+o.type)}return c.position.set(0,0,0),y(c,o),o.intensity!==void 0&&(c.intensity=o.intensity),c.name=e.createUniqueName(o.name||"light_"+n),t=Promise.resolve(c),e.cache.add(s,t),t}getDependency(n,e){if(n==="light")return this._loadLight(e)}createNodeAttachment(n){const e=this,s=this.parser,i=s.json.nodes[n],a=(i.extensions&&i.extensions[this.name]||{}).light;return a===void 0?null:this._loadLight(a).then(function(o){return s._getNodeRef(e.cache,a,o)})}}class fn{constructor(){this.name=g.KHR_MATERIALS_UNLIT}getMaterialType(){return G}extendParams(n,e,s){const t=[];n.color=new F(1,1,1),n.opacity=1;const i=e.pbrMetallicRoughness;if(i){if(Array.isArray(i.baseColorFactor)){const r=i.baseColorFactor;n.color.setRGB(r[0],r[1],r[2],w),n.opacity=r[3]}i.baseColorTexture!==void 0&&t.push(s.assignTexture(n,"map",i.baseColorTexture,U))}return Promise.all(t)}}class hn{constructor(n){this.parser=n,this.name=g.KHR_MATERIALS_EMISSIVE_STRENGTH}extendMaterialParams(n,e){const s=A(this.parser,n,this.name);return s===null||s.emissiveStrength!==void 0&&(e.emissiveIntensity=s.emissiveStrength),Promise.resolve()}}class dn{constructor(n){this.parser=n,this.name=g.KHR_MATERIALS_CLEARCOAT}getMaterialType(n){return A(this.parser,n,this.name)!==null?b:null}extendMaterialParams(n,e){const s=A(this.parser,n,this.name);if(s===null)return Promise.resolve();const t=[];if(s.clearcoatFactor!==void 0&&(e.clearcoat=s.clearcoatFactor),s.clearcoatTexture!==void 0&&t.push(this.parser.assignTexture(e,"clearcoatMap",s.clearcoatTexture)),s.clearcoatRoughnessFactor!==void 0&&(e.clearcoatRoughness=s.clearcoatRoughnessFactor),s.clearcoatRoughnessTexture!==void 0&&t.push(this.parser.assignTexture(e,"clearcoatRoughnessMap",s.clearcoatRoughnessTexture)),s.clearcoatNormalTexture!==void 0&&(t.push(this.parser.assignTexture(e,"clearcoatNormalMap",s.clearcoatNormalTexture)),s.clearcoatNormalTexture.scale!==void 0)){const i=s.clearcoatNormalTexture.scale;e.clearcoatNormalScale=new pe(i,i)}return Promise.all(t)}}class pn{constructor(n){this.parser=n,this.name=g.KHR_MATERIALS_DISPERSION}getMaterialType(n){return A(this.parser,n,this.name)!==null?b:null}extendMaterialParams(n,e){const s=A(this.parser,n,this.name);return s===null||(e.dispersion=s.dispersion!==void 0?s.dispersion:0),Promise.resolve()}}class mn{constructor(n){this.parser=n,this.name=g.KHR_MATERIALS_IRIDESCENCE}getMaterialType(n){return A(this.parser,n,this.name)!==null?b:null}extendMaterialParams(n,e){const s=A(this.parser,n,this.name);if(s===null)return Promise.resolve();const t=[];return s.iridescenceFactor!==void 0&&(e.iridescence=s.iridescenceFactor),s.iridescenceTexture!==void 0&&t.push(this.parser.assignTexture(e,"iridescenceMap",s.iridescenceTexture)),s.iridescenceIor!==void 0&&(e.iridescenceIOR=s.iridescenceIor),e.iridescenceThicknessRange===void 0&&(e.iridescenceThicknessRange=[100,400]),s.iridescenceThicknessMinimum!==void 0&&(e.iridescenceThicknessRange[0]=s.iridescenceThicknessMinimum),s.iridescenceThicknessMaximum!==void 0&&(e.iridescenceThicknessRange[1]=s.iridescenceThicknessMaximum),s.iridescenceThicknessTexture!==void 0&&t.push(this.parser.assignTexture(e,"iridescenceThicknessMap",s.iridescenceThicknessTexture)),Promise.all(t)}}class gn{constructor(n){this.parser=n,this.name=g.KHR_MATERIALS_SHEEN}getMaterialType(n){return A(this.parser,n,this.name)!==null?b:null}extendMaterialParams(n,e){const s=A(this.parser,n,this.name);if(s===null)return Promise.resolve();const t=[];if(e.sheenColor=new F(0,0,0),e.sheenRoughness=0,e.sheen=1,s.sheenColorFactor!==void 0){const i=s.sheenColorFactor;e.sheenColor.setRGB(i[0],i[1],i[2],w)}return s.sheenRoughnessFactor!==void 0&&(e.sheenRoughness=s.sheenRoughnessFactor),s.sheenColorTexture!==void 0&&t.push(this.parser.assignTexture(e,"sheenColorMap",s.sheenColorTexture,U)),s.sheenRoughnessTexture!==void 0&&t.push(this.parser.assignTexture(e,"sheenRoughnessMap",s.sheenRoughnessTexture)),Promise.all(t)}}class Tn{constructor(n){this.parser=n,this.name=g.KHR_MATERIALS_TRANSMISSION}getMaterialType(n){return A(this.parser,n,this.name)!==null?b:null}extendMaterialParams(n,e){const s=A(this.parser,n,this.name);if(s===null)return Promise.resolve();const t=[];return s.transmissionFactor!==void 0&&(e.transmission=s.transmissionFactor),s.transmissionTexture!==void 0&&t.push(this.parser.assignTexture(e,"transmissionMap",s.transmissionTexture)),Promise.all(t)}}class Rn{constructor(n){this.parser=n,this.name=g.KHR_MATERIALS_VOLUME}getMaterialType(n){return A(this.parser,n,this.name)!==null?b:null}extendMaterialParams(n,e){const s=A(this.parser,n,this.name);if(s===null)return Promise.resolve();const t=[];e.thickness=s.thicknessFactor!==void 0?s.thicknessFactor:0,s.thicknessTexture!==void 0&&t.push(this.parser.assignTexture(e,"thicknessMap",s.thicknessTexture)),e.attenuationDistance=s.attenuationDistance||1/0;const i=s.attenuationColor||[1,1,1];return e.attenuationColor=new F().setRGB(i[0],i[1],i[2],w),Promise.all(t)}}class En{constructor(n){this.parser=n,this.name=g.KHR_MATERIALS_IOR}getMaterialType(n){return A(this.parser,n,this.name)!==null?b:null}extendMaterialParams(n,e){const s=A(this.parser,n,this.name);return s===null||(e.ior=s.ior!==void 0?s.ior:1.5,e.ior===0&&(e.ior=1e3)),Promise.resolve()}}class xn{constructor(n){this.parser=n,this.name=g.KHR_MATERIALS_SPECULAR}getMaterialType(n){return A(this.parser,n,this.name)!==null?b:null}extendMaterialParams(n,e){const s=A(this.parser,n,this.name);if(s===null)return Promise.resolve();const t=[];e.specularIntensity=s.specularFactor!==void 0?s.specularFactor:1,s.specularTexture!==void 0&&t.push(this.parser.assignTexture(e,"specularIntensityMap",s.specularTexture));const i=s.specularColorFactor||[1,1,1];return e.specularColor=new F().setRGB(i[0],i[1],i[2],w),s.specularColorTexture!==void 0&&t.push(this.parser.assignTexture(e,"specularColorMap",s.specularColorTexture,U)),Promise.all(t)}}class _n{constructor(n){this.parser=n,this.name=g.EXT_MATERIALS_BUMP}getMaterialType(n){return A(this.parser,n,this.name)!==null?b:null}extendMaterialParams(n,e){const s=A(this.parser,n,this.name);if(s===null)return Promise.resolve();const t=[];return e.bumpScale=s.bumpFactor!==void 0?s.bumpFactor:1,s.bumpTexture!==void 0&&t.push(this.parser.assignTexture(e,"bumpMap",s.bumpTexture)),Promise.all(t)}}class An{constructor(n){this.parser=n,this.name=g.KHR_MATERIALS_ANISOTROPY}getMaterialType(n){return A(this.parser,n,this.name)!==null?b:null}extendMaterialParams(n,e){const s=A(this.parser,n,this.name);if(s===null)return Promise.resolve();const t=[];return s.anisotropyStrength!==void 0&&(e.anisotropy=s.anisotropyStrength),s.anisotropyRotation!==void 0&&(e.anisotropyRotation=s.anisotropyRotation),s.anisotropyTexture!==void 0&&t.push(this.parser.assignTexture(e,"anisotropyMap",s.anisotropyTexture)),Promise.all(t)}}class Ln{constructor(n){this.parser=n,this.name=g.KHR_TEXTURE_BASISU}loadTexture(n){const e=this.parser,s=e.json,t=s.textures[n];if(!t.extensions||!t.extensions[this.name])return null;const i=t.extensions[this.name],r=e.options.ktx2Loader;if(!r){if(s.extensionsRequired&&s.extensionsRequired.indexOf(this.name)>=0)throw new Error("THREE.GLTFLoader: setKTX2Loader must be called before loading KTX2 textures");return null}return e.loadTextureImage(n,i.source,r)}}class Mn{constructor(n){this.parser=n,this.name=g.EXT_TEXTURE_WEBP}loadTexture(n){const e=this.name,s=this.parser,t=s.json,i=t.textures[n];if(!i.extensions||!i.extensions[e])return null;const r=i.extensions[e],a=t.images[r.source];let o=s.textureLoader;if(a.uri){const c=s.options.manager.getHandler(a.uri);c!==null&&(o=c)}return s.loadTextureImage(n,r.source,o)}}class Sn{constructor(n){this.parser=n,this.name=g.EXT_TEXTURE_AVIF}loadTexture(n){const e=this.name,s=this.parser,t=s.json,i=t.textures[n];if(!i.extensions||!i.extensions[e])return null;const r=i.extensions[e],a=t.images[r.source];let o=s.textureLoader;if(a.uri){const c=s.options.manager.getHandler(a.uri);c!==null&&(o=c)}return s.loadTextureImage(n,r.source,o)}}class ae{constructor(n,e){this.name=e,this.parser=n}loadBufferView(n){const e=this.parser.json,s=e.bufferViews[n];if(s.extensions&&s.extensions[this.name]){const t=s.extensions[this.name],i=this.parser.getDependency("buffer",t.buffer),r=this.parser.options.meshoptDecoder;if(!r||!r.supported){if(e.extensionsRequired&&e.extensionsRequired.indexOf(this.name)>=0)throw new Error("THREE.GLTFLoader: setMeshoptDecoder must be called before loading compressed files");return null}return i.then(function(a){const o=t.byteOffset||0,c=t.byteLength||0,u=t.count,l=t.byteStride,h=new Uint8Array(a,o,c);return r.decodeGltfBufferAsync?r.decodeGltfBufferAsync(u,l,h,t.mode,t.filter).then(function(d){return d.buffer}):r.ready.then(function(){const d=new ArrayBuffer(u*l);return r.decodeGltfBuffer(new Uint8Array(d),u,l,h,t.mode,t.filter),d})})}else return null}}class yn{constructor(n){this.name=g.EXT_MESH_GPU_INSTANCING,this.parser=n}createNodeMesh(n){const e=this.parser.json,s=e.nodes[n];if(!s.extensions||!s.extensions[this.name]||s.mesh===void 0)return null;const t=e.meshes[s.mesh];for(const c of t.primitives)if(c.mode!==M.TRIANGLES&&c.mode!==M.TRIANGLE_STRIP&&c.mode!==M.TRIANGLE_FAN&&c.mode!==void 0)return null;const r=s.extensions[this.name].attributes,a=[],o={};for(const c in r)a.push(this.parser.getDependency("accessor",r[c]).then(u=>(o[c]=u,o[c])));return a.length<1?null:(a.push(this.parser.createNodeMesh(n)),Promise.all(a).then(c=>{const u=c.pop(),l=u.isGroup?u.children:[u],h=c[0].count,d=[];for(const p of l){const R=new K,m=new C,T=new me,_=new C(1,1,1),x=new we(p.geometry,p.material,h);for(let E=0;E<h;E++)o.TRANSLATION&&m.fromBufferAttribute(o.TRANSLATION,E),o.ROTATION&&T.fromBufferAttribute(o.ROTATION,E),o.SCALE&&_.fromBufferAttribute(o.SCALE,E),x.setMatrixAt(E,R.compose(m,T,_));for(const E in o)if(E==="_COLOR_0"){const L=o[E];x.instanceColor=new Ne(L.array,L.itemSize,L.normalized)}else E!=="TRANSLATION"&&E!=="ROTATION"&&E!=="SCALE"&&p.geometry.setAttribute(E,o[E]);ge.prototype.copy.call(x,p),this.parser.assignFinalMaterial(x),d.push(x)}return u.isGroup?(u.clear(),u.add(...d),u):d[0]}))}}const _e="glTF",D=12,ce={JSON:1313821514,BIN:5130562};class bn{constructor(n){this.name=g.KHR_BINARY_GLTF,this.content=null,this.body=null;const e=new DataView(n,0,D),s=new TextDecoder;if(this.header={magic:s.decode(new Uint8Array(n.slice(0,4))),version:e.getUint32(4,!0),length:e.getUint32(8,!0)},this.header.magic!==_e)throw new Error("THREE.GLTFLoader: Unsupported glTF-Binary header.");if(this.header.version<2)throw new Error("THREE.GLTFLoader: Legacy binary file detected.");const t=this.header.length-D,i=new DataView(n,D);let r=0;for(;r<t;){const a=i.getUint32(r,!0);r+=4;const o=i.getUint32(r,!0);if(r+=4,o===ce.JSON){const c=new Uint8Array(n,D+r,a);this.content=s.decode(c)}else if(o===ce.BIN){const c=D+r;this.body=n.slice(c,c+a)}r+=a}if(this.content===null)throw new Error("THREE.GLTFLoader: JSON content not found.")}}class wn{constructor(n,e){if(!e)throw new Error("THREE.GLTFLoader: No DRACOLoader instance provided.");this.name=g.KHR_DRACO_MESH_COMPRESSION,this.json=n,this.dracoLoader=e,this.dracoLoader.preload()}decodePrimitive(n,e){const s=this.json,t=this.dracoLoader,i=n.extensions[this.name].bufferView,r=n.extensions[this.name].attributes,a={},o={},c={};for(const u in r){const l=$[u]||u.toLowerCase();a[l]=r[u]}for(const u in n.attributes){const l=$[u]||u.toLowerCase();if(r[u]!==void 0){const h=s.accessors[n.attributes[u]],d=H[h.componentType];c[l]=d.name,o[l]=h.normalized===!0}}return e.getDependency("bufferView",i).then(function(u){return new Promise(function(l,h){t.decodeDracoFile(u,function(d){for(const p in d.attributes){const R=d.attributes[p],m=o[p];m!==void 0&&(R.normalized=m)}l(d)},a,c,w,h)})})}}class Nn{constructor(){this.name=g.KHR_TEXTURE_TRANSFORM}extendTexture(n,e){return(e.texCoord===void 0||e.texCoord===n.channel)&&e.offset===void 0&&e.rotation===void 0&&e.scale===void 0||(n=n.clone(),e.texCoord!==void 0&&(n.channel=e.texCoord),e.offset!==void 0&&n.offset.fromArray(e.offset),e.rotation!==void 0&&(n.rotation=e.rotation),e.scale!==void 0&&n.repeat.fromArray(e.scale),n.needsUpdate=!0),n}}class In{constructor(){this.name=g.KHR_MESH_QUANTIZATION}}class Ae extends on{constructor(n,e,s,t){super(n,e,s,t)}copySampleValue_(n){const e=this.resultBuffer,s=this.sampleValues,t=this.valueSize,i=n*t*3+t;for(let r=0;r!==t;r++)e[r]=s[i+r];return e}interpolate_(n,e,s,t){const i=this.resultBuffer,r=this.sampleValues,a=this.valueSize,o=a*2,c=a*3,u=t-e,l=(s-e)/u,h=l*l,d=h*l,p=n*c,R=p-c,m=-2*d+3*h,T=d-h,_=1-m,x=T-h+l;for(let E=0;E!==a;E++){const L=r[R+E+a],N=r[R+E+o]*u,S=r[p+E+a],k=r[p+E]*u;i[E]=_*L+x*N+m*S+T*k}return i}}const On=new me;class Cn extends Ae{interpolate_(n,e,s,t){const i=super.interpolate_(n,e,s,t);return On.fromArray(i).normalize().toArray(i),i}}const M={POINTS:0,LINES:1,LINE_LOOP:2,LINE_STRIP:3,TRIANGLES:4,TRIANGLE_STRIP:5,TRIANGLE_FAN:6},H={5120:Int8Array,5121:Uint8Array,5122:Int16Array,5123:Uint16Array,5125:Uint32Array,5126:Float32Array},ue={9728:Re,9729:J,9984:He,9985:Pe,9986:Fe,9987:Te},le={33071:De,33648:ke,10497:Z},q={SCALAR:1,VEC2:2,VEC3:3,VEC4:4,MAT2:4,MAT3:9,MAT4:16},$={POSITION:"position",NORMAL:"normal",TANGENT:"tangent",TEXCOORD_0:"uv",TEXCOORD_1:"uv1",TEXCOORD_2:"uv2",TEXCOORD_3:"uv3",COLOR_0:"color",WEIGHTS_0:"skinWeight",JOINTS_0:"skinIndex"},I={scale:"scale",translation:"position",rotation:"quaternion",weights:"morphTargetInfluences"},Fn={CUBICSPLINE:void 0,LINEAR:xe,STEP:tn},W={OPAQUE:"OPAQUE",MASK:"MASK",BLEND:"BLEND"};function Pn(f){return f.DefaultMaterial===void 0&&(f.DefaultMaterial=new Ee({color:16777215,emissive:0,metalness:1,roughness:1,transparent:!1,depthTest:!0,side:rn})),f.DefaultMaterial}function O(f,n,e){for(const s in e.extensions)f[s]===void 0&&(n.userData.gltfExtensions=n.userData.gltfExtensions||{},n.userData.gltfExtensions[s]=e.extensions[s])}function y(f,n){n.extras!==void 0&&(typeof n.extras=="object"?Object.assign(f.userData,n.extras):console.warn("THREE.GLTFLoader: Ignoring primitive type .extras, "+n.extras))}function Hn(f,n,e){let s=!1,t=!1,i=!1;for(let c=0,u=n.length;c<u;c++){const l=n[c];if(l.POSITION!==void 0&&(s=!0),l.NORMAL!==void 0&&(t=!0),l.COLOR_0!==void 0&&(i=!0),s&&t&&i)break}if(!s&&!t&&!i)return Promise.resolve(f);const r=[],a=[],o=[];for(let c=0,u=n.length;c<u;c++){const l=n[c];if(s){const h=l.POSITION!==void 0?e.getDependency("accessor",l.POSITION):f.attributes.position;r.push(h)}if(t){const h=l.NORMAL!==void 0?e.getDependency("accessor",l.NORMAL):f.attributes.normal;a.push(h)}if(i){const h=l.COLOR_0!==void 0?e.getDependency("accessor",l.COLOR_0):f.attributes.color;o.push(h)}}return Promise.all([Promise.all(r),Promise.all(a),Promise.all(o)]).then(function(c){const u=c[0],l=c[1],h=c[2];return s&&(f.morphAttributes.position=u),t&&(f.morphAttributes.normal=l),i&&(f.morphAttributes.color=h),f.morphTargetsRelative=!0,f})}function kn(f,n){if(f.updateMorphTargets(),n.weights!==void 0)for(let e=0,s=n.weights.length;e<s;e++)f.morphTargetInfluences[e]=n.weights[e];if(n.extras&&Array.isArray(n.extras.targetNames)){const e=n.extras.targetNames;if(f.morphTargetInfluences.length===e.length){f.morphTargetDictionary={};for(let s=0,t=e.length;s<t;s++)f.morphTargetDictionary[e[s]]=s}else console.warn("THREE.GLTFLoader: Invalid extras.targetNames length. Ignoring names.")}}function Dn(f){let n;const e=f.extensions&&f.extensions[g.KHR_DRACO_MESH_COMPRESSION];if(e?n="draco:"+e.bufferView+":"+e.indices+":"+Y(e.attributes):n=f.indices+":"+Y(f.attributes)+":"+f.mode,f.targets!==void 0)for(let s=0,t=f.targets.length;s<t;s++)n+=":"+Y(f.targets[s]);return n}function Y(f){let n="";const e=Object.keys(f).sort();for(let s=0,t=e.length;s<t;s++)n+=e[s]+":"+f[e[s]]+";";return n}function ee(f){switch(f){case Int8Array:return 1/127;case Uint8Array:return 1/255;case Int16Array:return 1/32767;case Uint16Array:return 1/65535;default:throw new Error("THREE.GLTFLoader: Unsupported normalized accessor component type.")}}function Gn(f){return f.search(/\.jpe?g($|\?)/i)>0||f.search(/^data\:image\/jpeg/)===0?"image/jpeg":f.search(/\.webp($|\?)/i)>0||f.search(/^data\:image\/webp/)===0?"image/webp":f.search(/\.ktx2($|\?)/i)>0||f.search(/^data\:image\/ktx2/)===0?"image/ktx2":"image/png"}const vn=new K;class Un{constructor(n={},e={}){this.json=n,this.extensions={},this.plugins={},this.options=e,this.cache=new un,this.associations=new Map,this.primitiveCache={},this.nodeCache={},this.meshCache={refs:{},uses:{}},this.cameraCache={refs:{},uses:{}},this.lightCache={refs:{},uses:{}},this.sourceCache={},this.textureCache={},this.nodeNamesUsed={};let s=!1,t=-1,i=!1,r=-1;if(typeof navigator<"u"&&typeof navigator.userAgent<"u"){const a=navigator.userAgent;s=/^((?!chrome|android).)*safari/i.test(a)===!0;const o=a.match(/Version\/(\d+)/);t=s&&o?parseInt(o[1],10):-1,i=a.indexOf("Firefox")>-1,r=i?a.match(/Firefox\/([0-9]+)\./)[1]:-1}typeof createImageBitmap>"u"||s&&t<17||i&&r<98?this.textureLoader=new Ie(this.options.manager):this.textureLoader=new Oe(this.options.manager),this.textureLoader.setCrossOrigin(this.options.crossOrigin),this.textureLoader.setRequestHeader(this.options.requestHeader),this.fileLoader=new de(this.options.manager),this.fileLoader.setResponseType("arraybuffer"),this.options.crossOrigin==="use-credentials"&&this.fileLoader.setWithCredentials(!0)}setExtensions(n){this.extensions=n}setPlugins(n){this.plugins=n}parse(n,e){const s=this,t=this.json,i=this.extensions;this.cache.removeAll(),this.nodeCache={},this._invokeAll(function(r){return r._markDefs&&r._markDefs()}),Promise.all(this._invokeAll(function(r){return r.beforeRoot&&r.beforeRoot()})).then(function(){return Promise.all([s.getDependencies("scene"),s.getDependencies("animation"),s.getDependencies("camera")])}).then(function(r){const a={scene:r[0][t.scene||0],scenes:r[0],animations:r[1],cameras:r[2],asset:t.asset,parser:s,userData:{}};return O(i,a,t),y(a,t),Promise.all(s._invokeAll(function(o){return o.afterRoot&&o.afterRoot(a)})).then(function(){for(const o of a.scenes)o.updateMatrixWorld();n(a)})}).catch(e)}_markDefs(){const n=this.json.nodes||[],e=this.json.skins||[],s=this.json.meshes||[];for(let t=0,i=e.length;t<i;t++){const r=e[t].joints;for(let a=0,o=r.length;a<o;a++)n[r[a]].isBone=!0}for(let t=0,i=n.length;t<i;t++){const r=n[t];r.mesh!==void 0&&(this._addNodeRef(this.meshCache,r.mesh),r.skin!==void 0&&(s[r.mesh].isSkinnedMesh=!0)),r.camera!==void 0&&this._addNodeRef(this.cameraCache,r.camera)}}_addNodeRef(n,e){e!==void 0&&(n.refs[e]===void 0&&(n.refs[e]=n.uses[e]=0),n.refs[e]++)}_getNodeRef(n,e,s){if(n.refs[e]<=1)return s;const t=s.clone(),i=(r,a)=>{const o=this.associations.get(r);o!=null&&this.associations.set(a,o);for(const[c,u]of r.children.entries())i(u,a.children[c])};return i(s,t),t.name+="_instance_"+n.uses[e]++,t}_invokeOne(n){const e=Object.values(this.plugins);e.push(this);for(let s=0;s<e.length;s++){const t=n(e[s]);if(t)return t}return null}_invokeAll(n){const e=Object.values(this.plugins);e.unshift(this);const s=[];for(let t=0;t<e.length;t++){const i=n(e[t]);i&&s.push(i)}return s}getDependency(n,e){const s=n+":"+e;let t=this.cache.get(s);if(!t){switch(n){case"scene":t=this.loadScene(e);break;case"node":t=this._invokeOne(function(i){return i.loadNode&&i.loadNode(e)});break;case"mesh":t=this._invokeOne(function(i){return i.loadMesh&&i.loadMesh(e)});break;case"accessor":t=this.loadAccessor(e);break;case"bufferView":t=this._invokeOne(function(i){return i.loadBufferView&&i.loadBufferView(e)});break;case"buffer":t=this.loadBuffer(e);break;case"material":t=this._invokeOne(function(i){return i.loadMaterial&&i.loadMaterial(e)});break;case"texture":t=this._invokeOne(function(i){return i.loadTexture&&i.loadTexture(e)});break;case"skin":t=this.loadSkin(e);break;case"animation":t=this._invokeOne(function(i){return i.loadAnimation&&i.loadAnimation(e)});break;case"camera":t=this.loadCamera(e);break;default:if(t=this._invokeOne(function(i){return i!=this&&i.getDependency&&i.getDependency(n,e)}),!t)throw new Error("Unknown type: "+n);break}this.cache.add(s,t)}return t}getDependencies(n){let e=this.cache.get(n);if(!e){const s=this,t=this.json[n+(n==="mesh"?"es":"s")]||[];e=Promise.all(t.map(function(i,r){return s.getDependency(n,r)})),this.cache.add(n,e)}return e}loadBuffer(n){const e=this.json.buffers[n],s=this.fileLoader;if(e.type&&e.type!=="arraybuffer")throw new Error("THREE.GLTFLoader: "+e.type+" buffer type is not supported.");if(e.uri===void 0&&n===0)return Promise.resolve(this.extensions[g.KHR_BINARY_GLTF].body);const t=this.options;return new Promise(function(i,r){s.load(v.resolveURL(e.uri,t.path),i,void 0,function(){r(new Error('THREE.GLTFLoader: Failed to load buffer "'+e.uri+'".'))})})}loadBufferView(n){const e=this.json.bufferViews[n];return this.getDependency("buffer",e.buffer).then(function(s){const t=e.byteLength||0,i=e.byteOffset||0;return s.slice(i,i+t)})}loadAccessor(n){const e=this,s=this.json,t=this.json.accessors[n];if(t.bufferView===void 0&&t.sparse===void 0){const r=q[t.type],a=H[t.componentType],o=t.normalized===!0,c=new a(t.count*r);return Promise.resolve(new V(c,r,o))}const i=[];return t.bufferView!==void 0?i.push(this.getDependency("bufferView",t.bufferView)):i.push(null),t.sparse!==void 0&&(i.push(this.getDependency("bufferView",t.sparse.indices.bufferView)),i.push(this.getDependency("bufferView",t.sparse.values.bufferView))),Promise.all(i).then(function(r){const a=r[0],o=q[t.type],c=H[t.componentType],u=c.BYTES_PER_ELEMENT,l=u*o,h=t.byteOffset||0,d=t.bufferView!==void 0?s.bufferViews[t.bufferView].byteStride:void 0,p=t.normalized===!0;let R,m;if(d&&d!==l){const T=Math.floor(h/d),_="InterleavedBuffer:"+t.bufferView+":"+t.componentType+":"+T+":"+t.count;let x=e.cache.get(_);x||(R=new c(a,T*d,t.count*d/u),x=new Ce(R,d/u),e.cache.add(_,x)),m=new sn(x,o,h%d/u,p)}else a===null?R=new c(t.count*o):R=new c(a,h,t.count*o),m=new V(R,o,p);if(t.sparse!==void 0){const T=q.SCALAR,_=H[t.sparse.indices.componentType],x=t.sparse.indices.byteOffset||0,E=t.sparse.values.byteOffset||0,L=new _(r[1],x,t.sparse.count*T),N=new c(r[2],E,t.sparse.count*o);a!==null&&(m=new V(m.array.slice(),m.itemSize,m.normalized)),m.normalized=!1;for(let S=0,k=L.length;S<k;S++){const P=L[S];if(m.setX(P,N[S*o]),o>=2&&m.setY(P,N[S*o+1]),o>=3&&m.setZ(P,N[S*o+2]),o>=4&&m.setW(P,N[S*o+3]),o>=5)throw new Error("THREE.GLTFLoader: Unsupported itemSize in sparse BufferAttribute.")}m.normalized=p}return m})}loadTexture(n){const e=this.json,s=this.options,i=e.textures[n].source,r=e.images[i];let a=this.textureLoader;if(r.uri){const o=s.manager.getHandler(r.uri);o!==null&&(a=o)}return this.loadTextureImage(n,i,a)}loadTextureImage(n,e,s){const t=this,i=this.json,r=i.textures[n],a=i.images[e],o=(a.uri||a.bufferView)+":"+r.sampler;if(this.textureCache[o])return this.textureCache[o];const c=this.loadImageSource(e,s).then(function(u){u.flipY=!1,u.name=r.name||a.name||"",u.name===""&&typeof a.uri=="string"&&a.uri.startsWith("data:image/")===!1&&(u.name=a.uri);const h=(i.samplers||{})[r.sampler]||{};return u.magFilter=ue[h.magFilter]||J,u.minFilter=ue[h.minFilter]||Te,u.wrapS=le[h.wrapS]||Z,u.wrapT=le[h.wrapT]||Z,u.generateMipmaps=!u.isCompressedTexture&&u.minFilter!==Re&&u.minFilter!==J,t.associations.set(u,{textures:n}),u}).catch(function(){return null});return this.textureCache[o]=c,c}loadImageSource(n,e){const s=this,t=this.json,i=this.options;if(this.sourceCache[n]!==void 0)return this.sourceCache[n].then(l=>l.clone());const r=t.images[n],a=self.URL||self.webkitURL;let o=r.uri||"",c=!1;if(r.bufferView!==void 0)o=s.getDependency("bufferView",r.bufferView).then(function(l){c=!0;const h=new Blob([l],{type:r.mimeType});return o=a.createObjectURL(h),o});else if(r.uri===void 0)throw new Error("THREE.GLTFLoader: Image "+n+" is missing URI and bufferView");const u=Promise.resolve(o).then(function(l){return new Promise(function(h,d){let p=h;e.isImageBitmapLoader===!0&&(p=function(R){const m=new ne(R);m.needsUpdate=!0,h(m)}),e.load(v.resolveURL(l,i.path),p,void 0,d)})}).then(function(l){return c===!0&&a.revokeObjectURL(o),y(l,r),l.userData.mimeType=r.mimeType||Gn(r.uri),l}).catch(function(l){throw console.error("THREE.GLTFLoader: Couldn't load texture",o),l});return this.sourceCache[n]=u,u}assignTexture(n,e,s,t){const i=this;return this.getDependency("texture",s.index).then(function(r){if(!r)return null;if(s.texCoord!==void 0&&s.texCoord>0&&(r=r.clone(),r.channel=s.texCoord),i.extensions[g.KHR_TEXTURE_TRANSFORM]){const a=s.extensions!==void 0?s.extensions[g.KHR_TEXTURE_TRANSFORM]:void 0;if(a){const o=i.associations.get(r);r=i.extensions[g.KHR_TEXTURE_TRANSFORM].extendTexture(r,a),i.associations.set(r,o)}}return t!==void 0&&(r.colorSpace=t),n[e]=r,r})}assignFinalMaterial(n){const e=n.geometry;let s=n.material;const t=e.attributes.tangent===void 0,i=e.attributes.color!==void 0,r=e.attributes.normal===void 0;if(n.isPoints){const a="PointsMaterial:"+s.uuid;let o=this.cache.get(a);o||(o=new Ge,X.prototype.copy.call(o,s),o.color.copy(s.color),o.map=s.map,o.sizeAttenuation=!1,this.cache.add(a,o)),s=o}else if(n.isLine){const a="LineBasicMaterial:"+s.uuid;let o=this.cache.get(a);o||(o=new ve,X.prototype.copy.call(o,s),o.color.copy(s.color),o.map=s.map,this.cache.add(a,o)),s=o}if(t||i||r){let a="ClonedMaterial:"+s.uuid+":";t&&(a+="derivative-tangents:"),i&&(a+="vertex-colors:"),r&&(a+="flat-shading:");let o=this.cache.get(a);o||(o=s.clone(),i&&(o.vertexColors=!0),r&&(o.flatShading=!0),t&&(o.normalScale&&(o.normalScale.y*=-1),o.clearcoatNormalScale&&(o.clearcoatNormalScale.y*=-1)),this.cache.add(a,o),this.associations.set(o,this.associations.get(s))),s=o}n.material=s}getMaterialType(){return Ee}loadMaterial(n){const e=this,s=this.json,t=this.extensions,i=s.materials[n];let r;const a={},o=i.extensions||{},c=[];if(o[g.KHR_MATERIALS_UNLIT]){const l=t[g.KHR_MATERIALS_UNLIT];r=l.getMaterialType(),c.push(l.extendParams(a,i,e))}else{const l=i.pbrMetallicRoughness||{};if(a.color=new F(1,1,1),a.opacity=1,Array.isArray(l.baseColorFactor)){const h=l.baseColorFactor;a.color.setRGB(h[0],h[1],h[2],w),a.opacity=h[3]}l.baseColorTexture!==void 0&&c.push(e.assignTexture(a,"map",l.baseColorTexture,U)),a.metalness=l.metallicFactor!==void 0?l.metallicFactor:1,a.roughness=l.roughnessFactor!==void 0?l.roughnessFactor:1,l.metallicRoughnessTexture!==void 0&&(c.push(e.assignTexture(a,"metalnessMap",l.metallicRoughnessTexture)),c.push(e.assignTexture(a,"roughnessMap",l.metallicRoughnessTexture))),r=this._invokeOne(function(h){return h.getMaterialType&&h.getMaterialType(n)}),c.push(Promise.all(this._invokeAll(function(h){return h.extendMaterialParams&&h.extendMaterialParams(n,a)})))}i.doubleSided===!0&&(a.side=Ue);const u=i.alphaMode||W.OPAQUE;if(u===W.BLEND?(a.transparent=!0,a.depthWrite=!1):(a.transparent=!1,u===W.MASK&&(a.alphaTest=i.alphaCutoff!==void 0?i.alphaCutoff:.5)),i.normalTexture!==void 0&&r!==G&&(c.push(e.assignTexture(a,"normalMap",i.normalTexture)),a.normalScale=new pe(1,1),i.normalTexture.scale!==void 0)){const l=i.normalTexture.scale;a.normalScale.set(l,l)}if(i.occlusionTexture!==void 0&&r!==G&&(c.push(e.assignTexture(a,"aoMap",i.occlusionTexture)),i.occlusionTexture.strength!==void 0&&(a.aoMapIntensity=i.occlusionTexture.strength)),i.emissiveFactor!==void 0&&r!==G){const l=i.emissiveFactor;a.emissive=new F().setRGB(l[0],l[1],l[2],w)}return i.emissiveTexture!==void 0&&r!==G&&c.push(e.assignTexture(a,"emissiveMap",i.emissiveTexture,U)),Promise.all(c).then(function(){const l=new r(a);return i.name&&(l.name=i.name),y(l,i),e.associations.set(l,{materials:n}),i.extensions&&O(t,l,i),l})}createUniqueName(n){const e=Ke.sanitizeNodeName(n||"");return e in this.nodeNamesUsed?e+"_"+ ++this.nodeNamesUsed[e]:(this.nodeNamesUsed[e]=0,e)}loadGeometries(n){const e=this,s=this.extensions,t=this.primitiveCache;function i(a){return s[g.KHR_DRACO_MESH_COMPRESSION].decodePrimitive(a,e).then(function(o){return fe(o,a,e)})}const r=[];for(let a=0,o=n.length;a<o;a++){const c=n[a],u=Dn(c),l=t[u];if(l)r.push(l.promise);else{let h;c.extensions&&c.extensions[g.KHR_DRACO_MESH_COMPRESSION]?h=i(c):h=fe(new Be,c,e),t[u]={primitive:c,promise:h},r.push(h)}}return Promise.all(r)}loadMesh(n){const e=this,s=this.json,t=this.extensions,i=s.meshes[n],r=i.primitives,a=[];for(let o=0,c=r.length;o<c;o++){const u=r[o].material===void 0?Pn(this.cache):this.getDependency("material",r[o].material);a.push(u)}return a.push(e.loadGeometries(r)),Promise.all(a).then(function(o){const c=o.slice(0,o.length-1),u=o[o.length-1],l=[];for(let d=0,p=u.length;d<p;d++){const R=u[d],m=r[d];let T;const _=c[d];if(m.mode===M.TRIANGLES||m.mode===M.TRIANGLE_STRIP||m.mode===M.TRIANGLE_FAN||m.mode===void 0)T=i.isSkinnedMesh===!0?new je(R,_):new Ve(R,_),T.isSkinnedMesh===!0&&T.normalizeSkinWeights(),m.mode===M.TRIANGLE_STRIP?T.geometry=oe(T.geometry,he):m.mode===M.TRIANGLE_FAN&&(T.geometry=oe(T.geometry,Q));else if(m.mode===M.LINES)T=new Xe(R,_);else if(m.mode===M.LINE_STRIP)T=new ze(R,_);else if(m.mode===M.LINE_LOOP)T=new qe(R,_);else if(m.mode===M.POINTS)T=new We(R,_);else throw new Error("THREE.GLTFLoader: Primitive mode unsupported: "+m.mode);Object.keys(T.geometry.morphAttributes).length>0&&kn(T,i),T.name=e.createUniqueName(i.name||"mesh_"+n),y(T,i),m.extensions&&O(t,T,m),e.assignFinalMaterial(T),l.push(T)}for(let d=0,p=l.length;d<p;d++)e.associations.set(l[d],{meshes:n,primitives:d});if(l.length===1)return i.extensions&&O(t,l[0],i),l[0];const h=new z;i.extensions&&O(t,h,i),e.associations.set(h,{meshes:n});for(let d=0,p=l.length;d<p;d++)h.add(l[d]);return h})}loadCamera(n){let e;const s=this.json.cameras[n],t=s[s.type];if(!t){console.warn("THREE.GLTFLoader: Missing camera parameters.");return}return s.type==="perspective"?e=new Ye(Qe.radToDeg(t.yfov),t.aspectRatio||1,t.znear||1,t.zfar||2e6):s.type==="orthographic"&&(e=new Je(-t.xmag,t.xmag,t.ymag,-t.ymag,t.znear,t.zfar)),s.name&&(e.name=this.createUniqueName(s.name)),y(e,s),Promise.resolve(e)}loadSkin(n){const e=this.json.skins[n],s=[];for(let t=0,i=e.joints.length;t<i;t++)s.push(this._loadNodeShallow(e.joints[t]));return e.inverseBindMatrices!==void 0?s.push(this.getDependency("accessor",e.inverseBindMatrices)):s.push(null),Promise.all(s).then(function(t){const i=t.pop(),r=t,a=[],o=[];for(let c=0,u=r.length;c<u;c++){const l=r[c];if(l){a.push(l);const h=new K;i!==null&&h.fromArray(i.array,c*16),o.push(h)}else console.warn('THREE.GLTFLoader: Joint "%s" could not be found.',e.joints[c])}return new Ze(a,o)})}loadAnimation(n){const e=this.json,s=this,t=e.animations[n],i=t.name?t.name:"animation_"+n,r=[],a=[],o=[],c=[],u=[];for(let l=0,h=t.channels.length;l<h;l++){const d=t.channels[l],p=t.samplers[d.sampler],R=d.target,m=R.node,T=t.parameters!==void 0?t.parameters[p.input]:p.input,_=t.parameters!==void 0?t.parameters[p.output]:p.output;R.node!==void 0&&(r.push(this.getDependency("node",m)),a.push(this.getDependency("accessor",T)),o.push(this.getDependency("accessor",_)),c.push(p),u.push(R))}return Promise.all([Promise.all(r),Promise.all(a),Promise.all(o),Promise.all(c),Promise.all(u)]).then(function(l){const h=l[0],d=l[1],p=l[2],R=l[3],m=l[4],T=[];for(let x=0,E=h.length;x<E;x++){const L=h[x],N=d[x],S=p[x],k=R[x],P=m[x];if(L===void 0)continue;L.updateMatrix&&L.updateMatrix();const B=s._createAnimationTracks(L,N,S,k,P);if(B)for(let j=0;j<B.length;j++)T.push(B[j])}const _=new $e(i,void 0,T);return y(_,t),_})}createNodeMesh(n){const e=this.json,s=this,t=e.nodes[n];return t.mesh===void 0?null:s.getDependency("mesh",t.mesh).then(function(i){const r=s._getNodeRef(s.meshCache,t.mesh,i);return t.weights!==void 0&&r.traverse(function(a){if(a.isMesh)for(let o=0,c=t.weights.length;o<c;o++)a.morphTargetInfluences[o]=t.weights[o]}),r})}loadNode(n){const e=this.json,s=this,t=e.nodes[n],i=s._loadNodeShallow(n),r=[],a=t.children||[];for(let c=0,u=a.length;c<u;c++)r.push(s.getDependency("node",a[c]));const o=t.skin===void 0?Promise.resolve(null):s.getDependency("skin",t.skin);return Promise.all([i,Promise.all(r),o]).then(function(c){const u=c[0],l=c[1],h=c[2];h!==null&&u.traverse(function(d){d.isSkinnedMesh&&d.bind(h,vn)});for(let d=0,p=l.length;d<p;d++)u.add(l[d]);if(u.userData.pivot!==void 0&&l.length>0){const d=u.userData.pivot,p=l[0];u.pivot=new C().fromArray(d),u.position.x-=d[0],u.position.y-=d[1],u.position.z-=d[2],p.position.set(0,0,0),delete u.userData.pivot}return u})}_loadNodeShallow(n){const e=this.json,s=this.extensions,t=this;if(this.nodeCache[n]!==void 0)return this.nodeCache[n];const i=e.nodes[n],r=i.name?t.createUniqueName(i.name):"",a=[],o=t._invokeOne(function(c){return c.createNodeMesh&&c.createNodeMesh(n)});return o&&a.push(o),i.camera!==void 0&&a.push(t.getDependency("camera",i.camera).then(function(c){return t._getNodeRef(t.cameraCache,i.camera,c)})),t._invokeAll(function(c){return c.createNodeAttachment&&c.createNodeAttachment(n)}).forEach(function(c){a.push(c)}),this.nodeCache[n]=Promise.all(a).then(function(c){let u;if(i.isBone===!0?u=new en:c.length>1?u=new z:c.length===1?u=c[0]:u=new ge,u!==c[0])for(let l=0,h=c.length;l<h;l++)u.add(c[l]);if(i.name&&(u.userData.name=i.name,u.name=r),y(u,i),i.extensions&&O(s,u,i),i.matrix!==void 0){const l=new K;l.fromArray(i.matrix),u.applyMatrix4(l)}else i.translation!==void 0&&u.position.fromArray(i.translation),i.rotation!==void 0&&u.quaternion.fromArray(i.rotation),i.scale!==void 0&&u.scale.fromArray(i.scale);if(!t.associations.has(u))t.associations.set(u,{});else if(i.mesh!==void 0&&t.meshCache.refs[i.mesh]>1){const l=t.associations.get(u);t.associations.set(u,{...l})}return t.associations.get(u).nodes=n,u}),this.nodeCache[n]}loadScene(n){const e=this.extensions,s=this.json.scenes[n],t=this,i=new z;s.name&&(i.name=t.createUniqueName(s.name)),y(i,s),s.extensions&&O(e,i,s);const r=s.nodes||[],a=[];for(let o=0,c=r.length;o<c;o++)a.push(t.getDependency("node",r[o]));return Promise.all(a).then(function(o){for(let u=0,l=o.length;u<l;u++){const h=o[u];h.parent!==null?i.add(nn(h)):i.add(h)}const c=u=>{const l=new Map;for(const[h,d]of t.associations)(h instanceof X||h instanceof ne)&&l.set(h,d);return u.traverse(h=>{const d=t.associations.get(h);d!=null&&l.set(h,d)}),l};return t.associations=c(i),i})}_createAnimationTracks(n,e,s,t,i){const r=[],a=n.name?n.name:n.uuid,o=[];function c(d){d.morphTargetInfluences&&o.push(d.name?d.name:d.uuid)}I[i.path]===I.weights?(c(n),n.isGroup&&n.children.forEach(c)):o.push(a);let u;switch(I[i.path]){case I.weights:u=se;break;case I.rotation:u=ie;break;case I.translation:case I.scale:u=te;break;default:switch(s.itemSize){case 1:u=se;break;case 2:case 3:default:u=te;break}break}const l=t.interpolation!==void 0?Fn[t.interpolation]:xe,h=this._getArrayFromAccessor(s);for(let d=0,p=o.length;d<p;d++){const R=new u(o[d]+"."+I[i.path],e.array,h,l);t.interpolation==="CUBICSPLINE"&&this._createCubicSplineTrackInterpolant(R),r.push(R)}return r}_getArrayFromAccessor(n){let e=n.array;if(n.normalized){const s=ee(e.constructor),t=new Float32Array(e.length);for(let i=0,r=e.length;i<r;i++)t[i]=e[i]*s;e=t}return e}_createCubicSplineTrackInterpolant(n){n.createInterpolant=function(s){const t=this instanceof ie?Cn:Ae;return new t(this.times,this.values,this.getValueSize()/3,s)},n.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline=!0}}function Kn(f,n,e){const s=n.attributes,t=new an;if(s.POSITION!==void 0){const a=e.json.accessors[s.POSITION],o=a.min,c=a.max;if(o!==void 0&&c!==void 0){if(t.set(new C(o[0],o[1],o[2]),new C(c[0],c[1],c[2])),a.normalized){const u=ee(H[a.componentType]);t.min.multiplyScalar(u),t.max.multiplyScalar(u)}}else{console.warn("THREE.GLTFLoader: Missing min/max properties for accessor POSITION.");return}}else return;const i=n.targets;if(i!==void 0){const a=new C,o=new C;for(let c=0,u=i.length;c<u;c++){const l=i[c];if(l.POSITION!==void 0){const h=e.json.accessors[l.POSITION],d=h.min,p=h.max;if(d!==void 0&&p!==void 0){if(o.setX(Math.max(Math.abs(d[0]),Math.abs(p[0]))),o.setY(Math.max(Math.abs(d[1]),Math.abs(p[1]))),o.setZ(Math.max(Math.abs(d[2]),Math.abs(p[2]))),h.normalized){const R=ee(H[h.componentType]);o.multiplyScalar(R)}a.max(o)}else console.warn("THREE.GLTFLoader: Missing min/max properties for accessor POSITION.")}}t.expandByVector(a)}f.boundingBox=t;const r=new cn;t.getCenter(r.center),r.radius=t.min.distanceTo(t.max)/2,f.boundingSphere=r}function fe(f,n,e){const s=n.attributes,t=[];function i(r,a){return e.getDependency("accessor",r).then(function(o){f.setAttribute(a,o)})}for(const r in s){const a=$[r]||r.toLowerCase();a in f.attributes||t.push(i(s[r],a))}if(n.indices!==void 0&&!f.index){const r=e.getDependency("accessor",n.indices).then(function(a){f.setIndex(a)});t.push(r)}return re.workingColorSpace!==w&&"COLOR_0"in s&&console.warn(`THREE.GLTFLoader: Converting vertex colors from "srgb-linear" to "${re.workingColorSpace}" not supported.`),y(f,n),Kn(f,n,e),Promise.all(t).then(function(){return n.targets!==void 0?Hn(f,n.targets,e):f})}export{jn as GLTFLoader};
@@ -1,34 +0,0 @@
1
- import{ac as A,o as g,Q as P,ad as m,u as C,x,X as E,C as L,ab as R,ae as I}from"./rr0-sighting.mjs";class i{constructor(e){this.scene=e}static REAL_BEAMS=4;static LAMPS=2;static DISTANCE_M=500;static AIR_LENGTH_M=90;static CLEAR_AIR_SCATTER_PER_M=2e-4;static SHADOW_MAP_PX=1024;beams=new Map;static airGeometry;has(e){return this.beams.has(e)}get size(){return this.beams.size}lamps(e){return this.beams.get(e)?.lamps??[]}airMeshes(e){return this.beams.get(e)?.air??[]}add(e){if(this.beams.has(e))return!0;if(this.beams.size>=i.REAL_BEAMS)return!1;const t=[],r=[];for(let n=0;n<i.LAMPS;n++){const a=new A(16777215,0,i.DISTANCE_M,Math.PI/8,.5,2);a.castShadow=e==="observer",a.shadow.mapSize.set(i.SHADOW_MAP_PX,i.SHADOW_MAP_PX),a.shadow.camera.near=.4,a.shadow.camera.far=110,a.shadow.bias=-4e-4,a.shadow.normalBias=.04,a.shadow.radius=2,this.scene.add(a),this.scene.add(a.target),t.push(a);const o=new g(i.airCone(),i.airMaterial());o.visible=!1,o.frustumCulled=!1,o.renderOrder=8,o.castShadow=!1,o.receiveShadow=!1,o.name="headlight air",this.scene.add(o),r.push(o)}return this.beams.set(e,{lamps:t,air:r}),!0}remove(e){const t=this.beams.get(e);if(t){for(const r of t.lamps)r.removeFromParent(),r.target.removeFromParent(),r.dispose();for(const r of t.air)r.removeFromParent(),r.material.dispose();this.beams.delete(e)}}clear(e){for(const t of[...this.beams.keys()])e&&t==="observer"||this.remove(t)}dispose(){this.clear(!1),i.airGeometry?.dispose(),i.airGeometry=void 0}aim(e,t,r,n,a,o,l){const c=this.beams.get(e),w=Math.max(l,i.CLEAR_AIR_SCATTER_PER_M);if(!c)return;const u=m.BEAMS[t],v=new P(-n.z,0,n.x),b=e==="observer"&&u!==void 0;c.lamps.forEach((s,d)=>{if(!u){s.intensity=0,c.air[d].visible=!1,s.shadow.autoUpdate=!1;return}const f=d===0?-1:1,h=u.pitchDeg*Math.PI/180,p=u.candela*m.DISPLAY_GAIN*o/c.lamps.length;s.color.set(u.color),s.intensity=p,s.angle=u.halfAngleDeg*Math.PI/180,s.penumbra=u.penumbra,b?(s.shadow.autoUpdate||(s.shadow.needsUpdate=!0),s.shadow.autoUpdate=!0):s.shadow.autoUpdate=!1,s.position.copy(r).addScaledVector(v,f*a);const M=n.clone().addScaledVector(v,-f*Math.tan(m.TOE_IN_DEG*Math.PI/180)).normalize();s.target.position.set(s.position.x+M.x*Math.cos(h)*50,s.position.y-Math.sin(h)*50,s.position.z+M.z*Math.cos(h)*50),s.target.updateMatrixWorld(),this.aimAir(c.air[d],s,u.color,p,w)})}aimAir(e,t,r,n,a){if(e.visible=a*n>1e-4,!e.visible)return;const o=i.AIR_LENGTH_M,l=o*Math.tan(t.angle);e.position.copy(t.position),e.scale.set(l,l,o),e.lookAt(t.target.position),e.updateMatrixWorld();const c=e.material.uniforms;c.uColor.value.set(r),c.uCandela.value=n,c.uScatter.value=a,c.uLength.value=o,c.uRadius.value=l}static airCone(){if(i.airGeometry)return i.airGeometry;const e=24,t=new Float32Array((e+1)*3);for(let a=0;a<e;a++){const o=a/e*Math.PI*2;t.set([Math.cos(o),Math.sin(o),1],(a+1)*3)}const r=[];for(let a=0;a<e;a++)r.push(0,1+a,1+(a+1)%e);const n=new C;return n.setAttribute("position",new x(t,3)),n.setIndex(r),i.airGeometry=n,n}static airMaterial(){return new E({transparent:!0,depthWrite:!1,depthTest:!0,blending:I,side:R,uniforms:{uColor:{value:new L(1,1,1)},uCandela:{value:0},uScatter:{value:0},uLength:{value:90},uRadius:{value:20}},vertexShader:`
2
- varying vec3 vLocal;
3
- varying vec3 vNormalView;
4
- varying vec3 vViewDir;
5
- void main() {
6
- vLocal = position;
7
- vec4 viewPosition = modelViewMatrix * vec4(position, 1.0);
8
- // The side's normal, out of the axis: the apex has none (its length is nought), and a normal of nought there would spread NaN over the whole cone.
9
- float ring = length(position.xy);
10
- vec3 outward = ring > 1e-5 ? vec3(position.xy / ring, 0.0) : vec3(0.0, 0.0, 1.0);
11
- vNormalView = normalize(normalMatrix * outward);
12
- vViewDir = -viewPosition.xyz;
13
- gl_Position = projectionMatrix * viewPosition;
14
- }`,fragmentShader:`
15
- uniform vec3 uColor;
16
- uniform float uCandela;
17
- uniform float uScatter;
18
- uniform float uLength;
19
- uniform float uRadius;
20
- varying vec3 vLocal;
21
- varying vec3 vNormalView;
22
- varying vec3 vViewDir;
23
- void main() {
24
- float t = clamp(vLocal.z, 0.0, 1.0);
25
- float distanceM = max(t * uLength, 1.5);
26
- // The chord a ray makes through a cone of this thickness: long going along the beam, short going across its edge.
27
- float facing = abs(dot(normalize(vNormalView), normalize(vViewDir + vec3(0.0, 0.0, 1e-4))));
28
- float chord = 2.0 * uRadius * t * (0.25 + 0.75 * facing);
29
- // The beam's own profile averaged over the chord: strongest on the axis, none at the edge of the cone.
30
- float profile = 0.55;
31
- float radiance = uScatter * uCandela * chord * profile / (distanceM * distanceM + 9.0);
32
- float ends = (1.0 - smoothstep(0.75, 1.0, t)) * smoothstep(0.0, 0.04, t);
33
- gl_FragColor = vec4(uColor * radiance * ends, 1.0);
34
- }`})}}export{i as HeadlightSystem};
@@ -1,9 +0,0 @@
1
- import{ar as d,_ as l,as as o,at as u,au as m,av as g,aw as f,ax as y}from"./rr0-sighting.mjs";import{S as T,P as b,a as A,E}from"./ParameterForm-DW6cQmYI.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};
@@ -1,22 +0,0 @@
1
- import{ar as y,_ as d,at as b,au as E,ay as g,bj as j}from"./rr0-sighting.mjs";import{S as w,P as x,E as k,a as v}from"./ParameterForm-DW6cQmYI.js";import{L as T}from"./LaunchPlume-DBINBQgQ.js";import{T as I}from"./TimelineTracks-XzShW15O.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,w.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=j.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};
@@ -1 +0,0 @@
1
- import{bm as w,bn as F,bo as v,bp as Y,R as H}from"./rr0-sighting.mjs";class K{static MU=398600.4418;static OMEGA=72921159e-12;static EARTH_RADIUS_KM=6371;static STEP_S=1;static DENSITY=[[0,1.225],[20,.0889],[40,.004],[60,31e-5],[80,185e-7],[100,56e-8],[120,222e-10],[150,208e-11],[200,254e-12],[250,607e-13],[300,192e-13],[400,28e-13],[500,522e-15],[600,114e-15],[700,307e-16],[800,114e-16],[900,576e-17],[1e3,356e-17]];static FREE_PATH_TIMES_DENSITY=68e-9;static ICE_DENSITY=917;static airDensity(s){const t=K.DENSITY;if(s<=t[0][0])return t[0][1];let e=0;for(;e<t.length-2&&t[e+1][0]<s;)e++;const[o,i]=t[e],[a,n]=t[e+1];return i*Math.exp(Math.log(n/i)*(s-o)/(a-o))}static dragPerKm(s,t,e,o=.5){const i=K.airDensity(s),a=K.FREE_PATH_TIMES_DENSITY/i/1e3,n=Math.exp(-a/t),p=i*1e9*Math.PI*t*t/Math.max(e,1e-9),d=3*i/(4*o*1e-6*K.ICE_DENSITY)*1e3;return n*p+(1-n)*d}static step(s,t,e,o,i){const[a,n,p,d,R,h]=s,S=Math.hypot(a,n,p),T=K.OMEGA,M=-398600.4418/(S*S*S),y=M*a+2*T*R+T*T*a,U=M*n-2*T*d+T*T*n,I=M*p,E=Math.hypot(d,R,h),c=1/(1+K.dragPerKm(S-K.EARTH_RADIUS_KM,e,o,i)*E*t);s[3]=(d+y*t)*c,s[4]=(R+U*t)*c,s[5]=(h+I*t)*c,s[0]=a+s[3]*t,s[1]=n+s[4]*t,s[2]=p+s[5]*t;const f=Math.hypot(s[0],s[1],s[2]);if(f<K.EARTH_RADIUS_KM){const A=K.EARTH_RADIUS_KM/f;s[0]*=A,s[1]*=A,s[2]*=A,s[3]=s[4]=s[5]=0}}}class _{constructor(s,t,e,o,i=.5){this.massKg=e,this.radiusAt=o,this.particleRadiusUm=i,this.state=Float64Array.of(...s,...t),this.positions=new Float64Array(192),this.positions.set(s,0)}positions;steps=0;state;at(s){const t=K.STEP_S,e=Math.max(0,s/t),o=Math.ceil(e);for(;this.steps<o;){if(K.step(this.state,t,this.radiusAt(this.steps*t),this.massKg,this.particleRadiusUm),this.steps++,3*(this.steps+1)>this.positions.length){const p=new Float64Array(this.positions.length*2);p.set(this.positions),this.positions=p}this.positions.set(this.state.subarray(0,3),3*this.steps)}const i=Math.floor(e),a=e-i,n=this.positions;return a===0||i>=this.steps?[n[3*i],n[3*i+1],n[3*i+2]]:[0,1,2].map(p=>n[3*i+p]+(n[3*i+3+p]-n[3*i+p])*a)}}class r{static EARTH_RADIUS_KM=6371;static SHADOW_RADIUS_KM=r.EARTH_RADIUS_KM+15;static PENUMBRA_KM=10;static SUN_ILLUMINANCE_LUX=127e3;static RAYLEIGH_PER_M=[58e-7,135e-7,331e-7];static SCALE_HEIGHT_M=8e3;static OZONE_GRAZING_DEPTH=[2.4,1.8,.24];static ANISOTROPY=.7;static ALBEDO=.99;static WAVELENGTHS_UM=[.61,.55,.465];static ICE_INDEX=1.31;static DEFAULTS={exhaustKgPerS:273,condensedShare:.065,particleRadiusUm:.5,expansionKmPerS:.15,initialRadiusKm:.5,lifetimeS:420,collarShare:.85,collarExpansionKmPerS:2.5,collarLifetimeS:20};static PROPELLANTS={"rp1-lox":{condensedShare:.065,particleRadiusUm:.5},"methane-lox":{condensedShare:.09,particleRadiusUm:.5},"hydrogen-lox":{condensedShare:.13,particleRadiusUm:.5},hypergolic:{condensedShare:.079,particleRadiusUm:.4},solid:{condensedShare:.27,particleRadiusUm:.8}};static G0=9.80665;static COLLAR_SPREAD_OF_EXHAUST_VELOCITY=.735;static plumeOf(s){const t={},e=s.vehicle?.engine;if(e){const o=e.specificImpulseS===void 0?void 0:e.specificImpulseS*r.G0;e.thrustKN!==void 0&&o&&(t.exhaustKgPerS=e.thrustKN*1e3/o),o&&(t.collarExpansionKmPerS=o/1e3*r.COLLAR_SPREAD_OF_EXHAUST_VELOCITY),e.propellant&&Object.assign(t,r.PROPELLANTS[e.propellant])}return{...r.DEFAULTS,...t,...s.plume}}static PUFF_EVERY_S=.5;static SIGMA_OF_RADIUS=.5;static MAX_PUFFS=320;static DEG=Math.PI/180;static EARTH_ROTATION=72921159e-12;static VENT_DEFAULTS={speedKmPerS:.7,massKgPerS:20,condensedShare:.5,particleRadiusUm:.5,expansionKmPerS:.1,initialRadiusKm:.2,lifetimeS:600};static paths=new WeakMap;static exhaustVelocityKmPerS(s){return(s.vehicle?.engine?.specificImpulseS??348)*r.G0/1e3}static releasesOf(s){const t=[],e=s.jets??[];if(e.length===0||s.burnFromT!==void 0||s.burnUntilT!==void 0){const o=s.track[0]?.t??0,i=s.track[s.track.length-1]?.t??0;t.push(r.engineRelease(s,"burn",{fromT:s.burnFromT??o,untilT:s.burnUntilT??i}))}return e.forEach((o,i)=>t.push(r.releaseOf(s,o,i))),t}static releaseOf(s,t,e){const o=`jet:${t.id??e}`;if((t.kind??"burn")==="burn")return r.engineRelease(s,o,t);const i=r.VENT_DEFAULTS;return{key:o,fromT:t.fromT,untilT:t.untilT,angleDeg:t.angleDeg??0,azimuthDeg:t.azimuthDeg??0,spinPeriodS:t.spinPeriodS,speedKmPerS:t.speedKmPerS??i.speedKmPerS,massKgPerS:t.massKgPerS??i.massKgPerS,condensedShare:t.condensedShare??i.condensedShare,particleRadiusUm:t.particleRadiusUm??i.particleRadiusUm,initialRadiusKm:t.initialRadiusKm??i.initialRadiusKm,populations:[{share:1,expansionKmPerS:t.expansionKmPerS??i.expansionKmPerS,lifetimeS:t.lifetimeS??i.lifetimeS}]}}static engineRelease(s,t,e){const o=r.plumeOf(s);return{key:t,fromT:e.fromT,untilT:e.untilT,angleDeg:e.angleDeg??0,azimuthDeg:e.azimuthDeg??0,spinPeriodS:e.spinPeriodS,speedKmPerS:e.speedKmPerS??r.exhaustVelocityKmPerS(s),massKgPerS:e.massKgPerS??o.exhaustKgPerS,condensedShare:e.condensedShare??o.condensedShare,particleRadiusUm:e.particleRadiusUm??o.particleRadiusUm,initialRadiusKm:e.initialRadiusKm??o.initialRadiusKm,populations:[{share:1-o.collarShare,expansionKmPerS:e.expansionKmPerS??o.expansionKmPerS,lifetimeS:e.lifetimeS??o.lifetimeS},{share:o.collarShare,expansionKmPerS:o.collarExpansionKmPerS,lifetimeS:o.collarLifetimeS}]}}static extinctionEfficiency(s,t){const e=2*Math.PI*s/t,o=r.ICE_INDEX**2,i=8/3*e**4*((o-1)/(o+2))**2,a=2*e*(r.ICE_INDEX-1),n=a<.001?a*a/2:2-4/a*Math.sin(a)+4/(a*a)*(1-Math.cos(a));return Math.min(i,n)}static scatteringColour(s){const t=r.extinctionEfficiency(s,r.WAVELENGTHS_UM[1]);return r.WAVELENGTHS_UM.map(e=>r.extinctionEfficiency(s,e)/t)}static sunDirectionAt(s){const t=new w(0,0,-6378137),e=F(v.Sun,s,t,!0,!0),o=(e.ra-Y(s))*15*r.DEG,i=e.dec*r.DEG;return[Math.cos(i)*Math.cos(o),Math.cos(i)*Math.sin(o),Math.sin(i)]}static puffsAt(s,t){const e=[];for(const o of s){let i=r.paths.get(o);i||r.paths.set(o,i=new Map);for(const a of r.releasesOf(o)){const n=Math.min(a.untilT,t);if(n<=a.fromT)continue;const p=Math.max(r.PUFF_EVERY_S*1e3,(a.untilT-a.fromT)/r.MAX_PUFFS),d=[];for(let M=a.fromT;M<n;M+=p)d.push(M);d.push(n);const R=a.massKgPerS*(p/1e3),S=3*r.extinctionEfficiency(a.particleRadiusUm,r.WAVELENGTHS_UM[1])/(4*917*a.particleRadiusUm*1e-6),T=r.scatteringColour(a.particleRadiusUm);a.populations.forEach((M,y)=>{if(M.share<=0)return;const U=E=>a.initialRadiusKm+M.expansionKmPerS*E,I=[];for(const E of d){const D=(t-E)/1e3;if(D>M.lifetimeS)continue;const c=E!==n||n===a.untilT,f=`${a.key}|${y}|${E}`;let A=c?i.get(f):void 0;if(!A){if(A=r.launchPuff(o,a,E,R*M.share,U),!A)continue;c&&i.set(f,A)}I.push({ageS:D,position:A.at(D)})}for(let E=I.length-1;E>=0;E--){const{ageS:D,position:c}=I[E],f=I[E-1]??I[E+1],A=f?Math.hypot(c[0]-f.position[0],c[1]-f.position[1],c[2]-f.position[2]):0,l=U(D)+A/2,O=r.SIGMA_OF_RADIUS*l*1e3,N=R*a.condensedShare*M.share*S/(2*Math.PI*O*O),x=Math.max(0,1-(D/M.lifetimeS)**2);N*x<=0||e.push({launchId:o.id,release:a.key,at:r.geoPoint(c),radiusKm:l,opticalDepth:N*x,colour:T,ageS:D})}})}}return e}static viewsAt(s,t,e,o){const i=[];for(const a of r.puffsAt(s,t)){const n=H.seenFrom(e,a.at);if(n.altitudeDeg<0)continue;const p=r.sunlightAt(a.at,o);if(p.lit<=0)continue;const d=r.scatteringPhase(e,a.at,o),R=r.SUN_ILLUMINANCE_LUX*r.ALBEDO*d*a.opticalDepth*p.lit;R<=0||i.push({launchId:a.launchId,release:a.release,heightKm:a.at.heightM/1e3,centre:n,radiusDeg:Math.atan2(a.radiusKm,n.distanceKm)/r.DEG,luminanceCdM2:R,sunTransmittance:p.transmittance,colour:a.colour,lit:p.lit,ageS:a.ageS})}return i}static launchPuff(s,t,e,o,i){const a={id:s.id,track:s.track,fragments:[]},n=H.leadAt(a,e);if(!n)return;const p=s.track[0].t,d=s.track[s.track.length-1].t,R=Math.max(p,e-500),h=Math.min(d,e+500),S=r.earthCentred(n),T=r.earthCentred(H.leadAt(a,R)),M=r.earthCentred(H.leadAt(a,h)),y=Math.max(.001,(h-R)/1e3),U=[0,1,2].map(m=>(M[m]-T[m])/y),I=r.EARTH_ROTATION,E=[U[0]-I*S[1],U[1]+I*S[0],U[2]],D=m=>{const b=Math.hypot(m[0],m[1],m[2])||1;return m.map(k=>k/b)},c=D(E),f=D(S),A=f[0]*c[0]+f[1]*c[1]+f[2]*c[2];let l=[f[0]-A*c[0],f[1]-A*c[1],f[2]-A*c[2]];Math.hypot(l[0],l[1],l[2])<1e-6&&(l=[-c[2]*c[0],-c[2]*c[1],1-c[2]*c[2]]),l=D(l);const O=[c[1]*l[2]-c[2]*l[1],c[2]*l[0]-c[0]*l[2],c[0]*l[1]-c[1]*l[0]],N=t.spinPeriodS?360*((e-t.fromT)/1e3)/t.spinPeriodS:0,x=(t.azimuthDeg+N)*r.DEG,G=t.angleDeg*r.DEG,C=[0,1,2].map(m=>-c[m]*Math.cos(G)+Math.sin(G)*(Math.cos(x)*l[m]+Math.sin(x)*O[m])),P=[0,1,2].map(m=>U[m]+t.speedKmPerS*C[m]);return new _(S,P,o,i,t.particleRadiusUm)}static geoPoint(s){const t=Math.hypot(s[0],s[1],s[2]);return{lat:Math.asin(s[2]/t)/r.DEG,lng:Math.atan2(s[1],s[0])/r.DEG,heightM:(t-K.EARTH_RADIUS_KM)*1e3}}static sunlightAt(s,t){const e=r.earthCentred(s),o=e[0]*t[0]+e[1]*t[1]+e[2]*t[2];if(o>=0)return{lit:1,transmittance:[1,1,1]};const i=Math.hypot(e[0]-o*t[0],e[1]-o*t[1],e[2]-o*t[2]),a=r.PENUMBRA_KM,n=Math.min(1,Math.max(0,(i-(r.SHADOW_RADIUS_KM-a/2))/a));if(n<=0)return{lit:0,transmittance:[0,0,0]};const p=Math.max(0,(i-r.EARTH_RADIUS_KM)*1e3),d=Math.exp(-p/r.SCALE_HEIGHT_M),R=Math.sqrt(2*Math.PI*r.EARTH_RADIUS_KM*1e3*r.SCALE_HEIGHT_M),h=Math.exp(-(((p/1e3-25)/15)**2)),S=[0,1,2].map(T=>Math.exp(-r.RAYLEIGH_PER_M[T]*d*R-r.OZONE_GRAZING_DEPTH[T]*h));return{lit:n,transmittance:S}}static scatteringPhase(s,t,e){const o=r.earthCentred(s),i=r.earthCentred(t),a=[o[0]-i[0],o[1]-i[1],o[2]-i[2]],n=Math.hypot(a[0],a[1],a[2])||1,p=-(a[0]*e[0]+a[1]*e[1]+a[2]*e[2])/n,d=r.ANISOTROPY;return(1-d*d)/(4*Math.PI*(1+d*d-2*d*p)**1.5)}static earthCentred(s){const t=s.lat*r.DEG,e=s.lng*r.DEG,o=r.EARTH_RADIUS_KM+s.heightM/1e3;return[o*Math.cos(t)*Math.cos(e),o*Math.cos(t)*Math.sin(e),o*Math.sin(t)]}}export{r as L};
@@ -1 +0,0 @@
1
- import{Q as a,q as e,bv as s,a7 as t,a9 as r,al as i,X as o,af as n,a5 as l,a6 as b,aJ as u,am as m,an as d,bw as M,w as B,aa as f,o as y,a2 as G,b0 as S,aZ as c,b1 as x,G as h,bf as p,v as C,bx as L,ab as g,by as v,bz as A,bA as D,C as E,a8 as P,u as T,x as k,bB as w,ak as F,ae as O}from"./rr0-sighting.mjs";const V={AdditiveBlending:O,BackSide:F,BoxGeometry:w,BufferAttribute:k,BufferGeometry:T,CanvasTexture:P,Color:E,ConeGeometry:D,CylinderGeometry:A,DataTexture:v,DoubleSide:g,Euler:L,Float32BufferAttribute:C,FrontSide:p,Group:h,Line:x,LineBasicMaterial:c,LineSegments:S,Matrix4:G,Mesh:y,MeshBasicMaterial:f,MeshStandardMaterial:B,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{V as MODULE_THREE};