@performant-software/geospatial 2.2.18 → 2.2.19-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 (295) hide show
  1. package/dist/index.cjs100.js +1 -1
  2. package/dist/index.cjs101.js +1 -1
  3. package/dist/index.cjs102.js +1 -1
  4. package/dist/index.cjs107.js +1 -1
  5. package/dist/index.cjs108.js +1 -1
  6. package/dist/index.cjs109.js +1 -1
  7. package/dist/index.cjs110.js +1 -1
  8. package/dist/index.cjs113.js +1 -1
  9. package/dist/index.cjs114.js +1 -1
  10. package/dist/index.cjs115.js +1 -1
  11. package/dist/index.cjs119.js +1 -1
  12. package/dist/index.cjs122.js +1 -1
  13. package/dist/index.cjs126.js +1 -1
  14. package/dist/index.cjs129.js +1 -1
  15. package/dist/index.cjs137.js +1 -1
  16. package/dist/index.cjs138.js +1 -1
  17. package/dist/index.cjs139.js +1 -1
  18. package/dist/index.cjs14.js +1 -1
  19. package/dist/index.cjs140.js +1 -1
  20. package/dist/index.cjs141.js +1 -1
  21. package/dist/index.cjs142.js +1 -1
  22. package/dist/index.cjs143.js +1 -1
  23. package/dist/index.cjs145.js +1 -1
  24. package/dist/index.cjs146.js +1 -1
  25. package/dist/index.cjs147.js +1 -1
  26. package/dist/index.cjs148.js +1 -1
  27. package/dist/index.cjs149.js +1 -1
  28. package/dist/index.cjs150.js +1 -1
  29. package/dist/index.cjs151.js +1 -1
  30. package/dist/index.cjs152.js +1 -1
  31. package/dist/index.cjs153.js +1 -1
  32. package/dist/index.cjs156.js +1 -1
  33. package/dist/index.cjs157.js +1 -1
  34. package/dist/index.cjs159.js +1 -1
  35. package/dist/index.cjs160.js +1 -1
  36. package/dist/index.cjs161.js +1 -1
  37. package/dist/index.cjs162.js +1 -1
  38. package/dist/index.cjs163.js +1 -1
  39. package/dist/index.cjs164.js +1 -1
  40. package/dist/index.cjs165.js +1 -1
  41. package/dist/index.cjs166.js +1 -1
  42. package/dist/index.cjs172.js +1 -1
  43. package/dist/index.cjs173.js +1 -1
  44. package/dist/index.cjs174.js +1 -1
  45. package/dist/index.cjs175.js +1 -1
  46. package/dist/index.cjs176.js +1 -1
  47. package/dist/index.cjs179.js +1 -1
  48. package/dist/index.cjs182.js +1 -1
  49. package/dist/index.cjs19.js +1 -1
  50. package/dist/index.cjs204.js +1 -1
  51. package/dist/index.cjs204.js.map +1 -1
  52. package/dist/index.cjs205.js +1 -1
  53. package/dist/index.cjs205.js.map +1 -1
  54. package/dist/index.cjs206.js +1 -1
  55. package/dist/index.cjs206.js.map +1 -1
  56. package/dist/index.cjs207.js +1 -1
  57. package/dist/index.cjs207.js.map +1 -1
  58. package/dist/index.cjs208.js +1 -1
  59. package/dist/index.cjs208.js.map +1 -1
  60. package/dist/index.cjs209.js +1 -1
  61. package/dist/index.cjs209.js.map +1 -1
  62. package/dist/index.cjs210.js +1 -1
  63. package/dist/index.cjs210.js.map +1 -1
  64. package/dist/index.cjs211.js +1 -1
  65. package/dist/index.cjs211.js.map +1 -1
  66. package/dist/index.cjs212.js +1 -1
  67. package/dist/index.cjs212.js.map +1 -1
  68. package/dist/index.cjs213.js +1 -1
  69. package/dist/index.cjs213.js.map +1 -1
  70. package/dist/index.cjs214.js +1 -1
  71. package/dist/index.cjs214.js.map +1 -1
  72. package/dist/index.cjs215.js +1 -1
  73. package/dist/index.cjs215.js.map +1 -1
  74. package/dist/index.cjs216.js +1 -1
  75. package/dist/index.cjs216.js.map +1 -1
  76. package/dist/index.cjs217.js +1 -1
  77. package/dist/index.cjs217.js.map +1 -1
  78. package/dist/index.cjs218.js +1 -1
  79. package/dist/index.cjs218.js.map +1 -1
  80. package/dist/index.cjs219.js +1 -1
  81. package/dist/index.cjs219.js.map +1 -1
  82. package/dist/index.cjs220.js +1 -1
  83. package/dist/index.cjs220.js.map +1 -1
  84. package/dist/index.cjs221.js +1 -1
  85. package/dist/index.cjs221.js.map +1 -1
  86. package/dist/index.cjs222.js +1 -1
  87. package/dist/index.cjs222.js.map +1 -1
  88. package/dist/index.cjs223.js +1 -1
  89. package/dist/index.cjs223.js.map +1 -1
  90. package/dist/index.cjs224.js +1 -1
  91. package/dist/index.cjs224.js.map +1 -1
  92. package/dist/index.cjs225.js +1 -1
  93. package/dist/index.cjs225.js.map +1 -1
  94. package/dist/index.cjs226.js +1 -1
  95. package/dist/index.cjs226.js.map +1 -1
  96. package/dist/index.cjs227.js +1 -1
  97. package/dist/index.cjs227.js.map +1 -1
  98. package/dist/index.cjs228.js +1 -1
  99. package/dist/index.cjs228.js.map +1 -1
  100. package/dist/index.cjs229.js +1 -1
  101. package/dist/index.cjs229.js.map +1 -1
  102. package/dist/index.cjs230.js +1 -1
  103. package/dist/index.cjs230.js.map +1 -1
  104. package/dist/index.cjs231.js +1 -1
  105. package/dist/index.cjs231.js.map +1 -1
  106. package/dist/index.cjs232.js +1 -1
  107. package/dist/index.cjs232.js.map +1 -1
  108. package/dist/index.cjs233.js +1 -1
  109. package/dist/index.cjs233.js.map +1 -1
  110. package/dist/index.cjs234.js +1 -1
  111. package/dist/index.cjs235.js +1 -1
  112. package/dist/index.cjs235.js.map +1 -1
  113. package/dist/index.cjs236.js +1 -1
  114. package/dist/index.cjs236.js.map +1 -1
  115. package/dist/index.cjs24.js +1 -1
  116. package/dist/index.cjs26.js +1 -1
  117. package/dist/index.cjs28.js +1 -1
  118. package/dist/index.cjs29.js +1 -1
  119. package/dist/index.cjs30.js +1 -1
  120. package/dist/index.cjs32.js +1 -1
  121. package/dist/index.cjs33.js +1 -1
  122. package/dist/index.cjs34.js +1 -1
  123. package/dist/index.cjs36.js +1 -1
  124. package/dist/index.cjs37.js +1 -1
  125. package/dist/index.cjs38.js +1 -1
  126. package/dist/index.cjs42.js +1 -1
  127. package/dist/index.cjs43.js +1 -1
  128. package/dist/index.cjs44.js +1 -1
  129. package/dist/index.cjs46.js +1 -1
  130. package/dist/index.cjs47.js +1 -1
  131. package/dist/index.cjs49.js +1 -1
  132. package/dist/index.cjs78.js +1 -1
  133. package/dist/index.cjs85.js +1 -1
  134. package/dist/index.cjs86.js +1 -1
  135. package/dist/index.cjs87.js +1 -1
  136. package/dist/index.cjs88.js +1 -1
  137. package/dist/index.cjs89.js +1 -1
  138. package/dist/index.cjs90.js +1 -1
  139. package/dist/index.cjs91.js +1 -1
  140. package/dist/index.cjs92.js +1 -1
  141. package/dist/index.cjs93.js +1 -1
  142. package/dist/index.cjs96.js +1 -1
  143. package/dist/index.cjs97.js +1 -1
  144. package/dist/index.cjs99.js +1 -1
  145. package/dist/index.es100.js +1 -1
  146. package/dist/index.es101.js +2 -2
  147. package/dist/index.es102.js +1 -1
  148. package/dist/index.es107.js +1 -1
  149. package/dist/index.es108.js +1 -1
  150. package/dist/index.es109.js +1 -1
  151. package/dist/index.es110.js +1 -1
  152. package/dist/index.es113.js +2 -2
  153. package/dist/index.es114.js +2 -2
  154. package/dist/index.es115.js +1 -1
  155. package/dist/index.es119.js +2 -2
  156. package/dist/index.es122.js +1 -1
  157. package/dist/index.es126.js +1 -1
  158. package/dist/index.es129.js +1 -1
  159. package/dist/index.es137.js +1 -1
  160. package/dist/index.es138.js +1 -1
  161. package/dist/index.es139.js +1 -1
  162. package/dist/index.es14.js +1 -1
  163. package/dist/index.es140.js +2 -2
  164. package/dist/index.es141.js +1 -1
  165. package/dist/index.es142.js +1 -1
  166. package/dist/index.es143.js +1 -1
  167. package/dist/index.es145.js +2 -2
  168. package/dist/index.es146.js +2 -2
  169. package/dist/index.es147.js +1 -1
  170. package/dist/index.es148.js +1 -1
  171. package/dist/index.es149.js +1 -1
  172. package/dist/index.es150.js +1 -1
  173. package/dist/index.es151.js +2 -2
  174. package/dist/index.es152.js +2 -2
  175. package/dist/index.es153.js +1 -1
  176. package/dist/index.es156.js +2 -2
  177. package/dist/index.es157.js +2 -2
  178. package/dist/index.es159.js +2 -2
  179. package/dist/index.es160.js +1 -1
  180. package/dist/index.es161.js +2 -2
  181. package/dist/index.es162.js +1 -1
  182. package/dist/index.es163.js +2 -2
  183. package/dist/index.es164.js +1 -1
  184. package/dist/index.es165.js +1 -1
  185. package/dist/index.es166.js +1 -1
  186. package/dist/index.es172.js +1 -1
  187. package/dist/index.es173.js +2 -2
  188. package/dist/index.es174.js +1 -1
  189. package/dist/index.es175.js +1 -1
  190. package/dist/index.es176.js +1 -1
  191. package/dist/index.es179.js +1 -1
  192. package/dist/index.es182.js +2 -2
  193. package/dist/index.es19.js +1 -1
  194. package/dist/index.es204.js +46 -2
  195. package/dist/index.es204.js.map +1 -1
  196. package/dist/index.es205.js +22 -7
  197. package/dist/index.es205.js.map +1 -1
  198. package/dist/index.es206.js +2 -5
  199. package/dist/index.es206.js.map +1 -1
  200. package/dist/index.es207.js +8 -4
  201. package/dist/index.es207.js.map +1 -1
  202. package/dist/index.es208.js +5 -3
  203. package/dist/index.es208.js.map +1 -1
  204. package/dist/index.es209.js +4 -3
  205. package/dist/index.es209.js.map +1 -1
  206. package/dist/index.es210.js +3 -9
  207. package/dist/index.es210.js.map +1 -1
  208. package/dist/index.es211.js +3 -22
  209. package/dist/index.es211.js.map +1 -1
  210. package/dist/index.es212.js +8 -21
  211. package/dist/index.es212.js.map +1 -1
  212. package/dist/index.es213.js +19 -11
  213. package/dist/index.es213.js.map +1 -1
  214. package/dist/index.es214.js +19 -14
  215. package/dist/index.es214.js.map +1 -1
  216. package/dist/index.es215.js +13 -5
  217. package/dist/index.es215.js.map +1 -1
  218. package/dist/index.es216.js +16 -8
  219. package/dist/index.es216.js.map +1 -1
  220. package/dist/index.es217.js +5 -6
  221. package/dist/index.es217.js.map +1 -1
  222. package/dist/index.es218.js +7 -20
  223. package/dist/index.es218.js.map +1 -1
  224. package/dist/index.es219.js +5 -8
  225. package/dist/index.es219.js.map +1 -1
  226. package/dist/index.es220.js +22 -9
  227. package/dist/index.es220.js.map +1 -1
  228. package/dist/index.es221.js +10 -4
  229. package/dist/index.es221.js.map +1 -1
  230. package/dist/index.es222.js +9 -11
  231. package/dist/index.es222.js.map +1 -1
  232. package/dist/index.es223.js +4 -9
  233. package/dist/index.es223.js.map +1 -1
  234. package/dist/index.es224.js +9 -21
  235. package/dist/index.es224.js.map +1 -1
  236. package/dist/index.es225.js +8 -11
  237. package/dist/index.es225.js.map +1 -1
  238. package/dist/index.es226.js +22 -18
  239. package/dist/index.es226.js.map +1 -1
  240. package/dist/index.es227.js +12 -4
  241. package/dist/index.es227.js.map +1 -1
  242. package/dist/index.es228.js +17 -16
  243. package/dist/index.es228.js.map +1 -1
  244. package/dist/index.es229.js +4 -12
  245. package/dist/index.es229.js.map +1 -1
  246. package/dist/index.es230.js +17 -3
  247. package/dist/index.es230.js.map +1 -1
  248. package/dist/index.es231.js +11 -4
  249. package/dist/index.es231.js.map +1 -1
  250. package/dist/index.es232.js +3 -45
  251. package/dist/index.es232.js.map +1 -1
  252. package/dist/index.es233.js +4 -22
  253. package/dist/index.es233.js.map +1 -1
  254. package/dist/index.es234.js +1 -1
  255. package/dist/index.es235.js +4 -6
  256. package/dist/index.es235.js.map +1 -1
  257. package/dist/index.es236.js +6 -4
  258. package/dist/index.es236.js.map +1 -1
  259. package/dist/index.es24.js +1 -1
  260. package/dist/index.es26.js +2 -2
  261. package/dist/index.es28.js +2 -2
  262. package/dist/index.es29.js +2 -2
  263. package/dist/index.es30.js +2 -2
  264. package/dist/index.es32.js +1 -1
  265. package/dist/index.es33.js +2 -2
  266. package/dist/index.es34.js +2 -2
  267. package/dist/index.es36.js +1 -1
  268. package/dist/index.es37.js +1 -1
  269. package/dist/index.es38.js +1 -1
  270. package/dist/index.es42.js +2 -2
  271. package/dist/index.es43.js +3 -3
  272. package/dist/index.es44.js +1 -1
  273. package/dist/index.es46.js +1 -1
  274. package/dist/index.es47.js +1 -1
  275. package/dist/index.es49.js +1 -1
  276. package/dist/index.es64.js +2 -2
  277. package/dist/index.es65.js +2 -2
  278. package/dist/index.es78.js +1 -1
  279. package/dist/index.es85.js +1 -1
  280. package/dist/index.es86.js +1 -1
  281. package/dist/index.es87.js +1 -1
  282. package/dist/index.es88.js +1 -1
  283. package/dist/index.es89.js +1 -1
  284. package/dist/index.es90.js +1 -1
  285. package/dist/index.es91.js +1 -1
  286. package/dist/index.es92.js +1 -1
  287. package/dist/index.es93.js +1 -1
  288. package/dist/index.es96.js +1 -1
  289. package/dist/index.es97.js +1 -1
  290. package/dist/index.es99.js +3 -3
  291. package/package.json +1 -1
  292. package/build/index.js +0 -2
  293. package/build/index.js.map +0 -1
  294. package/build/main.css +0 -127
  295. package/types/components/LocationMarker.js.flow +0 -82
