@performant-software/geospatial 1.2.0-beta.9 → 2.0.0-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (1031) hide show
  1. package/build/index.js +1 -1
  2. package/build/index.js.map +1 -1
  3. package/dist/index.cjs.js +2 -0
  4. package/dist/index.cjs.js.map +1 -0
  5. package/dist/index.cjs10.js +2 -0
  6. package/dist/index.cjs10.js.map +1 -0
  7. package/dist/index.cjs100.js +2 -0
  8. package/dist/index.cjs100.js.map +1 -0
  9. package/dist/index.cjs101.js +2 -0
  10. package/dist/index.cjs101.js.map +1 -0
  11. package/dist/index.cjs102.js +2 -0
  12. package/dist/index.cjs102.js.map +1 -0
  13. package/dist/index.cjs103.js +2 -0
  14. package/dist/index.cjs103.js.map +1 -0
  15. package/dist/index.cjs104.js +2 -0
  16. package/dist/index.cjs104.js.map +1 -0
  17. package/dist/index.cjs105.js +2 -0
  18. package/dist/index.cjs105.js.map +1 -0
  19. package/dist/index.cjs106.js +2 -0
  20. package/dist/index.cjs106.js.map +1 -0
  21. package/dist/index.cjs107.js +2 -0
  22. package/dist/index.cjs107.js.map +1 -0
  23. package/dist/index.cjs108.js +2 -0
  24. package/dist/index.cjs108.js.map +1 -0
  25. package/dist/index.cjs109.js +2 -0
  26. package/dist/index.cjs109.js.map +1 -0
  27. package/dist/index.cjs11.js +2 -0
  28. package/dist/index.cjs11.js.map +1 -0
  29. package/dist/index.cjs110.js +2 -0
  30. package/dist/index.cjs110.js.map +1 -0
  31. package/dist/index.cjs111.js +2 -0
  32. package/dist/index.cjs111.js.map +1 -0
  33. package/dist/index.cjs112.js +2 -0
  34. package/dist/index.cjs112.js.map +1 -0
  35. package/dist/index.cjs113.js +2 -0
  36. package/dist/index.cjs113.js.map +1 -0
  37. package/dist/index.cjs114.js +2 -0
  38. package/dist/index.cjs114.js.map +1 -0
  39. package/dist/index.cjs115.js +2 -0
  40. package/dist/index.cjs115.js.map +1 -0
  41. package/dist/index.cjs116.js +2 -0
  42. package/dist/index.cjs116.js.map +1 -0
  43. package/dist/index.cjs117.js +2 -0
  44. package/dist/index.cjs117.js.map +1 -0
  45. package/dist/index.cjs118.js +2 -0
  46. package/dist/index.cjs118.js.map +1 -0
  47. package/dist/index.cjs119.js +2 -0
  48. package/dist/index.cjs119.js.map +1 -0
  49. package/dist/index.cjs12.js +2 -0
  50. package/dist/index.cjs12.js.map +1 -0
  51. package/dist/index.cjs120.js +14 -0
  52. package/dist/index.cjs120.js.map +1 -0
  53. package/dist/index.cjs121.js +2 -0
  54. package/dist/index.cjs121.js.map +1 -0
  55. package/dist/index.cjs122.js +2 -0
  56. package/dist/index.cjs122.js.map +1 -0
  57. package/dist/index.cjs123.js +2 -0
  58. package/dist/index.cjs123.js.map +1 -0
  59. package/dist/index.cjs124.js +2 -0
  60. package/dist/index.cjs124.js.map +1 -0
  61. package/dist/index.cjs125.js +2 -0
  62. package/dist/index.cjs125.js.map +1 -0
  63. package/dist/index.cjs126.js +2 -0
  64. package/dist/index.cjs126.js.map +1 -0
  65. package/dist/index.cjs127.js +2 -0
  66. package/dist/index.cjs127.js.map +1 -0
  67. package/dist/index.cjs128.js +2 -0
  68. package/dist/index.cjs128.js.map +1 -0
  69. package/dist/index.cjs129.js +2 -0
  70. package/dist/index.cjs129.js.map +1 -0
  71. package/dist/index.cjs13.js +2 -0
  72. package/dist/index.cjs13.js.map +1 -0
  73. package/dist/index.cjs130.js +2 -0
  74. package/dist/index.cjs130.js.map +1 -0
  75. package/dist/index.cjs131.js +2 -0
  76. package/dist/index.cjs131.js.map +1 -0
  77. package/dist/index.cjs132.js +2 -0
  78. package/dist/index.cjs132.js.map +1 -0
  79. package/dist/index.cjs133.js +2 -0
  80. package/dist/index.cjs133.js.map +1 -0
  81. package/dist/index.cjs134.js +2 -0
  82. package/dist/index.cjs134.js.map +1 -0
  83. package/dist/index.cjs135.js +2 -0
  84. package/dist/index.cjs135.js.map +1 -0
  85. package/dist/index.cjs136.js +2 -0
  86. package/dist/index.cjs136.js.map +1 -0
  87. package/dist/index.cjs137.js +2 -0
  88. package/dist/index.cjs137.js.map +1 -0
  89. package/dist/index.cjs138.js +2 -0
  90. package/dist/index.cjs138.js.map +1 -0
  91. package/dist/index.cjs139.js +2 -0
  92. package/dist/index.cjs139.js.map +1 -0
  93. package/dist/index.cjs14.js +2 -0
  94. package/dist/index.cjs14.js.map +1 -0
  95. package/dist/index.cjs140.js +2 -0
  96. package/dist/index.cjs140.js.map +1 -0
  97. package/dist/index.cjs141.js +2 -0
  98. package/dist/index.cjs141.js.map +1 -0
  99. package/dist/index.cjs142.js +2 -0
  100. package/dist/index.cjs142.js.map +1 -0
  101. package/dist/index.cjs143.js +2 -0
  102. package/dist/index.cjs143.js.map +1 -0
  103. package/dist/index.cjs144.js +2 -0
  104. package/dist/index.cjs144.js.map +1 -0
  105. package/dist/index.cjs145.js +2 -0
  106. package/dist/index.cjs145.js.map +1 -0
  107. package/dist/index.cjs146.js +2 -0
  108. package/dist/index.cjs146.js.map +1 -0
  109. package/dist/index.cjs147.js +2 -0
  110. package/dist/index.cjs147.js.map +1 -0
  111. package/dist/index.cjs148.js +2 -0
  112. package/dist/index.cjs148.js.map +1 -0
  113. package/dist/index.cjs149.js +2 -0
  114. package/dist/index.cjs149.js.map +1 -0
  115. package/dist/index.cjs15.js +2 -0
  116. package/dist/index.cjs15.js.map +1 -0
  117. package/dist/index.cjs150.js +2 -0
  118. package/dist/index.cjs150.js.map +1 -0
  119. package/dist/index.cjs151.js +2 -0
  120. package/dist/index.cjs151.js.map +1 -0
  121. package/dist/index.cjs152.js +2 -0
  122. package/dist/index.cjs152.js.map +1 -0
  123. package/dist/index.cjs153.js +2 -0
  124. package/dist/index.cjs153.js.map +1 -0
  125. package/dist/index.cjs154.js +2 -0
  126. package/dist/index.cjs154.js.map +1 -0
  127. package/dist/index.cjs155.js +2 -0
  128. package/dist/index.cjs155.js.map +1 -0
  129. package/dist/index.cjs156.js +2 -0
  130. package/dist/index.cjs156.js.map +1 -0
  131. package/dist/index.cjs157.js +2 -0
  132. package/dist/index.cjs157.js.map +1 -0
  133. package/dist/index.cjs158.js +2 -0
  134. package/dist/index.cjs158.js.map +1 -0
  135. package/dist/index.cjs159.js +2 -0
  136. package/dist/index.cjs159.js.map +1 -0
  137. package/dist/index.cjs16.js +2 -0
  138. package/dist/index.cjs16.js.map +1 -0
  139. package/dist/index.cjs160.js +2 -0
  140. package/dist/index.cjs160.js.map +1 -0
  141. package/dist/index.cjs161.js +2 -0
  142. package/dist/index.cjs161.js.map +1 -0
  143. package/dist/index.cjs162.js +2 -0
  144. package/dist/index.cjs162.js.map +1 -0
  145. package/dist/index.cjs163.js +2 -0
  146. package/dist/index.cjs163.js.map +1 -0
  147. package/dist/index.cjs164.js +2 -0
  148. package/dist/index.cjs164.js.map +1 -0
  149. package/dist/index.cjs165.js +2 -0
  150. package/dist/index.cjs165.js.map +1 -0
  151. package/dist/index.cjs166.js +2 -0
  152. package/dist/index.cjs166.js.map +1 -0
  153. package/dist/index.cjs167.js +2 -0
  154. package/dist/index.cjs167.js.map +1 -0
  155. package/dist/index.cjs168.js +2 -0
  156. package/dist/index.cjs168.js.map +1 -0
  157. package/dist/index.cjs169.js +2 -0
  158. package/dist/index.cjs169.js.map +1 -0
  159. package/dist/index.cjs17.js +2 -0
  160. package/dist/index.cjs17.js.map +1 -0
  161. package/dist/index.cjs170.js +2 -0
  162. package/dist/index.cjs170.js.map +1 -0
  163. package/dist/index.cjs171.js +2 -0
  164. package/dist/index.cjs171.js.map +1 -0
  165. package/dist/index.cjs172.js +2 -0
  166. package/dist/index.cjs172.js.map +1 -0
  167. package/dist/index.cjs173.js +2 -0
  168. package/dist/index.cjs173.js.map +1 -0
  169. package/dist/index.cjs174.js +2 -0
  170. package/dist/index.cjs174.js.map +1 -0
  171. package/dist/index.cjs175.js +2 -0
  172. package/dist/index.cjs175.js.map +1 -0
  173. package/dist/index.cjs176.js +2 -0
  174. package/dist/index.cjs176.js.map +1 -0
  175. package/dist/index.cjs177.js +2 -0
  176. package/dist/index.cjs177.js.map +1 -0
  177. package/dist/index.cjs178.js +5 -0
  178. package/dist/index.cjs178.js.map +1 -0
  179. package/dist/index.cjs179.js +2 -0
  180. package/dist/index.cjs179.js.map +1 -0
  181. package/dist/index.cjs18.js +2 -0
  182. package/dist/index.cjs18.js.map +1 -0
  183. package/dist/index.cjs180.js +2 -0
  184. package/dist/index.cjs180.js.map +1 -0
  185. package/dist/index.cjs181.js +2 -0
  186. package/dist/index.cjs181.js.map +1 -0
  187. package/dist/index.cjs182.js +2 -0
  188. package/dist/index.cjs182.js.map +1 -0
  189. package/dist/index.cjs183.js +2 -0
  190. package/dist/index.cjs183.js.map +1 -0
  191. package/dist/index.cjs184.js +2 -0
  192. package/dist/index.cjs184.js.map +1 -0
  193. package/dist/index.cjs185.js +2 -0
  194. package/dist/index.cjs185.js.map +1 -0
  195. package/dist/index.cjs186.js +2 -0
  196. package/dist/index.cjs186.js.map +1 -0
  197. package/dist/index.cjs187.js +2 -0
  198. package/dist/index.cjs187.js.map +1 -0
  199. package/dist/index.cjs188.js +2 -0
  200. package/dist/index.cjs188.js.map +1 -0
  201. package/dist/index.cjs189.js +2 -0
  202. package/dist/index.cjs189.js.map +1 -0
  203. package/dist/index.cjs19.js +2 -0
  204. package/dist/index.cjs19.js.map +1 -0
  205. package/dist/index.cjs190.js +2 -0
  206. package/dist/index.cjs190.js.map +1 -0
  207. package/dist/index.cjs191.js +2 -0
  208. package/dist/index.cjs191.js.map +1 -0
  209. package/dist/index.cjs192.js +2 -0
  210. package/dist/index.cjs192.js.map +1 -0
  211. package/dist/index.cjs193.js +2 -0
  212. package/dist/index.cjs193.js.map +1 -0
  213. package/dist/index.cjs194.js +2 -0
  214. package/dist/index.cjs194.js.map +1 -0
  215. package/dist/index.cjs195.js +2 -0
  216. package/dist/index.cjs195.js.map +1 -0
  217. package/dist/index.cjs196.js +2 -0
  218. package/dist/index.cjs196.js.map +1 -0
  219. package/dist/index.cjs197.js +2 -0
  220. package/dist/index.cjs197.js.map +1 -0
  221. package/dist/index.cjs198.js +2 -0
  222. package/dist/index.cjs198.js.map +1 -0
  223. package/dist/index.cjs199.js +2 -0
  224. package/dist/index.cjs199.js.map +1 -0
  225. package/dist/index.cjs2.js +2 -0
  226. package/dist/index.cjs2.js.map +1 -0
  227. package/dist/index.cjs20.js +2 -0
  228. package/dist/index.cjs20.js.map +1 -0
  229. package/dist/index.cjs200.js +2 -0
  230. package/dist/index.cjs200.js.map +1 -0
  231. package/dist/index.cjs201.js +2 -0
  232. package/dist/index.cjs201.js.map +1 -0
  233. package/dist/index.cjs202.js +2 -0
  234. package/dist/index.cjs202.js.map +1 -0
  235. package/dist/index.cjs203.js +2 -0
  236. package/dist/index.cjs203.js.map +1 -0
  237. package/dist/index.cjs204.js +2 -0
  238. package/dist/index.cjs204.js.map +1 -0
  239. package/dist/index.cjs205.js +2 -0
  240. package/dist/index.cjs205.js.map +1 -0
  241. package/dist/index.cjs206.js +2 -0
  242. package/dist/index.cjs206.js.map +1 -0
  243. package/dist/index.cjs207.js +2 -0
  244. package/dist/index.cjs207.js.map +1 -0
  245. package/dist/index.cjs208.js +2 -0
  246. package/dist/index.cjs208.js.map +1 -0
  247. package/dist/index.cjs209.js +2 -0
  248. package/dist/index.cjs209.js.map +1 -0
  249. package/dist/index.cjs21.js +2 -0
  250. package/dist/index.cjs21.js.map +1 -0
  251. package/dist/index.cjs210.js +2 -0
  252. package/dist/index.cjs210.js.map +1 -0
  253. package/dist/index.cjs211.js +2 -0
  254. package/dist/index.cjs211.js.map +1 -0
  255. package/dist/index.cjs212.js +2 -0
  256. package/dist/index.cjs212.js.map +1 -0
  257. package/dist/index.cjs213.js +2 -0
  258. package/dist/index.cjs213.js.map +1 -0
  259. package/dist/index.cjs214.js +2 -0
  260. package/dist/index.cjs214.js.map +1 -0
  261. package/dist/index.cjs215.js +2 -0
  262. package/dist/index.cjs215.js.map +1 -0
  263. package/dist/index.cjs216.js +2 -0
  264. package/dist/index.cjs216.js.map +1 -0
  265. package/dist/index.cjs217.js +2 -0
  266. package/dist/index.cjs217.js.map +1 -0
  267. package/dist/index.cjs218.js +2 -0
  268. package/dist/index.cjs218.js.map +1 -0
  269. package/dist/index.cjs219.js +2 -0
  270. package/dist/index.cjs219.js.map +1 -0
  271. package/dist/index.cjs22.js +2 -0
  272. package/dist/index.cjs22.js.map +1 -0
  273. package/dist/index.cjs220.js +2 -0
  274. package/dist/index.cjs220.js.map +1 -0
  275. package/dist/index.cjs221.js +2 -0
  276. package/dist/index.cjs221.js.map +1 -0
  277. package/dist/index.cjs222.js +2 -0
  278. package/dist/index.cjs222.js.map +1 -0
  279. package/dist/index.cjs223.js +2 -0
  280. package/dist/index.cjs223.js.map +1 -0
  281. package/dist/index.cjs224.js +2 -0
  282. package/dist/index.cjs224.js.map +1 -0
  283. package/dist/index.cjs225.js +2 -0
  284. package/dist/index.cjs225.js.map +1 -0
  285. package/dist/index.cjs226.js +2 -0
  286. package/dist/index.cjs226.js.map +1 -0
  287. package/dist/index.cjs227.js +2 -0
  288. package/dist/index.cjs227.js.map +1 -0
  289. package/dist/index.cjs228.js +2 -0
  290. package/dist/index.cjs228.js.map +1 -0
  291. package/dist/index.cjs229.js +2 -0
  292. package/dist/index.cjs229.js.map +1 -0
  293. package/dist/index.cjs23.js +2 -0
  294. package/dist/index.cjs23.js.map +1 -0
  295. package/dist/index.cjs230.js +2 -0
  296. package/dist/index.cjs230.js.map +1 -0
  297. package/dist/index.cjs231.js +2 -0
  298. package/dist/index.cjs231.js.map +1 -0
  299. package/dist/index.cjs232.js +2 -0
  300. package/dist/index.cjs232.js.map +1 -0
  301. package/dist/index.cjs233.js +2 -0
  302. package/dist/index.cjs233.js.map +1 -0
  303. package/dist/index.cjs234.js +2 -0
  304. package/dist/index.cjs234.js.map +1 -0
  305. package/dist/index.cjs235.js +2 -0
  306. package/dist/index.cjs235.js.map +1 -0
  307. package/dist/index.cjs236.js +2 -0
  308. package/dist/index.cjs236.js.map +1 -0
  309. package/dist/index.cjs237.js +2 -0
  310. package/dist/index.cjs237.js.map +1 -0
  311. package/dist/index.cjs238.js +2 -0
  312. package/dist/index.cjs238.js.map +1 -0
  313. package/dist/index.cjs239.js +2 -0
  314. package/dist/index.cjs239.js.map +1 -0
  315. package/dist/index.cjs24.js +2 -0
  316. package/dist/index.cjs24.js.map +1 -0
  317. package/dist/index.cjs240.js +2 -0
  318. package/dist/index.cjs240.js.map +1 -0
  319. package/dist/index.cjs241.js +2 -0
  320. package/dist/index.cjs241.js.map +1 -0
  321. package/dist/index.cjs242.js +2 -0
  322. package/dist/index.cjs242.js.map +1 -0
  323. package/dist/index.cjs243.js +2 -0
  324. package/dist/index.cjs243.js.map +1 -0
  325. package/dist/index.cjs244.js +2 -0
  326. package/dist/index.cjs244.js.map +1 -0
  327. package/dist/index.cjs245.js +2 -0
  328. package/dist/index.cjs245.js.map +1 -0
  329. package/dist/index.cjs246.js +2 -0
  330. package/dist/index.cjs246.js.map +1 -0
  331. package/dist/index.cjs247.js +2 -0
  332. package/dist/index.cjs247.js.map +1 -0
  333. package/dist/index.cjs248.js +2 -0
  334. package/dist/index.cjs248.js.map +1 -0
  335. package/dist/index.cjs249.js +2 -0
  336. package/dist/index.cjs249.js.map +1 -0
  337. package/dist/index.cjs25.js +2 -0
  338. package/dist/index.cjs25.js.map +1 -0
  339. package/dist/index.cjs250.js +2 -0
  340. package/dist/index.cjs250.js.map +1 -0
  341. package/dist/index.cjs251.js +2 -0
  342. package/dist/index.cjs251.js.map +1 -0
  343. package/dist/index.cjs252.js +2 -0
  344. package/dist/index.cjs252.js.map +1 -0
  345. package/dist/index.cjs253.js +2 -0
  346. package/dist/index.cjs253.js.map +1 -0
  347. package/dist/index.cjs254.js +2 -0
  348. package/dist/index.cjs254.js.map +1 -0
  349. package/dist/index.cjs26.js +2 -0
  350. package/dist/index.cjs26.js.map +1 -0
  351. package/dist/index.cjs27.js +2 -0
  352. package/dist/index.cjs27.js.map +1 -0
  353. package/dist/index.cjs28.js +2 -0
  354. package/dist/index.cjs28.js.map +1 -0
  355. package/dist/index.cjs29.js +2 -0
  356. package/dist/index.cjs29.js.map +1 -0
  357. package/dist/index.cjs3.js +2 -0
  358. package/dist/index.cjs3.js.map +1 -0
  359. package/dist/index.cjs30.js +2 -0
  360. package/dist/index.cjs30.js.map +1 -0
  361. package/dist/index.cjs31.js +2 -0
  362. package/dist/index.cjs31.js.map +1 -0
  363. package/dist/index.cjs32.js +2 -0
  364. package/dist/index.cjs32.js.map +1 -0
  365. package/dist/index.cjs33.js +2 -0
  366. package/dist/index.cjs33.js.map +1 -0
  367. package/dist/index.cjs34.js +2 -0
  368. package/dist/index.cjs34.js.map +1 -0
  369. package/dist/index.cjs35.js +2 -0
  370. package/dist/index.cjs35.js.map +1 -0
  371. package/dist/index.cjs36.js +2 -0
  372. package/dist/index.cjs36.js.map +1 -0
  373. package/dist/index.cjs37.js +2 -0
  374. package/dist/index.cjs37.js.map +1 -0
  375. package/dist/index.cjs38.js +2 -0
  376. package/dist/index.cjs38.js.map +1 -0
  377. package/dist/index.cjs39.js +2 -0
  378. package/dist/index.cjs39.js.map +1 -0
  379. package/dist/index.cjs4.js +2 -0
  380. package/dist/index.cjs4.js.map +1 -0
  381. package/dist/index.cjs40.js +2 -0
  382. package/dist/index.cjs40.js.map +1 -0
  383. package/dist/index.cjs41.js +2 -0
  384. package/dist/index.cjs41.js.map +1 -0
  385. package/dist/index.cjs42.js +2 -0
  386. package/dist/index.cjs42.js.map +1 -0
  387. package/dist/index.cjs43.js +2 -0
  388. package/dist/index.cjs43.js.map +1 -0
  389. package/dist/index.cjs44.js +2 -0
  390. package/dist/index.cjs44.js.map +1 -0
  391. package/dist/index.cjs45.js +2 -0
  392. package/dist/index.cjs45.js.map +1 -0
  393. package/dist/index.cjs46.js +581 -0
  394. package/dist/index.cjs46.js.map +1 -0
  395. package/dist/index.cjs47.js +2 -0
  396. package/dist/index.cjs47.js.map +1 -0
  397. package/dist/index.cjs48.js +2 -0
  398. package/dist/index.cjs48.js.map +1 -0
  399. package/dist/index.cjs49.js +2 -0
  400. package/dist/index.cjs49.js.map +1 -0
  401. package/dist/index.cjs5.js +2 -0
  402. package/dist/index.cjs5.js.map +1 -0
  403. package/dist/index.cjs50.js +2 -0
  404. package/dist/index.cjs50.js.map +1 -0
  405. package/dist/index.cjs51.js +2 -0
  406. package/dist/index.cjs51.js.map +1 -0
  407. package/dist/index.cjs52.js +2 -0
  408. package/dist/index.cjs52.js.map +1 -0
  409. package/dist/index.cjs53.js +2 -0
  410. package/dist/index.cjs53.js.map +1 -0
  411. package/dist/index.cjs54.js +2 -0
  412. package/dist/index.cjs54.js.map +1 -0
  413. package/dist/index.cjs55.js +10 -0
  414. package/dist/index.cjs55.js.map +1 -0
  415. package/dist/index.cjs56.js +20 -0
  416. package/dist/index.cjs56.js.map +1 -0
  417. package/dist/index.cjs57.js +2 -0
  418. package/dist/index.cjs57.js.map +1 -0
  419. package/dist/index.cjs58.js +2 -0
  420. package/dist/index.cjs58.js.map +1 -0
  421. package/dist/index.cjs59.js +2 -0
  422. package/dist/index.cjs59.js.map +1 -0
  423. package/dist/index.cjs6.js +2 -0
  424. package/dist/index.cjs6.js.map +1 -0
  425. package/dist/index.cjs60.js +2 -0
  426. package/dist/index.cjs60.js.map +1 -0
  427. package/dist/index.cjs61.js +2 -0
  428. package/dist/index.cjs61.js.map +1 -0
  429. package/dist/index.cjs62.js +2 -0
  430. package/dist/index.cjs62.js.map +1 -0
  431. package/dist/index.cjs63.js +2 -0
  432. package/dist/index.cjs63.js.map +1 -0
  433. package/dist/index.cjs64.js +2 -0
  434. package/dist/index.cjs64.js.map +1 -0
  435. package/dist/index.cjs65.js +2 -0
  436. package/dist/index.cjs65.js.map +1 -0
  437. package/dist/index.cjs66.js +2 -0
  438. package/dist/index.cjs66.js.map +1 -0
  439. package/dist/index.cjs67.js +2 -0
  440. package/dist/index.cjs67.js.map +1 -0
  441. package/dist/index.cjs68.js +2 -0
  442. package/dist/index.cjs68.js.map +1 -0
  443. package/dist/index.cjs69.js +2 -0
  444. package/dist/index.cjs69.js.map +1 -0
  445. package/dist/index.cjs7.js +2 -0
  446. package/dist/index.cjs7.js.map +1 -0
  447. package/dist/index.cjs70.js +2 -0
  448. package/dist/index.cjs70.js.map +1 -0
  449. package/dist/index.cjs71.js +2 -0
  450. package/dist/index.cjs71.js.map +1 -0
  451. package/dist/index.cjs72.js +2 -0
  452. package/dist/index.cjs72.js.map +1 -0
  453. package/dist/index.cjs73.js +2 -0
  454. package/dist/index.cjs73.js.map +1 -0
  455. package/dist/index.cjs74.js +2 -0
  456. package/dist/index.cjs74.js.map +1 -0
  457. package/dist/index.cjs75.js +2 -0
  458. package/dist/index.cjs75.js.map +1 -0
  459. package/dist/index.cjs76.js +2 -0
  460. package/dist/index.cjs76.js.map +1 -0
  461. package/dist/index.cjs77.js +2 -0
  462. package/dist/index.cjs77.js.map +1 -0
  463. package/dist/index.cjs78.js +2 -0
  464. package/dist/index.cjs78.js.map +1 -0
  465. package/dist/index.cjs79.js +2 -0
  466. package/dist/index.cjs79.js.map +1 -0
  467. package/dist/index.cjs8.js +2 -0
  468. package/dist/index.cjs8.js.map +1 -0
  469. package/dist/index.cjs80.js +2 -0
  470. package/dist/index.cjs80.js.map +1 -0
  471. package/dist/index.cjs81.js +2 -0
  472. package/dist/index.cjs81.js.map +1 -0
  473. package/dist/index.cjs82.js +2 -0
  474. package/dist/index.cjs82.js.map +1 -0
  475. package/dist/index.cjs83.js +2 -0
  476. package/dist/index.cjs83.js.map +1 -0
  477. package/dist/index.cjs84.js +2 -0
  478. package/dist/index.cjs84.js.map +1 -0
  479. package/dist/index.cjs85.js +2 -0
  480. package/dist/index.cjs85.js.map +1 -0
  481. package/dist/index.cjs86.js +2 -0
  482. package/dist/index.cjs86.js.map +1 -0
  483. package/dist/index.cjs87.js +2 -0
  484. package/dist/index.cjs87.js.map +1 -0
  485. package/dist/index.cjs88.js +2 -0
  486. package/dist/index.cjs88.js.map +1 -0
  487. package/dist/index.cjs89.js +2 -0
  488. package/dist/index.cjs89.js.map +1 -0
  489. package/dist/index.cjs9.js +2 -0
  490. package/dist/index.cjs9.js.map +1 -0
  491. package/dist/index.cjs90.js +2 -0
  492. package/dist/index.cjs90.js.map +1 -0
  493. package/dist/index.cjs91.js +2 -0
  494. package/dist/index.cjs91.js.map +1 -0
  495. package/dist/index.cjs92.js +2 -0
  496. package/dist/index.cjs92.js.map +1 -0
  497. package/dist/index.cjs93.js +2 -0
  498. package/dist/index.cjs93.js.map +1 -0
  499. package/dist/index.cjs94.js +2 -0
  500. package/dist/index.cjs94.js.map +1 -0
  501. package/dist/index.cjs95.js +2 -0
  502. package/dist/index.cjs95.js.map +1 -0
  503. package/dist/index.cjs96.js +2 -0
  504. package/dist/index.cjs96.js.map +1 -0
  505. package/dist/index.cjs97.js +2 -0
  506. package/dist/index.cjs97.js.map +1 -0
  507. package/dist/index.cjs98.js +2 -0
  508. package/dist/index.cjs98.js.map +1 -0
  509. package/dist/index.cjs99.js +2 -0
  510. package/dist/index.cjs99.js.map +1 -0
  511. package/dist/index.es.js +19 -0
  512. package/dist/index.es.js.map +1 -0
  513. package/dist/index.es10.js +2105 -0
  514. package/dist/index.es10.js.map +1 -0
  515. package/dist/index.es100.js +10 -0
  516. package/dist/index.es100.js.map +1 -0
  517. package/dist/index.es101.js +11 -0
  518. package/dist/index.es101.js.map +1 -0
  519. package/dist/index.es102.js +7 -0
  520. package/dist/index.es102.js.map +1 -0
  521. package/dist/index.es103.js +7 -0
  522. package/dist/index.es103.js.map +1 -0
  523. package/dist/index.es104.js +7 -0
  524. package/dist/index.es104.js.map +1 -0
  525. package/dist/index.es105.js +10 -0
  526. package/dist/index.es105.js.map +1 -0
  527. package/dist/index.es106.js +10 -0
  528. package/dist/index.es106.js.map +1 -0
  529. package/dist/index.es107.js +7 -0
  530. package/dist/index.es107.js.map +1 -0
  531. package/dist/index.es108.js +11 -0
  532. package/dist/index.es108.js.map +1 -0
  533. package/dist/index.es109.js +16 -0
  534. package/dist/index.es109.js.map +1 -0
  535. package/dist/index.es11.js +22 -0
  536. package/dist/index.es11.js.map +1 -0
  537. package/dist/index.es110.js +14 -0
  538. package/dist/index.es110.js.map +1 -0
  539. package/dist/index.es111.js +7 -0
  540. package/dist/index.es111.js.map +1 -0
  541. package/dist/index.es112.js +9 -0
  542. package/dist/index.es112.js.map +1 -0
  543. package/dist/index.es113.js +6 -0
  544. package/dist/index.es113.js.map +1 -0
  545. package/dist/index.es114.js +11 -0
  546. package/dist/index.es114.js.map +1 -0
  547. package/dist/index.es115.js +11 -0
  548. package/dist/index.es115.js.map +1 -0
  549. package/dist/index.es116.js +11 -0
  550. package/dist/index.es116.js.map +1 -0
  551. package/dist/index.es117.js +12 -0
  552. package/dist/index.es117.js.map +1 -0
  553. package/dist/index.es118.js +7 -0
  554. package/dist/index.es118.js.map +1 -0
  555. package/dist/index.es119.js +7 -0
  556. package/dist/index.es119.js.map +1 -0
  557. package/dist/index.es12.js +15 -0
  558. package/dist/index.es12.js.map +1 -0
  559. package/dist/index.es120.js +61 -0
  560. package/dist/index.es120.js.map +1 -0
  561. package/dist/index.es121.js +17 -0
  562. package/dist/index.es121.js.map +1 -0
  563. package/dist/index.es122.js +9 -0
  564. package/dist/index.es122.js.map +1 -0
  565. package/dist/index.es123.js +9 -0
  566. package/dist/index.es123.js.map +1 -0
  567. package/dist/index.es124.js +12 -0
  568. package/dist/index.es124.js.map +1 -0
  569. package/dist/index.es125.js +20 -0
  570. package/dist/index.es125.js.map +1 -0
  571. package/dist/index.es126.js +17 -0
  572. package/dist/index.es126.js.map +1 -0
  573. package/dist/index.es127.js +8 -0
  574. package/dist/index.es127.js.map +1 -0
  575. package/dist/index.es128.js +9 -0
  576. package/dist/index.es128.js.map +1 -0
  577. package/dist/index.es129.js +12 -0
  578. package/dist/index.es129.js.map +1 -0
  579. package/dist/index.es13.js +9 -0
  580. package/dist/index.es13.js.map +1 -0
  581. package/dist/index.es130.js +10 -0
  582. package/dist/index.es130.js.map +1 -0
  583. package/dist/index.es131.js +10 -0
  584. package/dist/index.es131.js.map +1 -0
  585. package/dist/index.es132.js +12 -0
  586. package/dist/index.es132.js.map +1 -0
  587. package/dist/index.es133.js +6 -0
  588. package/dist/index.es133.js.map +1 -0
  589. package/dist/index.es134.js +6 -0
  590. package/dist/index.es134.js.map +1 -0
  591. package/dist/index.es135.js +14 -0
  592. package/dist/index.es135.js.map +1 -0
  593. package/dist/index.es136.js +8 -0
  594. package/dist/index.es136.js.map +1 -0
  595. package/dist/index.es137.js +7 -0
  596. package/dist/index.es137.js.map +1 -0
  597. package/dist/index.es138.js +12 -0
  598. package/dist/index.es138.js.map +1 -0
  599. package/dist/index.es139.js +9 -0
  600. package/dist/index.es139.js.map +1 -0
  601. package/dist/index.es14.js +8 -0
  602. package/dist/index.es14.js.map +1 -0
  603. package/dist/index.es140.js +20 -0
  604. package/dist/index.es140.js.map +1 -0
  605. package/dist/index.es141.js +15 -0
  606. package/dist/index.es141.js.map +1 -0
  607. package/dist/index.es142.js +6 -0
  608. package/dist/index.es142.js.map +1 -0
  609. package/dist/index.es143.js +6 -0
  610. package/dist/index.es143.js.map +1 -0
  611. package/dist/index.es144.js +12 -0
  612. package/dist/index.es144.js.map +1 -0
  613. package/dist/index.es145.js +10 -0
  614. package/dist/index.es145.js.map +1 -0
  615. package/dist/index.es146.js +16 -0
  616. package/dist/index.es146.js.map +1 -0
  617. package/dist/index.es147.js +16 -0
  618. package/dist/index.es147.js.map +1 -0
  619. package/dist/index.es148.js +10 -0
  620. package/dist/index.es148.js.map +1 -0
  621. package/dist/index.es149.js +9 -0
  622. package/dist/index.es149.js.map +1 -0
  623. package/dist/index.es15.js +31 -0
  624. package/dist/index.es15.js.map +1 -0
  625. package/dist/index.es150.js +9 -0
  626. package/dist/index.es150.js.map +1 -0
  627. package/dist/index.es151.js +20 -0
  628. package/dist/index.es151.js.map +1 -0
  629. package/dist/index.es152.js +20 -0
  630. package/dist/index.es152.js.map +1 -0
  631. package/dist/index.es153.js +8 -0
  632. package/dist/index.es153.js.map +1 -0
  633. package/dist/index.es154.js +20 -0
  634. package/dist/index.es154.js.map +1 -0
  635. package/dist/index.es155.js +26 -0
  636. package/dist/index.es155.js.map +1 -0
  637. package/dist/index.es156.js +9 -0
  638. package/dist/index.es156.js.map +1 -0
  639. package/dist/index.es157.js +8 -0
  640. package/dist/index.es157.js.map +1 -0
  641. package/dist/index.es158.js +9 -0
  642. package/dist/index.es158.js.map +1 -0
  643. package/dist/index.es159.js +8 -0
  644. package/dist/index.es159.js.map +1 -0
  645. package/dist/index.es16.js +11 -0
  646. package/dist/index.es16.js.map +1 -0
  647. package/dist/index.es160.js +15 -0
  648. package/dist/index.es160.js.map +1 -0
  649. package/dist/index.es161.js +9 -0
  650. package/dist/index.es161.js.map +1 -0
  651. package/dist/index.es162.js +8 -0
  652. package/dist/index.es162.js.map +1 -0
  653. package/dist/index.es163.js +8 -0
  654. package/dist/index.es163.js.map +1 -0
  655. package/dist/index.es164.js +8 -0
  656. package/dist/index.es164.js.map +1 -0
  657. package/dist/index.es165.js +8 -0
  658. package/dist/index.es165.js.map +1 -0
  659. package/dist/index.es166.js +8 -0
  660. package/dist/index.es166.js.map +1 -0
  661. package/dist/index.es167.js +8 -0
  662. package/dist/index.es167.js.map +1 -0
  663. package/dist/index.es168.js +16 -0
  664. package/dist/index.es168.js.map +1 -0
  665. package/dist/index.es169.js +18 -0
  666. package/dist/index.es169.js.map +1 -0
  667. package/dist/index.es17.js +8 -0
  668. package/dist/index.es17.js.map +1 -0
  669. package/dist/index.es170.js +12 -0
  670. package/dist/index.es170.js.map +1 -0
  671. package/dist/index.es171.js +10 -0
  672. package/dist/index.es171.js.map +1 -0
  673. package/dist/index.es172.js +10 -0
  674. package/dist/index.es172.js.map +1 -0
  675. package/dist/index.es173.js +12 -0
  676. package/dist/index.es173.js.map +1 -0
  677. package/dist/index.es174.js +5 -0
  678. package/dist/index.es174.js.map +1 -0
  679. package/dist/index.es175.js +5 -0
  680. package/dist/index.es175.js.map +1 -0
  681. package/dist/index.es176.js +11 -0
  682. package/dist/index.es176.js.map +1 -0
  683. package/dist/index.es177.js +151 -0
  684. package/dist/index.es177.js.map +1 -0
  685. package/dist/index.es178.js +12200 -0
  686. package/dist/index.es178.js.map +1 -0
  687. package/dist/index.es179.js +4 -0
  688. package/dist/index.es179.js.map +1 -0
  689. package/dist/index.es18.js +13 -0
  690. package/dist/index.es18.js.map +1 -0
  691. package/dist/index.es180.js +4 -0
  692. package/dist/index.es180.js.map +1 -0
  693. package/dist/index.es181.js +39 -0
  694. package/dist/index.es181.js.map +1 -0
  695. package/dist/index.es182.js +4 -0
  696. package/dist/index.es182.js.map +1 -0
  697. package/dist/index.es183.js +26 -0
  698. package/dist/index.es183.js.map +1 -0
  699. package/dist/index.es184.js +3 -0
  700. package/dist/index.es184.js.map +1 -0
  701. package/dist/index.es185.js +4 -0
  702. package/dist/index.es185.js.map +1 -0
  703. package/dist/index.es186.js +3 -0
  704. package/dist/index.es186.js.map +1 -0
  705. package/dist/index.es187.js +35 -0
  706. package/dist/index.es187.js.map +1 -0
  707. package/dist/index.es188.js +16 -0
  708. package/dist/index.es188.js.map +1 -0
  709. package/dist/index.es189.js +17 -0
  710. package/dist/index.es189.js.map +1 -0
  711. package/dist/index.es19.js +20 -0
  712. package/dist/index.es19.js.map +1 -0
  713. package/dist/index.es190.js +12 -0
  714. package/dist/index.es190.js.map +1 -0
  715. package/dist/index.es191.js +324 -0
  716. package/dist/index.es191.js.map +1 -0
  717. package/dist/index.es192.js +78 -0
  718. package/dist/index.es192.js.map +1 -0
  719. package/dist/index.es193.js +6 -0
  720. package/dist/index.es193.js.map +1 -0
  721. package/dist/index.es194.js +19 -0
  722. package/dist/index.es194.js.map +1 -0
  723. package/dist/index.es195.js +14 -0
  724. package/dist/index.es195.js.map +1 -0
  725. package/dist/index.es196.js +34 -0
  726. package/dist/index.es196.js.map +1 -0
  727. package/dist/index.es197.js +8 -0
  728. package/dist/index.es197.js.map +1 -0
  729. package/dist/index.es198.js +5 -0
  730. package/dist/index.es198.js.map +1 -0
  731. package/dist/index.es199.js +11 -0
  732. package/dist/index.es199.js.map +1 -0
  733. package/dist/index.es2.js +23 -0
  734. package/dist/index.es2.js.map +1 -0
  735. package/dist/index.es20.js +8 -0
  736. package/dist/index.es20.js.map +1 -0
  737. package/dist/index.es200.js +8 -0
  738. package/dist/index.es200.js.map +1 -0
  739. package/dist/index.es201.js +7 -0
  740. package/dist/index.es201.js.map +1 -0
  741. package/dist/index.es202.js +6 -0
  742. package/dist/index.es202.js.map +1 -0
  743. package/dist/index.es203.js +6 -0
  744. package/dist/index.es203.js.map +1 -0
  745. package/dist/index.es204.js +12 -0
  746. package/dist/index.es204.js.map +1 -0
  747. package/dist/index.es205.js +25 -0
  748. package/dist/index.es205.js.map +1 -0
  749. package/dist/index.es206.js +25 -0
  750. package/dist/index.es206.js.map +1 -0
  751. package/dist/index.es207.js +17 -0
  752. package/dist/index.es207.js.map +1 -0
  753. package/dist/index.es208.js +20 -0
  754. package/dist/index.es208.js.map +1 -0
  755. package/dist/index.es209.js +9 -0
  756. package/dist/index.es209.js.map +1 -0
  757. package/dist/index.es21.js +8 -0
  758. package/dist/index.es21.js.map +1 -0
  759. package/dist/index.es210.js +12 -0
  760. package/dist/index.es210.js.map +1 -0
  761. package/dist/index.es211.js +10 -0
  762. package/dist/index.es211.js.map +1 -0
  763. package/dist/index.es212.js +25 -0
  764. package/dist/index.es212.js.map +1 -0
  765. package/dist/index.es213.js +13 -0
  766. package/dist/index.es213.js.map +1 -0
  767. package/dist/index.es214.js +12 -0
  768. package/dist/index.es214.js.map +1 -0
  769. package/dist/index.es215.js +7 -0
  770. package/dist/index.es215.js.map +1 -0
  771. package/dist/index.es216.js +14 -0
  772. package/dist/index.es216.js.map +1 -0
  773. package/dist/index.es217.js +12 -0
  774. package/dist/index.es217.js.map +1 -0
  775. package/dist/index.es218.js +26 -0
  776. package/dist/index.es218.js.map +1 -0
  777. package/dist/index.es219.js +15 -0
  778. package/dist/index.es219.js.map +1 -0
  779. package/dist/index.es22.js +8 -0
  780. package/dist/index.es22.js.map +1 -0
  781. package/dist/index.es220.js +22 -0
  782. package/dist/index.es220.js.map +1 -0
  783. package/dist/index.es221.js +7 -0
  784. package/dist/index.es221.js.map +1 -0
  785. package/dist/index.es222.js +21 -0
  786. package/dist/index.es222.js.map +1 -0
  787. package/dist/index.es223.js +15 -0
  788. package/dist/index.es223.js.map +1 -0
  789. package/dist/index.es224.js +7 -0
  790. package/dist/index.es224.js.map +1 -0
  791. package/dist/index.es225.js +8 -0
  792. package/dist/index.es225.js.map +1 -0
  793. package/dist/index.es226.js +11 -0
  794. package/dist/index.es226.js.map +1 -0
  795. package/dist/index.es227.js +9 -0
  796. package/dist/index.es227.js.map +1 -0
  797. package/dist/index.es228.js +6 -0
  798. package/dist/index.es228.js.map +1 -0
  799. package/dist/index.es229.js +49 -0
  800. package/dist/index.es229.js.map +1 -0
  801. package/dist/index.es23.js +10 -0
  802. package/dist/index.es23.js.map +1 -0
  803. package/dist/index.es230.js +26 -0
  804. package/dist/index.es230.js.map +1 -0
  805. package/dist/index.es231.js +28 -0
  806. package/dist/index.es231.js.map +1 -0
  807. package/dist/index.es232.js +20 -0
  808. package/dist/index.es232.js.map +1 -0
  809. package/dist/index.es233.js +34 -0
  810. package/dist/index.es233.js.map +1 -0
  811. package/dist/index.es234.js +25 -0
  812. package/dist/index.es234.js.map +1 -0
  813. package/dist/index.es235.js +79 -0
  814. package/dist/index.es235.js.map +1 -0
  815. package/dist/index.es236.js +24 -0
  816. package/dist/index.es236.js.map +1 -0
  817. package/dist/index.es237.js +52 -0
  818. package/dist/index.es237.js.map +1 -0
  819. package/dist/index.es238.js +58 -0
  820. package/dist/index.es238.js.map +1 -0
  821. package/dist/index.es239.js +12 -0
  822. package/dist/index.es239.js.map +1 -0
  823. package/dist/index.es24.js +10 -0
  824. package/dist/index.es24.js.map +1 -0
  825. package/dist/index.es240.js +24 -0
  826. package/dist/index.es240.js.map +1 -0
  827. package/dist/index.es241.js +69 -0
  828. package/dist/index.es241.js.map +1 -0
  829. package/dist/index.es242.js +46 -0
  830. package/dist/index.es242.js.map +1 -0
  831. package/dist/index.es243.js +69 -0
  832. package/dist/index.es243.js.map +1 -0
  833. package/dist/index.es244.js +12 -0
  834. package/dist/index.es244.js.map +1 -0
  835. package/dist/index.es245.js +7 -0
  836. package/dist/index.es245.js.map +1 -0
  837. package/dist/index.es246.js +16 -0
  838. package/dist/index.es246.js.map +1 -0
  839. package/dist/index.es247.js +63 -0
  840. package/dist/index.es247.js.map +1 -0
  841. package/dist/index.es248.js +60 -0
  842. package/dist/index.es248.js.map +1 -0
  843. package/dist/index.es249.js +6 -0
  844. package/dist/index.es249.js.map +1 -0
  845. package/dist/index.es25.js +7 -0
  846. package/dist/index.es25.js.map +1 -0
  847. package/dist/index.es250.js +8 -0
  848. package/dist/index.es250.js.map +1 -0
  849. package/dist/index.es251.js +19 -0
  850. package/dist/index.es251.js.map +1 -0
  851. package/dist/index.es252.js +74 -0
  852. package/dist/index.es252.js.map +1 -0
  853. package/dist/index.es253.js +7 -0
  854. package/dist/index.es253.js.map +1 -0
  855. package/dist/index.es254.js +28 -0
  856. package/dist/index.es254.js.map +1 -0
  857. package/dist/index.es26.js +7 -0
  858. package/dist/index.es26.js.map +1 -0
  859. package/dist/index.es27.js +10 -0
  860. package/dist/index.es27.js.map +1 -0
  861. package/dist/index.es28.js +18 -0
  862. package/dist/index.es28.js.map +1 -0
  863. package/dist/index.es29.js +15 -0
  864. package/dist/index.es29.js.map +1 -0
  865. package/dist/index.es3.js +92 -0
  866. package/dist/index.es3.js.map +1 -0
  867. package/dist/index.es30.js +18 -0
  868. package/dist/index.es30.js.map +1 -0
  869. package/dist/index.es31.js +10 -0
  870. package/dist/index.es31.js.map +1 -0
  871. package/dist/index.es32.js +8 -0
  872. package/dist/index.es32.js.map +1 -0
  873. package/dist/index.es33.js +7 -0
  874. package/dist/index.es33.js.map +1 -0
  875. package/dist/index.es34.js +21 -0
  876. package/dist/index.es34.js.map +1 -0
  877. package/dist/index.es35.js +21 -0
  878. package/dist/index.es35.js.map +1 -0
  879. package/dist/index.es36.js +17 -0
  880. package/dist/index.es36.js.map +1 -0
  881. package/dist/index.es37.js +9 -0
  882. package/dist/index.es37.js.map +1 -0
  883. package/dist/index.es38.js +10 -0
  884. package/dist/index.es38.js.map +1 -0
  885. package/dist/index.es39.js +13 -0
  886. package/dist/index.es39.js.map +1 -0
  887. package/dist/index.es4.js +122 -0
  888. package/dist/index.es4.js.map +1 -0
  889. package/dist/index.es40.js +7 -0
  890. package/dist/index.es40.js.map +1 -0
  891. package/dist/index.es41.js +22 -0
  892. package/dist/index.es41.js.map +1 -0
  893. package/dist/index.es42.js +9 -0
  894. package/dist/index.es42.js.map +1 -0
  895. package/dist/index.es43.js +9 -0
  896. package/dist/index.es43.js.map +1 -0
  897. package/dist/index.es44.js +2 -0
  898. package/dist/index.es44.js.map +1 -0
  899. package/dist/index.es45.js +40 -0
  900. package/dist/index.es45.js.map +1 -0
  901. package/dist/index.es46.js +18532 -0
  902. package/dist/index.es46.js.map +1 -0
  903. package/dist/index.es47.js +2 -0
  904. package/dist/index.es47.js.map +1 -0
  905. package/dist/index.es48.js +87 -0
  906. package/dist/index.es48.js.map +1 -0
  907. package/dist/index.es49.js +12 -0
  908. package/dist/index.es49.js.map +1 -0
  909. package/dist/index.es5.js +42 -0
  910. package/dist/index.es5.js.map +1 -0
  911. package/dist/index.es50.js +13 -0
  912. package/dist/index.es50.js.map +1 -0
  913. package/dist/index.es51.js +88 -0
  914. package/dist/index.es51.js.map +1 -0
  915. package/dist/index.es52.js +9 -0
  916. package/dist/index.es52.js.map +1 -0
  917. package/dist/index.es53.js +5 -0
  918. package/dist/index.es53.js.map +1 -0
  919. package/dist/index.es54.js +5 -0
  920. package/dist/index.es54.js.map +1 -0
  921. package/dist/index.es55.js +33 -0
  922. package/dist/index.es55.js.map +1 -0
  923. package/dist/index.es56.js +605 -0
  924. package/dist/index.es56.js.map +1 -0
  925. package/dist/index.es57.js +110 -0
  926. package/dist/index.es57.js.map +1 -0
  927. package/dist/index.es58.js +13 -0
  928. package/dist/index.es58.js.map +1 -0
  929. package/dist/index.es59.js +5 -0
  930. package/dist/index.es59.js.map +1 -0
  931. package/dist/index.es6.js +91 -0
  932. package/dist/index.es6.js.map +1 -0
  933. package/dist/index.es60.js +31 -0
  934. package/dist/index.es60.js.map +1 -0
  935. package/dist/index.es61.js +58 -0
  936. package/dist/index.es61.js.map +1 -0
  937. package/dist/index.es62.js +49 -0
  938. package/dist/index.es62.js.map +1 -0
  939. package/dist/index.es63.js +40 -0
  940. package/dist/index.es63.js.map +1 -0
  941. package/dist/index.es64.js +13 -0
  942. package/dist/index.es64.js.map +1 -0
  943. package/dist/index.es65.js +13 -0
  944. package/dist/index.es65.js.map +1 -0
  945. package/dist/index.es66.js +31 -0
  946. package/dist/index.es66.js.map +1 -0
  947. package/dist/index.es67.js +13 -0
  948. package/dist/index.es67.js.map +1 -0
  949. package/dist/index.es68.js +15 -0
  950. package/dist/index.es68.js.map +1 -0
  951. package/dist/index.es69.js +54 -0
  952. package/dist/index.es69.js.map +1 -0
  953. package/dist/index.es7.js +98 -0
  954. package/dist/index.es7.js.map +1 -0
  955. package/dist/index.es70.js +68 -0
  956. package/dist/index.es70.js.map +1 -0
  957. package/dist/index.es71.js +7 -0
  958. package/dist/index.es71.js.map +1 -0
  959. package/dist/index.es72.js +276 -0
  960. package/dist/index.es72.js.map +1 -0
  961. package/dist/index.es73.js +18 -0
  962. package/dist/index.es73.js.map +1 -0
  963. package/dist/index.es74.js +22 -0
  964. package/dist/index.es74.js.map +1 -0
  965. package/dist/index.es75.js +8 -0
  966. package/dist/index.es75.js.map +1 -0
  967. package/dist/index.es76.js +7 -0
  968. package/dist/index.es76.js.map +1 -0
  969. package/dist/index.es77.js +7 -0
  970. package/dist/index.es77.js.map +1 -0
  971. package/dist/index.es78.js +8 -0
  972. package/dist/index.es78.js.map +1 -0
  973. package/dist/index.es79.js +7 -0
  974. package/dist/index.es79.js.map +1 -0
  975. package/dist/index.es8.js +32 -0
  976. package/dist/index.es8.js.map +1 -0
  977. package/dist/index.es80.js +6 -0
  978. package/dist/index.es80.js.map +1 -0
  979. package/dist/index.es81.js +6 -0
  980. package/dist/index.es81.js.map +1 -0
  981. package/dist/index.es82.js +6 -0
  982. package/dist/index.es82.js.map +1 -0
  983. package/dist/index.es83.js +6 -0
  984. package/dist/index.es83.js.map +1 -0
  985. package/dist/index.es84.js +6 -0
  986. package/dist/index.es84.js.map +1 -0
  987. package/dist/index.es85.js +6 -0
  988. package/dist/index.es85.js.map +1 -0
  989. package/dist/index.es86.js +6 -0
  990. package/dist/index.es86.js.map +1 -0
  991. package/dist/index.es87.js +13 -0
  992. package/dist/index.es87.js.map +1 -0
  993. package/dist/index.es88.js +7 -0
  994. package/dist/index.es88.js.map +1 -0
  995. package/dist/index.es89.js +9 -0
  996. package/dist/index.es89.js.map +1 -0
  997. package/dist/index.es9.js +14 -0
  998. package/dist/index.es9.js.map +1 -0
  999. package/dist/index.es90.js +9 -0
  1000. package/dist/index.es90.js.map +1 -0
  1001. package/dist/index.es91.js +13 -0
  1002. package/dist/index.es91.js.map +1 -0
  1003. package/dist/index.es92.js +15 -0
  1004. package/dist/index.es92.js.map +1 -0
  1005. package/dist/index.es93.js +16 -0
  1006. package/dist/index.es93.js.map +1 -0
  1007. package/dist/index.es94.js +89 -0
  1008. package/dist/index.es94.js.map +1 -0
  1009. package/dist/index.es95.js +6 -0
  1010. package/dist/index.es95.js.map +1 -0
  1011. package/dist/index.es96.js +18 -0
  1012. package/dist/index.es96.js.map +1 -0
  1013. package/dist/index.es97.js +15 -0
  1014. package/dist/index.es97.js.map +1 -0
  1015. package/dist/index.es98.js +10 -0
  1016. package/dist/index.es98.js.map +1 -0
  1017. package/dist/index.es99.js +10 -0
  1018. package/dist/index.es99.js.map +1 -0
  1019. package/dist/style.css +1 -0
  1020. package/package.json +18 -11
  1021. package/src/components/DrawControl.js +3 -3
  1022. package/src/components/LocationMarker.js +2 -2
  1023. package/src/components/MapControl.js +1 -1
  1024. package/src/components/MapDraw.js +2 -2
  1025. package/types/components/DrawControl.js.flow +3 -3
  1026. package/types/components/LocationMarker.js.flow +2 -2
  1027. package/types/components/MapControl.js.flow +1 -1
  1028. package/types/components/MapDraw.js.flow +2 -2
  1029. package/vite.config.js +39 -0
  1030. package/index.js +0 -1
  1031. package/webpack.config.js +0 -17
