@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.
Files changed (828) hide show
  1. package/CHANGELOG.md +273 -0
  2. package/LICENCE.fr.txt +280 -0
  3. package/LICENSE.txt +262 -0
  4. package/README.md +1510 -2
  5. package/THIRD-PARTY-NOTICES.txt +103 -0
  6. package/dist/agent/index.cjs +1211 -0
  7. package/dist/agent/index.cjs.map +1 -0
  8. package/dist/agent/index.d.cts +1966 -0
  9. package/dist/agent/index.d.ts +1966 -0
  10. package/dist/agent/index.js +1181 -0
  11. package/dist/agent/index.js.map +1 -0
  12. package/dist/camera/index.cjs +2512 -0
  13. package/dist/camera/index.cjs.map +1 -0
  14. package/dist/camera/index.d.cts +1723 -0
  15. package/dist/camera/index.d.ts +1723 -0
  16. package/dist/camera/index.js +2443 -0
  17. package/dist/camera/index.js.map +1 -0
  18. package/dist/chunk-5pTPpv4v.d.cts +897 -0
  19. package/dist/chunk-5pTPpv4v.d.ts +897 -0
  20. package/dist/chunk-6JzFMFHh.d.ts +119 -0
  21. package/dist/chunk-6qyuJVvt.d.ts +513 -0
  22. package/dist/chunk-9fp0lDic.cjs +583 -0
  23. package/dist/chunk-9fp0lDic.cjs.map +1 -0
  24. package/dist/chunk-A48H1rDg.d.cts +73 -0
  25. package/dist/chunk-A48H1rDg.d.ts +73 -0
  26. package/dist/chunk-B-m1AchR.cjs +57 -0
  27. package/dist/chunk-B-m1AchR.cjs.map +1 -0
  28. package/dist/chunk-B-qFTf04.d.ts +216 -0
  29. package/dist/chunk-B0YROiZh.d.cts +1475 -0
  30. package/dist/chunk-B14wgOvH.d.cts +68 -0
  31. package/dist/chunk-B19l3j9r.cjs +150 -0
  32. package/dist/chunk-B19l3j9r.cjs.map +1 -0
  33. package/dist/chunk-B2PtjVKg.cjs +86 -0
  34. package/dist/chunk-B2PtjVKg.cjs.map +1 -0
  35. package/dist/chunk-B56Oyb7W.cjs +70 -0
  36. package/dist/chunk-B56Oyb7W.cjs.map +1 -0
  37. package/dist/chunk-B5WGMQwK.cjs +113 -0
  38. package/dist/chunk-B5WGMQwK.cjs.map +1 -0
  39. package/dist/chunk-B98mKrdu.d.cts +302 -0
  40. package/dist/chunk-BB0PmqIM.d.cts +44 -0
  41. package/dist/chunk-BBikve0Z.cjs +269 -0
  42. package/dist/chunk-BBikve0Z.cjs.map +1 -0
  43. package/dist/chunk-BHeXmM0X.js +37 -0
  44. package/dist/chunk-BHeXmM0X.js.map +1 -0
  45. package/dist/chunk-BI8WZLpU.cjs +281 -0
  46. package/dist/chunk-BI8WZLpU.cjs.map +1 -0
  47. package/dist/chunk-BIEc_SkR.cjs +29 -0
  48. package/dist/chunk-BIEc_SkR.cjs.map +1 -0
  49. package/dist/chunk-BJ6L6_W9.cjs +553 -0
  50. package/dist/chunk-BJ6L6_W9.cjs.map +1 -0
  51. package/dist/chunk-BJ91UCbB.js +11 -0
  52. package/dist/chunk-BJ91UCbB.js.map +1 -0
  53. package/dist/chunk-BJEZWTKj.cjs +166 -0
  54. package/dist/chunk-BJEZWTKj.cjs.map +1 -0
  55. package/dist/chunk-BJz54mfg.cjs +10 -0
  56. package/dist/chunk-BJz54mfg.cjs.map +1 -0
  57. package/dist/chunk-BNX5LAfN.d.cts +912 -0
  58. package/dist/chunk-BP6KgA86.js +35 -0
  59. package/dist/chunk-BP6KgA86.js.map +1 -0
  60. package/dist/chunk-BRnjQq6K.d.cts +157 -0
  61. package/dist/chunk-BSiMEwPS.js +46 -0
  62. package/dist/chunk-BSiMEwPS.js.map +1 -0
  63. package/dist/chunk-BTPjDw_y.cjs +16 -0
  64. package/dist/chunk-BTPjDw_y.cjs.map +1 -0
  65. package/dist/chunk-BTUUABGI.js +17 -0
  66. package/dist/chunk-BTUUABGI.js.map +1 -0
  67. package/dist/chunk-BUeL9y7s.cjs +45 -0
  68. package/dist/chunk-BUeL9y7s.cjs.map +1 -0
  69. package/dist/chunk-BWMuCNc9.cjs +172 -0
  70. package/dist/chunk-BWMuCNc9.cjs.map +1 -0
  71. package/dist/chunk-BWjRfhpF.js +126 -0
  72. package/dist/chunk-BWjRfhpF.js.map +1 -0
  73. package/dist/chunk-BZ5KyZXI.d.ts +302 -0
  74. package/dist/chunk-B_4SVmvh.js +94 -0
  75. package/dist/chunk-B_4SVmvh.js.map +1 -0
  76. package/dist/chunk-BcTUuZQ3.js +95 -0
  77. package/dist/chunk-BcTUuZQ3.js.map +1 -0
  78. package/dist/chunk-BdkqSsJe.cjs +140 -0
  79. package/dist/chunk-BdkqSsJe.cjs.map +1 -0
  80. package/dist/chunk-BfktMVmI.js +70 -0
  81. package/dist/chunk-BfktMVmI.js.map +1 -0
  82. package/dist/chunk-BfzQb0EK.cjs +6 -0
  83. package/dist/chunk-BhWfT-22.d.cts +808 -0
  84. package/dist/chunk-BjJcqX5J.cjs +60 -0
  85. package/dist/chunk-BjJcqX5J.cjs.map +1 -0
  86. package/dist/chunk-Bk0L8g5J.d.cts +77 -0
  87. package/dist/chunk-Bk0L8g5J.d.ts +77 -0
  88. package/dist/chunk-Bl4_uVa6.cjs +11 -0
  89. package/dist/chunk-Bl4_uVa6.cjs.map +1 -0
  90. package/dist/chunk-BlKF4lrp.js +43 -0
  91. package/dist/chunk-BlKF4lrp.js.map +1 -0
  92. package/dist/chunk-Bm1FieGR.js +4 -0
  93. package/dist/chunk-Bm1FieGR.js.map +1 -0
  94. package/dist/chunk-Bn6ZbxkS.cjs +27 -0
  95. package/dist/chunk-BpN3hr6a.cjs +541 -0
  96. package/dist/chunk-BpN3hr6a.cjs.map +1 -0
  97. package/dist/chunk-Bq_WHTfd.d.cts +119 -0
  98. package/dist/chunk-Bqt4LBBz.cjs +648 -0
  99. package/dist/chunk-Bqt4LBBz.cjs.map +1 -0
  100. package/dist/chunk-Bqt97zwf.d.cts +54 -0
  101. package/dist/chunk-Bqt97zwf.d.ts +54 -0
  102. package/dist/chunk-BsBiN4w6.d.cts +245 -0
  103. package/dist/chunk-BvTpOUoC.cjs +207 -0
  104. package/dist/chunk-BvTpOUoC.cjs.map +1 -0
  105. package/dist/chunk-BwK6Hl3q.cjs +446 -0
  106. package/dist/chunk-BwK6Hl3q.cjs.map +1 -0
  107. package/dist/chunk-BxDQZDXR.d.cts +76 -0
  108. package/dist/chunk-BxDQZDXR.d.ts +76 -0
  109. package/dist/chunk-BxUio8kX.js +20 -0
  110. package/dist/chunk-BxUio8kX.js.map +1 -0
  111. package/dist/chunk-BxaocpFi.d.cts +1 -0
  112. package/dist/chunk-Bywi0K1N.js +36 -0
  113. package/dist/chunk-Bywi0K1N.js.map +1 -0
  114. package/dist/chunk-C-IlmkDl.js +59 -0
  115. package/dist/chunk-C-IlmkDl.js.map +1 -0
  116. package/dist/chunk-C5PtVewq.d.ts +389 -0
  117. package/dist/chunk-C5dpC7mQ.js +19 -0
  118. package/dist/chunk-C5dpC7mQ.js.map +1 -0
  119. package/dist/chunk-C5q1sgSa.js +46 -0
  120. package/dist/chunk-C5q1sgSa.js.map +1 -0
  121. package/dist/chunk-C6fU9G5I.cjs +221 -0
  122. package/dist/chunk-C6fU9G5I.cjs.map +1 -0
  123. package/dist/chunk-C71dpWUK.js +5 -0
  124. package/dist/chunk-C71dpWUK.js.map +1 -0
  125. package/dist/chunk-C82N1gQX.d.ts +1831 -0
  126. package/dist/chunk-C8HdaHpu.js +118 -0
  127. package/dist/chunk-C8HdaHpu.js.map +1 -0
  128. package/dist/chunk-C8ZGryck.js +236 -0
  129. package/dist/chunk-C8ZGryck.js.map +1 -0
  130. package/dist/chunk-C95NG0oD.cjs +43 -0
  131. package/dist/chunk-C95NG0oD.cjs.map +1 -0
  132. package/dist/chunk-C9aR8DXb.js +9 -0
  133. package/dist/chunk-C9aR8DXb.js.map +1 -0
  134. package/dist/chunk-CAUZnoCs.d.ts +525 -0
  135. package/dist/chunk-CBXWWuM9.cjs +82 -0
  136. package/dist/chunk-CBXWWuM9.cjs.map +1 -0
  137. package/dist/chunk-CC_Kquu7.d.cts +125 -0
  138. package/dist/chunk-CC_Kquu7.d.ts +125 -0
  139. package/dist/chunk-CCp85vXg.cjs +60 -0
  140. package/dist/chunk-CCp85vXg.cjs.map +1 -0
  141. package/dist/chunk-CEcB1_uK.js +39 -0
  142. package/dist/chunk-CEcB1_uK.js.map +1 -0
  143. package/dist/chunk-CFIo021l.d.cts +216 -0
  144. package/dist/chunk-CH_IZoJE.js +33 -0
  145. package/dist/chunk-CH_IZoJE.js.map +1 -0
  146. package/dist/chunk-CHrasH_g.cjs +25 -0
  147. package/dist/chunk-CHrasH_g.cjs.map +1 -0
  148. package/dist/chunk-CJVoSaAE.cjs +3 -0
  149. package/dist/chunk-CJp8nGcb.js +96 -0
  150. package/dist/chunk-CJp8nGcb.js.map +1 -0
  151. package/dist/chunk-CJwUtkOt.js +112 -0
  152. package/dist/chunk-CJwUtkOt.js.map +1 -0
  153. package/dist/chunk-CKhCOVIf.d.cts +751 -0
  154. package/dist/chunk-CKiVSRYg.js +50 -0
  155. package/dist/chunk-CKiVSRYg.js.map +1 -0
  156. package/dist/chunk-CKtd19eD.cjs +59 -0
  157. package/dist/chunk-CKtd19eD.cjs.map +1 -0
  158. package/dist/chunk-CL92KE3j.d.ts +3188 -0
  159. package/dist/chunk-CLqUlkAe.js +54 -0
  160. package/dist/chunk-CLqUlkAe.js.map +1 -0
  161. package/dist/chunk-CMG5OV0q.cjs +4741 -0
  162. package/dist/chunk-CMG5OV0q.cjs.map +1 -0
  163. package/dist/chunk-CN_TKSgm.js +10 -0
  164. package/dist/chunk-CN_TKSgm.js.map +1 -0
  165. package/dist/chunk-CNe6MtqV.cjs +29 -0
  166. package/dist/chunk-CNe6MtqV.cjs.map +1 -0
  167. package/dist/chunk-COQkDTC5.js +83 -0
  168. package/dist/chunk-COQkDTC5.js.map +1 -0
  169. package/dist/chunk-CPBl6K4M.cjs +168 -0
  170. package/dist/chunk-CPBl6K4M.cjs.map +1 -0
  171. package/dist/chunk-CPx0ZYFB.d.ts +3 -0
  172. package/dist/chunk-CQQhcP_C.d.ts +197 -0
  173. package/dist/chunk-CTNoajFh.d.cts +389 -0
  174. package/dist/chunk-CTd-qgJc.cjs +384 -0
  175. package/dist/chunk-CTd-qgJc.cjs.map +1 -0
  176. package/dist/chunk-CW80YYtU.cjs +1056 -0
  177. package/dist/chunk-CW80YYtU.cjs.map +1 -0
  178. package/dist/chunk-CWpqBgkF.d.cts +24 -0
  179. package/dist/chunk-CWpqBgkF.d.ts +24 -0
  180. package/dist/chunk-CXjRArgy.d.ts +3 -0
  181. package/dist/chunk-CXonfH3-.cjs +14 -0
  182. package/dist/chunk-CXonfH3-.cjs.map +1 -0
  183. package/dist/chunk-CYcouGXN.d.ts +825 -0
  184. package/dist/chunk-CZDAzEBw.cjs +1621 -0
  185. package/dist/chunk-CZDAzEBw.cjs.map +1 -0
  186. package/dist/chunk-C_fQFr70.d.cts +159 -0
  187. package/dist/chunk-C_fQFr70.d.ts +159 -0
  188. package/dist/chunk-CbOtHnnB.cjs +359 -0
  189. package/dist/chunk-CbOtHnnB.cjs.map +1 -0
  190. package/dist/chunk-CdA6ZMGk.d.cts +825 -0
  191. package/dist/chunk-Ce1_thm7.js +146 -0
  192. package/dist/chunk-Ce1_thm7.js.map +1 -0
  193. package/dist/chunk-CeD8Hw0j.d.cts +3188 -0
  194. package/dist/chunk-CeiTuMyt.d.cts +525 -0
  195. package/dist/chunk-Ch1OLzLi.js +1 -0
  196. package/dist/chunk-Cizu_j1N.cjs +87 -0
  197. package/dist/chunk-Cizu_j1N.cjs.map +1 -0
  198. package/dist/chunk-CjDe9z6A.d.cts +427 -0
  199. package/dist/chunk-Cl1etdlu.js +63 -0
  200. package/dist/chunk-Cl1etdlu.js.map +1 -0
  201. package/dist/chunk-CmoVJDoz.js +4 -0
  202. package/dist/chunk-CmoVJDoz.js.map +1 -0
  203. package/dist/chunk-CnLucxjG.cjs +197 -0
  204. package/dist/chunk-CnLucxjG.cjs.map +1 -0
  205. package/dist/chunk-CsWjBmdi.cjs +56 -0
  206. package/dist/chunk-CsWjBmdi.cjs.map +1 -0
  207. package/dist/chunk-CuseO5MZ.d.cts +3 -0
  208. package/dist/chunk-CvMHibbA.d.ts +427 -0
  209. package/dist/chunk-CwDeiN5U.js +870 -0
  210. package/dist/chunk-CwDeiN5U.js.map +1 -0
  211. package/dist/chunk-Cwdmx4tG.js +1 -0
  212. package/dist/chunk-D-4MxHTt.d.cts +105 -0
  213. package/dist/chunk-D-4MxHTt.d.ts +105 -0
  214. package/dist/chunk-D0LF-99V.js +1093 -0
  215. package/dist/chunk-D0LF-99V.js.map +1 -0
  216. package/dist/chunk-D1fe-0c_.js +367 -0
  217. package/dist/chunk-D1fe-0c_.js.map +1 -0
  218. package/dist/chunk-D21fEI6A.d.ts +1926 -0
  219. package/dist/chunk-D39gAxya.cjs +89 -0
  220. package/dist/chunk-D39gAxya.cjs.map +1 -0
  221. package/dist/chunk-D6KdIW5e.cjs +228 -0
  222. package/dist/chunk-D6KdIW5e.cjs.map +1 -0
  223. package/dist/chunk-D6qHYbgW.d.cts +36 -0
  224. package/dist/chunk-D89E-w70.d.ts +44 -0
  225. package/dist/chunk-D8bdTysL.js +552 -0
  226. package/dist/chunk-D8bdTysL.js.map +1 -0
  227. package/dist/chunk-D96QJT24.cjs +109 -0
  228. package/dist/chunk-D96QJT24.cjs.map +1 -0
  229. package/dist/chunk-DAmkQl-i.js +119 -0
  230. package/dist/chunk-DAmkQl-i.js.map +1 -0
  231. package/dist/chunk-DEfsb2lc.cjs +10 -0
  232. package/dist/chunk-DEfsb2lc.cjs.map +1 -0
  233. package/dist/chunk-DIFjT5-V.d.cts +66 -0
  234. package/dist/chunk-DJpUw8TN.d.ts +912 -0
  235. package/dist/chunk-DK6lm2IZ.cjs +11 -0
  236. package/dist/chunk-DK6lm2IZ.cjs.map +1 -0
  237. package/dist/chunk-DKqgr31j.cjs +61 -0
  238. package/dist/chunk-DKqgr31j.cjs.map +1 -0
  239. package/dist/chunk-DLZ0QYm9.js +37 -0
  240. package/dist/chunk-DLZ0QYm9.js.map +1 -0
  241. package/dist/chunk-DLjS0uaC.js +4 -0
  242. package/dist/chunk-DLjS0uaC.js.map +1 -0
  243. package/dist/chunk-DMokwmOV.cjs +49 -0
  244. package/dist/chunk-DMokwmOV.cjs.map +1 -0
  245. package/dist/chunk-DMvWgBZL.d.cts +1831 -0
  246. package/dist/chunk-DNfGfIF3.js +31 -0
  247. package/dist/chunk-DNfGfIF3.js.map +1 -0
  248. package/dist/chunk-DQbSRe8D.d.ts +245 -0
  249. package/dist/chunk-DSGkP8_y.js +45 -0
  250. package/dist/chunk-DSGkP8_y.js.map +1 -0
  251. package/dist/chunk-DTctvfSd.d.cts +197 -0
  252. package/dist/chunk-DWe7igyw.cjs +206 -0
  253. package/dist/chunk-DWe7igyw.cjs.map +1 -0
  254. package/dist/chunk-DWsMP5JR.d.ts +68 -0
  255. package/dist/chunk-DWsm3HIW.d.cts +120 -0
  256. package/dist/chunk-DWsm3HIW.d.ts +120 -0
  257. package/dist/chunk-DXABHjLa.cjs +3 -0
  258. package/dist/chunk-D_BeqSbc.cjs +42 -0
  259. package/dist/chunk-D_BeqSbc.cjs.map +1 -0
  260. package/dist/chunk-D_svQNdW.d.ts +66 -0
  261. package/dist/chunk-Dav4xWrp.js +330 -0
  262. package/dist/chunk-Dav4xWrp.js.map +1 -0
  263. package/dist/chunk-DbCPhepL.js +293 -0
  264. package/dist/chunk-DbCPhepL.js.map +1 -0
  265. package/dist/chunk-DcrTy-y2.cjs +43 -0
  266. package/dist/chunk-DcrTy-y2.cjs.map +1 -0
  267. package/dist/chunk-Ddv484ld.js +487 -0
  268. package/dist/chunk-Ddv484ld.js.map +1 -0
  269. package/dist/chunk-De0bjnhY.cjs +88 -0
  270. package/dist/chunk-De0bjnhY.cjs.map +1 -0
  271. package/dist/chunk-De2FmNPu.cjs +32 -0
  272. package/dist/chunk-De2FmNPu.cjs.map +1 -0
  273. package/dist/chunk-DeSjQXiI.d.ts +157 -0
  274. package/dist/chunk-Den0Ta6C.js +132 -0
  275. package/dist/chunk-Den0Ta6C.js.map +1 -0
  276. package/dist/chunk-DiDKEeEa.js +8 -0
  277. package/dist/chunk-DiDKEeEa.js.map +1 -0
  278. package/dist/chunk-Dj60k5PU.js +197 -0
  279. package/dist/chunk-Dj60k5PU.js.map +1 -0
  280. package/dist/chunk-DjnYQBCN.js +4705 -0
  281. package/dist/chunk-DjnYQBCN.js.map +1 -0
  282. package/dist/chunk-Dk9VKvyq.d.ts +1 -0
  283. package/dist/chunk-Dor1ERI9.cjs +85 -0
  284. package/dist/chunk-Dor1ERI9.cjs.map +1 -0
  285. package/dist/chunk-DpMouOoH.js +451 -0
  286. package/dist/chunk-DpMouOoH.js.map +1 -0
  287. package/dist/chunk-DposgdNL.cjs +52 -0
  288. package/dist/chunk-DposgdNL.cjs.map +1 -0
  289. package/dist/chunk-DqLTG_5Q.d.cts +3 -0
  290. package/dist/chunk-Dr5MCIpS.d.cts +63 -0
  291. package/dist/chunk-Dr5MCIpS.d.ts +63 -0
  292. package/dist/chunk-DrudttCC.cjs +4 -0
  293. package/dist/chunk-DsDYVJQC.js +173 -0
  294. package/dist/chunk-DsDYVJQC.js.map +1 -0
  295. package/dist/chunk-Dw8ur6FJ.js +27 -0
  296. package/dist/chunk-Dw8ur6FJ.js.map +1 -0
  297. package/dist/chunk-DwG6M_0v.js +64 -0
  298. package/dist/chunk-DwG6M_0v.js.map +1 -0
  299. package/dist/chunk-Dy9a5ibO.js +284 -0
  300. package/dist/chunk-Dy9a5ibO.js.map +1 -0
  301. package/dist/chunk-DyayZlQJ.js +157 -0
  302. package/dist/chunk-DyayZlQJ.js.map +1 -0
  303. package/dist/chunk-DyhJZC2i.js +126 -0
  304. package/dist/chunk-DyhJZC2i.js.map +1 -0
  305. package/dist/chunk-F9zBzmmG.cjs +45 -0
  306. package/dist/chunk-F9zBzmmG.cjs.map +1 -0
  307. package/dist/chunk-FyCYofv2.js +116 -0
  308. package/dist/chunk-FyCYofv2.js.map +1 -0
  309. package/dist/chunk-GHJRjAk2.js +1 -0
  310. package/dist/chunk-H14isiSf.d.ts +751 -0
  311. package/dist/chunk-HIJzXoN4.js +7 -0
  312. package/dist/chunk-HIJzXoN4.js.map +1 -0
  313. package/dist/chunk-Id_8kRtu.d.ts +36 -0
  314. package/dist/chunk-KN60yxBQ.js +5 -0
  315. package/dist/chunk-KN60yxBQ.js.map +1 -0
  316. package/dist/chunk-NM5yg6bh.cjs +82 -0
  317. package/dist/chunk-NM5yg6bh.cjs.map +1 -0
  318. package/dist/chunk-OXr3zJfM.cjs +119 -0
  319. package/dist/chunk-OXr3zJfM.cjs.map +1 -0
  320. package/dist/chunk-QGqgNC4z.d.ts +928 -0
  321. package/dist/chunk-QJBtJrZ0.js +36 -0
  322. package/dist/chunk-QJBtJrZ0.js.map +1 -0
  323. package/dist/chunk-QKWhxfPv.d.cts +361 -0
  324. package/dist/chunk-QKWhxfPv.d.ts +361 -0
  325. package/dist/chunk-QXW7b4Ev.d.cts +410 -0
  326. package/dist/chunk-RHZrxUrM.cjs +39 -0
  327. package/dist/chunk-RHZrxUrM.cjs.map +1 -0
  328. package/dist/chunk-RTxe2i66.js +91 -0
  329. package/dist/chunk-RTxe2i66.js.map +1 -0
  330. package/dist/chunk-RrKkJb6P.js +16 -0
  331. package/dist/chunk-RrKkJb6P.js.map +1 -0
  332. package/dist/chunk-VOJqpcnM.cjs +181 -0
  333. package/dist/chunk-VOJqpcnM.cjs.map +1 -0
  334. package/dist/chunk-VljGTrid.js +1 -0
  335. package/dist/chunk-X3UVwUEK.d.cts +513 -0
  336. package/dist/chunk-X9K2WChn.cjs +28 -0
  337. package/dist/chunk-X9K2WChn.cjs.map +1 -0
  338. package/dist/chunk-YrtOx6oy.js +251 -0
  339. package/dist/chunk-YrtOx6oy.js.map +1 -0
  340. package/dist/chunk-bY7ySujI.d.cts +928 -0
  341. package/dist/chunk-bYf1sBz5.d.cts +11 -0
  342. package/dist/chunk-bYf1sBz5.d.ts +11 -0
  343. package/dist/chunk-blfknWoM.d.cts +1926 -0
  344. package/dist/chunk-blqsohAb.js +113 -0
  345. package/dist/chunk-blqsohAb.js.map +1 -0
  346. package/dist/chunk-cDMCjodI.cjs +58 -0
  347. package/dist/chunk-cDMCjodI.cjs.map +1 -0
  348. package/dist/chunk-cWjE3qd6.cjs +10 -0
  349. package/dist/chunk-cWjE3qd6.cjs.map +1 -0
  350. package/dist/chunk-dfOgV3fu.js +26 -0
  351. package/dist/chunk-dfOgV3fu.js.map +1 -0
  352. package/dist/chunk-f9cTwUX1.cjs +125 -0
  353. package/dist/chunk-f9cTwUX1.cjs.map +1 -0
  354. package/dist/chunk-fHVYEZs4.cjs +28 -0
  355. package/dist/chunk-fHVYEZs4.cjs.map +1 -0
  356. package/dist/chunk-fWRUMgRI.js +22 -0
  357. package/dist/chunk-fWRUMgRI.js.map +1 -0
  358. package/dist/chunk-fozLXfHY.d.cts +55 -0
  359. package/dist/chunk-fozLXfHY.d.ts +55 -0
  360. package/dist/chunk-gWmB1l3A.cjs +3122 -0
  361. package/dist/chunk-gWmB1l3A.cjs.map +1 -0
  362. package/dist/chunk-gbj2R-_w.js +58 -0
  363. package/dist/chunk-gbj2R-_w.js.map +1 -0
  364. package/dist/chunk-iIWxsAXd.js +59 -0
  365. package/dist/chunk-iIWxsAXd.js.map +1 -0
  366. package/dist/chunk-lItIuOIS.cjs +137 -0
  367. package/dist/chunk-lItIuOIS.cjs.map +1 -0
  368. package/dist/chunk-m6Rh4PCe.cjs +798 -0
  369. package/dist/chunk-m6Rh4PCe.cjs.map +1 -0
  370. package/dist/chunk-o3IRANDf.cjs +99 -0
  371. package/dist/chunk-o3IRANDf.cjs.map +1 -0
  372. package/dist/chunk-obUcg3Sk.d.ts +808 -0
  373. package/dist/chunk-ohsf-6Rn.js +600 -0
  374. package/dist/chunk-ohsf-6Rn.js.map +1 -0
  375. package/dist/chunk-pBleU6Nv.js +3061 -0
  376. package/dist/chunk-pBleU6Nv.js.map +1 -0
  377. package/dist/chunk-px4e99cy.js +71 -0
  378. package/dist/chunk-px4e99cy.js.map +1 -0
  379. package/dist/chunk-qwYDLeXc.cjs +99 -0
  380. package/dist/chunk-qwYDLeXc.cjs.map +1 -0
  381. package/dist/chunk-rF_859Qk.cjs +101 -0
  382. package/dist/chunk-rF_859Qk.cjs.map +1 -0
  383. package/dist/chunk-rLJkqJ5j.d.ts +1475 -0
  384. package/dist/chunk-twQItIRg.cjs +338 -0
  385. package/dist/chunk-twQItIRg.cjs.map +1 -0
  386. package/dist/chunk-vnPrMVjY.js +10 -0
  387. package/dist/chunk-vnPrMVjY.js.map +1 -0
  388. package/dist/chunk-ws3bVwaS.d.ts +410 -0
  389. package/dist/chunk-xh3UkuVs.cjs +246 -0
  390. package/dist/chunk-xh3UkuVs.cjs.map +1 -0
  391. package/dist/chunk-yMzRr26E.js +153 -0
  392. package/dist/chunk-yMzRr26E.js.map +1 -0
  393. package/dist/collab/index.cjs +831 -0
  394. package/dist/collab/index.cjs.map +1 -0
  395. package/dist/collab/index.d.cts +824 -0
  396. package/dist/collab/index.d.ts +824 -0
  397. package/dist/collab/index.js +819 -0
  398. package/dist/collab/index.js.map +1 -0
  399. package/dist/data/index.cjs +39 -0
  400. package/dist/data/index.d.cts +6 -0
  401. package/dist/data/index.d.ts +6 -0
  402. package/dist/data/index.js +7 -0
  403. package/dist/editor/index.cjs +2713 -0
  404. package/dist/editor/index.cjs.map +1 -0
  405. package/dist/editor/index.d.cts +10 -0
  406. package/dist/editor/index.d.ts +10 -0
  407. package/dist/editor/index.js +2702 -0
  408. package/dist/editor/index.js.map +1 -0
  409. package/dist/errors/index.cjs +11 -0
  410. package/dist/errors/index.d.cts +2 -0
  411. package/dist/errors/index.d.ts +2 -0
  412. package/dist/errors/index.js +1 -0
  413. package/dist/geo/index.cjs +68 -0
  414. package/dist/geo/index.d.cts +6 -0
  415. package/dist/geo/index.d.ts +6 -0
  416. package/dist/geo/index.js +11 -0
  417. package/dist/i18n/fr/index.cjs +333 -0
  418. package/dist/i18n/fr/index.cjs.map +1 -0
  419. package/dist/i18n/fr/index.d.cts +18 -0
  420. package/dist/i18n/fr/index.d.ts +18 -0
  421. package/dist/i18n/fr/index.js +328 -0
  422. package/dist/i18n/fr/index.js.map +1 -0
  423. package/dist/i18n/index.cjs +451 -0
  424. package/dist/i18n/index.cjs.map +1 -0
  425. package/dist/i18n/index.d.cts +268 -0
  426. package/dist/i18n/index.d.ts +268 -0
  427. package/dist/i18n/index.js +430 -0
  428. package/dist/i18n/index.js.map +1 -0
  429. package/dist/icons/index.cjs +37 -0
  430. package/dist/icons/index.d.cts +4 -0
  431. package/dist/icons/index.d.ts +4 -0
  432. package/dist/icons/index.js +8 -0
  433. package/dist/index.cjs +517 -0
  434. package/dist/index.cjs.map +1 -0
  435. package/dist/index.d.cts +174 -0
  436. package/dist/index.d.ts +174 -0
  437. package/dist/index.js +54 -0
  438. package/dist/index.js.map +1 -0
  439. package/dist/layers/index.cjs +83 -0
  440. package/dist/layers/index.d.cts +3 -0
  441. package/dist/layers/index.d.ts +3 -0
  442. package/dist/layers/index.js +5 -0
  443. package/dist/map-client/index.cjs +5 -0
  444. package/dist/map-client/index.d.cts +6 -0
  445. package/dist/map-client/index.d.ts +6 -0
  446. package/dist/map-client/index.js +0 -0
  447. package/dist/maplibre-worker.mjs +12 -0
  448. package/dist/navigation/index.cjs +612 -0
  449. package/dist/navigation/index.cjs.map +1 -0
  450. package/dist/navigation/index.d.cts +551 -0
  451. package/dist/navigation/index.d.ts +551 -0
  452. package/dist/navigation/index.js +599 -0
  453. package/dist/navigation/index.js.map +1 -0
  454. package/dist/profile/index.cjs +177 -0
  455. package/dist/profile/index.d.cts +8 -0
  456. package/dist/profile/index.d.ts +8 -0
  457. package/dist/profile/index.js +10 -0
  458. package/dist/seams/index.cjs +15 -0
  459. package/dist/seams/index.d.cts +4 -0
  460. package/dist/seams/index.d.ts +4 -0
  461. package/dist/seams/index.js +4 -0
  462. package/dist/search/index.cjs +39 -0
  463. package/dist/search/index.d.cts +6 -0
  464. package/dist/search/index.d.ts +6 -0
  465. package/dist/search/index.js +3 -0
  466. package/dist/style/index.cjs +34 -0
  467. package/dist/style/index.d.cts +5 -0
  468. package/dist/style/index.d.ts +5 -0
  469. package/dist/style/index.js +5 -0
  470. package/dist/styles.css +11 -0
  471. package/dist/testing/index.cjs +444 -0
  472. package/dist/testing/index.cjs.map +1 -0
  473. package/dist/testing/index.d.cts +217 -0
  474. package/dist/testing/index.d.ts +217 -0
  475. package/dist/testing/index.js +435 -0
  476. package/dist/testing/index.js.map +1 -0
  477. package/dist/timezone/index.cjs +1953 -0
  478. package/dist/timezone/index.cjs.map +1 -0
  479. package/dist/timezone/index.d.cts +28 -0
  480. package/dist/timezone/index.d.ts +28 -0
  481. package/dist/timezone/index.js +1948 -0
  482. package/dist/timezone/index.js.map +1 -0
  483. package/dist/units/index.cjs +29 -0
  484. package/dist/units/index.d.cts +3 -0
  485. package/dist/units/index.d.ts +3 -0
  486. package/dist/units/index.js +3 -0
  487. package/dist/video/index.cjs +1713 -0
  488. package/dist/video/index.cjs.map +1 -0
  489. package/dist/video/index.d.cts +846 -0
  490. package/dist/video/index.d.ts +846 -0
  491. package/dist/video/index.js +1689 -0
  492. package/dist/video/index.js.map +1 -0
  493. package/dist/view/index.cjs +7 -0
  494. package/dist/view/index.d.cts +3 -0
  495. package/dist/view/index.d.ts +3 -0
  496. package/dist/view/index.js +1 -0
  497. package/package.json +433 -4
  498. package/src/agent/engines/session.ts +2255 -0
  499. package/src/agent/index.ts +109 -0
  500. package/src/agent/rules/agentError.ts +128 -0
  501. package/src/agent/rules/boundedInputJson.ts +53 -0
  502. package/src/agent/rules/conversation.ts +629 -0
  503. package/src/agent/rules/conversationFaults.ts +349 -0
  504. package/src/agent/rules/conversationHost.ts +390 -0
  505. package/src/agent/rules/dispatcher.ts +102 -0
  506. package/src/agent/rules/errorCodes.ts +78 -0
  507. package/src/agent/rules/errorStatus.ts +65 -0
  508. package/src/agent/rules/scriptedTransport.ts +390 -0
  509. package/src/agent/rules/stickToBottom.ts +38 -0
  510. package/src/agent/rules/toolResultPayload.ts +197 -0
  511. package/src/auth/rules/clientHeader.ts +22 -0
  512. package/src/auth/rules/sentCredential.ts +76 -0
  513. package/src/auth/rules/transformRequest.ts +803 -0
  514. package/src/camera/engines/videoFlight.ts +1758 -0
  515. package/src/camera/index.ts +157 -0
  516. package/src/camera/rules/clearance.ts +1099 -0
  517. package/src/camera/rules/fit.ts +132 -0
  518. package/src/camera/rules/modes.ts +1019 -0
  519. package/src/camera/rules/plan.ts +478 -0
  520. package/src/camera/rules/planner.ts +129 -0
  521. package/src/camera/rules/poseRanges.ts +38 -0
  522. package/src/camera/rules/presets.ts +185 -0
  523. package/src/camera/rules/profileSamples.ts +243 -0
  524. package/src/camera/rules/route.ts +596 -0
  525. package/src/camera/rules/routeContent.ts +105 -0
  526. package/src/camera/rules/spline.ts +765 -0
  527. package/src/camera/rules/sweptViewports.ts +39 -0
  528. package/src/camera/rules/track.ts +1412 -0
  529. package/src/camera/rules/vocabulary.ts +130 -0
  530. package/src/camera/rules/zoom.ts +216 -0
  531. package/src/collab/engines/session.ts +1902 -0
  532. package/src/collab/engines/trailingThrottle.ts +151 -0
  533. package/src/collab/index.ts +52 -0
  534. package/src/collab/rules/dispatch.ts +143 -0
  535. package/src/collab/rules/peerNames.ts +51 -0
  536. package/src/collab/rules/scriptedTransport.ts +244 -0
  537. package/src/compose/engines/baseMapSwitch.ts +1136 -0
  538. package/src/compose/engines/events.ts +962 -0
  539. package/src/compose/engines/mountayaMap.ts +5648 -0
  540. package/src/compose/engines/sentCredentials.ts +146 -0
  541. package/src/compose/engines/slotRequests.ts +413 -0
  542. package/src/compose/rules/accessRefusal.ts +109 -0
  543. package/src/compose/rules/accessStanding.ts +75 -0
  544. package/src/compose/rules/analysisKinds.ts +331 -0
  545. package/src/compose/rules/analysisLayers.ts +176 -0
  546. package/src/compose/rules/cameraMoves.ts +38 -0
  547. package/src/compose/rules/carriedLayers.ts +87 -0
  548. package/src/compose/rules/developmentWarnings.ts +167 -0
  549. package/src/compose/rules/fitBox.ts +67 -0
  550. package/src/compose/rules/fitCamera.ts +54 -0
  551. package/src/compose/rules/geoJsonSlot.ts +61 -0
  552. package/src/compose/rules/geometrySlots.ts +155 -0
  553. package/src/compose/rules/glyphNode.ts +62 -0
  554. package/src/compose/rules/layerKeys.ts +92 -0
  555. package/src/compose/rules/layerOrder.ts +85 -0
  556. package/src/compose/rules/layersManifest.ts +26 -0
  557. package/src/compose/rules/mapOptions.ts +300 -0
  558. package/src/compose/rules/maplibreWorkerVersion.gen.ts +8 -0
  559. package/src/compose/rules/markerPin.ts +122 -0
  560. package/src/compose/rules/markerRegistry.ts +85 -0
  561. package/src/compose/rules/markerSprite.ts +382 -0
  562. package/src/compose/rules/maxBounds.ts +120 -0
  563. package/src/compose/rules/overlayLookup.ts +49 -0
  564. package/src/compose/rules/paintDiff.ts +38 -0
  565. package/src/compose/rules/panLock.ts +77 -0
  566. package/src/compose/rules/patch.ts +124 -0
  567. package/src/compose/rules/queriedFeature.ts +55 -0
  568. package/src/compose/rules/queryLayers.ts +46 -0
  569. package/src/compose/rules/searchHighlight.ts +313 -0
  570. package/src/compose/rules/slotNames.ts +19 -0
  571. package/src/compose/rules/stripeImage.ts +253 -0
  572. package/src/compose/rules/swapMarker.ts +66 -0
  573. package/src/compose/rules/terrainVariant.ts +88 -0
  574. package/src/compose/rules/types.ts +559 -0
  575. package/src/compose/rules/urlHash.ts +19 -0
  576. package/src/compose/rules/viewOptions.ts +451 -0
  577. package/src/compose/rules/workerUrl.ts +131 -0
  578. package/src/data/engines/itineraryResource.ts +643 -0
  579. package/src/data/index.ts +78 -0
  580. package/src/data/rules/adapt.ts +473 -0
  581. package/src/data/rules/editModes.ts +51 -0
  582. package/src/data/rules/itinerary.ts +168 -0
  583. package/src/data/rules/nullable.ts +63 -0
  584. package/src/data/rules/roadAccess.ts +169 -0
  585. package/src/data/rules/segmentGroups.ts +309 -0
  586. package/src/data/rules/selectors.ts +95 -0
  587. package/src/data/rules/zones.ts +79 -0
  588. package/src/draw/engines/boundaryEngine.ts +1003 -0
  589. package/src/draw/engines/framedAdapter.ts +198 -0
  590. package/src/draw/engines/pointerCursor.ts +205 -0
  591. package/src/draw/engines/segmentEngine.ts +1405 -0
  592. package/src/draw/engines/snapIndex.ts +254 -0
  593. package/src/draw/engines/waypointEngine.ts +574 -0
  594. package/src/draw/engines/zoneEngine.ts +1137 -0
  595. package/src/draw/rules/drawFrame.ts +123 -0
  596. package/src/draw/rules/insertVertex.ts +226 -0
  597. package/src/draw/rules/screenSpace.ts +62 -0
  598. package/src/draw/rules/seeds.ts +185 -0
  599. package/src/draw/rules/snap.ts +115 -0
  600. package/src/draw/rules/snapCameraKey.ts +50 -0
  601. package/src/draw/rules/terraDrawShared.ts +214 -0
  602. package/src/draw/rules/zoneOutline.ts +213 -0
  603. package/src/editing/engines/cursor.ts +505 -0
  604. package/src/editing/engines/draftMarker.ts +149 -0
  605. package/src/editing/rules/accent.ts +11 -0
  606. package/src/editing/rules/engine.ts +288 -0
  607. package/src/editing/rules/placement.ts +22 -0
  608. package/src/editing/rules/positions.ts +89 -0
  609. package/src/editing/rules/sources.ts +9 -0
  610. package/src/editing/rules/types.ts +457 -0
  611. package/src/editing/rules/vocabulary.ts +10 -0
  612. package/src/editing/rules/waypointCursor.ts +228 -0
  613. package/src/editor/engines/directionArrows.ts +459 -0
  614. package/src/editor/engines/directions.ts +1383 -0
  615. package/src/editor/engines/editorClient.ts +134 -0
  616. package/src/editor/engines/eventScope.ts +59 -0
  617. package/src/editor/engines/frameLoop.ts +159 -0
  618. package/src/editor/engines/itineraryPreview.ts +272 -0
  619. package/src/editor/engines/mapLockGuard.ts +66 -0
  620. package/src/editor/engines/overlayRenderer.ts +2696 -0
  621. package/src/editor/engines/peerDraft.ts +760 -0
  622. package/src/editor/engines/poiPick.ts +305 -0
  623. package/src/editor/engines/pointPick.ts +84 -0
  624. package/src/editor/engines/roadAccessLine.ts +140 -0
  625. package/src/editor/engines/searchHighlight.ts +183 -0
  626. package/src/editor/engines/viewClient.ts +4091 -0
  627. package/src/editor/engines/zoneBadges.ts +503 -0
  628. package/src/editor/index.ts +97 -0
  629. package/src/editor/rules/accentColor.ts +116 -0
  630. package/src/editor/rules/camera.ts +121 -0
  631. package/src/editor/rules/contract.ts +120 -0
  632. package/src/editor/rules/icons.ts +825 -0
  633. package/src/editor/rules/markerElements.ts +244 -0
  634. package/src/editor/rules/style.ts +51 -0
  635. package/src/editor/rules/terrain.ts +98 -0
  636. package/src/editor/rules/tileWarm.ts +191 -0
  637. package/src/editor/rules/tilesReload.ts +158 -0
  638. package/src/editor/rules/zoneBadgePlacement.ts +1832 -0
  639. package/src/editor/rules/zoneTimeStyling.ts +119 -0
  640. package/src/errors/index.ts +25 -0
  641. package/src/errors/rules/errors.ts +158 -0
  642. package/src/errors/rules/print.ts +129 -0
  643. package/src/geo/index.ts +89 -0
  644. package/src/geo/rules/boundaries.ts +105 -0
  645. package/src/geo/rules/camera.ts +496 -0
  646. package/src/geo/rules/corridor.ts +242 -0
  647. package/src/geo/rules/elevationTiles.ts +269 -0
  648. package/src/geo/rules/formatLngLat.ts +63 -0
  649. package/src/geo/rules/geodesy.ts +125 -0
  650. package/src/geo/rules/geometry.ts +362 -0
  651. package/src/geo/rules/lineWalk.ts +77 -0
  652. package/src/geo/rules/longitude.ts +99 -0
  653. package/src/geo/rules/searchLimits.ts +22 -0
  654. package/src/geo/rules/segmentGeometry.ts +80 -0
  655. package/src/geo/rules/terrain.ts +107 -0
  656. package/src/geo/rules/tuples.ts +124 -0
  657. package/src/geo/rules/types.ts +54 -0
  658. package/src/geo/rules/webMercator.ts +57 -0
  659. package/src/i18n/fr/index.ts +17 -0
  660. package/src/i18n/fr/rules/fr.ts +85 -0
  661. package/src/i18n/fr/rules/words.gen.ts +277 -0
  662. package/src/i18n/index.ts +82 -0
  663. package/src/i18n/rules/bundle.ts +378 -0
  664. package/src/i18n/rules/config.ts +71 -0
  665. package/src/i18n/rules/dates.ts +165 -0
  666. package/src/i18n/rules/endonyms.gen.ts +19 -0
  667. package/src/i18n/rules/language.ts +92 -0
  668. package/src/i18n/rules/localizedName.ts +33 -0
  669. package/src/i18n/rules/merge.ts +106 -0
  670. package/src/i18n/rules/scope.ts +127 -0
  671. package/src/i18n/rules/strings.ts +632 -0
  672. package/src/i18n/rules/videoOverlay.ts +121 -0
  673. package/src/i18n/rules/wordForms.ts +95 -0
  674. package/src/i18n/rules/words.gen.ts +277 -0
  675. package/src/icons/index.ts +54 -0
  676. package/src/icons/rules/activities.ts +40 -0
  677. package/src/icons/rules/amenities.ts +250 -0
  678. package/src/icons/rules/artwork.gen.ts +83 -0
  679. package/src/icons/rules/artwork.ts +47 -0
  680. package/src/icons/rules/fallback.ts +21 -0
  681. package/src/icons/rules/lucideMarkers.gen.ts +112 -0
  682. package/src/icons/rules/lucideUi.gen.ts +197 -0
  683. package/src/icons/rules/paint.ts +107 -0
  684. package/src/icons/rules/parse.ts +475 -0
  685. package/src/icons/rules/provider.ts +373 -0
  686. package/src/icons/rules/sprites.ts +54 -0
  687. package/src/icons/rules/ui.ts +348 -0
  688. package/src/icons/rules/waypoints.ts +215 -0
  689. package/src/index.ts +993 -0
  690. package/src/layers/engines/layersSelection.ts +515 -0
  691. package/src/layers/engines/readoutEngine.ts +131 -0
  692. package/src/layers/index.ts +151 -0
  693. package/src/layers/rules/analysis.ts +135 -0
  694. package/src/layers/rules/enrichment.ts +30 -0
  695. package/src/layers/rules/geoJson.ts +270 -0
  696. package/src/layers/rules/hover.ts +67 -0
  697. package/src/layers/rules/itineraries.ts +182 -0
  698. package/src/layers/rules/layersPanel.ts +237 -0
  699. package/src/layers/rules/order.ts +194 -0
  700. package/src/layers/rules/overlayInstant.ts +49 -0
  701. package/src/layers/rules/overlays.ts +52 -0
  702. package/src/layers/rules/poiPanel.ts +119 -0
  703. package/src/layers/rules/pois.ts +114 -0
  704. package/src/layers/rules/readout.ts +340 -0
  705. package/src/layers/rules/streetView.ts +16 -0
  706. package/src/layers/rules/tileTimestamp.ts +146 -0
  707. package/src/layers/rules/timeSlider.ts +192 -0
  708. package/src/layers/rules/timeWindow.ts +123 -0
  709. package/src/layers/rules/zones.ts +43 -0
  710. package/src/layers/rules/zoom.ts +77 -0
  711. package/src/map-client/index.ts +71 -0
  712. package/src/map-client/rules/mapClient.ts +1945 -0
  713. package/src/navigation/engines/navigation.ts +493 -0
  714. package/src/navigation/index.ts +51 -0
  715. package/src/navigation/rules/followedRoute.ts +78 -0
  716. package/src/navigation/rules/instructions.ts +89 -0
  717. package/src/navigation/rules/itineraryRoute.ts +232 -0
  718. package/src/navigation/rules/offRoute.ts +41 -0
  719. package/src/navigation/rules/progress.ts +230 -0
  720. package/src/navigation/rules/prompts.ts +217 -0
  721. package/src/navigation/rules/routeRequest.ts +98 -0
  722. package/src/navigation/rules/status.ts +142 -0
  723. package/src/navigation/rules/steps.ts +234 -0
  724. package/src/navigation/rules/types.ts +83 -0
  725. package/src/profile/index.ts +307 -0
  726. package/src/profile/rules/amenityBadge.ts +35 -0
  727. package/src/profile/rules/amenityFilter.ts +74 -0
  728. package/src/profile/rules/amenityStacks.ts +66 -0
  729. package/src/profile/rules/axis.ts +89 -0
  730. package/src/profile/rules/axisCulling.ts +83 -0
  731. package/src/profile/rules/axisLookup.ts +180 -0
  732. package/src/profile/rules/climbs.ts +292 -0
  733. package/src/profile/rules/cursorMarker.ts +122 -0
  734. package/src/profile/rules/cursorReadout.ts +104 -0
  735. package/src/profile/rules/curvePlacement.ts +216 -0
  736. package/src/profile/rules/dock.ts +293 -0
  737. package/src/profile/rules/elevation.ts +1263 -0
  738. package/src/profile/rules/instant.ts +89 -0
  739. package/src/profile/rules/intl.ts +237 -0
  740. package/src/profile/rules/legEmphasis.ts +53 -0
  741. package/src/profile/rules/profileColors.ts +66 -0
  742. package/src/profile/rules/profileLayout.ts +59 -0
  743. package/src/profile/rules/profileSlices.ts +55 -0
  744. package/src/profile/rules/routeProfile.ts +475 -0
  745. package/src/profile/rules/rowMatch.ts +50 -0
  746. package/src/profile/rules/scale.ts +646 -0
  747. package/src/profile/rules/scaleFrame.ts +171 -0
  748. package/src/profile/rules/sectionChips.ts +83 -0
  749. package/src/profile/rules/sections.ts +923 -0
  750. package/src/profile/rules/slopeRamp.ts +160 -0
  751. package/src/profile/rules/statStrip.ts +103 -0
  752. package/src/profile/rules/steepness.ts +51 -0
  753. package/src/profile/rules/tableCells.ts +269 -0
  754. package/src/profile/rules/tableCursor.ts +87 -0
  755. package/src/profile/rules/unitPatterns.ts +335 -0
  756. package/src/profile/rules/units.ts +1025 -0
  757. package/src/profile/rules/waypointCard.ts +590 -0
  758. package/src/profile/rules/webAddress.ts +130 -0
  759. package/src/profile/rules/windowSpans.ts +65 -0
  760. package/src/rules/asciiFold.ts +17 -0
  761. package/src/rules/inDevelopment.ts +54 -0
  762. package/src/rules/listeners.ts +62 -0
  763. package/src/rules/timers.ts +9 -0
  764. package/src/rules/types.ts +22 -0
  765. package/src/rules/uuid.ts +87 -0
  766. package/src/seams/engines/geolocateControl.ts +286 -0
  767. package/src/seams/index.ts +50 -0
  768. package/src/seams/rules/clock.ts +169 -0
  769. package/src/seams/rules/geolocation.ts +165 -0
  770. package/src/seams/rules/segmentRoute.ts +187 -0
  771. package/src/search/engines/search.ts +1093 -0
  772. package/src/search/index.ts +99 -0
  773. package/src/search/rules/describe.ts +383 -0
  774. package/src/search/rules/filters.ts +195 -0
  775. package/src/search/rules/highlight.ts +270 -0
  776. package/src/search/rules/pick.ts +90 -0
  777. package/src/search/rules/rows.ts +258 -0
  778. package/src/search/rules/searchFocus.ts +27 -0
  779. package/src/search/rules/searchViewport.ts +44 -0
  780. package/src/search/rules/shown.ts +77 -0
  781. package/src/search/rules/types.ts +340 -0
  782. package/src/stream/rules/reconnectSchedule.ts +83 -0
  783. package/src/style/engines/organizationRead.ts +80 -0
  784. package/src/style/index.ts +63 -0
  785. package/src/style/rules/apply.ts +268 -0
  786. package/src/style/rules/attribution.ts +119 -0
  787. package/src/style/rules/itineraryLine.ts +142 -0
  788. package/src/style/rules/language.ts +668 -0
  789. package/src/style/rules/layout.gen.ts +27 -0
  790. package/src/style/rules/organization.ts +96 -0
  791. package/src/style/rules/paint.ts +143 -0
  792. package/src/style/rules/panelLayout.ts +51 -0
  793. package/src/style/rules/roadAccessColors.ts +29 -0
  794. package/src/style/rules/roadAccessLine.ts +267 -0
  795. package/src/style/rules/segmentColors.ts +207 -0
  796. package/src/testing/catalogs.ts +103 -0
  797. package/src/testing/index.ts +30 -0
  798. package/src/testing/mapClient.ts +241 -0
  799. package/src/testing/mountayaMap.ts +741 -0
  800. package/src/timezone/index.ts +14 -0
  801. package/src/timezone/rules/viewport.ts +875 -0
  802. package/src/units/index.ts +55 -0
  803. package/src/units/rules/conversions.ts +620 -0
  804. package/src/units/rules/preferenceChoices.ts +124 -0
  805. package/src/units/rules/preferences.ts +77 -0
  806. package/src/units/rules/rounding.ts +69 -0
  807. package/src/video/engines/videoRun.ts +654 -0
  808. package/src/video/engines/viewClient.ts +6 -0
  809. package/src/video/index.ts +83 -0
  810. package/src/video/profileOverlay/rules/contract.ts +210 -0
  811. package/src/video/profileOverlay/rules/curve.ts +216 -0
  812. package/src/video/profileOverlay/rules/draw.ts +410 -0
  813. package/src/video/profileOverlay/rules/fonts.ts +54 -0
  814. package/src/video/profileOverlay/rules/graphDesign.ts +690 -0
  815. package/src/video/profileOverlay/rules/minimalDesign.ts +144 -0
  816. package/src/video/profileOverlay/rules/registry.ts +23 -0
  817. package/src/video/profileOverlay/rules/staticLayer.ts +582 -0
  818. package/src/video/profileOverlay/rules/stripDesign.ts +327 -0
  819. package/src/video/profileOverlay/rules/types.ts +78 -0
  820. package/src/video/rules/videoConstants.ts +250 -0
  821. package/src/video/rules/videoEncoder.ts +277 -0
  822. package/src/video/rules/videoFrames.ts +99 -0
  823. package/src/video/rules/videoPreview.ts +185 -0
  824. package/src/video/rules/videoRecorder.ts +746 -0
  825. package/src/video/rules/videoWatermark.ts +155 -0
  826. package/src/video/rules/watermarkMark.ts +40 -0
  827. package/src/view/engines/viewClient.ts +6 -0
  828. package/src/view/index.ts +20 -0
