@performant-software/geospatial 3.1.0-beta.2 → 3.1.0-beta.3

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 (168) hide show
  1. package/dist/index.cjs14.js +1 -1
  2. package/dist/index.cjs188.js +1 -1
  3. package/dist/index.cjs189.js +1 -1
  4. package/dist/index.cjs190.js +1 -1
  5. package/dist/index.cjs191.js +1 -1
  6. package/dist/index.cjs193.js +1 -1
  7. package/dist/index.cjs194.js +1 -1
  8. package/dist/index.cjs195.js +1 -1
  9. package/dist/index.cjs196.js +1 -1
  10. package/dist/index.cjs198.js +1 -1
  11. package/dist/index.cjs199.js +1 -1
  12. package/dist/index.cjs201.js +1 -1
  13. package/dist/index.cjs213.js +1 -1
  14. package/dist/index.cjs214.js +1 -1
  15. package/dist/index.cjs215.js +1 -1
  16. package/dist/index.cjs233.js +1 -1
  17. package/dist/index.cjs238.js +1 -1
  18. package/dist/index.cjs238.js.map +1 -1
  19. package/dist/index.cjs239.js +1 -1
  20. package/dist/index.cjs239.js.map +1 -1
  21. package/dist/index.cjs240.js +1 -1
  22. package/dist/index.cjs240.js.map +1 -1
  23. package/dist/index.cjs241.js +1 -1
  24. package/dist/index.cjs241.js.map +1 -1
  25. package/dist/index.cjs242.js +1 -1
  26. package/dist/index.cjs242.js.map +1 -1
  27. package/dist/index.cjs243.js +1 -1
  28. package/dist/index.cjs243.js.map +1 -1
  29. package/dist/index.cjs244.js +1 -1
  30. package/dist/index.cjs244.js.map +1 -1
  31. package/dist/index.cjs245.js +1 -1
  32. package/dist/index.cjs245.js.map +1 -1
  33. package/dist/index.cjs246.js +1 -1
  34. package/dist/index.cjs246.js.map +1 -1
  35. package/dist/index.cjs247.js +1 -1
  36. package/dist/index.cjs247.js.map +1 -1
  37. package/dist/index.cjs248.js +1 -1
  38. package/dist/index.cjs248.js.map +1 -1
  39. package/dist/index.cjs249.js +1 -1
  40. package/dist/index.cjs249.js.map +1 -1
  41. package/dist/index.cjs250.js +1 -1
  42. package/dist/index.cjs250.js.map +1 -1
  43. package/dist/index.cjs251.js +1 -1
  44. package/dist/index.cjs251.js.map +1 -1
  45. package/dist/index.cjs252.js +1 -1
  46. package/dist/index.cjs252.js.map +1 -1
  47. package/dist/index.cjs253.js +1 -1
  48. package/dist/index.cjs253.js.map +1 -1
  49. package/dist/index.cjs254.js +1 -1
  50. package/dist/index.cjs254.js.map +1 -1
  51. package/dist/index.cjs255.js +1 -1
  52. package/dist/index.cjs255.js.map +1 -1
  53. package/dist/index.cjs256.js +1 -1
  54. package/dist/index.cjs256.js.map +1 -1
  55. package/dist/index.cjs257.js +1 -1
  56. package/dist/index.cjs257.js.map +1 -1
  57. package/dist/index.cjs259.js +1 -1
  58. package/dist/index.cjs259.js.map +1 -1
  59. package/dist/index.cjs260.js +1 -1
  60. package/dist/index.cjs260.js.map +1 -1
  61. package/dist/index.cjs262.js +1 -1
  62. package/dist/index.cjs263.js +1 -1
  63. package/dist/index.cjs27.js +1 -1
  64. package/dist/index.cjs31.js +1 -1
  65. package/dist/index.cjs7.js.map +1 -1
  66. package/dist/index.cjs71.js +743 -1
  67. package/dist/index.cjs71.js.map +1 -1
  68. package/dist/index.cjs72.js +1 -1
  69. package/dist/index.cjs73.js +1 -1
  70. package/dist/index.cjs73.js.map +1 -1
  71. package/dist/index.cjs74.js +1 -743
  72. package/dist/index.cjs74.js.map +1 -1
  73. package/dist/index.cjs75.js +9 -1
  74. package/dist/index.cjs75.js.map +1 -1
  75. package/dist/index.cjs76.js +17 -1
  76. package/dist/index.cjs76.js.map +1 -1
  77. package/dist/index.cjs77.js +1 -1
  78. package/dist/index.cjs77.js.map +1 -1
  79. package/dist/index.cjs78.js +1 -9
  80. package/dist/index.cjs78.js.map +1 -1
  81. package/dist/index.cjs79.js +1 -17
  82. package/dist/index.cjs79.js.map +1 -1
  83. package/dist/index.es14.js +2 -2
  84. package/dist/index.es188.js +1 -1
  85. package/dist/index.es189.js +1 -1
  86. package/dist/index.es190.js +1 -1
  87. package/dist/index.es191.js +2 -2
  88. package/dist/index.es193.js +3 -3
  89. package/dist/index.es194.js +1 -1
  90. package/dist/index.es195.js +1 -1
  91. package/dist/index.es196.js +1 -1
  92. package/dist/index.es198.js +2 -2
  93. package/dist/index.es199.js +3 -3
  94. package/dist/index.es201.js +2 -2
  95. package/dist/index.es213.js +1 -1
  96. package/dist/index.es214.js +1 -1
  97. package/dist/index.es215.js +1 -1
  98. package/dist/index.es233.js +1 -1
  99. package/dist/index.es238.js +22 -18
  100. package/dist/index.es238.js.map +1 -1
  101. package/dist/index.es239.js +16 -22
  102. package/dist/index.es239.js.map +1 -1
  103. package/dist/index.es240.js +28 -22
  104. package/dist/index.es240.js.map +1 -1
  105. package/dist/index.es241.js +20 -15
  106. package/dist/index.es241.js.map +1 -1
  107. package/dist/index.es242.js +74 -30
  108. package/dist/index.es242.js.map +1 -1
  109. package/dist/index.es243.js +20 -21
  110. package/dist/index.es243.js.map +1 -1
  111. package/dist/index.es244.js +37 -71
  112. package/dist/index.es244.js.map +1 -1
  113. package/dist/index.es245.js +48 -19
  114. package/dist/index.es245.js.map +1 -1
  115. package/dist/index.es246.js +7 -40
  116. package/dist/index.es246.js.map +1 -1
  117. package/dist/index.es247.js +19 -48
  118. package/dist/index.es247.js.map +1 -1
  119. package/dist/index.es248.js +65 -7
  120. package/dist/index.es248.js.map +1 -1
  121. package/dist/index.es249.js +40 -18
  122. package/dist/index.es249.js.map +1 -1
  123. package/dist/index.es250.js +58 -60
  124. package/dist/index.es250.js.map +1 -1
  125. package/dist/index.es251.js +8 -42
  126. package/dist/index.es251.js.map +1 -1
  127. package/dist/index.es252.js +3 -63
  128. package/dist/index.es252.js.map +1 -1
  129. package/dist/index.es253.js +12 -8
  130. package/dist/index.es253.js.map +1 -1
  131. package/dist/index.es254.js +59 -3
  132. package/dist/index.es254.js.map +1 -1
  133. package/dist/index.es255.js +48 -11
  134. package/dist/index.es255.js.map +1 -1
  135. package/dist/index.es256.js +18 -57
  136. package/dist/index.es256.js.map +1 -1
  137. package/dist/index.es257.js +22 -49
  138. package/dist/index.es257.js.map +1 -1
  139. package/dist/index.es259.js +6 -4
  140. package/dist/index.es259.js.map +1 -1
  141. package/dist/index.es260.js +4 -6
  142. package/dist/index.es260.js.map +1 -1
  143. package/dist/index.es262.js +4 -4
  144. package/dist/index.es263.js +1 -1
  145. package/dist/index.es27.js +1 -1
  146. package/dist/index.es31.js +2 -2
  147. package/dist/index.es7.js.map +1 -1
  148. package/dist/index.es71.js +21314 -1955
  149. package/dist/index.es71.js.map +1 -1
  150. package/dist/index.es72.js +2 -6
  151. package/dist/index.es72.js.map +1 -1
  152. package/dist/index.es73.js +8 -2
  153. package/dist/index.es73.js.map +1 -1
  154. package/dist/index.es74.js +2 -21352
  155. package/dist/index.es74.js.map +1 -1
  156. package/dist/index.es75.js +26 -2
  157. package/dist/index.es75.js.map +1 -1
  158. package/dist/index.es76.js +588 -7
  159. package/dist/index.es76.js.map +1 -1
  160. package/dist/index.es77.js +1993 -2
  161. package/dist/index.es77.js.map +1 -1
  162. package/dist/index.es78.js +5 -25
  163. package/dist/index.es78.js.map +1 -1
  164. package/dist/index.es79.js +2 -589
  165. package/dist/index.es79.js.map +1 -1
  166. package/package.json +1 -1
  167. package/src/components/MapControl.js +0 -1
  168. package/types/components/MapControl.js.flow +0 -1
