@mountaya/elements 0.0.0-stage → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (831) hide show
  1. package/CHANGELOG.md +235 -0
  2. package/LICENCE.fr.txt +280 -0
  3. package/LICENSE.txt +262 -0
  4. package/README.md +1509 -2
  5. package/THIRD-PARTY-NOTICES.txt +103 -0
  6. package/dist/accentColor-GNKBD2CW.js +4 -0
  7. package/dist/accentColor-GNKBD2CW.js.map +1 -0
  8. package/dist/accentColor-VX2JSMGE.cjs +17 -0
  9. package/dist/accentColor-VX2JSMGE.cjs.map +1 -0
  10. package/dist/agent/index.cjs +1964 -0
  11. package/dist/agent/index.cjs.map +1 -0
  12. package/dist/agent/index.d.cts +2016 -0
  13. package/dist/agent/index.d.ts +2016 -0
  14. package/dist/agent/index.js +1937 -0
  15. package/dist/agent/index.js.map +1 -0
  16. package/dist/amenities-B3-qAjxu.d.cts +160 -0
  17. package/dist/amenities-B3-qAjxu.d.ts +160 -0
  18. package/dist/bundle-Je5zsRFg.d.cts +222 -0
  19. package/dist/bundle-xYrrbJTH.d.ts +222 -0
  20. package/dist/camera/index.cjs +3477 -0
  21. package/dist/camera/index.cjs.map +1 -0
  22. package/dist/camera/index.d.cts +1751 -0
  23. package/dist/camera/index.d.ts +1751 -0
  24. package/dist/camera/index.js +3328 -0
  25. package/dist/camera/index.js.map +1 -0
  26. package/dist/camera-BrFLU1DH.d.cts +549 -0
  27. package/dist/camera-C48Ykaxv.d.ts +549 -0
  28. package/dist/chunk-23PFRRB6.js +3 -0
  29. package/dist/chunk-23PFRRB6.js.map +1 -0
  30. package/dist/chunk-2GI5SAH2.js +71 -0
  31. package/dist/chunk-2GI5SAH2.js.map +1 -0
  32. package/dist/chunk-2MQK6A74.js +39 -0
  33. package/dist/chunk-2MQK6A74.js.map +1 -0
  34. package/dist/chunk-2RE7R4LD.js +73 -0
  35. package/dist/chunk-2RE7R4LD.js.map +1 -0
  36. package/dist/chunk-3JZQKN4O.js +6 -0
  37. package/dist/chunk-3JZQKN4O.js.map +1 -0
  38. package/dist/chunk-3NDXVUUI.js +50 -0
  39. package/dist/chunk-3NDXVUUI.js.map +1 -0
  40. package/dist/chunk-3R4GFTUM.cjs +59 -0
  41. package/dist/chunk-3R4GFTUM.cjs.map +1 -0
  42. package/dist/chunk-3RVUQ6JN.cjs +22 -0
  43. package/dist/chunk-3RVUQ6JN.cjs.map +1 -0
  44. package/dist/chunk-4F6BJMJC.cjs +49 -0
  45. package/dist/chunk-4F6BJMJC.cjs.map +1 -0
  46. package/dist/chunk-4NWQD4BX.js +132 -0
  47. package/dist/chunk-4NWQD4BX.js.map +1 -0
  48. package/dist/chunk-5K2MH3R6.js +10 -0
  49. package/dist/chunk-5K2MH3R6.js.map +1 -0
  50. package/dist/chunk-6ACRNQQQ.cjs +8 -0
  51. package/dist/chunk-6ACRNQQQ.cjs.map +1 -0
  52. package/dist/chunk-6D26E3IA.js +66 -0
  53. package/dist/chunk-6D26E3IA.js.map +1 -0
  54. package/dist/chunk-6ESAW35P.cjs +80 -0
  55. package/dist/chunk-6ESAW35P.cjs.map +1 -0
  56. package/dist/chunk-6LIW2A5M.cjs +1176 -0
  57. package/dist/chunk-6LIW2A5M.cjs.map +1 -0
  58. package/dist/chunk-6OTTWVCA.js +57 -0
  59. package/dist/chunk-6OTTWVCA.js.map +1 -0
  60. package/dist/chunk-6VROJ4UG.js +862 -0
  61. package/dist/chunk-6VROJ4UG.js.map +1 -0
  62. package/dist/chunk-6Y7FTGO4.js +23 -0
  63. package/dist/chunk-6Y7FTGO4.js.map +1 -0
  64. package/dist/chunk-75I4CG64.js +104 -0
  65. package/dist/chunk-75I4CG64.js.map +1 -0
  66. package/dist/chunk-7CUBXHAH.cjs +14 -0
  67. package/dist/chunk-7CUBXHAH.cjs.map +1 -0
  68. package/dist/chunk-7GTCURVY.js +52 -0
  69. package/dist/chunk-7GTCURVY.js.map +1 -0
  70. package/dist/chunk-7IWOL6AM.cjs +100 -0
  71. package/dist/chunk-7IWOL6AM.cjs.map +1 -0
  72. package/dist/chunk-7QN7M667.cjs +151 -0
  73. package/dist/chunk-7QN7M667.cjs.map +1 -0
  74. package/dist/chunk-A6KQDKLM.cjs +1197 -0
  75. package/dist/chunk-A6KQDKLM.cjs.map +1 -0
  76. package/dist/chunk-A77EA67G.js +354 -0
  77. package/dist/chunk-A77EA67G.js.map +1 -0
  78. package/dist/chunk-AFKOABJ4.cjs +7194 -0
  79. package/dist/chunk-AFKOABJ4.cjs.map +1 -0
  80. package/dist/chunk-AG6JV5Z2.cjs +183 -0
  81. package/dist/chunk-AG6JV5Z2.cjs.map +1 -0
  82. package/dist/chunk-APBK7NMS.js +30 -0
  83. package/dist/chunk-APBK7NMS.js.map +1 -0
  84. package/dist/chunk-AWO5YA7A.cjs +33 -0
  85. package/dist/chunk-AWO5YA7A.cjs.map +1 -0
  86. package/dist/chunk-AZATU6QW.js +108 -0
  87. package/dist/chunk-AZATU6QW.js.map +1 -0
  88. package/dist/chunk-BD2U3WST.cjs +623 -0
  89. package/dist/chunk-BD2U3WST.cjs.map +1 -0
  90. package/dist/chunk-BHBEOU6L.cjs +65 -0
  91. package/dist/chunk-BHBEOU6L.cjs.map +1 -0
  92. package/dist/chunk-CNOSNYNE.js +8 -0
  93. package/dist/chunk-CNOSNYNE.js.map +1 -0
  94. package/dist/chunk-CW3EFR4O.js +12 -0
  95. package/dist/chunk-CW3EFR4O.js.map +1 -0
  96. package/dist/chunk-DASVRNBK.js +7187 -0
  97. package/dist/chunk-DASVRNBK.js.map +1 -0
  98. package/dist/chunk-DJ6LCKYP.js +42 -0
  99. package/dist/chunk-DJ6LCKYP.js.map +1 -0
  100. package/dist/chunk-E5FHQAIO.cjs +45 -0
  101. package/dist/chunk-E5FHQAIO.cjs.map +1 -0
  102. package/dist/chunk-EOML5OTY.cjs +360 -0
  103. package/dist/chunk-EOML5OTY.cjs.map +1 -0
  104. package/dist/chunk-EP5CASHL.js +613 -0
  105. package/dist/chunk-EP5CASHL.js.map +1 -0
  106. package/dist/chunk-EP5OEEVZ.cjs +14 -0
  107. package/dist/chunk-EP5OEEVZ.cjs.map +1 -0
  108. package/dist/chunk-EUXI3FGQ.js +150 -0
  109. package/dist/chunk-EUXI3FGQ.js.map +1 -0
  110. package/dist/chunk-EWFSHCOS.js +40 -0
  111. package/dist/chunk-EWFSHCOS.js.map +1 -0
  112. package/dist/chunk-EX2C5K2T.cjs +25 -0
  113. package/dist/chunk-EX2C5K2T.cjs.map +1 -0
  114. package/dist/chunk-FEXWDQIZ.cjs +8 -0
  115. package/dist/chunk-FEXWDQIZ.cjs.map +1 -0
  116. package/dist/chunk-FEYBFY7H.cjs +358 -0
  117. package/dist/chunk-FEYBFY7H.cjs.map +1 -0
  118. package/dist/chunk-FRGAV6N6.cjs +34 -0
  119. package/dist/chunk-FRGAV6N6.cjs.map +1 -0
  120. package/dist/chunk-G5DHP5VF.js +6 -0
  121. package/dist/chunk-G5DHP5VF.js.map +1 -0
  122. package/dist/chunk-G5W2UHV2.js +99 -0
  123. package/dist/chunk-G5W2UHV2.js.map +1 -0
  124. package/dist/chunk-G7OP7O2C.cjs +39 -0
  125. package/dist/chunk-G7OP7O2C.cjs.map +1 -0
  126. package/dist/chunk-GE6CFCAM.cjs +25 -0
  127. package/dist/chunk-GE6CFCAM.cjs.map +1 -0
  128. package/dist/chunk-GIFALLHI.cjs +111 -0
  129. package/dist/chunk-GIFALLHI.cjs.map +1 -0
  130. package/dist/chunk-GLFET5GM.js +129 -0
  131. package/dist/chunk-GLFET5GM.js.map +1 -0
  132. package/dist/chunk-GQ6UFPFM.js +22 -0
  133. package/dist/chunk-GQ6UFPFM.js.map +1 -0
  134. package/dist/chunk-GQJWVMXS.js +129 -0
  135. package/dist/chunk-GQJWVMXS.js.map +1 -0
  136. package/dist/chunk-GVVJPUKC.js +80 -0
  137. package/dist/chunk-GVVJPUKC.js.map +1 -0
  138. package/dist/chunk-GZ2HOCQ2.cjs +134 -0
  139. package/dist/chunk-GZ2HOCQ2.cjs.map +1 -0
  140. package/dist/chunk-HCBOHXWP.js +37 -0
  141. package/dist/chunk-HCBOHXWP.js.map +1 -0
  142. package/dist/chunk-IBQJDVHF.cjs +281 -0
  143. package/dist/chunk-IBQJDVHF.cjs.map +1 -0
  144. package/dist/chunk-ISLB6Y5Q.cjs +106 -0
  145. package/dist/chunk-ISLB6Y5Q.cjs.map +1 -0
  146. package/dist/chunk-J55CRR4F.js +105 -0
  147. package/dist/chunk-J55CRR4F.js.map +1 -0
  148. package/dist/chunk-JBG6Z6MQ.cjs +28 -0
  149. package/dist/chunk-JBG6Z6MQ.cjs.map +1 -0
  150. package/dist/chunk-K3RQOZRU.js +61 -0
  151. package/dist/chunk-K3RQOZRU.js.map +1 -0
  152. package/dist/chunk-KDJYS4GB.cjs +703 -0
  153. package/dist/chunk-KDJYS4GB.cjs.map +1 -0
  154. package/dist/chunk-KMCAHUZM.cjs +4 -0
  155. package/dist/chunk-KMCAHUZM.cjs.map +1 -0
  156. package/dist/chunk-KUCBNPC6.js +87 -0
  157. package/dist/chunk-KUCBNPC6.js.map +1 -0
  158. package/dist/chunk-KV6UE5A4.js +50 -0
  159. package/dist/chunk-KV6UE5A4.js.map +1 -0
  160. package/dist/chunk-L6TZ2HQR.cjs +18 -0
  161. package/dist/chunk-L6TZ2HQR.cjs.map +1 -0
  162. package/dist/chunk-L7QHHGG2.cjs +141 -0
  163. package/dist/chunk-L7QHHGG2.cjs.map +1 -0
  164. package/dist/chunk-LHK3Y2AL.js +271 -0
  165. package/dist/chunk-LHK3Y2AL.js.map +1 -0
  166. package/dist/chunk-LO5RYRBH.cjs +6317 -0
  167. package/dist/chunk-LO5RYRBH.cjs.map +1 -0
  168. package/dist/chunk-LS5SJMUO.cjs +194 -0
  169. package/dist/chunk-LS5SJMUO.cjs.map +1 -0
  170. package/dist/chunk-LUGTMZFN.cjs +42 -0
  171. package/dist/chunk-LUGTMZFN.cjs.map +1 -0
  172. package/dist/chunk-LVUQU6D5.js +32 -0
  173. package/dist/chunk-LVUQU6D5.js.map +1 -0
  174. package/dist/chunk-M2QRC2GZ.js +166 -0
  175. package/dist/chunk-M2QRC2GZ.js.map +1 -0
  176. package/dist/chunk-M6QJYQIM.cjs +53 -0
  177. package/dist/chunk-M6QJYQIM.cjs.map +1 -0
  178. package/dist/chunk-MGCPH5EO.js +12 -0
  179. package/dist/chunk-MGCPH5EO.js.map +1 -0
  180. package/dist/chunk-MLVUWEZR.cjs +474 -0
  181. package/dist/chunk-MLVUWEZR.cjs.map +1 -0
  182. package/dist/chunk-MTAMJMZL.cjs +707 -0
  183. package/dist/chunk-MTAMJMZL.cjs.map +1 -0
  184. package/dist/chunk-MXL5AT3N.js +48 -0
  185. package/dist/chunk-MXL5AT3N.js.map +1 -0
  186. package/dist/chunk-MYEQSESM.cjs +75 -0
  187. package/dist/chunk-MYEQSESM.cjs.map +1 -0
  188. package/dist/chunk-N3VPF6ZD.js +427 -0
  189. package/dist/chunk-N3VPF6ZD.js.map +1 -0
  190. package/dist/chunk-N6VUAIGI.js +7 -0
  191. package/dist/chunk-N6VUAIGI.js.map +1 -0
  192. package/dist/chunk-N6XRLUN6.js +6286 -0
  193. package/dist/chunk-N6XRLUN6.js.map +1 -0
  194. package/dist/chunk-NOGDOZIT.cjs +114 -0
  195. package/dist/chunk-NOGDOZIT.cjs.map +1 -0
  196. package/dist/chunk-NUWXEISH.cjs +10 -0
  197. package/dist/chunk-NUWXEISH.cjs.map +1 -0
  198. package/dist/chunk-NZCZHXYN.cjs +161 -0
  199. package/dist/chunk-NZCZHXYN.cjs.map +1 -0
  200. package/dist/chunk-ODROSWQX.cjs +53 -0
  201. package/dist/chunk-ODROSWQX.cjs.map +1 -0
  202. package/dist/chunk-OE36AYKG.cjs +82 -0
  203. package/dist/chunk-OE36AYKG.cjs.map +1 -0
  204. package/dist/chunk-OLON7MO6.cjs +437 -0
  205. package/dist/chunk-OLON7MO6.cjs.map +1 -0
  206. package/dist/chunk-PBUOR2IT.js +277 -0
  207. package/dist/chunk-PBUOR2IT.js.map +1 -0
  208. package/dist/chunk-PC2ELXFF.cjs +225 -0
  209. package/dist/chunk-PC2ELXFF.cjs.map +1 -0
  210. package/dist/chunk-PCSGXLOC.js +71 -0
  211. package/dist/chunk-PCSGXLOC.js.map +1 -0
  212. package/dist/chunk-PFNMP6FQ.js +56 -0
  213. package/dist/chunk-PFNMP6FQ.js.map +1 -0
  214. package/dist/chunk-PIWSZTIP.js +690 -0
  215. package/dist/chunk-PIWSZTIP.js.map +1 -0
  216. package/dist/chunk-PKWHJ2GI.js +136 -0
  217. package/dist/chunk-PKWHJ2GI.js.map +1 -0
  218. package/dist/chunk-PLMVBX2A.cjs +76 -0
  219. package/dist/chunk-PLMVBX2A.cjs.map +1 -0
  220. package/dist/chunk-PM3XCD2G.cjs +113 -0
  221. package/dist/chunk-PM3XCD2G.cjs.map +1 -0
  222. package/dist/chunk-QAL4GZO7.cjs +143 -0
  223. package/dist/chunk-QAL4GZO7.cjs.map +1 -0
  224. package/dist/chunk-QDB2SEA2.js +74 -0
  225. package/dist/chunk-QDB2SEA2.js.map +1 -0
  226. package/dist/chunk-QOV7UNUN.js +25 -0
  227. package/dist/chunk-QOV7UNUN.js.map +1 -0
  228. package/dist/chunk-QQUWYLSF.cjs +50 -0
  229. package/dist/chunk-QQUWYLSF.cjs.map +1 -0
  230. package/dist/chunk-QUMBH3U4.cjs +9 -0
  231. package/dist/chunk-QUMBH3U4.cjs.map +1 -0
  232. package/dist/chunk-R4KA7OFQ.js +12 -0
  233. package/dist/chunk-R4KA7OFQ.js.map +1 -0
  234. package/dist/chunk-RBSGAZQQ.js +17 -0
  235. package/dist/chunk-RBSGAZQQ.js.map +1 -0
  236. package/dist/chunk-RM5YJWZI.js +46 -0
  237. package/dist/chunk-RM5YJWZI.js.map +1 -0
  238. package/dist/chunk-ROKNKXA4.cjs +8 -0
  239. package/dist/chunk-ROKNKXA4.cjs.map +1 -0
  240. package/dist/chunk-RQG6D546.cjs +75 -0
  241. package/dist/chunk-RQG6D546.cjs.map +1 -0
  242. package/dist/chunk-SG4YDD5L.cjs +74 -0
  243. package/dist/chunk-SG4YDD5L.cjs.map +1 -0
  244. package/dist/chunk-SNRCA7EO.js +56 -0
  245. package/dist/chunk-SNRCA7EO.js.map +1 -0
  246. package/dist/chunk-SO75R4WW.cjs +22 -0
  247. package/dist/chunk-SO75R4WW.cjs.map +1 -0
  248. package/dist/chunk-SP34NHFI.js +45 -0
  249. package/dist/chunk-SP34NHFI.js.map +1 -0
  250. package/dist/chunk-SSKSSBWJ.cjs +179 -0
  251. package/dist/chunk-SSKSSBWJ.cjs.map +1 -0
  252. package/dist/chunk-TB5663C2.js +1108 -0
  253. package/dist/chunk-TB5663C2.js.map +1 -0
  254. package/dist/chunk-TGH4NRES.js +220 -0
  255. package/dist/chunk-TGH4NRES.js.map +1 -0
  256. package/dist/chunk-TJ6ZPNID.js +189 -0
  257. package/dist/chunk-TJ6ZPNID.js.map +1 -0
  258. package/dist/chunk-U45T35N2.cjs +90 -0
  259. package/dist/chunk-U45T35N2.cjs.map +1 -0
  260. package/dist/chunk-UKVOPEZ2.js +442 -0
  261. package/dist/chunk-UKVOPEZ2.js.map +1 -0
  262. package/dist/chunk-UTB4NROA.cjs +887 -0
  263. package/dist/chunk-UTB4NROA.cjs.map +1 -0
  264. package/dist/chunk-UTW33B5V.js +6 -0
  265. package/dist/chunk-UTW33B5V.js.map +1 -0
  266. package/dist/chunk-UYUBSD2V.cjs +33 -0
  267. package/dist/chunk-UYUBSD2V.cjs.map +1 -0
  268. package/dist/chunk-V3JEP5AG.cjs +59 -0
  269. package/dist/chunk-V3JEP5AG.cjs.map +1 -0
  270. package/dist/chunk-VFAGJXHR.js +18 -0
  271. package/dist/chunk-VFAGJXHR.js.map +1 -0
  272. package/dist/chunk-VMEE57E5.cjs +58 -0
  273. package/dist/chunk-VMEE57E5.cjs.map +1 -0
  274. package/dist/chunk-VQVBEX3Y.cjs +113 -0
  275. package/dist/chunk-VQVBEX3Y.cjs.map +1 -0
  276. package/dist/chunk-VZDXX7TT.cjs +64 -0
  277. package/dist/chunk-VZDXX7TT.cjs.map +1 -0
  278. package/dist/chunk-WE5ZTI4D.js +346 -0
  279. package/dist/chunk-WE5ZTI4D.js.map +1 -0
  280. package/dist/chunk-WEFUVABP.js +19 -0
  281. package/dist/chunk-WEFUVABP.js.map +1 -0
  282. package/dist/chunk-WMU4LRKC.js +28 -0
  283. package/dist/chunk-WMU4LRKC.js.map +1 -0
  284. package/dist/chunk-WQ24RRHL.cjs +354 -0
  285. package/dist/chunk-WQ24RRHL.cjs.map +1 -0
  286. package/dist/chunk-WW4CGS7G.cjs +26 -0
  287. package/dist/chunk-WW4CGS7G.cjs.map +1 -0
  288. package/dist/chunk-WXE5WCTM.js +1144 -0
  289. package/dist/chunk-WXE5WCTM.js.map +1 -0
  290. package/dist/chunk-X23BGIYA.cjs +37 -0
  291. package/dist/chunk-X23BGIYA.cjs.map +1 -0
  292. package/dist/chunk-XEW4FTR2.js +98 -0
  293. package/dist/chunk-XEW4FTR2.js.map +1 -0
  294. package/dist/chunk-XIOI4IYW.js +167 -0
  295. package/dist/chunk-XIOI4IYW.js.map +1 -0
  296. package/dist/chunk-XLVPJ37V.cjs +44 -0
  297. package/dist/chunk-XLVPJ37V.cjs.map +1 -0
  298. package/dist/chunk-XOHAXXZA.cjs +51 -0
  299. package/dist/chunk-XOHAXXZA.cjs.map +1 -0
  300. package/dist/chunk-Y4NRIHK6.cjs +313 -0
  301. package/dist/chunk-Y4NRIHK6.cjs.map +1 -0
  302. package/dist/chunk-Y4YMMKL3.js +23 -0
  303. package/dist/chunk-Y4YMMKL3.js.map +1 -0
  304. package/dist/chunk-YJNYBVE3.cjs +14 -0
  305. package/dist/chunk-YJNYBVE3.cjs.map +1 -0
  306. package/dist/chunk-Z762QNQP.cjs +60 -0
  307. package/dist/chunk-Z762QNQP.cjs.map +1 -0
  308. package/dist/chunk-ZG5KMBOF.js +669 -0
  309. package/dist/chunk-ZG5KMBOF.js.map +1 -0
  310. package/dist/chunk-ZKONQEFA.js +344 -0
  311. package/dist/chunk-ZKONQEFA.js.map +1 -0
  312. package/dist/chunk-ZR5X7QMH.js +39 -0
  313. package/dist/chunk-ZR5X7QMH.js.map +1 -0
  314. package/dist/chunk-ZW4BJQ26.js +84 -0
  315. package/dist/chunk-ZW4BJQ26.js.map +1 -0
  316. package/dist/climbs-BhlWuu0x.d.ts +70 -0
  317. package/dist/climbs-DgBFwySV.d.cts +70 -0
  318. package/dist/collab/index.cjs +1283 -0
  319. package/dist/collab/index.cjs.map +1 -0
  320. package/dist/collab/index.d.cts +850 -0
  321. package/dist/collab/index.d.ts +850 -0
  322. package/dist/collab/index.js +1274 -0
  323. package/dist/collab/index.js.map +1 -0
  324. package/dist/data/index.cjs +132 -0
  325. package/dist/data/index.cjs.map +1 -0
  326. package/dist/data/index.d.cts +468 -0
  327. package/dist/data/index.d.ts +468 -0
  328. package/dist/data/index.js +15 -0
  329. package/dist/data/index.js.map +1 -0
  330. package/dist/editor/index.cjs +4506 -0
  331. package/dist/editor/index.cjs.map +1 -0
  332. package/dist/editor/index.d.cts +59 -0
  333. package/dist/editor/index.d.ts +59 -0
  334. package/dist/editor/index.js +4486 -0
  335. package/dist/editor/index.js.map +1 -0
  336. package/dist/elevationTiles-pmsb9wnU.d.cts +77 -0
  337. package/dist/elevationTiles-pmsb9wnU.d.ts +77 -0
  338. package/dist/errors/index.cjs +28 -0
  339. package/dist/errors/index.cjs.map +1 -0
  340. package/dist/errors/index.d.cts +125 -0
  341. package/dist/errors/index.d.ts +125 -0
  342. package/dist/errors/index.js +3 -0
  343. package/dist/errors/index.js.map +1 -0
  344. package/dist/geo/index.cjs +232 -0
  345. package/dist/geo/index.cjs.map +1 -0
  346. package/dist/geo/index.d.cts +821 -0
  347. package/dist/geo/index.d.ts +821 -0
  348. package/dist/geo/index.js +15 -0
  349. package/dist/geo/index.js.map +1 -0
  350. package/dist/geodesy-543qXKtI.d.cts +78 -0
  351. package/dist/geodesy-543qXKtI.d.ts +78 -0
  352. package/dist/geolocation-DDkQdWMN.d.cts +106 -0
  353. package/dist/geolocation-DDkQdWMN.d.ts +106 -0
  354. package/dist/i18n/fr/index.cjs +338 -0
  355. package/dist/i18n/fr/index.cjs.map +1 -0
  356. package/dist/i18n/fr/index.d.cts +25 -0
  357. package/dist/i18n/fr/index.d.ts +25 -0
  358. package/dist/i18n/fr/index.js +336 -0
  359. package/dist/i18n/fr/index.js.map +1 -0
  360. package/dist/i18n/index.cjs +464 -0
  361. package/dist/i18n/index.cjs.map +1 -0
  362. package/dist/i18n/index.d.cts +227 -0
  363. package/dist/i18n/index.d.ts +227 -0
  364. package/dist/i18n/index.js +430 -0
  365. package/dist/i18n/index.js.map +1 -0
  366. package/dist/icons/index.cjs +116 -0
  367. package/dist/icons/index.cjs.map +1 -0
  368. package/dist/icons/index.d.cts +457 -0
  369. package/dist/icons/index.d.ts +457 -0
  370. package/dist/icons/index.js +11 -0
  371. package/dist/icons/index.js.map +1 -0
  372. package/dist/index.cjs +1869 -0
  373. package/dist/index.cjs.map +1 -0
  374. package/dist/index.d.cts +251 -0
  375. package/dist/index.d.ts +251 -0
  376. package/dist/index.js +67 -0
  377. package/dist/index.js.map +1 -0
  378. package/dist/itinerary-Dp2ZnqgD.d.cts +178 -0
  379. package/dist/itinerary-Dp2ZnqgD.d.ts +178 -0
  380. package/dist/language-CEWQ5uYw.d.cts +69 -0
  381. package/dist/language-CEWQ5uYw.d.ts +69 -0
  382. package/dist/layers/index.cjs +318 -0
  383. package/dist/layers/index.cjs.map +1 -0
  384. package/dist/layers/index.d.cts +1555 -0
  385. package/dist/layers/index.d.ts +1555 -0
  386. package/dist/layers/index.js +17 -0
  387. package/dist/layers/index.js.map +1 -0
  388. package/dist/map-client/index.cjs +4 -0
  389. package/dist/map-client/index.cjs.map +1 -0
  390. package/dist/map-client/index.d.cts +1856 -0
  391. package/dist/map-client/index.d.ts +1856 -0
  392. package/dist/map-client/index.js +3 -0
  393. package/dist/map-client/index.js.map +1 -0
  394. package/dist/maplibre-worker.mjs +12 -0
  395. package/dist/markerSprite-DGBQF6PO.cjs +49 -0
  396. package/dist/markerSprite-DGBQF6PO.cjs.map +1 -0
  397. package/dist/markerSprite-DZLTR6F6.js +8 -0
  398. package/dist/markerSprite-DZLTR6F6.js.map +1 -0
  399. package/dist/mountayaMap-C9mxRFib.d.cts +3277 -0
  400. package/dist/mountayaMap-DgnlQ2fE.d.ts +3277 -0
  401. package/dist/navigation/index.cjs +699 -0
  402. package/dist/navigation/index.cjs.map +1 -0
  403. package/dist/navigation/index.d.cts +632 -0
  404. package/dist/navigation/index.d.ts +632 -0
  405. package/dist/navigation/index.js +689 -0
  406. package/dist/navigation/index.js.map +1 -0
  407. package/dist/order-BLhsGsH8.d.ts +132 -0
  408. package/dist/order-BZkUwMou.d.cts +132 -0
  409. package/dist/paint-BgUcj8l7.d.cts +118 -0
  410. package/dist/paint-Dx_qGNE_.d.ts +118 -0
  411. package/dist/profile/index.cjs +675 -0
  412. package/dist/profile/index.cjs.map +1 -0
  413. package/dist/profile/index.d.cts +2086 -0
  414. package/dist/profile/index.d.ts +2086 -0
  415. package/dist/profile/index.js +18 -0
  416. package/dist/profile/index.js.map +1 -0
  417. package/dist/provider-DM71XnLX.d.cts +121 -0
  418. package/dist/provider-DM71XnLX.d.ts +121 -0
  419. package/dist/roadAccess-D_rOE4xW.d.cts +86 -0
  420. package/dist/roadAccess-D_rOE4xW.d.ts +86 -0
  421. package/dist/routeProfile-BKfSfxx6.d.ts +210 -0
  422. package/dist/routeProfile-BsSUABXv.d.cts +210 -0
  423. package/dist/seams/index.cjs +39 -0
  424. package/dist/seams/index.cjs.map +1 -0
  425. package/dist/seams/index.d.cts +254 -0
  426. package/dist/seams/index.d.ts +254 -0
  427. package/dist/seams/index.js +6 -0
  428. package/dist/seams/index.js.map +1 -0
  429. package/dist/search/index.cjs +147 -0
  430. package/dist/search/index.cjs.map +1 -0
  431. package/dist/search/index.d.cts +888 -0
  432. package/dist/search/index.d.ts +888 -0
  433. package/dist/search/index.js +14 -0
  434. package/dist/search/index.js.map +1 -0
  435. package/dist/searchHighlight-DFE7LVIL.cjs +33 -0
  436. package/dist/searchHighlight-DFE7LVIL.cjs.map +1 -0
  437. package/dist/searchHighlight-MHAQZVWG.js +12 -0
  438. package/dist/searchHighlight-MHAQZVWG.js.map +1 -0
  439. package/dist/searchLimits-j99-NTXR.d.cts +24 -0
  440. package/dist/searchLimits-j99-NTXR.d.ts +24 -0
  441. package/dist/sections-CVlc2Inr.d.cts +953 -0
  442. package/dist/sections-CmtaduLc.d.ts +953 -0
  443. package/dist/segmentRoute-C5UL_5bp.d.ts +172 -0
  444. package/dist/segmentRoute-CIo6dR8Y.d.cts +172 -0
  445. package/dist/strings-30RSdIat.d.cts +552 -0
  446. package/dist/strings-DPTIbzT5.d.ts +552 -0
  447. package/dist/stripeImage-CQUXM2YI.js +14 -0
  448. package/dist/stripeImage-CQUXM2YI.js.map +1 -0
  449. package/dist/stripeImage-R43OPA6U.cjs +39 -0
  450. package/dist/stripeImage-R43OPA6U.cjs.map +1 -0
  451. package/dist/style/index.cjs +116 -0
  452. package/dist/style/index.cjs.map +1 -0
  453. package/dist/style/index.d.cts +538 -0
  454. package/dist/style/index.d.ts +538 -0
  455. package/dist/style/index.js +11 -0
  456. package/dist/style/index.js.map +1 -0
  457. package/dist/styles.css +11 -0
  458. package/dist/testing/index.cjs +629 -0
  459. package/dist/testing/index.cjs.map +1 -0
  460. package/dist/testing/index.d.cts +265 -0
  461. package/dist/testing/index.d.ts +265 -0
  462. package/dist/testing/index.js +623 -0
  463. package/dist/testing/index.js.map +1 -0
  464. package/dist/timezone/index.cjs +759 -0
  465. package/dist/timezone/index.cjs.map +1 -0
  466. package/dist/timezone/index.d.cts +53 -0
  467. package/dist/timezone/index.d.ts +53 -0
  468. package/dist/timezone/index.js +757 -0
  469. package/dist/timezone/index.js.map +1 -0
  470. package/dist/types-B034JMjl.d.ts +973 -0
  471. package/dist/types-B2NDLxQA.d.cts +21 -0
  472. package/dist/types-B2NDLxQA.d.ts +21 -0
  473. package/dist/types-BEv8V_8V.d.cts +55 -0
  474. package/dist/types-BEv8V_8V.d.ts +55 -0
  475. package/dist/types-C8aX5KMU.d.cts +973 -0
  476. package/dist/types-CTQwbSdA.d.cts +321 -0
  477. package/dist/types-nO2joeRk.d.ts +321 -0
  478. package/dist/units/index.cjs +99 -0
  479. package/dist/units/index.cjs.map +1 -0
  480. package/dist/units/index.d.cts +75 -0
  481. package/dist/units/index.d.ts +75 -0
  482. package/dist/units/index.js +6 -0
  483. package/dist/units/index.js.map +1 -0
  484. package/dist/units-D9mBrusY.d.cts +900 -0
  485. package/dist/units-D9mBrusY.d.ts +900 -0
  486. package/dist/video/index.cjs +2198 -0
  487. package/dist/video/index.cjs.map +1 -0
  488. package/dist/video/index.d.cts +873 -0
  489. package/dist/video/index.d.ts +873 -0
  490. package/dist/video/index.js +2173 -0
  491. package/dist/video/index.js.map +1 -0
  492. package/dist/videoOverlay-Dh_D5_Zs.d.cts +44 -0
  493. package/dist/videoOverlay-Dh_D5_Zs.d.ts +44 -0
  494. package/dist/view/index.cjs +43 -0
  495. package/dist/view/index.cjs.map +1 -0
  496. package/dist/view/index.d.cts +836 -0
  497. package/dist/view/index.d.ts +836 -0
  498. package/dist/view/index.js +34 -0
  499. package/dist/view/index.js.map +1 -0
  500. package/dist/zones-B05QA8fy.d.cts +75 -0
  501. package/dist/zones-B05QA8fy.d.ts +75 -0
  502. package/package.json +433 -4
  503. package/src/agent/engines/session.ts +2255 -0
  504. package/src/agent/index.ts +109 -0
  505. package/src/agent/rules/agentError.ts +128 -0
  506. package/src/agent/rules/boundedInputJson.ts +53 -0
  507. package/src/agent/rules/conversation.ts +629 -0
  508. package/src/agent/rules/conversationFaults.ts +349 -0
  509. package/src/agent/rules/conversationHost.ts +390 -0
  510. package/src/agent/rules/dispatcher.ts +102 -0
  511. package/src/agent/rules/errorCodes.ts +78 -0
  512. package/src/agent/rules/errorStatus.ts +65 -0
  513. package/src/agent/rules/scriptedTransport.ts +390 -0
  514. package/src/agent/rules/stickToBottom.ts +38 -0
  515. package/src/agent/rules/toolResultPayload.ts +197 -0
  516. package/src/auth/rules/clientHeader.ts +22 -0
  517. package/src/auth/rules/sentCredential.ts +76 -0
  518. package/src/auth/rules/transformRequest.ts +803 -0
  519. package/src/camera/engines/videoFlight.ts +1758 -0
  520. package/src/camera/index.ts +157 -0
  521. package/src/camera/rules/clearance.ts +1099 -0
  522. package/src/camera/rules/fit.ts +132 -0
  523. package/src/camera/rules/modes.ts +1023 -0
  524. package/src/camera/rules/plan.ts +478 -0
  525. package/src/camera/rules/planner.ts +129 -0
  526. package/src/camera/rules/poseRanges.ts +38 -0
  527. package/src/camera/rules/presets.ts +185 -0
  528. package/src/camera/rules/profileSamples.ts +243 -0
  529. package/src/camera/rules/route.ts +596 -0
  530. package/src/camera/rules/routeContent.ts +104 -0
  531. package/src/camera/rules/spline.ts +765 -0
  532. package/src/camera/rules/sweptViewports.ts +39 -0
  533. package/src/camera/rules/track.ts +1412 -0
  534. package/src/camera/rules/vocabulary.ts +130 -0
  535. package/src/camera/rules/zoom.ts +216 -0
  536. package/src/collab/engines/session.ts +1902 -0
  537. package/src/collab/engines/trailingThrottle.ts +151 -0
  538. package/src/collab/index.ts +56 -0
  539. package/src/collab/rules/dispatch.ts +143 -0
  540. package/src/collab/rules/peerNames.ts +51 -0
  541. package/src/collab/rules/scriptedTransport.ts +244 -0
  542. package/src/compose/engines/baseMapSwitch.ts +1136 -0
  543. package/src/compose/engines/events.ts +962 -0
  544. package/src/compose/engines/mountayaMap.ts +5674 -0
  545. package/src/compose/engines/sentCredentials.ts +146 -0
  546. package/src/compose/engines/slotRequests.ts +413 -0
  547. package/src/compose/rules/accessRefusal.ts +109 -0
  548. package/src/compose/rules/accessStanding.ts +75 -0
  549. package/src/compose/rules/analysisKinds.ts +331 -0
  550. package/src/compose/rules/analysisLayers.ts +176 -0
  551. package/src/compose/rules/cameraMoves.ts +38 -0
  552. package/src/compose/rules/carriedLayers.ts +87 -0
  553. package/src/compose/rules/developmentWarnings.ts +166 -0
  554. package/src/compose/rules/fitCamera.ts +54 -0
  555. package/src/compose/rules/geoJsonSlot.ts +61 -0
  556. package/src/compose/rules/geometrySlots.ts +155 -0
  557. package/src/compose/rules/glyphNode.ts +62 -0
  558. package/src/compose/rules/layerKeys.ts +92 -0
  559. package/src/compose/rules/layerOrder.ts +85 -0
  560. package/src/compose/rules/layersManifest.ts +26 -0
  561. package/src/compose/rules/mapOptions.ts +300 -0
  562. package/src/compose/rules/maplibreWorkerVersion.gen.ts +8 -0
  563. package/src/compose/rules/markerPin.ts +122 -0
  564. package/src/compose/rules/markerRegistry.ts +85 -0
  565. package/src/compose/rules/markerSprite.ts +382 -0
  566. package/src/compose/rules/maxBounds.ts +120 -0
  567. package/src/compose/rules/overlayLookup.ts +49 -0
  568. package/src/compose/rules/paintDiff.ts +38 -0
  569. package/src/compose/rules/panLock.ts +77 -0
  570. package/src/compose/rules/patch.ts +124 -0
  571. package/src/compose/rules/queriedFeature.ts +55 -0
  572. package/src/compose/rules/queryLayers.ts +46 -0
  573. package/src/compose/rules/searchHighlight.ts +313 -0
  574. package/src/compose/rules/slotNames.ts +19 -0
  575. package/src/compose/rules/stripeImage.ts +253 -0
  576. package/src/compose/rules/swapMarker.ts +66 -0
  577. package/src/compose/rules/terrainVariant.ts +88 -0
  578. package/src/compose/rules/types.ts +566 -0
  579. package/src/compose/rules/urlHash.ts +19 -0
  580. package/src/compose/rules/viewOptions.ts +451 -0
  581. package/src/compose/rules/workerUrl.ts +96 -0
  582. package/src/data/engines/itineraryResource.ts +643 -0
  583. package/src/data/index.ts +78 -0
  584. package/src/data/rules/adapt.ts +473 -0
  585. package/src/data/rules/editModes.ts +51 -0
  586. package/src/data/rules/itinerary.ts +168 -0
  587. package/src/data/rules/nullable.ts +63 -0
  588. package/src/data/rules/roadAccess.ts +169 -0
  589. package/src/data/rules/segmentGroups.ts +309 -0
  590. package/src/data/rules/selectors.ts +95 -0
  591. package/src/data/rules/zones.ts +79 -0
  592. package/src/draw/engines/boundaryEngine.ts +1003 -0
  593. package/src/draw/engines/framedAdapter.ts +198 -0
  594. package/src/draw/engines/pointerCursor.ts +205 -0
  595. package/src/draw/engines/segmentEngine.ts +1405 -0
  596. package/src/draw/engines/snapIndex.ts +254 -0
  597. package/src/draw/engines/waypointEngine.ts +574 -0
  598. package/src/draw/engines/zoneEngine.ts +1137 -0
  599. package/src/draw/rules/drawFrame.ts +123 -0
  600. package/src/draw/rules/insertVertex.ts +226 -0
  601. package/src/draw/rules/screenSpace.ts +62 -0
  602. package/src/draw/rules/seeds.ts +185 -0
  603. package/src/draw/rules/snap.ts +115 -0
  604. package/src/draw/rules/snapCameraKey.ts +50 -0
  605. package/src/draw/rules/terraDrawShared.ts +214 -0
  606. package/src/draw/rules/zoneOutline.ts +213 -0
  607. package/src/editing/engines/cursor.ts +505 -0
  608. package/src/editing/engines/draftMarker.ts +149 -0
  609. package/src/editing/rules/accent.ts +11 -0
  610. package/src/editing/rules/engine.ts +286 -0
  611. package/src/editing/rules/placement.ts +22 -0
  612. package/src/editing/rules/positions.ts +89 -0
  613. package/src/editing/rules/sources.ts +9 -0
  614. package/src/editing/rules/types.ts +457 -0
  615. package/src/editing/rules/vocabulary.ts +10 -0
  616. package/src/editing/rules/waypointCursor.ts +228 -0
  617. package/src/editor/engines/directionArrows.ts +459 -0
  618. package/src/editor/engines/directions.ts +1383 -0
  619. package/src/editor/engines/editorClient.ts +134 -0
  620. package/src/editor/engines/eventScope.ts +59 -0
  621. package/src/editor/engines/frameLoop.ts +159 -0
  622. package/src/editor/engines/itineraryPreview.ts +272 -0
  623. package/src/editor/engines/mapLockGuard.ts +66 -0
  624. package/src/editor/engines/overlayRenderer.ts +2696 -0
  625. package/src/editor/engines/peerDraft.ts +760 -0
  626. package/src/editor/engines/poiPick.ts +305 -0
  627. package/src/editor/engines/pointPick.ts +84 -0
  628. package/src/editor/engines/roadAccessLine.ts +140 -0
  629. package/src/editor/engines/searchHighlight.ts +183 -0
  630. package/src/editor/engines/viewClient.ts +4083 -0
  631. package/src/editor/engines/zoneBadges.ts +503 -0
  632. package/src/editor/index.ts +97 -0
  633. package/src/editor/rules/accentColor.ts +116 -0
  634. package/src/editor/rules/camera.ts +121 -0
  635. package/src/editor/rules/contract.ts +125 -0
  636. package/src/editor/rules/icons.ts +825 -0
  637. package/src/editor/rules/markerElements.ts +244 -0
  638. package/src/editor/rules/style.ts +51 -0
  639. package/src/editor/rules/terrain.ts +98 -0
  640. package/src/editor/rules/tileWarm.ts +191 -0
  641. package/src/editor/rules/tilesReload.ts +158 -0
  642. package/src/editor/rules/zoneBadgePlacement.ts +1832 -0
  643. package/src/editor/rules/zoneTimeStyling.ts +119 -0
  644. package/src/errors/index.ts +25 -0
  645. package/src/errors/rules/errors.ts +157 -0
  646. package/src/errors/rules/print.ts +129 -0
  647. package/src/geo/index.ts +94 -0
  648. package/src/geo/rules/boundaries.ts +105 -0
  649. package/src/geo/rules/camera.ts +496 -0
  650. package/src/geo/rules/corridor.ts +242 -0
  651. package/src/geo/rules/elevationTiles.ts +269 -0
  652. package/src/geo/rules/formatLngLat.ts +63 -0
  653. package/src/geo/rules/geodesy.ts +125 -0
  654. package/src/geo/rules/geometry.ts +362 -0
  655. package/src/geo/rules/lineWalk.ts +77 -0
  656. package/src/geo/rules/longitude.ts +99 -0
  657. package/src/geo/rules/searchLimits.ts +22 -0
  658. package/src/geo/rules/segmentGeometry.ts +80 -0
  659. package/src/geo/rules/terrain.ts +107 -0
  660. package/src/geo/rules/tuples.ts +124 -0
  661. package/src/geo/rules/types.ts +54 -0
  662. package/src/geo/rules/webMercator.ts +57 -0
  663. package/src/i18n/fr/index.ts +17 -0
  664. package/src/i18n/fr/rules/fr.ts +85 -0
  665. package/src/i18n/fr/rules/words.gen.ts +277 -0
  666. package/src/i18n/index.ts +81 -0
  667. package/src/i18n/rules/bundle.ts +378 -0
  668. package/src/i18n/rules/config.ts +71 -0
  669. package/src/i18n/rules/endonyms.gen.ts +19 -0
  670. package/src/i18n/rules/language.ts +92 -0
  671. package/src/i18n/rules/localizedName.ts +33 -0
  672. package/src/i18n/rules/merge.ts +106 -0
  673. package/src/i18n/rules/scope.ts +127 -0
  674. package/src/i18n/rules/strings.ts +632 -0
  675. package/src/i18n/rules/videoOverlay.ts +121 -0
  676. package/src/i18n/rules/wordForms.ts +95 -0
  677. package/src/i18n/rules/words.gen.ts +277 -0
  678. package/src/icons/index.ts +54 -0
  679. package/src/icons/rules/activities.ts +40 -0
  680. package/src/icons/rules/amenities.ts +250 -0
  681. package/src/icons/rules/artwork.gen.ts +83 -0
  682. package/src/icons/rules/artwork.ts +47 -0
  683. package/src/icons/rules/fallback.ts +21 -0
  684. package/src/icons/rules/lucideMarkers.gen.ts +112 -0
  685. package/src/icons/rules/lucideUi.gen.ts +197 -0
  686. package/src/icons/rules/paint.ts +107 -0
  687. package/src/icons/rules/parse.ts +475 -0
  688. package/src/icons/rules/provider.ts +373 -0
  689. package/src/icons/rules/sprites.ts +54 -0
  690. package/src/icons/rules/ui.ts +348 -0
  691. package/src/icons/rules/waypoints.ts +215 -0
  692. package/src/index.ts +1012 -0
  693. package/src/layers/engines/layersSelection.ts +515 -0
  694. package/src/layers/engines/readoutEngine.ts +131 -0
  695. package/src/layers/index.ts +151 -0
  696. package/src/layers/rules/analysis.ts +135 -0
  697. package/src/layers/rules/enrichment.ts +30 -0
  698. package/src/layers/rules/geoJson.ts +270 -0
  699. package/src/layers/rules/hover.ts +67 -0
  700. package/src/layers/rules/itineraries.ts +182 -0
  701. package/src/layers/rules/layersPanel.ts +237 -0
  702. package/src/layers/rules/order.ts +194 -0
  703. package/src/layers/rules/overlayInstant.ts +49 -0
  704. package/src/layers/rules/overlays.ts +52 -0
  705. package/src/layers/rules/poiPanel.ts +119 -0
  706. package/src/layers/rules/pois.ts +114 -0
  707. package/src/layers/rules/readout.ts +340 -0
  708. package/src/layers/rules/streetView.ts +16 -0
  709. package/src/layers/rules/tileTimestamp.ts +146 -0
  710. package/src/layers/rules/timeSlider.ts +192 -0
  711. package/src/layers/rules/timeWindow.ts +123 -0
  712. package/src/layers/rules/zones.ts +43 -0
  713. package/src/layers/rules/zoom.ts +77 -0
  714. package/src/map-client/index.ts +71 -0
  715. package/src/map-client/rules/mapClient.ts +1943 -0
  716. package/src/navigation/engines/navigation.ts +493 -0
  717. package/src/navigation/index.ts +51 -0
  718. package/src/navigation/rules/followedRoute.ts +78 -0
  719. package/src/navigation/rules/instructions.ts +89 -0
  720. package/src/navigation/rules/itineraryRoute.ts +232 -0
  721. package/src/navigation/rules/offRoute.ts +41 -0
  722. package/src/navigation/rules/progress.ts +230 -0
  723. package/src/navigation/rules/prompts.ts +217 -0
  724. package/src/navigation/rules/routeRequest.ts +98 -0
  725. package/src/navigation/rules/status.ts +142 -0
  726. package/src/navigation/rules/steps.ts +234 -0
  727. package/src/navigation/rules/types.ts +83 -0
  728. package/src/profile/index.ts +307 -0
  729. package/src/profile/rules/amenityBadge.ts +35 -0
  730. package/src/profile/rules/amenityFilter.ts +74 -0
  731. package/src/profile/rules/amenityStacks.ts +66 -0
  732. package/src/profile/rules/axis.ts +89 -0
  733. package/src/profile/rules/axisCulling.ts +83 -0
  734. package/src/profile/rules/axisLookup.ts +180 -0
  735. package/src/profile/rules/climbs.ts +292 -0
  736. package/src/profile/rules/cursorMarker.ts +122 -0
  737. package/src/profile/rules/cursorReadout.ts +104 -0
  738. package/src/profile/rules/curvePlacement.ts +216 -0
  739. package/src/profile/rules/dock.ts +293 -0
  740. package/src/profile/rules/elevation.ts +1263 -0
  741. package/src/profile/rules/instant.ts +89 -0
  742. package/src/profile/rules/intl.ts +237 -0
  743. package/src/profile/rules/legEmphasis.ts +53 -0
  744. package/src/profile/rules/profileColors.ts +66 -0
  745. package/src/profile/rules/profileLayout.ts +59 -0
  746. package/src/profile/rules/profileSlices.ts +55 -0
  747. package/src/profile/rules/routeProfile.ts +475 -0
  748. package/src/profile/rules/rowMatch.ts +50 -0
  749. package/src/profile/rules/scale.ts +650 -0
  750. package/src/profile/rules/scaleFrame.ts +171 -0
  751. package/src/profile/rules/sectionChips.ts +83 -0
  752. package/src/profile/rules/sections.ts +923 -0
  753. package/src/profile/rules/slopeRamp.ts +160 -0
  754. package/src/profile/rules/statStrip.ts +103 -0
  755. package/src/profile/rules/steepness.ts +51 -0
  756. package/src/profile/rules/tableCells.ts +269 -0
  757. package/src/profile/rules/tableCursor.ts +87 -0
  758. package/src/profile/rules/unitPatterns.ts +335 -0
  759. package/src/profile/rules/units.ts +1025 -0
  760. package/src/profile/rules/waypointCard.ts +593 -0
  761. package/src/profile/rules/webAddress.ts +130 -0
  762. package/src/profile/rules/windowSpans.ts +65 -0
  763. package/src/rules/asciiFold.ts +17 -0
  764. package/src/rules/inDevelopment.ts +54 -0
  765. package/src/rules/listeners.ts +62 -0
  766. package/src/rules/timers.ts +9 -0
  767. package/src/rules/types.ts +22 -0
  768. package/src/rules/uuid.ts +87 -0
  769. package/src/seams/engines/geolocateControl.ts +286 -0
  770. package/src/seams/index.ts +50 -0
  771. package/src/seams/rules/clock.ts +169 -0
  772. package/src/seams/rules/geolocation.ts +165 -0
  773. package/src/seams/rules/segmentRoute.ts +187 -0
  774. package/src/search/engines/search.ts +1093 -0
  775. package/src/search/index.ts +114 -0
  776. package/src/search/rules/describe.ts +383 -0
  777. package/src/search/rules/filters.ts +195 -0
  778. package/src/search/rules/highlight.ts +270 -0
  779. package/src/search/rules/pick.ts +90 -0
  780. package/src/search/rules/rows.ts +258 -0
  781. package/src/search/rules/searchFocus.ts +27 -0
  782. package/src/search/rules/searchViewport.ts +44 -0
  783. package/src/search/rules/shown.ts +77 -0
  784. package/src/search/rules/types.ts +340 -0
  785. package/src/stream/rules/reconnectSchedule.ts +83 -0
  786. package/src/style/engines/organizationRead.ts +80 -0
  787. package/src/style/index.ts +63 -0
  788. package/src/style/rules/apply.ts +268 -0
  789. package/src/style/rules/attribution.ts +119 -0
  790. package/src/style/rules/itineraryLine.ts +142 -0
  791. package/src/style/rules/language.ts +668 -0
  792. package/src/style/rules/layout.gen.ts +27 -0
  793. package/src/style/rules/organization.ts +96 -0
  794. package/src/style/rules/paint.ts +143 -0
  795. package/src/style/rules/panelLayout.ts +51 -0
  796. package/src/style/rules/roadAccessColors.ts +29 -0
  797. package/src/style/rules/roadAccessLine.ts +267 -0
  798. package/src/style/rules/segmentColors.ts +207 -0
  799. package/src/testing/catalogs.ts +103 -0
  800. package/src/testing/index.ts +30 -0
  801. package/src/testing/mapClient.ts +241 -0
  802. package/src/testing/mountayaMap.ts +741 -0
  803. package/src/timezone/index.ts +14 -0
  804. package/src/timezone/rules/viewport.ts +875 -0
  805. package/src/units/index.ts +55 -0
  806. package/src/units/rules/conversions.ts +620 -0
  807. package/src/units/rules/preferenceChoices.ts +124 -0
  808. package/src/units/rules/preferences.ts +77 -0
  809. package/src/units/rules/rounding.ts +69 -0
  810. package/src/video/engines/videoRun.ts +654 -0
  811. package/src/video/engines/viewClient.ts +6 -0
  812. package/src/video/index.ts +83 -0
  813. package/src/video/profileOverlay/rules/contract.ts +212 -0
  814. package/src/video/profileOverlay/rules/curve.ts +216 -0
  815. package/src/video/profileOverlay/rules/draw.ts +410 -0
  816. package/src/video/profileOverlay/rules/fonts.ts +54 -0
  817. package/src/video/profileOverlay/rules/graphDesign.ts +690 -0
  818. package/src/video/profileOverlay/rules/minimalDesign.ts +144 -0
  819. package/src/video/profileOverlay/rules/registry.ts +23 -0
  820. package/src/video/profileOverlay/rules/staticLayer.ts +582 -0
  821. package/src/video/profileOverlay/rules/stripDesign.ts +327 -0
  822. package/src/video/profileOverlay/rules/types.ts +78 -0
  823. package/src/video/rules/videoConstants.ts +250 -0
  824. package/src/video/rules/videoEncoder.ts +277 -0
  825. package/src/video/rules/videoFrames.ts +99 -0
  826. package/src/video/rules/videoPreview.ts +185 -0
  827. package/src/video/rules/videoRecorder.ts +746 -0
  828. package/src/video/rules/videoWatermark.ts +155 -0
  829. package/src/video/rules/watermarkMark.ts +40 -0
  830. package/src/view/engines/viewClient.ts +6 -0
  831. package/src/view/index.ts +20 -0