@@ -1,49 +1,7 @@
1
- import { deepEqual as c } from "./index.es187.js";
2
- function g(n) {
3
- const o = n.clone();
4
- return o.pixelsToGLUnits = n.pixelsToGLUnits, o;
5
- }
6
- function r(n, o) {
7
- if (!n.getProjection)
8
- return;
9
- const i = n.getProjection(), e = o.getProjection();
10
- c(i, e) || o.setProjection(i);
11
- }
12
- function d(n) {
13
- return {
14
- longitude: n.center.lng,
15
- latitude: n.center.lat,
16
- zoom: n.zoom,
17
- pitch: n.pitch,
18
- bearing: n.bearing,
19
- padding: n.padding
20
- };
21
- }
22
- function s(n, o) {
23
- const i = o.viewState || o;
24
- let e = !1;
25
- if ("longitude" in i && "latitude" in i) {
26
- const t = n.center;
27
- n.center = new t.constructor(i.longitude, i.latitude), e = e || t !== n.center;
28
- }
29
- if ("zoom" in i) {
30
- const t = n.zoom;
31
- n.zoom = i.zoom, e = e || t !== n.zoom;
32
- }
33
- if ("bearing" in i) {
34
- const t = n.bearing;
35
- n.bearing = i.bearing, e = e || t !== n.bearing;
36
- }
37
- if ("pitch" in i) {
38
- const t = n.pitch;
39
- n.pitch = i.pitch, e = e || t !== n.pitch;
40
- }
41
- return i.padding && !n.isPaddingEqual(i.padding) && (e = !0, n.padding = i.padding), e;
1
+ function u(t, e, n) {
2
+ return e in n;
42
3
  }
43
4
  export {
44
- s as applyViewStateToTransform,
45
- g as cloneTransform,
46
- r as syncProjection,
47
- d as transformToViewState
5
+ u as default
48
6
  };
49
7
  //# sourceMappingURL=index.es232.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.es232.js","sources":["../../../node_modules/react-map-gl/dist/esm/utils/transform.js"],"sourcesContent":["import { deepEqual } from './deep-equal';\n/**\n * Make a copy of a transform\n * @param tr\n */\nexport function cloneTransform(tr) {\n const newTransform = tr.clone();\n // Work around mapbox bug - this value is not assigned in clone(), only in resize()\n newTransform.pixelsToGLUnits = tr.pixelsToGLUnits;\n return newTransform;\n}\n/**\n * Copy projection from one transform to another. This only applies to mapbox-gl transforms\n * @param src the transform to copy projection settings from\n * @param dest to transform to copy projection settings to\n */\nexport function syncProjection(src, dest) {\n if (!src.getProjection) {\n return;\n }\n const srcProjection = src.getProjection();\n const destProjection = dest.getProjection();\n if (!deepEqual(srcProjection, destProjection)) {\n dest.setProjection(srcProjection);\n }\n}\n/**\n * Capture a transform's current state\n * @param transform\n * @returns descriptor of the view state\n */\nexport function transformToViewState(tr) {\n return {\n longitude: tr.center.lng,\n latitude: tr.center.lat,\n zoom: tr.zoom,\n pitch: tr.pitch,\n bearing: tr.bearing,\n padding: tr.padding\n };\n}\n/* eslint-disable complexity */\n/**\n * Mutate a transform to match the given view state\n * @param transform\n * @param viewState\n * @returns true if the transform has changed\n */\nexport function applyViewStateToTransform(tr, props) {\n const v = props.viewState || props;\n let changed = false;\n if ('longitude' in v && 'latitude' in v) {\n const center = tr.center;\n // @ts-ignore\n tr.center = new center.constructor(v.longitude, v.latitude);\n changed = changed || center !== tr.center;\n }\n if ('zoom' in v) {\n const zoom = tr.zoom;\n tr.zoom = v.zoom;\n changed = changed || zoom !== tr.zoom;\n }\n if ('bearing' in v) {\n const bearing = tr.bearing;\n tr.bearing = v.bearing;\n changed = changed || bearing !== tr.bearing;\n }\n if ('pitch' in v) {\n const pitch = tr.pitch;\n tr.pitch = v.pitch;\n changed = changed || pitch !== tr.pitch;\n }\n if (v.padding && !tr.isPaddingEqual(v.padding)) {\n changed = true;\n tr.padding = v.padding;\n }\n return changed;\n}\n//# sourceMappingURL=transform.js.map"],"names":["cloneTransform","tr","newTransform","syncProjection","src","dest","srcProjection","destProjection","deepEqual","transformToViewState","applyViewStateToTransform","props","v","changed","center","zoom","bearing","pitch"],"mappings":";AAKO,SAASA,EAAeC,GAAI;AACzB,QAAAC,IAAeD,EAAG;AAExB,SAAAC,EAAa,kBAAkBD,EAAG,iBAC3BC;AACX;AAMgB,SAAAC,EAAeC,GAAKC,GAAM;AAClC,MAAA,CAACD,EAAI;AACL;AAEE,QAAAE,IAAgBF,EAAI,iBACpBG,IAAiBF,EAAK;AAC5B,EAAKG,EAAUF,GAAeC,CAAc,KACxCF,EAAK,cAAcC,CAAa;AAExC;AAMO,SAASG,EAAqBR,GAAI;AAC9B,SAAA;AAAA,IACH,WAAWA,EAAG,OAAO;AAAA,IACrB,UAAUA,EAAG,OAAO;AAAA,IACpB,MAAMA,EAAG;AAAA,IACT,OAAOA,EAAG;AAAA,IACV,SAASA,EAAG;AAAA,IACZ,SAASA,EAAG;AAAA,EAAA;AAEpB;AAQgB,SAAAS,EAA0BT,GAAIU,GAAO;AAC3C,QAAAC,IAAID,EAAM,aAAaA;AAC7B,MAAIE,IAAU;AACV,MAAA,eAAeD,KAAK,cAAcA,GAAG;AACrC,UAAME,IAASb,EAAG;AAElB,IAAAA,EAAG,SAAS,IAAIa,EAAO,YAAYF,EAAE,WAAWA,EAAE,QAAQ,GAChDC,IAAAA,KAAWC,MAAWb,EAAG;AAAA,EACvC;AACA,MAAI,UAAUW,GAAG;AACb,UAAMG,IAAOd,EAAG;AAChB,IAAAA,EAAG,OAAOW,EAAE,MACFC,IAAAA,KAAWE,MAASd,EAAG;AAAA,EACrC;AACA,MAAI,aAAaW,GAAG;AAChB,UAAMI,IAAUf,EAAG;AACnB,IAAAA,EAAG,UAAUW,EAAE,SACLC,IAAAA,KAAWG,MAAYf,EAAG;AAAA,EACxC;AACA,MAAI,WAAWW,GAAG;AACd,UAAMK,IAAQhB,EAAG;AACjB,IAAAA,EAAG,QAAQW,EAAE,OACHC,IAAAA,KAAWI,MAAUhB,EAAG;AAAA,EACtC;AACA,SAAIW,EAAE,WAAW,CAACX,EAAG,eAAeW,EAAE,OAAO,MAC/BC,IAAA,IACVZ,EAAG,UAAUW,EAAE,UAEZC;AACX;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"index.es232.js","sources":["../../../node_modules/underscore/modules/_keyInObj.js"],"sourcesContent":["// Internal `_.pick` helper function to determine whether `key` is an enumerable\n// property name of `obj`.\nexport default function keyInObj(value, key, obj) {\n return key in obj;\n}\n"],"names":["keyInObj","value","key","obj"],"mappings":"AAEwB,SAAAA,EAASC,GAAOC,GAAKC,GAAK;AAChD,SAAOD,KAAOC;AAChB;","x_google_ignoreList":[0]}
@@ -1,26 +1,8 @@
1
- const a = ["type", "source", "source-layer", "minzoom", "maxzoom", "filter", "layout"];
2
- function c(r) {
3
- if (!r)
4
- return null;
5
- if (typeof r == "string" || ("toJS" in r && (r = r.toJS()), !r.layers))
6
- return r;
7
- const t = {};
8
- for (const e of r.layers)
9
- t[e.id] = e;
10
- const f = r.layers.map((e) => {
11
- let n = null;
12
- "interactive" in e && (n = Object.assign({}, e), delete n.interactive);
13
- const o = t[e.ref];
14
- if (o) {
15
- n = n || Object.assign({}, e), delete n.ref;
16
- for (const i of a)
17
- i in o && (n[i] = o[i]);
18
- }
19
- return n || e;
20
- });
21
- return { ...r, layers: f };
1
+ import a from "./index.es27.js";
2
+ function r(t, n) {
3
+ return t._chain ? a(n).chain() : n;
22
4
  }
23
5
  export {
24
- c as normalizeStyle
6
+ r as default
25
7
  };
26
8
  //# sourceMappingURL=index.es233.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.es233.js","sources":["../../../node_modules/react-map-gl/dist/esm/utils/style-utils.js"],"sourcesContent":["const refProps = ['type', 'source', 'source-layer', 'minzoom', 'maxzoom', 'filter', 'layout'];\n// Prepare a map style object for diffing\n// If immutable - convert to plain object\n// Work around some issues in older styles that would fail Mapbox's diffing\nexport function normalizeStyle(style) {\n if (!style) {\n return null;\n }\n if (typeof style === 'string') {\n return style;\n }\n if ('toJS' in style) {\n style = style.toJS();\n }\n if (!style.layers) {\n return style;\n }\n const layerIndex = {};\n for (const layer of style.layers) {\n layerIndex[layer.id] = layer;\n }\n const layers = style.layers.map(layer => {\n let normalizedLayer = null;\n if ('interactive' in layer) {\n normalizedLayer = Object.assign({}, layer);\n // Breaks style diffing :(\n // @ts-ignore legacy field not typed\n delete normalizedLayer.interactive;\n }\n // Style diffing doesn't work with refs so expand them out manually before diffing.\n // @ts-ignore legacy field not typed\n const layerRef = layerIndex[layer.ref];\n if (layerRef) {\n normalizedLayer = normalizedLayer || Object.assign({}, layer);\n // @ts-ignore\n delete normalizedLayer.ref;\n // https://github.com/mapbox/mapbox-gl-js/blob/master/src/style-spec/deref.js\n for (const propName of refProps) {\n if (propName in layerRef) {\n normalizedLayer[propName] = layerRef[propName];\n }\n }\n }\n return normalizedLayer || layer;\n });\n // Do not mutate the style object provided by the user\n return { ...style, layers };\n}\n//# sourceMappingURL=style-utils.js.map"],"names":["refProps","normalizeStyle","style","layerIndex","layer","layers","normalizedLayer","layerRef","propName"],"mappings":"AAAA,MAAMA,IAAW,CAAC,QAAQ,UAAU,gBAAgB,WAAW,WAAW,UAAU,QAAQ;AAIrF,SAASC,EAAeC,GAAO;AAClC,MAAI,CAACA;AACM,WAAA;AAQP,MANA,OAAOA,KAAU,aAGjB,UAAUA,MACVA,IAAQA,EAAM,SAEd,CAACA,EAAM;AACA,WAAAA;AAEX,QAAMC,IAAa,CAAA;AACR,aAAAC,KAASF,EAAM;AACX,IAAAC,EAAAC,EAAM,EAAE,IAAIA;AAE3B,QAAMC,IAASH,EAAM,OAAO,IAAI,CAASE,MAAA;AACrC,QAAIE,IAAkB;AACtB,IAAI,iBAAiBF,MACjBE,IAAkB,OAAO,OAAO,CAAC,GAAGF,CAAK,GAGzC,OAAOE,EAAgB;AAIrB,UAAAC,IAAWJ,EAAWC,EAAM,GAAG;AACrC,QAAIG,GAAU;AACV,MAAAD,IAAkBA,KAAmB,OAAO,OAAO,IAAIF,CAAK,GAE5D,OAAOE,EAAgB;AAEvB,iBAAWE,KAAYR;AACnB,QAAIQ,KAAYD,MACID,EAAAE,CAAQ,IAAID,EAASC,CAAQ;AAAA,IAGzD;AACA,WAAOF,KAAmBF;AAAA,EAAA,CAC7B;AAEM,SAAA,EAAE,GAAGF,GAAO,QAAAG;AACvB;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"index.es233.js","sources":["../../../node_modules/underscore/modules/_chainResult.js"],"sourcesContent":["import _ from './underscore.js';\n\n// Helper function to continue chaining intermediate results.\nexport default function chainResult(instance, obj) {\n return instance._chain ? _(obj).chain() : obj;\n}\n"],"names":["chainResult","instance","obj","_"],"mappings":";AAGwB,SAAAA,EAAYC,GAAUC,GAAK;AACjD,SAAOD,EAAS,SAASE,EAAED,CAAG,EAAE,MAAU,IAAAA;AAC5C;","x_google_ignoreList":[0]}
@@ -1,4 +1,4 @@
1
- import t from "./index.es205.js";
1
+ import t from "./index.es207.js";
2
2
  const a = t("Object");
3
3
  export {
4
4
  a as default
@@ -1,11 +1,9 @@
1
- import { MAX_ARRAY_INDEX as o } from "./index.es23.js";
2
- function u(e) {
3
- return function(t) {
4
- var r = e(t);
5
- return typeof r == "number" && r >= 0 && r <= o;
1
+ function t(r) {
2
+ return function(n) {
3
+ return n == null ? void 0 : n[r];
6
4
  };
7
5
  }
8
6
  export {
9
- u as default
7
+ t as default
10
8
  };
11
9
  //# sourceMappingURL=index.es235.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.es235.js","sources":["../../../node_modules/underscore/modules/_createSizePropertyCheck.js"],"sourcesContent":["import { MAX_ARRAY_INDEX } from './_setup.js';\n\n// Common internal logic for `isArrayLike` and `isBufferLike`.\nexport default function createSizePropertyCheck(getSizeProperty) {\n return function(collection) {\n var sizeProperty = getSizeProperty(collection);\n return typeof sizeProperty == 'number' && sizeProperty >= 0 && sizeProperty <= MAX_ARRAY_INDEX;\n }\n}\n"],"names":["createSizePropertyCheck","getSizeProperty","collection","sizeProperty","MAX_ARRAY_INDEX"],"mappings":";AAGA,SAAwBA,EAAwBC,GAAiB;AAC/D,SAAO,SAASC,GAAY;AACtB,QAAAC,IAAeF,EAAgBC,CAAU;AAC7C,WAAO,OAAOC,KAAgB,YAAYA,KAAgB,KAAKA,KAAgBC;AAAA,EAAA;AAEnF;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"index.es235.js","sources":["../../../node_modules/underscore/modules/_shallowProperty.js"],"sourcesContent":["// Internal helper to generate a function to obtain property `key` from `obj`.\nexport default function shallowProperty(key) {\n return function(obj) {\n return obj == null ? void 0 : obj[key];\n };\n}\n"],"names":["shallowProperty","key","obj"],"mappings":"AACA,SAAwBA,EAAgBC,GAAK;AAC3C,SAAO,SAASC,GAAK;AACnB,WAAOA,KAAO,OAAO,SAASA,EAAID,CAAG;AAAA,EAAA;AAEzC;","x_google_ignoreList":[0]}
@@ -1,9 +1,11 @@
1
- function t(r) {
2
- return function(n) {
3
- return n == null ? void 0 : n[r];
1
+ import { MAX_ARRAY_INDEX as o } from "./index.es23.js";
2
+ function u(e) {
3
+ return function(t) {
4
+ var r = e(t);
5
+ return typeof r == "number" && r >= 0 && r <= o;
4
6
  };
5
7
  }
6
8
  export {
7
- t as default
9
+ u as default
8
10
  };
9
11
  //# sourceMappingURL=index.es236.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.es236.js","sources":["../../../node_modules/underscore/modules/_shallowProperty.js"],"sourcesContent":["// Internal helper to generate a function to obtain property `key` from `obj`.\nexport default function shallowProperty(key) {\n return function(obj) {\n return obj == null ? void 0 : obj[key];\n };\n}\n"],"names":["shallowProperty","key","obj"],"mappings":"AACA,SAAwBA,EAAgBC,GAAK;AAC3C,SAAO,SAASC,GAAK;AACnB,WAAOA,KAAO,OAAO,SAASA,EAAID,CAAG;AAAA,EAAA;AAEzC;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"index.es236.js","sources":["../../../node_modules/underscore/modules/_createSizePropertyCheck.js"],"sourcesContent":["import { MAX_ARRAY_INDEX } from './_setup.js';\n\n// Common internal logic for `isArrayLike` and `isBufferLike`.\nexport default function createSizePropertyCheck(getSizeProperty) {\n return function(collection) {\n var sizeProperty = getSizeProperty(collection);\n return typeof sizeProperty == 'number' && sizeProperty >= 0 && sizeProperty <= MAX_ARRAY_INDEX;\n }\n}\n"],"names":["createSizePropertyCheck","getSizeProperty","collection","sizeProperty","MAX_ARRAY_INDEX"],"mappings":";AAGA,SAAwBA,EAAwBC,GAAiB;AAC/D,SAAO,SAASC,GAAY;AACtB,QAAAC,IAAeF,EAAgBC,CAAU;AAC7C,WAAO,OAAOC,KAAgB,YAAYA,KAAgB,KAAKA,KAAgBC;AAAA,EAAA;AAEnF;","x_google_ignoreList":[0]}
@@ -1,4 +1,4 @@
1
- import e from "./index.es205.js";
1
+ import e from "./index.es207.js";
2
2
  import { root as t } from "./index.es23.js";
3
3
  var o = e("Function"), i = t.document && t.document.childNodes;
4
4
  typeof /./ != "function" && typeof Int8Array != "object" && typeof i != "function" && (o = function(n) {
@@ -1,5 +1,5 @@
1
- import e from "./index.es205.js";
2
- import n from "./index.es206.js";
1
+ import e from "./index.es207.js";
2
+ import n from "./index.es208.js";
3
3
  var t = e("Arguments");
4
4
  (function() {
5
5
  t(arguments) || (t = function(r) {
@@ -1,6 +1,6 @@
1
- import r from "./index.es205.js";
1
+ import r from "./index.es207.js";
2
2
  import { isIE11 as t } from "./index.es25.js";
3
- import { ie11fingerprint as o, mapMethods as i } from "./index.es211.js";
3
+ import { ie11fingerprint as o, mapMethods as i } from "./index.es213.js";
4
4
  const a = t ? o(i) : r("Map");
5
5
  export {
6
6
  a as default
@@ -1,6 +1,6 @@
1
- import e from "./index.es205.js";
1
+ import e from "./index.es207.js";
2
2
  import { isIE11 as r } from "./index.es25.js";
3
- import { ie11fingerprint as t, weakMapMethods as a } from "./index.es211.js";
3
+ import { ie11fingerprint as t, weakMapMethods as a } from "./index.es213.js";
4
4
  const m = r ? t(a) : e("WeakMap");
5
5
  export {
6
6
  m as default
@@ -1,6 +1,6 @@
1
- import t from "./index.es205.js";
1
+ import t from "./index.es207.js";
2
2
  import { isIE11 as e } from "./index.es25.js";
3
- import { ie11fingerprint as r, setMethods as o } from "./index.es211.js";
3
+ import { ie11fingerprint as r, setMethods as o } from "./index.es213.js";
4
4
  const f = e ? r(o) : t("Set");
5
5
  export {
6
6
  f as default
@@ -1,5 +1,5 @@
1
1
  import r from "./index.es27.js";
2
- import i from "./index.es222.js";
2
+ import i from "./index.es224.js";
3
3
  function a(e, t) {
4
4
  return i(e, t, 1 / 0);
5
5
  }
@@ -1,5 +1,5 @@
1
- import e from "./index.es219.js";
2
- import a from "./index.es220.js";
1
+ import e from "./index.es221.js";
2
+ import a from "./index.es222.js";
3
3
  const o = e(a);
4
4
  export {
5
5
  o as default
@@ -1,5 +1,5 @@
1
- import e from "./index.es219.js";
2
- import a from "./index.es221.js";
1
+ import e from "./index.es221.js";
2
+ import a from "./index.es223.js";
3
3
  const o = e(a);
4
4
  export {
5
5
  o as default
@@ -1,5 +1,5 @@
1
1
  import m from "./index.es79.js";
2
- import p from "./index.es223.js";
2
+ import p from "./index.es225.js";
3
3
  import s from "./index.es27.js";
4
4
  var l = m(function(u, e) {
5
5
  var h = l.placeholder, o = function() {
@@ -1,6 +1,6 @@
1
1
  import o from "./index.es79.js";
2
2
  import u from "./index.es24.js";
3
- import c from "./index.es223.js";
3
+ import c from "./index.es225.js";
4
4
  const a = o(function(t, r, e) {
5
5
  if (!u(t))
6
6
  throw new TypeError("Bind must be called on a function");
@@ -1,5 +1,5 @@
1
1
  import i from "./index.es79.js";
2
- import f from "./index.es224.js";
2
+ import f from "./index.es226.js";
3
3
  import l from "./index.es37.js";
4
4
  const s = i(function(r, t) {
5
5
  t = f(t, !1, !1);
@@ -1,8 +1,8 @@
1
1
  import u from "./index.es79.js";
2
2
  import l from "./index.es24.js";
3
3
  import t from "./index.es146.js";
4
- import s from "./index.es216.js";
5
- import d from "./index.es215.js";
4
+ import s from "./index.es218.js";
5
+ import d from "./index.es217.js";
6
6
  const k = u(function(f, r, m) {
7
7
  var e, n;
8
8
  return l(r) ? n = r : (r = d(r), e = r.slice(0, -1), r = r[r.length - 1]), t(f, function(i) {
@@ -1,9 +1,9 @@
1
1
  import l from "./index.es79.js";
2
2
  import a from "./index.es24.js";
3
- import p from "./index.es218.js";
3
+ import p from "./index.es220.js";
4
4
  import u from "./index.es102.js";
5
- import c from "./index.es230.js";
6
- import g from "./index.es224.js";
5
+ import c from "./index.es232.js";
6
+ import g from "./index.es226.js";
7
7
  const z = l(function(t, r) {
8
8
  var i = {}, f = r[0];
9
9
  if (t == null)
@@ -2,7 +2,7 @@ import n from "./index.es79.js";
2
2
  import f from "./index.es24.js";
3
3
  import e from "./index.es133.js";
4
4
  import a from "./index.es146.js";
5
- import p from "./index.es224.js";
5
+ import p from "./index.es226.js";
6
6
  import u from "./index.es153.js";
7
7
  import c from "./index.es43.js";
8
8
  const F = n(function(i, t) {
@@ -1,6 +1,6 @@
1
1
  import r from "./index.es79.js";
2
2
  import o from "./index.es173.js";
3
- import n from "./index.es224.js";
3
+ import n from "./index.es226.js";
4
4
  const f = r(function(t) {
5
5
  return o(n(t, !0, !0));
6
6
  });
@@ -1,5 +1,5 @@
1
1
  import n from "./index.es79.js";
2
- import e from "./index.es224.js";
2
+ import e from "./index.es226.js";
3
3
  import f from "./index.es149.js";
4
4
  import i from "./index.es153.js";
5
5
  const a = n(function(t, r) {
@@ -1,7 +1,7 @@
1
1
  import i from "./index.es27.js";
2
2
  import p from "./index.es145.js";
3
3
  import { ArrayProto as e } from "./index.es23.js";
4
- import s from "./index.es231.js";
4
+ import s from "./index.es233.js";
5
5
  p(["pop", "push", "reverse", "shift", "sort", "splice", "unshift"], function(r) {
6
6
  var o = e[r];
7
7
  i.prototype[r] = function() {
@@ -1,5 +1,5 @@
1
- var e = { exports: {} };
1
+ var a = { exports: {} };
2
2
  export {
3
- e as __module
3
+ a as __module
4
4
  };
5
5
  //# sourceMappingURL=index.es64.js.map
@@ -1,5 +1,5 @@
1
- var a = { exports: {} };
1
+ var e = { exports: {} };
2
2
  export {
3
- a as __module
3
+ e as __module
4
4
  };
5
5
  //# sourceMappingURL=index.es65.js.map
@@ -2,7 +2,7 @@ import r from "./index.es27.js";
2
2
  import n from "./index.es145.js";
3
3
  import f from "./index.es106.js";
4
4
  import { push as u } from "./index.es23.js";
5
- import m from "./index.es231.js";
5
+ import m from "./index.es233.js";
6
6
  function l(o) {
7
7
  return n(f(o), function(t) {
8
8
  var i = r[t] = o[t];
@@ -1,4 +1,4 @@
1
- import t from "./index.es205.js";
1
+ import t from "./index.es207.js";
2
2
  const e = t("String");
3
3
  export {
4
4
  e as default
@@ -1,4 +1,4 @@
1
- import e from "./index.es205.js";
1
+ import e from "./index.es207.js";
2
2
  const t = e("Number");
3
3
  export {
4
4
  t as default
@@ -1,4 +1,4 @@
1
- import t from "./index.es205.js";
1
+ import t from "./index.es207.js";
2
2
  const a = t("Date");
3
3
  export {
4
4
  a as default
@@ -1,4 +1,4 @@
1
- import e from "./index.es205.js";
1
+ import e from "./index.es207.js";
2
2
  const o = e("RegExp");
3
3
  export {
4
4
  o as default
@@ -1,4 +1,4 @@
1
- import r from "./index.es205.js";
1
+ import r from "./index.es207.js";
2
2
  const t = r("Error");
3
3
  export {
4
4
  t as default
@@ -1,4 +1,4 @@
1
- import o from "./index.es205.js";
1
+ import o from "./index.es207.js";
2
2
  const e = o("Symbol");
3
3
  export {
4
4
  e as default
@@ -1,4 +1,4 @@
1
- import r from "./index.es205.js";
1
+ import r from "./index.es207.js";
2
2
  const f = r("ArrayBuffer");
3
3
  export {
4
4
  f as default
@@ -1,4 +1,4 @@
1
- import r from "./index.es205.js";
1
+ import r from "./index.es207.js";
2
2
  import i from "./index.es24.js";
3
3
  import a from "./index.es91.js";
4
4
  import { hasStringTagBug as e } from "./index.es25.js";
@@ -1,5 +1,5 @@
1
1
  import { nativeIsArray as r } from "./index.es23.js";
2
- import t from "./index.es205.js";
2
+ import t from "./index.es207.js";
3
3
  const e = r || t("Array");
4
4
  export {
5
5
  e as default
@@ -1,7 +1,7 @@
1
1
  import { supportsArrayBuffer as i, nativeIsView as t, toString as a } from "./index.es23.js";
2
2
  import e from "./index.es92.js";
3
3
  import o from "./index.es117.js";
4
- import n from "./index.es207.js";
4
+ import n from "./index.es209.js";
5
5
  var s = /\[object ((I|Ui)nt(8|16|32)|Float(32|64)|Uint8Clamped|Big(I|Ui)nt64)Array\]/;
6
6
  function f(r) {
7
7
  return t ? t(r) && !e(r) : n(r) && s.test(a.call(r));
@@ -1,4 +1,4 @@
1
- import e from "./index.es208.js";
1
+ import e from "./index.es210.js";
2
2
  import i from "./index.es93.js";
3
3
  import m from "./index.es85.js";
4
4
  import n from "./index.es26.js";
@@ -1,13 +1,13 @@
1
1
  import m from "./index.es27.js";
2
2
  import { toString as g, SymbolProto as h } from "./index.es23.js";
3
- import j from "./index.es209.js";
3
+ import j from "./index.es211.js";
4
4
  import D from "./index.es96.js";
5
5
  import y from "./index.es24.js";
6
6
  import { hasStringTagBug as V } from "./index.es25.js";
7
7
  import v from "./index.es92.js";
8
8
  import w from "./index.es101.js";
9
- import q from "./index.es206.js";
10
- import d from "./index.es210.js";
9
+ import q from "./index.es208.js";
10
+ import d from "./index.es212.js";
11
11
  var B = "[object DataView]";
12
12
  function c(e, r, f, n) {
13
13
  if (e === r)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@performant-software/geospatial",
3
- "version": "2.2.18",
3
+ "version": "2.2.19-beta.0",
4
4
  "description": "A package of components for all things map-related.",
5
5
  "license": "MIT",
6
6
  "main": "./dist/index.cjs.js",
package/build/index.js DELETED
@@ -1,2 +0,0 @@
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
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
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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dM,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":""}