@mountaya/elements 0.0.0-stage → 0.2.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 +273 -0
- package/LICENCE.fr.txt +280 -0
- package/LICENSE.txt +262 -0
- package/README.md +1510 -2
- package/THIRD-PARTY-NOTICES.txt +103 -0
- package/dist/agent/index.cjs +1211 -0
- package/dist/agent/index.cjs.map +1 -0
- package/dist/agent/index.d.cts +1966 -0
- package/dist/agent/index.d.ts +1966 -0
- package/dist/agent/index.js +1181 -0
- package/dist/agent/index.js.map +1 -0
- package/dist/camera/index.cjs +2512 -0
- package/dist/camera/index.cjs.map +1 -0
- package/dist/camera/index.d.cts +1723 -0
- package/dist/camera/index.d.ts +1723 -0
- package/dist/camera/index.js +2443 -0
- package/dist/camera/index.js.map +1 -0
- package/dist/chunk-5pTPpv4v.d.cts +897 -0
- package/dist/chunk-5pTPpv4v.d.ts +897 -0
- package/dist/chunk-6JzFMFHh.d.ts +119 -0
- package/dist/chunk-6qyuJVvt.d.ts +513 -0
- package/dist/chunk-9fp0lDic.cjs +583 -0
- package/dist/chunk-9fp0lDic.cjs.map +1 -0
- package/dist/chunk-A48H1rDg.d.cts +73 -0
- package/dist/chunk-A48H1rDg.d.ts +73 -0
- package/dist/chunk-B-m1AchR.cjs +57 -0
- package/dist/chunk-B-m1AchR.cjs.map +1 -0
- package/dist/chunk-B-qFTf04.d.ts +216 -0
- package/dist/chunk-B0YROiZh.d.cts +1475 -0
- package/dist/chunk-B14wgOvH.d.cts +68 -0
- package/dist/chunk-B19l3j9r.cjs +150 -0
- package/dist/chunk-B19l3j9r.cjs.map +1 -0
- package/dist/chunk-B2PtjVKg.cjs +86 -0
- package/dist/chunk-B2PtjVKg.cjs.map +1 -0
- package/dist/chunk-B56Oyb7W.cjs +70 -0
- package/dist/chunk-B56Oyb7W.cjs.map +1 -0
- package/dist/chunk-B5WGMQwK.cjs +113 -0
- package/dist/chunk-B5WGMQwK.cjs.map +1 -0
- package/dist/chunk-B98mKrdu.d.cts +302 -0
- package/dist/chunk-BB0PmqIM.d.cts +44 -0
- package/dist/chunk-BBikve0Z.cjs +269 -0
- package/dist/chunk-BBikve0Z.cjs.map +1 -0
- package/dist/chunk-BHeXmM0X.js +37 -0
- package/dist/chunk-BHeXmM0X.js.map +1 -0
- package/dist/chunk-BI8WZLpU.cjs +281 -0
- package/dist/chunk-BI8WZLpU.cjs.map +1 -0
- package/dist/chunk-BIEc_SkR.cjs +29 -0
- package/dist/chunk-BIEc_SkR.cjs.map +1 -0
- package/dist/chunk-BJ6L6_W9.cjs +553 -0
- package/dist/chunk-BJ6L6_W9.cjs.map +1 -0
- package/dist/chunk-BJ91UCbB.js +11 -0
- package/dist/chunk-BJ91UCbB.js.map +1 -0
- package/dist/chunk-BJEZWTKj.cjs +166 -0
- package/dist/chunk-BJEZWTKj.cjs.map +1 -0
- package/dist/chunk-BJz54mfg.cjs +10 -0
- package/dist/chunk-BJz54mfg.cjs.map +1 -0
- package/dist/chunk-BNX5LAfN.d.cts +912 -0
- package/dist/chunk-BP6KgA86.js +35 -0
- package/dist/chunk-BP6KgA86.js.map +1 -0
- package/dist/chunk-BRnjQq6K.d.cts +157 -0
- package/dist/chunk-BSiMEwPS.js +46 -0
- package/dist/chunk-BSiMEwPS.js.map +1 -0
- package/dist/chunk-BTPjDw_y.cjs +16 -0
- package/dist/chunk-BTPjDw_y.cjs.map +1 -0
- package/dist/chunk-BTUUABGI.js +17 -0
- package/dist/chunk-BTUUABGI.js.map +1 -0
- package/dist/chunk-BUeL9y7s.cjs +45 -0
- package/dist/chunk-BUeL9y7s.cjs.map +1 -0
- package/dist/chunk-BWMuCNc9.cjs +172 -0
- package/dist/chunk-BWMuCNc9.cjs.map +1 -0
- package/dist/chunk-BWjRfhpF.js +126 -0
- package/dist/chunk-BWjRfhpF.js.map +1 -0
- package/dist/chunk-BZ5KyZXI.d.ts +302 -0
- package/dist/chunk-B_4SVmvh.js +94 -0
- package/dist/chunk-B_4SVmvh.js.map +1 -0
- package/dist/chunk-BcTUuZQ3.js +95 -0
- package/dist/chunk-BcTUuZQ3.js.map +1 -0
- package/dist/chunk-BdkqSsJe.cjs +140 -0
- package/dist/chunk-BdkqSsJe.cjs.map +1 -0
- package/dist/chunk-BfktMVmI.js +70 -0
- package/dist/chunk-BfktMVmI.js.map +1 -0
- package/dist/chunk-BfzQb0EK.cjs +6 -0
- package/dist/chunk-BhWfT-22.d.cts +808 -0
- package/dist/chunk-BjJcqX5J.cjs +60 -0
- package/dist/chunk-BjJcqX5J.cjs.map +1 -0
- package/dist/chunk-Bk0L8g5J.d.cts +77 -0
- package/dist/chunk-Bk0L8g5J.d.ts +77 -0
- package/dist/chunk-Bl4_uVa6.cjs +11 -0
- package/dist/chunk-Bl4_uVa6.cjs.map +1 -0
- package/dist/chunk-BlKF4lrp.js +43 -0
- package/dist/chunk-BlKF4lrp.js.map +1 -0
- package/dist/chunk-Bm1FieGR.js +4 -0
- package/dist/chunk-Bm1FieGR.js.map +1 -0
- package/dist/chunk-Bn6ZbxkS.cjs +27 -0
- package/dist/chunk-BpN3hr6a.cjs +541 -0
- package/dist/chunk-BpN3hr6a.cjs.map +1 -0
- package/dist/chunk-Bq_WHTfd.d.cts +119 -0
- package/dist/chunk-Bqt4LBBz.cjs +648 -0
- package/dist/chunk-Bqt4LBBz.cjs.map +1 -0
- package/dist/chunk-Bqt97zwf.d.cts +54 -0
- package/dist/chunk-Bqt97zwf.d.ts +54 -0
- package/dist/chunk-BsBiN4w6.d.cts +245 -0
- package/dist/chunk-BvTpOUoC.cjs +207 -0
- package/dist/chunk-BvTpOUoC.cjs.map +1 -0
- package/dist/chunk-BwK6Hl3q.cjs +446 -0
- package/dist/chunk-BwK6Hl3q.cjs.map +1 -0
- package/dist/chunk-BxDQZDXR.d.cts +76 -0
- package/dist/chunk-BxDQZDXR.d.ts +76 -0
- package/dist/chunk-BxUio8kX.js +20 -0
- package/dist/chunk-BxUio8kX.js.map +1 -0
- package/dist/chunk-BxaocpFi.d.cts +1 -0
- package/dist/chunk-Bywi0K1N.js +36 -0
- package/dist/chunk-Bywi0K1N.js.map +1 -0
- package/dist/chunk-C-IlmkDl.js +59 -0
- package/dist/chunk-C-IlmkDl.js.map +1 -0
- package/dist/chunk-C5PtVewq.d.ts +389 -0
- package/dist/chunk-C5dpC7mQ.js +19 -0
- package/dist/chunk-C5dpC7mQ.js.map +1 -0
- package/dist/chunk-C5q1sgSa.js +46 -0
- package/dist/chunk-C5q1sgSa.js.map +1 -0
- package/dist/chunk-C6fU9G5I.cjs +221 -0
- package/dist/chunk-C6fU9G5I.cjs.map +1 -0
- package/dist/chunk-C71dpWUK.js +5 -0
- package/dist/chunk-C71dpWUK.js.map +1 -0
- package/dist/chunk-C82N1gQX.d.ts +1831 -0
- package/dist/chunk-C8HdaHpu.js +118 -0
- package/dist/chunk-C8HdaHpu.js.map +1 -0
- package/dist/chunk-C8ZGryck.js +236 -0
- package/dist/chunk-C8ZGryck.js.map +1 -0
- package/dist/chunk-C95NG0oD.cjs +43 -0
- package/dist/chunk-C95NG0oD.cjs.map +1 -0
- package/dist/chunk-C9aR8DXb.js +9 -0
- package/dist/chunk-C9aR8DXb.js.map +1 -0
- package/dist/chunk-CAUZnoCs.d.ts +525 -0
- package/dist/chunk-CBXWWuM9.cjs +82 -0
- package/dist/chunk-CBXWWuM9.cjs.map +1 -0
- package/dist/chunk-CC_Kquu7.d.cts +125 -0
- package/dist/chunk-CC_Kquu7.d.ts +125 -0
- package/dist/chunk-CCp85vXg.cjs +60 -0
- package/dist/chunk-CCp85vXg.cjs.map +1 -0
- package/dist/chunk-CEcB1_uK.js +39 -0
- package/dist/chunk-CEcB1_uK.js.map +1 -0
- package/dist/chunk-CFIo021l.d.cts +216 -0
- package/dist/chunk-CH_IZoJE.js +33 -0
- package/dist/chunk-CH_IZoJE.js.map +1 -0
- package/dist/chunk-CHrasH_g.cjs +25 -0
- package/dist/chunk-CHrasH_g.cjs.map +1 -0
- package/dist/chunk-CJVoSaAE.cjs +3 -0
- package/dist/chunk-CJp8nGcb.js +96 -0
- package/dist/chunk-CJp8nGcb.js.map +1 -0
- package/dist/chunk-CJwUtkOt.js +112 -0
- package/dist/chunk-CJwUtkOt.js.map +1 -0
- package/dist/chunk-CKhCOVIf.d.cts +751 -0
- package/dist/chunk-CKiVSRYg.js +50 -0
- package/dist/chunk-CKiVSRYg.js.map +1 -0
- package/dist/chunk-CKtd19eD.cjs +59 -0
- package/dist/chunk-CKtd19eD.cjs.map +1 -0
- package/dist/chunk-CL92KE3j.d.ts +3188 -0
- package/dist/chunk-CLqUlkAe.js +54 -0
- package/dist/chunk-CLqUlkAe.js.map +1 -0
- package/dist/chunk-CMG5OV0q.cjs +4741 -0
- package/dist/chunk-CMG5OV0q.cjs.map +1 -0
- package/dist/chunk-CN_TKSgm.js +10 -0
- package/dist/chunk-CN_TKSgm.js.map +1 -0
- package/dist/chunk-CNe6MtqV.cjs +29 -0
- package/dist/chunk-CNe6MtqV.cjs.map +1 -0
- package/dist/chunk-COQkDTC5.js +83 -0
- package/dist/chunk-COQkDTC5.js.map +1 -0
- package/dist/chunk-CPBl6K4M.cjs +168 -0
- package/dist/chunk-CPBl6K4M.cjs.map +1 -0
- package/dist/chunk-CPx0ZYFB.d.ts +3 -0
- package/dist/chunk-CQQhcP_C.d.ts +197 -0
- package/dist/chunk-CTNoajFh.d.cts +389 -0
- package/dist/chunk-CTd-qgJc.cjs +384 -0
- package/dist/chunk-CTd-qgJc.cjs.map +1 -0
- package/dist/chunk-CW80YYtU.cjs +1056 -0
- package/dist/chunk-CW80YYtU.cjs.map +1 -0
- package/dist/chunk-CWpqBgkF.d.cts +24 -0
- package/dist/chunk-CWpqBgkF.d.ts +24 -0
- package/dist/chunk-CXjRArgy.d.ts +3 -0
- package/dist/chunk-CXonfH3-.cjs +14 -0
- package/dist/chunk-CXonfH3-.cjs.map +1 -0
- package/dist/chunk-CYcouGXN.d.ts +825 -0
- package/dist/chunk-CZDAzEBw.cjs +1621 -0
- package/dist/chunk-CZDAzEBw.cjs.map +1 -0
- package/dist/chunk-C_fQFr70.d.cts +159 -0
- package/dist/chunk-C_fQFr70.d.ts +159 -0
- package/dist/chunk-CbOtHnnB.cjs +359 -0
- package/dist/chunk-CbOtHnnB.cjs.map +1 -0
- package/dist/chunk-CdA6ZMGk.d.cts +825 -0
- package/dist/chunk-Ce1_thm7.js +146 -0
- package/dist/chunk-Ce1_thm7.js.map +1 -0
- package/dist/chunk-CeD8Hw0j.d.cts +3188 -0
- package/dist/chunk-CeiTuMyt.d.cts +525 -0
- package/dist/chunk-Ch1OLzLi.js +1 -0
- package/dist/chunk-Cizu_j1N.cjs +87 -0
- package/dist/chunk-Cizu_j1N.cjs.map +1 -0
- package/dist/chunk-CjDe9z6A.d.cts +427 -0
- package/dist/chunk-Cl1etdlu.js +63 -0
- package/dist/chunk-Cl1etdlu.js.map +1 -0
- package/dist/chunk-CmoVJDoz.js +4 -0
- package/dist/chunk-CmoVJDoz.js.map +1 -0
- package/dist/chunk-CnLucxjG.cjs +197 -0
- package/dist/chunk-CnLucxjG.cjs.map +1 -0
- package/dist/chunk-CsWjBmdi.cjs +56 -0
- package/dist/chunk-CsWjBmdi.cjs.map +1 -0
- package/dist/chunk-CuseO5MZ.d.cts +3 -0
- package/dist/chunk-CvMHibbA.d.ts +427 -0
- package/dist/chunk-CwDeiN5U.js +870 -0
- package/dist/chunk-CwDeiN5U.js.map +1 -0
- package/dist/chunk-Cwdmx4tG.js +1 -0
- package/dist/chunk-D-4MxHTt.d.cts +105 -0
- package/dist/chunk-D-4MxHTt.d.ts +105 -0
- package/dist/chunk-D0LF-99V.js +1093 -0
- package/dist/chunk-D0LF-99V.js.map +1 -0
- package/dist/chunk-D1fe-0c_.js +367 -0
- package/dist/chunk-D1fe-0c_.js.map +1 -0
- package/dist/chunk-D21fEI6A.d.ts +1926 -0
- package/dist/chunk-D39gAxya.cjs +89 -0
- package/dist/chunk-D39gAxya.cjs.map +1 -0
- package/dist/chunk-D6KdIW5e.cjs +228 -0
- package/dist/chunk-D6KdIW5e.cjs.map +1 -0
- package/dist/chunk-D6qHYbgW.d.cts +36 -0
- package/dist/chunk-D89E-w70.d.ts +44 -0
- package/dist/chunk-D8bdTysL.js +552 -0
- package/dist/chunk-D8bdTysL.js.map +1 -0
- package/dist/chunk-D96QJT24.cjs +109 -0
- package/dist/chunk-D96QJT24.cjs.map +1 -0
- package/dist/chunk-DAmkQl-i.js +119 -0
- package/dist/chunk-DAmkQl-i.js.map +1 -0
- package/dist/chunk-DEfsb2lc.cjs +10 -0
- package/dist/chunk-DEfsb2lc.cjs.map +1 -0
- package/dist/chunk-DIFjT5-V.d.cts +66 -0
- package/dist/chunk-DJpUw8TN.d.ts +912 -0
- package/dist/chunk-DK6lm2IZ.cjs +11 -0
- package/dist/chunk-DK6lm2IZ.cjs.map +1 -0
- package/dist/chunk-DKqgr31j.cjs +61 -0
- package/dist/chunk-DKqgr31j.cjs.map +1 -0
- package/dist/chunk-DLZ0QYm9.js +37 -0
- package/dist/chunk-DLZ0QYm9.js.map +1 -0
- package/dist/chunk-DLjS0uaC.js +4 -0
- package/dist/chunk-DLjS0uaC.js.map +1 -0
- package/dist/chunk-DMokwmOV.cjs +49 -0
- package/dist/chunk-DMokwmOV.cjs.map +1 -0
- package/dist/chunk-DMvWgBZL.d.cts +1831 -0
- package/dist/chunk-DNfGfIF3.js +31 -0
- package/dist/chunk-DNfGfIF3.js.map +1 -0
- package/dist/chunk-DQbSRe8D.d.ts +245 -0
- package/dist/chunk-DSGkP8_y.js +45 -0
- package/dist/chunk-DSGkP8_y.js.map +1 -0
- package/dist/chunk-DTctvfSd.d.cts +197 -0
- package/dist/chunk-DWe7igyw.cjs +206 -0
- package/dist/chunk-DWe7igyw.cjs.map +1 -0
- package/dist/chunk-DWsMP5JR.d.ts +68 -0
- package/dist/chunk-DWsm3HIW.d.cts +120 -0
- package/dist/chunk-DWsm3HIW.d.ts +120 -0
- package/dist/chunk-DXABHjLa.cjs +3 -0
- package/dist/chunk-D_BeqSbc.cjs +42 -0
- package/dist/chunk-D_BeqSbc.cjs.map +1 -0
- package/dist/chunk-D_svQNdW.d.ts +66 -0
- package/dist/chunk-Dav4xWrp.js +330 -0
- package/dist/chunk-Dav4xWrp.js.map +1 -0
- package/dist/chunk-DbCPhepL.js +293 -0
- package/dist/chunk-DbCPhepL.js.map +1 -0
- package/dist/chunk-DcrTy-y2.cjs +43 -0
- package/dist/chunk-DcrTy-y2.cjs.map +1 -0
- package/dist/chunk-Ddv484ld.js +487 -0
- package/dist/chunk-Ddv484ld.js.map +1 -0
- package/dist/chunk-De0bjnhY.cjs +88 -0
- package/dist/chunk-De0bjnhY.cjs.map +1 -0
- package/dist/chunk-De2FmNPu.cjs +32 -0
- package/dist/chunk-De2FmNPu.cjs.map +1 -0
- package/dist/chunk-DeSjQXiI.d.ts +157 -0
- package/dist/chunk-Den0Ta6C.js +132 -0
- package/dist/chunk-Den0Ta6C.js.map +1 -0
- package/dist/chunk-DiDKEeEa.js +8 -0
- package/dist/chunk-DiDKEeEa.js.map +1 -0
- package/dist/chunk-Dj60k5PU.js +197 -0
- package/dist/chunk-Dj60k5PU.js.map +1 -0
- package/dist/chunk-DjnYQBCN.js +4705 -0
- package/dist/chunk-DjnYQBCN.js.map +1 -0
- package/dist/chunk-Dk9VKvyq.d.ts +1 -0
- package/dist/chunk-Dor1ERI9.cjs +85 -0
- package/dist/chunk-Dor1ERI9.cjs.map +1 -0
- package/dist/chunk-DpMouOoH.js +451 -0
- package/dist/chunk-DpMouOoH.js.map +1 -0
- package/dist/chunk-DposgdNL.cjs +52 -0
- package/dist/chunk-DposgdNL.cjs.map +1 -0
- package/dist/chunk-DqLTG_5Q.d.cts +3 -0
- package/dist/chunk-Dr5MCIpS.d.cts +63 -0
- package/dist/chunk-Dr5MCIpS.d.ts +63 -0
- package/dist/chunk-DrudttCC.cjs +4 -0
- package/dist/chunk-DsDYVJQC.js +173 -0
- package/dist/chunk-DsDYVJQC.js.map +1 -0
- package/dist/chunk-Dw8ur6FJ.js +27 -0
- package/dist/chunk-Dw8ur6FJ.js.map +1 -0
- package/dist/chunk-DwG6M_0v.js +64 -0
- package/dist/chunk-DwG6M_0v.js.map +1 -0
- package/dist/chunk-Dy9a5ibO.js +284 -0
- package/dist/chunk-Dy9a5ibO.js.map +1 -0
- package/dist/chunk-DyayZlQJ.js +157 -0
- package/dist/chunk-DyayZlQJ.js.map +1 -0
- package/dist/chunk-DyhJZC2i.js +126 -0
- package/dist/chunk-DyhJZC2i.js.map +1 -0
- package/dist/chunk-F9zBzmmG.cjs +45 -0
- package/dist/chunk-F9zBzmmG.cjs.map +1 -0
- package/dist/chunk-FyCYofv2.js +116 -0
- package/dist/chunk-FyCYofv2.js.map +1 -0
- package/dist/chunk-GHJRjAk2.js +1 -0
- package/dist/chunk-H14isiSf.d.ts +751 -0
- package/dist/chunk-HIJzXoN4.js +7 -0
- package/dist/chunk-HIJzXoN4.js.map +1 -0
- package/dist/chunk-Id_8kRtu.d.ts +36 -0
- package/dist/chunk-KN60yxBQ.js +5 -0
- package/dist/chunk-KN60yxBQ.js.map +1 -0
- package/dist/chunk-NM5yg6bh.cjs +82 -0
- package/dist/chunk-NM5yg6bh.cjs.map +1 -0
- package/dist/chunk-OXr3zJfM.cjs +119 -0
- package/dist/chunk-OXr3zJfM.cjs.map +1 -0
- package/dist/chunk-QGqgNC4z.d.ts +928 -0
- package/dist/chunk-QJBtJrZ0.js +36 -0
- package/dist/chunk-QJBtJrZ0.js.map +1 -0
- package/dist/chunk-QKWhxfPv.d.cts +361 -0
- package/dist/chunk-QKWhxfPv.d.ts +361 -0
- package/dist/chunk-QXW7b4Ev.d.cts +410 -0
- package/dist/chunk-RHZrxUrM.cjs +39 -0
- package/dist/chunk-RHZrxUrM.cjs.map +1 -0
- package/dist/chunk-RTxe2i66.js +91 -0
- package/dist/chunk-RTxe2i66.js.map +1 -0
- package/dist/chunk-RrKkJb6P.js +16 -0
- package/dist/chunk-RrKkJb6P.js.map +1 -0
- package/dist/chunk-VOJqpcnM.cjs +181 -0
- package/dist/chunk-VOJqpcnM.cjs.map +1 -0
- package/dist/chunk-VljGTrid.js +1 -0
- package/dist/chunk-X3UVwUEK.d.cts +513 -0
- package/dist/chunk-X9K2WChn.cjs +28 -0
- package/dist/chunk-X9K2WChn.cjs.map +1 -0
- package/dist/chunk-YrtOx6oy.js +251 -0
- package/dist/chunk-YrtOx6oy.js.map +1 -0
- package/dist/chunk-bY7ySujI.d.cts +928 -0
- package/dist/chunk-bYf1sBz5.d.cts +11 -0
- package/dist/chunk-bYf1sBz5.d.ts +11 -0
- package/dist/chunk-blfknWoM.d.cts +1926 -0
- package/dist/chunk-blqsohAb.js +113 -0
- package/dist/chunk-blqsohAb.js.map +1 -0
- package/dist/chunk-cDMCjodI.cjs +58 -0
- package/dist/chunk-cDMCjodI.cjs.map +1 -0
- package/dist/chunk-cWjE3qd6.cjs +10 -0
- package/dist/chunk-cWjE3qd6.cjs.map +1 -0
- package/dist/chunk-dfOgV3fu.js +26 -0
- package/dist/chunk-dfOgV3fu.js.map +1 -0
- package/dist/chunk-f9cTwUX1.cjs +125 -0
- package/dist/chunk-f9cTwUX1.cjs.map +1 -0
- package/dist/chunk-fHVYEZs4.cjs +28 -0
- package/dist/chunk-fHVYEZs4.cjs.map +1 -0
- package/dist/chunk-fWRUMgRI.js +22 -0
- package/dist/chunk-fWRUMgRI.js.map +1 -0
- package/dist/chunk-fozLXfHY.d.cts +55 -0
- package/dist/chunk-fozLXfHY.d.ts +55 -0
- package/dist/chunk-gWmB1l3A.cjs +3122 -0
- package/dist/chunk-gWmB1l3A.cjs.map +1 -0
- package/dist/chunk-gbj2R-_w.js +58 -0
- package/dist/chunk-gbj2R-_w.js.map +1 -0
- package/dist/chunk-iIWxsAXd.js +59 -0
- package/dist/chunk-iIWxsAXd.js.map +1 -0
- package/dist/chunk-lItIuOIS.cjs +137 -0
- package/dist/chunk-lItIuOIS.cjs.map +1 -0
- package/dist/chunk-m6Rh4PCe.cjs +798 -0
- package/dist/chunk-m6Rh4PCe.cjs.map +1 -0
- package/dist/chunk-o3IRANDf.cjs +99 -0
- package/dist/chunk-o3IRANDf.cjs.map +1 -0
- package/dist/chunk-obUcg3Sk.d.ts +808 -0
- package/dist/chunk-ohsf-6Rn.js +600 -0
- package/dist/chunk-ohsf-6Rn.js.map +1 -0
- package/dist/chunk-pBleU6Nv.js +3061 -0
- package/dist/chunk-pBleU6Nv.js.map +1 -0
- package/dist/chunk-px4e99cy.js +71 -0
- package/dist/chunk-px4e99cy.js.map +1 -0
- package/dist/chunk-qwYDLeXc.cjs +99 -0
- package/dist/chunk-qwYDLeXc.cjs.map +1 -0
- package/dist/chunk-rF_859Qk.cjs +101 -0
- package/dist/chunk-rF_859Qk.cjs.map +1 -0
- package/dist/chunk-rLJkqJ5j.d.ts +1475 -0
- package/dist/chunk-twQItIRg.cjs +338 -0
- package/dist/chunk-twQItIRg.cjs.map +1 -0
- package/dist/chunk-vnPrMVjY.js +10 -0
- package/dist/chunk-vnPrMVjY.js.map +1 -0
- package/dist/chunk-ws3bVwaS.d.ts +410 -0
- package/dist/chunk-xh3UkuVs.cjs +246 -0
- package/dist/chunk-xh3UkuVs.cjs.map +1 -0
- package/dist/chunk-yMzRr26E.js +153 -0
- package/dist/chunk-yMzRr26E.js.map +1 -0
- package/dist/collab/index.cjs +831 -0
- package/dist/collab/index.cjs.map +1 -0
- package/dist/collab/index.d.cts +824 -0
- package/dist/collab/index.d.ts +824 -0
- package/dist/collab/index.js +819 -0
- package/dist/collab/index.js.map +1 -0
- package/dist/data/index.cjs +39 -0
- package/dist/data/index.d.cts +6 -0
- package/dist/data/index.d.ts +6 -0
- package/dist/data/index.js +7 -0
- package/dist/editor/index.cjs +2713 -0
- package/dist/editor/index.cjs.map +1 -0
- package/dist/editor/index.d.cts +10 -0
- package/dist/editor/index.d.ts +10 -0
- package/dist/editor/index.js +2702 -0
- package/dist/editor/index.js.map +1 -0
- package/dist/errors/index.cjs +11 -0
- package/dist/errors/index.d.cts +2 -0
- package/dist/errors/index.d.ts +2 -0
- package/dist/errors/index.js +1 -0
- package/dist/geo/index.cjs +68 -0
- package/dist/geo/index.d.cts +6 -0
- package/dist/geo/index.d.ts +6 -0
- package/dist/geo/index.js +11 -0
- package/dist/i18n/fr/index.cjs +333 -0
- package/dist/i18n/fr/index.cjs.map +1 -0
- package/dist/i18n/fr/index.d.cts +18 -0
- package/dist/i18n/fr/index.d.ts +18 -0
- package/dist/i18n/fr/index.js +328 -0
- package/dist/i18n/fr/index.js.map +1 -0
- package/dist/i18n/index.cjs +451 -0
- package/dist/i18n/index.cjs.map +1 -0
- package/dist/i18n/index.d.cts +268 -0
- package/dist/i18n/index.d.ts +268 -0
- package/dist/i18n/index.js +430 -0
- package/dist/i18n/index.js.map +1 -0
- package/dist/icons/index.cjs +37 -0
- package/dist/icons/index.d.cts +4 -0
- package/dist/icons/index.d.ts +4 -0
- package/dist/icons/index.js +8 -0
- package/dist/index.cjs +517 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +174 -0
- package/dist/index.d.ts +174 -0
- package/dist/index.js +54 -0
- package/dist/index.js.map +1 -0
- package/dist/layers/index.cjs +83 -0
- package/dist/layers/index.d.cts +3 -0
- package/dist/layers/index.d.ts +3 -0
- package/dist/layers/index.js +5 -0
- package/dist/map-client/index.cjs +5 -0
- package/dist/map-client/index.d.cts +6 -0
- package/dist/map-client/index.d.ts +6 -0
- package/dist/map-client/index.js +0 -0
- package/dist/maplibre-worker.mjs +12 -0
- package/dist/navigation/index.cjs +612 -0
- package/dist/navigation/index.cjs.map +1 -0
- package/dist/navigation/index.d.cts +551 -0
- package/dist/navigation/index.d.ts +551 -0
- package/dist/navigation/index.js +599 -0
- package/dist/navigation/index.js.map +1 -0
- package/dist/profile/index.cjs +177 -0
- package/dist/profile/index.d.cts +8 -0
- package/dist/profile/index.d.ts +8 -0
- package/dist/profile/index.js +10 -0
- package/dist/seams/index.cjs +15 -0
- package/dist/seams/index.d.cts +4 -0
- package/dist/seams/index.d.ts +4 -0
- package/dist/seams/index.js +4 -0
- package/dist/search/index.cjs +39 -0
- package/dist/search/index.d.cts +6 -0
- package/dist/search/index.d.ts +6 -0
- package/dist/search/index.js +3 -0
- package/dist/style/index.cjs +34 -0
- package/dist/style/index.d.cts +5 -0
- package/dist/style/index.d.ts +5 -0
- package/dist/style/index.js +5 -0
- package/dist/styles.css +11 -0
- package/dist/testing/index.cjs +444 -0
- package/dist/testing/index.cjs.map +1 -0
- package/dist/testing/index.d.cts +217 -0
- package/dist/testing/index.d.ts +217 -0
- package/dist/testing/index.js +435 -0
- package/dist/testing/index.js.map +1 -0
- package/dist/timezone/index.cjs +1953 -0
- package/dist/timezone/index.cjs.map +1 -0
- package/dist/timezone/index.d.cts +28 -0
- package/dist/timezone/index.d.ts +28 -0
- package/dist/timezone/index.js +1948 -0
- package/dist/timezone/index.js.map +1 -0
- package/dist/units/index.cjs +29 -0
- package/dist/units/index.d.cts +3 -0
- package/dist/units/index.d.ts +3 -0
- package/dist/units/index.js +3 -0
- package/dist/video/index.cjs +1713 -0
- package/dist/video/index.cjs.map +1 -0
- package/dist/video/index.d.cts +846 -0
- package/dist/video/index.d.ts +846 -0
- package/dist/video/index.js +1689 -0
- package/dist/video/index.js.map +1 -0
- package/dist/view/index.cjs +7 -0
- package/dist/view/index.d.cts +3 -0
- package/dist/view/index.d.ts +3 -0
- package/dist/view/index.js +1 -0
- package/package.json +433 -4
- package/src/agent/engines/session.ts +2255 -0
- package/src/agent/index.ts +109 -0
- package/src/agent/rules/agentError.ts +128 -0
- package/src/agent/rules/boundedInputJson.ts +53 -0
- package/src/agent/rules/conversation.ts +629 -0
- package/src/agent/rules/conversationFaults.ts +349 -0
- package/src/agent/rules/conversationHost.ts +390 -0
- package/src/agent/rules/dispatcher.ts +102 -0
- package/src/agent/rules/errorCodes.ts +78 -0
- package/src/agent/rules/errorStatus.ts +65 -0
- package/src/agent/rules/scriptedTransport.ts +390 -0
- package/src/agent/rules/stickToBottom.ts +38 -0
- package/src/agent/rules/toolResultPayload.ts +197 -0
- package/src/auth/rules/clientHeader.ts +22 -0
- package/src/auth/rules/sentCredential.ts +76 -0
- package/src/auth/rules/transformRequest.ts +803 -0
- package/src/camera/engines/videoFlight.ts +1758 -0
- package/src/camera/index.ts +157 -0
- package/src/camera/rules/clearance.ts +1099 -0
- package/src/camera/rules/fit.ts +132 -0
- package/src/camera/rules/modes.ts +1019 -0
- package/src/camera/rules/plan.ts +478 -0
- package/src/camera/rules/planner.ts +129 -0
- package/src/camera/rules/poseRanges.ts +38 -0
- package/src/camera/rules/presets.ts +185 -0
- package/src/camera/rules/profileSamples.ts +243 -0
- package/src/camera/rules/route.ts +596 -0
- package/src/camera/rules/routeContent.ts +105 -0
- package/src/camera/rules/spline.ts +765 -0
- package/src/camera/rules/sweptViewports.ts +39 -0
- package/src/camera/rules/track.ts +1412 -0
- package/src/camera/rules/vocabulary.ts +130 -0
- package/src/camera/rules/zoom.ts +216 -0
- package/src/collab/engines/session.ts +1902 -0
- package/src/collab/engines/trailingThrottle.ts +151 -0
- package/src/collab/index.ts +52 -0
- package/src/collab/rules/dispatch.ts +143 -0
- package/src/collab/rules/peerNames.ts +51 -0
- package/src/collab/rules/scriptedTransport.ts +244 -0
- package/src/compose/engines/baseMapSwitch.ts +1136 -0
- package/src/compose/engines/events.ts +962 -0
- package/src/compose/engines/mountayaMap.ts +5648 -0
- package/src/compose/engines/sentCredentials.ts +146 -0
- package/src/compose/engines/slotRequests.ts +413 -0
- package/src/compose/rules/accessRefusal.ts +109 -0
- package/src/compose/rules/accessStanding.ts +75 -0
- package/src/compose/rules/analysisKinds.ts +331 -0
- package/src/compose/rules/analysisLayers.ts +176 -0
- package/src/compose/rules/cameraMoves.ts +38 -0
- package/src/compose/rules/carriedLayers.ts +87 -0
- package/src/compose/rules/developmentWarnings.ts +167 -0
- package/src/compose/rules/fitBox.ts +67 -0
- package/src/compose/rules/fitCamera.ts +54 -0
- package/src/compose/rules/geoJsonSlot.ts +61 -0
- package/src/compose/rules/geometrySlots.ts +155 -0
- package/src/compose/rules/glyphNode.ts +62 -0
- package/src/compose/rules/layerKeys.ts +92 -0
- package/src/compose/rules/layerOrder.ts +85 -0
- package/src/compose/rules/layersManifest.ts +26 -0
- package/src/compose/rules/mapOptions.ts +300 -0
- package/src/compose/rules/maplibreWorkerVersion.gen.ts +8 -0
- package/src/compose/rules/markerPin.ts +122 -0
- package/src/compose/rules/markerRegistry.ts +85 -0
- package/src/compose/rules/markerSprite.ts +382 -0
- package/src/compose/rules/maxBounds.ts +120 -0
- package/src/compose/rules/overlayLookup.ts +49 -0
- package/src/compose/rules/paintDiff.ts +38 -0
- package/src/compose/rules/panLock.ts +77 -0
- package/src/compose/rules/patch.ts +124 -0
- package/src/compose/rules/queriedFeature.ts +55 -0
- package/src/compose/rules/queryLayers.ts +46 -0
- package/src/compose/rules/searchHighlight.ts +313 -0
- package/src/compose/rules/slotNames.ts +19 -0
- package/src/compose/rules/stripeImage.ts +253 -0
- package/src/compose/rules/swapMarker.ts +66 -0
- package/src/compose/rules/terrainVariant.ts +88 -0
- package/src/compose/rules/types.ts +559 -0
- package/src/compose/rules/urlHash.ts +19 -0
- package/src/compose/rules/viewOptions.ts +451 -0
- package/src/compose/rules/workerUrl.ts +131 -0
- package/src/data/engines/itineraryResource.ts +643 -0
- package/src/data/index.ts +78 -0
- package/src/data/rules/adapt.ts +473 -0
- package/src/data/rules/editModes.ts +51 -0
- package/src/data/rules/itinerary.ts +168 -0
- package/src/data/rules/nullable.ts +63 -0
- package/src/data/rules/roadAccess.ts +169 -0
- package/src/data/rules/segmentGroups.ts +309 -0
- package/src/data/rules/selectors.ts +95 -0
- package/src/data/rules/zones.ts +79 -0
- package/src/draw/engines/boundaryEngine.ts +1003 -0
- package/src/draw/engines/framedAdapter.ts +198 -0
- package/src/draw/engines/pointerCursor.ts +205 -0
- package/src/draw/engines/segmentEngine.ts +1405 -0
- package/src/draw/engines/snapIndex.ts +254 -0
- package/src/draw/engines/waypointEngine.ts +574 -0
- package/src/draw/engines/zoneEngine.ts +1137 -0
- package/src/draw/rules/drawFrame.ts +123 -0
- package/src/draw/rules/insertVertex.ts +226 -0
- package/src/draw/rules/screenSpace.ts +62 -0
- package/src/draw/rules/seeds.ts +185 -0
- package/src/draw/rules/snap.ts +115 -0
- package/src/draw/rules/snapCameraKey.ts +50 -0
- package/src/draw/rules/terraDrawShared.ts +214 -0
- package/src/draw/rules/zoneOutline.ts +213 -0
- package/src/editing/engines/cursor.ts +505 -0
- package/src/editing/engines/draftMarker.ts +149 -0
- package/src/editing/rules/accent.ts +11 -0
- package/src/editing/rules/engine.ts +288 -0
- package/src/editing/rules/placement.ts +22 -0
- package/src/editing/rules/positions.ts +89 -0
- package/src/editing/rules/sources.ts +9 -0
- package/src/editing/rules/types.ts +457 -0
- package/src/editing/rules/vocabulary.ts +10 -0
- package/src/editing/rules/waypointCursor.ts +228 -0
- package/src/editor/engines/directionArrows.ts +459 -0
- package/src/editor/engines/directions.ts +1383 -0
- package/src/editor/engines/editorClient.ts +134 -0
- package/src/editor/engines/eventScope.ts +59 -0
- package/src/editor/engines/frameLoop.ts +159 -0
- package/src/editor/engines/itineraryPreview.ts +272 -0
- package/src/editor/engines/mapLockGuard.ts +66 -0
- package/src/editor/engines/overlayRenderer.ts +2696 -0
- package/src/editor/engines/peerDraft.ts +760 -0
- package/src/editor/engines/poiPick.ts +305 -0
- package/src/editor/engines/pointPick.ts +84 -0
- package/src/editor/engines/roadAccessLine.ts +140 -0
- package/src/editor/engines/searchHighlight.ts +183 -0
- package/src/editor/engines/viewClient.ts +4091 -0
- package/src/editor/engines/zoneBadges.ts +503 -0
- package/src/editor/index.ts +97 -0
- package/src/editor/rules/accentColor.ts +116 -0
- package/src/editor/rules/camera.ts +121 -0
- package/src/editor/rules/contract.ts +120 -0
- package/src/editor/rules/icons.ts +825 -0
- package/src/editor/rules/markerElements.ts +244 -0
- package/src/editor/rules/style.ts +51 -0
- package/src/editor/rules/terrain.ts +98 -0
- package/src/editor/rules/tileWarm.ts +191 -0
- package/src/editor/rules/tilesReload.ts +158 -0
- package/src/editor/rules/zoneBadgePlacement.ts +1832 -0
- package/src/editor/rules/zoneTimeStyling.ts +119 -0
- package/src/errors/index.ts +25 -0
- package/src/errors/rules/errors.ts +158 -0
- package/src/errors/rules/print.ts +129 -0
- package/src/geo/index.ts +89 -0
- package/src/geo/rules/boundaries.ts +105 -0
- package/src/geo/rules/camera.ts +496 -0
- package/src/geo/rules/corridor.ts +242 -0
- package/src/geo/rules/elevationTiles.ts +269 -0
- package/src/geo/rules/formatLngLat.ts +63 -0
- package/src/geo/rules/geodesy.ts +125 -0
- package/src/geo/rules/geometry.ts +362 -0
- package/src/geo/rules/lineWalk.ts +77 -0
- package/src/geo/rules/longitude.ts +99 -0
- package/src/geo/rules/searchLimits.ts +22 -0
- package/src/geo/rules/segmentGeometry.ts +80 -0
- package/src/geo/rules/terrain.ts +107 -0
- package/src/geo/rules/tuples.ts +124 -0
- package/src/geo/rules/types.ts +54 -0
- package/src/geo/rules/webMercator.ts +57 -0
- package/src/i18n/fr/index.ts +17 -0
- package/src/i18n/fr/rules/fr.ts +85 -0
- package/src/i18n/fr/rules/words.gen.ts +277 -0
- package/src/i18n/index.ts +82 -0
- package/src/i18n/rules/bundle.ts +378 -0
- package/src/i18n/rules/config.ts +71 -0
- package/src/i18n/rules/dates.ts +165 -0
- package/src/i18n/rules/endonyms.gen.ts +19 -0
- package/src/i18n/rules/language.ts +92 -0
- package/src/i18n/rules/localizedName.ts +33 -0
- package/src/i18n/rules/merge.ts +106 -0
- package/src/i18n/rules/scope.ts +127 -0
- package/src/i18n/rules/strings.ts +632 -0
- package/src/i18n/rules/videoOverlay.ts +121 -0
- package/src/i18n/rules/wordForms.ts +95 -0
- package/src/i18n/rules/words.gen.ts +277 -0
- package/src/icons/index.ts +54 -0
- package/src/icons/rules/activities.ts +40 -0
- package/src/icons/rules/amenities.ts +250 -0
- package/src/icons/rules/artwork.gen.ts +83 -0
- package/src/icons/rules/artwork.ts +47 -0
- package/src/icons/rules/fallback.ts +21 -0
- package/src/icons/rules/lucideMarkers.gen.ts +112 -0
- package/src/icons/rules/lucideUi.gen.ts +197 -0
- package/src/icons/rules/paint.ts +107 -0
- package/src/icons/rules/parse.ts +475 -0
- package/src/icons/rules/provider.ts +373 -0
- package/src/icons/rules/sprites.ts +54 -0
- package/src/icons/rules/ui.ts +348 -0
- package/src/icons/rules/waypoints.ts +215 -0
- package/src/index.ts +993 -0
- package/src/layers/engines/layersSelection.ts +515 -0
- package/src/layers/engines/readoutEngine.ts +131 -0
- package/src/layers/index.ts +151 -0
- package/src/layers/rules/analysis.ts +135 -0
- package/src/layers/rules/enrichment.ts +30 -0
- package/src/layers/rules/geoJson.ts +270 -0
- package/src/layers/rules/hover.ts +67 -0
- package/src/layers/rules/itineraries.ts +182 -0
- package/src/layers/rules/layersPanel.ts +237 -0
- package/src/layers/rules/order.ts +194 -0
- package/src/layers/rules/overlayInstant.ts +49 -0
- package/src/layers/rules/overlays.ts +52 -0
- package/src/layers/rules/poiPanel.ts +119 -0
- package/src/layers/rules/pois.ts +114 -0
- package/src/layers/rules/readout.ts +340 -0
- package/src/layers/rules/streetView.ts +16 -0
- package/src/layers/rules/tileTimestamp.ts +146 -0
- package/src/layers/rules/timeSlider.ts +192 -0
- package/src/layers/rules/timeWindow.ts +123 -0
- package/src/layers/rules/zones.ts +43 -0
- package/src/layers/rules/zoom.ts +77 -0
- package/src/map-client/index.ts +71 -0
- package/src/map-client/rules/mapClient.ts +1945 -0
- package/src/navigation/engines/navigation.ts +493 -0
- package/src/navigation/index.ts +51 -0
- package/src/navigation/rules/followedRoute.ts +78 -0
- package/src/navigation/rules/instructions.ts +89 -0
- package/src/navigation/rules/itineraryRoute.ts +232 -0
- package/src/navigation/rules/offRoute.ts +41 -0
- package/src/navigation/rules/progress.ts +230 -0
- package/src/navigation/rules/prompts.ts +217 -0
- package/src/navigation/rules/routeRequest.ts +98 -0
- package/src/navigation/rules/status.ts +142 -0
- package/src/navigation/rules/steps.ts +234 -0
- package/src/navigation/rules/types.ts +83 -0
- package/src/profile/index.ts +307 -0
- package/src/profile/rules/amenityBadge.ts +35 -0
- package/src/profile/rules/amenityFilter.ts +74 -0
- package/src/profile/rules/amenityStacks.ts +66 -0
- package/src/profile/rules/axis.ts +89 -0
- package/src/profile/rules/axisCulling.ts +83 -0
- package/src/profile/rules/axisLookup.ts +180 -0
- package/src/profile/rules/climbs.ts +292 -0
- package/src/profile/rules/cursorMarker.ts +122 -0
- package/src/profile/rules/cursorReadout.ts +104 -0
- package/src/profile/rules/curvePlacement.ts +216 -0
- package/src/profile/rules/dock.ts +293 -0
- package/src/profile/rules/elevation.ts +1263 -0
- package/src/profile/rules/instant.ts +89 -0
- package/src/profile/rules/intl.ts +237 -0
- package/src/profile/rules/legEmphasis.ts +53 -0
- package/src/profile/rules/profileColors.ts +66 -0
- package/src/profile/rules/profileLayout.ts +59 -0
- package/src/profile/rules/profileSlices.ts +55 -0
- package/src/profile/rules/routeProfile.ts +475 -0
- package/src/profile/rules/rowMatch.ts +50 -0
- package/src/profile/rules/scale.ts +646 -0
- package/src/profile/rules/scaleFrame.ts +171 -0
- package/src/profile/rules/sectionChips.ts +83 -0
- package/src/profile/rules/sections.ts +923 -0
- package/src/profile/rules/slopeRamp.ts +160 -0
- package/src/profile/rules/statStrip.ts +103 -0
- package/src/profile/rules/steepness.ts +51 -0
- package/src/profile/rules/tableCells.ts +269 -0
- package/src/profile/rules/tableCursor.ts +87 -0
- package/src/profile/rules/unitPatterns.ts +335 -0
- package/src/profile/rules/units.ts +1025 -0
- package/src/profile/rules/waypointCard.ts +590 -0
- package/src/profile/rules/webAddress.ts +130 -0
- package/src/profile/rules/windowSpans.ts +65 -0
- package/src/rules/asciiFold.ts +17 -0
- package/src/rules/inDevelopment.ts +54 -0
- package/src/rules/listeners.ts +62 -0
- package/src/rules/timers.ts +9 -0
- package/src/rules/types.ts +22 -0
- package/src/rules/uuid.ts +87 -0
- package/src/seams/engines/geolocateControl.ts +286 -0
- package/src/seams/index.ts +50 -0
- package/src/seams/rules/clock.ts +169 -0
- package/src/seams/rules/geolocation.ts +165 -0
- package/src/seams/rules/segmentRoute.ts +187 -0
- package/src/search/engines/search.ts +1093 -0
- package/src/search/index.ts +99 -0
- package/src/search/rules/describe.ts +383 -0
- package/src/search/rules/filters.ts +195 -0
- package/src/search/rules/highlight.ts +270 -0
- package/src/search/rules/pick.ts +90 -0
- package/src/search/rules/rows.ts +258 -0
- package/src/search/rules/searchFocus.ts +27 -0
- package/src/search/rules/searchViewport.ts +44 -0
- package/src/search/rules/shown.ts +77 -0
- package/src/search/rules/types.ts +340 -0
- package/src/stream/rules/reconnectSchedule.ts +83 -0
- package/src/style/engines/organizationRead.ts +80 -0
- package/src/style/index.ts +63 -0
- package/src/style/rules/apply.ts +268 -0
- package/src/style/rules/attribution.ts +119 -0
- package/src/style/rules/itineraryLine.ts +142 -0
- package/src/style/rules/language.ts +668 -0
- package/src/style/rules/layout.gen.ts +27 -0
- package/src/style/rules/organization.ts +96 -0
- package/src/style/rules/paint.ts +143 -0
- package/src/style/rules/panelLayout.ts +51 -0
- package/src/style/rules/roadAccessColors.ts +29 -0
- package/src/style/rules/roadAccessLine.ts +267 -0
- package/src/style/rules/segmentColors.ts +207 -0
- package/src/testing/catalogs.ts +103 -0
- package/src/testing/index.ts +30 -0
- package/src/testing/mapClient.ts +241 -0
- package/src/testing/mountayaMap.ts +741 -0
- package/src/timezone/index.ts +14 -0
- package/src/timezone/rules/viewport.ts +875 -0
- package/src/units/index.ts +55 -0
- package/src/units/rules/conversions.ts +620 -0
- package/src/units/rules/preferenceChoices.ts +124 -0
- package/src/units/rules/preferences.ts +77 -0
- package/src/units/rules/rounding.ts +69 -0
- package/src/video/engines/videoRun.ts +654 -0
- package/src/video/engines/viewClient.ts +6 -0
- package/src/video/index.ts +83 -0
- package/src/video/profileOverlay/rules/contract.ts +210 -0
- package/src/video/profileOverlay/rules/curve.ts +216 -0
- package/src/video/profileOverlay/rules/draw.ts +410 -0
- package/src/video/profileOverlay/rules/fonts.ts +54 -0
- package/src/video/profileOverlay/rules/graphDesign.ts +690 -0
- package/src/video/profileOverlay/rules/minimalDesign.ts +144 -0
- package/src/video/profileOverlay/rules/registry.ts +23 -0
- package/src/video/profileOverlay/rules/staticLayer.ts +582 -0
- package/src/video/profileOverlay/rules/stripDesign.ts +327 -0
- package/src/video/profileOverlay/rules/types.ts +78 -0
- package/src/video/rules/videoConstants.ts +250 -0
- package/src/video/rules/videoEncoder.ts +277 -0
- package/src/video/rules/videoFrames.ts +99 -0
- package/src/video/rules/videoPreview.ts +185 -0
- package/src/video/rules/videoRecorder.ts +746 -0
- package/src/video/rules/videoWatermark.ts +155 -0
- package/src/video/rules/watermarkMark.ts +40 -0
- package/src/view/engines/viewClient.ts +6 -0
- package/src/view/index.ts +20 -0
|
@@ -0,0 +1,596 @@
|
|
|
1
|
+
import type { LngLat } from "../../geo/rules/types.js";
|
|
2
|
+
|
|
3
|
+
export { cumulativeMeters, routeLengthMeters } from "../../geo/rules/geodesy.js";
|
|
4
|
+
export type { LngLat } from "../../geo/rules/types.js";
|
|
5
|
+
|
|
6
|
+
import type { ItineraryWithDetails } from "../../data/rules/itinerary.js";
|
|
7
|
+
import { segmentsForSelection } from "../../data/rules/selectors.js";
|
|
8
|
+
// The length of a line is declared beside the sphere it is measured on, and published here as
|
|
9
|
+
// well, beside the fraction lookups that read it.
|
|
10
|
+
import { cumulativeMeters } from "../../geo/rules/geodesy.js";
|
|
11
|
+
// The rules module rather than the `./geo` barrel: a barrel import inside one package reaches
|
|
12
|
+
// every module it names, and the bundler chunks by which entries reach what.
|
|
13
|
+
import { extractLines } from "../../geo/rules/geometry.js";
|
|
14
|
+
import { namesPlace } from "../../geo/rules/lineWalk.js";
|
|
15
|
+
import { LONGITUDE_LIMIT, longitudeDelta } from "../../geo/rules/longitude.js";
|
|
16
|
+
import {
|
|
17
|
+
convertSlope,
|
|
18
|
+
DEGREES_PER_TURN,
|
|
19
|
+
DEGREES_TO_RADIANS,
|
|
20
|
+
RADIANS_TO_DEGREES,
|
|
21
|
+
} from "../../units/rules/conversions.js";
|
|
22
|
+
import type { RouteGeometry } from "./plan.js";
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* RouteCursor is a sampled position along an itinerary: the interpolated [lng, lat]
|
|
26
|
+
* `point`, the `bearingDeg` of the itinerary's tangent there (the heading the path
|
|
27
|
+
* is travelling, 0..360), and the `index` of the line vertex at or before the
|
|
28
|
+
* point (so a caller can read a per-vertex channel such as elevation without a
|
|
29
|
+
* second search). Produced by cursorAtFraction.
|
|
30
|
+
*/
|
|
31
|
+
export interface RouteCursor {
|
|
32
|
+
bearingDeg: number;
|
|
33
|
+
index: number;
|
|
34
|
+
point: LngLat;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* continuousLine copies a route's line with its longitudes running on from one vertex to the
|
|
39
|
+
* next: each vertex is written the short way round from the one before it, so a route that
|
|
40
|
+
* crosses the antimeridian continues past 180 (or below -180) where it is written 179.9 then
|
|
41
|
+
* -179.9, or cut in two at the line as the GeoJSON specification asks.
|
|
42
|
+
*
|
|
43
|
+
* Every rule that subtracts, averages or bounds the longitudes of a route reads it through this
|
|
44
|
+
* copy: a centre low-passed across the crossing, the extent a fit zoom frames and the radius an
|
|
45
|
+
* overview opens on are then plain arithmetic over one continuous series. A renderer reads a
|
|
46
|
+
* longitude a turn away as the same place, so a pose or a marker answered past 180 is drawn
|
|
47
|
+
* where the route is.
|
|
48
|
+
*
|
|
49
|
+
* A route that never crosses the line is copied digit for digit, since a vertex is rewritten
|
|
50
|
+
* only by the whole turns it is moved. A vertex whose longitude is no finite number is kept as
|
|
51
|
+
* written, and the vertex after it continues from the last one that was.
|
|
52
|
+
*
|
|
53
|
+
* @param line The route's vertices, `[lng, lat]` in degrees, as they are written.
|
|
54
|
+
* @returns A copy with one vertex per input vertex, the first as written.
|
|
55
|
+
*/
|
|
56
|
+
export const continuousLine = (line: readonly (readonly [number, number])[]): LngLat[] => {
|
|
57
|
+
const out: LngLat[] = [];
|
|
58
|
+
let turns = 0;
|
|
59
|
+
let previous: number | undefined;
|
|
60
|
+
|
|
61
|
+
for (const [lng, lat] of line) {
|
|
62
|
+
if (!Number.isFinite(lng)) {
|
|
63
|
+
out.push([lng, lat]);
|
|
64
|
+
|
|
65
|
+
continue;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
if (previous !== undefined) {
|
|
69
|
+
const step = lng - previous;
|
|
70
|
+
// A step longer than half a turn is the short way round written the long way: the vertex
|
|
71
|
+
// is moved by the whole turns that undo it.
|
|
72
|
+
if (Math.abs(step) > LONGITUDE_LIMIT) {
|
|
73
|
+
turns -= Math.round(step / DEGREES_PER_TURN);
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
previous = lng;
|
|
78
|
+
out.push([turns === 0 ? lng : lng + turns * DEGREES_PER_TURN, lat]);
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
return out;
|
|
82
|
+
};
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* findVertexIndex returns the index i such that
|
|
86
|
+
* cumulative[i] <= targetMeters < cumulative[i + 1], the vertex at or before the
|
|
87
|
+
* target. Returns 0 below the first vertex and the last index at or above the
|
|
88
|
+
* end. O(log n) binary search over the ascending cumulative array, so a dense
|
|
89
|
+
* itinerary costs a logarithmic lookup per sampled frame rather than a linear scan.
|
|
90
|
+
*/
|
|
91
|
+
export const findVertexIndex = (cumulative: readonly number[], targetMeters: number): number => {
|
|
92
|
+
const length = cumulative.length;
|
|
93
|
+
if (length === 0) {
|
|
94
|
+
return 0;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
const first = cumulative[0];
|
|
98
|
+
const last = cumulative[length - 1];
|
|
99
|
+
// Compare against `=== undefined`, not falsy: a legitimate cumulative entry is
|
|
100
|
+
// 0 (the first vertex), and `!0` would pin every lookup to index 0.
|
|
101
|
+
if (first === undefined || last === undefined) {
|
|
102
|
+
return 0;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
if (targetMeters <= first) {
|
|
106
|
+
return 0;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
if (targetMeters >= last) {
|
|
110
|
+
return length - 1;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
let lo = 0;
|
|
114
|
+
let hi = length - 1;
|
|
115
|
+
while (lo < hi - 1) {
|
|
116
|
+
const mid = (lo + hi) >> 1;
|
|
117
|
+
const value = cumulative[mid];
|
|
118
|
+
if (value === undefined) {
|
|
119
|
+
break;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
if (value <= targetMeters) {
|
|
123
|
+
lo = mid;
|
|
124
|
+
} else {
|
|
125
|
+
hi = mid;
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
return lo;
|
|
130
|
+
};
|
|
131
|
+
|
|
132
|
+
/**
|
|
133
|
+
* placedFrom answers the first vertex from `index` that names a place, walking the line by
|
|
134
|
+
* `step`, as a copy: the vertex at `index` itself where it names one, which is every vertex of a
|
|
135
|
+
* line written whole. A line with none answers `[NaN, NaN]`.
|
|
136
|
+
*/
|
|
137
|
+
const placedFrom = (line: readonly LngLat[], index: number, step: 1 | -1): LngLat => {
|
|
138
|
+
for (let at = index; at >= 0 && at < line.length; at += step) {
|
|
139
|
+
const vertex = line[at];
|
|
140
|
+
if (namesPlace(vertex)) {
|
|
141
|
+
return [vertex[0], vertex[1]];
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
return [Number.NaN, Number.NaN];
|
|
146
|
+
};
|
|
147
|
+
|
|
148
|
+
/**
|
|
149
|
+
* pointAtMeters returns the [lng, lat] located at the given arc-length along the
|
|
150
|
+
* line, linearly interpolating between the two vertices whose cumulative
|
|
151
|
+
* distances bracket the target. The target is clamped to the line, so a value
|
|
152
|
+
* below 0 resolves to the first vertex and one past the end to the last. An
|
|
153
|
+
* empty line yields [0, 0]. The optional precomputed `cumulative` avoids
|
|
154
|
+
* re-measuring the line when the caller already holds it (the per-frame path).
|
|
155
|
+
*
|
|
156
|
+
* A vertex that names no place is passed over, as {@link cumulativeMeters} bridges it, so the
|
|
157
|
+
* first vertex is the first that names one. A line none of whose vertices names a place, and a
|
|
158
|
+
* distance that is no number, have no position along the line: the answer is `[NaN, NaN]`.
|
|
159
|
+
*
|
|
160
|
+
* A leg is interpolated the short way round ({@link longitudeDelta}), as its length is
|
|
161
|
+
* measured: on a leg written 179.9 then -179.9 the point halfway is on the antimeridian, never
|
|
162
|
+
* on the prime meridian the two numbers average to. The longitude continues from the leg's
|
|
163
|
+
* first vertex, so it runs past 180 where the leg crosses eastward and below -180 where it
|
|
164
|
+
* crosses westward, which a renderer reads as the same place.
|
|
165
|
+
*
|
|
166
|
+
* @param line The route's vertices, `[lng, lat]` in degrees.
|
|
167
|
+
* @param targetMeters How far along the line, in meters; held to the line's length.
|
|
168
|
+
* @param cumulative The line's {@link cumulativeMeters}. Defaults to measuring the line again.
|
|
169
|
+
*/
|
|
170
|
+
export const pointAtMeters = (
|
|
171
|
+
line: readonly LngLat[],
|
|
172
|
+
targetMeters: number,
|
|
173
|
+
cumulative: readonly number[] = cumulativeMeters(line),
|
|
174
|
+
): LngLat => {
|
|
175
|
+
if (line.length === 0) {
|
|
176
|
+
return [0, 0];
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
if (Number.isNaN(targetMeters)) {
|
|
180
|
+
return [Number.NaN, Number.NaN];
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
const total = cumulative[cumulative.length - 1] ?? 0;
|
|
184
|
+
if (targetMeters <= 0 || total === 0) {
|
|
185
|
+
return placedFrom(line, 0, 1);
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
if (targetMeters >= total) {
|
|
189
|
+
return placedFrom(line, line.length - 1, -1);
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
// The bracket's far vertex added length, so it names a place; its near one is the last vertex
|
|
193
|
+
// at or before it that does, at the distance every vertex between them stands at.
|
|
194
|
+
const lo = findVertexIndex(cumulative, targetMeters);
|
|
195
|
+
const a = placedFrom(line, lo, -1);
|
|
196
|
+
const b = line[lo + 1];
|
|
197
|
+
const aMeters = cumulative[lo];
|
|
198
|
+
const bMeters = cumulative[lo + 1];
|
|
199
|
+
if (!namesPlace(a) || !namesPlace(b) || aMeters === undefined || bMeters === undefined) {
|
|
200
|
+
return placedFrom(line, 0, 1);
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
const span = bMeters - aMeters;
|
|
204
|
+
const ratio = span === 0 ? 0 : (targetMeters - aMeters) / span;
|
|
205
|
+
|
|
206
|
+
return [a[0] + longitudeDelta(a[0], b[0]) * ratio, a[1] + (b[1] - a[1]) * ratio];
|
|
207
|
+
};
|
|
208
|
+
|
|
209
|
+
/**
|
|
210
|
+
* bearingDegBetween returns the initial great-circle bearing in degrees (0..360)
|
|
211
|
+
* from a to b: the heading to travel to go from the first point to the second.
|
|
212
|
+
* Two identical points have no defined heading and return 0.
|
|
213
|
+
*/
|
|
214
|
+
export const bearingDegBetween = (a: LngLat, b: LngLat): number => {
|
|
215
|
+
if (a[0] === b[0] && a[1] === b[1]) {
|
|
216
|
+
return 0;
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
const lat1 = a[1] * DEGREES_TO_RADIANS;
|
|
220
|
+
const lat2 = b[1] * DEGREES_TO_RADIANS;
|
|
221
|
+
const dLng = (b[0] - a[0]) * DEGREES_TO_RADIANS;
|
|
222
|
+
const y = Math.sin(dLng) * Math.cos(lat2);
|
|
223
|
+
const x = Math.cos(lat1) * Math.sin(lat2) - Math.sin(lat1) * Math.cos(lat2) * Math.cos(dLng);
|
|
224
|
+
|
|
225
|
+
return (Math.atan2(y, x) * RADIANS_TO_DEGREES + DEGREES_PER_TURN) % DEGREES_PER_TURN;
|
|
226
|
+
};
|
|
227
|
+
|
|
228
|
+
/**
|
|
229
|
+
* tangentBearingAtMeters returns the itinerary's heading in degrees (0..360) at the
|
|
230
|
+
* given arc-length, sampled by looking `lookaheadMeters` further along the line
|
|
231
|
+
* and taking the bearing from the cursor to that ahead-point. A larger lookahead
|
|
232
|
+
* yields a steadier heading through dense vertices (the camera anticipates turns
|
|
233
|
+
* rather than twitching); the ahead-point is clamped to the itinerary end. Falls
|
|
234
|
+
* back to the heading of the bracketing leg when the lookahead collapses to the
|
|
235
|
+
* same point (at the very end of the itinerary, or with a lookahead of zero): the
|
|
236
|
+
* leg that starts at the vertex at or before the cursor, or the nearest leg before
|
|
237
|
+
* it that has a length, so a route that writes its last vertex twice keeps the
|
|
238
|
+
* heading it arrived with. Where no leg up to the cursor has a length (a route that
|
|
239
|
+
* writes its first vertex twice), the first leg after the cursor that has one is
|
|
240
|
+
* read: the heading the route leaves on. A line with no leg that has a length answers 0. The
|
|
241
|
+
* optional precomputed `cumulative` is reused on the per-frame path.
|
|
242
|
+
*
|
|
243
|
+
* @param line The route's vertices, `[lng, lat]` in degrees.
|
|
244
|
+
* @param targetMeters Where along the line the heading is read, in meters.
|
|
245
|
+
* @param lookaheadMeters How far ahead of that point the heading aims, in meters.
|
|
246
|
+
* @param cumulative The line's {@link cumulativeMeters}. Defaults to measuring the line again.
|
|
247
|
+
*/
|
|
248
|
+
export const tangentBearingAtMeters = (
|
|
249
|
+
line: readonly LngLat[],
|
|
250
|
+
targetMeters: number,
|
|
251
|
+
lookaheadMeters: number,
|
|
252
|
+
cumulative: readonly number[] = cumulativeMeters(line),
|
|
253
|
+
): number => {
|
|
254
|
+
const total = cumulative[cumulative.length - 1] ?? 0;
|
|
255
|
+
const here = pointAtMeters(line, targetMeters, cumulative);
|
|
256
|
+
const aheadMeters = Math.min(targetMeters + Math.max(0, lookaheadMeters), total);
|
|
257
|
+
const ahead = pointAtMeters(line, aheadMeters, cumulative);
|
|
258
|
+
if (here[0] !== ahead[0] || here[1] !== ahead[1]) {
|
|
259
|
+
return bearingDegBetween(here, ahead);
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
// The lookahead has nowhere to go: fall back to the heading of the leg the cursor is on, so
|
|
263
|
+
// the camera keeps its travelling orientation rather than snapping to 0. That leg starts at
|
|
264
|
+
// the vertex at or before the cursor. At the end of the line, and where vertices are written
|
|
265
|
+
// twice, it has no length, and the nearest leg before it that has one is read instead.
|
|
266
|
+
const index = findVertexIndex(cumulative, targetMeters);
|
|
267
|
+
for (let start = Math.min(index, line.length - 2); start >= 0; start -= 1) {
|
|
268
|
+
const heading = legBearingDeg(line, start);
|
|
269
|
+
if (heading !== null) {
|
|
270
|
+
return heading;
|
|
271
|
+
}
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
// No leg up to the cursor has a length: the route starts on repeated vertices, and the first
|
|
275
|
+
// leg after them is the one it leaves on.
|
|
276
|
+
for (let start = index + 1; start < line.length - 1; start += 1) {
|
|
277
|
+
const heading = legBearingDeg(line, start);
|
|
278
|
+
if (heading !== null) {
|
|
279
|
+
return heading;
|
|
280
|
+
}
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
return 0;
|
|
284
|
+
};
|
|
285
|
+
|
|
286
|
+
/**
|
|
287
|
+
* routeHeadingDeg is a route's overall heading in degrees (0..360): from its first vertex toward
|
|
288
|
+
* its last. It is the heading a `locked` first shot holds, and the one an overview's map frames
|
|
289
|
+
* face.
|
|
290
|
+
*
|
|
291
|
+
* A route that ends where it starts has no first-to-last heading, and answers the heading of
|
|
292
|
+
* its first leg that has a length, the one it sets out on. A line with no such leg answers 0.
|
|
293
|
+
*/
|
|
294
|
+
export const routeHeadingDeg = (
|
|
295
|
+
line: readonly LngLat[],
|
|
296
|
+
cumulative: readonly number[] = cumulativeMeters(line),
|
|
297
|
+
): number => tangentBearingAtMeters(line, 0, cumulative[cumulative.length - 1] ?? 0, cumulative);
|
|
298
|
+
|
|
299
|
+
/**
|
|
300
|
+
* legBearingDeg is the heading of the leg that starts at a vertex, or null where the leg has no
|
|
301
|
+
* length (both ends written at one place) or the line holds no such leg.
|
|
302
|
+
*/
|
|
303
|
+
const legBearingDeg = (line: readonly LngLat[], start: number): number | null => {
|
|
304
|
+
const from = line[start];
|
|
305
|
+
const to = line[start + 1];
|
|
306
|
+
if (!from || !to || (from[0] === to[0] && from[1] === to[1])) {
|
|
307
|
+
return null;
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
return bearingDegBetween(from, to);
|
|
311
|
+
};
|
|
312
|
+
|
|
313
|
+
/**
|
|
314
|
+
* cursorAtFraction samples an itinerary at a progress fraction (0..1 of total
|
|
315
|
+
* length): it returns the interpolated point, the tangent bearing there (using
|
|
316
|
+
* `lookaheadMeters` for a steady heading), and the index of the vertex at or
|
|
317
|
+
* before the point. The fraction is clamped to [0, 1] so an out-of-range value
|
|
318
|
+
* resolves to an endpoint. This is the single seam the resolver and the
|
|
319
|
+
* generators sample the itinerary through, so progress maps to a position the same
|
|
320
|
+
* way for every consumer.
|
|
321
|
+
*
|
|
322
|
+
* @param line The route's vertices, `[lng, lat]` in degrees.
|
|
323
|
+
* @param fraction The progress along the line, 0 at its start and 1 at its end.
|
|
324
|
+
* @param lookaheadMeters How far ahead of the point the tangent bearing aims, in meters.
|
|
325
|
+
* @param cumulative The line's {@link cumulativeMeters}. Defaults to measuring the line again.
|
|
326
|
+
*/
|
|
327
|
+
export const cursorAtFraction = (
|
|
328
|
+
line: readonly LngLat[],
|
|
329
|
+
fraction: number,
|
|
330
|
+
lookaheadMeters: number,
|
|
331
|
+
cumulative: readonly number[] = cumulativeMeters(line),
|
|
332
|
+
): RouteCursor => {
|
|
333
|
+
const total = cumulative[cumulative.length - 1] ?? 0;
|
|
334
|
+
const clamped = Math.min(1, Math.max(0, fraction));
|
|
335
|
+
const targetMeters = clamped * total;
|
|
336
|
+
|
|
337
|
+
return {
|
|
338
|
+
bearingDeg: tangentBearingAtMeters(line, targetMeters, lookaheadMeters, cumulative),
|
|
339
|
+
index: findVertexIndex(cumulative, targetMeters),
|
|
340
|
+
point: pointAtMeters(line, targetMeters, cumulative),
|
|
341
|
+
};
|
|
342
|
+
};
|
|
343
|
+
|
|
344
|
+
/**
|
|
345
|
+
* itineraryToRouteGeometry flattens an itinerary, or one of its segments, into the single
|
|
346
|
+
* {@link RouteGeometry} a camera plan resolves against.
|
|
347
|
+
*
|
|
348
|
+
* Every line a segment holds is laid end to end, in the order the segments and their lines are
|
|
349
|
+
* written: the lines {@link extractLines} answers, a `MultiLineString`'s tracks included, so the
|
|
350
|
+
* flight follows the vertices the profile's points and bands stand on. A directions segment's
|
|
351
|
+
* via `MultiPoint` is no line and is left out. The vertex each line after the first starts on is
|
|
352
|
+
* named in `jumps`, since the camera flies the leg that reaches it and the itinerary's distance
|
|
353
|
+
* axis charges nothing for it. A route read off one line states none.
|
|
354
|
+
*
|
|
355
|
+
* `elevations` is stated only when every vertex kept carries a finite one. A route mixing 2D
|
|
356
|
+
* and 3D vertices, or holding an elevation that is no finite number, is flown as a 2D one: a
|
|
357
|
+
* partial list would not line up with `line`, and {@link elevationAtFraction} reads the two by
|
|
358
|
+
* one index.
|
|
359
|
+
*
|
|
360
|
+
* A vertex that names no place ({@link namesPlace}) is left out, with its elevation: kept, it
|
|
361
|
+
* would turn the route's length into `NaN`, and every pose resolved over it.
|
|
362
|
+
*
|
|
363
|
+
* @param itinerary The itinerary, or null where none is loaded.
|
|
364
|
+
* @param segmentId The one segment to fly, or null for the whole itinerary.
|
|
365
|
+
* @returns The route, or null where fewer than two vertices name a place: no itinerary, an
|
|
366
|
+
* unknown segment, or segments holding no line. A flight needs a direction.
|
|
367
|
+
*/
|
|
368
|
+
export const itineraryToRouteGeometry = (
|
|
369
|
+
itinerary: ItineraryWithDetails | null,
|
|
370
|
+
segmentId: string | null = null,
|
|
371
|
+
): RouteGeometry | null => {
|
|
372
|
+
const segments = segmentsForSelection(itinerary, segmentId);
|
|
373
|
+
const line: LngLat[] = [];
|
|
374
|
+
const elevations: number[] = [];
|
|
375
|
+
const jumps: number[] = [];
|
|
376
|
+
let everyVertexHasElevation = true;
|
|
377
|
+
|
|
378
|
+
for (const segment of segments) {
|
|
379
|
+
for (const { coordinates } of extractLines(segment.geojson)) {
|
|
380
|
+
let opensLine = true;
|
|
381
|
+
for (const coordinate of coordinates) {
|
|
382
|
+
if (!namesPlace(coordinate)) {
|
|
383
|
+
continue;
|
|
384
|
+
}
|
|
385
|
+
|
|
386
|
+
// The first vertex a line contributes is where the flight lands from the line before.
|
|
387
|
+
if (opensLine && line.length > 0) {
|
|
388
|
+
jumps.push(line.length);
|
|
389
|
+
}
|
|
390
|
+
|
|
391
|
+
opensLine = false;
|
|
392
|
+
const [lng = 0, lat = 0, elevation] = coordinate;
|
|
393
|
+
line.push([lng, lat]);
|
|
394
|
+
if (elevation === undefined || !Number.isFinite(elevation)) {
|
|
395
|
+
everyVertexHasElevation = false;
|
|
396
|
+
} else {
|
|
397
|
+
elevations.push(elevation);
|
|
398
|
+
}
|
|
399
|
+
}
|
|
400
|
+
}
|
|
401
|
+
}
|
|
402
|
+
|
|
403
|
+
if (line.length < 2) {
|
|
404
|
+
return null;
|
|
405
|
+
}
|
|
406
|
+
|
|
407
|
+
return {
|
|
408
|
+
// One elevation for every vertex or none: a partial list would not line up with the line.
|
|
409
|
+
...(everyVertexHasElevation && elevations.length === line.length ? { elevations } : {}),
|
|
410
|
+
...(jumps.length > 0 ? { jumps } : {}),
|
|
411
|
+
line,
|
|
412
|
+
};
|
|
413
|
+
};
|
|
414
|
+
|
|
415
|
+
/**
|
|
416
|
+
* routeGroundMeters answers, for each vertex of a route's line, the distance covered on the
|
|
417
|
+
* ground to reach it, in meters: the route's own arc length with the jumps before it left out.
|
|
418
|
+
*
|
|
419
|
+
* It is the itinerary's distance axis read at the route's vertices. A flight charges every leg
|
|
420
|
+
* of its line, the leg that joins two lines included, since the camera travels it. The profile
|
|
421
|
+
* a frame is read against charges nothing for that leg, so the vertex a jump lands on stands at
|
|
422
|
+
* the distance of the vertex it left. A route that states no jump answers its
|
|
423
|
+
* {@link cumulativeMeters}.
|
|
424
|
+
*
|
|
425
|
+
* @param route The route, with the jumps it states.
|
|
426
|
+
* @param cumulative The line's own {@link cumulativeMeters}, where the caller already holds it.
|
|
427
|
+
* @returns One distance per vertex of the line, ascending and never past `cumulative`.
|
|
428
|
+
*/
|
|
429
|
+
export const routeGroundMeters = (
|
|
430
|
+
route: RouteGeometry,
|
|
431
|
+
cumulative: readonly number[] = cumulativeMeters(route.line),
|
|
432
|
+
): number[] => {
|
|
433
|
+
const jumps = new Set(route.jumps);
|
|
434
|
+
const ground = new Array<number>(cumulative.length);
|
|
435
|
+
let jumped = 0;
|
|
436
|
+
|
|
437
|
+
for (let index = 0; index < cumulative.length; index += 1) {
|
|
438
|
+
const here = cumulative[index] ?? 0;
|
|
439
|
+
// A set holds only the entries the line has a leg for: an index below 1 or past the line is
|
|
440
|
+
// never asked for, and a fraction or `NaN` equals no index.
|
|
441
|
+
if (index > 0 && jumps.has(index)) {
|
|
442
|
+
jumped += here - (cumulative[index - 1] ?? here);
|
|
443
|
+
}
|
|
444
|
+
|
|
445
|
+
ground[index] = here - jumped;
|
|
446
|
+
}
|
|
447
|
+
|
|
448
|
+
return ground;
|
|
449
|
+
};
|
|
450
|
+
|
|
451
|
+
/**
|
|
452
|
+
* groundMetersAt reads the distance covered on the ground where a flight has travelled
|
|
453
|
+
* `flightMeters` of its line: {@link routeGroundMeters}, interpolated along the leg the flight
|
|
454
|
+
* is on.
|
|
455
|
+
*
|
|
456
|
+
* Over a jump the two ends of the leg stand at one distance, so the answer holds there until the
|
|
457
|
+
* flight is over the next line. The flight's distance is held to the line, so one below zero
|
|
458
|
+
* answers the first vertex and one past the end the last.
|
|
459
|
+
*
|
|
460
|
+
* @param cumulative The line's {@link cumulativeMeters}.
|
|
461
|
+
* @param ground The same route's {@link routeGroundMeters}.
|
|
462
|
+
* @param flightMeters How far along its line the flight is, in meters.
|
|
463
|
+
* @returns The distance in meters, 0 for a route with no vertex.
|
|
464
|
+
*/
|
|
465
|
+
export const groundMetersAt = (
|
|
466
|
+
cumulative: readonly number[],
|
|
467
|
+
ground: readonly number[],
|
|
468
|
+
flightMeters: number,
|
|
469
|
+
): number => {
|
|
470
|
+
const lo = findVertexIndex(cumulative, flightMeters);
|
|
471
|
+
const from = ground[lo];
|
|
472
|
+
if (from === undefined) {
|
|
473
|
+
return 0;
|
|
474
|
+
}
|
|
475
|
+
|
|
476
|
+
const to = ground[lo + 1];
|
|
477
|
+
const fromMeters = cumulative[lo];
|
|
478
|
+
const toMeters = cumulative[lo + 1];
|
|
479
|
+
if (to === undefined || fromMeters === undefined || toMeters === undefined) {
|
|
480
|
+
return from;
|
|
481
|
+
}
|
|
482
|
+
|
|
483
|
+
const span = toMeters - fromMeters;
|
|
484
|
+
if (span <= 0) {
|
|
485
|
+
return from;
|
|
486
|
+
}
|
|
487
|
+
|
|
488
|
+
const ratio = Math.min(1, Math.max(0, (flightMeters - fromMeters) / span));
|
|
489
|
+
|
|
490
|
+
return from + (to - from) * ratio;
|
|
491
|
+
};
|
|
492
|
+
|
|
493
|
+
/**
|
|
494
|
+
* elevationAtFraction returns the itinerary's embedded surface elevation in meters at
|
|
495
|
+
* a progress fraction (0..1), interpolating linearly between the two vertices
|
|
496
|
+
* whose arc-length brackets the target. Returns null when the itinerary carries no
|
|
497
|
+
* elevations or the count does not match the line (so a caller falls back to a
|
|
498
|
+
* distance heuristic rather than trusting a mismatched array). The fraction is
|
|
499
|
+
* clamped to [0, 1]. The optional precomputed `cumulative`, the route's own
|
|
500
|
+
* {@link cumulativeMeters}, keeps a caller that reads many fractions of one route
|
|
501
|
+
* (one per frame of a flight) from measuring the whole line again for each.
|
|
502
|
+
*
|
|
503
|
+
* @param itinerary The route, with the elevations it states.
|
|
504
|
+
* @param fraction The progress along the route, 0 at its start and 1 at its end.
|
|
505
|
+
* @param cumulative The route's {@link cumulativeMeters}. Defaults to measuring the line again.
|
|
506
|
+
*/
|
|
507
|
+
export const elevationAtFraction = (
|
|
508
|
+
itinerary: RouteGeometry,
|
|
509
|
+
fraction: number,
|
|
510
|
+
cumulative: readonly number[] = cumulativeMeters(itinerary.line),
|
|
511
|
+
): number | null => {
|
|
512
|
+
const elevations = itinerary.elevations;
|
|
513
|
+
const line = itinerary.line;
|
|
514
|
+
if (!elevations || elevations.length !== line.length || elevations.length === 0) {
|
|
515
|
+
return null;
|
|
516
|
+
}
|
|
517
|
+
|
|
518
|
+
const total = cumulative[cumulative.length - 1] ?? 0;
|
|
519
|
+
const clamped = Math.min(1, Math.max(0, fraction));
|
|
520
|
+
const targetMeters = clamped * total;
|
|
521
|
+
const lo = findVertexIndex(cumulative, targetMeters);
|
|
522
|
+
const aElev = elevations[lo];
|
|
523
|
+
const bElev = elevations[lo + 1];
|
|
524
|
+
const aMeters = cumulative[lo];
|
|
525
|
+
const bMeters = cumulative[lo + 1];
|
|
526
|
+
if (aElev === undefined) {
|
|
527
|
+
return null;
|
|
528
|
+
}
|
|
529
|
+
|
|
530
|
+
if (bElev === undefined || aMeters === undefined || bMeters === undefined) {
|
|
531
|
+
return aElev;
|
|
532
|
+
}
|
|
533
|
+
|
|
534
|
+
const span = bMeters - aMeters;
|
|
535
|
+
if (span <= 0) {
|
|
536
|
+
return aElev;
|
|
537
|
+
}
|
|
538
|
+
|
|
539
|
+
const ratio = Math.min(1, Math.max(0, (targetMeters - aMeters) / span));
|
|
540
|
+
|
|
541
|
+
return aElev + (bElev - aElev) * ratio;
|
|
542
|
+
};
|
|
543
|
+
|
|
544
|
+
/**
|
|
545
|
+
* slopeDegAtFraction returns the itinerary's local slope in degrees at a progress
|
|
546
|
+
* fraction (positive climbing, negative descending), measured as the rise over
|
|
547
|
+
* the run across a `lookaheadMeters` window starting at the fraction. Returns 0
|
|
548
|
+
* when the itinerary has no usable elevations (a flat default the smart preset then
|
|
549
|
+
* frames level), which includes a window whose elevations are no finite numbers.
|
|
550
|
+
* The slope drives the smart mode's per-keyframe pitch.
|
|
551
|
+
*
|
|
552
|
+
* The window never runs past the route's end. Within one window of the finish it slides back
|
|
553
|
+
* to end there, so the slope is the grade of the last `lookaheadMeters` of the route, and on a
|
|
554
|
+
* route shorter than the window it is the grade of the whole route. The run the rise is divided
|
|
555
|
+
* by is the window's real length, so a route that ends on a climb reads that climb at its last
|
|
556
|
+
* point. A window that is zero, negative or no finite number is floored at a meter. The floor
|
|
557
|
+
* is the window's and not the route's: a route shorter than a meter is read over its own
|
|
558
|
+
* length, so two elevations a few centimeters apart read as steep a grade as they make.
|
|
559
|
+
*
|
|
560
|
+
* @param itinerary The route, with the elevations it states.
|
|
561
|
+
* @param fraction The progress along the route the window starts at, 0 to 1.
|
|
562
|
+
* @param lookaheadMeters The length of the window the grade is measured over, in meters.
|
|
563
|
+
*/
|
|
564
|
+
export const slopeDegAtFraction = (
|
|
565
|
+
itinerary: RouteGeometry,
|
|
566
|
+
fraction: number,
|
|
567
|
+
lookaheadMeters: number,
|
|
568
|
+
): number => {
|
|
569
|
+
// Measured once for the three lookups below.
|
|
570
|
+
const cumulative = cumulativeMeters(itinerary.line);
|
|
571
|
+
if (elevationAtFraction(itinerary, fraction, cumulative) === null) {
|
|
572
|
+
return 0;
|
|
573
|
+
}
|
|
574
|
+
|
|
575
|
+
const total = cumulative[cumulative.length - 1] ?? 0;
|
|
576
|
+
if (!(total > 0)) {
|
|
577
|
+
return 0;
|
|
578
|
+
}
|
|
579
|
+
|
|
580
|
+
const window = Number.isFinite(lookaheadMeters) ? Math.max(1, lookaheadMeters) : 1;
|
|
581
|
+
const run = Math.min(window, total);
|
|
582
|
+
// Slid back where the route has less than a window left, so the window ends at the finish.
|
|
583
|
+
const startMeters = Math.min(Math.min(1, Math.max(0, fraction)) * total, total - run);
|
|
584
|
+
const here = elevationAtFraction(itinerary, startMeters / total, cumulative);
|
|
585
|
+
const ahead = elevationAtFraction(itinerary, (startMeters + run) / total, cumulative);
|
|
586
|
+
if (here === null || ahead === null) {
|
|
587
|
+
return 0;
|
|
588
|
+
}
|
|
589
|
+
|
|
590
|
+
// The run is the window's real length, always positive, so the rise over it is the tangent
|
|
591
|
+
// `Math.atan2(rise, run)` would read. An elevation that is no finite number is no usable
|
|
592
|
+
// elevation, and reads as the flat default.
|
|
593
|
+
const slopeDeg = convertSlope((ahead - here) / run, "ratio", "degrees");
|
|
594
|
+
|
|
595
|
+
return Number.isFinite(slopeDeg) ? slopeDeg : 0;
|
|
596
|
+
};
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
// oxlint-disable-next-line no-unused-vars -- named by a {@link} below, which an editor follows.
|
|
2
|
+
import type { VideoFlightEngine } from "../engines/videoFlight.js";
|
|
3
|
+
import type { RouteGeometry } from "./plan.js";
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* What a route held when it was read: every vertex, every elevation and every jump, copied.
|
|
7
|
+
*
|
|
8
|
+
* A copy, because `RouteGeometry`'s arrays are the caller's own and stay writable: a track that
|
|
9
|
+
* grows by a push is one object whose content moved, and only a copy can say so.
|
|
10
|
+
*/
|
|
11
|
+
export interface RouteContent {
|
|
12
|
+
/** The elevations in order, none for a route that states none. */
|
|
13
|
+
readonly elevations: readonly (number | undefined)[];
|
|
14
|
+
/** The jumps in order, none for a route that states none. */
|
|
15
|
+
readonly jumps: readonly (number | undefined)[];
|
|
16
|
+
/** Each vertex's longitude then its latitude, in order: two values a vertex. */
|
|
17
|
+
readonly line: readonly (number | undefined)[];
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* routeContentOf copies what a route holds now, value for value: a vertex or a coordinate a
|
|
22
|
+
* caller left out is kept as left out, so a route no flight can follow is still compared as it is.
|
|
23
|
+
*/
|
|
24
|
+
export const routeContentOf = (route: RouteGeometry): RouteContent => {
|
|
25
|
+
const line: (number | undefined)[] = [];
|
|
26
|
+
for (let index = 0; index < route.line.length; index += 1) {
|
|
27
|
+
const vertex = route.line[index];
|
|
28
|
+
line.push(vertex?.[0], vertex?.[1]);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
return { elevations: [...(route.elevations ?? [])], jumps: [...(route.jumps ?? [])], line };
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* holdsRouteContent answers whether a route still holds the content read off a route before:
|
|
36
|
+
* every vertex, every elevation and every jump, in order, each compared with `Object.is`.
|
|
37
|
+
*
|
|
38
|
+
* By content and not by object identity, both ways. A caller can hand over a fresh but identical
|
|
39
|
+
* route object (an effect running again, a late activity glyph arriving alongside it), and an
|
|
40
|
+
* identity guard would read it as another route. And a caller can edit the object it handed over,
|
|
41
|
+
* which an identity guard would read as the route it was.
|
|
42
|
+
*
|
|
43
|
+
* Every value is read, because two routes that share a vertex count, both ends and an elevation
|
|
44
|
+
* count are still two routes: a dragged middle vertex, a loop edited away from its trailhead, new
|
|
45
|
+
* elevations for one line. The jumps are read with them: they move no pose, and they move the
|
|
46
|
+
* distance the elevation overlay reads at every frame past one. The walk ends at the first
|
|
47
|
+
* difference.
|
|
48
|
+
*/
|
|
49
|
+
export const holdsRouteContent = (route: RouteGeometry, content: RouteContent): boolean => {
|
|
50
|
+
const elevations = route.elevations ?? [];
|
|
51
|
+
const jumps = route.jumps ?? [];
|
|
52
|
+
if (
|
|
53
|
+
route.line.length * 2 !== content.line.length ||
|
|
54
|
+
elevations.length !== content.elevations.length ||
|
|
55
|
+
jumps.length !== content.jumps.length
|
|
56
|
+
) {
|
|
57
|
+
return false;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
for (let index = 0; index < jumps.length; index += 1) {
|
|
61
|
+
if (!Object.is(jumps[index], content.jumps[index])) {
|
|
62
|
+
return false;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
for (let index = 0; index < route.line.length; index += 1) {
|
|
67
|
+
const vertex = route.line[index];
|
|
68
|
+
if (
|
|
69
|
+
!Object.is(vertex?.[0], content.line[index * 2]) ||
|
|
70
|
+
!Object.is(vertex?.[1], content.line[index * 2 + 1])
|
|
71
|
+
) {
|
|
72
|
+
return false;
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
for (let index = 0; index < elevations.length; index += 1) {
|
|
77
|
+
if (!Object.is(elevations[index], content.elevations[index])) {
|
|
78
|
+
return false;
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
return true;
|
|
83
|
+
};
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* sameRouteContent answers whether two routes hold the same content: every vertex, every
|
|
87
|
+
* elevation and every jump, in order, by the rule {@link holdsRouteContent} states.
|
|
88
|
+
*
|
|
89
|
+
* It is the rule {@link VideoFlightEngine.setRoute} reads to tell a route handed over again from
|
|
90
|
+
* another one, published so a host that keeps its own copy of the route decides the same way.
|
|
91
|
+
*
|
|
92
|
+
* @example
|
|
93
|
+
* ```ts
|
|
94
|
+
* import { sameRouteContent, type RouteGeometry } from "@mountaya/elements/camera";
|
|
95
|
+
*
|
|
96
|
+
* declare const held: RouteGeometry;
|
|
97
|
+
* declare const handed: RouteGeometry;
|
|
98
|
+
*
|
|
99
|
+
* if (!sameRouteContent(held, handed)) {
|
|
100
|
+
* console.log("another route: its flights resolve again");
|
|
101
|
+
* }
|
|
102
|
+
* ```
|
|
103
|
+
*/
|
|
104
|
+
export const sameRouteContent = (a: RouteGeometry, b: RouteGeometry): boolean =>
|
|
105
|
+
holdsRouteContent(a, routeContentOf(b));
|