@@ -0,0 +1,1723 @@
1
+ import { A as CameraMode, B as VideoRecordingPhase, C as CAMERA_FPS, D as CameraAspect, E as CAMERA_RESOLUTIONS, F as QUALITY_TIERS, I as Quality, L as VIDEO_PRESETS_AVAILABLE, M as CameraResolution, N as PROFILE_DESIGNS, O as CameraBearingMode, P as ProfileDesign, R as VIDEO_RECORDING_PHASES, S as CAMERA_BEARING_MODES, T as CAMERA_OUTPUT_FORMATS, _ as createCameraPlan, a as VideoRecordingResult, b as insertShotSorted, c as SegmentSpan, d as CameraPlan, f as CameraPlanInput, g as ShotCamera, h as RouteGeometry, i as VideoProgress, j as CameraOutputFormat, k as CameraFps, l as resolveProfileSamples, m as DEFAULT_TARGET_DURATION_MS, n as RecordProfile, o as ProfileSample, p as CameraShot, r as RecordingCamera, s as ProfileSource, t as RecordOutput, u as CameraOutput, v as defaultCameraOutput, w as CAMERA_MODES, x as CAMERA_ASPECTS, y as defaultCameraShot, z as VideoPreset } from "../chunk-CAUZnoCs.js";
2
+ import { r as LngLat, t as BoundingBox } from "../chunk-fozLXfHY.js";
3
+ import { r as UnitFormatOptions } from "../chunk-5pTPpv4v.js";
4
+ import { i as routeLengthMeters, n as cumulativeMeters } from "../chunk-Bk0L8g5J.js";
5
+ import { g as ItineraryWithDetails } from "../chunk-QKWhxfPv.js";
6
+ /**
7
+ * RouteCursor is a sampled position along an itinerary: the interpolated [lng, lat]
8
+ * `point`, the `bearingDeg` of the itinerary's tangent there (the heading the path
9
+ * is travelling, 0..360), and the `index` of the line vertex at or before the
10
+ * point (so a caller can read a per-vertex channel such as elevation without a
11
+ * second search). Produced by cursorAtFraction.
12
+ */
13
+ interface RouteCursor {
14
+ bearingDeg: number;
15
+ index: number;
16
+ point: LngLat;
17
+ }
18
+ /**
19
+ * pointAtMeters returns the [lng, lat] located at the given arc-length along the
20
+ * line, linearly interpolating between the two vertices whose cumulative
21
+ * distances bracket the target. The target is clamped to the line, so a value
22
+ * below 0 resolves to the first vertex and one past the end to the last. An
23
+ * empty line yields [0, 0]. The optional precomputed `cumulative` avoids
24
+ * re-measuring the line when the caller already holds it (the per-frame path).
25
+ *
26
+ * A vertex that names no place is passed over, as {@link cumulativeMeters} bridges it, so the
27
+ * first vertex is the first that names one. A line none of whose vertices names a place, and a
28
+ * distance that is no number, have no position along the line: the answer is `[NaN, NaN]`.
29
+ *
30
+ * A leg is interpolated the short way round ({@link longitudeDelta}), as its length is
31
+ * measured: on a leg written 179.9 then -179.9 the point halfway is on the antimeridian, never
32
+ * on the prime meridian the two numbers average to. The longitude continues from the leg's
33
+ * first vertex, so it runs past 180 where the leg crosses eastward and below -180 where it
34
+ * crosses westward, which a renderer reads as the same place.
35
+ *
36
+ * @param line The route's vertices, `[lng, lat]` in degrees.
37
+ * @param targetMeters How far along the line, in meters; held to the line's length.
38
+ * @param cumulative The line's {@link cumulativeMeters}. Defaults to measuring the line again.
39
+ */
40
+ export declare const pointAtMeters: (line: readonly LngLat[], targetMeters: number, cumulative?: readonly number[]) => LngLat;
41
+ /**
42
+ * bearingDegBetween returns the initial great-circle bearing in degrees (0..360)
43
+ * from a to b: the heading to travel to go from the first point to the second.
44
+ * Two identical points have no defined heading and return 0.
45
+ */
46
+ export declare const bearingDegBetween: (a: LngLat, b: LngLat) => number;
47
+ /**
48
+ * tangentBearingAtMeters returns the itinerary's heading in degrees (0..360) at the
49
+ * given arc-length, sampled by looking `lookaheadMeters` further along the line
50
+ * and taking the bearing from the cursor to that ahead-point. A larger lookahead
51
+ * yields a steadier heading through dense vertices (the camera anticipates turns
52
+ * rather than twitching); the ahead-point is clamped to the itinerary end. Falls
53
+ * back to the heading of the bracketing leg when the lookahead collapses to the
54
+ * same point (at the very end of the itinerary, or with a lookahead of zero): the
55
+ * leg that starts at the vertex at or before the cursor, or the nearest leg before
56
+ * it that has a length, so a route that writes its last vertex twice keeps the
57
+ * heading it arrived with. Where no leg up to the cursor has a length (a route that
58
+ * writes its first vertex twice), the first leg after the cursor that has one is
59
+ * read: the heading the route leaves on. A line with no leg that has a length answers 0. The
60
+ * optional precomputed `cumulative` is reused on the per-frame path.
61
+ *
62
+ * @param line The route's vertices, `[lng, lat]` in degrees.
63
+ * @param targetMeters Where along the line the heading is read, in meters.
64
+ * @param lookaheadMeters How far ahead of that point the heading aims, in meters.
65
+ * @param cumulative The line's {@link cumulativeMeters}. Defaults to measuring the line again.
66
+ */
67
+ export declare const tangentBearingAtMeters: (line: readonly LngLat[], targetMeters: number, lookaheadMeters: number, cumulative?: readonly number[]) => number;
68
+ /**
69
+ * cursorAtFraction samples an itinerary at a progress fraction (0..1 of total
70
+ * length): it returns the interpolated point, the tangent bearing there (using
71
+ * `lookaheadMeters` for a steady heading), and the index of the vertex at or
72
+ * before the point. The fraction is clamped to [0, 1] so an out-of-range value
73
+ * resolves to an endpoint. This is the single seam the resolver and the
74
+ * generators sample the itinerary through, so progress maps to a position the same
75
+ * way for every consumer.
76
+ *
77
+ * @param line The route's vertices, `[lng, lat]` in degrees.
78
+ * @param fraction The progress along the line, 0 at its start and 1 at its end.
79
+ * @param lookaheadMeters How far ahead of the point the tangent bearing aims, in meters.
80
+ * @param cumulative The line's {@link cumulativeMeters}. Defaults to measuring the line again.
81
+ */
82
+ export declare const cursorAtFraction: (line: readonly LngLat[], fraction: number, lookaheadMeters: number, cumulative?: readonly number[]) => RouteCursor;
83
+ /**
84
+ * itineraryToRouteGeometry flattens an itinerary, or one of its segments, into the single
85
+ * {@link RouteGeometry} a camera plan resolves against.
86
+ *
87
+ * Every line a segment holds is laid end to end, in the order the segments and their lines are
88
+ * written: the lines {@link extractLines} answers, a `MultiLineString`'s tracks included, so the
89
+ * flight follows the vertices the profile's points and bands stand on. A directions segment's
90
+ * via `MultiPoint` is no line and is left out. The vertex each line after the first starts on is
91
+ * named in `jumps`, since the camera flies the leg that reaches it and the itinerary's distance
92
+ * axis charges nothing for it. A route read off one line states none.
93
+ *
94
+ * `elevations` is stated only when every vertex kept carries a finite one. A route mixing 2D
95
+ * and 3D vertices, or holding an elevation that is no finite number, is flown as a 2D one: a
96
+ * partial list would not line up with `line`, and {@link elevationAtFraction} reads the two by
97
+ * one index.
98
+ *
99
+ * A vertex that names no place ({@link namesPlace}) is left out, with its elevation: kept, it
100
+ * would turn the route's length into `NaN`, and every pose resolved over it.
101
+ *
102
+ * @param itinerary The itinerary, or null where none is loaded.
103
+ * @param segmentId The one segment to fly, or null for the whole itinerary.
104
+ * @returns The route, or null where fewer than two vertices name a place: no itinerary, an
105
+ * unknown segment, or segments holding no line. A flight needs a direction.
106
+ */
107
+ export declare const itineraryToRouteGeometry: (itinerary: ItineraryWithDetails | null, segmentId?: string | null) => RouteGeometry | null;
108
+ /**
109
+ * elevationAtFraction returns the itinerary's embedded surface elevation in meters at
110
+ * a progress fraction (0..1), interpolating linearly between the two vertices
111
+ * whose arc-length brackets the target. Returns null when the itinerary carries no
112
+ * elevations or the count does not match the line (so a caller falls back to a
113
+ * distance heuristic rather than trusting a mismatched array). The fraction is
114
+ * clamped to [0, 1]. The optional precomputed `cumulative`, the route's own
115
+ * {@link cumulativeMeters}, keeps a caller that reads many fractions of one route
116
+ * (one per frame of a flight) from measuring the whole line again for each.
117
+ *
118
+ * @param itinerary The route, with the elevations it states.
119
+ * @param fraction The progress along the route, 0 at its start and 1 at its end.
120
+ * @param cumulative The route's {@link cumulativeMeters}. Defaults to measuring the line again.
121
+ */
122
+ export declare const elevationAtFraction: (itinerary: RouteGeometry, fraction: number, cumulative?: readonly number[]) => number | null;
123
+ /**
124
+ * slopeDegAtFraction returns the itinerary's local slope in degrees at a progress
125
+ * fraction (positive climbing, negative descending), measured as the rise over
126
+ * the run across a `lookaheadMeters` window starting at the fraction. Returns 0
127
+ * when the itinerary has no usable elevations (a flat default the smart preset then
128
+ * frames level), which includes a window whose elevations are no finite numbers.
129
+ * The slope drives the smart mode's per-keyframe pitch.
130
+ *
131
+ * The window never runs past the route's end. Within one window of the finish it slides back
132
+ * to end there, so the slope is the grade of the last `lookaheadMeters` of the route, and on a
133
+ * route shorter than the window it is the grade of the whole route. The run the rise is divided
134
+ * by is the window's real length, so a route that ends on a climb reads that climb at its last
135
+ * point. A window that is zero, negative or no finite number is floored at a meter. The floor
136
+ * is the window's and not the route's: a route shorter than a meter is read over its own
137
+ * length, so two elevations a few centimeters apart read as steep a grade as they make.
138
+ *
139
+ * @param itinerary The route, with the elevations it states.
140
+ * @param fraction The progress along the route the window starts at, 0 to 1.
141
+ * @param lookaheadMeters The length of the window the grade is measured over, in meters.
142
+ */
143
+ export declare const slopeDegAtFraction: (itinerary: RouteGeometry, fraction: number, lookaheadMeters: number) => number;
144
+ /**
145
+ * TerrainSampler reads the DEM elevation in meters at a [lng, lat], or null when
146
+ * the terrain is not loaded there (off-coverage, or no DEM configured at all). It
147
+ * is injected into the clearance pass so the renderer-free core owns the clearance
148
+ * maths while the renderer, the only layer that can read the terrain, supplies the
149
+ * data. A null sample contributes no constraint, so the pass degrades to a no-op
150
+ * when the terrain is absent. The longitude it is asked at is within [-180, 180],
151
+ * also for a flight that crosses the antimeridian. An answer that is no finite
152
+ * number reads as null.
153
+ */
154
+ type TerrainSampler = (lngLat: [number, number]) => number | null;
155
+ /**
156
+ * ClearanceFrame is the per-frame camera state the clearance pass reads: the
157
+ * look-at `center` (lng/lat), the framing `zoom`, the `pitch` in degrees (MapLibre
158
+ * convention, 0 = straight down), the `bearing` in degrees, and the `fraction` of
159
+ * itinerary progress the frame sits at (so a missing terrain sample under the centre
160
+ * can fall back to the itinerary's own surface elevation). It is the channel slice the
161
+ * resolver already holds per frame, handed across without copying the whole pose.
162
+ */
163
+ interface ClearanceFrame {
164
+ bearing: number;
165
+ center: LngLat;
166
+ fraction: number;
167
+ pitch: number;
168
+ zoom: number;
169
+ }
170
+ /**
171
+ * ClearanceOptions tune the clearance pass.
172
+ *
173
+ * The frame count and the itinerary length size the anticipation window: a fixed
174
+ * itinerary DISTANCE, not a wall-clock span, so the lead/lag covers the same stretch of
175
+ * trail regardless of how fast the flight crosses it. `viewportHeightPx` calibrates the
176
+ * zoom↔altitude model to the live canvas (the same value the resolver passes
177
+ * everywhere); absent, the model reads a nominal canvas of 800 CSS pixels.
178
+ * `anticipationMeters` is how far ahead of a peak the reframing begins (and how far
179
+ * past it releases): a windowed minimum over that span pulls the clearing response
180
+ * early so the camera reframes before the ridge rather than snapping at it. The window
181
+ * is a distance, so no frame rate sets it; absent, the mode's own distance applies.
182
+ * `mode` selects the per-mode eye-margin scale and anticipation distance, so a floaty
183
+ * mode keeps more air beneath the eye; absent, it is `"smart"`.
184
+ *
185
+ * `sampleStride` decimates the per-frame frustum solve: the pass solves only every
186
+ * `sampleStride`-th frame (always including the first and last) and linearly
187
+ * interpolates the raw envelopes across the gaps before the dilation and smoothing
188
+ * tail. It is visually identical to solving every frame because that tail already
189
+ * averages the envelope over tens of frames (far coarser than the meters between
190
+ * adjacent frames) while issuing a fraction of the DEM readbacks. Absent or 1 solves
191
+ * every frame and is bit-identical to an unstrided pass; a larger stride is how a long
192
+ * preview flight resolves without stalling the main thread. clearanceSampleStride
193
+ * derives the stride a preview should pass.
194
+ */
195
+ interface ClearanceOptions {
196
+ anticipationMeters?: number | undefined;
197
+ mode?: CameraMode | undefined;
198
+ sampleStride?: number | undefined;
199
+ viewportHeightPx?: number | undefined;
200
+ }
201
+ /**
202
+ * ClearanceAdjustment is the per-frame clearance solution: aligned `zoom` and
203
+ * `pitch` arrays the resolver mins against its mode-smoothed channels. Both hold
204
+ * one entry per input frame and only ever move the camera toward clearing the
205
+ * terrain: `zoom` only lowers (widens the eye), `pitch` only lowers (tilts toward
206
+ * top-down). When nothing is occluded both arrays equal the input channels, so the
207
+ * resolver's min is a no-op and an un-cleared track is reproduced exactly.
208
+ */
209
+ interface ClearanceAdjustment {
210
+ pitch: number[];
211
+ zoom: number[];
212
+ }
213
+ /**
214
+ * resolveClearanceAdjustments returns a clearance-adjusted zoom AND pitch per
215
+ * frame: zoom only ever LOWERS the input (raising/widening the camera), and pitch
216
+ * only ever LOWERS toward top-down (tilting the eye over the target), never the
217
+ * reverse. For each frame it derives the camera eye from the zoom, pitch and bearing
218
+ * (the eye sits behind the look-at point at the pitch offset), then enforces:
219
+ *
220
+ * - an underground floor: the eye must sit at least EYE_CLEARANCE_MARGIN (scaled by
221
+ * the mode) above the terrain beneath and around it (cleared by widening zoom);
222
+ * - frustum occlusion: every sample across the visible frustum (the central
223
+ * eye→target ray, a forward fan past the look-at, lateral frame-edge shoulders, and
224
+ * near-foreground points) must clear its terrain by RAY_CLEARANCE_MARGIN, or the
225
+ * view clips a mountain in frame. This is cleared by first tilting toward top-down
226
+ * (down to PITCH_FLOOR), which repositions the eye over the target so a ridge no
227
+ * longer occludes it; if the floor still cannot clear it, by widening zoom.
228
+ *
229
+ * A frustum sample that falls on unloaded DEM (a null sample) is treated as a
230
+ * possible ridge (its terrain is estimated as the itinerary surface or nearby known
231
+ * ground plus NULL_DEM_HAZARD_MARGIN), so an unloaded tile under-protects nothing.
232
+ * The lone exception is the genuine no-terrain case (a 2D itinerary with no elevations
233
+ * whose every sample is null): no hazard can be estimated there, so no frame is
234
+ * constrained and the all-clear short-circuit returns the input verbatim.
235
+ *
236
+ * Each per-frame raw series (zoom and pitch) is dilated by a windowed minimum over
237
+ * the anticipation window, so the reframing starts before a peak and releases
238
+ * after, and Gaussian-smoothed, so neither channel jolts.
239
+ *
240
+ * @param frames The camera state per frame, in flight order.
241
+ * @param itinerary The route the frames fly over, read for its surface elevation
242
+ * where the terrain answers nothing.
243
+ * @param sampler The terrain the frames are cleared against.
244
+ * @param options The anticipation, viewport, mode and stride the pass runs with.
245
+ * @returns One zoom and one pitch per frame, each at or under the frame's own input.
246
+ */
247
+ export declare const resolveClearanceAdjustments: (frames: readonly ClearanceFrame[], itinerary: RouteGeometry, sampler: TerrainSampler, options: ClearanceOptions) => ClearanceAdjustment;
248
+ /**
249
+ * CameraPlanner is where a camera plan is turned into the per-frame arrays a preview flies and
250
+ * a record composites.
251
+ *
252
+ * It wraps nothing a caller cannot do: the maths is in this entry point and runs inline. What a
253
+ * host may need to decide differently is WHERE it runs. Resolving a flight is the heaviest
254
+ * synchronous computation in the family: a spline, a timeline and a Gaussian over every frame,
255
+ * which for a minute at 60 fps is thousands of frames, plus a DEM clearance solve per frame on
256
+ * the record path. All of it happens on whichever thread calls it, and in a browser that is the
257
+ * one painting the page.
258
+ *
259
+ * The planner makes the thread a host's decision without the code that flies a plan having to
260
+ * know. It lives here rather than in `@mountaya/studio` because it touches only
261
+ * `resolveCameraTrack` and `resolveProfileSamples`, both published from this entry: a consumer
262
+ * building a flythrough over their own GeoJSON decides the thread without installing a studio.
263
+ * What ships is {@link synchronousCameraPlanner}, which resolves on the calling thread, and
264
+ * {@link measuredCameraPlanner}, which answers whether anything else is warranted.
265
+ *
266
+ * **Both methods are synchronous, and that is a deliberate limit rather than an oversight.** An
267
+ * async planner would let a host move the work to a worker, and the record path could not use
268
+ * it: `resolveTrack`'s clearance pass reads the DEM through a `TerrainSampler` that calls into
269
+ * the live map, which exists on the main thread and cannot cross a worker boundary. A worker
270
+ * implementation is therefore only ever possible for the sampler-free resolve, and making the
271
+ * whole seam async to reach it would turn every caller into an await for a capability most of
272
+ * them cannot use. The honest shape is the one the callers actually have; widening it is a
273
+ * decision to take when there is a worker to widen it for.
274
+ */
275
+ interface CameraPlanner {
276
+ /**
277
+ * resolveSamples produces the per-frame overlay readout (distance, elevation, running
278
+ * ascent, the categorical bands), index-aligned with the poses.
279
+ */
280
+ readonly resolveSamples: (plan: CameraPlan, itinerary: RouteGeometry, source: ProfileSource) => ProfileSample[];
281
+ /**
282
+ * resolveTrack produces the per-frame camera poses.
283
+ *
284
+ * `sampler` is the map's DEM readout, which turns on the clearance pass; `clearanceStride`
285
+ * decimates that pass for a preview. Both are absent on the sampler-free call a host makes to
286
+ * warm tiles.
287
+ */
288
+ readonly resolveTrack: (plan: CameraPlan, itinerary: RouteGeometry, sampler?: TerrainSampler, clearanceStride?: number) => readonly ShotCamera[];
289
+ }
290
+ /**
291
+ * synchronousCameraPlanner resolves on the calling thread, exactly as `resolveCameraTrack` and
292
+ * `resolveProfileSamples` do when called directly.
293
+ *
294
+ * The default, and the right one until a measurement says otherwise. Both functions it delegates
295
+ * to memoize their own results, so a second call for an unchanged plan and route costs a map
296
+ * lookup, which is most of what a session of authoring does.
297
+ */
298
+ export declare const synchronousCameraPlanner: () => CameraPlanner;
299
+ /**
300
+ * measuredCameraPlanner wraps a planner so each resolve lands on the performance timeline.
301
+ *
302
+ * This is the debug instrument, and it is a DECORATOR a host opts into rather than a flag read
303
+ * from somewhere:
304
+ *
305
+ * ```ts
306
+ * const planner = measuredCameraPlanner(synchronousCameraPlanner());
307
+ * ```
308
+ *
309
+ * A decorator rather than a global switch because a global switch is a second way to configure
310
+ * the thing, readable from nowhere and testable only by setting it. Handing over a different
311
+ * planner is how this capability is changed, and it means the measurement is scoped to the caller
312
+ * that asked for it rather than to the process. In the studio it is one member of the seams.
313
+ *
314
+ * It exists to answer one question with a number: whether a real plan on a real machine exceeds
315
+ * the frame budget by enough to be worth a worker. Under a few tens of milliseconds the answer
316
+ * is no (the resolve is memoized and a session of authoring mostly hits it), and a worker would
317
+ * buy a message round trip and a structured clone of every pose in exchange.
318
+ *
319
+ * `onMeasure` receives each duration in milliseconds, for a host collecting its own telemetry
320
+ * rather than reading a devtools timeline. The User Timing entries are written either way, and
321
+ * a runtime without `performance.mark` simply gets the durations: the wrapper never changes what
322
+ * the planner returns, and never throws where the planner would not.
323
+ */
324
+ export declare const measuredCameraPlanner: (planner: CameraPlanner, onMeasure?: (name: string, durationMs: number) => void) => CameraPlanner;
325
+ /**
326
+ * Authoring and running one fly-through, with no product around it.
327
+ *
328
+ * This is the orchestration between a camera plan and a map: resolve the plan to poses against
329
+ * whatever terrain is loaded, warm the tiles the flight will cross, fly it live, capture it, and
330
+ * report progress while that happens. `VideoRunEngine` of `@mountaya/elements/video` owns a
331
+ * single RUN (the abort signal, the camera it restores to, the moving dot). This owns the SESSION: the plan being
332
+ * authored, the route it is anchored to, the overlay settings, the progress a UI reads, and the
333
+ * resolved-pose cache that makes a burst of plan edits cheap. It is a fly-through over a route a
334
+ * host holds, with no product around it: no itinerary id, no entitlement, no store, no bus.
335
+ *
336
+ * It names no renderer: the map is declared structurally and every type it reads is
337
+ * renderer-free, so `@mountaya/elements/camera` publishes it. A consumer recording with MapLibre
338
+ * builds the map from `@mountaya/elements/video`, and `@mountaya/studio` flies its video wizard
339
+ * on it with no renderer in its graph.
340
+ *
341
+ * **State, subscribe, commands, teardown**, in that order, because it is the contract a
342
+ * binding is written against. `getSnapshot` and `subscribe` are `useSyncExternalStore`'s two
343
+ * arguments exactly, so a React binding is a few lines; they are equally a Vue `shallowRef` or a
344
+ * Svelte store, which is the property that makes this the layer a second framework binds to rather
345
+ * than a layer it reimplements. Nothing here imports React.
346
+ */
347
+ /**
348
+ * The map surface a flight drives, declared structurally.
349
+ *
350
+ * Structural rather than `MapClient`, for the same reason `CollabDispatch` is: a flight needs a
351
+ * few methods, and a consumer driving their own renderer should be able to satisfy it without
352
+ * adopting a platform-agnostic command interface built for a tool bus. `MapLibreClient` satisfies
353
+ * it by having the right shape, and so does a test double.
354
+ *
355
+ * `prewarmTerrain` and `warmPoses` are two warms and not one, which looks redundant until the
356
+ * failure is named. `prewarmTerrain` frames the route's bounds and settles the DEM, so the
357
+ * clearance pass reads real peak heights rather than null: without it a flight plans through a
358
+ * mountain. `warmPoses` jumps the camera through the flight's own viewports at the flight's own
359
+ * ZOOM, so the capture loop films loaded tiles rather than black ones. The first is about the
360
+ * plan; the second is about the picture.
361
+ */
362
+ interface VideoFlightMap {
363
+ /**
364
+ * jumpToPose lands the camera on one full pose immediately, with no animation.
365
+ *
366
+ * The full pose and not a centre: a scrubbed frame has to match the pitch and bearing the flight
367
+ * would be at that fraction, or the scrubber shows a picture the video never contains.
368
+ */
369
+ jumpToPose: (pose: RecordingCamera) => void;
370
+ /**
371
+ * prewarmTerrain frames the route's bounds and resolves once the DEM under them has settled.
372
+ *
373
+ * The box of a route across the antimeridian runs past 180 or below -180, the form a
374
+ * renderer frames across the line.
375
+ */
376
+ prewarmTerrain: (bounds: BoundingBox) => Promise<void>;
377
+ previewPoses: (poses: RecordingCamera[], options: {
378
+ focusGlyphUrl?: string | undefined;
379
+ markers?: [number, number][] | undefined;
380
+ onProgress?: ((progress: VideoProgress) => void) | undefined;
381
+ planDurationMs?: number | undefined;
382
+ signal: AbortSignal;
383
+ }) => Promise<void>;
384
+ recordPoses: (poses: readonly RecordingCamera[], output: RecordOutput, options: {
385
+ focusGlyphUrl?: string | undefined;
386
+ markers?: [number, number][] | undefined;
387
+ onProgress?: ((progress: VideoProgress) => void) | undefined;
388
+ profile?: RecordProfile | undefined;
389
+ signal: AbortSignal;
390
+ /**
391
+ * Whether the caller has just warmed these very poses' viewports, every frame's zoom and
392
+ * pitch included, so the recorder captures without a warm pass of its own. Absent or
393
+ * false, the recorder warms them first.
394
+ */
395
+ warmed?: boolean | undefined;
396
+ }) => Promise<VideoRecordingResult>;
397
+ sampleTerrainElevation: (lngLat: [number, number]) => number | null;
398
+ warmPoses: (poses: readonly RecordingCamera[], signal?: AbortSignal) => Promise<void>;
399
+ }
400
+ /**
401
+ * The elevation overlay burnt into the frame, and the units it is written in.
402
+ *
403
+ * The units are the FLIGHT's rather than the surrounding application's, which is the whole reason
404
+ * they are here: a video is shared with people who are not the author, so a French creator
405
+ * exporting for an American audience states imperial on the export without touching what their own
406
+ * screen reads in. `language` doubles as the BCP 47 locale the numbers are formatted with.
407
+ */
408
+ interface VideoFlightProfile {
409
+ readonly design: ProfileDesign;
410
+ readonly enabled: boolean;
411
+ readonly language: UnitFormatOptions["language"];
412
+ readonly length: UnitFormatOptions["length"];
413
+ readonly pace: UnitFormatOptions["pace"];
414
+ readonly slope: UnitFormatOptions["slope"];
415
+ }
416
+ /**
417
+ * The overlay a flight opens with: off, the graph design, metric, degrees and a speed
418
+ * stated per unit of time, in English.
419
+ */
420
+ export declare const defaultVideoFlightProfile: VideoFlightProfile;
421
+ /**
422
+ * What a flight is doing, as a subscriber reads it.
423
+ *
424
+ * A discriminated union rather than a pair of booleans and a number, because the states carry
425
+ * different payloads: idle carries none, a preview carries how far through it is, a parked camera
426
+ * carries where it rests, and a recording carries how far through it is plus which phase the
427
+ * work is in. A progress bar at 100% during `encoding` is a muxer finalising a long file, and a
428
+ * readout that could not say so reads as a hang.
429
+ *
430
+ * `parked` is the camera at rest on a frame of the flight, where a {@link VideoFlightEngine.seek}
431
+ * left it: `fraction` is how far through the flight that frame is, between 0 and 1. It is a kind
432
+ * of its own, apart from `previewing`, so a transport draws Play over a parked camera and Pause
433
+ * over a preview under way, and a scrubber reads its position off either.
434
+ */
435
+ type VideoFlightStatus = {
436
+ readonly kind: "idle";
437
+ } | {
438
+ readonly fraction: number;
439
+ readonly kind: "parked";
440
+ } | {
441
+ readonly fraction: number;
442
+ readonly kind: "previewing";
443
+ } | {
444
+ readonly fraction: number;
445
+ readonly kind: "recording";
446
+ readonly phase: VideoRecordingPhase;
447
+ };
448
+ /** Everything a UI renders from, and the whole of what `subscribe` announces a change to. */
449
+ interface VideoFlight {
450
+ /**
451
+ * The activity silhouette the moving focus dot masks over its white disc, or null for a plain
452
+ * disc. A URL rather than a glyph name: what artwork an activity has is the caller's vocabulary.
453
+ */
454
+ readonly activityGlyphUrl: string | null;
455
+ readonly plan: CameraPlan;
456
+ readonly profile: VideoFlightProfile;
457
+ /**
458
+ * Where the overlay's per-frame readouts are resolved from. Null leaves the overlay unpainted.
459
+ */
460
+ readonly profileSource: ProfileSource | null;
461
+ /** The flattened route the plan is anchored to. Null until a caller supplies one. */
462
+ readonly route: RouteGeometry | null;
463
+ readonly status: VideoFlightStatus;
464
+ }
465
+ /**
466
+ * Why a flight did not run, as a value rather than a throw.
467
+ *
468
+ * `recordPoses` already resolves rather than rejecting, and a preview that was cancelled is the
469
+ * normal case rather than an error, so the whole surface answers the same way. `aborted` covers a
470
+ * caller's cancel, a newer run replacing this one and a dispose, whenever each lands, the terrain
471
+ * warm-up included: they are indistinguishable to the run that stopped, and a caller that needs
472
+ * to tell them apart knows which one it asked for.
473
+ *
474
+ * `failed` is the one refusal that carries a payload, the `error` the flight stopped on: a throw
475
+ * from the map or the planner, or a fraction that is no number. A thrown value that is no
476
+ * `Error` arrives wrapped in a `MountayaElementsRejectionError` that holds it as the cause. A
477
+ * subscriber that throws is no failure of the flight, and never arrives here.
478
+ */
479
+ type VideoFlightOutcome = {
480
+ readonly ok: true;
481
+ } | {
482
+ readonly error: Error;
483
+ readonly ok: false;
484
+ readonly reason: "failed";
485
+ } | {
486
+ readonly ok: false;
487
+ readonly reason: "aborted" | "no-map" | "no-route";
488
+ };
489
+ /**
490
+ * A finished recording, or why there is not one.
491
+ *
492
+ * `failed` is the one refusal that carries a payload, the `error` the run stopped on, because a
493
+ * caller has something to tell its user there: the recorder's own (a missing `mediabunny`, a
494
+ * surface, frame capture or encoder that could not be built, a capture or encode that threw), or
495
+ * a throw from the map or the planner before the first frame. `aborted` is a cancel, as in
496
+ * {@link VideoFlightOutcome}. `unavailable` is a recording that could not start, which nobody
497
+ * cancelled: no recorder wired to the map, no drawing buffer to read, a canvas under the minimum
498
+ * size, no 2D context to composite in, a first frame that read black. `no-frames` is a result with
499
+ * no blob, no cancel and no error, which the shipped recorder never resolves and a map a host
500
+ * supplies may.
501
+ */
502
+ type VideoFlightRecording = {
503
+ readonly blob: Blob;
504
+ readonly extension: string;
505
+ readonly ok: true;
506
+ } | {
507
+ readonly error: Error;
508
+ readonly ok: false;
509
+ readonly reason: "failed";
510
+ } | {
511
+ readonly ok: false;
512
+ readonly reason: "aborted" | "no-frames" | "no-map" | "no-route" | "unavailable";
513
+ };
514
+ /**
515
+ * VideoFlightOptions is what a {@link VideoFlightEngine} is built with: the plan it opens on, and
516
+ * optionally the map it drives, where the plan is resolved, how many resolved flights it keeps
517
+ * and whether a recording carries the brand mark.
518
+ */
519
+ interface VideoFlightOptions {
520
+ /**
521
+ * The plan a flight opens on. Required, because there is no default worth inventing: a plan
522
+ * names a mode, an output and a keyframe list, and `cameraPlanGenerators` builds one from a
523
+ * route in a line.
524
+ */
525
+ readonly plan: CameraPlan;
526
+ /**
527
+ * The map the flight drives. Omitted or null, every run answers `no-map` and the state still
528
+ * works, which is what lets a caller author a plan before a canvas exists.
529
+ */
530
+ readonly map?: VideoFlightMap | null | undefined;
531
+ /**
532
+ * Where a plan is turned into per-frame poses. Defaults to resolving on the calling thread,
533
+ * which is what the studio does; `measuredCameraPlanner` answers whether anything else is
534
+ * warranted.
535
+ */
536
+ readonly planner?: CameraPlanner | undefined;
537
+ /**
538
+ * How many resolved flights to memoize. Four covers a session's working set (the current
539
+ * preview, the record's full-density resolve, and a recent edit or two) while keeping the
540
+ * retained per-frame pose arrays to a handful.
541
+ *
542
+ * A whole number, 0 or more. At 0 no flight is kept and every run resolves again.
543
+ *
544
+ * @default 4
545
+ */
546
+ readonly poseCacheSize?: number | undefined;
547
+ }
548
+ /**
549
+ * VideoFlightEngine authors and runs one fly-through over a route a host holds: it holds the
550
+ * plan, the route and the overlay settings, previews the flight on the map, pauses and plays it
551
+ * on, records it to a video file, and parks the camera at any point of it.
552
+ *
553
+ * The contract a binding is written against is state, subscribe, commands, teardown.
554
+ * {@link getSnapshot} answers the state, the same object until something changes, and
555
+ * {@link subscribe} hears every change, so the two are `useSyncExternalStore`'s arguments as they
556
+ * are. The commands (`setPlan`, `setRoute`, `setProfile`, `preview`, `play`, `pause`, `seek`,
557
+ * `stop`, `record`, `abort`) write it, and a run answers an outcome rather than rejecting.
558
+ * {@link dispose} ends every run and lets go of the map, which the engine never owns.
559
+ *
560
+ * Recording needs a map built with `preserveDrawingBuffer` and the `mediabunny` peer, which
561
+ * `@mountaya/elements/video` loads only when a recording starts.
562
+ *
563
+ * @example
564
+ * ```ts
565
+ * import { MountayaMap } from "@mountaya/elements";
566
+ * import {
567
+ * cameraPlanGenerators,
568
+ * type RouteGeometry,
569
+ * VideoFlightEngine,
570
+ * } from "@mountaya/elements/camera";
571
+ * import { MapLibreViewClient, VideoRunEngine } from "@mountaya/elements/video";
572
+ *
573
+ * declare const map: MountayaMap;
574
+ * declare const route: RouteGeometry;
575
+ *
576
+ * const flight = new VideoFlightEngine({
577
+ * map: new MapLibreViewClient(map, {
578
+ * video: new VideoRunEngine(map.raw, map.events, () => map.loadOrganization()),
579
+ * }),
580
+ * plan: cameraPlanGenerators.overview(route, { targetDurationMs: 20_000 }),
581
+ * });
582
+ * flight.setRoute(route);
583
+ * flight.subscribe(() => console.log(flight.getSnapshot().status.kind));
584
+ *
585
+ * const result = await flight.record();
586
+ * if (result.ok) {
587
+ * console.log(`flight.${result.extension}`, result.blob.size);
588
+ * }
589
+ * flight.dispose();
590
+ * ```
591
+ */
592
+ export declare class VideoFlightEngine {
593
+ private flight;
594
+ private readonly listeners;
595
+ private readonly map;
596
+ private readonly planner;
597
+ private readonly poseCacheSize;
598
+ /**
599
+ * The run in flight. One at a time: every preview and record stops the run before it as it
600
+ * starts, because two flights over one map would fight for the camera.
601
+ */
602
+ private run;
603
+ /**
604
+ * How far through the flight a preview that {@link pause} stopped in the air had flown, which
605
+ * {@link play} flies on from. Null when no flight is paused.
606
+ */
607
+ private pausedAt;
608
+ /**
609
+ * The memoized flights, an insertion-ordered LRU. Keyed on the pose-affecting plan fields, the
610
+ * route's revision, whether this is the full-density record resolve or a decimated preview one,
611
+ * and the DEM epoch, so a format-only edit collapses onto the same key and reuses the flight,
612
+ * while a resolve cached against a cold DEM is dropped once the flight warm lands.
613
+ */
614
+ private readonly poseCache;
615
+ /** Bumped when the flight terrain warms, which is what invalidates a cold-DEM resolve. */
616
+ private demEpoch;
617
+ /**
618
+ * Advanced each time the route's content is read and differs from {@link routeContent}: as
619
+ * {@link setRoute} is handed a route, and as a flight begins. The warm guards and the pose
620
+ * cache name a route by it, so telling two routes apart costs one walk per `setRoute` and one
621
+ * per flight, each ending at the first difference.
622
+ */
623
+ private routeRevision;
624
+ /** What the held route held when it was last read, or null while no route is held. */
625
+ private routeContent;
626
+ /** The route revision each warm has already run for, so neither repeats. */
627
+ private terrainWarmedRevision;
628
+ private flightWarmedRevision;
629
+ /** The terrain warm in progress, which a flight asked for meanwhile over the same route joins. */
630
+ private terrainWarm;
631
+ /**
632
+ * The flight warm in progress, shared the same way. One sweep at a time moves the camera, and
633
+ * the engine holds the handle that ends it: {@link abort}, {@link dispose}, another route and
634
+ * a record, which sweeps for itself, each end it.
635
+ */
636
+ private flightWarm;
637
+ /**
638
+ * The sweep a record makes for itself, while it is in progress. It is the flight's sweep over
639
+ * that route, so a flight asked for meanwhile joins it and starts none of its own. It ends on
640
+ * the record's run and on nothing else, which is why it is held apart from
641
+ * {@link flightWarm}: another route set meanwhile ends a shared sweep, and leaves a record on
642
+ * the route it began with.
643
+ */
644
+ private recordWarm;
645
+ /**
646
+ * The settling of every map call that still holds the camera: the run in flight's, and that of
647
+ * each flight stopped since whose `previewPoses` or `recordPoses` has yet to settle. A seek
648
+ * parks the camera once all of them have let go of it.
649
+ */
650
+ private readonly landings;
651
+ /**
652
+ * Whether a seek stopped a flight and no status has replaced the one that flight left. A
653
+ * stopped flight's own exit commits nothing, so its status is settled by the seek that
654
+ * stopped it or, when that seek was overtaken, by the one that parks or fails in its place.
655
+ * {@link commit} clears it on every status it states.
656
+ */
657
+ private seekStoppedFlight;
658
+ /** The last encoded recording, so a save does not re-encode. */
659
+ private lastRecording;
660
+ /** Aborted by {@link dispose}, and the signal a seek resolves under, since it holds no run. */
661
+ private readonly disposal;
662
+ /** Whether {@link dispose} has run, read off the one signal it aborts. */
663
+ private get disposed();
664
+ /**
665
+ * Advanced by every flight asked for, a seek included, and by {@link abort}. A seek holds no
666
+ * run, so it reads this after each of its awaits to learn whether a newer preview, record or
667
+ * seek was asked for since it began, or an abort, and leaves the camera alone when one was.
668
+ */
669
+ private flightSequence;
670
+ /**
671
+ * @throws {MountayaElementsError} When `poseCacheSize` is not a whole number, 0 or more, when
672
+ * the plan is no object, or when it holds a member no flight can be planned with.
673
+ * {@link setPlan} lists them.
674
+ */
675
+ constructor(options: VideoFlightOptions);
676
+ /**
677
+ * getSnapshot returns the current flight, by reference.
678
+ *
679
+ * Stable between changes, deliberately: it is `useSyncExternalStore`'s second argument, and a
680
+ * fresh object per call makes React's own tearing check loop forever. Every command below
681
+ * replaces the object rather than mutating it, so identity IS the change signal.
682
+ */
683
+ getSnapshot(): VideoFlight;
684
+ /**
685
+ * subscribe registers a listener for every change, and returns its own unsubscribe.
686
+ *
687
+ * A listener that throws keeps no other listener from being told and changes no command's
688
+ * answer: a setter, {@link abort} and {@link reset} throw nothing, and a preview, a record or
689
+ * a seek answers for the flight alone. What the listener threw is the subscribing program's
690
+ * own fault, and it reaches the runtime as an uncaught error on a microtask, once per change
691
+ * the listener threw at.
692
+ */
693
+ subscribe(listener: () => void): () => void;
694
+ /** The last encoded recording, or null. Held so a save does not re-encode what was just made. */
695
+ get recording(): {
696
+ blob: Blob;
697
+ extension: string;
698
+ } | null;
699
+ /**
700
+ * setPlan replaces the plan. Does not abort a run: a plan edit mid-preview takes on the next.
701
+ *
702
+ * @throws {MountayaElementsError} Naming `plan`, when it is no object. Naming the member,
703
+ * when `output` is no object, `shots` no array or an entry of `shots` no object, when
704
+ * `version` is not 1, when `targetDurationMs` is
705
+ * not a finite number above 0, when `output.fps` is not 24, 30 or 60, when a stated
706
+ * `output.bitrateMbps` is not a finite number above 0, or when a shot holds a number that is
707
+ * not finite, a `holdMs` below 0 or a `speedScale` at or below 0: what `createCameraPlan`
708
+ * refuses, by the same rule. The plan the engine held stands.
709
+ */
710
+ setPlan(plan: CameraPlan): void;
711
+ /**
712
+ * setRoute anchors the flight to a route, and resets both warm guards when it changes.
713
+ *
714
+ * Reset on CONTENT, so a re-supplied identical route keeps its warms. A different route has
715
+ * different terrain under it and different tiles to settle, so neither warm carries over, and
716
+ * a flight warm still sweeping the route before it ends at its next stop.
717
+ *
718
+ * The route is held as the object it is given, never copied for a reader, and its content is
719
+ * read here and again as each preview, record and seek begins. So a route edited in place (a
720
+ * track that grows by a push) is flown as it stands when the next flight is asked for, with
721
+ * its warms run again, whether or not it is handed over a second time.
722
+ *
723
+ * A line of fewer than two vertices is held as it is given and flown as no route: every run
724
+ * over it answers `no-route`.
725
+ *
726
+ * Another route stops a preview flying the one before it, and lands a `previewing` or a
727
+ * `parked` status on idle: the camera would fly, or rest on, a route the engine has let go
728
+ * of, under a status that says otherwise. It forgets a paused flight as well, so the next
729
+ * {@link play} flies the route that arrived from its first frame. A preview still in its
730
+ * warm-up flies the route that arrived, and a record flies the route it began with.
731
+ */
732
+ setRoute(route: RouteGeometry | null): void;
733
+ /**
734
+ * setProfile merges a partial overlay update over the current one.
735
+ *
736
+ * A merge rather than a replacement, because every caller changes one field (the enable flag, a
737
+ * unit, the design), and a replacement would make each of those restate the others.
738
+ */
739
+ setProfile(profile: Partial<VideoFlightProfile>): void;
740
+ /** setProfileSource sets where the overlay's per-frame readouts are resolved from. */
741
+ setProfileSource(profileSource: ProfileSource | null): void;
742
+ /** setActivityGlyph sets the silhouette the moving focus dot masks, or null for a plain disc. */
743
+ setActivityGlyph(activityGlyphUrl: string | null): void;
744
+ /**
745
+ * preview flies the plan live over the map from its first frame, encoding nothing, and reports
746
+ * progress. It forgets a flight {@link pause} stopped.
747
+ *
748
+ * Paced to the plan's own wall-clock so the rehearsal runs at the speed the recording will and
749
+ * dwells on holds: a preview that ran at frame rate would mislead about both.
750
+ *
751
+ * The run opens before the two warms rather than after them. Both warms move the camera and can
752
+ * take seconds on a cold cache, which is when a caller reaches for {@link pause}: a run opened
753
+ * after them would leave a pause, an abort, a dispose or a newer flight during the warm with
754
+ * nothing to stop, and the fly would start anyway. A stop there answers `aborted`, starts no
755
+ * further warm and flies no frame.
756
+ *
757
+ * The flight is of the plan and the route the engine holds once both warms have settled. A
758
+ * route set during a warm is warmed in turn, the DEM over its bounds and then its viewports,
759
+ * before any pose is resolved over it.
760
+ *
761
+ * It never rejects. A map or a planner that throws answers `failed` with the error it stopped
762
+ * on. A throw that follows a stop answers `aborted`, because the caller asked the run to
763
+ * stop. A subscriber that throws changes neither ({@link subscribe}). Every exit ends the run
764
+ * and lands on idle unless a newer one holds it by then.
765
+ */
766
+ preview(): Promise<VideoFlightOutcome>;
767
+ /**
768
+ * play flies the plan on from where a flight was stopped, as {@link preview} flies it.
769
+ *
770
+ * It resumes a preview {@link pause} stopped in the air, from the frame nearest where it was and
771
+ * over the rest of the plan's wall-clock. Over a `parked` status it flies on from the frame
772
+ * {@link seek} parked the camera on, as a player plays on from where its reader put the head.
773
+ * It flies from the first frame when there is neither, and when nothing is left to fly past the
774
+ * frame it would start on. A play stopped in its warm-up flies nothing, and keeps where it was
775
+ * to fly on from for the next one.
776
+ */
777
+ play(): Promise<VideoFlightOutcome>;
778
+ /**
779
+ * startPreview is {@link preview} and {@link play}: it opens the run, reads where the flight
780
+ * flies on from, and answers what the fly settled on.
781
+ */
782
+ private startPreview;
783
+ /**
784
+ * flyPreview is {@link preview} and {@link play} from their first warm to the end of their
785
+ * fly, under the run they opened. It throws what the map or the planner threw, which they
786
+ * answer.
787
+ */
788
+ private flyPreview;
789
+ /**
790
+ * record captures one frame per pose and encodes them, reporting progress with its phase.
791
+ *
792
+ * Resolved at full density (stride 1), where a preview resolves at the decimated clearance
793
+ * stride, so the artifact is what the plan describes rather than what was cheap to rehearse.
794
+ *
795
+ * The run opens before the terrain warm, for the reason {@link preview} gives, and the flight
796
+ * warm inside the resolve takes its signal: a stop, an abort or a dispose during either warm
797
+ * answers `aborted`, starts no further warm and captures no frame. Over a route a flight can
798
+ * follow, the status reads `recording` in its `preparing` phase from the moment the run opens,
799
+ * so a reader sees the press land while the terrain warms.
800
+ *
801
+ * A run stopped before the recorder answers keeps nothing: it answers `aborted`, whatever the
802
+ * map resolved, since a recorder a host supplies may finish a file after its signal aborted.
803
+ *
804
+ * It never rejects. A recorder that fails, or a map or planner that throws on the way to the
805
+ * first frame, answers `failed` with the error it stopped on, and a throw that follows an abort
806
+ * answers `aborted`, because the caller asked the run to stop. A subscriber that throws
807
+ * changes neither ({@link subscribe}). A recording
808
+ * the map could not start answers `unavailable`, which is no cancel: the result states
809
+ * `reason: "unavailable"` beside its `cancelled`. Every exit ends the run and lands on idle
810
+ * unless a newer run holds it by then, so a caller holding a recording state always has an
811
+ * outcome to settle it on.
812
+ *
813
+ * The record flies the plan and the route it began with. One set while it warms takes on the
814
+ * next flight, so the poses, the encoder's output and the overlay's samples stay those of one
815
+ * plan. Whether its frames carry the Mountaya watermark is the map's organization's to answer,
816
+ * read as the capture begins: no member of the engine takes the mark off.
817
+ */
818
+ record(): Promise<VideoFlightRecording>;
819
+ /**
820
+ * flyRecording is {@link record} from its terrain warm to the recorder's answer, under the run
821
+ * it opened. It throws what the map or the planner threw, which `record` answers.
822
+ */
823
+ private flyRecording;
824
+ /**
825
+ * seek parks the camera on the pose the flight is at, a fraction of the way through.
826
+ *
827
+ * It aborts any live fly first (a seek that did not would be overwritten by the next preview
828
+ * frame), resolves the flight, and jumps to the nearest frame's FULL pose. The status is left
829
+ * reading `parked` at the requested fraction rather than idle, because that is what a
830
+ * scrubber reads to position itself: the camera is parked mid-flight, not stopped.
831
+ *
832
+ * The pose is of the plan and the route the engine holds as the camera lands. One set while
833
+ * the seek waits, on a warm or on a stopped flight that still holds the camera, is warmed and
834
+ * resolved before the seek parks.
835
+ *
836
+ * The fraction is clamped rather than validated, so a scrubber dragged past its own track is a
837
+ * camera at an endpoint instead of a failure a UI has to render. A fraction that is no number
838
+ * (`NaN`, or a value of another type from a caller the compiler does not check) has no end to
839
+ * clamp to: the seek answers `failed` and touches nothing.
840
+ *
841
+ * A seek waits on the warms like any flight and starts neither twice: one asked for while a
842
+ * warm over the same route is in progress joins it, so a scrubber dragged on a cold route sweeps
843
+ * the camera once. A {@link pause} or a {@link stop} takes no camera, so a seek in its warm-up
844
+ * goes on to park, and the sweep it waits on goes on with it. A seek that parks forgets a
845
+ * paused flight: the next {@link play} flies on from the frame it parked on.
846
+ *
847
+ * A stopped flight lets go of the camera before the seek parks it, whoever stopped it: this
848
+ * seek, a seek before it, an {@link abort} or a newer flight. The seek waits for the map's
849
+ * `previewPoses` or `recordPoses` to settle on the aborted signal, because a run restores the
850
+ * camera it found as it settles, which for a record is once the frame in flight has ended, and
851
+ * that restore would land on top of the parked pose.
852
+ *
853
+ * A seek after {@link dispose}, or one whose warms a dispose overtook, answers `aborted` and
854
+ * leaves the camera where it is: a disposed engine does not move the map it let go of. A dispose
855
+ * during the terrain warm starts no flight warm, and one during the flight warm ends its sweep
856
+ * at the next stop, as an {@link abort} does. A seek a newer preview, record or seek overtook
857
+ * during its warms answers `aborted` as well and leaves the camera to the newer one, so a scrub
858
+ * that lands late never aborts a flight asked for after it, nor parks the camera over a later
859
+ * scrub.
860
+ *
861
+ * It never rejects. A map or a planner that throws answers `failed` with the error it stopped
862
+ * on and leaves the status as it was, or on idle when a seek had stopped a flight whose status
863
+ * nothing had replaced: this seek, or one it overtook before that one parked. A seek that
864
+ * answers `no-route` settles such a status the same way. A subscriber that throws changes
865
+ * none of it ({@link subscribe}).
866
+ */
867
+ seek(fraction: number): Promise<VideoFlightOutcome>;
868
+ /**
869
+ * park is {@link seek} from its first warm to the pose it lands on. `overtaken` answers
870
+ * whether a dispose, an abort or a newer flight has taken the camera since the seek began. It
871
+ * throws what the map or the planner threw, which `seek` answers.
872
+ */
873
+ private park;
874
+ /**
875
+ * invalidatePoses drops the memoized flights without touching the terrain warms.
876
+ *
877
+ * What a PLAN edit needs, and the distinction from {@link reset} is the expensive half: a new
878
+ * plan resolves to different poses over the same ground, so the pose cache is stale and the
879
+ * warms are not. Clearing both would re-run a visible multi-second camera sweep on every shot
880
+ * nudge.
881
+ */
882
+ invalidatePoses(): void;
883
+ /**
884
+ * reset returns the engine to the state a fresh session starts in: no run, no caches, no
885
+ * warms, no recording, no paused flight, status idle. The plan and the route are left alone:
886
+ * a caller that wants those changed says so.
887
+ *
888
+ * It throws nothing, whatever a subscriber throws as the idle is announced
889
+ * ({@link subscribe}).
890
+ */
891
+ reset(): void;
892
+ /**
893
+ * pause stops the run in flight and lands on idle, remembering how far a preview in the air
894
+ * had flown, which {@link play} flies on from.
895
+ *
896
+ * A preview stopped in its warm-up had flown nothing, so the flight paused before it stays
897
+ * paused. It takes no camera: a {@link seek} in its warm-up goes on to park, and a flight warm
898
+ * it waits on goes on sweeping. A sweep only stopped flights wait on ends at its next stop.
899
+ * With nothing running it lands a `parked` status on idle. Idempotent.
900
+ */
901
+ pause(): void;
902
+ /**
903
+ * stop stops the run in flight, forgets a paused flight and lands on idle, and answers which
904
+ * run it stopped: `"preview"` for a preview or a play in the air or in its warm-up,
905
+ * `"record"` for a recording, and null when nothing was running.
906
+ *
907
+ * Like {@link pause} it takes no camera: a {@link seek} in its warm-up goes on to park. The run
908
+ * a stop ends answers `aborted`. Idempotent, and safe with nothing running.
909
+ */
910
+ stop(): "preview" | "record" | null;
911
+ /**
912
+ * abort stops whatever is running, a seek in its warm-up included, forgets a paused flight and
913
+ * lands on idle.
914
+ *
915
+ * Idempotent, and safe with nothing running, which is what lets a UI wire it to a close button
916
+ * and an unmount without either of them checking first.
917
+ *
918
+ * A seek still in its warm-up holds no run, so the abort overtakes it the way a newer flight
919
+ * does: it answers `aborted` when its warm settles and parks no camera. A flight warm in
920
+ * progress ends its sweep at the next stop, whichever flight began it.
921
+ */
922
+ abort(): void;
923
+ /**
924
+ * dispose aborts the run, drops every listener and forgets the caches.
925
+ *
926
+ * Idempotent. It does NOT dispose the map: the engine was handed one and does not own it,
927
+ * which is the same one-way dependency `VideoRunEngine` keeps. For the same reason it starts
928
+ * nothing on the map after it: a warm in progress holds a signal this aborts, which ends its
929
+ * sweep at the next stop, and a preview, record or seek still in its warm-up, or asked for
930
+ * later, answers `aborted` without warming again, flying, capturing or parking the camera.
931
+ *
932
+ * A disposed engine keeps the snapshot it showed. Nothing is announced after a dispose, so a
933
+ * reader that still holds the engine reads the status it last saw, a flight in progress
934
+ * included, and no later command changes it.
935
+ */
936
+ dispose(): void;
937
+ /**
938
+ * commit replaces the snapshot and announces it. A no-op after dispose.
939
+ *
940
+ * It never throws. Every listener is told through {@link notifyListeners}, one that throws
941
+ * included, and the first thing a listener threw is surfaced once they all have been, so no
942
+ * command has to decide what a listener's exception does to a flight. The snapshot is replaced
943
+ * before anyone is told, so what a later reader holds is the change, whatever a listener did
944
+ * with it.
945
+ */
946
+ private commit;
947
+ /**
948
+ * beginRun opens the one run a flight holds, aborting the one before it, and advances the
949
+ * {@link flightSequence} a seek in its warm-up reads.
950
+ *
951
+ * After {@link dispose} the run is born aborted and is not held, so every entry point answers
952
+ * `aborted` before it touches the map: a disposed engine was handed its map and let go of it.
953
+ */
954
+ private beginRun;
955
+ /**
956
+ * stopRun is {@link pause} and {@link stop} past what each remembers: it stops the run in
957
+ * flight, ends a flight warm only stopped flights wait on, and lands on idle. It advances no
958
+ * {@link flightSequence}, so a seek in its warm-up goes on to park.
959
+ */
960
+ private stopRun;
961
+ /**
962
+ * endRun lands on idle unless a newer run has already replaced this one, and answers the
963
+ * outcome the run settled on, as {@link land} reads it.
964
+ */
965
+ private endRun;
966
+ /** land commits idle and answers the outcome the flight settled on. */
967
+ private land;
968
+ /**
969
+ * routeChanged names a route whose content differs from the one last read: it keeps the new
970
+ * content, advances the revision the warms and the pose cache are keyed on, ends a flight warm
971
+ * still sweeping the content before it, and forgets a flight paused over it.
972
+ */
973
+ private routeChanged;
974
+ /**
975
+ * readRoute reads the held route against the content it held when it was last read, as a
976
+ * flight begins: the route is the caller's own object, and one edited in place since is
977
+ * another route. One walk that ends at the first difference, small beside a resolve.
978
+ */
979
+ private readRoute;
980
+ /**
981
+ * endFlightWarm ends the flight warm in progress at its next stop, and lets go of it so a flight
982
+ * asked for afterwards sweeps for itself and does not wait on a sweep that is ending.
983
+ */
984
+ private endFlightWarm;
985
+ /**
986
+ * fly awaits a map call that holds the camera, keeping its settling among the
987
+ * {@link landings} until it has settled, a stop of its run in between or not.
988
+ */
989
+ private fly;
990
+ /**
991
+ * flyableRoute is the route a flight can follow, or null: no route, or a line of fewer than
992
+ * {@link ROUTE_VERTICES_MIN} vertices, which has no direction to fly in and whose bounds frame
993
+ * nothing.
994
+ */
995
+ private flyableRoute;
996
+ /**
997
+ * prewarmRoute settles the DEM over the route's bounds, once per route.
998
+ *
999
+ * Before any resolve, because the clearance pass samples terrain through the live map: without
1000
+ * this it reads null and the flight plans a camera straight through a ridge. Once per route
1001
+ * because it is a visible camera move that can take seconds on a cold cache, and repeating it on
1002
+ * every play would make each transport action drag.
1003
+ *
1004
+ * A flight asked for while the warm is in progress awaits the one in progress. A warm that
1005
+ * rejects is not recorded as done, and rejects for every flight that waited on it.
1006
+ */
1007
+ private prewarmRoute;
1008
+ /**
1009
+ * warmRoute warms the route the engine holds as a preview or a seek takes it: the DEM over its
1010
+ * bounds ({@link prewarmRoute}), then its flight's viewports ({@link warmFlight}), each once per
1011
+ * route.
1012
+ *
1013
+ * The route is read again after each warm. One set while a warm ran is the route the flight is
1014
+ * of, so it is warmed in turn, the DEM before the sweep, and no pose is resolved over terrain a
1015
+ * warm of another route settled. It settles once the route it last warmed is the one held, or
1016
+ * as soon as `stopped` answers true after a warm.
1017
+ *
1018
+ * @param stopped Whether the flight has let go of the camera: its run was stopped, or a newer
1019
+ * flight overtook it. The flight warm reads it to tell a sweep somebody still waits on from
1020
+ * one nobody does.
1021
+ */
1022
+ private warmRoute;
1023
+ /**
1024
+ * warmFlight jumps the camera through the flight's own viewports, once per route.
1025
+ *
1026
+ * The sampler-free resolve is used for the warm pass (its centers and bearings match the final
1027
+ * poses, so warming against it loads exactly the tiles the flight crosses), and the DEM epoch is
1028
+ * bumped afterwards, which drops any resolve cached against the colder terrain.
1029
+ *
1030
+ * A flight asked for while the sweep is in progress awaits the one in progress, a record's own
1031
+ * sweep included ({@link sweepForRecord}): two sweeps over one route would fight for the
1032
+ * camera. The sweep takes a signal of its own, which {@link endFlightWarm} aborts. A warm cut
1033
+ * short covered part of the flight, so it is not recorded as done and the next flight warms
1034
+ * again.
1035
+ *
1036
+ * @param stopped Whether the waiting flight has let go of the camera, held among the sweep's
1037
+ * waiters while it waits.
1038
+ */
1039
+ private warmFlight;
1040
+ /**
1041
+ * sweepForRecord jumps the camera through the sampler-free viewports of the flight a record is
1042
+ * about to capture, under the record's own run.
1043
+ *
1044
+ * It settles the DEM at flight zoom before the full-density resolve samples clearance. The
1045
+ * recorder skips its own warm pass only where the clearance pass moved no frame
1046
+ * ({@link capturesSweptViewports}): a frame it widened or tilted frames ground this sweep never
1047
+ * did.
1048
+ *
1049
+ * A record sweeps whenever its poses are not cached, whatever was warmed before, so the capture
1050
+ * never films a tile that has been let go since. The sweep is the flight's own over that
1051
+ * route, so it is held where {@link warmFlight} finds it: a seek asked for meanwhile waits on
1052
+ * it and starts no second sweep. One that runs to its end counts as the route's flight warm,
1053
+ * with the DEM epoch moved as `warmFlight` moves it. One its run cut short counts for nothing.
1054
+ *
1055
+ * @param track The sampler-free track of the plan and the route the record began with.
1056
+ * @param revision The route's revision as the record began.
1057
+ * @param signal The record's run.
1058
+ */
1059
+ private sweepForRecord;
1060
+ /**
1061
+ * resolve turns the plan into poses, markers and a duration, memoized.
1062
+ *
1063
+ * Returns null when there is no route a flight can follow, which is the one input a flight
1064
+ * cannot be invented without. The record pass warms the flight-zoom tiles first so the capture
1065
+ * never films an unloaded tile and the clearance sampler reads real peak heights; the preview
1066
+ * pass skips that internal warm because `preview` already ran it once per route.
1067
+ *
1068
+ * It also returns null when `signal` aborted before or during that warm, which its caller reads
1069
+ * off the signal: a warm never starts on a dead signal, because the sweep moves the camera and a
1070
+ * map a host supplies need not honour one; and the full-density resolve after it is the costliest
1071
+ * step a record takes before its first frame, so poses sampled against a half-warmed DEM do not
1072
+ * belong in the cache.
1073
+ *
1074
+ * The plan and the route are read once, as the resolve begins, and the flight it answers names
1075
+ * both. A plan or a route set while the record pass warms takes on the next flight: the one in
1076
+ * progress is resolved, stored and recorded for what it began with.
1077
+ */
1078
+ private resolve;
1079
+ /**
1080
+ * recordProfile builds the overlay's recording input for a resolved flight, or nothing.
1081
+ *
1082
+ * All three inputs or none: the overlay is composited only when a caller enabled it AND both the
1083
+ * route and the profile source are present. The samples are resolved through the same planner and
1084
+ * the same frame progression as the poses, over the plan and the route the poses were resolved
1085
+ * for, so the readout on frame N describes the place frame N is looking at: index alignment is
1086
+ * the whole correctness condition here.
1087
+ */
1088
+ private recordProfile;
1089
+ }
1090
+ /** What a fit is framed in: the canvas, the inset kept clear, the ceiling and the zoom window. */
1091
+ interface BoundsCameraOptions {
1092
+ /** The canvas the camera frames, as `[width, height]` in CSS pixels. */
1093
+ readonly canvas: readonly [width: number, height: number];
1094
+ /**
1095
+ * The inset kept clear between the box and each edge of the canvas, in CSS pixels: one number
1096
+ * for every edge, or one per edge, as `FitBoundsPadding` writes it. None where it is left out.
1097
+ *
1098
+ * Stated by its shape rather than by that name: this entry promises no renderer, and naming
1099
+ * the type made the published declarations borrow it from a renderer-bearing entry.
1100
+ */
1101
+ readonly padding?: number | {
1102
+ readonly bottom: number;
1103
+ readonly left: number;
1104
+ readonly right: number;
1105
+ readonly top: number;
1106
+ } | undefined;
1107
+ /** The highest zoom the fit lands at. The zoom window's ceiling where it is left out. */
1108
+ readonly maxZoom?: number | undefined;
1109
+ /** The zoom window the camera is held to, its lowest zoom and its highest. */
1110
+ readonly window: {
1111
+ readonly max: number;
1112
+ readonly min: number;
1113
+ };
1114
+ }
1115
+ /** The camera a fit lands on. It faces north, and keeps the pitch the camera has. */
1116
+ interface BoundsCamera {
1117
+ /** Always 0: a fit faces north. */
1118
+ readonly bearing: number;
1119
+ /** The centre, `[longitude, latitude]`. */
1120
+ readonly center: LngLat;
1121
+ /** The zoom. */
1122
+ readonly zoom: number;
1123
+ }
1124
+ /**
1125
+ * cameraForBounds answers the camera that fits a box in a canvas: facing north, at the highest
1126
+ * zoom at which the box's Web Mercator projection on 512-pixel tiles fits the canvas less its
1127
+ * padding, held under the fit's ceiling and within the zoom window, and centred on the box's
1128
+ * projected middle moved by half the difference of opposite paddings at that zoom.
1129
+ *
1130
+ * The box is read in canonical form, as `normalizeBoundingBox` of `@mountaya/elements/geo` writes
1131
+ * one, the form a map's `fitBounds` reads any box in before it frames it: each axis ordered, one
1132
+ * across the antimeridian written with its east edge past 180, and its latitudes within the Web
1133
+ * Mercator limit. A box of one point fits at every zoom, so it is framed at the ceiling. The
1134
+ * centre of a box across the antimeridian may lie past 180, which a renderer reads as the same
1135
+ * meridian.
1136
+ *
1137
+ * @param bounds The box, `[west, south, east, north]` in canonical form.
1138
+ * @param options The canvas, the padding, the ceiling and the zoom window.
1139
+ * @returns The camera, or null where the padding leaves the canvas no room to frame anything in.
1140
+ *
1141
+ * @example
1142
+ * ```ts
1143
+ * import { cameraForBounds } from "@mountaya/elements/camera";
1144
+ *
1145
+ * // A valley on an 800 by 600 canvas, 48 pixels clear on every side, no closer than zoom 15.
1146
+ * cameraForBounds([6.8, 45.8, 6.95, 45.9], {
1147
+ * canvas: [800, 600],
1148
+ * maxZoom: 15,
1149
+ * padding: 48,
1150
+ * window: { max: 22, min: -2 },
1151
+ * }); // { bearing: 0, center: [6.875, 45.85…], zoom: 11.27… }
1152
+ * ```
1153
+ */
1154
+ export declare const cameraForBounds: (bounds: BoundingBox, options: BoundsCameraOptions) => BoundsCamera | null;
1155
+ /**
1156
+ * GeneratorParams are the inputs a preset generator reads beyond the itinerary: the
1157
+ * whole flight's `targetDurationMs`. Held as an interface so a later input (a
1158
+ * units or framing hint) is an additive field rather than a new positional
1159
+ * argument.
1160
+ */
1161
+ interface GeneratorParams {
1162
+ targetDurationMs: number;
1163
+ }
1164
+ /**
1165
+ * CameraPlanGenerator builds a deterministic {@link CameraPlan} from an itinerary and the
1166
+ * generator params. The same itinerary and params always yield the same plan, so a preset
1167
+ * is reproducible and testable without a map.
1168
+ *
1169
+ * An elevation that is no finite number is not refused: the route is framed as one without
1170
+ * elevations there.
1171
+ *
1172
+ * @throws {MountayaElementsError} When the route holds a vertex that names no place, one
1173
+ * whose longitude or latitude is no finite number. The error names the generator and the
1174
+ * vertex as `itinerary.line[index]`: such a vertex would turn the route's length, and with
1175
+ * it every pose of the flight, into `NaN`.
1176
+ */
1177
+ type CameraPlanGenerator = (itinerary: RouteGeometry, params: GeneratorParams) => CameraPlan;
1178
+ /**
1179
+ * modeEyeHeightMeters is the camera's eye height above the itinerary-surface
1180
+ * elevation per mode, in meters: the altitude the zoom is derived from. Real
1181
+ * altitude, not just a zoom bias, is what separates the aerial modes' parallax from
1182
+ * the grounded ones: `chase` rides the lowest (a genuinely low behind-the-athlete
1183
+ * eye), `cinematic` grounded, `smart` and `overview` mid, `helicopter` high for
1184
+ * the broadcast lateral, `drone` the highest aerial. A consumer framing shots of its
1185
+ * own reads a preset's altitude here, the table the generators read.
1186
+ */
1187
+ export declare const modeEyeHeightMeters: Readonly<Record<Exclude<CameraMode, "director">, number>>;
1188
+ /**
1189
+ * generateSmartPlan lays an adaptive `smart` flight: its interior pitch is derived
1190
+ * per keyframe from the local slope (flatter ground tilts the camera up to read
1191
+ * the terrain ahead, a steep climb or descent lowers the pitch to keep the path in
1192
+ * frame), framed at a balanced baseline. The per-keyframe slopes are first
1193
+ * low-passed with a short 3-tap kernel and the resulting pitch is rate-limited
1194
+ * between adjacent interior keyframes (SMART_MAX_PITCH_STEP), so rolling terrain
1195
+ * whose grade flips leg to leg does not pump the pitch up and down (the horizon
1196
+ * breathing); a sustained grade is preserved because the smoothing and the rate
1197
+ * limit are both no-ops on a monotone slope. The same smoothed slopes drive two
1198
+ * more channels: interior legs SLOW toward the steeps (speedScale down to 0.7 at
1199
+ * full grade, so the steepest sections get up to ~40 % more screen time, duration
1200
+ * invariant through the timeline's normalization) and the framing WIDENS by up to
1201
+ * SMART_STEEP_WIDEN_ZOOM so a wall is read with its context. The zoom comes from
1202
+ * the itinerary-surface elevation plus the mode's eye height, so the camera holds a
1203
+ * consistent height above the path the viewer is watching. It opens and closes on
1204
+ * a gentle establishing beat (the itinerary's fit framing at a slightly raised pitch,
1205
+ * held for a short beat), so the flight settles in rather than cutting into the
1206
+ * middle of the travel. Centres are anchored on the itinerary at each keyframe
1207
+ * fraction.
1208
+ *
1209
+ * @throws {MountayaElementsError} When the route holds a vertex whose longitude or latitude is
1210
+ * no finite number, as {@link CameraPlanGenerator} states.
1211
+ */
1212
+ export declare const generateSmartPlan: CameraPlanGenerator;
1213
+ /**
1214
+ * generateCinematicPlan lays a narrative, expressive `cinematic` flight: a tight,
1215
+ * grounded fixed pitch that fills the frame with the horizon, a positive zoom bias
1216
+ * that pulls in close to the trail, and (through the mode's short bearing
1217
+ * lookahead) a snappy heading that banks into corners. It opens on a dramatic
1218
+ * establishing reveal (the itinerary's fit framing at a raised, more level pitch,
1219
+ * held the longest of the presets), then the travel pulls in tight; it settles
1220
+ * back on the fit framing at a lower outro pitch. It also makes one directorial decision per
1221
+ * flight: the steepest interior keyframe (≥ CINEMATIC_HIGHLIGHT_MIN_SLOPE_DEG,
1222
+ * the first index winning a tie, so the choice is deterministic) becomes a mid-itinerary
1223
+ * highlight beat. The approach eases (speedScale 0.85), the camera re-frames onto the
1224
+ * terrain (pitch trimmed 6°), and the shot dwells 900 ms, which the mid-hold breathe
1225
+ * animates. A flat itinerary has no beat and travels straight through. Zoom tracks the
1226
+ * itinerary-surface elevation at the mode's eye height before the bias. Centres lie
1227
+ * on the itinerary.
1228
+ *
1229
+ * @throws {MountayaElementsError} When the route holds a vertex whose longitude or latitude is
1230
+ * no finite number, as {@link CameraPlanGenerator} states.
1231
+ */
1232
+ export declare const generateCinematicPlan: CameraPlanGenerator;
1233
+ /**
1234
+ * generateDronePlan lays an aerial bird's-eye `drone` flight: the steepest fixed
1235
+ * pitch, a genuinely high eye (modeEyeHeightMeters.drone, real altitude with real
1236
+ * parallax rather than a zoom trick) with a mild wider bias on top, paired with the mode's
1237
+ * long, steady bearing lookahead for a floaty aerial glide. It opens on the itinerary's fit
1238
+ * framing at a pitch lifted to the tilt ceiling, held for a long reveal, and settles back
1239
+ * on it high. Zoom still tracks the itinerary-surface elevation so the camera stays a
1240
+ * sensible height above varied terrain. Centres lie on the itinerary.
1241
+ *
1242
+ * @throws {MountayaElementsError} When the route holds a vertex whose longitude or latitude is
1243
+ * no finite number, as {@link CameraPlanGenerator} states.
1244
+ */
1245
+ export declare const generateDronePlan: CameraPlanGenerator;
1246
+ /**
1247
+ * generateHelicopterPlan lays the broadcast lateral `helicopter` flight: every
1248
+ * keyframe's bearing is pinned (`value`) to the itinerary tangent + 90°, so the eye
1249
+ * hangs off the itinerary's side looking ACROSS at the athlete and the trail crosses
1250
+ * the frame left-to-right: the TdF side-tracking grammar, expressed entirely
1251
+ * inside the centre-on-cursor pose model. The tangent is read over a long window
1252
+ * so the pan is steady through dense vertices, and the side is fixed (always +90°)
1253
+ * so the bearing unwrap never sees a 180° side-swap whip. It opens on a more
1254
+ * overhead establishing pass at the itinerary's fit framing and holds broadcast-steady speed
1255
+ * throughout; the eye rides high (modeEyeHeightMeters.helicopter). Because no
1256
+ * keyframe follows, the athlete stays dead-centre (correct for a lateral track),
1257
+ * and the preset hold beats still get their reveal/settle shaping.
1258
+ *
1259
+ * @throws {MountayaElementsError} When the route holds a vertex whose longitude or latitude is
1260
+ * no finite number, as {@link CameraPlanGenerator} states.
1261
+ */
1262
+ export declare const generateHelicopterPlan: CameraPlanGenerator;
1263
+ /**
1264
+ * generateChasePlan lays the low behind-the-athlete `chase` flight: the highest
1265
+ * travelling pitch (nearly horizon-filled), a strong positive zoom bias over the
1266
+ * lowest eye of the presets (modeEyeHeightMeters.chase: the camera genuinely
1267
+ * rides just above and behind the athlete), and the tightest smoothing and
1268
+ * shortest lookahead so it banks hard into corners with action-cam energy. Its
1269
+ * pitch is slope-trimmed like smart's but gentler (half the slope, capped at
1270
+ * 12°), through the same de-pump smoothing and rate limit. Descents ACCELERATE:
1271
+ * a leg dropping at CHASE_DESCENT_FULL_SLOPE_DEG or steeper runs up to 1.5× while
1272
+ * climbs hold 1, with the flight duration invariant through the timeline's
1273
+ * normalization. It opens slightly elevated on the itinerary's fit framing, then dives
1274
+ * into the chase.
1275
+ *
1276
+ * @throws {MountayaElementsError} When the route holds a vertex whose longitude or latitude is
1277
+ * no finite number, as {@link CameraPlanGenerator} states.
1278
+ */
1279
+ export declare const generateChasePlan: CameraPlanGenerator;
1280
+ /**
1281
+ * generateOverviewPlan lays the cartographic `overview` reveal. The endpoints are
1282
+ * explicit near-nadir whole-itinerary frames, each held long enough for the map to
1283
+ * read (the longest intro of any mode):
1284
+ *
1285
+ * - pitch OVERVIEW_ENDPOINT_PITCH;
1286
+ * - bearing along the itinerary's overall heading (the intro as a `locked` first shot,
1287
+ * which holds it; the outro as a `value` shot stating the same heading, since a
1288
+ * locked shot there would hold the heading of the travelling shot before it);
1289
+ * - zoom framing OVERVIEW_FRAME_FACTOR × the farthest-vertex radius around the frame's
1290
+ * own centre, the itinerary START for the intro and its END for the outro. That span
1291
+ * keeps every vertex in a frame centred there, so a switchbacking climb or a loop
1292
+ * opens at a readable map scale rather than the unrolled length's.
1293
+ *
1294
+ * The interior keyframes are a standard mid-tilt follow at the mode's eye height, so the
1295
+ * flight DIVES from the opening map into the trail over the first leg (the
1296
+ * Catmull-Rom pitch/zoom channels and the locked→follow bearing smoothstep
1297
+ * rotate it in), travels the itinerary, and pulls back out to the closing map. It is
1298
+ * the "here is the whole itinerary" bookend every itinerary-share video wants.
1299
+ *
1300
+ * @throws {MountayaElementsError} When the route holds a vertex whose longitude or latitude is
1301
+ * no finite number, as {@link CameraPlanGenerator} states.
1302
+ */
1303
+ export declare const generateOverviewPlan: CameraPlanGenerator;
1304
+ /**
1305
+ * neutralDirectorPlan seeds an empty `director` plan: no shots, just the mode and
1306
+ * the target duration. An explicit shot sequence (a control or an agent's camera
1307
+ * edits) fills it; until then the resolver falls back to a full-itinerary follow shot
1308
+ * so a preview is never blank.
1309
+ */
1310
+ export declare const neutralDirectorPlan: (params: GeneratorParams) => CameraPlan;
1311
+ /**
1312
+ * cameraPlanGenerators dispatches a non-director mode to its deterministic
1313
+ * generator. `director` is excluded because it has no generator (its plan is
1314
+ * seeded empty by {@link neutralDirectorPlan} and filled by explicit shots), so a
1315
+ * caller picking a generator handles only the modes that produce one.
1316
+ */
1317
+ export declare const cameraPlanGenerators: Readonly<Record<Exclude<CameraMode, "director">, CameraPlanGenerator>>;
1318
+ /**
1319
+ * The encoder vocabulary, read from `./vocabulary` rather than restated: the vocabulary is a
1320
+ * leaf both this module and the plan import DOWNWARD, so there is nothing to keep in step by
1321
+ * hand.
1322
+ */
1323
+ type VideoResolution = CameraResolution;
1324
+ type VideoFps = CameraFps;
1325
+ type VideoFormat = CameraOutputFormat;
1326
+ /**
1327
+ * VideoPresetTemplate is the encoder-output seed a ready-made preset stamps onto
1328
+ * a camera plan's output: the container `format`, the vertical `resolution`, the
1329
+ * frame `aspect`, the `fps`, and the `bitrateMbps` the preset hard-codes (a preset
1330
+ * is a fixed recipe, so its bitrate is fixed rather than derived from a quality
1331
+ * tier). The fields are exactly the `CameraOutput` fields a preset sets, so applying a
1332
+ * template is a single spread over the plan's output.
1333
+ */
1334
+ interface VideoPresetTemplate {
1335
+ readonly aspect: CameraAspect;
1336
+ readonly bitrateMbps: number;
1337
+ readonly format: VideoFormat;
1338
+ readonly fps: VideoFps;
1339
+ readonly resolution: VideoResolution;
1340
+ }
1341
+ /**
1342
+ * videoPresets holds the ready-made templates for the platforms a video is posted to, keyed by
1343
+ * every member of {@link VideoPreset} but `custom`, so the keys follow the vocabulary. Every
1344
+ * template is the same broadcast-ready recipe (1080p H.264 at 30 fps, 12 Mbps: the
1345
+ * 1080p/30/high row of bitrateTableMbps), differing only in frame shape: `vertical` 9:16
1346
+ * (Stories, Reels, Shorts, TikTok), `widescreen` 16:9 (YouTube and the web), and `square` 1:1
1347
+ * (feed posts). `custom` carries no template (it reveals the full matrix instead), so only the
1348
+ * platform presets appear here. Applying one spreads its template over the plan's output and
1349
+ * names the preset.
1350
+ */
1351
+ export declare const videoPresets: Readonly<Record<Exclude<VideoPreset, "custom">, VideoPresetTemplate>>;
1352
+ /**
1353
+ * BITRATE_MBPS_MIN and BITRATE_MBPS_MAX bound an encoder bitrate override.
1354
+ *
1355
+ * Below ~1 Mbps the output looks muddy; above ~45 Mbps the file grows for negligible visual
1356
+ * gain. The ceiling is bitrateTableMbps's own top cell (2160p/60/high) rather than a
1357
+ * separate judgement, so a value the quality matrix offers is always one the bound accepts:
1358
+ * two numbers that agree by maintenance is how a UI comes to quote a bitrate a validator
1359
+ * then rejects. A validator of a plan's output reads them, and so does any encoder clamping a
1360
+ * caller-supplied override before handing it to the codec.
1361
+ */
1362
+ export declare const BITRATE_MBPS_MIN = 1;
1363
+ /** The highest encoder bitrate an override may state, in Mbps. */
1364
+ export declare const BITRATE_MBPS_MAX: number;
1365
+ /**
1366
+ * bitrateForOutput returns the recommended encoder bitrate in Mbps for a
1367
+ * resolution + frame rate + quality tier, read straight from bitrateTableMbps.
1368
+ * A custom output shows this derived value (rather than letting the user type a
1369
+ * raw Mbps) so the bitrate always matches the chosen fidelity; 24 fps shares the
1370
+ * 30 fps row (the encoder treats the two as one rate tier). The returned value
1371
+ * stays within {@link BITRATE_MBPS_MIN} and {@link BITRATE_MBPS_MAX}, with 2160p/60/high at
1372
+ * the 45 Mbps ceiling.
1373
+ *
1374
+ * @param resolution The output's vertical resolution.
1375
+ * @param fps The output's frame rate; 24 fps takes the 30 fps figures.
1376
+ * @param quality The quality tier: the column of the row read.
1377
+ * @returns The bitrate, in Mbps.
1378
+ */
1379
+ export declare const bitrateForOutput: (resolution: VideoResolution, fps: VideoFps, quality: Quality) => number;
1380
+ /**
1381
+ * estimatedVideoSizeMb estimates the encoded file size in decimal megabytes for a
1382
+ * constant-bitrate recording: the megabits the bitrate carries over the flight's length, stated
1383
+ * in megabytes through {@link convertDataSize}, eight bits to a byte.
1384
+ *
1385
+ * It is the figure the review step shows beside the chosen encoder settings, a rough "this clip
1386
+ * is about N MB" rather than a byte-exact prediction: the variable-bitrate encoder lands close to
1387
+ * its target, not on it. Pure, so the review surface recomputes it from the plan alone.
1388
+ *
1389
+ * @param bitrateMbps The encoder's target bitrate, in Mbps.
1390
+ * @param durationMs The recording's length, in milliseconds.
1391
+ * @returns The size, in decimal megabytes.
1392
+ */
1393
+ export declare const estimatedVideoSizeMb: (bitrateMbps: number, durationMs: number) => number;
1394
+ /**
1395
+ * aspectRatio returns the numeric width/height ratio for a frame aspect (16:9
1396
+ * landscape, 9:16 portrait, or 1:1 square), so a preview surface can size its box to
1397
+ * whatever the plan's output targets (a portrait preset frames the map 9:16, not the
1398
+ * landscape default). A pure mapping with no encoder side, kept beside the presets that
1399
+ * set the aspect.
1400
+ */
1401
+ export declare const aspectRatio: (aspect: CameraAspect) => number;
1402
+ /**
1403
+ * suggestVideoLengthMs proposes a flight duration (ms) for an itinerary from its length:
1404
+ * roughly one second per kilometer plus a 10 s establishing cushion, rounded to
1405
+ * whole seconds, then clamped to the slider window [20 s, 120 s]. It is the
1406
+ * "Suggested" default the length control seeds: a 30 km itinerary lands near 40 s, a
1407
+ * 200 km itinerary saturates at the 120 s ceiling, and any sub-10 km itinerary floors at
1408
+ * 20 s. Pure, so the control and any preview can recompute it from the itinerary alone.
1409
+ *
1410
+ * @param routeLengthMeters The itinerary's length, in meters.
1411
+ */
1412
+ export declare const suggestVideoLengthMs: (routeLengthMeters: number) => number;
1413
+ /**
1414
+ * sameRouteContent answers whether two routes hold the same content: every vertex, every
1415
+ * elevation and every jump, in order, by the rule {@link holdsRouteContent} states.
1416
+ *
1417
+ * It is the rule {@link VideoFlightEngine.setRoute} reads to tell a route handed over again from
1418
+ * another one, published so a host that keeps its own copy of the route decides the same way.
1419
+ *
1420
+ * @example
1421
+ * ```ts
1422
+ * import { sameRouteContent, type RouteGeometry } from "@mountaya/elements/camera";
1423
+ *
1424
+ * declare const held: RouteGeometry;
1425
+ * declare const handed: RouteGeometry;
1426
+ *
1427
+ * if (!sameRouteContent(held, handed)) {
1428
+ * console.log("another route: its flights resolve again");
1429
+ * }
1430
+ * ```
1431
+ */
1432
+ export declare const sameRouteContent: (a: RouteGeometry, b: RouteGeometry) => boolean;
1433
+ /**
1434
+ * planDurationMs is the wall-clock length a plan plays for in milliseconds: its
1435
+ * base `targetDurationMs` plus the sum of every shot's `holdMs` (each hold pauses
1436
+ * the camera at its keyframe for that long on top of the travelling time). This
1437
+ * is the duration the track resolver sizes its per-frame grid from, so the frame
1438
+ * count reflects the holds the user added.
1439
+ */
1440
+ export declare const planDurationMs: (plan: CameraPlan) => number;
1441
+ /**
1442
+ * capturesSweptViewports answers whether a record captures exactly the viewports its sweep jumped
1443
+ * through, frame by frame, so the recorder needs no warm pass of its own.
1444
+ *
1445
+ * A record sweeps the sampler-free track, whose centers and bearings are the captured ones. The
1446
+ * clearance pass then lowers a frame's pitch over terrain and, as its fallback, its zoom, and a
1447
+ * frame it moved shows ground the sweep never framed, at a tile zoom nobody asked for. So any
1448
+ * difference in any field of any frame, or in the count of frames, answers false.
1449
+ *
1450
+ * A recorder told so (`warmed` on `MapClient.recordPoses`) skips its own warm pass, which a
1451
+ * caller that swept the map itself would otherwise pay twice.
1452
+ *
1453
+ * @param swept - The poses the sweep jumped through.
1454
+ * @param captured - The poses the recorder captures.
1455
+ * @returns True when both hold the same viewport at every frame.
1456
+ */
1457
+ export declare const capturesSweptViewports: (swept: readonly ShotCamera[], captured: readonly ShotCamera[]) => boolean;
1458
+ /**
1459
+ * resolveFrameProgressions is the per-frame itinerary-progress fraction sequence both
1460
+ * resolveCameraTrack and resolveRouteMarkers walk: for each of the
1461
+ * `frameCountFor(plan)` frames it maps the frame's wall-clock time
1462
+ * (`(frame / lastFrame) * planDurationMs`, honouring every shot's hold and speedScale
1463
+ * through buildTimeline and progressAtTime) to the itinerary fraction at that instant.
1464
+ * Held as one helper so every per-frame array a plan resolves (the pose track, the
1465
+ * moving marker, the profile samples) is the same length and aligns
1466
+ * frame-for-frame: `fractions[i]` is the progress the camera, the marker, and the
1467
+ * overlay all read at frame i. An empty-shots plan resolves through the same
1468
+ * full-itinerary follow shots, so the sequence sweeps 0→1 even on a freshly-seeded
1469
+ * director plan.
1470
+ */
1471
+ export declare const resolveFrameProgressions: (plan: CameraPlan) => number[];
1472
+ /**
1473
+ * resolveCameraTrack turns a camera plan and its itinerary into the render-free
1474
+ * per-frame pose array the map flies and records. The frame count is
1475
+ * `ceil(planDurationMs / 1000 * fps)` (the holds extend the count along with the
1476
+ * wall-clock), so an encoder stamping one frame per 1/fps reproduces the plan's
1477
+ * full duration: the exported file lasts exactly as long as the preview
1478
+ * rehearsal, holds dwelt at their real length. Each frame's wall-clock time
1479
+ * is mapped to an itinerary-progress fraction by a timeline that honours every shot's
1480
+ * `holdMs` (progress freezes at the shot while the camera dwells) and `speedScale`
1481
+ * (a leg's share of the travelling time scales inversely, so a >1 scale spends
1482
+ * that leg faster); the pose at that progress comes from the smoothed spline. An
1483
+ * empty-shots plan (a freshly-seeded `director` plan) resolves to a single
1484
+ * full-itinerary follow flight so a preview is never blank.
1485
+ *
1486
+ * Smoothing is distance-domain: each mode's σ is an itinerary DISTANCE (meters),
1487
+ * converted to frame samples per itinerary via sigmaFramesForMeters, so the window
1488
+ * covers the same fraction of the trail no matter the duration: a 10 s and a 60 s
1489
+ * flight over the same itinerary smooth the same itinerary distance and are equally
1490
+ * accurate, rather than a fixed-seconds window over-smoothing the short one.
1491
+ *
1492
+ * When a `sampler` is supplied (the tool layer injects the map's DEM readout), a
1493
+ * clearance pass runs over the smoothed framing channels: it derives the camera eye
1494
+ * per frame and, where the eye would sink into the terrain or the sightline to the
1495
+ * trail would clip a ridge, repositions the camera to clear it, tilting toward
1496
+ * top-down (lowering pitch, which slides the eye over the target) to clear an
1497
+ * occluder, and widening the view (lowering zoom) where a tilt alone cannot. It
1498
+ * returns a per-frame zoom AND pitch adjustment, each only ever lowering its
1499
+ * channel; the final framing is the min of the mode-smoothed value and the
1500
+ * clearance value on both channels. Both clearance channels are smoothed with the
1501
+ * same anticipation window, so the reframing leads the peak and never jolts the
1502
+ * motion. Without a sampler (a render-free test, no map, the embed) the output is
1503
+ * identical to the un-cleared track on every channel.
1504
+ *
1505
+ * `clearanceStride` decimates the clearance pass's per-frame frustum solve (see
1506
+ * ClearanceOptions.sampleStride): a preview passes a coarse stride so a long flight
1507
+ * resolves without stalling, while a record passes 1 (or omits it) to solve every
1508
+ * frame so the exported artifact is byte-unchanged. Omitted, the clearance runs at
1509
+ * full density.
1510
+ *
1511
+ * A route that crosses the antimeridian is flown along it. The route is read with its
1512
+ * longitudes continuous ({@link continuousLine}), so each centre runs on from the one before
1513
+ * it and is answered past 180, or below -180, on the far side of the line: a renderer reads a
1514
+ * longitude a turn away as the same place, and a consumer that needs the wire's range wraps it.
1515
+ *
1516
+ * **The sampler-free call is memoized**, and only that one. Without a sampler the result is a
1517
+ * pure function of the plan and the itinerary (the clearance pass is the only thing either
1518
+ * remaining parameter reaches, and it does not run), so the same pair can answer from a cache.
1519
+ * With a sampler it cannot: the DEM the sampler reads is whatever tiles happen to be loaded,
1520
+ * which changes under the same arguments and is the whole reason the record path resolves a
1521
+ * second time after warming.
1522
+ *
1523
+ * The memoized call is the one made for TILE WARMING, and it is made twice on the record path
1524
+ * for one flight: once to warm and once again before the prewarm. Each resolves a spline, a
1525
+ * timeline and a Gaussian over every frame of the flight (thousands of frames for a minute at
1526
+ * 60 fps) to produce poses nobody looks at, only flies over to load tiles.
1527
+ *
1528
+ * **The memoized array is SHARED with the next caller, so it is typed read-only.** Copying it
1529
+ * per call would allocate a pose object per frame and give back most of what the memo saves. A
1530
+ * caller flies a resolved pose, warms against it, or reads a frame out of it, and
1531
+ * `resolveCameraTrack` is where a pose is made, not where one is edited.
1532
+ *
1533
+ * @throws {MountayaElementsError} When the route holds a vertex whose longitude or latitude is
1534
+ * no finite number, naming it as `itinerary.line[index]`: such a vertex would turn every pose
1535
+ * of the flight into `NaN`.
1536
+ */
1537
+ export declare const resolveCameraTrack: (plan: CameraPlan, itinerary: RouteGeometry, sampler?: TerrainSampler, clearanceStride?: number) => readonly ShotCamera[];
1538
+ /**
1539
+ * resolveRouteMarkers is the public per-frame moving-marker path, a thin wrapper
1540
+ * over resolveMarkerSeries. Every returned point lies exactly on the itinerary polyline
1541
+ * (the marker is sampled, not smoothed), so the map's "you are here" dot sits on the
1542
+ * trail on every frame including bends and hairpins. It is a function of its own so
1543
+ * resolveCameraTrack answers ShotCamera[] alone, and the map reads the dot positions
1544
+ * through one stable seam.
1545
+ *
1546
+ * The markers are written in the same run of longitudes as the poses: continuous along the
1547
+ * route, so past 180 or below -180 on the far side of an antimeridian crossing.
1548
+ *
1549
+ * @throws {MountayaElementsError} When the route holds a vertex whose longitude or latitude is
1550
+ * no finite number, naming it as `itinerary.line[index]`, as {@link resolveCameraTrack} does.
1551
+ */
1552
+ export declare const resolveRouteMarkers: (plan: CameraPlan, itinerary: RouteGeometry) => LngLat[];
1553
+ /**
1554
+ * clearanceStrideFor is the plan-level convenience the preview resolve uses to pick
1555
+ * the clearance sample stride, mirroring resolveFrameProgressions in taking a whole
1556
+ * (plan, itinerary) and deriving the per-frame quantity from it. It forwards the plan's
1557
+ * frame count, the itinerary length, and the mode (which sizes the anticipation
1558
+ * window) to clearanceSampleStride, so a preview resolves the clearance at the coarse
1559
+ * stride that keeps the solve a sub-100 ms task while a record passes 1 for full
1560
+ * density and a byte-unchanged artifact.
1561
+ */
1562
+ export declare const clearanceStrideFor: (plan: CameraPlan, itinerary: RouteGeometry) => number;
1563
+ /**
1564
+ * posePlanSignature is a compact, stable string of ONLY the plan fields that change
1565
+ * the resolved poses: the `mode`, the whole-flight `targetDurationMs`, and the output
1566
+ * `fps` (all three size or shape the per-frame grid), plus each shot's pose-affecting
1567
+ * fields (`at`, `bearingDeg`, `bearingMode`, `holdMs`, `pitchDeg`, `speedScale`,
1568
+ * `zoom`). It deliberately EXCLUDES the encoder-only output fields
1569
+ * (`resolution`/`aspect`/`bitrateMbps`/`quality`/`format`/`preset`) and the shot `id`,
1570
+ * so a format-only edit produces the SAME signature: the memo key the tool layer
1571
+ * caches resolved poses under, which is what lets a preset or resolution change reuse
1572
+ * the cached flight instead of re-resolving it. Shot order is the plan's own
1573
+ * sorted-by-`at` order, so two plans with identical framing hash identically.
1574
+ */
1575
+ export declare const posePlanSignature: (plan: CameraPlan) => string;
1576
+ /**
1577
+ * representativeStillFraction is the flight-fraction (0..1 over the frame grid) a
1578
+ * parked preview should sit at so it shows the mode's TRAVELLING framing immediately
1579
+ * rather than the wide establishing reveal of the intro hold. It parks just past the
1580
+ * intro establishing beat (the first shot's hold, as its share of the wall-clock)
1581
+ * plus a fraction of the flight remaining after it, so the framing is engaged in
1582
+ * travel whatever the intro dwell. A director or empty-shots plan has no preset style
1583
+ * to show and is still being authored, so it parks at the start (0). previewSeek maps
1584
+ * this fraction to the pose at `round(fraction * lastFrame)`, so on a hold-warped grid
1585
+ * it still lands past the frozen intro frames.
1586
+ */
1587
+ export declare const representativeStillFraction: (plan: CameraPlan) => number;
1588
+ /**
1589
+ * groundMetersPerPixel returns the Web Mercator ground resolution at a zoom and latitude: how many
1590
+ * ground meters one screen pixel spans, `(circumference * cos(lat)) / (tileSize * 2^zoom)`.
1591
+ *
1592
+ * It is the resolution a camera's zoom inverts, so a framing (how far off-centre a marker sits as
1593
+ * a fraction of the frame, how wide a padding is on the ground) reasons in ground meters without
1594
+ * deriving the projection again.
1595
+ *
1596
+ * @param zoom The renderer's zoom.
1597
+ * @param latitude The latitude the pixel stands at, in degrees.
1598
+ * @returns Ground meters per CSS pixel, or 0 for a zoom that is no finite number (a degenerate
1599
+ * span the caller reads as no budget).
1600
+ */
1601
+ export declare const groundMetersPerPixel: (zoom: number, latitude: number) => number;
1602
+ /**
1603
+ * CINEMATIC_EYE_HEIGHT_METERS is the height, in meters, the `cinematic` preset's eye flies above
1604
+ * the route's surface elevation.
1605
+ *
1606
+ * Grounded: high enough to read the terrain around the path, low enough that the trail does not
1607
+ * shrink to a thread. `generateCinematicPlan` adds it to the surface elevation at each travelling
1608
+ * keyframe before it derives the zoom, and `modeEyeHeightMeters.cinematic` is this constant, so a
1609
+ * consumer reproducing the preset's framing reads the height the preset flies at.
1610
+ */
1611
+ export declare const CINEMATIC_EYE_HEIGHT_METERS = 260;
1612
+ /**
1613
+ * POINT_ZOOM is the zoom a camera lands at on a point that names no extent, when the caller
1614
+ * names no zoom either: close enough to read the place, wide enough to keep its surroundings.
1615
+ *
1616
+ * One declaration for every surface that flies to a point: a search result with no bounds, a
1617
+ * zone opened on its anchor, a tool call that states a point and no zoom.
1618
+ *
1619
+ * @example
1620
+ * ```ts
1621
+ * import { POINT_ZOOM } from "@mountaya/elements/camera";
1622
+ *
1623
+ * declare const map: { flyTo(target: { center: [number, number]; zoom: number }): void };
1624
+ * declare const point: [number, number];
1625
+ *
1626
+ * map.flyTo({ center: point, zoom: POINT_ZOOM });
1627
+ * ```
1628
+ */
1629
+ export declare const POINT_ZOOM = 13;
1630
+ /**
1631
+ * DEFAULT_VIEWPORT_HEIGHT_PX is the canvas height, in CSS pixels, altitudeToZoom and
1632
+ * viewportGroundSpanMeters calibrate against when a caller does not pass the live
1633
+ * viewport. The perspective model scales zoom with the actual canvas height; this
1634
+ * nominal value keeps the model usable in a render-free context (a generator
1635
+ * running without a map). The track resolver's framing budget reads the same
1636
+ * nominal height, and so does a consumer that frames shots of its own with no canvas.
1637
+ */
1638
+ export declare const DEFAULT_VIEWPORT_HEIGHT_PX = 800;
1639
+ /**
1640
+ * altitudeToZoom converts a camera eye altitude in meters to a MapLibre zoom
1641
+ * level, from MapLibre's perspective model: the camera's altitude projects to a
1642
+ * screen-pixel distance (viewport height times the FOV factor), and screen pixels
1643
+ * map to ground meters by the Web Mercator ground resolution
1644
+ * `metersPerPixel = (circumference * cos(lat)) / (tileSize * 2^zoom)`. Solving for
1645
+ * zoom gives `2^zoom = (altitudePx * circumference) / (tileSize * altitude)`.
1646
+ * `viewportHeightPx` is the live canvas height, so passing the real value yields
1647
+ * a zoom that matches what is on screen. A non-positive or non-finite altitude
1648
+ * returns a safe mid zoom; the result is clamped to a flight-appropriate [4, 16].
1649
+ *
1650
+ * @param altitudeMeters The eye's altitude above the ground it looks at, in meters.
1651
+ * @param latitude The latitude the ground resolution is read at, in degrees.
1652
+ * @param viewportHeightPx The canvas height in CSS pixels. Defaults to
1653
+ * {@link DEFAULT_VIEWPORT_HEIGHT_PX}.
1654
+ */
1655
+ export declare const altitudeToZoom: (altitudeMeters: number, latitude: number, viewportHeightPx?: number) => number;
1656
+ /**
1657
+ * zoomToAltitude is the inverse of altitudeToZoom: it converts a MapLibre zoom
1658
+ * level back to the camera eye altitude in meters the perspective model places
1659
+ * the camera at. Solving the same relation for altitude gives
1660
+ * `altitude = (altitudePx * circumference) / (tileSize * 2^zoom)`, where
1661
+ * `altitudePx` is the viewport height in CSS pixels times the FOV factor and the
1662
+ * circumference is scaled by `cos(lat)` for the Web Mercator ground resolution.
1663
+ * `viewportHeightPx` is the live canvas height, so passing the real value yields
1664
+ * the altitude that matches what is on screen. A non-finite zoom returns a safe
1665
+ * mid altitude; the altitude is the clearance pass's working unit (it compares
1666
+ * eye heights against terrain), and altitudeToZoom clamps the value on the way
1667
+ * back to a zoom, so this returns the raw meters without its own clamp.
1668
+ *
1669
+ * @param zoom The MapLibre zoom level.
1670
+ * @param latitude The latitude the ground resolution is read at, in degrees.
1671
+ * @param viewportHeightPx The canvas height in CSS pixels. Defaults to
1672
+ * {@link DEFAULT_VIEWPORT_HEIGHT_PX}.
1673
+ */
1674
+ export declare const zoomToAltitude: (zoom: number, latitude: number, viewportHeightPx?: number) => number;
1675
+ /**
1676
+ * viewportGroundSpanMeters returns the ground distance in meters the full
1677
+ * viewport height covers at a zoom and latitude: the viewport height in pixels
1678
+ * times the per-pixel ground resolution. It is the scale the athlete-framing
1679
+ * budget is expressed against (a lead or an off-centre offset is a fraction of
1680
+ * this span), so the framing reads the same on screen regardless of the zoom the
1681
+ * flight is at. A non-positive or non-finite height falls back to the nominal.
1682
+ *
1683
+ * @param viewportHeightPx The canvas height in CSS pixels. Defaults to
1684
+ * {@link DEFAULT_VIEWPORT_HEIGHT_PX}, the render-free nominal height, so the value is
1685
+ * usable without a live canvas.
1686
+ */
1687
+ export declare const viewportGroundSpanMeters: (zoom: number, latitude: number, viewportHeightPx?: number) => number;
1688
+ /**
1689
+ * ZoomLimitReached is which end of its zoom window a camera stands at: the ceiling, the floor, both
1690
+ * (a window of one zoom), or neither.
1691
+ */
1692
+ type ZoomLimitReached = "both" | "ceiling" | "floor" | "none";
1693
+ /**
1694
+ * zoomLimitReached answers which end of its zoom window a camera stands at.
1695
+ *
1696
+ * The camera stands at the ceiling at it or above it and at the floor at it or below it, the zoom
1697
+ * read unrounded, so a camera a fraction under the ceiling stands at neither end. A renderer holds
1698
+ * its camera within the window, and a camera found past an end stands at that end.
1699
+ *
1700
+ * @param zoom The camera's zoom.
1701
+ * @param window The zoom window the camera is held to, its lowest zoom and its highest.
1702
+ *
1703
+ * @example
1704
+ * ```ts
1705
+ * import { zoomLimitReached } from "@mountaya/elements/camera";
1706
+ *
1707
+ * zoomLimitReached(14, { max: 14, min: 10 }); // "ceiling"
1708
+ * zoomLimitReached(12, { max: 12, min: 12 }); // "both"
1709
+ * ```
1710
+ */
1711
+ export declare const zoomLimitReached: (zoom: number, window: {
1712
+ readonly max: number;
1713
+ readonly min: number;
1714
+ }) => ZoomLimitReached;
1715
+ /**
1716
+ * zoomControlsDisabled names the zoom controls disabled at each end a camera stands at: zoom in at
1717
+ * the ceiling, zoom out at the floor, and both in a window of one zoom. A control is disabled there
1718
+ * whoever answers its press, the map or a handler that takes the press over, since either would
1719
+ * move the camera nowhere.
1720
+ */
1721
+ export declare const zoomControlsDisabled: Readonly<Record<ZoomLimitReached, readonly ("zoom-in" | "zoom-out")[]>>;
1722
+ export { type BoundingBox, type BoundsCamera, type BoundsCameraOptions, CAMERA_ASPECTS, CAMERA_BEARING_MODES, CAMERA_FPS, CAMERA_MODES, CAMERA_OUTPUT_FORMATS, CAMERA_RESOLUTIONS, type CameraAspect, type CameraBearingMode, type CameraFps, type CameraMode, type CameraOutput, type CameraOutputFormat, type CameraPlan, type CameraPlanGenerator, type CameraPlanInput, type CameraPlanner, type CameraResolution, type CameraShot, type ClearanceAdjustment, type ClearanceFrame, type ClearanceOptions, DEFAULT_TARGET_DURATION_MS, type GeneratorParams, type LngLat, PROFILE_DESIGNS, type ProfileDesign, type ProfileSample, type ProfileSource, QUALITY_TIERS, type Quality, type RecordOutput, type RecordProfile, type RecordingCamera, type RouteCursor, type RouteGeometry, type SegmentSpan, type ShotCamera, type TerrainSampler, type UnitFormatOptions, VIDEO_PRESETS_AVAILABLE, VIDEO_RECORDING_PHASES, type VideoFlight, type VideoFlightMap, type VideoFlightOptions, type VideoFlightOutcome, type VideoFlightProfile, type VideoFlightRecording, type VideoFlightStatus, type VideoPreset, type VideoPresetTemplate, type VideoProgress, type VideoRecordingPhase, type VideoRecordingResult, type ZoomLimitReached, createCameraPlan, cumulativeMeters, defaultCameraOutput, defaultCameraShot, insertShotSorted, resolveProfileSamples, routeLengthMeters };
1723
+ //# sourceMappingURL=index.d.ts.map