@rr0/ufoathome 0.201.0 → 0.202.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist-embed-interview/InterviewMessages_en-BrnxG2rl.js +3 -0
- package/dist-embed-interview/InterviewMessages_es-Dxfjqrte.js +3 -0
- package/dist-embed-interview/InterviewMessages_fr-DIA-1qu8.js +3 -0
- package/dist-embed-interview/InterviewMessages_it-CYBEIKX-.js +3 -0
- package/dist-embed-interview/rr0-interview.mjs +10 -6
- package/{dist-embed-sighting/AuroraSimulation-C9hvCV0W.js → dist-embed-scene/AuroraSimulation-Dh4kZW1x.js} +7 -2
- package/dist-embed-scene/rr0-scene.mjs +49 -45
- package/{dist-embed-scene/AuroraSimulation-BZpjImM0.js → dist-embed-sighting/AuroraSimulation-C7LAHgWM.js} +7 -2
- package/dist-embed-sighting/{CaseReportExport-DVVsc8gA.js → CaseReportExport-CkWf0HNx.js} +1 -1
- package/dist-embed-sighting/{InterviewElement-BduwyUn5.js → InterviewElement-B_ULRy5z.js} +9 -5
- package/dist-embed-sighting/InterviewMessages_en-BrnxG2rl.js +3 -0
- package/dist-embed-sighting/InterviewMessages_es-Dxfjqrte.js +3 -0
- package/dist-embed-sighting/InterviewMessages_fr-DIA-1qu8.js +3 -0
- package/dist-embed-sighting/InterviewMessages_it-CYBEIKX-.js +3 -0
- package/dist-embed-sighting/rr0-sighting.mjs +52 -48
- package/dist-embed-sighting-editor/{AdsbLolArchiveProvider-CWpyBqG3.js → AdsbLolArchiveProvider-Bz1OjSjY.js} +1 -1
- package/dist-embed-sighting-editor/{AirshipEditor-BvnVNcF4.js → AirshipEditor-BlJXyxlr.js} +1 -1
- package/dist-embed-sighting-editor/{AirshipFlight-CB1Quf68.js → AirshipFlight-Cx40Y8JT.js} +1 -1
- package/dist-embed-sighting-editor/{Aurora-BRXvgyRM.js → Aurora-Ldk66p1A.js} +1 -1
- package/dist-embed-sighting-editor/{AuroraEditor-JQ3kRqrq.js → AuroraEditor-CGSomAFk.js} +1 -1
- package/dist-embed-sighting-editor/{AuroraSimulation-i64MFW2z.js → AuroraSimulation-vKcv2Hue.js} +7 -2
- package/dist-embed-sighting-editor/{BallesterGuaspAssessor-BaKKAdY3.js → BallesterGuaspAssessor-Bylahnc2.js} +1 -1
- package/dist-embed-sighting-editor/{BalloonEditor-C2oHClW7.js → BalloonEditor-CgO4LaWn.js} +1 -1
- package/dist-embed-sighting-editor/{BalloonFlight-B9A6MoCj.js → BalloonFlight-hLr_4TFU.js} +1 -1
- package/dist-embed-sighting-editor/{BeamEditor-CW7mTQjS.js → BeamEditor-B8qreA3j.js} +1 -1
- package/dist-embed-sighting-editor/{BeamSystem-CSfJjLCb.js → BeamSystem-D0hrju5J.js} +1 -1
- package/dist-embed-sighting-editor/{BirdEditor-BdxhCoW9.js → BirdEditor-BNzrfSqX.js} +1 -1
- package/dist-embed-sighting-editor/{BirdFlock-DCbrukNp.js → BirdFlock-iSovVEZd.js} +1 -1
- package/dist-embed-sighting-editor/{BodyEditor-DE8ZQrqe.js → BodyEditor-Bd_pKafG.js} +2 -2
- package/dist-embed-sighting-editor/{CaseElement-C46wM-nU.js → CaseElement-DPlro-7S.js} +3 -3
- package/dist-embed-sighting-editor/{CaseReportExport-UVrInf6H.js → CaseReportExport-C1g5C8hi.js} +2 -2
- package/dist-embed-sighting-editor/{ContrailSystem-CDSSxouG.js → ContrailSystem-D3tXAg2r.js} +1 -1
- package/dist-embed-sighting-editor/{ControlPasses-CsOVa-jq.js → ControlPasses-BMEmppip.js} +1 -1
- package/dist-embed-sighting-editor/{CoverageAssessor-DWY_gJJX.js → CoverageAssessor-uzQnTEH8.js} +1 -1
- package/dist-embed-sighting-editor/{DroneEditor-DgeuaHdb.js → DroneEditor-BFsArPKi.js} +1 -1
- package/dist-embed-sighting-editor/{DroneFlight-CFztr-9j.js → DroneFlight-B96pVrY1.js} +1 -1
- package/dist-embed-sighting-editor/{DroneParameters-CHmDmRoC.js → DroneParameters-DW-enQUo.js} +1 -1
- package/dist-embed-sighting-editor/{Flightradar24Provider-e6_3o9Jf.js → Flightradar24Provider-CBGkjw03.js} +1 -1
- package/dist-embed-sighting-editor/GLTFLoader-2Zbfb3kh.js +1 -0
- package/dist-embed-sighting-editor/{GenerativeKitMessages-CmqG-T2c.js → GenerativeKitMessages-DmeZ_YZO.js} +1 -1
- package/dist-embed-sighting-editor/{GeoExportTexts-Wjc5YKlM.js → GeoExportTexts-Cp95Dg-h.js} +1 -1
- package/dist-embed-sighting-editor/{GeoJsonExport-BSPGzTbG.js → GeoJsonExport-CdadOwd2.js} +1 -1
- package/dist-embed-sighting-editor/{GeographicFigures-D_TfLkj9.js → GeographicFigures-Bo9rsT_L.js} +1 -1
- package/dist-embed-sighting-editor/{HeadlightSystem-DljWmzj5.js → HeadlightSystem-CBmEcC9f.js} +1 -1
- package/dist-embed-sighting-editor/{HynekAssessor-BCDwoOI9.js → HynekAssessor-uub2VxTi.js} +1 -1
- package/dist-embed-sighting-editor/InterviewEditorElement-_1fa2bG7.js +294 -0
- package/dist-embed-sighting-editor/{InterviewElement-DDa53uMq.js → InterviewElement-Ala811KB.js} +6 -2
- package/dist-embed-sighting-editor/InterviewMessages_en-BrnxG2rl.js +3 -0
- package/dist-embed-sighting-editor/InterviewMessages_es-Dxfjqrte.js +3 -0
- package/dist-embed-sighting-editor/InterviewMessages_fr-DIA-1qu8.js +3 -0
- package/dist-embed-sighting-editor/InterviewMessages_it-CYBEIKX-.js +3 -0
- package/dist-embed-sighting-editor/{KmlExport-B46AfaoJ.js → KmlExport-DIxM5Hpx.js} +1 -1
- package/dist-embed-sighting-editor/{LanternEditor-CkbeitJh.js → LanternEditor-CjQVFowY.js} +1 -1
- package/dist-embed-sighting-editor/{LaserBeam-Ber-PT8j.js → LaserBeam-BVc8Mvhr.js} +1 -1
- package/dist-embed-sighting-editor/{LaunchEditor-BsvHahqK.js → LaunchEditor-Cz8Mzo4a.js} +1 -1
- package/dist-embed-sighting-editor/{LaunchPlume-BmPMeGMN.js → LaunchPlume-CvBhTPgN.js} +1 -1
- package/dist-embed-sighting-editor/{LaunchSimulation-g-ETWhEH.js → LaunchSimulation-CkZIG-3P.js} +1 -1
- package/dist-embed-sighting-editor/{ModelSource-DOUnBBhu.js → ModelSource-B153oeTu.js} +1 -1
- package/dist-embed-sighting-editor/{ModelThumbnails-TwG1snwZ.js → ModelThumbnails-BUL_OLFv.js} +1 -1
- package/dist-embed-sighting-editor/{ModelViewer-Y_B6eM4z.js → ModelViewer-BzBLcY9s.js} +1 -1
- package/dist-embed-sighting-editor/{ModuleConformance-CO1S9pa3.js → ModuleConformance-Cr6fM28A.js} +2 -2
- package/dist-embed-sighting-editor/{ModuleSession-VLS0tjAb.js → ModuleSession-WA6lqfV6.js} +3 -3
- package/dist-embed-sighting-editor/ModuleThree-CB_EjTOI.js +1 -0
- package/dist-embed-sighting-editor/{ModulesPanelElement--YQ0QtcW.js → ModulesPanelElement-BsRg3mzl.js} +3 -3
- package/dist-embed-sighting-editor/{NearestApproach-C_8Uvp6i.js → NearestApproach-Bnx9Ld5_.js} +1 -1
- package/dist-embed-sighting-editor/PictureRegistration-D8fDZm4v.js +1 -0
- package/dist-embed-sighting-editor/{PoherAssessor-DtDcuhWK.js → PoherAssessor-CNj_Nyci.js} +1 -1
- package/dist-embed-sighting-editor/{QuestionnaireFeed-CvLtuLIH.js → QuestionnaireFeed-B0j8W4JM.js} +1 -1
- package/dist-embed-sighting-editor/QuestionnaireForm-lzn9MPr2.js +1 -0
- package/dist-embed-sighting-editor/{QuestionnaireImport-BYj5QoJS.js → QuestionnaireImport-BmcxlQBq.js} +1 -1
- package/dist-embed-sighting-editor/RailwaySystem-6bwbv8UB.js +41 -0
- package/dist-embed-sighting-editor/{ReentryEditor-CW8H7KaA.js → ReentryEditor-BWCK2g_s.js} +1 -1
- package/dist-embed-sighting-editor/{ReentrySimulation-DVl__RjO.js → ReentrySimulation-B09JXMu5.js} +1 -1
- package/dist-embed-sighting-editor/ReferenceSystem-8QgwbbAG.js +1 -0
- package/dist-embed-sighting-editor/{RoadMarkings-DJraHdS6.js → RoadMarkings-Dl6zVQIx.js} +1 -1
- package/dist-embed-sighting-editor/ScenarioReadings-DyMshXS4.js +1 -0
- package/dist-embed-sighting-editor/{ScenarioSweep-Ddtuo_Af.js → ScenarioSweep-ByqOTfs2.js} +1 -1
- package/dist-embed-sighting-editor/{SceneNames_en-p5YNYZhA.js → SceneNames_en-c5zNw0Hi.js} +1 -1
- package/dist-embed-sighting-editor/{SceneNames_es-DlMqYLL9.js → SceneNames_es-CDjoBwy_.js} +1 -1
- package/dist-embed-sighting-editor/{SceneNames_fr-lFA7hY3x.js → SceneNames_fr-CoZNmFu3.js} +1 -1
- package/dist-embed-sighting-editor/{SceneNames_it-CDwvX1Nw.js → SceneNames_it-CVEahBpq.js} +1 -1
- package/dist-embed-sighting-editor/{SearchlightEditor-BSI8hB1V.js → SearchlightEditor-BpwPOhJ6.js} +1 -1
- package/dist-embed-sighting-editor/{SearchlightSystem-DHfVi2np.js → SearchlightSystem-CEG52QDx.js} +1 -1
- package/dist-embed-sighting-editor/{SightingElement-T0x4j9Zt.js → SightingElement-BQdiez39.js} +3 -3
- package/dist-embed-sighting-editor/{SkyLantern-Dl4yl-lc.js → SkyLantern-D6bru_e_.js} +1 -1
- package/dist-embed-sighting-editor/{TraceSystem-Dbu_bgfE.js → TraceSystem-DZMUxSn-.js} +2 -2
- package/dist-embed-sighting-editor/{UfoMessages_en-BAuHAGgq.js → UfoMessages_en-DdCKc-Ez.js} +1 -1
- package/dist-embed-sighting-editor/{VideoButton-C8eRmv7A.js → VideoButton-CzJg9lBG.js} +1 -1
- package/dist-embed-sighting-editor/{WaterSystem-DpJCe_2Q.js → WaterSystem-CB5jE7qB.js} +2 -2
- package/dist-embed-sighting-editor/geipan-qt-2025-B_RUiH8B.js +7 -0
- package/dist-embed-sighting-editor/{interviewImport-zzDGCbXd.js → interviewImport-D4P6e28u.js} +1 -1
- package/dist-embed-sighting-editor/{interviewJson-DngUPqK8.js → interviewJson-BJF9C-Rb.js} +1 -1
- package/dist-embed-sighting-editor/interviewSchema-r5bW7skq.js +1 -0
- package/dist-embed-sighting-editor/rr0-sighting-editor.mjs +421 -415
- package/dist-embed-sighting-editor/{surroundingsSources-lvh4Rw5C.js → surroundingsSources-CqL7lcmF.js} +1 -1
- package/dist-embed-sighting-editor/{trafficRuntime-Drx7CE9H.js → trafficRuntime-Bu3my6S4.js} +2 -2
- package/dist-embed-ufoathome/{AdsbLolArchiveProvider-CqedGYi5.js → AdsbLolArchiveProvider-KbJPyJ97.js} +1 -1
- package/dist-embed-ufoathome/{Aurora-CpZx9hQ3.js → Aurora-C_mCH4JM.js} +1 -1
- package/dist-embed-ufoathome/{AuroraEditor-D2v8sWVE.js → AuroraEditor-Dzvgh6e0.js} +1 -1
- package/dist-embed-ufoathome/{AuroraSimulation-DdSP66LD.js → AuroraSimulation-BRUnHmlp.js} +7 -2
- package/dist-embed-ufoathome/{BallesterGuaspAssessor-C4IktJ1l.js → BallesterGuaspAssessor-DurdUgbG.js} +1 -1
- package/dist-embed-ufoathome/{BeamEditor-CuW3LVO-.js → BeamEditor-Ccvx7l7x.js} +1 -1
- package/dist-embed-ufoathome/{BeamSystem-BPEYuCF4.js → BeamSystem-CPM8m17q.js} +1 -1
- package/dist-embed-ufoathome/{BodyEditor-COMX-T65.js → BodyEditor-BG--NjnZ.js} +1 -1
- package/dist-embed-ufoathome/{CaseEditorElement-C5BHP8jT.js → CaseEditorElement-0J_TCeiq.js} +64 -62
- package/dist-embed-ufoathome/{CaseElement-CIZvyRVi.js → CaseElement-CRXPyMMR.js} +3 -3
- package/dist-embed-ufoathome/{CaseReportExport-BFbswUIB.js → CaseReportExport-DKrBXPgZ.js} +3 -3
- package/dist-embed-ufoathome/{ColumnResize-Dh6Xyspd.js → ColumnResize-DV-byvDt.js} +6 -6
- package/dist-embed-ufoathome/{ControlPasses-CnL1GmT-.js → ControlPasses-CKvTCqTI.js} +1 -1
- package/dist-embed-ufoathome/{CoverageAssessor-CiqUEJkN.js → CoverageAssessor-MeOMUjkZ.js} +1 -1
- package/dist-embed-ufoathome/{Flightradar24Provider-_tNmWf11.js → Flightradar24Provider-DxTfswSh.js} +1 -1
- package/dist-embed-ufoathome/{GLTFLoader-BLk8prLt.js → GLTFLoader-pi-JKaNa.js} +1 -1
- package/dist-embed-ufoathome/{GeoJsonExport-DkPKk-7q.js → GeoJsonExport-iyhoKOUU.js} +1 -1
- package/dist-embed-ufoathome/{GeographicFigures-l-PfHdSR.js → GeographicFigures-DBmuFlvH.js} +1 -1
- package/dist-embed-ufoathome/{HynekAssessor-BhnvqsYz.js → HynekAssessor-Bda6csgM.js} +1 -1
- package/dist-embed-ufoathome/InterviewAttachments-BP6Prvdu.js +1 -0
- package/dist-embed-ufoathome/InterviewEditorElement-BA060rqJ.js +294 -0
- package/dist-embed-ufoathome/{InterviewElement-CuRmQ0d3.js → InterviewElement-DvqsCA3I.js} +6 -2
- package/dist-embed-ufoathome/InterviewMessages_en-BrnxG2rl.js +3 -0
- package/dist-embed-ufoathome/InterviewMessages_es-Dxfjqrte.js +3 -0
- package/dist-embed-ufoathome/InterviewMessages_fr-DIA-1qu8.js +3 -0
- package/dist-embed-ufoathome/InterviewMessages_it-CYBEIKX-.js +3 -0
- package/dist-embed-ufoathome/{KmlExport-BUl3gOrw.js → KmlExport-DEPgRRWe.js} +1 -1
- package/dist-embed-ufoathome/{LaserBeam-C7glTvQN.js → LaserBeam--dquPX_h.js} +1 -1
- package/dist-embed-ufoathome/{LaunchEditor-DvudtAzp.js → LaunchEditor-D3P0GkLr.js} +1 -1
- package/dist-embed-ufoathome/{LaunchPlume-CrDBzsQe.js → LaunchPlume-w4l4TR4A.js} +1 -1
- package/dist-embed-ufoathome/{LaunchSimulation-DyOA4lPb.js → LaunchSimulation-BpZd-Nov.js} +1 -1
- package/dist-embed-ufoathome/{ModelSource-CoT4mxTx.js → ModelSource-Csnm3RH_.js} +1 -1
- package/dist-embed-ufoathome/{ModelThumbnails-t59SZ3Vn.js → ModelThumbnails-Cnt2GxTb.js} +1 -1
- package/dist-embed-ufoathome/{ModelViewer-DEdruEtl.js → ModelViewer-DOfAkPgK.js} +1 -1
- package/dist-embed-ufoathome/{ModulesPanelElement-N-ccpGxl.js → ModulesPanelElement-DH1oroWm.js} +2 -2
- package/dist-embed-ufoathome/{NearestApproach-Do15yfeg.js → NearestApproach-DJ98M81-.js} +1 -1
- package/dist-embed-ufoathome/{PoherAssessor-Cs8-ZBge.js → PoherAssessor-4zSdFnFp.js} +1 -1
- package/dist-embed-ufoathome/QuestionnaireFeed-W69udpmT.js +1 -0
- package/dist-embed-ufoathome/QuestionnaireForm-U78nFPn5.js +1 -0
- package/dist-embed-ufoathome/{QuestionnaireImport-Cx1dQiha.js → QuestionnaireImport-Q5uHxQwU.js} +1 -1
- package/dist-embed-ufoathome/{ReentryEditor-CJUFkVFO.js → ReentryEditor-DEi9nT0z.js} +1 -1
- package/dist-embed-ufoathome/{ReentrySimulation-B5QcdOTq.js → ReentrySimulation-CSO1vgro.js} +1 -1
- package/dist-embed-ufoathome/{ReferenceSystem-DyzOUClN.js → ReferenceSystem--tiMGm4e.js} +1 -1
- package/dist-embed-ufoathome/ScenarioReadings-Dzdgopl3.js +1 -0
- package/dist-embed-ufoathome/ScenarioSweep-CMcleprC.js +1 -0
- package/dist-embed-ufoathome/{SearchlightEditor-CPDNpfNC.js → SearchlightEditor--1uL8bTa.js} +1 -1
- package/dist-embed-ufoathome/{SearchlightSystem-Ca0rZcXv.js → SearchlightSystem-7bntVtp_.js} +1 -1
- package/dist-embed-ufoathome/{ShareDialogElement-CBeU9ChH.js → ShareDialogElement-Dlfy9NCE.js} +52 -48
- package/dist-embed-ufoathome/{SightingElement-BveOM4nF.js → SightingElement-BJSNmFM6.js} +2 -2
- package/dist-embed-ufoathome/{TraceSystem-CoHX04R3.js → TraceSystem-Cq2TgP-u.js} +1 -1
- package/dist-embed-ufoathome/{VideoButton-DNQmWtfv.js → VideoButton-MRJlVNm_.js} +1 -1
- package/dist-embed-ufoathome/geipan-qt-2025-B_RUiH8B.js +7 -0
- package/dist-embed-ufoathome/interviewSchema-r5bW7skq.js +1 -0
- package/dist-embed-ufoathome/rr0-ufoathome.mjs +4 -4
- package/dist-embed-ufoathome/{surroundingsSources-C823p3dG.js → surroundingsSources--qffL_nJ.js} +1 -1
- package/dist-embed-ufoathome/{trafficRuntime-DtXb9B2f.js → trafficRuntime-CTCGr90P.js} +1 -1
- package/package.json +1 -1
- package/dist-embed-interview/InterviewMessages_en-BRmuWrAg.js +0 -1
- package/dist-embed-interview/InterviewMessages_es-BTotimwY.js +0 -1
- package/dist-embed-interview/InterviewMessages_fr-DBCdGB0r.js +0 -1
- package/dist-embed-interview/InterviewMessages_it-B5EyMD-k.js +0 -1
- package/dist-embed-sighting/InterviewMessages_en-BRmuWrAg.js +0 -1
- package/dist-embed-sighting/InterviewMessages_es-BTotimwY.js +0 -1
- package/dist-embed-sighting/InterviewMessages_fr-DBCdGB0r.js +0 -1
- package/dist-embed-sighting/InterviewMessages_it-B5EyMD-k.js +0 -1
- package/dist-embed-sighting-editor/GLTFLoader-Df-r7_lf.js +0 -1
- package/dist-embed-sighting-editor/InterviewEditorElement-KHpgfy3k.js +0 -277
- package/dist-embed-sighting-editor/InterviewMessages_en-BRmuWrAg.js +0 -1
- package/dist-embed-sighting-editor/InterviewMessages_es-BTotimwY.js +0 -1
- package/dist-embed-sighting-editor/InterviewMessages_fr-DBCdGB0r.js +0 -1
- package/dist-embed-sighting-editor/InterviewMessages_it-B5EyMD-k.js +0 -1
- package/dist-embed-sighting-editor/ModuleThree-DQ2dT7XW.js +0 -1
- package/dist-embed-sighting-editor/PictureRegistration-Br0xjLE2.js +0 -1
- package/dist-embed-sighting-editor/QuestionnaireForm-DA6LPvBt.js +0 -1
- package/dist-embed-sighting-editor/RailwaySystem-eT-ZKfZl.js +0 -41
- package/dist-embed-sighting-editor/ReferenceSystem-DxVYO7g9.js +0 -1
- package/dist-embed-sighting-editor/ScenarioReadings-BYqlpLo8.js +0 -1
- package/dist-embed-sighting-editor/geipan-qt-2025-j-yGY7EN.js +0 -7
- package/dist-embed-sighting-editor/interviewSchema-DRWvRSL2.js +0 -1
- package/dist-embed-ufoathome/InterviewEditorElement-iw2lnwx8.js +0 -277
- package/dist-embed-ufoathome/InterviewMessages_en-BRmuWrAg.js +0 -1
- package/dist-embed-ufoathome/InterviewMessages_es-BTotimwY.js +0 -1
- package/dist-embed-ufoathome/InterviewMessages_fr-DBCdGB0r.js +0 -1
- package/dist-embed-ufoathome/InterviewMessages_it-B5EyMD-k.js +0 -1
- package/dist-embed-ufoathome/QuestionnaireFeed-BfvRSPoo.js +0 -1
- package/dist-embed-ufoathome/QuestionnaireForm-ByFmq67M.js +0 -1
- package/dist-embed-ufoathome/ScenarioReadings-CfZehU_P.js +0 -1
- package/dist-embed-ufoathome/ScenarioSweep-CDumnmq2.js +0 -1
- package/dist-embed-ufoathome/geipan-qt-2025-j-yGY7EN.js +0 -7
- package/dist-embed-ufoathome/interviewSchema-DRWvRSL2.js +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./SkyLantern-DJT_Ibzh.js","./Obstacles-v9SkfBD7.js","./LanternEditor-BapUZdog.js","./SaidPosition-OJEYhVKN.js","./GeoProjection-DvqDbRIx.js","./SkyEventEditorStyle-CvY_AhbI.js","./Sighting-B7bsiTIQ.js","./VisualAids-DI-hEL46.js","./ParameterForm-XbqxCLRn.js","./BirdFlock-ByBkJV35.js","./BirdEditor-Dk3huwHa.js","./TimelineTracks-Daaqw9ly.js","./DroneFlight-CGNIh9XS.js","./Decor-Dn-cvniW.js","./DroneEditor-D60uhSHO.js","./DroneParameters-CfTAaLCT.js","./BalloonEditor-dCIjTsIz.js","./BalloonFlight-CztT6ddg.js","./AirshipFlight-Dzpw8HRM.js","./AirshipEditor-CBSrQM3J.js","./CaseElement-
|
|
2
|
-
const dn="modulepreload",ln=function(n,t){return new URL(n,t).href},je={},d=function(t,e,r){let s=Promise.resolve();if(e&&e.length>0){let i=function(m){return Promise.all(m.map(h=>Promise.resolve(h).then(w=>({status:"fulfilled",value:w}),w=>({status:"rejected",reason:w}))))};const a=document.getElementsByTagName("link"),l=document.querySelector("meta[property=csp-nonce]"),c=l?.nonce||l?.getAttribute("nonce");s=i(e.map(m=>{if(m=ln(m,r),m in je)return;je[m]=!0;const h=m.endsWith(".css"),w=h?'[rel="stylesheet"]':"";if(!!r)for(let S=a.length-1;S>=0;S--){const D=a[S];if(D.href===m&&(!h||D.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${m}"]${w}`))return;const _=document.createElement("link");if(_.rel=h?"stylesheet":dn,h||(_.as="script"),_.crossOrigin="",_.href=m,c&&_.setAttribute("nonce",c),document.head.appendChild(_),h)return new Promise((S,D)=>{_.addEventListener("load",S),_.addEventListener("error",()=>D(new Error(`Unable to preload CSS for ${m}`)))})}))}function o(i){const a=new Event("vite:preloadError",{cancelable:!0});if(a.payload=i,window.dispatchEvent(a),!a.defaultPrevented)throw i}return s.then(i=>{for(const a of i||[])a.status==="rejected"&&o(a.reason);return t().catch(o)})},mn="rr0-read",pn="rr0-edit",ge="in-place",hn="rr0-mode";class Hs{static ask(t,e,r){const s=new CustomEvent(e,{detail:r,bubbles:!0,composed:!0,cancelable:!0});return t.dispatchEvent(s),s.defaultPrevented}}class j{constructor(t){this.entries=t}static free(t){return t?.basis==="assumed"||t?.basis==="fitted"}static empty(){return new j(new Map)}get size(){return this.entries.size}at(t){return this.entries.get(t)}paths(){return[...this.entries.keys()]}sourced(){return[...this.entries].filter(([,t])=>t.source!==void 0).map(([t,e])=>({path:t,basis:e.basis,source:e.source}))}interviewsCited(){const t=[];for(const{source:e}of this.sourced()){const r=e.said?.interview;r!==void 0&&!t.includes(r)&&t.push(r)}return t}pathsFromInterview(t){return this.sourced().filter(({source:e})=>e.said!==void 0&&e.said.interview===t).map(({path:e})=>e)}set(t,e){e.basis==="stated"&&e.rationale===void 0&&e.how===void 0&&e.range===void 0&&e.source===void 0?this.entries.delete(t):this.entries.set(t,e)}clear(t){for(const e of this.entries.keys())(e===t||e.startsWith(`${t}.`))&&this.entries.delete(e)}static strip(t){const e=new j(new Map);return{recording:j.stripValue(t,[],e),provenance:e}}static restore(t,e){if(e.size===0)return t;const r={...t},s=new Set([r]);for(const o of e.paths()){const i=e.at(o),a=o.split("."),l=j.writableHolderOf(r,a,s);if(!l)continue;const c=a[a.length-1],m=l[c];m!==void 0&&(i.of!==void 0&&JSON.stringify(i.of)!==JSON.stringify(m)||(l[c]={value:m,...i.basis==="stated"?{}:{basis:i.basis},...i.rationale===void 0?{}:{rationale:i.rationale},...i.how===void 0?{}:{how:i.how},...i.range===void 0?{}:{range:i.range},...i.source===void 0?{}:{source:i.source}}))}return r}static isWrapper(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)&&"value"in t}static stripValue(t,e,r){return j.isWrapper(t)?(r.set(e.join("."),{basis:t.basis??"stated",...t.rationale===void 0?{}:{rationale:t.rationale},...t.how===void 0?{}:{how:t.how},...t.range===void 0?{}:{range:t.range},...t.source===void 0?{}:{source:t.source},of:t.value}),j.stripValue(t.value,e,r)):Array.isArray(t)?t.map((s,o)=>j.stripValue(s,[...e,String(o)],r)):typeof t=="object"&&t!==null?Object.fromEntries(Object.entries(t).map(([s,o])=>[s,j.stripValue(o,[...e,s],r)])):t}static writableHolderOf(t,e,r){let s=t;for(const o of e.slice(0,-1)){const i=s[o];if(typeof i!="object"||i===null)return;if(r.has(i)){s=i;continue}const a=Array.isArray(i)?[...i]:{...i};r.add(a),s[o]=a,s=a}return s}}class fn extends Error{constructor(t,e,r){super(typeof e=="number"&&Number.isInteger(e)&&e>=1?`This ${t} file is in version ${e} of its format; this UFO@home reads version ${r}. Read it with the UFO@home that reads its version.`:`This ${t} file states ${JSON.stringify(e)} as its format version, which is not a version.`),this.format=t,this.found=e,this.supported=r,this.name="FormatVersionError"}said(t){return t.replace("{found}",typeof this.found=="number"?String(this.found):JSON.stringify(this.found)).replace("{supported}",String(this.supported))}}class ct{static CURRENT={sighting:4,case:1,interview:1};static SCHEMA_BASE="https://ufoathome.org/schema";static schemaUrl(t,e=ct.CURRENT[t]){return`${ct.SCHEMA_BASE}/${e}/${t}.schema.json`}static of(t){if(typeof t!="object"||t===null)return 1;const e=t.version;return e===void 0?1:typeof e=="object"&&e!==null&&"value"in e?e.value:e}static recording(t){return ct.check(t,"sighting")}static check(t,e){const r=ct.of(t),s=ct.CURRENT[e];if(typeof r!="number"||!Number.isInteger(r)||r!==s)throw new fn(e,r,s);return t}}class N{static built=new WeakMap;static computers=new WeakMap;static loading=new WeakMap;static loaded(t,e){return e.every(r=>N.itemsOf(t,r.key).length===0||N.computers.has(r))}static load(t,e){return Promise.all(e.filter(r=>N.itemsOf(t,r.key).length>0&&!N.computers.has(r)).map(r=>{let s=N.loading.get(r);return s||(s=r.compute().then(o=>{N.computers.set(r,o)}),s.catch(()=>N.loading.delete(r)),N.loading.set(r,s)),s.catch(()=>{})})).then(()=>{})}static of(t){let e=N.built.get(t);return e||(e=t.create(),N.built.set(t,e)),e}static itemsOf(t,e){const r=t?.[e];return Array.isArray(r)?r:[]}static computes(t,e){return e.some(r=>N.itemsOf(t,r.key).length>0)}static expand(t,e,r){return N.expandWithKinds(t,e,r).interpretation}static expandWithKinds(t,e,r){const s=new Map,o=new Map;if(!t||!N.computes(t,e))return{interpretation:t,kindOf:s,phenomenonOf:o};const i=e.flatMap(a=>N.itemsOf(t,a.key).flatMap(l=>{const c=N.computers.get(a);if(!c)return[];const m=c(l,r),h=a.phenomenon?.(l);for(const w of m)s.set(w.id,a),h&&o.set(w.id,h);return m}));return{interpretation:{...t,bodies:[...t.bodies,...i]},kindOf:s,phenomenonOf:o}}static computedPart(t,e){const r={};for(const s of e){const o=N.itemsOf(t,s.key);o.length>0&&(r[s.key]=[...o])}return r}static saysNothing(t,e){return t.bodies.length===0&&t.title===void 0&&t.smoke===void 0&&e.every(r=>t[r.key]===void 0)}}const Ls=Object.freeze(Object.defineProperty({__proto__:null,InterpretationKinds:N},Symbol.toStringTag,{value:"Module"}));class Wr extends Error{constructor(t,e,r,s){super(`Module "${t}" gives "${r}" at ${e}, which module "${s}" already gives`),this.moduleId=t,this.point=e,this.sourceId=r,this.ownerId=s,this.name="ModuleConflictError"}}class gn{constructor(t){this.id=t}sources=[];owners=new Map;ownerOf(t){return this.owners.get(t)}conflict(t,e){for(const r of e){const s=this.owners.get(r.id);if(s!==void 0&&s!==t)return{sourceId:r.id,ownerId:s}}}provide(t,e){const r=this.conflict(t,e);if(r)throw new Wr(t,this.id,r.sourceId,r.ownerId);this.withdraw(t);const s=t===v.BUILT_IN?this.sources.findIndex(o=>this.owners.get(o.id)!==v.BUILT_IN):-1;s<0?this.sources.push(...e):this.sources.splice(s,0,...e);for(const o of e)this.owners.set(o.id,t);return this.sources}withdraw(t){for(let e=this.sources.length-1;e>=0;e--){const r=this.sources[e].id;this.owners.get(r)===t&&(this.sources.splice(e,1),this.owners.delete(r))}}}class v{static BUILT_IN="ufoathome";static changes=new EventTarget;static points=new Map;static modules=new Map;static point(t){let e=v.points.get(t);return e||(e=new gn(t),v.points.set(t,e)),e}static install(t){if(t.id===v.BUILT_IN)throw new Error(`"${v.BUILT_IN}" is the id of the built-in module`);const e=v.contributionsOf(t);for(const[o,i]of e){const a=v.point(o).conflict(t.id,i);if(a)throw new Wr(t.id,o,a.sourceId,a.ownerId)}const r=new Set(e.map(([o])=>o)),s=v.modules.get(t.id);if(s)for(const[o]of v.contributionsOf(s))r.add(o);for(const o of r)v.point(o).withdraw(t.id);for(const[o,i]of e)v.point(o).provide(t.id,i);v.modules.set(t.id,t);for(const o of r)v.announce(o)}static uninstall(t){const e=v.modules.get(t);if(e){v.modules.delete(t);for(const[r]of v.contributionsOf(e))v.point(r).withdraw(t),v.announce(r)}}static installed(){return[...v.modules.values()]}static contributionsOf(t){return Object.entries(t.contributes).filter(e=>Array.isArray(e[1])&&e[1].length>0)}static announce(t){v.changes.dispatchEvent(new CustomEvent("change",{detail:t}))}}const wn=["en","fr","es","it"];class T{static catalog(t){const e=new Map;return{load(r){const s=T.languageOf(r);let o=e.get(s);return o||(o=t[s](),e.set(s,o),o.catch(()=>e.delete(s))),o}}}static none(){return new Proxy({},{get:()=>""})}static blank(){const t=new Proxy(()=>t,{get:(e,r)=>r===Symbol.toPrimitive?()=>"":r===Symbol.iterator?function*(){}:r==="toString"||r==="valueOf"?()=>"":r==="then"?void 0:t,apply:()=>t,has:()=>!1,ownKeys:()=>[],getOwnPropertyDescriptor:()=>{}});return t}static languageOf(t){const e=t.toLowerCase().split("-")[0];return wn.includes(e)?e:"en"}}const bn=T.catalog({en:()=>d(()=>import("./FlareKindMessages_en-j3CY_TxX.js"),[],import.meta.url).then(n=>n.flareKindMessages_en),fr:()=>d(()=>import("./FlareKindMessages_fr-B2MezoN2.js"),[],import.meta.url).then(n=>n.flareKindMessages_fr),es:()=>d(()=>import("./FlareKindMessages_es-CZgrFIOO.js"),[],import.meta.url).then(n=>n.flareKindMessages_es),it:()=>d(()=>import("./FlareKindMessages_it-CmZmb3RP.js"),[],import.meta.url).then(n=>n.flareKindMessages_it)});class J{constructor(t={}){this.options=t,this.fetchImpl=t.fetchImpl??fetch.bind(globalThis),this.wait=t.wait??(e=>new Promise(r=>setTimeout(r,e)))}static URL="https://historical-forecast-api.open-meteo.com/v1/forecast";static CREDIT="Open-Meteo historical forecast";static LEVELS=[850,700,600,500,400,300];static RETRIES=6;static RETRY_MS=2e3;days=new Map;fetchImpl;wait;async profile(t,e,r){const o=new Date(Math.floor(r.getTime()/36e5)*36e5),i=(r.getTime()-o.getTime())/36e5,a=await this.hourly(t,e,o);if(i<1e-6)return a;const l=await this.hourly(t,e,new Date(o.getTime()+36e5));return a.levels.length!==l.levels.length?i<.5?a:l:{...a,hour:r.toISOString().slice(0,16),levels:a.levels.map((c,m)=>{const[h,w]=K.vector(c.wind),[b,_]=K.vector(l.levels[m].wind);return{aboveGroundM:c.aboveGroundM+i*(l.levels[m].aboveGroundM-c.aboveGroundM),wind:K.fromVector(h+i*(b-h),w+i*(_-w))}})}}async hourly(t,e,r){const s=r.toISOString().slice(0,13)+":00",o=s.slice(0,10),i=`${t.toFixed(4)},${e.toFixed(4)},${o}`;let a=this.days.get(i);return a||(a=this.day(t,e,o,i),a.catch(()=>this.days.delete(i)),this.days.set(i,a)),J.profileOf(await a,s)}static profileOf(t,e){const r=t.hourly,s=r.time.indexOf(e);if(s<0)throw new Error(`No wind for ${e} in the archive's answer`);const o=c=>(c+180)%360,i=[],a=r.wind_speed_10m?.[s],l=r.wind_direction_10m?.[s];typeof a=="number"&&typeof l=="number"&&i.push({aboveGroundM:10,wind:{towardDeg:o(l),speedMS:a}});for(const c of J.LEVELS){const m=r[`geopotential_height_${c}hPa`]?.[s],h=r[`wind_speed_${c}hPa`]?.[s],w=r[`wind_direction_${c}hPa`]?.[s];if(typeof m!="number"||typeof h!="number"||typeof w!="number")continue;const b=m-t.elevation;b<=(i[i.length-1]?.aboveGroundM??0)||i.push({aboveGroundM:b,wind:{towardDeg:o(w),speedMS:h}})}if(i.length===0)throw new Error(`No wind for ${e} in the archive's answer`);return{lat:t.latitude,lng:t.longitude,elevationM:t.elevation,hour:e,levels:i,credit:J.CREDIT}}async day(t,e,r,s){const o=await this.options.cache?.get(s);if(o)return JSON.parse(o);const i=["wind_speed_10m","wind_direction_10m",...J.LEVELS.flatMap(c=>[`wind_speed_${c}hPa`,`wind_direction_${c}hPa`,`geopotential_height_${c}hPa`])],a=new URLSearchParams({latitude:String(t),longitude:String(e),start_date:r,end_date:r,hourly:i.join(","),wind_speed_unit:"ms",timezone:"GMT"}),l=`${this.options.url??J.URL}?${a}`;for(let c=0;;c++){const m=await this.fetchImpl(l);if(m.ok){const h=await m.text();return await this.options.cache?.set(s,h),JSON.parse(h)}if((m.status===429||m.status>=500)&&c<J.RETRIES){await this.wait(J.RETRY_MS*2**c);continue}throw new Error(`The wind archive answered ${m.status} for ${s}`)}}}class K{static at(t,e){const r=t.levels;if(e<=r[0].aboveGroundM)return{...r[0].wind};for(let s=1;s<r.length;s++){const o=r[s-1],i=r[s];if(e<=i.aboveGroundM){const a=(e-o.aboveGroundM)/(i.aboveGroundM-o.aboveGroundM),[l,c]=K.vector(o.wind),[m,h]=K.vector(i.wind);return K.fromVector(l+a*(m-l),c+a*(h-c))}}return{...r[r.length-1].wind}}static vector(t){const e=t.towardDeg*Math.PI/180;return[t.speedMS*Math.sin(e),t.speedMS*Math.cos(e)]}static fromVector(t,e){return{towardDeg:(Math.atan2(t,e)*180/Math.PI+360)%360,speedMS:Math.hypot(t,e)}}static rounded(t){return{towardDeg:Math.round(t.towardDeg)%360,speedMS:Math.round(t.speedMS*100)/100}}}const Ks=Object.freeze(Object.defineProperty({__proto__:null,OpenMeteoWindProfiles:J,Winds:K},Symbol.toStringTag,{value:"Module"})),En=K.rounded,He={key:"flares",messages:bn,phenomenon:()=>"DecoyFlare",inWind:(n,t)=>({...n,wind:En(t.at(n.aircraft.altitudeM))}),compute:()=>d(async()=>{const{DecoyFlare:n}=await import("./DecoyFlare-DUt1_LcW.js");return{DecoyFlare:n}},[],import.meta.url).then(({DecoyFlare:n})=>t=>n.bodiesOf(t))},yn=T.catalog({en:()=>d(()=>import("./LanternKindMessages_en-CQXdJ-k6.js"),[],import.meta.url).then(n=>n.lanternKindMessages_en),fr:()=>d(()=>import("./LanternKindMessages_fr-D7tQa_tQ.js"),[],import.meta.url).then(n=>n.lanternKindMessages_fr),es:()=>d(()=>import("./LanternKindMessages_es-BOO6kPjs.js"),[],import.meta.url).then(n=>n.lanternKindMessages_es),it:()=>d(()=>import("./LanternKindMessages_it-B8J-29Mj.js"),[],import.meta.url).then(n=>n.lanternKindMessages_it)}),Le=K.rounded,Ke={key:"lanterns",messages:yn,phenomenon:()=>"SkyLantern",inWind:(n,t)=>{const e=n.site.altitudeM??0,r=n.windAloft?.atM??1e3;return{...n,wind:Le(t.at(10)),windAloft:{...Le(t.at(e+r)),atM:r}}},compute:()=>d(async()=>{const{SkyLantern:n}=await import("./SkyLantern-DJT_Ibzh.js");return{SkyLantern:n}},__vite__mapDeps([0,1]),import.meta.url).then(({SkyLantern:n})=>(t,e)=>n.bodiesOf(t,e?.obstacles)),editor:()=>d(async()=>{const{LanternEditor:n}=await import("./LanternEditor-BapUZdog.js");return{LanternEditor:n}},__vite__mapDeps([2,3,4,5,0,1,6,7,8]),import.meta.url).then(({LanternEditor:n})=>(t,e,r)=>new n(t,e,r))},Sn=T.catalog({en:()=>d(()=>import("./BirdKindMessages_en-c_-L7frF.js"),[],import.meta.url).then(n=>n.birdKindMessages_en),fr:()=>d(()=>import("./BirdKindMessages_fr-C1TuqqEj.js"),[],import.meta.url).then(n=>n.birdKindMessages_fr),es:()=>d(()=>import("./BirdKindMessages_es-8Zo2t0o4.js"),[],import.meta.url).then(n=>n.birdKindMessages_es),it:()=>d(()=>import("./BirdKindMessages_it-DQZcrCkf.js"),[],import.meta.url).then(n=>n.birdKindMessages_it)}),ze={key:"birds",messages:Sn,phenomenon:()=>"Birds",compute:()=>d(async()=>{const{BirdFlock:n}=await import("./BirdFlock-ByBkJV35.js").then(t=>t.b);return{BirdFlock:n}},__vite__mapDeps([9,1]),import.meta.url).then(({BirdFlock:n})=>(t,e)=>n.bodiesOf(t,e?.obstacles)),editor:()=>d(async()=>{const{BirdEditor:n}=await import("./BirdEditor-Dk3huwHa.js");return{BirdEditor:n}},__vite__mapDeps([10,3,4,5,9,1,8,11]),import.meta.url).then(({BirdEditor:n})=>(t,e,r)=>new n(t,e,r))},xn=T.catalog({en:()=>d(()=>import("./DroneKindMessages_en-CLygXcsv.js"),[],import.meta.url).then(n=>n.droneKindMessages_en),fr:()=>d(()=>import("./DroneKindMessages_fr-CAX15_pk.js"),[],import.meta.url).then(n=>n.droneKindMessages_fr),es:()=>d(()=>import("./DroneKindMessages_es-B9XFRYnQ.js"),[],import.meta.url).then(n=>n.droneKindMessages_es),it:()=>d(()=>import("./DroneKindMessages_it-CSGsCaJQ.js"),[],import.meta.url).then(n=>n.droneKindMessages_it)}),qe={quadcopter:"ConsumerDrone",saucer:"ConsumerDrone","fixed-wing":"MilitaryDrone"},We={key:"drones",messages:xn,phenomenon:n=>qe[n.airframe]??qe.quadcopter,compute:()=>d(async()=>{const{DroneFlight:n}=await import("./DroneFlight-CGNIh9XS.js").then(t=>t.c);return{DroneFlight:n}},__vite__mapDeps([12,13]),import.meta.url).then(({DroneFlight:n})=>t=>n.bodiesOf(t)),editor:()=>d(async()=>{const{DroneEditor:n}=await import("./DroneEditor-D60uhSHO.js");return{DroneEditor:n}},__vite__mapDeps([14,3,4,5,15,12,13,8,11]),import.meta.url).then(({DroneEditor:n})=>(t,e,r)=>new n(t,e,r))},Mn=T.catalog({en:()=>d(()=>import("./BalloonKindMessages_en-C6tZ-5gT.js"),[],import.meta.url).then(n=>n.balloonKindMessages_en),fr:()=>d(()=>import("./BalloonKindMessages_fr-C3QJIuDJ.js"),[],import.meta.url).then(n=>n.balloonKindMessages_fr),es:()=>d(()=>import("./BalloonKindMessages_es-BfoEjhe1.js"),[],import.meta.url).then(n=>n.balloonKindMessages_es),it:()=>d(()=>import("./BalloonKindMessages_it-CkO7mqHp.js"),[],import.meta.url).then(n=>n.balloonKindMessages_it)}),zs=["round","star","heart","figure"];class ae{static HELIUM_KG_MOL=.0040026;static ALL=[{id:"hot-air",modelId:"ufoathome-balloon-hot-air",envelope:"open",launchVolumeM3:2550,maxVolumeM3:2550,massKg:540,dragCoefficient:.5,aspect:1.461,widthM:16.5,color:"#c8202f",stripeColor:"#f5c400",albedo:.4,burner:{heatingKS:1.2,coolingS:400,blastS:6,maxExcessK:100,flameCdM2:2e4,envelopeCdM2:40,color:"#ffb347"},phenomenon:"WeatherBalloonsOrMongolfieres",durationS:3600},{id:"party",modelId:"ufoathome-balloon-latex",envelope:"elastic",launchVolumeM3:.0115,maxVolumeM3:.0335,massKg:.0045,dragCoefficient:.47,aspect:1.13,color:"#d8263a",albedo:.35,phenomenon:"WeatherBalloonsOrMongolfieres",durationS:3600},{id:"led",modelId:"ufoathome-balloon-led",envelope:"elastic",launchVolumeM3:.0141,maxVolumeM3:.041,massKg:.0075,dragCoefficient:.47,aspect:1.115,color:"#ffffff",albedo:.5,glow:{candela:.5,color:"#ffffff"},phenomenon:"LedBalloon",durationS:3600},{id:"foil",modelId:"ufoathome-balloon-foil",envelope:"vented",launchVolumeM3:.014,maxVolumeM3:.014,massKg:.01,dragCoefficient:.6,aspect:1.034,widthM:.45,depthRatio:.267,color:"#c9cdd2",albedo:.85,finish:"mirror",spins:!0,shapes:{round:{modelId:"ufoathome-balloon-foil",aspect:1.034,widthM:.45,depthRatio:.267,launchVolumeM3:.014,maxVolumeM3:.014,massKg:.01,color:"#c9cdd2"},star:{modelId:"ufoathome-balloon-foil-star",aspect:1.029,widthM:.5,depthRatio:.183,launchVolumeM3:.012,maxVolumeM3:.012,massKg:.009,color:"#e0b83a"},heart:{modelId:"ufoathome-balloon-foil-heart",aspect:.903,widthM:.5,depthRatio:.2,launchVolumeM3:.014,maxVolumeM3:.014,massKg:.01,color:"#d81e3c"},figure:{modelId:"ufoathome-balloon-foil-figure",aspect:1.112,widthM:.8,depthRatio:.127,launchVolumeM3:.05,maxVolumeM3:.05,massKg:.03,color:"#f0a3c8"}},phenomenon:"FoilBalloon",durationS:3600},{id:"pilot",modelId:"ufoathome-balloon-latex",envelope:"elastic",launchVolumeM3:.144,maxVolumeM3:.57,massKg:.045,dragCoefficient:.4,aspect:1.13,color:"#f0e6cf",albedo:.55,lamp:{candela:1,color:"#fff1c4"},phenomenon:"WeatherBalloonsOrMongolfieres",durationS:5400},{id:"weather",modelId:"ufoathome-balloon-latex",envelope:"elastic",launchVolumeM3:1.75,maxVolumeM3:118.9,massKg:.85,dragCoefficient:.3,aspect:1.13,color:"#f2ece0",albedo:.55,phenomenon:"WeatherBalloonsOrMongolfieres",durationS:7200},{id:"stratospheric",modelId:"ufoathome-balloon-stratospheric",envelope:"vented",launchVolumeM3:219,maxVolumeM3:14e3,massKg:210,dragCoefficient:.4,aspect:.91,color:"#e9eef2",albedo:.8,ballastKg:20,phenomenon:"StratosphericBalloons",durationS:10800},{id:"stratospheric-large",modelId:"ufoathome-balloon-stratospheric",envelope:"vented",launchVolumeM3:730,maxVolumeM3:15e4,massKg:700,dragCoefficient:.4,aspect:.91,color:"#e9eef2",albedo:.8,ballastKg:140,phenomenon:"StratosphericBalloons",durationS:14400},{id:"superpressure",modelId:"ufoathome-balloon-latex",envelope:"superpressure",launchVolumeM3:45,maxVolumeM3:523,massKg:44,dragCoefficient:.4,aspect:1.13,color:"#eef1f4",albedo:.8,phenomenon:"StratosphericBalloons",durationS:10800},{id:"infrared",modelId:"ufoathome-balloon-stratospheric",envelope:"open",launchVolumeM3:2075,maxVolumeM3:45e3,massKg:150,dragCoefficient:.4,aspect:.91,color:"#9aa0a8",albedo:.4,insideExcessK:20,phenomenon:"StratosphericBalloons",durationS:10800},{id:"prank-candles",modelId:"ufoathome-balloon-prank",envelope:"open",launchVolumeM3:.25,maxVolumeM3:.25,massKg:.02,dragCoefficient:.6,aspect:1.515,widthM:.6,color:"#f4f4f4",albedo:.6,insideExcessK:60,spins:!0,sways:!0,flames:{count:4,candela:.5,color:"#ffb347",burnS:720,coolingS:15},phenomenon:"SkyLantern",durationS:1200},{id:"prank-flares",modelId:"ufoathome-balloon-prank",envelope:"open",launchVolumeM3:2,maxVolumeM3:2,massKg:.3,dragCoefficient:.6,aspect:1.515,widthM:1.2,color:"#2b2d30",albedo:.1,insideExcessK:80,spins:!0,sways:!0,flames:{count:1,candela:150,color:"#ff3a20",burnS:900,coolingS:30},phenomenon:"SkyLantern",durationS:1500},{id:"anti-hail",modelId:"ufoathome-balloon-latex",envelope:"elastic",launchVolumeM3:.65,maxVolumeM3:8,massKg:.4,dragCoefficient:.35,aspect:1.13,color:"#f2ece0",albedo:.55,torch:{aboveM:600,candela:300,color:"#ff9a3c",burnS:90,fallMS:4},phenomenon:"ParachuteFlare",durationS:1200},{id:"solar",modelId:"ufoathome-balloon-latex",envelope:"open",launchVolumeM3:14,maxVolumeM3:14,massKg:.4,dragCoefficient:.47,aspect:1.13,color:"#151515",albedo:.05,insideExcessK:10,phenomenon:"WeatherBalloonsOrMongolfieres",durationS:3600},{id:"captive",modelId:"ufoathome-balloon-latex",envelope:"sealed",tethered:!0,launchVolumeM3:14,maxVolumeM3:14,massKg:8,dragCoefficient:.47,aspect:1.13,color:"#f4f4f4",albedo:.7,phenomenon:"WeatherBalloonsOrMongolfieres",durationS:3600}];static byId(t){return ae.ALL.find(e=>e.id===t)}}const Ye=K.rounded,Xe={key:"balloons",messages:Mn,phenomenon:n=>{const t=typeof n.balloon=="string"?n.balloon:n.balloon?.id;return(ae.byId(t)??ae.ALL[0]).phenomenon},inWind:(n,t)=>{const e=n.site.altitudeM??0;return{...n,wind:Ye(t.at(10)),windsAloft:t.levels.filter(r=>r>e+10).map(r=>({...Ye(t.at(r)),atM:Math.round(r-e)}))}},compute:()=>d(async()=>{const{BalloonFlight:n}=await import("./BalloonFlight-CztT6ddg.js");return{BalloonFlight:n}},[],import.meta.url).then(({BalloonFlight:n})=>t=>n.bodiesOf(t)),editor:()=>d(async()=>{const{BalloonEditor:n}=await import("./BalloonEditor-dCIjTsIz.js");return{BalloonEditor:n}},__vite__mapDeps([16,3,4,5,15,12,13,17,6,7,8]),import.meta.url).then(({BalloonEditor:n})=>(t,e,r)=>new n(t,e,r))},vn=T.catalog({en:()=>d(()=>import("./AirshipKindMessages_en-DzGapVTV.js"),[],import.meta.url).then(n=>n.airshipKindMessages_en),fr:()=>d(()=>import("./AirshipKindMessages_fr-BTXNsW5W.js"),[],import.meta.url).then(n=>n.airshipKindMessages_fr),es:()=>d(()=>import("./AirshipKindMessages_es-TE93uMSC.js"),[],import.meta.url).then(n=>n.airshipKindMessages_es),it:()=>d(()=>import("./AirshipKindMessages_it-Cwa3MnJ-.js"),[],import.meta.url).then(n=>n.airshipKindMessages_it)}),oe=(n,t,e,r=5)=>({"nav-left":{color:"#ff2a1a",candela:r,leds:[{at:n,radiusM:.06}]},"nav-right":{color:"#2aff5a",candela:r,leds:[{at:t,radiusM:.06}]},tail:{color:"#ffffff",candela:r,leds:[{at:e,radiusM:.06}]}});class ue{static ALL=[{id:"blimp",modelId:"ufoathome-airship-blimp",sizeM:{widthM:14.72,lengthM:59.46,heightM:17.59},cruiseMS:15,maxSpeedMS:22,color:"#c9ccd1",finColor:"#1d3f8a",albedo:.6,sign:{color:"#fff4d8",luminanceCdM2:150,lit:!0},lights:{...oe([-1.22,-8.6,-9],[1.22,-8.6,-9],[0,0,29.7]),strobe:{color:"#ffffff",candela:400,hz:1,flashS:.06,leds:[{at:[0,-10.15,-9],radiusM:.08}]}},sound:"light-piston",phenomenon:"Airship"},{id:"zeppelin-nt",modelId:"ufoathome-airship-zeppelin-nt",sizeM:{widthM:18.2,lengthM:75.11,heightM:19.55},cruiseMS:19,maxSpeedMS:35,color:"#eef0f2",finColor:"#eef0f2",albedo:.75,sign:{color:"#fff4d8",luminanceCdM2:150,lit:!1},lights:{...oe([-1.32,-8.4,-14],[1.32,-8.4,-14],[0,0,37.5]),strobe:{color:"#ffffff",candela:400,hz:1,flashS:.06,leds:[{at:[0,-9.65,-14],radiusM:.08}]}},sound:"light-piston",phenomenon:"Airship"},{id:"lightship",modelId:"ufoathome-airship-lightship",sizeM:{widthM:10.16,lengthM:39.66,heightM:11.98},cruiseMS:13,maxSpeedMS:20,color:"#f4f4f2",finColor:"#f4f4f2",albedo:.7,glowCdM2:20,lights:oe([-.82,-5.9,-6],[.82,-5.9,-6],[0,0,19.8]),sound:"light-piston",phenomenon:"Airship"},{id:"aerostat",modelId:"ufoathome-airship-aerostat",sizeM:{widthM:25.14,lengthM:63.6,heightM:27.05},cruiseMS:0,maxSpeedMS:0,tethered:!0,color:"#f2f2f0",finColor:"#f2f2f0",albedo:.7,lights:{nose:{color:"#ff2a1a",candela:2e3,hz:.5,flashS:.6,leds:[{at:[0,-4.2,-30],radiusM:.12}]},stern:{color:"#ff2a1a",candela:2e3,hz:.5,flashS:.6,leds:[{at:[0,-6.3,22],radiusM:.12}]}},phenomenon:"Airship"},{id:"rigid",modelId:"ufoathome-airship-rigid",sizeM:{widthM:33.38,lengthM:236.66,heightM:35.79},cruiseMS:32,maxSpeedMS:36,color:"#b9bcbf",finColor:"#b9bcbf",albedo:.55,lights:oe([-3.02,-16.5,-80],[3.02,-16.5,-80],[0,0,118.3],10),sound:"piston-heavy",phenomenon:"Airship"}];static byId(t){return ue.ALL.find(e=>e.id===t)}}const Je={key:"airships",messages:vn,phenomenon:n=>{const t=typeof n.airship=="string"?n.airship:n.airship?.id;return(ue.byId(t)??ue.ALL[0]).phenomenon},compute:()=>d(async()=>{const{AirshipFlight:n}=await import("./AirshipFlight-Dzpw8HRM.js");return{AirshipFlight:n}},__vite__mapDeps([18,12,13]),import.meta.url).then(({AirshipFlight:n})=>t=>n.bodiesOf(t)),editor:()=>d(async()=>{const{AirshipEditor:n}=await import("./AirshipEditor-CBSrQM3J.js");return{AirshipEditor:n}},__vite__mapDeps([19,3,4,5,15,12,13,18,8,11]),import.meta.url).then(({AirshipEditor:n})=>(t,e,r)=>new n(t,e,r))},Yr=v.point("interpretations").provide(v.BUILT_IN,[{id:He.key,name:"Decoy flares",credit:"UFO@home",creditUrl:"https://ufoathome.org/docs/format/",create:()=>He},{id:Ke.key,name:"Sky lanterns",credit:"UFO@home",creditUrl:"https://ufoathome.org/docs/format/",create:()=>Ke},{id:ze.key,name:"Birds",credit:"UFO@home",creditUrl:"https://ufoathome.org/docs/format/",create:()=>ze},{id:We.key,name:"Drones",credit:"UFO@home",creditUrl:"https://ufoathome.org/docs/format/",create:()=>We},{id:Xe.key,name:"Balloons",credit:"UFO@home",creditUrl:"https://ufoathome.org/docs/format/",create:()=>Xe},{id:Je.key,name:"Airships",credit:"UFO@home",creditUrl:"https://ufoathome.org/docs/format/",create:()=>Je}]);class Ge{static kinds(){return Yr.map(t=>N.of(t))}}const qs=Object.freeze(Object.defineProperty({__proto__:null,INTERPRETATION_SOURCES:Yr,InterpretationRegistry:Ge},Symbol.toStringTag,{value:"Module"}));class H{static SIGHTING_EVENT="sighting";static INTERPRETATION_EVENT="interpretation";static INTERVIEW_EVENT="interview";static check(t){return ct.check(t,"case")}static isCase(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)&&Array.isArray(t.events)&&!("timeline"in t)}static sightingUrls(t,e){return(t.events??[]).filter(r=>r.eventType===H.SIGHTING_EVENT&&!r.interpretationOf&&typeof r.url=="string"&&r.url!=="").map(r=>new URL(r.url,e).href)}static accountIds(t,e,r,s){const o=(t.events??[]).filter(i=>i.eventType===H.SIGHTING_EVENT&&i.id!==void 0&&typeof i.url=="string"&&r!==void 0&&new URL(i.url,e).href===r).map(i=>i.id);return s!==void 0&&o.push(s),o}static interpretationEvents(t,e){const r=[e].flat().filter(s=>!!s);return r.length===0?[]:(t.events??[]).filter(s=>s.eventType===H.INTERPRETATION_EVENT?s.sighting!==void 0&&r.includes(s.sighting):s.eventType!==H.SIGHTING_EVENT||s.interpretationOf===void 0?!1:[s.interpretationOf].flat().some(o=>r.includes(o))).map(s=>s)}static problems(t,e){const r=t.events??[],s=new Set,o=new Set;for(const a of r)a.id!==void 0&&(s.has(a.id)&&o.add(a.id),s.add(a.id));const i=[];for(const a of r){const l=a.eventType===H.SIGHTING_EVENT?a.interpretationOf:a.eventType===H.INTERVIEW_EVENT?a.interviewOf:void 0;if(l!==void 0)for(const c of[l].flat())!s.has(c)&&!e.includes(c)&&i.push({reading:a.url??a.id??"",reference:c})}return{duplicateIds:[...o],unresolved:i}}static async interpretationOf(t,e,r){if(t.bodies)return H.withModelsFrom(j.strip({title:t.title,bodies:t.bodies??[],smoke:t.smoke,findings:t.findings,...N.computedPart(t,Ge.kinds())}).recording,e);if(!t.url)return{title:t.title,bodies:[]};const s=new URL(t.url,e).href,o=await r(s),i="timeline"in o&&o.interpretation?o.interpretation:o;return H.withModelsFrom(j.strip({title:t.title??i.title,bodies:i.bodies??[],smoke:i.smoke,findings:i.findings,...N.computedPart(i,Ge.kinds())}).recording,s)}static withModelsFrom(t,e){return{...t,bodies:t.bodies.map(r=>r.model?.url?{...r,model:{...r.model,url:new URL(r.model.url,e).href}}:r)}}}class k{static files=new Map;static hold(t){for(const[e,r]of t)k.files.set(k.key(e),r)}static releaseCopies(){for(const[t,e]of k.files)e.local||k.files.delete(t)}static clear(){k.files.clear()}static localBase(){return new URL(`local/${Date.now().toString(36)}${Math.random().toString(36).slice(2,6)}/`,location.href).href}static read(t){const e=k.files.get(k.key(t));return e===void 0?void 0:structuredClone(e.json)}static changed(...t){return t.some(e=>e!==void 0&&k.files.get(k.key(e))?.changed===!0)}static local(t){return t!==void 0&&k.files.get(k.key(t))?.local===!0}static key(t){const e=new URL(t,location.href);return e.hash="",e.href}}class q{static NAMES=["weather","place","lightPollution","decor"];static KEYS={weather:["weatherTrack","weatherSource"],place:["place"],lightPollution:["lightPollution"],decor:["decor"]};static annexName(t,e){return`${t}.${e.replace(/[A-Z]/g,r=>`-${r.toLowerCase()}`)}.json`}static taken(t,e){const r={};if(t==="decor")return Array.isArray(e.decor)&&(r.decor=e.decor.filter(q.surveyed)),r;for(const s of q.KEYS[t])e[s]!==void 0&&(r[s]=e[s]);return r}static strip(t,e){if(t==="decor"){const r=Array.isArray(e.decor)?e.decor.filter(s=>!q.surveyed(s)):[];r.length>0?e.decor=r:delete e.decor;return}for(const r of q.KEYS[t])delete e[r]}static put(t,e,r){if(t==="decor"){if(!Array.isArray(r.decor))return;const s=Array.isArray(e.decor)?e.decor.filter(o=>!q.surveyed(o)):[];e.decor=[...s,...r.decor];return}for(const s of q.KEYS[t])r[s]!==void 0&&(e[s]=r[s])}static surveyed(t){return typeof t=="object"&&t!==null&&typeof t.origin=="string"}static fromFile(t,e){return t?.[e]!==void 0&&t[e].live!==!0}}class Xr{static NAMES=["relief","imagery","roads","water","railways","upperAir","map"];static TERRAIN=["relief","imagery","roads","water","railways"];static held(t,e){if(!t||t.live)return;const r=t[e];return r&&!r.live&&!r.refresh&&r.src!==void 0?r:void 0}static isLive(t,e){return t?.live===!0||t?.[e]?.live===!0}static annexName(t,e){const r=e==="relief"||e==="imagery"||e==="map"?"zip":"json",s=e.replace(/[A-Z]/g,o=>`-${o.toLowerCase()}`);return`${t}.${s}.${r}`}static isEmpty(t){return!t||!t.live&&Xr.NAMES.every(e=>!t[e])&&q.NAMES.every(e=>!t[e])}}class xt extends Error{constructor(t,e,r){super(`${t}: ${e}${r===void 0?"":` (HTTP ${r})`}`),this.kind=t,this.url=e,this.status=r,this.name="SightingFetchError"}}class ce{static async recording(t){const e=k.read(t);if(e!==void 0)return e;const r=await ce.json(t);for(const s of q.NAMES){const o=r?.snapshots?.[s];if(!(!o?.src||o.live))try{const i=ct.recording(await ce.json(new URL(o.src,new URL(t,location.href)).href));q.put(s,r,i)}catch{}}return r}static async json(t){const e=new URL(t,location.href),r=k.read(e.href);if(r!==void 0)return r;if(location.protocol==="https:"&&e.protocol==="http:")throw new xt("mixed-content",t);let s;try{s=await fetch(t)}catch{throw await this.diagnose(t,e)}if(!s.ok)throw new xt("status",t,s.status);try{return await s.json()}catch{throw new xt("malformed",t)}}static async diagnose(t,e){if(e.origin===location.origin)return new xt("unreachable",t);try{return await fetch(t,{mode:"no-cors"}),new xt("cors",t)}catch{return new xt("unreachable",t)}}}class Ve{constructor(t,e,r=()=>{}){this.place=t,this.changed=r,e&&this.adopt(e)}reader;editor;handed;get reading(){return this.reader!==void 0}get editorLoaded(){return this.editor!==void 0}adopt(t){this.editor=t,t.switcher=this,t.hasAttribute(ge)||t.setAttribute(ge,""),t.addEventListener(mn,e=>{e.preventDefault();const r=e.detail;this.handed=r.src,this.read(r)})}async read({src:t,track:e}){const[{register:r,CASE_ELEMENT_NAME:s,OPEN_EVENTS_ATTRIBUTE:o},{registerSighting:i,SIGHTING_ELEMENT_NAME:a}]=await Promise.all([d(()=>import("./CaseElement-CIZvyRVi.js"),__vite__mapDeps([20,21,22,6,7,23,3,4,13,24,25,1,26]),import.meta.url),d(()=>import("./SightingElement-BveOM4nF.js"),__vite__mapDeps([26,22,6,7,23,3,4,13,24,25,1]),import.meta.url)]);i(),r();const l=H.isCase(k.read(t)??await ce.json(t)),c=document.createElement(l?s:a);c.setAttribute(ge,""),c.setAttribute("show-labels",""),l&&e&&c.setAttribute(o,Ve.fileKey(e)),c.setAttribute("src",t),c.addEventListener(pn,m=>{m.preventDefault(),this.edit(m.detail)}),this.reader?.remove(),this.place(c),this.editor&&(this.editor.hidden=!0),this.reader=c,this.changed({mode:"read",src:t,...e?{track:e}:{}})}async edit(t){const e=this.editor;if(e){if(this.dropReader(),k.releaseCopies(),e.hidden=!1,this.changed({mode:"edit"}),t?.src!==void 0&&t.src!==this.handed){this.load(e,t.src,t.track);return}t?.track&&await e.openTrack(t.track);return}const{register:r,CASE_EDITOR_ELEMENT_NAME:s}=await d(async()=>{const{register:i,CASE_EDITOR_ELEMENT_NAME:a}=await import("./CaseEditorElement-C5BHP8jT.js").then(l=>l.b);return{register:i,CASE_EDITOR_ELEMENT_NAME:a}},__vite__mapDeps([27,3,4,8,21,22,6,7,23,13,24,25,1,11,28,29,30,31]),import.meta.url);r();const o=document.createElement(s);this.adopt(o),t?.track&&o.setAttribute("track",t.track),t?.src?o.setAttribute("src",t.src):t?.start&&(o.caseStart=t.start),this.dropReader(),this.place(o),this.changed({mode:"edit"})}async open(t){const e=this.editor;if(this.reading||!e)return this.read({src:t});this.load(e,t)}load(t,e,r){this.handed=void 0,r?t.setAttribute("track",r):t.removeAttribute("track"),t.setAttribute("src",e)}async startNew(t){const e=this.editor;if(!e)return this.edit(t?{start:t}:void 0);this.reading&&await this.edit(),e.askBeforeReplacing(()=>{e.remove(),this.editor=void 0,this.edit(t?{start:t}:void 0)})}dropReader(){this.reader?.remove(),this.reader=void 0}static fileKey(t){return new URL(t,location.href).pathname.split("/").pop().replace(/\.json$/i,"")}}const Ie="rr0-input-file",Jr={inputFileFromFile:"from your disk",inputFileFromUrl:"from an address",inputFileModeHint:"Click to give it the other way: a file of yours, or an address",inputFileLoad:"Load"},An=`
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./SkyLantern-DJT_Ibzh.js","./Obstacles-v9SkfBD7.js","./LanternEditor-BapUZdog.js","./SaidPosition-OJEYhVKN.js","./GeoProjection-DvqDbRIx.js","./SkyEventEditorStyle-CvY_AhbI.js","./Sighting-B7bsiTIQ.js","./VisualAids-DI-hEL46.js","./ParameterForm-XbqxCLRn.js","./BirdFlock-ByBkJV35.js","./BirdEditor-Dk3huwHa.js","./TimelineTracks-Daaqw9ly.js","./DroneFlight-CGNIh9XS.js","./Decor-Dn-cvniW.js","./DroneEditor-D60uhSHO.js","./DroneParameters-CfTAaLCT.js","./BalloonEditor-dCIjTsIz.js","./BalloonFlight-CztT6ddg.js","./AirshipFlight-Dzpw8HRM.js","./AirshipEditor-CBSrQM3J.js","./CaseElement-CRXPyMMR.js","./ColumnResize-DV-byvDt.js","./ShareDialogElement-Dlfy9NCE.js","./three.module-CbaHqYFq.js","./RecordingIssue-BlWT8Xsu.js","./xyzImageryRaster-Dhxs0B26.js","./SightingElement-BJSNmFM6.js","./CaseEditorElement-0J_TCeiq.js","./InterviewAttachments-BP6Prvdu.js","./ReentryArchive-CeXHrU7L.js","./ReferenceTimeline-2kBldQeG.js","./upperAirSources-BU0pD84c.js","./Account-C4jhsVtN.js","./UfoMessages_en-D5OYWJ3K.js","./SightingEditorMessages_en-k7_ua2OM.js","./SightingLabels_en-oIpytoq_.js","./SightingEditorMessages_fr-B_K5hsuV.js","./SightingLabels_fr-D69zENbW.js","./SightingEditorMessages_es-Drqbbr5_.js","./SightingLabels_es-DUh1CTXl.js","./SightingEditorMessages_it-QCLg1d7x.js","./SightingLabels_it-COLZ2Qth.js","./SightingMessages_en-CzICxNU3.js","./SightingMessages_fr-nopOVDa1.js","./SightingMessages_es-CiVFZlgA.js","./SightingMessages_it-Cu0nnPts.js","./SceneNames_en-7OZ7peGc.js","./SceneNames_fr-qzw0QzD0.js","./SceneNames_es-P5-Mavdi.js","./SceneNames_it-Sqf8JFOd.js","./ModuleSession-BKDWGSEo.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
const dn="modulepreload",ln=function(n,t){return new URL(n,t).href},je={},d=function(t,e,r){let s=Promise.resolve();if(e&&e.length>0){let i=function(m){return Promise.all(m.map(p=>Promise.resolve(p).then(w=>({status:"fulfilled",value:w}),w=>({status:"rejected",reason:w}))))};const a=document.getElementsByTagName("link"),l=document.querySelector("meta[property=csp-nonce]"),c=l?.nonce||l?.getAttribute("nonce");s=i(e.map(m=>{if(m=ln(m,r),m in je)return;je[m]=!0;const p=m.endsWith(".css"),w=p?'[rel="stylesheet"]':"";if(!!r)for(let S=a.length-1;S>=0;S--){const D=a[S];if(D.href===m&&(!p||D.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${m}"]${w}`))return;const _=document.createElement("link");if(_.rel=p?"stylesheet":dn,p||(_.as="script"),_.crossOrigin="",_.href=m,c&&_.setAttribute("nonce",c),document.head.appendChild(_),p)return new Promise((S,D)=>{_.addEventListener("load",S),_.addEventListener("error",()=>D(new Error(`Unable to preload CSS for ${m}`)))})}))}function o(i){const a=new Event("vite:preloadError",{cancelable:!0});if(a.payload=i,window.dispatchEvent(a),!a.defaultPrevented)throw i}return s.then(i=>{for(const a of i||[])a.status==="rejected"&&o(a.reason);return t().catch(o)})},mn="rr0-read",hn="rr0-edit",ge="in-place",pn="rr0-mode";class Hs{static ask(t,e,r){const s=new CustomEvent(e,{detail:r,bubbles:!0,composed:!0,cancelable:!0});return t.dispatchEvent(s),s.defaultPrevented}}class j{constructor(t){this.entries=t}static free(t){return t?.basis==="assumed"||t?.basis==="fitted"}static empty(){return new j(new Map)}get size(){return this.entries.size}at(t){return this.entries.get(t)}paths(){return[...this.entries.keys()]}sourced(){return[...this.entries].filter(([,t])=>t.source!==void 0).map(([t,e])=>({path:t,basis:e.basis,source:e.source}))}interviewsCited(){const t=[];for(const{source:e}of this.sourced()){const r=e.said?.interview;r!==void 0&&!t.includes(r)&&t.push(r)}return t}pathsFromInterview(t){return this.sourced().filter(({source:e})=>e.said!==void 0&&e.said.interview===t).map(({path:e})=>e)}set(t,e){e.basis==="stated"&&e.rationale===void 0&&e.how===void 0&&e.range===void 0&&e.source===void 0?this.entries.delete(t):this.entries.set(t,e)}clear(t){for(const e of this.entries.keys())(e===t||e.startsWith(`${t}.`))&&this.entries.delete(e)}static strip(t){const e=new j(new Map);return{recording:j.stripValue(t,[],e),provenance:e}}static restore(t,e){if(e.size===0)return t;const r={...t},s=new Set([r]);for(const o of e.paths()){const i=e.at(o),a=o.split("."),l=j.writableHolderOf(r,a,s);if(!l)continue;const c=a[a.length-1],m=l[c];m!==void 0&&(i.of!==void 0&&JSON.stringify(i.of)!==JSON.stringify(m)||(l[c]={value:m,...i.basis==="stated"?{}:{basis:i.basis},...i.rationale===void 0?{}:{rationale:i.rationale},...i.how===void 0?{}:{how:i.how},...i.range===void 0?{}:{range:i.range},...i.source===void 0?{}:{source:i.source}}))}return r}static isWrapper(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)&&"value"in t}static stripValue(t,e,r){return j.isWrapper(t)?(r.set(e.join("."),{basis:t.basis??"stated",...t.rationale===void 0?{}:{rationale:t.rationale},...t.how===void 0?{}:{how:t.how},...t.range===void 0?{}:{range:t.range},...t.source===void 0?{}:{source:t.source},of:t.value}),j.stripValue(t.value,e,r)):Array.isArray(t)?t.map((s,o)=>j.stripValue(s,[...e,String(o)],r)):typeof t=="object"&&t!==null?Object.fromEntries(Object.entries(t).map(([s,o])=>[s,j.stripValue(o,[...e,s],r)])):t}static writableHolderOf(t,e,r){let s=t;for(const o of e.slice(0,-1)){const i=s[o];if(typeof i!="object"||i===null)return;if(r.has(i)){s=i;continue}const a=Array.isArray(i)?[...i]:{...i};r.add(a),s[o]=a,s=a}return s}}class fn extends Error{constructor(t,e,r){super(typeof e=="number"&&Number.isInteger(e)&&e>=1?`This ${t} file is in version ${e} of its format; this UFO@home reads version ${r}. Read it with the UFO@home that reads its version.`:`This ${t} file states ${JSON.stringify(e)} as its format version, which is not a version.`),this.format=t,this.found=e,this.supported=r,this.name="FormatVersionError"}said(t){return t.replace("{found}",typeof this.found=="number"?String(this.found):JSON.stringify(this.found)).replace("{supported}",String(this.supported))}}class ct{static CURRENT={sighting:4,case:1,interview:1};static SCHEMA_BASE="https://ufoathome.org/schema";static schemaUrl(t,e=ct.CURRENT[t]){return`${ct.SCHEMA_BASE}/${e}/${t}.schema.json`}static of(t){if(typeof t!="object"||t===null)return 1;const e=t.version;return e===void 0?1:typeof e=="object"&&e!==null&&"value"in e?e.value:e}static recording(t){return ct.check(t,"sighting")}static check(t,e){const r=ct.of(t),s=ct.CURRENT[e];if(typeof r!="number"||!Number.isInteger(r)||r!==s)throw new fn(e,r,s);return t}}class N{static built=new WeakMap;static computers=new WeakMap;static loading=new WeakMap;static loaded(t,e){return e.every(r=>N.itemsOf(t,r.key).length===0||N.computers.has(r))}static load(t,e){return Promise.all(e.filter(r=>N.itemsOf(t,r.key).length>0&&!N.computers.has(r)).map(r=>{let s=N.loading.get(r);return s||(s=r.compute().then(o=>{N.computers.set(r,o)}),s.catch(()=>N.loading.delete(r)),N.loading.set(r,s)),s.catch(()=>{})})).then(()=>{})}static of(t){let e=N.built.get(t);return e||(e=t.create(),N.built.set(t,e)),e}static itemsOf(t,e){const r=t?.[e];return Array.isArray(r)?r:[]}static computes(t,e){return e.some(r=>N.itemsOf(t,r.key).length>0)}static expand(t,e,r){return N.expandWithKinds(t,e,r).interpretation}static expandWithKinds(t,e,r){const s=new Map,o=new Map;if(!t||!N.computes(t,e))return{interpretation:t,kindOf:s,phenomenonOf:o};const i=e.flatMap(a=>N.itemsOf(t,a.key).flatMap(l=>{const c=N.computers.get(a);if(!c)return[];const m=c(l,r),p=a.phenomenon?.(l);for(const w of m)s.set(w.id,a),p&&o.set(w.id,p);return m}));return{interpretation:{...t,bodies:[...t.bodies,...i]},kindOf:s,phenomenonOf:o}}static computedPart(t,e){const r={};for(const s of e){const o=N.itemsOf(t,s.key);o.length>0&&(r[s.key]=[...o])}return r}static saysNothing(t,e){return t.bodies.length===0&&t.title===void 0&&t.smoke===void 0&&e.every(r=>t[r.key]===void 0)}}const Ls=Object.freeze(Object.defineProperty({__proto__:null,InterpretationKinds:N},Symbol.toStringTag,{value:"Module"}));class Wr extends Error{constructor(t,e,r,s){super(`Module "${t}" gives "${r}" at ${e}, which module "${s}" already gives`),this.moduleId=t,this.point=e,this.sourceId=r,this.ownerId=s,this.name="ModuleConflictError"}}class gn{constructor(t){this.id=t}sources=[];owners=new Map;ownerOf(t){return this.owners.get(t)}conflict(t,e){for(const r of e){const s=this.owners.get(r.id);if(s!==void 0&&s!==t)return{sourceId:r.id,ownerId:s}}}provide(t,e){const r=this.conflict(t,e);if(r)throw new Wr(t,this.id,r.sourceId,r.ownerId);this.withdraw(t);const s=t===v.BUILT_IN?this.sources.findIndex(o=>this.owners.get(o.id)!==v.BUILT_IN):-1;s<0?this.sources.push(...e):this.sources.splice(s,0,...e);for(const o of e)this.owners.set(o.id,t);return this.sources}withdraw(t){for(let e=this.sources.length-1;e>=0;e--){const r=this.sources[e].id;this.owners.get(r)===t&&(this.sources.splice(e,1),this.owners.delete(r))}}}class v{static BUILT_IN="ufoathome";static changes=new EventTarget;static points=new Map;static modules=new Map;static point(t){let e=v.points.get(t);return e||(e=new gn(t),v.points.set(t,e)),e}static install(t){if(t.id===v.BUILT_IN)throw new Error(`"${v.BUILT_IN}" is the id of the built-in module`);const e=v.contributionsOf(t);for(const[o,i]of e){const a=v.point(o).conflict(t.id,i);if(a)throw new Wr(t.id,o,a.sourceId,a.ownerId)}const r=new Set(e.map(([o])=>o)),s=v.modules.get(t.id);if(s)for(const[o]of v.contributionsOf(s))r.add(o);for(const o of r)v.point(o).withdraw(t.id);for(const[o,i]of e)v.point(o).provide(t.id,i);v.modules.set(t.id,t);for(const o of r)v.announce(o)}static uninstall(t){const e=v.modules.get(t);if(e){v.modules.delete(t);for(const[r]of v.contributionsOf(e))v.point(r).withdraw(t),v.announce(r)}}static installed(){return[...v.modules.values()]}static contributionsOf(t){return Object.entries(t.contributes).filter(e=>Array.isArray(e[1])&&e[1].length>0)}static announce(t){v.changes.dispatchEvent(new CustomEvent("change",{detail:t}))}}const wn=["en","fr","es","it"];class T{static catalog(t){const e=new Map;return{load(r){const s=T.languageOf(r);let o=e.get(s);return o||(o=t[s](),e.set(s,o),o.catch(()=>e.delete(s))),o}}}static none(){return new Proxy({},{get:()=>""})}static blank(){const t=new Proxy(()=>t,{get:(e,r)=>r===Symbol.toPrimitive?()=>"":r===Symbol.iterator?function*(){}:r==="toString"||r==="valueOf"?()=>"":r==="then"?void 0:t,apply:()=>t,has:()=>!1,ownKeys:()=>[],getOwnPropertyDescriptor:()=>{}});return t}static languageOf(t){const e=t.toLowerCase().split("-")[0];return wn.includes(e)?e:"en"}}const bn=T.catalog({en:()=>d(()=>import("./FlareKindMessages_en-j3CY_TxX.js"),[],import.meta.url).then(n=>n.flareKindMessages_en),fr:()=>d(()=>import("./FlareKindMessages_fr-B2MezoN2.js"),[],import.meta.url).then(n=>n.flareKindMessages_fr),es:()=>d(()=>import("./FlareKindMessages_es-CZgrFIOO.js"),[],import.meta.url).then(n=>n.flareKindMessages_es),it:()=>d(()=>import("./FlareKindMessages_it-CmZmb3RP.js"),[],import.meta.url).then(n=>n.flareKindMessages_it)});class J{constructor(t={}){this.options=t,this.fetchImpl=t.fetchImpl??fetch.bind(globalThis),this.wait=t.wait??(e=>new Promise(r=>setTimeout(r,e)))}static URL="https://historical-forecast-api.open-meteo.com/v1/forecast";static CREDIT="Open-Meteo historical forecast";static LEVELS=[850,700,600,500,400,300];static RETRIES=6;static RETRY_MS=2e3;days=new Map;fetchImpl;wait;async profile(t,e,r){const o=new Date(Math.floor(r.getTime()/36e5)*36e5),i=(r.getTime()-o.getTime())/36e5,a=await this.hourly(t,e,o);if(i<1e-6)return a;const l=await this.hourly(t,e,new Date(o.getTime()+36e5));return a.levels.length!==l.levels.length?i<.5?a:l:{...a,hour:r.toISOString().slice(0,16),levels:a.levels.map((c,m)=>{const[p,w]=K.vector(c.wind),[b,_]=K.vector(l.levels[m].wind);return{aboveGroundM:c.aboveGroundM+i*(l.levels[m].aboveGroundM-c.aboveGroundM),wind:K.fromVector(p+i*(b-p),w+i*(_-w))}})}}async hourly(t,e,r){const s=r.toISOString().slice(0,13)+":00",o=s.slice(0,10),i=`${t.toFixed(4)},${e.toFixed(4)},${o}`;let a=this.days.get(i);return a||(a=this.day(t,e,o,i),a.catch(()=>this.days.delete(i)),this.days.set(i,a)),J.profileOf(await a,s)}static profileOf(t,e){const r=t.hourly,s=r.time.indexOf(e);if(s<0)throw new Error(`No wind for ${e} in the archive's answer`);const o=c=>(c+180)%360,i=[],a=r.wind_speed_10m?.[s],l=r.wind_direction_10m?.[s];typeof a=="number"&&typeof l=="number"&&i.push({aboveGroundM:10,wind:{towardDeg:o(l),speedMS:a}});for(const c of J.LEVELS){const m=r[`geopotential_height_${c}hPa`]?.[s],p=r[`wind_speed_${c}hPa`]?.[s],w=r[`wind_direction_${c}hPa`]?.[s];if(typeof m!="number"||typeof p!="number"||typeof w!="number")continue;const b=m-t.elevation;b<=(i[i.length-1]?.aboveGroundM??0)||i.push({aboveGroundM:b,wind:{towardDeg:o(w),speedMS:p}})}if(i.length===0)throw new Error(`No wind for ${e} in the archive's answer`);return{lat:t.latitude,lng:t.longitude,elevationM:t.elevation,hour:e,levels:i,credit:J.CREDIT}}async day(t,e,r,s){const o=await this.options.cache?.get(s);if(o)return JSON.parse(o);const i=["wind_speed_10m","wind_direction_10m",...J.LEVELS.flatMap(c=>[`wind_speed_${c}hPa`,`wind_direction_${c}hPa`,`geopotential_height_${c}hPa`])],a=new URLSearchParams({latitude:String(t),longitude:String(e),start_date:r,end_date:r,hourly:i.join(","),wind_speed_unit:"ms",timezone:"GMT"}),l=`${this.options.url??J.URL}?${a}`;for(let c=0;;c++){const m=await this.fetchImpl(l);if(m.ok){const p=await m.text();return await this.options.cache?.set(s,p),JSON.parse(p)}if((m.status===429||m.status>=500)&&c<J.RETRIES){await this.wait(J.RETRY_MS*2**c);continue}throw new Error(`The wind archive answered ${m.status} for ${s}`)}}}class K{static at(t,e){const r=t.levels;if(e<=r[0].aboveGroundM)return{...r[0].wind};for(let s=1;s<r.length;s++){const o=r[s-1],i=r[s];if(e<=i.aboveGroundM){const a=(e-o.aboveGroundM)/(i.aboveGroundM-o.aboveGroundM),[l,c]=K.vector(o.wind),[m,p]=K.vector(i.wind);return K.fromVector(l+a*(m-l),c+a*(p-c))}}return{...r[r.length-1].wind}}static vector(t){const e=t.towardDeg*Math.PI/180;return[t.speedMS*Math.sin(e),t.speedMS*Math.cos(e)]}static fromVector(t,e){return{towardDeg:(Math.atan2(t,e)*180/Math.PI+360)%360,speedMS:Math.hypot(t,e)}}static rounded(t){return{towardDeg:Math.round(t.towardDeg)%360,speedMS:Math.round(t.speedMS*100)/100}}}const Ks=Object.freeze(Object.defineProperty({__proto__:null,OpenMeteoWindProfiles:J,Winds:K},Symbol.toStringTag,{value:"Module"})),En=K.rounded,He={key:"flares",messages:bn,phenomenon:()=>"DecoyFlare",inWind:(n,t)=>({...n,wind:En(t.at(n.aircraft.altitudeM))}),compute:()=>d(async()=>{const{DecoyFlare:n}=await import("./DecoyFlare-DUt1_LcW.js");return{DecoyFlare:n}},[],import.meta.url).then(({DecoyFlare:n})=>t=>n.bodiesOf(t))},yn=T.catalog({en:()=>d(()=>import("./LanternKindMessages_en-CQXdJ-k6.js"),[],import.meta.url).then(n=>n.lanternKindMessages_en),fr:()=>d(()=>import("./LanternKindMessages_fr-D7tQa_tQ.js"),[],import.meta.url).then(n=>n.lanternKindMessages_fr),es:()=>d(()=>import("./LanternKindMessages_es-BOO6kPjs.js"),[],import.meta.url).then(n=>n.lanternKindMessages_es),it:()=>d(()=>import("./LanternKindMessages_it-B8J-29Mj.js"),[],import.meta.url).then(n=>n.lanternKindMessages_it)}),Le=K.rounded,Ke={key:"lanterns",messages:yn,phenomenon:()=>"SkyLantern",inWind:(n,t)=>{const e=n.site.altitudeM??0,r=n.windAloft?.atM??1e3;return{...n,wind:Le(t.at(10)),windAloft:{...Le(t.at(e+r)),atM:r}}},compute:()=>d(async()=>{const{SkyLantern:n}=await import("./SkyLantern-DJT_Ibzh.js");return{SkyLantern:n}},__vite__mapDeps([0,1]),import.meta.url).then(({SkyLantern:n})=>(t,e)=>n.bodiesOf(t,e?.obstacles)),editor:()=>d(async()=>{const{LanternEditor:n}=await import("./LanternEditor-BapUZdog.js");return{LanternEditor:n}},__vite__mapDeps([2,3,4,5,0,1,6,7,8]),import.meta.url).then(({LanternEditor:n})=>(t,e,r)=>new n(t,e,r))},Sn=T.catalog({en:()=>d(()=>import("./BirdKindMessages_en-c_-L7frF.js"),[],import.meta.url).then(n=>n.birdKindMessages_en),fr:()=>d(()=>import("./BirdKindMessages_fr-C1TuqqEj.js"),[],import.meta.url).then(n=>n.birdKindMessages_fr),es:()=>d(()=>import("./BirdKindMessages_es-8Zo2t0o4.js"),[],import.meta.url).then(n=>n.birdKindMessages_es),it:()=>d(()=>import("./BirdKindMessages_it-DQZcrCkf.js"),[],import.meta.url).then(n=>n.birdKindMessages_it)}),ze={key:"birds",messages:Sn,phenomenon:()=>"Birds",compute:()=>d(async()=>{const{BirdFlock:n}=await import("./BirdFlock-ByBkJV35.js").then(t=>t.b);return{BirdFlock:n}},__vite__mapDeps([9,1]),import.meta.url).then(({BirdFlock:n})=>(t,e)=>n.bodiesOf(t,e?.obstacles)),editor:()=>d(async()=>{const{BirdEditor:n}=await import("./BirdEditor-Dk3huwHa.js");return{BirdEditor:n}},__vite__mapDeps([10,3,4,5,9,1,8,11]),import.meta.url).then(({BirdEditor:n})=>(t,e,r)=>new n(t,e,r))},xn=T.catalog({en:()=>d(()=>import("./DroneKindMessages_en-CLygXcsv.js"),[],import.meta.url).then(n=>n.droneKindMessages_en),fr:()=>d(()=>import("./DroneKindMessages_fr-CAX15_pk.js"),[],import.meta.url).then(n=>n.droneKindMessages_fr),es:()=>d(()=>import("./DroneKindMessages_es-B9XFRYnQ.js"),[],import.meta.url).then(n=>n.droneKindMessages_es),it:()=>d(()=>import("./DroneKindMessages_it-CSGsCaJQ.js"),[],import.meta.url).then(n=>n.droneKindMessages_it)}),qe={quadcopter:"ConsumerDrone",saucer:"ConsumerDrone","fixed-wing":"MilitaryDrone"},We={key:"drones",messages:xn,phenomenon:n=>qe[n.airframe]??qe.quadcopter,compute:()=>d(async()=>{const{DroneFlight:n}=await import("./DroneFlight-CGNIh9XS.js").then(t=>t.c);return{DroneFlight:n}},__vite__mapDeps([12,13]),import.meta.url).then(({DroneFlight:n})=>t=>n.bodiesOf(t)),editor:()=>d(async()=>{const{DroneEditor:n}=await import("./DroneEditor-D60uhSHO.js");return{DroneEditor:n}},__vite__mapDeps([14,3,4,5,15,12,13,8,11]),import.meta.url).then(({DroneEditor:n})=>(t,e,r)=>new n(t,e,r))},Mn=T.catalog({en:()=>d(()=>import("./BalloonKindMessages_en-C6tZ-5gT.js"),[],import.meta.url).then(n=>n.balloonKindMessages_en),fr:()=>d(()=>import("./BalloonKindMessages_fr-C3QJIuDJ.js"),[],import.meta.url).then(n=>n.balloonKindMessages_fr),es:()=>d(()=>import("./BalloonKindMessages_es-BfoEjhe1.js"),[],import.meta.url).then(n=>n.balloonKindMessages_es),it:()=>d(()=>import("./BalloonKindMessages_it-CkO7mqHp.js"),[],import.meta.url).then(n=>n.balloonKindMessages_it)}),zs=["round","star","heart","figure"];class ae{static HELIUM_KG_MOL=.0040026;static ALL=[{id:"hot-air",modelId:"ufoathome-balloon-hot-air",envelope:"open",launchVolumeM3:2550,maxVolumeM3:2550,massKg:540,dragCoefficient:.5,aspect:1.461,widthM:16.5,color:"#c8202f",stripeColor:"#f5c400",albedo:.4,burner:{heatingKS:1.2,coolingS:400,blastS:6,maxExcessK:100,flameCdM2:2e4,envelopeCdM2:40,color:"#ffb347"},phenomenon:"WeatherBalloonsOrMongolfieres",durationS:3600},{id:"party",modelId:"ufoathome-balloon-latex",envelope:"elastic",launchVolumeM3:.0115,maxVolumeM3:.0335,massKg:.0045,dragCoefficient:.47,aspect:1.13,color:"#d8263a",albedo:.35,phenomenon:"WeatherBalloonsOrMongolfieres",durationS:3600},{id:"led",modelId:"ufoathome-balloon-led",envelope:"elastic",launchVolumeM3:.0141,maxVolumeM3:.041,massKg:.0075,dragCoefficient:.47,aspect:1.115,color:"#ffffff",albedo:.5,glow:{candela:.5,color:"#ffffff"},phenomenon:"LedBalloon",durationS:3600},{id:"foil",modelId:"ufoathome-balloon-foil",envelope:"vented",launchVolumeM3:.014,maxVolumeM3:.014,massKg:.01,dragCoefficient:.6,aspect:1.034,widthM:.45,depthRatio:.267,color:"#c9cdd2",albedo:.85,finish:"mirror",spins:!0,shapes:{round:{modelId:"ufoathome-balloon-foil",aspect:1.034,widthM:.45,depthRatio:.267,launchVolumeM3:.014,maxVolumeM3:.014,massKg:.01,color:"#c9cdd2"},star:{modelId:"ufoathome-balloon-foil-star",aspect:1.029,widthM:.5,depthRatio:.183,launchVolumeM3:.012,maxVolumeM3:.012,massKg:.009,color:"#e0b83a"},heart:{modelId:"ufoathome-balloon-foil-heart",aspect:.903,widthM:.5,depthRatio:.2,launchVolumeM3:.014,maxVolumeM3:.014,massKg:.01,color:"#d81e3c"},figure:{modelId:"ufoathome-balloon-foil-figure",aspect:1.112,widthM:.8,depthRatio:.127,launchVolumeM3:.05,maxVolumeM3:.05,massKg:.03,color:"#f0a3c8"}},phenomenon:"FoilBalloon",durationS:3600},{id:"pilot",modelId:"ufoathome-balloon-latex",envelope:"elastic",launchVolumeM3:.144,maxVolumeM3:.57,massKg:.045,dragCoefficient:.4,aspect:1.13,color:"#f0e6cf",albedo:.55,lamp:{candela:1,color:"#fff1c4"},phenomenon:"WeatherBalloonsOrMongolfieres",durationS:5400},{id:"weather",modelId:"ufoathome-balloon-latex",envelope:"elastic",launchVolumeM3:1.75,maxVolumeM3:118.9,massKg:.85,dragCoefficient:.3,aspect:1.13,color:"#f2ece0",albedo:.55,phenomenon:"WeatherBalloonsOrMongolfieres",durationS:7200},{id:"stratospheric",modelId:"ufoathome-balloon-stratospheric",envelope:"vented",launchVolumeM3:219,maxVolumeM3:14e3,massKg:210,dragCoefficient:.4,aspect:.91,color:"#e9eef2",albedo:.8,ballastKg:20,phenomenon:"StratosphericBalloons",durationS:10800},{id:"stratospheric-large",modelId:"ufoathome-balloon-stratospheric",envelope:"vented",launchVolumeM3:730,maxVolumeM3:15e4,massKg:700,dragCoefficient:.4,aspect:.91,color:"#e9eef2",albedo:.8,ballastKg:140,phenomenon:"StratosphericBalloons",durationS:14400},{id:"superpressure",modelId:"ufoathome-balloon-latex",envelope:"superpressure",launchVolumeM3:45,maxVolumeM3:523,massKg:44,dragCoefficient:.4,aspect:1.13,color:"#eef1f4",albedo:.8,phenomenon:"StratosphericBalloons",durationS:10800},{id:"infrared",modelId:"ufoathome-balloon-stratospheric",envelope:"open",launchVolumeM3:2075,maxVolumeM3:45e3,massKg:150,dragCoefficient:.4,aspect:.91,color:"#9aa0a8",albedo:.4,insideExcessK:20,phenomenon:"StratosphericBalloons",durationS:10800},{id:"prank-candles",modelId:"ufoathome-balloon-prank",envelope:"open",launchVolumeM3:.25,maxVolumeM3:.25,massKg:.02,dragCoefficient:.6,aspect:1.515,widthM:.6,color:"#f4f4f4",albedo:.6,insideExcessK:60,spins:!0,sways:!0,flames:{count:4,candela:.5,color:"#ffb347",burnS:720,coolingS:15},phenomenon:"SkyLantern",durationS:1200},{id:"prank-flares",modelId:"ufoathome-balloon-prank",envelope:"open",launchVolumeM3:2,maxVolumeM3:2,massKg:.3,dragCoefficient:.6,aspect:1.515,widthM:1.2,color:"#2b2d30",albedo:.1,insideExcessK:80,spins:!0,sways:!0,flames:{count:1,candela:150,color:"#ff3a20",burnS:900,coolingS:30},phenomenon:"SkyLantern",durationS:1500},{id:"anti-hail",modelId:"ufoathome-balloon-latex",envelope:"elastic",launchVolumeM3:.65,maxVolumeM3:8,massKg:.4,dragCoefficient:.35,aspect:1.13,color:"#f2ece0",albedo:.55,torch:{aboveM:600,candela:300,color:"#ff9a3c",burnS:90,fallMS:4},phenomenon:"ParachuteFlare",durationS:1200},{id:"solar",modelId:"ufoathome-balloon-latex",envelope:"open",launchVolumeM3:14,maxVolumeM3:14,massKg:.4,dragCoefficient:.47,aspect:1.13,color:"#151515",albedo:.05,insideExcessK:10,phenomenon:"WeatherBalloonsOrMongolfieres",durationS:3600},{id:"captive",modelId:"ufoathome-balloon-latex",envelope:"sealed",tethered:!0,launchVolumeM3:14,maxVolumeM3:14,massKg:8,dragCoefficient:.47,aspect:1.13,color:"#f4f4f4",albedo:.7,phenomenon:"WeatherBalloonsOrMongolfieres",durationS:3600}];static byId(t){return ae.ALL.find(e=>e.id===t)}}const Ye=K.rounded,Xe={key:"balloons",messages:Mn,phenomenon:n=>{const t=typeof n.balloon=="string"?n.balloon:n.balloon?.id;return(ae.byId(t)??ae.ALL[0]).phenomenon},inWind:(n,t)=>{const e=n.site.altitudeM??0;return{...n,wind:Ye(t.at(10)),windsAloft:t.levels.filter(r=>r>e+10).map(r=>({...Ye(t.at(r)),atM:Math.round(r-e)}))}},compute:()=>d(async()=>{const{BalloonFlight:n}=await import("./BalloonFlight-CztT6ddg.js");return{BalloonFlight:n}},[],import.meta.url).then(({BalloonFlight:n})=>t=>n.bodiesOf(t)),editor:()=>d(async()=>{const{BalloonEditor:n}=await import("./BalloonEditor-dCIjTsIz.js");return{BalloonEditor:n}},__vite__mapDeps([16,3,4,5,15,12,13,17,6,7,8]),import.meta.url).then(({BalloonEditor:n})=>(t,e,r)=>new n(t,e,r))},vn=T.catalog({en:()=>d(()=>import("./AirshipKindMessages_en-DzGapVTV.js"),[],import.meta.url).then(n=>n.airshipKindMessages_en),fr:()=>d(()=>import("./AirshipKindMessages_fr-BTXNsW5W.js"),[],import.meta.url).then(n=>n.airshipKindMessages_fr),es:()=>d(()=>import("./AirshipKindMessages_es-TE93uMSC.js"),[],import.meta.url).then(n=>n.airshipKindMessages_es),it:()=>d(()=>import("./AirshipKindMessages_it-Cwa3MnJ-.js"),[],import.meta.url).then(n=>n.airshipKindMessages_it)}),oe=(n,t,e,r=5)=>({"nav-left":{color:"#ff2a1a",candela:r,leds:[{at:n,radiusM:.06}]},"nav-right":{color:"#2aff5a",candela:r,leds:[{at:t,radiusM:.06}]},tail:{color:"#ffffff",candela:r,leds:[{at:e,radiusM:.06}]}});class ue{static ALL=[{id:"blimp",modelId:"ufoathome-airship-blimp",sizeM:{widthM:14.72,lengthM:59.46,heightM:17.59},cruiseMS:15,maxSpeedMS:22,color:"#c9ccd1",finColor:"#1d3f8a",albedo:.6,sign:{color:"#fff4d8",luminanceCdM2:150,lit:!0},lights:{...oe([-1.22,-8.6,-9],[1.22,-8.6,-9],[0,0,29.7]),strobe:{color:"#ffffff",candela:400,hz:1,flashS:.06,leds:[{at:[0,-10.15,-9],radiusM:.08}]}},sound:"light-piston",phenomenon:"Airship"},{id:"zeppelin-nt",modelId:"ufoathome-airship-zeppelin-nt",sizeM:{widthM:18.2,lengthM:75.11,heightM:19.55},cruiseMS:19,maxSpeedMS:35,color:"#eef0f2",finColor:"#eef0f2",albedo:.75,sign:{color:"#fff4d8",luminanceCdM2:150,lit:!1},lights:{...oe([-1.32,-8.4,-14],[1.32,-8.4,-14],[0,0,37.5]),strobe:{color:"#ffffff",candela:400,hz:1,flashS:.06,leds:[{at:[0,-9.65,-14],radiusM:.08}]}},sound:"light-piston",phenomenon:"Airship"},{id:"lightship",modelId:"ufoathome-airship-lightship",sizeM:{widthM:10.16,lengthM:39.66,heightM:11.98},cruiseMS:13,maxSpeedMS:20,color:"#f4f4f2",finColor:"#f4f4f2",albedo:.7,glowCdM2:20,lights:oe([-.82,-5.9,-6],[.82,-5.9,-6],[0,0,19.8]),sound:"light-piston",phenomenon:"Airship"},{id:"aerostat",modelId:"ufoathome-airship-aerostat",sizeM:{widthM:25.14,lengthM:63.6,heightM:27.05},cruiseMS:0,maxSpeedMS:0,tethered:!0,color:"#f2f2f0",finColor:"#f2f2f0",albedo:.7,lights:{nose:{color:"#ff2a1a",candela:2e3,hz:.5,flashS:.6,leds:[{at:[0,-4.2,-30],radiusM:.12}]},stern:{color:"#ff2a1a",candela:2e3,hz:.5,flashS:.6,leds:[{at:[0,-6.3,22],radiusM:.12}]}},phenomenon:"Airship"},{id:"rigid",modelId:"ufoathome-airship-rigid",sizeM:{widthM:33.38,lengthM:236.66,heightM:35.79},cruiseMS:32,maxSpeedMS:36,color:"#b9bcbf",finColor:"#b9bcbf",albedo:.55,lights:oe([-3.02,-16.5,-80],[3.02,-16.5,-80],[0,0,118.3],10),sound:"piston-heavy",phenomenon:"Airship"}];static byId(t){return ue.ALL.find(e=>e.id===t)}}const Je={key:"airships",messages:vn,phenomenon:n=>{const t=typeof n.airship=="string"?n.airship:n.airship?.id;return(ue.byId(t)??ue.ALL[0]).phenomenon},compute:()=>d(async()=>{const{AirshipFlight:n}=await import("./AirshipFlight-Dzpw8HRM.js");return{AirshipFlight:n}},__vite__mapDeps([18,12,13]),import.meta.url).then(({AirshipFlight:n})=>t=>n.bodiesOf(t)),editor:()=>d(async()=>{const{AirshipEditor:n}=await import("./AirshipEditor-CBSrQM3J.js");return{AirshipEditor:n}},__vite__mapDeps([19,3,4,5,15,12,13,18,8,11]),import.meta.url).then(({AirshipEditor:n})=>(t,e,r)=>new n(t,e,r))},Yr=v.point("interpretations").provide(v.BUILT_IN,[{id:He.key,name:"Decoy flares",credit:"UFO@home",creditUrl:"https://ufoathome.org/docs/format/",create:()=>He},{id:Ke.key,name:"Sky lanterns",credit:"UFO@home",creditUrl:"https://ufoathome.org/docs/format/",create:()=>Ke},{id:ze.key,name:"Birds",credit:"UFO@home",creditUrl:"https://ufoathome.org/docs/format/",create:()=>ze},{id:We.key,name:"Drones",credit:"UFO@home",creditUrl:"https://ufoathome.org/docs/format/",create:()=>We},{id:Xe.key,name:"Balloons",credit:"UFO@home",creditUrl:"https://ufoathome.org/docs/format/",create:()=>Xe},{id:Je.key,name:"Airships",credit:"UFO@home",creditUrl:"https://ufoathome.org/docs/format/",create:()=>Je}]);class Ge{static kinds(){return Yr.map(t=>N.of(t))}}const qs=Object.freeze(Object.defineProperty({__proto__:null,INTERPRETATION_SOURCES:Yr,InterpretationRegistry:Ge},Symbol.toStringTag,{value:"Module"}));class H{static SIGHTING_EVENT="sighting";static INTERPRETATION_EVENT="interpretation";static INTERVIEW_EVENT="interview";static check(t){return ct.check(t,"case")}static isCase(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)&&Array.isArray(t.events)&&!("timeline"in t)}static sightingUrls(t,e){return(t.events??[]).filter(r=>r.eventType===H.SIGHTING_EVENT&&!r.interpretationOf&&typeof r.url=="string"&&r.url!=="").map(r=>new URL(r.url,e).href)}static accountIds(t,e,r,s){const o=(t.events??[]).filter(i=>i.eventType===H.SIGHTING_EVENT&&i.id!==void 0&&typeof i.url=="string"&&r!==void 0&&new URL(i.url,e).href===r).map(i=>i.id);return s!==void 0&&o.push(s),o}static interpretationEvents(t,e){const r=[e].flat().filter(s=>!!s);return r.length===0?[]:(t.events??[]).filter(s=>s.eventType===H.INTERPRETATION_EVENT?s.sighting!==void 0&&r.includes(s.sighting):s.eventType!==H.SIGHTING_EVENT||s.interpretationOf===void 0?!1:[s.interpretationOf].flat().some(o=>r.includes(o))).map(s=>s)}static problems(t,e){const r=t.events??[],s=new Set,o=new Set;for(const a of r)a.id!==void 0&&(s.has(a.id)&&o.add(a.id),s.add(a.id));const i=[];for(const a of r){const l=a.eventType===H.SIGHTING_EVENT?a.interpretationOf:a.eventType===H.INTERVIEW_EVENT?a.interviewOf:void 0;if(l!==void 0)for(const c of[l].flat())!s.has(c)&&!e.includes(c)&&i.push({reading:a.url??a.id??"",reference:c})}return{duplicateIds:[...o],unresolved:i}}static async interpretationOf(t,e,r){if(t.bodies)return H.withModelsFrom(j.strip({title:t.title,bodies:t.bodies??[],smoke:t.smoke,findings:t.findings,...N.computedPart(t,Ge.kinds())}).recording,e);if(!t.url)return{title:t.title,bodies:[]};const s=new URL(t.url,e).href,o=await r(s),i="timeline"in o&&o.interpretation?o.interpretation:o;return H.withModelsFrom(j.strip({title:t.title??i.title,bodies:i.bodies??[],smoke:i.smoke,findings:i.findings,...N.computedPart(i,Ge.kinds())}).recording,s)}static withModelsFrom(t,e){return{...t,bodies:t.bodies.map(r=>r.model?.url?{...r,model:{...r.model,url:new URL(r.model.url,e).href}}:r)}}}class k{static files=new Map;static hold(t){for(const[e,r]of t)k.files.set(k.key(e),r)}static releaseCopies(){for(const[t,e]of k.files)e.local||k.files.delete(t)}static clear(){k.files.clear()}static localBase(){return new URL(`local/${Date.now().toString(36)}${Math.random().toString(36).slice(2,6)}/`,location.href).href}static read(t){const e=k.files.get(k.key(t));return e===void 0?void 0:structuredClone(e.json)}static changed(...t){return t.some(e=>e!==void 0&&k.files.get(k.key(e))?.changed===!0)}static local(t){return t!==void 0&&k.files.get(k.key(t))?.local===!0}static key(t){const e=new URL(t,location.href);return e.hash="",e.href}}class q{static NAMES=["weather","place","lightPollution","decor"];static KEYS={weather:["weatherTrack","weatherSource"],place:["place"],lightPollution:["lightPollution"],decor:["decor"]};static annexName(t,e){return`${t}.${e.replace(/[A-Z]/g,r=>`-${r.toLowerCase()}`)}.json`}static taken(t,e){const r={};if(t==="decor")return Array.isArray(e.decor)&&(r.decor=e.decor.filter(q.surveyed)),r;for(const s of q.KEYS[t])e[s]!==void 0&&(r[s]=e[s]);return r}static strip(t,e){if(t==="decor"){const r=Array.isArray(e.decor)?e.decor.filter(s=>!q.surveyed(s)):[];r.length>0?e.decor=r:delete e.decor;return}for(const r of q.KEYS[t])delete e[r]}static put(t,e,r){if(t==="decor"){if(!Array.isArray(r.decor))return;const s=Array.isArray(e.decor)?e.decor.filter(o=>!q.surveyed(o)):[];e.decor=[...s,...r.decor];return}for(const s of q.KEYS[t])r[s]!==void 0&&(e[s]=r[s])}static surveyed(t){return typeof t=="object"&&t!==null&&typeof t.origin=="string"}static fromFile(t,e){return t?.[e]!==void 0&&t[e].live!==!0}}class Xr{static NAMES=["relief","imagery","roads","water","railways","upperAir","map"];static TERRAIN=["relief","imagery","roads","water","railways"];static held(t,e){if(!t||t.live)return;const r=t[e];return r&&!r.live&&!r.refresh&&r.src!==void 0?r:void 0}static isLive(t,e){return t?.live===!0||t?.[e]?.live===!0}static annexName(t,e){const r=e==="relief"||e==="imagery"||e==="map"?"zip":"json",s=e.replace(/[A-Z]/g,o=>`-${o.toLowerCase()}`);return`${t}.${s}.${r}`}static isEmpty(t){return!t||!t.live&&Xr.NAMES.every(e=>!t[e])&&q.NAMES.every(e=>!t[e])}}class xt extends Error{constructor(t,e,r){super(`${t}: ${e}${r===void 0?"":` (HTTP ${r})`}`),this.kind=t,this.url=e,this.status=r,this.name="SightingFetchError"}}class ce{static async recording(t){const e=k.read(t);if(e!==void 0)return e;const r=await ce.json(t);for(const s of q.NAMES){const o=r?.snapshots?.[s];if(!(!o?.src||o.live))try{const i=ct.recording(await ce.json(new URL(o.src,new URL(t,location.href)).href));q.put(s,r,i)}catch{}}return r}static async json(t){const e=new URL(t,location.href),r=k.read(e.href);if(r!==void 0)return r;if(location.protocol==="https:"&&e.protocol==="http:")throw new xt("mixed-content",t);let s;try{s=await fetch(t)}catch{throw await this.diagnose(t,e)}if(!s.ok)throw new xt("status",t,s.status);try{return await s.json()}catch{throw new xt("malformed",t)}}static async diagnose(t,e){if(e.origin===location.origin)return new xt("unreachable",t);try{return await fetch(t,{mode:"no-cors"}),new xt("cors",t)}catch{return new xt("unreachable",t)}}}class Ve{constructor(t,e,r=()=>{}){this.place=t,this.changed=r,e&&this.adopt(e)}reader;editor;handed;get reading(){return this.reader!==void 0}get editorLoaded(){return this.editor!==void 0}adopt(t){this.editor=t,t.switcher=this,t.hasAttribute(ge)||t.setAttribute(ge,""),t.addEventListener(mn,e=>{e.preventDefault();const r=e.detail;this.handed=r.src,this.read(r)})}async read({src:t,track:e}){const[{register:r,CASE_ELEMENT_NAME:s,OPEN_EVENTS_ATTRIBUTE:o},{registerSighting:i,SIGHTING_ELEMENT_NAME:a}]=await Promise.all([d(()=>import("./CaseElement-CRXPyMMR.js"),__vite__mapDeps([20,21,22,6,7,23,3,4,13,24,25,1,26]),import.meta.url),d(()=>import("./SightingElement-BJSNmFM6.js"),__vite__mapDeps([26,22,6,7,23,3,4,13,24,25,1]),import.meta.url)]);i(),r();const l=H.isCase(k.read(t)??await ce.json(t)),c=document.createElement(l?s:a);c.setAttribute(ge,""),c.setAttribute("show-labels",""),l&&e&&c.setAttribute(o,Ve.fileKey(e)),c.setAttribute("src",t),c.addEventListener(hn,m=>{m.preventDefault(),this.edit(m.detail)}),this.reader?.remove(),this.place(c),this.editor&&(this.editor.hidden=!0),this.reader=c,this.changed({mode:"read",src:t,...e?{track:e}:{}})}async edit(t){const e=this.editor;if(e){if(this.dropReader(),k.releaseCopies(),e.hidden=!1,this.changed({mode:"edit"}),t?.src!==void 0&&t.src!==this.handed){this.load(e,t.src,t.track);return}t?.track&&await e.openTrack(t.track);return}const{register:r,CASE_EDITOR_ELEMENT_NAME:s}=await d(async()=>{const{register:i,CASE_EDITOR_ELEMENT_NAME:a}=await import("./CaseEditorElement-0J_TCeiq.js").then(l=>l.b);return{register:i,CASE_EDITOR_ELEMENT_NAME:a}},__vite__mapDeps([27,3,4,8,21,22,6,7,23,13,24,25,1,28,11,29,30,31,32]),import.meta.url);r();const o=document.createElement(s);this.adopt(o),t?.track&&o.setAttribute("track",t.track),t?.src?o.setAttribute("src",t.src):t?.start&&(o.caseStart=t.start),this.dropReader(),this.place(o),this.changed({mode:"edit"})}async open(t){const e=this.editor;if(this.reading||!e)return this.read({src:t});this.load(e,t)}load(t,e,r){this.handed=void 0,r?t.setAttribute("track",r):t.removeAttribute("track"),t.setAttribute("src",e)}async startNew(t){const e=this.editor;if(!e)return this.edit(t?{start:t}:void 0);this.reading&&await this.edit(),e.askBeforeReplacing(()=>{e.remove(),this.editor=void 0,this.edit(t?{start:t}:void 0)})}dropReader(){this.reader?.remove(),this.reader=void 0}static fileKey(t){return new URL(t,location.href).pathname.split("/").pop().replace(/\.json$/i,"")}}const Ie="rr0-input-file",Jr={inputFileFromFile:"from your disk",inputFileFromUrl:"from an address",inputFileModeHint:"Click to give it the other way: a file of yours, or an address",inputFileLoad:"Load"},An=`
|
|
3
3
|
rr0-input-file { display: inline-flex; align-items: center; gap: .3em; }
|
|
4
4
|
/* As the date's own switch (see DateInputElement): it reads as part of the label, before the field. */
|
|
5
5
|
rr0-input-file .input-file-mode { order: -1; font: inherit; color: inherit; background: none; border: 0; padding: 0; margin: 0; cursor: pointer; text-decoration: underline; text-underline-offset: .15em; }
|
|
@@ -114,7 +114,7 @@ ${t} :is(select:not([multiple]):not([size]), .rr0-select) {
|
|
|
114
114
|
:is(${s(C.INFO,t)}) { color: color-mix(in srgb, CanvasText 62%, transparent); }
|
|
115
115
|
:is(${s(C.WARNING,e)}) { color: color-mix(in srgb, #e48a00 72%, CanvasText); }
|
|
116
116
|
:is(${s(C.ERROR,r)}) { color: color-mix(in srgb, #e5322d 72%, CanvasText); }
|
|
117
|
-
`}static show(t,e,r="info"){t.textContent=e??"",t.hidden=!e,t.classList.toggle(C.INFO,r==="info"),t.classList.toggle(C.WARNING,r==="warning"),t.classList.toggle(C.ERROR,r==="error")}}class z{static FORMAT=1;static read=new Map;static load(t,e=fetch.bind(globalThis)){const r=new URL(t,typeof location>"u"?void 0:location.href).href;let s=z.read.get(r);return s||(s=(async()=>{const o=await e(r);if(!o.ok)throw new Error(`${r}: HTTP ${o.status}`);return z.check(await o.json(),r)})(),s.catch(()=>z.read.delete(r)),z.read.set(r,s)),s}static check(t,e){const r=t;if(r===null||typeof r!="object"||!Array.isArray(r.starts))throw new Error(`${e}: not a UFO@home case template`);if(typeof r.format=="number"&&r.format>z.FORMAT)throw new Error(`${e}: format ${r.format} is newer than ${z.FORMAT}`);const s=a=>new URL(a,e).href,o=z.recipientOf(r.recipient,e),i=r.starts.filter(a=>typeof a?.id=="string").map(a=>({...a,...o?{recipient:o}:{},...a.questionnaires?{questionnaires:a.questionnaires.filter(l=>typeof l=="string").map(l=>z.isAddress(l)?s(l):l)}:{},...a.modules?{modules:a.modules.filter(l=>typeof l=="string").map(s)}:{}}));if(i.length===0)throw new Error(`${e}: a case template offers no start`);return{format:1,id:typeof r.id=="string"?r.id:e,title:r.title??r.id??e,...r.modules?{modules:r.modules.filter(a=>typeof a=="string").map(s)}:{},...o?{recipient:o}:{},starts:i,url:e}}static recipientOf(t,e){if(t===void 0)return;const r=t?.publicKey;if(typeof t.id!="string"||!r||r.kty!=="RSA"||typeof r.n!="string")throw new Error(`${e}: its recipient has no RSA public key`);if(r.d!==void 0)throw new Error(`${e}: its recipient gives a private key, which must never be published`);const{kty:s,n:o,e:i,alg:a}=r;return{id:t.id,name:t.name??t.id,publicKey:{kty:s,n:o,e:i,...a?{alg:a}:{}}}}static isAddress(t){return/[/:]|\.json$/i.test(t)}static step(t){return t.start??(t.questionnaires?.length?"questionnaire":"observation")}}class B extends Error{}class le{constructor(t){this.name=t}validate(t){return!0}}class tn extends le{min;max;constructor(t,e,r){super(t),this.min=e,this.max=r}validate(t){if(typeof t!="number")throw new B(`${this.name} value must be a number, but was ${t}`);if(t<this.min||t>this.max)throw new B(`${this.name} value must be >= ${this.min} and <= ${this.max}, but was ${t}`);return super.validate(t)}}class x{name;min;max;duration;subUnit;validator;constructor(t,e,r,s,o=new tn(t,e,r)){this.name=t,this.min=e,this.max=r,this.subUnit=s,this.duration=s?(s.max-s.min+1)*s.duration:1,this.validator=o}validate(t){return this.validator.validate(t)}[Symbol.iterator](){let t=this.min;return{next:()=>{const e={done:t>this.max,value:t};return t++,e}}}}class ke{millisecond;second;minute;hour;day;month;year}class _n extends ke{}class en extends _n{millisecond=new x("millisecond",0,999,void 0);second=new x("second",0,59,this.millisecond);minute=new x("minute",0,59,this.second);hour=new x("hour",0,23,this.minute);day=new x("day",1,31,this.hour);month=new x("month",1,12,this.day);year=new x("year",0,9999,this.month)}const g=new en;class rn extends tn{constructor(t=1,e=12){super("month",t,e)}}class vt extends x{static Month28=new vt(28);static Month29=new vt(29);static ThirtyDays=new vt(30);static ThirtyOneDays=new vt(31);constructor(t,e=new rn(1,t)){super("month",1,t,g.day,e)}static create(t,e){switch(t){case 1:case 3:case 5:case 7:case 8:case 10:case 12:return this.ThirtyOneDays;case 2:return e%4===0?this.Month29:this.Month28;case 4:case 6:case 9:case 11:return this.ThirtyDays;default:throw new B("Unsupported month",t,e)}}}class W{static instance=new W;render(t){return t.value.toString()}}class F{unit;#t;constructor(t,e){this.unit=e,this.value=typeof t=="number"?t:t.value}get value(){return this.#t}set value(t){this.unit.validate(t),this.#t=t}get duration(){return this.value*this.unit.duration}#e(t){if(this.constructor.name!==t.constructor.name)throw new le(`${this.unit.name} "${this.toString()}" cannot be compared with ${t.unit?.name} "${t.toString()}"`)}compare(t){return this.#e(t),this.value-t.value}isEqual(t){return this.compare(t)===0}isBefore(t){return this.compare(t)<0}isAfter(t){return this.compare(t)>0}previous(t=this.unit){const e=this.value-1;return new this.constructor(e,t)}next(t=this.unit){const e=this.value+1;return new this.constructor(e,t)}toString(t=W.instance){return t.render(this)}toSpec(){return{value:this.value}}toJSON(){return this.toSpec()}}class p{static#t=new Map;static register(t,e){p.#t.set(t,e)}static get(t){const e=p.#t.get(t);if(!e)throw new B(`No default parser registered for ${t.name}: import "@rr0/time/defaults" or pass a parser to fromString()`);return e()}}class Nt extends F{constructor(t=new Date().getFullYear(),e=g.year){super(t,e)}static fromString(t,e=p.get(Nt)){return new Nt(e.parse(t))}}class X extends W{static default=new X("0",2);constructor(t,e){super(),this.char=t,this.size=e}render(t){return super.render(t).padStart(this.size,this.char)}}class Gt extends F{constructor(t=new Date().getMonth()+1,e=g.month){super(t,e)}static fromString(t,e=p.get(Gt)){return new Gt(e.parse(t))}toString(t=X.default){return super.toString(t)}}class It extends F{constructor(t=new Date().getDate(),e=g.day){super(t,e)}static fromString(t,e=p.get(It)){const r=e.parse(t);return new It(r)}toString(t=X.default){return super.toString(t)}}class Rt extends F{constructor(t=new Date().getHours(),e=g.hour){super(t,e)}static fromString(t,e=p.get(Rt)){return new Rt(e.parse(t))}toString(t=X.default){return super.toString(t)}}class Vt extends F{constructor(t=new Date().getMinutes(),e=g.minute){super(t,e)}static fromString(t,e=p.get(Vt)){return new Vt(e.parse(t))}toString(t=X.default){return super.toString(t)}}class kt extends F{constructor(t=new Date().getSeconds(),e=g.second){super(t,e)}static fromString(t,e=p.get(kt)){return new kt(e.parse(t),g.second)}toString(t=X.default){return super.toString(t)}}class wt extends F{static renderer=new X("0",3);constructor(t,e=g.millisecond){super(t,e)}static parseFraction(t){return parseInt(t.padEnd(3,"0").substring(0,3),10)}toString(t=wt.renderer){return super.toString(t)}}class Tn{render(t){return t.toString()}}class Nn extends Tn{render(t){const e=t.value,r=Math.abs(e),s=Math.floor(r/60),o=r%60;if(s===0&&o===0)return"Z";{const i=e<0?"-":"+",a=s.toString().padStart(2,"0"),l=o>0?":"+o.toString().padEnd(2,"0"):"";return i+a+l}}}class gt{value;name="timeshift";renderer;constructor(t=0){this.value=t}static fromString(t,e=p.get(gt),r=void 0){const s=e.parse(t,r);return new gt(s)}toString(t=new Nn){return t.render(this)}toSpec(){return{value:this.value}}toJSON(){return this.toSpec()}}class ${static timeshift(t,e){return t+($.isDaylight(e)?60:0)}static isDaylight(t){const{year:e,month:r,day:s}=t,o=t.hour??12;if(![e,r,s].every(Number.isInteger))throw new RangeError("Daylight saving time depends on the year, month and day");const i=$.rule(e);if(!i)return!1;const a=$.rank(r,s,o);return a>=$.rank(i.start.month,i.start.day,2)&&a<$.rank(i.end.month,i.end.day,2)}static rule(t){if(t<1967)return;const e={month:10,day:$.sunday(t,10,-1)};return t>=2007?{start:{month:3,day:$.sunday(t,3,2)},end:{month:11,day:$.sunday(t,11,1)}}:t>=1987?{start:{month:4,day:$.sunday(t,4,1)},end:e}:t===1975?{start:{month:2,day:23},end:e}:t===1974?{start:{month:1,day:6},end:e}:{start:{month:4,day:$.sunday(t,4,-1)},end:e}}static sunday(t,e,r){const s=new Date(Date.UTC(2e3,e-1,1));s.setUTCFullYear(t);const o=1+(7-s.getUTCDay())%7;if(r>0)return o+7*(r-1);const i=[31,$.isLeap(t)?29:28,31,30,31,30,31,31,30,31,30,31][e-1];let a=o;for(;a+7<=i;)a+=7;return a}static isLeap(t){return t%4===0&&(t%100!==0||t%400===0)}static rank(t,e,r){return(t*100+e)*100+r}}const Gn={name:"PST",timeshift:"-08",title:"Pacific Standard Time (US)"},In={name:"PDT",timeshift:"-07",title:"Pacific Daylight Time (US)"},Rn={name:"MDT",timeshift:"-06",title:"Mountain Standard Time (US)"},Vn={name:"MST",timeshift:"-07",title:"Mountain Daylight Time (US)"},kn={name:"PT",timeshift:n=>$.timeshift(-480,n),title:"Pacific Time (US)"},On={name:"MT",timeshift:n=>$.timeshift(-420,n),title:"Mountain Time (US)"},$n={name:"CT",timeshift:n=>$.timeshift(-360,n),title:"Central Time (US)"},Fn={name:"ET",timeshift:n=>$.timeshift(-300,n),title:"Eastern Time (US)"},Dn={name:"CWT",timeshift:"-05",title:"Central War Time (US)"},Pn={name:"CDT",timeshift:"-05",title:"Central Daylight Time"},Un={name:"EST",timeshift:"-05",title:"Eastern Standard Time (US)"},Bn={name:"EDT",timeshift:"-04",title:"Eastern Time (US)"},Cn={name:"AST",timeshift:"-04",title:"Atlantic Standard Time (US)"},jn={name:"ADT",timeshift:"-03",title:"Atlantic Daylight Time (US)"},Hn={name:"UTC",timeshift:"Z",title:"Coordinated Universal Time"},Ln={name:"Z",timeshift:"Z",title:"UTC"},Kn={name:"GMT",timeshift:"Z",title:"Greenwich Mean Time"},zn={name:"BST",timeshift:"+01",title:"British Summer Time"},qn={name:"CEST",timeshift:"+02",title:"Central European Summer Time"},Wn={name:"CET",timeshift:"+01",title:"Central European Time"},Yn={name:"MSK",timeshift:"+03",title:"Moscow Time (RU)"},Xn={name:"IST",timeshift:"+05:30",title:"Indian Standard Time"},Jn={name:"BJT",timeshift:"+08",title:"Beijing Time"},Zn={name:"CST",timeshift:"-06",title:"Central Standard Time"},Qn={name:"JST",timeshift:"+09",title:"Japan Standard Time"},ts={name:"AEST",timeshift:"+10",title:"Australian Eastern Standard Time"},es={name:"NZST",timeshift:"+12",title:"New Zealand Standard Time"},rs={name:"LST",timeshift:"?",title:"Local Sideral Time"},Ze=[jn,ts,Cn,Jn,zn,Zn,Pn,Wn,qn,$n,Dn,Bn,Un,Fn,Kn,Xn,Qn,rs,Rn,Yn,Vn,On,es,In,Gn,kn,Hn,Ln];class me{static instance=new me;renderComponent(t,e){return t[e].toString()}renderSecond(t){return this.renderComponent(t,"second")+(t.millisecond?"."+t.millisecond.toString():"")}render(t){const e=[];t.year&&e.push(this.renderComponent(t,"year")),t.month&&e.push(this.renderComponent(t,"month")),t.day&&e.push(this.renderComponent(t,"day"));const r=[];t.hour&&r.push(this.renderComponent(t,"hour")),t.minute&&r.push(this.renderComponent(t,"minute")),t.second&&r.push(this.renderSecond(t));const s=e.join("-"),o=t.timeshift?t.timeshift.toString():"",i=r.join(":")+o;return s+(i.length>0?"T"+i:"")}}class bt extends B{constructor(t="method is abstract"){super(t)}}class Oe{units;constructor(t){this.units=t}newYear(t){throw new bt}newMonth(t){throw new bt}newDay(t){throw new bt}newHour(t){throw new bt}newMinute(t){throw new bt}newSecond(t){throw new bt}}class ns extends ke{millisecond=new x("milliseconds",Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER,void 0);second=new x("seconds",Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER,this.millisecond);minute=new x("minutes",Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER,this.second);hour=new x("hours",Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER,this.minutes);day=new x("days",Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER,this.hour);month=new x("months",Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER,this.day);year=new x("years",Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER,this.month)}const ne=new ns;class pe{static instance=new pe;render(t){const e=L.toSpec(t);let r="P";const s=e.years;s&&(r+=s.toString()+"Y");const o=e.months;o&&(r+=o.toString(W.instance)+"MM");const i=e.days;i&&(r+=i.toString(W.instance)+"D");const a=e.hours;a&&(r+=a.toString(W.instance)+"H");const l=e.minutes;l&&(r+=l.toString(W.instance)+"M");const c=e.seconds;return c&&(r+=c.toString(W.instance)+"S"),r}}class L extends F{constructor(t={years:new Date().getFullYear(),months:new Date().getMonth(),days:new Date().getDate(),hours:new Date().getHours(),minutes:new Date().getMinutes(),seconds:new Date().getSeconds(),milliseconds:new Date().getMilliseconds()}){super({value:typeof t=="number"?t:+(t.years?t.years*g.year.duration:0)+(t.months?t.months*g.month.duration:0)+(t.days?t.days*g.day.duration:0)+(t.hours?t.hours*g.hour.duration:0)+(t.minutes?t.minutes*g.minute.duration:0)+(t.seconds?t.seconds*g.second.duration:0)},new x("millisecond",0,Number.MAX_SAFE_INTEGER,void 0))}static toSpec(t,e=os){let r=typeof t=="number"?t:t.value;const s=r>0?1:-1;r=Math.abs(r);const o={},i=r/g.year.duration,a=Math.floor(i);a>0&&(o.years=e.newYear(s*a),r-=a*g.year.duration);const l=r/g.month.duration,c=Math.floor(l);c>0&&(o.months=e.newMonth(s*c),r-=c*g.month.duration);const m=r/g.day.duration,h=Math.floor(m);h>0&&(o.days=e.newDay(s*h),r-=h*g.day.duration);const w=r/g.hour.duration,b=Math.floor(w);b>0&&(o.hours=e.newHour(s*b),r-=b*g.hour.duration);const _=r/g.minute.duration,S=Math.floor(_);S>0&&(o.minutes=e.newMinute(s*S),r-=S*g.minute.duration);const D=r/g.second.duration,at=Math.floor(s*D);return at>0&&(o.seconds=e.newSecond(at)),o}static fromString(t,e=p.get(L)){return new L(e.parse(t))}static between(t,e){const r=e.getTime(),s=t.getTime();return new L(r-s)}toSpec(){return L.toSpec(this)}toString(t=pe.instance){return t.render(this)}}class nn extends Oe{constructor(t){super(t)}newYear(t){return new Nt(t,this.units.year)}newMonth(t){return new Gt(t,this.units.month)}newDay(t){return new It(t,this.units.day)}newHour(t){return new Rt(t,this.units.hour)}newMinute(t){return new Vt(t,this.units.minute)}newSecond(t){return new kt(t,this.units.second)}newMillisecond(t){return new wt(t,this.units.millisecond)}newTimeshift(t){return new gt(typeof t=="number"?t:t.value)}}const ss=new nn(g),os=new nn(ne);class O{#t;#e;#r;#n;#s;#o;#i;#a;constructor(t={year:new Date().getFullYear(),month:new Date().getMonth()+1,day:new Date().getDate(),hour:new Date().getHours(),minute:new Date().getMinutes(),second:new Date().getSeconds(),timeshift:O.timeshiftOf(new Date)}){this.year=t.year,this.month=t.month,this.day=t.day,this.hour=t.hour,this.minute=t.minute,this.second=t.second,this.millisecond=t.millisecond,this.timeshift=t.timeshift}get year(){return this.#t}set year(t){const e=typeof t=="number";this.#t&&e?this.#t.value=t:this.#t=e?this.factory.newYear(t):!t||t.start||t instanceof F?t:this.factory.newYear(t)}get month(){return this.#e}set month(t){const e=typeof t=="number";this.#e&&e?this.#e.value=t:this.#e=e?this.factory.newMonth(t):!t||t.start||t instanceof F?t:this.factory.newMonth(t)}get day(){return this.#r}set day(t){const e=typeof t=="number";this.#r&&e?this.#r.value=t:this.#r=e?this.factory.newDay(t):!t||t.start||t instanceof F?t:this.factory.newDay(t)}get hour(){return this.#n}set hour(t){const e=typeof t=="number";this.#n&&e?this.#n.value=t:this.#n=e?this.factory.newHour(t):!t||t.start||t instanceof F?t:this.factory.newHour(t)}get minute(){return this.#s}set minute(t){const e=typeof t=="number";this.#s&&e?this.#s.value=t:this.#s=e?this.factory.newMinute(t):!t||t.start||t instanceof F?t:this.factory.newMinute(t)}get second(){return this.#o}set second(t){const e=typeof t=="number";this.#o&&e?this.#o.value=t:this.#o=e?this.factory.newSecond(t):!t||t.start||t instanceof F?t:this.factory.newSecond(t)}get millisecond(){return this.#i}set millisecond(t){const e=typeof t=="number";this.#i&&e?this.#i.value=t:this.#i=e||t&&!(t instanceof F)?this.factory.newMillisecond(t):t}get timeshift(){return this.#a}set timeshift(t){const e=typeof t=="number";this.#a&&e?this.#a.value=t:this.#a=e||t&&!(t instanceof gt)?this.factory.newTimeshift(t):t}get factory(){return ss}static fromString(t,e=p.get(O)){const{year:r,month:s,day:o,hour:i,minute:a,second:l,millisecond:c,timeshift:m}=e.parse(t);return new O({year:r,month:s,day:o,hour:i,minute:a,second:l,millisecond:c,timeshift:m})}static timeshiftOf(t){return-t.getTimezoneOffset()||0}static fromDate(t){return new O({year:t.getFullYear(),month:t.getMonth()+1,day:t.getDate(),hour:t.getHours(),minute:t.getMinutes(),second:t.getSeconds(),timeshift:O.timeshiftOf(t)})}static newInstance(){const t=new Date().toISOString(),e=t.indexOf("."),r=t.substring(0,e)+t.substring(e+4);return O.fromString(r)}#u(t){if(this.constructor.name!==t.constructor.name)throw new le(`Date "${this.toString()}" cannot be compared with "${t.toString()}"`)}compare(t){return this.#u(t),this.getTime()-t.getTime()}delta(t){const e=this.compare(t);return new L(e)}getTime(){return(this.year?.duration||0)+(this.month?.duration||0)+(this.day?.duration||0)+(this.hour?.duration||0)+(this.minute?.duration||0)+(this.second?.duration||0)+(this.millisecond?.duration||0)}isEqual(t){return this.compare(t)===0}isBefore(t){return this.compare(t)<0}isAfter(t){return this.compare(t)>0}clone(){return new O(this.toSpec())}previous(){let t=this.clone();try{t.second=this.second.previous()}catch{try{t.minute=this.minute.previous()}catch{try{t.hour=this.hour.previous()}catch{try{t.day=this.day.previous()}catch{try{t.month=this.month.previous()}catch{t.year=this.year.previous()}}}}}return t}next(){let t=this.clone();try{t.second=this.second.next()}catch{try{t.minute=this.minute.next()}catch{try{t.hour=this.hour.next()}catch{try{t.day=this.day.next()}catch{try{t.month=this.month.next()}catch{t.year=this.year.next()}}}}}return t}toString(t=me.instance){return t.render(this)}toSpec(){const t={},e=this.year?.toSpec();e&&(t.year=e);const r=this.month?.toSpec();r&&(t.month=r);const s=this.day?.toSpec();s&&(t.day=s);const o=this.hour?.toSpec();o&&(t.hour=o);const i=this.minute?.toSpec();i&&(t.minute=i);const a=this.second?.toSpec();a&&(t.second=a);const l=this.millisecond?.toSpec();l&&(t.millisecond=l);const c=this.timeshift?.toSpec();return c&&(t.timeshift=c),t}toJSON(){return this.toSpec()}}class $e{static instance=new $e;render(t){return(t.start?t.start.toString():"")+"/"+(t.end?t.end.toString():"")}}class Dt{constructor(t,e){this.start=t,this.end=e}_start;get start(){return this._start}set start(t){if(typeof t=="string"&&(t=O.fromString(t)),t&&!(t instanceof O)&&!(t instanceof L))throw new B("Interval start is not a level 0 date or duration: "+t);this._start=t}_end;get end(){return this._end}set end(t){if(typeof t=="string"&&(t=O.fromString(t)),t&&!(t instanceof O)&&!(t instanceof L))throw new B("Interval end is not a level 0 date or duration: "+t);this._end=t}static fromString(t,e=p.get(Dt)){const{start:r,end:s}=e.parse(t);return new Dt(r,s)}toString(t=$e.instance){return t.render(this)}[Symbol.iterator](){let t=this.start;return{next:()=>{const e={done:t>this.end,value:t};return t++,e}}}}class se extends W{static instance=new se(X.default);constructor(t){super(),this.valueRenderer=t}render(t){return(this.valueRenderer?this.valueRenderer.render(t):super.render(t))+this.qualifier(t)}qualifier(t){return t.uncertain?t.approximate?"%":"?":t.approximate?"~":""}}class Y extends F{#t;#e;constructor(t,e){super(t,e),this.#t=t.uncertain||!1,this.#e=t.approximate||!1}get uncertain(){return this.#t}set uncertain(t){return this.#t=t}get approximate(){return this.#e}set approximate(t){return this.#e=t}isCertainAndPrecise(){return!this.approximate&&!this.uncertain}isEqual(t){return this.isCertainAndPrecise()&&super.isEqual(t)}isBefore(t){return this.isCertainAndPrecise()&&super.isBefore(t)}isAfter(t){return this.isCertainAndPrecise()&&super.isAfter(t)}toString(t=se.instance){return super.toString(t)}toSpec(){return{...super.toSpec(),uncertain:this.uncertain,approximate:this.approximate}}toJSON(){return this.toSpec()}}class sn extends en{year=new x("year",-9999,9999,this.month);yearExtended=new x("year",Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER,this.month)}const ie=new sn;class dt extends Y{constructor(t,e=ie.year){super(t,e)}static fromString(t,e=ie.year,r=p.get(dt)){const s=r.parse(t),o=s.value.start;if(t.startsWith("Y")&&(e=ie.yearExtended),o!==void 0){const i=new dt(Object.assign({...s},{value:Math.max(o,e.min)})),a=new dt(Object.assign({...s},{value:Math.min(s.value.end,e.max)}));return{start:i,end:a}}else return new dt(s,e)}}class on extends le{monthValidator=new rn;validate(t){switch(t){case 21:case 22:case 23:case 24:return!0;default:return this.monthValidator.validate(t)}}}class lt extends Y{constructor(t,e=new x(g.month.name,1,24,g.day,new on)){super(t,e)}static fromString(t,e=p.get(lt)){const r=e.parse(t),s=r.value.start;if(s!==void 0){let o=g.month;const i=new lt(Object.assign({...r},{value:Math.max(s,o.min)})),a=new lt(Object.assign({...r},{value:Math.min(r.value.end,o.max)}));return{start:i,end:a}}else return new lt(r)}toString(t){return super.toString(t).padStart(2,"0")}}class mt extends Y{constructor(t,e=g.day){super(t,e)}static fromString(t,e=p.get(mt)){const r=e.parse(t),s=r.value.start;if(s!==void 0){let o=g.day;const i=new mt(Object.assign({...r},{value:Math.max(s,o.min)})),a=new mt(Object.assign({...r},{value:Math.min(r.value.end,o.max)}));return{start:i,end:a}}else return new mt(r)}toString(t){return super.toString(t).padStart(2,"0")}}class pt extends Y{constructor(t,e=g.hour){super(t,e)}static fromString(t,e=p.get(pt)){const r=e.parse(t),s=r.value.start;if(s!==void 0){let o=g.hour;const i=new pt(Object.assign({...r},{value:Math.max(s,o.min)})),a=new pt(Object.assign({...r},{value:Math.min(r.value.end,o.max)}));return{start:i,end:a}}else return new pt(r)}}class ht extends Y{constructor(t,e=g.minute){super(t,e)}static fromString(t,e=p.get(ht)){const r=e.parse(t),s=r.value.start;if(s!==void 0){const o=g.minute,i=new ht(Object.assign({...r},{value:Math.max(s,o.min)})),a=new ht(Object.assign({...r},{value:Math.min(r.value.end,o.max)}));return{start:i,end:a}}else return new ht(r)}toString(t=se.instance){return super.toString(t)}}class ft extends Y{constructor(t,e=g.second){super(t,e)}static fromString(t,e=p.get(ft)){const r=e.parse(t),s=r.value.start;if(s!==void 0){const o=g.second,i=new ft(Object.assign({...r},{value:Math.max(s,o.min)})),a=new ft(Object.assign({...r},{value:Math.min(r.value.end,o.max)}));return{start:i,end:a}}else return new ft(r)}}class St extends gt{static fromString(t,e=p.get(St),r=void 0){return new St(e.parse(t,r))}}class an extends Oe{constructor(t){super(t)}newYear(t){return new dt(t,this.units.year)}newMonth(t){return new lt(t,this.units.month)}newDay(t){return new mt(t,this.units.day)}newHour(t){return new pt(t,this.units.hour)}newMinute(t){return new ht(t,this.units.minute)}newSecond(t){return new ft(t,this.units.second)}newMillisecond(t){return new wt(t,this.units.millisecond)}newTimeshift(t){return new St(typeof t=="number"?t:t.value)}}const is=new an(ie),as=new an(ne);class P extends O{constructor(t){super(t)}get factory(){return is}get uncertain(){return this.year?.uncertain===!0||this.month?.uncertain===!0||this.day?.uncertain===!0||this.hour?.uncertain===!0||this.minute?.uncertain===!0||this.second?.uncertain===!0}get approximate(){return this.year?.approximate===!0||this.month?.approximate===!0||this.day?.approximate===!0||this.hour?.approximate===!0||this.minute?.approximate===!0||this.second?.approximate===!0}static fromDate(t){return new P({year:t.getFullYear(),month:t.getMonth()+1,day:t.getDate(),hour:t.getHours(),minute:t.getMinutes(),second:t.getSeconds(),timeshift:O.timeshiftOf(t)})}static fromString(t,e=p.get(P)){const r=e.parse(t);return new P(r)}static newInstance(){const t=new Date().toISOString(),e=t.indexOf("."),r=t.substring(0,e)+t.substring(e+4);return P.fromString(r)}clone(){return new P(this.toSpec())}}const V=Object.freeze({year:"year",month:"month",day:"day",hour:"hour",minute:"minute",second:"second",timeshift:"timeshift",uncertain:"uncertain",approximate:"approx"});class he extends pe{static instance=new he;render(t){return super.render(t)}}class I extends Y{constructor(t){super(typeof t=="number"||t.hasOwnProperty("value")?t:{value:I.getValue(t,V.year)+I.getValue(t,V.month)+I.getValue(t,V.day)+I.getValue(t,V.hour)+I.getValue(t,V.minute)+I.getValue(t,V.second),uncertain:I.getBoolean(t,V.uncertain),approximate:I.getBoolean(t,"approximate")},ne.millisecond)}static getBoolean(t,e){return t[e]||t[V.year+"s"]?.[e]||t[V.month+"s"]?.[e]||t[V.day+"s"]?.[e]||t[V.hour+"s"]?.[e]||t[V.minute+"s"]?.[e]||t[V.second+"s"]?.[e]||!1}static getValue(t,e){let r=0,s=t[e+"s"];if(s instanceof Y?s=s.value:typeof t=="number"&&(s=t),s){const o=g[e];r=s*o.duration}return r}static toSpec(t,e=as){return{...L.toSpec(t,e),uncertain:t.uncertain||!1,approximate:t.approximate||!1}}static fromString(t,e=p.get(I)){const r=e.parse(t);return new I(r)}static between(t,e){const r=e.getTime(),s=t.getTime();return new I(r-s)}toString(t=he.instance){return super.toString(t)}toSpec(){return I.toSpec(this)}}class Pt extends Dt{constructor(t,e){super(t,e)}get start(){return this._start}set start(t){if(typeof t=="string"&&(super.start=P.fromString(t)),t&&!(t instanceof P)&&!(t instanceof I))throw new B("Interval start is not a level 1 date or duration: "+t);this._start=t}get end(){return this._end}set end(t){if(typeof t=="string"&&(t=P.fromString(t)),t&&!(t instanceof P)&&!(t instanceof I))throw new B("Interval end is not a level 1 date or duration: "+t);this._end=t}static fromString(t,e=p.get(Pt)){const{start:r,end:s}=e.parse(t);return new Pt(r,s)}}class $t extends Y{uncertainComponent;approximateComponent;constructor(t,e){super(t,e),this.uncertainComponent=t.uncertainComponent||!1,this.approximateComponent=t.approximateComponent||!1}get uncertain(){return super.uncertain||this.uncertainComponent}set uncertain(t){return super.uncertain=t}get approximate(){return super.approximate||this.approximateComponent}set approximate(t){return super.approximate=t}get uncertainGroup(){return super.uncertain}get approximateGroup(){return super.approximate}toSpec(){return{...super.toSpec(),uncertain:this.uncertainGroup,approximate:this.approximateGroup,uncertainComponent:this.uncertainComponent,approximateComponent:this.approximateComponent}}toJSON(){return this.toSpec()}}class us extends sn{year=new x("year",Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER,this.month)}const Re=new us;class Q extends $t{constructor(t,e=Re.year){super(t,e)}static fromString(t,e=Re.year,r=p.get(Q)){const s=r.parse(t),o=s.value.start;if(o!==void 0){const i=new Q(Object.assign({...s},{value:Math.max(o,e.min)})),a=new Q(Object.assign({...s},{value:Math.min(s.value.end,e.max)})),l={start:i,end:a},c=s.value.estimate;return c&&(l.estimate=c),l}else return new Q(s)}}class cs extends on{validate(t){switch(t){case 25:case 26:case 27:case 28:case 29:case 30:case 31:case 32:case 33:case 34:case 35:case 36:case 37:case 38:case 39:case 40:case 41:return!0;default:return super.validate(t)}}}class tt extends $t{constructor(t,e=new x(g.month.name,1,41,g.day,new cs)){super(t,e)}static fromString(t,e=p.get(tt)){const r=e.parse(t),s=r.value.start;if(s!==void 0){const o=g.month,i=new tt(Object.assign({...r},{value:Math.max(s,o.min)})),a=new tt(Object.assign({...r},{value:Math.min(r.value.end,o.max)}));return{start:i,end:a}}else return new tt(r)}toString(t){return super.toString(t).padStart(2,"0")}}class et extends $t{constructor(t,e=g.day){super(t,e)}static fromString(t,e=p.get(et)){const r=e.parse(t),s=r.value.start;if(s!==void 0){const o=g.day,i=new et(Object.assign({...r},{value:Math.max(s,o.min)})),a=new et(Object.assign({...r},{value:Math.min(r.value.end,o.max)}));return{start:i,end:a}}else return new et(r)}toString(t){return super.toString(t).padStart(2,"0")}}class rt extends $t{constructor(t,e=g.hour){super(t,e)}static fromString(t,e=p.get(rt)){const r=e.parse(t),s=r.value.start;if(s!==void 0){const o=g.hour,i=new rt(Object.assign({...r},{value:Math.max(s,o.min)})),a=new rt(Object.assign({...r},{value:Math.min(r.value.end,o.max)}));return{start:i,end:a}}else return new rt(r)}}class nt extends $t{constructor(t,e=g.minute){super(t,e)}static fromString(t,e=p.get(nt)){const r=e.parse(t),s=r.value.start;if(s!==void 0){const o=g.minute,i=new nt(Object.assign({...r},{value:Math.max(s,o.min)})),a=new nt(Object.assign({...r},{value:Math.min(r.value.end,o.max)}));return{start:i,end:a}}else return new nt(r)}}class st extends $t{constructor(t,e=g.second){super(t,e)}static fromString(t,e=g.second,r=p.get(st)){const s=r.parse(t),o=s.value.start;if(o!==void 0){const i=new st(Object.assign({...s},{value:Math.max(o,e.min)})),a=new st(Object.assign({...s},{value:Math.min(s.value.end,e.max)}));return{start:i,end:a}}else return new st(s,e)}}class un extends St{}class ds extends se{qualifier(){return""}}class ut extends me{static instance=new ut;static valueRenderer=new ds(X.default);static names=["year","month","day","hour","minute","second"];static qualifier(t,e){return t?e?"%":"?":e?"~":""}renderComponent(t,e){const r=t[e],s=ut.names.slice(ut.names.indexOf(e)+1).map(a=>t[a]).filter(Boolean),o=ut.qualifier(r.uncertainComponent,r.approximateComponent),i=ut.qualifier(r.uncertainGroup&&!r.uncertainComponent&&!s.some(a=>a.uncertain),r.approximateGroup&&!r.approximateComponent&&!s.some(a=>a.approximate));return o+r.toString(ut.valueRenderer)+i}}class cn extends Oe{constructor(t){super(t)}newYear(t){return new Q(t,this.units.year)}newMonth(t){return new tt(t,this.units.month)}newDay(t){return new et(t,this.units.day)}newHour(t){return new rt(t,this.units.hour)}newMinute(t){return new nt(t,this.units.minute)}newSecond(t){return new st(t,this.units.second)}newMillisecond(t){return new wt(t,this.units.millisecond)}newTimeshift(t){return new un(typeof t=="number"?t:t.value)}}const ls=new cn(Re),ms=new cn(ne);class U extends P{constructor(t){super(t)}toString(t=ut.instance){return super.toString(t)}get year(){return super.year}set year(t){super.year=t}get month(){return super.month}set month(t){super.month=t}get factory(){return ls}static fromDate(t){return new U({year:t.getFullYear(),month:t.getMonth()+1,day:t.getDate(),hour:t.getHours(),minute:t.getMinutes(),second:t.getSeconds(),timeshift:O.timeshiftOf(t)})}static fromString(t,e=p.get(U)){const r=e.parse(t);return new U(r)}static newInstance(){const t=new Date().toISOString(),e=t.indexOf("."),r=t.substring(0,e)+t.substring(e+4);return U.fromString(r)}clone(){return new U(this.toSpec())}}class ot{regExp;constructor(t,e){this.name=t,this.regExp=new RegExp(`^(?:${e})$`)}regexGroups(t){const e=this.regExp.exec(t);if(!e)throw new B(`Invalid ${this.name} "${t}"`);return e.groups}parseGroups(t){throw new bt(`${this.constructor.name} is abstract`)}parse(t){const e=this.regexGroups(t);return this.parseGroups(e)}}class At extends he{static instance=new At;static designators=[["years","Y"],["months","MM"],["days","D"],["hours","H"],["minutes","M"],["seconds","S"]];static qualifier(t,e){return t?e?"%":"?":e?"~":""}render(t){const e=At.qualifier(t.uncertainDuration,t.approximateDuration);if(!t.hasQualifiedComponent)return e+super.render(t);let r=e+"P";for(const[s,o]of At.designators){const i=t.components[s];i&&(r+=At.qualifier(i.uncertainComponent,i.approximateComponent)+i.value+o)}return r}}class G extends I{#t;constructor(t){if(super(typeof t=="number"?t:{value:G.valueFromSpec(t),uncertain:t.uncertain===!0,approximate:t.approximate===!0},ne.millisecond),typeof t!="number"){const e={};for(const r of G.componentNames)t[r]instanceof Y&&(e[r]=t[r]);Object.keys(e).length>0&&(this.#t=e)}}static componentNames=["years","months","days","hours","minutes","seconds"];get components(){return this.#t}#e(t){return this.#t?Object.values(this.#t).some(e=>e[t]):!1}get uncertainDuration(){return super.uncertain}get approximateDuration(){return super.approximate}get uncertain(){return super.uncertain||this.#e("uncertain")}set uncertain(t){super.uncertain=t}get approximate(){return super.approximate||this.#e("approximate")}set approximate(t){super.approximate=t}get hasQualifiedComponent(){return this.#t?Object.values(this.#t).some(t=>t.uncertainComponent||t.approximateComponent):!1}static valueFromSpec(t){return G.getValue(t,V.year)+G.getValue(t,V.month)+G.getValue(t,V.day)+G.getValue(t,V.hour)+G.getValue(t,V.minute)+G.getValue(t,V.second)}static toSpec(t,e=ms){const r=I.toSpec(t,e);if(t instanceof G&&t.hasQualifiedComponent)for(const s of G.componentNames)delete r[s],t.components[s]&&(r[s]=t.components[s]);return r}static fromString(t,e=p.get(G)){const r=e.parse(t);return new G(r)}static between(t,e){const r=e.getTime(),s=t.getTime();return new G(r-s)}toSpec(){return G.toSpec(this)}toString(t=At.instance){return super.toString(t)}}class Ut extends Pt{get start(){return this._start}set start(t){if(typeof t=="string"&&(super.start=U.fromString(t)),t&&!(t instanceof U)&&!(t instanceof G))throw new B("Interval start is not a level 2 date or duration: "+t);this._start=t}get end(){return this._end}set end(t){if(typeof t=="string"&&(t=U.fromString(t)),t&&!(t instanceof U)&&!(t instanceof G))throw new B("Interval end is not a level 2 date or duration: "+t);this._end=t}static fromString(t,e=p.get(Ut)){const{start:r,end:s}=e.parse(t);return new Ut(r,s)}}class de extends Set{constructor(t,e){super(t),this.exclusive=e}has(t){const e=t.toString().replace("..","/");for(const r of this)if(r.toString()===e)return!0;return!1}static fromString(t,e=p.get(de)){const{exclusive:r,values:s}=e.parse(t);return new de(s,r)}}class it extends ot{constructor(t,e){super(t,e)}static read(t){return{value:t?parseInt(t,10):void 0}}parseGroups(t){return it.read(t[this.name])}parse(t){if(t.startsWith("-"))throw new B(`${this.name} cannot be negative`);return super.parse(t)}}class u{static groupName(...t){return t.reduce((e,r)=>e?e+r.charAt(0).toUpperCase()+r.substring(1):r,"")}static group(t,...e){return`(?<${t}>${e.join("")})`}static optional(t){return t+"?"}static nonCapturingGroup(...t){return`(?:${t.join("")})`}static optionalGroup(t,...e){return u.optional(u.group(t,...e))}static optionalNonCapturingGroup(...t){return u.optional(u.nonCapturingGroup(...t))}static numberGroup(t,e,r,s="\\d"){return u.group(t,`${r||""}[${s}]${e}`)}}const Qe="yearValue";class Bt extends it{static format(t=""){return u.numberGroup(u.groupName(t,Qe),"{4}",void 0)}constructor(){super(Qe,Bt.format())}}const tr="monthValue";class Ct extends it{static format(t=""){return u.numberGroup(u.groupName(t,tr),"{1,2}",void 0)}constructor(){super(tr,Ct.format())}}const er="dayValue";class _t extends it{static format(t=""){return u.numberGroup(u.groupName(t,er),"{1,2}",void 0)}constructor(){super(er,_t.format())}}const rr="hourValue";class Tt extends it{static format(t=""){return u.numberGroup(u.groupName(t,rr),"{1,2}",void 0)}constructor(){super(rr,Tt.format())}}const nr="minuteValue";class jt extends it{static format(t=""){return u.numberGroup(u.groupName(t,nr),"{1,2}",void 0)}constructor(){super(nr,jt.format())}}const sr="secondValue";class Ht extends it{static format(t=""){return u.numberGroup(u.groupName(t,sr),"{1,2}",void 0)}constructor(){super(sr,Ht.format())}}const or="timeshiftValue",ir="shiftHour",ar="shiftMinute";class Ot extends ot{static format(t=""){return Ze.map(e=>e.name).join("|")+"|"+u.nonCapturingGroup(u.group(t+ir,u.numberGroup(u.groupName(t,or),"{2}","[+-]")),u.optionalNonCapturingGroup(":?",u.numberGroup(u.groupName(t,ar),"{2}",void 0)))}constructor(){super(or,Ot.format())}parse(t,e){let r=0;const s=Ze.find(o=>o.name===t);if(s){if(typeof s.timeshift=="function")try{return s.timeshift(e??{})}catch(o){throw new B(`The time zone ${t} depends on the date: ${o.message}`)}t=s.timeshift}if(t!=="Z"){const o=this.regexGroups(t),i=o[ir];i&&(r+=parseInt(i,10)*60);const a=o[ar];a&&(r+=parseInt(a,10))}return r}}const ur="year",cr="month",dr="day",lr="hour",mr="minute",pr="second",hr="millisecond",fr="timeshift";class Et extends ot{static format(t=""){return u.group(u.groupName(t,ur),Bt.format(t))+u.optionalNonCapturingGroup("-",u.group(u.groupName(t,cr),Ct.format(t)),u.optionalNonCapturingGroup("-",u.group(u.groupName(t,dr),_t.format(t)),u.optionalNonCapturingGroup("[T ]",u.group(u.groupName(t,lr),Tt.format(t)),":?",u.group(u.groupName(t,mr),jt.format(t)),u.optionalNonCapturingGroup(":",u.group(u.groupName(t,pr),Ht.format(t)),u.optionalNonCapturingGroup("[.,]",u.group(u.groupName(t,hr),"\\d+"))),"\\s*",u.optionalGroup(u.groupName(t,fr),Ot.format(t)))))}constructor(){super("date",Et.format())}parse(t){const e=this.regexGroups(t),r=e[ur],s=e[cr],o=e[dr],i=e[lr],a=e[mr],l=e[pr],c=e[hr],m=e[fr],h=r?new Nt(Bt.read(r)):void 0,w=s?Ct.read(s):void 0;return{year:h,month:w?new Gt(w,vt.create(w.value,h?.value)):void 0,day:o?new It(_t.read(o)):void 0,hour:i?new Rt(Tt.read(i)):void 0,minute:a?new Vt(jt.read(a)):void 0,second:l?new kt(Ht.read(l)):void 0,millisecond:c?wt.parseFraction(c):void 0,timeshift:m?gt.fromString(m,new Ot,{year:h?.value,month:w?.value,day:o?_t.read(o).value:void 0,hour:i?Tt.read(i).value:void 0}):void 0}}}const gr="years",be="months",ps="days",wr="hours",br="minutes",Er="seconds";class Fe extends ot{static format(t=""){return"P"+u.optionalNonCapturingGroup(u.numberGroup(u.groupName(t,gr),"+",void 0,"\\d"),"Y")+u.optionalNonCapturingGroup(u.numberGroup(u.groupName(t,be),"+",void 0,"\\d"),"MM")+u.optionalNonCapturingGroup(u.numberGroup(u.groupName(t,ps),"+",void 0,"\\d"),"D")+u.optionalNonCapturingGroup(u.numberGroup(u.groupName(t,wr),"+",void 0,"\\d"),"H")+u.optionalNonCapturingGroup(u.numberGroup(u.groupName(t,br),"+",void 0,"\\d"),"M")+u.optionalNonCapturingGroup(u.numberGroup(u.groupName(t,Er),"+",void 0,"\\d"),"S")}constructor(){super("duration",Fe.format())}parseGroups(t){return{years:t[gr],months:t[be],days:t[be],hours:t[wr],minutes:t[br],seconds:t[Er]}}}const Ee="start",ye="end";class De extends ot{static format=u.group(Ee,Et.format(Ee))+"/"+u.group(ye,Et.format(ye));constructor(){super("interval",De.format)}parse(t){const e=this.regexGroups(t),r=e[Ee],s=e[ye];return{start:r?O.fromString(r,new Et):void 0,end:s?O.fromString(s,new Et):void 0}}}p.register(O,()=>new Et);p.register(It,()=>new _t);p.register(L,()=>new Fe);p.register(Rt,()=>new Tt);p.register(Dt,()=>new De);p.register(Vt,()=>new jt);p.register(Gt,()=>new Ct);p.register(kt,()=>new Ht);p.register(gt,()=>new Ot);p.register(Nt,()=>new Bt);class M extends it{static uncertainGroup="uncertain";static approximateGroup="approx";static uncertainAndApproximateGroup=M.uncertainGroup+M.approximateGroup;constructor(t,e){super(t,e)}static qualifierFormat(t,e){return u.optionalGroup(t,`\\${e}`)}static formatSuffix(t){return this.qualifierFormat(u.groupName(M.uncertainGroup,t),"?")+this.qualifierFormat(u.groupName(M.approximateGroup,t),"~")+this.qualifierFormat(u.groupName(M.uncertainAndApproximateGroup,t),"%")}static numberFormat(t,e,r){return u.numberGroup(t,e,r,"\\dX")+this.formatSuffix(t)}getValueAndSign(t){let e=t[this.name],r;return e.charAt(0)==="-"?(r=-1,e=e.substring(1)):r=1,{valueStr:e,sign:r}}parseGroups(t){const{valueStr:e,sign:r}=this.getValueAndSign(t);let s=0,o;for(o=0;o<e.length;o++){const c=e[o];if(c==="X")break;s=s*10+parseInt(c,10)}if(o<e.length){let c=1;for(let w=0;w<e.length-o;w++)c*=10;const m=r*s*c,h=m+c-1;s={start:m,end:h}}else s*=r;const i=t[u.groupName(M.uncertainAndApproximateGroup,this.name)],a=t[u.groupName(M.approximateGroup,this.name)]||i,l=t[u.groupName(M.uncertainGroup,this.name)]||i;return{value:s,approximate:a?!!a:!1,uncertain:l?!!l:!1}}}const yr="yearValue";class Lt extends M{constructor(){super(yr,Lt.format())}static format(t=""){return"Y?"+M.numberFormat(u.groupName(t,yr),"+","[-]?")}parse(t){const e=this.regexGroups(t);return this.parseGroups(e)}}const Sr="monthValue";class Kt extends M{static format(t=""){return M.numberFormat(u.groupName(t,Sr),"{1,2}",void 0)}constructor(){super(Sr,Kt.format())}}const xr="dayValue";class zt extends M{static format(t=""){return M.numberFormat(u.groupName(t,xr),"{1,2}",void 0)}constructor(){super(xr,zt.format())}}const Mr="hourValue";class qt extends M{static format(t=""){return M.numberFormat(u.groupName(t,Mr),"{1,2}",void 0)}constructor(){super(Mr,qt.format())}}const vr="minuteValue";class Wt extends M{static format(t=""){return M.numberFormat(u.groupName(t,vr),"{1,2}",void 0)}constructor(){super(vr,Wt.format())}}const Ar="secondValue";class Yt extends M{static format(t=""){return M.numberFormat(u.groupName(t,Ar),"{1,2}",void 0)}constructor(){super(Ar,Yt.format())}}class Xt extends Ot{}class A extends ot{static yearGroup="year";static monthGroup="month";static dayGroup="day";static hourGroup="hour";static minuteGroup="minute";static secondGroup="second";static millisecondGroup="millisecond";static timeshiftGroup="timeshift";constructor(t=A.format()){super("date",t)}static format(t=""){return u.group(u.groupName(t,A.yearGroup),Lt.format(t))+u.optionalNonCapturingGroup("-",u.group(u.groupName(t,A.monthGroup),Kt.format(t)),u.optionalNonCapturingGroup("-",u.group(u.groupName(t,A.dayGroup),zt.format(t)),u.optionalNonCapturingGroup("[T ]",u.group(u.groupName(t,A.hourGroup),qt.format(t)),":",u.group(u.groupName(t,A.minuteGroup),Wt.format(t)),u.optionalNonCapturingGroup(":",u.group(u.groupName(t,A.secondGroup),Yt.format(t)),u.optionalNonCapturingGroup("[.,]",u.group(u.groupName(t,A.millisecondGroup),"\\d+"))),u.optionalGroup(u.groupName(t,A.timeshiftGroup),Xt.format(t)))))}parseGroups(t){const e=t[A.millisecondGroup],r=e?wt.parseFraction(e):void 0,s=t[A.secondGroup],o=s?ft.fromString(s,new Yt):void 0,i=t[A.minuteGroup];let a;i&&(a=ht.fromString(i,new Wt),a.uncertain=a.uncertain||o?.uncertain||!1,a.approximate=a.approximate||o?.approximate||!1);const l=t[A.hourGroup];let c;l&&(c=pt.fromString(l,new qt),c.uncertain=c.uncertain||a?.uncertain||!1,c.approximate=c.approximate||a?.approximate||!1);const m=t[A.dayGroup];let h;m&&(h=mt.fromString(m,new zt),h.uncertain=h.uncertain||c?.uncertain||!1,h.approximate=h.approximate||c?.approximate||!1);const w=t[A.monthGroup];let b;w&&(b=lt.fromString(w,new Kt),b.uncertain=b.uncertain||h?.uncertain||!1,b.approximate=b.approximate||h?.approximate||!1);const _=t[A.yearGroup];let S;_&&(S=dt.fromString(_,void 0,new Lt),S.uncertain=S.uncertain||b?.uncertain||!1,S.approximate=S.approximate||b?.approximate||!1);const D=t[A.timeshiftGroup],at=D?St.fromString(D,new Xt,{year:S?.value,month:b?.value,day:h?.value,hour:c?.value}):void 0;return{year:S,month:b,day:h,hour:c,minute:a,second:o,millisecond:r,timeshift:at}}}const _r="years",Tr="months",Nr="days",Gr="hours",Ir="minutes",Rr="seconds";class yt extends M{static format(t=""){return"P"+u.optionalNonCapturingGroup(u.numberGroup(u.groupName(t,_r),"+",void 0,"\\d"),"Y")+u.optionalNonCapturingGroup(u.numberGroup(u.groupName(t,Tr),"+",void 0,"\\d"),"MM")+u.optionalNonCapturingGroup(u.numberGroup(u.groupName(t,Nr),"+",void 0,"\\d"),"D")+u.optionalNonCapturingGroup(u.numberGroup(u.groupName(t,Gr),"+",void 0,"\\d"),"H")+u.optionalNonCapturingGroup(u.numberGroup(u.groupName(t,Ir),"+",void 0,"\\d"),"M")+u.optionalNonCapturingGroup(u.numberGroup(u.groupName(t,Rr),"+",void 0,"\\d"),"S")+this.formatSuffix(t)}constructor(){super("duration",yt.format())}parseGroups(t){return{years:t[_r],months:t[Tr],days:t[Nr],hours:t[Gr],minutes:t[Ir],seconds:t[Rr],uncertain:!!t[M.uncertainGroup],approximate:!!t[M.approximateGroup]}}}const hs="dates",Se="start",xe="end",Vr="durations",Me="durationMin",ve="durationMax";class Pe extends ot{static format=u.group(hs,u.optionalGroup(Se,u.group("openStart","\\.\\.")+"|"+A.format(Se))+"/"+u.optionalGroup(xe,u.group("openEnd","\\.\\.")+"|"+A.format(xe)))+"|"+u.group(Vr,u.group(Me,yt.format(Me))+"/"+u.group(ve,yt.format(ve)));constructor(t="interval",e=Pe.format){super(t,e)}parseGroups(t){let e,r;if(t[Vr]){const o=t[Me];e=I.fromString(o,new yt);const i=t[ve];r=I.fromString(i,new yt)}else{const o=t[Se];switch(o){case void 0:e=null;break;case"..":e=void 0;break;default:e=P.fromString(o,new A)}const i=t[xe];switch(i){case void 0:r=null;break;case"..":r=void 0;break;default:r=P.fromString(i,new A)}}return{start:e,end:r}}}p.register(P,()=>new A);p.register(mt,()=>new zt);p.register(I,()=>new yt);p.register(pt,()=>new qt);p.register(Pt,()=>new Pe);p.register(ht,()=>new Wt);p.register(lt,()=>new Kt);p.register(ft,()=>new Yt);p.register(St,()=>new Xt);p.register(dt,()=>new Lt);class E extends M{static uncertainGroup="uncertain1";static approximateGroup="approx1";static uncertainAndApproximateGroup=E.uncertainGroup+E.approximateGroup;constructor(t,e){super(t,e)}static numberFormat(t,e,r){return this.qualifierFormat(u.groupName(E.uncertainGroup,t),"?")+this.qualifierFormat(u.groupName(E.approximateGroup,t),"~")+this.qualifierFormat(u.groupName(E.uncertainAndApproximateGroup,t),"%")+M.numberFormat(t,e,r)}parseGroups(t){const e=super.parseGroups(t),r=t[u.groupName(E.uncertainAndApproximateGroup,this.name)];return(t[u.groupName(E.uncertainGroup,this.name)]||r)&&(e.uncertainComponent=!0),(t[u.groupName(E.approximateGroup,this.name)]||r)&&(e.approximateComponent=!0),e}}const Ft="yearValue",kr="exp",Or="signif";class Jt extends E{constructor(){super(Ft,Jt.format())}static format(t=""){return"Y?"+u.nonCapturingGroup(u.group(u.groupName(t,kr),"[-]?\\d+E\\d+")+"|"+E.numberFormat(u.groupName(t,Ft),"+","[-]?")+u.optionalGroup(u.groupName(t,Or),"S\\d+"))}parseGroups(t){const e=t[kr];if(e){const i=e.indexOf("E"),a=parseInt(e.substring(i+1),10),c=parseInt(e.substring(0,i),10)*Math.pow(10,a);t[Ft]=c.toString()}const r=t[Or],s=t[Ft];if(r){const i=parseInt(r.substring(1),10),{valueStr:a,sign:l}=this.getValueAndSign(t);let c="";for(let m=0;m<a.length;m++)c+=m<i?a.charAt(m):"X";t[Ft]=(l<0?"-":"")+c}const o=super.parseGroups(t);return r&&(o.value.estimate=parseInt(s,10)),o}parse(t){const e=this.regexGroups(t);return this.parseGroups(e)}}const $r="monthValue";class Zt extends E{static format(t=""){return E.numberFormat(u.groupName(t,$r),"{1,2}",void 0)}constructor(){super($r,Zt.format())}}const Fr="dayValue";class Qt extends E{static format(t=""){return E.numberFormat(u.groupName(t,Fr),"{1,2}",void 0)}constructor(){super(Fr,Qt.format())}}const Dr="hourValue";class te extends E{static format(t=""){return E.numberFormat(u.groupName(t,Dr),"{1,2}",void 0)}constructor(){super(Dr,te.format())}}const Pr="secondValue";class ee extends E{static format(t=""){return E.numberFormat(u.groupName(t,Pr),"{1,2}",void 0)}constructor(){super(Pr,ee.format())}}const Ur="minuteValue";class re extends E{static format(t=""){return E.numberFormat(u.groupName(t,Ur),"{1,2}",void 0)}constructor(){super(Ur,re.format())}}class fs extends Xt{}class y extends ot{static yearGroup=A.yearGroup;static monthGroup="month";static dayGroup="day";static hourGroup="hour";static minuteGroup="minute";static secondGroup="second";static millisecondGroup="millisecond";static timeshiftGroup="timeshift";constructor(){super("date",y.format())}static format(t=""){return u.group(u.groupName(t,y.yearGroup),Jt.format(t))+u.optionalNonCapturingGroup("-",u.group(u.groupName(t,y.monthGroup),Zt.format(t)),u.optionalNonCapturingGroup("-",u.group(u.groupName(t,y.dayGroup),Qt.format(t)),u.optionalNonCapturingGroup("[T ]",u.group(u.groupName(t,y.hourGroup),te.format(t)),":",u.group(u.groupName(t,y.minuteGroup),re.format(t)),u.optionalNonCapturingGroup(":",u.group(u.groupName(t,y.secondGroup),ee.format(t)),u.optionalNonCapturingGroup("[.,]",u.group(u.groupName(t,y.millisecondGroup),"\\d+"))),u.optionalGroup(u.groupName(t,y.timeshiftGroup),fs.format(t)))))}parseGroups(t){const e=t[y.millisecondGroup],r=e?wt.parseFraction(e):void 0,s=t[y.secondGroup];let o;s&&(o=st.fromString(s,void 0,new ee),o.uncertain=o?.uncertain||!1,o.approximate=o?.approximate||!1);const i=t[y.minuteGroup];let a;i&&(a=nt.fromString(i,new re),a.uncertain=a.uncertain||o?.uncertain||!1,a.approximate=a.approximate||o?.approximate||!1);const l=t[y.hourGroup];let c;l&&(c=rt.fromString(l,new te),c.uncertain=c.uncertain||a?.uncertain||!1,c.approximate=c.approximate||a?.approximate||!1);const m=t[y.dayGroup];let h;m&&(h=et.fromString(m,new Qt),h.uncertain=h.uncertain||c?.uncertain||!1,h.approximate=h.approximate||c?.approximate||!1);const w=t[y.monthGroup];let b;w&&(b=tt.fromString(w,new Zt),b.uncertain=b.uncertain||h?.uncertain||!1,b.approximate=b.approximate||h?.approximate||!1);const _=t[y.yearGroup];let S;_&&(S=Q.fromString(_,void 0,new Jt),S.uncertain=S.uncertain||b?.uncertain||!1,S.approximate=S.approximate||b?.approximate||!1);const D=t[y.timeshiftGroup],at=D?un.fromString(D,new Xt,{year:S?.value,month:b?.value,day:h?.value,hour:c?.value}):void 0;return{year:S,month:b,day:h,hour:c,minute:a,second:o,millisecond:r,timeshift:at}}}const Br="durationValue";class Ue extends E{static format(t=""){return"^"+E.numberFormat(u.groupName(t,Br),"+",void 0)}constructor(){super(Br,Ue.format())}}class gs extends ke{millisecond=new x("millisecond",0,Number.MAX_SAFE_INTEGER,void 0);second=new x("second",0,Number.MAX_SAFE_INTEGER,this.millisecond);minute=new x("minute",0,Number.MAX_SAFE_INTEGER,this.second);hour=new x("hour",0,Number.MAX_SAFE_INTEGER,this.minute);day=new x("day",1,Number.MAX_SAFE_INTEGER,this.hour);month=new x("month",1,Number.MAX_SAFE_INTEGER,this.day);year=new x("year",0,Number.MAX_SAFE_INTEGER,this.month)}const Mt=new gs;class f extends E{static yearsGroup="years";static monthsGroup="months";static isoMonthsGroup="isoMonths";static daysGroup="days";static hoursGroup="hours";static minutesGroup="minutes";static secondsGroup="seconds";static durationGroup="duration";static suffixGroup="durationSuffix";static componentParser=new Ue;static componentFormat(t,e,r,s,o=""){const i=u.group(u.groupName(t,f.quantityGroup(e)),E.numberFormat(u.groupName(t,r),"+",void 0,"\\d"));return u.group(u.groupName(t,e),i,s,o)}static quantityGroup(t){return t+"Quantity"}static isoMonthsLookahead="(?=[?~%]?\\d+D|T)";constructor(){super("duration",f.format())}static format(t=""){const e=u.groupName(t,f.durationGroup);return this.qualifierFormat(u.groupName(E.uncertainGroup,e),"?")+this.qualifierFormat(u.groupName(E.approximateGroup,e),"~")+this.qualifierFormat(u.groupName(E.uncertainAndApproximateGroup,e),"%")+"P"+u.optional(f.componentFormat(t,f.yearsGroup,y.yearGroup,"Y"))+u.optionalNonCapturingGroup(f.componentFormat(t,f.monthsGroup,y.monthGroup,"MM")+"|"+f.componentFormat(t,f.isoMonthsGroup,"isoMonth","M",f.isoMonthsLookahead))+u.optional(f.componentFormat(t,f.daysGroup,y.dayGroup,"D"))+"T?"+u.optional(f.componentFormat(t,f.hoursGroup,y.hourGroup,"H"))+u.optional(f.componentFormat(t,f.minutesGroup,y.minuteGroup,"M"))+u.optional(f.componentFormat(t,f.secondsGroup,y.secondGroup,"S"))+u.optionalGroup(u.groupName(t,f.suffixGroup),"[?~%]")}static parseComponent(t,e,r){const s=f.componentParser.parse(t);return new e(s,r)}parseGroups(t){const e=t[f.quantityGroup(f.secondsGroup)];let r;e&&(r=f.parseComponent(e,st,Mt.second),r.uncertain=!!t[u.groupName(E.uncertainGroup,f.secondsGroup)]||!1,r.approximate=!!t[u.groupName(E.approximateGroup,f.secondsGroup)]||!1);const s=t[f.quantityGroup(f.minutesGroup)];let o;s&&(o=f.parseComponent(s,nt,Mt.minute),o.uncertain=o.uncertain||r?.uncertain||!1,o.approximate=o.approximate||r?.approximate||!1);const i=t[f.quantityGroup(f.hoursGroup)];let a;i&&(a=f.parseComponent(i,rt,Mt.hour),a.uncertain=a.uncertain||o?.uncertain||!1,a.approximate=a.approximate||o?.approximate||!1);const l=t[f.quantityGroup(f.daysGroup)];let c;l&&(c=f.parseComponent(l,et,Mt.day),c.uncertain=c.uncertain||a?.uncertain||!1,c.approximate=c.approximate||a?.approximate||!1);const m=t[f.quantityGroup(f.monthsGroup)]||t[f.quantityGroup(f.isoMonthsGroup)];let h;m&&(h=f.parseComponent(m,tt,Mt.month),h.uncertain=h.uncertain||c?.uncertain||!1,h.approximate=h.approximate||c?.approximate||!1);const w=t[f.quantityGroup(f.yearsGroup)];let b;w&&(b=f.parseComponent(w,Q,Mt.year),b.uncertain=b.uncertain||h?.uncertain||!1,b.approximate=b.approximate||h?.approximate||!1);const _=t[f.suffixGroup],S=!!t[u.groupName(E.uncertainAndApproximateGroup,f.durationGroup)]||_==="%",D=S||!!t[u.groupName(E.uncertainGroup,f.durationGroup)]||_==="?",at=S||!!t[u.groupName(E.approximateGroup,f.durationGroup)]||_==="~";return{years:b,months:h,days:c,hours:a,minutes:o,seconds:r,uncertain:D,approximate:at}}}const ws="dates",Ae="start",_e="end",Cr="durations",Te="durationMin",Ne="durationMax";class fe extends ot{static format=u.group(ws,u.optionalGroup(Ae,u.group("openStart","\\.\\.")+"|"+y.format(Ae))+"/"+u.optionalGroup(_e,u.group("openEnd","\\.\\.")+"|"+y.format(_e)))+"|"+u.group(Cr,u.group(Te,f.format(Te))+"/"+u.group(Ne,f.format(Ne)));constructor(t="interval",e=fe.format){super(t,e)}parseGroups(t){let e,r;if(t[Cr]){const o=t[Te];e=G.fromString(o,new f);const i=t[Ne];r=G.fromString(i,new f)}else{const o=t[Ae];switch(o){case void 0:e=null;break;case"..":e=void 0;break;default:e=U.fromString(o,new y)}const i=t[_e];switch(i){case void 0:r=null;break;case"..":r=void 0;break;default:r=U.fromString(i,new y)}}return{start:e,end:r}}}class bs{parse(t){t=t.trim();const e=t.startsWith("["),s=t.substring(1,t.length-1).split(","),o=[];for(const i of s){let a;i.includes("..")?a=Ut.fromString(i.replace("..","/"),new fe):a=U.fromString(i,new y),o.push(a)}return{values:o,exclusive:e}}}p.register(U,()=>new y);p.register(et,()=>new Qt);p.register(G,()=>new f);p.register(rt,()=>new te);p.register(Ut,()=>new fe);p.register(nt,()=>new re);p.register(tt,()=>new Zt);p.register(st,()=>new ee);p.register(de,()=>new bs);p.register(Q,()=>new Jt);class Z{constructor(t){this.preferences=t}read(t){var e,r;if(t===void 0)return;if(typeof t=="string")return t===""?void 0:t;for(const o of this.preferences){const i=(e=t[o])!==null&&e!==void 0?e:t[Z.base(o)];if(i)return i}const s=new Set(this.preferences.map(o=>Z.base(o)));for(const[o,i]of Object.entries(t))if(i&&s.has(Z.base(o)))return i;return(r=Object.values(t).find(o=>o))!==null&&r!==void 0?r:void 0}write(t,e,r){var s,o;const i=e?.trim()?e.trim():void 0;if(t===void 0||typeof t=="string")return i;const a={...t},l=(o=(s=Object.keys(a).find(c=>c===r))!==null&&s!==void 0?s:Object.keys(a).find(c=>Z.base(c)===Z.base(r)))!==null&&o!==void 0?o:r;return i===void 0?delete a[l]:a[l]=i,Object.keys(a).length===0?void 0:a}static base(t){return t.toLowerCase().split("-")[0]}}Z.any=new Z([]);var jr;(function(n){n.abductee="abductee",n.actor="actor",n.artist="artist",n.anthropologist="anthropologist",n.archeologist="archeologist",n.astronaut="astronaut",n.astronomer="astronomer",n.astrologist="astrologist",n.astrophysicist="astrophysicist",n.banker="banker",n.barman="barman",n.biologist="biologist",n.biochemist="biochemist",n.biophysicist="biophysicist",n.bishop="bishop",n.businessman="businessman",n.botanist="botanist",n.cameraman="cameraman",n.chemist="chemist",n.contactee="contactee",n.cryptozoologist="cryptozoologist",n.dentist="dentist",n.director="director",n.diplomat="diplomat",n.diver="diver",n.electronics="electronics",n.engineer="engineer",n.ethnologist="ethnologist",n.exobiologist="exobiologist",n.farmer="farmer",n.firefighter="firefighter",n.flightAttendant="flightAttendant",n.geologist="geologist",n.geophysicist="geophysicist",n.geographer="geographer",n.historian="historian",n.houseWife="houseWife",n.hypnotherapist="hypnotherapist",n.illusionist="illusionist",n.journalist="journalist",n.judge="judge",n.lawyer="lawyer",n.leader="leader",n.librarian="librarian",n.logger="logger",n.mathematician="mathematician",n.mechanic="mechanic",n.meteorologist="meteorologist",n.military="military",n.musician="musician",n.neurologist="neurologist",n.neuroscientist="neuroscientist",n.neuropsychiatrist="neuropsychiatrist",n.nurse="nurse",n.oceanographer="oceanographer",n.painter="painter",n.parapsychologist="parapsychologist",n.philosopher="philosopher",n.photographer="photographer",n.physician="physician",n.physicist="physicist",n.pilot="pilot",n.politician="politician",n.policeman="policeman",n.priest="priest",n.producer="producer",n.prospector="prospector",n.psychologist="psychologist",n.psychiatrist="psychiatrist",n.radioastronomer="radioastronomer",n.radioamateur="radioamateur",n.salesman="salesman",n.sailor="sailor",n.sociologist="sociologist",n.softwareEngineer="softwareEngineer",n.stuntman="stuntman",n.taxiDriver="taxiDriver",n.teacher="teacher",n.telegrapher="telegrapher",n.truckDriver="truckDriver",n.ufologist="ufologist",n.ufoWitness="ufoWitness",n.ufoWitness2="ufoWitness2",n.worker="worker",n.writer="writer"})(jr||(jr={}));var Hr;(function(n){n.neutral="neutral",n.male="male",n.female="female"})(Hr||(Hr={}));class Es extends Error{constructor(t,e){super(t),this.cause=e}}class Be extends Es{constructor(t=Be.defaultMessage,e){super(t,e)}}Be.defaultMessage="Assertion failed";var Lr;(function(n){n.country="country",n.region="region",n.department="department",n.city="city",n.company="company"})(Lr||(Lr={}));var Kr;(function(n){n.at="at",n.au="au",n.ar="ar",n.be="be",n.br="br",n.ca="ca",n.ch="ch",n.cn="cn",n.cl="cl",n.co="co",n.cy="cy",n.de="de",n.dk="dk",n.do="do",n.dz="dz",n.gr="gr",n.ec="ec",n.eg="eg",n.es="es",n.fi="fi",n.fr="fr",n.ga="ga",n.ge="ge",n.hu="hu",n.in="in",n.ie="ie",n.ir="ir",n.il="il",n.it="it",n.jp="jp",n.kr="kr",n.ma="ma",n.mx="mx",n.my="my",n.mz="mz",n.nl="nl",n.no="no",n.nz="nz",n.pa="pa",n.pe="pe",n.ph="ph",n.pl="pl",n.pt="pt",n.ro="ro",n.ru="ru",n.sc="sc",n.tr="tr",n.ua="ua",n.uk="uk",n.us="us",n.sa="sa",n.se="se",n.su="su",n.tn="tn",n.tw="tw",n.ve="ve",n.za="za"})(Kr||(Kr={}));function ys(n,t){for(const e of n){const r=e.toLowerCase().split("-")[0];if(t.includes(r))return r}return"en"}class zr{static preferencesFor(t){const e=navigator.languages??[],r=this.declaredFor(t);return r?[r,...e]:e}static declaredFor(t){for(let e=t;e;){const r=e.closest("[lang]")?.getAttribute("lang")?.trim();if(r)return r;const s=e.getRootNode();e=s instanceof ShadowRoot?s.host:void 0}}}const Ss=["en","fr","es","it"],xs={en:()=>d(()=>import("./UfoMessages_en-D5OYWJ3K.js"),__vite__mapDeps([32,24]),import.meta.url).then(n=>n.ufoMessages_en),fr:()=>d(()=>import("./UfoMessages_fr-CGkQBn5r.js"),[],import.meta.url).then(n=>n.ufoMessages_fr),es:()=>d(()=>import("./UfoMessages_es-CO-v8Jl6.js"),[],import.meta.url).then(n=>n.ufoMessages_es),it:()=>d(()=>import("./UfoMessages_it-BScqxIaH.js"),[],import.meta.url).then(n=>n.ufoMessages_it)},Ys=T.catalog(xs),Ms={en:()=>d(()=>import("./SightingEditorMessages_en-k7_ua2OM.js"),__vite__mapDeps([33,34]),import.meta.url).then(n=>n.sightingEditorMessages_en),fr:()=>d(()=>import("./SightingEditorMessages_fr-B_K5hsuV.js"),__vite__mapDeps([35,36]),import.meta.url).then(n=>n.sightingEditorMessages_fr),es:()=>d(()=>import("./SightingEditorMessages_es-Drqbbr5_.js"),__vite__mapDeps([37,38]),import.meta.url).then(n=>n.sightingEditorMessages_es),it:()=>d(()=>import("./SightingEditorMessages_it-QCLg1d7x.js"),__vite__mapDeps([39,40]),import.meta.url).then(n=>n.sightingEditorMessages_it)},vs=T.catalog(Ms);function Xs(n){return vs.load(n)}const As={en:()=>d(()=>import("./SightingMessages_en-CzICxNU3.js"),__vite__mapDeps([41,34]),import.meta.url).then(n=>n.sightingMessages_en),fr:()=>d(()=>import("./SightingMessages_fr-nopOVDa1.js"),__vite__mapDeps([42,36]),import.meta.url).then(n=>n.sightingMessages_fr),es:()=>d(()=>import("./SightingMessages_es-CiVFZlgA.js"),__vite__mapDeps([43,38]),import.meta.url).then(n=>n.sightingMessages_es),it:()=>d(()=>import("./SightingMessages_it-Cu0nnPts.js"),__vite__mapDeps([44,40]),import.meta.url).then(n=>n.sightingMessages_it)},Js=T.catalog(As),_s={en:()=>d(()=>import("./CaseMessages_en-BC0lku35.js"),[],import.meta.url).then(n=>n.caseMessages_en),fr:()=>d(()=>import("./CaseMessages_fr-D_6J6ONO.js"),[],import.meta.url).then(n=>n.caseMessages_fr),es:()=>d(()=>import("./CaseMessages_es-Cbktn5vj.js"),[],import.meta.url).then(n=>n.caseMessages_es),it:()=>d(()=>import("./CaseMessages_it-CYyww4oG.js"),[],import.meta.url).then(n=>n.caseMessages_it)},Ts=T.catalog(_s);function Zs(n){return Ts.load(n)}const Ns={en:()=>d(()=>import("./UfoAtHomeMessages_en-BK2qJyZN.js"),[],import.meta.url).then(n=>n.ufoAtHomeMessages_en),fr:()=>d(()=>import("./UfoAtHomeMessages_fr-BTG047qo.js"),[],import.meta.url).then(n=>n.ufoAtHomeMessages_fr),es:()=>d(()=>import("./UfoAtHomeMessages_es-B1-NDCau.js"),[],import.meta.url).then(n=>n.ufoAtHomeMessages_es),it:()=>d(()=>import("./UfoAtHomeMessages_it-Ryxv4HNU.js"),[],import.meta.url).then(n=>n.ufoAtHomeMessages_it)},Gs=T.catalog(Ns);function Is(n){return Gs.load(n)}const Rs={en:()=>d(()=>import("./ShareMessages_en-B43x8LgJ.js"),[],import.meta.url).then(n=>n.shareMessages_en),fr:()=>d(()=>import("./ShareMessages_fr-CzZyVbbX.js"),[],import.meta.url).then(n=>n.shareMessages_fr),es:()=>d(()=>import("./ShareMessages_es-DZCJojSc.js"),[],import.meta.url).then(n=>n.shareMessages_es),it:()=>d(()=>import("./ShareMessages_it-C_Z6eDQK.js"),[],import.meta.url).then(n=>n.shareMessages_it)},Qs=T.catalog(Rs);function to(n){switch(n){case"fr":return d(()=>import("./TagNames_fr-Dnqq6HQ5.js"),[],import.meta.url).then(t=>t.tagNames_fr);case"es":return d(()=>import("./TagNames_es-BfnMpc3D.js"),[],import.meta.url).then(t=>t.tagNames_es);case"it":return d(()=>import("./TagNames_it-n6E4EGYO.js"),[],import.meta.url).then(t=>t.tagNames_it);default:return Promise.resolve({})}}const Vs={en:()=>d(()=>import("./BodyEditorMessages_en-CckxSS1L.js"),[],import.meta.url).then(n=>n.bodyEditorMessages_en),fr:()=>d(()=>import("./BodyEditorMessages_fr-638ypdqf.js"),[],import.meta.url).then(n=>n.bodyEditorMessages_fr),es:()=>d(()=>import("./BodyEditorMessages_es-B8GlFFBo.js"),[],import.meta.url).then(n=>n.bodyEditorMessages_es),it:()=>d(()=>import("./BodyEditorMessages_it-SKpMkHFI.js"),[],import.meta.url).then(n=>n.bodyEditorMessages_it)},ks={en:()=>d(()=>import("./CaseEditorMessages_en-pog3M_U6.js"),[],import.meta.url).then(n=>n.caseEditorMessages_en),fr:()=>d(()=>import("./CaseEditorMessages_fr-BOKVeIXM.js"),[],import.meta.url).then(n=>n.caseEditorMessages_fr),es:()=>d(()=>import("./CaseEditorMessages_es-Dz1N0VpM.js"),[],import.meta.url).then(n=>n.caseEditorMessages_es),it:()=>d(()=>import("./CaseEditorMessages_it-BKAkbKq-.js"),[],import.meta.url).then(n=>n.caseEditorMessages_it)},Os={en:()=>d(()=>import("./ReadingSensitivityMessages_en-ChQHFyxb.js"),[],import.meta.url).then(n=>n.readingSensitivityMessages_en),fr:()=>d(()=>import("./ReadingSensitivityMessages_fr-Dl4a8udu.js"),[],import.meta.url).then(n=>n.readingSensitivityMessages_fr),es:()=>d(()=>import("./ReadingSensitivityMessages_es-BbFqHsvR.js"),[],import.meta.url).then(n=>n.readingSensitivityMessages_es),it:()=>d(()=>import("./ReadingSensitivityMessages_it-CwiJfUo_.js"),[],import.meta.url).then(n=>n.readingSensitivityMessages_it)},eo=T.catalog(Os),$s={en:()=>d(()=>import("./ScenarioSweepMessages_en-Bf4BscDU.js"),[],import.meta.url).then(n=>n.scenarioSweepMessages_en),fr:()=>d(()=>import("./ScenarioSweepMessages_fr-DlPsO6oI.js"),[],import.meta.url).then(n=>n.scenarioSweepMessages_fr),es:()=>d(()=>import("./ScenarioSweepMessages_es-CBHQfuRB.js"),[],import.meta.url).then(n=>n.scenarioSweepMessages_es),it:()=>d(()=>import("./ScenarioSweepMessages_it-DANW3_la.js"),[],import.meta.url).then(n=>n.scenarioSweepMessages_it)},ro=T.catalog($s),Fs={en:()=>d(()=>import("./CaseExportMessages_en-jHlu58Y7.js"),[],import.meta.url).then(n=>n.caseExportMessages_en),fr:()=>d(()=>import("./CaseExportMessages_fr-sDfEgjWg.js"),[],import.meta.url).then(n=>n.caseExportMessages_fr),es:()=>d(()=>import("./CaseExportMessages_es-dCQQFgjq.js"),[],import.meta.url).then(n=>n.caseExportMessages_es),it:()=>d(()=>import("./CaseExportMessages_it-BJaglZtP.js"),[],import.meta.url).then(n=>n.caseExportMessages_it)},no=T.catalog(Fs),Ds={en:()=>d(()=>import("./InterviewMessages_en-BRmuWrAg.js"),[],import.meta.url).then(n=>n.interviewMessages_en),fr:()=>d(()=>import("./InterviewMessages_fr-DBCdGB0r.js"),[],import.meta.url).then(n=>n.interviewMessages_fr),es:()=>d(()=>import("./InterviewMessages_es-BTotimwY.js"),[],import.meta.url).then(n=>n.interviewMessages_es),it:()=>d(()=>import("./InterviewMessages_it-B5EyMD-k.js"),[],import.meta.url).then(n=>n.interviewMessages_it)},so=T.catalog(Ds),oo=T.catalog(ks),io=T.catalog(Vs),Ps=T.catalog({en:()=>d(()=>import("./SceneNames_en-7OZ7peGc.js"),__vite__mapDeps([45,7]),import.meta.url).then(n=>n.sceneNames_en),fr:()=>d(()=>import("./SceneNames_fr-qzw0QzD0.js"),__vite__mapDeps([46,7]),import.meta.url).then(n=>n.sceneNames_fr),es:()=>d(()=>import("./SceneNames_es-P5-Mavdi.js"),__vite__mapDeps([47,7]),import.meta.url).then(n=>n.sceneNames_es),it:()=>d(()=>import("./SceneNames_it-Sqf8JFOd.js"),__vite__mapDeps([48,7]),import.meta.url).then(n=>n.sceneNames_it)});function ao(n){return Ps.load(n)}const uo=T.catalog({en:()=>d(()=>import("./CloudEditorMessages_en-SmcRKW1O.js"),[],import.meta.url).then(n=>n.cloudEditorMessages_en),fr:()=>d(()=>import("./CloudEditorMessages_fr-SvL-CR04.js"),[],import.meta.url).then(n=>n.cloudEditorMessages_fr),es:()=>d(()=>import("./CloudEditorMessages_es-DFCuS9Qg.js"),[],import.meta.url).then(n=>n.cloudEditorMessages_es),it:()=>d(()=>import("./CloudEditorMessages_it-BvfiHWV9.js"),[],import.meta.url).then(n=>n.cloudEditorMessages_it)}),qr="rr0-ufoathome",Us='<svg viewBox="0 0 16 16" width="16" height="16" aria-hidden="true" fill="none" stroke="currentColor" stroke-width="1.7" stroke-linecap="round"><path d="M8 3v10M3 8h10"/></svg>',Bs='<svg viewBox="0 0 16 16" width="16" height="16" aria-hidden="true" fill="none" stroke="currentColor" stroke-width="1.7" stroke-linecap="round" stroke-linejoin="round"><path d="M2 4.5h4l1.5 1.5H14v6.5H2z"/></svg>',Cs=`
|
|
117
|
+
`}static show(t,e,r="info"){t.textContent=e??"",t.hidden=!e,t.classList.toggle(C.INFO,r==="info"),t.classList.toggle(C.WARNING,r==="warning"),t.classList.toggle(C.ERROR,r==="error")}}class z{static FORMAT=1;static read=new Map;static load(t,e=fetch.bind(globalThis)){const r=new URL(t,typeof location>"u"?void 0:location.href).href;let s=z.read.get(r);return s||(s=(async()=>{const o=await e(r);if(!o.ok)throw new Error(`${r}: HTTP ${o.status}`);return z.check(await o.json(),r)})(),s.catch(()=>z.read.delete(r)),z.read.set(r,s)),s}static check(t,e){const r=t;if(r===null||typeof r!="object"||!Array.isArray(r.starts))throw new Error(`${e}: not a UFO@home case template`);if(typeof r.format=="number"&&r.format>z.FORMAT)throw new Error(`${e}: format ${r.format} is newer than ${z.FORMAT}`);const s=a=>new URL(a,e).href,o=z.recipientOf(r.recipient,e),i=r.starts.filter(a=>typeof a?.id=="string").map(a=>({...a,...o?{recipient:o}:{},...a.questionnaires?{questionnaires:a.questionnaires.filter(l=>typeof l=="string").map(l=>z.isAddress(l)?s(l):l)}:{},...a.modules?{modules:a.modules.filter(l=>typeof l=="string").map(s)}:{}}));if(i.length===0)throw new Error(`${e}: a case template offers no start`);return{format:1,id:typeof r.id=="string"?r.id:e,title:r.title??r.id??e,...r.modules?{modules:r.modules.filter(a=>typeof a=="string").map(s)}:{},...o?{recipient:o}:{},starts:i,url:e}}static recipientOf(t,e){if(t===void 0)return;const r=t?.publicKey;if(typeof t.id!="string"||!r||r.kty!=="RSA"||typeof r.n!="string")throw new Error(`${e}: its recipient has no RSA public key`);if(r.d!==void 0)throw new Error(`${e}: its recipient gives a private key, which must never be published`);const{kty:s,n:o,e:i,alg:a}=r;return{id:t.id,name:t.name??t.id,publicKey:{kty:s,n:o,e:i,...a?{alg:a}:{}},...typeof t.email=="string"&&/^[^@\s]+@[^@\s]+$/.test(t.email)?{email:t.email}:{}}}static isAddress(t){return/[/:]|\.json$/i.test(t)}static step(t){return t.start??(t.questionnaires?.length?"questionnaire":"observation")}}class B extends Error{}class le{constructor(t){this.name=t}validate(t){return!0}}class tn extends le{min;max;constructor(t,e,r){super(t),this.min=e,this.max=r}validate(t){if(typeof t!="number")throw new B(`${this.name} value must be a number, but was ${t}`);if(t<this.min||t>this.max)throw new B(`${this.name} value must be >= ${this.min} and <= ${this.max}, but was ${t}`);return super.validate(t)}}class x{name;min;max;duration;subUnit;validator;constructor(t,e,r,s,o=new tn(t,e,r)){this.name=t,this.min=e,this.max=r,this.subUnit=s,this.duration=s?(s.max-s.min+1)*s.duration:1,this.validator=o}validate(t){return this.validator.validate(t)}[Symbol.iterator](){let t=this.min;return{next:()=>{const e={done:t>this.max,value:t};return t++,e}}}}class ke{millisecond;second;minute;hour;day;month;year}class _n extends ke{}class en extends _n{millisecond=new x("millisecond",0,999,void 0);second=new x("second",0,59,this.millisecond);minute=new x("minute",0,59,this.second);hour=new x("hour",0,23,this.minute);day=new x("day",1,31,this.hour);month=new x("month",1,12,this.day);year=new x("year",0,9999,this.month)}const g=new en;class rn extends tn{constructor(t=1,e=12){super("month",t,e)}}class vt extends x{static Month28=new vt(28);static Month29=new vt(29);static ThirtyDays=new vt(30);static ThirtyOneDays=new vt(31);constructor(t,e=new rn(1,t)){super("month",1,t,g.day,e)}static create(t,e){switch(t){case 1:case 3:case 5:case 7:case 8:case 10:case 12:return this.ThirtyOneDays;case 2:return e%4===0?this.Month29:this.Month28;case 4:case 6:case 9:case 11:return this.ThirtyDays;default:throw new B("Unsupported month",t,e)}}}class W{static instance=new W;render(t){return t.value.toString()}}class F{unit;#t;constructor(t,e){this.unit=e,this.value=typeof t=="number"?t:t.value}get value(){return this.#t}set value(t){this.unit.validate(t),this.#t=t}get duration(){return this.value*this.unit.duration}#e(t){if(this.constructor.name!==t.constructor.name)throw new le(`${this.unit.name} "${this.toString()}" cannot be compared with ${t.unit?.name} "${t.toString()}"`)}compare(t){return this.#e(t),this.value-t.value}isEqual(t){return this.compare(t)===0}isBefore(t){return this.compare(t)<0}isAfter(t){return this.compare(t)>0}previous(t=this.unit){const e=this.value-1;return new this.constructor(e,t)}next(t=this.unit){const e=this.value+1;return new this.constructor(e,t)}toString(t=W.instance){return t.render(this)}toSpec(){return{value:this.value}}toJSON(){return this.toSpec()}}class h{static#t=new Map;static register(t,e){h.#t.set(t,e)}static get(t){const e=h.#t.get(t);if(!e)throw new B(`No default parser registered for ${t.name}: import "@rr0/time/defaults" or pass a parser to fromString()`);return e()}}class Nt extends F{constructor(t=new Date().getFullYear(),e=g.year){super(t,e)}static fromString(t,e=h.get(Nt)){return new Nt(e.parse(t))}}class X extends W{static default=new X("0",2);constructor(t,e){super(),this.char=t,this.size=e}render(t){return super.render(t).padStart(this.size,this.char)}}class Gt extends F{constructor(t=new Date().getMonth()+1,e=g.month){super(t,e)}static fromString(t,e=h.get(Gt)){return new Gt(e.parse(t))}toString(t=X.default){return super.toString(t)}}class It extends F{constructor(t=new Date().getDate(),e=g.day){super(t,e)}static fromString(t,e=h.get(It)){const r=e.parse(t);return new It(r)}toString(t=X.default){return super.toString(t)}}class Rt extends F{constructor(t=new Date().getHours(),e=g.hour){super(t,e)}static fromString(t,e=h.get(Rt)){return new Rt(e.parse(t))}toString(t=X.default){return super.toString(t)}}class Vt extends F{constructor(t=new Date().getMinutes(),e=g.minute){super(t,e)}static fromString(t,e=h.get(Vt)){return new Vt(e.parse(t))}toString(t=X.default){return super.toString(t)}}class kt extends F{constructor(t=new Date().getSeconds(),e=g.second){super(t,e)}static fromString(t,e=h.get(kt)){return new kt(e.parse(t),g.second)}toString(t=X.default){return super.toString(t)}}class wt extends F{static renderer=new X("0",3);constructor(t,e=g.millisecond){super(t,e)}static parseFraction(t){return parseInt(t.padEnd(3,"0").substring(0,3),10)}toString(t=wt.renderer){return super.toString(t)}}class Tn{render(t){return t.toString()}}class Nn extends Tn{render(t){const e=t.value,r=Math.abs(e),s=Math.floor(r/60),o=r%60;if(s===0&&o===0)return"Z";{const i=e<0?"-":"+",a=s.toString().padStart(2,"0"),l=o>0?":"+o.toString().padEnd(2,"0"):"";return i+a+l}}}class gt{value;name="timeshift";renderer;constructor(t=0){this.value=t}static fromString(t,e=h.get(gt),r=void 0){const s=e.parse(t,r);return new gt(s)}toString(t=new Nn){return t.render(this)}toSpec(){return{value:this.value}}toJSON(){return this.toSpec()}}class ${static timeshift(t,e){return t+($.isDaylight(e)?60:0)}static isDaylight(t){const{year:e,month:r,day:s}=t,o=t.hour??12;if(![e,r,s].every(Number.isInteger))throw new RangeError("Daylight saving time depends on the year, month and day");const i=$.rule(e);if(!i)return!1;const a=$.rank(r,s,o);return a>=$.rank(i.start.month,i.start.day,2)&&a<$.rank(i.end.month,i.end.day,2)}static rule(t){if(t<1967)return;const e={month:10,day:$.sunday(t,10,-1)};return t>=2007?{start:{month:3,day:$.sunday(t,3,2)},end:{month:11,day:$.sunday(t,11,1)}}:t>=1987?{start:{month:4,day:$.sunday(t,4,1)},end:e}:t===1975?{start:{month:2,day:23},end:e}:t===1974?{start:{month:1,day:6},end:e}:{start:{month:4,day:$.sunday(t,4,-1)},end:e}}static sunday(t,e,r){const s=new Date(Date.UTC(2e3,e-1,1));s.setUTCFullYear(t);const o=1+(7-s.getUTCDay())%7;if(r>0)return o+7*(r-1);const i=[31,$.isLeap(t)?29:28,31,30,31,30,31,31,30,31,30,31][e-1];let a=o;for(;a+7<=i;)a+=7;return a}static isLeap(t){return t%4===0&&(t%100!==0||t%400===0)}static rank(t,e,r){return(t*100+e)*100+r}}const Gn={name:"PST",timeshift:"-08",title:"Pacific Standard Time (US)"},In={name:"PDT",timeshift:"-07",title:"Pacific Daylight Time (US)"},Rn={name:"MDT",timeshift:"-06",title:"Mountain Standard Time (US)"},Vn={name:"MST",timeshift:"-07",title:"Mountain Daylight Time (US)"},kn={name:"PT",timeshift:n=>$.timeshift(-480,n),title:"Pacific Time (US)"},On={name:"MT",timeshift:n=>$.timeshift(-420,n),title:"Mountain Time (US)"},$n={name:"CT",timeshift:n=>$.timeshift(-360,n),title:"Central Time (US)"},Fn={name:"ET",timeshift:n=>$.timeshift(-300,n),title:"Eastern Time (US)"},Dn={name:"CWT",timeshift:"-05",title:"Central War Time (US)"},Pn={name:"CDT",timeshift:"-05",title:"Central Daylight Time"},Un={name:"EST",timeshift:"-05",title:"Eastern Standard Time (US)"},Bn={name:"EDT",timeshift:"-04",title:"Eastern Time (US)"},Cn={name:"AST",timeshift:"-04",title:"Atlantic Standard Time (US)"},jn={name:"ADT",timeshift:"-03",title:"Atlantic Daylight Time (US)"},Hn={name:"UTC",timeshift:"Z",title:"Coordinated Universal Time"},Ln={name:"Z",timeshift:"Z",title:"UTC"},Kn={name:"GMT",timeshift:"Z",title:"Greenwich Mean Time"},zn={name:"BST",timeshift:"+01",title:"British Summer Time"},qn={name:"CEST",timeshift:"+02",title:"Central European Summer Time"},Wn={name:"CET",timeshift:"+01",title:"Central European Time"},Yn={name:"MSK",timeshift:"+03",title:"Moscow Time (RU)"},Xn={name:"IST",timeshift:"+05:30",title:"Indian Standard Time"},Jn={name:"BJT",timeshift:"+08",title:"Beijing Time"},Zn={name:"CST",timeshift:"-06",title:"Central Standard Time"},Qn={name:"JST",timeshift:"+09",title:"Japan Standard Time"},ts={name:"AEST",timeshift:"+10",title:"Australian Eastern Standard Time"},es={name:"NZST",timeshift:"+12",title:"New Zealand Standard Time"},rs={name:"LST",timeshift:"?",title:"Local Sideral Time"},Ze=[jn,ts,Cn,Jn,zn,Zn,Pn,Wn,qn,$n,Dn,Bn,Un,Fn,Kn,Xn,Qn,rs,Rn,Yn,Vn,On,es,In,Gn,kn,Hn,Ln];class me{static instance=new me;renderComponent(t,e){return t[e].toString()}renderSecond(t){return this.renderComponent(t,"second")+(t.millisecond?"."+t.millisecond.toString():"")}render(t){const e=[];t.year&&e.push(this.renderComponent(t,"year")),t.month&&e.push(this.renderComponent(t,"month")),t.day&&e.push(this.renderComponent(t,"day"));const r=[];t.hour&&r.push(this.renderComponent(t,"hour")),t.minute&&r.push(this.renderComponent(t,"minute")),t.second&&r.push(this.renderSecond(t));const s=e.join("-"),o=t.timeshift?t.timeshift.toString():"",i=r.join(":")+o;return s+(i.length>0?"T"+i:"")}}class bt extends B{constructor(t="method is abstract"){super(t)}}class Oe{units;constructor(t){this.units=t}newYear(t){throw new bt}newMonth(t){throw new bt}newDay(t){throw new bt}newHour(t){throw new bt}newMinute(t){throw new bt}newSecond(t){throw new bt}}class ns extends ke{millisecond=new x("milliseconds",Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER,void 0);second=new x("seconds",Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER,this.millisecond);minute=new x("minutes",Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER,this.second);hour=new x("hours",Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER,this.minutes);day=new x("days",Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER,this.hour);month=new x("months",Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER,this.day);year=new x("years",Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER,this.month)}const ne=new ns;class he{static instance=new he;render(t){const e=L.toSpec(t);let r="P";const s=e.years;s&&(r+=s.toString()+"Y");const o=e.months;o&&(r+=o.toString(W.instance)+"MM");const i=e.days;i&&(r+=i.toString(W.instance)+"D");const a=e.hours;a&&(r+=a.toString(W.instance)+"H");const l=e.minutes;l&&(r+=l.toString(W.instance)+"M");const c=e.seconds;return c&&(r+=c.toString(W.instance)+"S"),r}}class L extends F{constructor(t={years:new Date().getFullYear(),months:new Date().getMonth(),days:new Date().getDate(),hours:new Date().getHours(),minutes:new Date().getMinutes(),seconds:new Date().getSeconds(),milliseconds:new Date().getMilliseconds()}){super({value:typeof t=="number"?t:+(t.years?t.years*g.year.duration:0)+(t.months?t.months*g.month.duration:0)+(t.days?t.days*g.day.duration:0)+(t.hours?t.hours*g.hour.duration:0)+(t.minutes?t.minutes*g.minute.duration:0)+(t.seconds?t.seconds*g.second.duration:0)},new x("millisecond",0,Number.MAX_SAFE_INTEGER,void 0))}static toSpec(t,e=os){let r=typeof t=="number"?t:t.value;const s=r>0?1:-1;r=Math.abs(r);const o={},i=r/g.year.duration,a=Math.floor(i);a>0&&(o.years=e.newYear(s*a),r-=a*g.year.duration);const l=r/g.month.duration,c=Math.floor(l);c>0&&(o.months=e.newMonth(s*c),r-=c*g.month.duration);const m=r/g.day.duration,p=Math.floor(m);p>0&&(o.days=e.newDay(s*p),r-=p*g.day.duration);const w=r/g.hour.duration,b=Math.floor(w);b>0&&(o.hours=e.newHour(s*b),r-=b*g.hour.duration);const _=r/g.minute.duration,S=Math.floor(_);S>0&&(o.minutes=e.newMinute(s*S),r-=S*g.minute.duration);const D=r/g.second.duration,at=Math.floor(s*D);return at>0&&(o.seconds=e.newSecond(at)),o}static fromString(t,e=h.get(L)){return new L(e.parse(t))}static between(t,e){const r=e.getTime(),s=t.getTime();return new L(r-s)}toSpec(){return L.toSpec(this)}toString(t=he.instance){return t.render(this)}}class nn extends Oe{constructor(t){super(t)}newYear(t){return new Nt(t,this.units.year)}newMonth(t){return new Gt(t,this.units.month)}newDay(t){return new It(t,this.units.day)}newHour(t){return new Rt(t,this.units.hour)}newMinute(t){return new Vt(t,this.units.minute)}newSecond(t){return new kt(t,this.units.second)}newMillisecond(t){return new wt(t,this.units.millisecond)}newTimeshift(t){return new gt(typeof t=="number"?t:t.value)}}const ss=new nn(g),os=new nn(ne);class O{#t;#e;#r;#n;#s;#o;#i;#a;constructor(t={year:new Date().getFullYear(),month:new Date().getMonth()+1,day:new Date().getDate(),hour:new Date().getHours(),minute:new Date().getMinutes(),second:new Date().getSeconds(),timeshift:O.timeshiftOf(new Date)}){this.year=t.year,this.month=t.month,this.day=t.day,this.hour=t.hour,this.minute=t.minute,this.second=t.second,this.millisecond=t.millisecond,this.timeshift=t.timeshift}get year(){return this.#t}set year(t){const e=typeof t=="number";this.#t&&e?this.#t.value=t:this.#t=e?this.factory.newYear(t):!t||t.start||t instanceof F?t:this.factory.newYear(t)}get month(){return this.#e}set month(t){const e=typeof t=="number";this.#e&&e?this.#e.value=t:this.#e=e?this.factory.newMonth(t):!t||t.start||t instanceof F?t:this.factory.newMonth(t)}get day(){return this.#r}set day(t){const e=typeof t=="number";this.#r&&e?this.#r.value=t:this.#r=e?this.factory.newDay(t):!t||t.start||t instanceof F?t:this.factory.newDay(t)}get hour(){return this.#n}set hour(t){const e=typeof t=="number";this.#n&&e?this.#n.value=t:this.#n=e?this.factory.newHour(t):!t||t.start||t instanceof F?t:this.factory.newHour(t)}get minute(){return this.#s}set minute(t){const e=typeof t=="number";this.#s&&e?this.#s.value=t:this.#s=e?this.factory.newMinute(t):!t||t.start||t instanceof F?t:this.factory.newMinute(t)}get second(){return this.#o}set second(t){const e=typeof t=="number";this.#o&&e?this.#o.value=t:this.#o=e?this.factory.newSecond(t):!t||t.start||t instanceof F?t:this.factory.newSecond(t)}get millisecond(){return this.#i}set millisecond(t){const e=typeof t=="number";this.#i&&e?this.#i.value=t:this.#i=e||t&&!(t instanceof F)?this.factory.newMillisecond(t):t}get timeshift(){return this.#a}set timeshift(t){const e=typeof t=="number";this.#a&&e?this.#a.value=t:this.#a=e||t&&!(t instanceof gt)?this.factory.newTimeshift(t):t}get factory(){return ss}static fromString(t,e=h.get(O)){const{year:r,month:s,day:o,hour:i,minute:a,second:l,millisecond:c,timeshift:m}=e.parse(t);return new O({year:r,month:s,day:o,hour:i,minute:a,second:l,millisecond:c,timeshift:m})}static timeshiftOf(t){return-t.getTimezoneOffset()||0}static fromDate(t){return new O({year:t.getFullYear(),month:t.getMonth()+1,day:t.getDate(),hour:t.getHours(),minute:t.getMinutes(),second:t.getSeconds(),timeshift:O.timeshiftOf(t)})}static newInstance(){const t=new Date().toISOString(),e=t.indexOf("."),r=t.substring(0,e)+t.substring(e+4);return O.fromString(r)}#u(t){if(this.constructor.name!==t.constructor.name)throw new le(`Date "${this.toString()}" cannot be compared with "${t.toString()}"`)}compare(t){return this.#u(t),this.getTime()-t.getTime()}delta(t){const e=this.compare(t);return new L(e)}getTime(){return(this.year?.duration||0)+(this.month?.duration||0)+(this.day?.duration||0)+(this.hour?.duration||0)+(this.minute?.duration||0)+(this.second?.duration||0)+(this.millisecond?.duration||0)}isEqual(t){return this.compare(t)===0}isBefore(t){return this.compare(t)<0}isAfter(t){return this.compare(t)>0}clone(){return new O(this.toSpec())}previous(){let t=this.clone();try{t.second=this.second.previous()}catch{try{t.minute=this.minute.previous()}catch{try{t.hour=this.hour.previous()}catch{try{t.day=this.day.previous()}catch{try{t.month=this.month.previous()}catch{t.year=this.year.previous()}}}}}return t}next(){let t=this.clone();try{t.second=this.second.next()}catch{try{t.minute=this.minute.next()}catch{try{t.hour=this.hour.next()}catch{try{t.day=this.day.next()}catch{try{t.month=this.month.next()}catch{t.year=this.year.next()}}}}}return t}toString(t=me.instance){return t.render(this)}toSpec(){const t={},e=this.year?.toSpec();e&&(t.year=e);const r=this.month?.toSpec();r&&(t.month=r);const s=this.day?.toSpec();s&&(t.day=s);const o=this.hour?.toSpec();o&&(t.hour=o);const i=this.minute?.toSpec();i&&(t.minute=i);const a=this.second?.toSpec();a&&(t.second=a);const l=this.millisecond?.toSpec();l&&(t.millisecond=l);const c=this.timeshift?.toSpec();return c&&(t.timeshift=c),t}toJSON(){return this.toSpec()}}class $e{static instance=new $e;render(t){return(t.start?t.start.toString():"")+"/"+(t.end?t.end.toString():"")}}class Dt{constructor(t,e){this.start=t,this.end=e}_start;get start(){return this._start}set start(t){if(typeof t=="string"&&(t=O.fromString(t)),t&&!(t instanceof O)&&!(t instanceof L))throw new B("Interval start is not a level 0 date or duration: "+t);this._start=t}_end;get end(){return this._end}set end(t){if(typeof t=="string"&&(t=O.fromString(t)),t&&!(t instanceof O)&&!(t instanceof L))throw new B("Interval end is not a level 0 date or duration: "+t);this._end=t}static fromString(t,e=h.get(Dt)){const{start:r,end:s}=e.parse(t);return new Dt(r,s)}toString(t=$e.instance){return t.render(this)}[Symbol.iterator](){let t=this.start;return{next:()=>{const e={done:t>this.end,value:t};return t++,e}}}}class se extends W{static instance=new se(X.default);constructor(t){super(),this.valueRenderer=t}render(t){return(this.valueRenderer?this.valueRenderer.render(t):super.render(t))+this.qualifier(t)}qualifier(t){return t.uncertain?t.approximate?"%":"?":t.approximate?"~":""}}class Y extends F{#t;#e;constructor(t,e){super(t,e),this.#t=t.uncertain||!1,this.#e=t.approximate||!1}get uncertain(){return this.#t}set uncertain(t){return this.#t=t}get approximate(){return this.#e}set approximate(t){return this.#e=t}isCertainAndPrecise(){return!this.approximate&&!this.uncertain}isEqual(t){return this.isCertainAndPrecise()&&super.isEqual(t)}isBefore(t){return this.isCertainAndPrecise()&&super.isBefore(t)}isAfter(t){return this.isCertainAndPrecise()&&super.isAfter(t)}toString(t=se.instance){return super.toString(t)}toSpec(){return{...super.toSpec(),uncertain:this.uncertain,approximate:this.approximate}}toJSON(){return this.toSpec()}}class sn extends en{year=new x("year",-9999,9999,this.month);yearExtended=new x("year",Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER,this.month)}const ie=new sn;class dt extends Y{constructor(t,e=ie.year){super(t,e)}static fromString(t,e=ie.year,r=h.get(dt)){const s=r.parse(t),o=s.value.start;if(t.startsWith("Y")&&(e=ie.yearExtended),o!==void 0){const i=new dt(Object.assign({...s},{value:Math.max(o,e.min)})),a=new dt(Object.assign({...s},{value:Math.min(s.value.end,e.max)}));return{start:i,end:a}}else return new dt(s,e)}}class on extends le{monthValidator=new rn;validate(t){switch(t){case 21:case 22:case 23:case 24:return!0;default:return this.monthValidator.validate(t)}}}class lt extends Y{constructor(t,e=new x(g.month.name,1,24,g.day,new on)){super(t,e)}static fromString(t,e=h.get(lt)){const r=e.parse(t),s=r.value.start;if(s!==void 0){let o=g.month;const i=new lt(Object.assign({...r},{value:Math.max(s,o.min)})),a=new lt(Object.assign({...r},{value:Math.min(r.value.end,o.max)}));return{start:i,end:a}}else return new lt(r)}toString(t){return super.toString(t).padStart(2,"0")}}class mt extends Y{constructor(t,e=g.day){super(t,e)}static fromString(t,e=h.get(mt)){const r=e.parse(t),s=r.value.start;if(s!==void 0){let o=g.day;const i=new mt(Object.assign({...r},{value:Math.max(s,o.min)})),a=new mt(Object.assign({...r},{value:Math.min(r.value.end,o.max)}));return{start:i,end:a}}else return new mt(r)}toString(t){return super.toString(t).padStart(2,"0")}}class ht extends Y{constructor(t,e=g.hour){super(t,e)}static fromString(t,e=h.get(ht)){const r=e.parse(t),s=r.value.start;if(s!==void 0){let o=g.hour;const i=new ht(Object.assign({...r},{value:Math.max(s,o.min)})),a=new ht(Object.assign({...r},{value:Math.min(r.value.end,o.max)}));return{start:i,end:a}}else return new ht(r)}}class pt extends Y{constructor(t,e=g.minute){super(t,e)}static fromString(t,e=h.get(pt)){const r=e.parse(t),s=r.value.start;if(s!==void 0){const o=g.minute,i=new pt(Object.assign({...r},{value:Math.max(s,o.min)})),a=new pt(Object.assign({...r},{value:Math.min(r.value.end,o.max)}));return{start:i,end:a}}else return new pt(r)}toString(t=se.instance){return super.toString(t)}}class ft extends Y{constructor(t,e=g.second){super(t,e)}static fromString(t,e=h.get(ft)){const r=e.parse(t),s=r.value.start;if(s!==void 0){const o=g.second,i=new ft(Object.assign({...r},{value:Math.max(s,o.min)})),a=new ft(Object.assign({...r},{value:Math.min(r.value.end,o.max)}));return{start:i,end:a}}else return new ft(r)}}class St extends gt{static fromString(t,e=h.get(St),r=void 0){return new St(e.parse(t,r))}}class an extends Oe{constructor(t){super(t)}newYear(t){return new dt(t,this.units.year)}newMonth(t){return new lt(t,this.units.month)}newDay(t){return new mt(t,this.units.day)}newHour(t){return new ht(t,this.units.hour)}newMinute(t){return new pt(t,this.units.minute)}newSecond(t){return new ft(t,this.units.second)}newMillisecond(t){return new wt(t,this.units.millisecond)}newTimeshift(t){return new St(typeof t=="number"?t:t.value)}}const is=new an(ie),as=new an(ne);class P extends O{constructor(t){super(t)}get factory(){return is}get uncertain(){return this.year?.uncertain===!0||this.month?.uncertain===!0||this.day?.uncertain===!0||this.hour?.uncertain===!0||this.minute?.uncertain===!0||this.second?.uncertain===!0}get approximate(){return this.year?.approximate===!0||this.month?.approximate===!0||this.day?.approximate===!0||this.hour?.approximate===!0||this.minute?.approximate===!0||this.second?.approximate===!0}static fromDate(t){return new P({year:t.getFullYear(),month:t.getMonth()+1,day:t.getDate(),hour:t.getHours(),minute:t.getMinutes(),second:t.getSeconds(),timeshift:O.timeshiftOf(t)})}static fromString(t,e=h.get(P)){const r=e.parse(t);return new P(r)}static newInstance(){const t=new Date().toISOString(),e=t.indexOf("."),r=t.substring(0,e)+t.substring(e+4);return P.fromString(r)}clone(){return new P(this.toSpec())}}const V=Object.freeze({year:"year",month:"month",day:"day",hour:"hour",minute:"minute",second:"second",timeshift:"timeshift",uncertain:"uncertain",approximate:"approx"});class pe extends he{static instance=new pe;render(t){return super.render(t)}}class I extends Y{constructor(t){super(typeof t=="number"||t.hasOwnProperty("value")?t:{value:I.getValue(t,V.year)+I.getValue(t,V.month)+I.getValue(t,V.day)+I.getValue(t,V.hour)+I.getValue(t,V.minute)+I.getValue(t,V.second),uncertain:I.getBoolean(t,V.uncertain),approximate:I.getBoolean(t,"approximate")},ne.millisecond)}static getBoolean(t,e){return t[e]||t[V.year+"s"]?.[e]||t[V.month+"s"]?.[e]||t[V.day+"s"]?.[e]||t[V.hour+"s"]?.[e]||t[V.minute+"s"]?.[e]||t[V.second+"s"]?.[e]||!1}static getValue(t,e){let r=0,s=t[e+"s"];if(s instanceof Y?s=s.value:typeof t=="number"&&(s=t),s){const o=g[e];r=s*o.duration}return r}static toSpec(t,e=as){return{...L.toSpec(t,e),uncertain:t.uncertain||!1,approximate:t.approximate||!1}}static fromString(t,e=h.get(I)){const r=e.parse(t);return new I(r)}static between(t,e){const r=e.getTime(),s=t.getTime();return new I(r-s)}toString(t=pe.instance){return super.toString(t)}toSpec(){return I.toSpec(this)}}class Pt extends Dt{constructor(t,e){super(t,e)}get start(){return this._start}set start(t){if(typeof t=="string"&&(super.start=P.fromString(t)),t&&!(t instanceof P)&&!(t instanceof I))throw new B("Interval start is not a level 1 date or duration: "+t);this._start=t}get end(){return this._end}set end(t){if(typeof t=="string"&&(t=P.fromString(t)),t&&!(t instanceof P)&&!(t instanceof I))throw new B("Interval end is not a level 1 date or duration: "+t);this._end=t}static fromString(t,e=h.get(Pt)){const{start:r,end:s}=e.parse(t);return new Pt(r,s)}}class $t extends Y{uncertainComponent;approximateComponent;constructor(t,e){super(t,e),this.uncertainComponent=t.uncertainComponent||!1,this.approximateComponent=t.approximateComponent||!1}get uncertain(){return super.uncertain||this.uncertainComponent}set uncertain(t){return super.uncertain=t}get approximate(){return super.approximate||this.approximateComponent}set approximate(t){return super.approximate=t}get uncertainGroup(){return super.uncertain}get approximateGroup(){return super.approximate}toSpec(){return{...super.toSpec(),uncertain:this.uncertainGroup,approximate:this.approximateGroup,uncertainComponent:this.uncertainComponent,approximateComponent:this.approximateComponent}}toJSON(){return this.toSpec()}}class us extends sn{year=new x("year",Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER,this.month)}const Re=new us;class Q extends $t{constructor(t,e=Re.year){super(t,e)}static fromString(t,e=Re.year,r=h.get(Q)){const s=r.parse(t),o=s.value.start;if(o!==void 0){const i=new Q(Object.assign({...s},{value:Math.max(o,e.min)})),a=new Q(Object.assign({...s},{value:Math.min(s.value.end,e.max)})),l={start:i,end:a},c=s.value.estimate;return c&&(l.estimate=c),l}else return new Q(s)}}class cs extends on{validate(t){switch(t){case 25:case 26:case 27:case 28:case 29:case 30:case 31:case 32:case 33:case 34:case 35:case 36:case 37:case 38:case 39:case 40:case 41:return!0;default:return super.validate(t)}}}class tt extends $t{constructor(t,e=new x(g.month.name,1,41,g.day,new cs)){super(t,e)}static fromString(t,e=h.get(tt)){const r=e.parse(t),s=r.value.start;if(s!==void 0){const o=g.month,i=new tt(Object.assign({...r},{value:Math.max(s,o.min)})),a=new tt(Object.assign({...r},{value:Math.min(r.value.end,o.max)}));return{start:i,end:a}}else return new tt(r)}toString(t){return super.toString(t).padStart(2,"0")}}class et extends $t{constructor(t,e=g.day){super(t,e)}static fromString(t,e=h.get(et)){const r=e.parse(t),s=r.value.start;if(s!==void 0){const o=g.day,i=new et(Object.assign({...r},{value:Math.max(s,o.min)})),a=new et(Object.assign({...r},{value:Math.min(r.value.end,o.max)}));return{start:i,end:a}}else return new et(r)}toString(t){return super.toString(t).padStart(2,"0")}}class rt extends $t{constructor(t,e=g.hour){super(t,e)}static fromString(t,e=h.get(rt)){const r=e.parse(t),s=r.value.start;if(s!==void 0){const o=g.hour,i=new rt(Object.assign({...r},{value:Math.max(s,o.min)})),a=new rt(Object.assign({...r},{value:Math.min(r.value.end,o.max)}));return{start:i,end:a}}else return new rt(r)}}class nt extends $t{constructor(t,e=g.minute){super(t,e)}static fromString(t,e=h.get(nt)){const r=e.parse(t),s=r.value.start;if(s!==void 0){const o=g.minute,i=new nt(Object.assign({...r},{value:Math.max(s,o.min)})),a=new nt(Object.assign({...r},{value:Math.min(r.value.end,o.max)}));return{start:i,end:a}}else return new nt(r)}}class st extends $t{constructor(t,e=g.second){super(t,e)}static fromString(t,e=g.second,r=h.get(st)){const s=r.parse(t),o=s.value.start;if(o!==void 0){const i=new st(Object.assign({...s},{value:Math.max(o,e.min)})),a=new st(Object.assign({...s},{value:Math.min(s.value.end,e.max)}));return{start:i,end:a}}else return new st(s,e)}}class un extends St{}class ds extends se{qualifier(){return""}}class ut extends me{static instance=new ut;static valueRenderer=new ds(X.default);static names=["year","month","day","hour","minute","second"];static qualifier(t,e){return t?e?"%":"?":e?"~":""}renderComponent(t,e){const r=t[e],s=ut.names.slice(ut.names.indexOf(e)+1).map(a=>t[a]).filter(Boolean),o=ut.qualifier(r.uncertainComponent,r.approximateComponent),i=ut.qualifier(r.uncertainGroup&&!r.uncertainComponent&&!s.some(a=>a.uncertain),r.approximateGroup&&!r.approximateComponent&&!s.some(a=>a.approximate));return o+r.toString(ut.valueRenderer)+i}}class cn extends Oe{constructor(t){super(t)}newYear(t){return new Q(t,this.units.year)}newMonth(t){return new tt(t,this.units.month)}newDay(t){return new et(t,this.units.day)}newHour(t){return new rt(t,this.units.hour)}newMinute(t){return new nt(t,this.units.minute)}newSecond(t){return new st(t,this.units.second)}newMillisecond(t){return new wt(t,this.units.millisecond)}newTimeshift(t){return new un(typeof t=="number"?t:t.value)}}const ls=new cn(Re),ms=new cn(ne);class U extends P{constructor(t){super(t)}toString(t=ut.instance){return super.toString(t)}get year(){return super.year}set year(t){super.year=t}get month(){return super.month}set month(t){super.month=t}get factory(){return ls}static fromDate(t){return new U({year:t.getFullYear(),month:t.getMonth()+1,day:t.getDate(),hour:t.getHours(),minute:t.getMinutes(),second:t.getSeconds(),timeshift:O.timeshiftOf(t)})}static fromString(t,e=h.get(U)){const r=e.parse(t);return new U(r)}static newInstance(){const t=new Date().toISOString(),e=t.indexOf("."),r=t.substring(0,e)+t.substring(e+4);return U.fromString(r)}clone(){return new U(this.toSpec())}}class ot{regExp;constructor(t,e){this.name=t,this.regExp=new RegExp(`^(?:${e})$`)}regexGroups(t){const e=this.regExp.exec(t);if(!e)throw new B(`Invalid ${this.name} "${t}"`);return e.groups}parseGroups(t){throw new bt(`${this.constructor.name} is abstract`)}parse(t){const e=this.regexGroups(t);return this.parseGroups(e)}}class At extends pe{static instance=new At;static designators=[["years","Y"],["months","MM"],["days","D"],["hours","H"],["minutes","M"],["seconds","S"]];static qualifier(t,e){return t?e?"%":"?":e?"~":""}render(t){const e=At.qualifier(t.uncertainDuration,t.approximateDuration);if(!t.hasQualifiedComponent)return e+super.render(t);let r=e+"P";for(const[s,o]of At.designators){const i=t.components[s];i&&(r+=At.qualifier(i.uncertainComponent,i.approximateComponent)+i.value+o)}return r}}class G extends I{#t;constructor(t){if(super(typeof t=="number"?t:{value:G.valueFromSpec(t),uncertain:t.uncertain===!0,approximate:t.approximate===!0},ne.millisecond),typeof t!="number"){const e={};for(const r of G.componentNames)t[r]instanceof Y&&(e[r]=t[r]);Object.keys(e).length>0&&(this.#t=e)}}static componentNames=["years","months","days","hours","minutes","seconds"];get components(){return this.#t}#e(t){return this.#t?Object.values(this.#t).some(e=>e[t]):!1}get uncertainDuration(){return super.uncertain}get approximateDuration(){return super.approximate}get uncertain(){return super.uncertain||this.#e("uncertain")}set uncertain(t){super.uncertain=t}get approximate(){return super.approximate||this.#e("approximate")}set approximate(t){super.approximate=t}get hasQualifiedComponent(){return this.#t?Object.values(this.#t).some(t=>t.uncertainComponent||t.approximateComponent):!1}static valueFromSpec(t){return G.getValue(t,V.year)+G.getValue(t,V.month)+G.getValue(t,V.day)+G.getValue(t,V.hour)+G.getValue(t,V.minute)+G.getValue(t,V.second)}static toSpec(t,e=ms){const r=I.toSpec(t,e);if(t instanceof G&&t.hasQualifiedComponent)for(const s of G.componentNames)delete r[s],t.components[s]&&(r[s]=t.components[s]);return r}static fromString(t,e=h.get(G)){const r=e.parse(t);return new G(r)}static between(t,e){const r=e.getTime(),s=t.getTime();return new G(r-s)}toSpec(){return G.toSpec(this)}toString(t=At.instance){return super.toString(t)}}class Ut extends Pt{get start(){return this._start}set start(t){if(typeof t=="string"&&(super.start=U.fromString(t)),t&&!(t instanceof U)&&!(t instanceof G))throw new B("Interval start is not a level 2 date or duration: "+t);this._start=t}get end(){return this._end}set end(t){if(typeof t=="string"&&(t=U.fromString(t)),t&&!(t instanceof U)&&!(t instanceof G))throw new B("Interval end is not a level 2 date or duration: "+t);this._end=t}static fromString(t,e=h.get(Ut)){const{start:r,end:s}=e.parse(t);return new Ut(r,s)}}class de extends Set{constructor(t,e){super(t),this.exclusive=e}has(t){const e=t.toString().replace("..","/");for(const r of this)if(r.toString()===e)return!0;return!1}static fromString(t,e=h.get(de)){const{exclusive:r,values:s}=e.parse(t);return new de(s,r)}}class it extends ot{constructor(t,e){super(t,e)}static read(t){return{value:t?parseInt(t,10):void 0}}parseGroups(t){return it.read(t[this.name])}parse(t){if(t.startsWith("-"))throw new B(`${this.name} cannot be negative`);return super.parse(t)}}class u{static groupName(...t){return t.reduce((e,r)=>e?e+r.charAt(0).toUpperCase()+r.substring(1):r,"")}static group(t,...e){return`(?<${t}>${e.join("")})`}static optional(t){return t+"?"}static nonCapturingGroup(...t){return`(?:${t.join("")})`}static optionalGroup(t,...e){return u.optional(u.group(t,...e))}static optionalNonCapturingGroup(...t){return u.optional(u.nonCapturingGroup(...t))}static numberGroup(t,e,r,s="\\d"){return u.group(t,`${r||""}[${s}]${e}`)}}const Qe="yearValue";class Bt extends it{static format(t=""){return u.numberGroup(u.groupName(t,Qe),"{4}",void 0)}constructor(){super(Qe,Bt.format())}}const tr="monthValue";class Ct extends it{static format(t=""){return u.numberGroup(u.groupName(t,tr),"{1,2}",void 0)}constructor(){super(tr,Ct.format())}}const er="dayValue";class _t extends it{static format(t=""){return u.numberGroup(u.groupName(t,er),"{1,2}",void 0)}constructor(){super(er,_t.format())}}const rr="hourValue";class Tt extends it{static format(t=""){return u.numberGroup(u.groupName(t,rr),"{1,2}",void 0)}constructor(){super(rr,Tt.format())}}const nr="minuteValue";class jt extends it{static format(t=""){return u.numberGroup(u.groupName(t,nr),"{1,2}",void 0)}constructor(){super(nr,jt.format())}}const sr="secondValue";class Ht extends it{static format(t=""){return u.numberGroup(u.groupName(t,sr),"{1,2}",void 0)}constructor(){super(sr,Ht.format())}}const or="timeshiftValue",ir="shiftHour",ar="shiftMinute";class Ot extends ot{static format(t=""){return Ze.map(e=>e.name).join("|")+"|"+u.nonCapturingGroup(u.group(t+ir,u.numberGroup(u.groupName(t,or),"{2}","[+-]")),u.optionalNonCapturingGroup(":?",u.numberGroup(u.groupName(t,ar),"{2}",void 0)))}constructor(){super(or,Ot.format())}parse(t,e){let r=0;const s=Ze.find(o=>o.name===t);if(s){if(typeof s.timeshift=="function")try{return s.timeshift(e??{})}catch(o){throw new B(`The time zone ${t} depends on the date: ${o.message}`)}t=s.timeshift}if(t!=="Z"){const o=this.regexGroups(t),i=o[ir];i&&(r+=parseInt(i,10)*60);const a=o[ar];a&&(r+=parseInt(a,10))}return r}}const ur="year",cr="month",dr="day",lr="hour",mr="minute",hr="second",pr="millisecond",fr="timeshift";class Et extends ot{static format(t=""){return u.group(u.groupName(t,ur),Bt.format(t))+u.optionalNonCapturingGroup("-",u.group(u.groupName(t,cr),Ct.format(t)),u.optionalNonCapturingGroup("-",u.group(u.groupName(t,dr),_t.format(t)),u.optionalNonCapturingGroup("[T ]",u.group(u.groupName(t,lr),Tt.format(t)),":?",u.group(u.groupName(t,mr),jt.format(t)),u.optionalNonCapturingGroup(":",u.group(u.groupName(t,hr),Ht.format(t)),u.optionalNonCapturingGroup("[.,]",u.group(u.groupName(t,pr),"\\d+"))),"\\s*",u.optionalGroup(u.groupName(t,fr),Ot.format(t)))))}constructor(){super("date",Et.format())}parse(t){const e=this.regexGroups(t),r=e[ur],s=e[cr],o=e[dr],i=e[lr],a=e[mr],l=e[hr],c=e[pr],m=e[fr],p=r?new Nt(Bt.read(r)):void 0,w=s?Ct.read(s):void 0;return{year:p,month:w?new Gt(w,vt.create(w.value,p?.value)):void 0,day:o?new It(_t.read(o)):void 0,hour:i?new Rt(Tt.read(i)):void 0,minute:a?new Vt(jt.read(a)):void 0,second:l?new kt(Ht.read(l)):void 0,millisecond:c?wt.parseFraction(c):void 0,timeshift:m?gt.fromString(m,new Ot,{year:p?.value,month:w?.value,day:o?_t.read(o).value:void 0,hour:i?Tt.read(i).value:void 0}):void 0}}}const gr="years",be="months",hs="days",wr="hours",br="minutes",Er="seconds";class Fe extends ot{static format(t=""){return"P"+u.optionalNonCapturingGroup(u.numberGroup(u.groupName(t,gr),"+",void 0,"\\d"),"Y")+u.optionalNonCapturingGroup(u.numberGroup(u.groupName(t,be),"+",void 0,"\\d"),"MM")+u.optionalNonCapturingGroup(u.numberGroup(u.groupName(t,hs),"+",void 0,"\\d"),"D")+u.optionalNonCapturingGroup(u.numberGroup(u.groupName(t,wr),"+",void 0,"\\d"),"H")+u.optionalNonCapturingGroup(u.numberGroup(u.groupName(t,br),"+",void 0,"\\d"),"M")+u.optionalNonCapturingGroup(u.numberGroup(u.groupName(t,Er),"+",void 0,"\\d"),"S")}constructor(){super("duration",Fe.format())}parseGroups(t){return{years:t[gr],months:t[be],days:t[be],hours:t[wr],minutes:t[br],seconds:t[Er]}}}const Ee="start",ye="end";class De extends ot{static format=u.group(Ee,Et.format(Ee))+"/"+u.group(ye,Et.format(ye));constructor(){super("interval",De.format)}parse(t){const e=this.regexGroups(t),r=e[Ee],s=e[ye];return{start:r?O.fromString(r,new Et):void 0,end:s?O.fromString(s,new Et):void 0}}}h.register(O,()=>new Et);h.register(It,()=>new _t);h.register(L,()=>new Fe);h.register(Rt,()=>new Tt);h.register(Dt,()=>new De);h.register(Vt,()=>new jt);h.register(Gt,()=>new Ct);h.register(kt,()=>new Ht);h.register(gt,()=>new Ot);h.register(Nt,()=>new Bt);class M extends it{static uncertainGroup="uncertain";static approximateGroup="approx";static uncertainAndApproximateGroup=M.uncertainGroup+M.approximateGroup;constructor(t,e){super(t,e)}static qualifierFormat(t,e){return u.optionalGroup(t,`\\${e}`)}static formatSuffix(t){return this.qualifierFormat(u.groupName(M.uncertainGroup,t),"?")+this.qualifierFormat(u.groupName(M.approximateGroup,t),"~")+this.qualifierFormat(u.groupName(M.uncertainAndApproximateGroup,t),"%")}static numberFormat(t,e,r){return u.numberGroup(t,e,r,"\\dX")+this.formatSuffix(t)}getValueAndSign(t){let e=t[this.name],r;return e.charAt(0)==="-"?(r=-1,e=e.substring(1)):r=1,{valueStr:e,sign:r}}parseGroups(t){const{valueStr:e,sign:r}=this.getValueAndSign(t);let s=0,o;for(o=0;o<e.length;o++){const c=e[o];if(c==="X")break;s=s*10+parseInt(c,10)}if(o<e.length){let c=1;for(let w=0;w<e.length-o;w++)c*=10;const m=r*s*c,p=m+c-1;s={start:m,end:p}}else s*=r;const i=t[u.groupName(M.uncertainAndApproximateGroup,this.name)],a=t[u.groupName(M.approximateGroup,this.name)]||i,l=t[u.groupName(M.uncertainGroup,this.name)]||i;return{value:s,approximate:a?!!a:!1,uncertain:l?!!l:!1}}}const yr="yearValue";class Lt extends M{constructor(){super(yr,Lt.format())}static format(t=""){return"Y?"+M.numberFormat(u.groupName(t,yr),"+","[-]?")}parse(t){const e=this.regexGroups(t);return this.parseGroups(e)}}const Sr="monthValue";class Kt extends M{static format(t=""){return M.numberFormat(u.groupName(t,Sr),"{1,2}",void 0)}constructor(){super(Sr,Kt.format())}}const xr="dayValue";class zt extends M{static format(t=""){return M.numberFormat(u.groupName(t,xr),"{1,2}",void 0)}constructor(){super(xr,zt.format())}}const Mr="hourValue";class qt extends M{static format(t=""){return M.numberFormat(u.groupName(t,Mr),"{1,2}",void 0)}constructor(){super(Mr,qt.format())}}const vr="minuteValue";class Wt extends M{static format(t=""){return M.numberFormat(u.groupName(t,vr),"{1,2}",void 0)}constructor(){super(vr,Wt.format())}}const Ar="secondValue";class Yt extends M{static format(t=""){return M.numberFormat(u.groupName(t,Ar),"{1,2}",void 0)}constructor(){super(Ar,Yt.format())}}class Xt extends Ot{}class A extends ot{static yearGroup="year";static monthGroup="month";static dayGroup="day";static hourGroup="hour";static minuteGroup="minute";static secondGroup="second";static millisecondGroup="millisecond";static timeshiftGroup="timeshift";constructor(t=A.format()){super("date",t)}static format(t=""){return u.group(u.groupName(t,A.yearGroup),Lt.format(t))+u.optionalNonCapturingGroup("-",u.group(u.groupName(t,A.monthGroup),Kt.format(t)),u.optionalNonCapturingGroup("-",u.group(u.groupName(t,A.dayGroup),zt.format(t)),u.optionalNonCapturingGroup("[T ]",u.group(u.groupName(t,A.hourGroup),qt.format(t)),":",u.group(u.groupName(t,A.minuteGroup),Wt.format(t)),u.optionalNonCapturingGroup(":",u.group(u.groupName(t,A.secondGroup),Yt.format(t)),u.optionalNonCapturingGroup("[.,]",u.group(u.groupName(t,A.millisecondGroup),"\\d+"))),u.optionalGroup(u.groupName(t,A.timeshiftGroup),Xt.format(t)))))}parseGroups(t){const e=t[A.millisecondGroup],r=e?wt.parseFraction(e):void 0,s=t[A.secondGroup],o=s?ft.fromString(s,new Yt):void 0,i=t[A.minuteGroup];let a;i&&(a=pt.fromString(i,new Wt),a.uncertain=a.uncertain||o?.uncertain||!1,a.approximate=a.approximate||o?.approximate||!1);const l=t[A.hourGroup];let c;l&&(c=ht.fromString(l,new qt),c.uncertain=c.uncertain||a?.uncertain||!1,c.approximate=c.approximate||a?.approximate||!1);const m=t[A.dayGroup];let p;m&&(p=mt.fromString(m,new zt),p.uncertain=p.uncertain||c?.uncertain||!1,p.approximate=p.approximate||c?.approximate||!1);const w=t[A.monthGroup];let b;w&&(b=lt.fromString(w,new Kt),b.uncertain=b.uncertain||p?.uncertain||!1,b.approximate=b.approximate||p?.approximate||!1);const _=t[A.yearGroup];let S;_&&(S=dt.fromString(_,void 0,new Lt),S.uncertain=S.uncertain||b?.uncertain||!1,S.approximate=S.approximate||b?.approximate||!1);const D=t[A.timeshiftGroup],at=D?St.fromString(D,new Xt,{year:S?.value,month:b?.value,day:p?.value,hour:c?.value}):void 0;return{year:S,month:b,day:p,hour:c,minute:a,second:o,millisecond:r,timeshift:at}}}const _r="years",Tr="months",Nr="days",Gr="hours",Ir="minutes",Rr="seconds";class yt extends M{static format(t=""){return"P"+u.optionalNonCapturingGroup(u.numberGroup(u.groupName(t,_r),"+",void 0,"\\d"),"Y")+u.optionalNonCapturingGroup(u.numberGroup(u.groupName(t,Tr),"+",void 0,"\\d"),"MM")+u.optionalNonCapturingGroup(u.numberGroup(u.groupName(t,Nr),"+",void 0,"\\d"),"D")+u.optionalNonCapturingGroup(u.numberGroup(u.groupName(t,Gr),"+",void 0,"\\d"),"H")+u.optionalNonCapturingGroup(u.numberGroup(u.groupName(t,Ir),"+",void 0,"\\d"),"M")+u.optionalNonCapturingGroup(u.numberGroup(u.groupName(t,Rr),"+",void 0,"\\d"),"S")+this.formatSuffix(t)}constructor(){super("duration",yt.format())}parseGroups(t){return{years:t[_r],months:t[Tr],days:t[Nr],hours:t[Gr],minutes:t[Ir],seconds:t[Rr],uncertain:!!t[M.uncertainGroup],approximate:!!t[M.approximateGroup]}}}const ps="dates",Se="start",xe="end",Vr="durations",Me="durationMin",ve="durationMax";class Pe extends ot{static format=u.group(ps,u.optionalGroup(Se,u.group("openStart","\\.\\.")+"|"+A.format(Se))+"/"+u.optionalGroup(xe,u.group("openEnd","\\.\\.")+"|"+A.format(xe)))+"|"+u.group(Vr,u.group(Me,yt.format(Me))+"/"+u.group(ve,yt.format(ve)));constructor(t="interval",e=Pe.format){super(t,e)}parseGroups(t){let e,r;if(t[Vr]){const o=t[Me];e=I.fromString(o,new yt);const i=t[ve];r=I.fromString(i,new yt)}else{const o=t[Se];switch(o){case void 0:e=null;break;case"..":e=void 0;break;default:e=P.fromString(o,new A)}const i=t[xe];switch(i){case void 0:r=null;break;case"..":r=void 0;break;default:r=P.fromString(i,new A)}}return{start:e,end:r}}}h.register(P,()=>new A);h.register(mt,()=>new zt);h.register(I,()=>new yt);h.register(ht,()=>new qt);h.register(Pt,()=>new Pe);h.register(pt,()=>new Wt);h.register(lt,()=>new Kt);h.register(ft,()=>new Yt);h.register(St,()=>new Xt);h.register(dt,()=>new Lt);class E extends M{static uncertainGroup="uncertain1";static approximateGroup="approx1";static uncertainAndApproximateGroup=E.uncertainGroup+E.approximateGroup;constructor(t,e){super(t,e)}static numberFormat(t,e,r){return this.qualifierFormat(u.groupName(E.uncertainGroup,t),"?")+this.qualifierFormat(u.groupName(E.approximateGroup,t),"~")+this.qualifierFormat(u.groupName(E.uncertainAndApproximateGroup,t),"%")+M.numberFormat(t,e,r)}parseGroups(t){const e=super.parseGroups(t),r=t[u.groupName(E.uncertainAndApproximateGroup,this.name)];return(t[u.groupName(E.uncertainGroup,this.name)]||r)&&(e.uncertainComponent=!0),(t[u.groupName(E.approximateGroup,this.name)]||r)&&(e.approximateComponent=!0),e}}const Ft="yearValue",kr="exp",Or="signif";class Jt extends E{constructor(){super(Ft,Jt.format())}static format(t=""){return"Y?"+u.nonCapturingGroup(u.group(u.groupName(t,kr),"[-]?\\d+E\\d+")+"|"+E.numberFormat(u.groupName(t,Ft),"+","[-]?")+u.optionalGroup(u.groupName(t,Or),"S\\d+"))}parseGroups(t){const e=t[kr];if(e){const i=e.indexOf("E"),a=parseInt(e.substring(i+1),10),c=parseInt(e.substring(0,i),10)*Math.pow(10,a);t[Ft]=c.toString()}const r=t[Or],s=t[Ft];if(r){const i=parseInt(r.substring(1),10),{valueStr:a,sign:l}=this.getValueAndSign(t);let c="";for(let m=0;m<a.length;m++)c+=m<i?a.charAt(m):"X";t[Ft]=(l<0?"-":"")+c}const o=super.parseGroups(t);return r&&(o.value.estimate=parseInt(s,10)),o}parse(t){const e=this.regexGroups(t);return this.parseGroups(e)}}const $r="monthValue";class Zt extends E{static format(t=""){return E.numberFormat(u.groupName(t,$r),"{1,2}",void 0)}constructor(){super($r,Zt.format())}}const Fr="dayValue";class Qt extends E{static format(t=""){return E.numberFormat(u.groupName(t,Fr),"{1,2}",void 0)}constructor(){super(Fr,Qt.format())}}const Dr="hourValue";class te extends E{static format(t=""){return E.numberFormat(u.groupName(t,Dr),"{1,2}",void 0)}constructor(){super(Dr,te.format())}}const Pr="secondValue";class ee extends E{static format(t=""){return E.numberFormat(u.groupName(t,Pr),"{1,2}",void 0)}constructor(){super(Pr,ee.format())}}const Ur="minuteValue";class re extends E{static format(t=""){return E.numberFormat(u.groupName(t,Ur),"{1,2}",void 0)}constructor(){super(Ur,re.format())}}class fs extends Xt{}class y extends ot{static yearGroup=A.yearGroup;static monthGroup="month";static dayGroup="day";static hourGroup="hour";static minuteGroup="minute";static secondGroup="second";static millisecondGroup="millisecond";static timeshiftGroup="timeshift";constructor(){super("date",y.format())}static format(t=""){return u.group(u.groupName(t,y.yearGroup),Jt.format(t))+u.optionalNonCapturingGroup("-",u.group(u.groupName(t,y.monthGroup),Zt.format(t)),u.optionalNonCapturingGroup("-",u.group(u.groupName(t,y.dayGroup),Qt.format(t)),u.optionalNonCapturingGroup("[T ]",u.group(u.groupName(t,y.hourGroup),te.format(t)),":",u.group(u.groupName(t,y.minuteGroup),re.format(t)),u.optionalNonCapturingGroup(":",u.group(u.groupName(t,y.secondGroup),ee.format(t)),u.optionalNonCapturingGroup("[.,]",u.group(u.groupName(t,y.millisecondGroup),"\\d+"))),u.optionalGroup(u.groupName(t,y.timeshiftGroup),fs.format(t)))))}parseGroups(t){const e=t[y.millisecondGroup],r=e?wt.parseFraction(e):void 0,s=t[y.secondGroup];let o;s&&(o=st.fromString(s,void 0,new ee),o.uncertain=o?.uncertain||!1,o.approximate=o?.approximate||!1);const i=t[y.minuteGroup];let a;i&&(a=nt.fromString(i,new re),a.uncertain=a.uncertain||o?.uncertain||!1,a.approximate=a.approximate||o?.approximate||!1);const l=t[y.hourGroup];let c;l&&(c=rt.fromString(l,new te),c.uncertain=c.uncertain||a?.uncertain||!1,c.approximate=c.approximate||a?.approximate||!1);const m=t[y.dayGroup];let p;m&&(p=et.fromString(m,new Qt),p.uncertain=p.uncertain||c?.uncertain||!1,p.approximate=p.approximate||c?.approximate||!1);const w=t[y.monthGroup];let b;w&&(b=tt.fromString(w,new Zt),b.uncertain=b.uncertain||p?.uncertain||!1,b.approximate=b.approximate||p?.approximate||!1);const _=t[y.yearGroup];let S;_&&(S=Q.fromString(_,void 0,new Jt),S.uncertain=S.uncertain||b?.uncertain||!1,S.approximate=S.approximate||b?.approximate||!1);const D=t[y.timeshiftGroup],at=D?un.fromString(D,new Xt,{year:S?.value,month:b?.value,day:p?.value,hour:c?.value}):void 0;return{year:S,month:b,day:p,hour:c,minute:a,second:o,millisecond:r,timeshift:at}}}const Br="durationValue";class Ue extends E{static format(t=""){return"^"+E.numberFormat(u.groupName(t,Br),"+",void 0)}constructor(){super(Br,Ue.format())}}class gs extends ke{millisecond=new x("millisecond",0,Number.MAX_SAFE_INTEGER,void 0);second=new x("second",0,Number.MAX_SAFE_INTEGER,this.millisecond);minute=new x("minute",0,Number.MAX_SAFE_INTEGER,this.second);hour=new x("hour",0,Number.MAX_SAFE_INTEGER,this.minute);day=new x("day",1,Number.MAX_SAFE_INTEGER,this.hour);month=new x("month",1,Number.MAX_SAFE_INTEGER,this.day);year=new x("year",0,Number.MAX_SAFE_INTEGER,this.month)}const Mt=new gs;class f extends E{static yearsGroup="years";static monthsGroup="months";static isoMonthsGroup="isoMonths";static daysGroup="days";static hoursGroup="hours";static minutesGroup="minutes";static secondsGroup="seconds";static durationGroup="duration";static suffixGroup="durationSuffix";static componentParser=new Ue;static componentFormat(t,e,r,s,o=""){const i=u.group(u.groupName(t,f.quantityGroup(e)),E.numberFormat(u.groupName(t,r),"+",void 0,"\\d"));return u.group(u.groupName(t,e),i,s,o)}static quantityGroup(t){return t+"Quantity"}static isoMonthsLookahead="(?=[?~%]?\\d+D|T)";constructor(){super("duration",f.format())}static format(t=""){const e=u.groupName(t,f.durationGroup);return this.qualifierFormat(u.groupName(E.uncertainGroup,e),"?")+this.qualifierFormat(u.groupName(E.approximateGroup,e),"~")+this.qualifierFormat(u.groupName(E.uncertainAndApproximateGroup,e),"%")+"P"+u.optional(f.componentFormat(t,f.yearsGroup,y.yearGroup,"Y"))+u.optionalNonCapturingGroup(f.componentFormat(t,f.monthsGroup,y.monthGroup,"MM")+"|"+f.componentFormat(t,f.isoMonthsGroup,"isoMonth","M",f.isoMonthsLookahead))+u.optional(f.componentFormat(t,f.daysGroup,y.dayGroup,"D"))+"T?"+u.optional(f.componentFormat(t,f.hoursGroup,y.hourGroup,"H"))+u.optional(f.componentFormat(t,f.minutesGroup,y.minuteGroup,"M"))+u.optional(f.componentFormat(t,f.secondsGroup,y.secondGroup,"S"))+u.optionalGroup(u.groupName(t,f.suffixGroup),"[?~%]")}static parseComponent(t,e,r){const s=f.componentParser.parse(t);return new e(s,r)}parseGroups(t){const e=t[f.quantityGroup(f.secondsGroup)];let r;e&&(r=f.parseComponent(e,st,Mt.second),r.uncertain=!!t[u.groupName(E.uncertainGroup,f.secondsGroup)]||!1,r.approximate=!!t[u.groupName(E.approximateGroup,f.secondsGroup)]||!1);const s=t[f.quantityGroup(f.minutesGroup)];let o;s&&(o=f.parseComponent(s,nt,Mt.minute),o.uncertain=o.uncertain||r?.uncertain||!1,o.approximate=o.approximate||r?.approximate||!1);const i=t[f.quantityGroup(f.hoursGroup)];let a;i&&(a=f.parseComponent(i,rt,Mt.hour),a.uncertain=a.uncertain||o?.uncertain||!1,a.approximate=a.approximate||o?.approximate||!1);const l=t[f.quantityGroup(f.daysGroup)];let c;l&&(c=f.parseComponent(l,et,Mt.day),c.uncertain=c.uncertain||a?.uncertain||!1,c.approximate=c.approximate||a?.approximate||!1);const m=t[f.quantityGroup(f.monthsGroup)]||t[f.quantityGroup(f.isoMonthsGroup)];let p;m&&(p=f.parseComponent(m,tt,Mt.month),p.uncertain=p.uncertain||c?.uncertain||!1,p.approximate=p.approximate||c?.approximate||!1);const w=t[f.quantityGroup(f.yearsGroup)];let b;w&&(b=f.parseComponent(w,Q,Mt.year),b.uncertain=b.uncertain||p?.uncertain||!1,b.approximate=b.approximate||p?.approximate||!1);const _=t[f.suffixGroup],S=!!t[u.groupName(E.uncertainAndApproximateGroup,f.durationGroup)]||_==="%",D=S||!!t[u.groupName(E.uncertainGroup,f.durationGroup)]||_==="?",at=S||!!t[u.groupName(E.approximateGroup,f.durationGroup)]||_==="~";return{years:b,months:p,days:c,hours:a,minutes:o,seconds:r,uncertain:D,approximate:at}}}const ws="dates",Ae="start",_e="end",Cr="durations",Te="durationMin",Ne="durationMax";class fe extends ot{static format=u.group(ws,u.optionalGroup(Ae,u.group("openStart","\\.\\.")+"|"+y.format(Ae))+"/"+u.optionalGroup(_e,u.group("openEnd","\\.\\.")+"|"+y.format(_e)))+"|"+u.group(Cr,u.group(Te,f.format(Te))+"/"+u.group(Ne,f.format(Ne)));constructor(t="interval",e=fe.format){super(t,e)}parseGroups(t){let e,r;if(t[Cr]){const o=t[Te];e=G.fromString(o,new f);const i=t[Ne];r=G.fromString(i,new f)}else{const o=t[Ae];switch(o){case void 0:e=null;break;case"..":e=void 0;break;default:e=U.fromString(o,new y)}const i=t[_e];switch(i){case void 0:r=null;break;case"..":r=void 0;break;default:r=U.fromString(i,new y)}}return{start:e,end:r}}}class bs{parse(t){t=t.trim();const e=t.startsWith("["),s=t.substring(1,t.length-1).split(","),o=[];for(const i of s){let a;i.includes("..")?a=Ut.fromString(i.replace("..","/"),new fe):a=U.fromString(i,new y),o.push(a)}return{values:o,exclusive:e}}}h.register(U,()=>new y);h.register(et,()=>new Qt);h.register(G,()=>new f);h.register(rt,()=>new te);h.register(Ut,()=>new fe);h.register(nt,()=>new re);h.register(tt,()=>new Zt);h.register(st,()=>new ee);h.register(de,()=>new bs);h.register(Q,()=>new Jt);class Z{constructor(t){this.preferences=t}read(t){var e,r;if(t===void 0)return;if(typeof t=="string")return t===""?void 0:t;for(const o of this.preferences){const i=(e=t[o])!==null&&e!==void 0?e:t[Z.base(o)];if(i)return i}const s=new Set(this.preferences.map(o=>Z.base(o)));for(const[o,i]of Object.entries(t))if(i&&s.has(Z.base(o)))return i;return(r=Object.values(t).find(o=>o))!==null&&r!==void 0?r:void 0}write(t,e,r){var s,o;const i=e?.trim()?e.trim():void 0;if(t===void 0||typeof t=="string")return i;const a={...t},l=(o=(s=Object.keys(a).find(c=>c===r))!==null&&s!==void 0?s:Object.keys(a).find(c=>Z.base(c)===Z.base(r)))!==null&&o!==void 0?o:r;return i===void 0?delete a[l]:a[l]=i,Object.keys(a).length===0?void 0:a}static base(t){return t.toLowerCase().split("-")[0]}}Z.any=new Z([]);var jr;(function(n){n.abductee="abductee",n.actor="actor",n.artist="artist",n.anthropologist="anthropologist",n.archeologist="archeologist",n.astronaut="astronaut",n.astronomer="astronomer",n.astrologist="astrologist",n.astrophysicist="astrophysicist",n.banker="banker",n.barman="barman",n.biologist="biologist",n.biochemist="biochemist",n.biophysicist="biophysicist",n.bishop="bishop",n.businessman="businessman",n.botanist="botanist",n.cameraman="cameraman",n.chemist="chemist",n.contactee="contactee",n.cryptozoologist="cryptozoologist",n.dentist="dentist",n.director="director",n.diplomat="diplomat",n.diver="diver",n.electronics="electronics",n.engineer="engineer",n.ethnologist="ethnologist",n.exobiologist="exobiologist",n.farmer="farmer",n.firefighter="firefighter",n.flightAttendant="flightAttendant",n.geologist="geologist",n.geophysicist="geophysicist",n.geographer="geographer",n.historian="historian",n.houseWife="houseWife",n.hypnotherapist="hypnotherapist",n.illusionist="illusionist",n.journalist="journalist",n.judge="judge",n.lawyer="lawyer",n.leader="leader",n.librarian="librarian",n.logger="logger",n.mathematician="mathematician",n.mechanic="mechanic",n.meteorologist="meteorologist",n.military="military",n.musician="musician",n.neurologist="neurologist",n.neuroscientist="neuroscientist",n.neuropsychiatrist="neuropsychiatrist",n.nurse="nurse",n.oceanographer="oceanographer",n.painter="painter",n.parapsychologist="parapsychologist",n.philosopher="philosopher",n.photographer="photographer",n.physician="physician",n.physicist="physicist",n.pilot="pilot",n.politician="politician",n.policeman="policeman",n.priest="priest",n.producer="producer",n.prospector="prospector",n.psychologist="psychologist",n.psychiatrist="psychiatrist",n.radioastronomer="radioastronomer",n.radioamateur="radioamateur",n.salesman="salesman",n.sailor="sailor",n.sociologist="sociologist",n.softwareEngineer="softwareEngineer",n.stuntman="stuntman",n.taxiDriver="taxiDriver",n.teacher="teacher",n.telegrapher="telegrapher",n.truckDriver="truckDriver",n.ufologist="ufologist",n.ufoWitness="ufoWitness",n.ufoWitness2="ufoWitness2",n.worker="worker",n.writer="writer"})(jr||(jr={}));var Hr;(function(n){n.neutral="neutral",n.male="male",n.female="female"})(Hr||(Hr={}));class Es extends Error{constructor(t,e){super(t),this.cause=e}}class Be extends Es{constructor(t=Be.defaultMessage,e){super(t,e)}}Be.defaultMessage="Assertion failed";var Lr;(function(n){n.country="country",n.region="region",n.department="department",n.city="city",n.company="company"})(Lr||(Lr={}));var Kr;(function(n){n.at="at",n.au="au",n.ar="ar",n.be="be",n.br="br",n.ca="ca",n.ch="ch",n.cn="cn",n.cl="cl",n.co="co",n.cy="cy",n.de="de",n.dk="dk",n.do="do",n.dz="dz",n.gr="gr",n.ec="ec",n.eg="eg",n.es="es",n.fi="fi",n.fr="fr",n.ga="ga",n.ge="ge",n.hu="hu",n.in="in",n.ie="ie",n.ir="ir",n.il="il",n.it="it",n.jp="jp",n.kr="kr",n.ma="ma",n.mx="mx",n.my="my",n.mz="mz",n.nl="nl",n.no="no",n.nz="nz",n.pa="pa",n.pe="pe",n.ph="ph",n.pl="pl",n.pt="pt",n.ro="ro",n.ru="ru",n.sc="sc",n.tr="tr",n.ua="ua",n.uk="uk",n.us="us",n.sa="sa",n.se="se",n.su="su",n.tn="tn",n.tw="tw",n.ve="ve",n.za="za"})(Kr||(Kr={}));function ys(n,t){for(const e of n){const r=e.toLowerCase().split("-")[0];if(t.includes(r))return r}return"en"}class zr{static preferencesFor(t){const e=navigator.languages??[],r=this.declaredFor(t);return r?[r,...e]:e}static declaredFor(t){for(let e=t;e;){const r=e.closest("[lang]")?.getAttribute("lang")?.trim();if(r)return r;const s=e.getRootNode();e=s instanceof ShadowRoot?s.host:void 0}}}const Ss=["en","fr","es","it"],xs={en:()=>d(()=>import("./UfoMessages_en-D5OYWJ3K.js"),__vite__mapDeps([33,24]),import.meta.url).then(n=>n.ufoMessages_en),fr:()=>d(()=>import("./UfoMessages_fr-CGkQBn5r.js"),[],import.meta.url).then(n=>n.ufoMessages_fr),es:()=>d(()=>import("./UfoMessages_es-CO-v8Jl6.js"),[],import.meta.url).then(n=>n.ufoMessages_es),it:()=>d(()=>import("./UfoMessages_it-BScqxIaH.js"),[],import.meta.url).then(n=>n.ufoMessages_it)},Ys=T.catalog(xs),Ms={en:()=>d(()=>import("./SightingEditorMessages_en-k7_ua2OM.js"),__vite__mapDeps([34,35]),import.meta.url).then(n=>n.sightingEditorMessages_en),fr:()=>d(()=>import("./SightingEditorMessages_fr-B_K5hsuV.js"),__vite__mapDeps([36,37]),import.meta.url).then(n=>n.sightingEditorMessages_fr),es:()=>d(()=>import("./SightingEditorMessages_es-Drqbbr5_.js"),__vite__mapDeps([38,39]),import.meta.url).then(n=>n.sightingEditorMessages_es),it:()=>d(()=>import("./SightingEditorMessages_it-QCLg1d7x.js"),__vite__mapDeps([40,41]),import.meta.url).then(n=>n.sightingEditorMessages_it)},vs=T.catalog(Ms);function Xs(n){return vs.load(n)}const As={en:()=>d(()=>import("./SightingMessages_en-CzICxNU3.js"),__vite__mapDeps([42,35]),import.meta.url).then(n=>n.sightingMessages_en),fr:()=>d(()=>import("./SightingMessages_fr-nopOVDa1.js"),__vite__mapDeps([43,37]),import.meta.url).then(n=>n.sightingMessages_fr),es:()=>d(()=>import("./SightingMessages_es-CiVFZlgA.js"),__vite__mapDeps([44,39]),import.meta.url).then(n=>n.sightingMessages_es),it:()=>d(()=>import("./SightingMessages_it-Cu0nnPts.js"),__vite__mapDeps([45,41]),import.meta.url).then(n=>n.sightingMessages_it)},Js=T.catalog(As),_s={en:()=>d(()=>import("./CaseMessages_en-BC0lku35.js"),[],import.meta.url).then(n=>n.caseMessages_en),fr:()=>d(()=>import("./CaseMessages_fr-D_6J6ONO.js"),[],import.meta.url).then(n=>n.caseMessages_fr),es:()=>d(()=>import("./CaseMessages_es-Cbktn5vj.js"),[],import.meta.url).then(n=>n.caseMessages_es),it:()=>d(()=>import("./CaseMessages_it-CYyww4oG.js"),[],import.meta.url).then(n=>n.caseMessages_it)},Ts=T.catalog(_s);function Zs(n){return Ts.load(n)}const Ns={en:()=>d(()=>import("./UfoAtHomeMessages_en-BK2qJyZN.js"),[],import.meta.url).then(n=>n.ufoAtHomeMessages_en),fr:()=>d(()=>import("./UfoAtHomeMessages_fr-BTG047qo.js"),[],import.meta.url).then(n=>n.ufoAtHomeMessages_fr),es:()=>d(()=>import("./UfoAtHomeMessages_es-B1-NDCau.js"),[],import.meta.url).then(n=>n.ufoAtHomeMessages_es),it:()=>d(()=>import("./UfoAtHomeMessages_it-Ryxv4HNU.js"),[],import.meta.url).then(n=>n.ufoAtHomeMessages_it)},Gs=T.catalog(Ns);function Is(n){return Gs.load(n)}const Rs={en:()=>d(()=>import("./ShareMessages_en-B43x8LgJ.js"),[],import.meta.url).then(n=>n.shareMessages_en),fr:()=>d(()=>import("./ShareMessages_fr-CzZyVbbX.js"),[],import.meta.url).then(n=>n.shareMessages_fr),es:()=>d(()=>import("./ShareMessages_es-DZCJojSc.js"),[],import.meta.url).then(n=>n.shareMessages_es),it:()=>d(()=>import("./ShareMessages_it-C_Z6eDQK.js"),[],import.meta.url).then(n=>n.shareMessages_it)},Qs=T.catalog(Rs);function to(n){switch(n){case"fr":return d(()=>import("./TagNames_fr-Dnqq6HQ5.js"),[],import.meta.url).then(t=>t.tagNames_fr);case"es":return d(()=>import("./TagNames_es-BfnMpc3D.js"),[],import.meta.url).then(t=>t.tagNames_es);case"it":return d(()=>import("./TagNames_it-n6E4EGYO.js"),[],import.meta.url).then(t=>t.tagNames_it);default:return Promise.resolve({})}}const Vs={en:()=>d(()=>import("./BodyEditorMessages_en-CckxSS1L.js"),[],import.meta.url).then(n=>n.bodyEditorMessages_en),fr:()=>d(()=>import("./BodyEditorMessages_fr-638ypdqf.js"),[],import.meta.url).then(n=>n.bodyEditorMessages_fr),es:()=>d(()=>import("./BodyEditorMessages_es-B8GlFFBo.js"),[],import.meta.url).then(n=>n.bodyEditorMessages_es),it:()=>d(()=>import("./BodyEditorMessages_it-SKpMkHFI.js"),[],import.meta.url).then(n=>n.bodyEditorMessages_it)},ks={en:()=>d(()=>import("./CaseEditorMessages_en-pog3M_U6.js"),[],import.meta.url).then(n=>n.caseEditorMessages_en),fr:()=>d(()=>import("./CaseEditorMessages_fr-BOKVeIXM.js"),[],import.meta.url).then(n=>n.caseEditorMessages_fr),es:()=>d(()=>import("./CaseEditorMessages_es-Dz1N0VpM.js"),[],import.meta.url).then(n=>n.caseEditorMessages_es),it:()=>d(()=>import("./CaseEditorMessages_it-BKAkbKq-.js"),[],import.meta.url).then(n=>n.caseEditorMessages_it)},Os={en:()=>d(()=>import("./ReadingSensitivityMessages_en-ChQHFyxb.js"),[],import.meta.url).then(n=>n.readingSensitivityMessages_en),fr:()=>d(()=>import("./ReadingSensitivityMessages_fr-Dl4a8udu.js"),[],import.meta.url).then(n=>n.readingSensitivityMessages_fr),es:()=>d(()=>import("./ReadingSensitivityMessages_es-BbFqHsvR.js"),[],import.meta.url).then(n=>n.readingSensitivityMessages_es),it:()=>d(()=>import("./ReadingSensitivityMessages_it-CwiJfUo_.js"),[],import.meta.url).then(n=>n.readingSensitivityMessages_it)},eo=T.catalog(Os),$s={en:()=>d(()=>import("./ScenarioSweepMessages_en-Bf4BscDU.js"),[],import.meta.url).then(n=>n.scenarioSweepMessages_en),fr:()=>d(()=>import("./ScenarioSweepMessages_fr-DlPsO6oI.js"),[],import.meta.url).then(n=>n.scenarioSweepMessages_fr),es:()=>d(()=>import("./ScenarioSweepMessages_es-CBHQfuRB.js"),[],import.meta.url).then(n=>n.scenarioSweepMessages_es),it:()=>d(()=>import("./ScenarioSweepMessages_it-DANW3_la.js"),[],import.meta.url).then(n=>n.scenarioSweepMessages_it)},ro=T.catalog($s),Fs={en:()=>d(()=>import("./CaseExportMessages_en-jHlu58Y7.js"),[],import.meta.url).then(n=>n.caseExportMessages_en),fr:()=>d(()=>import("./CaseExportMessages_fr-sDfEgjWg.js"),[],import.meta.url).then(n=>n.caseExportMessages_fr),es:()=>d(()=>import("./CaseExportMessages_es-dCQQFgjq.js"),[],import.meta.url).then(n=>n.caseExportMessages_es),it:()=>d(()=>import("./CaseExportMessages_it-BJaglZtP.js"),[],import.meta.url).then(n=>n.caseExportMessages_it)},no=T.catalog(Fs),Ds={en:()=>d(()=>import("./InterviewMessages_en-BrnxG2rl.js"),[],import.meta.url).then(n=>n.interviewMessages_en),fr:()=>d(()=>import("./InterviewMessages_fr-DIA-1qu8.js"),[],import.meta.url).then(n=>n.interviewMessages_fr),es:()=>d(()=>import("./InterviewMessages_es-Dxfjqrte.js"),[],import.meta.url).then(n=>n.interviewMessages_es),it:()=>d(()=>import("./InterviewMessages_it-CYBEIKX-.js"),[],import.meta.url).then(n=>n.interviewMessages_it)},so=T.catalog(Ds),oo=T.catalog(ks),io=T.catalog(Vs),Ps=T.catalog({en:()=>d(()=>import("./SceneNames_en-7OZ7peGc.js"),__vite__mapDeps([46,7]),import.meta.url).then(n=>n.sceneNames_en),fr:()=>d(()=>import("./SceneNames_fr-qzw0QzD0.js"),__vite__mapDeps([47,7]),import.meta.url).then(n=>n.sceneNames_fr),es:()=>d(()=>import("./SceneNames_es-P5-Mavdi.js"),__vite__mapDeps([48,7]),import.meta.url).then(n=>n.sceneNames_es),it:()=>d(()=>import("./SceneNames_it-Sqf8JFOd.js"),__vite__mapDeps([49,7]),import.meta.url).then(n=>n.sceneNames_it)});function ao(n){return Ps.load(n)}const uo=T.catalog({en:()=>d(()=>import("./CloudEditorMessages_en-SmcRKW1O.js"),[],import.meta.url).then(n=>n.cloudEditorMessages_en),fr:()=>d(()=>import("./CloudEditorMessages_fr-SvL-CR04.js"),[],import.meta.url).then(n=>n.cloudEditorMessages_fr),es:()=>d(()=>import("./CloudEditorMessages_es-DFCuS9Qg.js"),[],import.meta.url).then(n=>n.cloudEditorMessages_es),it:()=>d(()=>import("./CloudEditorMessages_it-BvfiHWV9.js"),[],import.meta.url).then(n=>n.cloudEditorMessages_it)}),qr="rr0-ufoathome",Us='<svg viewBox="0 0 16 16" width="16" height="16" aria-hidden="true" fill="none" stroke="currentColor" stroke-width="1.7" stroke-linecap="round"><path d="M8 3v10M3 8h10"/></svg>',Bs='<svg viewBox="0 0 16 16" width="16" height="16" aria-hidden="true" fill="none" stroke="currentColor" stroke-width="1.7" stroke-linecap="round" stroke-linejoin="round"><path d="M2 4.5h4l1.5 1.5H14v6.5H2z"/></svg>',Cs=`
|
|
118
118
|
<style>
|
|
119
119
|
:host { display: block; ${we.TOKENS} }
|
|
120
120
|
:host([hidden]) { display: none; }
|
|
@@ -167,4 +167,4 @@ ${C.CSS}
|
|
|
167
167
|
<p id="recent-none" class="recent-none" hidden></p>
|
|
168
168
|
</div>
|
|
169
169
|
<slot></slot>
|
|
170
|
-
`;class Ce extends HTMLElement{switcher=new Ve(t=>this.append(t),void 0,t=>this.dispatchEvent(new CustomEvent(
|
|
170
|
+
`;class Ce extends HTMLElement{switcher=new Ve(t=>this.append(t),void 0,t=>this.dispatchEvent(new CustomEvent(pn,{detail:t,bubbles:!0,composed:!0})));shadow;messages;started=!1;constructor(){super(),Qr(),this.shadow=this.attachShadow({mode:"open"}),this.shadow.innerHTML=Cs,this.byId("new").addEventListener("click",()=>void this.startNew()),this.byId("open").addEventListener("click",()=>{this.placeMenu(),this.showRecent()}),this.byId("open-file").addEventListener("filepick",t=>{this.closeMenu(),this.openPick(t.detail)})}connectedCallback(){if(window.addEventListener("resize",this.fitHeight),this.fitHeight(),this.started)return;this.started=!0,this.loadLocale();const t=this.getAttribute("src")??void 0,e=this.getAttribute("track")??void 0,r=t&&this.getAttribute("mode")!=="edit"?this.switcher.read({src:t,...e?{track:e}:{}}):this.switcher.edit({...t?{src:t}:{},...e?{track:e}:{}});this.ready=r.catch(()=>this.say(this.messages?.openFailed,"error")),this.ready.then(this.fitHeight)}disconnectedCallback(){window.removeEventListener("resize",this.fitHeight)}fitHeight=()=>{const t=this.byId("open").closest(".bar").getBoundingClientRect().bottom+window.scrollY;this.style.setProperty("--rr0-editor-height",`calc(100dvh - ${Math.round(t+12)}px)`)};ready=Promise.resolve();async openFiles(t,e){const r=(await Promise.all(t.map(async i=>{const a=await Ce.textOf(i);try{return{name:i.name,text:a,json:JSON.parse(a)}}catch{return}}))).filter(i=>i!==void 0);if(r.length===0){this.say(this.messages?.noJson,"warning");return}const s=k.localBase();k.hold(new Map(r.map(i=>[new URL(i.name,s).href,{json:i.json,changed:!1,local:!0}])));const o=r.find(i=>H.isCase(i.json))??r[0];this.say(void 0),await this.switcher.open(new URL(o.name,s).href),await R.add(e&&e.length?{kind:"handles",name:o.name,openedAt:Date.now(),handles:e}:{kind:"copy",name:o.name,openedAt:Date.now(),copies:r.map(({name:i,text:a})=>({name:i,text:a}))})}static textOf(t){return new Promise((e,r)=>{const s=new FileReader;s.onload=()=>e(s.result),s.onerror=()=>r(s.error),s.readAsText(t)})}async openAddress(t){const e=new URL(t,location.href).href;this.say(void 0),await this.switcher.open(e),await R.add({kind:"address",name:decodeURIComponent(new URL(e).pathname.split("/").pop()||e),openedAt:Date.now(),url:e})}async openPick(t){try{t.url!==void 0?await this.openAddress(t.url):await this.openFiles(t.files??[t.file],t.handles)}catch{this.say(this.messages?.openFailed,"error")}}async reopen(t){this.closeMenu();try{t.kind==="address"?await this.openAddress(t.url):await this.openFiles(await R.files(t),t.kind==="handles"?t.handles:void 0)}catch{this.say(this.messages?.openFailed,"error")}}async startNew(){const t=this.getAttribute("case-template");if(!t)return this.switcher.startNew();let e;try{e=await z.load(t)}catch{this.say(this.messages?.caseTemplateFailed,"error");return}this.say(void 0);const{ModuleSession:r}=await d(async()=>{const{ModuleSession:s}=await import("./ModuleSession-BKDWGSEo.js");return{ModuleSession:s}},__vite__mapDeps([50,25,4]),import.meta.url);if(r.shared.require(e.modules,e.url,!0),e.starts.length===1)return this.start(e.starts[0]);this.showStarts(e)}async start(t){if(this.closeStarts(),t.modules?.length){const{ModuleSession:e}=await d(async()=>{const{ModuleSession:r}=await import("./ModuleSession-BKDWGSEo.js");return{ModuleSession:r}},__vite__mapDeps([50,25,4]),import.meta.url);await e.shared.require(t.modules,void 0,!0)}await this.switcher.startNew(t)}showStarts(t){const e=new Z(zr.preferencesFor(this));this.byId("starts-heading").textContent=e.read(t.title)??"",this.byId("starts").replaceChildren(...t.starts.map(o=>{const i=document.createElement("li"),a=document.createElement("button");a.type="button",a.dataset.start=o.id;const l=document.createElement("span");if(l.className="name",l.textContent=e.read(o.title)??"",a.append(l),o.description){const c=document.createElement("span");c.className="what",c.textContent=e.read(o.description)??"",a.append(c)}return a.addEventListener("click",()=>void this.start(o)),i.append(a),i}));const r=this.byId("new-menu"),s=this.byId("new").getBoundingClientRect();r.style.top=`${Math.round(s.bottom+6)}px`,r.style.right=`${Math.max(8,Math.round(window.innerWidth-s.right))}px`;try{r.showPopover?.()}catch{}}closeStarts(){const t=this.byId("new-menu");try{t.hidePopover?.()}catch{}}async showRecent(){const t=this.messages,e=await R.list();this.byId("recent").replaceChildren(...e.map(o=>{const i=document.createElement("li"),a=document.createElement("button");a.type="button",a.className="reopen";const l=document.createElement("span");l.className="name",l.textContent=o.name;const c=document.createElement("span");c.className="how";const m=new Date(o.openedAt).toLocaleString(this.language,{dateStyle:"medium",timeStyle:"short"}),p=o.kind==="address"?t?.recentAddress:o.kind==="handles"?t?.recentHandles:t?.recentCopy;c.textContent=`${m} · ${p??""}`,a.title=o.kind==="address"?o.url:o.name,a.append(l,c),a.addEventListener("click",()=>void this.reopen(o));const w=document.createElement("button");return w.type="button",w.className="remove",w.textContent="×",w.title=t?.recentRemove??"",w.setAttribute("aria-label",t?.recentRemove??""),w.addEventListener("click",()=>void R.remove(o).then(()=>this.showRecent())),i.append(a,w),i}));const s=this.byId("recent-none");s.hidden=e.length>0}placeMenu(){const t=this.byId("open").getBoundingClientRect(),e=this.byId("open-menu");e.style.top=`${Math.round(t.bottom+6)}px`,e.style.right=`${Math.max(8,Math.round(window.innerWidth-t.right))}px`}closeMenu(){const t=this.byId("open-menu");try{t.hidePopover?.()}catch{}}say(t,e="info"){const r=this.byId("status");C.show(r,t,e)}language="en";async loadLocale(){this.language=ys(zr.preferencesFor(this),Ss);const t=this.messages=await Is(this.language);this.byId("label-new").textContent=t.newFile,this.byId("new").title=t.newFileHint,this.byId("label-open").textContent=t.open,this.byId("open").title=t.openHint,this.byId("open-together").textContent=t.openTogether,this.byId("recent-heading").textContent=t.recentHeading,this.byId("recent-none").textContent=t.recentNone,this.byId("open-file").messages=t}byId(t){return this.shadow.getElementById(t)}}function js(){customElements.get(qr)||customElements.define(qr,Ce)}js();export{qs as $,eo as A,no as B,H as C,Ys as D,hn as E,ct as F,Qs as G,zr as H,Ie as I,y as J,ae as K,U as L,T as M,zs as N,k as O,j as P,ue as Q,Hs as R,Z as S,so as T,Ss as U,Xs as V,K as W,io as X,Ls as Y,Ks as Z,d as _,ce as a,Ws as a0,Js as b,to as c,ao as d,ro as e,uo as f,v as g,we as h,C as i,Xr as j,q as k,Zs as l,fn as m,xt as n,Zr as o,N as p,Ge as q,Qr as r,ys as s,vs as t,ge as u,Ve as v,pn as w,z as x,oo as y,mn as z};
|