package/build/index.js CHANGED
@@ -1,2 +1,2 @@
1
- (()=>{"use strict";var e={n:t=>{var r=t&&t.__esModule?()=>t.default:()=>t;return e.d(r,{a:r}),r},d:(t,r)=>{for(var n in r)e.o(r,n)&&!e.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:r[n]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},t={};e.r(t),e.d(t,{DrawControl:()=>u,GeoJsonLayer:()=>v,LayerMenu:()=>L,LocationMarker:()=>q,Map:()=>D,MapControl:()=>_,MapDraw:()=>G,RasterLayer:()=>J});const r=require("@mapbox/mapbox-gl-draw");var n=e.n(r);const o=require("react");var a=e.n(o);const i=require("react-map-gl");var l=e.n(i);const u=(0,o.forwardRef)((function(e,t){var r=(0,i.useControl)((function(){return new(n())(e)}),(function(t){var r=t.map;r.on("draw.create",e.onCreate),r.on("draw.update",e.onUpdate),r.on("draw.delete",e.onDelete)}),(function(t){var r=t.map;r.off("draw.create",e.onCreate),r.off("draw.update",e.onUpdate),r.off("draw.delete",e.onDelete)}),{position:e.position});return(0,o.useImperativeHandle)(t,(function(){return r}),[r]),null})),c=require("underscore");var f=e.n(c);function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var y="#CC3333",p="#990000",m={"fill-color":y,"fill-opacity":.2},b={"line-color":p,"line-opacity":.6},d={"circle-radius":["interpolate",["linear"],["number",["get","point_count"],1],0,4,10,14],"circle-stroke-width":1,"circle-color":y,"circle-stroke-color":p};const v=function(e){var t,r,n=(t=(0,o.useState)(e.data),r=2,function(e){if(Array.isArray(e))return e}(t)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,a,i,l=[],u=!0,c=!1;try{if(a=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=a.call(r)).done)&&(l.push(n.value),l.length!==t);u=!0);}catch(e){c=!0,o=e}finally{try{if(!u&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(c)throw o}}return l}}(t,r)||function(e,t){if(e){if("string"==typeof e)return s(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?s(e,t):void 0}}(t,r)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),l=n[0],u=n[1],c=(0,o.useCallback)((function(e,t){return f().defaults(e,t)}),[]),y=(0,o.useMemo)((function(){return c(e.fillStyle,m)}),[c,e.fillStyle]),p=(0,o.useMemo)((function(){return c(e.lineStyle,b)}),[c,e.lineStyle]),v=(0,o.useMemo)((function(){return c(e.pointStyle,d)}),[c,e.pointStyle]);return(0,o.useEffect)((function(){e.url&&fetch(e.url).then((function(e){return e.json()})).then((function(e){return u(e)}))}),[e.url]),a().createElement(i.Source,{data:l,type:"geojson"},a().createElement(i.Layer,{filter:["!=","$type","Point"],paint:y,type:"fill"}),a().createElement(i.Layer,{filter:["!=","$type","Point"],paint:p,type:"line"}),a().createElement(i.Layer,{filter:["==","$type","Point"],paint:v,type:"circle"}))},h=require("react-icons/bs"),g=require("react-icons/io5"),S=require("maplibre-gl");var w=e.n(S);const O=require("react-dom");function j(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function E(e){return E="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},E(e)}function C(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,A(n.key),n)}}function A(e){var t=function(e,t){if("object"!=E(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!=E(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==E(t)?t:String(t)}var P=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._map=null,this._container=void 0,this._redraw=void 0,this._redraw=t}var t,r;return t=e,(r=[{key:"onAdd",value:function(e){return this._map=e,e.on("move",this._redraw),this._container=document.createElement("div"),this._container.className="maplibregl-ctrl-group maplibregl-ctrl",this._redraw(),this._container}},{key:"onRemove",value:function(){this._container.remove(),this._map.off("move",this._redraw),this._map=null}},{key:"getMap",value:function(){return this._map}},{key:"getElement",value:function(){return this._container}}])&&C(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();const _=function(e){var t,r,n=(t=(0,o.useState)(0),r=2,function(e){if(Array.isArray(e))return e}(t)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,a,i,l=[],u=!0,c=!1;try{if(a=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=a.call(r)).done)&&(l.push(n.value),l.length!==t);u=!0);}catch(e){c=!0,o=e}finally{try{if(!u&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(c)throw o}}return l}}(t,r)||function(e,t){if(e){if("string"==typeof e)return j(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?j(e,t):void 0}}(t,r)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}())[1],a=(0,o.useCallback)((function(){return n((function(e){return e+1}))}),[]),l=(0,i.useControl)((function(){return new P(a)}),{position:e.position}),u=l.getMap(),c=o.Children.map(f().compact(o.Children.toArray(e.children)),(function(e){return(0,o.cloneElement)(e,{map:u})}));return(0,o.useEffect)((function(){e.mapRef&&(e.mapRef.current=u)}),[u,e.mapRef]),u&&(0,O.createPortal)(c,l.getElement())};function k(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,a,i,l=[],u=!0,c=!1;try{if(a=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=a.call(r)).done)&&(l.push(n.value),l.length!==t);u=!0);}catch(e){c=!0,o=e}finally{try{if(!u&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(c)throw o}}return l}}(e,t)||M(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function M(e,t){if(e){if("string"==typeof e)return x(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?x(e,t):void 0}}function x(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var I=function(e){var t=k((0,o.useState)(0),2),r=t[0],n=t[1],i=k((0,o.useState)(),2),l=i[0],u=i[1],c=k((0,o.useState)(!1),2),s=c[0],y=c[1],p=(0,o.useRef)(),m=(0,o.useCallback)((function(t){return e.names&&e.names.length>t&&e.names[t]}),[e.names]),b=(0,o.useCallback)((function(e){return f().includes(l,e)}),[l]),d=(0,o.useMemo)((function(){return o.Children.toArray(e.children)}),[e.children]),v=(0,o.useMemo)((function(){return f().filter(d,(function(e,t){return b(t)}))}),[d,b]),S=(0,o.useCallback)((function(e){var t,r;t=b(e)?f().without(l,e):[].concat(function(e){if(Array.isArray(e))return x(e)}(r=l)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(r)||M(r)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),[e]),u(t)}),[b,l]);return(0,o.useEffect)((function(){u(f().times(d.length,(function(e){return e})))}),[]),(0,o.useEffect)((function(){var e=p.current;if(e&&e._canvas){var t=p.current._canvas.offsetHeight;n(void 0===t?0:t)}}),[p.current]),f().isEmpty(d)?null:a().createElement(a().Fragment,null,a().createElement(_,{mapRef:p,position:e.position},a().createElement("button",{className:"mapbox-gl-draw_ctrl-draw-btn layer-button",onClick:function(){return y((function(e){return!e}))},type:"button"},a().createElement(h.BsStack,{size:"1.25em"})),s&&a().createElement("div",{className:"layer-menu",style:{maxHeight:"calc(".concat(r,"px - ").concat(30,"px)")}},a().createElement("div",{className:"menu"},f().map(d,(function(e,t){return a().createElement("div",{"aria-selected":b(t),className:"option",role:"option",onClick:function(){return S(t)},onKeyDown:function(){return S(t)},tabIndex:t},a().createElement("div",{className:"checkmark-container"},b(t)&&a().createElement(g.IoCheckmarkOutline,{size:"1em"})),m(t))}))))),v)};I.defaultProps={position:"top-left"};const L=I,R=require("@peripleo/maplibre"),z=require("@turf/turf"),D={getBoundingBox:function(e){var t,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=(0,z.bbox)(e),o=(0,z.bboxPolygon)(n);return t=r?(0,z.buffer)(o,r,{units:"miles"}):o,(0,z.bbox)(t)}};var T=function(e){var t=(0,R.useMap)();return(0,o.useEffect)((function(){if(t&&e.data){var r=D.getBoundingBox(e.data,e.buffer);t.fitBounds(r)}}),[e.buffer,e.data]),a().createElement(a().Fragment,null,a().createElement(R.PulsingMarkerLayer,{id:"current",data:e.data}),a().createElement(R.MixedGeoJSONLayer,{id:"current",data:e.data,fillStyle:e.fillStyle,strokeStyle:e.strokeStyle,pointStyle:e.pointStyle}))};T.defaultProps={buffer:2,fillStyle:{type:"fill",paint:{"fill-color":"#ff623b","fill-opacity":.2}},pointStyle:{type:"circle",paint:{"circle-radius":["interpolate",["linear"],["number",["get","point_count"],1],0,4,10,14],"circle-stroke-width":1,"circle-color":["case",["boolean",["feature-state","hover"],!1],"#3b62ff","#ff623b"],"circle-stroke-color":"#8d260c"}},strokeStyle:{type:"line",paint:{"line-color":"#ff623b","line-opacity":.6}}};const q=T;function B(e){return B="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},B(e)}function N(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function U(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,a,i,l=[],u=!0,c=!1;try{if(a=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=a.call(r)).done)&&(l.push(n.value),l.length!==t);u=!0);}catch(e){c=!0,o=e}finally{try{if(!u&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(c)throw o}}return l}}(e,t)||function(e,t){if(e){if("string"==typeof e)return $(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?$(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function $(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}n().constants.classes.CONTROL_BASE="maplibregl-ctrl",n().constants.classes.CONTROL_PREFIX="maplibregl-ctrl-",n().constants.classes.CONTROL_GROUP="maplibregl-ctrl-group";var F=function(e){var t=U((0,o.useState)(!1),2),r=t[0],n=t[1],i=(0,o.useRef)(),c=(0,o.useRef)(),s=(0,o.useCallback)((function(){e.onChange(i.current.getAll())}),[e.onChange]),y=(0,o.useMemo)((function(){return function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?N(Object(r),!0).forEach((function(t){var n,o,a,i;n=e,o=t,a=r[t],i=function(e,t){if("object"!=B(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!=B(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(o),(o="symbol"==B(i)?i:String(i))in n?Object.defineProperty(n,o,{value:a,enumerable:!0,configurable:!0,writable:!0}):n[o]=a})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):N(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({height:500,width:"100%"},e.style||{})}),[e.style]);return(0,o.useEffect)((function(){if(r&&e.data){var t=D.getBoundingBox(e.data,e.buffer);if(f().every(t,f().isFinite)){var n=U(t,4),o=[[n[0],n[1]],[n[2],n[3]]];c.current.fitBounds(o,{duration:e.zoomDuration})}"GeometryCollection"===e.data.type?f().each(e.data.geometries,(function(e){i.current.add((0,z.feature)(e))})):i.current.add(e.data)}}),[r,e.data]),a().createElement(l(),{attributionControl:!1,onLoad:function(){return n(!0)},mapLib:w(),ref:c,style:y,mapStyle:e.mapStyle},a().createElement(u,{ref:i,controls:{line_string:!0,point:!0,polygon:!0,trash:!0},displayControlsDefault:!1,onCreate:s,onUpdate:s,onDelete:s,position:"bottom-left"}),e.children)};F.defaultProps={buffer:2,zoomDuration:1e3};const G=F;var H=function(e){return a().createElement(i.Source,{tileSize:e.tileSize,tiles:[e.url],type:"raster"},a().createElement(i.Layer,{type:"raster",paint:{"raster-opacity":e.opacity},minzoom:e.minzoom,maxzoom:e.maxzoom}))};H.defaultProps={maxzoom:22,minzoom:0,opacity:.7,tileSize:256};const J=H;module.exports=t})();
1
+ (()=>{"use strict";var e={n:t=>{var r=t&&t.__esModule?()=>t.default:()=>t;return e.d(r,{a:r}),r},d:(t,r)=>{for(var n in r)e.o(r,n)&&!e.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:r[n]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},t={};e.r(t),e.d(t,{DrawControl:()=>u,GeoJsonLayer:()=>v,LayerMenu:()=>I,MapControl:()=>A,MapDraw:()=>q,RasterLayer:()=>U});const r=require("@mapbox/mapbox-gl-draw");var n=e.n(r);const o=require("react");var a=e.n(o);const i=require("react-map-gl");var l=e.n(i);const u=(0,o.forwardRef)((function(e,t){var r=(0,i.useControl)((function(){return new(n())(e)}),(function(t){var r=t.map;r.on("draw.create",e.onCreate),r.on("draw.update",e.onUpdate),r.on("draw.delete",e.onDelete)}),(function(t){var r=t.map;r.off("draw.create",e.onCreate),r.off("draw.update",e.onUpdate),r.off("draw.delete",e.onDelete)}),{position:e.position});return(0,o.useImperativeHandle)(t,(function(){return r}),[r]),null})),c=require("underscore");var f=e.n(c);function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var m="#CC3333",p="#990000",y={"fill-color":m,"fill-opacity":.2},d={"line-color":p,"line-opacity":.6},b={"circle-radius":["interpolate",["linear"],["number",["get","point_count"],1],0,4,10,14],"circle-stroke-width":1,"circle-color":m,"circle-stroke-color":p};const v=function(e){var t,r,n=(t=(0,o.useState)(e.data),r=2,function(e){if(Array.isArray(e))return e}(t)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,a=[],i=!0,l=!1;try{for(r=r.call(e);!(i=(n=r.next()).done)&&(a.push(n.value),!t||a.length!==t);i=!0);}catch(e){l=!0,o=e}finally{try{i||null==r.return||r.return()}finally{if(l)throw o}}return a}}(t,r)||function(e,t){if(e){if("string"==typeof e)return s(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?s(e,t):void 0}}(t,r)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),l=n[0],u=n[1],c=(0,o.useCallback)((function(e,t){return f().defaults(e,t)}),[]),m=(0,o.useMemo)((function(){return c(e.fillStyle,y)}),[c,e.fillStyle]),p=(0,o.useMemo)((function(){return c(e.lineStyle,d)}),[c,e.lineStyle]),v=(0,o.useMemo)((function(){return c(e.pointStyle,b)}),[c,e.pointStyle]);return(0,o.useEffect)((function(){e.url&&fetch(e.url).then((function(e){return e.json()})).then((function(e){return u(e)}))}),[e.url]),a().createElement(i.Source,{data:l,type:"geojson"},a().createElement(i.Layer,{filter:["!=","$type","Point"],paint:m,type:"fill"}),a().createElement(i.Layer,{filter:["!=","$type","Point"],paint:p,type:"line"}),a().createElement(i.Layer,{filter:["==","$type","Point"],paint:v,type:"circle"}))},h=require("react-icons/bs"),g=require("react-icons/io5"),w=require("maplibre-gl");var S=e.n(w);const O=require("react-dom");function E(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function C(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var j=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._map=null,this._redraw=t}var t,r;return t=e,(r=[{key:"onAdd",value:function(e){return this._map=e,e.on("move",this._redraw),this._container=document.createElement("div"),this._container.className="maplibregl-ctrl-group maplibregl-ctrl",this._redraw(),this._container}},{key:"onRemove",value:function(){this._container.remove(),this._map.off("move",this._redraw),this._map=null}},{key:"getMap",value:function(){return this._map}},{key:"getElement",value:function(){return this._container}}])&&C(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();const A=function(e){var t,r,n=(t=(0,o.useState)(0),r=2,function(e){if(Array.isArray(e))return e}(t)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,a=[],i=!0,l=!1;try{for(r=r.call(e);!(i=(n=r.next()).done)&&(a.push(n.value),!t||a.length!==t);i=!0);}catch(e){l=!0,o=e}finally{try{i||null==r.return||r.return()}finally{if(l)throw o}}return a}}(t,r)||function(e,t){if(e){if("string"==typeof e)return E(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?E(e,t):void 0}}(t,r)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}())[1],a=(0,o.useCallback)((function(){return n((function(e){return e+1}))}),[]),l=(0,i.useControl)((function(){return new j(a)}),{position:e.position}),u=l.getMap(),c=o.Children.map(f().compact(o.Children.toArray(e.children)),(function(e){return(0,o.cloneElement)(e,{map:u})}));return(0,o.useEffect)((function(){e.mapRef&&(e.mapRef.current=u)}),[u,e.mapRef]),u&&(0,O.createPortal)(c,l.getElement())};function _(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,a=[],i=!0,l=!1;try{for(r=r.call(e);!(i=(n=r.next()).done)&&(a.push(n.value),!t||a.length!==t);i=!0);}catch(e){l=!0,o=e}finally{try{i||null==r.return||r.return()}finally{if(l)throw o}}return a}}(e,t)||P(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function P(e,t){if(e){if("string"==typeof e)return k(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?k(e,t):void 0}}function k(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var x=function(e){var t=_((0,o.useState)(0),2),r=t[0],n=t[1],i=_((0,o.useState)(),2),l=i[0],u=i[1],c=_((0,o.useState)(!1),2),s=c[0],m=c[1],p=(0,o.useRef)(),y=(0,o.useCallback)((function(t){return e.names&&e.names.length>t&&e.names[t]}),[e.names]),d=(0,o.useCallback)((function(e){return f().includes(l,e)}),[l]),b=(0,o.useMemo)((function(){return o.Children.toArray(e.children)}),[e.children]),v=(0,o.useMemo)((function(){return f().filter(b,(function(e,t){return d(t)}))}),[b,d]),w=(0,o.useCallback)((function(e){var t,r;t=d(e)?f().without(l,e):[].concat(function(e){if(Array.isArray(e))return k(e)}(r=l)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(r)||P(r)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),[e]),u(t)}),[d,l]);return(0,o.useEffect)((function(){u(f().times(b.length,(function(e){return e})))}),[]),(0,o.useEffect)((function(){var e=p.current;if(e&&e._canvas){var t=p.current._canvas.offsetHeight;n(void 0===t?0:t)}}),[p.current]),f().isEmpty(b)?null:a().createElement(a().Fragment,null,a().createElement(A,{mapRef:p,position:e.position},a().createElement("button",{className:"mapbox-gl-draw_ctrl-draw-btn layer-button",onClick:function(){return m((function(e){return!e}))},type:"button"},a().createElement(h.BsStack,{size:"1.25em"})),s&&a().createElement("div",{className:"layer-menu",style:{maxHeight:"calc(".concat(r,"px - ").concat(30,"px)")}},a().createElement("div",{className:"menu"},f().map(b,(function(e,t){return a().createElement("div",{"aria-selected":d(t),className:"option",role:"option",onClick:function(){return w(t)},onKeyDown:function(){return w(t)},tabIndex:t},a().createElement("div",{className:"checkmark-container"},d(t)&&a().createElement(g.IoCheckmarkOutline,{size:"1em"})),y(t))}))))),v)};x.defaultProps={position:"top-left"};const I=x,M=require("@turf/turf");function R(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function z(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function D(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,a=[],i=!0,l=!1;try{for(r=r.call(e);!(i=(n=r.next()).done)&&(a.push(n.value),!t||a.length!==t);i=!0);}catch(e){l=!0,o=e}finally{try{i||null==r.return||r.return()}finally{if(l)throw o}}return a}}(e,t)||function(e,t){if(e){if("string"==typeof e)return L(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?L(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function L(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}n().constants.classes.CONTROL_BASE="maplibregl-ctrl",n().constants.classes.CONTROL_PREFIX="maplibregl-ctrl-",n().constants.classes.CONTROL_GROUP="maplibregl-ctrl-group";var T=function(e){var t=D((0,o.useState)(!1),2),r=t[0],n=t[1],i=(0,o.useRef)(),c=(0,o.useRef)(),s=(0,o.useCallback)((function(){e.onChange(i.current.getAll())}),[e.onChange]),m=(0,o.useMemo)((function(){return function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?R(Object(r),!0).forEach((function(t){z(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):R(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({height:500,width:"100%"},e.style||{})}),[e.style]);return(0,o.useEffect)((function(){if(r&&e.data){var t=(0,M.bbox)(e.data),n=(0,M.bboxPolygon)(t),o=(0,M.buffer)(n,e.buffer,{units:"miles"}),a=(0,M.bbox)(o);if(f().every(a,f().isFinite)){var l=D(a,4),u=[[l[0],l[1]],[l[2],l[3]]];c.current.fitBounds(u,{duration:e.zoomDuration})}"GeometryCollection"===e.data.type?f().each(e.data.geometries,(function(e){i.current.add((0,M.feature)(e))})):i.current.add(e.data)}}),[r,e.data]),a().createElement(l(),{attributionControl:!1,onLoad:function(){return n(!0)},mapLib:S(),ref:c,style:m,mapStyle:e.mapStyle},a().createElement(u,{ref:i,controls:{line_string:!0,point:!0,polygon:!0,trash:!0},displayControlsDefault:!1,onCreate:s,onUpdate:s,onDelete:s,position:"bottom-left"}),e.children)};T.defaultProps={buffer:2,zoomDuration:1e3};const q=T;var N=function(e){return a().createElement(i.Source,{tileSize:e.tileSize,tiles:[e.url],type:"raster"},a().createElement(i.Layer,{type:"raster",paint:{"raster-opacity":e.opacity},minzoom:e.minzoom,maxzoom:e.maxzoom}))};N.defaultProps={maxzoom:22,minzoom:0,opacity:.7,tileSize:256};const U=N;module.exports=t})();
2
2
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","mappings":"mBACA,IAAIA,EAAsB,CCA1BA,EAAyBC,IACxB,IAAIC,EAASD,GAAUA,EAAOE,WAC7B,IAAOF,EAAiB,QACxB,IAAM,EAEP,OADAD,EAAoBI,EAAEF,EAAQ,CAAEG,EAAGH,IAC5BA,CAAM,ECLdF,EAAwB,CAACM,EAASC,KACjC,IAAI,IAAIC,KAAOD,EACXP,EAAoBS,EAAEF,EAAYC,KAASR,EAAoBS,EAAEH,EAASE,IAC5EE,OAAOC,eAAeL,EAASE,EAAK,CAAEI,YAAY,EAAMC,IAAKN,EAAWC,IAE1E,ECNDR,EAAwB,CAACc,EAAKC,IAAUL,OAAOM,UAAUC,eAAeC,KAAKJ,EAAKC,GCClFf,EAAyBM,IACH,oBAAXa,QAA0BA,OAAOC,aAC1CV,OAAOC,eAAeL,EAASa,OAAOC,YAAa,CAAEC,MAAO,WAE7DX,OAAOC,eAAeL,EAAS,aAAc,CAAEe,OAAO,GAAO,G,0JCL9D,MAAM,EAA+BC,QAAQ,0B,aCA7C,MAAM,EAA+BA,QAAQ,S,aCA7C,MAAM,EAA+BA,QAAQ,gB,aC0C7C,SA7BoBC,EA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ShK,EAAMgK,QACfC,QAASjK,EAAMiK,UAEV,EAGXL,EAAYrD,aAAe,CACzB0D,QAAS,GACTD,QAAS,EACTD,QAAS,GACTF,SAAU,KAGZ,U","sources":["webpack://@performant-software/geospatial/webpack/bootstrap","webpack://@performant-software/geospatial/webpack/runtime/compat get default export","webpack://@performant-software/geospatial/webpack/runtime/define property getters","webpack://@performant-software/geospatial/webpack/runtime/hasOwnProperty shorthand","webpack://@performant-software/geospatial/webpack/runtime/make namespace object","webpack://@performant-software/geospatial/external commonjs \"@mapbox/mapbox-gl-draw\"","webpack://@performant-software/geospatial/external commonjs2 \"react\"","webpack://@performant-software/geospatial/external commonjs \"react-map-gl\"","webpack://@performant-software/geospatial/./src/components/DrawControl.js","webpack://@performant-software/geospatial/external commonjs \"underscore\"","webpack://@performant-software/geospatial/./src/components/GeoJsonLayer.js","webpack://@performant-software/geospatial/external commonjs \"react-icons/bs\"","webpack://@performant-software/geospatial/external commonjs \"react-icons/io5\"","webpack://@performant-software/geospatial/external commonjs \"maplibre-gl\"","webpack://@performant-software/geospatial/external commonjs2 \"react-dom\"","webpack://@performant-software/geospatial/./src/components/MapControl.js","webpack://@performant-software/geospatial/./src/components/LayerMenu.js","webpack://@performant-software/geospatial/external commonjs \"@peripleo/maplibre\"","webpack://@performant-software/geospatial/external commonjs \"@turf/turf\"","webpack://@performant-software/geospatial/./src/utils/Map.js","webpack://@performant-software/geospatial/./src/components/LocationMarker.js","webpack://@performant-software/geospatial/./src/utils/MapStyles.js","webpack://@performant-software/geospatial/./src/components/MapDraw.js","webpack://@performant-software/geospatial/./src/components/RasterLayer.js"],"sourcesContent":["// The require scope\nvar __webpack_require__ = {};\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"@mapbox/mapbox-gl-draw\");","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"react\");","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"react-map-gl\");","// @flow\n\nimport MapboxDraw from '@mapbox/mapbox-gl-draw';\nimport { forwardRef, useImperativeHandle } from 'react';\nimport { useControl, type ControlPosition, type MapRef } from 'react-map-gl';\n\ntype Props = {\n position?: ControlPosition;\n onCreate?: (evt: { features: Array<any> }) => void;\n onUpdate?: (evt: { features: Array<any>, action: string }) => void;\n onDelete?: (evt: { features: Array<any> }) => void;\n};\n\nconst DrawControl = forwardRef((props: Props, ref) => {\n /**\n * Creates the drawer ref using MapboxDraw.\n */\n const drawRef = useControl(\n () => new MapboxDraw(props),\n ({ map }: { map: MapRef }) => {\n map.on('draw.create', props.onCreate);\n map.on('draw.update', props.onUpdate);\n map.on('draw.delete', props.onDelete);\n },\n ({ map }: { map: MapRef }) => {\n map.off('draw.create', props.onCreate);\n map.off('draw.update', props.onUpdate);\n map.off('draw.delete', props.onDelete);\n },\n {\n position: props.position\n }\n );\n\n /**\n * Exposes the ref for the MapboxDraw object.\n */\n useImperativeHandle(ref, () => drawRef, [drawRef]);\n\n return null;\n});\n\nexport default DrawControl;\n","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"underscore\");","// @flow\n\nimport React, {\n useCallback,\n useEffect,\n useMemo,\n useState\n} from 'react';\nimport { Layer, Source } from 'react-map-gl';\nimport _ from 'underscore';\n\ntype Props = {\n data?: { [key: string]: any },\n fillStyle?: { [key: string]: any },\n lineStyle?: { [key: string]: any },\n pointStyle?: { [key: string]: any },\n url?: string\n};\n\nconst DEFAULT_COLOR = '#CC3333';\nconst HIGHLIGHT_COLOR = '#990000';\n\nconst DEFAULT_FILL_STYLES = {\n 'fill-color': DEFAULT_COLOR,\n 'fill-opacity': 0.2\n};\n\nconst DEFAULT_LINE_STYLES = {\n 'line-color': HIGHLIGHT_COLOR,\n 'line-opacity': 0.6\n};\n\nconst DEFAULT_POINT_STYLES = {\n 'circle-radius': [\n 'interpolate',\n ['linear'],\n ['number', ['get', 'point_count'], 1],\n 0, 4,\n 10, 14\n ],\n 'circle-stroke-width': 1,\n 'circle-color': DEFAULT_COLOR,\n 'circle-stroke-color': HIGHLIGHT_COLOR\n};\n\nconst GeoJsonLayer = (props: Props) => {\n const [data, setData] = useState(props.data);\n\n /**\n * Returns the layer style for the passed style and default.\n *\n * @type {function(*, *): *}\n */\n const getLayerStyles = useCallback((style, defaultStyle) => _.defaults(style, defaultStyle), []);\n\n /**\n * Sets the fill layer style.\n *\n * @type {*}\n */\n const fillStyle = useMemo(() => (\n getLayerStyles(props.fillStyle, DEFAULT_FILL_STYLES)\n ), [getLayerStyles, props.fillStyle]);\n\n /**\n * Sets the line layer style.\n *\n * @type {*}\n */\n const lineStyle = useMemo(() => (\n getLayerStyles(props.lineStyle, DEFAULT_LINE_STYLES)\n ), [getLayerStyles, props.lineStyle]);\n\n /**\n * Sets the point layer style.\n *\n * @type {*}\n */\n const pointStyle = useMemo(() => (\n getLayerStyles(props.pointStyle, DEFAULT_POINT_STYLES)\n ), [getLayerStyles, props.pointStyle]);\n\n /**\n * If the data is passed as a URL, fetches the passed URL and sets the response on the state.\n */\n useEffect(() => {\n if (props.url) {\n fetch(props.url)\n .then((response) => response.json())\n .then((json) => setData(json));\n }\n }, [props.url]);\n\n return (\n <Source\n data={data}\n type='geojson'\n >\n <Layer\n filter={['!=', '$type', 'Point']}\n paint={fillStyle}\n type='fill'\n />\n <Layer\n filter={['!=', '$type', 'Point']}\n paint={lineStyle}\n type='line'\n />\n <Layer\n filter={['==', '$type', 'Point']}\n paint={pointStyle}\n type='circle'\n />\n </Source>\n );\n};\n\nexport default GeoJsonLayer;\n","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"react-icons/bs\");","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"react-icons/io5\");","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"maplibre-gl\");","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"react-dom\");","// @flow\n\nimport { IControl } from 'maplibre-gl';\nimport {\n Children,\n cloneElement,\n useCallback,\n useEffect,\n useState\n} from 'react';\nimport { createPortal } from 'react-dom';\nimport { MapboxMap, useControl } from 'react-map-gl';\nimport _ from 'underscore';\n\n/**\n * Class to implement the IControl interface to allow custom controls to be drawn on the map.\n */\nclass IControlImpl implements IControl {\n _map: MapboxMap = null;\n _container: HTMLElement;\n _redraw: () => void;\n\n /**\n * Constructs a new IControlImpl object.\n *\n * @param redraw\n */\n constructor(redraw: () => void) {\n this._redraw = redraw;\n }\n\n /**\n * Creates the container when the component is added to the passed map.\n *\n * @param map\n *\n * @returns {HTMLElement}\n */\n onAdd(map) {\n this._map = map;\n map.on('move', this._redraw);\n\n this._container = document.createElement('div');\n this._container.className = 'maplibregl-ctrl-group maplibregl-ctrl';\n this._redraw();\n return this._container;\n }\n\n /**\n * Removes the container when the component is removed from the map.\n */\n onRemove() {\n this._container.remove();\n this._map.off('move', this._redraw);\n this._map = null;\n }\n\n /**\n * Returns the map instance.\n *\n * @returns {mapboxgl.Map}\n */\n getMap() {\n return this._map;\n }\n\n /**\n * Returns the container instance.\n *\n * @returns {HTMLElement}\n */\n getElement() {\n return this._container;\n }\n}\n\nconst MapControl = (props) => {\n const [, setVersion] = useState(0);\n\n /**\n * Forces the component to re-render on map move.\n *\n * @type {function(): void}\n */\n const forceUpdate = useCallback(() => setVersion((v) => v + 1), []);\n\n /**\n * Creates the map control.\n *\n * @type {IControlImpl}\n */\n const ctrl = useControl(() => new IControlImpl(forceUpdate), { position: props.position });\n\n /**\n * Sets the map instance.\n *\n * @type {mapboxgl.Map}\n */\n const map = ctrl.getMap();\n\n /**\n * Creates the list of children to be added to the map instance.\n *\n * @type {Array<$NonMaybeType<*>>}\n */\n const children = Children.map(_.compact(Children.toArray(props.children)), (child) => cloneElement(child, { map }));\n\n /**\n * Sets the map ref.\n */\n useEffect(() => {\n if (props.mapRef) {\n // eslint-disable-next-line no-param-reassign\n props.mapRef.current = map;\n }\n }, [map, props.mapRef]);\n\n return map && createPortal(children, ctrl.getElement());\n};\n\nexport default MapControl;\n","// @flow\n\nimport React, {\n Children,\n useCallback,\n useEffect,\n useMemo, useRef,\n useState\n} from 'react';\nimport { BsStack } from 'react-icons/bs';\nimport { IoCheckmarkOutline } from 'react-icons/io5';\nimport _ from 'underscore';\nimport MapControl from './MapControl';\nimport './LayerMenu.css';\n\ntype Props = {\n children: Node,\n names: Array<string>,\n position: 'top-left' | 'bottom-left' | 'top-right' | 'bottom-right'\n};\n\nconst MENU_PADDING = 30;\n\nconst LayerMenu = (props: Props) => {\n const [canvasHeight, setCanvasHeight] = useState(0);\n const [visible, setVisible] = useState();\n const [menuOpen, setMenuOpen] = useState(false);\n\n const mapRef = useRef();\n\n /**\n * Returns the name of the layer at the passed index.\n *\n * @type {unknown}\n */\n const getLayerName = useCallback((index) => (\n props.names && props.names.length > index && props.names[index]\n ), [props.names]);\n\n /**\n * Returns true if the child element at the passed index is visible.\n *\n * @type {function(*): *}\n */\n const isVisible = useCallback((index) => _.includes(visible, index), [visible]);\n\n /**\n * Returns a memoized array of the child elements.\n *\n * @type {Array<$NonMaybeType<unknown>>}\n */\n const children = useMemo(() => Children.toArray(props.children), [props.children]);\n\n /**\n * Returns a memoized array of visible child elements.\n */\n const visibleChildren = useMemo(() => _.filter(children, (child, index) => isVisible(index)), [children, isVisible]);\n\n /**\n * Toggles the visibility for the child element at the passed index.\n *\n * @type {(function(*): void)|*}\n */\n const toggleVisibility = useCallback((index) => {\n let value;\n\n if (isVisible(index)) {\n value = _.without(visible, index);\n } else {\n value = [...visible, index];\n }\n\n setVisible(value);\n }, [isVisible, visible]);\n\n /**\n * Sets all of the child elements to be visible when the component mounts.\n */\n useEffect(() => {\n setVisible(_.times(children.length, (index) => index));\n }, []);\n\n /**\n * Sets the map canvas height.\n */\n useEffect(() => {\n const { current: instance } = mapRef;\n\n if (instance && instance._canvas) {\n const { offsetHeight = 0 } = mapRef.current._canvas;\n setCanvasHeight(offsetHeight);\n }\n }, [mapRef.current]);\n\n if (_.isEmpty(children)) {\n return null;\n }\n\n return (\n <>\n <MapControl\n mapRef={mapRef}\n position={props.position}\n >\n <button\n className='mapbox-gl-draw_ctrl-draw-btn layer-button'\n onClick={() => setMenuOpen((prevMenuOpen) => !prevMenuOpen)}\n type='button'\n >\n <BsStack\n size='1.25em'\n />\n </button>\n { menuOpen && (\n <div\n className='layer-menu'\n style={{\n maxHeight: `calc(${canvasHeight}px - ${MENU_PADDING}px)`\n }}\n >\n <div\n className='menu'\n >\n { _.map(children, (child, index) => (\n <div\n aria-selected={isVisible(index)}\n className='option'\n role='option'\n onClick={() => toggleVisibility(index)}\n onKeyDown={() => toggleVisibility(index)}\n tabIndex={index}\n >\n <div\n className='checkmark-container'\n >\n { isVisible(index) && (\n <IoCheckmarkOutline\n size='1em'\n />\n )}\n </div>\n { getLayerName(index) }\n </div>\n ))}\n </div>\n </div>\n )}\n </MapControl>\n { visibleChildren }\n </>\n );\n};\n\nLayerMenu.defaultProps = {\n position: 'top-left'\n};\n\nexport default LayerMenu;\n","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"@peripleo/maplibre\");","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"@turf/turf\");","// @flow\n\nimport { bbox, bboxPolygon, buffer } from '@turf/turf';\n\n/**\n * Returns a bounding box for the passed geometry (with optional buffer).\n *\n * @param geometry\n * @param bufferDistance\n *\n * @returns {BBox}\n */\nconst getBoundingBox = (geometry, bufferDistance = null) => {\n // Convert the GeoJSON into a bounding box\n const box = bbox(geometry);\n\n // Convert the bounding box to a polygon\n const polygon = bboxPolygon(box);\n\n // Create a buffer around the polygon (if a distance is provided)\n let polygonBuffer;\n\n if (bufferDistance) {\n polygonBuffer = buffer(polygon, bufferDistance, { units: 'miles' });\n } else {\n polygonBuffer = polygon;\n }\n\n // Convert the buffer to a bounding box\n return bbox(polygonBuffer);\n};\n\nexport default {\n getBoundingBox\n};\n","// @flow\n\nimport React, { useEffect } from 'react';\nimport { MixedGeoJSONLayer, PulsingMarkerLayer, useMap } from '@peripleo/maplibre';\nimport { DEFAULT_FILL_STYLE, DEFAULT_POINT_STYLE, DEFAULT_STROKE_STYLE } from '../utils/MapStyles';\nimport MapUtils from '../utils/Map';\n\ntype Props = {\n /**\n * The number of miles to buffer the GeoJSON data.\n */\n buffer: number,\n\n /**\n * The GeoJSON data representing the location.\n */\n data: { [key: string]: any },\n\n /**\n * GeoJSON layer fill style.\n */\n fillStyle?: { [key: string]: any },\n\n /**\n * GeoJSON layer point style.\n */\n pointStyle?: { [key: string]: any },\n\n /**\n * GeoJSON layer stroke style\n */\n strokeStyle?: { [key: string]: any }\n};\n\nconst DEFAULT_BUFFER = 2;\n\n/**\n * This component renders a location marker to be used in a Peripleo context.\n */\nconst LocationMarker = (props: Props) => {\n const map = useMap();\n\n /**\n * Sets the bounding box on the map.\n */\n useEffect(() => {\n if (map && props.data) {\n const boundingBox = MapUtils.getBoundingBox(props.data, props.buffer);\n map.fitBounds(boundingBox);\n }\n }, [props.buffer, props.data]);\n\n return (\n <>\n <PulsingMarkerLayer\n id='current'\n data={props.data}\n />\n <MixedGeoJSONLayer\n id='current'\n data={props.data}\n fillStyle={props.fillStyle}\n strokeStyle={props.strokeStyle}\n pointStyle={props.pointStyle}\n />\n </>\n );\n};\n\nLocationMarker.defaultProps = {\n buffer: DEFAULT_BUFFER,\n fillStyle: DEFAULT_FILL_STYLE,\n pointStyle: DEFAULT_POINT_STYLE,\n strokeStyle: DEFAULT_STROKE_STYLE\n};\n\nexport default LocationMarker;\n","// @flow\n\nexport const DEFAULT_POINT_STYLE = {\n type: 'circle',\n paint: {\n 'circle-radius': [\n 'interpolate',\n ['linear'],\n ['number', ['get', 'point_count'], 1],\n 0, 4,\n 10, 14\n ],\n 'circle-stroke-width': 1,\n 'circle-color': [\n 'case',\n ['boolean', ['feature-state', 'hover'], false],\n '#3b62ff',\n '#ff623b'\n ],\n 'circle-stroke-color': '#8d260c'\n }\n};\n\nexport const DEFAULT_FILL_STYLE = {\n type: 'fill',\n paint: {\n 'fill-color': '#ff623b',\n 'fill-opacity': 0.2\n }\n};\n\nexport const DEFAULT_STROKE_STYLE = {\n type: 'line',\n paint: {\n 'line-color': '#ff623b',\n 'line-opacity': 0.6\n }\n};\n","// @flow\n\nimport MapboxDraw from '@mapbox/mapbox-gl-draw';\nimport { feature, type FeatureCollection, type GeometryCollection } from '@turf/turf';\nimport maplibregl from 'maplibre-gl';\nimport React, {\n useCallback,\n useEffect,\n useMemo,\n useRef,\n useState,\n type Node\n} from 'react';\nimport Map, { MapRef } from 'react-map-gl';\nimport _ from 'underscore';\nimport DrawControl from './DrawControl';\nimport MapUtils from '../utils/Map';\nimport './MapDraw.css';\n\n// Override the MapboxDraw components to use MapLibre styles\nMapboxDraw.constants.classes.CONTROL_BASE = 'maplibregl-ctrl';\nMapboxDraw.constants.classes.CONTROL_PREFIX = 'maplibregl-ctrl-';\nMapboxDraw.constants.classes.CONTROL_GROUP = 'maplibregl-ctrl-group';\n\ntype Props = {\n /**\n * The number of miles to buffer the GeoJSON data.\n */\n buffer?: number,\n\n /**\n * Additional child nodes to render.\n */\n children?: Node,\n\n /**\n * GeoJSON structured data to be displayed on the map.\n */\n data: GeometryCollection | FeatureCollection,\n\n /**\n * URL of the map style to render. This URL should contain any necessary API keys.\n */\n mapStyle: string,\n\n /**\n * Callback fired when the map geometries are changed.\n *\n * @param features\n */\n onChange: (features: Array<any>) => void,\n\n /**\n * Map style object.\n */\n style?: any,\n\n /**\n * The time in milliseconds to zoom into the location.\n */\n zoomDuration?: number\n};\n\nconst DEFAULT_BUFFER = 2;\nconst DEFAULT_ZOOM_DELAY = 1000;\n\nconst GeometryTypes = {\n geometryCollection: 'GeometryCollection',\n point: 'Point'\n};\n\n/**\n * This component renders a map with controls for drawing one or more geometries. Geometries can be a point (lat/long),\n * a line, or a polygon.\n */\nconst MapDraw = (props: Props) => {\n const [loaded, setLoaded] = useState(false);\n\n const drawRef = useRef<MapboxDraw>();\n const mapRef = useRef<MapRef>();\n\n /**\n * Calls the onChange prop with all of the geometries in the current drawer.\n *\n * @type {(function(): void)|*}\n */\n const onChange = useCallback(() => {\n props.onChange(drawRef.current.getAll());\n }, [props.onChange]);\n\n /**\n * Sets the map style.\n *\n * @type {{width: string, height: number}}\n */\n const style = useMemo(() => ({ height: 500, width: '100%', ...(props.style || {}) }), [props.style]);\n\n /**\n * Updates the map bounding box and drawer when the geometry is changed.\n */\n useEffect(() => {\n if (loaded && props.data) {\n // Get the bounding box for the passed data\n const boundingBox = MapUtils.getBoundingBox(props.data, props.buffer);\n\n // Sets the bounding box for the current geometry\n if (_.every(boundingBox, _.isFinite)) {\n const [minLng, minLat, maxLng, maxLat] = boundingBox;\n const bounds = [[minLng, minLat], [maxLng, maxLat]];\n\n mapRef.current.fitBounds(bounds, { duration: props.zoomDuration });\n }\n\n // Handle special cases for geometry collection (not supported by mabox-gl-draw) and point\n if (props.data.type === GeometryTypes.geometryCollection) {\n _.each(props.data.geometries, (geometry) => {\n drawRef.current.add(feature(geometry));\n });\n } else {\n drawRef.current.add(props.data);\n }\n }\n }, [loaded, props.data]);\n\n return (\n <Map\n attributionControl={false}\n onLoad={() => setLoaded(true)}\n mapLib={maplibregl}\n ref={mapRef}\n style={style}\n mapStyle={props.mapStyle}\n >\n <DrawControl\n ref={drawRef}\n controls={{\n line_string: true,\n point: true,\n polygon: true,\n trash: true\n }}\n displayControlsDefault={false}\n onCreate={onChange}\n onUpdate={onChange}\n onDelete={onChange}\n position='bottom-left'\n />\n { props.children }\n </Map>\n );\n};\n\nMapDraw.defaultProps = {\n buffer: DEFAULT_BUFFER,\n zoomDuration: DEFAULT_ZOOM_DELAY\n};\n\nexport default MapDraw;\n","// @flow\n\nimport React from 'react';\nimport { Layer, Source } from 'react-map-gl';\n\ntype Props = {\n maxzoom?: number,\n minzoom?: number,\n opacity?: number,\n tileSize?: number,\n url?: string,\n};\n\nconst RasterLayer = (props: Props) => (\n <Source\n tileSize={props.tileSize}\n tiles={[props.url]}\n type='raster'\n >\n <Layer\n type='raster'\n paint={{\n 'raster-opacity': props.opacity\n }}\n minzoom={props.minzoom}\n maxzoom={props.maxzoom}\n />\n </Source>\n);\n\nRasterLayer.defaultProps = {\n maxzoom: 22,\n minzoom: 0,\n opacity: 0.7,\n tileSize: 256\n};\n\nexport default RasterLayer;\n"],"names":["__webpack_require__","module","getter","__esModule","d","a","exports","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","Symbol","toStringTag","value","require","forwardRef","props","ref","drawRef","useControl","MapboxDraw","_ref","map","on","onCreate","onUpdate","onDelete","_ref2","off","position","useImperativeHandle","DEFAULT_COLOR","HIGHLIGHT_COLOR","DEFAULT_FILL_STYLES","DEFAULT_LINE_STYLES","DEFAULT_POINT_STYLES","_useState2","useState","data","setData","getLayerStyles","useCallback","style","defaultStyle","_","fillStyle","useMemo","lineStyle","pointStyle","useEffect","url","fetch","then","response","json","React","Source","type","Layer","filter","paint","IControlImpl","redraw","_classCallCheck","_map","_container","_redraw","this","document","createElement","className","remove","setVersion","forceUpdate","v","ctrl","getMap","children","Children","toArray","child","cloneElement","mapRef","current","createPortal","getElement","LayerMenu","_slicedToArray","canvasHeight","setCanvasHeight","_useState4","visible","setVisible","_useState6","menuOpen","setMenuOpen","useRef","getLayerName","index","names","length","isVisible","visibleChildren","toggleVisibility","concat","instance","_canvas","_mapRef$current$_canv","offsetHeight","MapControl","onClick","prevMenuOpen","BsStack","size","maxHeight","role","onKeyDown","tabIndex","IoCheckmarkOutline","defaultProps","getBoundingBox","geometry","polygonBuffer","bufferDistance","arguments","undefined","box","bbox","polygon","bboxPolygon","buffer","units","LocationMarker","useMap","boundingBox","MapUtils","fitBounds","PulsingMarkerLayer","id","MixedGeoJSONLayer","strokeStyle","classes","CONTROL_BASE","CONTROL_PREFIX","CONTROL_GROUP","MapDraw","loaded","setLoaded","onChange","getAll","_objectSpread","height","width","_boundingBox","bounds","duration","zoomDuration","geometries","add","feature","Map","attributionControl","onLoad","mapLib","maplibregl","mapStyle","DrawControl","controls","line_string","point","trash","displayControlsDefault","RasterLayer","tileSize","tiles","opacity","minzoom","maxzoom"],"sourceRoot":""}
1
+ {"version":3,"file":"index.js","mappings":"mBACA,IAAIA,EAAsB,CCA1BA,EAAyBC,IACxB,IAAIC,EAASD,GAAUA,EAAOE,WAC7B,IAAOF,EAAiB,QACxB,IAAM,EAEP,OADAD,EAAoBI,EAAEF,EAAQ,CAAEG,EAAGH,IAC5BA,CAAM,ECLdF,EAAwB,CAACM,EAASC,KACjC,IAAI,IAAIC,KAAOD,EACXP,EAAoBS,EAAEF,EAAYC,KAASR,EAAoBS,EAAEH,EAASE,IAC5EE,OAAOC,eAAeL,EAASE,EAAK,CAAEI,YAAY,EAAMC,IAAKN,EAAWC,IAE1E,ECNDR,EAAwB,CAACc,EAAKC,IAAUL,OAAOM,UAAUC,eAAeC,KAAKJ,EAAKC,GCClFf,EAAyBM,IACH,oBAAXa,QAA0BA,OAAOC,aAC1CV,OAAOC,eAAeL,EAASa,OAAOC,YAAa,CAAEC,MAAO,WAE7DX,OAAOC,eAAeL,EAAS,aAAc,CAAEe,OAAO,GAAO,G,2HCL9D,MAAM,EAA+BC,QAAQ,0B,aCA7C,MAAM,EAA+BA,QAAQ,S,aCA7C,MAAM,EAA+BA,QAAQ,gB,aC0C7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,SAACC,GAC7B9G,EAAQ2D,QAAQoD,KAAIC,EAAAA,EAAAA,SAAQF,GAC9B,IAEA9G,EAAQ2D,QAAQoD,IAAIjH,EAAMmB,KAE9B,CACF,GAAG,CAAC0E,EAAQ7F,EAAMmB,OAGhB,kBAAC,IAAG,CACFgG,oBAAoB,EACpBC,OAAQ,kBAAMtB,GAAU,EAAK,EAC7BuB,OAAQC,IACRrH,IAAK2D,EACLrC,MAAOA,EACPgG,SAAUvH,EAAMuH,UAEhB,kBAAC,EAAW,CACVtH,IAAKC,EACLsH,SAAU,CACRC,aAAa,EACbC,OAAO,EACPrB,SAAS,EACTsB,OAAO,GAETC,wBAAwB,EACxBrH,SAAUwF,EACVvF,SAAUuF,EACVtF,SAAUsF,EACVpF,SAAS,gBAETX,EAAMwD,SAGd,EAEAoC,EAAQD,aAAe,CACrBa,OAnGqB,EAoGrBM,aAnGyB,KAsG3B,UC/JA,IAAMe,EAAc,SAAC7H,GAAY,OAC/B,kBAAC,EAAAoC,OAAM,CACL0F,SAAU9H,EAAM8H,SAChBC,MAAO,CAAC/H,EAAM+B,KACdM,KAAK,UAEL,kBAAC,EAAAC,MAAK,CACJD,KAAK,SACLG,MAAO,CACL,iBAAkBxC,EAAMgI,SAE1BC,QAASjI,EAAMiI,QACfC,QAASlI,EAAMkI,UAEV,EAGXL,EAAYlC,aAAe,CACzBuC,QAAS,GACTD,QAAS,EACTD,QAAS,GACTF,SAAU,KAGZ,U","sources":["webpack://@performant-software/geospatial/webpack/bootstrap","webpack://@performant-software/geospatial/webpack/runtime/compat get default export","webpack://@performant-software/geospatial/webpack/runtime/define property getters","webpack://@performant-software/geospatial/webpack/runtime/hasOwnProperty shorthand","webpack://@performant-software/geospatial/webpack/runtime/make namespace object","webpack://@performant-software/geospatial/external commonjs \"@mapbox/mapbox-gl-draw\"","webpack://@performant-software/geospatial/external commonjs2 \"react\"","webpack://@performant-software/geospatial/external commonjs \"react-map-gl\"","webpack://@performant-software/geospatial/./src/components/DrawControl.js","webpack://@performant-software/geospatial/external commonjs \"underscore\"","webpack://@performant-software/geospatial/./src/components/GeoJsonLayer.js","webpack://@performant-software/geospatial/external commonjs \"react-icons/bs\"","webpack://@performant-software/geospatial/external commonjs \"react-icons/io5\"","webpack://@performant-software/geospatial/external commonjs \"maplibre-gl\"","webpack://@performant-software/geospatial/external commonjs2 \"react-dom\"","webpack://@performant-software/geospatial/./src/components/MapControl.js","webpack://@performant-software/geospatial/./src/components/LayerMenu.js","webpack://@performant-software/geospatial/external commonjs \"@turf/turf\"","webpack://@performant-software/geospatial/./src/components/MapDraw.js","webpack://@performant-software/geospatial/./src/components/RasterLayer.js"],"sourcesContent":["// The require scope\nvar __webpack_require__ = {};\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"@mapbox/mapbox-gl-draw\");","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"react\");","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"react-map-gl\");","// @flow\n\nimport MapboxDraw from '@mapbox/mapbox-gl-draw';\nimport { forwardRef, useImperativeHandle } from 'react';\nimport { useControl, type ControlPosition, type MapRef } from 'react-map-gl';\n\ntype Props = {\n position?: ControlPosition;\n onCreate?: (evt: { features: Array<any> }) => void;\n onUpdate?: (evt: { features: Array<any>, action: string }) => void;\n onDelete?: (evt: { features: Array<any> }) => void;\n};\n\nconst DrawControl = forwardRef((props: Props, ref) => {\n /**\n * Creates the drawer ref using MapboxDraw.\n */\n const drawRef = useControl(\n () => new MapboxDraw(props),\n ({ map }: { map: MapRef }) => {\n map.on('draw.create', props.onCreate);\n map.on('draw.update', props.onUpdate);\n map.on('draw.delete', props.onDelete);\n },\n ({ map }: { map: MapRef }) => {\n map.off('draw.create', props.onCreate);\n map.off('draw.update', props.onUpdate);\n map.off('draw.delete', props.onDelete);\n },\n {\n position: props.position\n }\n );\n\n /**\n * Exposes the ref for the MapboxDraw object.\n */\n useImperativeHandle(ref, () => drawRef, [drawRef]);\n\n return null;\n});\n\nexport default DrawControl;\n","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"underscore\");","// @flow\n\nimport React, {\n useCallback,\n useEffect,\n useMemo,\n useState\n} from 'react';\nimport { Layer, Source } from 'react-map-gl';\nimport _ from 'underscore';\n\ntype Props = {\n data?: { [key: string]: any },\n fillStyle?: { [key: string]: any },\n lineStyle?: { [key: string]: any },\n pointStyle?: { [key: string]: any },\n url?: string\n};\n\nconst DEFAULT_COLOR = '#CC3333';\nconst HIGHLIGHT_COLOR = '#990000';\n\nconst DEFAULT_FILL_STYLES = {\n 'fill-color': DEFAULT_COLOR,\n 'fill-opacity': 0.2\n};\n\nconst DEFAULT_LINE_STYLES = {\n 'line-color': HIGHLIGHT_COLOR,\n 'line-opacity': 0.6\n};\n\nconst DEFAULT_POINT_STYLES = {\n 'circle-radius': [\n 'interpolate',\n ['linear'],\n ['number', ['get', 'point_count'], 1],\n 0, 4,\n 10, 14\n ],\n 'circle-stroke-width': 1,\n 'circle-color': DEFAULT_COLOR,\n 'circle-stroke-color': HIGHLIGHT_COLOR\n};\n\nconst GeoJsonLayer = (props: Props) => {\n const [data, setData] = useState(props.data);\n\n /**\n * Returns the layer style for the passed style and default.\n *\n * @type {function(*, *): *}\n */\n const getLayerStyles = useCallback((style, defaultStyle) => _.defaults(style, defaultStyle), []);\n\n /**\n * Sets the fill layer style.\n *\n * @type {*}\n */\n const fillStyle = useMemo(() => (\n getLayerStyles(props.fillStyle, DEFAULT_FILL_STYLES)\n ), [getLayerStyles, props.fillStyle]);\n\n /**\n * Sets the line layer style.\n *\n * @type {*}\n */\n const lineStyle = useMemo(() => (\n getLayerStyles(props.lineStyle, DEFAULT_LINE_STYLES)\n ), [getLayerStyles, props.lineStyle]);\n\n /**\n * Sets the point layer style.\n *\n * @type {*}\n */\n const pointStyle = useMemo(() => (\n getLayerStyles(props.pointStyle, DEFAULT_POINT_STYLES)\n ), [getLayerStyles, props.pointStyle]);\n\n /**\n * If the data is passed as a URL, fetches the passed URL and sets the response on the state.\n */\n useEffect(() => {\n if (props.url) {\n fetch(props.url)\n .then((response) => response.json())\n .then((json) => setData(json));\n }\n }, [props.url]);\n\n return (\n <Source\n data={data}\n type='geojson'\n >\n <Layer\n filter={['!=', '$type', 'Point']}\n paint={fillStyle}\n type='fill'\n />\n <Layer\n filter={['!=', '$type', 'Point']}\n paint={lineStyle}\n type='line'\n />\n <Layer\n filter={['==', '$type', 'Point']}\n paint={pointStyle}\n type='circle'\n />\n </Source>\n );\n};\n\nexport default GeoJsonLayer;\n","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"react-icons/bs\");","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"react-icons/io5\");","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"maplibre-gl\");","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"react-dom\");","// @flow\n\nimport { IControl } from 'maplibre-gl';\nimport {\n Children,\n cloneElement,\n useCallback,\n useEffect,\n useState\n} from 'react';\nimport { createPortal } from 'react-dom';\nimport { MapboxMap, useControl } from 'react-map-gl';\nimport _ from 'underscore';\n\n/**\n * Class to implement the IControl interface to allow custom controls to be drawn on the map.\n */\nclass IControlImpl implements IControl {\n _map: MapboxMap = null;\n _container: HTMLElement;\n _redraw: () => void;\n\n /**\n * Constructs a new IControlImpl object.\n *\n * @param redraw\n */\n constructor(redraw: () => void) {\n this._redraw = redraw;\n }\n\n /**\n * Creates the container when the component is added to the passed map.\n *\n * @param map\n *\n * @returns {HTMLElement}\n */\n onAdd(map) {\n this._map = map;\n map.on('move', this._redraw);\n\n this._container = document.createElement('div');\n this._container.className = 'maplibregl-ctrl-group maplibregl-ctrl';\n this._redraw();\n return this._container;\n }\n\n /**\n * Removes the container when the component is removed from the map.\n */\n onRemove() {\n this._container.remove();\n this._map.off('move', this._redraw);\n this._map = null;\n }\n\n /**\n * Returns the map instance.\n *\n * @returns {mapboxgl.Map}\n */\n getMap() {\n return this._map;\n }\n\n /**\n * Returns the container instance.\n *\n * @returns {HTMLElement}\n */\n getElement() {\n return this._container;\n }\n}\n\nconst MapControl = (props) => {\n const [, setVersion] = useState(0);\n\n /**\n * Forces the component to re-render on map move.\n *\n * @type {function(): void}\n */\n const forceUpdate = useCallback(() => setVersion((v) => v + 1), []);\n\n /**\n * Creates the map control.\n *\n * @type {IControlImpl}\n */\n const ctrl = useControl(() => new IControlImpl(forceUpdate), { position: props.position });\n\n /**\n * Sets the map instance.\n *\n * @type {mapboxgl.Map}\n */\n const map = ctrl.getMap();\n\n /**\n * Creates the list of children to be added to the map instance.\n *\n * @type {Array<$NonMaybeType<*>>}\n */\n const children = Children.map(_.compact(Children.toArray(props.children)), (child) => cloneElement(child, { map }));\n\n /**\n * Sets the map ref.\n */\n useEffect(() => {\n if (props.mapRef) {\n // eslint-disable-next-line no-param-reassign\n props.mapRef.current = map;\n }\n }, [map, props.mapRef]);\n\n return map && createPortal(children, ctrl.getElement());\n};\n\nexport default MapControl;\n","// @flow\n\nimport React, {\n Children,\n useCallback,\n useEffect,\n useMemo, useRef,\n useState\n} from 'react';\nimport { BsStack } from 'react-icons/bs';\nimport { IoCheckmarkOutline } from 'react-icons/io5';\nimport _ from 'underscore';\nimport MapControl from './MapControl';\nimport './LayerMenu.css';\n\ntype Props = {\n children: Node,\n names: Array<string>,\n position: 'top-left' | 'bottom-left' | 'top-right' | 'bottom-right'\n};\n\nconst MENU_PADDING = 30;\n\nconst LayerMenu = (props: Props) => {\n const [canvasHeight, setCanvasHeight] = useState(0);\n const [visible, setVisible] = useState();\n const [menuOpen, setMenuOpen] = useState(false);\n\n const mapRef = useRef();\n\n /**\n * Returns the name of the layer at the passed index.\n *\n * @type {unknown}\n */\n const getLayerName = useCallback((index) => (\n props.names && props.names.length > index && props.names[index]\n ), [props.names]);\n\n /**\n * Returns true if the child element at the passed index is visible.\n *\n * @type {function(*): *}\n */\n const isVisible = useCallback((index) => _.includes(visible, index), [visible]);\n\n /**\n * Returns a memoized array of the child elements.\n *\n * @type {Array<$NonMaybeType<unknown>>}\n */\n const children = useMemo(() => Children.toArray(props.children), [props.children]);\n\n /**\n * Returns a memoized array of visible child elements.\n */\n const visibleChildren = useMemo(() => _.filter(children, (child, index) => isVisible(index)), [children, isVisible]);\n\n /**\n * Toggles the visibility for the child element at the passed index.\n *\n * @type {(function(*): void)|*}\n */\n const toggleVisibility = useCallback((index) => {\n let value;\n\n if (isVisible(index)) {\n value = _.without(visible, index);\n } else {\n value = [...visible, index];\n }\n\n setVisible(value);\n }, [isVisible, visible]);\n\n /**\n * Sets all of the child elements to be visible when the component mounts.\n */\n useEffect(() => {\n setVisible(_.times(children.length, (index) => index));\n }, []);\n\n /**\n * Sets the map canvas height.\n */\n useEffect(() => {\n const { current: instance } = mapRef;\n\n if (instance && instance._canvas) {\n const { offsetHeight = 0 } = mapRef.current._canvas;\n setCanvasHeight(offsetHeight);\n }\n }, [mapRef.current]);\n\n if (_.isEmpty(children)) {\n return null;\n }\n\n return (\n <>\n <MapControl\n mapRef={mapRef}\n position={props.position}\n >\n <button\n className='mapbox-gl-draw_ctrl-draw-btn layer-button'\n onClick={() => setMenuOpen((prevMenuOpen) => !prevMenuOpen)}\n type='button'\n >\n <BsStack\n size='1.25em'\n />\n </button>\n { menuOpen && (\n <div\n className='layer-menu'\n style={{\n maxHeight: `calc(${canvasHeight}px - ${MENU_PADDING}px)`\n }}\n >\n <div\n className='menu'\n >\n { _.map(children, (child, index) => (\n <div\n aria-selected={isVisible(index)}\n className='option'\n role='option'\n onClick={() => toggleVisibility(index)}\n onKeyDown={() => toggleVisibility(index)}\n tabIndex={index}\n >\n <div\n className='checkmark-container'\n >\n { isVisible(index) && (\n <IoCheckmarkOutline\n size='1em'\n />\n )}\n </div>\n { getLayerName(index) }\n </div>\n ))}\n </div>\n </div>\n )}\n </MapControl>\n { visibleChildren }\n </>\n );\n};\n\nLayerMenu.defaultProps = {\n position: 'top-left'\n};\n\nexport default LayerMenu;\n","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"@turf/turf\");","// @flow\n\nimport MapboxDraw from '@mapbox/mapbox-gl-draw';\nimport {\n bbox,\n bboxPolygon,\n buffer,\n feature,\n type FeatureCollection,\n type GeometryCollection\n} from '@turf/turf';\nimport maplibregl from 'maplibre-gl';\nimport React, {\n useCallback,\n useEffect,\n useMemo,\n useRef,\n useState,\n type Node\n} from 'react';\nimport Map, { MapRef } from 'react-map-gl';\nimport _ from 'underscore';\nimport DrawControl from './DrawControl';\nimport './MapDraw.css';\n\n// Override the MapboxDraw components to use MapLibre styles\nMapboxDraw.constants.classes.CONTROL_BASE = 'maplibregl-ctrl';\nMapboxDraw.constants.classes.CONTROL_PREFIX = 'maplibregl-ctrl-';\nMapboxDraw.constants.classes.CONTROL_GROUP = 'maplibregl-ctrl-group';\n\ntype Props = {\n /**\n * The number of miles to buffer the GeoJSON data.\n */\n buffer?: number,\n\n /**\n * Additional child nodes to render.\n */\n children?: Node,\n\n /**\n * GeoJSON structured data to be displayed on the map.\n */\n data: GeometryCollection | FeatureCollection,\n\n /**\n * URL of the map style to render. This URL should contain any necessary API keys.\n */\n mapStyle: string,\n\n /**\n * Callback fired when the map geometries are changed.\n *\n * @param features\n */\n onChange: (features: Array<any>) => void,\n\n /**\n * Map style object.\n */\n style?: any,\n\n /**\n * The time in milliseconds to zoom into the location.\n */\n zoomDuration?: number\n};\n\nconst DEFAULT_BUFFER = 2;\nconst DEFAULT_ZOOM_DELAY = 1000;\n\nconst GeometryTypes = {\n geometryCollection: 'GeometryCollection',\n point: 'Point'\n};\n\n/**\n * This component renders a map with controls for drawing one or more geometries. Geometries can be a point (lat/long),\n * a line, or a polygon.\n */\nconst MapDraw = (props: Props) => {\n const [loaded, setLoaded] = useState(false);\n\n const drawRef = useRef<MapboxDraw>();\n const mapRef = useRef<MapRef>();\n\n /**\n * Calls the onChange prop with all of the geometries in the current drawer.\n *\n * @type {(function(): void)|*}\n */\n const onChange = useCallback(() => {\n props.onChange(drawRef.current.getAll());\n }, [props.onChange]);\n\n /**\n * Sets the map style.\n *\n * @type {{width: string, height: number}}\n */\n const style = useMemo(() => ({ height: 500, width: '100%', ...(props.style || {}) }), [props.style]);\n\n /**\n * Updates the map bounding box and drawer when the geometry is changed.\n */\n useEffect(() => {\n if (loaded && props.data) {\n // Convert the GeoJSON into a bounding box\n const box = bbox(props.data);\n\n // Convert the bounding box to a polygon\n const polygon = bboxPolygon(box);\n\n // Create a buffer around the polygon\n const polygonBuffer = buffer(polygon, props.buffer, { units: 'miles' });\n\n // Convert the buffer to a bounding box\n const boundingBox = bbox(polygonBuffer);\n\n // Sets the bounding box for the current geometry.\n if (_.every(boundingBox, _.isFinite)) {\n const [minLng, minLat, maxLng, maxLat] = boundingBox;\n const bounds = [[minLng, minLat], [maxLng, maxLat]];\n\n mapRef.current.fitBounds(bounds, { duration: props.zoomDuration });\n }\n\n // Handle special cases for geometry collection (not supported by mabox-gl-draw) and point\n if (props.data.type === GeometryTypes.geometryCollection) {\n _.each(props.data.geometries, (geometry) => {\n drawRef.current.add(feature(geometry));\n });\n } else {\n drawRef.current.add(props.data);\n }\n }\n }, [loaded, props.data]);\n\n return (\n <Map\n attributionControl={false}\n onLoad={() => setLoaded(true)}\n mapLib={maplibregl}\n ref={mapRef}\n style={style}\n mapStyle={props.mapStyle}\n >\n <DrawControl\n ref={drawRef}\n controls={{\n line_string: true,\n point: true,\n polygon: true,\n trash: true\n }}\n displayControlsDefault={false}\n onCreate={onChange}\n onUpdate={onChange}\n onDelete={onChange}\n position='bottom-left'\n />\n { props.children }\n </Map>\n );\n};\n\nMapDraw.defaultProps = {\n buffer: DEFAULT_BUFFER,\n zoomDuration: DEFAULT_ZOOM_DELAY\n};\n\nexport default MapDraw;\n","// @flow\n\nimport React from 'react';\nimport { Layer, Source } from 'react-map-gl';\n\ntype Props = {\n maxzoom?: number,\n minzoom?: number,\n opacity?: number,\n tileSize?: number,\n url?: string,\n};\n\nconst RasterLayer = (props: Props) => (\n <Source\n tileSize={props.tileSize}\n tiles={[props.url]}\n type='raster'\n >\n <Layer\n type='raster'\n paint={{\n 'raster-opacity': props.opacity\n }}\n minzoom={props.minzoom}\n maxzoom={props.maxzoom}\n />\n </Source>\n);\n\nRasterLayer.defaultProps = {\n maxzoom: 22,\n minzoom: 0,\n opacity: 0.7,\n tileSize: 256\n};\n\nexport default RasterLayer;\n"],"names":["__webpack_require__","module","getter","__esModule","d","a","exports","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","Symbol","toStringTag","value","require","forwardRef","props","ref","drawRef","useControl","MapboxDraw","map","on","onCreate","onUpdate","onDelete","off","position","useImperativeHandle","DEFAULT_COLOR","HIGHLIGHT_COLOR","DEFAULT_FILL_STYLES","DEFAULT_LINE_STYLES","DEFAULT_POINT_STYLES","useState","data","setData","getLayerStyles","useCallback","style","defaultStyle","_","fillStyle","useMemo","lineStyle","pointStyle","useEffect","url","fetch","then","response","json","Source","type","Layer","filter","paint","IControlImpl","redraw","_map","this","_redraw","_container","document","createElement","className","remove","setVersion","forceUpdate","v","ctrl","getMap","children","Children","child","cloneElement","mapRef","current","createPortal","getElement","LayerMenu","canvasHeight","setCanvasHeight","visible","setVisible","menuOpen","setMenuOpen","useRef","getLayerName","index","names","length","isVisible","visibleChildren","toggleVisibility","instance","_canvas","offsetHeight","onClick","prevMenuOpen","BsStack","size","maxHeight","role","onKeyDown","tabIndex","IoCheckmarkOutline","defaultProps","MapDraw","loaded","setLoaded","onChange","getAll","height","width","box","bbox","polygon","bboxPolygon","polygonBuffer","buffer","units","boundingBox","bounds","fitBounds","duration","zoomDuration","geometries","geometry","add","feature","attributionControl","onLoad","mapLib","maplibregl","mapStyle","controls","line_string","point","trash","displayControlsDefault","RasterLayer","tileSize","tiles","opacity","minzoom","maxzoom"],"sourceRoot":""}
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./index.cjs2.js"),e=require("./index.cjs3.js"),o=require("./index.cjs4.js"),a=require("./index.cjs5.js"),t=require("./index.cjs6.js"),n=require("./index.cjs7.js"),s=require("./index.cjs8.js"),i=require("./index.cjs9.js");exports.DrawControl=r;exports.GeoJsonLayer=e;exports.LayerMenu=o;exports.LocationMarker=a;exports.MapControl=t;exports.MapDraw=n;exports.RasterLayer=s;exports.Map=i;
2
+ //# sourceMappingURL=index.cjs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.cjs.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ "use strict";const Re=require("./index.cjs52.js"),Zn=require("./index.cjs53.js");(function(Wn,ao){(function(ze,de){Wn.exports=de()})(Re.commonjsGlobal,function(){var ze=function(e,t){var n={drag:[],click:[],mousemove:[],mousedown:[],mouseup:[],mouseout:[],keydown:[],keyup:[],touchstart:[],touchmove:[],touchend:[],tap:[]},r={on:function(i,a,l){if(n[i]===void 0)throw new Error("Invalid event type: "+i);n[i].push({selector:a,fn:l})},render:function(i){t.store.featureChanged(i)}},o=function(i,a){for(var l=n[i],d=l.length;d--;){var h=l[d];if(h.selector(a)){h.fn.call(r,a)||t.store.render(),t.ui.updateMapClasses();break}}};return e.start.call(r),{render:e.render,stop:function(){e.stop&&e.stop()},trash:function(){e.trash&&(e.trash(),t.store.render())},combineFeatures:function(){e.combineFeatures&&e.combineFeatures()},uncombineFeatures:function(){e.uncombineFeatures&&e.uncombineFeatures()},drag:function(i){o("drag",i)},click:function(i){o("click",i)},mousemove:function(i){o("mousemove",i)},mousedown:function(i){o("mousedown",i)},mouseup:function(i){o("mouseup",i)},mouseout:function(i){o("mouseout",i)},keydown:function(i){o("keydown",i)},keyup:function(i){o("keyup",i)},touchstart:function(i){o("touchstart",i)},touchmove:function(i){o("touchmove",i)},touchend:function(i){o("touchend",i)},tap:function(i){o("tap",i)}}};function de(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Kn(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var n=function r(){if(this instanceof r){var o=[null];o.push.apply(o,arguments);var i=Function.bind.apply(t,o);return new i}return t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var o=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,o.get?o:{enumerable:!0,get:function(){return e[r]}})}),n}var Et={},Qn={RADIUS:6378137,FLATTENING:1/298.257223563,POLAR_RADIUS:63567523142e-4},Xt=Qn;function Zt(e){var t=0;if(e&&e.length>0){t+=Math.abs(Tt(e[0]));for(var n=1;n<e.length;n++)t-=Math.abs(Tt(e[n]))}return t}function Tt(e){var t,n,r,o,i,a,l=0,d=e.length;if(d>2){for(a=0;a<d;a++)a===d-2?(r=d-2,o=d-1,i=0):a===d-1?(r=d-1,o=0,i=1):(r=a,o=a+1,i=a+2),t=e[r],n=e[o],l+=(Ct(e[i][0])-Ct(t[0]))*Math.sin(Ct(n[1]));l=l*Xt.RADIUS*Xt.RADIUS/2}return l}function Ct(e){return e*Math.PI/180}Et.geometry=function e(t){var n,r=0;switch(t.type){case"Polygon":return Zt(t.coordinates);case"MultiPolygon":for(n=0;n<t.coordinates.length;n++)r+=Zt(t.coordinates[n]);return r;case"Point":case"MultiPoint":case"LineString":case"MultiLineString":return 0;case"GeometryCollection":for(n=0;n<t.geometries.length;n++)r+=e(t.geometries[n]);return r}},Et.ring=Tt;var q={CONTROL_BASE:"mapboxgl-ctrl",CONTROL_PREFIX:"mapboxgl-ctrl-",CONTROL_BUTTON:"mapbox-gl-draw_ctrl-draw-btn",CONTROL_BUTTON_LINE:"mapbox-gl-draw_line",CONTROL_BUTTON_POLYGON:"mapbox-gl-draw_polygon",CONTROL_BUTTON_POINT:"mapbox-gl-draw_point",CONTROL_BUTTON_TRASH:"mapbox-gl-draw_trash",CONTROL_BUTTON_COMBINE_FEATURES:"mapbox-gl-draw_combine",CONTROL_BUTTON_UNCOMBINE_FEATURES:"mapbox-gl-draw_uncombine",CONTROL_GROUP:"mapboxgl-ctrl-group",ATTRIBUTION:"mapboxgl-ctrl-attrib",ACTIVE_BUTTON:"active",BOX_SELECT:"mapbox-gl-draw_boxselect"},X={HOT:"mapbox-gl-draw-hot",COLD:"mapbox-gl-draw-cold"},N={ADD:"add",MOVE:"move",DRAG:"drag",POINTER:"pointer",NONE:"none"},Y={POLYGON:"polygon",LINE:"line_string",POINT:"point"},m={FEATURE:"Feature",POLYGON:"Polygon",LINE_STRING:"LineString",POINT:"Point",FEATURE_COLLECTION:"FeatureCollection",MULTI_PREFIX:"Multi",MULTI_POINT:"MultiPoint",MULTI_LINE_STRING:"MultiLineString",MULTI_POLYGON:"MultiPolygon"},T={DRAW_LINE_STRING:"draw_line_string",DRAW_POLYGON:"draw_polygon",DRAW_POINT:"draw_point",SIMPLE_SELECT:"simple_select",DIRECT_SELECT:"direct_select",STATIC:"static"},H={CREATE:"draw.create",DELETE:"draw.delete",UPDATE:"draw.update",SELECTION_CHANGE:"draw.selectionchange",MODE_CHANGE:"draw.modechange",ACTIONABLE:"draw.actionable",RENDER:"draw.render",COMBINE_FEATURES:"draw.combine",UNCOMBINE_FEATURES:"draw.uncombine"},Ot={MOVE:"move",CHANGE_COORDINATES:"change_coordinates"},B={FEATURE:"feature",MIDPOINT:"midpoint",VERTEX:"vertex"},j={ACTIVE:"true",INACTIVE:"false"},Wt=["scrollZoom","boxZoom","dragRotate","dragPan","keyboard","doubleClickZoom","touchZoomRotate"],St=-85,er=Object.freeze({__proto__:null,classes:q,sources:X,cursors:N,types:Y,geojsonTypes:m,modes:T,events:H,updateActions:Ot,meta:B,activeStates:j,interactions:Wt,LAT_MIN:-90,LAT_RENDERED_MIN:St,LAT_MAX:90,LAT_RENDERED_MAX:85,LNG_MIN:-270,LNG_MAX:270}),Kt={Point:0,LineString:1,MultiLineString:1,Polygon:2};function tr(e,t){var n=Kt[e.geometry.type]-Kt[t.geometry.type];return n===0&&e.geometry.type===m.POLYGON?e.area-t.area:n}function Qt(e){return e.map(function(t){return t.geometry.type===m.POLYGON&&(t.area=Et.geometry({type:m.FEATURE,property:{},geometry:t.geometry})),t}).sort(tr).map(function(t){return delete t.area,t})}function en(e,t){return t===void 0&&(t=0),[[e.point.x-t,e.point.y-t],[e.point.x+t,e.point.y+t]]}function Z(e){if(this._items={},this._nums={},this._length=e?e.length:0,e)for(var t=0,n=e.length;t<n;t++)this.add(e[t]),e[t]!==void 0&&(typeof e[t]=="string"?this._items[e[t]]=t:this._nums[e[t]]=t)}Z.prototype.add=function(e){return this.has(e)||(this._length++,typeof e=="string"?this._items[e]=this._length:this._nums[e]=this._length),this},Z.prototype.delete=function(e){return this.has(e)===!1||(this._length--,delete this._items[e],delete this._nums[e]),this},Z.prototype.has=function(e){return(typeof e=="string"||typeof e=="number")&&(this._items[e]!==void 0||this._nums[e]!==void 0)},Z.prototype.values=function(){var e=this,t=[];return Object.keys(this._items).forEach(function(n){t.push({k:n,v:e._items[n]})}),Object.keys(this._nums).forEach(function(n){t.push({k:JSON.parse(n),v:e._nums[n]})}),t.sort(function(n,r){return n.v-r.v}).map(function(n){return n.k})},Z.prototype.clear=function(){return this._length=0,this._items={},this._nums={},this};var nr=[B.FEATURE,B.MIDPOINT,B.VERTEX],xe={click:function(e,t,n){return tn(e,t,n,n.options.clickBuffer)},touch:function(e,t,n){return tn(e,t,n,n.options.touchBuffer)}};function tn(e,t,n,r){if(n.map===null)return[];var o=e?en(e,r):t,i={};n.options.styles&&(i.layers=n.options.styles.map(function(h){return h.id}).filter(function(h){return n.map.getLayer(h)!=null}));var a=n.map.queryRenderedFeatures(o,i).filter(function(h){return nr.indexOf(h.properties.meta)!==-1}),l=new Z,d=[];return a.forEach(function(h){var g=h.properties.id;l.has(g)||(l.add(g),d.push(h))}),Qt(d)}function Ye(e,t){var n=xe.click(e,null,t),r={mouse:N.NONE};return n[0]&&(r.mouse=n[0].properties.active===j.ACTIVE?N.MOVE:N.POINTER,r.feature=n[0].properties.meta),t.events.currentModeName().indexOf("draw")!==-1&&(r.mouse=N.ADD),t.ui.queueMapClasses(r),t.ui.updateMapClasses(),n[0]}function It(e,t){var n=e.x-t.x,r=e.y-t.y;return Math.sqrt(n*n+r*r)}function xt(e,t,n){n===void 0&&(n={});var r=n.fineTolerance!=null?n.fineTolerance:4,o=n.grossTolerance!=null?n.grossTolerance:12,i=n.interval!=null?n.interval:500;e.point=e.point||t.point,e.time=e.time||t.time;var a=It(e.point,t.point);return a<r||a<o&&t.time-e.time<i}function Mt(e,t,n){n===void 0&&(n={});var r=n.tolerance!=null?n.tolerance:25,o=n.interval!=null?n.interval:250;return e.point=e.point||t.point,e.time=e.time||t.time,It(e.point,t.point)<r&&t.time-e.time<o}var nn={exports:{}},Lt=nn.exports=function(e,t){if(t||(t=16),e===void 0&&(e=128),e<=0)return"0";for(var n=Math.log(Math.pow(2,e))/Math.log(t),r=2;n===1/0;r*=2)n=Math.log(Math.pow(2,e/r))/Math.log(t)*r;var o=n-Math.floor(n),i="";for(r=0;r<Math.floor(n);r++)i=Math.floor(Math.random()*t).toString(t)+i;if(o){var a=Math.pow(t,o);i=Math.floor(Math.random()*a).toString(t)+i}var l=parseInt(i,t);return l!==1/0&&l>=Math.pow(2,e)?Lt(e,t):i};Lt.rack=function(e,t,n){var r=function(i){var a=0;do{if(a++>10){if(!n)throw new Error("too many ID collisions, use more bits");e+=n}var l=Lt(e,t)}while(Object.hasOwnProperty.call(o,l));return o[l]=i,l},o=r.hats={};return r.get=function(i){return r.hats[i]},r.set=function(i,a){return r.hats[i]=a,r},r.bits=e||128,r.base=t||16,r};var Nt=de(nn.exports),G=function(e,t){this.ctx=e,this.properties=t.properties||{},this.coordinates=t.geometry.coordinates,this.id=t.id||Nt(),this.type=t.geometry.type};G.prototype.changed=function(){this.ctx.store.featureChanged(this.id)},G.prototype.incomingCoords=function(e){this.setCoordinates(e)},G.prototype.setCoordinates=function(e){this.coordinates=e,this.changed()},G.prototype.getCoordinates=function(){return JSON.parse(JSON.stringify(this.coordinates))},G.prototype.setProperty=function(e,t){this.properties[e]=t},G.prototype.toGeoJSON=function(){return JSON.parse(JSON.stringify({id:this.id,type:m.FEATURE,properties:this.properties,geometry:{coordinates:this.getCoordinates(),type:this.type}}))},G.prototype.internal=function(e){var t={id:this.id,meta:B.FEATURE,"meta:type":this.type,active:j.INACTIVE,mode:e};if(this.ctx.options.userProperties)for(var n in this.properties)t["user_"+n]=this.properties[n];return{type:m.FEATURE,properties:t,geometry:{coordinates:this.getCoordinates(),type:this.type}}};var me=function(e,t){G.call(this,e,t)};(me.prototype=Object.create(G.prototype)).isValid=function(){return typeof this.coordinates[0]=="number"&&typeof this.coordinates[1]=="number"},me.prototype.updateCoordinate=function(e,t,n){this.coordinates=arguments.length===3?[t,n]:[e,t],this.changed()},me.prototype.getCoordinate=function(){return this.getCoordinates()};var ie=function(e,t){G.call(this,e,t)};(ie.prototype=Object.create(G.prototype)).isValid=function(){return this.coordinates.length>1},ie.prototype.addCoordinate=function(e,t,n){this.changed();var r=parseInt(e,10);this.coordinates.splice(r,0,[t,n])},ie.prototype.getCoordinate=function(e){var t=parseInt(e,10);return JSON.parse(JSON.stringify(this.coordinates[t]))},ie.prototype.removeCoordinate=function(e){this.changed(),this.coordinates.splice(parseInt(e,10),1)},ie.prototype.updateCoordinate=function(e,t,n){var r=parseInt(e,10);this.coordinates[r]=[t,n],this.changed()};var W=function(e,t){G.call(this,e,t),this.coordinates=this.coordinates.map(function(n){return n.slice(0,-1)})};(W.prototype=Object.create(G.prototype)).isValid=function(){return this.coordinates.length!==0&&this.coordinates.every(function(e){return e.length>2})},W.prototype.incomingCoords=function(e){this.coordinates=e.map(function(t){return t.slice(0,-1)}),this.changed()},W.prototype.setCoordinates=function(e){this.coordinates=e,this.changed()},W.prototype.addCoordinate=function(e,t,n){this.changed();var r=e.split(".").map(function(o){return parseInt(o,10)});this.coordinates[r[0]].splice(r[1],0,[t,n])},W.prototype.removeCoordinate=function(e){this.changed();var t=e.split(".").map(function(r){return parseInt(r,10)}),n=this.coordinates[t[0]];n&&(n.splice(t[1],1),n.length<3&&this.coordinates.splice(t[0],1))},W.prototype.getCoordinate=function(e){var t=e.split(".").map(function(r){return parseInt(r,10)}),n=this.coordinates[t[0]];return JSON.parse(JSON.stringify(n[t[1]]))},W.prototype.getCoordinates=function(){return this.coordinates.map(function(e){return e.concat([e[0]])})},W.prototype.updateCoordinate=function(e,t,n){this.changed();var r=e.split("."),o=parseInt(r[0],10),i=parseInt(r[1],10);this.coordinates[o]===void 0&&(this.coordinates[o]=[]),this.coordinates[o][i]=[t,n]};var rr={MultiPoint:me,MultiLineString:ie,MultiPolygon:W},$e=function(e,t,n,r,o){var i=n.split("."),a=parseInt(i[0],10),l=i[1]?i.slice(1).join("."):null;return e[a][t](l,r,o)},$=function(e,t){if(G.call(this,e,t),delete this.coordinates,this.model=rr[t.geometry.type],this.model===void 0)throw new TypeError(t.geometry.type+" is not a valid type");this.features=this._coordinatesToFeatures(t.geometry.coordinates)};function E(e){this.map=e.map,this.drawConfig=JSON.parse(JSON.stringify(e.options||{})),this._ctx=e}($.prototype=Object.create(G.prototype))._coordinatesToFeatures=function(e){var t=this,n=this.model.bind(this);return e.map(function(r){return new n(t.ctx,{id:Nt(),type:m.FEATURE,properties:{},geometry:{coordinates:r,type:t.type.replace("Multi","")}})})},$.prototype.isValid=function(){return this.features.every(function(e){return e.isValid()})},$.prototype.setCoordinates=function(e){this.features=this._coordinatesToFeatures(e),this.changed()},$.prototype.getCoordinate=function(e){return $e(this.features,"getCoordinate",e)},$.prototype.getCoordinates=function(){return JSON.parse(JSON.stringify(this.features.map(function(e){return e.type===m.POLYGON?e.getCoordinates():e.coordinates})))},$.prototype.updateCoordinate=function(e,t,n){$e(this.features,"updateCoordinate",e,t,n),this.changed()},$.prototype.addCoordinate=function(e,t,n){$e(this.features,"addCoordinate",e,t,n),this.changed()},$.prototype.removeCoordinate=function(e){$e(this.features,"removeCoordinate",e),this.changed()},$.prototype.getFeatures=function(){return this.features},E.prototype.setSelected=function(e){return this._ctx.store.setSelected(e)},E.prototype.setSelectedCoordinates=function(e){var t=this;this._ctx.store.setSelectedCoordinates(e),e.reduce(function(n,r){return n[r.feature_id]===void 0&&(n[r.feature_id]=!0,t._ctx.store.get(r.feature_id).changed()),n},{})},E.prototype.getSelected=function(){return this._ctx.store.getSelected()},E.prototype.getSelectedIds=function(){return this._ctx.store.getSelectedIds()},E.prototype.isSelected=function(e){return this._ctx.store.isSelected(e)},E.prototype.getFeature=function(e){return this._ctx.store.get(e)},E.prototype.select=function(e){return this._ctx.store.select(e)},E.prototype.deselect=function(e){return this._ctx.store.deselect(e)},E.prototype.deleteFeature=function(e,t){return t===void 0&&(t={}),this._ctx.store.delete(e,t)},E.prototype.addFeature=function(e){return this._ctx.store.add(e)},E.prototype.clearSelectedFeatures=function(){return this._ctx.store.clearSelected()},E.prototype.clearSelectedCoordinates=function(){return this._ctx.store.clearSelectedCoordinates()},E.prototype.setActionableState=function(e){e===void 0&&(e={});var t={trash:e.trash||!1,combineFeatures:e.combineFeatures||!1,uncombineFeatures:e.uncombineFeatures||!1};return this._ctx.events.actionable(t)},E.prototype.changeMode=function(e,t,n){return t===void 0&&(t={}),n===void 0&&(n={}),this._ctx.events.changeMode(e,t,n)},E.prototype.updateUIClasses=function(e){return this._ctx.ui.queueMapClasses(e)},E.prototype.activateUIButton=function(e){return this._ctx.ui.setActiveButton(e)},E.prototype.featuresAt=function(e,t,n){if(n===void 0&&(n="click"),n!=="click"&&n!=="touch")throw new Error("invalid buffer type");return xe[n](e,t,this._ctx)},E.prototype.newFeature=function(e){var t=e.geometry.type;return t===m.POINT?new me(this._ctx,e):t===m.LINE_STRING?new ie(this._ctx,e):t===m.POLYGON?new W(this._ctx,e):new $(this._ctx,e)},E.prototype.isInstanceOf=function(e,t){if(e===m.POINT)return t instanceof me;if(e===m.LINE_STRING)return t instanceof ie;if(e===m.POLYGON)return t instanceof W;if(e==="MultiFeature")return t instanceof $;throw new Error("Unknown feature class: "+e)},E.prototype.doRender=function(e){return this._ctx.store.featureChanged(e)},E.prototype.onSetup=function(){},E.prototype.onDrag=function(){},E.prototype.onClick=function(){},E.prototype.onMouseMove=function(){},E.prototype.onMouseDown=function(){},E.prototype.onMouseUp=function(){},E.prototype.onMouseOut=function(){},E.prototype.onKeyUp=function(){},E.prototype.onKeyDown=function(){},E.prototype.onTouchStart=function(){},E.prototype.onTouchMove=function(){},E.prototype.onTouchEnd=function(){},E.prototype.onTap=function(){},E.prototype.onStop=function(){},E.prototype.onTrash=function(){},E.prototype.onCombineFeature=function(){},E.prototype.onUncombineFeature=function(){},E.prototype.toDisplayFeatures=function(){throw new Error("You must overwrite toDisplayFeatures")};var rn={drag:"onDrag",click:"onClick",mousemove:"onMouseMove",mousedown:"onMouseDown",mouseup:"onMouseUp",mouseout:"onMouseOut",keyup:"onKeyUp",keydown:"onKeyDown",touchstart:"onTouchStart",touchmove:"onTouchMove",touchend:"onTouchEnd",tap:"onTap"},or=Object.keys(rn);function ir(e){var t=Object.keys(e);return function(n,r){r===void 0&&(r={});var o={},i=t.reduce(function(a,l){return a[l]=e[l],a},new E(n));return{start:function(){var a=this;o=i.onSetup(r),or.forEach(function(l){var d,h=rn[l],g=function(){return!1};e[h]&&(g=function(){return!0}),a.on(l,g,(d=h,function(p){return i[d](o,p)}))})},stop:function(){i.onStop(o)},trash:function(){i.onTrash(o)},combineFeatures:function(){i.onCombineFeatures(o)},uncombineFeatures:function(){i.onUncombineFeatures(o)},render:function(a,l){i.toDisplayFeatures(o,a,l)}}}}function De(e){return[].concat(e).filter(function(t){return t!==void 0})}function ar(){var e=this;if(!(e.ctx.map&&e.ctx.map.getSource(X.HOT)!==void 0))return d();var t=e.ctx.events.currentModeName();e.ctx.ui.queueMapClasses({mode:t});var n=[],r=[];e.isDirty?r=e.getAllIds():(n=e.getChangedIds().filter(function(h){return e.get(h)!==void 0}),r=e.sources.hot.filter(function(h){return h.properties.id&&n.indexOf(h.properties.id)===-1&&e.get(h.properties.id)!==void 0}).map(function(h){return h.properties.id})),e.sources.hot=[];var o=e.sources.cold.length;e.sources.cold=e.isDirty?[]:e.sources.cold.filter(function(h){var g=h.properties.id||h.properties.parent;return n.indexOf(g)===-1});var i=o!==e.sources.cold.length||r.length>0;function a(h,g){var p=e.get(h).internal(t);e.ctx.events.currentModeRender(p,function(_){e.sources[g].push(_)})}if(n.forEach(function(h){return a(h,"hot")}),r.forEach(function(h){return a(h,"cold")}),i&&e.ctx.map.getSource(X.COLD).setData({type:m.FEATURE_COLLECTION,features:e.sources.cold}),e.ctx.map.getSource(X.HOT).setData({type:m.FEATURE_COLLECTION,features:e.sources.hot}),e._emitSelectionChange&&(e.ctx.map.fire(H.SELECTION_CHANGE,{features:e.getSelected().map(function(h){return h.toGeoJSON()}),points:e.getSelectedCoordinates().map(function(h){return{type:m.FEATURE,properties:{},geometry:{type:m.POINT,coordinates:h.coordinates}}})}),e._emitSelectionChange=!1),e._deletedFeaturesToEmit.length){var l=e._deletedFeaturesToEmit.map(function(h){return h.toGeoJSON()});e._deletedFeaturesToEmit=[],e.ctx.map.fire(H.DELETE,{features:l})}function d(){e.isDirty=!1,e.clearChangedIds()}d(),e.ctx.map.fire(H.RENDER,{})}function x(e){var t,n=this;this._features={},this._featureIds=new Z,this._selectedFeatureIds=new Z,this._selectedCoordinates=[],this._changedFeatureIds=new Z,this._deletedFeaturesToEmit=[],this._emitSelectionChange=!1,this._mapInitialConfig={},this.ctx=e,this.sources={hot:[],cold:[]},this.render=function(){t||(t=requestAnimationFrame(function(){t=null,ar.call(n)}))},this.isDirty=!1}function on(e,t){var n=e._selectedCoordinates.filter(function(r){return e._selectedFeatureIds.has(r.feature_id)});e._selectedCoordinates.length===n.length||t.silent||(e._emitSelectionChange=!0),e._selectedCoordinates=n}x.prototype.createRenderBatch=function(){var e=this,t=this.render,n=0;return this.render=function(){n++},function(){e.render=t,n>0&&e.render()}},x.prototype.setDirty=function(){return this.isDirty=!0,this},x.prototype.featureChanged=function(e){return this._changedFeatureIds.add(e),this},x.prototype.getChangedIds=function(){return this._changedFeatureIds.values()},x.prototype.clearChangedIds=function(){return this._changedFeatureIds.clear(),this},x.prototype.getAllIds=function(){return this._featureIds.values()},x.prototype.add=function(e){return this.featureChanged(e.id),this._features[e.id]=e,this._featureIds.add(e.id),this},x.prototype.delete=function(e,t){var n=this;return t===void 0&&(t={}),De(e).forEach(function(r){n._featureIds.has(r)&&(n._featureIds.delete(r),n._selectedFeatureIds.delete(r),t.silent||n._deletedFeaturesToEmit.indexOf(n._features[r])===-1&&n._deletedFeaturesToEmit.push(n._features[r]),delete n._features[r],n.isDirty=!0)}),on(this,t),this},x.prototype.get=function(e){return this._features[e]},x.prototype.getAll=function(){var e=this;return Object.keys(this._features).map(function(t){return e._features[t]})},x.prototype.select=function(e,t){var n=this;return t===void 0&&(t={}),De(e).forEach(function(r){n._selectedFeatureIds.has(r)||(n._selectedFeatureIds.add(r),n._changedFeatureIds.add(r),t.silent||(n._emitSelectionChange=!0))}),this},x.prototype.deselect=function(e,t){var n=this;return t===void 0&&(t={}),De(e).forEach(function(r){n._selectedFeatureIds.has(r)&&(n._selectedFeatureIds.delete(r),n._changedFeatureIds.add(r),t.silent||(n._emitSelectionChange=!0))}),on(this,t),this},x.prototype.clearSelected=function(e){return e===void 0&&(e={}),this.deselect(this._selectedFeatureIds.values(),{silent:e.silent}),this},x.prototype.setSelected=function(e,t){var n=this;return t===void 0&&(t={}),e=De(e),this.deselect(this._selectedFeatureIds.values().filter(function(r){return e.indexOf(r)===-1}),{silent:t.silent}),this.select(e.filter(function(r){return!n._selectedFeatureIds.has(r)}),{silent:t.silent}),this},x.prototype.setSelectedCoordinates=function(e){return this._selectedCoordinates=e,this._emitSelectionChange=!0,this},x.prototype.clearSelectedCoordinates=function(){return this._selectedCoordinates=[],this._emitSelectionChange=!0,this},x.prototype.getSelectedIds=function(){return this._selectedFeatureIds.values()},x.prototype.getSelected=function(){var e=this;return this._selectedFeatureIds.values().map(function(t){return e.get(t)})},x.prototype.getSelectedCoordinates=function(){var e=this;return this._selectedCoordinates.map(function(t){return{coordinates:e.get(t.feature_id).getCoordinate(t.coord_path)}})},x.prototype.isSelected=function(e){return this._selectedFeatureIds.has(e)},x.prototype.setFeatureProperty=function(e,t,n){this.get(e).setProperty(t,n),this.featureChanged(e)},x.prototype.storeMapConfig=function(){var e=this;Wt.forEach(function(t){e.ctx.map[t]&&(e._mapInitialConfig[t]=e.ctx.map[t].isEnabled())})},x.prototype.restoreMapConfig=function(){var e=this;Object.keys(this._mapInitialConfig).forEach(function(t){e._mapInitialConfig[t]?e.ctx.map[t].enable():e.ctx.map[t].disable()})},x.prototype.getInitialConfigValue=function(e){return this._mapInitialConfig[e]===void 0||this._mapInitialConfig[e]};var sr=function(){for(var e=arguments,t={},n=0;n<arguments.length;n++){var r=e[n];for(var o in r)ur.call(r,o)&&(t[o]=r[o])}return t},ur=Object.prototype.hasOwnProperty,pe=de(sr),cr=["mode","feature","mouse"];function lr(e){var t=null,n=null,r={onRemove:function(){return e.map.off("load",r.connect),clearInterval(n),r.removeLayers(),e.store.restoreMapConfig(),e.ui.removeButtons(),e.events.removeEventListeners(),e.ui.clearMapClasses(),e.boxZoomInitial&&e.map.boxZoom.enable(),e.map=null,e.container=null,e.store=null,t&&t.parentNode&&t.parentNode.removeChild(t),t=null,this},connect:function(){e.map.off("load",r.connect),clearInterval(n),r.addLayers(),e.store.storeMapConfig(),e.events.addEventListeners()},onAdd:function(o){var i=o.fire;return o.fire=function(a,l){var d=arguments;return i.length===1&&arguments.length!==1&&(d=[pe({},{type:a},l)]),i.apply(o,d)},e.map=o,e.events=function(a){var l=Object.keys(a.options.modes).reduce(function(c,y){return c[y]=ir(a.options.modes[y]),c},{}),d={},h={},g={},p=null,_=null;g.drag=function(c,y){y({point:c.point,time:new Date().getTime()})?(a.ui.queueMapClasses({mouse:N.DRAG}),_.drag(c)):c.originalEvent.stopPropagation()},g.mousedrag=function(c){g.drag(c,function(y){return!xt(d,y)})},g.touchdrag=function(c){g.drag(c,function(y){return!Mt(h,y)})},g.mousemove=function(c){if((c.originalEvent.buttons!==void 0?c.originalEvent.buttons:c.originalEvent.which)===1)return g.mousedrag(c);var y=Ye(c,a);c.featureTarget=y,_.mousemove(c)},g.mousedown=function(c){d={time:new Date().getTime(),point:c.point};var y=Ye(c,a);c.featureTarget=y,_.mousedown(c)},g.mouseup=function(c){var y=Ye(c,a);c.featureTarget=y,xt(d,{point:c.point,time:new Date().getTime()})?_.click(c):_.mouseup(c)},g.mouseout=function(c){_.mouseout(c)},g.touchstart=function(c){if(a.options.touchEnabled){h={time:new Date().getTime(),point:c.point};var y=xe.touch(c,null,a)[0];c.featureTarget=y,_.touchstart(c)}},g.touchmove=function(c){if(a.options.touchEnabled)return _.touchmove(c),g.touchdrag(c)},g.touchend=function(c){if(c.originalEvent.preventDefault(),a.options.touchEnabled){var y=xe.touch(c,null,a)[0];c.featureTarget=y,Mt(h,{time:new Date().getTime(),point:c.point})?_.tap(c):_.touchend(c)}};var A=function(c){return!(c===8||c===46||c>=48&&c<=57)};function b(c,y,O){O===void 0&&(O={}),_.stop();var V=l[c];if(V===void 0)throw new Error(c+" is not valid");p=c;var w=V(a,y);_=ze(w,a),O.silent||a.map.fire(H.MODE_CHANGE,{mode:c}),a.store.setDirty(),a.store.render()}g.keydown=function(c){(c.srcElement||c.target).classList.contains("mapboxgl-canvas")&&(c.keyCode!==8&&c.keyCode!==46||!a.options.controls.trash?A(c.keyCode)?_.keydown(c):c.keyCode===49&&a.options.controls.point?b(T.DRAW_POINT):c.keyCode===50&&a.options.controls.line_string?b(T.DRAW_LINE_STRING):c.keyCode===51&&a.options.controls.polygon&&b(T.DRAW_POLYGON):(c.preventDefault(),_.trash()))},g.keyup=function(c){A(c.keyCode)&&_.keyup(c)},g.zoomend=function(){a.store.changeZoom()},g.data=function(c){if(c.dataType==="style"){var y=a.setup,O=a.map,V=a.options,w=a.store;V.styles.some(function(Ut){return O.getLayer(Ut.id)})||(y.addLayers(),w.setDirty(),w.render())}};var F={trash:!1,combineFeatures:!1,uncombineFeatures:!1};return{start:function(){p=a.options.defaultMode,_=ze(l[p](a),a)},changeMode:b,actionable:function(c){var y=!1;Object.keys(c).forEach(function(O){if(F[O]===void 0)throw new Error("Invalid action type");F[O]!==c[O]&&(y=!0),F[O]=c[O]}),y&&a.map.fire(H.ACTIONABLE,{actions:F})},currentModeName:function(){return p},currentModeRender:function(c,y){return _.render(c,y)},fire:function(c,y){g[c]&&g[c](y)},addEventListeners:function(){a.map.on("mousemove",g.mousemove),a.map.on("mousedown",g.mousedown),a.map.on("mouseup",g.mouseup),a.map.on("data",g.data),a.map.on("touchmove",g.touchmove),a.map.on("touchstart",g.touchstart),a.map.on("touchend",g.touchend),a.container.addEventListener("mouseout",g.mouseout),a.options.keybindings&&(a.container.addEventListener("keydown",g.keydown),a.container.addEventListener("keyup",g.keyup))},removeEventListeners:function(){a.map.off("mousemove",g.mousemove),a.map.off("mousedown",g.mousedown),a.map.off("mouseup",g.mouseup),a.map.off("data",g.data),a.map.off("touchmove",g.touchmove),a.map.off("touchstart",g.touchstart),a.map.off("touchend",g.touchend),a.container.removeEventListener("mouseout",g.mouseout),a.options.keybindings&&(a.container.removeEventListener("keydown",g.keydown),a.container.removeEventListener("keyup",g.keyup))},trash:function(c){_.trash(c)},combineFeatures:function(){_.combineFeatures()},uncombineFeatures:function(){_.uncombineFeatures()},getMode:function(){return p}}}(e),e.ui=function(a){var l={},d=null,h={mode:null,feature:null,mouse:null},g={mode:null,feature:null,mouse:null};function p(c){g=pe(g,c)}function _(){var c,y;if(a.container){var O=[],V=[];cr.forEach(function(w){g[w]!==h[w]&&(O.push(w+"-"+h[w]),g[w]!==null&&V.push(w+"-"+g[w]))}),O.length>0&&(c=a.container.classList).remove.apply(c,O),V.length>0&&(y=a.container.classList).add.apply(y,V),h=pe(h,g)}}function A(c,y){y===void 0&&(y={});var O=document.createElement("button");return O.className=q.CONTROL_BUTTON+" "+y.className,O.setAttribute("title",y.title),y.container.appendChild(O),O.addEventListener("click",function(V){if(V.preventDefault(),V.stopPropagation(),V.target===d)return b(),void y.onDeactivate();F(c),y.onActivate()},!0),O}function b(){d&&(d.classList.remove(q.ACTIVE_BUTTON),d=null)}function F(c){b();var y=l[c];y&&y&&c!=="trash"&&(y.classList.add(q.ACTIVE_BUTTON),d=y)}return{setActiveButton:F,queueMapClasses:p,updateMapClasses:_,clearMapClasses:function(){p({mode:null,feature:null,mouse:null}),_()},addButtons:function(){var c=a.options.controls,y=document.createElement("div");return y.className=q.CONTROL_GROUP+" "+q.CONTROL_BASE,c&&(c[Y.LINE]&&(l[Y.LINE]=A(Y.LINE,{container:y,className:q.CONTROL_BUTTON_LINE,title:"LineString tool "+(a.options.keybindings?"(l)":""),onActivate:function(){return a.events.changeMode(T.DRAW_LINE_STRING)},onDeactivate:function(){return a.events.trash()}})),c[Y.POLYGON]&&(l[Y.POLYGON]=A(Y.POLYGON,{container:y,className:q.CONTROL_BUTTON_POLYGON,title:"Polygon tool "+(a.options.keybindings?"(p)":""),onActivate:function(){return a.events.changeMode(T.DRAW_POLYGON)},onDeactivate:function(){return a.events.trash()}})),c[Y.POINT]&&(l[Y.POINT]=A(Y.POINT,{container:y,className:q.CONTROL_BUTTON_POINT,title:"Marker tool "+(a.options.keybindings?"(m)":""),onActivate:function(){return a.events.changeMode(T.DRAW_POINT)},onDeactivate:function(){return a.events.trash()}})),c.trash&&(l.trash=A("trash",{container:y,className:q.CONTROL_BUTTON_TRASH,title:"Delete",onActivate:function(){a.events.trash()}})),c.combine_features&&(l.combine_features=A("combineFeatures",{container:y,className:q.CONTROL_BUTTON_COMBINE_FEATURES,title:"Combine",onActivate:function(){a.events.combineFeatures()}})),c.uncombine_features&&(l.uncombine_features=A("uncombineFeatures",{container:y,className:q.CONTROL_BUTTON_UNCOMBINE_FEATURES,title:"Uncombine",onActivate:function(){a.events.uncombineFeatures()}}))),y},removeButtons:function(){Object.keys(l).forEach(function(c){var y=l[c];y.parentNode&&y.parentNode.removeChild(y),delete l[c]})}}}(e),e.container=o.getContainer(),e.store=new x(e),t=e.ui.addButtons(),e.options.boxSelect&&(e.boxZoomInitial=o.boxZoom.isEnabled(),o.boxZoom.disable(),o.dragPan.disable(),o.dragPan.enable()),o.loaded()?r.connect():(o.on("load",r.connect),n=setInterval(function(){o.loaded()&&r.connect()},16)),e.events.start(),t},addLayers:function(){e.map.addSource(X.COLD,{data:{type:m.FEATURE_COLLECTION,features:[]},type:"geojson"}),e.map.addSource(X.HOT,{data:{type:m.FEATURE_COLLECTION,features:[]},type:"geojson"}),e.options.styles.forEach(function(o){e.map.addLayer(o)}),e.store.setDirty(!0),e.store.render()},removeLayers:function(){e.options.styles.forEach(function(o){e.map.getLayer(o.id)&&e.map.removeLayer(o.id)}),e.map.getSource(X.COLD)&&e.map.removeSource(X.COLD),e.map.getSource(X.HOT)&&e.map.removeSource(X.HOT)}};return e.setup=r,r}var an=[{id:"gl-draw-polygon-fill-inactive",type:"fill",filter:["all",["==","active","false"],["==","$type","Polygon"],["!=","mode","static"]],paint:{"fill-color":"#3bb2d0","fill-outline-color":"#3bb2d0","fill-opacity":.1}},{id:"gl-draw-polygon-fill-active",type:"fill",filter:["all",["==","active","true"],["==","$type","Polygon"]],paint:{"fill-color":"#fbb03b","fill-outline-color":"#fbb03b","fill-opacity":.1}},{id:"gl-draw-polygon-midpoint",type:"circle",filter:["all",["==","$type","Point"],["==","meta","midpoint"]],paint:{"circle-radius":3,"circle-color":"#fbb03b"}},{id:"gl-draw-polygon-stroke-inactive",type:"line",filter:["all",["==","active","false"],["==","$type","Polygon"],["!=","mode","static"]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"#3bb2d0","line-width":2}},{id:"gl-draw-polygon-stroke-active",type:"line",filter:["all",["==","active","true"],["==","$type","Polygon"]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"#fbb03b","line-dasharray":[.2,2],"line-width":2}},{id:"gl-draw-line-inactive",type:"line",filter:["all",["==","active","false"],["==","$type","LineString"],["!=","mode","static"]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"#3bb2d0","line-width":2}},{id:"gl-draw-line-active",type:"line",filter:["all",["==","$type","LineString"],["==","active","true"]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"#fbb03b","line-dasharray":[.2,2],"line-width":2}},{id:"gl-draw-polygon-and-line-vertex-stroke-inactive",type:"circle",filter:["all",["==","meta","vertex"],["==","$type","Point"],["!=","mode","static"]],paint:{"circle-radius":5,"circle-color":"#fff"}},{id:"gl-draw-polygon-and-line-vertex-inactive",type:"circle",filter:["all",["==","meta","vertex"],["==","$type","Point"],["!=","mode","static"]],paint:{"circle-radius":3,"circle-color":"#fbb03b"}},{id:"gl-draw-point-point-stroke-inactive",type:"circle",filter:["all",["==","active","false"],["==","$type","Point"],["==","meta","feature"],["!=","mode","static"]],paint:{"circle-radius":5,"circle-opacity":1,"circle-color":"#fff"}},{id:"gl-draw-point-inactive",type:"circle",filter:["all",["==","active","false"],["==","$type","Point"],["==","meta","feature"],["!=","mode","static"]],paint:{"circle-radius":3,"circle-color":"#3bb2d0"}},{id:"gl-draw-point-stroke-active",type:"circle",filter:["all",["==","$type","Point"],["==","active","true"],["!=","meta","midpoint"]],paint:{"circle-radius":7,"circle-color":"#fff"}},{id:"gl-draw-point-active",type:"circle",filter:["all",["==","$type","Point"],["!=","meta","midpoint"],["==","active","true"]],paint:{"circle-radius":5,"circle-color":"#fbb03b"}},{id:"gl-draw-polygon-fill-static",type:"fill",filter:["all",["==","mode","static"],["==","$type","Polygon"]],paint:{"fill-color":"#404040","fill-outline-color":"#404040","fill-opacity":.1}},{id:"gl-draw-polygon-stroke-static",type:"line",filter:["all",["==","mode","static"],["==","$type","Polygon"]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"#404040","line-width":2}},{id:"gl-draw-line-static",type:"line",filter:["all",["==","mode","static"],["==","$type","LineString"]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"#404040","line-width":2}},{id:"gl-draw-point-static",type:"circle",filter:["all",["==","mode","static"],["==","$type","Point"]],paint:{"circle-radius":5,"circle-color":"#404040"}}];function qe(e){return function(t){var n=t.featureTarget;return!!n&&!!n.properties&&n.properties.meta===e}}function sn(e){return!!e.originalEvent&&!!e.originalEvent.shiftKey&&e.originalEvent.button===0}function _e(e){return!!e.featureTarget&&!!e.featureTarget.properties&&e.featureTarget.properties.active===j.ACTIVE&&e.featureTarget.properties.meta===B.FEATURE}function At(e){return!!e.featureTarget&&!!e.featureTarget.properties&&e.featureTarget.properties.active===j.INACTIVE&&e.featureTarget.properties.meta===B.FEATURE}function He(e){return e.featureTarget===void 0}function Pt(e){return!!e.featureTarget&&!!e.featureTarget.properties&&e.featureTarget.properties.meta===B.FEATURE}function ke(e){var t=e.featureTarget;return!!t&&!!t.properties&&t.properties.meta===B.VERTEX}function Xe(e){return!!e.originalEvent&&e.originalEvent.shiftKey===!0}function Ze(e){return e.keyCode===27}function We(e){return e.keyCode===13}var dr=Object.freeze({__proto__:null,isOfMetaType:qe,isShiftMousedown:sn,isActiveFeature:_e,isInactiveFeature:At,noTarget:He,isFeature:Pt,isVertex:ke,isShiftDown:Xe,isEscapeKey:Ze,isEnterKey:We,isTrue:function(){return!0}}),pr=Me;function Me(e,t){this.x=e,this.y=t}Me.prototype={clone:function(){return new Me(this.x,this.y)},add:function(e){return this.clone()._add(e)},sub:function(e){return this.clone()._sub(e)},multByPoint:function(e){return this.clone()._multByPoint(e)},divByPoint:function(e){return this.clone()._divByPoint(e)},mult:function(e){return this.clone()._mult(e)},div:function(e){return this.clone()._div(e)},rotate:function(e){return this.clone()._rotate(e)},rotateAround:function(e,t){return this.clone()._rotateAround(e,t)},matMult:function(e){return this.clone()._matMult(e)},unit:function(){return this.clone()._unit()},perp:function(){return this.clone()._perp()},round:function(){return this.clone()._round()},mag:function(){return Math.sqrt(this.x*this.x+this.y*this.y)},equals:function(e){return this.x===e.x&&this.y===e.y},dist:function(e){return Math.sqrt(this.distSqr(e))},distSqr:function(e){var t=e.x-this.x,n=e.y-this.y;return t*t+n*n},angle:function(){return Math.atan2(this.y,this.x)},angleTo:function(e){return Math.atan2(this.y-e.y,this.x-e.x)},angleWith:function(e){return this.angleWithSep(e.x,e.y)},angleWithSep:function(e,t){return Math.atan2(this.x*t-this.y*e,this.x*e+this.y*t)},_matMult:function(e){var t=e[0]*this.x+e[1]*this.y,n=e[2]*this.x+e[3]*this.y;return this.x=t,this.y=n,this},_add:function(e){return this.x+=e.x,this.y+=e.y,this},_sub:function(e){return this.x-=e.x,this.y-=e.y,this},_mult:function(e){return this.x*=e,this.y*=e,this},_div:function(e){return this.x/=e,this.y/=e,this},_multByPoint:function(e){return this.x*=e.x,this.y*=e.y,this},_divByPoint:function(e){return this.x/=e.x,this.y/=e.y,this},_unit:function(){return this._div(this.mag()),this},_perp:function(){var e=this.y;return this.y=this.x,this.x=-e,this},_rotate:function(e){var t=Math.cos(e),n=Math.sin(e),r=t*this.x-n*this.y,o=n*this.x+t*this.y;return this.x=r,this.y=o,this},_rotateAround:function(e,t){var n=Math.cos(e),r=Math.sin(e),o=t.x+n*(this.x-t.x)-r*(this.y-t.y),i=t.y+r*(this.x-t.x)+n*(this.y-t.y);return this.x=o,this.y=i,this},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}},Me.convert=function(e){return e instanceof Me?e:Array.isArray(e)?new Me(e[0],e[1]):e};var fr=de(pr);function Ft(e,t){var n=t.getBoundingClientRect();return new fr(e.clientX-n.left-(t.clientLeft||0),e.clientY-n.top-(t.clientTop||0))}function Le(e,t,n,r){return{type:m.FEATURE,properties:{meta:B.VERTEX,parent:e,coord_path:n,active:r?j.ACTIVE:j.INACTIVE},geometry:{type:m.POINT,coordinates:t}}}function un(e,t,n){var r=t.geometry.coordinates,o=n.geometry.coordinates;if(r[1]>85||r[1]<St||o[1]>85||o[1]<St)return null;var i={lng:(r[0]+o[0])/2,lat:(r[1]+o[1])/2};return{type:m.FEATURE,properties:{meta:B.MIDPOINT,parent:e,lng:i.lng,lat:i.lat,coord_path:n.properties.coord_path},geometry:{type:m.POINT,coordinates:[i.lng,i.lat]}}}function Ke(e,t,n){t===void 0&&(t={}),n===void 0&&(n=null);var r,o=e.geometry,i=o.type,a=o.coordinates,l=e.properties&&e.properties.id,d=[];function h(p,_){var A="",b=null;p.forEach(function(F,c){var y=_!=null?_+"."+c:String(c),O=Le(l,F,y,g(y));if(t.midpoints&&b){var V=un(l,b,O);V&&d.push(V)}b=O;var w=JSON.stringify(F);A!==w&&d.push(O),c===0&&(A=w)})}function g(p){return!!t.selectedPaths&&t.selectedPaths.indexOf(p)!==-1}return i===m.POINT?d.push(Le(l,a,n,g(n))):i===m.POLYGON?a.forEach(function(p,_){h(p,n!==null?n+"."+_:String(_))}):i===m.LINE_STRING?h(a,n):i.indexOf(m.MULTI_PREFIX)===0&&(r=i.replace(m.MULTI_PREFIX,""),a.forEach(function(p,_){var A={type:m.FEATURE,properties:e.properties,geometry:{type:r,coordinates:p}};d=d.concat(Ke(A,t,_))})),d}var ee={enable:function(e){setTimeout(function(){e.map&&e.map.doubleClickZoom&&e._ctx&&e._ctx.store&&e._ctx.store.getInitialConfigValue&&e._ctx.store.getInitialConfigValue("doubleClickZoom")&&e.map.doubleClickZoom.enable()},0)},disable:function(e){setTimeout(function(){e.map&&e.map.doubleClickZoom&&e.map.doubleClickZoom.disable()},0)}},Qe={exports:{}},cn=function(e){if(!e||!e.type)return null;var t=hr[e.type];if(!t)return null;if(t==="geometry")return{type:"FeatureCollection",features:[{type:"Feature",properties:{},geometry:e}]};if(t==="feature")return{type:"FeatureCollection",features:[e]};if(t==="featurecollection")return e},hr={Point:"geometry",MultiPoint:"geometry",LineString:"geometry",MultiLineString:"geometry",Polygon:"geometry",MultiPolygon:"geometry",GeometryCollection:"geometry",Feature:"feature",FeatureCollection:"featurecollection"},gr=de(cn),yr=Object.freeze({__proto__:null,default:function e(t){switch(t&&t.type||null){case"FeatureCollection":return t.features=t.features.reduce(function(n,r){return n.concat(e(r))},[]),t;case"Feature":return t.geometry?e(t.geometry).map(function(n){var r={type:"Feature",properties:JSON.parse(JSON.stringify(t.properties)),geometry:n};return t.id!==void 0&&(r.id=t.id),r}):[t];case"MultiPoint":return t.coordinates.map(function(n){return{type:"Point",coordinates:n}});case"MultiPolygon":return t.coordinates.map(function(n){return{type:"Polygon",coordinates:n}});case"MultiLineString":return t.coordinates.map(function(n){return{type:"LineString",coordinates:n}});case"GeometryCollection":return t.geometries.map(e).reduce(function(n,r){return n.concat(r)},[]);case"Point":case"Polygon":case"LineString":return[t]}}}),vr=cn,et=Kn(yr),mr=function(e){return function t(n){return Array.isArray(n)&&n.length&&typeof n[0]=="number"?[n]:n.reduce(function(r,o){return Array.isArray(o)&&Array.isArray(o[0])?r.concat(t(o)):(r.push(o),r)},[])}(e)};et instanceof Function||(et=et.default);var ln={exports:{}},_r=ln.exports=function(e){return new K(e)};function K(e){this.value=e}function dn(e,t,n){var r=[],o=[],i=!0;return function a(l){var d=n?pn(l):l,h={},g=!0,p={node:d,node_:l,path:[].concat(r),parent:o[o.length-1],parents:o,key:r.slice(-1)[0],isRoot:r.length===0,level:r.length,circular:null,update:function(b,F){p.isRoot||(p.parent.node[p.key]=b),p.node=b,F&&(g=!1)},delete:function(b){delete p.parent.node[p.key],b&&(g=!1)},remove:function(b){fn(p.parent.node)?p.parent.node.splice(p.key,1):delete p.parent.node[p.key],b&&(g=!1)},keys:null,before:function(b){h.before=b},after:function(b){h.after=b},pre:function(b){h.pre=b},post:function(b){h.post=b},stop:function(){i=!1},block:function(){g=!1}};if(!i)return p;function _(){if(typeof p.node=="object"&&p.node!==null){p.keys&&p.node_===p.node||(p.keys=tt(p.node)),p.isLeaf=p.keys.length==0;for(var b=0;b<o.length;b++)if(o[b].node_===l){p.circular=o[b];break}}else p.isLeaf=!0,p.keys=null;p.notLeaf=!p.isLeaf,p.notRoot=!p.isRoot}_();var A=t.call(p,p.node);return A!==void 0&&p.update&&p.update(A),h.before&&h.before.call(p,p.node),g&&(typeof p.node!="object"||p.node===null||p.circular||(o.push(p),_(),nt(p.keys,function(b,F){r.push(b),h.pre&&h.pre.call(p,p.node[b],b);var c=a(p.node[b]);n&&rt.call(p.node,b)&&(p.node[b]=c.node),c.isLast=F==p.keys.length-1,c.isFirst=F==0,h.post&&h.post.call(p,c),r.pop()}),o.pop()),h.after&&h.after.call(p,p.node)),p}(e).node}function pn(e){if(typeof e=="object"&&e!==null){var t;if(fn(e))t=[];else if(Ne(e)==="[object Date]")t=new Date(e.getTime?e.getTime():e);else if(function(o){return Ne(o)==="[object RegExp]"}(e))t=new RegExp(e);else if(function(o){return Ne(o)==="[object Error]"}(e))t={message:e.message};else if(function(o){return Ne(o)==="[object Boolean]"}(e))t=new Boolean(e);else if(function(o){return Ne(o)==="[object Number]"}(e))t=new Number(e);else if(function(o){return Ne(o)==="[object String]"}(e))t=new String(e);else if(Object.create&&Object.getPrototypeOf)t=Object.create(Object.getPrototypeOf(e));else if(e.constructor===Object)t={};else{var n=e.constructor&&e.constructor.prototype||e.__proto__||{},r=function(){};r.prototype=n,t=new r}return nt(tt(e),function(o){t[o]=e[o]}),t}return e}K.prototype.get=function(e){for(var t=this.value,n=0;n<e.length;n++){var r=e[n];if(!t||!rt.call(t,r)){t=void 0;break}t=t[r]}return t},K.prototype.has=function(e){for(var t=this.value,n=0;n<e.length;n++){var r=e[n];if(!t||!rt.call(t,r))return!1;t=t[r]}return!0},K.prototype.set=function(e,t){for(var n=this.value,r=0;r<e.length-1;r++){var o=e[r];rt.call(n,o)||(n[o]={}),n=n[o]}return n[e[r]]=t,t},K.prototype.map=function(e){return dn(this.value,e,!0)},K.prototype.forEach=function(e){return this.value=dn(this.value,e,!1),this.value},K.prototype.reduce=function(e,t){var n=arguments.length===1,r=n?this.value:t;return this.forEach(function(o){this.isRoot&&n||(r=e.call(this,r,o))}),r},K.prototype.paths=function(){var e=[];return this.forEach(function(t){e.push(this.path)}),e},K.prototype.nodes=function(){var e=[];return this.forEach(function(t){e.push(this.node)}),e},K.prototype.clone=function(){var e=[],t=[];return function n(r){for(var o=0;o<e.length;o++)if(e[o]===r)return t[o];if(typeof r=="object"&&r!==null){var i=pn(r);return e.push(r),t.push(i),nt(tt(r),function(a){i[a]=n(r[a])}),e.pop(),t.pop(),i}return r}(this.value)};var tt=Object.keys||function(e){var t=[];for(var n in e)t.push(n);return t};function Ne(e){return Object.prototype.toString.call(e)}var fn=Array.isArray||function(e){return Object.prototype.toString.call(e)==="[object Array]"},nt=function(e,t){if(e.forEach)return e.forEach(t);for(var n=0;n<e.length;n++)t(e[n],n,e)};nt(tt(K.prototype),function(e){_r[e]=function(t){var n=[].slice.call(arguments,1),r=new K(t);return r[e].apply(r,n)}});var rt=Object.hasOwnProperty||function(e,t){return t in e},br=ln.exports,Er=J;function J(e){if(!(this instanceof J))return new J(e);this._bbox=e||[1/0,1/0,-1/0,-1/0],this._valid=!!e}J.prototype.include=function(e){return this._valid=!0,this._bbox[0]=Math.min(this._bbox[0],e[0]),this._bbox[1]=Math.min(this._bbox[1],e[1]),this._bbox[2]=Math.max(this._bbox[2],e[0]),this._bbox[3]=Math.max(this._bbox[3],e[1]),this},J.prototype.equals=function(e){var t;return t=e instanceof J?e.bbox():e,this._bbox[0]==t[0]&&this._bbox[1]==t[1]&&this._bbox[2]==t[2]&&this._bbox[3]==t[3]},J.prototype.center=function(e){return this._valid?[(this._bbox[0]+this._bbox[2])/2,(this._bbox[1]+this._bbox[3])/2]:null},J.prototype.union=function(e){var t;return this._valid=!0,t=e instanceof J?e.bbox():e,this._bbox[0]=Math.min(this._bbox[0],t[0]),this._bbox[1]=Math.min(this._bbox[1],t[1]),this._bbox[2]=Math.max(this._bbox[2],t[2]),this._bbox[3]=Math.max(this._bbox[3],t[3]),this},J.prototype.bbox=function(){return this._valid?this._bbox:null},J.prototype.contains=function(e){if(!e)return this._fastContains();if(!this._valid)return null;var t=e[0],n=e[1];return this._bbox[0]<=t&&this._bbox[1]<=n&&this._bbox[2]>=t&&this._bbox[3]>=n},J.prototype.intersect=function(e){return this._valid?(t=e instanceof J?e.bbox():e,!(this._bbox[0]>t[2]||this._bbox[2]<t[0]||this._bbox[3]<t[1]||this._bbox[1]>t[3])):null;var t},J.prototype._fastContains=function(){if(!this._valid)return new Function("return null;");var e="return "+this._bbox[0]+"<= ll[0] &&"+this._bbox[1]+"<= ll[1] &&"+this._bbox[2]+">= ll[0] &&"+this._bbox[3]+">= ll[1]";return new Function("ll",e)},J.prototype.polygon=function(){return this._valid?{type:"Polygon",coordinates:[[[this._bbox[0],this._bbox[1]],[this._bbox[2],this._bbox[1]],[this._bbox[2],this._bbox[3]],[this._bbox[0],this._bbox[3]],[this._bbox[0],this._bbox[1]]]]}:null};var Tr=function(e){if(!e)return[];var t=et(vr(e)),n=[];return t.features.forEach(function(r){r.geometry&&(n=n.concat(mr(r.geometry.coordinates)))}),n},Cr=br,Or=Er,hn={features:["FeatureCollection"],coordinates:["Point","MultiPoint","LineString","MultiLineString","Polygon","MultiPolygon"],geometry:["Feature"],geometries:["GeometryCollection"]},Sr=Object.keys(hn);function wt(e){for(var t=Or(),n=Tr(e),r=0;r<n.length;r++)t.include(n[r]);return t}Qe.exports=function(e){return wt(e).bbox()},Qe.exports.polygon=function(e){return wt(e).polygon()},Qe.exports.bboxify=function(e){return Cr(e).map(function(t){t&&Sr.some(function(n){return!!t[n]&&hn[n].indexOf(t.type)!==-1})&&(t.bbox=wt(t).bbox(),this.update(t))})};var Ir=de(Qe.exports),ot=-90;function Rt(e,t){var n=ot,r=90,o=ot,i=90,a=270,l=-270;e.forEach(function(h){var g=Ir(h),p=g[1],_=g[3],A=g[0],b=g[2];p>n&&(n=p),_<r&&(r=_),_>o&&(o=_),p<i&&(i=p),A<a&&(a=A),b>l&&(l=b)});var d=t;return n+d.lat>85&&(d.lat=85-n),o+d.lat>90&&(d.lat=90-o),r+d.lat<-85&&(d.lat=-85-r),i+d.lat<ot&&(d.lat=ot-i),a+d.lng<=-270&&(d.lng+=360*Math.ceil(Math.abs(d.lng)/360)),l+d.lng>=270&&(d.lng-=360*Math.ceil(Math.abs(d.lng)/360)),d}function Dt(e,t){var n=Rt(e.map(function(r){return r.toGeoJSON()}),t);e.forEach(function(r){var o,i=r.getCoordinates(),a=function(d){var h={lng:d[0]+n.lng,lat:d[1]+n.lat};return[h.lng,h.lat]},l=function(d){return d.map(function(h){return a(h)})};r.type===m.POINT?o=a(i):r.type===m.LINE_STRING||r.type===m.MULTI_POINT?o=i.map(a):r.type===m.POLYGON||r.type===m.MULTI_LINE_STRING?o=i.map(l):r.type===m.MULTI_POLYGON&&(o=i.map(function(d){return d.map(function(h){return l(h)})})),r.incomingCoords(o)})}var D={onSetup:function(e){var t=this,n={dragMoveLocation:null,boxSelectStartLocation:null,boxSelectElement:void 0,boxSelecting:!1,canBoxSelect:!1,dragMoving:!1,canDragMove:!1,initiallySelectedFeatureIds:e.featureIds||[]};return this.setSelected(n.initiallySelectedFeatureIds.filter(function(r){return t.getFeature(r)!==void 0})),this.fireActionable(),this.setActionableState({combineFeatures:!0,uncombineFeatures:!0,trash:!0}),n},fireUpdate:function(){this.map.fire(H.UPDATE,{action:Ot.MOVE,features:this.getSelected().map(function(e){return e.toGeoJSON()})})},fireActionable:function(){var e=this,t=this.getSelected(),n=t.filter(function(l){return e.isInstanceOf("MultiFeature",l)}),r=!1;if(t.length>1){r=!0;var o=t[0].type.replace("Multi","");t.forEach(function(l){l.type.replace("Multi","")!==o&&(r=!1)})}var i=n.length>0,a=t.length>0;this.setActionableState({combineFeatures:r,uncombineFeatures:i,trash:a})},getUniqueIds:function(e){return e.length?e.map(function(t){return t.properties.id}).filter(function(t){return t!==void 0}).reduce(function(t,n){return t.add(n),t},new Z).values():[]},stopExtendedInteractions:function(e){e.boxSelectElement&&(e.boxSelectElement.parentNode&&e.boxSelectElement.parentNode.removeChild(e.boxSelectElement),e.boxSelectElement=null),this.map.dragPan.enable(),e.boxSelecting=!1,e.canBoxSelect=!1,e.dragMoving=!1,e.canDragMove=!1},onStop:function(){ee.enable(this)},onMouseMove:function(e,t){return Pt(t)&&e.dragMoving&&this.fireUpdate(),this.stopExtendedInteractions(e),!0},onMouseOut:function(e){return!e.dragMoving||this.fireUpdate()}};D.onTap=D.onClick=function(e,t){return He(t)?this.clickAnywhere(e,t):qe(B.VERTEX)(t)?this.clickOnVertex(e,t):Pt(t)?this.clickOnFeature(e,t):void 0},D.clickAnywhere=function(e){var t=this,n=this.getSelectedIds();n.length&&(this.clearSelectedFeatures(),n.forEach(function(r){return t.doRender(r)})),ee.enable(this),this.stopExtendedInteractions(e)},D.clickOnVertex=function(e,t){this.changeMode(T.DIRECT_SELECT,{featureId:t.featureTarget.properties.parent,coordPath:t.featureTarget.properties.coord_path,startPos:t.lngLat}),this.updateUIClasses({mouse:N.MOVE})},D.startOnActiveFeature=function(e,t){this.stopExtendedInteractions(e),this.map.dragPan.disable(),this.doRender(t.featureTarget.properties.id),e.canDragMove=!0,e.dragMoveLocation=t.lngLat},D.clickOnFeature=function(e,t){var n=this;ee.disable(this),this.stopExtendedInteractions(e);var r=Xe(t),o=this.getSelectedIds(),i=t.featureTarget.properties.id,a=this.isSelected(i);if(!r&&a&&this.getFeature(i).type!==m.POINT)return this.changeMode(T.DIRECT_SELECT,{featureId:i});a&&r?(this.deselect(i),this.updateUIClasses({mouse:N.POINTER}),o.length===1&&ee.enable(this)):!a&&r?(this.select(i),this.updateUIClasses({mouse:N.MOVE})):a||r||(o.forEach(function(l){return n.doRender(l)}),this.setSelected(i),this.updateUIClasses({mouse:N.MOVE})),this.doRender(i)},D.onMouseDown=function(e,t){return _e(t)?this.startOnActiveFeature(e,t):this.drawConfig.boxSelect&&sn(t)?this.startBoxSelect(e,t):void 0},D.startBoxSelect=function(e,t){this.stopExtendedInteractions(e),this.map.dragPan.disable(),e.boxSelectStartLocation=Ft(t.originalEvent,this.map.getContainer()),e.canBoxSelect=!0},D.onTouchStart=function(e,t){if(_e(t))return this.startOnActiveFeature(e,t)},D.onDrag=function(e,t){return e.canDragMove?this.dragMove(e,t):this.drawConfig.boxSelect&&e.canBoxSelect?this.whileBoxSelect(e,t):void 0},D.whileBoxSelect=function(e,t){e.boxSelecting=!0,this.updateUIClasses({mouse:N.ADD}),e.boxSelectElement||(e.boxSelectElement=document.createElement("div"),e.boxSelectElement.classList.add(q.BOX_SELECT),this.map.getContainer().appendChild(e.boxSelectElement));var n=Ft(t.originalEvent,this.map.getContainer()),r=Math.min(e.boxSelectStartLocation.x,n.x),o=Math.max(e.boxSelectStartLocation.x,n.x),i=Math.min(e.boxSelectStartLocation.y,n.y),a=Math.max(e.boxSelectStartLocation.y,n.y),l="translate("+r+"px, "+i+"px)";e.boxSelectElement.style.transform=l,e.boxSelectElement.style.WebkitTransform=l,e.boxSelectElement.style.width=o-r+"px",e.boxSelectElement.style.height=a-i+"px"},D.dragMove=function(e,t){e.dragMoving=!0,t.originalEvent.stopPropagation();var n={lng:t.lngLat.lng-e.dragMoveLocation.lng,lat:t.lngLat.lat-e.dragMoveLocation.lat};Dt(this.getSelected(),n),e.dragMoveLocation=t.lngLat},D.onTouchEnd=D.onMouseUp=function(e,t){var n=this;if(e.dragMoving)this.fireUpdate();else if(e.boxSelecting){var r=[e.boxSelectStartLocation,Ft(t.originalEvent,this.map.getContainer())],o=this.featuresAt(null,r,"click"),i=this.getUniqueIds(o).filter(function(a){return!n.isSelected(a)});i.length&&(this.select(i),i.forEach(function(a){return n.doRender(a)}),this.updateUIClasses({mouse:N.MOVE}))}this.stopExtendedInteractions(e)},D.toDisplayFeatures=function(e,t,n){t.properties.active=this.isSelected(t.properties.id)?j.ACTIVE:j.INACTIVE,n(t),this.fireActionable(),t.properties.active===j.ACTIVE&&t.geometry.type!==m.POINT&&Ke(t).forEach(n)},D.onTrash=function(){this.deleteFeature(this.getSelectedIds()),this.fireActionable()},D.onCombineFeatures=function(){var e=this.getSelected();if(!(e.length===0||e.length<2)){for(var t=[],n=[],r=e[0].type.replace("Multi",""),o=0;o<e.length;o++){var i=e[o];if(i.type.replace("Multi","")!==r)return;i.type.includes("Multi")?i.getCoordinates().forEach(function(l){t.push(l)}):t.push(i.getCoordinates()),n.push(i.toGeoJSON())}if(n.length>1){var a=this.newFeature({type:m.FEATURE,properties:n[0].properties,geometry:{type:"Multi"+r,coordinates:t}});this.addFeature(a),this.deleteFeature(this.getSelectedIds(),{silent:!0}),this.setSelected([a.id]),this.map.fire(H.COMBINE_FEATURES,{createdFeatures:[a.toGeoJSON()],deletedFeatures:n})}this.fireActionable()}},D.onUncombineFeatures=function(){var e=this,t=this.getSelected();if(t.length!==0){for(var n=[],r=[],o=function(a){var l=t[a];e.isInstanceOf("MultiFeature",l)&&(l.getFeatures().forEach(function(d){e.addFeature(d),d.properties=l.properties,n.push(d.toGeoJSON()),e.select([d.id])}),e.deleteFeature(l.id,{silent:!0}),r.push(l.toGeoJSON()))},i=0;i<t.length;i++)o(i);n.length>1&&this.map.fire(H.UNCOMBINE_FEATURES,{createdFeatures:n,deletedFeatures:r}),this.fireActionable()}};var gn=qe(B.VERTEX),yn=qe(B.MIDPOINT),fe={fireUpdate:function(){this.map.fire(H.UPDATE,{action:Ot.CHANGE_COORDINATES,features:this.getSelected().map(function(e){return e.toGeoJSON()})})},fireActionable:function(e){this.setActionableState({combineFeatures:!1,uncombineFeatures:!1,trash:e.selectedCoordPaths.length>0})},startDragging:function(e,t){this.map.dragPan.disable(),e.canDragMove=!0,e.dragMoveLocation=t.lngLat},stopDragging:function(e){this.map.dragPan.enable(),e.dragMoving=!1,e.canDragMove=!1,e.dragMoveLocation=null},onVertex:function(e,t){this.startDragging(e,t);var n=t.featureTarget.properties,r=e.selectedCoordPaths.indexOf(n.coord_path);Xe(t)||r!==-1?Xe(t)&&r===-1&&e.selectedCoordPaths.push(n.coord_path):e.selectedCoordPaths=[n.coord_path];var o=this.pathsToCoordinates(e.featureId,e.selectedCoordPaths);this.setSelectedCoordinates(o)},onMidpoint:function(e,t){this.startDragging(e,t);var n=t.featureTarget.properties;e.feature.addCoordinate(n.coord_path,n.lng,n.lat),this.fireUpdate(),e.selectedCoordPaths=[n.coord_path]},pathsToCoordinates:function(e,t){return t.map(function(n){return{feature_id:e,coord_path:n}})},onFeature:function(e,t){e.selectedCoordPaths.length===0?this.startDragging(e,t):this.stopDragging(e)},dragFeature:function(e,t,n){Dt(this.getSelected(),n),e.dragMoveLocation=t.lngLat},dragVertex:function(e,t,n){for(var r=e.selectedCoordPaths.map(function(l){return e.feature.getCoordinate(l)}),o=Rt(r.map(function(l){return{type:m.FEATURE,properties:{},geometry:{type:m.POINT,coordinates:l}}}),n),i=0;i<r.length;i++){var a=r[i];e.feature.updateCoordinate(e.selectedCoordPaths[i],a[0]+o.lng,a[1]+o.lat)}},clickNoTarget:function(){this.changeMode(T.SIMPLE_SELECT)},clickInactive:function(){this.changeMode(T.SIMPLE_SELECT)},clickActiveFeature:function(e){e.selectedCoordPaths=[],this.clearSelectedCoordinates(),e.feature.changed()},onSetup:function(e){var t=e.featureId,n=this.getFeature(t);if(!n)throw new Error("You must provide a featureId to enter direct_select mode");if(n.type===m.POINT)throw new TypeError("direct_select mode doesn't handle point features");var r={featureId:t,feature:n,dragMoveLocation:e.startPos||null,dragMoving:!1,canDragMove:!1,selectedCoordPaths:e.coordPath?[e.coordPath]:[]};return this.setSelectedCoordinates(this.pathsToCoordinates(t,r.selectedCoordPaths)),this.setSelected(t),ee.disable(this),this.setActionableState({trash:!0}),r},onStop:function(){ee.enable(this),this.clearSelectedCoordinates()},toDisplayFeatures:function(e,t,n){e.featureId===t.properties.id?(t.properties.active=j.ACTIVE,n(t),Ke(t,{map:this.map,midpoints:!0,selectedPaths:e.selectedCoordPaths}).forEach(n)):(t.properties.active=j.INACTIVE,n(t)),this.fireActionable(e)},onTrash:function(e){e.selectedCoordPaths.sort(function(t,n){return n.localeCompare(t,"en",{numeric:!0})}).forEach(function(t){return e.feature.removeCoordinate(t)}),this.fireUpdate(),e.selectedCoordPaths=[],this.clearSelectedCoordinates(),this.fireActionable(e),e.feature.isValid()===!1&&(this.deleteFeature([e.featureId]),this.changeMode(T.SIMPLE_SELECT,{}))},onMouseMove:function(e,t){var n=_e(t),r=gn(t),o=yn(t),i=e.selectedCoordPaths.length===0;return n&&i||r&&!i?this.updateUIClasses({mouse:N.MOVE}):this.updateUIClasses({mouse:N.NONE}),(r||n||o)&&e.dragMoving&&this.fireUpdate(),this.stopDragging(e),!0},onMouseOut:function(e){return e.dragMoving&&this.fireUpdate(),!0}};fe.onTouchStart=fe.onMouseDown=function(e,t){return gn(t)?this.onVertex(e,t):_e(t)?this.onFeature(e,t):yn(t)?this.onMidpoint(e,t):void 0},fe.onDrag=function(e,t){if(e.canDragMove===!0){e.dragMoving=!0,t.originalEvent.stopPropagation();var n={lng:t.lngLat.lng-e.dragMoveLocation.lng,lat:t.lngLat.lat-e.dragMoveLocation.lat};e.selectedCoordPaths.length>0?this.dragVertex(e,t,n):this.dragFeature(e,t,n),e.dragMoveLocation=t.lngLat}},fe.onClick=function(e,t){return He(t)?this.clickNoTarget(e,t):_e(t)?this.clickActiveFeature(e,t):At(t)?this.clickInactive(e,t):void this.stopDragging(e)},fe.onTap=function(e,t){return He(t)?this.clickNoTarget(e,t):_e(t)?this.clickActiveFeature(e,t):At(t)?this.clickInactive(e,t):void 0},fe.onTouchEnd=fe.onMouseUp=function(e){e.dragMoving&&this.fireUpdate(),this.stopDragging(e)};var ne={};function it(e,t){return!!e.lngLat&&e.lngLat.lng===t[0]&&e.lngLat.lat===t[1]}ne.onSetup=function(){var e=this.newFeature({type:m.FEATURE,properties:{},geometry:{type:m.POINT,coordinates:[]}});return this.addFeature(e),this.clearSelectedFeatures(),this.updateUIClasses({mouse:N.ADD}),this.activateUIButton(Y.POINT),this.setActionableState({trash:!0}),{point:e}},ne.stopDrawingAndRemove=function(e){this.deleteFeature([e.point.id],{silent:!0}),this.changeMode(T.SIMPLE_SELECT)},ne.onTap=ne.onClick=function(e,t){this.updateUIClasses({mouse:N.MOVE}),e.point.updateCoordinate("",t.lngLat.lng,t.lngLat.lat),this.map.fire(H.CREATE,{features:[e.point.toGeoJSON()]}),this.changeMode(T.SIMPLE_SELECT,{featureIds:[e.point.id]})},ne.onStop=function(e){this.activateUIButton(),e.point.getCoordinate().length||this.deleteFeature([e.point.id],{silent:!0})},ne.toDisplayFeatures=function(e,t,n){var r=t.properties.id===e.point.id;if(t.properties.active=r?j.ACTIVE:j.INACTIVE,!r)return n(t)},ne.onTrash=ne.stopDrawingAndRemove,ne.onKeyUp=function(e,t){if(Ze(t)||We(t))return this.stopDrawingAndRemove(e,t)};var be={onSetup:function(){var e=this.newFeature({type:m.FEATURE,properties:{},geometry:{type:m.POLYGON,coordinates:[[]]}});return this.addFeature(e),this.clearSelectedFeatures(),ee.disable(this),this.updateUIClasses({mouse:N.ADD}),this.activateUIButton(Y.POLYGON),this.setActionableState({trash:!0}),{polygon:e,currentVertexPosition:0}},clickAnywhere:function(e,t){if(e.currentVertexPosition>0&&it(t,e.polygon.coordinates[0][e.currentVertexPosition-1]))return this.changeMode(T.SIMPLE_SELECT,{featureIds:[e.polygon.id]});this.updateUIClasses({mouse:N.ADD}),e.polygon.updateCoordinate("0."+e.currentVertexPosition,t.lngLat.lng,t.lngLat.lat),e.currentVertexPosition++,e.polygon.updateCoordinate("0."+e.currentVertexPosition,t.lngLat.lng,t.lngLat.lat)},clickOnVertex:function(e){return this.changeMode(T.SIMPLE_SELECT,{featureIds:[e.polygon.id]})},onMouseMove:function(e,t){e.polygon.updateCoordinate("0."+e.currentVertexPosition,t.lngLat.lng,t.lngLat.lat),ke(t)&&this.updateUIClasses({mouse:N.POINTER})}};be.onTap=be.onClick=function(e,t){return ke(t)?this.clickOnVertex(e,t):this.clickAnywhere(e,t)},be.onKeyUp=function(e,t){Ze(t)?(this.deleteFeature([e.polygon.id],{silent:!0}),this.changeMode(T.SIMPLE_SELECT)):We(t)&&this.changeMode(T.SIMPLE_SELECT,{featureIds:[e.polygon.id]})},be.onStop=function(e){this.updateUIClasses({mouse:N.NONE}),ee.enable(this),this.activateUIButton(),this.getFeature(e.polygon.id)!==void 0&&(e.polygon.removeCoordinate("0."+e.currentVertexPosition),e.polygon.isValid()?this.map.fire(H.CREATE,{features:[e.polygon.toGeoJSON()]}):(this.deleteFeature([e.polygon.id],{silent:!0}),this.changeMode(T.SIMPLE_SELECT,{},{silent:!0})))},be.toDisplayFeatures=function(e,t,n){var r=t.properties.id===e.polygon.id;if(t.properties.active=r?j.ACTIVE:j.INACTIVE,!r)return n(t);if(t.geometry.coordinates.length!==0){var o=t.geometry.coordinates[0].length;if(!(o<3)){if(t.properties.meta=B.FEATURE,n(Le(e.polygon.id,t.geometry.coordinates[0][0],"0.0",!1)),o>3){var i=t.geometry.coordinates[0].length-3;n(Le(e.polygon.id,t.geometry.coordinates[0][i],"0."+i,!1))}if(o<=4){var a=[[t.geometry.coordinates[0][0][0],t.geometry.coordinates[0][0][1]],[t.geometry.coordinates[0][1][0],t.geometry.coordinates[0][1][1]]];if(n({type:m.FEATURE,properties:t.properties,geometry:{coordinates:a,type:m.LINE_STRING}}),o===3)return}return n(t)}}},be.onTrash=function(e){this.deleteFeature([e.polygon.id],{silent:!0}),this.changeMode(T.SIMPLE_SELECT)};var Ee={onSetup:function(e){var t,n,r=(e=e||{}).featureId,o="forward";if(r){if(!(t=this.getFeature(r)))throw new Error("Could not find a feature with the provided featureId");var i=e.from;if(i&&i.type==="Feature"&&i.geometry&&i.geometry.type==="Point"&&(i=i.geometry),i&&i.type==="Point"&&i.coordinates&&i.coordinates.length===2&&(i=i.coordinates),!i||!Array.isArray(i))throw new Error("Please use the `from` property to indicate which point to continue the line from");var a=t.coordinates.length-1;if(t.coordinates[a][0]===i[0]&&t.coordinates[a][1]===i[1])n=a+1,t.addCoordinate.apply(t,[n].concat(t.coordinates[a]));else{if(t.coordinates[0][0]!==i[0]||t.coordinates[0][1]!==i[1])throw new Error("`from` should match the point at either the start or the end of the provided LineString");o="backwards",n=0,t.addCoordinate.apply(t,[n].concat(t.coordinates[0]))}}else t=this.newFeature({type:m.FEATURE,properties:{},geometry:{type:m.LINE_STRING,coordinates:[]}}),n=0,this.addFeature(t);return this.clearSelectedFeatures(),ee.disable(this),this.updateUIClasses({mouse:N.ADD}),this.activateUIButton(Y.LINE),this.setActionableState({trash:!0}),{line:t,currentVertexPosition:n,direction:o}},clickAnywhere:function(e,t){if(e.currentVertexPosition>0&&it(t,e.line.coordinates[e.currentVertexPosition-1])||e.direction==="backwards"&&it(t,e.line.coordinates[e.currentVertexPosition+1]))return this.changeMode(T.SIMPLE_SELECT,{featureIds:[e.line.id]});this.updateUIClasses({mouse:N.ADD}),e.line.updateCoordinate(e.currentVertexPosition,t.lngLat.lng,t.lngLat.lat),e.direction==="forward"?(e.currentVertexPosition++,e.line.updateCoordinate(e.currentVertexPosition,t.lngLat.lng,t.lngLat.lat)):e.line.addCoordinate(0,t.lngLat.lng,t.lngLat.lat)},clickOnVertex:function(e){return this.changeMode(T.SIMPLE_SELECT,{featureIds:[e.line.id]})},onMouseMove:function(e,t){e.line.updateCoordinate(e.currentVertexPosition,t.lngLat.lng,t.lngLat.lat),ke(t)&&this.updateUIClasses({mouse:N.POINTER})}};Ee.onTap=Ee.onClick=function(e,t){if(ke(t))return this.clickOnVertex(e,t);this.clickAnywhere(e,t)},Ee.onKeyUp=function(e,t){We(t)?this.changeMode(T.SIMPLE_SELECT,{featureIds:[e.line.id]}):Ze(t)&&(this.deleteFeature([e.line.id],{silent:!0}),this.changeMode(T.SIMPLE_SELECT))},Ee.onStop=function(e){ee.enable(this),this.activateUIButton(),this.getFeature(e.line.id)!==void 0&&(e.line.removeCoordinate(""+e.currentVertexPosition),e.line.isValid()?this.map.fire(H.CREATE,{features:[e.line.toGeoJSON()]}):(this.deleteFeature([e.line.id],{silent:!0}),this.changeMode(T.SIMPLE_SELECT,{},{silent:!0})))},Ee.onTrash=function(e){this.deleteFeature([e.line.id],{silent:!0}),this.changeMode(T.SIMPLE_SELECT)},Ee.toDisplayFeatures=function(e,t,n){var r=t.properties.id===e.line.id;if(t.properties.active=r?j.ACTIVE:j.INACTIVE,!r)return n(t);t.geometry.coordinates.length<2||(t.properties.meta=B.FEATURE,n(Le(e.line.id,t.geometry.coordinates[e.direction==="forward"?t.geometry.coordinates.length-2:1],""+(e.direction==="forward"?t.geometry.coordinates.length-2:1),!1)),n(t))};var vn={simple_select:D,direct_select:fe,draw_point:ne,draw_polygon:be,draw_line_string:Ee},xr={defaultMode:T.SIMPLE_SELECT,keybindings:!0,touchEnabled:!0,clickBuffer:2,touchBuffer:25,boxSelect:!0,displayControlsDefault:!0,styles:an,modes:vn,controls:{},userProperties:!1},Mr={point:!0,line_string:!0,polygon:!0,trash:!0,combine_features:!0,uncombine_features:!0},Lr={point:!1,line_string:!1,polygon:!1,trash:!1,combine_features:!1,uncombine_features:!1};function mn(e,t){return e.map(function(n){return n.source?n:pe(n,{id:n.id+"."+t,source:t==="hot"?X.HOT:X.COLD})})}var kt={exports:{}};(function(e,t){var n="__lodash_hash_undefined__",r=9007199254740991,o="[object Arguments]",i="[object Array]",a="[object Boolean]",l="[object Date]",d="[object Error]",h="[object Function]",g="[object Map]",p="[object Number]",_="[object Object]",A="[object Promise]",b="[object RegExp]",F="[object Set]",c="[object String]",y="[object Symbol]",O="[object WeakMap]",V="[object ArrayBuffer]",w="[object DataView]",Ut=/^\[object .+?Constructor\]$/,Fr=/^(?:0|[1-9]\d*)$/,M={};M["[object Float32Array]"]=M["[object Float64Array]"]=M["[object Int8Array]"]=M["[object Int16Array]"]=M["[object Int32Array]"]=M["[object Uint8Array]"]=M["[object Uint8ClampedArray]"]=M["[object Uint16Array]"]=M["[object Uint32Array]"]=!0,M[o]=M[i]=M[V]=M[a]=M[w]=M[l]=M[d]=M[h]=M[g]=M[p]=M[_]=M[b]=M[F]=M[c]=M[O]=!1;var En=typeof Re.commonjsGlobal=="object"&&Re.commonjsGlobal&&Re.commonjsGlobal.Object===Object&&Re.commonjsGlobal,wr=typeof self=="object"&&self&&self.Object===Object&&self,ae=En||wr||Function("return this")(),Tn=t&&!t.nodeType&&t,Cn=Tn&&e&&!e.nodeType&&e,On=Cn&&Cn.exports===Tn,jt=On&&En.process,Sn=function(){try{return jt&&jt.binding&&jt.binding("util")}catch{}}(),In=Sn&&Sn.isTypedArray;function Rr(s,u){for(var f=-1,v=s==null?0:s.length;++f<v;)if(u(s[f],f,s))return!0;return!1}function Dr(s){var u=-1,f=Array(s.size);return s.forEach(function(v,L){f[++u]=[L,v]}),f}function kr(s){var u=-1,f=Array(s.size);return s.forEach(function(v){f[++u]=v}),f}var xn,Mn,Ln,Ur=Array.prototype,jr=Function.prototype,st=Object.prototype,Vt=ae["__core-js_shared__"],Nn=jr.toString,re=st.hasOwnProperty,An=(xn=/[^.]+$/.exec(Vt&&Vt.keys&&Vt.keys.IE_PROTO||""))?"Symbol(src)_1."+xn:"",Pn=st.toString,Vr=RegExp("^"+Nn.call(re).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Fn=On?ae.Buffer:void 0,ut=ae.Symbol,wn=ae.Uint8Array,Rn=st.propertyIsEnumerable,Br=Ur.splice,Te=ut?ut.toStringTag:void 0,Dn=Object.getOwnPropertySymbols,Gr=Fn?Fn.isBuffer:void 0,Jr=(Mn=Object.keys,Ln=Object,function(s){return Mn(Ln(s))}),Bt=Ae(ae,"DataView"),Ue=Ae(ae,"Map"),Gt=Ae(ae,"Promise"),Jt=Ae(ae,"Set"),zt=Ae(ae,"WeakMap"),je=Ae(Object,"create"),zr=Se(Bt),Yr=Se(Ue),$r=Se(Gt),qr=Se(Jt),Hr=Se(zt),kn=ut?ut.prototype:void 0,Yt=kn?kn.valueOf:void 0;function Ce(s){var u=-1,f=s==null?0:s.length;for(this.clear();++u<f;){var v=s[u];this.set(v[0],v[1])}}function se(s){var u=-1,f=s==null?0:s.length;for(this.clear();++u<f;){var v=s[u];this.set(v[0],v[1])}}function Oe(s){var u=-1,f=s==null?0:s.length;for(this.clear();++u<f;){var v=s[u];this.set(v[0],v[1])}}function ct(s){var u=-1,f=s==null?0:s.length;for(this.__data__=new Oe;++u<f;)this.add(s[u])}function he(s){var u=this.__data__=new se(s);this.size=u.size}function Xr(s,u){var f=pt(s),v=!f&&eo(s),L=!f&&!v&&$t(s),C=!f&&!v&&!L&&$n(s),P=f||v||L||C,R=P?function(U,oe){for(var ue=-1,z=Array(U);++ue<U;)z[ue]=oe(ue);return z}(s.length,String):[],te=R.length;for(var k in s)!u&&!re.call(s,k)||P&&(k=="length"||L&&(k=="offset"||k=="parent")||C&&(k=="buffer"||k=="byteLength"||k=="byteOffset")||Qr(k,te))||R.push(k);return R}function lt(s,u){for(var f=s.length;f--;)if(Gn(s[f][0],u))return f;return-1}function Ve(s){return s==null?s===void 0?"[object Undefined]":"[object Null]":Te&&Te in Object(s)?function(u){var f=re.call(u,Te),v=u[Te];try{u[Te]=void 0;var L=!0}catch{}var C=Pn.call(u);return L&&(f?u[Te]=v:delete u[Te]),C}(s):function(u){return Pn.call(u)}(s)}function Un(s){return Be(s)&&Ve(s)==o}function jn(s,u,f,v,L){return s===u||(s==null||u==null||!Be(s)&&!Be(u)?s!=s&&u!=u:function(C,P,R,te,k,U){var oe=pt(C),ue=pt(P),z=oe?i:ge(C),ce=ue?i:ge(P),Pe=(z=z==o?_:z)==_,ft=(ce=ce==o?_:ce)==_,Fe=z==ce;if(Fe&&$t(C)){if(!$t(P))return!1;oe=!0,Pe=!1}if(Fe&&!Pe)return U||(U=new he),oe||$n(C)?Vn(C,P,R,te,k,U):function(I,S,ht,ye,qt,Q,le){switch(ht){case w:if(I.byteLength!=S.byteLength||I.byteOffset!=S.byteOffset)return!1;I=I.buffer,S=S.buffer;case V:return!(I.byteLength!=S.byteLength||!Q(new wn(I),new wn(S)));case a:case l:case p:return Gn(+I,+S);case d:return I.name==S.name&&I.message==S.message;case b:case c:return I==S+"";case g:var ve=Dr;case F:var Je=1&ye;if(ve||(ve=kr),I.size!=S.size&&!Je)return!1;var gt=le.get(I);if(gt)return gt==S;ye|=2,le.set(I,S);var we=Vn(ve(I),ve(S),ye,qt,Q,le);return le.delete(I),we;case y:if(Yt)return Yt.call(I)==Yt.call(S)}return!1}(C,P,z,R,te,k,U);if(!(1&R)){var Ge=Pe&&re.call(C,"__wrapped__"),qn=ft&&re.call(P,"__wrapped__");if(Ge||qn){var no=Ge?C.value():C,ro=qn?P.value():P;return U||(U=new he),k(no,ro,R,te,U)}}return Fe?(U||(U=new he),function(I,S,ht,ye,qt,Q){var le=1&ht,ve=Bn(I),Je=ve.length,gt=Bn(S).length;if(Je!=gt&&!le)return!1;for(var we=Je;we--;){var Ie=ve[we];if(!(le?Ie in S:re.call(S,Ie)))return!1}var Hn=Q.get(I);if(Hn&&Q.get(S))return Hn==S;var yt=!0;Q.set(I,S),Q.set(S,I);for(var Ht=le;++we<Je;){var vt=I[Ie=ve[we]],mt=S[Ie];if(ye)var Xn=le?ye(mt,vt,Ie,S,I,Q):ye(vt,mt,Ie,I,S,Q);if(!(Xn===void 0?vt===mt||qt(vt,mt,ht,ye,Q):Xn)){yt=!1;break}Ht||(Ht=Ie=="constructor")}if(yt&&!Ht){var _t=I.constructor,bt=S.constructor;_t==bt||!("constructor"in I)||!("constructor"in S)||typeof _t=="function"&&_t instanceof _t&&typeof bt=="function"&&bt instanceof bt||(yt=!1)}return Q.delete(I),Q.delete(S),yt}(C,P,R,te,k,U)):!1}(s,u,f,v,jn,L))}function Zr(s){return!(!Yn(s)||function(u){return!!An&&An in u}(s))&&(Jn(s)?Vr:Ut).test(Se(s))}function Wr(s){if(f=(u=s)&&u.constructor,v=typeof f=="function"&&f.prototype||st,u!==v)return Jr(s);var u,f,v,L=[];for(var C in Object(s))re.call(s,C)&&C!="constructor"&&L.push(C);return L}function Vn(s,u,f,v,L,C){var P=1&f,R=s.length,te=u.length;if(R!=te&&!(P&&te>R))return!1;var k=C.get(s);if(k&&C.get(u))return k==u;var U=-1,oe=!0,ue=2&f?new ct:void 0;for(C.set(s,u),C.set(u,s);++U<R;){var z=s[U],ce=u[U];if(v)var Pe=P?v(ce,z,U,u,s,C):v(z,ce,U,s,u,C);if(Pe!==void 0){if(Pe)continue;oe=!1;break}if(ue){if(!Rr(u,function(ft,Fe){if(Ge=Fe,!ue.has(Ge)&&(z===ft||L(z,ft,f,v,C)))return ue.push(Fe);var Ge})){oe=!1;break}}else if(z!==ce&&!L(z,ce,f,v,C)){oe=!1;break}}return C.delete(s),C.delete(u),oe}function Bn(s){return function(u,f,v){var L=f(u);return pt(u)?L:function(C,P){for(var R=-1,te=P.length,k=C.length;++R<te;)C[k+R]=P[R];return C}(L,v(u))}(s,to,Kr)}function dt(s,u){var f,v,L=s.__data__;return((v=typeof(f=u))=="string"||v=="number"||v=="symbol"||v=="boolean"?f!=="__proto__":f===null)?L[typeof u=="string"?"string":"hash"]:L.map}function Ae(s,u){var f=function(v,L){return v==null?void 0:v[L]}(s,u);return Zr(f)?f:void 0}Ce.prototype.clear=function(){this.__data__=je?je(null):{},this.size=0},Ce.prototype.delete=function(s){var u=this.has(s)&&delete this.__data__[s];return this.size-=u?1:0,u},Ce.prototype.get=function(s){var u=this.__data__;if(je){var f=u[s];return f===n?void 0:f}return re.call(u,s)?u[s]:void 0},Ce.prototype.has=function(s){var u=this.__data__;return je?u[s]!==void 0:re.call(u,s)},Ce.prototype.set=function(s,u){var f=this.__data__;return this.size+=this.has(s)?0:1,f[s]=je&&u===void 0?n:u,this},se.prototype.clear=function(){this.__data__=[],this.size=0},se.prototype.delete=function(s){var u=this.__data__,f=lt(u,s);return!(f<0)&&(f==u.length-1?u.pop():Br.call(u,f,1),--this.size,!0)},se.prototype.get=function(s){var u=this.__data__,f=lt(u,s);return f<0?void 0:u[f][1]},se.prototype.has=function(s){return lt(this.__data__,s)>-1},se.prototype.set=function(s,u){var f=this.__data__,v=lt(f,s);return v<0?(++this.size,f.push([s,u])):f[v][1]=u,this},Oe.prototype.clear=function(){this.size=0,this.__data__={hash:new Ce,map:new(Ue||se),string:new Ce}},Oe.prototype.delete=function(s){var u=dt(this,s).delete(s);return this.size-=u?1:0,u},Oe.prototype.get=function(s){return dt(this,s).get(s)},Oe.prototype.has=function(s){return dt(this,s).has(s)},Oe.prototype.set=function(s,u){var f=dt(this,s),v=f.size;return f.set(s,u),this.size+=f.size==v?0:1,this},ct.prototype.add=ct.prototype.push=function(s){return this.__data__.set(s,n),this},ct.prototype.has=function(s){return this.__data__.has(s)},he.prototype.clear=function(){this.__data__=new se,this.size=0},he.prototype.delete=function(s){var u=this.__data__,f=u.delete(s);return this.size=u.size,f},he.prototype.get=function(s){return this.__data__.get(s)},he.prototype.has=function(s){return this.__data__.has(s)},he.prototype.set=function(s,u){var f=this.__data__;if(f instanceof se){var v=f.__data__;if(!Ue||v.length<199)return v.push([s,u]),this.size=++f.size,this;f=this.__data__=new Oe(v)}return f.set(s,u),this.size=f.size,this};var Kr=Dn?function(s){return s==null?[]:(s=Object(s),function(u,f){for(var v=-1,L=u==null?0:u.length,C=0,P=[];++v<L;){var R=u[v];f(R,v,u)&&(P[C++]=R)}return P}(Dn(s),function(u){return Rn.call(s,u)}))}:function(){return[]},ge=Ve;function Qr(s,u){return!!(u=u??r)&&(typeof s=="number"||Fr.test(s))&&s>-1&&s%1==0&&s<u}function Se(s){if(s!=null){try{return Nn.call(s)}catch{}try{return s+""}catch{}}return""}function Gn(s,u){return s===u||s!=s&&u!=u}(Bt&&ge(new Bt(new ArrayBuffer(1)))!=w||Ue&&ge(new Ue)!=g||Gt&&ge(Gt.resolve())!=A||Jt&&ge(new Jt)!=F||zt&&ge(new zt)!=O)&&(ge=function(s){var u=Ve(s),f=u==_?s.constructor:void 0,v=f?Se(f):"";if(v)switch(v){case zr:return w;case Yr:return g;case $r:return A;case qr:return F;case Hr:return O}return u});var eo=Un(function(){return arguments}())?Un:function(s){return Be(s)&&re.call(s,"callee")&&!Rn.call(s,"callee")},pt=Array.isArray,$t=Gr||function(){return!1};function Jn(s){if(!Yn(s))return!1;var u=Ve(s);return u==h||u=="[object GeneratorFunction]"||u=="[object AsyncFunction]"||u=="[object Proxy]"}function zn(s){return typeof s=="number"&&s>-1&&s%1==0&&s<=r}function Yn(s){var u=typeof s;return s!=null&&(u=="object"||u=="function")}function Be(s){return s!=null&&typeof s=="object"}var $n=In?function(s){return function(u){return s(u)}}(In):function(s){return Be(s)&&zn(s.length)&&!!M[Ve(s)]};function to(s){return(u=s)!=null&&zn(u.length)&&!Jn(u)?Xr(s):Wr(s);var u}e.exports=function(s,u){return jn(s,u)}})(kt,kt.exports);var _n=de(kt.exports);function bn(e,t){return e.length===t.length&&JSON.stringify(e.map(function(n){return n}).sort())===JSON.stringify(t.map(function(n){return n}).sort())}var Nr={Polygon:W,LineString:ie,Point:me,MultiPolygon:$,MultiLineString:$,MultiPoint:$},Ar=Object.freeze({__proto__:null,CommonSelectors:dr,constrainFeatureMovement:Rt,createMidPoint:un,createSupplementaryPoints:Ke,createVertex:Le,doubleClickZoom:ee,euclideanDistance:It,featuresAt:xe,getFeatureAtAndSetCursors:Ye,isClick:xt,isEventAtCoordinates:it,isTap:Mt,mapEventToBoundingBox:en,ModeHandler:ze,moveFeatures:Dt,sortFeatures:Qt,stringSetsAreEqual:bn,StringSet:Z,theme:an,toDenseArray:De}),Pr=function(e,t){var n={options:e=function(o){o===void 0&&(o={});var i=pe(o);return o.controls||(i.controls={}),o.displayControlsDefault===!1?i.controls=pe(Lr,o.controls):i.controls=pe(Mr,o.controls),(i=pe(xr,i)).styles=mn(i.styles,"cold").concat(mn(i.styles,"hot")),i}(e)};t=function(o,i){return i.modes=T,i.getFeatureIdsAt=function(a){return xe.click({point:a},null,o).map(function(l){return l.properties.id})},i.getSelectedIds=function(){return o.store.getSelectedIds()},i.getSelected=function(){return{type:m.FEATURE_COLLECTION,features:o.store.getSelectedIds().map(function(a){return o.store.get(a)}).map(function(a){return a.toGeoJSON()})}},i.getSelectedPoints=function(){return{type:m.FEATURE_COLLECTION,features:o.store.getSelectedCoordinates().map(function(a){return{type:m.FEATURE,properties:{},geometry:{type:m.POINT,coordinates:a.coordinates}}})}},i.set=function(a){if(a.type===void 0||a.type!==m.FEATURE_COLLECTION||!Array.isArray(a.features))throw new Error("Invalid FeatureCollection");var l=o.store.createRenderBatch(),d=o.store.getAllIds().slice(),h=i.add(a),g=new Z(h);return(d=d.filter(function(p){return!g.has(p)})).length&&i.delete(d),l(),h},i.add=function(a){var l=JSON.parse(JSON.stringify(gr(a))).features.map(function(d){if(d.id=d.id||Nt(),d.geometry===null)throw new Error("Invalid geometry: null");if(o.store.get(d.id)===void 0||o.store.get(d.id).type!==d.geometry.type){var h=Nr[d.geometry.type];if(h===void 0)throw new Error("Invalid geometry type: "+d.geometry.type+".");var g=new h(o,d);o.store.add(g)}else{var p=o.store.get(d.id);p.properties=d.properties,_n(p.properties,d.properties)||o.store.featureChanged(p.id),_n(p.getCoordinates(),d.geometry.coordinates)||p.incomingCoords(d.geometry.coordinates)}return d.id});return o.store.render(),l},i.get=function(a){var l=o.store.get(a);if(l)return l.toGeoJSON()},i.getAll=function(){return{type:m.FEATURE_COLLECTION,features:o.store.getAll().map(function(a){return a.toGeoJSON()})}},i.delete=function(a){return o.store.delete(a,{silent:!0}),i.getMode()!==T.DIRECT_SELECT||o.store.getSelectedIds().length?o.store.render():o.events.changeMode(T.SIMPLE_SELECT,void 0,{silent:!0}),i},i.deleteAll=function(){return o.store.delete(o.store.getAllIds(),{silent:!0}),i.getMode()===T.DIRECT_SELECT?o.events.changeMode(T.SIMPLE_SELECT,void 0,{silent:!0}):o.store.render(),i},i.changeMode=function(a,l){return l===void 0&&(l={}),a===T.SIMPLE_SELECT&&i.getMode()===T.SIMPLE_SELECT?(bn(l.featureIds||[],o.store.getSelectedIds())||(o.store.setSelected(l.featureIds,{silent:!0}),o.store.render()),i):(a===T.DIRECT_SELECT&&i.getMode()===T.DIRECT_SELECT&&l.featureId===o.store.getSelectedIds()[0]||o.events.changeMode(a,l,{silent:!0}),i)},i.getMode=function(){return o.events.getMode()},i.trash=function(){return o.events.trash({silent:!0}),i},i.combineFeatures=function(){return o.events.combineFeatures({silent:!0}),i},i.uncombineFeatures=function(){return o.events.uncombineFeatures({silent:!0}),i},i.setFeatureProperty=function(a,l,d){return o.store.setFeatureProperty(a,l,d),i},i}(n,t),n.api=t;var r=lr(n);return t.onAdd=r.onAdd,t.onRemove=r.onRemove,t.types=Y,t.options=e,t};function at(e){Pr(e,this)}return at.modes=vn,at.constants=er,at.lib=Ar,at})})(Zn.__module);var oo=Zn.__module.exports;const io=Re.getDefaultExportFromCjs(oo);module.exports=io;
2
+ //# sourceMappingURL=index.cjs10.js.map