@@ -1,7 +1,63 @@
1
- function e(t) {
2
- return t;
1
+ import { cartesian as J } from "./index.es240.js";
2
+ import { atan2 as K, asin as O, abs as B, sqrt as Q, cos as R, radians as U, epsilon as H } from "./index.es241.js";
3
+ import { transformer as V } from "./index.es197.js";
4
+ var I = 16, W = R(30 * U);
5
+ function h(e, t) {
6
+ return +t ? Y(e, t) : X(e);
7
+ }
8
+ function X(e) {
9
+ return V({
10
+ point: function(t, D) {
11
+ t = e(t, D), this.stream.point(t[0], t[1]);
12
+ }
13
+ });
14
+ }
15
+ function Y(e, t) {
16
+ function D(i, P, q, L, M, T, w, $, r, u, l, c, s, n) {
17
+ var E = w - i, S = $ - P, v = E * E + S * S;
18
+ if (v > 4 * t && s--) {
19
+ var p = L + u, a = M + l, g = T + c, y = Q(p * p + a * a + g * g), o = O(g /= y), f = B(B(g) - 1) < H || B(q - r) < H ? (q + r) / 2 : K(a, p), k = e(f, o), N = k[0], A = k[1], C = N - i, F = A - P, G = S * C - E * F;
20
+ (G * G / v > t || B((E * C + S * F) / v - 0.5) > 0.3 || L * u + M * l + T * c < W) && (D(i, P, q, L, M, T, N, A, f, p /= y, a /= y, g, s, n), n.point(N, A), D(N, A, f, p, a, g, w, $, r, u, l, c, s, n));
21
+ }
22
+ }
23
+ return function(i) {
24
+ var P, q, L, M, T, w, $, r, u, l, c, s, n = {
25
+ point: E,
26
+ lineStart: S,
27
+ lineEnd: p,
28
+ polygonStart: function() {
29
+ i.polygonStart(), n.lineStart = a;
30
+ },
31
+ polygonEnd: function() {
32
+ i.polygonEnd(), n.lineStart = S;
33
+ }
34
+ };
35
+ function E(o, f) {
36
+ o = e(o, f), i.point(o[0], o[1]);
37
+ }
38
+ function S() {
39
+ r = NaN, n.point = v, i.lineStart();
40
+ }
41
+ function v(o, f) {
42
+ var k = J([o, f]), N = e(o, f);
43
+ D(r, u, $, l, c, s, r = N[0], u = N[1], $ = o, l = k[0], c = k[1], s = k[2], I, i), i.point(r, u);
44
+ }
45
+ function p() {
46
+ n.point = E, i.lineEnd();
47
+ }
48
+ function a() {
49
+ S(), n.point = g, n.lineEnd = y;
50
+ }
51
+ function g(o, f) {
52
+ v(P = o, f), q = r, L = u, M = l, T = c, w = s, n.point = v;
53
+ }
54
+ function y() {
55
+ D(r, u, $, l, c, s, q, L, P, M, T, w, I, i), n.lineEnd = p, p();
56
+ }
57
+ return n;
58
+ };
3
59
  }
4
60
  export {
5
- e as default
61
+ h as default
6
62
  };
7
63
  //# sourceMappingURL=index.es254.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.es254.js","sources":["../../../node_modules/d3-geo/src/identity.js"],"sourcesContent":["export default function(x) {\n return x;\n}\n"],"names":["identity","x"],"mappings":"AAAA,SAAAA,EAAwBC,GAAG;AACzB,SAAOA;AACT;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"index.es254.js","sources":["../../../node_modules/d3-geo/src/projection/resample.js"],"sourcesContent":["import {cartesian} from \"../cartesian\";\nimport {abs, asin, atan2, cos, epsilon, radians, sqrt} from \"../math\";\nimport {transformer} from \"../transform\";\n\nvar maxDepth = 16, // maximum depth of subdivision\n cosMinDistance = cos(30 * radians); // cos(minimum angular distance)\n\nexport default function(project, delta2) {\n return +delta2 ? resample(project, delta2) : resampleNone(project);\n}\n\nfunction resampleNone(project) {\n return transformer({\n point: function(x, y) {\n x = project(x, y);\n this.stream.point(x[0], x[1]);\n }\n });\n}\n\nfunction resample(project, delta2) {\n\n function resampleLineTo(x0, y0, lambda0, a0, b0, c0, x1, y1, lambda1, a1, b1, c1, depth, stream) {\n var dx = x1 - x0,\n dy = y1 - y0,\n d2 = dx * dx + dy * dy;\n if (d2 > 4 * delta2 && depth--) {\n var a = a0 + a1,\n b = b0 + b1,\n c = c0 + c1,\n m = sqrt(a * a + b * b + c * c),\n phi2 = asin(c /= m),\n lambda2 = abs(abs(c) - 1) < epsilon || abs(lambda0 - lambda1) < epsilon ? (lambda0 + lambda1) / 2 : atan2(b, a),\n p = project(lambda2, phi2),\n x2 = p[0],\n y2 = p[1],\n dx2 = x2 - x0,\n dy2 = y2 - y0,\n dz = dy * dx2 - dx * dy2;\n if (dz * dz / d2 > delta2 // perpendicular projected distance\n || abs((dx * dx2 + dy * dy2) / d2 - 0.5) > 0.3 // midpoint close to an end\n || a0 * a1 + b0 * b1 + c0 * c1 < cosMinDistance) { // angular distance\n resampleLineTo(x0, y0, lambda0, a0, b0, c0, x2, y2, lambda2, a /= m, b /= m, c, depth, stream);\n stream.point(x2, y2);\n resampleLineTo(x2, y2, lambda2, a, b, c, x1, y1, lambda1, a1, b1, c1, depth, stream);\n }\n }\n }\n return function(stream) {\n var lambda00, x00, y00, a00, b00, c00, // first point\n lambda0, x0, y0, a0, b0, c0; // previous point\n\n var resampleStream = {\n point: point,\n lineStart: lineStart,\n lineEnd: lineEnd,\n polygonStart: function() { stream.polygonStart(); resampleStream.lineStart = ringStart; },\n polygonEnd: function() { stream.polygonEnd(); resampleStream.lineStart = lineStart; }\n };\n\n function point(x, y) {\n x = project(x, y);\n stream.point(x[0], x[1]);\n }\n\n function lineStart() {\n x0 = NaN;\n resampleStream.point = linePoint;\n stream.lineStart();\n }\n\n function linePoint(lambda, phi) {\n var c = cartesian([lambda, phi]), p = project(lambda, phi);\n resampleLineTo(x0, y0, lambda0, a0, b0, c0, x0 = p[0], y0 = p[1], lambda0 = lambda, a0 = c[0], b0 = c[1], c0 = c[2], maxDepth, stream);\n stream.point(x0, y0);\n }\n\n function lineEnd() {\n resampleStream.point = point;\n stream.lineEnd();\n }\n\n function ringStart() {\n lineStart();\n resampleStream.point = ringPoint;\n resampleStream.lineEnd = ringEnd;\n }\n\n function ringPoint(lambda, phi) {\n linePoint(lambda00 = lambda, phi), x00 = x0, y00 = y0, a00 = a0, b00 = b0, c00 = c0;\n resampleStream.point = linePoint;\n }\n\n function ringEnd() {\n resampleLineTo(x0, y0, lambda0, a0, b0, c0, x00, y00, lambda00, a00, b00, c00, maxDepth, stream);\n resampleStream.lineEnd = lineEnd;\n lineEnd();\n }\n\n return resampleStream;\n };\n}\n"],"names":["maxDepth","cosMinDistance","cos","radians","resample","project","delta2","resampleNone","transformer","x","y","resampleLineTo","x0","y0","lambda0","a0","b0","c0","x1","y1","lambda1","a1","b1","c1","depth","stream","dx","dy","d2","a","b","c","m","sqrt","phi2","asin","lambda2","abs","epsilon","atan2","p","x2","y2","dx2","dy2","dz","lambda00","x00","y00","a00","b00","c00","resampleStream","point","lineStart","lineEnd","ringStart","linePoint","lambda","phi","cartesian","ringPoint","ringEnd"],"mappings":";;;AAIA,IAAIA,IAAW,IACXC,IAAiBC,EAAI,KAAKC,CAAO;AAErC,S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Gd,IAAKc,EAAE,CAAC,GAAG/B,GAAUyB,CAAM,GACrIA,EAAO,MAAMb,GAAIC,CAAE;AAAA,IACrB;AAEA,aAAS0C,IAAU;AACjB,MAAAH,EAAe,QAAQC,GACvB5B,EAAO,QAAA;AAAA,IACT;AAEA,aAAS+B,IAAY;AACnB,MAAAF,EAAA,GACAF,EAAe,QAAQS,GACvBT,EAAe,UAAUU;AAAA,IAC3B;AAEA,aAASD,EAAUH,GAAQC,GAAK;AAC9B,MAAAF,EAAUX,IAAWY,GAAQC,CAAG,GAAGZ,IAAMnC,GAAIoC,IAAMnC,GAAIoC,IAAMlC,GAAImC,IAAMlC,GAAImC,IAAMlC,GACjFmC,EAAe,QAAQK;AAAA,IACzB;AAEA,aAASK,IAAU;AACjB,MAAAnD,EAAeC,GAAIC,GAAIC,GAASC,GAAIC,GAAIC,GAAI8B,GAAKC,GAAKF,GAAUG,GAAKC,GAAKC,GAAKnD,GAAUyB,CAAM,GAC/F2B,EAAe,UAAUG,GACzBA,EAAA;AAAA,IACF;AAEA,WAAOH;AAAA,EACT;AACF;","x_google_ignoreList":[0]}
@@ -1,16 +1,53 @@
1
- import c from "./index.es257.js";
2
- import n from "./index.es264.js";
3
- function S(l, a, r) {
4
- var f = a[1][0] - a[0][0], m = a[1][1] - a[0][1], i = l.clipExtent && l.clipExtent();
5
- l.scale(150).translate([0, 0]), i != null && l.clipExtent(null), c(r, l.stream(n));
6
- var t = n.result(), u = Math.min(f / (t[1][0] - t[0][0]), m / (t[1][1] - t[0][1])), s = +a[0][0] + (f - u * (t[1][0] + t[0][0])) / 2, E = +a[0][1] + (m - u * (t[1][1] + t[0][1])) / 2;
7
- return i != null && l.clipExtent(i), l.scale(u * 150).translate([s, E]);
1
+ function l(n, i) {
2
+ n && f.hasOwnProperty(n.type) && f[n.type](n, i);
8
3
  }
9
- function h(l, a, r) {
10
- return S(l, [[0, 0], a], r);
4
+ var u = {
5
+ Feature: function(n, i) {
6
+ l(n.geometry, i);
7
+ },
8
+ FeatureCollection: function(n, i) {
9
+ for (var e = n.features, t = -1, o = e.length; ++t < o; ) l(e[t].geometry, i);
10
+ }
11
+ }, f = {
12
+ Sphere: function(n, i) {
13
+ i.sphere();
14
+ },
15
+ Point: function(n, i) {
16
+ n = n.coordinates, i.point(n[0], n[1], n[2]);
17
+ },
18
+ MultiPoint: function(n, i) {
19
+ for (var e = n.coordinates, t = -1, o = e.length; ++t < o; ) n = e[t], i.point(n[0], n[1], n[2]);
20
+ },
21
+ LineString: function(n, i) {
22
+ a(n.coordinates, i, 0);
23
+ },
24
+ MultiLineString: function(n, i) {
25
+ for (var e = n.coordinates, t = -1, o = e.length; ++t < o; ) a(e[t], i, 0);
26
+ },
27
+ Polygon: function(n, i) {
28
+ h(n.coordinates, i);
29
+ },
30
+ MultiPolygon: function(n, i) {
31
+ for (var e = n.coordinates, t = -1, o = e.length; ++t < o; ) h(e[t], i);
32
+ },
33
+ GeometryCollection: function(n, i) {
34
+ for (var e = n.geometries, t = -1, o = e.length; ++t < o; ) l(e[t], i);
35
+ }
36
+ };
37
+ function a(n, i, e) {
38
+ var t = -1, o = n.length - e, r;
39
+ for (i.lineStart(); ++t < o; ) r = n[t], i.point(r[0], r[1], r[2]);
40
+ i.lineEnd();
41
+ }
42
+ function h(n, i) {
43
+ var e = -1, t = n.length;
44
+ for (i.polygonStart(); ++e < t; ) a(n[e], i, 1);
45
+ i.polygonEnd();
46
+ }
47
+ function g(n, i) {
48
+ n && u.hasOwnProperty(n.type) ? u[n.type](n, i) : l(n, i);
11
49
  }
12
50
  export {
13
- S as fitExtent,
14
- h as fitSize
51
+ g as default
15
52
  };
16
53
  //# sourceMappingURL=index.es255.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.es255.js","sources":["../../../node_modules/d3-geo/src/projection/fit.js"],"sourcesContent":["import {default as geoStream} from \"../stream\";\nimport boundsStream from \"../path/bounds\";\n\nexport function fitExtent(projection, extent, object) {\n var w = extent[1][0] - extent[0][0],\n h = extent[1][1] - extent[0][1],\n clip = projection.clipExtent && projection.clipExtent();\n\n projection\n .scale(150)\n .translate([0, 0]);\n\n if (clip != null) projection.clipExtent(null);\n\n geoStream(object, projection.stream(boundsStream));\n\n var b = boundsStream.result(),\n k = Math.min(w / (b[1][0] - b[0][0]), h / (b[1][1] - b[0][1])),\n x = +extent[0][0] + (w - k * (b[1][0] + b[0][0])) / 2,\n y = +extent[0][1] + (h - k * (b[1][1] + b[0][1])) / 2;\n\n if (clip != null) projection.clipExtent(clip);\n\n return projection\n .scale(k * 150)\n .translate([x, y]);\n}\n\nexport function fitSize(projection, size, object) {\n return fitExtent(projection, [[0, 0], size], object);\n}\n"],"names":["fitExtent","projection","extent","object","w","h","clip","geoStream","boundsStream","b","k","x","y","fitSize","size"],"mappings":";;AAGO,SAASA,EAAUC,GAAYC,GAAQC,GAAQ;AACpD,MAAIC,IAAIF,EAAO,CAAC,EAAE,CAAC,IAAIA,EAAO,CAAC,EAAE,CAAC,GAC9BG,IAAIH,EAAO,CAAC,EAAE,CAAC,IAAIA,EAAO,CAAC,EAAE,CAAC,GAC9BI,IAAOL,EAAW,cAAcA,EAAW,WAAA;AAE/C,EAAAA,EACK,MAAM,GAAG,EACT,UAAU,CAAC,GAAG,CAAC,CAAC,GAEjBK,KAAQ,QAAML,EAAW,WAAW,IAAI,GAE5CM,EAAUJ,GAAQF,EAAW,OAAOO,CAAY,CAAC;AAEjD,MAAIC,IAAID,EAAa,OAAA,GACjBE,IAAI,KAAK,IAAIN,KAAKK,EAAE,CAAC,EAAE,CAAC,IAAIA,EAAE,CAAC,EAAE,CAAC,IAAIJ,KAAKI,EAAE,CAAC,EAAE,CAAC,IAAIA,EAAE,CAAC,EAAE,CAAC,EAAE,GAC7DE,IAAI,CAACT,EAAO,CAAC,EAAE,CAAC,KAAKE,IAAIM,KAAKD,EAAE,CAAC,EAAE,CAAC,IAAIA,EAAE,CAAC,EAAE,CAAC,MAAM,GACpDG,IAAI,CAACV,EAAO,CAAC,EAAE,CAAC,KAAKG,IAAIK,KAAKD,EAAE,CAAC,EAAE,CAAC,IAAIA,EAAE,CAAC,EAAE,CAAC,MAAM;AAExD,SAAIH,KAAQ,QAAML,EAAW,WAAWK,CAAI,GAErCL,EACF,MAAMS,IAAI,GAAG,EACb,UAAU,CAACC,GAAGC,CAAC,CAAC;AACvB;AAEO,SAASC,EAAQZ,GAAYa,GAAMX,GAAQ;AAChD,SAAOH,EAAUC,GAAY,CAAC,CAAC,GAAG,CAAC,GAAGa,CAAI,GAAGX,CAAM;AACrD;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"index.es255.js","sources":["../../../node_modules/d3-geo/src/stream.js"],"sourcesContent":["function streamGeometry(geometry, stream) {\n if (geometry && streamGeometryType.hasOwnProperty(geometry.type)) {\n streamGeometryType[geometry.type](geometry, stream);\n }\n}\n\nvar streamObjectType = {\n Feature: function(object, stream) {\n streamGeometry(object.geometry, stream);\n },\n FeatureCollection: function(object, stream) {\n var features = object.features, i = -1, n = features.length;\n while (++i < n) streamGeometry(features[i].geometry, stream);\n }\n};\n\nvar streamGeometryType = {\n Sphere: function(object, stream) {\n stream.sphere();\n },\n Point: function(object, stream) {\n object = object.coordinates;\n stream.point(object[0], object[1], object[2]);\n },\n MultiPoint: function(object, stream) {\n var coordinates = object.coordinates, i = -1, n = coordinates.length;\n while (++i < n) object = coordinates[i], stream.point(object[0], object[1], object[2]);\n },\n LineString: function(object, stream) {\n streamLine(object.coordinates, stream, 0);\n },\n MultiLineString: function(object, stream) {\n var coordinates = object.coordinates, i = -1, n = coordinates.length;\n while (++i < n) streamLine(coordinates[i], stream, 0);\n },\n Polygon: function(object, stream) {\n streamPolygon(object.coordinates, stream);\n },\n MultiPolygon: function(object, stream) {\n var coordinates = object.coordinates, i = -1, n = coordinates.length;\n while (++i < n) streamPolygon(coordinates[i], stream);\n },\n GeometryCollection: function(object, stream) {\n var geometries = object.geometries, i = -1, n = geometries.length;\n while (++i < n) streamGeometry(geometries[i], stream);\n }\n};\n\nfunction streamLine(coordinates, stream, closed) {\n var i = -1, n = coordinates.length - closed, coordinate;\n stream.lineStart();\n while (++i < n) coordinate = coordinates[i], stream.point(coordinate[0], coordinate[1], coordinate[2]);\n stream.lineEnd();\n}\n\nfunction streamPolygon(coordinates, stream) {\n var i = -1, n = coordinates.length;\n stream.polygonStart();\n while (++i < n) streamLine(coordinates[i], stream, 1);\n stream.polygonEnd();\n}\n\nexport default function(object, stream) {\n if (object && streamObjectType.hasOwnProperty(object.type)) {\n streamObjectType[object.type](object, stream);\n } else {\n streamGeometry(object, stream);\n }\n}\n"],"names":["streamGeometry","geometry","stream","streamGeometryType","streamObjectType","object","features","i","n","coordinates","streamLine","streamPolygon","geometries","closed","coordinate","geoStream"],"mappings":"AAAA,SAASA,EAAeC,GAAUC,GAAQ;AACxC,EAAID,KAAYE,EAAmB,eAAeF,EAAS,IAAI,KAC7DE,EAAmBF,EAAS,IAAI,EAAEA,GAAUC,CAAM;AAEtD;AAEA,IAAIE,IAAmB;AAAA,EACrB,SAAS,SAASC,GAAQH,GAAQ;AAChC,IAAAF,EAAeK,EAAO,UAAUH,CAAM;AAAA,EACxC;AAAA,EACA,mBAAmB,SAASG,GAAQH,GAAQ;AAE1C,aADII,IAAWD,EAAO,UAAUE,IAAI,IAAIC,IAAIF,EAAS,QAC9C,EAAEC,IAAIC,IAAG,CAAAR,EAAeM,EAASC,CAAC,EAAE,UAAUL,CAAM;AAAA,EAC7D;AACF,GAEIC,IAAqB;AAAA,EACvB,QAAQ,SAASE,GAAQH,GAAQ;AAC/B,IAAAA,EAAO,OAAA;AAAA,EACT;AAAA,EACA,OAAO,SAASG,GAAQH,GAAQ;AAC9B,IAAAG,IAASA,EAAO,aAChBH,EAAO,MAAMG,EAAO,CAAC,GAAGA,EAAO,CAAC,GAAGA,EAAO,CAAC,CAAC;AAAA,EAC9C;AAAA,EACA,YAAY,SAASA,GAAQH,GAAQ;AAEnC,aADIO,IAAcJ,EAAO,aAAaE,IAAI,IAAIC,IAAIC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EAAO,aAAA,GACA,EAAEK,IAAIC,IAAG,CAAAE,EAAWD,EAAYF,CAAC,GAAGL,GAAQ,CAAC;AACpD,EAAAA,EAAO,WAAA;AACT;AAEA,SAAAa,EAAwBV,GAAQH,GAAQ;AACtC,EAAIG,KAAUD,EAAiB,eAAeC,EAAO,IAAI,IACvDD,EAAiBC,EAAO,IAAI,EAAEA,GAAQH,CAAM,IAE5CF,EAAeK,GAAQH,CAAM;AAEjC;","x_google_ignoreList":[0]}
@@ -1,63 +1,24 @@
1
- import { cartesian as J } from "./index.es242.js";
2
- import { atan2 as K, asin as O, abs as B, sqrt as Q, cos as R, radians as U, epsilon as H } from "./index.es243.js";
3
- import { transformer as V } from "./index.es197.js";
4
- var I = 16, W = R(30 * U);
5
- function h(e, t) {
6
- return +t ? Y(e, t) : X(e);
7
- }
8
- function X(e) {
9
- return V({
10
- point: function(t, D) {
11
- t = e(t, D), this.stream.point(t[0], t[1]);
12
- }
13
- });
1
+ import { deepEqual as a } from "./index.es206.js";
2
+ function g(i) {
3
+ return {
4
+ longitude: i.center.lng,
5
+ latitude: i.center.lat,
6
+ zoom: i.zoom,
7
+ pitch: i.pitch,
8
+ bearing: i.bearing,
9
+ padding: i.padding
10
+ };
14
11
  }
15
- function Y(e, t) {
16
- function D(i, P, q, L, M, T, w, $, r, u, l, c, s, n) {
17
- var E = w - i, S = $ - P, v = E * E + S * S;
18
- if (v > 4 * t && s--) {
19
- var p = L + u, a = M + l, g = T + c, y = Q(p * p + a * a + g * g), o = O(g /= y), f = B(B(g) - 1) < H || B(q - r) < H ? (q + r) / 2 : K(a, p), k = e(f, o), N = k[0], A = k[1], C = N - i, F = A - P, G = S * C - E * F;
20
- (G * G / v > t || B((E * C + S * F) / v - 0.5) > 0.3 || L * u + M * l + T * c < W) && (D(i, P, q, L, M, T, N, A, f, p /= y, a /= y, g, s, n), n.point(N, A), D(N, A, f, p, a, g, w, $, r, u, l, c, s, n));
21
- }
12
+ function c(i, t) {
13
+ const n = t.viewState || t, e = {};
14
+ if ("longitude" in n && "latitude" in n && (n.longitude !== i.center.lng || n.latitude !== i.center.lat)) {
15
+ const o = i.center.constructor;
16
+ e.center = new o(n.longitude, n.latitude);
22
17
  }
23
- return function(i) {
24
- var P, q, L, M, T, w, $, r, u, l, c, s, n = {
25
- point: E,
26
- lineStart: S,
27
- lineEnd: p,
28
- polygonStart: function() {
29
- i.polygonStart(), n.lineStart = a;
30
- },
31
- polygonEnd: function() {
32
- i.polygonEnd(), n.lineStart = S;
33
- }
34
- };
35
- function E(o, f) {
36
- o = e(o, f), i.point(o[0], o[1]);
37
- }
38
- function S() {
39
- r = NaN, n.point = v, i.lineStart();
40
- }
41
- function v(o, f) {
42
- var k = J([o, f]), N = e(o, f);
43
- D(r, u, $, l, c, s, r = N[0], u = N[1], $ = o, l = k[0], c = k[1], s = k[2], I, i), i.point(r, u);
44
- }
45
- function p() {
46
- n.point = E, i.lineEnd();
47
- }
48
- function a() {
49
- S(), n.point = g, n.lineEnd = y;
50
- }
51
- function g(o, f) {
52
- v(P = o, f), q = r, L = u, M = l, T = c, w = s, n.point = v;
53
- }
54
- function y() {
55
- D(r, u, $, l, c, s, q, L, P, M, T, w, I, i), n.lineEnd = p, p();
56
- }
57
- return n;
58
- };
18
+ return "zoom" in n && n.zoom !== i.zoom && (e.zoom = n.zoom), "bearing" in n && n.bearing !== i.bearing && (e.bearing = n.bearing), "pitch" in n && n.pitch !== i.pitch && (e.pitch = n.pitch), n.padding && i.padding && !a(n.padding, i.padding) && (e.padding = n.padding), e;
59
19
  }
60
20
  export {
61
- h as default
21
+ c as applyViewStateToTransform,
22
+ g as transformToViewState
62
23
  };
63
24
  //# sourceMappingURL=index.es256.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.es256.js","sources":["../../../node_modules/d3-geo/src/projection/resample.js"],"sourcesContent":["import {cartesian} from \"../cartesian\";\nimport {abs, asin, atan2, cos, epsilon, radians, sqrt} from \"../math\";\nimport {transformer} from \"../transform\";\n\nvar maxDepth = 16, // maximum depth of subdivision\n cosMinDistance = cos(30 * radians); // cos(minimum angular distance)\n\nexport default function(project, delta2) {\n return +delta2 ? resample(project, delta2) : resampleNone(project);\n}\n\nfunction resampleNone(project) {\n return transformer({\n point: function(x, y) {\n x = project(x, y);\n this.stream.point(x[0], x[1]);\n }\n });\n}\n\nfunction resample(project, delta2) {\n\n function resampleLineTo(x0, y0, lambda0, a0, b0, c0, x1, y1, lambda1, a1, b1, c1, depth, stream) {\n var dx = x1 - x0,\n dy = y1 - y0,\n d2 = dx * dx + dy * dy;\n if (d2 > 4 * delta2 && depth--) {\n var a = a0 + a1,\n b = b0 + b1,\n c = c0 + c1,\n m = sqrt(a * a + b * b + c * c),\n phi2 = asin(c /= m),\n lambda2 = abs(abs(c) - 1) < epsilon || abs(lambda0 - lambda1) < epsilon ? (lambda0 + lambda1) / 2 : atan2(b, a),\n p = project(lambda2, phi2),\n x2 = p[0],\n y2 = p[1],\n dx2 = x2 - x0,\n dy2 = y2 - y0,\n dz = dy * dx2 - dx * dy2;\n if (dz * dz / d2 > delta2 // perpendicular projected distance\n || abs((dx * dx2 + dy * dy2) / d2 - 0.5) > 0.3 // midpoint close to an end\n || a0 * a1 + b0 * b1 + c0 * c1 < cosMinDistance) { // angular distance\n resampleLineTo(x0, y0, lambda0, a0, b0, c0, x2, y2, lambda2, a /= m, b /= m, c, depth, stream);\n stream.point(x2, y2);\n resampleLineTo(x2, y2, lambda2, a, b, c, x1, y1, lambda1, a1, b1, c1, depth, stream);\n }\n }\n }\n return function(stream) {\n var lambda00, x00, y00, a00, b00, c00, // first point\n lambda0, x0, y0, a0, b0, c0; // previous point\n\n var resampleStream = {\n point: point,\n lineStart: lineStart,\n lineEnd: lineEnd,\n polygonStart: function() { stream.polygonStart(); resampleStream.lineStart = ringStart; },\n polygonEnd: function() { stream.polygonEnd(); resampleStream.lineStart = lineStart; }\n };\n\n function point(x, y) {\n x = project(x, y);\n stream.point(x[0], x[1]);\n }\n\n function lineStart() {\n x0 = NaN;\n resampleStream.point = linePoint;\n stream.lineStart();\n }\n\n function linePoint(lambda, phi) {\n var c = cartesian([lambda, phi]), p = project(lambda, phi);\n resampleLineTo(x0, y0, lambda0, a0, b0, c0, x0 = p[0], y0 = p[1], lambda0 = lambda, a0 = c[0], b0 = c[1], c0 = c[2], maxDepth, stream);\n stream.point(x0, y0);\n }\n\n function lineEnd() {\n resampleStream.point = point;\n stream.lineEnd();\n }\n\n function ringStart() {\n lineStart();\n resampleStream.point = ringPoint;\n resampleStream.lineEnd = ringEnd;\n }\n\n function ringPoint(lambda, phi) {\n linePoint(lambda00 = lambda, phi), x00 = x0, y00 = y0, a00 = a0, b00 = b0, c00 = c0;\n resampleStream.point = linePoint;\n }\n\n function ringEnd() {\n resampleLineTo(x0, y0, lambda0, a0, b0, c0, x00, y00, lambda00, a00, b00, c00, maxDepth, stream);\n resampleStream.lineEnd = lineEnd;\n lineEnd();\n }\n\n return resampleStream;\n };\n}\n"],"names":["maxDepth","cosMinDistance","cos","radians","resample","project","delta2","resampleNone","transformer","x","y","resampleLineTo","x0","y0","lambda0","a0","b0","c0","x1","y1","lambda1","a1","b1","c1","depth","stream","dx","dy","d2","a","b","c","m","sqrt","phi2","asin","lambda2","abs","epsilon","atan2","p","x2","y2","dx2","dy2","dz","lambda00","x00","y00","a00","b00","c00","resampleStream","point","lineStart","lineEnd","ringStart","linePoint","lambda","phi","cartesian","ringPoint","ringEnd"],"mappings":";;;AAIA,IAAIA,IAAW,IACXC,IAAiBC,EAAI,KAAKC,CAAO;AAErC,SAAAC,EAAwBC,GAASC,GAAQ;AACvC,SAAO,CAACA,IAASF,EAASC,GAASC,CAAM,IAAIC,EAAaF,CAAO;AACnE;AAEA,SAASE,EAAaF,GAAS;AAC7B,SAAOG,EAAY;AAAA,IACjB,OAAO,SAASC,GAAGC,GAAG;AACpB,MAAAD,IAAIJ,EAAQI,GAAGC,CAAC,GAChB,KAAK,OAAO,MAAMD,EAAE,CAAC,GAAGA,EAAE,CA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EAAUH,GAAQC,GAAK;AAC9B,MAAAF,EAAUX,IAAWY,GAAQC,CAAG,GAAGZ,IAAMnC,GAAIoC,IAAMnC,GAAIoC,IAAMlC,GAAImC,IAAMlC,GAAImC,IAAMlC,GACjFmC,EAAe,QAAQK;AAAA,IACzB;AAEA,aAASK,IAAU;AACjB,MAAAnD,EAAeC,GAAIC,GAAIC,GAASC,GAAIC,GAAIC,GAAI8B,GAAKC,GAAKF,GAAUG,GAAKC,GAAKC,GAAKnD,GAAUyB,CAAM,GAC/F2B,EAAe,UAAUG,GACzBA,EAAA;AAAA,IACF;AAEA,WAAOH;AAAA,EACT;AACF;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"index.es256.js","sources":["../../../node_modules/@vis.gl/react-maplibre/dist/utils/transform.js"],"sourcesContent":["import { deepEqual } from \"./deep-equal.js\";\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 * Applies requested view state to a transform\n * @returns an object containing detected changes\n */\nexport function applyViewStateToTransform(\n/** An object that describes Maplibre's camera state */\ntr, \n/** Props from Map component */\nprops) {\n const v = props.viewState || props;\n const changes = {};\n if ('longitude' in v &&\n 'latitude' in v &&\n (v.longitude !== tr.center.lng || v.latitude !== tr.center.lat)) {\n const LngLat = tr.center.constructor;\n // @ts-expect-error we should not import LngLat class from maplibre-gl because we don't know the source of mapLib\n changes.center = new LngLat(v.longitude, v.latitude);\n }\n if ('zoom' in v && v.zoom !== tr.zoom) {\n changes.zoom = v.zoom;\n }\n if ('bearing' in v && v.bearing !== tr.bearing) {\n changes.bearing = v.bearing;\n }\n if ('pitch' in v && v.pitch !== tr.pitch) {\n changes.pitch = v.pitch;\n }\n if (v.padding && tr.padding && !deepEqual(v.padding, tr.padding)) {\n changes.padding = v.padding;\n }\n return changes;\n}\n//# sourceMappingURL=transform.js.map"],"names":["transformToViewState","tr","applyViewStateToTransform","props","v","changes","LngLat","deepEqual"],"mappings":";AAMO,SAASA,EAAqBC,GAAI;AACrC,SAAO;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;AAMO,SAASC,EAEhBD,GAEAE,GAAO;AACH,QAAMC,IAAID,EAAM,aAAaA,GACvBE,IAAU,CAAA;AAChB,MAAI,eAAeD,KACf,cAAcA,MACbA,EAAE,cAAcH,EAAG,OAAO,OAAOG,EAAE,aAAaH,EAAG,OAAO,MAAM;AACjE,UAAMK,IAASL,EAAG,OAAO;AAEzB,IAAAI,EAAQ,SAAS,IAAIC,EAAOF,EAAE,WAAWA,EAAE,QAAQ;AAAA,EACvD;AACA,SAAI,UAAUA,KAAKA,EAAE,SAASH,EAAG,SAC7BI,EAAQ,OAAOD,EAAE,OAEjB,aAAaA,KAAKA,EAAE,YAAYH,EAAG,YACnCI,EAAQ,UAAUD,EAAE,UAEpB,WAAWA,KAAKA,EAAE,UAAUH,EAAG,UAC/BI,EAAQ,QAAQD,EAAE,QAElBA,EAAE,WAAWH,EAAG,WAAW,CAACM,EAAUH,EAAE,SAASH,EAAG,OAAO,MAC3DI,EAAQ,UAAUD,EAAE,UAEjBC;AACX;","x_google_ignoreList":[0]}
@@ -1,53 +1,26 @@
1
- function l(n, i) {
2
- n && f.hasOwnProperty(n.type) && f[n.type](n, i);
3
- }
4
- var u = {
5
- Feature: function(n, i) {
6
- l(n.geometry, i);
7
- },
8
- FeatureCollection: function(n, i) {
9
- for (var e = n.features, t = -1, o = e.length; ++t < o; ) l(e[t].geometry, i);
10
- }
11
- }, f = {
12
- Sphere: function(n, i) {
13
- i.sphere();
14
- },
15
- Point: function(n, i) {
16
- n = n.coordinates, i.point(n[0], n[1], n[2]);
17
- },
18
- MultiPoint: function(n, i) {
19
- for (var e = n.coordinates, t = -1, o = e.length; ++t < o; ) n = e[t], i.point(n[0], n[1], n[2]);
20
- },
21
- LineString: function(n, i) {
22
- a(n.coordinates, i, 0);
23
- },
24
- MultiLineString: function(n, i) {
25
- for (var e = n.coordinates, t = -1, o = e.length; ++t < o; ) a(e[t], i, 0);
26
- },
27
- Polygon: function(n, i) {
28
- h(n.coordinates, i);
29
- },
30
- MultiPolygon: function(n, i) {
31
- for (var e = n.coordinates, t = -1, o = e.length; ++t < o; ) h(e[t], i);
32
- },
33
- GeometryCollection: function(n, i) {
34
- for (var e = n.geometries, t = -1, o = e.length; ++t < o; ) l(e[t], i);
35
- }
36
- };
37
- function a(n, i, e) {
38
- var t = -1, o = n.length - e, r;
39
- for (i.lineStart(); ++t < o; ) r = n[t], i.point(r[0], r[1], r[2]);
40
- i.lineEnd();
41
- }
42
- function h(n, i) {
43
- var e = -1, t = n.length;
44
- for (i.polygonStart(); ++e < t; ) a(n[e], i, 1);
45
- i.polygonEnd();
46
- }
47
- function g(n, i) {
48
- n && u.hasOwnProperty(n.type) ? u[n.type](n, i) : l(n, i);
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 };
49
22
  }
50
23
  export {
51
- g as default
24
+ c as normalizeStyle
52
25
  };
53
26
  //# sourceMappingURL=index.es257.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.es257.js","sources":["../../../node_modules/d3-geo/src/stream.js"],"sourcesContent":["function streamGeometry(geometry, stream) {\n if (geometry && streamGeometryType.hasOwnProperty(geometry.type)) {\n streamGeometryType[geometry.type](geometry, stream);\n }\n}\n\nvar streamObjectType = {\n Feature: function(object, stream) {\n streamGeometry(object.geometry, stream);\n },\n FeatureCollection: function(object, stream) {\n var features = object.features, i = -1, n = features.length;\n while (++i < n) streamGeometry(features[i].geometry, stream);\n }\n};\n\nvar streamGeometryType = {\n Sphere: function(object, stream) {\n stream.sphere();\n },\n Point: function(object, stream) {\n object = object.coordinates;\n stream.point(object[0], object[1], object[2]);\n },\n MultiPoint: function(object, stream) {\n var coordinates = object.coordinates, i = -1, n = coordinates.length;\n while (++i < n) object = coordinates[i], stream.point(object[0], object[1], object[2]);\n },\n LineString: function(object, stream) {\n streamLine(object.coordinates, stream, 0);\n },\n MultiLineString: function(object, stream) {\n var coordinates = object.coordinates, i = -1, n = coordinates.length;\n while (++i < n) streamLine(coordinates[i], stream, 0);\n },\n Polygon: function(object, stream) {\n streamPolygon(object.coordinates, stream);\n },\n MultiPolygon: function(object, stream) {\n var coordinates = object.coordinates, i = -1, n = coordinates.length;\n while (++i < n) streamPolygon(coordinates[i], stream);\n },\n GeometryCollection: function(object, stream) {\n var geometries = object.geometries, i = -1, n = geometries.length;\n while (++i < n) streamGeometry(geometries[i], stream);\n }\n};\n\nfunction streamLine(coordinates, stream, closed) {\n var i = -1, n = coordinates.length - closed, coordinate;\n stream.lineStart();\n while (++i < n) coordinate = coordinates[i], stream.point(coordinate[0], coordinate[1], coordinate[2]);\n stream.lineEnd();\n}\n\nfunction streamPolygon(coordinates, stream) {\n var i = -1, n = coordinates.length;\n stream.polygonStart();\n while (++i < n) streamLine(coordinates[i], stream, 1);\n stream.polygonEnd();\n}\n\nexport default function(object, stream) {\n if (object && streamObjectType.hasOwnProperty(object.type)) {\n streamObjectType[object.type](object, stream);\n } else {\n streamGeometry(object, stream);\n }\n}\n"],"names":["streamGeometry","geometry","stream","streamGeometryType","streamObjectType","object","features","i","n","coordinates","streamLine","streamPolygon","geometries","closed","coordinate","geoStream"],"mappings":"AAAA,SAASA,EAAeC,GAAUC,GAAQ;AACxC,EAAID,KAAYE,EAAmB,eAAeF,EAAS,IAAI,KAC7DE,EAAmBF,EAAS,IAAI,EAAEA,GAAUC,CAAM;AAEtD;AAEA,IAAIE,IAAmB;AAAA,EACrB,SAAS,SAASC,GAAQH,GAAQ;AAChC,IAAAF,EAAeK,EAAO,UAAUH,CAAM;AAAA,EACxC;AAAA,EACA,mBAAmB,SAASG,GAAQH,GAAQ;AAE1C,aADII,IAAWD,EAAO,UAAUE,IAAI,IAAIC,IAAIF,EAAS,QAC9C,EAAEC,IAAIC,IAAG,CAAAR,EAAeM,EAASC,CAAC,EAAE,UAAUL,CAAM;AAAA,EAC7D;AACF,GAEIC,IAAqB;AAAA,EACvB,QAAQ,SAASE,GAAQH,GAAQ;AAC/B,IAAAA,EAAO,OAAA;AAAA,EACT;AAAA,EACA,OAAO,SAASG,GAAQH,GAAQ;AAC9B,IAAAG,IAASA,EAAO,aAChBH,EAAO,MAAMG,EAAO,CAAC,GAAGA,EAAO,CAAC,GAAGA,EAAO,CAAC,CAAC;AAAA,EAC9C;AAAA,EACA,YAAY,SAASA,GAAQH,GAAQ;AAEnC,aADIO,IAAcJ,EAAO,aAAaE,IAAI,IAAIC,IAAIC,EAAY,QACvD,EAAEF,IAAIC,IAAG,CAAAH,IAASI,EAAYF,CAAC,GAAGL,EAAO,MAAMG,EAAO,CAAC,GAAGA,EAAO,CAAC,GAAGA,EAAO,CAAC,CAAC;AAAA,EACvF;AAAA,EACA,YAAY,SAASA,GAAQH,GAAQ;AACnC,IAAAQ,EAAWL,EAAO,aAAaH,GAAQ,CAAC;AAAA,EAC1C;AAAA,EACA,iBAAiB,SAASG,GAAQH,GAAQ;AAExC,aADIO,IAAcJ,EAAO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,"file":"index.es257.js","sources":["../../../node_modules/@vis.gl/react-maplibre/dist/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;AACD,WAAO;AAQX,MANI,OAAOA,KAAU,aAGjB,UAAUA,MACVA,IAAQA,EAAM,KAAA,IAEd,CAACA,EAAM;AACP,WAAOA;AAEX,QAAMC,IAAa,CAAA;AACnB,aAAWC,KAASF,EAAM;AACtB,IAAAC,EAAWC,EAAM,EAAE,IAAIA;AAE3B,QAAMC,IAASH,EAAM,OAAO,IAAI,CAAAE,MAAS;AACrC,QAAIE,IAAkB;AACtB,IAAI,iBAAiBF,MACjBE,IAAkB,OAAO,OAAO,CAAA,GAAIF,CAAK,GAGzC,OAAOE,EAAgB;AAI3B,UAAMC,IAAWJ,EAAWC,EAAM,GAAG;AACrC,QAAIG,GAAU;AACV,MAAAD,IAAkBA,KAAmB,OAAO,OAAO,CAAA,GAAIF,CAAK,GAE5D,OAAOE,EAAgB;AAEvB,iBAAWE,KAAYR;AACnB,QAAIQ,KAAYD,MACZD,EAAgBE,CAAQ,IAAID,EAASC,CAAQ;AAAA,IAGzD;AACA,WAAOF,KAAmBF;AAAA,EAC9B,CAAC;AAED,SAAO,EAAE,GAAGF,GAAO,QAAAG,EAAA;AACvB;","x_google_ignoreList":[0]}
@@ -1,9 +1,11 @@
1
- function t(r) {
2
- return function(n) {
3
- return n?.[r];
1
+ import { MAX_ARRAY_INDEX as o } from "./index.es36.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.es259.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.es259.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,WAA8BA,IAAID,CAAG;AAAA,EACvC;AACF;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"index.es259.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;AAC1B,QAAIC,IAAeF,EAAgBC,CAAU;AAC7C,WAAO,OAAOC,KAAgB,YAAYA,KAAgB,KAAKA,KAAgBC;AAAA,EACjF;AACF;","x_google_ignoreList":[0]}
@@ -1,11 +1,9 @@
1
- import { MAX_ARRAY_INDEX as o } from "./index.es36.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?.[r];
6
4
  };
7
5
  }
8
6
  export {
9
- u as default
7
+ t as default
10
8
  };
11
9
  //# sourceMappingURL=index.es260.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.es260.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;AAC1B,QAAIC,IAAeF,EAAgBC,CAAU;AAC7C,WAAO,OAAOC,KAAgB,YAAYA,KAAgB,KAAKA,KAAgBC;AAAA,EACjF;AACF;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"index.es260.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,WAA8BA,IAAID,CAAG;AAAA,EACvC;AACF;","x_google_ignoreList":[0]}
@@ -1,9 +1,9 @@
1
- import A from "./index.es245.js";
2
- import D from "./index.es247.js";
3
- import { halfPi as S, epsilon as R } from "./index.es243.js";
1
+ import A from "./index.es243.js";
2
+ import D from "./index.es245.js";
3
+ import { halfPi as S, epsilon as R } from "./index.es241.js";
4
4
  import F from "./index.es193.js";
5
5
  import "./index.es192.js";
6
- import G from "./index.es248.js";
6
+ import G from "./index.es246.js";
7
7
  function T(e, p, m, v) {
8
8
  return function(g, n) {
9
9
  var d = p(n), j = g.invert(v[0], v[1]), h = A(), c = p(h), l = !1, a, f, u, r = {
@@ -1,4 +1,4 @@
1
- import { abs as n, epsilon as r } from "./index.es243.js";
1
+ import { abs as n, epsilon as r } from "./index.es241.js";
2
2
  function i(o, t) {
3
3
  return n(o[0] - t[0]) < r && n(o[1] - t[1]) < r;
4
4
  }
@@ -1,4 +1,4 @@
1
- import { __require as r } from "./index.es76.js";
1
+ import { __require as r } from "./index.es73.js";
2
2
  var i = r();
3
3
  export {
4
4
  i as j
@@ -1,5 +1,5 @@
1
- import { getDefaultExportFromCjs as f } from "./index.es72.js";
2
- import { __require as n } from "./index.es74.js";
1
+ import { getDefaultExportFromCjs as f } from "./index.es78.js";
2
+ import { __require as n } from "./index.es71.js";
3
3
  function s(t, i) {
4
4
  for (var o = 0; o < i.length; o++) {
5
5
  const e = i[o];
@@ -1 +1 @@
1
- {"version":3,"file":"index.es7.js","sources":["../src/components/MapControl.js"],"sourcesContent":["// @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 { type MapboxMap, useControl } from 'react-map-gl/maplibre';\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"],"names":["IControlImpl","redraw","map","MapControl","props","setVersion","useState","forceUpdate","useCallback","v","ctrl","useControl","children","Children","_","child","cloneElement","useEffect","createPortal"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiBA,MAAMA,EAAiC;AAAA,EACrC,OAAkB;AAAA,EAClB;AAAA,EACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOA,YAAYC,GAAoB;AAC9B,SAAK,UAAUA;AAAA,EACjB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EASA,MAAMC,GAAK;AACT,gBAAK,OAAOA,GACZA,EAAI,GAAG,QAAQ,KAAK,OAAO,GAE3B,KAAK,aAAa,SAAS,cAAc,KAAK,GAC9C,KAAK,WAAW,YAAY,yCAC5B,KAAK,QAAA,GACE,KAAK;AAAA,EACd;AAAA;AAAA;AAAA;AAAA,EAKA,WAAW;AACT,SAAK,WAAW,OAAA,GAChB,KAAK,KAAK,IAAI,QAAQ,KAAK,OAAO,GAClC,KAAK,OAAO;AAAA,EACd;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOA,SAAS;AACP,WAAO,KAAK;AAAA,EACd;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOA,aAAa;AACX,WAAO,KAAK;AAAA,EACd;AACF;AAEA,MAAMC,KAAa,CAACC,MAAU;AAC5B,QAAM,GAAGC,CAAU,IAAIC,EAAS,CAAC,GAO3BC,IAAcC,EAAY,MAAMH,EAAW,CAACI,MAAMA,IAAI,CAAC,GAAG,EAAE,GAO5DC,IAAOC,EAAW,MAAM,IAAIX,EAAaO,CAAW,GAAG,EAAE,UAAUH,EAAM,UAAU,GAOnFF,IAAMQ,EAAK,OAAA,GAOXE,IAAWC,EAAS,IAAIC,EAAE,QAAQD,EAAS,QAAQT,EAAM,QAAQ,CAAC,GAAG,CAACW,MAAUC,EAAaD,GAAO,EAAE,KAAAb,EAAA,CAAK,CAAC;AAKlH,SAAAe,EAAU,MAAM;AACd,IAAIb,EAAM,WAERA,EAAM,OAAO,UAAUF;AAAA,EAE3B,GAAG,CAACA,GAAKE,EAAM,MAAM,CAAC,GAEfF,KAAOgB,EAAaN,GAAUF,EAAK,YAAY;AACxD;"}
1
+ {"version":3,"file":"index.es7.js","sources":["../src/components/MapControl.js"],"sourcesContent":["// @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 { type MapboxMap, useControl } from 'react-map-gl/maplibre';\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 props.mapRef.current = map;\n }\n }, [map, props.mapRef]);\n\n return map && createPortal(children, ctrl.getElement());\n};\n\nexport default MapControl;\n"],"names":["IControlImpl","redraw","map","MapControl","props","setVersion","useState","forceUpdate","useCallback","v","ctrl","useControl","children","Children","_","child","cloneElement","useEffect","createPortal"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiBA,MAAMA,EAAiC;AAAA,EACrC,OAAkB;AAAA,EAClB;AAAA,EACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOA,YAAYC,GAAoB;AAC9B,SAAK,UAAUA;AAAA,EACjB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EASA,MAAMC,GAAK;AACT,gBAAK,OAAOA,GACZA,EAAI,GAAG,QAAQ,KAAK,OAAO,GAE3B,KAAK,aAAa,SAAS,cAAc,KAAK,GAC9C,KAAK,WAAW,YAAY,yCAC5B,KAAK,QAAA,GACE,KAAK;AAAA,EACd;AAAA;AAAA;AAAA;AAAA,EAKA,WAAW;AACT,SAAK,WAAW,OAAA,GAChB,KAAK,KAAK,IAAI,QAAQ,KAAK,OAAO,GAClC,KAAK,OAAO;AAAA,EACd;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOA,SAAS;AACP,WAAO,KAAK;AAAA,EACd;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOA,aAAa;AACX,WAAO,KAAK;AAAA,EACd;AACF;AAEA,MAAMC,KAAa,CAACC,MAAU;AAC5B,QAAM,GAAGC,CAAU,IAAIC,EAAS,CAAC,GAO3BC,IAAcC,EAAY,MAAMH,EAAW,CAACI,MAAMA,IAAI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