@maptiler/geocoding-control 2.1.6 → 3.0.0-rc.1

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 (333) hide show
  1. package/CODE_OF_CONDUCT.md +46 -0
  2. package/CONTRIBUTING.md +72 -0
  3. package/README.md +36 -22
  4. package/SECURITY.md +16 -0
  5. package/dist/index.js +856 -0
  6. package/dist/index.js.map +1 -0
  7. package/dist/index.umd.js +263 -0
  8. package/dist/index.umd.js.map +1 -0
  9. package/dist/leaflet.public.js +1273 -0
  10. package/dist/leaflet.public.js.map +1 -0
  11. package/dist/leaflet.public.umd.js +276 -0
  12. package/dist/leaflet.public.umd.js.map +1 -0
  13. package/dist/maplibregl.js +1297 -0
  14. package/dist/maplibregl.js.map +1 -0
  15. package/dist/maplibregl.umd.js +276 -0
  16. package/dist/maplibregl.umd.js.map +1 -0
  17. package/dist/maptilersdk.js +1305 -0
  18. package/dist/maptilersdk.js.map +1 -0
  19. package/dist/maptilersdk.umd.js +276 -0
  20. package/dist/maptilersdk.umd.js.map +1 -0
  21. package/dist/src/components/clear-icon.d.ts +10 -0
  22. package/dist/src/components/fail-icon.d.ts +10 -0
  23. package/dist/src/components/loading-icon.d.ts +10 -0
  24. package/dist/src/components/marker.d.ts +10 -0
  25. package/dist/src/components/reverse-geocoding-icon.d.ts +10 -0
  26. package/dist/src/components/search-icon.d.ts +10 -0
  27. package/dist/src/controls/leaflet-control.d.ts +58 -0
  28. package/dist/src/controls/leaflet-events.d.ts +42 -0
  29. package/dist/src/controls/leaflet-options.d.ts +84 -0
  30. package/dist/src/controls/maplibregl-control.d.ts +55 -0
  31. package/dist/src/controls/maplibregl-events.d.ts +44 -0
  32. package/dist/src/controls/maplibregl-options.d.ts +104 -0
  33. package/dist/src/controls/maptilersdk-control.d.ts +6 -0
  34. package/dist/src/controls/maptilersdk-events.d.ts +2 -0
  35. package/dist/src/controls/maptilersdk-options.d.ts +10 -0
  36. package/dist/src/geocoder/geocoder-events.d.ts +46 -0
  37. package/dist/src/geocoder/geocoder-feature-item.d.ts +22 -0
  38. package/{svelte/types.d.ts → dist/src/geocoder/geocoder-options.d.ts} +12 -148
  39. package/dist/src/geocoder/geocoder.d.ts +112 -0
  40. package/dist/src/index.d.ts +9 -0
  41. package/dist/src/leaflet.public.d.ts +7 -0
  42. package/dist/src/maplibregl.d.ts +7 -0
  43. package/dist/src/maptilersdk.d.ts +7 -0
  44. package/dist/src/types.d.ts +45 -0
  45. package/dist/src/utils/geo-utils.d.ts +6 -0
  46. package/dist/src/utils/mask.d.ts +2 -0
  47. package/dist/src/utils/proximity.d.ts +2 -0
  48. package/package.json +84 -116
  49. package/MapLibreBasedGeocodingControl.d.ts +0 -3072
  50. package/geo-coordinates-parser.t.d.ts +0 -8
  51. package/geoUtils.d.ts +0 -3
  52. package/leaflet-controller.d.ts +0 -12
  53. package/leaflet-controller.js +0 -2475
  54. package/leaflet-controller.js.map +0 -1
  55. package/leaflet-controller.umd.js +0 -2
  56. package/leaflet-controller.umd.js.map +0 -1
  57. package/leaflet.d.ts +0 -131
  58. package/leaflet.js +0 -5055
  59. package/leaflet.js.map +0 -1
  60. package/leaflet.umd.js +0 -14
  61. package/leaflet.umd.js.map +0 -1
  62. package/maplibregl-controller.d.ts +0 -19
  63. package/maplibregl-controller.js +0 -2418
  64. package/maplibregl-controller.js.map +0 -1
  65. package/maplibregl-controller.umd.js +0 -2
  66. package/maplibregl-controller.umd.js.map +0 -1
  67. package/maplibregl.d.ts +0 -2509
  68. package/maplibregl.js +0 -5115
  69. package/maplibregl.js.map +0 -1
  70. package/maplibregl.umd.js +0 -14
  71. package/maplibregl.umd.js.map +0 -1
  72. package/maptilersdk.d.ts +0 -2504
  73. package/maptilersdk.js +0 -5125
  74. package/maptilersdk.js.map +0 -1
  75. package/maptilersdk.umd.js +0 -14
  76. package/maptilersdk.umd.js.map +0 -1
  77. package/mask.d.ts +0 -2
  78. package/openlayers-controller.d.ts +0 -15
  79. package/openlayers-controller.js +0 -2174
  80. package/openlayers-controller.js.map +0 -1
  81. package/openlayers-controller.umd.js +0 -2
  82. package/openlayers-controller.umd.js.map +0 -1
  83. package/openlayers.d.ts +0 -109
  84. package/openlayers.js +0 -5018
  85. package/openlayers.js.map +0 -1
  86. package/openlayers.umd.js +0 -14
  87. package/openlayers.umd.js.map +0 -1
  88. package/proximity.d.ts +0 -2
  89. package/react.d.ts +0 -45
  90. package/react.js +0 -2768
  91. package/react.js.map +0 -1
  92. package/react.umd.js +0 -14
  93. package/react.umd.js.map +0 -1
  94. package/style.css +0 -1
  95. package/svelte/ClearIcon.svelte +0 -12
  96. package/svelte/ClearIcon.svelte.d.ts +0 -25
  97. package/svelte/FailIcon.svelte +0 -12
  98. package/svelte/FailIcon.svelte.d.ts +0 -25
  99. package/svelte/FeatureItem.svelte +0 -246
  100. package/svelte/FeatureItem.svelte.d.ts +0 -26
  101. package/svelte/GeocodingControl.svelte +0 -919
  102. package/svelte/GeocodingControl.svelte.d.ts +0 -105
  103. package/svelte/LoadingIcon.svelte +0 -40
  104. package/svelte/LoadingIcon.svelte.d.ts +0 -25
  105. package/svelte/MapLibreBasedGeocodingControl.d.ts +0 -3072
  106. package/svelte/MapLibreBasedGeocodingControl.js +0 -210
  107. package/svelte/MarkerIcon.svelte +0 -71
  108. package/svelte/MarkerIcon.svelte.d.ts +0 -18
  109. package/svelte/ReverseGeocodingIcon.svelte +0 -12
  110. package/svelte/ReverseGeocodingIcon.svelte.d.ts +0 -25
  111. package/svelte/SearchIcon.svelte +0 -26
  112. package/svelte/SearchIcon.svelte.d.ts +0 -25
  113. package/svelte/geo-coordinates-parser.t.d.ts +0 -8
  114. package/svelte/geo-coordinates-parser.t.js +0 -1
  115. package/svelte/geoUtils.d.ts +0 -3
  116. package/svelte/geoUtils.js +0 -18
  117. package/svelte/info.json +0 -1
  118. package/svelte/leaflet-controller.d.ts +0 -12
  119. package/svelte/leaflet-controller.js +0 -274
  120. package/svelte/leaflet.d.ts +0 -131
  121. package/svelte/leaflet.js +0 -116
  122. package/svelte/maplibregl-controller.d.ts +0 -19
  123. package/svelte/maplibregl-controller.js +0 -279
  124. package/svelte/maplibregl.d.ts +0 -2509
  125. package/svelte/maplibregl.js +0 -17
  126. package/svelte/maptilersdk.d.ts +0 -2504
  127. package/svelte/maptilersdk.js +0 -32
  128. package/svelte/mask.d.ts +0 -2
  129. package/svelte/mask.js +0 -54
  130. package/svelte/openlayers-controller.d.ts +0 -15
  131. package/svelte/openlayers-controller.js +0 -283
  132. package/svelte/openlayers.d.ts +0 -109
  133. package/svelte/openlayers.js +0 -178
  134. package/svelte/proximity.d.ts +0 -2
  135. package/svelte/proximity.js +0 -60
  136. package/svelte/react.d.ts +0 -45
  137. package/svelte/react.js +0 -106
  138. package/svelte/types.js +0 -1
  139. package/svelte/vanilla.d.ts +0 -61
  140. package/svelte/vanilla.js +0 -101
  141. package/svelte/vite-env.d.ts +0 -2
  142. package/types.d.ts +0 -391
  143. package/vanilla.d.ts +0 -61
  144. package/vanilla.js +0 -2772
  145. package/vanilla.js.map +0 -1
  146. package/vanilla.umd.js +0 -14
  147. package/vanilla.umd.js.map +0 -1
  148. /package/{icons → dist/icons}/10pin.svg +0 -0
  149. /package/{icons → dist/icons}/9pin.svg +0 -0
  150. /package/{icons → dist/icons}/advertising_column.svg +0 -0
  151. /package/{icons → dist/icons}/aerodrome.svg +0 -0
  152. /package/{icons → dist/icons}/alcohol.svg +0 -0
  153. /package/{icons → dist/icons}/alpine_hut.svg +0 -0
  154. /package/{icons → dist/icons}/amusement_arcade.svg +0 -0
  155. /package/{icons → dist/icons}/amusement_park.svg +0 -0
  156. /package/{icons → dist/icons}/apartment.svg +0 -0
  157. /package/{icons → dist/icons}/archaeological_site.svg +0 -0
  158. /package/{icons → dist/icons}/area.svg +0 -0
  159. /package/{icons → dist/icons}/art.svg +0 -0
  160. /package/{icons → dist/icons}/arts_centre.svg +0 -0
  161. /package/{icons → dist/icons}/artwork.svg +0 -0
  162. /package/{icons → dist/icons}/audioguide.svg +0 -0
  163. /package/{icons → dist/icons}/bag.svg +0 -0
  164. /package/{icons → dist/icons}/beauty.svg +0 -0
  165. /package/{icons → dist/icons}/bed.svg +0 -0
  166. /package/{icons → dist/icons}/bell_tower.svg +0 -0
  167. /package/{icons → dist/icons}/beverages.svg +0 -0
  168. /package/{icons → dist/icons}/bicycle_repair_station.svg +0 -0
  169. /package/{icons → dist/icons}/biergarten.svg +0 -0
  170. /package/{icons → dist/icons}/bird_hide.svg +0 -0
  171. /package/{icons → dist/icons}/boat_rental.svg +0 -0
  172. /package/{icons → dist/icons}/bookmaker.svg +0 -0
  173. /package/{icons → dist/icons}/books.svg +0 -0
  174. /package/{icons → dist/icons}/bowl.svg +0 -0
  175. /package/{icons → dist/icons}/bowling_alley.svg +0 -0
  176. /package/{icons → dist/icons}/bunker.svg +0 -0
  177. /package/{icons → dist/icons}/bureau_de_change.svg +0 -0
  178. /package/{icons → dist/icons}/bus_station.svg +0 -0
  179. /package/{icons → dist/icons}/bust.svg +0 -0
  180. /package/{icons → dist/icons}/camping.svg +0 -0
  181. /package/{icons → dist/icons}/car_parts.svg +0 -0
  182. /package/{icons → dist/icons}/car_wash.svg +0 -0
  183. /package/{icons → dist/icons}/caravan_park.svg +0 -0
  184. /package/{icons → dist/icons}/carpet.svg +0 -0
  185. /package/{icons → dist/icons}/cattle_grid.svg +0 -0
  186. /package/{icons → dist/icons}/cave_entrance.svg +0 -0
  187. /package/{icons → dist/icons}/chalet.svg +0 -0
  188. /package/{icons → dist/icons}/charity.svg +0 -0
  189. /package/{icons → dist/icons}/chemist.svg +0 -0
  190. /package/{icons → dist/icons}/chimney.svg +0 -0
  191. /package/{icons → dist/icons}/church.svg +0 -0
  192. /package/{icons → dist/icons}/city_gate.svg +0 -0
  193. /package/{icons → dist/icons}/clinic.svg +0 -0
  194. /package/{icons → dist/icons}/clothes.svg +0 -0
  195. /package/{icons → dist/icons}/coffee.svg +0 -0
  196. /package/{icons → dist/icons}/community_centre.svg +0 -0
  197. /package/{icons → dist/icons}/computer.svg +0 -0
  198. /package/{icons → dist/icons}/consulate.svg +0 -0
  199. /package/{icons → dist/icons}/copyshop.svg +0 -0
  200. /package/{icons → dist/icons}/cosmetics.svg +0 -0
  201. /package/{icons → dist/icons}/courthouse.svg +0 -0
  202. /package/{icons → dist/icons}/crane.svg +0 -0
  203. /package/{icons → dist/icons}/dairy.svg +0 -0
  204. /package/{icons → dist/icons}/deli.svg +0 -0
  205. /package/{icons → dist/icons}/department_store.svg +0 -0
  206. /package/{icons → dist/icons}/diy.svg +0 -0
  207. /package/{icons → dist/icons}/electronics.svg +0 -0
  208. /package/{icons → dist/icons}/embankment.svg +0 -0
  209. /package/{icons → dist/icons}/embassy.svg +0 -0
  210. /package/{icons → dist/icons}/excrement_bags.svg +0 -0
  211. /package/{icons → dist/icons}/fabric.svg +0 -0
  212. /package/{icons → dist/icons}/farmyard.svg +0 -0
  213. /package/{icons → dist/icons}/ferry.svg +0 -0
  214. /package/{icons → dist/icons}/firepit.svg +0 -0
  215. /package/{icons → dist/icons}/firestation.svg +0 -0
  216. /package/{icons → dist/icons}/fishing.svg +0 -0
  217. /package/{icons → dist/icons}/fitness.svg +0 -0
  218. /package/{icons → dist/icons}/ford.svg +0 -0
  219. /package/{icons → dist/icons}/fort.svg +0 -0
  220. /package/{icons → dist/icons}/fortress.svg +0 -0
  221. /package/{icons → dist/icons}/full-height_turnstile.svg +0 -0
  222. /package/{icons → dist/icons}/generator_wind.svg +0 -0
  223. /package/{icons → dist/icons}/golf_pin.svg +0 -0
  224. /package/{icons → dist/icons}/greengrocer.svg +0 -0
  225. /package/{icons → dist/icons}/guest_house.svg +0 -0
  226. /package/{icons → dist/icons}/helipad.svg +0 -0
  227. /package/{icons → dist/icons}/hifi.svg +0 -0
  228. /package/{icons → dist/icons}/hostel.svg +0 -0
  229. /package/{icons → dist/icons}/hotel.svg +0 -0
  230. /package/{icons → dist/icons}/housenumber.svg +0 -0
  231. /package/{icons → dist/icons}/houseware.svg +0 -0
  232. /package/{icons → dist/icons}/hunting_stand.svg +0 -0
  233. /package/{icons → dist/icons}/interior_decoration.svg +0 -0
  234. /package/{icons → dist/icons}/internet_cafe.svg +0 -0
  235. /package/{icons → dist/icons}/kindergarten.svg +0 -0
  236. /package/{icons → dist/icons}/kissing_gate.svg +0 -0
  237. /package/{icons → dist/icons}/manor.svg +0 -0
  238. /package/{icons → dist/icons}/map.svg +0 -0
  239. /package/{icons → dist/icons}/marker_reverse.svg +0 -0
  240. /package/{icons → dist/icons}/marker_selected.svg +0 -0
  241. /package/{icons → dist/icons}/marker_unselected.svg +0 -0
  242. /package/{icons → dist/icons}/marketplace.svg +0 -0
  243. /package/{icons → dist/icons}/massage.svg +0 -0
  244. /package/{icons → dist/icons}/mast.svg +0 -0
  245. /package/{icons → dist/icons}/mast_communications.svg +0 -0
  246. /package/{icons → dist/icons}/mast_lighting.svg +0 -0
  247. /package/{icons → dist/icons}/medical_supply.svg +0 -0
  248. /package/{icons → dist/icons}/memorial.svg +0 -0
  249. /package/{icons → dist/icons}/miniature_golf.svg +0 -0
  250. /package/{icons → dist/icons}/motel.svg +0 -0
  251. /package/{icons → dist/icons}/mountain_range.svg +0 -0
  252. /package/{icons → dist/icons}/multifaith.svg +0 -0
  253. /package/{icons → dist/icons}/musical_instrument.svg +0 -0
  254. /package/{icons → dist/icons}/newsagent.svg +0 -0
  255. /package/{icons → dist/icons}/nightclub.svg +0 -0
  256. /package/{icons → dist/icons}/ocean.svg +0 -0
  257. /package/{icons → dist/icons}/office.svg +0 -0
  258. /package/{icons → dist/icons}/outdoor_seating.svg +0 -0
  259. /package/{icons → dist/icons}/palace.svg +0 -0
  260. /package/{icons → dist/icons}/parcel_locker.svg +0 -0
  261. /package/{icons → dist/icons}/parking_space.svg +0 -0
  262. /package/{icons → dist/icons}/parking_tickets.svg +0 -0
  263. /package/{icons → dist/icons}/pet.svg +0 -0
  264. /package/{icons → dist/icons}/photo.svg +0 -0
  265. /package/{icons → dist/icons}/picnic.svg +0 -0
  266. /package/{icons → dist/icons}/plaque.svg +0 -0
  267. /package/{icons → dist/icons}/poi.svg +0 -0
  268. /package/{icons → dist/icons}/post_box.svg +0 -0
  269. /package/{icons → dist/icons}/post_office.svg +0 -0
  270. /package/{icons → dist/icons}/postal_code.svg +0 -0
  271. /package/{icons → dist/icons}/pub.svg +0 -0
  272. /package/{icons → dist/icons}/public_bath.svg +0 -0
  273. /package/{icons → dist/icons}/public_bookcase.svg +0 -0
  274. /package/{icons → dist/icons}/public_building.svg +0 -0
  275. /package/{icons → dist/icons}/public_transport_tickets.svg +0 -0
  276. /package/{icons → dist/icons}/reverse.svg +0 -0
  277. /package/{icons → dist/icons}/river.svg +0 -0
  278. /package/{icons → dist/icons}/road.svg +0 -0
  279. /package/{icons → dist/icons}/saddle.svg +0 -0
  280. /package/{icons → dist/icons}/sauna.svg +0 -0
  281. /package/{icons → dist/icons}/sea.svg +0 -0
  282. /package/{icons → dist/icons}/second_hand.svg +0 -0
  283. /package/{icons → dist/icons}/shintoist.svg +0 -0
  284. /package/{icons → dist/icons}/shoe.svg +0 -0
  285. /package/{icons → dist/icons}/shower.svg +0 -0
  286. /package/{icons → dist/icons}/shrine.svg +0 -0
  287. /package/{icons → dist/icons}/sikhist.svg +0 -0
  288. /package/{icons → dist/icons}/slipway.svg +0 -0
  289. /package/{icons → dist/icons}/snowmobile.svg +0 -0
  290. /package/{icons → dist/icons}/social_facility.svg +0 -0
  291. /package/{icons → dist/icons}/sports.svg +0 -0
  292. /package/{icons → dist/icons}/sprite.json +0 -0
  293. /package/{icons → dist/icons}/sprite.png +0 -0
  294. /package/{icons → dist/icons}/sprite@2x.json +0 -0
  295. /package/{icons → dist/icons}/sprite@2x.png +0 -0
  296. /package/{icons → dist/icons}/stationery.svg +0 -0
  297. /package/{icons → dist/icons}/stile.svg +0 -0
  298. /package/{icons → dist/icons}/stone.svg +0 -0
  299. /package/{icons → dist/icons}/storage_tank.svg +0 -0
  300. /package/{icons → dist/icons}/stream.svg +0 -0
  301. /package/{icons → dist/icons}/street.svg +0 -0
  302. /package/{icons → dist/icons}/supermarket.svg +0 -0
  303. /package/{icons → dist/icons}/tea.svg +0 -0
  304. /package/{icons → dist/icons}/telescope_dish.svg +0 -0
  305. /package/{icons → dist/icons}/telescope_dome.svg +0 -0
  306. /package/{icons → dist/icons}/ticket.svg +0 -0
  307. /package/{icons → dist/icons}/tobacco.svg +0 -0
  308. /package/{icons → dist/icons}/tower_cantilever_communication.svg +0 -0
  309. /package/{icons → dist/icons}/tower_cooling.svg +0 -0
  310. /package/{icons → dist/icons}/tower_dish.svg +0 -0
  311. /package/{icons → dist/icons}/tower_dome.svg +0 -0
  312. /package/{icons → dist/icons}/tower_generic.svg +0 -0
  313. /package/{icons → dist/icons}/tower_lattice.svg +0 -0
  314. /package/{icons → dist/icons}/tower_lattice_communication.svg +0 -0
  315. /package/{icons → dist/icons}/tower_lattice_lighting.svg +0 -0
  316. /package/{icons → dist/icons}/tower_lighting.svg +0 -0
  317. /package/{icons → dist/icons}/townhall.svg +0 -0
  318. /package/{icons → dist/icons}/toys.svg +0 -0
  319. /package/{icons → dist/icons}/trade.svg +0 -0
  320. /package/{icons → dist/icons}/traffic_light.svg +0 -0
  321. /package/{icons → dist/icons}/train_station.svg +0 -0
  322. /package/{icons → dist/icons}/travel_agency.svg +0 -0
  323. /package/{icons → dist/icons}/tyres.svg +0 -0
  324. /package/{icons → dist/icons}/university.svg +0 -0
  325. /package/{icons → dist/icons}/variety_store.svg +0 -0
  326. /package/{icons → dist/icons}/vehicle_inspection.svg +0 -0
  327. /package/{icons → dist/icons}/vending_machine.svg +0 -0
  328. /package/{icons → dist/icons}/video.svg +0 -0
  329. /package/{icons → dist/icons}/video_games.svg +0 -0
  330. /package/{icons → dist/icons}/waste_disposal.svg +0 -0
  331. /package/{icons → dist/icons}/water_well.svg +0 -0
  332. /package/{icons → dist/icons}/waterfall.svg +0 -0
  333. /package/{icons → dist/icons}/wilderness_hut.svg +0 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":["../src/components/clear-icon.ts","../src/components/fail-icon.ts","../src/components/loading-icon.ts","../src/components/reverse-geocoding-icon.ts","../src/components/search-icon.ts","../src/utils/geo-utils.ts","../src/utils/proximity.ts","../src/geocoder/geocoder-feature-item.ts","../src/geocoder/geocoder.ts"],"sourcesContent":["import { LitElement, css, svg } from \"lit\";\nimport { customElement } from \"lit/decorators.js\";\n\n@customElement(\"maptiler-geocode-clear-icon\")\nexport class MaptilerGeocodeClearIconElement extends LitElement {\n static styles = css`\n svg {\n display: block;\n fill: var(--color-icon-button);\n }\n `;\n\n render() {\n return svg`\n <svg viewBox=\"0 0 14 14\" width=\"13\" height=\"13\">\n <path\n d=\"M13.12.706a.982.982 0 0 0-1.391 0L6.907 5.517 2.087.696a.982.982 0 1 0-1.391 1.39l4.821 4.821L.696 11.73a.982.982 0 1 0 1.39 1.39l4.821-4.821 4.822 4.821a.982.982 0 1 0 1.39-1.39L8.298 6.908l4.821-4.822a.988.988 0 0 0 0-1.38Z\"\n />\n </svg>\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n \"maptiler-geocode-clear-icon\": MaptilerGeocodeClearIconElement;\n }\n}\n","import { LitElement, css, svg } from \"lit\";\nimport { customElement } from \"lit/decorators.js\";\n\n@customElement(\"maptiler-geocode-fail-icon\")\nexport class MaptilerGeocodeFailIconElement extends LitElement {\n static styles = css`\n svg {\n display: block;\n fill: #e15042;\n }\n `;\n\n render() {\n return svg`\n <svg viewBox=\"0 0 30 30\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path\n d=\"M15 0C6.705 0 0 6.705 0 15C0 23.295 6.705 30 15 30C23.295 30 30 23.295 30 15C30 6.705 23.295 0 15 0ZM22.5 20.385L20.385 22.5L15 17.115L9.615 22.5L7.5 20.385L12.885 15L7.5 9.615L9.615 7.5L15 12.885L20.385 7.5L22.5 9.615L17.115 15L22.5 20.385Z\"\n />\n </svg>\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n \"maptiler-geocode-fail-icon\": MaptilerGeocodeFailIconElement;\n }\n}\n","import { LitElement, css, html } from \"lit\";\nimport { customElement } from \"lit/decorators.js\";\n\n@customElement(\"maptiler-geocode-loading-icon\")\nexport class MaptilerGeocodeLoadingIconElement extends LitElement {\n static styles = css`\n div {\n position: absolute;\n left: 50%;\n top: 50%;\n transform: translate(-50%, -50%);\n pointer-events: none;\n\n display: flex;\n align-items: center;\n }\n\n .loading-icon {\n animation: rotate 0.8s infinite cubic-bezier(0.45, 0.05, 0.55, 0.95);\n }\n\n @keyframes rotate {\n from {\n -webkit-transform: rotate(0);\n transform: rotate(0);\n }\n to {\n -webkit-transform: rotate(360deg);\n transform: rotate(360deg);\n }\n }\n `;\n\n render() {\n return html`\n <div>\n <svg viewBox=\"0 0 18 18\" width=\"24\" height=\"24\" class=\"loading-icon\">\n <path fill=\"#333\" d=\"M4.4 4.4l.8.8c2.1-2.1 5.5-2.1 7.6 0l.8-.8c-2.5-2.5-6.7-2.5-9.2 0z\" />\n <path opacity=\".1\" d=\"M12.8 12.9c-2.1 2.1-5.5 2.1-7.6 0-2.1-2.1-2.1-5.5 0-7.7l-.8-.8c-2.5 2.5-2.5 6.7 0 9.2s6.6 2.5 9.2 0 2.5-6.6 0-9.2l-.8.8c2.2 2.1 2.2 5.6 0 7.7z\" />\n </svg>\n </div>\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n \"maptiler-geocode-loading-icon\": MaptilerGeocodeLoadingIconElement;\n }\n}\n","import { LitElement, css, svg } from \"lit\";\nimport { customElement } from \"lit/decorators.js\";\n\n@customElement(\"maptiler-geocode-reverse-geocoding-icon\")\nexport class MaptilerGeocodeReverseGeocodingIconElement extends LitElement {\n static styles = css`\n svg {\n display: block;\n fill: var(--color-icon-button);\n }\n `;\n\n render() {\n return svg`\n <svg viewBox=\"0 0 60.006 21.412\" width=\"14\" height=\"20\">\n <path\n d=\"M30.003-26.765C13.46-26.765 0-14.158 0 1.337c0 23.286 24.535 42.952 28.39 46.04.24.192.402.316.471.376.323.282.732.424 1.142.424.41 0 .82-.142 1.142-.424.068-.06.231-.183.471-.376 3.856-3.09 28.39-22.754 28.39-46.04 0-15.495-13.46-28.102-30.003-28.102Zm1.757 12.469c4.38 0 7.858 1.052 10.431 3.158 2.595 2.105 3.89 4.913 3.89 8.422 0 2.34-.53 4.362-1.593 6.063-1.063 1.702-3.086 3.616-6.063 5.742-2.042 1.51-3.337 2.659-3.89 3.446-.532.787-.8 1.82-.8 3.096v1.914h-8.449V15.18c0-2.041.434-3.815 1.306-5.325.872-1.51 2.467-3.118 4.785-4.82 2.233-1.594 3.7-2.89 4.402-3.889a5.582 5.582 0 0 0 1.087-3.35c0-1.382-.51-2.435-1.531-3.158-1.02-.723-2.45-1.087-4.28-1.087-3.19 0-6.826 1.047-10.91 3.131l-3.472-6.986c4.742-2.659 9.77-3.992 15.087-3.992Zm-1.88 37.324c1.765 0 3.124.472 4.08 1.408.98.936 1.47 2.276 1.47 4.02 0 1.68-.49 3.007-1.47 3.985-.977.957-2.336 1.435-4.08 1.435-1.787 0-3.171-.465-4.15-1.4-.978-.958-1.47-2.298-1.47-4.02 0-1.787.48-3.14 1.436-4.054.957-.915 2.355-1.374 4.184-1.374Z\"\n />\n </svg>\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n \"maptiler-geocode-reverse-geocoding-icon\": MaptilerGeocodeReverseGeocodingIconElement;\n }\n}\n","import { LitElement, css, svg } from \"lit\";\nimport { customElement } from \"lit/decorators.js\";\n\n@customElement(\"maptiler-geocode-search-icon\")\nexport class MaptilerGeocodeSearchIconElement extends LitElement {\n static styles = css`\n circle {\n stroke-width: 1.875;\n fill: none;\n }\n\n path {\n stroke-width: 1.875;\n stroke-linecap: round;\n }\n\n svg {\n display: block;\n stroke: var(--color-icon-button);\n }\n `;\n\n render() {\n return svg`\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"13\"\n height=\"13\"\n viewBox=\"0 0 13 13\"\n >\n <circle cx=\"4.789\" cy=\"4.787\" r=\"3.85\" />\n <path d=\"M12.063 12.063 7.635 7.635\" />\n </svg>\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n \"maptiler-geocode-search-icon\": MaptilerGeocodeSearchIconElement;\n }\n}\n","import clone from \"@turf/clone\";\nimport type { FeatureCollection, MultiPolygon, Polygon, Position } from \"geojson\";\n\nimport type { BBox } from \"../types\";\n\n// taken from Leaflet\nexport function wrapNum(x: number, range: [number, number], includeMax: boolean) {\n const max = range[1],\n min = range[0],\n d = max - min;\n\n return x === max && includeMax ? x : ((((x - min) % d) + d) % d) + min;\n}\n\nexport function unwrapBbox(bbox0: BBox): BBox {\n const bbox = [...bbox0] satisfies BBox;\n\n if (bbox[2] < bbox[0]) {\n if (Math.abs((bbox[0] + bbox[2] + 360) / 2) > Math.abs((bbox[0] - 360 + bbox[2]) / 2)) {\n bbox[0] -= 360;\n } else {\n bbox[2] += 360;\n }\n }\n\n return bbox;\n}\n\nexport function shiftPolyCollection(featureCollection: FeatureCollection<Polygon | MultiPolygon>, distance: number): FeatureCollection<Polygon | MultiPolygon> {\n const cloned = clone(featureCollection);\n\n for (const feature of cloned.features) {\n if (feature.geometry.type == \"MultiPolygon\") {\n for (const poly of feature.geometry.coordinates) {\n shiftPolyCoords(poly, distance);\n }\n } else {\n shiftPolyCoords(feature.geometry.coordinates, distance);\n }\n }\n\n return cloned;\n}\n\nexport function shiftPolyCoords(coordinates: Position[][], distance: number) {\n for (const ring of coordinates) {\n for (const position of ring) {\n position[0] += distance;\n }\n }\n}\n","import type { ProximityRule } from \"../types\";\n\nlet cachedLocation: { time: number; coords: undefined | string } | undefined;\n\nexport async function getProximity(centerAndZoom: [zoom: number, lon: number, lat: number] | undefined, proximity: ProximityRule[] | null | undefined, ac: AbortController) {\n for (const rule of proximity ?? []) {\n if (centerAndZoom && ((rule.minZoom != undefined && rule.minZoom > centerAndZoom[0]) || (rule.maxZoom != undefined && rule.maxZoom < centerAndZoom[0]))) {\n continue;\n }\n\n if (rule.type === \"fixed\") {\n return rule.coordinates.join(\",\");\n }\n\n if (rule.type === \"client-geolocation\") {\n if (cachedLocation && rule.cachedLocationExpiry && cachedLocation.time + rule.cachedLocationExpiry > Date.now()) {\n if (cachedLocation.coords) {\n return cachedLocation.coords;\n }\n } else {\n let coords: string | undefined;\n\n try {\n coords = await new Promise<string>((resolve, reject) => {\n ac.signal.addEventListener(\"abort\", () => {\n reject(Error(\"aborted\"));\n });\n\n navigator.geolocation.getCurrentPosition(\n (pos) => {\n resolve([pos.coords.longitude, pos.coords.latitude].map((c) => c.toFixed(6)).join(\",\"));\n },\n (err) => {\n // eslint-disable-next-line @typescript-eslint/prefer-promise-reject-errors\n reject(err);\n },\n rule,\n );\n });\n\n return coords;\n } catch {\n // ignore\n } finally {\n if (rule.cachedLocationExpiry) {\n cachedLocation = {\n time: Date.now(),\n coords,\n };\n }\n }\n\n if (ac.signal.aborted) {\n return;\n }\n }\n }\n\n if (rule.type === \"server-geolocation\") {\n return \"ip\";\n }\n\n if (centerAndZoom && rule.type === \"map-center\") {\n return centerAndZoom[1].toFixed(6) + \",\" + centerAndZoom[2].toFixed(6);\n }\n }\n}\n","/* eslint-disable\n@typescript-eslint/no-unnecessary-condition,\n @typescript-eslint/no-unsafe-assignment,\n @typescript-eslint/no-unsafe-call,\n @typescript-eslint/no-unsafe-member-access,\n @typescript-eslint/no-unsafe-return,\n @typescript-eslint/restrict-template-expressions,\n @typescript-eslint/unbound-method,\n*/\nimport { LitElement, css, html, nothing, unsafeCSS } from \"lit\";\nimport { customElement, property, state } from \"lit/decorators.js\";\nimport { styleMap } from \"lit/directives/style-map.js\";\n\nimport type { Feature, ShowPlaceType } from \"../types\";\nimport styles from \"./geocoder-feature-item.css?inline\";\n\ntype SpriteIcon = { width: number; height: number; x: number; y: number };\n\nconst hidpi = typeof devicePixelRatio === \"undefined\" || devicePixelRatio > 1.25;\n\nconst scaleUrl = hidpi ? \"@2x\" : \"\";\n\nconst scaleFactor = hidpi ? 2 : 1;\n\nlet sprites: undefined | null | { width: number; height: number; icons: Record<string, SpriteIcon> };\n\nlet spritePromise: Promise<void> | undefined;\n\n@customElement(\"maptiler-geocoder-feature-item\")\nexport class MaptilerGeocoderFeatureItemElement extends LitElement {\n static styles = css`\n ${unsafeCSS(styles)}\n `;\n\n @property({ type: Object }) feature?: Feature;\n @property({ type: String }) itemStyle: \"selected\" | \"picked\" | \"default\" = \"default\";\n @property({ type: String }) showPlaceType: ShowPlaceType = \"if-needed\";\n @property({ attribute: false }) missingIconsCache: Set<string> = new Set<string>();\n @property({ type: String }) iconsBaseUrl: string = \"\";\n\n get #categories() {\n return this.feature?.properties?.categories;\n }\n get #isReverse() {\n return this.feature?.place_type[0] === \"reverse\";\n }\n get #placeType() {\n return this.feature?.properties?.categories?.join(\", \") ?? this.feature?.place_type_name?.[0] ?? this.feature?.place_type[0];\n }\n\n @state() private category: string | undefined;\n @state() private imageUrl: string | undefined;\n @state() private spriteIcon: SpriteIcon | undefined;\n @state() private index: number = 0;\n\n #loadSprites() {\n spritePromise ??= fetch(`${this.iconsBaseUrl}sprite${scaleUrl}.json`)\n .then((response) => response.json())\n .then((data) => {\n sprites = data;\n })\n .catch(() => {\n sprites = null;\n });\n }\n\n #handleImgError() {\n if (this.imageUrl) {\n this.missingIconsCache.add(this.imageUrl);\n }\n\n this.#loadIcon();\n }\n\n #loadIcon() {\n if (sprites !== undefined) {\n this.#loadIcon2();\n } else {\n this.#loadSprites();\n\n void spritePromise?.then(() => {\n this.#loadIcon2();\n });\n }\n }\n\n #loadIcon2() {\n do {\n this.index--;\n\n this.category = this.#categories?.[this.index];\n\n this.spriteIcon = this.category ? sprites?.icons[this.category] : undefined;\n\n if (this.spriteIcon) {\n break;\n }\n\n this.imageUrl = this.category ? this.iconsBaseUrl + this.category.replace(/ /g, \"_\") + \".svg\" : undefined;\n } while (this.index > -1 && (!this.imageUrl || this.missingIconsCache.has(this.imageUrl)));\n }\n\n willUpdate(changedProperties: Map<string, unknown>) {\n if (changedProperties.has(\"feature\") && this.#categories) {\n this.index = this.#categories.length;\n this.#loadIcon();\n }\n }\n\n render() {\n return html`\n <li\n tabindex=\"-1\"\n role=\"option\"\n aria-selected=${this.itemStyle === \"selected\"}\n aria-checked=${this.itemStyle === \"picked\"}\n class=${this.itemStyle}\n @click=${() => this.dispatchEvent(new CustomEvent(\"select\"))}\n >\n ${sprites && this.spriteIcon\n ? html`\n <div\n class=\"sprite-icon\"\n style=${styleMap({\n width: `${this.spriteIcon.width / scaleFactor}px`,\n height: `${this.spriteIcon.height / scaleFactor}px`,\n backgroundImage: `url(${this.iconsBaseUrl}sprite${scaleUrl}.png)`,\n backgroundPosition: `-${this.spriteIcon.x / scaleFactor}px -${this.spriteIcon.y / scaleFactor}px`,\n backgroundSize: `${sprites.width / scaleFactor}px ${sprites.height / scaleFactor}px`,\n })}\n title=${this.#placeType}\n />\n `\n : this.imageUrl\n ? html` <img src=${this.imageUrl} alt=${this.category} title=${this.#placeType} @error=${this.#handleImgError} />`\n : this.feature?.address\n ? html` <img src=${this.iconsBaseUrl + \"housenumber.svg\"} alt=${this.#placeType} title=${this.#placeType} /> `\n : this.feature?.id.startsWith(\"road.\")\n ? html` <img src=${this.iconsBaseUrl + \"road.svg\"} alt=${this.#placeType} title=${this.#placeType} /> `\n : this.feature?.id.startsWith(\"address.\")\n ? html` <img src=${this.iconsBaseUrl + \"street.svg\"} alt=${this.#placeType} title=${this.#placeType} /> `\n : this.feature?.id.startsWith(\"postal_code.\")\n ? html` <img src=${this.iconsBaseUrl + \"postal_code.svg\"} alt=${this.#placeType} title=${this.#placeType} /> `\n : this.feature?.id.startsWith(\"poi.\")\n ? html` <img src=${this.iconsBaseUrl + \"poi.svg\"} alt=${this.#placeType} title=${this.#placeType} /> `\n : this.#isReverse\n ? html` <img src=${this.iconsBaseUrl + \"reverse.svg\"} alt=${this.#placeType} title=${this.#placeType} /> `\n : html` <img src=${this.iconsBaseUrl + \"area.svg\"} alt=${this.#placeType} title=${this.#placeType} /> `}\n\n <span class=\"texts\">\n <span>\n <span class=\"primary\"> ${this.#isReverse ? this.feature?.place_name : this.feature?.place_name.replace(/,.*/, \"\")} </span>\n\n ${this.showPlaceType === \"always\" ||\n (this.showPlaceType !== \"never\" &&\n !this.feature?.address &&\n !this.feature?.id.startsWith(\"road.\") &&\n !this.feature?.id.startsWith(\"address.\") &&\n !this.feature?.id.startsWith(\"postal_code.\") &&\n (!this.feature?.id.startsWith(\"poi.\") || !this.imageUrl) &&\n !this.#isReverse)\n ? html` <span class=\"secondary\"> ${this.#placeType} </span> `\n : nothing}\n </span>\n\n <span class=\"line2\"> ${this.#isReverse ? this.feature?.text : this.feature?.place_name.replace(/[^,]*,?s*/, \"\")} </span>\n </span>\n </li>\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n \"maptiler-geocoder-feature-item\": MaptilerGeocoderFeatureItemElement;\n }\n}\n","import { convert } from \"geo-coordinates-parser\";\nimport { LitElement, css, html, nothing, unsafeCSS } from \"lit\";\nimport { customElement, property, query, state } from \"lit/decorators.js\";\nimport { classMap } from \"lit/directives/class-map.js\";\nimport { repeat } from \"lit/directives/repeat.js\";\n\nimport type { BBox, EnableReverse, Feature, FeatureCollection, ProximityRule, ShowPlaceType, TypeRule } from \"../types\";\nimport { wrapNum } from \"../utils/geo-utils\";\nimport { getProximity } from \"../utils/proximity\";\n\nimport \"../components/clear-icon\";\nimport \"../components/fail-icon\";\nimport \"../components/loading-icon\";\nimport \"../components/reverse-geocoding-icon\";\nimport \"../components/search-icon\";\nimport \"./geocoder-feature-item\";\n\nimport type { MaptilerGeocoderEventName, MaptilerGeocoderEventNameMap } from \"./geocoder-events\";\nimport type { MaptilerGeocoderOptions } from \"./geocoder-options\";\nimport styles from \"./geocoder.css?inline\";\n\n@customElement(\"maptiler-geocoder\")\nexport class MaptilerGeocoderElement extends LitElement implements MaptilerGeocoderOptions {\n static styles = css`\n ${unsafeCSS(styles)}\n `;\n\n @property({ attribute: false }) adjustUrl?: (url: URL) => void;\n @property({ type: String }) apiKey?: string;\n @property({ type: String }) apiUrl?: string;\n @property({ type: Array }) bbox?: BBox;\n @property({ type: String }) clearButtonTitle?: string;\n @property({ type: Boolean }) clearListOnPick: boolean = false;\n @property({ type: Boolean }) clearOnBlur: boolean = false;\n @property({ type: Boolean }) collapsed: boolean = false;\n @property({ attribute: false }) country?: string | string[];\n @property({ type: Number }) debounceSearch?: number;\n @property({ type: String }) enableReverse?: EnableReverse;\n @property({ type: String }) errorMessage?: string;\n @property({ type: Boolean }) excludeTypes: boolean = false;\n @property({ type: Boolean }) exhaustiveReverseGeocoding: boolean = false;\n @property({ type: Boolean }) fetchFullGeometryOnPick: boolean = false;\n @property({ type: Object }) fetchParameters?: RequestInit;\n @property({ attribute: false }) filter?: (feature: Feature) => boolean;\n @property({ type: Object }) fuzzyMatch?: boolean | undefined; // type object because undefined is valid value\n @property({ type: String }) iconsBaseUrl?: string;\n @property({ type: Boolean }) keepListOpen: boolean = false;\n @property({ attribute: false }) language?: string | string[] | null;\n @property({ type: Number }) limit?: number;\n @property({ type: Number }) minLength?: number;\n @property({ type: String }) noResultsMessage?: string;\n @property({ type: Boolean }) openListOnTop: boolean = false;\n @property({ type: String }) placeholder?: string;\n @property({ type: Array }) proximity?: ProximityRule[] | null;\n @property({ type: Boolean }) reverseActive: boolean = false;\n @property({ type: String }) reverseButtonTitle?: string;\n @property({ type: Object }) reverseGeocodingExcludeTypes?: boolean | undefined; // type object because undefined is valid value\n @property({ type: Number }) reverseGeocodingLimit?: number;\n @property({ type: Array }) reverseGeocodingTypes?: TypeRule[];\n @property({ type: Object }) selectFirst?: boolean | undefined; // type object because undefined is valid value\n @property({ type: String }) showPlaceType?: ShowPlaceType;\n @property({ type: Object }) showResultsWhileTyping?: boolean | undefined; // type object because undefined is valid value\n @property({ type: Array }) types?: TypeRule[];\n\n /** Reference to the input element the user can type a query into */\n @query(\"input\") private input!: HTMLInputElement;\n\n /** Value to search via geocoding */\n @state() private searchValue: string = \"\";\n /** Features found via geocoding */\n @state() private listFeatures?: Feature[];\n /** Index of item currently selected from the list of found features */\n @state() private selectedItemIndex: number = -1;\n /** Feature that has been picked by the user */\n @state() private picked?: Feature;\n /** Cached found features to be used to restore the features when loading more data for picked feature */\n @state() private cachedFeatures: Feature[] = [];\n /** Effectively a cache key for cached features */\n @state() private lastSearchUrl: string = \"\";\n /** Last error that happened in geocoding, to be shown to user */\n @state() private error: unknown;\n /** AbortController instance used to potentially cancel the current geocoding request*/\n @state() private abortController?: AbortController;\n /** Focus state of input element */\n @state() private focused: boolean = false;\n /** Focus state of input element, delayed for a moment to not close feature list immediately after losing focus */\n @state() private focusedDelayed: boolean = false;\n\n /** Helps to trigger logic only after this instance gets fully initialized */\n #isInitialized = false;\n /** Helps to trigger logic running when feature list hides only after it gets opened for the first time */\n #wasFeatureListVisible = false;\n /** Timeout ref for debouncing logic */\n #searchTimeoutRef?: number;\n /** Cache for URLs of icons that couldn't be loaded for any reason, as to not try them again unnecessarily */\n #missingIconsCache = new Set<string>();\n /** Center and zoom of a map potentially connected to this instance */\n #centerAndZoom: [zoom: number, lon: number, lat: number] | undefined;\n\n get #selected(): Feature | undefined {\n return this.listFeatures?.[this.selectedItemIndex];\n }\n get #isFeatureListVisible(): boolean {\n return !!this.listFeatures?.length && (this.focusedDelayed || this.keepListOpen);\n }\n get #isLoading(): boolean {\n return this.abortController !== undefined;\n }\n get #isSearchValueTooShort(): boolean {\n return this.searchValue.length < (this.minLength ?? 2);\n }\n\n protected firstUpdated() {\n this.#isInitialized = true;\n }\n\n /**\n * Set the options of this instance.\n *\n * @param options options to set\n */\n setOptions(options: Partial<MaptilerGeocoderOptions>) {\n const elementOptions = { ...options };\n for (const prop of Object.keys(elementOptions) as Array<keyof MaptilerGeocoderOptions>) {\n // eslint-disable-next-line @typescript-eslint/no-dynamic-delete\n if (!propertyNames.includes(prop)) delete elementOptions[prop];\n }\n Object.assign(this, elementOptions);\n }\n\n /**\n * Set the content of search input box.\n *\n * @param value text to set\n */\n setQuery(value: string) {\n this.#changeSearchValue(value);\n this.#focusInputAndSelectText();\n }\n\n /**\n * Set the content of search input box and immediately submit it.\n *\n * @param value text to set and submit\n */\n submitQuery(value: string) {\n this.#submitSearchValue(value);\n }\n\n /**\n * Clear search result list.\n */\n clearList() {\n this.#clearFeatures();\n this.picked = undefined;\n this.selectedItemIndex = -1;\n }\n\n /**\n * Focus the search input box.\n *\n * @param options [FocusOptions](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/focus#options)\n */\n override focus(options?: FocusOptions) {\n this.input.focus(options);\n }\n\n /**\n * Blur the search input box.\n */\n override blur() {\n this.input.blur();\n }\n\n override addEventListener<E extends MaptilerGeocoderEventName>(\n type: E,\n listener: (this: HTMLElement, e: MaptilerGeocoderEventNameMap[E]) => unknown,\n options?: boolean | AddEventListenerOptions,\n ): void;\n override addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void {\n super.addEventListener(type, listener, options);\n }\n\n override removeEventListener<E extends MaptilerGeocoderEventName>(\n type: E,\n listener: (this: HTMLElement, e: MaptilerGeocoderEventNameMap[E]) => unknown,\n options?: boolean | EventListenerOptions,\n ): void;\n override removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void {\n super.removeEventListener(type, listener, options);\n }\n\n /** @internal */\n handleMapChange(centerAndZoom: [zoom: number, lon: number, lat: number] | undefined): void {\n this.#centerAndZoom = centerAndZoom;\n }\n\n /** @internal */\n handleMapClick(coordinates: [lng: number, lat: number]) {\n if (this.reverseActive) {\n this.#handleReverse(coordinates);\n }\n }\n\n #dispatch<T extends keyof MaptilerGeocoderEventNameMap>(\n type: T,\n ...[detail]: undefined extends MaptilerGeocoderEventNameMap[T][\"detail\"] ? [] : [detail: MaptilerGeocoderEventNameMap[T][\"detail\"]]\n ): void {\n if (!this.#isInitialized) return;\n\n this.dispatchEvent(\n new CustomEvent(type, {\n bubbles: true,\n composed: true,\n detail,\n }),\n );\n }\n\n #handleSubmit(event?: Event) {\n event?.preventDefault();\n\n this.focused = false;\n\n clearTimeout(this.#searchTimeoutRef);\n\n if (this.selectedItemIndex > -1 && this.listFeatures) {\n this.picked = this.listFeatures[this.selectedItemIndex];\n\n this.searchValue = this.picked.place_type[0] === \"reverse\" ? this.picked.place_name : this.picked.place_name.replace(/,.*/, \"\");\n\n this.error = undefined;\n\n this.selectedItemIndex = -1;\n } else if (this.searchValue) {\n this.#search(this.searchValue, { exact: true })\n .then(() => {\n this.picked = undefined;\n })\n .catch((err: unknown) => (this.error = err));\n }\n }\n\n #isQueryReverse(searchValue: string) {\n try {\n return convert(searchValue, 6);\n } catch {\n return false;\n }\n }\n\n #focusInputAndSelectText() {\n setTimeout(() => {\n this.input.focus();\n this.focused = true;\n this.input.select();\n });\n }\n\n #changeSearchValue(searchValue: string) {\n this.searchValue = searchValue;\n this.#dispatch(\"querychange\", { query: this.searchValue, reverseCoords: this.#isQueryReverse(searchValue) });\n\n this.error = undefined;\n this.picked = undefined;\n\n if (this.showResultsWhileTyping !== false) {\n clearTimeout(this.#searchTimeoutRef);\n\n if (this.#isSearchValueTooShort) {\n return;\n }\n\n const sv = this.searchValue;\n\n this.#searchTimeoutRef = window.setTimeout(() => {\n this.#search(sv).catch((err: unknown) => (this.error = err));\n }, this.debounceSearch ?? 200);\n } else {\n this.#clearFeatures();\n }\n }\n\n #clearFeatures() {\n if (this.listFeatures !== undefined) {\n this.listFeatures = undefined;\n this.#dispatch(\"featuresclear\");\n }\n }\n\n #submitSearchValue(searchValue: string) {\n this.searchValue = searchValue;\n this.#dispatch(\"querychange\", { query: this.searchValue, reverseCoords: this.#isQueryReverse(searchValue) });\n\n this.selectedItemIndex = -1;\n this.#handleSubmit();\n }\n\n async #search(searchValue: string, { byId = false, exact = false }: undefined | { byId?: boolean; exact?: boolean } = {}) {\n this.error = undefined;\n\n this.abortController?.abort();\n const ac = new AbortController();\n this.abortController = ac;\n\n try {\n const apiUrl = this.apiUrl ?? import.meta.env.VITE_API_URL;\n const isReverse = this.#isQueryReverse(searchValue);\n\n // eslint-disable-next-line @typescript-eslint/restrict-template-expressions\n const urlObj = new URL(apiUrl + \"/\" + encodeURIComponent(isReverse ? `${isReverse.decimalLongitude},${isReverse.decimalLatitude}` : searchValue) + \".json\");\n\n const sp = urlObj.searchParams;\n\n if (this.language !== undefined) {\n sp.set(\"language\", Array.isArray(this.language) ? this.language.join(\",\") : (this.language ?? \"\"));\n }\n\n const [zoom] = this.#centerAndZoom ?? [undefined];\n\n let effTypes = (!isReverse || this.reverseGeocodingTypes === undefined ? this.types : this.reverseGeocodingTypes)\n ?.map((typeRule) =>\n typeof typeRule === \"string\" ? typeRule : zoom === undefined || ((typeRule[0] ?? 0) <= zoom && zoom < (typeRule[1] ?? Infinity)) ? typeRule[2] : undefined,\n )\n .filter((type) => type !== undefined);\n\n if (effTypes) {\n effTypes = [...new Set(effTypes)];\n\n sp.set(\"types\", effTypes.join(\",\"));\n }\n\n const effExcludeTypes = !isReverse || this.reverseGeocodingExcludeTypes === undefined ? this.excludeTypes : this.reverseGeocodingExcludeTypes;\n\n if (effExcludeTypes) {\n sp.set(\"excludeTypes\", String(effExcludeTypes));\n }\n\n if (this.bbox) {\n sp.set(\"bbox\", this.bbox.map((c) => c.toFixed(6)).join(\",\"));\n }\n\n if (this.country) {\n sp.set(\"country\", Array.isArray(this.country) ? this.country.join(\",\") : this.country);\n }\n\n if (!byId && !isReverse) {\n const proximity = this.proximity ?? [{ type: \"server-geolocation\" }];\n const coords = await getProximity(this.#centerAndZoom, proximity, ac);\n\n if (coords) {\n sp.set(\"proximity\", coords);\n }\n\n if (exact || this.showResultsWhileTyping === false) {\n sp.set(\"autocomplete\", \"false\");\n }\n\n sp.set(\"fuzzyMatch\", String(this.fuzzyMatch !== false));\n }\n\n const limit = this.limit ?? 5;\n const effReverseGeocodingLimit = this.reverseGeocodingLimit ?? limit;\n\n if (effReverseGeocodingLimit > 1 && effTypes?.length !== 1) {\n console.warn(\"[MapTilerGeocodingControl] Warning: For reverse geocoding when limit > 1 then types must contain single value.\");\n }\n\n if (isReverse) {\n if (effReverseGeocodingLimit === 1 || this.exhaustiveReverseGeocoding || effTypes?.length === 1) {\n sp.set(\"limit\", String(effReverseGeocodingLimit));\n }\n } else {\n sp.set(\"limit\", String(limit));\n }\n\n if (this.apiKey) {\n sp.set(\"key\", this.apiKey);\n }\n\n this.adjustUrl?.(urlObj);\n\n const noTypes = urlObj.searchParams.get(\"types\") === \"\" && urlObj.searchParams.get(\"excludeTypes\") !== \"true\";\n\n const url = urlObj.toString();\n\n if (url === this.lastSearchUrl) {\n if (byId) {\n if (this.clearListOnPick) {\n this.#clearFeatures();\n }\n\n this.picked = this.cachedFeatures[0];\n } else {\n this.listFeatures = this.cachedFeatures;\n this.#dispatch(\"featureslisted\", { features: this.listFeatures });\n\n if (this.listFeatures[this.selectedItemIndex]?.id !== this.#selected?.id) {\n this.selectedItemIndex = -1;\n }\n }\n\n return;\n }\n\n this.#dispatch(\"request\", { urlObj });\n\n this.lastSearchUrl = url;\n\n let featureCollection: FeatureCollection;\n\n if (noTypes) {\n featureCollection = { type: \"FeatureCollection\", features: [] };\n } else {\n const res = await fetch(url, {\n signal: ac.signal,\n ...this.fetchParameters,\n });\n\n if (!res.ok) {\n throw new Error(await res.text());\n }\n\n featureCollection = (await res.json()) as FeatureCollection;\n }\n\n this.#dispatch(\"response\", { url, featureCollection });\n\n if (byId) {\n if (this.clearListOnPick) {\n this.#clearFeatures();\n }\n\n this.picked = featureCollection.features[0];\n\n this.cachedFeatures = [this.picked];\n } else {\n this.listFeatures = featureCollection.features.filter(this.filter ?? (() => true));\n\n if (isReverse) {\n this.listFeatures.unshift({\n type: \"Feature\",\n properties: {},\n /* eslint-disable @typescript-eslint/restrict-template-expressions */\n id: `reverse_${isReverse.decimalLongitude}_${isReverse.decimalLatitude}`,\n text: `${isReverse.decimalLatitude}, ${isReverse.decimalLongitude}`,\n place_name: isReverse.toCoordinateFormat(\"DMS\"),\n /* eslint-enable @typescript-eslint/restrict-template-expressions */\n place_type: [\"reverse\"],\n place_type_name: [\"reverse\"],\n center: [isReverse.decimalLongitude, isReverse.decimalLatitude],\n bbox: [isReverse.decimalLongitude, isReverse.decimalLatitude, isReverse.decimalLongitude, isReverse.decimalLatitude],\n geometry: {\n type: \"Point\",\n coordinates: [isReverse.decimalLongitude, isReverse.decimalLatitude],\n },\n });\n }\n\n this.#dispatch(\"featureslisted\", { features: this.listFeatures });\n\n this.cachedFeatures = this.listFeatures;\n\n if (this.listFeatures[this.selectedItemIndex]?.id !== this.#selected?.id) {\n this.selectedItemIndex = -1;\n }\n\n if (isReverse) {\n this.input.focus();\n }\n }\n } catch (e: unknown) {\n if (e && typeof e === \"object\" && \"name\" in e && e.name === \"AbortError\") {\n return;\n }\n\n throw e;\n } finally {\n if (ac === this.abortController) {\n this.abortController = undefined;\n }\n }\n }\n\n #handleReverse(coordinates: [lng: number, lat: number]) {\n this.reverseActive = this.enableReverse === \"always\";\n\n this.#clearFeatures();\n this.picked = undefined;\n\n this.#submitSearchValue(`${coordinates[1].toFixed(6)}, ${wrapNum(coordinates[0], [-180, 180], true).toFixed(6)}`);\n this.#focusInputAndSelectText();\n }\n\n #handleKeyDown(e: KeyboardEvent) {\n if (!this.listFeatures) {\n return;\n }\n\n const dir = e.key === \"ArrowDown\" ? 1 : e.key === \"ArrowUp\" ? -1 : 0;\n\n if (!dir) {\n return;\n }\n\n this.input.focus();\n\n this.focused = true;\n\n e.preventDefault();\n\n if (this.picked && this.selectedItemIndex === -1) {\n this.selectedItemIndex = this.listFeatures.findIndex((listFeature) => listFeature.id === this.picked?.id);\n }\n\n if (this.selectedItemIndex === (this.picked || this.selectFirst !== false ? 0 : -1) && dir === -1) {\n this.selectedItemIndex = this.listFeatures.length;\n }\n\n this.selectedItemIndex += dir;\n\n if (this.selectedItemIndex >= this.listFeatures.length) {\n this.selectedItemIndex = -1;\n }\n\n if (this.selectedItemIndex < 0 && (this.picked || this.selectFirst !== false)) {\n this.selectedItemIndex = 0;\n }\n }\n\n #handleInput(event: InputEvent & { target: HTMLInputElement }) {\n this.#changeSearchValue(event.target.value);\n }\n\n #pick(feature: Feature) {\n if (!this.picked || this.picked.id !== feature.id) {\n this.picked = feature;\n this.searchValue = feature.place_name;\n }\n }\n\n #handleMouseEnter(index: number) {\n this.selectedItemIndex = index;\n }\n\n #handleMouseLeave() {\n if (!this.selectFirst !== false || this.picked) {\n this.selectedItemIndex = -1;\n }\n }\n\n #handleClear() {\n this.searchValue = \"\";\n this.#dispatch(\"queryclear\");\n\n this.picked = undefined;\n this.input.focus();\n }\n\n willUpdate(changedProperties: Map<string, unknown>) {\n if (changedProperties.has(\"error\") && this.error) {\n console.error(\"[MapTilerGeocodingControl] Error:\", this.error);\n }\n\n if (changedProperties.has(\"enableReverse\")) {\n this.reverseActive = this.enableReverse === \"always\";\n }\n\n if ([\"picked\"].some((prop) => changedProperties.has(prop))) {\n if (this.picked) {\n if (this.clearListOnPick) {\n this.#clearFeatures();\n }\n\n this.selectedItemIndex = -1;\n }\n }\n\n if ([\"searchValue\", \"minLength\"].some((prop) => changedProperties.has(prop)) && this.#isSearchValueTooShort) {\n this.#clearFeatures();\n this.error = undefined;\n }\n\n if ([\"focused\"].some((prop) => changedProperties.has(prop))) {\n setTimeout(() => {\n this.focusedDelayed = this.focused;\n\n // close dropdown in the next cycle so that the selected item event has the chance to fire\n if (this.clearOnBlur && !this.focused) {\n this.searchValue = \"\";\n }\n }, 100);\n }\n\n if (\n [\"selectFirst\", \"listFeatures\", \"selectedItemIndex\", \"picked\"].some((prop) => changedProperties.has(prop)) &&\n this.selectFirst !== false &&\n this.listFeatures?.length &&\n this.selectedItemIndex == -1 &&\n !this.picked\n ) {\n this.selectedItemIndex = 0;\n }\n\n if ([\"listFeatures\", \"selectedItemIndex\"].some((prop) => changedProperties.has(prop))) {\n this.#dispatch(\"select\", { feature: this.#selected });\n }\n\n if ([\"picked\"].some((prop) => changedProperties.has(prop))) {\n if (this.picked) {\n (this.fetchFullGeometryOnPick && !this.picked.address && this.picked.geometry.type === \"Point\" && this.picked.place_type[0] !== \"reverse\"\n ? this.#search(this.picked.id, { byId: true })\n : Promise.resolve()\n ).then(\n () => {\n this.#dispatch(\"pick\", { feature: this.picked });\n },\n (e: unknown) => {\n if (e && typeof e === \"object\" && \"name\" in e && e.name === \"AbortError\") return;\n this.error = e;\n this.#dispatch(\"pick\", { feature: this.picked });\n },\n );\n }\n }\n\n if ([\"listFeatures\", \"focusedDelayed\"].some((prop) => changedProperties.has(prop))) {\n if (this.#isFeatureListVisible) {\n this.#dispatch(\"featuresshow\");\n this.#wasFeatureListVisible = true;\n } else if (this.#wasFeatureListVisible) {\n this.#dispatch(\"featureshide\");\n }\n }\n\n if ([\"reverseActive\"].some((prop) => changedProperties.has(prop))) {\n this.#dispatch(\"reversetoggle\", { reverse: this.reverseActive });\n }\n }\n\n render() {\n /* eslint-disable @typescript-eslint/unbound-method */\n return html`\n <form @submit=${this.#handleSubmit} class=${classMap({ \"can-collapse\": this.collapsed && this.searchValue === \"\" })}>\n <div class=\"input-group\">\n <button\n class=\"search-button\"\n type=\"button\"\n @click=${() => {\n this.input.focus();\n }}\n >\n <maptiler-geocode-search-icon></maptiler-geocode-search-icon>\n </button>\n\n <input\n .value=${this.searchValue}\n @focus=${() => (this.focused = true)}\n @blur=${() => (this.focused = false)}\n @click=${() => (this.focused = true)}\n @keydown=${this.#handleKeyDown}\n @input=${this.#handleInput}\n @change=${() => (this.picked = undefined)}\n placeholder=${this.placeholder ?? \"Search\"}\n aria-label=${this.placeholder ?? \"Search\"}\n />\n\n <div class=\"clear-button-container ${classMap({ displayable: this.searchValue !== \"\" })}\">\n ${!this.#isLoading\n ? html`\n <button type=\"button\" @click=${this.#handleClear} title=${this.clearButtonTitle ?? \"clear\"}>\n <maptiler-geocode-clear-icon></maptiler-geocode-clear-icon>\n </button>\n `\n : html`<maptiler-geocode-loading-icon></maptiler-geocode-loading-icon>`}\n </div>\n\n ${this.enableReverse === \"button\"\n ? html`\n <button\n type=\"button\"\n class=${classMap({ active: this.reverseActive })}\n title=${this.reverseButtonTitle ?? \"toggle reverse geocoding\"}\n @click=${() => (this.reverseActive = !this.reverseActive)}\n >\n <maptiler-geocode-reverse-geocoding-icon></maptiler-geocode-reverse-geocoding-icon>\n </button>\n `\n : nothing}\n\n <!-- <slot /> -->\n </div>\n\n ${this.error\n ? html`\n <div class=\"error\">\n <maptiler-geocode-fail-icon></maptiler-geocode-fail-icon>\n\n <div>${this.errorMessage ?? \"Something went wrong…\"}</div>\n\n <button @click=${() => (this.error = undefined)}>\n <maptiler-geocode-clear-icon></maptiler-geocode-clear-icon>\n </button>\n </div>\n `\n : (!this.focusedDelayed && !this.keepListOpen) || this.listFeatures === undefined\n ? nothing\n : this.listFeatures.length === 0\n ? html`\n <div class=\"no-results\">\n <maptiler-geocode-fail-icon></maptiler-geocode-fail-icon>\n\n <div>\n ${this.noResultsMessage ??\n \"Oops! Looks like you're trying to predict something that's not quite right. We can't seem to find what you're looking for. Maybe try double-checking your spelling or try a different search term. Keep on typing - we'll do our best to get you where you need to go!\"}\n </div>\n </div>\n `\n : html`\n <ul class=\"options ${classMap({ \"open-on-top\": this.openListOnTop })}\" @mouseleave=${this.#handleMouseLeave} @keydown=${this.#handleKeyDown} role=\"listbox\">\n ${repeat(\n this.listFeatures,\n (feature) => feature.id + (feature.address ? \",\" + feature.address : \"\"),\n (feature, i) => html`\n <maptiler-geocoder-feature-item\n .feature=${feature}\n .showPlaceType=${this.showPlaceType ?? \"if-needed\"}\n itemStyle=${this.selectedItemIndex === i ? \"selected\" : this.picked?.id === feature.id ? \"picked\" : \"default\"}\n @mouseenter=${() => {\n this.#handleMouseEnter(i);\n }}\n @select=${() => {\n this.#pick(feature);\n }}\n .missingIconsCache=${this.#missingIconsCache}\n .iconsBaseUrl=${this.iconsBaseUrl ?? `https://cdn.maptiler.com/maptiler-geocoding-control/v${import.meta.env.VITE_LIB_VERSION}/icons/`}\n >\n ${feature.place_name}\n </maptiler-geocoder-feature-item>\n `,\n )}\n </ul>\n `}\n </form>\n `;\n /* eslint-enable @typescript-eslint/unbound-method */\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n \"maptiler-geocoder\": MaptilerGeocoderElement;\n }\n}\n\nconst propertyNames = [\n \"adjustUrl\",\n \"apiKey\",\n \"apiUrl\",\n \"bbox\",\n \"clearButtonTitle\",\n \"clearListOnPick\",\n \"clearOnBlur\",\n \"collapsed\",\n \"country\",\n \"debounceSearch\",\n \"enableReverse\",\n \"errorMessage\",\n \"excludeTypes\",\n \"reverseGeocodingExcludeTypes\",\n \"exhaustiveReverseGeocoding\",\n \"fetchParameters\",\n \"fetchFullGeometryOnPick\",\n \"filter\",\n \"fuzzyMatch\",\n \"iconsBaseUrl\",\n \"keepListOpen\",\n \"language\",\n \"limit\",\n \"reverseGeocodingLimit\",\n \"minLength\",\n \"noResultsMessage\",\n \"openListOnTop\",\n \"placeholder\",\n \"proximity\",\n \"reverseActive\",\n \"reverseButtonTitle\",\n \"selectFirst\",\n \"showPlaceType\",\n \"showResultsWhileTyping\",\n \"types\",\n \"reverseGeocodingTypes\",\n] as const satisfies readonly (keyof MaptilerGeocoderOptions)[];\n"],"names":["MaptilerGeocodeClearIconElement","LitElement","svg","css","__decorateClass","customElement","MaptilerGeocodeFailIconElement","MaptilerGeocodeLoadingIconElement","html","MaptilerGeocodeReverseGeocodingIconElement","MaptilerGeocodeSearchIconElement","wrapNum","x","range","includeMax","max","min","d","cachedLocation","getProximity","centerAndZoom","proximity","ac","rule","coords","resolve","reject","pos","c","err","_MaptilerGeocoderFeatureItemElement_instances","categories_get","isReverse_get","placeType_get","loadSprites_fn","handleImgError_fn","loadIcon_fn","loadIcon2_fn","hidpi","scaleUrl","scaleFactor","sprites","spritePromise","MaptilerGeocoderFeatureItemElement","__privateAdd","changedProperties","__privateGet","__privateMethod","styleMap","nothing","response","data","unsafeCSS","styles","property","state","_isInitialized","_wasFeatureListVisible","_searchTimeoutRef","_missingIconsCache","_centerAndZoom","_MaptilerGeocoderElement_instances","selected_get","isFeatureListVisible_get","isLoading_get","isSearchValueTooShort_get","dispatch_fn","handleSubmit_fn","isQueryReverse_fn","focusInputAndSelectText_fn","changeSearchValue_fn","clearFeatures_fn","submitSearchValue_fn","search_fn","handleReverse_fn","handleKeyDown_fn","handleInput_fn","pick_fn","handleMouseEnter_fn","handleMouseLeave_fn","handleClear_fn","MaptilerGeocoderElement","__privateSet","options","elementOptions","prop","propertyNames","value","type","listener","coordinates","e","classMap","repeat","feature","i","detail","event","searchValue","convert","sv","byId","exact","apiUrl","isReverse","urlObj","sp","zoom","effTypes","typeRule","effExcludeTypes","limit","effReverseGeocodingLimit","noTypes","url","featureCollection","res","dir","listFeature","index","query"],"mappings":";;;;;;;;;;;;AAIO,IAAMA,IAAN,cAA8CC,EAAW;AAAA,EAQ9D,SAAS;AACP,WAAOC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOT;AACF;AAjBaF,EACJ,SAASG;AAAA;AAAA;AAAA;AAAA;AAAA;AADLH,IAANI,GAAA;AAAA,EADNC,EAAc,6BAA6B;AAAA,GAC/BL,CAAA;;;;;;ACAN,IAAMM,IAAN,cAA6CL,EAAW;AAAA,EAQ7D,SAAS;AACP,WAAOC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOT;AACF;AAjBaI,EACJ,SAASH;AAAA;AAAA;AAAA;AAAA;AAAA;AADLG,IAANF,GAAA;AAAA,EADNC,EAAc,4BAA4B;AAAA,GAC9BC,CAAA;;;;;;ACAN,IAAMC,IAAN,cAAgDN,EAAW;AAAA,EA6BhE,SAAS;AACP,WAAOO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQT;AACF;AAvCaD,EACJ,SAASJ;AAAA;AAAA;AA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A;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;"}