@@ -0,0 +1,825 @@
1
+ import type { Map as MapLibreMap } from "maplibre-gl";
2
+
3
+ import type { ZoneLevel } from "@mountaya/client";
4
+
5
+ import {
6
+ addMarkerIcon,
7
+ answerMarkerImage,
8
+ cachedMarkerBitmap,
9
+ ensureBitmap,
10
+ markerSvg,
11
+ poiIconImageId,
12
+ } from "../../compose/rules/markerSprite.js";
13
+ import {
14
+ addRoadAccessStripeImage,
15
+ addStripeImage,
16
+ answerRoadAccessStripe,
17
+ describeStripePattern,
18
+ } from "../../compose/rules/stripeImage.js";
19
+ import { ROAD_ACCESS_KINDS } from "../../data/rules/roadAccess.js";
20
+ import { ZONE_LEVELS } from "../../data/rules/zones.js";
21
+ import { MountayaElementsError } from "../../errors/rules/errors.js";
22
+ import {
23
+ type IconProvider,
24
+ isDrawableStrokeWidth,
25
+ isDrawableViewBox,
26
+ strokeWidthRange,
27
+ } from "../../icons/rules/provider.js";
28
+ import { WAYPOINT_ICON_PREFIX, waypointIconImageId } from "../../icons/rules/sprites.js";
29
+ import { DEFAULT_WAYPOINT_COLOR, WAYPOINT_GLYPHS } from "../../icons/rules/waypoints.js";
30
+ import { poiCategoryStyles } from "../../layers/rules/pois.js";
31
+ import { zoneLevelColors } from "../../layers/rules/zones.js";
32
+ import { roadAccessColors, roadAccessGlyph } from "../../style/rules/roadAccessColors.js";
33
+ import {
34
+ roadAccessIconImageId,
35
+ roadAccessStripeImageId,
36
+ } from "../../style/rules/roadAccessLine.js";
37
+ import { LIVELY_PALETTE } from "../../style/rules/segmentColors.js";
38
+ import { ZONE_STRIPE_IMAGE_PREFIX } from "./zoneTimeStyling.js";
39
+
40
+ export { poiCategoryStyles };
41
+
42
+ /**
43
+ * Every sprite this module bakes is drawn from an `IconProvider` the caller supplies,
44
+ * never from a table imported here.
45
+ *
46
+ * The glyph markup is licensed and cannot be redistributed, so the compiled path table
47
+ * stays in the application that holds the licence and arrives through this seam. That is
48
+ * also what lets the sprite pipeline be published: the code that rasterizes, caches and
49
+ * registers a marker is not specific to any glyph set, and a host with a different set
50
+ * (or none) gets the same pipeline answering with its own glyphs, or skipping the sprite
51
+ * and leaving the missing-image resolver as the net.
52
+ *
53
+ * A glyph the provider does not have is dropped rather than thrown on, everywhere. A
54
+ * missing sprite is a marker that does not draw; a throw inside the missing-image
55
+ * resolver or a warm pass is a broken map.
56
+ */
57
+
58
+ /**
59
+ * refuseUndrawableProvider refuses a glyph set whose numbers no sprite can be drawn with.
60
+ *
61
+ * `IconProvider` is an interface, so a host can hand in a set `createIconProvider` never read.
62
+ * A view box that is no finite number above 0 scales every glyph to nothing, and a stroke width
63
+ * that is no finite number, or is 0 under `stroke`, strokes nothing: the sprite is then a disc
64
+ * with no glyph and nothing says why. The bounds are the ones `createIconProvider` holds a set
65
+ * to, read from the same rules ({@link isDrawableViewBox}, {@link isDrawableStrokeWidth}),
66
+ * so a set it built always passes.
67
+ *
68
+ * @param subject The published name the refusal is reported under.
69
+ * @param icons The glyph set a renderer was handed.
70
+ * @throws {MountayaElementsError} When `icons.viewBox` is not a finite number above 0, or
71
+ * `icons.strokeWidth` is not a finite number: above 0 under `stroke`, 0 or above under `fill`.
72
+ * The message names the member and the value.
73
+ */
74
+ export const refuseUndrawableProvider = (subject: string, icons: IconProvider): void => {
75
+ const { paint, strokeWidth, viewBox } = icons;
76
+
77
+ if (!isDrawableViewBox(viewBox)) {
78
+ throw new MountayaElementsError(
79
+ `${subject}: icons.viewBox is ${String(viewBox)}; pass a glyph set whose viewBox is the ` +
80
+ "side of the square its markup is drawn in, a finite number above 0. " +
81
+ "createIconProvider builds such a set.",
82
+ );
83
+ }
84
+
85
+ if (!isDrawableStrokeWidth(strokeWidth, paint)) {
86
+ throw new MountayaElementsError(
87
+ `${subject}: icons.strokeWidth is ${String(strokeWidth)}; pass a glyph set whose ` +
88
+ `strokeWidth is a finite number of viewBox units, ${strokeWidthRange(paint)}. ` +
89
+ "createIconProvider builds such a set.",
90
+ );
91
+ }
92
+ };
93
+
94
+ /**
95
+ * loadMarkerIcon registers the sprite of one glyph in one colour under the given image id, and
96
+ * resolves that id whether or not a sprite was registered.
97
+ *
98
+ * It is the one body the warm loaders share. A glyph the provider does not have registers
99
+ * nothing. It never rejects: a sprite that cannot be drawn or registered (a glyph the decoder
100
+ * refuses, a canvas with no 2D context, a map removed while the decode is in flight, whose
101
+ * registry then throws) stays missing, which is the outcome the missing-image resolver exists
102
+ * for. Every caller starts a load without awaiting it, so a rejection here would reach nobody
103
+ * and surface as an unhandled one.
104
+ *
105
+ * @param glyph The provider's name for the glyph the sprite carries.
106
+ * @param color The colour of the sprite's disc.
107
+ */
108
+ const loadMarkerIcon = async (
109
+ map: MapLibreMap,
110
+ imageId: string,
111
+ glyph: string,
112
+ color: string,
113
+ icons: IconProvider,
114
+ ): Promise<string> => {
115
+ try {
116
+ if (map.hasImage(imageId)) {
117
+ return imageId;
118
+ }
119
+
120
+ const svg = markerSvg(glyph, color, icons);
121
+ if (svg === null) {
122
+ return imageId;
123
+ }
124
+
125
+ await addMarkerIcon(map, imageId, svg);
126
+ } catch {
127
+ // The sprite stays missing and nothing is reported: MapLibre asks the missing-image
128
+ // resolver for it when a layer first needs it, and warns itself if that fails too.
129
+ }
130
+
131
+ return imageId;
132
+ };
133
+
134
+ /**
135
+ * loadPoiIcon registers the POI sprite for the given icon + color on the map
136
+ * and resolves the image id the symbol layer should reference. The registry is
137
+ * keyed by `${icon}+${color}`, so a per-category color override registers under
138
+ * its own key and never collides with the default-color sprite. A repeated call
139
+ * for an already-present sprite is a no-op (the guard runs before AND after the
140
+ * async rasterization so two concurrent calls for the same sprite never
141
+ * double-add). When the provider has no such glyph the function still
142
+ * resolves to the id without registering an image, leaving the renderer to skip
143
+ * the missing sprite rather than throwing: the caller (the search highlight)
144
+ * decides what to do with that.
145
+ *
146
+ * It never rejects: a sprite that cannot be drawn or registered stays missing and the id is
147
+ * resolved all the same, so a call that is not awaited leaves no unhandled rejection.
148
+ */
149
+ export const loadPoiIcon = async (
150
+ map: MapLibreMap,
151
+ icon: string,
152
+ color: string,
153
+ icons: IconProvider,
154
+ ): Promise<string> => loadMarkerIcon(map, poiIconImageId(icon, color), icon, color, icons);
155
+
156
+ /**
157
+ * The image id the itinerary waypoint symbol layer references, re-exported from
158
+ * `@mountaya/elements/icons`.
159
+ *
160
+ * A renderer that REFERENCES a sprite id in an icon-image expression must build it with the
161
+ * same function `loadWaypointIcon` registers it under, or the layer names an image nothing
162
+ * installed and MapLibre logs instead of failing. That is why the builder is shared, and why
163
+ * it is shared from the SDK rather than from here: the id is the backend tile contract, so a
164
+ * licensee drawing our tiles on their own map has to spell it the same way, and this module is
165
+ * inside the maplibre quarantine where they cannot reach it.
166
+ */
167
+ export { WAYPOINT_ICON_PREFIX, waypointIconImageId };
168
+
169
+ /**
170
+ * hasMarkerIconPath reports whether a marker icon name has a glyph in the provider: the
171
+ * renderer can answer a missing image for it, and a pre-warm through loadWaypointIcon /
172
+ * loadPoiIcon installs the bitmap. The predicate is the read seam the architecture-invariant
173
+ * test queries to assert every WaypointIcon enum value resolves to a sprite, so a backend enum
174
+ * widen surfaces here at the contract boundary rather than silently rendering a blank marker.
175
+ */
176
+ export const hasMarkerIconPath = (icon: string, icons: IconProvider): boolean => icons.has(icon);
177
+
178
+ /**
179
+ * loadWaypointIcon pre-registers the waypoint sprite for the given icon + color
180
+ * on the map and resolves the image id the symbol layer should reference. It is
181
+ * the warm path the active itinerary calls so the first paint of the waypoint
182
+ * and endpoint (flag-start / flag-end) symbol layers always finds the sprite
183
+ * present: without the warm pass MapLibre logs a `Image … could not be loaded`
184
+ * warning on a one-frame race before the missing-image resolver answers.
185
+ * The registry is keyed by `${icon}+${color}` so a per-color variant registers
186
+ * under its own id; a repeated call is a no-op (the guard runs before AND after
187
+ * the async rasterization so two concurrent calls for the same sprite never
188
+ * double-add). When the provider has no such glyph the function still
189
+ * resolves to the id without registering an image, leaving the missing-image
190
+ * resolver as the safety net.
191
+ *
192
+ * It never rejects: a sprite that cannot be drawn or registered stays missing and the id is
193
+ * resolved all the same, so a call that is not awaited leaves no unhandled rejection.
194
+ */
195
+ export const loadWaypointIcon = async (
196
+ map: MapLibreMap,
197
+ icon: string,
198
+ color: string,
199
+ icons: IconProvider,
200
+ ): Promise<string> => loadMarkerIcon(map, waypointIconImageId(icon, color), icon, color, icons);
201
+
202
+ /**
203
+ * loadMissingIcon answers a missing style image by generating the requested
204
+ * image on the fly, and resolves once it is registered: the zone clock badge, the direction
205
+ * chevron, a zone's or a restricted stretch's stripe pattern, and the marker sprite a plain map
206
+ * answers as well (`answerMarkerImage`), drawn in the feature colour its id names, from the
207
+ * module-level cache when warm. An id that names none of them, or a glyph the provider cannot
208
+ * draw, is ignored: an unrelated missing image resolves at once and registers nothing.
209
+ *
210
+ * The promise is the answer, not a courtesy. It is the shape MapLibre's
211
+ * missing-image resolver takes (`Map#setMissingStyleImageResolver`), and MapLibre
212
+ * awaits it before it lays a symbol out: a sprite registered after the answer
213
+ * settles misses that layout, so the marker draws without its icon until a later
214
+ * tile reload. A caller that ignores the result loses nothing.
215
+ *
216
+ * It never rejects. A sprite that cannot be drawn (a canvas with no 2D context)
217
+ * stays missing, and MapLibre reports a missing image itself, through its
218
+ * `styleimagemissing` event and its own warning; a rejection here would add an
219
+ * unhandled one for any caller that did not await.
220
+ */
221
+ export const loadMissingIcon = async (
222
+ map: MapLibreMap,
223
+ imageId: string,
224
+ icons: IconProvider,
225
+ ): Promise<void> => {
226
+ try {
227
+ // The zone time-bound clock badge is a single fixed sprite (one glyph, one
228
+ // neutral color), not a {icon × color} cross-product, so it is matched by its
229
+ // exact id ahead of the prefix scan. An out-of-window zone's symbol layer
230
+ // references it; this answers the missing image the same way the marker
231
+ // prefixes are answered.
232
+ if (imageId === ZONE_CLOCK_IMAGE_ID) {
233
+ // A set with no clock glyph registers no badge: a disc with nothing on it says nothing,
234
+ // and it would stand in the registry for the life of the map.
235
+ const svg = markerSvg(ZONE_CLOCK_GLYPH, ZONE_CLOCK_COLOR, icons);
236
+ if (svg === null) {
237
+ return;
238
+ }
239
+
240
+ await addMarkerIcon(map, ZONE_CLOCK_IMAGE_ID, svg);
241
+ map.triggerRepaint();
242
+
243
+ return;
244
+ }
245
+
246
+ // The itinerary direction chevron is a single fixed sprite (one neutral
247
+ // white-on-dark glyph, not a {icon × color} cross-product), so it is matched by
248
+ // its exact id ahead of the prefix scan. The chevron + flow direction layers
249
+ // reference it; this answers the missing image synchronously (the raster
250
+ // decodes no SVG) and repaints so the now-present sprite draws.
251
+ if (imageId === DIRECTION_ARROW_IMAGE_ID) {
252
+ addDirectionArrowImage(map);
253
+ map.triggerRepaint();
254
+
255
+ return;
256
+ }
257
+
258
+ // The zone out-of-window fill references a `zone-stripe-<level>` pattern image.
259
+ // Match the prefix, narrow the trailing level against the generated enum (a
260
+ // foreign suffix is ignored), register the diagonal-stripe tile, and repaint so
261
+ // the now-present pattern draws: the same answer the marker prefixes get,
262
+ // synchronous because the stripe raster decodes no SVG.
263
+ if (imageId.startsWith(ZONE_STRIPE_IMAGE_PREFIX)) {
264
+ const level = imageId.slice(ZONE_STRIPE_IMAGE_PREFIX.length);
265
+ if (isZoneStripeLevel(level)) {
266
+ addZoneStripeImage(map, level);
267
+ map.triggerRepaint();
268
+ }
269
+
270
+ return;
271
+ }
272
+
273
+ // A restricted stretch's stripes reference a `road-access-stripe-<kind>` pattern image,
274
+ // answered as a plain map answers it: the tail is narrowed against the kind vocabulary (a
275
+ // foreign suffix is ignored) and the tile is drawn synchronously.
276
+ if (answerRoadAccessStripe(map, imageId)) {
277
+ return;
278
+ }
279
+
280
+ // A waypoint's and a point of interest's marker sprite, answered as a plain map answers
281
+ // it: the rule is the map's, and the editor's resolver replaces the map's own.
282
+ await answerMarkerImage(map, imageId, icons);
283
+ } catch {
284
+ // The sprite stays missing, and that is the whole of the failure: MapLibre fires
285
+ // `styleimagemissing` for it and warns that it could not be loaded, which is where a
286
+ // host already looks. See the docblock for why this never rejects.
287
+ }
288
+ };
289
+
290
+ /**
291
+ * ZONE_CLOCK_IMAGE_ID is the stable image id the zone time-bound symbol layer
292
+ * references for the clock badge an out-of-window zone shows. Unlike the waypoint/
293
+ * POI marker sprites it is NOT color-encoded (every out-of-window zone shows the
294
+ * same neutral clock regardless of its level) so the id is a fixed literal the
295
+ * renderer points the layer's `icon-image` at and `loadMissingIcon` answers by
296
+ * exact match.
297
+ */
298
+ export const ZONE_CLOCK_IMAGE_ID = "zone-clock";
299
+
300
+ /**
301
+ * ZONE_CLOCK_COLOR is the badge color the zone time-bound clock sprite is stamped
302
+ * in: a neutral dark slate (#495057) that reads as "inactive /
303
+ * out of window" against a dimmed zone, deliberately level-independent so the
304
+ * dimming + clock together cue "not active now" without competing with the level
305
+ * color the (dimmed) fill still carries.
306
+ */
307
+ const ZONE_CLOCK_COLOR = "#495057";
308
+
309
+ /** ZONE_CLOCK_GLYPH is the provider's name for the glyph the zone clock badge carries. */
310
+ const ZONE_CLOCK_GLYPH = "clock";
311
+
312
+ /**
313
+ * loadZoneClockIcon pre-registers the zone time-bound clock sprite on the map and
314
+ * resolves its image id, the warm path the zone layers call so the first paint of
315
+ * an out-of-window zone's symbol layer finds the sprite present rather than racing
316
+ * the missing-image resolver. Idempotent (the addMarkerIcon hasImage guard
317
+ * runs before and after the async raster), so a re-call after a base-map switch
318
+ * re-registers off the warm bitmap cache. Best-effort: an environment without a
319
+ * canvas silently skips it, leaving the missing-image resolver as the net.
320
+ *
321
+ * It never rejects: a sprite that cannot be drawn or registered stays missing and the id is
322
+ * resolved all the same, so a call that is not awaited leaves no unhandled rejection.
323
+ */
324
+ export const loadZoneClockIcon = async (map: MapLibreMap, icons: IconProvider): Promise<string> =>
325
+ loadMarkerIcon(map, ZONE_CLOCK_IMAGE_ID, ZONE_CLOCK_GLYPH, ZONE_CLOCK_COLOR, icons);
326
+
327
+ /**
328
+ * ZONE_STRIPE_WIDTH is the painted stroke width (pixels) of each diagonal stripe in
329
+ * the pattern tile. With the {@link STRIPE_TILE_SIZE} cycle this leaves a
330
+ * transparent gap roughly equal to the stroke, so terrain shows BETWEEN the stripes:
331
+ * the gap, not a near-zero fill-opacity, is what makes the out-of-window fill read
332
+ * as "ghosted".
333
+ */
334
+ const ZONE_STRIPE_WIDTH = 4;
335
+
336
+ /**
337
+ * zoneStripeImageId returns the image id the zone fill layer's `fill-pattern`
338
+ * references for a given level (`zone-stripe-<level>`). The id encodes the level so
339
+ * each severity registers its own colored stripe tile under a stable key the
340
+ * renderer's data-driven expression resolves to by concatenation.
341
+ */
342
+ const zoneStripeImageId = (level: ZoneLevel): string => `${ZONE_STRIPE_IMAGE_PREFIX}${level}`;
343
+
344
+ /**
345
+ * addZoneStripeImage registers one level's stripe pattern under its `zone-stripe-<level>` id:
346
+ * stripes in the level's colour over transparent gaps, so terrain shows between them.
347
+ */
348
+ const addZoneStripeImage = (map: MapLibreMap, level: ZoneLevel): void => {
349
+ addStripeImage(
350
+ map,
351
+ zoneStripeImageId(level),
352
+ describeStripePattern({ color: zoneLevelColors[level], width: ZONE_STRIPE_WIDTH }),
353
+ );
354
+ };
355
+
356
+ /**
357
+ * loadZoneStripeIcons pre-registers the diagonal-stripe pattern tile for EVERY zone
358
+ * level on the map, the warm path the zone layers call so the fill layer's
359
+ * data-driven `fill-pattern` finds each `zone-stripe-<level>` image present rather
360
+ * than racing the missing-image resolver on the first out-of-window paint.
361
+ * Idempotent (each addZoneStripeImage guards on hasImage), so a re-call after a
362
+ * base-map switch re-registers off the warm stripe cache. Best-effort: a level
363
+ * whose raster comes up null (no canvas) is silently skipped, leaving
364
+ * the missing-image resolver as the net. Resolves to the list of registered image ids so a
365
+ * caller (or a test) can assert the per-level ids without re-deriving the format.
366
+ *
367
+ * It never throws, as its asynchronous siblings never reject: on a map whose registry throws
368
+ * (a map removed before the warm pass reaches it) each stripe stays missing and its id is
369
+ * answered all the same.
370
+ */
371
+ export const loadZoneStripeIcons = (map: MapLibreMap): string[] => {
372
+ const ids: string[] = [];
373
+ // The zone vocabulary itself, in its order: a level the contract gains is a stripe this
374
+ // registers, with no second list to keep in step.
375
+ for (const level of ZONE_LEVELS) {
376
+ try {
377
+ addZoneStripeImage(map, level);
378
+ } catch {
379
+ // The stripe stays missing: the missing-image resolver answers it when a layer needs it.
380
+ }
381
+ ids.push(zoneStripeImageId(level));
382
+ }
383
+
384
+ return ids;
385
+ };
386
+
387
+ /**
388
+ * isZoneStripeLevel narrows the tail of a `zone-stripe-<level>` image id to a zone level, by
389
+ * membership in the zone vocabulary, `ZONE_LEVELS`. It is the guard loadMissingIcon reads, so an
390
+ * id with a foreign tail is ignored and never rasterized against a colour that does not exist.
391
+ */
392
+ const isZoneStripeLevel = (value: string): value is ZoneLevel =>
393
+ ZONE_LEVELS.some((level) => level === value);
394
+
395
+ /**
396
+ * loadRoadAccessIcons pre-registers what a restricted stretch is drawn with, for every kind: the
397
+ * stripe pattern its stripe layer paints and the warning sprite its icon layer stamps. It is the
398
+ * warm path the restricted-stretch layers call as they are added, so their first paint finds
399
+ * every image present rather than racing the missing-image resolver.
400
+ *
401
+ * The stripes are drawn synchronously, before the first await, and the sprites are drawn from
402
+ * the provider's glyphs: a kind whose glyph the provider does not have registers no sprite, and
403
+ * its stretches show their stripes alone. Idempotent, so a re-call after a base-map switch
404
+ * re-registers off the warm caches.
405
+ *
406
+ * It never rejects: on a map whose registry throws (a map removed before the warm pass reaches
407
+ * it) each image stays missing, and the ids are resolved all the same.
408
+ *
409
+ * @returns The ids of the images it registers, the stripes first, in the kind vocabulary's order.
410
+ */
411
+ export const loadRoadAccessIcons = async (
412
+ map: MapLibreMap,
413
+ icons: IconProvider,
414
+ ): Promise<string[]> => {
415
+ const stripes = ROAD_ACCESS_KINDS.map((kind) => {
416
+ try {
417
+ addRoadAccessStripeImage(map, kind);
418
+ } catch {
419
+ // The stripe stays missing: the missing-image resolver answers it when a layer needs it.
420
+ }
421
+
422
+ return roadAccessStripeImageId(kind);
423
+ });
424
+
425
+ const sprites = await Promise.all(
426
+ ROAD_ACCESS_KINDS.map((kind) =>
427
+ loadMarkerIcon(
428
+ map,
429
+ roadAccessIconImageId(kind),
430
+ roadAccessGlyph(kind),
431
+ roadAccessColors[kind],
432
+ icons,
433
+ ),
434
+ ),
435
+ );
436
+
437
+ return [...stripes, ...sprites];
438
+ };
439
+
440
+ /**
441
+ * DIRECTION_ARROW_IMAGE_ID is the stable image id the itinerary direction-chevron
442
+ * symbol layers reference for the moving "follow the route" arrow. Unlike the
443
+ * waypoint/POI marker sprites it is NOT color-encoded (every itinerary shows the
444
+ * same neutral white-on-dark chevron regardless of the segment hue, so it reads
445
+ * with high contrast over any line color) so the id is a fixed literal the
446
+ * renderer points the layer's `icon-image` at and `loadMissingIcon` answers by
447
+ * exact match.
448
+ */
449
+ export const DIRECTION_ARROW_IMAGE_ID = "itinerary-direction";
450
+
451
+ /**
452
+ * DIRECTION_ARROW_TILE_SIZE is the pixel edge of the square canvas the direction
453
+ * chevron is drawn on. A 28px tile holds the chevron plus enough margin for the
454
+ * dark halo stroke to sit fully inside the bitmap without clipping.
455
+ */
456
+ const DIRECTION_ARROW_TILE_SIZE = 28;
457
+
458
+ /**
459
+ * rasterizeDirectionArrow draws a right-pointing (+x) chevron to ImageData through
460
+ * a canvas: a wide dark halo stroke first, then a white chevron on top, so the
461
+ * arrow reads against any line color it is stamped over. Like rasterizeStripe
462
+ * it decodes no SVG (the chevron is stroked directly onto the 2D context) and it
463
+ * NEVER throws: a missing 2D context, or a partial/exotic canvas (a test stub, a
464
+ * headless environment) whose path API throws, returns null so the caller skips
465
+ * the warm-load and falls back to the missing-image resolver.
466
+ *
467
+ * The chevron points toward increasing x. With the symbol layer's
468
+ * `icon-rotation-alignment:"map"` + `icon-keep-upright:false`, MapLibre rotates a
469
+ * +x glyph to the line tangent in vertex order, so the arrow points start→end. The
470
+ * stroke direction is expressed once here, so flipping the visual orientation (if a
471
+ * live pass shows it pointing backward) is a single sign change on the x offsets.
472
+ */
473
+ const rasterizeDirectionArrow = (): ImageData | null => {
474
+ const size = DIRECTION_ARROW_TILE_SIZE;
475
+ // The chevron spans from `back` (the two open ends) to `tip` (the point),
476
+ // centered vertically. `spread` is the half-height of the open ends, so the
477
+ // glyph reads as a clear ">" rather than a thin tick.
478
+ const tip = size * 0.72;
479
+ const back = size * 0.28;
480
+ const midY = size / 2;
481
+ const spread = size * 0.26;
482
+
483
+ try {
484
+ // Build the canvas inside the guard: prebakeMarkerIcons warms this at map
485
+ // construction, and a test (or a headless environment) may expose a partial
486
+ // `document` with no createElement, so a throw here must fall through to null
487
+ // (the missing-image resolver stays the net) rather than escape as an
488
+ // unhandled rejection out of the fire-and-forget prebake.
489
+ const canvas = document.createElement("canvas");
490
+ canvas.width = size;
491
+ canvas.height = size;
492
+
493
+ const context = canvas.getContext("2d");
494
+ if (!context) {
495
+ return null;
496
+ }
497
+
498
+ context.lineJoin = "round";
499
+ context.lineCap = "round";
500
+
501
+ // Halo pass: a wide semi-transparent dark stroke under the white chevron so
502
+ // the arrow stays legible over a same-colored line.
503
+ context.strokeStyle = "rgba(0, 0, 0, 0.55)";
504
+ context.lineWidth = 7;
505
+ context.beginPath();
506
+ context.moveTo(back, midY - spread);
507
+ context.lineTo(tip, midY);
508
+ context.lineTo(back, midY + spread);
509
+ context.stroke();
510
+
511
+ // White chevron on top of the halo.
512
+ context.strokeStyle = "#ffffff";
513
+ context.lineWidth = 3.5;
514
+ context.beginPath();
515
+ context.moveTo(back, midY - spread);
516
+ context.lineTo(tip, midY);
517
+ context.lineTo(back, midY + spread);
518
+ context.stroke();
519
+
520
+ return context.getImageData(0, 0, size, size);
521
+ } catch {
522
+ // A partial canvas stub (no beginPath/stroke, or a getImageData that throws)
523
+ // means no warm bitmap: the missing-image resolver stays the net.
524
+ return null;
525
+ }
526
+ };
527
+
528
+ /**
529
+ * directionArrowBitmapCache holds the rasterized chevron ImageData, module-scope
530
+ * so it survives a map disposal / setStyle wipe the same way {@link stripeBitmapCache}
531
+ * does: a re-add after a style swap reuses the bitmap it already painted rather
532
+ * than re-rasterizing. Keyed by image id (always the single fixed id) so the
533
+ * structure matches the other fixed-sprite caches.
534
+ */
535
+ const directionArrowBitmapCache = new Map<string, ImageData>();
536
+
537
+ /**
538
+ * addDirectionArrowImage registers the direction chevron on the map under its fixed
539
+ * id, drawing from the module-level cache when warm and rasterizing on a miss. The
540
+ * hasImage guard runs before AND after the rasterization so a concurrent warm-load
541
+ * never double-adds, and an already-registered id is a no-op. A null raster (no
542
+ * canvas) is skipped, leaving the missing-image resolver as the net.
543
+ */
544
+ const addDirectionArrowImage = (map: MapLibreMap): void => {
545
+ if (map.hasImage(DIRECTION_ARROW_IMAGE_ID)) {
546
+ return;
547
+ }
548
+
549
+ const cached = directionArrowBitmapCache.get(DIRECTION_ARROW_IMAGE_ID);
550
+ if (cached) {
551
+ map.addImage(DIRECTION_ARROW_IMAGE_ID, cached, { pixelRatio: 1 });
552
+
553
+ return;
554
+ }
555
+
556
+ const raster = rasterizeDirectionArrow();
557
+ if (!raster) {
558
+ return;
559
+ }
560
+
561
+ directionArrowBitmapCache.set(DIRECTION_ARROW_IMAGE_ID, raster);
562
+ if (!map.hasImage(DIRECTION_ARROW_IMAGE_ID)) {
563
+ map.addImage(DIRECTION_ARROW_IMAGE_ID, raster, { pixelRatio: 1 });
564
+ }
565
+ };
566
+
567
+ /**
568
+ * loadDirectionArrowIcon pre-registers the direction chevron sprite on the map and
569
+ * resolves its image id, the warm path the itinerary direction layers call so the
570
+ * first paint of a chevron symbol layer finds the sprite present rather than racing
571
+ * the missing-image resolver. Idempotent (the hasImage guard runs before and
572
+ * after the raster), so a re-call after a base-map switch re-registers off the warm
573
+ * bitmap cache. Best-effort: an environment without a canvas silently skips it,
574
+ * leaving the missing-image resolver as the net.
575
+ *
576
+ * It never throws, as its asynchronous siblings never reject: on a map whose registry throws
577
+ * (a map removed before the warm pass reaches it) the chevron stays missing and its id is
578
+ * answered all the same.
579
+ */
580
+ export const loadDirectionArrowIcon = (map: MapLibreMap): string => {
581
+ try {
582
+ addDirectionArrowImage(map);
583
+ } catch {
584
+ // The chevron stays missing: the missing-image resolver answers it when a layer needs it.
585
+ }
586
+
587
+ return DIRECTION_ARROW_IMAGE_ID;
588
+ };
589
+
590
+ /**
591
+ * WAYPOINT_ICONS lists every WaypointIcon enum value the backend tile-overlay contract emits,
592
+ * read off `WAYPOINT_GLYPHS`: the keys of a record the contract's own type keys, so an icon the
593
+ * contract adds or drops fails to compile there, with no second list here to fall behind. A
594
+ * sprite the contract references that no glyph path covers still fails at the runtime arm of
595
+ * the `icons.test.ts` registry check.
596
+ *
597
+ * It reads that vocabulary rather than a zod schema's `.options`, so this module imports
598
+ * nothing of the studio: an editor is a rendering concern.
599
+ */
600
+ const WAYPOINT_ICONS = WAYPOINT_GLYPHS;
601
+
602
+ /**
603
+ * DEFAULT_WAYPOINT_PALETTE is the closed set of segment / waypoint colors a
604
+ * new feature draws from in the studio: the published `LIVELY_PALETTE` (a
605
+ * rainbow: red, pink, grape, violet, indigo, blue, cyan, teal, green,
606
+ * lime, yellow, orange) plus `DEFAULT_WAYPOINT_COLOR`, which is the seed a fresh
607
+ * waypoint draft carries AND the fallback the backend's waypoint tile expression
608
+ * coalesces to when a persisted row has a null color. Including it is what makes
609
+ * the first paint of a null-color row find its sprite already registered.
610
+ *
611
+ * Both halves are read from where this package publishes them (`@mountaya/elements/style` and
612
+ * `@mountaya/elements/icons`) rather than restated, so a colour added to the palette is
613
+ * prebaked rather than painting through the missing-image resolver.
614
+ */
615
+ const DEFAULT_WAYPOINT_PALETTE = [...LIVELY_PALETTE, DEFAULT_WAYPOINT_COLOR] as const;
616
+
617
+ /** One sprite of the prebake's vocabulary: the id it is registered under and its document. */
618
+ interface PrebakeSprite {
619
+ readonly imageId: string;
620
+ readonly svg: string;
621
+ }
622
+
623
+ /**
624
+ * collectPrebakeSprites builds the bounded sprite vocabulary the prebake registers: every
625
+ * {WaypointIcon × default-palette color} pair and every `poiCategoryStyles` entry, each with
626
+ * the document `markerSvg` draws for it under the given provider, so the prebake iterates
627
+ * once, rasterizes in parallel and registers each sprite without deriving an id or a document
628
+ * a second time.
629
+ */
630
+ const collectPrebakeSprites = (icons: IconProvider): PrebakeSprite[] => {
631
+ const sprites: PrebakeSprite[] = [];
632
+
633
+ // Waypoint vocabulary: every enum value across every default-palette color.
634
+ // A glyph the provider does not carry is dropped silently: the runtime arm of
635
+ // the icons.test.ts contract check catches it.
636
+ for (const icon of WAYPOINT_ICONS) {
637
+ for (const color of DEFAULT_WAYPOINT_PALETTE) {
638
+ const svg = markerSvg(icon, color, icons);
639
+ if (svg === null) {
640
+ break;
641
+ }
642
+
643
+ sprites.push({ imageId: waypointIconImageId(icon, color), svg });
644
+ }
645
+ }
646
+
647
+ // POI vocabulary: every category style ships its exact {icon, color} pair,
648
+ // so the prebake registers the same sprite the POI overlay tiles reference.
649
+ // Each style is included once: there is no per-color cross product because
650
+ // the POI tile contract pins the color to the category.
651
+ for (const style of Object.values(poiCategoryStyles)) {
652
+ const svg = markerSvg(style.icon, style.color, icons);
653
+ if (svg === null) {
654
+ continue;
655
+ }
656
+
657
+ sprites.push({ imageId: poiIconImageId(style.icon, style.color), svg });
658
+ }
659
+
660
+ return sprites;
661
+ };
662
+
663
+ /**
664
+ * registerRasterizedSprite registers one sprite of the warm pass from the bitmap its
665
+ * rasterization left in the cache, in one synchronous step.
666
+ *
667
+ * A sprite whose rasterization was refused has no bitmap and is left missing: the pass does not
668
+ * ask the decoder for it a second time, and the missing-image resolver answers for it when a
669
+ * layer first needs it. An id the map already holds is left as it is. A write the registry
670
+ * refuses is this sprite's alone, so the sprites after it are still registered.
671
+ */
672
+ const registerRasterizedSprite = (map: MapLibreMap, sprite: PrebakeSprite): void => {
673
+ const bitmap = cachedMarkerBitmap(sprite.svg);
674
+ if (!bitmap) {
675
+ return;
676
+ }
677
+
678
+ try {
679
+ if (!map.hasImage(sprite.imageId)) {
680
+ map.addImage(sprite.imageId, bitmap, { pixelRatio: 1 });
681
+ }
682
+ } catch {
683
+ // The sprite stays missing, as one that could not be drawn does.
684
+ }
685
+ };
686
+
687
+ /**
688
+ * prebakeMarkerIcons warms the module-level bitmap cache for every sprite in the bounded
689
+ * vocabulary (every WaypointIcon × the default color palette plus every poiCategoryStyles
690
+ * entry) and registers each one on the map. It runs the rasterizations in parallel through
691
+ * `ensureBitmap`, then walks the vocabulary a second time and registers each sprite from the
692
+ * bitmap its rasterization left in the marker cache: a single synchronous map write per sprite. A
693
+ * sprite whose rasterization was refused is not asked of the decoder a second time, and stays
694
+ * missing.
695
+ *
696
+ * The function is the load-bearing seam that eliminates the
697
+ * `Image "section-icon-…" could not be loaded` console warnings: by the time
698
+ * the itinerary tile layers paint, every sprite their `icon-image` expressions
699
+ * reference is already on `map.hasImage`. The missing-image resolver stays
700
+ * as the safety net for sprites outside the bounded vocabulary (a custom
701
+ * color, an agent-added recolor).
702
+ *
703
+ * Best-effort and idempotent: a re-call after `setStyle` re-registers every
704
+ * sprite (the style swap wipes the map's image registry) but reuses the cached
705
+ * bitmaps, so the second prebake is microseconds, not the rasterization cost
706
+ * the first one paid. A glyph the provider does not carry is silently skipped.
707
+ *
708
+ * It never rejects: a sprite that cannot be drawn stays missing, and on a map that was removed
709
+ * while the pass ran nothing is registered.
710
+ */
711
+ export const prebakeMarkerIcons = (map: MapLibreMap, icons: IconProvider): Promise<void> =>
712
+ warmMarkerIcons(map, icons, () => false);
713
+
714
+ /**
715
+ * warmMarkerIcons is the warm pass {@link prebakeMarkerIcons} and
716
+ * {@link schedulePrebakeMarkerIcons} share: it rasterizes the bounded vocabulary, registers it
717
+ * on the map, then registers the direction chevron.
718
+ *
719
+ * `isCancelled` is asked before the pass starts and before each sprite is registered, so a pass
720
+ * cancelled while its sprites rasterize registers none of them, and one cancelled from inside a
721
+ * registry write (a listener of the map's own events lets the map go) registers none after
722
+ * it. The wait for the rasterizations is the only one the pass has: every read and write of the
723
+ * map's image registry follows it in one synchronous run, so no write is left in flight to land
724
+ * after a cancel. The bitmaps it rasterized stay in the cache: they belong to no map.
725
+ *
726
+ * It never rejects. A sprite that cannot be drawn stays missing, and so does every sprite of a
727
+ * map removed under the pass, whose registry throws.
728
+ */
729
+ const warmMarkerIcons = async (
730
+ map: MapLibreMap,
731
+ icons: IconProvider,
732
+ isCancelled: () => boolean,
733
+ ): Promise<void> => {
734
+ try {
735
+ if (isCancelled()) {
736
+ return;
737
+ }
738
+
739
+ const sprites = collectPrebakeSprites(icons);
740
+
741
+ // Run every rasterization in parallel: independent canvas work, with no shared state
742
+ // beyond the cache writes ensureBitmap funnels through. allSettled, so one glyph the
743
+ // decoder refuses does not abort the rest of the pass.
744
+ await Promise.allSettled(sprites.map((sprite) => ensureBitmap(sprite.svg)));
745
+
746
+ for (const sprite of sprites) {
747
+ if (isCancelled()) {
748
+ return;
749
+ }
750
+
751
+ registerRasterizedSprite(map, sprite);
752
+ }
753
+
754
+ if (isCancelled()) {
755
+ return;
756
+ }
757
+
758
+ // The fixed direction chevron rides with the marker vocabulary, so it is warm at
759
+ // construction and registered again after every style replay. It is one sprite drawn
760
+ // synchronously, outside the icon and colour cross product.
761
+ addDirectionArrowImage(map);
762
+ } catch {
763
+ // A removed map's registry throws, and a provider's own lookup may. Either way the
764
+ // sprites stay missing, the missing-image resolver answers for them, and the pass settles:
765
+ // its callers do not await it.
766
+ }
767
+ };
768
+
769
+ /**
770
+ * PREBAKE_IDLE_TIMEOUT_MS caps how long the warm pass may wait for an idle frame.
771
+ * A map that never goes idle (a continuous drag from the first paint) still gets
772
+ * its sprites within this budget rather than never.
773
+ */
774
+ const PREBAKE_IDLE_TIMEOUT_MS = 2_000;
775
+
776
+ /**
777
+ * schedulePrebakeMarkerIcons runs the warm pass off the critical path.
778
+ *
779
+ * The vocabulary is a cross product (every WaypointIcon across the default
780
+ * palette, plus the POI categories) so it grows multiplicatively with the enum
781
+ * and is well into the hundreds of sprites. Each one is an SVG decode plus a
782
+ * canvas draw on the main thread, which is precisely the thread the map needs
783
+ * while it is loading its style and painting its first tiles.
784
+ *
785
+ * Deferring costs nothing in correctness: the missing-image resolver already answers
786
+ * any id the warm pass has not reached, one sprite at a time and only for the icons a
787
+ * given itinerary actually uses, strictly less work than the full cross product.
788
+ * The warm pass exists to keep that resolver off the hot path for the common
789
+ * vocabulary, not to be the only thing that can register a sprite.
790
+ *
791
+ * The setStyle replay does NOT go through here: it re-registers from a cache that
792
+ * is already hot, which is a fan-out of synchronous map writes that must land
793
+ * before the replayed tiles reference the ids.
794
+ *
795
+ * @returns A function that cancels the pass, for the owner of the map to call when the map
796
+ * goes away. Called before the pass starts, the pass never runs. Called while its sprites
797
+ * rasterize, none of them is registered. Once it is called the pass reads and writes nothing
798
+ * more on the map, whatever it had in flight. Calling it again, or after the pass ended, does
799
+ * nothing.
800
+ */
801
+ export const schedulePrebakeMarkerIcons = (map: MapLibreMap, icons: IconProvider): (() => void) => {
802
+ let cancelled = false;
803
+ const warm = (): void => {
804
+ // Not awaited: the pass runs on its own turn and never rejects.
805
+ void warmMarkerIcons(map, icons, () => cancelled);
806
+ };
807
+
808
+ if (typeof requestIdleCallback === "function") {
809
+ const handle = requestIdleCallback(warm, { timeout: PREBAKE_IDLE_TIMEOUT_MS });
810
+
811
+ return () => {
812
+ cancelled = true;
813
+ cancelIdleCallback(handle);
814
+ };
815
+ }
816
+
817
+ // No idle scheduler (older Safari, and the happy-dom test environment): a macro
818
+ // task still yields to the current frame's paint, which is the point.
819
+ const timer = setTimeout(warm, 0);
820
+
821
+ return () => {
822
+ cancelled = true;
823
+ clearTimeout(timer);
824
+ };
825
+ };