@mountaya/studio-react 0.0.0-stage → 0.1.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/CHANGELOG.md +54 -0
- package/LICENCE.fr.txt +280 -0
- package/LICENSE.txt +262 -0
- package/README.md +1087 -2
- package/THIRD-PARTY-NOTICES.txt +149 -0
- package/dist/AgentMarkdown-RNLATZYN.cjs +213 -0
- package/dist/AgentMarkdown-RNLATZYN.cjs.map +1 -0
- package/dist/AgentMarkdown-TMN6E2XC.js +206 -0
- package/dist/AgentMarkdown-TMN6E2XC.js.map +1 -0
- package/dist/ContextMenuPopup-EOYN42YZ.js +468 -0
- package/dist/ContextMenuPopup-EOYN42YZ.js.map +1 -0
- package/dist/ContextMenuPopup-VQLAYYYZ.cjs +470 -0
- package/dist/ContextMenuPopup-VQLAYYYZ.cjs.map +1 -0
- package/dist/CopilotPanel-CCLEYZUN.js +29 -0
- package/dist/CopilotPanel-CCLEYZUN.js.map +1 -0
- package/dist/CopilotPanel-LYPMTDKX.cjs +38 -0
- package/dist/CopilotPanel-LYPMTDKX.cjs.map +1 -0
- package/dist/DateTimePickerField-FZRKJ2SU.js +53 -0
- package/dist/DateTimePickerField-FZRKJ2SU.js.map +1 -0
- package/dist/DateTimePickerField-NB456C6F.cjs +55 -0
- package/dist/DateTimePickerField-NB456C6F.cjs.map +1 -0
- package/dist/DirectionsModal-4Y346QFU.cjs +291 -0
- package/dist/DirectionsModal-4Y346QFU.cjs.map +1 -0
- package/dist/DirectionsModal-DRPO2654.js +289 -0
- package/dist/DirectionsModal-DRPO2654.js.map +1 -0
- package/dist/DuplicateItineraryModal-2QGWI7E7.js +321 -0
- package/dist/DuplicateItineraryModal-2QGWI7E7.js.map +1 -0
- package/dist/DuplicateItineraryModal-WFGMU6JL.cjs +323 -0
- package/dist/DuplicateItineraryModal-WFGMU6JL.cjs.map +1 -0
- package/dist/EditCollectionModal-4QYP53SX.js +90 -0
- package/dist/EditCollectionModal-4QYP53SX.js.map +1 -0
- package/dist/EditCollectionModal-T2TMAO53.cjs +92 -0
- package/dist/EditCollectionModal-T2TMAO53.cjs.map +1 -0
- package/dist/EmbedSnippetCode-NMFCQ7TF.cjs +62 -0
- package/dist/EmbedSnippetCode-NMFCQ7TF.cjs.map +1 -0
- package/dist/EmbedSnippetCode-TGBSWDMD.js +60 -0
- package/dist/EmbedSnippetCode-TGBSWDMD.js.map +1 -0
- package/dist/EmbedTablePreview-3RRHM63Q.js +72 -0
- package/dist/EmbedTablePreview-3RRHM63Q.js.map +1 -0
- package/dist/EmbedTablePreview-Z3W62MRV.cjs +74 -0
- package/dist/EmbedTablePreview-Z3W62MRV.cjs.map +1 -0
- package/dist/ExportModal-5NUZZPXN.cjs +267 -0
- package/dist/ExportModal-5NUZZPXN.cjs.map +1 -0
- package/dist/ExportModal-H7OYP6CK.js +265 -0
- package/dist/ExportModal-H7OYP6CK.js.map +1 -0
- package/dist/FileDropzone-GKPMAZF5.cjs +41 -0
- package/dist/FileDropzone-GKPMAZF5.cjs.map +1 -0
- package/dist/FileDropzone-GRXY4FXR.js +39 -0
- package/dist/FileDropzone-GRXY4FXR.js.map +1 -0
- package/dist/LocationPermissionModal-AFHI5J4S.cjs +92 -0
- package/dist/LocationPermissionModal-AFHI5J4S.cjs.map +1 -0
- package/dist/LocationPermissionModal-MURJ5DDB.js +90 -0
- package/dist/LocationPermissionModal-MURJ5DDB.js.map +1 -0
- package/dist/ManageCollectionsModal-E3IUHUTO.cjs +402 -0
- package/dist/ManageCollectionsModal-E3IUHUTO.cjs.map +1 -0
- package/dist/ManageCollectionsModal-FIHSZXSR.js +400 -0
- package/dist/ManageCollectionsModal-FIHSZXSR.js.map +1 -0
- package/dist/NewCollectionModal-7TBWVA3G.js +75 -0
- package/dist/NewCollectionModal-7TBWVA3G.js.map +1 -0
- package/dist/NewCollectionModal-QFQYCKCG.cjs +77 -0
- package/dist/NewCollectionModal-QFQYCKCG.cjs.map +1 -0
- package/dist/RoadAccessModal-DNUJV5PC.js +57 -0
- package/dist/RoadAccessModal-DNUJV5PC.js.map +1 -0
- package/dist/RoadAccessModal-WLLL2ASZ.cjs +59 -0
- package/dist/RoadAccessModal-WLLL2ASZ.cjs.map +1 -0
- package/dist/SegmentColorPicker-7Y4JEPFC.cjs +81 -0
- package/dist/SegmentColorPicker-7Y4JEPFC.cjs.map +1 -0
- package/dist/SegmentColorPicker-UNLPITUA.js +79 -0
- package/dist/SegmentColorPicker-UNLPITUA.js.map +1 -0
- package/dist/SegmentGroupModal-F54FZUR2.cjs +32 -0
- package/dist/SegmentGroupModal-F54FZUR2.cjs.map +1 -0
- package/dist/SegmentGroupModal-KBU7OPNJ.js +23 -0
- package/dist/SegmentGroupModal-KBU7OPNJ.js.map +1 -0
- package/dist/ShareCollectionModal-TWYE6JJ4.cjs +82 -0
- package/dist/ShareCollectionModal-TWYE6JJ4.cjs.map +1 -0
- package/dist/ShareCollectionModal-VXSRHX4S.js +80 -0
- package/dist/ShareCollectionModal-VXSRHX4S.js.map +1 -0
- package/dist/ShareModal-HLYNE7OL.js +115 -0
- package/dist/ShareModal-HLYNE7OL.js.map +1 -0
- package/dist/ShareModal-WISND27S.cjs +117 -0
- package/dist/ShareModal-WISND27S.cjs.map +1 -0
- package/dist/VideoExportWizard-BSDWA3B5.js +44 -0
- package/dist/VideoExportWizard-BSDWA3B5.js.map +1 -0
- package/dist/VideoExportWizard-UOHR4MNS.cjs +53 -0
- package/dist/VideoExportWizard-UOHR4MNS.cjs.map +1 -0
- package/dist/WaypointDetailsModal-LK5LBK6S.js +270 -0
- package/dist/WaypointDetailsModal-LK5LBK6S.js.map +1 -0
- package/dist/WaypointDetailsModal-MEMOLLUY.cjs +272 -0
- package/dist/WaypointDetailsModal-MEMOLLUY.cjs.map +1 -0
- package/dist/WaypointWorkbench-DCCLBURG.cjs +1204 -0
- package/dist/WaypointWorkbench-DCCLBURG.cjs.map +1 -0
- package/dist/WaypointWorkbench-NRCLGU23.js +1202 -0
- package/dist/WaypointWorkbench-NRCLGU23.js.map +1 -0
- package/dist/chunk-22BNE3YV.js +13 -0
- package/dist/chunk-22BNE3YV.js.map +1 -0
- package/dist/chunk-24RNBTO2.cjs +154 -0
- package/dist/chunk-24RNBTO2.cjs.map +1 -0
- package/dist/chunk-2DDL2LIJ.cjs +65 -0
- package/dist/chunk-2DDL2LIJ.cjs.map +1 -0
- package/dist/chunk-2GAMKPS2.cjs +16 -0
- package/dist/chunk-2GAMKPS2.cjs.map +1 -0
- package/dist/chunk-2K4HCCZJ.cjs +51 -0
- package/dist/chunk-2K4HCCZJ.cjs.map +1 -0
- package/dist/chunk-2MHWH3TS.cjs +119 -0
- package/dist/chunk-2MHWH3TS.cjs.map +1 -0
- package/dist/chunk-2MQBPZNR.cjs +12 -0
- package/dist/chunk-2MQBPZNR.cjs.map +1 -0
- package/dist/chunk-2QSPCXLM.js +84 -0
- package/dist/chunk-2QSPCXLM.js.map +1 -0
- package/dist/chunk-32WRG44G.js +66 -0
- package/dist/chunk-32WRG44G.js.map +1 -0
- package/dist/chunk-32XMYLEB.js +9 -0
- package/dist/chunk-32XMYLEB.js.map +1 -0
- package/dist/chunk-3BEHHSVE.cjs +790 -0
- package/dist/chunk-3BEHHSVE.cjs.map +1 -0
- package/dist/chunk-3HF2XZKQ.js +8 -0
- package/dist/chunk-3HF2XZKQ.js.map +1 -0
- package/dist/chunk-3K2NX5FH.js +51 -0
- package/dist/chunk-3K2NX5FH.js.map +1 -0
- package/dist/chunk-3Q23QKNI.cjs +26 -0
- package/dist/chunk-3Q23QKNI.cjs.map +1 -0
- package/dist/chunk-3TQV2M4C.cjs +16 -0
- package/dist/chunk-3TQV2M4C.cjs.map +1 -0
- package/dist/chunk-3XDKDTE6.js +16 -0
- package/dist/chunk-3XDKDTE6.js.map +1 -0
- package/dist/chunk-46EARJWC.js +288 -0
- package/dist/chunk-46EARJWC.js.map +1 -0
- package/dist/chunk-4DQOJIUV.js +96 -0
- package/dist/chunk-4DQOJIUV.js.map +1 -0
- package/dist/chunk-4T52NAVT.js +10 -0
- package/dist/chunk-4T52NAVT.js.map +1 -0
- package/dist/chunk-4TPRVQGY.js +12 -0
- package/dist/chunk-4TPRVQGY.js.map +1 -0
- package/dist/chunk-4TX5E63A.cjs +12 -0
- package/dist/chunk-4TX5E63A.cjs.map +1 -0
- package/dist/chunk-4VKJF24B.js +22 -0
- package/dist/chunk-4VKJF24B.js.map +1 -0
- package/dist/chunk-4Z734K3L.js +15 -0
- package/dist/chunk-4Z734K3L.js.map +1 -0
- package/dist/chunk-4ZRSEOZM.js +629 -0
- package/dist/chunk-4ZRSEOZM.js.map +1 -0
- package/dist/chunk-52T3VZR5.js +55 -0
- package/dist/chunk-52T3VZR5.js.map +1 -0
- package/dist/chunk-56DP2X7U.js +15 -0
- package/dist/chunk-56DP2X7U.js.map +1 -0
- package/dist/chunk-5AHT62LO.js +24 -0
- package/dist/chunk-5AHT62LO.js.map +1 -0
- package/dist/chunk-5BR4CTVV.cjs +17 -0
- package/dist/chunk-5BR4CTVV.cjs.map +1 -0
- package/dist/chunk-5CTZOFDV.cjs +17 -0
- package/dist/chunk-5CTZOFDV.cjs.map +1 -0
- package/dist/chunk-5F55MFIX.cjs +45 -0
- package/dist/chunk-5F55MFIX.cjs.map +1 -0
- package/dist/chunk-5FMQJ4A4.cjs +362 -0
- package/dist/chunk-5FMQJ4A4.cjs.map +1 -0
- package/dist/chunk-5PMEAMHS.js +82 -0
- package/dist/chunk-5PMEAMHS.js.map +1 -0
- package/dist/chunk-676DNRSN.js +85 -0
- package/dist/chunk-676DNRSN.js.map +1 -0
- package/dist/chunk-6H2F7JKL.js +179 -0
- package/dist/chunk-6H2F7JKL.js.map +1 -0
- package/dist/chunk-6HMRMON7.js +10 -0
- package/dist/chunk-6HMRMON7.js.map +1 -0
- package/dist/chunk-6NKPZ3LT.cjs +14 -0
- package/dist/chunk-6NKPZ3LT.cjs.map +1 -0
- package/dist/chunk-6TG2HZDG.js +75 -0
- package/dist/chunk-6TG2HZDG.js.map +1 -0
- package/dist/chunk-6WU7XEQA.cjs +103 -0
- package/dist/chunk-6WU7XEQA.cjs.map +1 -0
- package/dist/chunk-6YD325QI.cjs +90 -0
- package/dist/chunk-6YD325QI.cjs.map +1 -0
- package/dist/chunk-7B6TUEL5.js +20 -0
- package/dist/chunk-7B6TUEL5.js.map +1 -0
- package/dist/chunk-7KS5F27H.js +33 -0
- package/dist/chunk-7KS5F27H.js.map +1 -0
- package/dist/chunk-A2N6553V.cjs +295 -0
- package/dist/chunk-A2N6553V.cjs.map +1 -0
- package/dist/chunk-A66FJAVG.js +44 -0
- package/dist/chunk-A66FJAVG.js.map +1 -0
- package/dist/chunk-AF43JU4W.js +27 -0
- package/dist/chunk-AF43JU4W.js.map +1 -0
- package/dist/chunk-AHGHAWYR.js +99 -0
- package/dist/chunk-AHGHAWYR.js.map +1 -0
- package/dist/chunk-AKN5KIZT.js +1969 -0
- package/dist/chunk-AKN5KIZT.js.map +1 -0
- package/dist/chunk-ANTDR5MJ.cjs +12 -0
- package/dist/chunk-ANTDR5MJ.cjs.map +1 -0
- package/dist/chunk-AQ5JIIAE.js +26 -0
- package/dist/chunk-AQ5JIIAE.js.map +1 -0
- package/dist/chunk-ARHO5MLJ.js +10 -0
- package/dist/chunk-ARHO5MLJ.js.map +1 -0
- package/dist/chunk-BAYGKSWY.cjs +26 -0
- package/dist/chunk-BAYGKSWY.cjs.map +1 -0
- package/dist/chunk-BEJ5I724.js +8 -0
- package/dist/chunk-BEJ5I724.js.map +1 -0
- package/dist/chunk-BFNXXLVV.cjs +34 -0
- package/dist/chunk-BFNXXLVV.cjs.map +1 -0
- package/dist/chunk-BFQJDFGB.js +57 -0
- package/dist/chunk-BFQJDFGB.js.map +1 -0
- package/dist/chunk-CHEQJ6N7.cjs +2214 -0
- package/dist/chunk-CHEQJ6N7.cjs.map +1 -0
- package/dist/chunk-CJOJWZM7.js +92 -0
- package/dist/chunk-CJOJWZM7.js.map +1 -0
- package/dist/chunk-CJRSFC45.cjs +578 -0
- package/dist/chunk-CJRSFC45.cjs.map +1 -0
- package/dist/chunk-CWQ4WHPI.cjs +46 -0
- package/dist/chunk-CWQ4WHPI.cjs.map +1 -0
- package/dist/chunk-D3INXUFT.js +360 -0
- package/dist/chunk-D3INXUFT.js.map +1 -0
- package/dist/chunk-D6CDAYZ6.cjs +18 -0
- package/dist/chunk-D6CDAYZ6.cjs.map +1 -0
- package/dist/chunk-DDPXRXRD.cjs +23 -0
- package/dist/chunk-DDPXRXRD.cjs.map +1 -0
- package/dist/chunk-DUUPWSOZ.cjs +14 -0
- package/dist/chunk-DUUPWSOZ.cjs.map +1 -0
- package/dist/chunk-DVWYOHOB.cjs +43 -0
- package/dist/chunk-DVWYOHOB.cjs.map +1 -0
- package/dist/chunk-DZPHWBMC.cjs +11 -0
- package/dist/chunk-DZPHWBMC.cjs.map +1 -0
- package/dist/chunk-E26FROI3.js +68 -0
- package/dist/chunk-E26FROI3.js.map +1 -0
- package/dist/chunk-E7ZTDAQW.cjs +37 -0
- package/dist/chunk-E7ZTDAQW.cjs.map +1 -0
- package/dist/chunk-ECI4EKIV.cjs +94 -0
- package/dist/chunk-ECI4EKIV.cjs.map +1 -0
- package/dist/chunk-EN5RWYHP.cjs +28 -0
- package/dist/chunk-EN5RWYHP.cjs.map +1 -0
- package/dist/chunk-ET3UASEF.cjs +91 -0
- package/dist/chunk-ET3UASEF.cjs.map +1 -0
- package/dist/chunk-EW5SY246.cjs +97 -0
- package/dist/chunk-EW5SY246.cjs.map +1 -0
- package/dist/chunk-EWWHVV7R.cjs +18 -0
- package/dist/chunk-EWWHVV7R.cjs.map +1 -0
- package/dist/chunk-F2LZZC6X.js +90 -0
- package/dist/chunk-F2LZZC6X.js.map +1 -0
- package/dist/chunk-F6VFOI4U.cjs +12 -0
- package/dist/chunk-F6VFOI4U.cjs.map +1 -0
- package/dist/chunk-FGX3TEU4.cjs +12 -0
- package/dist/chunk-FGX3TEU4.cjs.map +1 -0
- package/dist/chunk-FK4F24KE.js +10 -0
- package/dist/chunk-FK4F24KE.js.map +1 -0
- package/dist/chunk-FLIGKB6K.js +313 -0
- package/dist/chunk-FLIGKB6K.js.map +1 -0
- package/dist/chunk-G2NDWNFB.cjs +185 -0
- package/dist/chunk-G2NDWNFB.cjs.map +1 -0
- package/dist/chunk-G2XORRLH.js +15 -0
- package/dist/chunk-G2XORRLH.js.map +1 -0
- package/dist/chunk-GIZN7NX5.cjs +25 -0
- package/dist/chunk-GIZN7NX5.cjs.map +1 -0
- package/dist/chunk-GM2BQ24D.js +47 -0
- package/dist/chunk-GM2BQ24D.js.map +1 -0
- package/dist/chunk-GMQJZ5N7.cjs +50 -0
- package/dist/chunk-GMQJZ5N7.cjs.map +1 -0
- package/dist/chunk-GT7RJOAA.cjs +315 -0
- package/dist/chunk-GT7RJOAA.cjs.map +1 -0
- package/dist/chunk-GWGUMPOL.js +9 -0
- package/dist/chunk-GWGUMPOL.js.map +1 -0
- package/dist/chunk-GWVKSSE3.cjs +154 -0
- package/dist/chunk-GWVKSSE3.cjs.map +1 -0
- package/dist/chunk-GY7UMPHT.cjs +99 -0
- package/dist/chunk-GY7UMPHT.cjs.map +1 -0
- package/dist/chunk-HMVBS5DU.js +150 -0
- package/dist/chunk-HMVBS5DU.js.map +1 -0
- package/dist/chunk-HXHA2C7C.js +169 -0
- package/dist/chunk-HXHA2C7C.js.map +1 -0
- package/dist/chunk-IHMOFX2A.js +208 -0
- package/dist/chunk-IHMOFX2A.js.map +1 -0
- package/dist/chunk-II6C3LU2.cjs +49 -0
- package/dist/chunk-II6C3LU2.cjs.map +1 -0
- package/dist/chunk-IOOAFCSR.cjs +58 -0
- package/dist/chunk-IOOAFCSR.cjs.map +1 -0
- package/dist/chunk-IQZSIOMM.js +10 -0
- package/dist/chunk-IQZSIOMM.js.map +1 -0
- package/dist/chunk-J2H3WIUM.cjs +12 -0
- package/dist/chunk-J2H3WIUM.cjs.map +1 -0
- package/dist/chunk-J62OBSUE.cjs +54 -0
- package/dist/chunk-J62OBSUE.cjs.map +1 -0
- package/dist/chunk-JFJVSJUX.cjs +16 -0
- package/dist/chunk-JFJVSJUX.cjs.map +1 -0
- package/dist/chunk-JI2M77Y7.cjs +68 -0
- package/dist/chunk-JI2M77Y7.cjs.map +1 -0
- package/dist/chunk-JLSOLL3C.js +31 -0
- package/dist/chunk-JLSOLL3C.js.map +1 -0
- package/dist/chunk-JRME3LCP.cjs +41 -0
- package/dist/chunk-JRME3LCP.cjs.map +1 -0
- package/dist/chunk-JUD3CWTI.cjs +2005 -0
- package/dist/chunk-JUD3CWTI.cjs.map +1 -0
- package/dist/chunk-JVFHF3LE.cjs +11 -0
- package/dist/chunk-JVFHF3LE.cjs.map +1 -0
- package/dist/chunk-JVS2WNKQ.js +26 -0
- package/dist/chunk-JVS2WNKQ.js.map +1 -0
- package/dist/chunk-JXAFIYLV.js +94 -0
- package/dist/chunk-JXAFIYLV.js.map +1 -0
- package/dist/chunk-K2E744ST.cjs +18 -0
- package/dist/chunk-K2E744ST.cjs.map +1 -0
- package/dist/chunk-K2ZEMBJ7.js +56 -0
- package/dist/chunk-K2ZEMBJ7.js.map +1 -0
- package/dist/chunk-KCXNMLKB.js +22 -0
- package/dist/chunk-KCXNMLKB.js.map +1 -0
- package/dist/chunk-KMMDPXY4.js +35 -0
- package/dist/chunk-KMMDPXY4.js.map +1 -0
- package/dist/chunk-KMSGFBAJ.cjs +78 -0
- package/dist/chunk-KMSGFBAJ.cjs.map +1 -0
- package/dist/chunk-KPD7K4XQ.cjs +11 -0
- package/dist/chunk-KPD7K4XQ.cjs.map +1 -0
- package/dist/chunk-KUD3B3BA.js +12 -0
- package/dist/chunk-KUD3B3BA.js.map +1 -0
- package/dist/chunk-L62LSMJ5.js +9 -0
- package/dist/chunk-L62LSMJ5.js.map +1 -0
- package/dist/chunk-LB57H6LF.cjs +261 -0
- package/dist/chunk-LB57H6LF.cjs.map +1 -0
- package/dist/chunk-LCPKNSC4.cjs +48 -0
- package/dist/chunk-LCPKNSC4.cjs.map +1 -0
- package/dist/chunk-LE3W2CSF.cjs +84 -0
- package/dist/chunk-LE3W2CSF.cjs.map +1 -0
- package/dist/chunk-LG736CNC.js +13 -0
- package/dist/chunk-LG736CNC.js.map +1 -0
- package/dist/chunk-LGNTAZ3L.cjs +33 -0
- package/dist/chunk-LGNTAZ3L.cjs.map +1 -0
- package/dist/chunk-LHXINV6N.cjs +47 -0
- package/dist/chunk-LHXINV6N.cjs.map +1 -0
- package/dist/chunk-LLZUTIQB.cjs +24 -0
- package/dist/chunk-LLZUTIQB.cjs.map +1 -0
- package/dist/chunk-LPGXRU7R.cjs +12 -0
- package/dist/chunk-LPGXRU7R.cjs.map +1 -0
- package/dist/chunk-MA2BBWF5.cjs +96 -0
- package/dist/chunk-MA2BBWF5.cjs.map +1 -0
- package/dist/chunk-MLGORMWF.js +23 -0
- package/dist/chunk-MLGORMWF.js.map +1 -0
- package/dist/chunk-MO7XCKLA.js +62 -0
- package/dist/chunk-MO7XCKLA.js.map +1 -0
- package/dist/chunk-N37UE6RQ.cjs +1797 -0
- package/dist/chunk-N37UE6RQ.cjs.map +1 -0
- package/dist/chunk-N6NWKUOR.cjs +60 -0
- package/dist/chunk-N6NWKUOR.cjs.map +1 -0
- package/dist/chunk-NI5CAMFC.js +568 -0
- package/dist/chunk-NI5CAMFC.js.map +1 -0
- package/dist/chunk-NNLCZGZK.js +21 -0
- package/dist/chunk-NNLCZGZK.js.map +1 -0
- package/dist/chunk-NWHFUVYX.js +97 -0
- package/dist/chunk-NWHFUVYX.js.map +1 -0
- package/dist/chunk-OMDB6ZB2.cjs +176 -0
- package/dist/chunk-OMDB6ZB2.cjs.map +1 -0
- package/dist/chunk-P5W4TRJO.cjs +33 -0
- package/dist/chunk-P5W4TRJO.cjs.map +1 -0
- package/dist/chunk-PADS6TDO.js +89 -0
- package/dist/chunk-PADS6TDO.js.map +1 -0
- package/dist/chunk-PFLNOHBT.js +92 -0
- package/dist/chunk-PFLNOHBT.js.map +1 -0
- package/dist/chunk-PTLYNDZS.cjs +13 -0
- package/dist/chunk-PTLYNDZS.cjs.map +1 -0
- package/dist/chunk-QC3X4DAW.cjs +71 -0
- package/dist/chunk-QC3X4DAW.cjs.map +1 -0
- package/dist/chunk-QPTICYGD.cjs +272 -0
- package/dist/chunk-QPTICYGD.cjs.map +1 -0
- package/dist/chunk-QZ7W2E4U.cjs +319 -0
- package/dist/chunk-QZ7W2E4U.cjs.map +1 -0
- package/dist/chunk-RJJPUPOY.cjs +97 -0
- package/dist/chunk-RJJPUPOY.cjs.map +1 -0
- package/dist/chunk-RRSMCCFS.js +43 -0
- package/dist/chunk-RRSMCCFS.js.map +1 -0
- package/dist/chunk-S6VCR6F5.js +91 -0
- package/dist/chunk-S6VCR6F5.js.map +1 -0
- package/dist/chunk-S7Y2GMYJ.cjs +89 -0
- package/dist/chunk-S7Y2GMYJ.cjs.map +1 -0
- package/dist/chunk-SIMEDLX3.cjs +645 -0
- package/dist/chunk-SIMEDLX3.cjs.map +1 -0
- package/dist/chunk-SQYF7HKF.cjs +59 -0
- package/dist/chunk-SQYF7HKF.cjs.map +1 -0
- package/dist/chunk-ST7BNVC2.cjs +13 -0
- package/dist/chunk-ST7BNVC2.cjs.map +1 -0
- package/dist/chunk-SZVRMMLS.js +16 -0
- package/dist/chunk-SZVRMMLS.js.map +1 -0
- package/dist/chunk-T27LICRD.js +2212 -0
- package/dist/chunk-T27LICRD.js.map +1 -0
- package/dist/chunk-TAU5HGJ3.cjs +11 -0
- package/dist/chunk-TAU5HGJ3.cjs.map +1 -0
- package/dist/chunk-TOM7TV5E.js +25 -0
- package/dist/chunk-TOM7TV5E.js.map +1 -0
- package/dist/chunk-TSRUDRT3.js +59 -0
- package/dist/chunk-TSRUDRT3.js.map +1 -0
- package/dist/chunk-U4FX33MW.js +257 -0
- package/dist/chunk-U4FX33MW.js.map +1 -0
- package/dist/chunk-UBOPWQWC.cjs +28 -0
- package/dist/chunk-UBOPWQWC.cjs.map +1 -0
- package/dist/chunk-UFE26GNF.js +42 -0
- package/dist/chunk-UFE26GNF.js.map +1 -0
- package/dist/chunk-UMQQVTEO.js +257 -0
- package/dist/chunk-UMQQVTEO.js.map +1 -0
- package/dist/chunk-UWY3SFAS.js +10 -0
- package/dist/chunk-UWY3SFAS.js.map +1 -0
- package/dist/chunk-V6EIIZPJ.js +57 -0
- package/dist/chunk-V6EIIZPJ.js.map +1 -0
- package/dist/chunk-V6G6W5CF.cjs +61 -0
- package/dist/chunk-V6G6W5CF.cjs.map +1 -0
- package/dist/chunk-VC4ZBWOK.js +152 -0
- package/dist/chunk-VC4ZBWOK.js.map +1 -0
- package/dist/chunk-VJRF6ILX.js +35 -0
- package/dist/chunk-VJRF6ILX.js.map +1 -0
- package/dist/chunk-VNSLCFO4.js +787 -0
- package/dist/chunk-VNSLCFO4.js.map +1 -0
- package/dist/chunk-W7GAP7ST.js +21 -0
- package/dist/chunk-W7GAP7ST.js.map +1 -0
- package/dist/chunk-WFUASJHS.js +64 -0
- package/dist/chunk-WFUASJHS.js.map +1 -0
- package/dist/chunk-WIKSIT3M.js +46 -0
- package/dist/chunk-WIKSIT3M.js.map +1 -0
- package/dist/chunk-WKLZLFLY.cjs +32 -0
- package/dist/chunk-WKLZLFLY.cjs.map +1 -0
- package/dist/chunk-WNB5HYON.cjs +10 -0
- package/dist/chunk-WNB5HYON.cjs.map +1 -0
- package/dist/chunk-WO5P2XBP.js +86 -0
- package/dist/chunk-WO5P2XBP.js.map +1 -0
- package/dist/chunk-WPYC4NGZ.cjs +46 -0
- package/dist/chunk-WPYC4NGZ.cjs.map +1 -0
- package/dist/chunk-WQRYZY67.cjs +89 -0
- package/dist/chunk-WQRYZY67.cjs.map +1 -0
- package/dist/chunk-WVCYVMJU.js +11 -0
- package/dist/chunk-WVCYVMJU.js.map +1 -0
- package/dist/chunk-WX25G2S3.js +116 -0
- package/dist/chunk-WX25G2S3.js.map +1 -0
- package/dist/chunk-X4FE7RRQ.js +23 -0
- package/dist/chunk-X4FE7RRQ.js.map +1 -0
- package/dist/chunk-X6EIJNOQ.cjs +67 -0
- package/dist/chunk-X6EIJNOQ.cjs.map +1 -0
- package/dist/chunk-XUBATJH6.js +1769 -0
- package/dist/chunk-XUBATJH6.js.map +1 -0
- package/dist/chunk-XUMREYMG.js +293 -0
- package/dist/chunk-XUMREYMG.js.map +1 -0
- package/dist/chunk-XYAJ2FS2.js +31 -0
- package/dist/chunk-XYAJ2FS2.js.map +1 -0
- package/dist/chunk-YKES5P4H.cjs +58 -0
- package/dist/chunk-YKES5P4H.cjs.map +1 -0
- package/dist/chunk-YYAQ75AV.cjs +216 -0
- package/dist/chunk-YYAQ75AV.cjs.map +1 -0
- package/dist/chunk-YZ3NJKVV.js +42 -0
- package/dist/chunk-YZ3NJKVV.js.map +1 -0
- package/dist/chunk-Z5ECTUMN.cjs +104 -0
- package/dist/chunk-Z5ECTUMN.cjs.map +1 -0
- package/dist/chunk-ZAKVHYDL.cjs +28 -0
- package/dist/chunk-ZAKVHYDL.cjs.map +1 -0
- package/dist/chunk-ZF34JXGU.js +39 -0
- package/dist/chunk-ZF34JXGU.js.map +1 -0
- package/dist/chunk-ZHGWDP2M.cjs +101 -0
- package/dist/chunk-ZHGWDP2M.cjs.map +1 -0
- package/dist/chunk-ZLHTQQLT.js +13 -0
- package/dist/chunk-ZLHTQQLT.js.map +1 -0
- package/dist/chunk-ZPAMY3IZ.cjs +25 -0
- package/dist/chunk-ZPAMY3IZ.cjs.map +1 -0
- package/dist/chunk-ZR63UB4V.js +42 -0
- package/dist/chunk-ZR63UB4V.js.map +1 -0
- package/dist/chunk-ZRCEB3KL.js +11 -0
- package/dist/chunk-ZRCEB3KL.js.map +1 -0
- package/dist/chunk-ZRGQNRQI.cjs +36 -0
- package/dist/chunk-ZRGQNRQI.cjs.map +1 -0
- package/dist/chunk-ZVY4IL7O.cjs +22 -0
- package/dist/chunk-ZVY4IL7O.cjs.map +1 -0
- package/dist/chunk-ZWIVKODQ.js +49 -0
- package/dist/chunk-ZWIVKODQ.js.map +1 -0
- package/dist/chunk-ZYF2HNMZ.js +10 -0
- package/dist/chunk-ZYF2HNMZ.js.map +1 -0
- package/dist/copilot/index.cjs +43 -0
- package/dist/copilot/index.cjs.map +1 -0
- package/dist/copilot/index.d.cts +66 -0
- package/dist/copilot/index.d.ts +66 -0
- package/dist/copilot/index.js +30 -0
- package/dist/copilot/index.js.map +1 -0
- package/dist/directionsPdf-GITP3SCP.cjs +274 -0
- package/dist/directionsPdf-GITP3SCP.cjs.map +1 -0
- package/dist/directionsPdf-TDKVUBCU.js +272 -0
- package/dist/directionsPdf-TDKVUBCU.js.map +1 -0
- package/dist/embed/index.cjs +1816 -0
- package/dist/embed/index.cjs.map +1 -0
- package/dist/embed/index.d.cts +300 -0
- package/dist/embed/index.d.ts +300 -0
- package/dist/embed/index.js +1809 -0
- package/dist/embed/index.js.map +1 -0
- package/dist/headless/index.cjs +408 -0
- package/dist/headless/index.cjs.map +1 -0
- package/dist/headless/index.d.cts +23 -0
- package/dist/headless/index.d.ts +23 -0
- package/dist/headless/index.js +31 -0
- package/dist/headless/index.js.map +1 -0
- package/dist/hostRegistry-BTG-KkRY.d.cts +115 -0
- package/dist/hostRegistry-BTG-KkRY.d.ts +115 -0
- package/dist/import/index.cjs +433 -0
- package/dist/import/index.cjs.map +1 -0
- package/dist/import/index.d.cts +169 -0
- package/dist/import/index.d.ts +169 -0
- package/dist/import/index.js +421 -0
- package/dist/import/index.js.map +1 -0
- package/dist/index-CELBpE13.d.cts +4198 -0
- package/dist/index-nqc3A-ty.d.ts +4198 -0
- package/dist/index.cjs +10597 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +4949 -0
- package/dist/index.d.ts +4949 -0
- package/dist/index.js +9907 -0
- package/dist/index.js.map +1 -0
- package/dist/map/index.cjs +122 -0
- package/dist/map/index.cjs.map +1 -0
- package/dist/map/index.d.cts +988 -0
- package/dist/map/index.d.ts +988 -0
- package/dist/map/index.js +25 -0
- package/dist/map/index.js.map +1 -0
- package/dist/routingGuidePictures-CxgXiuNd.d.cts +22 -0
- package/dist/routingGuidePictures-CxgXiuNd.d.ts +22 -0
- package/dist/studioStrings-lNvOeC1g.d.cts +72 -0
- package/dist/studioStrings-lNvOeC1g.d.ts +72 -0
- package/dist/styles.css +14677 -0
- package/dist/testing/index.cjs +357 -0
- package/dist/testing/index.cjs.map +1 -0
- package/dist/testing/index.d.cts +319 -0
- package/dist/testing/index.d.ts +319 -0
- package/dist/testing/index.js +344 -0
- package/dist/testing/index.js.map +1 -0
- package/dist/video/index.cjs +53 -0
- package/dist/video/index.cjs.map +1 -0
- package/dist/video/index.d.cts +127 -0
- package/dist/video/index.d.ts +127 -0
- package/dist/video/index.js +44 -0
- package/dist/video/index.js.map +1 -0
- package/package.json +227 -4
- package/src/agent/components/ActivityRow.tsx +226 -0
- package/src/agent/components/AgentEntityIndicator.tsx +67 -0
- package/src/agent/components/AgentMarkdown.tsx +530 -0
- package/src/agent/components/ChatComposer.tsx +161 -0
- package/src/agent/components/ChatTranscript.tsx +1358 -0
- package/src/agent/components/CopilotPanel.tsx +415 -0
- package/src/agent/components/CopilotStates.tsx +238 -0
- package/src/agent/components/CopilotTranscript.tsx +191 -0
- package/src/agent/components/MessageFeedback.tsx +100 -0
- package/src/agent/hooks/useAgentChatTransport.ts +61 -0
- package/src/agent/hooks/useAgentErrorCopy.ts +27 -0
- package/src/agent/hooks/useCopilotOpen.ts +68 -0
- package/src/agent/providers/AgentThreadsProvider.tsx +360 -0
- package/src/agent/providers/PromptPanelConversation.tsx +135 -0
- package/src/agent/rules/drawnNode.ts +24 -0
- package/src/alerts/components/MapAlerts.tsx +127 -0
- package/src/cache/hooks/useStudioCache.ts +40 -0
- package/src/cache/rules/studioCache.ts +145 -0
- package/src/collab/components/PeerEntityIndicator.tsx +150 -0
- package/src/collab/components/PresenceRoster.tsx +113 -0
- package/src/collab/components/peerLock.tsx +59 -0
- package/src/collab/hooks/useCollabOrganizationId.ts +24 -0
- package/src/collab/hooks/usePeerLockLabel.ts +41 -0
- package/src/collections/components/CollectionFormModal.tsx +280 -0
- package/src/collections/components/CollectionMultiSelect.tsx +640 -0
- package/src/collections/components/EditCollectionModal.tsx +114 -0
- package/src/collections/components/ManageCollectionsModal.tsx +692 -0
- package/src/collections/components/NewCollectionModal.tsx +87 -0
- package/src/collections/components/ShareCollectionModal.tsx +150 -0
- package/src/collections/hooks/useEntityCollections.ts +126 -0
- package/src/collections/hooks/useEveryPage.ts +33 -0
- package/src/controls/components/MapControlTooltip.tsx +84 -0
- package/src/controls/components/PoiOverlayMenu.tsx +342 -0
- package/src/controls/components/StudioControls.tsx +278 -0
- package/src/controls/rules/constants.ts +34 -0
- package/src/copilot/hooks/useStudioCopilotInset.ts +39 -0
- package/src/copilot/index.ts +29 -0
- package/src/directions/components/DirectionsModal.tsx +447 -0
- package/src/directions/components/directionsPdf.tsx +557 -0
- package/src/embed/components/DefaultViewControl.tsx +159 -0
- package/src/embed/components/EmbedBaseMapPicker.tsx +107 -0
- package/src/embed/components/EmbedCodeSection.tsx +329 -0
- package/src/embed/components/EmbedColumnsSection.tsx +167 -0
- package/src/embed/components/EmbedConfigForm.tsx +239 -0
- package/src/embed/components/EmbedElementSwitcher.tsx +87 -0
- package/src/embed/components/EmbedFieldControl.tsx +488 -0
- package/src/embed/components/EmbedGeneralSection.tsx +279 -0
- package/src/embed/components/EmbedKeyPanel.tsx +138 -0
- package/src/embed/components/EmbedSnippetCode.tsx +154 -0
- package/src/embed/components/EmbedStage.tsx +505 -0
- package/src/embed/components/EmbedTablePreview.tsx +134 -0
- package/src/embed/components/EmbedThemePicker.tsx +74 -0
- package/src/embed/components/EmbedTintPicker.tsx +76 -0
- package/src/embed/components/EmbedWizard.tsx +1031 -0
- package/src/embed/hooks/useEmbedCode.ts +170 -0
- package/src/embed/hooks/useEmbedCollectionItineraries.ts +42 -0
- package/src/embed/hooks/useEmbedLayerOptions.ts +75 -0
- package/src/embed/hooks/useEmbedPreviewCamera.ts +169 -0
- package/src/embed/index.ts +48 -0
- package/src/fullscreen/components/FullscreenHeader.tsx +77 -0
- package/src/fullscreen/components/FullscreenModal.tsx +80 -0
- package/src/fullscreen/components/WizardLayout.tsx +129 -0
- package/src/guards/components/AgentDrivingGuard.tsx +59 -0
- package/src/guards/components/UnsavedEditsGuard.tsx +210 -0
- package/src/guards/hooks/useReportUnsavedForm.ts +34 -0
- package/src/guards/hooks/useUnsavedEditsGuard.ts +44 -0
- package/src/headless/hooks/useAgentDriving.ts +21 -0
- package/src/headless/hooks/useBeginSegmentEdit.ts +89 -0
- package/src/headless/hooks/useBeginWaypointEdit.ts +74 -0
- package/src/headless/hooks/useCapabilitySet.ts +65 -0
- package/src/headless/hooks/useCollabResources.ts +148 -0
- package/src/headless/hooks/useCollectionScope.ts +37 -0
- package/src/headless/hooks/useEditActions.ts +250 -0
- package/src/headless/hooks/useEscapeKey.ts +43 -0
- package/src/headless/hooks/useInlineRename.ts +276 -0
- package/src/headless/hooks/useLiveAwareSegments.ts +88 -0
- package/src/headless/hooks/useLiveAwareWaypoints.ts +39 -0
- package/src/headless/hooks/useMapHoveredRow.ts +76 -0
- package/src/headless/hooks/usePlatformViewer.ts +452 -0
- package/src/headless/hooks/usePluginSlot.ts +235 -0
- package/src/headless/hooks/useRowEmphasis.ts +66 -0
- package/src/headless/hooks/useSegmentList.ts +428 -0
- package/src/headless/hooks/useSegmentRow.ts +366 -0
- package/src/headless/hooks/useSegmentRowActions.ts +267 -0
- package/src/headless/hooks/useShallowSelector.ts +145 -0
- package/src/headless/hooks/useStableMembers.ts +74 -0
- package/src/headless/hooks/useStoreSlice.ts +52 -0
- package/src/headless/hooks/useStreetViewCorridor.ts +120 -0
- package/src/headless/hooks/useStudioApi.ts +18 -0
- package/src/headless/hooks/useStudioDispatch.ts +181 -0
- package/src/headless/hooks/useStudioDispatchCount.ts +147 -0
- package/src/headless/hooks/useStudioDispatchUnsafe.ts +111 -0
- package/src/headless/hooks/useStudioEntitlement.ts +29 -0
- package/src/headless/hooks/useStudioFailureAlert.ts +67 -0
- package/src/headless/hooks/useStudioObserve.ts +38 -0
- package/src/headless/hooks/useStudioPreferences.ts +8 -0
- package/src/headless/hooks/useStudioSignedIn.ts +12 -0
- package/src/headless/hooks/useStudioStore.ts +72 -0
- package/src/headless/hooks/useStudioUnits.ts +23 -0
- package/src/headless/hooks/useStudioUrl.ts +24 -0
- package/src/headless/hooks/useStudioUserId.ts +5 -0
- package/src/headless/hooks/useStudioVerbHeld.ts +43 -0
- package/src/headless/hooks/useStudioViewer.ts +19 -0
- package/src/headless/hooks/useStudioViewerEntitlement.ts +40 -0
- package/src/headless/hooks/useStudioViewerItineraryLimit.ts +34 -0
- package/src/headless/hooks/useStudioViewerPreferences.ts +44 -0
- package/src/headless/hooks/useStudioViewerUnits.ts +50 -0
- package/src/headless/hooks/useStudioViewerUserId.ts +23 -0
- package/src/headless/hooks/useUiStore.ts +91 -0
- package/src/headless/hooks/useUiStoreShallow.ts +43 -0
- package/src/headless/hooks/useWaypointDetailsDialog.ts +52 -0
- package/src/headless/hooks/useWaypointList.ts +89 -0
- package/src/headless/hooks/useWaypointRow.ts +227 -0
- package/src/headless/hooks/useWaypointRowActions.ts +166 -0
- package/src/headless/index.ts +287 -0
- package/src/headless/providers/billingGate.tsx +129 -0
- package/src/headless/providers/copilot.tsx +155 -0
- package/src/headless/providers/mountayaStudio.tsx +126 -0
- package/src/headless/providers/navigationBlocker.tsx +91 -0
- package/src/headless/providers/notify.tsx +36 -0
- package/src/headless/providers/organizations.tsx +267 -0
- package/src/headless/providers/plugins.tsx +173 -0
- package/src/headless/providers/studio.tsx +1295 -0
- package/src/headless/providers/studioStrings.tsx +243 -0
- package/src/headless/rules/inputMethod.ts +19 -0
- package/src/hooks/useAgreementLimits.ts +165 -0
- package/src/hooks/useLayerCatalogOptions.ts +106 -0
- package/src/host/components/MountayaStudioHost.tsx +1018 -0
- package/src/host/hooks/useEmbeddedStudio.ts +24 -0
- package/src/host/hooks/useItineraryActivation.ts +126 -0
- package/src/host/hooks/useMemberGrants.ts +51 -0
- package/src/host/hooks/useStudioHostSurfaces.ts +100 -0
- package/src/host/hooks/useStudioPluginBinding.ts +133 -0
- package/src/host/hooks/useStudioSessionHeld.ts +111 -0
- package/src/host/hooks/useStudioToolBus.ts +127 -0
- package/src/host/hooks/useStudioToolContext.ts +175 -0
- package/src/host/providers/hostRegistry.tsx +144 -0
- package/src/host/providers/hostSurface.tsx +47 -0
- package/src/host/providers/hostVideo.tsx +73 -0
- package/src/import/components/DraftEntityList.tsx +298 -0
- package/src/import/components/FileDropInput.tsx +261 -0
- package/src/import/components/FileDropzone.tsx +97 -0
- package/src/import/components/ImportItineraryContent.tsx +133 -0
- package/src/import/components/ImportPreviewLegend.tsx +50 -0
- package/src/import/components/ImportPrimer.tsx +113 -0
- package/src/import/index.ts +32 -0
- package/src/import/providers/ImportRoutingGuideProvider.tsx +319 -0
- package/src/import/rules/routingGuidePictures.ts +20 -0
- package/src/index.ts +633 -0
- package/src/internal/components/Glyph.tsx +34 -0
- package/src/internal/components/MarkerGlyph.tsx +23 -0
- package/src/internal/components/MountayaMark.tsx +142 -0
- package/src/internal/hooks/useTextOverflow.ts +90 -0
- package/src/internal/providers/studioEditorRoot.tsx +42 -0
- package/src/internal/rules/editorRoot.ts +9 -0
- package/src/internal/rules/missingSeam.ts +32 -0
- package/src/itinerary/components/ActivityGuideModal.tsx +345 -0
- package/src/itinerary/components/ActivitySelect.tsx +204 -0
- package/src/itinerary/components/AddWaypointButton.tsx +151 -0
- package/src/itinerary/components/AscentInput.tsx +65 -0
- package/src/itinerary/components/Characteristics.tsx +129 -0
- package/src/itinerary/components/CursorReadout.tsx +66 -0
- package/src/itinerary/components/DistanceInput.tsx +67 -0
- package/src/itinerary/components/DraftProvenanceBanner.tsx +79 -0
- package/src/itinerary/components/DuplicateItineraryModal.tsx +341 -0
- package/src/itinerary/components/EditorSaveFooter.tsx +424 -0
- package/src/itinerary/components/ItineraryActionsMenu.tsx +655 -0
- package/src/itinerary/components/ItineraryForm.tsx +887 -0
- package/src/itinerary/components/ItineraryHeaderIdentity.tsx +121 -0
- package/src/itinerary/components/ItineraryHeaderMeta.tsx +68 -0
- package/src/itinerary/components/ItineraryHeaderTitle.tsx +88 -0
- package/src/itinerary/components/ItineraryIdentityFields.tsx +153 -0
- package/src/itinerary/components/ItineraryProfilePanel.tsx +619 -0
- package/src/itinerary/components/ItineraryProfileSheet.tsx +219 -0
- package/src/itinerary/components/ItinerarySubHeader.tsx +236 -0
- package/src/itinerary/components/PendingProfile.tsx +142 -0
- package/src/itinerary/components/PlaceCard.tsx +35 -0
- package/src/itinerary/components/PlaceMark.tsx +76 -0
- package/src/itinerary/components/ProfileAnalysisBars.tsx +84 -0
- package/src/itinerary/components/ProfileBar.tsx +215 -0
- package/src/itinerary/components/ProfileHeaderControls.tsx +116 -0
- package/src/itinerary/components/ProfileHeaderFigures.tsx +119 -0
- package/src/itinerary/components/ProfilePaceControl.tsx +97 -0
- package/src/itinerary/components/ProfileStat.tsx +76 -0
- package/src/itinerary/components/ProfileStatStrip.tsx +38 -0
- package/src/itinerary/components/RoadAccessModal.tsx +76 -0
- package/src/itinerary/components/RouteTypeControl.tsx +73 -0
- package/src/itinerary/components/SegmentGroupModal.tsx +311 -0
- package/src/itinerary/components/SegmentGroupRangePicker.tsx +228 -0
- package/src/itinerary/components/StagingCreateFooter.tsx +185 -0
- package/src/itinerary/components/StudioItineraryProfile.tsx +620 -0
- package/src/itinerary/components/SuggestForm.tsx +256 -0
- package/src/itinerary/components/SuggestFormActions.tsx +124 -0
- package/src/itinerary/components/SuggestionResultRow.tsx +98 -0
- package/src/itinerary/components/SuggestionResultsList.tsx +85 -0
- package/src/itinerary/components/WaypointAmenityPicker.tsx +105 -0
- package/src/itinerary/components/WaypointDetailFields.tsx +604 -0
- package/src/itinerary/components/WaypointDetailsModal.tsx +134 -0
- package/src/itinerary/components/WaypointDetailsRows.tsx +707 -0
- package/src/itinerary/components/WaypointDetailsView.tsx +389 -0
- package/src/itinerary/components/WaypointIconCircle.tsx +211 -0
- package/src/itinerary/components/WaypointIconPicker.tsx +82 -0
- package/src/itinerary/components/WaypointMarkers.tsx +293 -0
- package/src/itinerary/components/WaypointPreviewCard.tsx +56 -0
- package/src/itinerary/components/WaypointSectionNav.tsx +151 -0
- package/src/itinerary/components/WaypointSwitcher.tsx +143 -0
- package/src/itinerary/components/WaypointWorkbench.tsx +263 -0
- package/src/itinerary/hooks/useDuplicateDraft.ts +205 -0
- package/src/itinerary/hooks/useDuplicateSource.ts +69 -0
- package/src/itinerary/hooks/useFriendlyNameBanks.ts +26 -0
- package/src/itinerary/hooks/useItineraryEditable.ts +89 -0
- package/src/itinerary/hooks/useItineraryPace.ts +103 -0
- package/src/itinerary/hooks/useItinerarySubject.ts +117 -0
- package/src/itinerary/hooks/useOpenItineraryEditable.ts +39 -0
- package/src/itinerary/hooks/useProfileOverlay.tsx +61 -0
- package/src/itinerary/hooks/useProfileSeries.ts +95 -0
- package/src/itinerary/hooks/useProfileVisibility.ts +149 -0
- package/src/itinerary/hooks/useSeedDraftOrganization.ts +85 -0
- package/src/itinerary/hooks/useSegmentGroupSave.ts +143 -0
- package/src/itinerary/hooks/useStartFromSuggestion.ts +63 -0
- package/src/itinerary/hooks/useStudioItinerary.ts +35 -0
- package/src/itinerary/hooks/useSuggestionPin.ts +36 -0
- package/src/itinerary/hooks/useWaypointCardWords.ts +51 -0
- package/src/itinerary/hooks/useWaypointCreateFollowUp.ts +158 -0
- package/src/itinerary/hooks/useWaypointDetailsEditor.ts +280 -0
- package/src/itinerary/hooks/useWaypointSectionEntries.ts +114 -0
- package/src/itinerary/providers/ActivityGuideProvider.tsx +113 -0
- package/src/itinerary/providers/ItineraryViewProvider.tsx +146 -0
- package/src/itinerary/rules/amenityGlyphs.ts +25 -0
- package/src/itinerary/rules/cursorReadoutData.ts +34 -0
- package/src/itinerary/rules/profileCursor.ts +11 -0
- package/src/itinerary/rules/profileModel.ts +98 -0
- package/src/itinerary/rules/shownFocus.ts +11 -0
- package/src/itinerary/rules/waypointGlyphs.ts +42 -0
- package/src/itinerary/stores/profileHover.ts +54 -0
- package/src/lists/components/AddSegmentButton.tsx +240 -0
- package/src/lists/components/EditActions.tsx +153 -0
- package/src/lists/components/EditorListSection.tsx +117 -0
- package/src/lists/components/EditorSegmentRow.tsx +458 -0
- package/src/lists/components/ItineraryAddSegmentButton.tsx +66 -0
- package/src/lists/components/ItinerarySegmentList.tsx +301 -0
- package/src/lists/components/ItineraryWaypointList.tsx +257 -0
- package/src/lists/components/SegmentList.tsx +549 -0
- package/src/lists/components/SegmentSeam.tsx +292 -0
- package/src/lists/components/WaypointList.tsx +232 -0
- package/src/map/components/ContextMenuPopup.tsx +913 -0
- package/src/map/components/MapAnchoredPopup.tsx +284 -0
- package/src/map/components/SegmentViaPopup.tsx +133 -0
- package/src/map/hooks/useAccessRestrictions.ts +25 -0
- package/src/map/hooks/useEmbedConstraints.ts +359 -0
- package/src/map/hooks/useEmbedDisplaySeed.ts +61 -0
- package/src/map/hooks/useEmbedReady.ts +137 -0
- package/src/map/hooks/useHeldTileSources.ts +65 -0
- package/src/map/hooks/useSegmentColor.ts +24 -0
- package/src/map/hooks/useSpecificationLayers.ts +25 -0
- package/src/map/hooks/useStudioConstraints.ts +135 -0
- package/src/map/hooks/useStudioContextMenu.ts +34 -0
- package/src/map/hooks/useStudioContextMenuWaypoint.ts +119 -0
- package/src/map/hooks/useStudioEditCommitReporter.ts +56 -0
- package/src/map/hooks/useStudioEditEngine.ts +270 -0
- package/src/map/hooks/useStudioEnrichment.ts +117 -0
- package/src/map/hooks/useStudioItinerarySelection.ts +484 -0
- package/src/map/hooks/useStudioLayersScope.ts +34 -0
- package/src/map/hooks/useStudioMapBindings.ts +178 -0
- package/src/map/hooks/useStudioMapEditSeams.ts +161 -0
- package/src/map/hooks/useStudioMapSync.ts +127 -0
- package/src/map/hooks/useStudioOverlay.ts +75 -0
- package/src/map/hooks/useStudioOverlayWithdrawal.ts +52 -0
- package/src/map/hooks/useStudioOverlaysEntitled.ts +12 -0
- package/src/map/hooks/useStudioPeerDrafts.ts +126 -0
- package/src/map/hooks/useStudioPoiLayers.ts +110 -0
- package/src/map/hooks/useStudioPreviewSync.ts +205 -0
- package/src/map/hooks/useStudioSegmentEditing.ts +239 -0
- package/src/map/hooks/useStudioSegmentViaPrompt.ts +38 -0
- package/src/map/hooks/useStudioSplitPicking.ts +411 -0
- package/src/map/hooks/useStudioSuggestionPicking.ts +178 -0
- package/src/map/hooks/useStudioTimestamp.ts +226 -0
- package/src/map/hooks/useStudioUrlState.ts +340 -0
- package/src/map/hooks/useStudioWaypointEditing.ts +251 -0
- package/src/map/hooks/useStudioZoneEditing.ts +260 -0
- package/src/map/hooks/useStudioZoneOriginPicking.ts +129 -0
- package/src/map/hooks/useStudioZoneSelection.ts +240 -0
- package/src/map/hooks/useTileLayers.ts +33 -0
- package/src/map/index.ts +67 -0
- package/src/map/rules/editKeyboard.ts +216 -0
- package/src/map/rules/editTooltip.ts +222 -0
- package/src/map/rules/nearerEscape.ts +107 -0
- package/src/map/rules/poiGlyphs.ts +40 -0
- package/src/modals/components/AppModal.tsx +280 -0
- package/src/modals/components/ConfirmModal.tsx +223 -0
- package/src/modals/components/ExportModal.tsx +538 -0
- package/src/modals/components/LocationPermissionModal.tsx +129 -0
- package/src/modals/components/ModalFooter.tsx +187 -0
- package/src/modals/hooks/useConfirmGate.tsx +209 -0
- package/src/modals/hooks/useDiscardGuard.tsx +168 -0
- package/src/panels/components/EditShortcutHint.tsx +115 -0
- package/src/panels/components/FloatingOverlay.tsx +243 -0
- package/src/panels/components/GlyphPickerGrid.tsx +84 -0
- package/src/panels/components/PanelRouter.tsx +133 -0
- package/src/panels/components/PickerCard.tsx +108 -0
- package/src/panels/components/RadioOptionCard.tsx +116 -0
- package/src/panels/components/SidenavContentBody.tsx +56 -0
- package/src/panels/components/SidenavContentFooter.tsx +27 -0
- package/src/panels/components/SidenavContentHeader.tsx +172 -0
- package/src/panels/components/SidenavFormActions.tsx +96 -0
- package/src/panels/components/StudioFormStack.tsx +44 -0
- package/src/panels/components/StudioHeader.tsx +117 -0
- package/src/panels/components/StudioLayersPanel.tsx +909 -0
- package/src/panels/components/StudioPreferencesPanel.tsx +199 -0
- package/src/panels/rules/studioHeader.ts +68 -0
- package/src/plugins/components/PluginBoundary.tsx +62 -0
- package/src/plugins/components/PluginContextMenuActions.tsx +73 -0
- package/src/plugins/components/PluginControls.tsx +101 -0
- package/src/plugins/components/PluginHeldView.tsx +77 -0
- package/src/plugins/components/PluginMenuItems.tsx +63 -0
- package/src/plugins/components/PluginProfileHeader.tsx +71 -0
- package/src/plugins/components/PluginProfilePlot.tsx +134 -0
- package/src/plugins/components/PluginSlotItems.tsx +55 -0
- package/src/primitives/components/ActivityIcon.tsx +106 -0
- package/src/primitives/components/AllowlistField.tsx +508 -0
- package/src/primitives/components/CopyIconButton.tsx +80 -0
- package/src/primitives/components/DateTimeInput.tsx +133 -0
- package/src/primitives/components/DateTimePickerField.tsx +101 -0
- package/src/primitives/components/DescriptiveMenuItem.tsx +80 -0
- package/src/primitives/components/DialogSubject.tsx +102 -0
- package/src/primitives/components/DisabledMenuItem.tsx +45 -0
- package/src/primitives/components/DisabledReason.tsx +34 -0
- package/src/primitives/components/EmptyState.tsx +186 -0
- package/src/primitives/components/ErrorAlert.tsx +35 -0
- package/src/primitives/components/ErrorBoundary.tsx +55 -0
- package/src/primitives/components/FieldLabel.tsx +34 -0
- package/src/primitives/components/FormErrorAlert.tsx +33 -0
- package/src/primitives/components/GroupLabelledBy.tsx +31 -0
- package/src/primitives/components/LanguageSelect.tsx +139 -0
- package/src/primitives/components/ListSkeleton.tsx +64 -0
- package/src/primitives/components/MarqueeText.tsx +61 -0
- package/src/primitives/components/OrganizationScopeItem.tsx +146 -0
- package/src/primitives/components/OrganizationSelect.tsx +149 -0
- package/src/primitives/components/PointField.tsx +75 -0
- package/src/primitives/components/PrivacyControl.tsx +127 -0
- package/src/primitives/components/RenameInput.tsx +159 -0
- package/src/primitives/components/RequiredLabelWithHelp.tsx +76 -0
- package/src/primitives/components/SegmentIcon.tsx +43 -0
- package/src/primitives/components/SegmentIconLabel.tsx +37 -0
- package/src/primitives/components/SpeedInput.tsx +222 -0
- package/src/primitives/components/StudioSectionBoundary.tsx +56 -0
- package/src/primitives/components/StudioSegmentedControl.tsx +23 -0
- package/src/primitives/components/UnitPickerField.tsx +62 -0
- package/src/primitives/components/UnitPickerGrid.tsx +71 -0
- package/src/primitives/components/WarningAlert.tsx +34 -0
- package/src/primitives/hooks/useCompactLayout.ts +30 -0
- package/src/primitives/hooks/useSpeedControlLabel.ts +28 -0
- package/src/primitives/rules/activityBadge.ts +87 -0
- package/src/publication/components/PublicationBadge.tsx +42 -0
- package/src/publication/components/PublicationDot.tsx +31 -0
- package/src/publication/components/PublicationNotice.tsx +115 -0
- package/src/publication/components/PublicationSettledPill.tsx +43 -0
- package/src/publication/components/PublicationStatus.tsx +52 -0
- package/src/publication/components/UnpublishedPanel.tsx +133 -0
- package/src/publication/hooks/usePublicationHint.ts +235 -0
- package/src/publication/hooks/usePublishAct.ts +101 -0
- package/src/publication/hooks/usePublishItinerary.ts +27 -0
- package/src/publication/hooks/usePublishZone.ts +27 -0
- package/src/publication/hooks/usePublishableScope.ts +23 -0
- package/src/publication/hooks/usePublishedItinerary.ts +83 -0
- package/src/rows/components/ReadOnlySegmentRow.tsx +155 -0
- package/src/rows/components/RouteMetricLine.tsx +90 -0
- package/src/rows/components/RowMetadata.tsx +92 -0
- package/src/rows/components/SegmentRow.tsx +381 -0
- package/src/rows/components/SegmentRowActions.tsx +187 -0
- package/src/rows/components/SegmentRowBody.tsx +197 -0
- package/src/rows/components/StudioToggleRow.tsx +71 -0
- package/src/rows/components/SuggestionList.tsx +100 -0
- package/src/rows/components/SuggestionRowLayout.tsx +164 -0
- package/src/rows/components/WaypointRow.tsx +175 -0
- package/src/rows/components/WaypointRowLayout.tsx +278 -0
- package/src/rows/components/lockChrome.tsx +106 -0
- package/src/rules/menuActions.ts +149 -0
- package/src/rules/sizing.ts +127 -0
- package/src/rules/studioConfig.ts +719 -0
- package/src/search/components/CategoryTabs.tsx +136 -0
- package/src/search/components/ResultRow.tsx +242 -0
- package/src/search/components/ResultsList.tsx +182 -0
- package/src/search/components/SearchInput.tsx +100 -0
- package/src/search/components/SearchTab.tsx +614 -0
- package/src/sections/components/RailSwitcher.tsx +179 -0
- package/src/sections/components/SectionCard.tsx +48 -0
- package/src/sections/components/SectionHead.tsx +42 -0
- package/src/sections/components/SectionTabs.tsx +231 -0
- package/src/segments/components/SegmentColorCircle.tsx +118 -0
- package/src/segments/components/SegmentColorPicker.tsx +134 -0
- package/src/segments/components/SegmentModeControl.tsx +118 -0
- package/src/segments/components/SegmentRowMenu.tsx +449 -0
- package/src/segments/components/SegmentRowPopover.tsx +163 -0
- package/src/segments/components/SegmentSelect.tsx +116 -0
- package/src/segments/components/SegmentSpeedControl.tsx +299 -0
- package/src/share/components/ShareLinkManage.tsx +699 -0
- package/src/share/components/ShareModal.tsx +182 -0
- package/src/share/components/ShareSheet.tsx +178 -0
- package/src/share/components/ShareViewModal.tsx +131 -0
- package/src/share/hooks/useCanManageShareLink.ts +51 -0
- package/src/studio/components/MountayaStudio.tsx +1170 -0
- package/src/studio/components/MountayaStudioViewer.tsx +775 -0
- package/src/studio/hooks/useEmbeddedStudioConfig.ts +60 -0
- package/src/studio/hooks/useViewerActivation.ts +47 -0
- package/src/studio/hooks/useViewerCollectionSpecification.ts +58 -0
- package/src/studio/hooks/useViewerEmbedConfig.ts +74 -0
- package/src/studio/hooks/useViewerFraming.ts +211 -0
- package/src/studio/hooks/useViewerMapBindings.ts +109 -0
- package/src/styles.css +3993 -0
- package/src/testing/collections.ts +40 -0
- package/src/testing/hostRegistry.tsx +109 -0
- package/src/testing/index.ts +65 -0
- package/src/testing/itinerary.ts +297 -0
- package/src/testing/mountayaClient.tsx +218 -0
- package/src/testing/viewer.tsx +171 -0
- package/src/theme/components/StudioPortalScope.tsx +130 -0
- package/src/theme/hooks/useResolvedStudioTheme.ts +37 -0
- package/src/theme/rules/density.ts +157 -0
- package/src/theme/rules/mountayaStudioTheme.ts +114 -0
- package/src/theme/rules/passwordManager.ts +20 -0
- package/src/theme/rules/tokenStyle.ts +18 -0
- package/src/theme/rules/tokens.ts +71 -0
- package/src/theme/rules/tone.ts +34 -0
- package/src/theme/rules/zIndex.ts +40 -0
- package/src/video/components/CameraStep.tsx +82 -0
- package/src/video/components/DirectingScrim.tsx +28 -0
- package/src/video/components/DirectorChat.tsx +79 -0
- package/src/video/components/FormatStep.tsx +487 -0
- package/src/video/components/ModeCards.tsx +141 -0
- package/src/video/components/PlanNumberField.tsx +54 -0
- package/src/video/components/PreviewControls.tsx +212 -0
- package/src/video/components/PreviewStage.tsx +319 -0
- package/src/video/components/PreviewSurface.tsx +247 -0
- package/src/video/components/PreviewWatermark.tsx +77 -0
- package/src/video/components/ProfileOverlayCanvas.tsx +195 -0
- package/src/video/components/ProfileStep.tsx +254 -0
- package/src/video/components/RecordProgress.tsx +117 -0
- package/src/video/components/ReviewStep.tsx +244 -0
- package/src/video/components/ShotList.tsx +452 -0
- package/src/video/components/VideoExportWizard.tsx +829 -0
- package/src/video/components/WizardDirectingIndicator.tsx +57 -0
- package/src/video/components/WizardFooter.tsx +112 -0
- package/src/video/hooks/usePreviewPlanRefresh.ts +91 -0
- package/src/video/hooks/useVideoItinerarySubject.ts +18 -0
- package/src/video/hooks/useVideoOrganizationId.ts +30 -0
- package/src/video/hooks/useVideoPreviewSeed.ts +203 -0
- package/src/video/hooks/useVideoProfileSeed.ts +53 -0
- package/src/video/hooks/useVideoPublication.ts +29 -0
- package/src/video/hooks/useVideoRouteReady.ts +52 -0
- package/src/video/hooks/useVideoRouteSync.ts +100 -0
- package/src/video/hooks/useVideoTileTransform.ts +88 -0
- package/src/video/index.ts +24 -0
- package/src/video/providers/DirectorChatProvider.tsx +293 -0
- package/src/video/rules/changeTo.ts +20 -0
- package/src/zone/components/ZoneActionsMenu.tsx +305 -0
- package/src/zone/components/ZoneAvailabilityFields.tsx +98 -0
- package/src/zone/components/ZoneForm.tsx +622 -0
- package/src/zone/components/ZoneInheritedContext.tsx +70 -0
- package/src/zone/components/ZoneLevelSelect.tsx +86 -0
- package/src/zone/components/ZoneMetadataFields.tsx +89 -0
- package/src/zone/components/ZoneMethodSelect.tsx +90 -0
- package/src/zone/components/ZoneModeSelect.tsx +98 -0
- package/src/zone/components/ZoneRangeInput.tsx +129 -0
- package/src/zone/components/ZoneReachabilityFields.tsx +120 -0
- package/src/zone/components/ZoneSubHeader.tsx +188 -0
- package/src/zone/components/ZoneVisibility.tsx +94 -0
- package/src/zone/hooks/useStudioReachabilityStart.ts +79 -0
- package/src/zone/hooks/useStudioZonesBrowsed.ts +32 -0
|
@@ -0,0 +1,1769 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { SegmentColorCircle, useSpeedControlLabel, SpeedInput } from './chunk-HMVBS5DU.js';
|
|
3
|
+
import { PluginSlotItems } from './chunk-2QSPCXLM.js';
|
|
4
|
+
import { FieldLabel } from './chunk-4DQOJIUV.js';
|
|
5
|
+
import { WaypointIconPicker } from './chunk-KMMDPXY4.js';
|
|
6
|
+
import { densityThemes } from './chunk-WX25G2S3.js';
|
|
7
|
+
import { DisabledReason } from './chunk-KUD3B3BA.js';
|
|
8
|
+
import { StudioSegmentedControl } from './chunk-UWY3SFAS.js';
|
|
9
|
+
import { AppModal } from './chunk-PFLNOHBT.js';
|
|
10
|
+
import { useSegmentRow, useSegmentRowActions, useWaypointRow, useStudioDispatchUnsafe, useInlineRename, useWaypointRowActions } from './chunk-NI5CAMFC.js';
|
|
11
|
+
import { usePluginSlot } from './chunk-CJOJWZM7.js';
|
|
12
|
+
import { useAgentDriving } from './chunk-32XMYLEB.js';
|
|
13
|
+
import { useCollabOrganizationId } from './chunk-WVCYVMJU.js';
|
|
14
|
+
import { waypointGlyphTable, WAYPOINT_FALLBACK_ICON } from './chunk-ZLHTQQLT.js';
|
|
15
|
+
import { useActiveItineraryResource, usePeerLockHolderId } from './chunk-F2LZZC6X.js';
|
|
16
|
+
import { useEscapeKey } from './chunk-AQ5JIIAE.js';
|
|
17
|
+
import { ActivityIcon } from './chunk-A66FJAVG.js';
|
|
18
|
+
import { menuActionGlyphs } from './chunk-ZR63UB4V.js';
|
|
19
|
+
import { RowMetadata, joinMetadata } from './chunk-AF43JU4W.js';
|
|
20
|
+
import { Glyph, iconSizes, SWATCH_SIZE, INPUT_LABEL_MARGIN_BOTTOM } from './chunk-4VKJF24B.js';
|
|
21
|
+
import { useUiStoreShallow } from './chunk-IQZSIOMM.js';
|
|
22
|
+
import { useUiStore } from './chunk-UFE26GNF.js';
|
|
23
|
+
import { useStudioFailureAlert } from './chunk-5AHT62LO.js';
|
|
24
|
+
import { useStudioUnits } from './chunk-MLGORMWF.js';
|
|
25
|
+
import { useStudioDispatch } from './chunk-676DNRSN.js';
|
|
26
|
+
import { useStudioScopedStrings } from './chunk-MO7XCKLA.js';
|
|
27
|
+
import { useStudioPeerName, useStudioStorage, useStudioDensity, useStudioActivities } from './chunk-46EARJWC.js';
|
|
28
|
+
import { Menu, ActionIcon, UnstyledButton, Stack, Text, Group, Tooltip, VisuallyHidden, Box, Button, TextInput, Center, Popover, Avatar, MantineThemeProvider, Anchor, Select, Image } from '@mantine/core';
|
|
29
|
+
import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
|
30
|
+
import { beginDraftSegmentEdit, importReasonSentence, REACHABILITY_GLYPH, displayNameSchema, selectAgentEntityLocked, selectCollabPeers, selectCollabLockHolder, segmentEditModeSchema, collabPeerColor, selectImportSession, EMPTY_SEGMENTS, importSegmentCounts, userWaypointIconSchema, selectActiveDraftSession } from '@mountaya/studio';
|
|
31
|
+
import { createContext, memo, useState, useMemo, useCallback, lazy, useRef, useId, useEffect, useImperativeHandle, use, Suspense, Fragment as Fragment$1 } from 'react';
|
|
32
|
+
import { useHover, useDisclosure } from '@mantine/hooks';
|
|
33
|
+
import { formatDistance, formatElevation, speedUnitFor, durationForSpeed, resolveSpeedKmh, splitDuration, kilometersPerHourToDisplay } from '@mountaya/elements/profile';
|
|
34
|
+
import { useMountayaScopedStrings, useLatestRef, useMountayaLanguage } from '@mountaya/elements-react';
|
|
35
|
+
import { splitDisabledHintKey, mergeDisabledHintKey } from '@mountaya/studio/strings';
|
|
36
|
+
import { isPaceUnit, SECONDS_PER_MINUTE } from '@mountaya/elements/units';
|
|
37
|
+
import { DEFAULT_WAYPOINT_COLOR } from '@mountaya/elements/icons';
|
|
38
|
+
import { localizedName } from '@mountaya/elements/i18n';
|
|
39
|
+
|
|
40
|
+
var lockTooltipStyles = {
|
|
41
|
+
tooltip: { whiteSpace: "pre-line" }
|
|
42
|
+
};
|
|
43
|
+
var lockLabelNewline = /\n/g;
|
|
44
|
+
var flattenLockLabel = (label) => label.replace(lockLabelNewline, " ");
|
|
45
|
+
var LockTooltip = ({ children, label }) => /* @__PURE__ */ jsx(
|
|
46
|
+
Tooltip,
|
|
47
|
+
{
|
|
48
|
+
events: { focus: true, hover: true, touch: false },
|
|
49
|
+
label,
|
|
50
|
+
position: "right",
|
|
51
|
+
styles: lockTooltipStyles,
|
|
52
|
+
withArrow: true,
|
|
53
|
+
children
|
|
54
|
+
}
|
|
55
|
+
);
|
|
56
|
+
var DisabledActionsButton = ({
|
|
57
|
+
ariaLabel,
|
|
58
|
+
tooltipLabel
|
|
59
|
+
}) => /* @__PURE__ */ jsx(LockTooltip, { label: tooltipLabel, children: /* @__PURE__ */ jsx("span", { children: /* @__PURE__ */ jsxs(ActionIcon, { disabled: true, variant: "subtle", children: [
|
|
60
|
+
/* @__PURE__ */ jsx(Glyph, { name: "more", size: iconSizes.sm }),
|
|
61
|
+
/* @__PURE__ */ jsx(VisuallyHidden, { children: ariaLabel }),
|
|
62
|
+
/* @__PURE__ */ jsx(DisabledReason, { children: flattenLockLabel(tooltipLabel) })
|
|
63
|
+
] }) }) });
|
|
64
|
+
var SECTIONS = ["agentLock"];
|
|
65
|
+
var agentTint = { color: "var(--mantine-color-blue-6)" };
|
|
66
|
+
var AgentEntityIndicator = ({
|
|
67
|
+
id,
|
|
68
|
+
kind
|
|
69
|
+
}) => {
|
|
70
|
+
const words = useStudioScopedStrings(SECTIONS);
|
|
71
|
+
const locked = useUiStore((state) => selectAgentEntityLocked(kind, id)(state));
|
|
72
|
+
if (!locked) {
|
|
73
|
+
return null;
|
|
74
|
+
}
|
|
75
|
+
const label = words.agentLock.editingThis;
|
|
76
|
+
return /* @__PURE__ */ jsx(Tooltip, { label, position: "right", styles: lockTooltipStyles, withArrow: true, children: /* @__PURE__ */ jsx("span", { "aria-label": flattenLockLabel(label), role: "img", children: /* @__PURE__ */ jsx(Glyph, { name: "agent", size: iconSizes.sm, style: agentTint }) }) });
|
|
77
|
+
};
|
|
78
|
+
var SECTIONS2 = ["collab"];
|
|
79
|
+
var PeerEntityBadges = ({ lockHolderId, viewerIds }) => {
|
|
80
|
+
const words = useStudioScopedStrings(SECTIONS2);
|
|
81
|
+
const resolveName = useStudioPeerName(useCollabOrganizationId());
|
|
82
|
+
const nameFor = useCallback(
|
|
83
|
+
(userId) => resolveName(userId) ?? words.collab.roster.unknownPeer,
|
|
84
|
+
[resolveName, words]
|
|
85
|
+
);
|
|
86
|
+
const editingLabel = lockHolderId === null ? null : words.collab.lockedBy(nameFor(lockHolderId));
|
|
87
|
+
const holderTint = useMemo(
|
|
88
|
+
() => lockHolderId === null ? {} : { color: collabPeerColor(lockHolderId) },
|
|
89
|
+
[lockHolderId]
|
|
90
|
+
);
|
|
91
|
+
return /* @__PURE__ */ jsxs(Group, { gap: "xxs", children: [
|
|
92
|
+
viewerIds.map((userId) => {
|
|
93
|
+
const viewingLabel = words.collab.peerViewing(nameFor(userId));
|
|
94
|
+
return /* @__PURE__ */ jsx(Tooltip, { label: viewingLabel, position: "right", withArrow: true, children: /* @__PURE__ */ jsx(
|
|
95
|
+
Avatar,
|
|
96
|
+
{
|
|
97
|
+
"aria-label": viewingLabel,
|
|
98
|
+
color: collabPeerColor(userId),
|
|
99
|
+
name: nameFor(userId),
|
|
100
|
+
role: "img",
|
|
101
|
+
size: "xs"
|
|
102
|
+
}
|
|
103
|
+
) }, userId);
|
|
104
|
+
}),
|
|
105
|
+
lockHolderId !== null && editingLabel !== null ? /* @__PURE__ */ jsx(Tooltip, { label: editingLabel, position: "right", styles: lockTooltipStyles, withArrow: true, children: /* @__PURE__ */ jsx("span", { "aria-label": flattenLockLabel(editingLabel), role: "img", children: /* @__PURE__ */ jsx(Glyph, { name: "action-edit", size: iconSizes.sm, style: holderTint }) }) }) : null
|
|
106
|
+
] });
|
|
107
|
+
};
|
|
108
|
+
var PeerEntityIndicator = ({
|
|
109
|
+
id,
|
|
110
|
+
kind
|
|
111
|
+
}) => {
|
|
112
|
+
const itineraryResource = useActiveItineraryResource();
|
|
113
|
+
const viewerIds = useUiStoreShallow((state) => {
|
|
114
|
+
const ids = [];
|
|
115
|
+
if (itineraryResource === null) {
|
|
116
|
+
return ids;
|
|
117
|
+
}
|
|
118
|
+
for (const peer of Object.values(selectCollabPeers(itineraryResource)(state))) {
|
|
119
|
+
if (peer.selection?.kind === kind && peer.selection.id === id) {
|
|
120
|
+
ids.push(peer.userId);
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
return ids;
|
|
124
|
+
});
|
|
125
|
+
const lockHolderId = useUiStore(
|
|
126
|
+
(state) => itineraryResource === null ? null : selectCollabLockHolder(itineraryResource, kind, id)(state) ?? null
|
|
127
|
+
);
|
|
128
|
+
if (viewerIds.length === 0 && lockHolderId === null) {
|
|
129
|
+
return null;
|
|
130
|
+
}
|
|
131
|
+
return /* @__PURE__ */ jsx(PeerEntityBadges, { lockHolderId, viewerIds });
|
|
132
|
+
};
|
|
133
|
+
var SECTIONS3 = ["collab"];
|
|
134
|
+
var usePeerLockLabel = (lockHolderId) => usePeerLockLabels()(lockHolderId);
|
|
135
|
+
var usePeerLockLabels = () => {
|
|
136
|
+
const words = useStudioScopedStrings(SECTIONS3);
|
|
137
|
+
const resolveName = useStudioPeerName(useCollabOrganizationId());
|
|
138
|
+
return useCallback(
|
|
139
|
+
(lockHolderId) => {
|
|
140
|
+
const name = resolveName(lockHolderId);
|
|
141
|
+
return name === null ? words.collab.locked : words.collab.lockedBy(name);
|
|
142
|
+
},
|
|
143
|
+
[resolveName, words]
|
|
144
|
+
);
|
|
145
|
+
};
|
|
146
|
+
var SECTIONS4 = ["actions", "import"];
|
|
147
|
+
var ILLUSTRATED_SECTIONS = [
|
|
148
|
+
{ key: "precision", sides: ["recorded", "matched"] },
|
|
149
|
+
{ key: "editable", sides: ["manyPoints", "fewPoints"] }
|
|
150
|
+
];
|
|
151
|
+
var suppliedSides = (names, pictures) => {
|
|
152
|
+
const sides = names.flatMap((name) => {
|
|
153
|
+
const src = pictures[name];
|
|
154
|
+
return src === void 0 || src === "" ? [] : [{ name, src }];
|
|
155
|
+
});
|
|
156
|
+
return sides.length === names.length ? sides : [];
|
|
157
|
+
};
|
|
158
|
+
var TEXT_SECTIONS = ["exact"];
|
|
159
|
+
var ImportRoutingGuideModal = ({
|
|
160
|
+
matchedCount,
|
|
161
|
+
onClose,
|
|
162
|
+
opened,
|
|
163
|
+
pictures = noPictures,
|
|
164
|
+
totalCount
|
|
165
|
+
}) => {
|
|
166
|
+
const words = useStudioScopedStrings(SECTIONS4);
|
|
167
|
+
return /* @__PURE__ */ jsx(
|
|
168
|
+
AppModal,
|
|
169
|
+
{
|
|
170
|
+
closeLabel: words.actions.close,
|
|
171
|
+
description: words.import.guide.description,
|
|
172
|
+
icon: /* @__PURE__ */ jsx(Glyph, { name: "help", size: iconSizes.md }),
|
|
173
|
+
onClose,
|
|
174
|
+
opened,
|
|
175
|
+
size: "lg",
|
|
176
|
+
title: words.import.guide.title,
|
|
177
|
+
children: /* @__PURE__ */ jsxs(Stack, { gap: "md", children: [
|
|
178
|
+
ILLUSTRATED_SECTIONS.map((section) => {
|
|
179
|
+
const sides = suppliedSides(section.sides, pictures);
|
|
180
|
+
return /* @__PURE__ */ jsxs(Stack, { gap: "xs", children: [
|
|
181
|
+
/* @__PURE__ */ jsx(Text, { variant: "section-label", children: words.import.guide[`${section.key}Title`] }),
|
|
182
|
+
sides.length === 0 ? null : /* @__PURE__ */ jsx(Box, { className: "mtya-routing-guide-pair", children: sides.map((side) => /* @__PURE__ */ jsxs("div", { className: "mtya-routing-guide-frame", children: [
|
|
183
|
+
/* @__PURE__ */ jsx(
|
|
184
|
+
Image,
|
|
185
|
+
{
|
|
186
|
+
alt: words.import.guide.comparison[`${side.name}Alt`],
|
|
187
|
+
className: "mtya-routing-guide-comparison",
|
|
188
|
+
radius: "md",
|
|
189
|
+
src: side.src
|
|
190
|
+
}
|
|
191
|
+
),
|
|
192
|
+
/* @__PURE__ */ jsx(Text, { className: "mtya-routing-guide-caption", size: "xs", children: words.import.guide.comparison[`${side.name}Caption`] })
|
|
193
|
+
] }, side.name)) }),
|
|
194
|
+
/* @__PURE__ */ jsx(Text, { c: "dimmed", size: "xs", children: words.import.guide[`${section.key}Body`] })
|
|
195
|
+
] }, section.key);
|
|
196
|
+
}),
|
|
197
|
+
TEXT_SECTIONS.map((key) => /* @__PURE__ */ jsxs(Stack, { gap: "xxs", children: [
|
|
198
|
+
/* @__PURE__ */ jsx(Text, { variant: "section-label", children: words.import.guide[`${key}Title`] }),
|
|
199
|
+
/* @__PURE__ */ jsx(Text, { c: "dimmed", size: "xs", children: words.import.guide[`${key}Body`] })
|
|
200
|
+
] }, key)),
|
|
201
|
+
matchedCount === void 0 || totalCount === void 0 ? null : /* @__PURE__ */ jsxs(Stack, { gap: "xxs", children: [
|
|
202
|
+
/* @__PURE__ */ jsx(Text, { variant: "section-label", children: words.import.guide.yourFile }),
|
|
203
|
+
/* @__PURE__ */ jsx(Text, { c: "dimmed", size: "xs", children: words.import.guide.yourFileMatched(matchedCount, totalCount) })
|
|
204
|
+
] })
|
|
205
|
+
] })
|
|
206
|
+
}
|
|
207
|
+
);
|
|
208
|
+
};
|
|
209
|
+
var noPictures = {};
|
|
210
|
+
var SEEN = "1";
|
|
211
|
+
var ImportRoutingGuideContext = createContext({ open: () => {
|
|
212
|
+
} });
|
|
213
|
+
var useImportRoutingGuide = () => use(ImportRoutingGuideContext);
|
|
214
|
+
var ImportRoutingGuideProvider = ({
|
|
215
|
+
children,
|
|
216
|
+
pictures
|
|
217
|
+
}) => {
|
|
218
|
+
const [opened, { close, open }] = useDisclosure(false);
|
|
219
|
+
const storage = useStudioStorage();
|
|
220
|
+
const { importOpen, matchedCount, totalCount } = useUiStoreShallow((state) => {
|
|
221
|
+
const segments = selectImportSession(state)?.draft?.segments ?? EMPTY_SEGMENTS;
|
|
222
|
+
return {
|
|
223
|
+
importOpen: state.openContent === "import",
|
|
224
|
+
matchedCount: importSegmentCounts(segments).routable,
|
|
225
|
+
totalCount: segments.length
|
|
226
|
+
};
|
|
227
|
+
});
|
|
228
|
+
useEffect(() => {
|
|
229
|
+
if (!importOpen || storage.read("import.routingGuideSeen") === SEEN) {
|
|
230
|
+
return;
|
|
231
|
+
}
|
|
232
|
+
storage.write("import.routingGuideSeen", SEEN);
|
|
233
|
+
open();
|
|
234
|
+
}, [importOpen, open, storage]);
|
|
235
|
+
const controls = useMemo(() => ({ open }), [open]);
|
|
236
|
+
return /* @__PURE__ */ jsxs(ImportRoutingGuideContext, { value: controls, children: [
|
|
237
|
+
children,
|
|
238
|
+
/* @__PURE__ */ jsx(
|
|
239
|
+
ImportRoutingGuideModal,
|
|
240
|
+
{
|
|
241
|
+
matchedCount: totalCount > 0 ? matchedCount : void 0,
|
|
242
|
+
onClose: close,
|
|
243
|
+
opened,
|
|
244
|
+
pictures,
|
|
245
|
+
totalCount: totalCount > 0 ? totalCount : void 0
|
|
246
|
+
}
|
|
247
|
+
)
|
|
248
|
+
] });
|
|
249
|
+
};
|
|
250
|
+
var RenameInput = ({
|
|
251
|
+
ariaLabel,
|
|
252
|
+
details,
|
|
253
|
+
errorMessage,
|
|
254
|
+
fw,
|
|
255
|
+
gap = 0,
|
|
256
|
+
onBlur,
|
|
257
|
+
onChange,
|
|
258
|
+
onKeyDown,
|
|
259
|
+
size = "xs",
|
|
260
|
+
value
|
|
261
|
+
}) => {
|
|
262
|
+
const inputRef = useRef(null);
|
|
263
|
+
useEffect(() => {
|
|
264
|
+
const timer = setTimeout(() => {
|
|
265
|
+
inputRef.current?.focus();
|
|
266
|
+
inputRef.current?.select();
|
|
267
|
+
});
|
|
268
|
+
return () => clearTimeout(timer);
|
|
269
|
+
}, []);
|
|
270
|
+
const invalid = !displayNameSchema.safeParse(value).success;
|
|
271
|
+
const reasonId = useId();
|
|
272
|
+
return /* @__PURE__ */ jsxs(
|
|
273
|
+
Stack,
|
|
274
|
+
{
|
|
275
|
+
__vars: {
|
|
276
|
+
"--mtya-rename-fw": fw === void 0 ? "inherit" : String(fw),
|
|
277
|
+
"--mtya-rename-fz": `var(--mantine-font-size-${size})`,
|
|
278
|
+
"--mtya-rename-lh": `var(--mantine-line-height-${size})`
|
|
279
|
+
},
|
|
280
|
+
className: "mtya-rename-column",
|
|
281
|
+
gap,
|
|
282
|
+
children: [
|
|
283
|
+
/* @__PURE__ */ jsx(
|
|
284
|
+
TextInput,
|
|
285
|
+
{
|
|
286
|
+
"aria-errormessage": invalid ? reasonId : void 0,
|
|
287
|
+
"aria-label": ariaLabel,
|
|
288
|
+
classNames: { input: "mtya-rename-input", root: "mtya-rename-root" },
|
|
289
|
+
error: invalid,
|
|
290
|
+
mb: 0,
|
|
291
|
+
mt: 0,
|
|
292
|
+
onBlur,
|
|
293
|
+
onChange,
|
|
294
|
+
onKeyDown,
|
|
295
|
+
ref: inputRef,
|
|
296
|
+
value,
|
|
297
|
+
variant: "unstyled",
|
|
298
|
+
withErrorStyles: false
|
|
299
|
+
}
|
|
300
|
+
),
|
|
301
|
+
invalid ? /* @__PURE__ */ jsx(Text, { c: "red", id: reasonId, size: "xs", children: errorMessage }) : details
|
|
302
|
+
]
|
|
303
|
+
}
|
|
304
|
+
);
|
|
305
|
+
};
|
|
306
|
+
var SegmentIcon = ({ color, glyph, label }) => /* @__PURE__ */ jsx(Tooltip, { label, position: "bottom", children: /* @__PURE__ */ jsxs(Center, { children: [
|
|
307
|
+
/* @__PURE__ */ jsx(Glyph, { name: glyph, size: iconSizes.sm, style: color === void 0 ? void 0 : { color } }),
|
|
308
|
+
/* @__PURE__ */ jsx(VisuallyHidden, { children: label })
|
|
309
|
+
] }) });
|
|
310
|
+
var anchorStyle = {
|
|
311
|
+
inset: 0,
|
|
312
|
+
pointerEvents: "none"
|
|
313
|
+
};
|
|
314
|
+
var DROPDOWN_MARKER = "data-segment-row-popover";
|
|
315
|
+
var SegmentRowPopover = ({
|
|
316
|
+
children,
|
|
317
|
+
dropdown,
|
|
318
|
+
label,
|
|
319
|
+
onCancel,
|
|
320
|
+
onDismiss,
|
|
321
|
+
opened
|
|
322
|
+
}) => {
|
|
323
|
+
const dismissRef = useLatestRef(onDismiss);
|
|
324
|
+
const cancelRef = useLatestRef(onCancel);
|
|
325
|
+
const endedRef = useRef(false);
|
|
326
|
+
const end = useCallback((action) => {
|
|
327
|
+
if (endedRef.current) {
|
|
328
|
+
return;
|
|
329
|
+
}
|
|
330
|
+
endedRef.current = true;
|
|
331
|
+
action();
|
|
332
|
+
}, []);
|
|
333
|
+
const wasOpenRef = useRef(opened);
|
|
334
|
+
if (opened !== wasOpenRef.current) {
|
|
335
|
+
wasOpenRef.current = opened;
|
|
336
|
+
if (opened) {
|
|
337
|
+
endedRef.current = false;
|
|
338
|
+
}
|
|
339
|
+
}
|
|
340
|
+
useEscapeKey(() => end(cancelRef.current), opened);
|
|
341
|
+
useEffect(() => {
|
|
342
|
+
if (!opened) {
|
|
343
|
+
return;
|
|
344
|
+
}
|
|
345
|
+
const onPointerDown = (event) => {
|
|
346
|
+
const inside = event.composedPath().some((node) => node instanceof Element && node.hasAttribute(DROPDOWN_MARKER));
|
|
347
|
+
if (!inside) {
|
|
348
|
+
end(dismissRef.current);
|
|
349
|
+
}
|
|
350
|
+
};
|
|
351
|
+
document.addEventListener("pointerdown", onPointerDown, true);
|
|
352
|
+
return () => {
|
|
353
|
+
document.removeEventListener("pointerdown", onPointerDown, true);
|
|
354
|
+
};
|
|
355
|
+
}, [dismissRef, end, opened]);
|
|
356
|
+
return (
|
|
357
|
+
// The relative row-end wrapper holds the popover's absolute anchor (a positioning
|
|
358
|
+
// reference under the menu button) and the `…` menu trigger as siblings, so the
|
|
359
|
+
// menu is decoupled from the anchor and the popover owns its own dismissal.
|
|
360
|
+
/* @__PURE__ */ jsxs(Box, { pos: "relative", children: [
|
|
361
|
+
/* @__PURE__ */ jsxs(
|
|
362
|
+
Popover,
|
|
363
|
+
{
|
|
364
|
+
closeOnClickOutside: false,
|
|
365
|
+
closeOnEscape: false,
|
|
366
|
+
opened,
|
|
367
|
+
position: "bottom-end",
|
|
368
|
+
returnFocus: true,
|
|
369
|
+
trapFocus: true,
|
|
370
|
+
withinPortal: true,
|
|
371
|
+
withRoles: false,
|
|
372
|
+
children: [
|
|
373
|
+
/* @__PURE__ */ jsx(Popover.Target, { children: /* @__PURE__ */ jsx(Box, { "aria-hidden": true, pos: "absolute", style: anchorStyle }) }),
|
|
374
|
+
/* @__PURE__ */ jsx(Popover.Dropdown, { "aria-label": label, "data-segment-row-popover": true, role: "dialog", children: dropdown })
|
|
375
|
+
]
|
|
376
|
+
}
|
|
377
|
+
),
|
|
378
|
+
children
|
|
379
|
+
] })
|
|
380
|
+
);
|
|
381
|
+
};
|
|
382
|
+
var SECTIONS5 = ["segments"];
|
|
383
|
+
var SegmentModeControl = ({
|
|
384
|
+
children,
|
|
385
|
+
mode,
|
|
386
|
+
onChange,
|
|
387
|
+
onClose,
|
|
388
|
+
opened
|
|
389
|
+
}) => {
|
|
390
|
+
const strings = useStudioScopedStrings(SECTIONS5).segments;
|
|
391
|
+
const pick = (next) => {
|
|
392
|
+
onClose();
|
|
393
|
+
const engine = segmentEditModeSchema.safeParse(next);
|
|
394
|
+
if (engine.success && engine.data !== mode) {
|
|
395
|
+
onChange(engine.data);
|
|
396
|
+
}
|
|
397
|
+
};
|
|
398
|
+
return /* @__PURE__ */ jsx(
|
|
399
|
+
SegmentRowPopover,
|
|
400
|
+
{
|
|
401
|
+
dropdown: /* @__PURE__ */ jsxs(Stack, { gap: "xs", children: [
|
|
402
|
+
/* @__PURE__ */ jsx(Text, { c: "dimmed", fw: 500, fz: "xs", children: strings.engineHeading }),
|
|
403
|
+
/* @__PURE__ */ jsx(
|
|
404
|
+
StudioSegmentedControl,
|
|
405
|
+
{
|
|
406
|
+
data: [
|
|
407
|
+
{
|
|
408
|
+
label: /* @__PURE__ */ jsx(Tooltip, { label: strings.engineRouted, children: /* @__PURE__ */ jsx(Group, { justify: "center", children: /* @__PURE__ */ jsx(Glyph, { name: "routed", size: iconSizes.sm }) }) }),
|
|
409
|
+
value: "directions"
|
|
410
|
+
},
|
|
411
|
+
{
|
|
412
|
+
label: /* @__PURE__ */ jsx(Tooltip, { label: strings.engineFreehand, children: /* @__PURE__ */ jsx(Group, { justify: "center", children: /* @__PURE__ */ jsx(Glyph, { name: "freehand", size: iconSizes.sm }) }) }),
|
|
413
|
+
value: "linestring"
|
|
414
|
+
}
|
|
415
|
+
],
|
|
416
|
+
onChange: pick,
|
|
417
|
+
value: mode
|
|
418
|
+
}
|
|
419
|
+
)
|
|
420
|
+
] }),
|
|
421
|
+
label: strings.engineHeading,
|
|
422
|
+
onCancel: onClose,
|
|
423
|
+
onDismiss: onClose,
|
|
424
|
+
opened,
|
|
425
|
+
children
|
|
426
|
+
}
|
|
427
|
+
);
|
|
428
|
+
};
|
|
429
|
+
var DisabledMenuItem = ({ color, icon, label, reason }) => /* @__PURE__ */ jsx(Tooltip, { label: reason, withinPortal: true, children: /* @__PURE__ */ jsx(Box, { children: /* @__PURE__ */ jsxs(Menu.Item, { color, disabled: true, fz: "xs", leftSection: icon, children: [
|
|
430
|
+
label,
|
|
431
|
+
/* @__PURE__ */ jsx(DisabledReason, { children: reason })
|
|
432
|
+
] }) }) });
|
|
433
|
+
var SECTIONS6 = ["agentLock"];
|
|
434
|
+
var PluginMenuItems = ({
|
|
435
|
+
items
|
|
436
|
+
}) => {
|
|
437
|
+
const words = useStudioScopedStrings(SECTIONS6);
|
|
438
|
+
return /* @__PURE__ */ jsx(
|
|
439
|
+
PluginSlotItems,
|
|
440
|
+
{
|
|
441
|
+
items,
|
|
442
|
+
renderAction: (item) => item.disabled ? /* @__PURE__ */ jsx(
|
|
443
|
+
DisabledMenuItem,
|
|
444
|
+
{
|
|
445
|
+
color: item.entry.destructive ? "red" : void 0,
|
|
446
|
+
icon: item.entry.icon,
|
|
447
|
+
label: item.label,
|
|
448
|
+
reason: words.agentLock.rowLocked
|
|
449
|
+
}
|
|
450
|
+
) : /* @__PURE__ */ jsx(
|
|
451
|
+
Menu.Item,
|
|
452
|
+
{
|
|
453
|
+
color: item.entry.destructive ? "red" : void 0,
|
|
454
|
+
fz: "xs",
|
|
455
|
+
leftSection: item.entry.icon,
|
|
456
|
+
onClick: item.run,
|
|
457
|
+
children: item.label
|
|
458
|
+
}
|
|
459
|
+
)
|
|
460
|
+
}
|
|
461
|
+
);
|
|
462
|
+
};
|
|
463
|
+
var SECTIONS7 = ["agentLock", "segmentMenu"];
|
|
464
|
+
var verbGlyph = (action) => /* @__PURE__ */ jsx(Glyph, { name: menuActionGlyphs[action], size: iconSizes.sm });
|
|
465
|
+
var triggerHiddenStyle = { opacity: 0 };
|
|
466
|
+
var triggerVisibleStyle = { opacity: 1 };
|
|
467
|
+
var SegmentChainBand = ({ chain, splitReason, strings }) => {
|
|
468
|
+
const offersGaps = chain.onInsertAfter !== void 0 && chain.onInsertBefore !== void 0;
|
|
469
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
470
|
+
/* @__PURE__ */ jsx(Menu.Divider, {}),
|
|
471
|
+
offersGaps ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
472
|
+
/* @__PURE__ */ jsx(Menu.Item, { fz: "xs", leftSection: verbGlyph("insertBefore"), onClick: chain.onInsertBefore, children: strings.menuInsertBefore }),
|
|
473
|
+
/* @__PURE__ */ jsx(Menu.Item, { fz: "xs", leftSection: verbGlyph("insertAfter"), onClick: chain.onInsertAfter, children: strings.menuInsertAfter })
|
|
474
|
+
] }) : null,
|
|
475
|
+
/* @__PURE__ */ jsxs(Menu.Sub, { safeAreaPolygon: true, children: [
|
|
476
|
+
/* @__PURE__ */ jsx(Menu.Sub.Target, { children: /* @__PURE__ */ jsx(Menu.Sub.Item, { fz: "xs", leftSection: verbGlyph("splitMerge"), children: strings.menuSplitMerge }) }),
|
|
477
|
+
/* @__PURE__ */ jsxs(Menu.Sub.Dropdown, { children: [
|
|
478
|
+
splitReason === null ? /* @__PURE__ */ jsx(Menu.Item, { fz: "xs", leftSection: verbGlyph("split"), onClick: chain.onSplit, children: strings.menuSplit }) : (
|
|
479
|
+
// Split refuses while an authoring edit already owns the map (splitting arms a
|
|
480
|
+
// cross cursor, a follow tooltip, and the next click of its own). Shown and not
|
|
481
|
+
// hidden, naming why, so the verb is where the user expects it and explains its
|
|
482
|
+
// own absence.
|
|
483
|
+
/* @__PURE__ */ jsx(
|
|
484
|
+
DisabledMenuItem,
|
|
485
|
+
{
|
|
486
|
+
icon: verbGlyph("split"),
|
|
487
|
+
label: strings.menuSplit,
|
|
488
|
+
reason: splitReason
|
|
489
|
+
}
|
|
490
|
+
)
|
|
491
|
+
),
|
|
492
|
+
chain.mergePreviousDisabledReason !== null ? (
|
|
493
|
+
// The reason is the same one the gutter's disabled pill names, so the two surfaces
|
|
494
|
+
// never explain one rule two ways.
|
|
495
|
+
/* @__PURE__ */ jsx(
|
|
496
|
+
DisabledMenuItem,
|
|
497
|
+
{
|
|
498
|
+
icon: verbGlyph("mergePrevious"),
|
|
499
|
+
label: strings.menuMergePrevious,
|
|
500
|
+
reason: strings[mergeDisabledHintKey[chain.mergePreviousDisabledReason]]
|
|
501
|
+
}
|
|
502
|
+
)
|
|
503
|
+
) : /* @__PURE__ */ jsx(
|
|
504
|
+
Menu.Item,
|
|
505
|
+
{
|
|
506
|
+
fz: "xs",
|
|
507
|
+
leftSection: verbGlyph("mergePrevious"),
|
|
508
|
+
onClick: chain.onMergePrevious,
|
|
509
|
+
children: strings.menuMergePrevious
|
|
510
|
+
}
|
|
511
|
+
),
|
|
512
|
+
chain.mergeNextDisabledReason !== null ? /* @__PURE__ */ jsx(
|
|
513
|
+
DisabledMenuItem,
|
|
514
|
+
{
|
|
515
|
+
icon: verbGlyph("mergeNext"),
|
|
516
|
+
label: strings.menuMergeNext,
|
|
517
|
+
reason: strings[mergeDisabledHintKey[chain.mergeNextDisabledReason]]
|
|
518
|
+
}
|
|
519
|
+
) : /* @__PURE__ */ jsx(Menu.Item, { fz: "xs", leftSection: verbGlyph("mergeNext"), onClick: chain.onMergeNext, children: strings.menuMergeNext })
|
|
520
|
+
] })
|
|
521
|
+
] })
|
|
522
|
+
] });
|
|
523
|
+
};
|
|
524
|
+
var SegmentGroupBand = ({ group, strings }) => /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
525
|
+
/* @__PURE__ */ jsx(Menu.Divider, {}),
|
|
526
|
+
group.grouped ? /* @__PURE__ */ jsxs(Menu.Sub, { safeAreaPolygon: true, children: [
|
|
527
|
+
/* @__PURE__ */ jsx(Menu.Sub.Target, { children: /* @__PURE__ */ jsx(Menu.Sub.Item, { fz: "xs", leftSection: verbGlyph("group"), children: strings.menuGroupSection }) }),
|
|
528
|
+
/* @__PURE__ */ jsxs(Menu.Sub.Dropdown, { children: [
|
|
529
|
+
/* @__PURE__ */ jsx(Menu.Item, { fz: "xs", leftSection: verbGlyph("group"), onClick: group.onEditGroup, children: strings.menuEditGroup }),
|
|
530
|
+
group.removeDisabled ? /* @__PURE__ */ jsx(
|
|
531
|
+
DisabledMenuItem,
|
|
532
|
+
{
|
|
533
|
+
icon: verbGlyph("group"),
|
|
534
|
+
label: strings.menuRemoveFromGroup,
|
|
535
|
+
reason: strings.removeDisabledHint
|
|
536
|
+
}
|
|
537
|
+
) : group.removeDissolves ? (
|
|
538
|
+
// Leaving takes the group with it, so the item names that outcome in place of the
|
|
539
|
+
// one the user asked for.
|
|
540
|
+
/* @__PURE__ */ jsx(Tooltip, { label: strings.ungroupHint, withinPortal: true, children: /* @__PURE__ */ jsx(Menu.Item, { fz: "xs", leftSection: verbGlyph("group"), onClick: group.onRemoveFromGroup, children: strings.ungroup }) })
|
|
541
|
+
) : /* @__PURE__ */ jsx(Menu.Item, { fz: "xs", leftSection: verbGlyph("group"), onClick: group.onRemoveFromGroup, children: strings.menuRemoveFromGroup })
|
|
542
|
+
] })
|
|
543
|
+
] }) : group.groupDisabled ? /* @__PURE__ */ jsx(
|
|
544
|
+
DisabledMenuItem,
|
|
545
|
+
{
|
|
546
|
+
icon: verbGlyph("group"),
|
|
547
|
+
label: strings.menuGroup,
|
|
548
|
+
reason: strings.groupDisabledHint
|
|
549
|
+
}
|
|
550
|
+
) : /* @__PURE__ */ jsx(Menu.Item, { fz: "xs", leftSection: verbGlyph("group"), onClick: group.onGroup, children: strings.menuGroup })
|
|
551
|
+
] });
|
|
552
|
+
var SegmentRowMenu = memo(function SegmentRowMenu2({
|
|
553
|
+
chain,
|
|
554
|
+
deleteDisabled,
|
|
555
|
+
group,
|
|
556
|
+
onDelete,
|
|
557
|
+
onEditGeometry,
|
|
558
|
+
onExport,
|
|
559
|
+
onToggle,
|
|
560
|
+
onRename,
|
|
561
|
+
onSetSpeed,
|
|
562
|
+
pluginTarget,
|
|
563
|
+
triggerVisible
|
|
564
|
+
}) {
|
|
565
|
+
const words = useStudioScopedStrings(SECTIONS7);
|
|
566
|
+
const strings = words.segmentMenu;
|
|
567
|
+
const pluginItems = usePluginSlot("segment.menu", pluginTarget ?? null);
|
|
568
|
+
const splitReason = chain?.splitDisabledReason ? strings[splitDisabledHintKey[chain.splitDisabledReason]] : null;
|
|
569
|
+
return /* @__PURE__ */ jsxs(Menu, { onChange: onToggle, position: "bottom-end", withinPortal: true, children: [
|
|
570
|
+
/* @__PURE__ */ jsx(Menu.Target, { children: /* @__PURE__ */ jsx(
|
|
571
|
+
ActionIcon,
|
|
572
|
+
{
|
|
573
|
+
"aria-label": strings.menuLabel,
|
|
574
|
+
className: "mtya-menu-trigger",
|
|
575
|
+
style: triggerVisible ? triggerVisibleStyle : triggerHiddenStyle,
|
|
576
|
+
variant: "subtle",
|
|
577
|
+
children: /* @__PURE__ */ jsx(Glyph, { name: "more", size: iconSizes.sm })
|
|
578
|
+
}
|
|
579
|
+
) }),
|
|
580
|
+
/* @__PURE__ */ jsxs(Menu.Dropdown, { children: [
|
|
581
|
+
/* @__PURE__ */ jsx(Menu.Item, { fz: "xs", leftSection: verbGlyph("rename"), onClick: onRename, children: strings.menuRename }),
|
|
582
|
+
/* @__PURE__ */ jsx(Menu.Item, { fz: "xs", leftSection: verbGlyph("edit"), onClick: onEditGeometry, children: strings.menuEdit }),
|
|
583
|
+
/* @__PURE__ */ jsx(Menu.Item, { fz: "xs", leftSection: verbGlyph("setSpeed"), onClick: onSetSpeed, children: strings.menuSetSpeed }),
|
|
584
|
+
chain ? /* @__PURE__ */ jsx(Menu.Item, { fz: "xs", leftSection: verbGlyph("engine"), onClick: chain.onChangeEngine, children: strings.menuChangeEngine }) : null,
|
|
585
|
+
chain ? /* @__PURE__ */ jsx(SegmentChainBand, { chain, splitReason, strings }) : null,
|
|
586
|
+
group ? /* @__PURE__ */ jsx(SegmentGroupBand, { group, strings }) : null,
|
|
587
|
+
onExport ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
588
|
+
/* @__PURE__ */ jsx(Menu.Divider, {}),
|
|
589
|
+
/* @__PURE__ */ jsx(Menu.Item, { fz: "xs", leftSection: verbGlyph("export"), onClick: onExport, children: strings.menuExport })
|
|
590
|
+
] }) : null,
|
|
591
|
+
/* @__PURE__ */ jsx(PluginMenuItems, { items: pluginItems }),
|
|
592
|
+
/* @__PURE__ */ jsx(Menu.Divider, {}),
|
|
593
|
+
deleteDisabled ? /* @__PURE__ */ jsx(
|
|
594
|
+
DisabledMenuItem,
|
|
595
|
+
{
|
|
596
|
+
color: "red",
|
|
597
|
+
icon: verbGlyph("delete"),
|
|
598
|
+
label: strings.menuDelete,
|
|
599
|
+
reason: strings.deleteDisabledHint
|
|
600
|
+
}
|
|
601
|
+
) : /* @__PURE__ */ jsx(Menu.Item, { color: "red", fz: "xs", leftSection: verbGlyph("delete"), onClick: onDelete, children: strings.menuDelete })
|
|
602
|
+
] })
|
|
603
|
+
] });
|
|
604
|
+
});
|
|
605
|
+
var SECTIONS8 = ["segments"];
|
|
606
|
+
var formatDurationHint = (totalSeconds, hoursLabel, minutesLabel) => {
|
|
607
|
+
const split = splitDuration(totalSeconds);
|
|
608
|
+
if (split === null || split.hours === 0 && split.minutes === 0) {
|
|
609
|
+
return null;
|
|
610
|
+
}
|
|
611
|
+
const { hours, minutes } = split;
|
|
612
|
+
if (hours > 0) {
|
|
613
|
+
return minutes === 0 ? hoursLabel(hours) : `${hoursLabel(hours)} ${minutesLabel(minutes)}`;
|
|
614
|
+
}
|
|
615
|
+
return minutesLabel(minutes);
|
|
616
|
+
};
|
|
617
|
+
var SegmentSpeedControl = ({
|
|
618
|
+
activityDefaultSpeed,
|
|
619
|
+
children,
|
|
620
|
+
distanceMeters,
|
|
621
|
+
durationSeconds = null,
|
|
622
|
+
onChange,
|
|
623
|
+
onClose,
|
|
624
|
+
opened,
|
|
625
|
+
speed,
|
|
626
|
+
units
|
|
627
|
+
}) => {
|
|
628
|
+
const strings = useStudioScopedStrings(SECTIONS8).segments;
|
|
629
|
+
const studioUnits = useStudioUnits();
|
|
630
|
+
const resolvedUnits = units ?? studioUnits;
|
|
631
|
+
const speedUnit = speedUnitFor(resolvedUnits.length, resolvedUnits.pace);
|
|
632
|
+
const label = useSpeedControlLabel(resolvedUnits.length, resolvedUnits.pace);
|
|
633
|
+
const [draft, setDraft] = useState(speed);
|
|
634
|
+
const openSpeedRef = useRef(speed);
|
|
635
|
+
const committedRef = useRef(false);
|
|
636
|
+
const [wasOpen, setWasOpen] = useState(opened);
|
|
637
|
+
if (opened !== wasOpen) {
|
|
638
|
+
setWasOpen(opened);
|
|
639
|
+
if (opened) {
|
|
640
|
+
setDraft(speed);
|
|
641
|
+
openSpeedRef.current = speed;
|
|
642
|
+
committedRef.current = false;
|
|
643
|
+
}
|
|
644
|
+
}
|
|
645
|
+
const enteredKmh = draft ?? activityDefaultSpeed;
|
|
646
|
+
const hintSeconds = durationForSpeed({
|
|
647
|
+
baseDurationSeconds: durationSeconds,
|
|
648
|
+
baseSpeedKmh: resolveSpeedKmh(speed, activityDefaultSpeed),
|
|
649
|
+
distanceMeters,
|
|
650
|
+
targetSpeedKmh: enteredKmh
|
|
651
|
+
});
|
|
652
|
+
const durationHint = formatDurationHint(
|
|
653
|
+
hintSeconds,
|
|
654
|
+
(count) => strings.durationHours(count),
|
|
655
|
+
(count) => strings.durationMinutes(count)
|
|
656
|
+
);
|
|
657
|
+
const speedKey = (kmh) => {
|
|
658
|
+
if (kmh === null) {
|
|
659
|
+
return null;
|
|
660
|
+
}
|
|
661
|
+
const display = kilometersPerHourToDisplay(kmh, speedUnit);
|
|
662
|
+
if (display === null) {
|
|
663
|
+
return null;
|
|
664
|
+
}
|
|
665
|
+
const steps = isPaceUnit(speedUnit) ? SECONDS_PER_MINUTE : 10;
|
|
666
|
+
return Math.round(display * steps) / steps;
|
|
667
|
+
};
|
|
668
|
+
const commitAndClose = (next) => {
|
|
669
|
+
if (committedRef.current) {
|
|
670
|
+
return;
|
|
671
|
+
}
|
|
672
|
+
committedRef.current = true;
|
|
673
|
+
if (speedKey(next) !== speedKey(openSpeedRef.current)) {
|
|
674
|
+
onChange(next);
|
|
675
|
+
}
|
|
676
|
+
onClose();
|
|
677
|
+
};
|
|
678
|
+
const cancelAndClose = () => {
|
|
679
|
+
if (committedRef.current) {
|
|
680
|
+
return;
|
|
681
|
+
}
|
|
682
|
+
committedRef.current = true;
|
|
683
|
+
setDraft(openSpeedRef.current);
|
|
684
|
+
onClose();
|
|
685
|
+
};
|
|
686
|
+
const useDefault = () => commitAndClose(null);
|
|
687
|
+
return /* @__PURE__ */ jsx(
|
|
688
|
+
SegmentRowPopover,
|
|
689
|
+
{
|
|
690
|
+
dropdown: /* @__PURE__ */ jsxs(Stack, { children: [
|
|
691
|
+
/* @__PURE__ */ jsx(
|
|
692
|
+
SpeedInput,
|
|
693
|
+
{
|
|
694
|
+
defaultSpeedKmh: activityDefaultSpeed,
|
|
695
|
+
kmh: draft,
|
|
696
|
+
length: resolvedUnits.length,
|
|
697
|
+
onChange: setDraft,
|
|
698
|
+
pace: resolvedUnits.pace
|
|
699
|
+
}
|
|
700
|
+
),
|
|
701
|
+
durationHint ? /* @__PURE__ */ jsx(Text, { c: "dimmed", size: "xs", children: strings.durationHint(durationHint) }) : null,
|
|
702
|
+
/* @__PURE__ */ jsx(Button, { onClick: () => commitAndClose(draft), children: strings.speedSet }),
|
|
703
|
+
/* @__PURE__ */ jsx(Button, { onClick: useDefault, variant: "subtle", children: strings.speedUseDefault })
|
|
704
|
+
] }),
|
|
705
|
+
label,
|
|
706
|
+
onCancel: cancelAndClose,
|
|
707
|
+
onDismiss: () => commitAndClose(draft),
|
|
708
|
+
opened,
|
|
709
|
+
children
|
|
710
|
+
}
|
|
711
|
+
);
|
|
712
|
+
};
|
|
713
|
+
var SECTIONS9 = ["agentLock", "segmentMenu", "segments"];
|
|
714
|
+
var SegmentRowActions = memo(function SegmentRowActions2({
|
|
715
|
+
chain,
|
|
716
|
+
deleteDisabled,
|
|
717
|
+
group,
|
|
718
|
+
mode,
|
|
719
|
+
onDelete,
|
|
720
|
+
onEditGeometry,
|
|
721
|
+
onExport,
|
|
722
|
+
onMenuOpenChange,
|
|
723
|
+
onSetMode,
|
|
724
|
+
onSetSpeed,
|
|
725
|
+
onStartRename,
|
|
726
|
+
pluginTarget,
|
|
727
|
+
posture,
|
|
728
|
+
speed,
|
|
729
|
+
triggerVisible
|
|
730
|
+
}) {
|
|
731
|
+
const menuLabel = useStudioScopedStrings(SECTIONS9).segmentMenu.menuLabel;
|
|
732
|
+
const [speedOpen, setSpeedOpen] = useState(false);
|
|
733
|
+
const [modeOpen, setModeOpen] = useState(false);
|
|
734
|
+
const live = posture.kind === "interactive" || posture.kind === "renaming";
|
|
735
|
+
if (!live && (speedOpen || modeOpen)) {
|
|
736
|
+
setSpeedOpen(false);
|
|
737
|
+
setModeOpen(false);
|
|
738
|
+
}
|
|
739
|
+
const menuChain = useMemo(
|
|
740
|
+
() => chain ? { ...chain, onChangeEngine: () => setModeOpen(true) } : void 0,
|
|
741
|
+
[chain]
|
|
742
|
+
);
|
|
743
|
+
const openSpeed = useCallback(() => setSpeedOpen(true), []);
|
|
744
|
+
const closeSpeed = useCallback(() => setSpeedOpen(false), []);
|
|
745
|
+
const closeMode = useCallback(() => setModeOpen(false), []);
|
|
746
|
+
if (posture.kind === "readonly") {
|
|
747
|
+
return null;
|
|
748
|
+
}
|
|
749
|
+
if (posture.kind === "agentDriving" || posture.kind === "peerLocked" || posture.kind === "unsaved") {
|
|
750
|
+
return /* @__PURE__ */ jsx(DisabledActionsButton, { ariaLabel: menuLabel, tooltipLabel: posture.reason });
|
|
751
|
+
}
|
|
752
|
+
return /* @__PURE__ */ jsx(
|
|
753
|
+
SegmentSpeedControl,
|
|
754
|
+
{
|
|
755
|
+
activityDefaultSpeed: speed.activityDefaultSpeed,
|
|
756
|
+
distanceMeters: speed.distanceMeters,
|
|
757
|
+
durationSeconds: speed.durationSeconds,
|
|
758
|
+
onChange: onSetSpeed,
|
|
759
|
+
onClose: closeSpeed,
|
|
760
|
+
opened: speedOpen,
|
|
761
|
+
speed: speed.speed,
|
|
762
|
+
children: /* @__PURE__ */ jsx(SegmentModeControl, { mode, onChange: onSetMode, onClose: closeMode, opened: modeOpen, children: /* @__PURE__ */ jsx(
|
|
763
|
+
SegmentRowMenu,
|
|
764
|
+
{
|
|
765
|
+
chain: menuChain,
|
|
766
|
+
deleteDisabled,
|
|
767
|
+
group,
|
|
768
|
+
onDelete,
|
|
769
|
+
onEditGeometry,
|
|
770
|
+
onExport,
|
|
771
|
+
onRename: onStartRename,
|
|
772
|
+
onSetSpeed: openSpeed,
|
|
773
|
+
onToggle: onMenuOpenChange,
|
|
774
|
+
pluginTarget,
|
|
775
|
+
triggerVisible
|
|
776
|
+
}
|
|
777
|
+
) })
|
|
778
|
+
}
|
|
779
|
+
);
|
|
780
|
+
});
|
|
781
|
+
var nameColumnStyle = { flex: 1, minWidth: 0 };
|
|
782
|
+
var SegmentRowBody = memo(function SegmentRowBody2({
|
|
783
|
+
ascent,
|
|
784
|
+
distance,
|
|
785
|
+
name,
|
|
786
|
+
onEditGeometry,
|
|
787
|
+
onStartRename,
|
|
788
|
+
posture,
|
|
789
|
+
reasonMessage,
|
|
790
|
+
rename
|
|
791
|
+
}) {
|
|
792
|
+
const metadataLine = /* @__PURE__ */ jsx(RowMetadata, { ascent, distance });
|
|
793
|
+
const content = /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
794
|
+
/* @__PURE__ */ jsx(Text, { size: "xs", children: name }),
|
|
795
|
+
metadataLine
|
|
796
|
+
] });
|
|
797
|
+
let body;
|
|
798
|
+
if (posture.kind === "renaming") {
|
|
799
|
+
body = /* @__PURE__ */ jsx(
|
|
800
|
+
RenameInput,
|
|
801
|
+
{
|
|
802
|
+
ariaLabel: rename.ariaLabel,
|
|
803
|
+
details: metadataLine,
|
|
804
|
+
errorMessage: rename.errorMessage,
|
|
805
|
+
onBlur: rename.onBlur,
|
|
806
|
+
onChange: (event) => rename.onChange(event.currentTarget.value),
|
|
807
|
+
onKeyDown: rename.onKeyDown,
|
|
808
|
+
value: rename.value
|
|
809
|
+
}
|
|
810
|
+
);
|
|
811
|
+
} else if (posture.kind === "peerLocked") {
|
|
812
|
+
body = /* @__PURE__ */ jsx(LockTooltip, { label: posture.reason, children: /* @__PURE__ */ jsx(UnstyledButton, { "aria-disabled": true, children: content }) });
|
|
813
|
+
} else if (posture.kind === "readonly") {
|
|
814
|
+
body = content;
|
|
815
|
+
} else if (posture.kind === "agentDriving" || posture.kind === "unsaved") {
|
|
816
|
+
body = /* @__PURE__ */ jsx(LockTooltip, { label: posture.reason, children: /* @__PURE__ */ jsx(UnstyledButton, { "aria-disabled": true, children: content }) });
|
|
817
|
+
} else {
|
|
818
|
+
body = /* @__PURE__ */ jsx(UnstyledButton, { onClick: onEditGeometry, onDoubleClick: onStartRename, children: content });
|
|
819
|
+
}
|
|
820
|
+
return (
|
|
821
|
+
/* mantine:exempt (see nameColumnStyle): `flex: 1 + minWidth: 0` lets the name
|
|
822
|
+
column shrink so a long name truncates inside the row's `wrap="nowrap"` Group
|
|
823
|
+
rather than pushing the menu out. */
|
|
824
|
+
/* @__PURE__ */ jsxs(Stack, { gap: "xxs", style: nameColumnStyle, children: [
|
|
825
|
+
body,
|
|
826
|
+
reasonMessage !== null ? /* @__PURE__ */ jsx(Text, { c: "dimmed", size: "xs", children: reasonMessage }) : null
|
|
827
|
+
] })
|
|
828
|
+
);
|
|
829
|
+
});
|
|
830
|
+
var SECTIONS10 = ["agentLock", "segmentMenu", "segments"];
|
|
831
|
+
var useSegmentRowChain = ({
|
|
832
|
+
activitySlug,
|
|
833
|
+
chain,
|
|
834
|
+
itineraryId,
|
|
835
|
+
merge,
|
|
836
|
+
mode,
|
|
837
|
+
onFailure,
|
|
838
|
+
segmentId,
|
|
839
|
+
splitPick
|
|
840
|
+
}) => {
|
|
841
|
+
const { dispatch } = useStudioDispatchUnsafe();
|
|
842
|
+
const previousSegmentId = chain?.previousSegmentId ?? null;
|
|
843
|
+
const insertMode = chain?.insertMode === null ? null : chain?.insertMode ?? mode;
|
|
844
|
+
const insert = useCallback(
|
|
845
|
+
async (afterSegmentId) => {
|
|
846
|
+
if (insertMode === null) {
|
|
847
|
+
return;
|
|
848
|
+
}
|
|
849
|
+
const result = await dispatch("studio.itinerary.segment.insertBegin", {
|
|
850
|
+
activitySlug,
|
|
851
|
+
afterSegmentId,
|
|
852
|
+
itineraryId,
|
|
853
|
+
mode: insertMode
|
|
854
|
+
});
|
|
855
|
+
if (!result.ok) {
|
|
856
|
+
onFailure?.({ result, verb: "insert" });
|
|
857
|
+
}
|
|
858
|
+
},
|
|
859
|
+
[activitySlug, dispatch, insertMode, itineraryId, onFailure]
|
|
860
|
+
);
|
|
861
|
+
const chainable = chain !== void 0;
|
|
862
|
+
return useMemo(
|
|
863
|
+
() => chainable ? {
|
|
864
|
+
mergeNextDisabledReason: chain?.mergeNextDisabledReason ?? null,
|
|
865
|
+
mergePreviousDisabledReason: chain?.mergePreviousDisabledReason ?? null,
|
|
866
|
+
// Both gaps or neither: an activity no engine serves offers no insert.
|
|
867
|
+
...insertMode === null ? {} : {
|
|
868
|
+
onInsertAfter: () => insert(segmentId),
|
|
869
|
+
onInsertBefore: () => insert(previousSegmentId)
|
|
870
|
+
},
|
|
871
|
+
onMergeNext: () => {
|
|
872
|
+
void merge(segmentId);
|
|
873
|
+
},
|
|
874
|
+
onMergePrevious: () => {
|
|
875
|
+
if (previousSegmentId !== null) {
|
|
876
|
+
void merge(previousSegmentId);
|
|
877
|
+
}
|
|
878
|
+
},
|
|
879
|
+
onSplit: splitPick,
|
|
880
|
+
splitDisabledReason: chain?.splitDisabledReason ?? null
|
|
881
|
+
} : void 0,
|
|
882
|
+
[
|
|
883
|
+
chain?.mergeNextDisabledReason,
|
|
884
|
+
chain?.mergePreviousDisabledReason,
|
|
885
|
+
chain?.splitDisabledReason,
|
|
886
|
+
chainable,
|
|
887
|
+
insert,
|
|
888
|
+
insertMode,
|
|
889
|
+
merge,
|
|
890
|
+
previousSegmentId,
|
|
891
|
+
segmentId,
|
|
892
|
+
splitPick
|
|
893
|
+
]
|
|
894
|
+
);
|
|
895
|
+
};
|
|
896
|
+
var SegmentRow = memo(function SegmentRow2({
|
|
897
|
+
activityDefaultSpeed = null,
|
|
898
|
+
ascent,
|
|
899
|
+
chain,
|
|
900
|
+
color = null,
|
|
901
|
+
deleteDisabled = false,
|
|
902
|
+
distance,
|
|
903
|
+
distanceMeters = null,
|
|
904
|
+
durationSeconds = null,
|
|
905
|
+
group,
|
|
906
|
+
groupRail,
|
|
907
|
+
indicators,
|
|
908
|
+
mode,
|
|
909
|
+
name,
|
|
910
|
+
onExport,
|
|
911
|
+
reasonMessage = null,
|
|
912
|
+
speed = null,
|
|
913
|
+
trailing,
|
|
914
|
+
...options
|
|
915
|
+
}) {
|
|
916
|
+
const words = useStudioScopedStrings(SECTIONS10);
|
|
917
|
+
const row = useSegmentRow({ ...options, segmentName: name });
|
|
918
|
+
const locked = row.posture.kind === "peerLocked" || row.posture.kind === "agentDriving";
|
|
919
|
+
const chainable = chain !== void 0 && row.posture.kind !== "unsaved";
|
|
920
|
+
const { itineraryId, segmentId } = options;
|
|
921
|
+
const chainActions = useSegmentRowChain({
|
|
922
|
+
activitySlug: options.activitySlug,
|
|
923
|
+
chain: chainable ? chain : void 0,
|
|
924
|
+
itineraryId,
|
|
925
|
+
merge: row.actions.merge,
|
|
926
|
+
mode,
|
|
927
|
+
onFailure: options.onFailure,
|
|
928
|
+
segmentId,
|
|
929
|
+
splitPick: row.actions.splitPick
|
|
930
|
+
});
|
|
931
|
+
const rename = useMemo(
|
|
932
|
+
() => ({
|
|
933
|
+
ariaLabel: words.segments.renameLabel,
|
|
934
|
+
errorMessage: words.segments.renameError,
|
|
935
|
+
onBlur: row.rename.inputProps.onBlur,
|
|
936
|
+
onChange: row.rename.setValue,
|
|
937
|
+
onKeyDown: row.rename.inputProps.onKeyDown,
|
|
938
|
+
value: row.rename.value
|
|
939
|
+
}),
|
|
940
|
+
[
|
|
941
|
+
row.rename.inputProps.onBlur,
|
|
942
|
+
row.rename.inputProps.onKeyDown,
|
|
943
|
+
row.rename.setValue,
|
|
944
|
+
row.rename.value,
|
|
945
|
+
words.segments.renameError,
|
|
946
|
+
words.segments.renameLabel
|
|
947
|
+
]
|
|
948
|
+
);
|
|
949
|
+
const exportSegment = useMemo(
|
|
950
|
+
() => onExport === void 0 ? void 0 : () => onExport(segmentId),
|
|
951
|
+
[onExport, segmentId]
|
|
952
|
+
);
|
|
953
|
+
const speedProps = useMemo(
|
|
954
|
+
() => ({ activityDefaultSpeed, distanceMeters, durationSeconds, speed }),
|
|
955
|
+
[activityDefaultSpeed, distanceMeters, durationSeconds, speed]
|
|
956
|
+
);
|
|
957
|
+
const groupStyle = useMemo(
|
|
958
|
+
() => groupRail ? { "--group-color": groupRail.color } : void 0,
|
|
959
|
+
[groupRail]
|
|
960
|
+
);
|
|
961
|
+
return /* @__PURE__ */ jsxs(
|
|
962
|
+
Group,
|
|
963
|
+
{
|
|
964
|
+
align: "center",
|
|
965
|
+
"aria-describedby": groupRail?.chipId,
|
|
966
|
+
"aria-disabled": locked || void 0,
|
|
967
|
+
"data-editing": row.rename.editing || void 0,
|
|
968
|
+
"data-group-first": groupRail?.isFirst || void 0,
|
|
969
|
+
"data-group-last": groupRail?.isLast || void 0,
|
|
970
|
+
"data-grouped": groupRail ? true : void 0,
|
|
971
|
+
"data-map-hovered": row.mapHovered || void 0,
|
|
972
|
+
"data-menu-open": row.menuOpen || void 0,
|
|
973
|
+
style: groupStyle,
|
|
974
|
+
...row.rowProps,
|
|
975
|
+
children: [
|
|
976
|
+
/* @__PURE__ */ jsx(
|
|
977
|
+
SegmentColorCircle,
|
|
978
|
+
{
|
|
979
|
+
color,
|
|
980
|
+
disabled: locked,
|
|
981
|
+
label: words.segments.recolor,
|
|
982
|
+
onRecolor: row.actions.recolor
|
|
983
|
+
}
|
|
984
|
+
),
|
|
985
|
+
/* @__PURE__ */ jsx(
|
|
986
|
+
SegmentRowBody,
|
|
987
|
+
{
|
|
988
|
+
ascent,
|
|
989
|
+
distance,
|
|
990
|
+
name,
|
|
991
|
+
onEditGeometry: row.editGeometry,
|
|
992
|
+
onStartRename: row.startRename,
|
|
993
|
+
posture: row.posture,
|
|
994
|
+
reasonMessage,
|
|
995
|
+
rename
|
|
996
|
+
}
|
|
997
|
+
),
|
|
998
|
+
indicators,
|
|
999
|
+
trailing,
|
|
1000
|
+
/* @__PURE__ */ jsx(
|
|
1001
|
+
SegmentRowActions,
|
|
1002
|
+
{
|
|
1003
|
+
chain: chainActions,
|
|
1004
|
+
deleteDisabled,
|
|
1005
|
+
group,
|
|
1006
|
+
mode,
|
|
1007
|
+
onDelete: row.actions.remove,
|
|
1008
|
+
onEditGeometry: row.editGeometry,
|
|
1009
|
+
onExport: chainable ? exportSegment : void 0,
|
|
1010
|
+
onMenuOpenChange: row.setMenuOpen,
|
|
1011
|
+
onSetMode: row.actions.setMode,
|
|
1012
|
+
onSetSpeed: row.actions.setSpeed,
|
|
1013
|
+
onStartRename: row.startRename,
|
|
1014
|
+
pluginTarget: row.pluginTarget,
|
|
1015
|
+
posture: row.posture,
|
|
1016
|
+
speed: speedProps,
|
|
1017
|
+
triggerVisible: row.active || row.menuOpen
|
|
1018
|
+
}
|
|
1019
|
+
)
|
|
1020
|
+
]
|
|
1021
|
+
}
|
|
1022
|
+
);
|
|
1023
|
+
});
|
|
1024
|
+
var SECTIONS11 = [
|
|
1025
|
+
"agentLock",
|
|
1026
|
+
"collab",
|
|
1027
|
+
"import",
|
|
1028
|
+
"segmentEditor",
|
|
1029
|
+
"segmentGroup",
|
|
1030
|
+
"segmentMenu",
|
|
1031
|
+
"segments"
|
|
1032
|
+
];
|
|
1033
|
+
var verbFailureSentence = (words, verb) => ({
|
|
1034
|
+
editBegin: words.segmentEditor.editGeometryFailed,
|
|
1035
|
+
groupDelete: words.segmentGroup.ungroupFailed,
|
|
1036
|
+
groupOpen: words.segmentGroup.openFailed,
|
|
1037
|
+
groupSetRange: words.segmentGroup.rangeFailed,
|
|
1038
|
+
insert: words.segmentEditor.insertFailed,
|
|
1039
|
+
merge: words.segmentEditor.mergeFailed,
|
|
1040
|
+
recolor: words.segmentEditor.saveFailed,
|
|
1041
|
+
remove: words.segmentEditor.deleteFailed,
|
|
1042
|
+
rename: words.segmentEditor.saveFailed,
|
|
1043
|
+
setMode: words.segmentEditor.setModeFailed,
|
|
1044
|
+
setSpeed: words.segmentEditor.saveFailed,
|
|
1045
|
+
splitPick: words.segmentEditor.splitFailed
|
|
1046
|
+
})[verb];
|
|
1047
|
+
var verbRefusal = (words, failure) => {
|
|
1048
|
+
const { result, verb } = failure;
|
|
1049
|
+
return verb === "remove" && !result.ok && result.code === "conflict" && !result.detail ? { ...result, detail: words.segmentEditor.deleteNotEdge } : result;
|
|
1050
|
+
};
|
|
1051
|
+
var reportVerbFailure = (report, words, failure) => {
|
|
1052
|
+
report(verbRefusal(words, failure), verbFailureSentence(words, failure.verb));
|
|
1053
|
+
};
|
|
1054
|
+
var LockedSegmentRow = ({
|
|
1055
|
+
lockHolderId,
|
|
1056
|
+
...props
|
|
1057
|
+
}) => /* @__PURE__ */ jsx(SegmentRow, { ...props, peerLockHint: usePeerLockLabel(lockHolderId) });
|
|
1058
|
+
var PersistedSegmentRow = memo(function PersistedSegmentRow2({
|
|
1059
|
+
activityDefaultSpeed,
|
|
1060
|
+
activitySlug,
|
|
1061
|
+
groupActions,
|
|
1062
|
+
groupRail,
|
|
1063
|
+
insertMode,
|
|
1064
|
+
isCommitted,
|
|
1065
|
+
isFirst,
|
|
1066
|
+
isLast,
|
|
1067
|
+
itineraryId,
|
|
1068
|
+
mergeNextDisabledReason,
|
|
1069
|
+
mergePreviousDisabledReason,
|
|
1070
|
+
onExport,
|
|
1071
|
+
previousSegmentId,
|
|
1072
|
+
segment,
|
|
1073
|
+
splitDisabledReason
|
|
1074
|
+
}) {
|
|
1075
|
+
const words = useStudioScopedStrings(SECTIONS11);
|
|
1076
|
+
const unitFormat = useStudioUnits();
|
|
1077
|
+
const reportFailure = useStudioFailureAlert();
|
|
1078
|
+
const resource = useActiveItineraryResource();
|
|
1079
|
+
const lockHolderId = usePeerLockHolderId(resource, "segment", segment.id);
|
|
1080
|
+
const onFailure = useCallback(
|
|
1081
|
+
(failure) => reportVerbFailure(reportFailure, words, failure),
|
|
1082
|
+
[words, reportFailure]
|
|
1083
|
+
);
|
|
1084
|
+
const indicators = useMemo(
|
|
1085
|
+
() => /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
1086
|
+
/* @__PURE__ */ jsx(AgentEntityIndicator, { id: segment.id, kind: "segment" }),
|
|
1087
|
+
/* @__PURE__ */ jsx(PeerEntityIndicator, { id: segment.id, kind: "segment" })
|
|
1088
|
+
] }),
|
|
1089
|
+
[segment.id]
|
|
1090
|
+
);
|
|
1091
|
+
const chain = useMemo(
|
|
1092
|
+
() => isCommitted ? {
|
|
1093
|
+
insertMode,
|
|
1094
|
+
mergeNextDisabledReason,
|
|
1095
|
+
mergePreviousDisabledReason,
|
|
1096
|
+
previousSegmentId,
|
|
1097
|
+
splitDisabledReason
|
|
1098
|
+
} : void 0,
|
|
1099
|
+
[
|
|
1100
|
+
insertMode,
|
|
1101
|
+
isCommitted,
|
|
1102
|
+
mergeNextDisabledReason,
|
|
1103
|
+
mergePreviousDisabledReason,
|
|
1104
|
+
previousSegmentId,
|
|
1105
|
+
splitDisabledReason
|
|
1106
|
+
]
|
|
1107
|
+
);
|
|
1108
|
+
const rowProps = {
|
|
1109
|
+
activityDefaultSpeed,
|
|
1110
|
+
// The persisted row opens its geometry edit through the published assembler, which is the
|
|
1111
|
+
// same one a click on the segment's line takes, so the two arm the engine identically.
|
|
1112
|
+
activitySlug: activitySlug ?? void 0,
|
|
1113
|
+
agentLockHint: words.agentLock.rowLocked,
|
|
1114
|
+
ascent: formatElevation(segment.ascent, unitFormat),
|
|
1115
|
+
chain,
|
|
1116
|
+
color: segment.color,
|
|
1117
|
+
deleteDisabled: !(isFirst || isLast),
|
|
1118
|
+
distance: formatDistance(segment.distance, unitFormat),
|
|
1119
|
+
distanceMeters: segment.distance,
|
|
1120
|
+
durationSeconds: segment.duration,
|
|
1121
|
+
group: groupActions,
|
|
1122
|
+
groupRail,
|
|
1123
|
+
indicators,
|
|
1124
|
+
itineraryId,
|
|
1125
|
+
mode: segment.mode,
|
|
1126
|
+
name: segment.name,
|
|
1127
|
+
onExport,
|
|
1128
|
+
onFailure,
|
|
1129
|
+
segmentId: segment.id,
|
|
1130
|
+
segmentName: segment.name,
|
|
1131
|
+
speed: segment.speed,
|
|
1132
|
+
// A row the committed chain does not yet carry is inert, and says so: its id is
|
|
1133
|
+
// client-minted, so every verb naming it would 404.
|
|
1134
|
+
unsavedHint: isCommitted ? null : words.segmentEditor.unsavedRowHint
|
|
1135
|
+
};
|
|
1136
|
+
return lockHolderId === null ? /* @__PURE__ */ jsx(SegmentRow, { ...rowProps, peerLockHint: null }) : /* @__PURE__ */ jsx(LockedSegmentRow, { ...rowProps, lockHolderId });
|
|
1137
|
+
});
|
|
1138
|
+
var DraftSegmentRow = memo(function DraftSegmentRow2({
|
|
1139
|
+
activityDefaultSpeed,
|
|
1140
|
+
activitySlug,
|
|
1141
|
+
isFirst,
|
|
1142
|
+
isLast,
|
|
1143
|
+
isOnly,
|
|
1144
|
+
liveSegment,
|
|
1145
|
+
previousEnd,
|
|
1146
|
+
segment
|
|
1147
|
+
}) {
|
|
1148
|
+
const { dispatch } = useStudioDispatch();
|
|
1149
|
+
const words = useStudioScopedStrings(SECTIONS11);
|
|
1150
|
+
const unitFormat = useStudioUnits();
|
|
1151
|
+
const reportFailure = useStudioFailureAlert();
|
|
1152
|
+
const { toggleImportMode } = useSegmentRowActions({ itineraryId: "", segmentId: segment.id });
|
|
1153
|
+
const onFailure = useCallback(
|
|
1154
|
+
(failure) => reportVerbFailure(reportFailure, words, failure),
|
|
1155
|
+
[words, reportFailure]
|
|
1156
|
+
);
|
|
1157
|
+
const onEditGeometry = useCallback(() => {
|
|
1158
|
+
void beginDraftSegmentEdit(dispatch, segment, { isFirst, previousEnd }, activitySlug).then(
|
|
1159
|
+
(result) => {
|
|
1160
|
+
if (result !== null && !result.ok) {
|
|
1161
|
+
reportFailure(result, verbFailureSentence(words, "editBegin"));
|
|
1162
|
+
}
|
|
1163
|
+
}
|
|
1164
|
+
);
|
|
1165
|
+
}, [activitySlug, dispatch, words, isFirst, previousEnd, reportFailure, segment]);
|
|
1166
|
+
const chosen = segment.mode === "directions" && segment.directions ? segment.directions : segment.linestring;
|
|
1167
|
+
const ascentMeters = liveSegment?.ascent ?? chosen.elevation?.ascent ?? chosen.ascent ?? null;
|
|
1168
|
+
const distance = liveSegment?.distance ?? chosen.distance ?? null;
|
|
1169
|
+
const canToggle = segment.directions !== null && !segment.snapLocked;
|
|
1170
|
+
const modeTooltip = (mode) => {
|
|
1171
|
+
const verb = mode === "directions" ? words.import.segmentMode.snapTooltip : words.import.segmentMode.exactTooltip;
|
|
1172
|
+
const candidate = mode === "directions" ? segment.directions : segment.linestring;
|
|
1173
|
+
const measured = candidate?.distance != null ? formatDistance(candidate.distance, unitFormat) : "";
|
|
1174
|
+
return joinMetadata([verb, measured]);
|
|
1175
|
+
};
|
|
1176
|
+
const reasonMessage = segment.mode === "linestring" && segment.recommendationReason !== null ? importReasonSentence(words, segment.recommendationReason) : null;
|
|
1177
|
+
return /* @__PURE__ */ jsx(
|
|
1178
|
+
SegmentRow,
|
|
1179
|
+
{
|
|
1180
|
+
activityDefaultSpeed,
|
|
1181
|
+
agentLockHint: words.agentLock.rowLocked,
|
|
1182
|
+
ascent: formatElevation(ascentMeters, unitFormat),
|
|
1183
|
+
color: segment.color,
|
|
1184
|
+
deleteDisabled: !(isFirst || isLast) || isOnly,
|
|
1185
|
+
distance: formatDistance(distance, unitFormat),
|
|
1186
|
+
distanceMeters: distance,
|
|
1187
|
+
mode: segment.mode,
|
|
1188
|
+
name: segment.name,
|
|
1189
|
+
onEditGeometry,
|
|
1190
|
+
onFailure,
|
|
1191
|
+
peerLockHint: null,
|
|
1192
|
+
reasonMessage,
|
|
1193
|
+
segmentId: segment.id,
|
|
1194
|
+
segmentName: segment.name,
|
|
1195
|
+
speed: segment.speed,
|
|
1196
|
+
trailing: canToggle ? /* @__PURE__ */ jsx(
|
|
1197
|
+
StudioSegmentedControl,
|
|
1198
|
+
{
|
|
1199
|
+
data: [
|
|
1200
|
+
// Each option is an icon whose sentence is both its tooltip and, visually
|
|
1201
|
+
// hidden, its accessible name.
|
|
1202
|
+
{
|
|
1203
|
+
label: /* @__PURE__ */ jsx(SegmentIcon, { glyph: "routed", label: modeTooltip("directions") }),
|
|
1204
|
+
value: "directions"
|
|
1205
|
+
},
|
|
1206
|
+
{
|
|
1207
|
+
label: /* @__PURE__ */ jsx(SegmentIcon, { glyph: "freehand", label: modeTooltip("linestring") }),
|
|
1208
|
+
value: "linestring"
|
|
1209
|
+
}
|
|
1210
|
+
],
|
|
1211
|
+
onChange: toggleImportMode,
|
|
1212
|
+
value: segment.mode
|
|
1213
|
+
}
|
|
1214
|
+
) : null
|
|
1215
|
+
}
|
|
1216
|
+
);
|
|
1217
|
+
});
|
|
1218
|
+
var STUDIO_FORM_GAP = "md";
|
|
1219
|
+
var StudioFormStack = ({ children, ...props }) => /* @__PURE__ */ jsx(MantineThemeProvider, { theme: densityThemes[useStudioDensity()].form, children: /* @__PURE__ */ jsx(Stack, { gap: STUDIO_FORM_GAP, ...props, children }) });
|
|
1220
|
+
var SidenavContentBody = ({ children }) => /* @__PURE__ */ jsx(Stack, { gap: STUDIO_FORM_GAP, mih: "100%", p: "md", children });
|
|
1221
|
+
var SidenavContentFormBody = ({ children }) => /* @__PURE__ */ jsx(StudioFormStack, { mih: "100%", p: "md", children });
|
|
1222
|
+
var SECTIONS12 = ["segments", "waypointEditor"];
|
|
1223
|
+
var LazySegmentColorPicker = lazy(
|
|
1224
|
+
() => import('./SegmentColorPicker-UNLPITUA.js').then((module) => ({
|
|
1225
|
+
default: module.SegmentColorPicker
|
|
1226
|
+
}))
|
|
1227
|
+
);
|
|
1228
|
+
var diskBaseStyle = {
|
|
1229
|
+
alignItems: "center",
|
|
1230
|
+
borderRadius: "50%",
|
|
1231
|
+
color: "white",
|
|
1232
|
+
display: "flex",
|
|
1233
|
+
height: SWATCH_SIZE,
|
|
1234
|
+
justifyContent: "center",
|
|
1235
|
+
width: SWATCH_SIZE
|
|
1236
|
+
};
|
|
1237
|
+
var WaypointIconCircle = ({
|
|
1238
|
+
color,
|
|
1239
|
+
colorless = false,
|
|
1240
|
+
disabled = false,
|
|
1241
|
+
icon,
|
|
1242
|
+
itineraryId,
|
|
1243
|
+
label,
|
|
1244
|
+
session = false,
|
|
1245
|
+
waypointId
|
|
1246
|
+
}) => {
|
|
1247
|
+
const words = useStudioScopedStrings(SECTIONS12);
|
|
1248
|
+
const { recolor, setIcon } = useWaypointRowActions({
|
|
1249
|
+
itineraryId: itineraryId ?? "",
|
|
1250
|
+
session,
|
|
1251
|
+
waypointId
|
|
1252
|
+
});
|
|
1253
|
+
const [opened, setOpened] = useState(false);
|
|
1254
|
+
const [draftColor, setDraftColor] = useState(color ?? DEFAULT_WAYPOINT_COLOR);
|
|
1255
|
+
const open = () => {
|
|
1256
|
+
setDraftColor(color ?? DEFAULT_WAYPOINT_COLOR);
|
|
1257
|
+
setOpened(true);
|
|
1258
|
+
};
|
|
1259
|
+
useEscapeKey(() => setOpened(false), opened);
|
|
1260
|
+
const resolvedColor = opened && !colorless ? draftColor : color ?? DEFAULT_WAYPOINT_COLOR;
|
|
1261
|
+
const resolvedIcon = icon ?? WAYPOINT_FALLBACK_ICON;
|
|
1262
|
+
const Glyph2 = waypointGlyphTable[resolvedIcon];
|
|
1263
|
+
const pickerSelection = icon === null ? null : userWaypointIconSchema.safeParse(icon).data ?? null;
|
|
1264
|
+
const diskStyle = useMemo(
|
|
1265
|
+
() => ({ ...diskBaseStyle, backgroundColor: resolvedColor }),
|
|
1266
|
+
[resolvedColor]
|
|
1267
|
+
);
|
|
1268
|
+
if (disabled) {
|
|
1269
|
+
return /* @__PURE__ */ jsx(UnstyledButton, { "aria-disabled": true, "aria-label": label, children: /* @__PURE__ */ jsx(Box, { style: diskStyle, children: /* @__PURE__ */ jsx(Glyph2, { size: iconSizes.sm }) }) });
|
|
1270
|
+
}
|
|
1271
|
+
return (
|
|
1272
|
+
// The recolor picker is code-split, so the dropdown mounts short (the labels and
|
|
1273
|
+
// icon grid) and grows once the picker chunk lands. Let it re-flip on that size
|
|
1274
|
+
// change instead of locking the side it chose while short, so a waypoint low in the
|
|
1275
|
+
// list opens the picker above itself rather than past the window's bottom edge.
|
|
1276
|
+
/* @__PURE__ */ jsxs(
|
|
1277
|
+
Popover,
|
|
1278
|
+
{
|
|
1279
|
+
onChange: setOpened,
|
|
1280
|
+
opened,
|
|
1281
|
+
position: "bottom-start",
|
|
1282
|
+
preventPositionChangeWhenVisible: false,
|
|
1283
|
+
withArrow: true,
|
|
1284
|
+
withinPortal: true,
|
|
1285
|
+
children: [
|
|
1286
|
+
/* @__PURE__ */ jsx(Popover.Target, { children: /* @__PURE__ */ jsx(UnstyledButton, { "aria-label": label, onClick: open, children: /* @__PURE__ */ jsx(Box, { style: diskStyle, children: /* @__PURE__ */ jsx(Glyph2, { size: iconSizes.sm }) }) }) }),
|
|
1287
|
+
/* @__PURE__ */ jsx(Popover.Dropdown, { children: /* @__PURE__ */ jsxs(Group, { align: "flex-start", gap: "md", wrap: "nowrap", children: [
|
|
1288
|
+
colorless ? null : /* @__PURE__ */ jsx(Box, { "aria-label": words.waypointEditor.colorLabel, role: "group", children: /* @__PURE__ */ jsx(Suspense, { fallback: null, children: /* @__PURE__ */ jsx(
|
|
1289
|
+
LazySegmentColorPicker,
|
|
1290
|
+
{
|
|
1291
|
+
onChange: setDraftColor,
|
|
1292
|
+
onChangeEnd: recolor,
|
|
1293
|
+
value: draftColor
|
|
1294
|
+
}
|
|
1295
|
+
) }) }),
|
|
1296
|
+
/* @__PURE__ */ jsx(Box, { "aria-label": words.waypointEditor.iconLabel, role: "group", children: /* @__PURE__ */ jsx(WaypointIconPicker, { onChange: setIcon, value: pickerSelection }) })
|
|
1297
|
+
] }) })
|
|
1298
|
+
]
|
|
1299
|
+
}
|
|
1300
|
+
)
|
|
1301
|
+
);
|
|
1302
|
+
};
|
|
1303
|
+
var nameColumnStyle2 = { flex: 1, minWidth: 0 };
|
|
1304
|
+
var triggerVisibleStyle2 = { opacity: 1 };
|
|
1305
|
+
var triggerHiddenStyle2 = { opacity: 0 };
|
|
1306
|
+
var ELEMENT_SECTIONS = ["waypoints"];
|
|
1307
|
+
var isDisplayName = (name) => displayNameSchema.safeParse(name).success;
|
|
1308
|
+
var WaypointRowLayout = ({
|
|
1309
|
+
details,
|
|
1310
|
+
iconCircle,
|
|
1311
|
+
indicator,
|
|
1312
|
+
lockHint = null,
|
|
1313
|
+
mapHovered,
|
|
1314
|
+
menuItems,
|
|
1315
|
+
name,
|
|
1316
|
+
onBodyClick,
|
|
1317
|
+
onMouseEnter,
|
|
1318
|
+
onMouseLeave,
|
|
1319
|
+
onRename,
|
|
1320
|
+
onStartRename,
|
|
1321
|
+
ref,
|
|
1322
|
+
rowRef
|
|
1323
|
+
}) => {
|
|
1324
|
+
const strings = useMountayaScopedStrings(ELEMENT_SECTIONS).waypoints;
|
|
1325
|
+
const commitRename = useCallback((next) => onRename?.(next), [onRename]);
|
|
1326
|
+
const rename = useInlineRename({
|
|
1327
|
+
locked: lockHint !== null,
|
|
1328
|
+
name,
|
|
1329
|
+
onCommit: commitRename,
|
|
1330
|
+
validate: isDisplayName
|
|
1331
|
+
});
|
|
1332
|
+
const { editing } = rename;
|
|
1333
|
+
const startRename = useCallback(() => {
|
|
1334
|
+
onStartRename?.();
|
|
1335
|
+
rename.start();
|
|
1336
|
+
}, [onStartRename, rename.start]);
|
|
1337
|
+
useImperativeHandle(ref, () => ({ startRenaming: startRename }), [startRename]);
|
|
1338
|
+
const [active, setActive] = useState(false);
|
|
1339
|
+
const [menuOpened, setMenuOpened] = useState(false);
|
|
1340
|
+
const onRowMouseEnter = useCallback(() => {
|
|
1341
|
+
setActive(true);
|
|
1342
|
+
onMouseEnter?.();
|
|
1343
|
+
}, [onMouseEnter]);
|
|
1344
|
+
const onRowMouseLeave = useCallback(() => {
|
|
1345
|
+
setActive(false);
|
|
1346
|
+
onMouseLeave?.();
|
|
1347
|
+
}, [onMouseLeave]);
|
|
1348
|
+
const onRowBlur = useCallback((event) => {
|
|
1349
|
+
if (!event.currentTarget.contains(event.relatedTarget)) {
|
|
1350
|
+
setActive(false);
|
|
1351
|
+
}
|
|
1352
|
+
}, []);
|
|
1353
|
+
const bodyContent = /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
1354
|
+
/* @__PURE__ */ jsx(Text, { size: "xs", children: name }),
|
|
1355
|
+
details
|
|
1356
|
+
] });
|
|
1357
|
+
const displayOnly = menuItems === void 0 && onRename === void 0 && onBodyClick === void 0;
|
|
1358
|
+
return /* @__PURE__ */ jsxs(
|
|
1359
|
+
Group,
|
|
1360
|
+
{
|
|
1361
|
+
align: "center",
|
|
1362
|
+
"aria-disabled": lockHint !== null || void 0,
|
|
1363
|
+
"data-editing": editing || void 0,
|
|
1364
|
+
"data-map-hovered": mapHovered || void 0,
|
|
1365
|
+
"data-menu-open": menuOpened || void 0,
|
|
1366
|
+
"data-readonly": displayOnly || void 0,
|
|
1367
|
+
onBlur: onRowBlur,
|
|
1368
|
+
onFocus: () => setActive(true),
|
|
1369
|
+
onMouseEnter: onRowMouseEnter,
|
|
1370
|
+
onMouseLeave: onRowMouseLeave,
|
|
1371
|
+
ref: rowRef,
|
|
1372
|
+
children: [
|
|
1373
|
+
iconCircle,
|
|
1374
|
+
/* @__PURE__ */ jsx(Stack, { gap: "xxs", style: nameColumnStyle2, children: editing ? /* @__PURE__ */ jsx(
|
|
1375
|
+
RenameInput,
|
|
1376
|
+
{
|
|
1377
|
+
ariaLabel: strings.renameLabel,
|
|
1378
|
+
details,
|
|
1379
|
+
errorMessage: strings.renameError,
|
|
1380
|
+
onBlur: rename.inputProps.onBlur,
|
|
1381
|
+
onChange: rename.inputProps.onChange,
|
|
1382
|
+
onKeyDown: rename.inputProps.onKeyDown,
|
|
1383
|
+
value: rename.value
|
|
1384
|
+
}
|
|
1385
|
+
) : lockHint !== null ? (
|
|
1386
|
+
// Held: the body is inert and wrapped in the lock tooltip, so hovering the name (or
|
|
1387
|
+
// tabbing to it) explains what is holding the row rather than leaving it dimmed and
|
|
1388
|
+
// mute. It stays a focusable button for exactly that reason.
|
|
1389
|
+
/* @__PURE__ */ jsx(LockTooltip, { label: lockHint, children: /* @__PURE__ */ jsx(UnstyledButton, { "aria-disabled": true, children: bodyContent }) })
|
|
1390
|
+
) : displayOnly ? bodyContent : (
|
|
1391
|
+
// A single click runs the body action (on a saved waypoint, opening the session that
|
|
1392
|
+
// repositions it), and a double-click enters rename, mirroring the segment row.
|
|
1393
|
+
/* @__PURE__ */ jsx(
|
|
1394
|
+
UnstyledButton,
|
|
1395
|
+
{
|
|
1396
|
+
onClick: onBodyClick,
|
|
1397
|
+
onDoubleClick: onRename === void 0 ? void 0 : startRename,
|
|
1398
|
+
children: bodyContent
|
|
1399
|
+
}
|
|
1400
|
+
)
|
|
1401
|
+
) }),
|
|
1402
|
+
indicator,
|
|
1403
|
+
menuItems === void 0 ? null : lockHint !== null ? /* @__PURE__ */ jsx(DisabledActionsButton, { ariaLabel: strings.menuLabel, tooltipLabel: lockHint }) : /* @__PURE__ */ jsxs(Menu, { onChange: setMenuOpened, position: "bottom-end", withinPortal: true, children: [
|
|
1404
|
+
/* @__PURE__ */ jsx(Menu.Target, { children: /* @__PURE__ */ jsx(
|
|
1405
|
+
ActionIcon,
|
|
1406
|
+
{
|
|
1407
|
+
"aria-label": strings.menuLabel,
|
|
1408
|
+
className: "mtya-menu-trigger",
|
|
1409
|
+
style: active || menuOpened ? triggerVisibleStyle2 : triggerHiddenStyle2,
|
|
1410
|
+
variant: "subtle",
|
|
1411
|
+
children: /* @__PURE__ */ jsx(Glyph, { name: "more", size: iconSizes.sm })
|
|
1412
|
+
}
|
|
1413
|
+
) }),
|
|
1414
|
+
/* @__PURE__ */ jsx(Menu.Dropdown, { children: menuItems })
|
|
1415
|
+
] })
|
|
1416
|
+
]
|
|
1417
|
+
}
|
|
1418
|
+
);
|
|
1419
|
+
};
|
|
1420
|
+
var ELEMENT_SECTIONS2 = ["waypoints"];
|
|
1421
|
+
var WaypointRow = memo(function WaypointRow2({
|
|
1422
|
+
iconCircle,
|
|
1423
|
+
indicators,
|
|
1424
|
+
menuItems: hostItems,
|
|
1425
|
+
mode,
|
|
1426
|
+
name,
|
|
1427
|
+
onBodyClick,
|
|
1428
|
+
readOnly = false,
|
|
1429
|
+
...options
|
|
1430
|
+
}) {
|
|
1431
|
+
const strings = useMountayaScopedStrings(ELEMENT_SECTIONS2).waypoints;
|
|
1432
|
+
const layoutRef = useRef(null);
|
|
1433
|
+
const row = useWaypointRow(options);
|
|
1434
|
+
const pluginItems = usePluginSlot("waypoint.menu", row.pluginTarget);
|
|
1435
|
+
const onStartRename = row.cancelMove;
|
|
1436
|
+
const startRenaming = useCallback(() => layoutRef.current?.startRenaming(), []);
|
|
1437
|
+
const locked = row.lockHint !== null;
|
|
1438
|
+
const movable = !readOnly && row.moveOnMap !== void 0 && !locked;
|
|
1439
|
+
const bodyAction = useCallback(() => {
|
|
1440
|
+
if (onBodyClick !== void 0) {
|
|
1441
|
+
row.deferBodyClick(onBodyClick);
|
|
1442
|
+
}
|
|
1443
|
+
}, [onBodyClick, row.deferBodyClick]);
|
|
1444
|
+
const menuItems = readOnly ? void 0 : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
1445
|
+
/* @__PURE__ */ jsx(
|
|
1446
|
+
Menu.Item,
|
|
1447
|
+
{
|
|
1448
|
+
fz: "xs",
|
|
1449
|
+
leftSection: /* @__PURE__ */ jsx(Glyph, { name: "action-rename", size: iconSizes.sm }),
|
|
1450
|
+
onClick: startRenaming,
|
|
1451
|
+
children: strings.menuRename
|
|
1452
|
+
}
|
|
1453
|
+
),
|
|
1454
|
+
hostItems,
|
|
1455
|
+
/* @__PURE__ */ jsx(PluginMenuItems, { items: pluginItems }),
|
|
1456
|
+
movable ? /* @__PURE__ */ jsx(
|
|
1457
|
+
Menu.Item,
|
|
1458
|
+
{
|
|
1459
|
+
fz: "xs",
|
|
1460
|
+
leftSection: /* @__PURE__ */ jsx(Glyph, { name: "action-move", size: iconSizes.sm }),
|
|
1461
|
+
onClick: row.moveOnMap,
|
|
1462
|
+
children: strings.menuMove
|
|
1463
|
+
}
|
|
1464
|
+
) : null,
|
|
1465
|
+
/* @__PURE__ */ jsx(Menu.Divider, {}),
|
|
1466
|
+
/* @__PURE__ */ jsx(
|
|
1467
|
+
Menu.Item,
|
|
1468
|
+
{
|
|
1469
|
+
color: "red",
|
|
1470
|
+
fz: "xs",
|
|
1471
|
+
leftSection: /* @__PURE__ */ jsx(Glyph, { name: "action-delete", size: iconSizes.sm }),
|
|
1472
|
+
onClick: row.actions.remove,
|
|
1473
|
+
children: strings.menuDelete
|
|
1474
|
+
}
|
|
1475
|
+
)
|
|
1476
|
+
] });
|
|
1477
|
+
return /* @__PURE__ */ jsx(
|
|
1478
|
+
WaypointRowLayout,
|
|
1479
|
+
{
|
|
1480
|
+
details: /* @__PURE__ */ jsx(Text, { c: "dimmed", size: "xs", children: mode === "poi" ? strings.modePoi : strings.modePoint }),
|
|
1481
|
+
iconCircle,
|
|
1482
|
+
indicator: indicators,
|
|
1483
|
+
lockHint: row.lockHint,
|
|
1484
|
+
mapHovered: row.mapHovered,
|
|
1485
|
+
menuItems,
|
|
1486
|
+
name,
|
|
1487
|
+
onBodyClick: onBodyClick !== void 0 ? bodyAction : movable ? row.moveOnMap : void 0,
|
|
1488
|
+
onMouseEnter: row.onMouseEnter,
|
|
1489
|
+
onMouseLeave: row.onMouseLeave,
|
|
1490
|
+
onRename: readOnly ? void 0 : row.actions.rename,
|
|
1491
|
+
onStartRename,
|
|
1492
|
+
ref: layoutRef,
|
|
1493
|
+
rowRef: row.rowRef
|
|
1494
|
+
}
|
|
1495
|
+
);
|
|
1496
|
+
});
|
|
1497
|
+
|
|
1498
|
+
// src/itinerary/rules/shownFocus.ts
|
|
1499
|
+
var showsFocus = (element) => element?.matches(":focus-visible") ?? false;
|
|
1500
|
+
var SECTIONS13 = ["actions", "itineraryForm"];
|
|
1501
|
+
var CAPABILITIES = [
|
|
1502
|
+
{
|
|
1503
|
+
glyph: "routed",
|
|
1504
|
+
key: "routing",
|
|
1505
|
+
supported: (activity) => activity.capabilities.directions
|
|
1506
|
+
},
|
|
1507
|
+
{
|
|
1508
|
+
glyph: "action-draw",
|
|
1509
|
+
key: "freeline",
|
|
1510
|
+
supported: (activity) => activity.capabilities.linestring
|
|
1511
|
+
},
|
|
1512
|
+
{
|
|
1513
|
+
glyph: REACHABILITY_GLYPH,
|
|
1514
|
+
key: "zone",
|
|
1515
|
+
supported: (activity) => activity.capabilities.directions
|
|
1516
|
+
}
|
|
1517
|
+
];
|
|
1518
|
+
var supportedTint = { color: "var(--mantine-color-teal-6)" };
|
|
1519
|
+
var unavailableTint = { color: "var(--mantine-color-dimmed)" };
|
|
1520
|
+
var CapabilityMark = ({ hint, supported }) => /* @__PURE__ */ jsx("span", { className: "mtya-activity-guide-mark", children: supported ? /* @__PURE__ */ jsx(Glyph, { label: hint, name: "check", size: iconSizes.sm, style: supportedTint }) : /* @__PURE__ */ jsx(Glyph, { label: hint, name: "unavailable", size: iconSizes.sm, style: unavailableTint }) });
|
|
1521
|
+
var activityLine = (bank, slug) => bank[slug] ?? "";
|
|
1522
|
+
var nameControlStyle = { cursor: "inherit" };
|
|
1523
|
+
var ActivityGuideRow = memo(function ActivityGuideRow2({
|
|
1524
|
+
activity,
|
|
1525
|
+
name,
|
|
1526
|
+
selected
|
|
1527
|
+
}) {
|
|
1528
|
+
const words = useStudioScopedStrings(SECTIONS13);
|
|
1529
|
+
const detail = activityLine(words.itineraryForm.activityGuide.detail, activity.slug);
|
|
1530
|
+
const detailId = useId();
|
|
1531
|
+
const { hovered, ref } = useHover();
|
|
1532
|
+
const [focused, setFocused] = useState(false);
|
|
1533
|
+
return /* @__PURE__ */ jsx(
|
|
1534
|
+
Tooltip,
|
|
1535
|
+
{
|
|
1536
|
+
label: /* @__PURE__ */ jsxs(Stack, { gap: "xxs", children: [
|
|
1537
|
+
/* @__PURE__ */ jsx(Text, { fw: 600, size: "xs", children: name }),
|
|
1538
|
+
/* @__PURE__ */ jsx(Text, { c: "dimmed", size: "xs", children: detail })
|
|
1539
|
+
] }),
|
|
1540
|
+
opened: hovered || focused,
|
|
1541
|
+
position: "top",
|
|
1542
|
+
children: /* @__PURE__ */ jsxs("div", { className: "mtya-activity-guide-row", "data-selected": selected || void 0, ref, children: [
|
|
1543
|
+
/* @__PURE__ */ jsxs(
|
|
1544
|
+
UnstyledButton,
|
|
1545
|
+
{
|
|
1546
|
+
"aria-describedby": detailId,
|
|
1547
|
+
className: "mtya-activity-guide-name",
|
|
1548
|
+
onBlur: () => setFocused(false),
|
|
1549
|
+
onFocus: (event) => setFocused(showsFocus(event.currentTarget)),
|
|
1550
|
+
style: nameControlStyle,
|
|
1551
|
+
children: [
|
|
1552
|
+
/* @__PURE__ */ jsx(ActivityIcon, { size: "1.5rem", slug: activity.slug }),
|
|
1553
|
+
/* @__PURE__ */ jsx(Text, { fw: 500, size: "sm", children: name })
|
|
1554
|
+
]
|
|
1555
|
+
}
|
|
1556
|
+
),
|
|
1557
|
+
/* @__PURE__ */ jsx(VisuallyHidden, { id: detailId, children: detail }),
|
|
1558
|
+
/* @__PURE__ */ jsx(Text, { c: "dimmed", className: "mtya-activity-guide-description", size: "xs", children: activityLine(words.itineraryForm.activityGuide.activity, activity.slug) }),
|
|
1559
|
+
CAPABILITIES.map(({ key, supported }) => {
|
|
1560
|
+
const has = supported(activity);
|
|
1561
|
+
return /* @__PURE__ */ jsx(
|
|
1562
|
+
CapabilityMark,
|
|
1563
|
+
{
|
|
1564
|
+
hint: has ? words.itineraryForm.capability[key].supported : words.itineraryForm.capability[key].unsupported,
|
|
1565
|
+
supported: has
|
|
1566
|
+
},
|
|
1567
|
+
key
|
|
1568
|
+
);
|
|
1569
|
+
})
|
|
1570
|
+
] })
|
|
1571
|
+
}
|
|
1572
|
+
);
|
|
1573
|
+
});
|
|
1574
|
+
var ActivityGuideTable = ({
|
|
1575
|
+
categories,
|
|
1576
|
+
language,
|
|
1577
|
+
selectedActivityId
|
|
1578
|
+
}) => {
|
|
1579
|
+
const words = useStudioScopedStrings(SECTIONS13);
|
|
1580
|
+
const nameOf = (activity) => localizedName(activity, language);
|
|
1581
|
+
return /* @__PURE__ */ jsxs("div", { children: [
|
|
1582
|
+
/* @__PURE__ */ jsxs("div", { className: "mtya-activity-guide-head", children: [
|
|
1583
|
+
/* @__PURE__ */ jsx("span", {}),
|
|
1584
|
+
/* @__PURE__ */ jsx("span", {}),
|
|
1585
|
+
CAPABILITIES.map(({ glyph, key }) => /* @__PURE__ */ jsxs("div", { className: "mtya-activity-guide-head-mark", children: [
|
|
1586
|
+
/* @__PURE__ */ jsx(Glyph, { name: glyph, size: iconSizes.sm }),
|
|
1587
|
+
/* @__PURE__ */ jsx(Text, { className: "mtya-activity-guide-head-label", children: words.itineraryForm.capability[key].label }),
|
|
1588
|
+
/* @__PURE__ */ jsx(Text, { className: "mtya-activity-guide-head-gloss", children: words.itineraryForm.capability[key].gloss })
|
|
1589
|
+
] }, key))
|
|
1590
|
+
] }),
|
|
1591
|
+
/* @__PURE__ */ jsx("div", { className: "mtya-activity-guide-body", children: categories.map((category) => {
|
|
1592
|
+
if (category.children.length === 0) {
|
|
1593
|
+
return null;
|
|
1594
|
+
}
|
|
1595
|
+
return /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
1596
|
+
/* @__PURE__ */ jsx(Text, { className: "mtya-activity-guide-group", variant: "section-label", children: localizedName(category, language) }),
|
|
1597
|
+
category.children.map((activity) => /* @__PURE__ */ jsx(
|
|
1598
|
+
ActivityGuideRow,
|
|
1599
|
+
{
|
|
1600
|
+
activity,
|
|
1601
|
+
name: nameOf(activity),
|
|
1602
|
+
selected: activity.id === selectedActivityId
|
|
1603
|
+
},
|
|
1604
|
+
activity.id
|
|
1605
|
+
))
|
|
1606
|
+
] }, category.id);
|
|
1607
|
+
}) })
|
|
1608
|
+
] });
|
|
1609
|
+
};
|
|
1610
|
+
var ACTIVITY_GUIDE_WIDTH = "52.5rem";
|
|
1611
|
+
var ActivityGuideModal = ({
|
|
1612
|
+
categories,
|
|
1613
|
+
language,
|
|
1614
|
+
onClose,
|
|
1615
|
+
opened,
|
|
1616
|
+
selectedActivityId
|
|
1617
|
+
}) => {
|
|
1618
|
+
const words = useStudioScopedStrings(SECTIONS13);
|
|
1619
|
+
return /* @__PURE__ */ jsx(
|
|
1620
|
+
AppModal,
|
|
1621
|
+
{
|
|
1622
|
+
closeLabel: words.actions.close,
|
|
1623
|
+
description: words.itineraryForm.activityGuide.description,
|
|
1624
|
+
icon: /* @__PURE__ */ jsx(Glyph, { name: "guide", size: iconSizes.md }),
|
|
1625
|
+
onClose,
|
|
1626
|
+
opened,
|
|
1627
|
+
size: ACTIVITY_GUIDE_WIDTH,
|
|
1628
|
+
title: words.itineraryForm.activityGuide.title,
|
|
1629
|
+
children: /* @__PURE__ */ jsx(
|
|
1630
|
+
ActivityGuideTable,
|
|
1631
|
+
{
|
|
1632
|
+
categories,
|
|
1633
|
+
language,
|
|
1634
|
+
selectedActivityId
|
|
1635
|
+
}
|
|
1636
|
+
)
|
|
1637
|
+
}
|
|
1638
|
+
);
|
|
1639
|
+
};
|
|
1640
|
+
var ActivityGuideContext = createContext({
|
|
1641
|
+
open: () => {
|
|
1642
|
+
},
|
|
1643
|
+
openFor: () => {
|
|
1644
|
+
}
|
|
1645
|
+
});
|
|
1646
|
+
var useActivityGuide = () => use(ActivityGuideContext);
|
|
1647
|
+
var ActivityGuideProvider = ({ children }) => {
|
|
1648
|
+
const language = useMountayaLanguage();
|
|
1649
|
+
const [opened, { close, open: show }] = useDisclosure(false);
|
|
1650
|
+
const [stated, setStated] = useState(null);
|
|
1651
|
+
const categories = useStudioActivities();
|
|
1652
|
+
const itineraryActivityId = useUiStore((state) => state.activeItinerary?.activity_id ?? null);
|
|
1653
|
+
const draftActivityId = useUiStore(
|
|
1654
|
+
(state) => selectActiveDraftSession(state)?.draft?.activityId ?? null
|
|
1655
|
+
);
|
|
1656
|
+
const controls = useMemo(
|
|
1657
|
+
() => ({
|
|
1658
|
+
open: () => {
|
|
1659
|
+
setStated(null);
|
|
1660
|
+
show();
|
|
1661
|
+
},
|
|
1662
|
+
openFor: (activityId) => {
|
|
1663
|
+
setStated({ activityId });
|
|
1664
|
+
show();
|
|
1665
|
+
}
|
|
1666
|
+
}),
|
|
1667
|
+
[show]
|
|
1668
|
+
);
|
|
1669
|
+
return /* @__PURE__ */ jsxs(ActivityGuideContext, { value: controls, children: [
|
|
1670
|
+
children,
|
|
1671
|
+
/* @__PURE__ */ jsx(
|
|
1672
|
+
ActivityGuideModal,
|
|
1673
|
+
{
|
|
1674
|
+
categories,
|
|
1675
|
+
language,
|
|
1676
|
+
onClose: close,
|
|
1677
|
+
opened,
|
|
1678
|
+
selectedActivityId: stated === null ? itineraryActivityId ?? draftActivityId : stated.activityId
|
|
1679
|
+
}
|
|
1680
|
+
)
|
|
1681
|
+
] });
|
|
1682
|
+
};
|
|
1683
|
+
var SECTIONS14 = ["itineraryForm"];
|
|
1684
|
+
var ActivitySelect = ({
|
|
1685
|
+
capability,
|
|
1686
|
+
categories,
|
|
1687
|
+
language,
|
|
1688
|
+
locked,
|
|
1689
|
+
onChange,
|
|
1690
|
+
value
|
|
1691
|
+
}) => {
|
|
1692
|
+
const words = useStudioScopedStrings(SECTIONS14);
|
|
1693
|
+
const selectId = useId();
|
|
1694
|
+
const { openFor: openGuideFor } = useActivityGuide();
|
|
1695
|
+
const agentDriving = useAgentDriving();
|
|
1696
|
+
const data = useMemo(
|
|
1697
|
+
() => categories.map((category) => ({
|
|
1698
|
+
group: localizedName(category, language),
|
|
1699
|
+
items: category.children.filter((activity) => capability === void 0 || activity.capabilities[capability]).map((activity) => ({
|
|
1700
|
+
label: localizedName(activity, language),
|
|
1701
|
+
value: activity.id
|
|
1702
|
+
}))
|
|
1703
|
+
})).filter((group) => group.items.length > 0),
|
|
1704
|
+
[capability, categories, language]
|
|
1705
|
+
);
|
|
1706
|
+
const slugById = useMemo(() => {
|
|
1707
|
+
const map = /* @__PURE__ */ new Map();
|
|
1708
|
+
for (const category of categories) {
|
|
1709
|
+
for (const activity of category.children) {
|
|
1710
|
+
map.set(activity.id, activity.slug);
|
|
1711
|
+
}
|
|
1712
|
+
}
|
|
1713
|
+
return map;
|
|
1714
|
+
}, [categories]);
|
|
1715
|
+
const selectedSlug = value === null ? void 0 : slugById.get(value);
|
|
1716
|
+
return (
|
|
1717
|
+
// The Stack gap is the theme's own label-to-input gap, so this hand-composed label
|
|
1718
|
+
// row sits at the exact rhythm every other field's label does.
|
|
1719
|
+
/* @__PURE__ */ jsxs(Stack, { gap: INPUT_LABEL_MARGIN_BOTTOM, children: [
|
|
1720
|
+
/* @__PURE__ */ jsxs(Group, { align: "center", justify: "space-between", wrap: "nowrap", children: [
|
|
1721
|
+
/* @__PURE__ */ jsx(FieldLabel, { htmlFor: selectId, required: true, children: words.itineraryForm.activityLabel }),
|
|
1722
|
+
/* @__PURE__ */ jsx(
|
|
1723
|
+
Anchor,
|
|
1724
|
+
{
|
|
1725
|
+
c: agentDriving ? "dimmed" : void 0,
|
|
1726
|
+
component: "button",
|
|
1727
|
+
disabled: agentDriving,
|
|
1728
|
+
onClick: () => openGuideFor(value),
|
|
1729
|
+
size: "xs",
|
|
1730
|
+
type: "button",
|
|
1731
|
+
children: /* @__PURE__ */ jsxs(Group, { component: "span", gap: "xxs", wrap: "nowrap", children: [
|
|
1732
|
+
/* @__PURE__ */ jsx(Glyph, { name: "guide", size: iconSizes.xs }),
|
|
1733
|
+
words.itineraryForm.activityGuide.trigger
|
|
1734
|
+
] })
|
|
1735
|
+
}
|
|
1736
|
+
)
|
|
1737
|
+
] }),
|
|
1738
|
+
/* @__PURE__ */ jsx(
|
|
1739
|
+
Select,
|
|
1740
|
+
{
|
|
1741
|
+
allowDeselect: false,
|
|
1742
|
+
data,
|
|
1743
|
+
disabled: locked,
|
|
1744
|
+
id: selectId,
|
|
1745
|
+
leftSection: selectedSlug ? /* @__PURE__ */ jsx(ActivityIcon, { size: "1.5rem", slug: selectedSlug }) : void 0,
|
|
1746
|
+
onChange,
|
|
1747
|
+
placeholder: words.itineraryForm.activityPlaceholder,
|
|
1748
|
+
renderOption: ({ option }) => {
|
|
1749
|
+
const slug = slugById.get(option.value);
|
|
1750
|
+
if (!slug) {
|
|
1751
|
+
return /* @__PURE__ */ jsx(Text, { inherit: true, children: option.label });
|
|
1752
|
+
}
|
|
1753
|
+
return /* @__PURE__ */ jsxs(Group, { children: [
|
|
1754
|
+
/* @__PURE__ */ jsx(ActivityIcon, { size: "1.5rem", slug }),
|
|
1755
|
+
/* @__PURE__ */ jsx(Text, { inherit: true, children: option.label })
|
|
1756
|
+
] });
|
|
1757
|
+
},
|
|
1758
|
+
required: true,
|
|
1759
|
+
rightSection: locked ? /* @__PURE__ */ jsx(Tooltip, { label: words.itineraryForm.activityLocked, children: /* @__PURE__ */ jsx("span", { "aria-label": words.itineraryForm.activityLocked, role: "img", children: /* @__PURE__ */ jsx(Glyph, { name: "locked", size: iconSizes.xs }) }) }) : void 0,
|
|
1760
|
+
value
|
|
1761
|
+
}
|
|
1762
|
+
)
|
|
1763
|
+
] })
|
|
1764
|
+
);
|
|
1765
|
+
};
|
|
1766
|
+
|
|
1767
|
+
export { ActivityGuideProvider, ActivitySelect, AgentEntityIndicator, DisabledActionsButton, DisabledMenuItem, DraftSegmentRow, ImportRoutingGuideProvider, LockTooltip, PeerEntityIndicator, PersistedSegmentRow, PluginMenuItems, RenameInput, SegmentIcon, SegmentRow, SegmentRowBody, SidenavContentBody, SidenavContentFormBody, StudioFormStack, WaypointIconCircle, WaypointRow, reportVerbFailure, showsFocus, useActivityGuide, useImportRoutingGuide, usePeerLockLabel, usePeerLockLabels, verbFailureSentence };
|
|
1768
|
+
//# sourceMappingURL=chunk-XUBATJH6.js.map
|
|
1769
|
+
//# sourceMappingURL=chunk-XUBATJH6.js.map
|