@@ -0,0 +1,263 @@
1
+ (function(c,U){typeof exports=="object"&&typeof module<"u"?U(exports):typeof define=="function"&&define.amd?define(["exports"],U):(c=typeof globalThis<"u"?globalThis:c||self,U(c.maptilerGeocoder={}))})(this,(function(c){"use strict";/**
2
+ * @license
3
+ * Copyright 2019 Google LLC
4
+ * SPDX-License-Identifier: BSD-3-Clause
5
+ */const U=globalThis,_e=U.ShadowRoot&&(U.ShadyCSS===void 0||U.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,Le=Symbol(),Ve=new WeakMap;let qe=class{constructor(e,t,s){if(this._$cssResult$=!0,s!==Le)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=t}get styleSheet(){let e=this.o;const t=this.t;if(_e&&e===void 0){const s=t!==void 0&&t.length===1;s&&(e=Ve.get(t)),e===void 0&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),s&&Ve.set(t,e))}return e}toString(){return this.cssText}};const we=i=>new qe(typeof i=="string"?i:i+"",void 0,Le),D=(i,...e)=>{const t=i.length===1?i[0]:e.reduce(((s,r,o)=>s+(n=>{if(n._$cssResult$===!0)return n.cssText;if(typeof n=="number")return n;throw Error("Value passed to 'css' function must be a 'css' function result: "+n+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(r)+i[o+1]),i[0]);return new qe(t,i,Le)},Gt=(i,e)=>{if(_e)i.adoptedStyleSheets=e.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet));else for(const t of e){const s=document.createElement("style"),r=U.litNonce;r!==void 0&&s.setAttribute("nonce",r),s.textContent=t.cssText,i.appendChild(s)}},Ze=_e?i=>i:i=>i instanceof CSSStyleSheet?(e=>{let t="";for(const s of e.cssRules)t+=s.cssText;return we(t)})(i):i;/**
6
+ * @license
7
+ * Copyright 2017 Google LLC
8
+ * SPDX-License-Identifier: BSD-3-Clause
9
+ */const{is:Ut,defineProperty:Pt,getOwnPropertyDescriptor:Wt,getOwnPropertyNames:Dt,getOwnPropertySymbols:Ft,getPrototypeOf:Rt}=Object,ce=globalThis,Ke=ce.trustedTypes,Ht=Ke?Ke.emptyScript:"",Bt=ce.reactiveElementPolyfillSupport,X=(i,e)=>i,de={toAttribute(i,e){switch(e){case Boolean:i=i?Ht:null;break;case Object:case Array:i=i==null?i:JSON.stringify(i)}return i},fromAttribute(i,e){let t=i;switch(e){case Boolean:t=i!==null;break;case Number:t=i===null?null:Number(i);break;case Object:case Array:try{t=JSON.parse(i)}catch{t=null}}return t}},Se=(i,e)=>!Ut(i,e),Qe={attribute:!0,type:String,converter:de,reflect:!1,useDefault:!1,hasChanged:Se};Symbol.metadata??=Symbol("metadata"),ce.litPropertyMetadata??=new WeakMap;let V=class extends HTMLElement{static addInitializer(e){this._$Ei(),(this.l??=[]).push(e)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(e,t=Qe){if(t.state&&(t.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(e)&&((t=Object.create(t)).wrapped=!0),this.elementProperties.set(e,t),!t.noAccessor){const s=Symbol(),r=this.getPropertyDescriptor(e,s,t);r!==void 0&&Pt(this.prototype,e,r)}}static getPropertyDescriptor(e,t,s){const{get:r,set:o}=Wt(this.prototype,e)??{get(){return this[t]},set(n){this[t]=n}};return{get:r,set(n){const a=r?.call(this);o?.call(this,n),this.requestUpdate(e,a,s)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)??Qe}static _$Ei(){if(this.hasOwnProperty(X("elementProperties")))return;const e=Rt(this);e.finalize(),e.l!==void 0&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty(X("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(X("properties"))){const t=this.properties,s=[...Dt(t),...Ft(t)];for(const r of s)this.createProperty(r,t[r])}const e=this[Symbol.metadata];if(e!==null){const t=litPropertyMetadata.get(e);if(t!==void 0)for(const[s,r]of t)this.elementProperties.set(s,r)}this._$Eh=new Map;for(const[t,s]of this.elementProperties){const r=this._$Eu(t,s);r!==void 0&&this._$Eh.set(r,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(e){const t=[];if(Array.isArray(e)){const s=new Set(e.flat(1/0).reverse());for(const r of s)t.unshift(Ze(r))}else e!==void 0&&t.push(Ze(e));return t}static _$Eu(e,t){const s=t.attribute;return s===!1?void 0:typeof s=="string"?s:typeof e=="string"?e.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise((e=>this.enableUpdating=e)),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach((e=>e(this)))}addController(e){(this._$EO??=new Set).add(e),this.renderRoot!==void 0&&this.isConnected&&e.hostConnected?.()}removeController(e){this._$EO?.delete(e)}_$E_(){const e=new Map,t=this.constructor.elementProperties;for(const s of t.keys())this.hasOwnProperty(s)&&(e.set(s,this[s]),delete this[s]);e.size>0&&(this._$Ep=e)}createRenderRoot(){const e=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return Gt(e,this.constructor.elementStyles),e}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach((e=>e.hostConnected?.()))}enableUpdating(e){}disconnectedCallback(){this._$EO?.forEach((e=>e.hostDisconnected?.()))}attributeChangedCallback(e,t,s){this._$AK(e,s)}_$ET(e,t){const s=this.constructor.elementProperties.get(e),r=this.constructor._$Eu(e,s);if(r!==void 0&&s.reflect===!0){const o=(s.converter?.toAttribute!==void 0?s.converter:de).toAttribute(t,s.type);this._$Em=e,o==null?this.removeAttribute(r):this.setAttribute(r,o),this._$Em=null}}_$AK(e,t){const s=this.constructor,r=s._$Eh.get(e);if(r!==void 0&&this._$Em!==r){const o=s.getPropertyOptions(r),n=typeof o.converter=="function"?{fromAttribute:o.converter}:o.converter?.fromAttribute!==void 0?o.converter:de;this._$Em=r;const a=n.fromAttribute(t,o.type);this[r]=a??this._$Ej?.get(r)??a,this._$Em=null}}requestUpdate(e,t,s){if(e!==void 0){const r=this.constructor,o=this[e];if(s??=r.getPropertyOptions(e),!((s.hasChanged??Se)(o,t)||s.useDefault&&s.reflect&&o===this._$Ej?.get(e)&&!this.hasAttribute(r._$Eu(e,s))))return;this.C(e,t,s)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(e,t,{useDefault:s,reflect:r,wrapped:o},n){s&&!(this._$Ej??=new Map).has(e)&&(this._$Ej.set(e,n??t??this[e]),o!==!0||n!==void 0)||(this._$AL.has(e)||(this.hasUpdated||s||(t=void 0),this._$AL.set(e,t)),r===!0&&this._$Em!==e&&(this._$Eq??=new Set).add(e))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(t){Promise.reject(t)}const e=this.scheduleUpdate();return e!=null&&await e,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(const[r,o]of this._$Ep)this[r]=o;this._$Ep=void 0}const s=this.constructor.elementProperties;if(s.size>0)for(const[r,o]of s){const{wrapped:n}=o,a=this[r];n!==!0||this._$AL.has(r)||a===void 0||this.C(r,void 0,o,a)}}let e=!1;const t=this._$AL;try{e=this.shouldUpdate(t),e?(this.willUpdate(t),this._$EO?.forEach((s=>s.hostUpdate?.())),this.update(t)):this._$EM()}catch(s){throw e=!1,this._$EM(),s}e&&this._$AE(t)}willUpdate(e){}_$AE(e){this._$EO?.forEach((t=>t.hostUpdated?.())),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(e){return!0}update(e){this._$Eq&&=this._$Eq.forEach((t=>this._$ET(t,this[t]))),this._$EM()}updated(e){}firstUpdated(e){}};V.elementStyles=[],V.shadowRootOptions={mode:"open"},V[X("elementProperties")]=new Map,V[X("finalized")]=new Map,Bt?.({ReactiveElement:V}),(ce.reactiveElementVersions??=[]).push("2.1.1");/**
10
+ * @license
11
+ * Copyright 2017 Google LLC
12
+ * SPDX-License-Identifier: BSD-3-Clause
13
+ */const Me=globalThis,he=Me.trustedTypes,Je=he?he.createPolicy("lit-html",{createHTML:i=>i}):void 0,Xe="$lit$",P=`lit$${Math.random().toFixed(9).slice(2)}$`,Ye="?"+P,jt=`<${Ye}>`,F=document,Y=()=>F.createComment(""),ee=i=>i===null||typeof i!="object"&&typeof i!="function",Ae=Array.isArray,zt=i=>Ae(i)||typeof i?.[Symbol.iterator]=="function",xe=`[
14
+ \f\r]`,te=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,et=/-->/g,tt=/>/g,R=RegExp(`>|${xe}(?:([^\\s"'>=/]+)(${xe}*=${xe}*(?:[^
15
+ \f\r"'\`<>=]|("|')|))|$)`,"g"),it=/'/g,st=/"/g,rt=/^(?:script|style|textarea|title)$/i,ot=i=>(e,...t)=>({_$litType$:i,strings:e,values:t}),S=ot(1),ue=ot(2),O=Symbol.for("lit-noChange"),w=Symbol.for("lit-nothing"),at=new WeakMap,H=F.createTreeWalker(F,129);function nt(i,e){if(!Ae(i)||!i.hasOwnProperty("raw"))throw Error("invalid template strings array");return Je!==void 0?Je.createHTML(e):e}const Vt=(i,e)=>{const t=i.length-1,s=[];let r,o=e===2?"<svg>":e===3?"<math>":"",n=te;for(let a=0;a<t;a++){const l=i[a];let p,b,d=-1,v=0;for(;v<l.length&&(n.lastIndex=v,b=n.exec(l),b!==null);)v=n.lastIndex,n===te?b[1]==="!--"?n=et:b[1]!==void 0?n=tt:b[2]!==void 0?(rt.test(b[2])&&(r=RegExp("</"+b[2],"g")),n=R):b[3]!==void 0&&(n=R):n===R?b[0]===">"?(n=r??te,d=-1):b[1]===void 0?d=-2:(d=n.lastIndex-b[2].length,p=b[1],n=b[3]===void 0?R:b[3]==='"'?st:it):n===st||n===it?n=R:n===et||n===tt?n=te:(n=R,r=void 0);const g=n===R&&i[a+1].startsWith("/>")?" ":"";o+=n===te?l+jt:d>=0?(s.push(p),l.slice(0,d)+Xe+l.slice(d)+P+g):l+P+(d===-2?a:g)}return[nt(i,o+(i[t]||"<?>")+(e===2?"</svg>":e===3?"</math>":"")),s]};class ie{constructor({strings:e,_$litType$:t},s){let r;this.parts=[];let o=0,n=0;const a=e.length-1,l=this.parts,[p,b]=Vt(e,t);if(this.el=ie.createElement(p,s),H.currentNode=this.el.content,t===2||t===3){const d=this.el.content.firstChild;d.replaceWith(...d.childNodes)}for(;(r=H.nextNode())!==null&&l.length<a;){if(r.nodeType===1){if(r.hasAttributes())for(const d of r.getAttributeNames())if(d.endsWith(Xe)){const v=b[n++],g=r.getAttribute(d).split(P),y=/([.?@])?(.*)/.exec(v);l.push({type:1,index:o,name:y[2],strings:g,ctor:y[1]==="."?Zt:y[1]==="?"?Kt:y[1]==="@"?Qt:pe}),r.removeAttribute(d)}else d.startsWith(P)&&(l.push({type:6,index:o}),r.removeAttribute(d));if(rt.test(r.tagName)){const d=r.textContent.split(P),v=d.length-1;if(v>0){r.textContent=he?he.emptyScript:"";for(let g=0;g<v;g++)r.append(d[g],Y()),H.nextNode(),l.push({type:2,index:++o});r.append(d[v],Y())}}}else if(r.nodeType===8)if(r.data===Ye)l.push({type:2,index:o});else{let d=-1;for(;(d=r.data.indexOf(P,d+1))!==-1;)l.push({type:7,index:o}),d+=P.length-1}o++}}static createElement(e,t){const s=F.createElement("template");return s.innerHTML=e,s}}function q(i,e,t=i,s){if(e===O)return e;let r=s!==void 0?t._$Co?.[s]:t._$Cl;const o=ee(e)?void 0:e._$litDirective$;return r?.constructor!==o&&(r?._$AO?.(!1),o===void 0?r=void 0:(r=new o(i),r._$AT(i,t,s)),s!==void 0?(t._$Co??=[])[s]=r:t._$Cl=r),r!==void 0&&(e=q(i,r._$AS(i,e.values),r,s)),e}let qt=class{constructor(e,t){this._$AV=[],this._$AN=void 0,this._$AD=e,this._$AM=t}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(e){const{el:{content:t},parts:s}=this._$AD,r=(e?.creationScope??F).importNode(t,!0);H.currentNode=r;let o=H.nextNode(),n=0,a=0,l=s[0];for(;l!==void 0;){if(n===l.index){let p;l.type===2?p=new Z(o,o.nextSibling,this,e):l.type===1?p=new l.ctor(o,l.name,l.strings,this,e):l.type===6&&(p=new Jt(o,this,e)),this._$AV.push(p),l=s[++a]}n!==l?.index&&(o=H.nextNode(),n++)}return H.currentNode=F,r}p(e){let t=0;for(const s of this._$AV)s!==void 0&&(s.strings!==void 0?(s._$AI(e,s,t),t+=s.strings.length-2):s._$AI(e[t])),t++}};class Z{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(e,t,s,r){this.type=2,this._$AH=w,this._$AN=void 0,this._$AA=e,this._$AB=t,this._$AM=s,this.options=r,this._$Cv=r?.isConnected??!0}get parentNode(){let e=this._$AA.parentNode;const t=this._$AM;return t!==void 0&&e?.nodeType===11&&(e=t.parentNode),e}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(e,t=this){e=q(this,e,t),ee(e)?e===w||e==null||e===""?(this._$AH!==w&&this._$AR(),this._$AH=w):e!==this._$AH&&e!==O&&this._(e):e._$litType$!==void 0?this.$(e):e.nodeType!==void 0?this.T(e):zt(e)?this.k(e):this._(e)}O(e){return this._$AA.parentNode.insertBefore(e,this._$AB)}T(e){this._$AH!==e&&(this._$AR(),this._$AH=this.O(e))}_(e){this._$AH!==w&&ee(this._$AH)?this._$AA.nextSibling.data=e:this.T(F.createTextNode(e)),this._$AH=e}$(e){const{values:t,_$litType$:s}=e,r=typeof s=="number"?this._$AC(e):(s.el===void 0&&(s.el=ie.createElement(nt(s.h,s.h[0]),this.options)),s);if(this._$AH?._$AD===r)this._$AH.p(t);else{const o=new qt(r,this),n=o.u(this.options);o.p(t),this.T(n),this._$AH=o}}_$AC(e){let t=at.get(e.strings);return t===void 0&&at.set(e.strings,t=new ie(e)),t}k(e){Ae(this._$AH)||(this._$AH=[],this._$AR());const t=this._$AH;let s,r=0;for(const o of e)r===t.length?t.push(s=new Z(this.O(Y()),this.O(Y()),this,this.options)):s=t[r],s._$AI(o),r++;r<t.length&&(this._$AR(s&&s._$AB.nextSibling,r),t.length=r)}_$AR(e=this._$AA.nextSibling,t){for(this._$AP?.(!1,!0,t);e!==this._$AB;){const s=e.nextSibling;e.remove(),e=s}}setConnected(e){this._$AM===void 0&&(this._$Cv=e,this._$AP?.(e))}}class pe{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(e,t,s,r,o){this.type=1,this._$AH=w,this._$AN=void 0,this.element=e,this.name=t,this._$AM=r,this.options=o,s.length>2||s[0]!==""||s[1]!==""?(this._$AH=Array(s.length-1).fill(new String),this.strings=s):this._$AH=w}_$AI(e,t=this,s,r){const o=this.strings;let n=!1;if(o===void 0)e=q(this,e,t,0),n=!ee(e)||e!==this._$AH&&e!==O,n&&(this._$AH=e);else{const a=e;let l,p;for(e=o[0],l=0;l<o.length-1;l++)p=q(this,a[s+l],t,l),p===O&&(p=this._$AH[l]),n||=!ee(p)||p!==this._$AH[l],p===w?e=w:e!==w&&(e+=(p??"")+o[l+1]),this._$AH[l]=p}n&&!r&&this.j(e)}j(e){e===w?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e??"")}}class Zt extends pe{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===w?void 0:e}}class Kt extends pe{constructor(){super(...arguments),this.type=4}j(e){this.element.toggleAttribute(this.name,!!e&&e!==w)}}class Qt extends pe{constructor(e,t,s,r,o){super(e,t,s,r,o),this.type=5}_$AI(e,t=this){if((e=q(this,e,t,0)??w)===O)return;const s=this._$AH,r=e===w&&s!==w||e.capture!==s.capture||e.once!==s.once||e.passive!==s.passive,o=e!==w&&(s===w||r);r&&this.element.removeEventListener(this.name,this,s),o&&this.element.addEventListener(this.name,this,e),this._$AH=e}handleEvent(e){typeof this._$AH=="function"?this._$AH.call(this.options?.host??this.element,e):this._$AH.handleEvent(e)}}class Jt{constructor(e,t,s){this.element=e,this.type=6,this._$AN=void 0,this._$AM=t,this.options=s}get _$AU(){return this._$AM._$AU}_$AI(e){q(this,e)}}const Xt={I:Z},Yt=Me.litHtmlPolyfillSupport;Yt?.(ie,Z),(Me.litHtmlVersions??=[]).push("3.3.1");const ei=(i,e,t)=>{const s=t?.renderBefore??e;let r=s._$litPart$;if(r===void 0){const o=t?.renderBefore??null;s._$litPart$=r=new Z(e.insertBefore(Y(),o),o,void 0,t??{})}return r._$AI(i),r};/**
16
+ * @license
17
+ * Copyright 2017 Google LLC
18
+ * SPDX-License-Identifier: BSD-3-Clause
19
+ */const Ce=globalThis;let N=class extends V{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){const e=super.createRenderRoot();return this.renderOptions.renderBefore??=e.firstChild,e}update(e){const t=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this._$Do=ei(t,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return O}};N._$litElement$=!0,N.finalized=!0,Ce.litElementHydrateSupport?.({LitElement:N});const ti=Ce.litElementPolyfillSupport;ti?.({LitElement:N}),(Ce.litElementVersions??=[]).push("4.2.1");/**
20
+ * @license
21
+ * Copyright 2017 Google LLC
22
+ * SPDX-License-Identifier: BSD-3-Clause
23
+ */const B=i=>(e,t)=>{t!==void 0?t.addInitializer((()=>{customElements.define(i,e)})):customElements.define(i,e)};/**
24
+ * @license
25
+ * Copyright 2017 Google LLC
26
+ * SPDX-License-Identifier: BSD-3-Clause
27
+ */const ii={attribute:!0,type:String,converter:de,reflect:!1,hasChanged:Se},si=(i=ii,e,t)=>{const{kind:s,metadata:r}=t;let o=globalThis.litPropertyMetadata.get(r);if(o===void 0&&globalThis.litPropertyMetadata.set(r,o=new Map),s==="setter"&&((i=Object.create(i)).wrapped=!0),o.set(t.name,i),s==="accessor"){const{name:n}=t;return{set(a){const l=e.get.call(this);e.set.call(this,a),this.requestUpdate(n,l,i)},init(a){return a!==void 0&&this.C(n,void 0,i,a),a}}}if(s==="setter"){const{name:n}=t;return function(a){const l=this[n];e.call(this,a),this.requestUpdate(n,l,i)}}throw Error("Unsupported decorator location: "+s)};function f(i){return(e,t)=>typeof t=="object"?si(i,e,t):((s,r,o)=>{const n=r.hasOwnProperty(o);return r.constructor.createProperty(o,s),n?Object.getOwnPropertyDescriptor(r,o):void 0})(i,e,t)}/**
28
+ * @license
29
+ * Copyright 2017 Google LLC
30
+ * SPDX-License-Identifier: BSD-3-Clause
31
+ */function C(i){return f({...i,state:!0,attribute:!1})}/**
32
+ * @license
33
+ * Copyright 2017 Google LLC
34
+ * SPDX-License-Identifier: BSD-3-Clause
35
+ */const ri=(i,e,t)=>(t.configurable=!0,t.enumerable=!0,Reflect.decorate&&typeof e!="object"&&Object.defineProperty(i,e,t),t);/**
36
+ * @license
37
+ * Copyright 2017 Google LLC
38
+ * SPDX-License-Identifier: BSD-3-Clause
39
+ */function oi(i,e){return(t,s,r)=>{const o=n=>n.renderRoot?.querySelector(i)??null;return ri(t,s,{get(){return o(this)}})}}var ai=Object.getOwnPropertyDescriptor,ni=(i,e,t,s)=>{for(var r=s>1?void 0:s?ai(e,t):e,o=i.length-1,n;o>=0;o--)(n=i[o])&&(r=n(r)||r);return r};c.MaptilerGeocodeClearIconElement=class extends N{render(){return ue`
40
+ <svg viewBox="0 0 14 14" width="13" height="13">
41
+ <path
42
+ d="M13.12.706a.982.982 0 0 0-1.391 0L6.907 5.517 2.087.696a.982.982 0 1 0-1.391 1.39l4.821 4.821L.696 11.73a.982.982 0 1 0 1.39 1.39l4.821-4.821 4.822 4.821a.982.982 0 1 0 1.39-1.39L8.298 6.908l4.821-4.822a.988.988 0 0 0 0-1.38Z"
43
+ />
44
+ </svg>
45
+ `}},c.MaptilerGeocodeClearIconElement.styles=D`
46
+ svg {
47
+ display: block;
48
+ fill: var(--color-icon-button);
49
+ }
50
+ `,c.MaptilerGeocodeClearIconElement=ni([B("maptiler-geocode-clear-icon")],c.MaptilerGeocodeClearIconElement);var li=Object.getOwnPropertyDescriptor,ci=(i,e,t,s)=>{for(var r=s>1?void 0:s?li(e,t):e,o=i.length-1,n;o>=0;o--)(n=i[o])&&(r=n(r)||r);return r};c.MaptilerGeocodeFailIconElement=class extends N{render(){return ue`
51
+ <svg viewBox="0 0 30 30" fill="none" xmlns="http://www.w3.org/2000/svg">
52
+ <path
53
+ d="M15 0C6.705 0 0 6.705 0 15C0 23.295 6.705 30 15 30C23.295 30 30 23.295 30 15C30 6.705 23.295 0 15 0ZM22.5 20.385L20.385 22.5L15 17.115L9.615 22.5L7.5 20.385L12.885 15L7.5 9.615L9.615 7.5L15 12.885L20.385 7.5L22.5 9.615L17.115 15L22.5 20.385Z"
54
+ />
55
+ </svg>
56
+ `}},c.MaptilerGeocodeFailIconElement.styles=D`
57
+ svg {
58
+ display: block;
59
+ fill: #e15042;
60
+ }
61
+ `,c.MaptilerGeocodeFailIconElement=ci([B("maptiler-geocode-fail-icon")],c.MaptilerGeocodeFailIconElement);var di=Object.getOwnPropertyDescriptor,hi=(i,e,t,s)=>{for(var r=s>1?void 0:s?di(e,t):e,o=i.length-1,n;o>=0;o--)(n=i[o])&&(r=n(r)||r);return r};c.MaptilerGeocodeLoadingIconElement=class extends N{render(){return S`
62
+ <div>
63
+ <svg viewBox="0 0 18 18" width="24" height="24" class="loading-icon">
64
+ <path fill="#333" d="M4.4 4.4l.8.8c2.1-2.1 5.5-2.1 7.6 0l.8-.8c-2.5-2.5-6.7-2.5-9.2 0z" />
65
+ <path opacity=".1" d="M12.8 12.9c-2.1 2.1-5.5 2.1-7.6 0-2.1-2.1-2.1-5.5 0-7.7l-.8-.8c-2.5 2.5-2.5 6.7 0 9.2s6.6 2.5 9.2 0 2.5-6.6 0-9.2l-.8.8c2.2 2.1 2.2 5.6 0 7.7z" />
66
+ </svg>
67
+ </div>
68
+ `}},c.MaptilerGeocodeLoadingIconElement.styles=D`
69
+ div {
70
+ position: absolute;
71
+ left: 50%;
72
+ top: 50%;
73
+ transform: translate(-50%, -50%);
74
+ pointer-events: none;
75
+
76
+ display: flex;
77
+ align-items: center;
78
+ }
79
+
80
+ .loading-icon {
81
+ animation: rotate 0.8s infinite cubic-bezier(0.45, 0.05, 0.55, 0.95);
82
+ }
83
+
84
+ @keyframes rotate {
85
+ from {
86
+ -webkit-transform: rotate(0);
87
+ transform: rotate(0);
88
+ }
89
+ to {
90
+ -webkit-transform: rotate(360deg);
91
+ transform: rotate(360deg);
92
+ }
93
+ }
94
+ `,c.MaptilerGeocodeLoadingIconElement=hi([B("maptiler-geocode-loading-icon")],c.MaptilerGeocodeLoadingIconElement);var ui=Object.getOwnPropertyDescriptor,pi=(i,e,t,s)=>{for(var r=s>1?void 0:s?ui(e,t):e,o=i.length-1,n;o>=0;o--)(n=i[o])&&(r=n(r)||r);return r};c.MaptilerGeocodeReverseGeocodingIconElement=class extends N{render(){return ue`
95
+ <svg viewBox="0 0 60.006 21.412" width="14" height="20">
96
+ <path
97
+ d="M30.003-26.765C13.46-26.765 0-14.158 0 1.337c0 23.286 24.535 42.952 28.39 46.04.24.192.402.316.471.376.323.282.732.424 1.142.424.41 0 .82-.142 1.142-.424.068-.06.231-.183.471-.376 3.856-3.09 28.39-22.754 28.39-46.04 0-15.495-13.46-28.102-30.003-28.102Zm1.757 12.469c4.38 0 7.858 1.052 10.431 3.158 2.595 2.105 3.89 4.913 3.89 8.422 0 2.34-.53 4.362-1.593 6.063-1.063 1.702-3.086 3.616-6.063 5.742-2.042 1.51-3.337 2.659-3.89 3.446-.532.787-.8 1.82-.8 3.096v1.914h-8.449V15.18c0-2.041.434-3.815 1.306-5.325.872-1.51 2.467-3.118 4.785-4.82 2.233-1.594 3.7-2.89 4.402-3.889a5.582 5.582 0 0 0 1.087-3.35c0-1.382-.51-2.435-1.531-3.158-1.02-.723-2.45-1.087-4.28-1.087-3.19 0-6.826 1.047-10.91 3.131l-3.472-6.986c4.742-2.659 9.77-3.992 15.087-3.992Zm-1.88 37.324c1.765 0 3.124.472 4.08 1.408.98.936 1.47 2.276 1.47 4.02 0 1.68-.49 3.007-1.47 3.985-.977.957-2.336 1.435-4.08 1.435-1.787 0-3.171-.465-4.15-1.4-.978-.958-1.47-2.298-1.47-4.02 0-1.787.48-3.14 1.436-4.054.957-.915 2.355-1.374 4.184-1.374Z"
98
+ />
99
+ </svg>
100
+ `}},c.MaptilerGeocodeReverseGeocodingIconElement.styles=D`
101
+ svg {
102
+ display: block;
103
+ fill: var(--color-icon-button);
104
+ }
105
+ `,c.MaptilerGeocodeReverseGeocodingIconElement=pi([B("maptiler-geocode-reverse-geocoding-icon")],c.MaptilerGeocodeReverseGeocodingIconElement);var mi=Object.getOwnPropertyDescriptor,fi=(i,e,t,s)=>{for(var r=s>1?void 0:s?mi(e,t):e,o=i.length-1,n;o>=0;o--)(n=i[o])&&(r=n(r)||r);return r};c.MaptilerGeocodeSearchIconElement=class extends N{render(){return ue`
106
+ <svg
107
+ xmlns="http://www.w3.org/2000/svg"
108
+ width="13"
109
+ height="13"
110
+ viewBox="0 0 13 13"
111
+ >
112
+ <circle cx="4.789" cy="4.787" r="3.85" />
113
+ <path d="M12.063 12.063 7.635 7.635" />
114
+ </svg>
115
+ `}},c.MaptilerGeocodeSearchIconElement.styles=D`
116
+ circle {
117
+ stroke-width: 1.875;
118
+ fill: none;
119
+ }
120
+
121
+ path {
122
+ stroke-width: 1.875;
123
+ stroke-linecap: round;
124
+ }
125
+
126
+ svg {
127
+ display: block;
128
+ stroke: var(--color-icon-button);
129
+ }
130
+ `,c.MaptilerGeocodeSearchIconElement=fi([B("maptiler-geocode-search-icon")],c.MaptilerGeocodeSearchIconElement);const gi=/^(NORTH|SOUTH|[NS])?\s*([+-]?[0-8]?[0-9])\s*([•º°\.:]|D(?:EG)?(?:REES)?)?\s*,?([6-9][0-9])\s*(['′´’\.:]|M(?:IN)?(?:UTES)?)?\s*(NORTH|SOUTH|[NS])?(?:\s*[,/;]\s*|\s*)(EAST|WEST|[EW])?\s*([+-]?[0-1]?[0-9]?[0-9])\s*([•º°\.:]|D(?:EG)?(?:REES)?)?\s*,?([6-9][0-9])\s*(['′´’\.:]|M(?:IN)?(?:UTES)?)?\s*(EAST|WEST|[EW])?$/i,lt=/^([+-]?[0-8]?[0-9])\s+([0-5]?[0-9]\.\d{3,})[\s,]{1,}([+-]?[0-1]?[0-9]?[0-9])\s+([0-5]?[0-9]\.\d{3,})$/,ct=/^(NORTH|SOUTH|[NS])?[\s]*([+-]?[0-8]?[0-9](?:[\.,]\d{3,}))[\s]*([•º°]?)[\s]*(NORTH|SOUTH|[NS])?[\s]*[,/;]?[\s]*(EAST|WEST|[EW])?[\s]*([+-]?[0-1]?[0-9]?[0-9](?:[\.,]\d{3,}))[\s]*([•º°]?)[\s]*(EAST|WEST|[EW])?$/i,dt=/^(NORTH|SOUTH|[NS])?\s*([+-]?[0-8]?[0-9])\s*(\.)\s*([0-5]?[0-9])\s*(\.)\s*((?:[0-5]?[0-9])(?:[\.,]\d{1,3})?)?\s*(NORTH|SOUTH|[NS])?(?:\s*[,/;]\s*|\s*)(EAST|WEST|[EW])?\s*([+-]?[0-1]?[0-9]?[0-9])\s*(\.)\s*([0-5]?[0-9])\s*(\.)\s*((?:[0-5]?[0-9])(?:[\.,]\d{1,3})?)?\s*(EAST|WEST|[EW])?$/i,ht=/^(NORTH|SOUTH|[NS])?\s*([+-]?[0-8]?[0-9])\s*(D(?:EG)?(?:REES)?)\s*([0-5]?[0-9])\s*(M(?:IN)?(?:UTES)?)\s*((?:[0-5]?[0-9])(?:[\.,]\d{1,3})?)?\s*(S(?:EC)?(?:ONDS)?)?\s*(NORTH|SOUTH|[NS])?(?:\s*[,/;]\s*|\s*)(EAST|WEST|[EW])?\s*([+-]?[0-1]?[0-9]?[0-9])\s*(D(?:EG)?(?:REES)?)\s*([0-5]?[0-9])\s*(M(?:IN)?(?:UTES)?)\s*((?:[0-5]?[0-9])(?:[\.,]\d{1,3})?)?\s*(S(?:EC)?(?:ONDS)?)\s*(EAST|WEST|[EW])?$/i,ut=/^(NORTH|SOUTH|[NS])?\s*([+-]?[0-8]?[0-9])\s*([•º°\.:]|D(?:EG)?(?:REES)?)?\s*,?([0-5]?[0-9](?:[\.,]\d{1,})?)?\s*(['′´’\.:]|M(?:IN)?(?:UTES)?)?\s*,?((?:[0-5]?[0-9])(?:[\.,]\d{1,3})?)?\s*(''|′′|’’|´´|["″”\.])?\s*(NORTH|SOUTH|[NS])?(?:\s*[,/;]\s*|\s*)(EAST|WEST|[EW])?\s*([+-]?[0-1]?[0-9]?[0-9])\s*([•º°\.:]|D(?:EG)?(?:REES)?)?\s*,?([0-5]?[0-9](?:[\.,]\d{1,})?)?\s*(['′´’\.:]|M(?:IN)?(?:UTES)?)?\s*,?((?:[0-5]?[0-9])(?:[\.,]\d{1,3})?)?\s*(''|′′|´´|’’|["″”\.])?\s*(EAST|WEST|[EW])?$/i;function vi(i){if(!["DMS","DM","DD"].includes(i))throw new Error("invalid format specified");if(this.decimalCoordinates&&this.decimalCoordinates.trim()){const e=this.decimalCoordinates.split(",").map(g=>Number(g.trim())),t=Number(e[0]),s=Number(e[1]),r=Math.abs(t),o=Math.abs(s),n=t>0?"N":"S",a=s>0?"E":"W";let l;i=="DD"&&(l=`${r}° ${n}, ${o}° ${a}`);const p=Math.floor(r),b=Math.floor(o),d=(r-p)*60,v=(o-b)*60;if(i=="DM"){let g=pt(d,3).toFixed(3).padStart(6,"0"),y=pt(v,3).toFixed(3).padStart(6,"0");g.endsWith(".000")&&y.endsWith(".000")&&(g=g.replace(/\.000$/,""),y=y.replace(/\.000$/,"")),l=`${p}° ${g}' ${n}, ${b}° ${y}' ${a}`}if(i=="DMS"){const g=Math.floor(d),y=Math.floor(v);let L=((d-g)*60).toFixed(1).padStart(4,"0"),E=((v-y)*60).toFixed(1).padStart(4,"0");const x=g.toString().padStart(2,"0"),G=y.toString().padStart(2,"0");L.endsWith(".0")&&E.endsWith(".0")&&(L=L.replace(/\.0$/,""),E=E.replace(/\.0$/,"")),l=`${p}° ${x}' ${L}" ${n}, ${b}° ${G}' ${E}" ${a}`}return l}else throw new Error("no decimal coordinates to convert")}function pt(i,e){const t=Math.pow(10,e);return Math.round((i+Number.EPSILON)*t)/t}function Ie(i,e){e||(e=5),i=i.replace(/\s+/g," ").trim();let t=null,s=null,r="",o="",n=null,a=[],l=!1;if(gi.test(i))throw new Error("invalid coordinate value");if(lt.test(i))if(a=lt.exec(i),l=se(a),l)t=Math.abs(a[1])+a[2]/60,Number(a[1])<0&&(t*=-1),s=Math.abs(a[3])+a[4]/60,Number(a[3])<0&&(s*=-1),n="DM";else throw new Error("invalid coordinate format");else if(ct.test(i))if(a=ct.exec(i),l=se(a),l){if(t=a[2],s=a[6],t.includes(",")&&(t=t.replace(",",".")),s.includes(",")&&(s=s.replace(",",".")),n="DD",Number(Math.round(t))==Number(t))throw new Error("integer only coordinate provided");if(Number(Math.round(s))==Number(s))throw new Error("integer only coordinate provided");a[1]?(r=a[1],o=a[5]):a[4]&&(r=a[4],o=a[8])}else throw new Error("invalid decimal coordinate format");else if(dt.test(i))if(a=dt.exec(i),l=se(a),l)t=Math.abs(parseInt(a[2])),a[4]&&(t+=a[4]/60,n="DM"),a[6]&&(t+=a[6].replace(",",".")/3600,n="DMS"),parseInt(a[2])<0&&(t=-1*t),s=Math.abs(parseInt(a[9])),a[11]&&(s+=a[11]/60),a[13]&&(s+=a[13].replace(",",".")/3600),parseInt(a[9])<0&&(s=-1*s),a[1]?(r=a[1],o=a[8]):a[7]&&(r=a[7],o=a[14]);else throw new Error("invalid DMS coordinates format");else if(ht.test(i))if(a=ht.exec(i),l=se(a),l)t=Math.abs(parseInt(a[2])),a[4]&&(t+=a[4]/60,n="DM"),a[6]&&(t+=a[6]/3600,n="DMS"),parseInt(a[2])<0&&(t=-1*t),s=Math.abs(parseInt(a[10])),a[12]&&(s+=a[12]/60),a[14]&&(s+=a[14]/3600),parseInt(a[10])<0&&(s=-1*s),a[1]?(r=a[1],o=a[9]):a[8]&&(r=a[8],o=a[16]);else throw new Error("invalid DMS coordinates format");else if(ut.test(i)){if(a=ut.exec(i),l=se(a),a.filter(p=>p).length<=5)throw new Error("invalid coordinates format");if(l)t=Math.abs(parseInt(a[2])),a[4]&&(t+=a[4].replace(",",".")/60,n="DM"),a[6]&&(t+=a[6].replace(",",".")/3600,n="DMS"),parseInt(a[2])<0&&(t=-1*t),s=Math.abs(parseInt(a[10])),a[12]&&(s+=a[12].replace(",",".")/60),a[14]&&(s+=a[14].replace(",",".")/3600),parseInt(a[10])<0&&(s=-1*s),a[1]?(r=a[1],o=a[9]):a[8]&&(r=a[8],o=a[16]);else throw new Error("invalid coordinates format")}if(l){if(Math.abs(s)>=180)throw new Error("invalid longitude value");if(Math.abs(t)>=90)throw new Error("invalid latitude value");if(r&&!o||!r&&o)throw new Error("invalid coordinates value");if(r&&r==o)throw new Error("invalid coordinates format");t.toString().includes(",")&&(t=t.replace(",",".")),s.toString().includes(",")&&(s=s.replace(",","."));let p=/S|SOUTH/i;p.test(r)&&t>0&&(t=-1*t),p=/W|WEST/i,p.test(o)&&s>0&&(s=-1*s);const b=a[0].trim();let d,v;const g=/[,/;\u0020]/g,y=b.match(g);if(y==null){const x=Math.floor(i.length/2);d=b.substring(0,x).trim(),v=b.substring(x).trim()}else{let x;y.length%2==1?x=Math.floor(y.length/2):x=y.length/2-1;let G=0;if(x==0)G=b.indexOf(y[0]),d=b.substring(0,G).trim(),v=b.substring(G+1).trim();else{let ze=0,Ot=0;for(;ze<=x;)G=b.indexOf(y[ze],Ot),Ot=G+1,ze++;d=b.substring(0,G).trim(),v=b.substring(G+1).trim()}}const L=d.split(".");if(L.length==2&&L[1]==0&&L[1].length!=2)throw new Error("invalid coordinates format");const E=v.split(".");if(E.length==2&&E[1]==0&&E[1].length!=2)throw new Error("invalid coordinates format");if(/^\d+$/.test(d)||/^\d+$/.test(v))throw new Error("degree only coordinate/s provided");return t=Number(Number(t).toFixed(e)),s=Number(Number(s).toFixed(e)),Object.freeze({verbatimCoordinates:b,verbatimLatitude:d,verbatimLongitude:v,decimalLatitude:t,decimalLongitude:s,decimalCoordinates:`${t},${s}`,originalFormat:n,closeEnough:bi,toCoordinateFormat:vi})}else throw new Error("coordinates pattern match failed")}function se(i){if(!isNaN(i[0]))return!1;const e=[...i];if(e.shift(),e.length%2>0)return!1;const t=/^[-+]?\d+([\.,]\d+)?$/,s=/[eastsouthnorthwest]+/i,r=e.length/2;for(let o=0;o<r;o++){const n=e[o],a=e[o+r],l=t.test(n)&&t.test(a),p=s.test(n)&&s.test(a),b=n==a;if(!(n==null&&a==null)){if(n==null||a==null)return!1;if(l||p||b)continue;return!1}}return!0}function mt(i,e){const t=Math.abs(i-e);return Number(t.toFixed(6))<=1e-5}function bi(i){if(!i)throw new Error("coords must be provided");if(i.includes(",")){const e=i.split(",");if(Number(e[0])==NaN||Number(e[1])==NaN)throw new Error("coords are not valid decimals");return mt(this.decimalLatitude,Number(e[0]))&&mt(this.decimalLongitude,e[1])}else throw new Error("coords being tested must be separated by a comma")}const yi=Object.freeze({DMS:"DMS",DM:"DM",DD:"DD"});Ie.to=yi;const $i=[{verbatimCoordinates:"40.123, -74.123",verbatimLatitude:"40.123",verbatimLongitude:"-74.123"},{verbatimCoordinates:"40.123° N 74.123° W",verbatimLatitude:"40.123° N",verbatimLongitude:"74.123° W"},{verbatimCoordinates:"40.123° N 74.123° W",verbatimLatitude:"40.123° N",verbatimLongitude:"74.123° W"},{verbatimCoordinates:'40° 7´ 22.8" N 74° 7´ 22.8" W',verbatimLatitude:'40° 7´ 22.8" N',verbatimLongitude:'74° 7´ 22.8" W'},{verbatimCoordinates:"40° 7.38’ , -74° 7.38’",verbatimLatitude:"40° 7.38’",verbatimLongitude:"-74° 7.38’"},{verbatimCoordinates:"N40°7’22.8’’, W74°7’22.8’’",verbatimLatitude:"N40°7’22.8’’",verbatimLongitude:"W74°7’22.8’’"},{verbatimCoordinates:'40°7’22.8"N, 74°7’22.8"W',verbatimLatitude:'40°7’22.8"N',verbatimLongitude:'74°7’22.8"W'},{verbatimCoordinates:`40°7'22.8"N, 74°7'22.8"W`,verbatimLatitude:`40°7'22.8"N`,verbatimLongitude:`74°7'22.8"W`},{verbatimCoordinates:"40 7 22.8, -74 7 22.8",verbatimLatitude:"40 7 22.8",verbatimLongitude:"-74 7 22.8"},{verbatimCoordinates:"40.123 -74.123",verbatimLatitude:"40.123",verbatimLongitude:"-74.123"},{verbatimCoordinates:"40.123°,-74.123°",verbatimLatitude:"40.123°",verbatimLongitude:"-74.123°"},{verbatimCoordinates:"40.123N74.123W",verbatimLatitude:"40.123N",verbatimLongitude:"74.123W"},{verbatimCoordinates:"4007.38N7407.38W",verbatimLatitude:"4007.38N",verbatimLongitude:"7407.38W"},{verbatimCoordinates:'40°7’22.8"N, 74°7’22.8"W',verbatimLatitude:'40°7’22.8"N',verbatimLongitude:'74°7’22.8"W'},{verbatimCoordinates:"400722.8N740722.8W",verbatimLatitude:"400722.8N",verbatimLongitude:"740722.8W"},{verbatimCoordinates:"N 40 7.38 W 74 7.38",verbatimLatitude:"N 40 7.38",verbatimLongitude:"W 74 7.38"},{verbatimCoordinates:"40:7:22.8N 74:7:22.8W",verbatimLatitude:"40:7:22.8N",verbatimLongitude:"74:7:22.8W"},{verbatimCoordinates:"40:7:23N,74:7:23W",verbatimLatitude:"40:7:23N",verbatimLongitude:"74:7:23W",decimalLatitude:40.1230555555,decimalLongitude:-74.1230555555},{verbatimCoordinates:'40°7’23"N 74°7’23"W',verbatimLatitude:'40°7’23"N',verbatimLongitude:'74°7’23"W',decimalLatitude:40.1230555555,decimalLongitude:-74.12305555555555},{verbatimCoordinates:'40°7’23"S 74°7’23"E',verbatimLatitude:'40°7’23"S',verbatimLongitude:'74°7’23"E',decimalLatitude:-40.1230555555,decimalLongitude:74.12305555555555},{verbatimCoordinates:'40°7’23" -74°7’23"',verbatimLatitude:'40°7’23"',verbatimLongitude:'-74°7’23"',decimalLatitude:40.1230555555,decimalLongitude:-74.123055555},{verbatimCoordinates:'40d 7’ 23" N 74d 7’ 23" W',verbatimLatitude:'40d 7’ 23" N',verbatimLongitude:'74d 7’ 23" W',decimalLatitude:40.1230555555,decimalLongitude:-74.123055555},{verbatimCoordinates:"40.123N 74.123W",verbatimLatitude:"40.123N",verbatimLongitude:"74.123W"},{verbatimCoordinates:"40° 7.38, -74° 7.38",verbatimLatitude:"40° 7.38",verbatimLongitude:"-74° 7.38"},{verbatimCoordinates:"40° 7.38, -74° 7.38",verbatimLatitude:"40° 7.38",verbatimLongitude:"-74° 7.38"},{verbatimCoordinates:"40 7 22.8; -74 7 22.8",verbatimLatitude:"40 7 22.8",verbatimLongitude:"-74 7 22.8"}],Ei={decimalLatitude:40.123,decimalLongitude:-74.123},_i=[{verbatimCoordinates:`50°4'17.698"south, 14°24'2.826"east`,verbatimLatitude:`50°4'17.698"south`,verbatimLongitude:`14°24'2.826"east`,decimalLatitude:-50.07158277777778,decimalLongitude:14.400785},{verbatimCoordinates:"50d4m17.698S 14d24m2.826E",verbatimLatitude:"50d4m17.698S",verbatimLongitude:"14d24m2.826E",decimalLatitude:-50.07158277777778,decimalLongitude:14.400785},{verbatimCoordinates:"40:26:46N,79:56:55W",verbatimLatitude:"40:26:46N",verbatimLongitude:"79:56:55W",decimalLatitude:40.44611111111111,decimalLongitude:-79.9486111111111},{verbatimCoordinates:"40:26:46.302N 79:56:55.903W",verbatimLatitude:"40:26:46.302N",verbatimLongitude:"79:56:55.903W",decimalLatitude:40.446195,decimalLongitude:-79.94886194444445},{verbatimCoordinates:"40°26′47″N 79°58′36″W",verbatimLatitude:"40°26′47″N",verbatimLongitude:"79°58′36″W",decimalLatitude:40.44638888888889,decimalLongitude:-79.97666666666667},{verbatimCoordinates:"40d 26′ 47″ N 79d 58′ 36″ W",verbatimLatitude:"40d 26′ 47″ N",verbatimLongitude:"79d 58′ 36″ W",decimalLatitude:40.44638888888889,decimalLongitude:-79.97666666666667},{verbatimCoordinates:"40.446195N 79.948862W",verbatimLatitude:"40.446195N",verbatimLongitude:"79.948862W",decimalLatitude:40.446195,decimalLongitude:-79.948862},{verbatimCoordinates:"40,446195° 79,948862°",verbatimLatitude:"40,446195°",verbatimLongitude:"79,948862°",decimalLatitude:40.446195,decimalLongitude:79.948862},{verbatimCoordinates:"40° 26.7717, -79° 56.93172",verbatimLatitude:"40° 26.7717",verbatimLongitude:"-79° 56.93172",decimalLatitude:40.446195,decimalLongitude:-79.948862},{verbatimCoordinates:"40.446195, -79.948862",verbatimLatitude:"40.446195",verbatimLongitude:"-79.948862",decimalLatitude:40.446195,decimalLongitude:-79.948862},{verbatimCoordinates:"40.123256; -74.123256",verbatimLatitude:"40.123256",verbatimLongitude:"-74.123256",decimalLatitude:40.123256,decimalLongitude:-74.123256},{verbatimCoordinates:"18°24S 22°45E",verbatimLatitude:"18°24S",verbatimLongitude:"22°45E",decimalLatitude:-18.4,decimalLongitude:22.75}],Li=[{verbatimCoordinates:"10.432342S 10.6345345E",verbatimLatitude:"10.432342S",verbatimLongitude:"10.6345345E",decimalLatitude:-10.432342,decimalLongitude:10.6345345},{verbatimCoordinates:"10.00S 10.00E",verbatimLatitude:"10.00S",verbatimLongitude:"10.00E",decimalLatitude:-10,decimalLongitude:10},{verbatimCoordinates:"00.00S 01.00E",verbatimLatitude:"00.00S",verbatimLongitude:"01.00E",decimalLatitude:0,decimalLongitude:1},{verbatimCoordinates:"18.24S 22.45E",verbatimLatitude:"18.24S",verbatimLongitude:"22.45E",decimalLatitude:-18.4,decimalLongitude:22.75},{verbatimCoordinates:"27deg 15min 45.2sec S 18deg 32min 53.7sec E",verbatimLatitude:"27deg 15min 45.2sec S",verbatimLongitude:"18deg 32min 53.7sec E",decimalLatitude:-27.262555555555554,decimalLongitude:18.54825},{verbatimCoordinates:"-23.3245° S / 28.2344° E",verbatimLatitude:"-23.3245° S",verbatimLongitude:"28.2344° E",decimalLatitude:-23.3245,decimalLongitude:28.2344},{verbatimCoordinates:"40° 26.7717 -79° 56.93172",verbatimLatitude:"40° 26.7717",verbatimLongitude:"-79° 56.93172",decimalLatitude:40.446195,decimalLongitude:-79.948862},{verbatimCoordinates:"27.15.45S 18.32.53E",verbatimLatitude:"27.15.45S",verbatimLongitude:"18.32.53E",decimalLatitude:-27.2625,decimalLongitude:18.548055},{verbatimCoordinates:"-27.15.45 18.32.53",verbatimLatitude:"-27.15.45",verbatimLongitude:"18.32.53",decimalLatitude:-27.2625,decimalLongitude:18.548055},{verbatimCoordinates:"27.15.45.2S 18.32.53.4E",verbatimLatitude:"27.15.45.2S",verbatimLongitude:"18.32.53.4E",decimalLatitude:-27.262556,decimalLongitude:18.548167},{verbatimCoordinates:"27.15.45,2S 18.32.53,4E",verbatimLatitude:"27.15.45,2S",verbatimLongitude:"18.32.53,4E",decimalLatitude:-27.262556,decimalLongitude:18.548167},{verbatimCoordinates:"S23.43563 ° E22.45634 °",verbatimLatitude:"S23.43563 °",verbatimLongitude:"E22.45634 °",decimalLatitude:-23.43563,decimalLongitude:22.45634},{verbatimCoordinates:"27,71372° S 23,07771° E",verbatimLatitude:"27,71372° S",verbatimLongitude:"23,07771° E",decimalLatitude:-27.71372,decimalLongitude:23.07771},{verbatimCoordinates:"27.45.34 S 23.23.23 E",verbatimLatitude:"27.45.34 S",verbatimLongitude:"23.23.23 E",decimalLatitude:-27.759444,decimalLongitude:23.38972222},{verbatimCoordinates:"S 27.45.34 E 23.23.23",verbatimLatitude:"S 27.45.34",verbatimLongitude:"E 23.23.23",decimalLatitude:-27.759444,decimalLongitude:23.38972222},{verbatimCoordinates:"53 16.3863,4 52.8171",verbatimLatitude:"53 16.3863",verbatimLongitude:"4 52.8171",decimalLatitude:53.273105,decimalLongitude:4.88029},{verbatimCoordinates:"50 8.2914,-5 2.4447",verbatimLatitude:"50 8.2914",verbatimLongitude:"-5 2.4447",decimalLatitude:50.13819,decimalLongitude:-5.040745},{verbatimCoordinates:"N 48° 30,6410', E 18° 57,4583'",verbatimLatitude:"N 48° 30,6410'",verbatimLongitude:"E 18° 57,4583'",decimalLatitude:48.51068,decimalLongitude:18.95764},{verbatimCoordinates:"1.23456, 18.33453",verbatimLatitude:"1.23456",verbatimLongitude:"18.33453",decimalLatitude:1.23456,decimalLongitude:18.33453}];function wi(){const i=[];return $i.forEach(e=>{e.decimalLatitude?i.push(e):i.push({...e,...Ei})}),[...i,..._i,...Li]}const Si=wi();Ie.formats=Si.map(i=>i.verbatimCoordinates);const Mi=Ie;/**
131
+ * @license
132
+ * Copyright 2017 Google LLC
133
+ * SPDX-License-Identifier: BSD-3-Clause
134
+ */const Te={ATTRIBUTE:1,CHILD:2},Ne=i=>(...e)=>({_$litDirective$:i,values:e});let ke=class{constructor(e){}get _$AU(){return this._$AM._$AU}_$AT(e,t,s){this._$Ct=e,this._$AM=t,this._$Ci=s}_$AS(e,t){return this.update(e,t)}update(e,t){return this.render(...t)}};/**
135
+ * @license
136
+ * Copyright 2018 Google LLC
137
+ * SPDX-License-Identifier: BSD-3-Clause
138
+ */const me=Ne(class extends ke{constructor(i){if(super(i),i.type!==Te.ATTRIBUTE||i.name!=="class"||i.strings?.length>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(i){return" "+Object.keys(i).filter((e=>i[e])).join(" ")+" "}update(i,[e]){if(this.st===void 0){this.st=new Set,i.strings!==void 0&&(this.nt=new Set(i.strings.join(" ").split(/\s/).filter((s=>s!==""))));for(const s in e)e[s]&&!this.nt?.has(s)&&this.st.add(s);return this.render(e)}const t=i.element.classList;for(const s of this.st)s in e||(t.remove(s),this.st.delete(s));for(const s in e){const r=!!e[s];r===this.st.has(s)||this.nt?.has(s)||(r?(t.add(s),this.st.add(s)):(t.remove(s),this.st.delete(s)))}return O}});/**
139
+ * @license
140
+ * Copyright 2020 Google LLC
141
+ * SPDX-License-Identifier: BSD-3-Clause
142
+ */const{I:Ai}=Xt,ft=()=>document.createComment(""),re=(i,e,t)=>{const s=i._$AA.parentNode,r=e===void 0?i._$AB:e._$AA;if(t===void 0){const o=s.insertBefore(ft(),r),n=s.insertBefore(ft(),r);t=new Ai(o,n,i,i.options)}else{const o=t._$AB.nextSibling,n=t._$AM,a=n!==i;if(a){let l;t._$AQ?.(i),t._$AM=i,t._$AP!==void 0&&(l=i._$AU)!==n._$AU&&t._$AP(l)}if(o!==r||a){let l=t._$AA;for(;l!==o;){const p=l.nextSibling;s.insertBefore(l,r),l=p}}}return t},j=(i,e,t=i)=>(i._$AI(e,t),i),xi={},Ci=(i,e=xi)=>i._$AH=e,Ii=i=>i._$AH,Oe=i=>{i._$AR(),i._$AA.remove()};/**
143
+ * @license
144
+ * Copyright 2017 Google LLC
145
+ * SPDX-License-Identifier: BSD-3-Clause
146
+ */const gt=(i,e,t)=>{const s=new Map;for(let r=e;r<=t;r++)s.set(i[r],r);return s},Ti=Ne(class extends ke{constructor(i){if(super(i),i.type!==Te.CHILD)throw Error("repeat() can only be used in text expressions")}dt(i,e,t){let s;t===void 0?t=e:e!==void 0&&(s=e);const r=[],o=[];let n=0;for(const a of i)r[n]=s?s(a,n):n,o[n]=t(a,n),n++;return{values:o,keys:r}}render(i,e,t){return this.dt(i,e,t).values}update(i,[e,t,s]){const r=Ii(i),{values:o,keys:n}=this.dt(e,t,s);if(!Array.isArray(r))return this.ut=n,o;const a=this.ut??=[],l=[];let p,b,d=0,v=r.length-1,g=0,y=o.length-1;for(;d<=v&&g<=y;)if(r[d]===null)d++;else if(r[v]===null)v--;else if(a[d]===n[g])l[g]=j(r[d],o[g]),d++,g++;else if(a[v]===n[y])l[y]=j(r[v],o[y]),v--,y--;else if(a[d]===n[y])l[y]=j(r[d],o[y]),re(i,l[y+1],r[d]),d++,y--;else if(a[v]===n[g])l[g]=j(r[v],o[g]),re(i,r[d],r[v]),v--,g++;else if(p===void 0&&(p=gt(n,g,y),b=gt(a,d,v)),p.has(a[d]))if(p.has(a[v])){const L=b.get(n[g]),E=L!==void 0?r[L]:null;if(E===null){const x=re(i,r[d]);j(x,o[g]),l[g]=x}else l[g]=j(E,o[g]),re(i,r[d],E),r[L]=null;g++}else Oe(r[v]),v--;else Oe(r[d]),d++;for(;g<=y;){const L=re(i,l[y+1]);j(L,o[g]),l[g++]=L}for(;d<=v;){const L=r[d++];L!==null&&Oe(L)}return this.ut=n,Ci(i,l),O}});function Ni(i,e,t){const s=e[1],r=e[0],o=s-r;return i===s&&t?i:((i-r)%o+o)%o+r}let oe;async function ki(i,e,t){for(const s of e??[])if(!(i&&(s.minZoom!=null&&s.minZoom>i[0]||s.maxZoom!=null&&s.maxZoom<i[0]))){if(s.type==="fixed")return s.coordinates.join(",");if(s.type==="client-geolocation")if(oe&&s.cachedLocationExpiry&&oe.time+s.cachedLocationExpiry>Date.now()){if(oe.coords)return oe.coords}else{let r;try{return r=await new Promise((o,n)=>{t.signal.addEventListener("abort",()=>{n(Error("aborted"))}),navigator.geolocation.getCurrentPosition(a=>{o([a.coords.longitude,a.coords.latitude].map(l=>l.toFixed(6)).join(","))},a=>{n(a)},s)}),r}catch{}finally{s.cachedLocationExpiry&&(oe={time:Date.now(),coords:r})}if(t.signal.aborted)return}if(s.type==="server-geolocation")return"ip";if(i&&s.type==="map-center")return i[1].toFixed(6)+","+i[2].toFixed(6)}}/**
147
+ * @license
148
+ * Copyright 2018 Google LLC
149
+ * SPDX-License-Identifier: BSD-3-Clause
150
+ */const vt="important",Oi=" !"+vt,Gi=Ne(class extends ke{constructor(i){if(super(i),i.type!==Te.ATTRIBUTE||i.name!=="style"||i.strings?.length>2)throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.")}render(i){return Object.keys(i).reduce(((e,t)=>{const s=i[t];return s==null?e:e+`${t=t.includes("-")?t:t.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${s};`}),"")}update(i,[e]){const{style:t}=i.element;if(this.ft===void 0)return this.ft=new Set(Object.keys(e)),this.render(e);for(const s of this.ft)e[s]==null&&(this.ft.delete(s),s.includes("-")?t.removeProperty(s):t[s]=null);for(const s in e){const r=e[s];if(r!=null){this.ft.add(s);const o=typeof r=="string"&&r.endsWith(Oi);s.includes("-")||o?t.setProperty(s,o?r.slice(0,-11):r,o?vt:""):t[s]=r}}return O}}),Ui=".sprite-icon{align-self:center;justify-self:center;opacity:.75;background-repeat:no-repeat}li{text-align:left;cursor:default;display:grid;grid-template-columns:40px 1fr;color:var(--color-text);padding:8px 0;font-size:14px;line-height:18px;min-width:fit-content;outline:0}li:first-child{padding-top:10px}li:last-child{padding-bottom:10px}li.picked{background-color:#e7edff}li.picked .secondary{color:#96a4c7;padding-left:4px}li.picked .line2{color:#96a4c7}li.selected{background-color:#f3f6ff;animation:backAndForth 5s linear infinite}li.selected .primary{color:#2b8bfb}li.selected .secondary{color:#a2adc7;padding-left:4px}li.selected .line2{color:#a2adc7}li>img{align-self:center;justify-self:center;opacity:.75}.texts{padding:0 17px 0 0}.texts>*{white-space:nowrap;display:block;min-width:fit-content}.primary{font-weight:600}.secondary{color:#aeb6c7;padding-left:4px}.line2{color:#aeb6c7}@keyframes backAndForth{0%{transform:translate(0)}10%{transform:translate(0)}45%{transform:translate(calc(-100% + 270px))}55%{transform:translate(calc(-100% + 270px))}90%{transform:translate(0)}to{transform:translate(0)}}";var Pi=Object.defineProperty,Wi=Object.getOwnPropertyDescriptor,bt=i=>{throw TypeError(i)},k=(i,e,t,s)=>{for(var r=s>1?void 0:s?Wi(e,t):e,o=i.length-1,n;o>=0;o--)(n=i[o])&&(r=(s?n(e,t,r):n(r))||r);return s&&r&&Pi(e,t,r),r},yt=(i,e,t)=>e.has(i)||bt("Cannot "+t),_=(i,e,t)=>(yt(i,e,"read from private field"),t?t.call(i):e.get(i)),Di=(i,e,t)=>e.has(i)?bt("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(i):e.set(i,t),K=(i,e,t)=>(yt(i,e,"access private method"),t),$,fe,ae,M,$t,Et,Ge,Ue;const _t=typeof devicePixelRatio>"u"||devicePixelRatio>1.25,Lt=_t?"@2x":"",Q=_t?2:1;let z,wt,T=class extends N{constructor(){super(...arguments),Di(this,$),this.itemStyle="default",this.showPlaceType="if-needed",this.missingIconsCache=new Set,this.iconsBaseUrl="",this.index=0}willUpdate(i){i.has("feature")&&_(this,$,fe)&&(this.index=_(this,$,fe).length,K(this,$,Ge).call(this))}render(){return S`
151
+ <li
152
+ tabindex="-1"
153
+ role="option"
154
+ aria-selected=${this.itemStyle==="selected"}
155
+ aria-checked=${this.itemStyle==="picked"}
156
+ class=${this.itemStyle}
157
+ @click=${()=>this.dispatchEvent(new CustomEvent("select"))}
158
+ >
159
+ ${z&&this.spriteIcon?S`
160
+ <div
161
+ class="sprite-icon"
162
+ style=${Gi({width:`${this.spriteIcon.width/Q}px`,height:`${this.spriteIcon.height/Q}px`,backgroundImage:`url(${this.iconsBaseUrl}sprite${Lt}.png)`,backgroundPosition:`-${this.spriteIcon.x/Q}px -${this.spriteIcon.y/Q}px`,backgroundSize:`${z.width/Q}px ${z.height/Q}px`})}
163
+ title=${_(this,$,M)}
164
+ />
165
+ `:this.imageUrl?S` <img src=${this.imageUrl} alt=${this.category} title=${_(this,$,M)} @error=${K(this,$,Et)} />`:this.feature?.address?S` <img src=${this.iconsBaseUrl+"housenumber.svg"} alt=${_(this,$,M)} title=${_(this,$,M)} /> `:this.feature?.id.startsWith("road.")?S` <img src=${this.iconsBaseUrl+"road.svg"} alt=${_(this,$,M)} title=${_(this,$,M)} /> `:this.feature?.id.startsWith("address.")?S` <img src=${this.iconsBaseUrl+"street.svg"} alt=${_(this,$,M)} title=${_(this,$,M)} /> `:this.feature?.id.startsWith("postal_code.")?S` <img src=${this.iconsBaseUrl+"postal_code.svg"} alt=${_(this,$,M)} title=${_(this,$,M)} /> `:this.feature?.id.startsWith("poi.")?S` <img src=${this.iconsBaseUrl+"poi.svg"} alt=${_(this,$,M)} title=${_(this,$,M)} /> `:_(this,$,ae)?S` <img src=${this.iconsBaseUrl+"reverse.svg"} alt=${_(this,$,M)} title=${_(this,$,M)} /> `:S` <img src=${this.iconsBaseUrl+"area.svg"} alt=${_(this,$,M)} title=${_(this,$,M)} /> `}
166
+
167
+ <span class="texts">
168
+ <span>
169
+ <span class="primary"> ${_(this,$,ae)?this.feature?.place_name:this.feature?.place_name.replace(/,.*/,"")} </span>
170
+
171
+ ${this.showPlaceType==="always"||this.showPlaceType!=="never"&&!this.feature?.address&&!this.feature?.id.startsWith("road.")&&!this.feature?.id.startsWith("address.")&&!this.feature?.id.startsWith("postal_code.")&&(!this.feature?.id.startsWith("poi.")||!this.imageUrl)&&!_(this,$,ae)?S` <span class="secondary"> ${_(this,$,M)} </span> `:w}
172
+ </span>
173
+
174
+ <span class="line2"> ${_(this,$,ae)?this.feature?.text:this.feature?.place_name.replace(/[^,]*,?s*/,"")} </span>
175
+ </span>
176
+ </li>
177
+ `}};$=new WeakSet,fe=function(){return this.feature?.properties?.categories},ae=function(){return this.feature?.place_type[0]==="reverse"},M=function(){return this.feature?.properties?.categories?.join(", ")??this.feature?.place_type_name?.[0]??this.feature?.place_type[0]},$t=function(){wt??=fetch(`${this.iconsBaseUrl}sprite${Lt}.json`).then(i=>i.json()).then(i=>{z=i}).catch(()=>{z=null})},Et=function(){this.imageUrl&&this.missingIconsCache.add(this.imageUrl),K(this,$,Ge).call(this)},Ge=function(){z!==void 0?K(this,$,Ue).call(this):(K(this,$,$t).call(this),wt?.then(()=>{K(this,$,Ue).call(this)}))},Ue=function(){do{if(this.index--,this.category=_(this,$,fe)?.[this.index],this.spriteIcon=this.category?z?.icons[this.category]:void 0,this.spriteIcon)break;this.imageUrl=this.category?this.iconsBaseUrl+this.category.replace(/ /g,"_")+".svg":void 0}while(this.index>-1&&(!this.imageUrl||this.missingIconsCache.has(this.imageUrl)))},T.styles=D`
178
+ ${we(Ui)}
179
+ `,k([f({type:Object})],T.prototype,"feature",2),k([f({type:String})],T.prototype,"itemStyle",2),k([f({type:String})],T.prototype,"showPlaceType",2),k([f({attribute:!1})],T.prototype,"missingIconsCache",2),k([f({type:String})],T.prototype,"iconsBaseUrl",2),k([C()],T.prototype,"category",2),k([C()],T.prototype,"imageUrl",2),k([C()],T.prototype,"spriteIcon",2),k([C()],T.prototype,"index",2),T=k([B("maptiler-geocoder-feature-item")],T);const Fi="form{font-family:Open Sans,Ubuntu,Helvetica Neue,Arial,Helvetica,sans-serif;position:relative;background-color:#fff;z-index:10;border-radius:4px;margin:0;transition:max-width .25s;box-shadow:0 2px 5px #33335926;--color-text: #444952;--color-icon-button: #444952;pointer-events:all}form,form *,form *:after,form *:before{box-sizing:border-box}form.can-collapse{max-width:29px}form.can-collapse input::placeholder{transition:opacity .25s;opacity:0}form{width:270px;max-width:270px}form:focus-within,form:hover{width:270px;max-width:270px}form input::placeholder,form:focus-within input::placeholder,form:hover input::placeholder{opacity:1}input{font:inherit;font-size:14px;flex-grow:1;min-height:29px;background-color:transparent;color:#444952;white-space:nowrap;overflow:hidden;border:0;margin:0;padding:0}input:focus{color:#444952;outline:0;outline:none;box-shadow:none}ul,div.error,div.no-results{background-color:#fff;border-radius:4px;left:0;list-style:none;margin:0;padding:0;position:absolute;width:100%;top:calc(100% + 6px);overflow:hidden}ul{font-size:14px;line-height:16px;box-shadow:0 5px 10px #33335926}div.error,div.no-results{font:inherit;line-height:18px;font-size:12px;display:flex;gap:16px}div.error{padding:16px;font-weight:600;color:#e25041;background-color:#fbeae8}div.error div{flex-grow:1}div.error maptiler-geocode-fail-icon{flex-shrink:0;width:20px;height:20px}div.error button{flex-shrink:0}div.error button maptiler-geocode-clear-icon{--color-icon-button: #e25041}div.error button:hover maptiler-geocode-clear-icon,div.error button:active maptiler-geocode-clear-icon{--color-icon-button: inherit}div.no-results{padding:14px 24px 14px 16px;font-weight:400;color:#6b7c93;box-shadow:0 5px 10px #33335926}div.no-results maptiler-geocode-fail-icon{margin-top:4px;flex-shrink:0;width:20px;height:20px}ul.options.open-on-top{top:auto;bottom:calc(100% + 6px)}button{padding:0;margin:0;border:0;background-color:transparent;height:auto;width:auto}button:hover{background-color:transparent}button:hover,button:active{--color-icon-button: #2b8bfb}.input-group{display:flex;align-items:stretch;gap:7px;padding-inline:8px;border-radius:4px;overflow:hidden}.input-group:focus-within{outline:#2b8bfb solid 2px}.search-button{flex-shrink:0}.clear-button-container{display:flex;display:none;position:relative;align-items:stretch}.clear-button-container.displayable{display:flex;flex-shrink:0}:host(.maptiler-geocoder):not(:empty){box-shadow:none}:host(.maptiler-geocoder) .input-group{border:white solid 2px}:host(.maptiler-geocoder) .input-group:focus-within{border:#2b8bfb solid 2px;outline:0;outline:none}:host(.maptiler-geocoder) form.can-collapse{max-width:33px}:host(.maptiler-geocoder) form,:host(.maptiler-geocoder) form:focus-within,:host(.maptiler-geocoder) form:hover{width:270px;max-width:270px}:host(.leaflet-geocoder) .input-group{border:white solid 1px}:host(.leaflet-geocoder) form.can-collapse{max-width:30px}";var Ri=Object.defineProperty,Hi=Object.getOwnPropertyDescriptor,St=i=>{throw TypeError(i)},u=(i,e,t,s)=>{for(var r=s>1?void 0:s?Hi(e,t):e,o=i.length-1,n;o>=0;o--)(n=i[o])&&(r=(s?n(e,t,r):n(r))||r);return s&&r&&Ri(e,t,r),r},Pe=(i,e,t)=>e.has(i)||St("Cannot "+t),I=(i,e,t)=>(Pe(i,e,"read from private field"),t?t.call(i):e.get(i)),J=(i,e,t)=>e.has(i)?St("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(i):e.set(i,t),ge=(i,e,t,s)=>(Pe(i,e,"write to private field"),e.set(i,t),t),m=(i,e,t)=>(Pe(i,e,"access private method"),t),ve,be,ne,We,le,h,ye,Mt,At,De,A,Fe,$e,Re,He,W,Be,Ee,xt,je,Ct,It,Tt,Nt,kt;c.MaptilerGeocoderElement=class extends N{constructor(){super(...arguments),J(this,h),this.clearListOnPick=!1,this.clearOnBlur=!1,this.collapsed=!1,this.excludeTypes=!1,this.exhaustiveReverseGeocoding=!1,this.fetchFullGeometryOnPick=!1,this.keepListOpen=!1,this.openListOnTop=!1,this.reverseActive=!1,this.searchValue="",this.selectedItemIndex=-1,this.cachedFeatures=[],this.lastSearchUrl="",this.focused=!1,this.focusedDelayed=!1,J(this,ve,!1),J(this,be,!1),J(this,ne),J(this,We,new Set),J(this,le)}firstUpdated(){ge(this,ve,!0)}setOptions(e){const t={...e};for(const s of Object.keys(t))Bi.includes(s)||delete t[s];Object.assign(this,t)}setQuery(e){m(this,h,He).call(this,e),m(this,h,Re).call(this)}submitQuery(e){m(this,h,Be).call(this,e)}clearList(){m(this,h,W).call(this),this.picked=void 0,this.selectedItemIndex=-1}focus(e){this.input.focus(e)}blur(){this.input.blur()}addEventListener(e,t,s){super.addEventListener(e,t,s)}removeEventListener(e,t,s){super.removeEventListener(e,t,s)}handleMapChange(e){ge(this,le,e)}handleMapClick(e){this.reverseActive&&m(this,h,xt).call(this,e)}willUpdate(e){e.has("error")&&this.error&&console.error("[MapTilerGeocodingControl] Error:",this.error),e.has("enableReverse")&&(this.reverseActive=this.enableReverse==="always"),["picked"].some(t=>e.has(t))&&this.picked&&(this.clearListOnPick&&m(this,h,W).call(this),this.selectedItemIndex=-1),["searchValue","minLength"].some(t=>e.has(t))&&I(this,h,De)&&(m(this,h,W).call(this),this.error=void 0),["focused"].some(t=>e.has(t))&&setTimeout(()=>{this.focusedDelayed=this.focused,this.clearOnBlur&&!this.focused&&(this.searchValue="")},100),["selectFirst","listFeatures","selectedItemIndex","picked"].some(t=>e.has(t))&&this.selectFirst!==!1&&this.listFeatures?.length&&this.selectedItemIndex==-1&&!this.picked&&(this.selectedItemIndex=0),["listFeatures","selectedItemIndex"].some(t=>e.has(t))&&m(this,h,A).call(this,"select",{feature:I(this,h,ye)}),["picked"].some(t=>e.has(t))&&this.picked&&(this.fetchFullGeometryOnPick&&!this.picked.address&&this.picked.geometry.type==="Point"&&this.picked.place_type[0]!=="reverse"?m(this,h,Ee).call(this,this.picked.id,{byId:!0}):Promise.resolve()).then(()=>{m(this,h,A).call(this,"pick",{feature:this.picked})},t=>{t&&typeof t=="object"&&"name"in t&&t.name==="AbortError"||(this.error=t,m(this,h,A).call(this,"pick",{feature:this.picked}))}),["listFeatures","focusedDelayed"].some(t=>e.has(t))&&(I(this,h,Mt)?(m(this,h,A).call(this,"featuresshow"),ge(this,be,!0)):I(this,be)&&m(this,h,A).call(this,"featureshide")),["reverseActive"].some(t=>e.has(t))&&m(this,h,A).call(this,"reversetoggle",{reverse:this.reverseActive})}render(){return S`
180
+ <form @submit=${m(this,h,Fe)} class=${me({"can-collapse":this.collapsed&&this.searchValue===""})}>
181
+ <div class="input-group">
182
+ <button
183
+ class="search-button"
184
+ type="button"
185
+ @click=${()=>{this.input.focus()}}
186
+ >
187
+ <maptiler-geocode-search-icon></maptiler-geocode-search-icon>
188
+ </button>
189
+
190
+ <input
191
+ .value=${this.searchValue}
192
+ @focus=${()=>this.focused=!0}
193
+ @blur=${()=>this.focused=!1}
194
+ @click=${()=>this.focused=!0}
195
+ @keydown=${m(this,h,je)}
196
+ @input=${m(this,h,Ct)}
197
+ @change=${()=>this.picked=void 0}
198
+ placeholder=${this.placeholder??"Search"}
199
+ aria-label=${this.placeholder??"Search"}
200
+ />
201
+
202
+ <div class="clear-button-container ${me({displayable:this.searchValue!==""})}">
203
+ ${I(this,h,At)?S`<maptiler-geocode-loading-icon></maptiler-geocode-loading-icon>`:S`
204
+ <button type="button" @click=${m(this,h,kt)} title=${this.clearButtonTitle??"clear"}>
205
+ <maptiler-geocode-clear-icon></maptiler-geocode-clear-icon>
206
+ </button>
207
+ `}
208
+ </div>
209
+
210
+ ${this.enableReverse==="button"?S`
211
+ <button
212
+ type="button"
213
+ class=${me({active:this.reverseActive})}
214
+ title=${this.reverseButtonTitle??"toggle reverse geocoding"}
215
+ @click=${()=>this.reverseActive=!this.reverseActive}
216
+ >
217
+ <maptiler-geocode-reverse-geocoding-icon></maptiler-geocode-reverse-geocoding-icon>
218
+ </button>
219
+ `:w}
220
+
221
+ <!-- <slot /> -->
222
+ </div>
223
+
224
+ ${this.error?S`
225
+ <div class="error">
226
+ <maptiler-geocode-fail-icon></maptiler-geocode-fail-icon>
227
+
228
+ <div>${this.errorMessage??"Something went wrong…"}</div>
229
+
230
+ <button @click=${()=>this.error=void 0}>
231
+ <maptiler-geocode-clear-icon></maptiler-geocode-clear-icon>
232
+ </button>
233
+ </div>
234
+ `:!this.focusedDelayed&&!this.keepListOpen||this.listFeatures===void 0?w:this.listFeatures.length===0?S`
235
+ <div class="no-results">
236
+ <maptiler-geocode-fail-icon></maptiler-geocode-fail-icon>
237
+
238
+ <div>
239
+ ${this.noResultsMessage??"Oops! Looks like you're trying to predict something that's not quite right. We can't seem to find what you're looking for. Maybe try double-checking your spelling or try a different search term. Keep on typing - we'll do our best to get you where you need to go!"}
240
+ </div>
241
+ </div>
242
+ `:S`
243
+ <ul class="options ${me({"open-on-top":this.openListOnTop})}" @mouseleave=${m(this,h,Nt)} @keydown=${m(this,h,je)} role="listbox">
244
+ ${Ti(this.listFeatures,e=>e.id+(e.address?","+e.address:""),(e,t)=>S`
245
+ <maptiler-geocoder-feature-item
246
+ .feature=${e}
247
+ .showPlaceType=${this.showPlaceType??"if-needed"}
248
+ itemStyle=${this.selectedItemIndex===t?"selected":this.picked?.id===e.id?"picked":"default"}
249
+ @mouseenter=${()=>{m(this,h,Tt).call(this,t)}}
250
+ @select=${()=>{m(this,h,It).call(this,e)}}
251
+ .missingIconsCache=${I(this,We)}
252
+ .iconsBaseUrl=${this.iconsBaseUrl??"https://cdn.maptiler.com/maptiler-geocoding-control/v3.0.0-rc.1/icons/"}
253
+ >
254
+ ${e.place_name}
255
+ </maptiler-geocoder-feature-item>
256
+ `)}
257
+ </ul>
258
+ `}
259
+ </form>
260
+ `}},ve=new WeakMap,be=new WeakMap,ne=new WeakMap,We=new WeakMap,le=new WeakMap,h=new WeakSet,ye=function(){return this.listFeatures?.[this.selectedItemIndex]},Mt=function(){return!!this.listFeatures?.length&&(this.focusedDelayed||this.keepListOpen)},At=function(){return this.abortController!==void 0},De=function(){return this.searchValue.length<(this.minLength??2)},A=function(i,...[e]){I(this,ve)&&this.dispatchEvent(new CustomEvent(i,{bubbles:!0,composed:!0,detail:e}))},Fe=function(i){i?.preventDefault(),this.focused=!1,clearTimeout(I(this,ne)),this.selectedItemIndex>-1&&this.listFeatures?(this.picked=this.listFeatures[this.selectedItemIndex],this.searchValue=this.picked.place_type[0]==="reverse"?this.picked.place_name:this.picked.place_name.replace(/,.*/,""),this.error=void 0,this.selectedItemIndex=-1):this.searchValue&&m(this,h,Ee).call(this,this.searchValue,{exact:!0}).then(()=>{this.picked=void 0}).catch(e=>this.error=e)},$e=function(i){try{return Mi(i,6)}catch{return!1}},Re=function(){setTimeout(()=>{this.input.focus(),this.focused=!0,this.input.select()})},He=function(i){if(this.searchValue=i,m(this,h,A).call(this,"querychange",{query:this.searchValue,reverseCoords:m(this,h,$e).call(this,i)}),this.error=void 0,this.picked=void 0,this.showResultsWhileTyping!==!1){if(clearTimeout(I(this,ne)),I(this,h,De))return;const e=this.searchValue;ge(this,ne,window.setTimeout(()=>{m(this,h,Ee).call(this,e).catch(t=>this.error=t)},this.debounceSearch??200))}else m(this,h,W).call(this)},W=function(){this.listFeatures!==void 0&&(this.listFeatures=void 0,m(this,h,A).call(this,"featuresclear"))},Be=function(i){this.searchValue=i,m(this,h,A).call(this,"querychange",{query:this.searchValue,reverseCoords:m(this,h,$e).call(this,i)}),this.selectedItemIndex=-1,m(this,h,Fe).call(this)},Ee=async function(i,{byId:e=!1,exact:t=!1}={}){this.error=void 0,this.abortController?.abort();const s=new AbortController;this.abortController=s;try{const r=this.apiUrl??"https://api.maptiler.com/geocoding",o=m(this,h,$e).call(this,i),n=new URL(r+"/"+encodeURIComponent(o?`${o.decimalLongitude},${o.decimalLatitude}`:i)+".json"),a=n.searchParams;this.language!==void 0&&a.set("language",Array.isArray(this.language)?this.language.join(","):this.language??"");const[l]=I(this,le)??[void 0];let p=(!o||this.reverseGeocodingTypes===void 0?this.types:this.reverseGeocodingTypes)?.map(E=>typeof E=="string"?E:l===void 0||(E[0]??0)<=l&&l<(E[1]??1/0)?E[2]:void 0).filter(E=>E!==void 0);p&&(p=[...new Set(p)],a.set("types",p.join(",")));const b=!o||this.reverseGeocodingExcludeTypes===void 0?this.excludeTypes:this.reverseGeocodingExcludeTypes;if(b&&a.set("excludeTypes",String(b)),this.bbox&&a.set("bbox",this.bbox.map(E=>E.toFixed(6)).join(",")),this.country&&a.set("country",Array.isArray(this.country)?this.country.join(","):this.country),!e&&!o){const E=this.proximity??[{type:"server-geolocation"}],x=await ki(I(this,le),E,s);x&&a.set("proximity",x),(t||this.showResultsWhileTyping===!1)&&a.set("autocomplete","false"),a.set("fuzzyMatch",String(this.fuzzyMatch!==!1))}const d=this.limit??5,v=this.reverseGeocodingLimit??d;v>1&&p?.length!==1&&console.warn("[MapTilerGeocodingControl] Warning: For reverse geocoding when limit > 1 then types must contain single value."),o?(v===1||this.exhaustiveReverseGeocoding||p?.length===1)&&a.set("limit",String(v)):a.set("limit",String(d)),this.apiKey&&a.set("key",this.apiKey),this.adjustUrl?.(n);const g=n.searchParams.get("types")===""&&n.searchParams.get("excludeTypes")!=="true",y=n.toString();if(y===this.lastSearchUrl){e?(this.clearListOnPick&&m(this,h,W).call(this),this.picked=this.cachedFeatures[0]):(this.listFeatures=this.cachedFeatures,m(this,h,A).call(this,"featureslisted",{features:this.listFeatures}),this.listFeatures[this.selectedItemIndex]?.id!==I(this,h,ye)?.id&&(this.selectedItemIndex=-1));return}m(this,h,A).call(this,"request",{urlObj:n}),this.lastSearchUrl=y;let L;if(g)L={type:"FeatureCollection",features:[]};else{const E=await fetch(y,{signal:s.signal,...this.fetchParameters});if(!E.ok)throw new Error(await E.text());L=await E.json()}m(this,h,A).call(this,"response",{url:y,featureCollection:L}),e?(this.clearListOnPick&&m(this,h,W).call(this),this.picked=L.features[0],this.cachedFeatures=[this.picked]):(this.listFeatures=L.features.filter(this.filter??(()=>!0)),o&&this.listFeatures.unshift({type:"Feature",properties:{},id:`reverse_${o.decimalLongitude}_${o.decimalLatitude}`,text:`${o.decimalLatitude}, ${o.decimalLongitude}`,place_name:o.toCoordinateFormat("DMS"),place_type:["reverse"],place_type_name:["reverse"],center:[o.decimalLongitude,o.decimalLatitude],bbox:[o.decimalLongitude,o.decimalLatitude,o.decimalLongitude,o.decimalLatitude],geometry:{type:"Point",coordinates:[o.decimalLongitude,o.decimalLatitude]}}),m(this,h,A).call(this,"featureslisted",{features:this.listFeatures}),this.cachedFeatures=this.listFeatures,this.listFeatures[this.selectedItemIndex]?.id!==I(this,h,ye)?.id&&(this.selectedItemIndex=-1),o&&this.input.focus())}catch(r){if(r&&typeof r=="object"&&"name"in r&&r.name==="AbortError")return;throw r}finally{s===this.abortController&&(this.abortController=void 0)}},xt=function(i){this.reverseActive=this.enableReverse==="always",m(this,h,W).call(this),this.picked=void 0,m(this,h,Be).call(this,`${i[1].toFixed(6)}, ${Ni(i[0],[-180,180],!0).toFixed(6)}`),m(this,h,Re).call(this)},je=function(i){if(!this.listFeatures)return;const e=i.key==="ArrowDown"?1:i.key==="ArrowUp"?-1:0;e&&(this.input.focus(),this.focused=!0,i.preventDefault(),this.picked&&this.selectedItemIndex===-1&&(this.selectedItemIndex=this.listFeatures.findIndex(t=>t.id===this.picked?.id)),this.selectedItemIndex===(this.picked||this.selectFirst!==!1?0:-1)&&e===-1&&(this.selectedItemIndex=this.listFeatures.length),this.selectedItemIndex+=e,this.selectedItemIndex>=this.listFeatures.length&&(this.selectedItemIndex=-1),this.selectedItemIndex<0&&(this.picked||this.selectFirst!==!1)&&(this.selectedItemIndex=0))},Ct=function(i){m(this,h,He).call(this,i.target.value)},It=function(i){(!this.picked||this.picked.id!==i.id)&&(this.picked=i,this.searchValue=i.place_name)},Tt=function(i){this.selectedItemIndex=i},Nt=function(){(!this.selectFirst||this.picked)&&(this.selectedItemIndex=-1)},kt=function(){this.searchValue="",m(this,h,A).call(this,"queryclear"),this.picked=void 0,this.input.focus()},c.MaptilerGeocoderElement.styles=D`
261
+ ${we(Fi)}
262
+ `,u([f({attribute:!1})],c.MaptilerGeocoderElement.prototype,"adjustUrl",2),u([f({type:String})],c.MaptilerGeocoderElement.prototype,"apiKey",2),u([f({type:String})],c.MaptilerGeocoderElement.prototype,"apiUrl",2),u([f({type:Array})],c.MaptilerGeocoderElement.prototype,"bbox",2),u([f({type:String})],c.MaptilerGeocoderElement.prototype,"clearButtonTitle",2),u([f({type:Boolean})],c.MaptilerGeocoderElement.prototype,"clearListOnPick",2),u([f({type:Boolean})],c.MaptilerGeocoderElement.prototype,"clearOnBlur",2),u([f({type:Boolean})],c.MaptilerGeocoderElement.prototype,"collapsed",2),u([f({attribute:!1})],c.MaptilerGeocoderElement.prototype,"country",2),u([f({type:Number})],c.MaptilerGeocoderElement.prototype,"debounceSearch",2),u([f({type:String})],c.MaptilerGeocoderElement.prototype,"enableReverse",2),u([f({type:String})],c.MaptilerGeocoderElement.prototype,"errorMessage",2),u([f({type:Boolean})],c.MaptilerGeocoderElement.prototype,"excludeTypes",2),u([f({type:Boolean})],c.MaptilerGeocoderElement.prototype,"exhaustiveReverseGeocoding",2),u([f({type:Boolean})],c.MaptilerGeocoderElement.prototype,"fetchFullGeometryOnPick",2),u([f({type:Object})],c.MaptilerGeocoderElement.prototype,"fetchParameters",2),u([f({attribute:!1})],c.MaptilerGeocoderElement.prototype,"filter",2),u([f({type:Object})],c.MaptilerGeocoderElement.prototype,"fuzzyMatch",2),u([f({type:String})],c.MaptilerGeocoderElement.prototype,"iconsBaseUrl",2),u([f({type:Boolean})],c.MaptilerGeocoderElement.prototype,"keepListOpen",2),u([f({attribute:!1})],c.MaptilerGeocoderElement.prototype,"language",2),u([f({type:Number})],c.MaptilerGeocoderElement.prototype,"limit",2),u([f({type:Number})],c.MaptilerGeocoderElement.prototype,"minLength",2),u([f({type:String})],c.MaptilerGeocoderElement.prototype,"noResultsMessage",2),u([f({type:Boolean})],c.MaptilerGeocoderElement.prototype,"openListOnTop",2),u([f({type:String})],c.MaptilerGeocoderElement.prototype,"placeholder",2),u([f({type:Array})],c.MaptilerGeocoderElement.prototype,"proximity",2),u([f({type:Boolean})],c.MaptilerGeocoderElement.prototype,"reverseActive",2),u([f({type:String})],c.MaptilerGeocoderElement.prototype,"reverseButtonTitle",2),u([f({type:Object})],c.MaptilerGeocoderElement.prototype,"reverseGeocodingExcludeTypes",2),u([f({type:Number})],c.MaptilerGeocoderElement.prototype,"reverseGeocodingLimit",2),u([f({type:Array})],c.MaptilerGeocoderElement.prototype,"reverseGeocodingTypes",2),u([f({type:Object})],c.MaptilerGeocoderElement.prototype,"selectFirst",2),u([f({type:String})],c.MaptilerGeocoderElement.prototype,"showPlaceType",2),u([f({type:Object})],c.MaptilerGeocoderElement.prototype,"showResultsWhileTyping",2),u([f({type:Array})],c.MaptilerGeocoderElement.prototype,"types",2),u([oi("input")],c.MaptilerGeocoderElement.prototype,"input",2),u([C()],c.MaptilerGeocoderElement.prototype,"searchValue",2),u([C()],c.MaptilerGeocoderElement.prototype,"listFeatures",2),u([C()],c.MaptilerGeocoderElement.prototype,"selectedItemIndex",2),u([C()],c.MaptilerGeocoderElement.prototype,"picked",2),u([C()],c.MaptilerGeocoderElement.prototype,"cachedFeatures",2),u([C()],c.MaptilerGeocoderElement.prototype,"lastSearchUrl",2),u([C()],c.MaptilerGeocoderElement.prototype,"error",2),u([C()],c.MaptilerGeocoderElement.prototype,"abortController",2),u([C()],c.MaptilerGeocoderElement.prototype,"focused",2),u([C()],c.MaptilerGeocoderElement.prototype,"focusedDelayed",2),c.MaptilerGeocoderElement=u([B("maptiler-geocoder")],c.MaptilerGeocoderElement);const Bi=["adjustUrl","apiKey","apiUrl","bbox","clearButtonTitle","clearListOnPick","clearOnBlur","collapsed","country","debounceSearch","enableReverse","errorMessage","excludeTypes","reverseGeocodingExcludeTypes","exhaustiveReverseGeocoding","fetchParameters","fetchFullGeometryOnPick","filter","fuzzyMatch","iconsBaseUrl","keepListOpen","language","limit","reverseGeocodingLimit","minLength","noResultsMessage","openListOnTop","placeholder","proximity","reverseActive","reverseButtonTitle","selectFirst","showPlaceType","showResultsWhileTyping","types","reverseGeocodingTypes"];Object.defineProperty(c,Symbol.toStringTag,{value:"Module"})}));
263
+ //# sourceMappingURL=index.umd.js.map