@maptiler/geocoding-control 2.1.7 → 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 +34 -26
  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} +11 -147
  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 +80 -113
  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 -5082
  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 -5142
  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 -5152
  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 -5045
  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 -2795
  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 -921
  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 -2799
  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
package/maplibregl.umd.js DELETED
@@ -1,14 +0,0 @@
1
- (function(j,ee){typeof exports=="object"&&typeof module<"u"?ee(exports,require("maplibre-gl")):typeof define=="function"&&define.amd?define(["exports","maplibre-gl"],ee):(j=typeof globalThis<"u"?globalThis:j||self,ee(j.maplibreglMaptilerGeocoder={},j.maplibregl))})(this,function(j,ee){"use strict";var Ws=Object.defineProperty;var bn=j=>{throw TypeError(j)};var Gs=(j,ee,me)=>ee in j?Ws(j,ee,{enumerable:!0,configurable:!0,writable:!0,value:me}):j[ee]=me;var A=(j,ee,me)=>Gs(j,typeof ee!="symbol"?ee+"":ee,me),wn=(j,ee,me)=>ee.has(j)||bn("Cannot "+me);var ue=(j,ee,me)=>(wn(j,ee,"read from private field"),me?me.call(j):ee.get(j)),Vt=(j,ee,me)=>ee.has(j)?bn("Cannot add the same private member more than once"):ee instanceof WeakSet?ee.add(j):ee.set(j,me),kt=(j,ee,me,dt)=>(wn(j,ee,"write to private field"),dt?dt.call(j,me):ee.set(j,me),me);var fn,cn;function me(i){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(i){for(const t in i)if(t!=="default"){const n=Object.getOwnPropertyDescriptor(i,t);Object.defineProperty(e,t,n.get?n:{enumerable:!0,get:()=>i[t]})}}return e.default=i,Object.freeze(e)}const dt=me(ee);function ne(){}function Ln(i,e){for(const t in e)i[t]=e[t];return i}function yi(i){return i()}function vi(){return Object.create(null)}function Ue(i){i.forEach(yi)}function bi(i){return typeof i=="function"}function Ke(i,e){return i!=i?e==e:i!==e||i&&typeof i=="object"||typeof i=="function"}let Rt;function ye(i,e){return i===e?!0:(Rt||(Rt=document.createElement("a")),Rt.href=e,i===Rt.href)}function _n(i){return Object.keys(i).length===0}function Sn(i,e,t,n){if(i){const r=wi(i,e,t,n);return i[0](r)}}function wi(i,e,t,n){return i[1]&&n?Ln(t.ctx.slice(),i[1](n(e))):t.ctx}function xn(i,e,t,n){return i[2],e.dirty}function Tn(i,e,t,n,r,u){if(r){const a=wi(e,t,n,u);i.p(a,r)}}function Mn(i){if(i.ctx.length>32){const e=[],t=i.ctx.length/32;for(let n=0;n<t;n++)e[n]=-1;return e}return-1}function Pt(i){return i??""}function V(i,e){i.appendChild(e)}function te(i,e,t){i.insertBefore(e,t||null)}function $(i){i.parentNode&&i.parentNode.removeChild(i)}function Y(i){return document.createElement(i)}function ke(i){return document.createElementNS("http://www.w3.org/2000/svg",i)}function Ye(i){return document.createTextNode(i)}function we(){return Ye(" ")}function Cn(){return Ye("")}function he(i,e,t,n){return i.addEventListener(e,t,n),()=>i.removeEventListener(e,t,n)}function Nn(i){return function(e){return e.preventDefault(),i.call(this,e)}}function S(i,e,t){t==null?i.removeAttribute(e):i.getAttribute(e)!==t&&i.setAttribute(e,t)}function kn(i){return Array.from(i.childNodes)}function gt(i,e){e=""+e,i.data!==e&&(i.data=e)}function Ei(i,e){i.value=e??""}function Ie(i,e,t){i.classList.toggle(e,!!t)}function On(i,e,{bubbles:t=!1,cancelable:n=!1}={}){return new CustomEvent(i,{detail:e,bubbles:t,cancelable:n})}let mt;function pt(i){mt=i}function Li(){if(!mt)throw new Error("Function called outside component initialization");return mt}function Rn(i){Li().$$.on_destroy.push(i)}function _i(){const i=Li();return(e,t,{cancelable:n=!1}={})=>{const r=i.$$.callbacks[e];if(r){const u=On(e,t,{cancelable:n});return r.slice().forEach(a=>{a.call(i,u)}),!u.defaultPrevented}return!0}}function Pn(i,e){const t=i.$$.callbacks[e.type];t&&t.slice().forEach(n=>n.call(this,e))}const ut=[],Yt=[];let at=[];const Si=[],In=Promise.resolve();let Qt=!1;function An(){Qt||(Qt=!0,In.then(xi))}function Xt(i){at.push(i)}const Jt=new Set;let ft=0;function xi(){if(ft!==0)return;const i=mt;do{try{for(;ft<ut.length;){const e=ut[ft];ft++,pt(e),Bn(e.$$)}}catch(e){throw ut.length=0,ft=0,e}for(pt(null),ut.length=0,ft=0;Yt.length;)Yt.pop()();for(let e=0;e<at.length;e+=1){const t=at[e];Jt.has(t)||(Jt.add(t),t())}at.length=0}while(ut.length);for(;Si.length;)Si.pop()();Qt=!1,Jt.clear(),pt(i)}function Bn(i){if(i.fragment!==null){i.update(),Ue(i.before_update);const e=i.dirty;i.dirty=[-1],i.fragment&&i.fragment.p(i.ctx,e),i.after_update.forEach(Xt)}}function Wn(i){const e=[],t=[];at.forEach(n=>i.indexOf(n)===-1?e.push(n):t.push(n)),t.forEach(n=>n()),at=e}const It=new Set;let nt;function yt(){nt={r:0,c:[],p:nt}}function vt(){nt.r||Ue(nt.c),nt=nt.p}function re(i,e){i&&i.i&&(It.delete(i),i.i(e))}function fe(i,e,t,n){if(i&&i.o){if(It.has(i))return;It.add(i),nt.c.push(()=>{It.delete(i),n&&(t&&i.d(1),n())}),i.o(e)}else n&&n()}function Ti(i){return(i==null?void 0:i.length)!==void 0?i:Array.from(i)}function Gn(i,e){fe(i,1,1,()=>{e.delete(i.key)})}function Dn(i,e,t,n,r,u,a,o,g,c,E,_){let M=i.length,R=u.length,k=M;const I={};for(;k--;)I[i[k].key]=k;const C=[],O=new Map,x=new Map,N=[];for(k=R;k--;){const W=_(r,u,k),s=t(W);let l=a.get(s);l?N.push(()=>l.p(W,e)):(l=c(s,W),l.c()),O.set(s,C[k]=l),s in I&&x.set(s,Math.abs(k-I[s]))}const P=new Set,B=new Set;function z(W){re(W,1),W.m(o,E),a.set(W.key,W),E=W.first,R--}for(;M&&R;){const W=C[R-1],s=i[M-1],l=W.key,f=s.key;W===s?(E=W.first,M--,R--):O.has(f)?!a.has(l)||P.has(l)?z(W):B.has(f)?M--:x.get(l)>x.get(f)?(B.add(l),z(W)):(P.add(f),M--):(g(s,a),M--)}for(;M--;){const W=i[M];O.has(W.key)||g(W,a)}for(;R;)z(C[R-1]);return Ue(N),C}function Qe(i){i&&i.c()}function qe(i,e,t){const{fragment:n,after_update:r}=i.$$;n&&n.m(e,t),Xt(()=>{const u=i.$$.on_mount.map(yi).filter(bi);i.$$.on_destroy?i.$$.on_destroy.push(...u):Ue(u),i.$$.on_mount=[]}),r.forEach(Xt)}function Fe(i,e){const t=i.$$;t.fragment!==null&&(Wn(t.after_update),Ue(t.on_destroy),t.fragment&&t.fragment.d(e),t.on_destroy=t.fragment=null,t.ctx=[])}function zn(i,e){i.$$.dirty[0]===-1&&(ut.push(i),An(),i.$$.dirty.fill(0)),i.$$.dirty[e/31|0]|=1<<e%31}function Xe(i,e,t,n,r,u,a=null,o=[-1]){const g=mt;pt(i);const c=i.$$={fragment:null,ctx:[],props:u,update:ne,not_equal:r,bound:vi(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(e.context||(g?g.$$.context:[])),callbacks:vi(),dirty:o,skip_bound:!1,root:e.target||g.$$.root};a&&a(c.root);let E=!1;if(c.ctx=t?t(i,e.props||{},(_,M,...R)=>{const k=R.length?R[0]:M;return c.ctx&&r(c.ctx[_],c.ctx[_]=k)&&(!c.skip_bound&&c.bound[_]&&c.bound[_](k),E&&zn(i,_)),M}):[],c.update(),E=!0,Ue(c.before_update),c.fragment=n?n(c.ctx):!1,e.target){if(e.hydrate){const _=kn(e.target);c.fragment&&c.fragment.l(_),_.forEach($)}else c.fragment&&c.fragment.c();e.intro&&re(i.$$.fragment),qe(i,e.target,e.anchor),xi()}pt(g)}class Je{constructor(){A(this,"$$");A(this,"$$set")}$destroy(){Fe(this,1),this.$destroy=ne}$on(e,t){if(!bi(t))return ne;const n=this.$$.callbacks[e]||(this.$$.callbacks[e]=[]);return n.push(t),()=>{const r=n.indexOf(t);r!==-1&&n.splice(r,1)}}$set(e){this.$$set&&!_n(e)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}}const Un="4";typeof window<"u"&&(window.__svelte||(window.__svelte={v:new Set})).v.add(Un);function qn(i){let e,t;return{c(){e=ke("svg"),t=ke("path"),S(t,"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"),S(e,"viewBox","0 0 14 14"),S(e,"width","13"),S(e,"height","13"),S(e,"class","svelte-en2qvf")},m(n,r){te(n,e,r),V(e,t)},p:ne,i:ne,o:ne,d(n){n&&$(e)}}}class Mi extends Je{constructor(e){super(),Xe(this,e,null,qn,Ke,{})}}function Fn(i){let e,t;return{c(){e=ke("svg"),t=ke("path"),S(t,"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"),S(e,"viewBox","0 0 30 30"),S(e,"fill","none"),S(e,"xmlns","http://www.w3.org/2000/svg"),S(e,"class","svelte-d2loi5")},m(n,r){te(n,e,r),V(e,t)},p:ne,i:ne,o:ne,d(n){n&&$(e)}}}class Ci extends Je{constructor(e){super(),Xe(this,e,null,Fn,Ke,{})}}function jn(i){let e,t;return{c(){e=Y("img"),ye(e.src,t=i[3]+"area.svg")||S(e,"src",t),S(e,"alt",i[7]),S(e,"title",i[7]),S(e,"class","svelte-w9y5n9")},m(n,r){te(n,e,r)},p(n,r){r&8&&!ye(e.src,t=n[3]+"area.svg")&&S(e,"src",t),r&128&&S(e,"alt",n[7]),r&128&&S(e,"title",n[7])},d(n){n&&$(e)}}}function Zn(i){let e,t;return{c(){e=Y("img"),ye(e.src,t=i[3]+"reverse.svg")||S(e,"src",t),S(e,"alt",i[7]),S(e,"title",i[7]),S(e,"class","svelte-w9y5n9")},m(n,r){te(n,e,r)},p(n,r){r&8&&!ye(e.src,t=n[3]+"reverse.svg")&&S(e,"src",t),r&128&&S(e,"alt",n[7]),r&128&&S(e,"title",n[7])},d(n){n&&$(e)}}}function Hn(i){let e,t;return{c(){e=Y("img"),ye(e.src,t=i[3]+"poi.svg")||S(e,"src",t),S(e,"alt",i[7]),S(e,"title",i[7]),S(e,"class","svelte-w9y5n9")},m(n,r){te(n,e,r)},p(n,r){r&8&&!ye(e.src,t=n[3]+"poi.svg")&&S(e,"src",t),r&128&&S(e,"alt",n[7]),r&128&&S(e,"title",n[7])},d(n){n&&$(e)}}}function Vn(i){let e,t;return{c(){e=Y("img"),ye(e.src,t=i[3]+"postal_code.svg")||S(e,"src",t),S(e,"alt",i[7]),S(e,"title",i[7]),S(e,"class","svelte-w9y5n9")},m(n,r){te(n,e,r)},p(n,r){r&8&&!ye(e.src,t=n[3]+"postal_code.svg")&&S(e,"src",t),r&128&&S(e,"alt",n[7]),r&128&&S(e,"title",n[7])},d(n){n&&$(e)}}}function Kn(i){let e,t;return{c(){e=Y("img"),ye(e.src,t=i[3]+"street.svg")||S(e,"src",t),S(e,"alt",i[7]),S(e,"title",i[7]),S(e,"class","svelte-w9y5n9")},m(n,r){te(n,e,r)},p(n,r){r&8&&!ye(e.src,t=n[3]+"street.svg")&&S(e,"src",t),r&128&&S(e,"alt",n[7]),r&128&&S(e,"title",n[7])},d(n){n&&$(e)}}}function Yn(i){let e,t;return{c(){e=Y("img"),ye(e.src,t=i[3]+"road.svg")||S(e,"src",t),S(e,"alt",i[7]),S(e,"title",i[7]),S(e,"class","svelte-w9y5n9")},m(n,r){te(n,e,r)},p(n,r){r&8&&!ye(e.src,t=n[3]+"road.svg")&&S(e,"src",t),r&128&&S(e,"alt",n[7]),r&128&&S(e,"title",n[7])},d(n){n&&$(e)}}}function Qn(i){let e,t;return{c(){e=Y("img"),ye(e.src,t=i[3]+"housenumber.svg")||S(e,"src",t),S(e,"alt",i[7]),S(e,"title",i[7]),S(e,"class","svelte-w9y5n9")},m(n,r){te(n,e,r)},p(n,r){r&8&&!ye(e.src,t=n[3]+"housenumber.svg")&&S(e,"src",t),r&128&&S(e,"alt",n[7]),r&128&&S(e,"title",n[7])},d(n){n&&$(e)}}}function Xn(i){let e,t,n,r;return{c(){e=Y("img"),ye(e.src,t=i[5])||S(e,"src",t),S(e,"alt",i[4]),S(e,"title",i[7]),S(e,"class","svelte-w9y5n9")},m(u,a){te(u,e,a),n||(r=he(e,"error",i[14]),n=!0)},p(u,a){a&32&&!ye(e.src,t=u[5])&&S(e,"src",t),a&16&&S(e,"alt",u[4]),a&128&&S(e,"title",u[7])},d(u){u&&$(e),n=!1,r()}}}function Jn(i){let e,t;return{c(){e=Y("div"),S(e,"class","sprite-icon svelte-w9y5n9"),S(e,"style",t=`
2
- width: ${i[6].width/xe}px;
3
- height: ${i[6].height/xe}px;
4
- background-image: url(${i[3]}sprite${$t}.png);
5
- background-position: -${i[6].x/xe}px -${i[6].y/xe}px;
6
- background-size: ${Oe.width/xe}px ${Oe.height/xe}px;
7
- `),S(e,"title",i[7])},m(n,r){te(n,e,r)},p(n,r){r&72&&t!==(t=`
8
- width: ${n[6].width/xe}px;
9
- height: ${n[6].height/xe}px;
10
- background-image: url(${n[3]}sprite${$t}.png);
11
- background-position: -${n[6].x/xe}px -${n[6].y/xe}px;
12
- background-size: ${Oe.width/xe}px ${Oe.height/xe}px;
13
- `)&&S(e,"style",t),r&128&&S(e,"title",n[7])},d(n){n&&$(e)}}}function Ni(i){let e,t;return{c(){e=Y("span"),t=Ye(i[7]),S(e,"class","secondary svelte-w9y5n9")},m(n,r){te(n,e,r),V(e,t)},p(n,r){r&128&&gt(t,n[7])},d(n){n&&$(e)}}}function $n(i){let e,t,n,r,u,a,o,g,c,E=(i[8]?i[0].place_name:i[0].place_name.replace(/,.*/,""))+"",_,M,R=i[2]==="always"||i[2]!=="never"&&!i[0].address&&!i[0].id.startsWith("road.")&&!i[0].id.startsWith("address.")&&!i[0].id.startsWith("postal_code.")&&(!i[0].id.startsWith("poi.")||!i[5])&&!i[8],k,I,C=(i[8]?"":i[0].place_name.replace(/[^,]*,?\s*/,""))+"",O,x,N,P,B,z;function W(m,h){return h&1&&(t=null),h&1&&(n=null),h&1&&(r=null),h&1&&(u=null),Oe&&m[6]?Jn:m[5]?Xn:m[0].address?Qn:(t==null&&(t=!!m[0].id.startsWith("road.")),t?Yn:(n==null&&(n=!!m[0].id.startsWith("address.")),n?Kn:(r==null&&(r=!!m[0].id.startsWith("postal_code.")),r?Vn:(u==null&&(u=!!m[0].id.startsWith("poi.")),u?Hn:m[8]?Zn:jn))))}let s=W(i,-1),l=s(i),f=R&&Ni(i);return{c(){e=Y("li"),l.c(),a=we(),o=Y("span"),g=Y("span"),c=Y("span"),_=Ye(E),M=we(),f&&f.c(),k=we(),I=Y("span"),O=Ye(C),S(c,"class","primary svelte-w9y5n9"),S(g,"class","svelte-w9y5n9"),S(I,"class","line2 svelte-w9y5n9"),S(o,"class","texts svelte-w9y5n9"),S(e,"tabindex","-1"),S(e,"role","option"),S(e,"aria-selected",x=i[1]==="selected"),S(e,"aria-checked",N=i[1]==="picked"),S(e,"class",P=Pt(i[1])+" svelte-w9y5n9")},m(m,h){te(m,e,h),l.m(e,null),V(e,a),V(e,o),V(o,g),V(g,c),V(c,_),V(g,M),f&&f.m(g,null),V(o,k),V(o,I),V(I,O),B||(z=[he(e,"mouseenter",i[13]),he(e,"focus",i[15]),he(e,"click",i[16])],B=!0)},p(m,[h]){s===(s=W(m,h))&&l?l.p(m,h):(l.d(1),l=s(m),l&&(l.c(),l.m(e,a))),h&257&&E!==(E=(m[8]?m[0].place_name:m[0].place_name.replace(/,.*/,""))+"")&&gt(_,E),h&293&&(R=m[2]==="always"||m[2]!=="never"&&!m[0].address&&!m[0].id.startsWith("road.")&&!m[0].id.startsWith("address.")&&!m[0].id.startsWith("postal_code.")&&(!m[0].id.startsWith("poi.")||!m[5])&&!m[8]),R?f?f.p(m,h):(f=Ni(m),f.c(),f.m(g,null)):f&&(f.d(1),f=null),h&257&&C!==(C=(m[8]?"":m[0].place_name.replace(/[^,]*,?\s*/,""))+"")&&gt(O,C),h&2&&x!==(x=m[1]==="selected")&&S(e,"aria-selected",x),h&2&&N!==(N=m[1]==="picked")&&S(e,"aria-checked",N),h&2&&P!==(P=Pt(m[1])+" svelte-w9y5n9")&&S(e,"class",P)},i:ne,o:ne,d(m){m&&$(e),l.d(),f&&f.d(),B=!1,Ue(z)}}}const ki=typeof devicePixelRatio>"u"?1:devicePixelRatio>1.25,$t=ki?"@2x":"",xe=ki?2:1;let Oe,At;function er(i,e,t){let n,r,u,{feature:a}=e,{style:o="default"}=e,{showPlaceType:g}=e,{missingIconsCache:c}=e,{iconsBaseUrl:E}=e;const _=_i();let M,R,k,I;function C(){At??(At=fetch(`${E}sprite${$t}.json`).then(s=>s.json()).then(s=>{Oe=s}).catch(()=>{Oe=null}))}function O(){R&&c.add(R),x()}function x(){Oe!==void 0?N():(C(),At==null||At.then(N))}function N(){do{if(I--,t(4,M=n==null?void 0:n[I]),t(6,k=M?Oe==null?void 0:Oe.icons[M]:void 0),k)break;t(5,R=M?E+M.replace(/ /g,"_")+".svg":void 0)}while(I>-1&&(!R||c.has(R)))}function P(s){Pn.call(this,i,s)}const B=()=>O(),z=()=>_("select",void 0),W=s=>{document.activeElement!==s.target&&_("select",void 0)};return i.$$set=s=>{"feature"in s&&t(0,a=s.feature),"style"in s&&t(1,o=s.style),"showPlaceType"in s&&t(2,g=s.showPlaceType),"missingIconsCache"in s&&t(11,c=s.missingIconsCache),"iconsBaseUrl"in s&&t(3,E=s.iconsBaseUrl)},i.$$.update=()=>{var s,l,f,m,h;i.$$.dirty&1&&t(12,n=(s=a.properties)==null?void 0:s.categories),i.$$.dirty&1&&t(8,r=a.place_type[0]==="reverse"),i.$$.dirty&1&&t(7,u=((f=(l=a.properties)==null?void 0:l.categories)==null?void 0:f.join(", "))??((h=(m=a.properties)==null?void 0:m.place_type_name)==null?void 0:h[0])??a.place_type[0]),i.$$.dirty&4096&&(I=(n==null?void 0:n.length)??0,x())},[a,o,g,E,M,R,k,u,r,_,O,c,n,P,B,z,W]}class tr extends Je{constructor(e){super(),Xe(this,e,er,$n,Ke,{feature:0,style:1,showPlaceType:2,missingIconsCache:11,iconsBaseUrl:3})}}function ir(i){let e;return{c(){e=Y("div"),e.innerHTML='<svg viewBox="0 0 18 18" width="24" height="24" class="loading-icon svelte-1ocfouu"><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"></path><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"></path></svg>',S(e,"class","svelte-1ocfouu")},m(t,n){te(t,e,n)},p:ne,i:ne,o:ne,d(t){t&&$(e)}}}class nr extends Je{constructor(e){super(),Xe(this,e,null,ir,Ke,{})}}function rr(i){let e,t,n;return{c(){e=ke("svg"),t=ke("path"),S(t,"stroke-width","4"),S(t,"d","M 5,33.103579 C 5,17.607779 18.457,5 35,5 C 51.543,5 65,17.607779 65,33.103579 C 65,56.388679 40.4668,76.048179 36.6112,79.137779 C 36.3714,79.329879 36.2116,79.457979 36.1427,79.518879 C 35.8203,79.800879 35.4102,79.942779 35,79.942779 C 34.5899,79.942779 34.1797,79.800879 33.8575,79.518879 C 33.7886,79.457979 33.6289,79.330079 33.3893,79.138079 C 29.5346,76.049279 5,56.389379 5,33.103579 Z M 35.0001,49.386379 C 43.1917,49.386379 49.8323,42.646079 49.8323,34.331379 C 49.8323,26.016779 43.1917,19.276479 35.0001,19.276479 C 26.8085,19.276479 20.1679,26.016779 20.1679,34.331379 C 20.1679,42.646079 26.8085,49.386379 35.0001,49.386379 Z"),S(t,"class","svelte-gzo3ar"),S(e,"width",n=i[0]==="list"?20:void 0),S(e,"viewBox","0 0 70 85"),S(e,"fill","none"),S(e,"class","svelte-gzo3ar"),Ie(e,"in-map",i[0]!=="list"),Ie(e,"list-icon",i[0]==="list")},m(r,u){te(r,e,u),V(e,t)},p(r,[u]){u&1&&n!==(n=r[0]==="list"?20:void 0)&&S(e,"width",n),u&1&&Ie(e,"in-map",r[0]!=="list"),u&1&&Ie(e,"list-icon",r[0]==="list")},i:ne,o:ne,d(r){r&&$(e)}}}function sr(i,e,t){let{displayIn:n}=e;return i.$$set=r=>{"displayIn"in r&&t(0,n=r.displayIn)},[n]}class or extends Je{constructor(e){super(),Xe(this,e,sr,rr,Ke,{displayIn:0})}}function lr(i){let e,t;return{c(){e=ke("svg"),t=ke("path"),S(t,"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"),S(e,"viewBox","0 0 60.006 21.412"),S(e,"width","14"),S(e,"height","20"),S(e,"class","svelte-en2qvf")},m(n,r){te(n,e,r),V(e,t)},p:ne,i:ne,o:ne,d(n){n&&$(e)}}}class ur extends Je{constructor(e){super(),Xe(this,e,null,lr,Ke,{})}}function ar(i){let e,t,n;return{c(){e=ke("svg"),t=ke("circle"),n=ke("path"),S(t,"cx","4.789"),S(t,"cy","4.787"),S(t,"r","3.85"),S(t,"class","svelte-1aq105l"),S(n,"d","M12.063 12.063 7.635 7.635"),S(n,"class","svelte-1aq105l"),S(e,"xmlns","http://www.w3.org/2000/svg"),S(e,"width","13"),S(e,"height","13"),S(e,"viewBox","0 0 13 13"),S(e,"class","svelte-1aq105l")},m(r,u){te(r,e,u),V(e,t),V(e,n)},p:ne,i:ne,o:ne,d(r){r&&$(e)}}}class fr extends Je{constructor(e){super(),Xe(this,e,null,ar,Ke,{})}}function cr(i,e,t){const n=e[1],r=e[0],u=n-r;return i===n&&t?i:((i-r)%u+u)%u+r}function Bt(i){const e=[...i];return e[2]<e[0]&&(Math.abs((e[0]+e[2]+360)/2)>Math.abs((e[0]-360+e[2])/2)?e[0]-=360:e[2]+=360),e}let bt;async function hr(i,e,t){const n=i==null?void 0:i.getCenterAndZoom();for(const r of e??[])if(!(n&&(r.minZoom!=null&&r.minZoom>n[0]||r.maxZoom!=null&&r.maxZoom<n[0]))){if(r.type==="fixed")return r.coordinates.join(",");e:if(r.type==="client-geolocation"){if(bt&&r.cachedLocationExpiry&&bt.time+r.cachedLocationExpiry>Date.now()){if(!bt.coords)break e;return bt.coords}let u;try{return u=await new Promise((a,o)=>{t.signal.addEventListener("abort",()=>{o(Error("aborted"))}),navigator.geolocation.getCurrentPosition(g=>{a([g.coords.longitude,g.coords.latitude].map(c=>c.toFixed(6)).join(","))},g=>{o(g)},r)}),u}catch{}finally{r.cachedLocationExpiry&&(bt={time:Date.now(),coords:u})}if(t.signal.aborted)return}if(r.type==="server-geolocation")return"ip";if(n&&r.type==="map-center")return n[1].toFixed(6)+","+n[2].toFixed(6)}}const dr=/^(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,Oi=/^([+-]?[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,})$/,Ri=/^(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,Pi=/^(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,Ii=/^(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,Ai=/^(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 gr(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(R=>Number(R.trim())),t=Number(e[0]),n=Number(e[1]),r=Math.abs(t),u=Math.abs(n),a=t>0?"N":"S",o=n>0?"E":"W";let g;i=="DD"&&(g=`${r}° ${a}, ${u}° ${o}`);const c=Math.floor(r),E=Math.floor(u),_=(r-c)*60,M=(u-E)*60;if(i=="DM"){let R=Bi(_,3).toFixed(3).padStart(6,"0"),k=Bi(M,3).toFixed(3).padStart(6,"0");R.endsWith(".000")&&k.endsWith(".000")&&(R=R.replace(/\.000$/,""),k=k.replace(/\.000$/,"")),g=`${c}° ${R}' ${a}, ${E}° ${k}' ${o}`}if(i=="DMS"){const R=Math.floor(_),k=Math.floor(M);let I=((_-R)*60).toFixed(1).padStart(4,"0"),C=((M-k)*60).toFixed(1).padStart(4,"0");const O=R.toString().padStart(2,"0"),x=k.toString().padStart(2,"0");I.endsWith(".0")&&C.endsWith(".0")&&(I=I.replace(/\.0$/,""),C=C.replace(/\.0$/,"")),g=`${c}° ${O}' ${I}" ${a}, ${E}° ${x}' ${C}" ${o}`}return g}else throw new Error("no decimal coordinates to convert")}function Bi(i,e){const t=Math.pow(10,e);return Math.round((i+Number.EPSILON)*t)/t}function ei(i,e){e||(e=5),i=i.replace(/\s+/g," ").trim();let t=null,n=null,r="",u="",a=null,o=[],g=!1;if(dr.test(i))throw new Error("invalid coordinate value");if(Oi.test(i))if(o=Oi.exec(i),g=wt(o),g)t=Math.abs(o[1])+o[2]/60,Number(o[1])<0&&(t*=-1),n=Math.abs(o[3])+o[4]/60,Number(o[3])<0&&(n*=-1),a="DM";else throw new Error("invalid coordinate format");else if(Ri.test(i))if(o=Ri.exec(i),g=wt(o),g){if(t=o[2],n=o[6],t.includes(",")&&(t=t.replace(",",".")),n.includes(",")&&(n=n.replace(",",".")),a="DD",Number(Math.round(t))==Number(t))throw new Error("integer only coordinate provided");if(Number(Math.round(n))==Number(n))throw new Error("integer only coordinate provided");o[1]?(r=o[1],u=o[5]):o[4]&&(r=o[4],u=o[8])}else throw new Error("invalid decimal coordinate format");else if(Pi.test(i))if(o=Pi.exec(i),g=wt(o),g)t=Math.abs(parseInt(o[2])),o[4]&&(t+=o[4]/60,a="DM"),o[6]&&(t+=o[6].replace(",",".")/3600,a="DMS"),parseInt(o[2])<0&&(t=-1*t),n=Math.abs(parseInt(o[9])),o[11]&&(n+=o[11]/60),o[13]&&(n+=o[13].replace(",",".")/3600),parseInt(o[9])<0&&(n=-1*n),o[1]?(r=o[1],u=o[8]):o[7]&&(r=o[7],u=o[14]);else throw new Error("invalid DMS coordinates format");else if(Ii.test(i))if(o=Ii.exec(i),g=wt(o),g)t=Math.abs(parseInt(o[2])),o[4]&&(t+=o[4]/60,a="DM"),o[6]&&(t+=o[6]/3600,a="DMS"),parseInt(o[2])<0&&(t=-1*t),n=Math.abs(parseInt(o[10])),o[12]&&(n+=o[12]/60),o[14]&&(n+=o[14]/3600),parseInt(o[10])<0&&(n=-1*n),o[1]?(r=o[1],u=o[9]):o[8]&&(r=o[8],u=o[16]);else throw new Error("invalid DMS coordinates format");else if(Ai.test(i)){if(o=Ai.exec(i),g=wt(o),o.filter(c=>c).length<=5)throw new Error("invalid coordinates format");if(g)t=Math.abs(parseInt(o[2])),o[4]&&(t+=o[4].replace(",",".")/60,a="DM"),o[6]&&(t+=o[6].replace(",",".")/3600,a="DMS"),parseInt(o[2])<0&&(t=-1*t),n=Math.abs(parseInt(o[10])),o[12]&&(n+=o[12].replace(",",".")/60),o[14]&&(n+=o[14].replace(",",".")/3600),parseInt(o[10])<0&&(n=-1*n),o[1]?(r=o[1],u=o[9]):o[8]&&(r=o[8],u=o[16]);else throw new Error("invalid coordinates format")}if(g){if(Math.abs(n)>=180)throw new Error("invalid longitude value");if(Math.abs(t)>=90)throw new Error("invalid latitude value");if(r&&!u||!r&&u)throw new Error("invalid coordinates value");if(r&&r==u)throw new Error("invalid coordinates format");t.toString().includes(",")&&(t=t.replace(",",".")),n.toString().includes(",")&&(n=n.replace(",","."));let c=/S|SOUTH/i;c.test(r)&&t>0&&(t=-1*t),c=/W|WEST/i,c.test(u)&&n>0&&(n=-1*n);const E=o[0].trim();let _,M;const R=/[,/;\u0020]/g,k=E.match(R);if(k==null){const O=Math.floor(i.length/2);_=E.substring(0,O).trim(),M=E.substring(O).trim()}else{let O;k.length%2==1?O=Math.floor(k.length/2):O=k.length/2-1;let x=0;if(O==0)x=E.indexOf(k[0]),_=E.substring(0,x).trim(),M=E.substring(x+1).trim();else{let N=0,P=0;for(;N<=O;)x=E.indexOf(k[N],P),P=x+1,N++;_=E.substring(0,x).trim(),M=E.substring(x+1).trim()}}const I=_.split(".");if(I.length==2&&I[1]==0&&I[1].length!=2)throw new Error("invalid coordinates format");const C=M.split(".");if(C.length==2&&C[1]==0&&C[1].length!=2)throw new Error("invalid coordinates format");if(/^\d+$/.test(_)||/^\d+$/.test(M))throw new Error("degree only coordinate/s provided");return t=Number(Number(t).toFixed(e)),n=Number(Number(n).toFixed(e)),Object.freeze({verbatimCoordinates:E,verbatimLatitude:_,verbatimLongitude:M,decimalLatitude:t,decimalLongitude:n,decimalCoordinates:`${t},${n}`,originalFormat:a,closeEnough:mr,toCoordinateFormat:gr})}else throw new Error("coordinates pattern match failed")}function wt(i){if(!isNaN(i[0]))return!1;const e=[...i];if(e.shift(),e.length%2>0)return!1;const t=/^[-+]?\d+([\.,]\d+)?$/,n=/[eastsouthnorthwest]+/i,r=e.length/2;for(let u=0;u<r;u++){const a=e[u],o=e[u+r],g=t.test(a)&&t.test(o),c=n.test(a)&&n.test(o),E=a==o;if(!(a==null&&o==null)){if(a==null||o==null)return!1;if(g||c||E)continue;return!1}}return!0}function Wi(i,e){const t=Math.abs(i-e);return Number(t.toFixed(6))<=1e-5}function mr(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 Wi(this.decimalLatitude,Number(e[0]))&&Wi(this.decimalLongitude,e[1])}else throw new Error("coords being tested must be separated by a comma")}const pr=Object.freeze({DMS:"DMS",DM:"DM",DD:"DD"});ei.to=pr;const yr=[{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"}],vr={decimalLatitude:40.123,decimalLongitude:-74.123},br=[{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}],wr=[{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 Er(){const i=[];return yr.forEach(e=>{e.decimalLatitude?i.push(e):i.push({...e,...vr})}),[...i,...br,...wr]}const Lr=Er();ei.formats=Lr.map(i=>i.verbatimCoordinates);const _r=ei;function Gi(i,e,t){const n=i.slice();return n[97]=e[t],n[99]=t,n}function Di(i){let e,t,n,r,u;return t=new Mi({}),{c(){e=Y("button"),Qe(t.$$.fragment),S(e,"type","button"),S(e,"title",i[3]),S(e,"class","svelte-bz0zu3")},m(a,o){te(a,e,o),qe(t,e,null),n=!0,r||(u=he(e,"click",i[78]),r=!0)},p(a,o){(!n||o[0]&8)&&S(e,"title",a[3])},i(a){n||(re(t.$$.fragment,a),n=!0)},o(a){fe(t.$$.fragment,a),n=!1},d(a){a&&$(e),Fe(t),r=!1,u()}}}function zi(i){let e,t;return e=new nr({}),{c(){Qe(e.$$.fragment)},m(n,r){qe(e,n,r),t=!0},i(n){t||(re(e.$$.fragment,n),t=!0)},o(n){fe(e.$$.fragment,n),t=!1},d(n){Fe(e,n)}}}function Ui(i){let e,t,n,r,u;return t=new ur({}),{c(){e=Y("button"),Qe(t.$$.fragment),S(e,"type","button"),S(e,"title",i[10]),S(e,"class","svelte-bz0zu3"),Ie(e,"active",i[0])},m(a,o){te(a,e,o),qe(t,e,null),n=!0,r||(u=he(e,"click",i[79]),r=!0)},p(a,o){(!n||o[0]&1024)&&S(e,"title",a[10]),(!n||o[0]&1)&&Ie(e,"active",a[0])},i(a){n||(re(t.$$.fragment,a),n=!0)},o(a){fe(t.$$.fragment,a),n=!1},d(a){a&&$(e),Fe(t),r=!1,u()}}}function Sr(i){let e,t=[],n=new Map,r,u,a,o=Ti(i[13]);const g=c=>c[97].id+(c[97].address?","+c[97].address:"");for(let c=0;c<o.length;c+=1){let E=Gi(i,o,c),_=g(E);n.set(_,t[c]=qi(_,E))}return{c(){e=Y("ul");for(let c=0;c<t.length;c+=1)t[c].c();S(e,"class","options svelte-bz0zu3"),S(e,"role","listbox")},m(c,E){te(c,e,E);for(let _=0;_<t.length;_+=1)t[_]&&t[_].m(e,null);r=!0,u||(a=[he(e,"mouseleave",i[27]),he(e,"blur",i[83]),he(e,"keydown",i[23])],u=!0)},p(c,E){E[0]&102823936&&(o=Ti(c[13]),yt(),t=Dn(t,E,g,1,c,o,n,e,Gn,qi,null,Gi),vt())},i(c){if(!r){for(let E=0;E<o.length;E+=1)re(t[E]);r=!0}},o(c){for(let E=0;E<t.length;E+=1)fe(t[E]);r=!1},d(c){c&&$(e);for(let E=0;E<t.length;E+=1)t[E].d();u=!1,Ue(a)}}}function xr(i){let e,t,n,r,u,a;return t=new Ci({}),{c(){e=Y("div"),Qe(t.$$.fragment),n=we(),r=Y("div"),u=Ye(i[8]),S(r,"class","svelte-bz0zu3"),S(e,"class","no-results svelte-bz0zu3")},m(o,g){te(o,e,g),qe(t,e,null),V(e,n),V(e,r),V(r,u),a=!0},p(o,g){(!a||g[0]&256)&&gt(u,o[8])},i(o){a||(re(t.$$.fragment,o),a=!0)},o(o){fe(t.$$.fragment,o),a=!1},d(o){o&&$(e),Fe(t)}}}function Tr(i){let e="",t;return{c(){t=Ye(e)},m(n,r){te(n,t,r)},p:ne,i:ne,o:ne,d(n){n&&$(t)}}}function Mr(i){let e,t,n,r,u,a,o,g,c,E,_;return t=new Ci({}),g=new Mi({}),{c(){e=Y("div"),Qe(t.$$.fragment),n=we(),r=Y("div"),u=Ye(i[7]),a=we(),o=Y("button"),Qe(g.$$.fragment),S(r,"class","svelte-bz0zu3"),S(o,"class","svelte-bz0zu3"),S(e,"class","error svelte-bz0zu3")},m(M,R){te(M,e,R),qe(t,e,null),V(e,n),V(e,r),V(r,u),V(e,a),V(e,o),qe(g,o,null),c=!0,E||(_=he(o,"click",i[80]),E=!0)},p(M,R){(!c||R[0]&128)&&gt(u,M[7])},i(M){c||(re(t.$$.fragment,M),re(g.$$.fragment,M),c=!0)},o(M){fe(t.$$.fragment,M),fe(g.$$.fragment,M),c=!1},d(M){M&&$(e),Fe(t),Fe(g),E=!1,_()}}}function qi(i,e){var o;let t,n,r;function u(){return e[81](e[99])}function a(){return e[82](e[97])}return n=new tr({props:{feature:e[97],showPlaceType:e[11],style:e[15]===e[99]?"selected":((o=e[14])==null?void 0:o.id)===e[97].id?"picked":"default",missingIconsCache:e[21],iconsBaseUrl:e[12]}}),n.$on("mouseenter",u),n.$on("select",a),{key:i,first:null,c(){t=Cn(),Qe(n.$$.fragment),this.first=t},m(g,c){te(g,t,c),qe(n,g,c),r=!0},p(g,c){var _;e=g;const E={};c[0]&8192&&(E.feature=e[97]),c[0]&2048&&(E.showPlaceType=e[11]),c[0]&57344&&(E.style=e[15]===e[99]?"selected":((_=e[14])==null?void 0:_.id)===e[97].id?"picked":"default"),c[0]&4096&&(E.iconsBaseUrl=e[12]),n.$set(E)},i(g){r||(re(n.$$.fragment,g),r=!0)},o(g){fe(n.$$.fragment,g),r=!1},d(g){g&&$(t),Fe(n,g)}}}function Cr(i){let e,t,n,r,u,a,o,g,c,E,_,M,R,k,I,C,O,x,N,P=!1;u=new fr({});let B=!i[20]&&Di(i),z=i[20]&&zi(),W=i[6]==="button"&&Ui(i);const s=i[70].default,l=Sn(s,i,i[69],null),f=[Mr,Tr,xr,Sr],m=[];function h(d,v){var p,y;return d[19]?0:!d[16]&&!d[4]?1:((p=d[13])==null?void 0:p.length)===0?2:(y=d[13])!=null&&y.length&&(d[16]||d[4])?3:-1}return~(k=h(i))&&(I=m[k]=f[k](i)),{c(){e=we(),t=Y("form"),n=Y("div"),r=Y("button"),Qe(u.$$.fragment),a=we(),o=Y("input"),g=we(),c=Y("div"),B&&B.c(),E=we(),z&&z.c(),_=we(),W&&W.c(),M=we(),l&&l.c(),R=we(),I&&I.c(),S(r,"class","search-button svelte-bz0zu3"),S(r,"type","button"),S(o,"placeholder",i[9]),S(o,"aria-label",i[9]),S(o,"class","svelte-bz0zu3"),S(c,"class","clear-button-container svelte-bz0zu3"),Ie(c,"displayable",i[1]!==""),S(n,"class","input-group svelte-bz0zu3"),S(t,"class",C=Pt(i[2])+" svelte-bz0zu3"),Ie(t,"can-collapse",i[5]&&i[1]==="")},m(d,v){te(d,e,v),te(d,t,v),V(t,n),V(n,r),qe(u,r,null),V(n,a),V(n,o),i[72](o),Ei(o,i[1]),V(n,g),V(n,c),B&&B.m(c,null),V(c,E),z&&z.m(c,null),V(n,_),W&&W.m(n,null),V(n,M),l&&l.m(n,null),V(t,R),~k&&m[k].m(t,null),O=!0,x||(N=[he(r,"click",i[71]),he(o,"input",i[73]),he(o,"focus",i[74]),he(o,"blur",i[75]),he(o,"click",i[76]),he(o,"keydown",i[23]),he(o,"input",i[24]),he(o,"change",i[77]),he(t,"submit",Nn(i[22]))],x=!0)},p(d,v){(!O||v[0]&512)&&S(o,"placeholder",d[9]),(!O||v[0]&512)&&S(o,"aria-label",d[9]),v[0]&2&&o.value!==d[1]&&Ei(o,d[1]),d[20]?B&&(yt(),fe(B,1,1,()=>{B=null}),vt()):B?(B.p(d,v),v[0]&1048576&&re(B,1)):(B=Di(d),B.c(),re(B,1),B.m(c,E)),d[20]?z?v[0]&1048576&&re(z,1):(z=zi(),z.c(),re(z,1),z.m(c,null)):z&&(yt(),fe(z,1,1,()=>{z=null}),vt()),(!O||v[0]&2)&&Ie(c,"displayable",d[1]!==""),d[6]==="button"?W?(W.p(d,v),v[0]&64&&re(W,1)):(W=Ui(d),W.c(),re(W,1),W.m(n,M)):W&&(yt(),fe(W,1,1,()=>{W=null}),vt()),l&&l.p&&(!O||v[2]&128)&&Tn(l,s,d,d[69],O?xn(s,d[69],v,null):Mn(d[69]),null);let p=k;k=h(d),k===p?~k&&m[k].p(d,v):(I&&(yt(),fe(m[p],1,1,()=>{m[p]=null}),vt()),~k?(I=m[k],I?I.p(d,v):(I=m[k]=f[k](d),I.c()),re(I,1),I.m(t,null)):I=null),(!O||v[0]&4&&C!==(C=Pt(d[2])+" svelte-bz0zu3"))&&S(t,"class",C),(!O||v[0]&38)&&Ie(t,"can-collapse",d[5]&&d[1]==="")},i(d){O||(re(P),re(u.$$.fragment,d),re(B),re(z),re(W),re(l,d),re(I),O=!0)},o(d){fe(P),fe(u.$$.fragment,d),fe(B),fe(z),fe(W),fe(l,d),fe(I),O=!1},d(d){d&&($(e),$(t)),Fe(u),i[72](null),B&&B.d(),z&&z.d(),W&&W.d(),l&&l.d(d),~k&&m[k].d(),x=!1,Ue(N)}}}function Nr(i,e,t){let n,r,u,{$$slots:a={},$$scope:o}=e;const g={continental_marine:4,country:4,major_landform:8,region:5,subregion:6,county:7,joint_municipality:8,joint_submunicipality:9,municipality:10,municipal_district:11,locality:12,neighbourhood:13,place:14,postal_code:14,road:16,poi:17,address:18,"poi.peak":15,"poi.shop":18,"poi.cafe":18,"poi.restaurant":18,"poi.aerodrome":13};let{class:c=void 0}=e,{apiKey:E=void 0}=e,{bbox:_=void 0}=e,{clearButtonTitle:M="clear"}=e,{clearOnBlur:R=!1}=e,{clearListOnPick:k=!1}=e,{keepListOpen:I=!1}=e,{collapsed:C=!1}=e,{country:O=void 0}=e,{debounceSearch:x=200}=e,{enableReverse:N="never"}=e,{errorMessage:P="Something went wrong…"}=e,{filter:B=()=>!0}=e,{flyTo:z=!0}=e,{fuzzyMatch:W=!0}=e,{language:s=void 0}=e,{limit:l=void 0}=e;const f=41415112612;let{reverseGeocodingLimit:m=f}=e,{mapController:h=void 0}=e,{minLength:d=2}=e,{noResultsMessage:v="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!"}=e,{placeholder:p="Search"}=e,{proximity:y=[{type:"server-geolocation"}]}=e,{reverseActive:b=N==="always"}=e,{reverseButtonTitle:w="toggle reverse geocoding"}=e,{searchValue:T=""}=e,{pickedResultStyle:G="full-geometry"}=e,{showPlaceType:D="if-needed"}=e,{showResultsWhileTyping:H=!0}=e,{selectFirst:Q=!0}=e,{flyToSelected:se=!1}=e,{markerOnSelected:Z=!0}=e,{types:K=void 0}=e;const de=[];let{reverseGeocodingTypes:He=de}=e,{exhaustiveReverseGeocoding:st=!1}=e,{excludeTypes:ot=!1}=e;const Le=void 0;let{reverseGeocodingExcludeTypes:We=Le}=e,{zoom:pe=g}=e,{apiUrl:ge="https://api.maptiler.com/geocoding"}=e,{fetchParameters:ie={}}=e,{iconsBaseUrl:hn="https://cdn.maptiler.com/maptiler-geocoding-control/v2.1.7/icons/"}=e,{adjustUrlQuery:ui=()=>{}}=e,{adjustUrl:ai=()=>{}}=e;function gs(L){Pe.focus(L)}function ms(){Pe.blur()}function dn(L,le=!0,ae=!1){t(1,T=L),le?(t(15,X=-1),mn()):(pn(void 0,!ae,ae),setTimeout(()=>{Pe.focus(),Pe.select()}))}function ps(){t(13,F=void 0),t(14,U=void 0),t(15,X=-1)}function ys(){t(64,ce=[]),t(14,U=void 0)}let F,ce,U,gn="",Pe,X=-1,Ge,Zt=[],lt,ct,ht,fi,Ve=!1;const vs=new Set,tt=_i();Rn(()=>{h&&(h.setEventHandler(void 0),h.indicateReverse(!1),h.setSelectedMarker(-1),h.setFeatures(void 0,void 0,!1))});function mn(L){if(t(17,Ve=!1),ct&&(clearTimeout(ct),ct=void 0),X>-1&&F)t(14,U=F[X]),t(1,T=U.place_type[0]==="reverse"?U.place_name:U.place_name.replace(/,.*/,"")),t(19,Ge=void 0),t(64,ce=void 0),t(15,X=-1);else if(T){const le=L||!ci(T);hi(T,{exact:!0}).then(()=>{t(64,ce=F),t(14,U=void 0),le&&bs()}).catch(ae=>t(19,Ge=ae))}}function ci(L){try{return _r(L,6)}catch{return!1}}async function hi(L,{byId:le=!1,exact:ae=!1}={}){var Se,De,it;t(19,Ge=void 0),lt==null||lt.abort();const _e=new AbortController;t(20,lt=_e);try{const J=ci(L),Mt=new URL(ge+"/"+encodeURIComponent(J?J.decimalLongitude+","+J.decimalLatitude:L)+".json"),Ne=Mt.searchParams;s!==void 0&&Ne.set("language",Array.isArray(s)?s.join(","):s??"");const[mi]=(h==null?void 0:h.getCenterAndZoom())??[];let ze=(Se=!J||He===de?K:He)==null?void 0:Se.map(ve=>typeof ve=="string"?ve:mi===void 0||(ve[0]??0)<=mi&&mi<(ve[1]??1/0)?ve[2]:void 0).filter(ve=>ve!==void 0);ze&&(ze=[...new Set(ze)],Ne.set("types",ze.join(",")));const vn=!J||We===Le?ot:We;if(vn&&Ne.set("excludeTypes",String(vn)),_&&Ne.set("bbox",_.map(ve=>ve.toFixed(6)).join(",")),O&&Ne.set("country",Array.isArray(O)?O.join(","):O),!le&&!J){const ve=await hr(h,y,_e);ve&&Ne.set("proximity",ve),(ae||!H)&&Ne.set("autocomplete","false"),Ne.set("fuzzyMatch",String(W))}const Ct=m===f?l:m;Ct!==void 0&&Ct>1&&(ze==null?void 0:ze.length)!==1&&console.warn("For reverse geocoding when limit > 1 then types must contain single value."),J?(Ct===1||Ct!==void 0&&(st||(ze==null?void 0:ze.length)===1))&&Ne.set("limit",String(Ct)):l!==void 0&&Ne.set("limit",String(l)),E&&Ne.set("key",E),ui(Ne),ai(Mt);const Bs=Mt.searchParams.get("types")===""&&Mt.searchParams.get("excludeTypes")!=="true",Ht=Mt.toString();if(Ht===gn){le?(k&&t(13,F=void 0),t(14,U=Zt[0])):(t(13,F=Zt),((De=F[X])==null?void 0:De.id)!==(r==null?void 0:r.id)&&t(15,X=-1));return}gn=Ht;let Nt;if(Bs)Nt={type:"FeatureCollection",features:[]};else{const ve=await fetch(Ht,{signal:_e.signal,...ie});if(!ve.ok)throw new Error(await ve.text());Nt=await ve.json()}tt("response",{url:Ht,featureCollection:Nt}),le?(k&&t(13,F=void 0),t(14,U=Nt.features[0]),Zt=[U]):(t(13,F=Nt.features.filter(B)),J&&F.unshift({type:"Feature",properties:{},id:"reverse_"+J.decimalLongitude+"_"+J.decimalLatitude,text:J.decimalLatitude+", "+J.decimalLongitude,place_name:J.decimalLatitude+", "+J.decimalLongitude,place_type:["reverse"],center:[J.decimalLongitude,J.decimalLatitude],bbox:[J.decimalLongitude,J.decimalLatitude,J.decimalLongitude,J.decimalLatitude],geometry:{type:"Point",coordinates:[J.decimalLongitude,J.decimalLatitude]}}),Zt=F,((it=F[X])==null?void 0:it.id)!==(r==null?void 0:r.id)&&t(15,X=-1),J&&Pe.focus())}catch(J){if(J&&typeof J=="object"&&"name"in J&&J.name==="AbortError")return;throw J}finally{_e===lt&&t(20,lt=void 0)}}function bs(){var _e;if(!(ce!=null&&ce.length)||!z)return;const L=[180,90,-180,-90],le=!ce.some(Se=>!Se.matching_text);let ae;for(const Se of ce){const De=Tt(Se);if(ae=ae===void 0?De:De===void 0?ae:Math.max(ae,De),le||!Se.matching_text)for(const it of[0,1,2,3])L[it]=Math[it<2?"min":"max"](L[it],((_e=Se.bbox)==null?void 0:_e[it])??Se.center[it%2])}h&&ce.length>0&&(U&&L[0]===L[2]&&L[1]===L[3]?h.flyTo(U.center,Tt(U)):h.fitBounds(Bt(L),50,ae))}function di(){!U||!h||(!U.bbox||U.bbox[0]===U.bbox[2]&&U.bbox[1]===U.bbox[3]?h.flyTo(U.center,Tt(U)):h.fitBounds(Bt(U.bbox),50,Tt(U)))}function Tt(L){var ae;if(!L.bbox||L.bbox[0]!==L.bbox[2]&&L.bbox[1]!==L.bbox[3])return;const le=L.id.replace(/\..*/,"");return(Array.isArray((ae=L.properties)==null?void 0:ae.categories)?L.properties.categories.reduce((_e,Se)=>{const De=pe[le+"."+Se];return _e===void 0?De:De===void 0?_e:Math.max(_e,De)},void 0):void 0)??pe[le]}function ws(L){t(0,b=N==="always"),t(13,F=void 0),t(14,U=void 0),t(15,X=-1),dn(L[1].toFixed(6)+", "+cr(L[0],[-180,180],!0).toFixed(6),!1,!0)}function Es(L){if(!F)return;let le=L.key==="ArrowDown"?1:L.key==="ArrowUp"?-1:0;le&&(Pe.focus(),t(17,Ve=!0),L.preventDefault(),U&&X===-1&&t(15,X=F.findIndex(ae=>ae.id===(U==null?void 0:U.id))),X===(U||Q?0:-1)&&le===-1&&t(15,X=F.length),t(15,X+=le),X>=F.length&&t(15,X=-1),X<0&&(U||Q)&&t(15,X=0))}function pn(L,le=!0,ae=!1){if(t(19,Ge=void 0),t(14,U=void 0),t(17,Ve=!0),H||ae){if(ct&&clearTimeout(ct),T.length<d)return;const _e=T;ct=window.setTimeout(()=>{hi(_e).catch(Se=>t(19,Ge=Se))},le?x:0)}else t(13,F=void 0),t(19,Ge=void 0)}function gi(L){U&&(U==null?void 0:U.id)===(L==null?void 0:L.id)?di():(t(14,U=L),t(1,T=L.place_name))}function yn(L){t(15,X=L)}function Ls(){(!Q||U)&&t(15,X=-1),se&&di()}const _s=()=>Pe.focus();function Ss(L){Yt[L?"unshift":"push"](()=>{Pe=L,t(18,Pe)})}function xs(){T=this.value,t(1,T),t(17,Ve),t(31,R),t(16,ht)}const Ts=()=>t(17,Ve=!0),Ms=()=>t(17,Ve=!1),Cs=()=>t(17,Ve=!0),Ns=()=>t(14,U=void 0),ks=()=>{t(1,T=""),t(14,U=void 0),Pe.focus()},Os=()=>t(0,b=!b),Rs=()=>t(19,Ge=void 0),Ps=L=>yn(L),Is=L=>gi(L),As=()=>{};return i.$$set=L=>{"class"in L&&t(2,c=L.class),"apiKey"in L&&t(29,E=L.apiKey),"bbox"in L&&t(30,_=L.bbox),"clearButtonTitle"in L&&t(3,M=L.clearButtonTitle),"clearOnBlur"in L&&t(31,R=L.clearOnBlur),"clearListOnPick"in L&&t(32,k=L.clearListOnPick),"keepListOpen"in L&&t(4,I=L.keepListOpen),"collapsed"in L&&t(5,C=L.collapsed),"country"in L&&t(33,O=L.country),"debounceSearch"in L&&t(34,x=L.debounceSearch),"enableReverse"in L&&t(6,N=L.enableReverse),"errorMessage"in L&&t(7,P=L.errorMessage),"filter"in L&&t(35,B=L.filter),"flyTo"in L&&t(36,z=L.flyTo),"fuzzyMatch"in L&&t(37,W=L.fuzzyMatch),"language"in L&&t(38,s=L.language),"limit"in L&&t(39,l=L.limit),"reverseGeocodingLimit"in L&&t(40,m=L.reverseGeocodingLimit),"mapController"in L&&t(41,h=L.mapController),"minLength"in L&&t(42,d=L.minLength),"noResultsMessage"in L&&t(8,v=L.noResultsMessage),"placeholder"in L&&t(9,p=L.placeholder),"proximity"in L&&t(43,y=L.proximity),"reverseActive"in L&&t(0,b=L.reverseActive),"reverseButtonTitle"in L&&t(10,w=L.reverseButtonTitle),"searchValue"in L&&t(1,T=L.searchValue),"pickedResultStyle"in L&&t(44,G=L.pickedResultStyle),"showPlaceType"in L&&t(11,D=L.showPlaceType),"showResultsWhileTyping"in L&&t(45,H=L.showResultsWhileTyping),"selectFirst"in L&&t(46,Q=L.selectFirst),"flyToSelected"in L&&t(47,se=L.flyToSelected),"markerOnSelected"in L&&t(48,Z=L.markerOnSelected),"types"in L&&t(49,K=L.types),"reverseGeocodingTypes"in L&&t(50,He=L.reverseGeocodingTypes),"exhaustiveReverseGeocoding"in L&&t(51,st=L.exhaustiveReverseGeocoding),"excludeTypes"in L&&t(52,ot=L.excludeTypes),"reverseGeocodingExcludeTypes"in L&&t(53,We=L.reverseGeocodingExcludeTypes),"zoom"in L&&t(54,pe=L.zoom),"apiUrl"in L&&t(55,ge=L.apiUrl),"fetchParameters"in L&&t(56,ie=L.fetchParameters),"iconsBaseUrl"in L&&t(12,hn=L.iconsBaseUrl),"adjustUrlQuery"in L&&t(57,ui=L.adjustUrlQuery),"adjustUrl"in L&&t(58,ai=L.adjustUrl),"$$scope"in L&&t(69,o=L.$$scope)},i.$$.update=()=>{if(i.$$.dirty[0]&64&&t(0,b=N==="always"),i.$$.dirty[0]&16384|i.$$.dirty[1]&8192&&G!=="marker-only"&&U&&!U.address&&U.geometry.type==="Point"&&U.place_type[0]!=="reverse"&&hi(U.id,{byId:!0}).catch(L=>t(19,Ge=L)),i.$$.dirty[0]&16384|i.$$.dirty[1]&1058|i.$$.dirty[2]&8&&(h&&U&&U.id!==fi&&z&&(di(),k&&t(13,F=void 0),t(64,ce=void 0),t(15,X=-1)),t(65,fi=U==null?void 0:U.id)),i.$$.dirty[0]&196608|i.$$.dirty[1]&1&&setTimeout(()=>{t(16,ht=Ve),R&&!ht&&t(1,T="")}),i.$$.dirty[0]&8194|i.$$.dirty[1]&2048&&T.length<d&&(t(13,F=void 0),t(19,Ge=void 0),t(64,ce=F)),i.$$.dirty[0]&57344|i.$$.dirty[1]&32768&&Q&&F!=null&&F.length&&X==-1&&!U&&t(15,X=0),i.$$.dirty[0]&8192|i.$$.dirty[2]&4&&ce!==F&&t(64,ce=void 0),i.$$.dirty[0]&73729|i.$$.dirty[1]&1024|i.$$.dirty[2]&4&&h&&h.setEventHandler(L=>{switch(L.type){case"mapClick":b&&ws(L.coordinates);break;case"markerClick":{const le=F==null?void 0:F.find(ae=>ae.id===L.id);le&&gi(le)}break;case"markerMouseEnter":ce&&t(15,X=ht?(F==null?void 0:F.findIndex(le=>le.id===L.id))??-1:-1);break;case"markerMouseLeave":ce&&t(15,X=-1);break}}),i.$$.dirty[0]&40960&&t(66,r=F==null?void 0:F[X]),i.$$.dirty[1]&66592|i.$$.dirty[2]&16&&h&&r&&z&&se&&h.flyTo(r.center,Tt(r)),i.$$.dirty[1]&8192&&t(68,n=G==="full-geometry-including-polygon-center-marker"),i.$$.dirty[1]&132096|i.$$.dirty[2]&64&&(Z||h==null||h.setFeatures(void 0,void 0,n)),i.$$.dirty[0]&16384|i.$$.dirty[1]&132096|i.$$.dirty[2]&84&&h&&Z&&!ce&&(h.setFeatures(r?[r]:void 0,U,n),h.setSelectedMarker(r?0:-1)),i.$$.dirty[0]&16384|i.$$.dirty[1]&1024|i.$$.dirty[2]&68&&h&&h.setFeatures(ce,U,n),i.$$.dirty[0]&32768|i.$$.dirty[1]&1024|i.$$.dirty[2]&4&&ce&&h&&h.setSelectedMarker(X),i.$$.dirty[0]&2|i.$$.dirty[1]&1024&&h){const L=ci(T);h.setReverseMarker(L?[L.decimalLongitude,L.decimalLatitude]:void 0)}i.$$.dirty[2]&16&&tt("select",{feature:r}),i.$$.dirty[0]&16384&&tt("pick",{feature:U}),i.$$.dirty[0]&73744&&t(67,u=!!(F!=null&&F.length)&&(ht||I)),i.$$.dirty[2]&32&&tt("optionsvisibilitychange",{optionsVisible:u}),i.$$.dirty[0]&8192&&tt("featureslisted",{features:F}),i.$$.dirty[2]&4&&tt("featuresmarked",{features:ce}),i.$$.dirty[0]&1&&tt("reversetoggle",{reverse:b}),i.$$.dirty[0]&2&&tt("querychange",{query:T}),i.$$.dirty[0]&1|i.$$.dirty[1]&1024&&h&&h.indicateReverse(b)},[b,T,c,M,I,C,N,P,v,p,w,D,hn,F,U,X,ht,Ve,Pe,Ge,lt,vs,mn,Es,pn,gi,yn,Ls,g,E,_,R,k,O,x,B,z,W,s,l,m,h,d,y,G,H,Q,se,Z,K,He,st,ot,We,pe,ge,ie,ui,ai,gs,ms,dn,ps,ys,ce,fi,r,u,n,o,a,_s,Ss,xs,Ts,Ms,Cs,Ns,ks,Os,Rs,Ps,Is,As]}let kr=class extends Je{constructor(e){super(),Xe(this,e,Nr,Cr,Ke,{ZOOM_DEFAULTS:28,class:2,apiKey:29,bbox:30,clearButtonTitle:3,clearOnBlur:31,clearListOnPick:32,keepListOpen:4,collapsed:5,country:33,debounceSearch:34,enableReverse:6,errorMessage:7,filter:35,flyTo:36,fuzzyMatch:37,language:38,limit:39,reverseGeocodingLimit:40,mapController:41,minLength:42,noResultsMessage:8,placeholder:9,proximity:43,reverseActive:0,reverseButtonTitle:10,searchValue:1,pickedResultStyle:44,showPlaceType:11,showResultsWhileTyping:45,selectFirst:46,flyToSelected:47,markerOnSelected:48,types:49,reverseGeocodingTypes:50,exhaustiveReverseGeocoding:51,excludeTypes:52,reverseGeocodingExcludeTypes:53,zoom:54,apiUrl:55,fetchParameters:56,iconsBaseUrl:12,adjustUrlQuery:57,adjustUrl:58,focus:59,blur:60,setQuery:61,clearList:62,clearMap:63},null,[-1,-1,-1,-1])}get ZOOM_DEFAULTS(){return this.$$.ctx[28]}get focus(){return this.$$.ctx[59]}get blur(){return this.$$.ctx[60]}get setQuery(){return this.$$.ctx[61]}get clearList(){return this.$$.ctx[62]}get clearMap(){return this.$$.ctx[63]}};function Et(i,e,t={}){const n={type:"Feature"};return(t.id===0||t.id)&&(n.id=t.id),t.bbox&&(n.bbox=t.bbox),n.properties=e||{},n.geometry=i,n}function ti(i,e,t={}){for(const r of i){if(r.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");if(r[r.length-1].length!==r[0].length)throw new Error("First and last Position are not equivalent.");for(let u=0;u<r[r.length-1].length;u++)if(r[r.length-1][u]!==r[0][u])throw new Error("First and last Position are not equivalent.")}return Et({type:"Polygon",coordinates:i},e,t)}function Lt(i,e={}){const t={type:"FeatureCollection"};return e.id&&(t.id=e.id),e.bbox&&(t.bbox=e.bbox),t.features=i,t}function Fi(i,e,t={}){return Et({type:"MultiPolygon",coordinates:i},e,t)}var Or=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,ii=Math.ceil,Te=Math.floor,be="[BigNumber Error] ",ji=be+"Number primitive has more than 15 significant digits: ",Re=1e14,q=14,Zi=9007199254740991,ni=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],$e=1e7,Ee=1e9;function Hi(i){var e,t,n,r=x.prototype={constructor:x,toString:null,valueOf:null},u=new x(1),a=20,o=4,g=-7,c=21,E=-1e7,_=1e7,M=!1,R=1,k=0,I={prefix:"",groupSize:3,secondaryGroupSize:0,groupSeparator:",",decimalSeparator:".",fractionGroupSize:0,fractionGroupSeparator:" ",suffix:""},C="0123456789abcdefghijklmnopqrstuvwxyz",O=!0;function x(s,l){var f,m,h,d,v,p,y,b,w=this;if(!(w instanceof x))return new x(s,l);if(l==null){if(s&&s._isBigNumber===!0){w.s=s.s,!s.c||s.e>_?w.c=w.e=null:s.e<E?w.c=[w.e=0]:(w.e=s.e,w.c=s.c.slice());return}if((p=typeof s=="number")&&s*0==0){if(w.s=1/s<0?(s=-s,-1):1,s===~~s){for(d=0,v=s;v>=10;v/=10,d++);d>_?w.c=w.e=null:(w.e=d,w.c=[s]);return}b=String(s)}else{if(!Or.test(b=String(s)))return n(w,b,p);w.s=b.charCodeAt(0)==45?(b=b.slice(1),-1):1}(d=b.indexOf("."))>-1&&(b=b.replace(".","")),(v=b.search(/e/i))>0?(d<0&&(d=v),d+=+b.slice(v+1),b=b.substring(0,v)):d<0&&(d=b.length)}else{if(oe(l,2,C.length,"Base"),l==10&&O)return w=new x(s),z(w,a+w.e+1,o);if(b=String(s),p=typeof s=="number"){if(s*0!=0)return n(w,b,p,l);if(w.s=1/s<0?(b=b.slice(1),-1):1,x.DEBUG&&b.replace(/^0\.0*|\./,"").length>15)throw Error(ji+s)}else w.s=b.charCodeAt(0)===45?(b=b.slice(1),-1):1;for(f=C.slice(0,l),d=v=0,y=b.length;v<y;v++)if(f.indexOf(m=b.charAt(v))<0){if(m=="."){if(v>d){d=y;continue}}else if(!h&&(b==b.toUpperCase()&&(b=b.toLowerCase())||b==b.toLowerCase()&&(b=b.toUpperCase()))){h=!0,v=-1,d=0;continue}return n(w,String(s),p,l)}p=!1,b=t(b,l,10,w.s),(d=b.indexOf("."))>-1?b=b.replace(".",""):d=b.length}for(v=0;b.charCodeAt(v)===48;v++);for(y=b.length;b.charCodeAt(--y)===48;);if(b=b.slice(v,++y)){if(y-=v,p&&x.DEBUG&&y>15&&(s>Zi||s!==Te(s)))throw Error(ji+w.s*s);if((d=d-v-1)>_)w.c=w.e=null;else if(d<E)w.c=[w.e=0];else{if(w.e=d,w.c=[],v=(d+1)%q,d<0&&(v+=q),v<y){for(v&&w.c.push(+b.slice(0,v)),y-=q;v<y;)w.c.push(+b.slice(v,v+=q));v=q-(b=b.slice(v)).length}else v-=y;for(;v--;b+="0");w.c.push(+b)}}else w.c=[w.e=0]}x.clone=Hi,x.ROUND_UP=0,x.ROUND_DOWN=1,x.ROUND_CEIL=2,x.ROUND_FLOOR=3,x.ROUND_HALF_UP=4,x.ROUND_HALF_DOWN=5,x.ROUND_HALF_EVEN=6,x.ROUND_HALF_CEIL=7,x.ROUND_HALF_FLOOR=8,x.EUCLID=9,x.config=x.set=function(s){var l,f;if(s!=null)if(typeof s=="object"){if(s.hasOwnProperty(l="DECIMAL_PLACES")&&(f=s[l],oe(f,0,Ee,l),a=f),s.hasOwnProperty(l="ROUNDING_MODE")&&(f=s[l],oe(f,0,8,l),o=f),s.hasOwnProperty(l="EXPONENTIAL_AT")&&(f=s[l],f&&f.pop?(oe(f[0],-1e9,0,l),oe(f[1],0,Ee,l),g=f[0],c=f[1]):(oe(f,-1e9,Ee,l),g=-(c=f<0?-f:f))),s.hasOwnProperty(l="RANGE"))if(f=s[l],f&&f.pop)oe(f[0],-1e9,-1,l),oe(f[1],1,Ee,l),E=f[0],_=f[1];else if(oe(f,-1e9,Ee,l),f)E=-(_=f<0?-f:f);else throw Error(be+l+" cannot be zero: "+f);if(s.hasOwnProperty(l="CRYPTO"))if(f=s[l],f===!!f)if(f)if(typeof crypto<"u"&&crypto&&(crypto.getRandomValues||crypto.randomBytes))M=f;else throw M=!f,Error(be+"crypto unavailable");else M=f;else throw Error(be+l+" not true or false: "+f);if(s.hasOwnProperty(l="MODULO_MODE")&&(f=s[l],oe(f,0,9,l),R=f),s.hasOwnProperty(l="POW_PRECISION")&&(f=s[l],oe(f,0,Ee,l),k=f),s.hasOwnProperty(l="FORMAT"))if(f=s[l],typeof f=="object")I=f;else throw Error(be+l+" not an object: "+f);if(s.hasOwnProperty(l="ALPHABET"))if(f=s[l],typeof f=="string"&&!/^.?$|[+\-.\s]|(.).*\1/.test(f))O=f.slice(0,10)=="0123456789",C=f;else throw Error(be+l+" invalid: "+f)}else throw Error(be+"Object expected: "+s);return{DECIMAL_PLACES:a,ROUNDING_MODE:o,EXPONENTIAL_AT:[g,c],RANGE:[E,_],CRYPTO:M,MODULO_MODE:R,POW_PRECISION:k,FORMAT:I,ALPHABET:C}},x.isBigNumber=function(s){if(!s||s._isBigNumber!==!0)return!1;if(!x.DEBUG)return!0;var l,f,m=s.c,h=s.e,d=s.s;e:if({}.toString.call(m)=="[object Array]"){if((d===1||d===-1)&&h>=-1e9&&h<=Ee&&h===Te(h)){if(m[0]===0){if(h===0&&m.length===1)return!0;break e}if(l=(h+1)%q,l<1&&(l+=q),String(m[0]).length==l){for(l=0;l<m.length;l++)if(f=m[l],f<0||f>=Re||f!==Te(f))break e;if(f!==0)return!0}}}else if(m===null&&h===null&&(d===null||d===1||d===-1))return!0;throw Error(be+"Invalid BigNumber: "+s)},x.maximum=x.max=function(){return P(arguments,-1)},x.minimum=x.min=function(){return P(arguments,1)},x.random=function(){var s=9007199254740992,l=Math.random()*s&2097151?function(){return Te(Math.random()*s)}:function(){return(Math.random()*1073741824|0)*8388608+(Math.random()*8388608|0)};return function(f){var m,h,d,v,p,y=0,b=[],w=new x(u);if(f==null?f=a:oe(f,0,Ee),v=ii(f/q),M)if(crypto.getRandomValues){for(m=crypto.getRandomValues(new Uint32Array(v*=2));y<v;)p=m[y]*131072+(m[y+1]>>>11),p>=9e15?(h=crypto.getRandomValues(new Uint32Array(2)),m[y]=h[0],m[y+1]=h[1]):(b.push(p%1e14),y+=2);y=v/2}else if(crypto.randomBytes){for(m=crypto.randomBytes(v*=7);y<v;)p=(m[y]&31)*281474976710656+m[y+1]*1099511627776+m[y+2]*4294967296+m[y+3]*16777216+(m[y+4]<<16)+(m[y+5]<<8)+m[y+6],p>=9e15?crypto.randomBytes(7).copy(m,y):(b.push(p%1e14),y+=7);y=v/7}else throw M=!1,Error(be+"crypto unavailable");if(!M)for(;y<v;)p=l(),p<9e15&&(b[y++]=p%1e14);for(v=b[--y],f%=q,v&&f&&(p=ni[q-f],b[y]=Te(v/p)*p);b[y]===0;b.pop(),y--);if(y<0)b=[d=0];else{for(d=-1;b[0]===0;b.splice(0,1),d-=q);for(y=1,p=b[0];p>=10;p/=10,y++);y<q&&(d-=q-y)}return w.e=d,w.c=b,w}}(),x.sum=function(){for(var s=1,l=arguments,f=new x(l[0]);s<l.length;)f=f.plus(l[s++]);return f},t=function(){var s="0123456789";function l(f,m,h,d){for(var v,p=[0],y,b=0,w=f.length;b<w;){for(y=p.length;y--;p[y]*=m);for(p[0]+=d.indexOf(f.charAt(b++)),v=0;v<p.length;v++)p[v]>h-1&&(p[v+1]==null&&(p[v+1]=0),p[v+1]+=p[v]/h|0,p[v]%=h)}return p.reverse()}return function(f,m,h,d,v){var p,y,b,w,T,G,D,H,Q=f.indexOf("."),se=a,Z=o;for(Q>=0&&(w=k,k=0,f=f.replace(".",""),H=new x(m),G=H.pow(f.length-Q),k=w,H.c=l(je(Ce(G.c),G.e,"0"),10,h,s),H.e=H.c.length),D=l(f,m,h,v?(p=C,s):(p=s,C)),b=w=D.length;D[--w]==0;D.pop());if(!D[0])return p.charAt(0);if(Q<0?--b:(G.c=D,G.e=b,G.s=d,G=e(G,H,se,Z,h),D=G.c,T=G.r,b=G.e),y=b+se+1,Q=D[y],w=h/2,T=T||y<0||D[y+1]!=null,T=Z<4?(Q!=null||T)&&(Z==0||Z==(G.s<0?3:2)):Q>w||Q==w&&(Z==4||T||Z==6&&D[y-1]&1||Z==(G.s<0?8:7)),y<1||!D[0])f=T?je(p.charAt(1),-se,p.charAt(0)):p.charAt(0);else{if(D.length=y,T)for(--h;++D[--y]>h;)D[y]=0,y||(++b,D=[1].concat(D));for(w=D.length;!D[--w];);for(Q=0,f="";Q<=w;f+=p.charAt(D[Q++]));f=je(f,b,p.charAt(0))}return f}}(),e=function(){function s(m,h,d){var v,p,y,b,w=0,T=m.length,G=h%$e,D=h/$e|0;for(m=m.slice();T--;)y=m[T]%$e,b=m[T]/$e|0,v=D*y+b*G,p=G*y+v%$e*$e+w,w=(p/d|0)+(v/$e|0)+D*b,m[T]=p%d;return w&&(m=[w].concat(m)),m}function l(m,h,d,v){var p,y;if(d!=v)y=d>v?1:-1;else for(p=y=0;p<d;p++)if(m[p]!=h[p]){y=m[p]>h[p]?1:-1;break}return y}function f(m,h,d,v){for(var p=0;d--;)m[d]-=p,p=m[d]<h[d]?1:0,m[d]=p*v+m[d]-h[d];for(;!m[0]&&m.length>1;m.splice(0,1));}return function(m,h,d,v,p){var y,b,w,T,G,D,H,Q,se,Z,K,de,He,st,ot,Le,We,pe=m.s==h.s?1:-1,ge=m.c,ie=h.c;if(!ge||!ge[0]||!ie||!ie[0])return new x(!m.s||!h.s||(ge?ie&&ge[0]==ie[0]:!ie)?NaN:ge&&ge[0]==0||!ie?pe*0:pe/0);for(Q=new x(pe),se=Q.c=[],b=m.e-h.e,pe=d+b+1,p||(p=Re,b=Me(m.e/q)-Me(h.e/q),pe=pe/q|0),w=0;ie[w]==(ge[w]||0);w++);if(ie[w]>(ge[w]||0)&&b--,pe<0)se.push(1),T=!0;else{for(st=ge.length,Le=ie.length,w=0,pe+=2,G=Te(p/(ie[0]+1)),G>1&&(ie=s(ie,G,p),ge=s(ge,G,p),Le=ie.length,st=ge.length),He=Le,Z=ge.slice(0,Le),K=Z.length;K<Le;Z[K++]=0);We=ie.slice(),We=[0].concat(We),ot=ie[0],ie[1]>=p/2&&ot++;do{if(G=0,y=l(ie,Z,Le,K),y<0){if(de=Z[0],Le!=K&&(de=de*p+(Z[1]||0)),G=Te(de/ot),G>1)for(G>=p&&(G=p-1),D=s(ie,G,p),H=D.length,K=Z.length;l(D,Z,H,K)==1;)G--,f(D,Le<H?We:ie,H,p),H=D.length,y=1;else G==0&&(y=G=1),D=ie.slice(),H=D.length;if(H<K&&(D=[0].concat(D)),f(Z,D,K,p),K=Z.length,y==-1)for(;l(ie,Z,Le,K)<1;)G++,f(Z,Le<K?We:ie,K,p),K=Z.length}else y===0&&(G++,Z=[0]);se[w++]=G,Z[0]?Z[K++]=ge[He]||0:(Z=[ge[He]],K=1)}while((He++<st||Z[0]!=null)&&pe--);T=Z[0]!=null,se[0]||se.splice(0,1)}if(p==Re){for(w=1,pe=se[0];pe>=10;pe/=10,w++);z(Q,d+(Q.e=w+b*q-1)+1,v,T)}else Q.e=b,Q.r=+T;return Q}}();function N(s,l,f,m){var h,d,v,p,y;if(f==null?f=o:oe(f,0,8),!s.c)return s.toString();if(h=s.c[0],v=s.e,l==null)y=Ce(s.c),y=m==1||m==2&&(v<=g||v>=c)?Gt(y,v):je(y,v,"0");else if(s=z(new x(s),l,f),d=s.e,y=Ce(s.c),p=y.length,m==1||m==2&&(l<=d||d<=g)){for(;p<l;y+="0",p++);y=Gt(y,d)}else if(l-=v,y=je(y,d,"0"),d+1>p){if(--l>0)for(y+=".";l--;y+="0");}else if(l+=d-p,l>0)for(d+1==p&&(y+=".");l--;y+="0");return s.s<0&&h?"-"+y:y}function P(s,l){for(var f,m,h=1,d=new x(s[0]);h<s.length;h++)m=new x(s[h]),(!m.s||(f=rt(d,m))===l||f===0&&d.s===l)&&(d=m);return d}function B(s,l,f){for(var m=1,h=l.length;!l[--h];l.pop());for(h=l[0];h>=10;h/=10,m++);return(f=m+f*q-1)>_?s.c=s.e=null:f<E?s.c=[s.e=0]:(s.e=f,s.c=l),s}n=function(){var s=/^(-?)0([xbo])(?=\w[\w.]*$)/i,l=/^([^.]+)\.$/,f=/^\.([^.]+)$/,m=/^-?(Infinity|NaN)$/,h=/^\s*\+(?=[\w.])|^\s+|\s+$/g;return function(d,v,p,y){var b,w=p?v:v.replace(h,"");if(m.test(w))d.s=isNaN(w)?null:w<0?-1:1;else{if(!p&&(w=w.replace(s,function(T,G,D){return b=(D=D.toLowerCase())=="x"?16:D=="b"?2:8,!y||y==b?G:T}),y&&(b=y,w=w.replace(l,"$1").replace(f,"0.$1")),v!=w))return new x(w,b);if(x.DEBUG)throw Error(be+"Not a"+(y?" base "+y:"")+" number: "+v);d.s=null}d.c=d.e=null}}();function z(s,l,f,m){var h,d,v,p,y,b,w,T=s.c,G=ni;if(T){e:{for(h=1,p=T[0];p>=10;p/=10,h++);if(d=l-h,d<0)d+=q,v=l,y=T[b=0],w=Te(y/G[h-v-1]%10);else if(b=ii((d+1)/q),b>=T.length)if(m){for(;T.length<=b;T.push(0));y=w=0,h=1,d%=q,v=d-q+1}else break e;else{for(y=p=T[b],h=1;p>=10;p/=10,h++);d%=q,v=d-q+h,w=v<0?0:Te(y/G[h-v-1]%10)}if(m=m||l<0||T[b+1]!=null||(v<0?y:y%G[h-v-1]),m=f<4?(w||m)&&(f==0||f==(s.s<0?3:2)):w>5||w==5&&(f==4||m||f==6&&(d>0?v>0?y/G[h-v]:0:T[b-1])%10&1||f==(s.s<0?8:7)),l<1||!T[0])return T.length=0,m?(l-=s.e+1,T[0]=G[(q-l%q)%q],s.e=-l||0):T[0]=s.e=0,s;if(d==0?(T.length=b,p=1,b--):(T.length=b+1,p=G[q-d],T[b]=v>0?Te(y/G[h-v]%G[v])*p:0),m)for(;;)if(b==0){for(d=1,v=T[0];v>=10;v/=10,d++);for(v=T[0]+=p,p=1;v>=10;v/=10,p++);d!=p&&(s.e++,T[0]==Re&&(T[0]=1));break}else{if(T[b]+=p,T[b]!=Re)break;T[b--]=0,p=1}for(d=T.length;T[--d]===0;T.pop());}s.e>_?s.c=s.e=null:s.e<E&&(s.c=[s.e=0])}return s}function W(s){var l,f=s.e;return f===null?s.toString():(l=Ce(s.c),l=f<=g||f>=c?Gt(l,f):je(l,f,"0"),s.s<0?"-"+l:l)}return r.absoluteValue=r.abs=function(){var s=new x(this);return s.s<0&&(s.s=1),s},r.comparedTo=function(s,l){return rt(this,new x(s,l))},r.decimalPlaces=r.dp=function(s,l){var f,m,h,d=this;if(s!=null)return oe(s,0,Ee),l==null?l=o:oe(l,0,8),z(new x(d),s+d.e+1,l);if(!(f=d.c))return null;if(m=((h=f.length-1)-Me(this.e/q))*q,h=f[h])for(;h%10==0;h/=10,m--);return m<0&&(m=0),m},r.dividedBy=r.div=function(s,l){return e(this,new x(s,l),a,o)},r.dividedToIntegerBy=r.idiv=function(s,l){return e(this,new x(s,l),0,1)},r.exponentiatedBy=r.pow=function(s,l){var f,m,h,d,v,p,y,b,w,T=this;if(s=new x(s),s.c&&!s.isInteger())throw Error(be+"Exponent not an integer: "+W(s));if(l!=null&&(l=new x(l)),p=s.e>14,!T.c||!T.c[0]||T.c[0]==1&&!T.e&&T.c.length==1||!s.c||!s.c[0])return w=new x(Math.pow(+W(T),p?s.s*(2-Wt(s)):+W(s))),l?w.mod(l):w;if(y=s.s<0,l){if(l.c?!l.c[0]:!l.s)return new x(NaN);m=!y&&T.isInteger()&&l.isInteger(),m&&(T=T.mod(l))}else{if(s.e>9&&(T.e>0||T.e<-1||(T.e==0?T.c[0]>1||p&&T.c[1]>=24e7:T.c[0]<8e13||p&&T.c[0]<=9999975e7)))return d=T.s<0&&Wt(s)?-0:0,T.e>-1&&(d=1/d),new x(y?1/d:d);k&&(d=ii(k/q+2))}for(p?(f=new x(.5),y&&(s.s=1),b=Wt(s)):(h=Math.abs(+W(s)),b=h%2),w=new x(u);;){if(b){if(w=w.times(T),!w.c)break;d?w.c.length>d&&(w.c.length=d):m&&(w=w.mod(l))}if(h){if(h=Te(h/2),h===0)break;b=h%2}else if(s=s.times(f),z(s,s.e+1,1),s.e>14)b=Wt(s);else{if(h=+W(s),h===0)break;b=h%2}T=T.times(T),d?T.c&&T.c.length>d&&(T.c.length=d):m&&(T=T.mod(l))}return m?w:(y&&(w=u.div(w)),l?w.mod(l):d?z(w,k,o,v):w)},r.integerValue=function(s){var l=new x(this);return s==null?s=o:oe(s,0,8),z(l,l.e+1,s)},r.isEqualTo=r.eq=function(s,l){return rt(this,new x(s,l))===0},r.isFinite=function(){return!!this.c},r.isGreaterThan=r.gt=function(s,l){return rt(this,new x(s,l))>0},r.isGreaterThanOrEqualTo=r.gte=function(s,l){return(l=rt(this,new x(s,l)))===1||l===0},r.isInteger=function(){return!!this.c&&Me(this.e/q)>this.c.length-2},r.isLessThan=r.lt=function(s,l){return rt(this,new x(s,l))<0},r.isLessThanOrEqualTo=r.lte=function(s,l){return(l=rt(this,new x(s,l)))===-1||l===0},r.isNaN=function(){return!this.s},r.isNegative=function(){return this.s<0},r.isPositive=function(){return this.s>0},r.isZero=function(){return!!this.c&&this.c[0]==0},r.minus=function(s,l){var f,m,h,d,v=this,p=v.s;if(s=new x(s,l),l=s.s,!p||!l)return new x(NaN);if(p!=l)return s.s=-l,v.plus(s);var y=v.e/q,b=s.e/q,w=v.c,T=s.c;if(!y||!b){if(!w||!T)return w?(s.s=-l,s):new x(T?v:NaN);if(!w[0]||!T[0])return T[0]?(s.s=-l,s):new x(w[0]?v:o==3?-0:0)}if(y=Me(y),b=Me(b),w=w.slice(),p=y-b){for((d=p<0)?(p=-p,h=w):(b=y,h=T),h.reverse(),l=p;l--;h.push(0));h.reverse()}else for(m=(d=(p=w.length)<(l=T.length))?p:l,p=l=0;l<m;l++)if(w[l]!=T[l]){d=w[l]<T[l];break}if(d&&(h=w,w=T,T=h,s.s=-s.s),l=(m=T.length)-(f=w.length),l>0)for(;l--;w[f++]=0);for(l=Re-1;m>p;){if(w[--m]<T[m]){for(f=m;f&&!w[--f];w[f]=l);--w[f],w[m]+=Re}w[m]-=T[m]}for(;w[0]==0;w.splice(0,1),--b);return w[0]?B(s,w,b):(s.s=o==3?-1:1,s.c=[s.e=0],s)},r.modulo=r.mod=function(s,l){var f,m,h=this;return s=new x(s,l),!h.c||!s.s||s.c&&!s.c[0]?new x(NaN):!s.c||h.c&&!h.c[0]?new x(h):(R==9?(m=s.s,s.s=1,f=e(h,s,0,3),s.s=m,f.s*=m):f=e(h,s,0,R),s=h.minus(f.times(s)),!s.c[0]&&R==1&&(s.s=h.s),s)},r.multipliedBy=r.times=function(s,l){var f,m,h,d,v,p,y,b,w,T,G,D,H,Q,se,Z=this,K=Z.c,de=(s=new x(s,l)).c;if(!K||!de||!K[0]||!de[0])return!Z.s||!s.s||K&&!K[0]&&!de||de&&!de[0]&&!K?s.c=s.e=s.s=null:(s.s*=Z.s,!K||!de?s.c=s.e=null:(s.c=[0],s.e=0)),s;for(m=Me(Z.e/q)+Me(s.e/q),s.s*=Z.s,y=K.length,T=de.length,y<T&&(H=K,K=de,de=H,h=y,y=T,T=h),h=y+T,H=[];h--;H.push(0));for(Q=Re,se=$e,h=T;--h>=0;){for(f=0,G=de[h]%se,D=de[h]/se|0,v=y,d=h+v;d>h;)b=K[--v]%se,w=K[v]/se|0,p=D*b+w*G,b=G*b+p%se*se+H[d]+f,f=(b/Q|0)+(p/se|0)+D*w,H[d--]=b%Q;H[d]=f}return f?++m:H.splice(0,1),B(s,H,m)},r.negated=function(){var s=new x(this);return s.s=-s.s||null,s},r.plus=function(s,l){var f,m=this,h=m.s;if(s=new x(s,l),l=s.s,!h||!l)return new x(NaN);if(h!=l)return s.s=-l,m.minus(s);var d=m.e/q,v=s.e/q,p=m.c,y=s.c;if(!d||!v){if(!p||!y)return new x(h/0);if(!p[0]||!y[0])return y[0]?s:new x(p[0]?m:h*0)}if(d=Me(d),v=Me(v),p=p.slice(),h=d-v){for(h>0?(v=d,f=y):(h=-h,f=p),f.reverse();h--;f.push(0));f.reverse()}for(h=p.length,l=y.length,h-l<0&&(f=y,y=p,p=f,l=h),h=0;l;)h=(p[--l]=p[l]+y[l]+h)/Re|0,p[l]=Re===p[l]?0:p[l]%Re;return h&&(p=[h].concat(p),++v),B(s,p,v)},r.precision=r.sd=function(s,l){var f,m,h,d=this;if(s!=null&&s!==!!s)return oe(s,1,Ee),l==null?l=o:oe(l,0,8),z(new x(d),s,l);if(!(f=d.c))return null;if(h=f.length-1,m=h*q+1,h=f[h]){for(;h%10==0;h/=10,m--);for(h=f[0];h>=10;h/=10,m++);}return s&&d.e+1>m&&(m=d.e+1),m},r.shiftedBy=function(s){return oe(s,-9007199254740991,Zi),this.times("1e"+s)},r.squareRoot=r.sqrt=function(){var s,l,f,m,h,d=this,v=d.c,p=d.s,y=d.e,b=a+4,w=new x("0.5");if(p!==1||!v||!v[0])return new x(!p||p<0&&(!v||v[0])?NaN:v?d:1/0);if(p=Math.sqrt(+W(d)),p==0||p==1/0?(l=Ce(v),(l.length+y)%2==0&&(l+="0"),p=Math.sqrt(+l),y=Me((y+1)/2)-(y<0||y%2),p==1/0?l="5e"+y:(l=p.toExponential(),l=l.slice(0,l.indexOf("e")+1)+y),f=new x(l)):f=new x(p+""),f.c[0]){for(y=f.e,p=y+b,p<3&&(p=0);;)if(h=f,f=w.times(h.plus(e(d,h,b,1))),Ce(h.c).slice(0,p)===(l=Ce(f.c)).slice(0,p))if(f.e<y&&--p,l=l.slice(p-3,p+1),l=="9999"||!m&&l=="4999"){if(!m&&(z(h,h.e+a+2,0),h.times(h).eq(d))){f=h;break}b+=4,p+=4,m=1}else{(!+l||!+l.slice(1)&&l.charAt(0)=="5")&&(z(f,f.e+a+2,1),s=!f.times(f).eq(d));break}}return z(f,f.e+a+1,o,s)},r.toExponential=function(s,l){return s!=null&&(oe(s,0,Ee),s++),N(this,s,l,1)},r.toFixed=function(s,l){return s!=null&&(oe(s,0,Ee),s=s+this.e+1),N(this,s,l)},r.toFormat=function(s,l,f){var m,h=this;if(f==null)s!=null&&l&&typeof l=="object"?(f=l,l=null):s&&typeof s=="object"?(f=s,s=l=null):f=I;else if(typeof f!="object")throw Error(be+"Argument not an object: "+f);if(m=h.toFixed(s,l),h.c){var d,v=m.split("."),p=+f.groupSize,y=+f.secondaryGroupSize,b=f.groupSeparator||"",w=v[0],T=v[1],G=h.s<0,D=G?w.slice(1):w,H=D.length;if(y&&(d=p,p=y,y=d,H-=d),p>0&&H>0){for(d=H%p||p,w=D.substr(0,d);d<H;d+=p)w+=b+D.substr(d,p);y>0&&(w+=b+D.slice(d)),G&&(w="-"+w)}m=T?w+(f.decimalSeparator||"")+((y=+f.fractionGroupSize)?T.replace(new RegExp("\\d{"+y+"}\\B","g"),"$&"+(f.fractionGroupSeparator||"")):T):w}return(f.prefix||"")+m+(f.suffix||"")},r.toFraction=function(s){var l,f,m,h,d,v,p,y,b,w,T,G,D=this,H=D.c;if(s!=null&&(p=new x(s),!p.isInteger()&&(p.c||p.s!==1)||p.lt(u)))throw Error(be+"Argument "+(p.isInteger()?"out of range: ":"not an integer: ")+W(p));if(!H)return new x(D);for(l=new x(u),b=f=new x(u),m=y=new x(u),G=Ce(H),d=l.e=G.length-D.e-1,l.c[0]=ni[(v=d%q)<0?q+v:v],s=!s||p.comparedTo(l)>0?d>0?l:b:p,v=_,_=1/0,p=new x(G),y.c[0]=0;w=e(p,l,0,1),h=f.plus(w.times(m)),h.comparedTo(s)!=1;)f=m,m=h,b=y.plus(w.times(h=b)),y=h,l=p.minus(w.times(h=l)),p=h;return h=e(s.minus(f),m,0,1),y=y.plus(h.times(b)),f=f.plus(h.times(m)),y.s=b.s=D.s,d=d*2,T=e(b,m,d,o).minus(D).abs().comparedTo(e(y,f,d,o).minus(D).abs())<1?[b,m]:[y,f],_=v,T},r.toNumber=function(){return+W(this)},r.toPrecision=function(s,l){return s!=null&&oe(s,1,Ee),N(this,s,l,2)},r.toString=function(s){var l,f=this,m=f.s,h=f.e;return h===null?m?(l="Infinity",m<0&&(l="-"+l)):l="NaN":(s==null?l=h<=g||h>=c?Gt(Ce(f.c),h):je(Ce(f.c),h,"0"):s===10&&O?(f=z(new x(f),a+h+1,o),l=je(Ce(f.c),f.e,"0")):(oe(s,2,C.length,"Base"),l=t(je(Ce(f.c),h,"0"),10,s,m,!0)),m<0&&f.c[0]&&(l="-"+l)),l},r.valueOf=r.toJSON=function(){return W(this)},r._isBigNumber=!0,r[Symbol.toStringTag]="BigNumber",r[Symbol.for("nodejs.util.inspect.custom")]=r.valueOf,i!=null&&x.set(i),x}function Me(i){var e=i|0;return i>0||i===e?e:e-1}function Ce(i){for(var e,t,n=1,r=i.length,u=i[0]+"";n<r;){for(e=i[n++]+"",t=q-e.length;t--;e="0"+e);u+=e}for(r=u.length;u.charCodeAt(--r)===48;);return u.slice(0,r+1||1)}function rt(i,e){var t,n,r=i.c,u=e.c,a=i.s,o=e.s,g=i.e,c=e.e;if(!a||!o)return null;if(t=r&&!r[0],n=u&&!u[0],t||n)return t?n?0:-o:a;if(a!=o)return a;if(t=a<0,n=g==c,!r||!u)return n?0:!r^t?1:-1;if(!n)return g>c^t?1:-1;for(o=(g=r.length)<(c=u.length)?g:c,a=0;a<o;a++)if(r[a]!=u[a])return r[a]>u[a]^t?1:-1;return g==c?0:g>c^t?1:-1}function oe(i,e,t,n){if(i<e||i>t||i!==Te(i))throw Error(be+(n||"Argument")+(typeof i=="number"?i<e||i>t?" out of range: ":" not an integer: ":" not a primitive number: ")+String(i))}function Wt(i){var e=i.c.length-1;return Me(i.e/q)==e&&i.c[e]%2!=0}function Gt(i,e){return(i.length>1?i.charAt(0)+"."+i.slice(1):i)+(e<0?"e":"e+")+e}function je(i,e,t){var n,r;if(e<0){for(r=t+".";++e;r+=t);i=r+i}else if(n=i.length,++e>n){for(r=t,e-=n;--e;r+=t);i+=r}else e<n&&(i=i.slice(0,e)+"."+i.slice(e));return i}var Ae=Hi(),Rr=class{constructor(i){A(this,"key");A(this,"left",null);A(this,"right",null);this.key=i}},_t=class extends Rr{constructor(i){super(i)}},Pr=class{constructor(){A(this,"size",0);A(this,"modificationCount",0);A(this,"splayCount",0)}splay(i){const e=this.root;if(e==null)return this.compare(i,i),-1;let t=null,n=null,r=null,u=null,a=e;const o=this.compare;let g;for(;;)if(g=o(a.key,i),g>0){let c=a.left;if(c==null||(g=o(c.key,i),g>0&&(a.left=c.right,c.right=a,a=c,c=a.left,c==null)))break;t==null?n=a:t.left=a,t=a,a=c}else if(g<0){let c=a.right;if(c==null||(g=o(c.key,i),g<0&&(a.right=c.left,c.left=a,a=c,c=a.right,c==null)))break;r==null?u=a:r.right=a,r=a,a=c}else break;return r!=null&&(r.right=a.left,a.left=u),t!=null&&(t.left=a.right,a.right=n),this.root!==a&&(this.root=a,this.splayCount++),g}splayMin(i){let e=i,t=e.left;for(;t!=null;){const n=t;e.left=n.right,n.right=e,e=n,t=e.left}return e}splayMax(i){let e=i,t=e.right;for(;t!=null;){const n=t;e.right=n.left,n.left=e,e=n,t=e.right}return e}_delete(i){if(this.root==null||this.splay(i)!=0)return null;let t=this.root;const n=t,r=t.left;if(this.size--,r==null)this.root=t.right;else{const u=t.right;t=this.splayMax(r),t.right=u,this.root=t}return this.modificationCount++,n}addNewRoot(i,e){this.size++,this.modificationCount++;const t=this.root;if(t==null){this.root=i;return}e<0?(i.left=t,i.right=t.right,t.right=null):(i.right=t,i.left=t.left,t.left=null),this.root=i}_first(){const i=this.root;return i==null?null:(this.root=this.splayMin(i),this.root)}_last(){const i=this.root;return i==null?null:(this.root=this.splayMax(i),this.root)}clear(){this.root=null,this.size=0,this.modificationCount++}has(i){return this.validKey(i)&&this.splay(i)==0}defaultCompare(){return(i,e)=>i<e?-1:i>e?1:0}wrap(){return{getRoot:()=>this.root,setRoot:i=>{this.root=i},getSize:()=>this.size,getModificationCount:()=>this.modificationCount,getSplayCount:()=>this.splayCount,setSplayCount:i=>{this.splayCount=i},splay:i=>this.splay(i),has:i=>this.has(i)}}},Dt=class Ot extends Pr{constructor(t,n){super();A(this,"root",null);A(this,"compare");A(this,"validKey");A(this,fn,"[object Set]");this.compare=t??this.defaultCompare(),this.validKey=n??(r=>r!=null&&r!=null)}delete(t){return this.validKey(t)?this._delete(t)!=null:!1}deleteAll(t){for(const n of t)this.delete(n)}forEach(t){const n=this[Symbol.iterator]();let r;for(;r=n.next(),!r.done;)t(r.value,r.value,this)}add(t){const n=this.splay(t);return n!=0&&this.addNewRoot(new _t(t),n),this}addAndReturn(t){const n=this.splay(t);return n!=0&&this.addNewRoot(new _t(t),n),this.root.key}addAll(t){for(const n of t)this.add(n)}isEmpty(){return this.root==null}isNotEmpty(){return this.root!=null}single(){if(this.size==0)throw"Bad state: No element";if(this.size>1)throw"Bad state: Too many element";return this.root.key}first(){if(this.size==0)throw"Bad state: No element";return this._first().key}last(){if(this.size==0)throw"Bad state: No element";return this._last().key}lastBefore(t){if(t==null)throw"Invalid arguments(s)";if(this.root==null)return null;if(this.splay(t)<0)return this.root.key;let r=this.root.left;if(r==null)return null;let u=r.right;for(;u!=null;)r=u,u=r.right;return r.key}firstAfter(t){if(t==null)throw"Invalid arguments(s)";if(this.root==null)return null;if(this.splay(t)>0)return this.root.key;let r=this.root.right;if(r==null)return null;let u=r.left;for(;u!=null;)r=u,u=r.left;return r.key}retainAll(t){const n=new Ot(this.compare,this.validKey),r=this.modificationCount;for(const u of t){if(r!=this.modificationCount)throw"Concurrent modification during iteration.";this.validKey(u)&&this.splay(u)==0&&n.add(this.root.key)}n.size!=this.size&&(this.root=n.root,this.size=n.size,this.modificationCount++)}lookup(t){return!this.validKey(t)||this.splay(t)!=0?null:this.root.key}intersection(t){const n=new Ot(this.compare,this.validKey);for(const r of this)t.has(r)&&n.add(r);return n}difference(t){const n=new Ot(this.compare,this.validKey);for(const r of this)t.has(r)||n.add(r);return n}union(t){const n=this.clone();return n.addAll(t),n}clone(){const t=new Ot(this.compare,this.validKey);return t.size=this.size,t.root=this.copyNode(this.root),t}copyNode(t){if(t==null)return null;function n(u,a){let o,g;do{if(o=u.left,g=u.right,o!=null){const c=new _t(o.key);a.left=c,n(o,c)}if(g!=null){const c=new _t(g.key);a.right=c,u=g,a=c}}while(g!=null)}const r=new _t(t.key);return n(t,r),r}toSet(){return this.clone()}entries(){return new Ar(this.wrap())}keys(){return this[Symbol.iterator]()}values(){return this[Symbol.iterator]()}[(cn=Symbol.iterator,fn=Symbol.toStringTag,cn)](){return new Ir(this.wrap())}},Vi=class{constructor(i){A(this,"tree");A(this,"path",new Array);A(this,"modificationCount",null);A(this,"splayCount");this.tree=i,this.splayCount=i.getSplayCount()}[Symbol.iterator](){return this}next(){return this.moveNext()?{done:!1,value:this.current()}:{done:!0,value:null}}current(){if(!this.path.length)return null;const i=this.path[this.path.length-1];return this.getValue(i)}rebuildPath(i){this.path.splice(0,this.path.length),this.tree.splay(i),this.path.push(this.tree.getRoot()),this.splayCount=this.tree.getSplayCount()}findLeftMostDescendent(i){for(;i!=null;)this.path.push(i),i=i.left}moveNext(){if(this.modificationCount!=this.tree.getModificationCount()){if(this.modificationCount==null){this.modificationCount=this.tree.getModificationCount();let t=this.tree.getRoot();for(;t!=null;)this.path.push(t),t=t.left;return this.path.length>0}throw"Concurrent modification during iteration."}if(!this.path.length)return!1;this.splayCount!=this.tree.getSplayCount()&&this.rebuildPath(this.path[this.path.length-1].key);let i=this.path[this.path.length-1],e=i.right;if(e!=null){for(;e!=null;)this.path.push(e),e=e.left;return!0}for(this.path.pop();this.path.length&&this.path[this.path.length-1].right===i;)i=this.path.pop();return this.path.length>0}},Ir=class extends Vi{getValue(i){return i.key}},Ar=class extends Vi{getValue(i){return[i.key,i.key]}},Ki=i=>()=>i,ri=i=>{const e=i?(t,n)=>n.minus(t).abs().isLessThanOrEqualTo(i):Ki(!1);return(t,n)=>e(t,n)?0:t.comparedTo(n)};function Br(i){const e=i?(t,n,r,u,a)=>t.exponentiatedBy(2).isLessThanOrEqualTo(u.minus(n).exponentiatedBy(2).plus(a.minus(r).exponentiatedBy(2)).times(i)):Ki(!1);return(t,n,r)=>{const u=t.x,a=t.y,o=r.x,g=r.y,c=a.minus(g).times(n.x.minus(o)).minus(u.minus(o).times(n.y.minus(g)));return e(c,u,a,o,g)?0:c.comparedTo(0)}}var Wr=i=>i,Gr=i=>{if(i){const e=new Dt(ri(i)),t=new Dt(ri(i)),n=(u,a)=>a.addAndReturn(u),r=u=>({x:n(u.x,e),y:n(u.y,t)});return r({x:new Ae(0),y:new Ae(0)}),r}return Wr},si=i=>({set:e=>{Ze=si(e)},reset:()=>si(i),compare:ri(i),snap:Gr(i),orient:Br(i)}),Ze=si(),St=(i,e)=>i.ll.x.isLessThanOrEqualTo(e.x)&&e.x.isLessThanOrEqualTo(i.ur.x)&&i.ll.y.isLessThanOrEqualTo(e.y)&&e.y.isLessThanOrEqualTo(i.ur.y),oi=(i,e)=>{if(e.ur.x.isLessThan(i.ll.x)||i.ur.x.isLessThan(e.ll.x)||e.ur.y.isLessThan(i.ll.y)||i.ur.y.isLessThan(e.ll.y))return null;const t=i.ll.x.isLessThan(e.ll.x)?e.ll.x:i.ll.x,n=i.ur.x.isLessThan(e.ur.x)?i.ur.x:e.ur.x,r=i.ll.y.isLessThan(e.ll.y)?e.ll.y:i.ll.y,u=i.ur.y.isLessThan(e.ur.y)?i.ur.y:e.ur.y;return{ll:{x:t,y:r},ur:{x:n,y:u}}},zt=(i,e)=>i.x.times(e.y).minus(i.y.times(e.x)),Yi=(i,e)=>i.x.times(e.x).plus(i.y.times(e.y)),Ut=i=>Yi(i,i).sqrt(),Dr=(i,e,t)=>{const n={x:e.x.minus(i.x),y:e.y.minus(i.y)},r={x:t.x.minus(i.x),y:t.y.minus(i.y)};return zt(r,n).div(Ut(r)).div(Ut(n))},zr=(i,e,t)=>{const n={x:e.x.minus(i.x),y:e.y.minus(i.y)},r={x:t.x.minus(i.x),y:t.y.minus(i.y)};return Yi(r,n).div(Ut(r)).div(Ut(n))},Qi=(i,e,t)=>e.y.isZero()?null:{x:i.x.plus(e.x.div(e.y).times(t.minus(i.y))),y:t},Xi=(i,e,t)=>e.x.isZero()?null:{x:t,y:i.y.plus(e.y.div(e.x).times(t.minus(i.x)))},Ur=(i,e,t,n)=>{if(e.x.isZero())return Xi(t,n,i.x);if(n.x.isZero())return Xi(i,e,t.x);if(e.y.isZero())return Qi(t,n,i.y);if(n.y.isZero())return Qi(i,e,t.y);const r=zt(e,n);if(r.isZero())return null;const u={x:t.x.minus(i.x),y:t.y.minus(i.y)},a=zt(u,e).div(r),o=zt(u,n).div(r),g=i.x.plus(o.times(e.x)),c=t.x.plus(a.times(n.x)),E=i.y.plus(o.times(e.y)),_=t.y.plus(a.times(n.y)),M=g.plus(c).div(2),R=E.plus(_).div(2);return{x:M,y:R}},Be=class En{constructor(e,t){A(this,"point");A(this,"isLeft");A(this,"segment");A(this,"otherSE");A(this,"consumedBy");e.events===void 0?e.events=[this]:e.events.push(this),this.point=e,this.isLeft=t}static compare(e,t){const n=En.comparePoints(e.point,t.point);return n!==0?n:(e.point!==t.point&&e.link(t),e.isLeft!==t.isLeft?e.isLeft?1:-1:Ft.compare(e.segment,t.segment))}static comparePoints(e,t){return e.x.isLessThan(t.x)?-1:e.x.isGreaterThan(t.x)?1:e.y.isLessThan(t.y)?-1:e.y.isGreaterThan(t.y)?1:0}link(e){if(e.point===this.point)throw new Error("Tried to link already linked events");const t=e.point.events;for(let n=0,r=t.length;n<r;n++){const u=t[n];this.point.events.push(u),u.point=this.point}this.checkForConsuming()}checkForConsuming(){const e=this.point.events.length;for(let t=0;t<e;t++){const n=this.point.events[t];if(n.segment.consumedBy===void 0)for(let r=t+1;r<e;r++){const u=this.point.events[r];u.consumedBy===void 0&&n.otherSE.point.events===u.otherSE.point.events&&n.segment.consume(u.segment)}}}getAvailableLinkedEvents(){const e=[];for(let t=0,n=this.point.events.length;t<n;t++){const r=this.point.events[t];r!==this&&!r.segment.ringOut&&r.segment.isInResult()&&e.push(r)}return e}getLeftmostComparator(e){const t=new Map,n=r=>{const u=r.otherSE;t.set(r,{sine:Dr(this.point,e.point,u.point),cosine:zr(this.point,e.point,u.point)})};return(r,u)=>{t.has(r)||n(r),t.has(u)||n(u);const{sine:a,cosine:o}=t.get(r),{sine:g,cosine:c}=t.get(u);return a.isGreaterThanOrEqualTo(0)&&g.isGreaterThanOrEqualTo(0)?o.isLessThan(c)?1:o.isGreaterThan(c)?-1:0:a.isLessThan(0)&&g.isLessThan(0)?o.isLessThan(c)?-1:o.isGreaterThan(c)?1:0:g.isLessThan(a)?-1:g.isGreaterThan(a)?1:0}}},qr=class pi{constructor(e){A(this,"events");A(this,"poly");A(this,"_isExteriorRing");A(this,"_enclosingRing");this.events=e;for(let t=0,n=e.length;t<n;t++)e[t].segment.ringOut=this;this.poly=null}static factory(e){const t=[];for(let n=0,r=e.length;n<r;n++){const u=e[n];if(!u.isInResult()||u.ringOut)continue;let a=null,o=u.leftSE,g=u.rightSE;const c=[o],E=o.point,_=[];for(;a=o,o=g,c.push(o),o.point!==E;)for(;;){const M=o.getAvailableLinkedEvents();if(M.length===0){const I=c[0].point,C=c[c.length-1].point;throw new Error(`Unable to complete output ring starting at [${I.x}, ${I.y}]. Last matching segment found ends at [${C.x}, ${C.y}].`)}if(M.length===1){g=M[0].otherSE;break}let R=null;for(let I=0,C=_.length;I<C;I++)if(_[I].point===o.point){R=I;break}if(R!==null){const I=_.splice(R)[0],C=c.splice(I.index);C.unshift(C[0].otherSE),t.push(new pi(C.reverse()));continue}_.push({index:c.length,point:o.point});const k=o.getLeftmostComparator(a);g=M.sort(k)[0].otherSE;break}t.push(new pi(c))}return t}getGeom(){let e=this.events[0].point;const t=[e];for(let c=1,E=this.events.length-1;c<E;c++){const _=this.events[c].point,M=this.events[c+1].point;Ze.orient(_,e,M)!==0&&(t.push(_),e=_)}if(t.length===1)return null;const n=t[0],r=t[1];Ze.orient(n,e,r)===0&&t.shift(),t.push(t[0]);const u=this.isExteriorRing()?1:-1,a=this.isExteriorRing()?0:t.length-1,o=this.isExteriorRing()?t.length:-1,g=[];for(let c=a;c!=o;c+=u)g.push([t[c].x.toNumber(),t[c].y.toNumber()]);return g}isExteriorRing(){if(this._isExteriorRing===void 0){const e=this.enclosingRing();this._isExteriorRing=e?!e.isExteriorRing():!0}return this._isExteriorRing}enclosingRing(){return this._enclosingRing===void 0&&(this._enclosingRing=this._calcEnclosingRing()),this._enclosingRing}_calcEnclosingRing(){var r,u;let e=this.events[0];for(let a=1,o=this.events.length;a<o;a++){const g=this.events[a];Be.compare(e,g)>0&&(e=g)}let t=e.segment.prevInResult(),n=t?t.prevInResult():null;for(;;){if(!t)return null;if(!n)return t.ringOut;if(n.ringOut!==t.ringOut)return((r=n.ringOut)==null?void 0:r.enclosingRing())!==t.ringOut?t.ringOut:(u=t.ringOut)==null?void 0:u.enclosingRing();t=n.prevInResult(),n=t?t.prevInResult():null}}},Ji=class{constructor(i){A(this,"exteriorRing");A(this,"interiorRings");this.exteriorRing=i,i.poly=this,this.interiorRings=[]}addInterior(i){this.interiorRings.push(i),i.poly=this}getGeom(){const i=this.exteriorRing.getGeom();if(i===null)return null;const e=[i];for(let t=0,n=this.interiorRings.length;t<n;t++){const r=this.interiorRings[t].getGeom();r!==null&&e.push(r)}return e}},Fr=class{constructor(i){A(this,"rings");A(this,"polys");this.rings=i,this.polys=this._composePolys(i)}getGeom(){const i=[];for(let e=0,t=this.polys.length;e<t;e++){const n=this.polys[e].getGeom();n!==null&&i.push(n)}return i}_composePolys(i){var t;const e=[];for(let n=0,r=i.length;n<r;n++){const u=i[n];if(!u.poly)if(u.isExteriorRing())e.push(new Ji(u));else{const a=u.enclosingRing();a!=null&&a.poly||e.push(new Ji(a)),(t=a==null?void 0:a.poly)==null||t.addInterior(u)}}return e}},jr=class{constructor(i,e=Ft.compare){A(this,"queue");A(this,"tree");A(this,"segments");this.queue=i,this.tree=new Dt(e),this.segments=[]}process(i){const e=i.segment,t=[];if(i.consumedBy)return i.isLeft?this.queue.delete(i.otherSE):this.tree.delete(e),t;i.isLeft&&this.tree.add(e);let n=e,r=e;do n=this.tree.lastBefore(n);while(n!=null&&n.consumedBy!=null);do r=this.tree.firstAfter(r);while(r!=null&&r.consumedBy!=null);if(i.isLeft){let u=null;if(n){const o=n.getIntersection(e);if(o!==null&&(e.isAnEndpoint(o)||(u=o),!n.isAnEndpoint(o))){const g=this._splitSafely(n,o);for(let c=0,E=g.length;c<E;c++)t.push(g[c])}}let a=null;if(r){const o=r.getIntersection(e);if(o!==null&&(e.isAnEndpoint(o)||(a=o),!r.isAnEndpoint(o))){const g=this._splitSafely(r,o);for(let c=0,E=g.length;c<E;c++)t.push(g[c])}}if(u!==null||a!==null){let o=null;u===null?o=a:a===null?o=u:o=Be.comparePoints(u,a)<=0?u:a,this.queue.delete(e.rightSE),t.push(e.rightSE);const g=e.split(o);for(let c=0,E=g.length;c<E;c++)t.push(g[c])}t.length>0?(this.tree.delete(e),t.push(i)):(this.segments.push(e),e.prev=n)}else{if(n&&r){const u=n.getIntersection(r);if(u!==null){if(!n.isAnEndpoint(u)){const a=this._splitSafely(n,u);for(let o=0,g=a.length;o<g;o++)t.push(a[o])}if(!r.isAnEndpoint(u)){const a=this._splitSafely(r,u);for(let o=0,g=a.length;o<g;o++)t.push(a[o])}}}this.tree.delete(e)}return t}_splitSafely(i,e){this.tree.delete(i);const t=i.rightSE;this.queue.delete(t);const n=i.split(e);return n.push(t),i.consumedBy===void 0&&this.tree.add(i),n}},Zr=class{constructor(){A(this,"type");A(this,"numMultiPolys")}run(i,e,t){xt.type=i;const n=[new en(e,!0)];for(let c=0,E=t.length;c<E;c++)n.push(new en(t[c],!1));if(xt.numMultiPolys=n.length,xt.type==="difference"){const c=n[0];let E=1;for(;E<n.length;)oi(n[E].bbox,c.bbox)!==null?E++:n.splice(E,1)}if(xt.type==="intersection")for(let c=0,E=n.length;c<E;c++){const _=n[c];for(let M=c+1,R=n.length;M<R;M++)if(oi(_.bbox,n[M].bbox)===null)return[]}const r=new Dt(Be.compare);for(let c=0,E=n.length;c<E;c++){const _=n[c].getSweepEvents();for(let M=0,R=_.length;M<R;M++)r.add(_[M])}const u=new jr(r);let a=null;for(r.size!=0&&(a=r.first(),r.delete(a));a;){const c=u.process(a);for(let E=0,_=c.length;E<_;E++){const M=c[E];M.consumedBy===void 0&&r.add(M)}r.size!=0?(a=r.first(),r.delete(a)):a=null}Ze.reset();const o=qr.factory(u.segments);return new Fr(o).getGeom()}},xt=new Zr,qt=xt,Hr=0,Ft=class Kt{constructor(e,t,n,r){A(this,"id");A(this,"leftSE");A(this,"rightSE");A(this,"rings");A(this,"windings");A(this,"ringOut");A(this,"consumedBy");A(this,"prev");A(this,"_prevInResult");A(this,"_beforeState");A(this,"_afterState");A(this,"_isInResult");this.id=++Hr,this.leftSE=e,e.segment=this,e.otherSE=t,this.rightSE=t,t.segment=this,t.otherSE=e,this.rings=n,this.windings=r}static compare(e,t){const n=e.leftSE.point.x,r=t.leftSE.point.x,u=e.rightSE.point.x,a=t.rightSE.point.x;if(a.isLessThan(n))return 1;if(u.isLessThan(r))return-1;const o=e.leftSE.point.y,g=t.leftSE.point.y,c=e.rightSE.point.y,E=t.rightSE.point.y;if(n.isLessThan(r)){if(g.isLessThan(o)&&g.isLessThan(c))return 1;if(g.isGreaterThan(o)&&g.isGreaterThan(c))return-1;const _=e.comparePoint(t.leftSE.point);if(_<0)return 1;if(_>0)return-1;const M=t.comparePoint(e.rightSE.point);return M!==0?M:-1}if(n.isGreaterThan(r)){if(o.isLessThan(g)&&o.isLessThan(E))return-1;if(o.isGreaterThan(g)&&o.isGreaterThan(E))return 1;const _=t.comparePoint(e.leftSE.point);if(_!==0)return _;const M=e.comparePoint(t.rightSE.point);return M<0?1:M>0?-1:1}if(o.isLessThan(g))return-1;if(o.isGreaterThan(g))return 1;if(u.isLessThan(a)){const _=t.comparePoint(e.rightSE.point);if(_!==0)return _}if(u.isGreaterThan(a)){const _=e.comparePoint(t.rightSE.point);if(_<0)return 1;if(_>0)return-1}if(!u.eq(a)){const _=c.minus(o),M=u.minus(n),R=E.minus(g),k=a.minus(r);if(_.isGreaterThan(M)&&R.isLessThan(k))return 1;if(_.isLessThan(M)&&R.isGreaterThan(k))return-1}return u.isGreaterThan(a)?1:u.isLessThan(a)||c.isLessThan(E)?-1:c.isGreaterThan(E)?1:e.id<t.id?-1:e.id>t.id?1:0}static fromRing(e,t,n){let r,u,a;const o=Be.comparePoints(e,t);if(o<0)r=e,u=t,a=1;else if(o>0)r=t,u=e,a=-1;else throw new Error(`Tried to create degenerate segment at [${e.x}, ${e.y}]`);const g=new Be(r,!0),c=new Be(u,!1);return new Kt(g,c,[n],[a])}replaceRightSE(e){this.rightSE=e,this.rightSE.segment=this,this.rightSE.otherSE=this.leftSE,this.leftSE.otherSE=this.rightSE}bbox(){const e=this.leftSE.point.y,t=this.rightSE.point.y;return{ll:{x:this.leftSE.point.x,y:e.isLessThan(t)?e:t},ur:{x:this.rightSE.point.x,y:e.isGreaterThan(t)?e:t}}}vector(){return{x:this.rightSE.point.x.minus(this.leftSE.point.x),y:this.rightSE.point.y.minus(this.leftSE.point.y)}}isAnEndpoint(e){return e.x.eq(this.leftSE.point.x)&&e.y.eq(this.leftSE.point.y)||e.x.eq(this.rightSE.point.x)&&e.y.eq(this.rightSE.point.y)}comparePoint(e){return Ze.orient(this.leftSE.point,e,this.rightSE.point)}getIntersection(e){const t=this.bbox(),n=e.bbox(),r=oi(t,n);if(r===null)return null;const u=this.leftSE.point,a=this.rightSE.point,o=e.leftSE.point,g=e.rightSE.point,c=St(t,o)&&this.comparePoint(o)===0,E=St(n,u)&&e.comparePoint(u)===0,_=St(t,g)&&this.comparePoint(g)===0,M=St(n,a)&&e.comparePoint(a)===0;if(E&&c)return M&&!_?a:!M&&_?g:null;if(E)return _&&u.x.eq(g.x)&&u.y.eq(g.y)?null:u;if(c)return M&&a.x.eq(o.x)&&a.y.eq(o.y)?null:o;if(M&&_)return null;if(M)return a;if(_)return g;const R=Ur(u,this.vector(),o,e.vector());return R===null||!St(r,R)?null:Ze.snap(R)}split(e){const t=[],n=e.events!==void 0,r=new Be(e,!0),u=new Be(e,!1),a=this.rightSE;this.replaceRightSE(u),t.push(u),t.push(r);const o=new Kt(r,a,this.rings.slice(),this.windings.slice());return Be.comparePoints(o.leftSE.point,o.rightSE.point)>0&&o.swapEvents(),Be.comparePoints(this.leftSE.point,this.rightSE.point)>0&&this.swapEvents(),n&&(r.checkForConsuming(),u.checkForConsuming()),t}swapEvents(){const e=this.rightSE;this.rightSE=this.leftSE,this.leftSE=e,this.leftSE.isLeft=!0,this.rightSE.isLeft=!1;for(let t=0,n=this.windings.length;t<n;t++)this.windings[t]*=-1}consume(e){let t=this,n=e;for(;t.consumedBy;)t=t.consumedBy;for(;n.consumedBy;)n=n.consumedBy;const r=Kt.compare(t,n);if(r!==0){if(r>0){const u=t;t=n,n=u}if(t.prev===n){const u=t;t=n,n=u}for(let u=0,a=n.rings.length;u<a;u++){const o=n.rings[u],g=n.windings[u],c=t.rings.indexOf(o);c===-1?(t.rings.push(o),t.windings.push(g)):t.windings[c]+=g}n.rings=null,n.windings=null,n.consumedBy=t,n.leftSE.consumedBy=t.leftSE,n.rightSE.consumedBy=t.rightSE}}prevInResult(){return this._prevInResult!==void 0?this._prevInResult:(this.prev?this.prev.isInResult()?this._prevInResult=this.prev:this._prevInResult=this.prev.prevInResult():this._prevInResult=null,this._prevInResult)}beforeState(){if(this._beforeState!==void 0)return this._beforeState;if(!this.prev)this._beforeState={rings:[],windings:[],multiPolys:[]};else{const e=this.prev.consumedBy||this.prev;this._beforeState=e.afterState()}return this._beforeState}afterState(){if(this._afterState!==void 0)return this._afterState;const e=this.beforeState();this._afterState={rings:e.rings.slice(0),windings:e.windings.slice(0),multiPolys:[]};const t=this._afterState.rings,n=this._afterState.windings,r=this._afterState.multiPolys;for(let o=0,g=this.rings.length;o<g;o++){const c=this.rings[o],E=this.windings[o],_=t.indexOf(c);_===-1?(t.push(c),n.push(E)):n[_]+=E}const u=[],a=[];for(let o=0,g=t.length;o<g;o++){if(n[o]===0)continue;const c=t[o],E=c.poly;if(a.indexOf(E)===-1)if(c.isExterior)u.push(E);else{a.indexOf(E)===-1&&a.push(E);const _=u.indexOf(c.poly);_!==-1&&u.splice(_,1)}}for(let o=0,g=u.length;o<g;o++){const c=u[o].multiPoly;r.indexOf(c)===-1&&r.push(c)}return this._afterState}isInResult(){if(this.consumedBy)return!1;if(this._isInResult!==void 0)return this._isInResult;const e=this.beforeState().multiPolys,t=this.afterState().multiPolys;switch(qt.type){case"union":{const n=e.length===0,r=t.length===0;this._isInResult=n!==r;break}case"intersection":{let n,r;e.length<t.length?(n=e.length,r=t.length):(n=t.length,r=e.length),this._isInResult=r===qt.numMultiPolys&&n<r;break}case"xor":{const n=Math.abs(e.length-t.length);this._isInResult=n%2===1;break}case"difference":{const n=r=>r.length===1&&r[0].isSubject;this._isInResult=n(e)!==n(t);break}}return this._isInResult}},$i=class{constructor(i,e,t){A(this,"poly");A(this,"isExterior");A(this,"segments");A(this,"bbox");if(!Array.isArray(i)||i.length===0)throw new Error("Input geometry is not a valid Polygon or MultiPolygon");if(this.poly=e,this.isExterior=t,this.segments=[],typeof i[0][0]!="number"||typeof i[0][1]!="number")throw new Error("Input geometry is not a valid Polygon or MultiPolygon");const n=Ze.snap({x:new Ae(i[0][0]),y:new Ae(i[0][1])});this.bbox={ll:{x:n.x,y:n.y},ur:{x:n.x,y:n.y}};let r=n;for(let u=1,a=i.length;u<a;u++){if(typeof i[u][0]!="number"||typeof i[u][1]!="number")throw new Error("Input geometry is not a valid Polygon or MultiPolygon");const o=Ze.snap({x:new Ae(i[u][0]),y:new Ae(i[u][1])});o.x.eq(r.x)&&o.y.eq(r.y)||(this.segments.push(Ft.fromRing(r,o,this)),o.x.isLessThan(this.bbox.ll.x)&&(this.bbox.ll.x=o.x),o.y.isLessThan(this.bbox.ll.y)&&(this.bbox.ll.y=o.y),o.x.isGreaterThan(this.bbox.ur.x)&&(this.bbox.ur.x=o.x),o.y.isGreaterThan(this.bbox.ur.y)&&(this.bbox.ur.y=o.y),r=o)}(!n.x.eq(r.x)||!n.y.eq(r.y))&&this.segments.push(Ft.fromRing(r,n,this))}getSweepEvents(){const i=[];for(let e=0,t=this.segments.length;e<t;e++){const n=this.segments[e];i.push(n.leftSE),i.push(n.rightSE)}return i}},Vr=class{constructor(i,e){A(this,"multiPoly");A(this,"exteriorRing");A(this,"interiorRings");A(this,"bbox");if(!Array.isArray(i))throw new Error("Input geometry is not a valid Polygon or MultiPolygon");this.exteriorRing=new $i(i[0],this,!0),this.bbox={ll:{x:this.exteriorRing.bbox.ll.x,y:this.exteriorRing.bbox.ll.y},ur:{x:this.exteriorRing.bbox.ur.x,y:this.exteriorRing.bbox.ur.y}},this.interiorRings=[];for(let t=1,n=i.length;t<n;t++){const r=new $i(i[t],this,!1);r.bbox.ll.x.isLessThan(this.bbox.ll.x)&&(this.bbox.ll.x=r.bbox.ll.x),r.bbox.ll.y.isLessThan(this.bbox.ll.y)&&(this.bbox.ll.y=r.bbox.ll.y),r.bbox.ur.x.isGreaterThan(this.bbox.ur.x)&&(this.bbox.ur.x=r.bbox.ur.x),r.bbox.ur.y.isGreaterThan(this.bbox.ur.y)&&(this.bbox.ur.y=r.bbox.ur.y),this.interiorRings.push(r)}this.multiPoly=e}getSweepEvents(){const i=this.exteriorRing.getSweepEvents();for(let e=0,t=this.interiorRings.length;e<t;e++){const n=this.interiorRings[e].getSweepEvents();for(let r=0,u=n.length;r<u;r++)i.push(n[r])}return i}},en=class{constructor(i,e){A(this,"isSubject");A(this,"polys");A(this,"bbox");if(!Array.isArray(i))throw new Error("Input geometry is not a valid Polygon or MultiPolygon");try{typeof i[0][0][0]=="number"&&(i=[i])}catch{}this.polys=[],this.bbox={ll:{x:new Ae(Number.POSITIVE_INFINITY),y:new Ae(Number.POSITIVE_INFINITY)},ur:{x:new Ae(Number.NEGATIVE_INFINITY),y:new Ae(Number.NEGATIVE_INFINITY)}};for(let t=0,n=i.length;t<n;t++){const r=new Vr(i[t],this);r.bbox.ll.x.isLessThan(this.bbox.ll.x)&&(this.bbox.ll.x=r.bbox.ll.x),r.bbox.ll.y.isLessThan(this.bbox.ll.y)&&(this.bbox.ll.y=r.bbox.ll.y),r.bbox.ur.x.isGreaterThan(this.bbox.ur.x)&&(this.bbox.ur.x=r.bbox.ur.x),r.bbox.ur.y.isGreaterThan(this.bbox.ur.y)&&(this.bbox.ur.y=r.bbox.ur.y),this.polys.push(r)}this.isSubject=e}getSweepEvents(){const i=[];for(let e=0,t=this.polys.length;e<t;e++){const n=this.polys[e].getSweepEvents();for(let r=0,u=n.length;r<u;r++)i.push(n[r])}return i}},Kr=(i,...e)=>qt.run("union",i,e),Yr=(i,...e)=>qt.run("difference",i,e);Ze.set;function tn(i,e,t){if(i!==null)for(var n,r,u,a,o,g,c,E=0,_=0,M,R=i.type,k=R==="FeatureCollection",I=R==="Feature",C=k?i.features.length:1,O=0;O<C;O++){c=k?i.features[O].geometry:I?i.geometry:i,M=c?c.type==="GeometryCollection":!1,o=M?c.geometries.length:1;for(var x=0;x<o;x++){var N=0,P=0;if(a=M?c.geometries[x]:c,a!==null){g=a.coordinates;var B=a.type;switch(E=0,B){case null:break;case"Point":if(e(g,_,O,N,P)===!1)return!1;_++,N++;break;case"LineString":case"MultiPoint":for(n=0;n<g.length;n++){if(e(g[n],_,O,N,P)===!1)return!1;_++,B==="MultiPoint"&&N++}B==="LineString"&&N++;break;case"Polygon":case"MultiLineString":for(n=0;n<g.length;n++){for(r=0;r<g[n].length-E;r++){if(e(g[n][r],_,O,N,P)===!1)return!1;_++}B==="MultiLineString"&&N++,B==="Polygon"&&P++}B==="Polygon"&&N++;break;case"MultiPolygon":for(n=0;n<g.length;n++){for(P=0,r=0;r<g[n].length;r++){for(u=0;u<g[n][r].length-E;u++){if(e(g[n][r][u],_,O,N,P)===!1)return!1;_++}P++}N++}break;case"GeometryCollection":for(n=0;n<a.geometries.length;n++)if(tn(a.geometries[n],e)===!1)return!1;break;default:throw new Error("Unknown Geometry Type")}}}}}function li(i,e){var t,n,r,u,a,o,g,c,E,_,M=0,R=i.type==="FeatureCollection",k=i.type==="Feature",I=R?i.features.length:1;for(t=0;t<I;t++){for(o=R?i.features[t].geometry:k?i.geometry:i,c=R?i.features[t].properties:k?i.properties:{},E=R?i.features[t].bbox:k?i.bbox:void 0,_=R?i.features[t].id:k?i.id:void 0,g=o?o.type==="GeometryCollection":!1,a=g?o.geometries.length:1,r=0;r<a;r++){if(u=g?o.geometries[r]:o,u===null){if(e(null,M,c,E,_)===!1)return!1;continue}switch(u.type){case"Point":case"LineString":case"MultiPoint":case"Polygon":case"MultiLineString":case"MultiPolygon":{if(e(u,M,c,E,_)===!1)return!1;break}case"GeometryCollection":{for(n=0;n<u.geometries.length;n++)if(e(u.geometries[n],M,c,E,_)===!1)return!1;break}default:throw new Error("Unknown Geometry Type")}}M++}}function Qr(i,e){li(i,function(t,n,r,u,a){var o=t===null?null:t.type;switch(o){case null:case"Point":case"LineString":case"Polygon":return e(Et(t,r,{bbox:u,id:a}),n,0)===!1?!1:void 0}var g;switch(o){case"MultiPoint":g="Point";break;case"MultiLineString":g="LineString";break;case"MultiPolygon":g="Polygon";break}for(var c=0;c<t.coordinates.length;c++){var E=t.coordinates[c],_={type:g,coordinates:E};if(e(Et(_,r),n,c)===!1)return!1}})}function Xr(i,e={}){const t=[];if(li(i,r=>{t.push(r.coordinates)}),t.length<2)throw new Error("Must have at least 2 geometries");const n=Kr(t[0],...t.slice(1));return n.length===0?null:n.length===1?ti(n[0],e.properties):Fi(n,e.properties)}var nn=Xr;function Jr(i,e={}){if(i.bbox!=null&&e.recompute!==!0)return i.bbox;const t=[1/0,1/0,-1/0,-1/0];return tn(i,n=>{t[0]>n[0]&&(t[0]=n[0]),t[1]>n[1]&&(t[1]=n[1]),t[2]<n[0]&&(t[2]=n[0]),t[3]<n[1]&&(t[3]=n[1])}),t}var rn=Jr;function $r(i){const e=[];if(li(i,r=>{e.push(r.coordinates)}),e.length<2)throw new Error("Must have at least two features");const t=i.features[0].properties||{},n=Yr(e[0],...e.slice(1));return n.length===0?null:n.length===1?ti(n[0],t):Fi(n,t)}var es=$r;function ts(i){if(!i)throw new Error("geojson is required");var e=[];return Qr(i,function(t){e.push(t)}),Lt(e)}var is=ts;function sn(i,e){const t=es(Lt([ti([[[180,90],[-180,90],[-180,-90],[180,-90],[180,90]]]),i]));if(!t)return;t.properties={isMask:!0};const n=Bt(rn(i)),r=(n[2]-n[0])/360/1e3,u=n[0]<-180,a=n[2]>180,o=is(i);if(o.features.length>1&&(u||a))for(const g of o.features){const c=Bt(rn(g));if(a&&c[0]<-180+r)for(const E of g.geometry.coordinates)for(const _ of E)_[0]+=360-r;if(u&&c[2]>180-r)for(const E of g.geometry.coordinates)for(const _ of E)_[0]-=360-r}e(Lt([o.features.length<2?i:nn(o)??i,t]))}const on={fill:{paint:{"fill-color":"#000","fill-opacity":.1},filter:["all",["==",["geometry-type"],"Polygon"],["has","isMask"]]},line:{layout:{"line-cap":"square"},paint:{"line-width":["case",["==",["geometry-type"],"Polygon"],2,3],"line-dasharray":[1,1],"line-color":"#3170fe"},filter:["!",["has","isMask"]]}},jt="mtlr-gc-full-geom",ln="mtlr-gc-full-geom-fill",un="mtlr-gc-full-geom-line";function an(i,e,t=!0,n=!0,r={},u={},a=on){let o;const g=[];let c,E,_;function M(){if(!i.loaded){i.once("load",M);return}const C=a?a===!0?on:a:void 0;if(!(C!=null&&C.fill)&&!(C!=null&&C.line))return;const O=i.getSource(jt);if(O)O.setData(_??Lt([]));else if(_)i.addSource(jt,{type:"geojson",data:_});else return;!i.getLayer(ln)&&(C!=null&&C.fill)&&i.addLayer({...C==null?void 0:C.fill,id:ln,type:"fill",source:jt}),!i.getLayer(un)&&(C!=null&&C.line)&&i.addLayer({...C==null?void 0:C.line,id:un,type:"line",source:jt})}function R(C){_=C,M()}i.on("styledata",()=>{setTimeout(()=>{_&&M()})});const k=C=>{o==null||o({type:"mapClick",coordinates:[C.lngLat.lng,C.lngLat.lat]})};function I(C=!1){if(!e)throw new Error;const O=document.createElement("div");return C&&O.classList.add("marker-interactive"),new or({props:{displayIn:"maplibre"},target:O}),new e.Marker({element:O,offset:[1,-13]})}return{setEventHandler(C){C?(o=C,i.on("click",k)):(o=void 0,i.off("click",k))},flyTo(C,O){i.flyTo({center:C,...O?{zoom:O}:{},...r})},fitBounds(C,O,x){i.fitBounds([[C[0],C[1]],[C[2],C[3]]],{padding:O,...x?{maxZoom:x}:{},...u})},indicateReverse(C){i.getCanvasContainer().style.cursor=C?"crosshair":""},setReverseMarker(C){!e||!t||(E?C?E.setLngLat(C):(E.remove(),E=void 0):C&&(t instanceof Function?E=t(i)??void 0:(E=(typeof t=="object"?new e.Marker(t):I()).setLngLat(C).addTo(i),E.getElement().classList.add("marker-reverse"))))},setFeatures(C,O,x){for(const N of g)N.remove();if(g.length=0,R(void 0),!!e){e:if(O){let N=!1;if(O.geometry.type==="GeometryCollection"){const P=O.geometry.geometries.filter(B=>B.type==="Polygon"||B.type==="MultiPolygon");t:if(P.length>0){const B=nn(Lt(P.map(z=>Et(z))));if(!B)break t;sn({...O,geometry:B.geometry},R),N=!0}else{const B=O.geometry.geometries.filter(z=>z.type==="LineString"||z.type==="MultiLineString");B.length>0&&(R({...O,geometry:{type:"GeometryCollection",geometries:B}}),N=!0)}}if(!N){if(O.geometry.type==="Polygon"||O.geometry.type==="MultiPolygon")sn(O,R);else if(O.geometry.type==="LineString"||O.geometry.type==="MultiLineString"){R(O);break e}}if(!x&&!O.geometry.type.endsWith("Point"))break e;if(t instanceof Function){const P=t(i,O);P&&g.push(P)}else t&&g.push(typeof t=="object"?new e.Marker(t):I().setLngLat(O.center).addTo(i))}if(n)for(const N of C??[]){if(N===O)continue;let P;if(n instanceof Function){if(P=n(i,N),!P)continue}else P=(typeof n=="object"?new e.Marker(n):I(!0)).setLngLat(N.center).setPopup(new e.Popup({offset:[1,-27],closeButton:!1,closeOnMove:!0,className:"maptiler-gc-popup"}).setText(N.place_type[0]==="reverse"?N.place_name:N.place_name.replace(/,.*/,""))).addTo(i);const B=P.getElement();B.addEventListener("click",z=>{z.stopPropagation(),o==null||o({type:"markerClick",id:N.id})}),B.addEventListener("mouseenter",()=>{o==null||o({type:"markerMouseEnter",id:N.id}),P.togglePopup()}),B.addEventListener("mouseleave",()=>{o==null||o({type:"markerMouseLeave",id:N.id}),P.togglePopup()}),g.push(P)}}},setSelectedMarker(C){c&&c.getElement().classList.toggle("marker-selected",!1),c=C>-1?g[C]:void 0,c==null||c.getElement().classList.toggle("marker-selected",!0)},getCenterAndZoom(){const C=i.getCenter();return[i.getZoom(),C.lng,C.lat]}}}function ns(i,e,t){var k,I,C;class n{constructor(x,N){A(this,"type");A(this,"target");this.type=N,this.target=x}}class r extends n{constructor(N,P){super(N,"select");A(this,"feature");Object.assign(this,P)}}class u extends n{constructor(N,P){super(N,"featureslisted");A(this,"features");this.features=P}}class a extends n{constructor(N,P){super(N,"featuresmarked");A(this,"features");this.features=P}}class o extends n{constructor(N,P){super(N,"optionsvisibilitychange");A(this,"optionsVisible");this.optionsVisible=P}}class g extends n{constructor(N,P){super(N,"pick");A(this,"feature");this.feature=P}}class c extends n{constructor(N,P){super(N,"querychange");A(this,"query");this.query=P}}class E extends n{constructor(N,P,B){super(N,"response");A(this,"url");A(this,"featureCollection");this.url=P,this.featureCollection=B}}class _ extends n{constructor(N,P){super(N,"reversetoggle");A(this,"reverse");this.reverse=P}}class M extends i{constructor(N={}){super();Vt(this,k);Vt(this,I);Vt(this,C);kt(this,I,N)}onAddInt(N){const P=document.createElement("div");P.className="mapboxgl-ctrl-geocoder mapboxgl-ctrl maplibregl-ctrl-geocoder maplibregl-ctrl mapboxgl-ctrl-group";const{marker:B,showResultMarkers:z,flyTo:W,fullGeometryStyle:s,...l}=ue(this,I),f=typeof W=="boolean"?{}:W,h={mapController:an(N,e,B,z,f,f,s),flyTo:W===void 0?!0:!!W,apiKey:"",...t==null?void 0:t(N,P),...l};return h.apiKey||console.warn("No MapTiler Cloud API key was provided, some or all geocoding requests may fail"),kt(this,k,new kr({target:P,props:h})),ue(this,k).$on("select",d=>{this.fire(new r(this,d.detail))}),ue(this,k).$on("pick",d=>{this.fire(new g(this,d.detail.feature))}),ue(this,k).$on("featureslisted",d=>{this.fire(new u(this,d.detail.features))}),ue(this,k).$on("featuresmarked",d=>{this.fire(new a(this,d.detail.features))}),ue(this,k).$on("response",d=>{this.fire(new E(this,d.detail.url,d.detail.featureCollection))}),ue(this,k).$on("optionsvisibilitychange",d=>{this.fire(new o(this,d.detail.optionsVisible))}),ue(this,k).$on("reversetoggle",d=>{this.fire(new _(this,d.detail.reverse))}),ue(this,k).$on("querychange",d=>{this.fire(new c(this,d.detail.query))}),kt(this,C,P),P}on(N,P){return super.on(N,P)}once(N,P){return super.once(N,P)}off(N,P){return super.off(N,P)}listens(N){return super.listens(N)}setOptions(N){var l;Object.assign(ue(this,I),N);const{marker:P,showResultMarkers:B,flyTo:z,fullGeometryStyle:W,...s}=ue(this,I);(l=ue(this,k))==null||l.$set(s)}setQuery(N,P=!0){var B;(B=ue(this,k))==null||B.setQuery(N,P)}clearMap(){var N;(N=ue(this,k))==null||N.clearMap()}clearList(){var N;(N=ue(this,k))==null||N.clearList()}setReverseMode(N){var P;(P=ue(this,k))==null||P.$set({reverseActive:N})}focus(N){var P;(P=ue(this,k))==null||P.focus(N)}blur(){var N;(N=ue(this,k))==null||N.blur()}onRemove(){var N,P,B;(N=ue(this,k))==null||N.$destroy(),kt(this,k,void 0),(B=(P=ue(this,C))==null?void 0:P.parentNode)==null||B.removeChild(ue(this,C))}}return k=new WeakMap,I=new WeakMap,C=new WeakMap,{MapLibreBasedGeocodingControl:M,events:{SelectEvent:r,FeaturesListedEvent:u,FeaturesMarkedEvent:a,OptionsVisibilityChangeEvent:o,PickEvent:g,QueryChangeEvent:c,ResponseEvent:E,ReverseToggleEvent:_}}}const{MapLibreBasedGeocodingControl:rs,events:et}=ns(dt.Evented,dt);class ss extends rs{onAdd(e){return super.onAddInt(e)}}const os=et.SelectEvent,ls=et.FeaturesListedEvent,us=et.FeaturesMarkedEvent,as=et.OptionsVisibilityChangeEvent,fs=et.PickEvent,cs=et.QueryChangeEvent,hs=et.ResponseEvent,ds=et.ReverseToggleEvent;j.FeaturesListedEvent=ls,j.FeaturesMarkedEvent=us,j.GeocodingControl=ss,j.OptionsVisibilityChangeEvent=as,j.PickEvent=fs,j.QueryChangeEvent=cs,j.ResponseEvent=hs,j.ReverseToggleEvent=ds,j.SelectEvent=os,j.createMapLibreGlMapController=an,Object.defineProperty(j,Symbol.toStringTag,{value:"Module"})});
14
- //# sourceMappingURL=maplibregl.umd.js.map