@performant-software/geospatial 3.1.7-beta.4 → 3.1.7

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 (220) hide show
  1. package/dist/index.cjs14.js +1 -1
  2. package/dist/index.cjs15.js +1 -1
  3. package/dist/index.cjs16.js +1 -1
  4. package/dist/index.cjs17.js +1 -1
  5. package/dist/index.cjs18.js +1 -1
  6. package/dist/index.cjs186.js +1 -1
  7. package/dist/index.cjs186.js.map +1 -1
  8. package/dist/index.cjs187.js +1 -1
  9. package/dist/index.cjs187.js.map +1 -1
  10. package/dist/index.cjs188.js +1 -1
  11. package/dist/index.cjs188.js.map +1 -1
  12. package/dist/index.cjs189.js +1 -1
  13. package/dist/index.cjs189.js.map +1 -1
  14. package/dist/index.cjs19.js +1 -1
  15. package/dist/index.cjs190.js +1 -1
  16. package/dist/index.cjs190.js.map +1 -1
  17. package/dist/index.cjs191.js +1 -1
  18. package/dist/index.cjs191.js.map +1 -1
  19. package/dist/index.cjs192.js +1 -1
  20. package/dist/index.cjs192.js.map +1 -1
  21. package/dist/index.cjs193.js +1 -1
  22. package/dist/index.cjs193.js.map +1 -1
  23. package/dist/index.cjs194.js +1 -1
  24. package/dist/index.cjs194.js.map +1 -1
  25. package/dist/index.cjs195.js +1 -1
  26. package/dist/index.cjs195.js.map +1 -1
  27. package/dist/index.cjs196.js +1 -1
  28. package/dist/index.cjs196.js.map +1 -1
  29. package/dist/index.cjs197.js +1 -1
  30. package/dist/index.cjs197.js.map +1 -1
  31. package/dist/index.cjs198.js +1 -1
  32. package/dist/index.cjs198.js.map +1 -1
  33. package/dist/index.cjs199.js +1 -1
  34. package/dist/index.cjs199.js.map +1 -1
  35. package/dist/index.cjs20.js +1 -1
  36. package/dist/index.cjs200.js +1 -1
  37. package/dist/index.cjs200.js.map +1 -1
  38. package/dist/index.cjs201.js +1 -1
  39. package/dist/index.cjs201.js.map +1 -1
  40. package/dist/index.cjs202.js +1 -1
  41. package/dist/index.cjs202.js.map +1 -1
  42. package/dist/index.cjs203.js +1 -1
  43. package/dist/index.cjs203.js.map +1 -1
  44. package/dist/index.cjs204.js +1 -1
  45. package/dist/index.cjs204.js.map +1 -1
  46. package/dist/index.cjs205.js +1 -1
  47. package/dist/index.cjs205.js.map +1 -1
  48. package/dist/index.cjs206.js +1 -1
  49. package/dist/index.cjs206.js.map +1 -1
  50. package/dist/index.cjs207.js +1 -1
  51. package/dist/index.cjs207.js.map +1 -1
  52. package/dist/index.cjs208.js +1 -1
  53. package/dist/index.cjs208.js.map +1 -1
  54. package/dist/index.cjs21.js +1 -1
  55. package/dist/index.cjs22.js +1 -1
  56. package/dist/index.cjs23.js +1 -1
  57. package/dist/index.cjs236.js +7 -1
  58. package/dist/index.cjs236.js.map +1 -1
  59. package/dist/index.cjs237.js +1 -1
  60. package/dist/index.cjs237.js.map +1 -1
  61. package/dist/index.cjs238.js +1 -7
  62. package/dist/index.cjs238.js.map +1 -1
  63. package/dist/index.cjs239.js +1 -1
  64. package/dist/index.cjs239.js.map +1 -1
  65. package/dist/index.cjs24.js +1 -1
  66. package/dist/index.cjs244.js +1 -1
  67. package/dist/index.cjs247.js +1 -1
  68. package/dist/index.cjs250.js +1 -1
  69. package/dist/index.cjs253.js +1 -1
  70. package/dist/index.cjs255.js +1 -1
  71. package/dist/index.cjs258.js +1 -1
  72. package/dist/index.cjs259.js +1 -1
  73. package/dist/index.cjs262.js +1 -1
  74. package/dist/index.cjs262.js.map +1 -1
  75. package/dist/index.cjs263.js +1 -1
  76. package/dist/index.cjs263.js.map +1 -1
  77. package/dist/index.cjs264.js +1 -1
  78. package/dist/index.cjs27.js +1 -1
  79. package/dist/index.cjs28.js +1 -1
  80. package/dist/index.cjs29.js +1 -1
  81. package/dist/index.cjs31.js +1 -1
  82. package/dist/index.cjs33.js +1 -1
  83. package/dist/index.cjs34.js +1 -1
  84. package/dist/index.cjs68.js +1 -1
  85. package/dist/index.cjs70.js +1 -1
  86. package/dist/index.cjs71.js +1 -743
  87. package/dist/index.cjs71.js.map +1 -1
  88. package/dist/index.cjs72.js +1 -1
  89. package/dist/index.cjs73.js +1 -1
  90. package/dist/index.cjs73.js.map +1 -1
  91. package/dist/index.cjs74.js +1 -1
  92. package/dist/index.cjs74.js.map +1 -1
  93. package/dist/index.cjs75.js +1 -9
  94. package/dist/index.cjs75.js.map +1 -1
  95. package/dist/index.cjs76.js +3 -11
  96. package/dist/index.cjs76.js.map +1 -1
  97. package/dist/index.cjs77.js +17 -1
  98. package/dist/index.cjs77.js.map +1 -1
  99. package/dist/index.cjs78.js +1 -1
  100. package/dist/index.cjs78.js.map +1 -1
  101. package/dist/index.cjs79.js +1 -1
  102. package/dist/index.cjs79.js.map +1 -1
  103. package/dist/index.cjs8.js +1 -1
  104. package/dist/index.cjs8.js.map +1 -1
  105. package/dist/index.cjs80.js +743 -1
  106. package/dist/index.cjs80.js.map +1 -1
  107. package/dist/index.cjs81.js +1 -1
  108. package/dist/index.cjs81.js.map +1 -1
  109. package/dist/index.es14.js +2 -2
  110. package/dist/index.es15.js +4 -4
  111. package/dist/index.es16.js +3 -3
  112. package/dist/index.es17.js +3 -3
  113. package/dist/index.es18.js +1 -1
  114. package/dist/index.es186.js +144 -239
  115. package/dist/index.es186.js.map +1 -1
  116. package/dist/index.es187.js +6 -42
  117. package/dist/index.es187.js.map +1 -1
  118. package/dist/index.es188.js +5 -3
  119. package/dist/index.es188.js.map +1 -1
  120. package/dist/index.es189.js +3 -13
  121. package/dist/index.es189.js.map +1 -1
  122. package/dist/index.es19.js +1 -1
  123. package/dist/index.es190.js +3 -13
  124. package/dist/index.es190.js.map +1 -1
  125. package/dist/index.es191.js +33 -28
  126. package/dist/index.es191.js.map +1 -1
  127. package/dist/index.es192.js +3 -16
  128. package/dist/index.es192.js.map +1 -1
  129. package/dist/index.es193.js +22 -4
  130. package/dist/index.es193.js.map +1 -1
  131. package/dist/index.es194.js +2 -150
  132. package/dist/index.es194.js.map +1 -1
  133. package/dist/index.es195.js +3 -9
  134. package/dist/index.es195.js.map +1 -1
  135. package/dist/index.es196.js +2 -7
  136. package/dist/index.es196.js.map +1 -1
  137. package/dist/index.es197.js +33 -3
  138. package/dist/index.es197.js.map +1 -1
  139. package/dist/index.es198.js +14 -2
  140. package/dist/index.es198.js.map +1 -1
  141. package/dist/index.es199.js +13 -35
  142. package/dist/index.es199.js.map +1 -1
  143. package/dist/index.es20.js +1 -1
  144. package/dist/index.es200.js +11 -3
  145. package/dist/index.es200.js.map +1 -1
  146. package/dist/index.es201.js +242 -22
  147. package/dist/index.es201.js.map +1 -1
  148. package/dist/index.es202.js +45 -2
  149. package/dist/index.es202.js.map +1 -1
  150. package/dist/index.es203.js +5 -3
  151. package/dist/index.es203.js.map +1 -1
  152. package/dist/index.es204.js +13 -2
  153. package/dist/index.es204.js.map +1 -1
  154. package/dist/index.es205.js +10 -30
  155. package/dist/index.es205.js.map +1 -1
  156. package/dist/index.es206.js +31 -13
  157. package/dist/index.es206.js.map +1 -1
  158. package/dist/index.es207.js +13 -13
  159. package/dist/index.es207.js.map +1 -1
  160. package/dist/index.es208.js +4 -8
  161. package/dist/index.es208.js.map +1 -1
  162. package/dist/index.es21.js +1 -1
  163. package/dist/index.es22.js +1 -1
  164. package/dist/index.es23.js +1 -1
  165. package/dist/index.es236.js +7506 -20
  166. package/dist/index.es236.js.map +1 -1
  167. package/dist/index.es237.js +2 -23
  168. package/dist/index.es237.js.map +1 -1
  169. package/dist/index.es238.js +20 -7506
  170. package/dist/index.es238.js.map +1 -1
  171. package/dist/index.es239.js +23 -2
  172. package/dist/index.es239.js.map +1 -1
  173. package/dist/index.es24.js +1 -1
  174. package/dist/index.es244.js +1 -1
  175. package/dist/index.es247.js +1 -1
  176. package/dist/index.es250.js +1 -1
  177. package/dist/index.es253.js +2 -2
  178. package/dist/index.es255.js +1 -1
  179. package/dist/index.es258.js +1 -1
  180. package/dist/index.es259.js +1 -1
  181. package/dist/index.es262.js +4 -15
  182. package/dist/index.es262.js.map +1 -1
  183. package/dist/index.es263.js +15 -4
  184. package/dist/index.es263.js.map +1 -1
  185. package/dist/index.es264.js +2 -2
  186. package/dist/index.es27.js +1 -1
  187. package/dist/index.es28.js +2 -2
  188. package/dist/index.es29.js +2 -2
  189. package/dist/index.es31.js +2 -2
  190. package/dist/index.es33.js +2 -2
  191. package/dist/index.es34.js +2 -2
  192. package/dist/index.es68.js +1 -1
  193. package/dist/index.es70.js +12 -12
  194. package/dist/index.es71.js +1954 -21313
  195. package/dist/index.es71.js.map +1 -1
  196. package/dist/index.es72.js +6 -2
  197. package/dist/index.es72.js.map +1 -1
  198. package/dist/index.es73.js +2 -8
  199. package/dist/index.es73.js.map +1 -1
  200. package/dist/index.es74.js +8 -2
  201. package/dist/index.es74.js.map +1 -1
  202. package/dist/index.es75.js +2 -26
  203. package/dist/index.es75.js.map +1 -1
  204. package/dist/index.es76.js +17 -580
  205. package/dist/index.es76.js.map +1 -1
  206. package/dist/index.es77.js +556 -1960
  207. package/dist/index.es77.js.map +1 -1
  208. package/dist/index.es78.js +105 -5
  209. package/dist/index.es78.js.map +1 -1
  210. package/dist/index.es79.js +10 -2
  211. package/dist/index.es79.js.map +1 -1
  212. package/dist/index.es8.js +43 -47
  213. package/dist/index.es8.js.map +1 -1
  214. package/dist/index.es80.js +21350 -104
  215. package/dist/index.es80.js.map +1 -1
  216. package/dist/index.es81.js +2 -10
  217. package/dist/index.es81.js.map +1 -1
  218. package/package.json +1 -1
  219. package/src/components/MapDraw.js +6 -21
  220. package/types/components/MapDraw.js.flow +6 -21
@@ -1 +1 @@
1
- {"version":3,"file":"index.es196.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}
1
+ {"version":3,"file":"index.es196.js","sources":["../../../node_modules/d3-geo/src/path/measure.js"],"sourcesContent":["import adder from \"../adder\";\nimport {sqrt} from \"../math\";\nimport noop from \"../noop\";\n\nvar lengthSum = adder(),\n lengthRing,\n x00,\n y00,\n x0,\n y0;\n\nvar lengthStream = {\n point: noop,\n lineStart: function() {\n lengthStream.point = lengthPointFirst;\n },\n lineEnd: function() {\n if (lengthRing) lengthPoint(x00, y00);\n lengthStream.point = noop;\n },\n polygonStart: function() {\n lengthRing = true;\n },\n polygonEnd: function() {\n lengthRing = null;\n },\n result: function() {\n var length = +lengthSum;\n lengthSum.reset();\n return length;\n }\n};\n\nfunction lengthPointFirst(x, y) {\n lengthStream.point = lengthPoint;\n x00 = x0 = x, y00 = y0 = y;\n}\n\nfunction lengthPoint(x, y) {\n x0 -= x, y0 -= y;\n lengthSum.add(sqrt(x0 * x0 + y0 * y0));\n x0 = x, y0 = y;\n}\n\nexport default lengthStream;\n"],"names":["adder"],"mappings":";AAIgBA,EAAA;","x_google_ignoreList":[0]}
@@ -1,4 +1,34 @@
1
- import r from "./index.es243.js";
2
- r();
3
- r();
1
+ function e(t) {
2
+ return function(n) {
3
+ var r = new o();
4
+ for (var i in t) r[i] = t[i];
5
+ return r.stream = n, r;
6
+ };
7
+ }
8
+ function o() {
9
+ }
10
+ o.prototype = {
11
+ constructor: o,
12
+ point: function(t, n) {
13
+ this.stream.point(t, n);
14
+ },
15
+ sphere: function() {
16
+ this.stream.sphere();
17
+ },
18
+ lineStart: function() {
19
+ this.stream.lineStart();
20
+ },
21
+ lineEnd: function() {
22
+ this.stream.lineEnd();
23
+ },
24
+ polygonStart: function() {
25
+ this.stream.polygonStart();
26
+ },
27
+ polygonEnd: function() {
28
+ this.stream.polygonEnd();
29
+ }
30
+ };
31
+ export {
32
+ e as transformer
33
+ };
4
34
  //# sourceMappingURL=index.es197.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.es197.js","sources":["../../../node_modules/d3-geo/src/area.js"],"sourcesContent":["import adder from \"./adder\";\nimport {atan2, cos, quarterPi, radians, sin, tau} from \"./math\";\nimport noop from \"./noop\";\nimport stream from \"./stream\";\n\nexport var areaRingSum = adder();\n\nvar areaSum = adder(),\n lambda00,\n phi00,\n lambda0,\n cosPhi0,\n sinPhi0;\n\nexport var areaStream = {\n point: noop,\n lineStart: noop,\n lineEnd: noop,\n polygonStart: function() {\n areaRingSum.reset();\n areaStream.lineStart = areaRingStart;\n areaStream.lineEnd = areaRingEnd;\n },\n polygonEnd: function() {\n var areaRing = +areaRingSum;\n areaSum.add(areaRing < 0 ? tau + areaRing : areaRing);\n this.lineStart = this.lineEnd = this.point = noop;\n },\n sphere: function() {\n areaSum.add(tau);\n }\n};\n\nfunction areaRingStart() {\n areaStream.point = areaPointFirst;\n}\n\nfunction areaRingEnd() {\n areaPoint(lambda00, phi00);\n}\n\nfunction areaPointFirst(lambda, phi) {\n areaStream.point = areaPoint;\n lambda00 = lambda, phi00 = phi;\n lambda *= radians, phi *= radians;\n lambda0 = lambda, cosPhi0 = cos(phi = phi / 2 + quarterPi), sinPhi0 = sin(phi);\n}\n\nfunction areaPoint(lambda, phi) {\n lambda *= radians, phi *= radians;\n phi = phi / 2 + quarterPi; // half the angular distance from south pole\n\n // Spherical excess E for a spherical triangle with vertices: south pole,\n // previous point, current point. Uses a formula derived from Cagnoli’s\n // theorem. See Todhunter, Spherical Trig. (1871), Sec. 103, Eq. (2).\n var dLambda = lambda - lambda0,\n sdLambda = dLambda >= 0 ? 1 : -1,\n adLambda = sdLambda * dLambda,\n cosPhi = cos(phi),\n sinPhi = sin(phi),\n k = sinPhi0 * sinPhi,\n u = cosPhi0 * cosPhi + k * cos(adLambda),\n v = k * sdLambda * sin(adLambda);\n areaRingSum.add(atan2(v, u));\n\n // Advance the previous points.\n lambda0 = lambda, cosPhi0 = cosPhi, sinPhi0 = sinPhi;\n}\n\nexport default function(object) {\n areaSum.reset();\n stream(object, areaStream);\n return areaSum * 2;\n}\n"],"names":["adder"],"mappings":";AAKyBA,EAAA;AAEXA,EAAA;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"index.es197.js","sources":["../../../node_modules/d3-geo/src/transform.js"],"sourcesContent":["export default function(methods) {\n return {\n stream: transformer(methods)\n };\n}\n\nexport function transformer(methods) {\n return function(stream) {\n var s = new TransformStream;\n for (var key in methods) s[key] = methods[key];\n s.stream = stream;\n return s;\n };\n}\n\nfunction TransformStream() {}\n\nTransformStream.prototype = {\n constructor: TransformStream,\n point: function(x, y) { this.stream.point(x, y); },\n sphere: function() { this.stream.sphere(); },\n lineStart: function() { this.stream.lineStart(); },\n lineEnd: function() { this.stream.lineEnd(); },\n polygonStart: function() { this.stream.polygonStart(); },\n polygonEnd: function() { this.stream.polygonEnd(); }\n};\n"],"names":["transformer","methods","stream","s","TransformStream","key","x","y"],"mappings":"AAMO,SAASA,EAAYC,GAAS;AACnC,SAAO,SAASC,GAAQ;AACtB,QAAIC,IAAI,IAAIC,EAAA;AACZ,aAASC,KAAOJ,EAAS,CAAAE,EAAEE,CAAG,IAAIJ,EAAQI,CAAG;AAC7C,WAAAF,EAAE,SAASD,GACJC;AAAA,EACT;AACF;AAEA,SAASC,IAAkB;AAAC;AAE5BA,EAAgB,YAAY;AAAA,EAC1B,aAAaA;AAAA,EACb,OAAO,SAASE,GAAGC,GAAG;AAAE,SAAK,OAAO,MAAMD,GAAGC,CAAC;AAAA,EAAG;AAAA,EACjD,QAAQ,WAAW;AAAE,SAAK,OAAO,OAAA;AAAA,EAAU;AAAA,EAC3C,WAAW,WAAW;AAAE,SAAK,OAAO,UAAA;AAAA,EAAa;AAAA,EACjD,SAAS,WAAW;AAAE,SAAK,OAAO,QAAA;AAAA,EAAW;AAAA,EAC7C,cAAc,WAAW;AAAE,SAAK,OAAO,aAAA;AAAA,EAAgB;AAAA,EACvD,YAAY,WAAW;AAAE,SAAK,OAAO,WAAA;AAAA,EAAc;AACrD;","x_google_ignoreList":[0]}
@@ -1,4 +1,16 @@
1
- import r from "./index.es243.js";
1
+ import { sqrt as t, asin as i } from "./index.es246.js";
2
+ import { azimuthalInvert as a, azimuthalRaw as m } from "./index.es252.js";
3
+ import "./index.es193.js";
4
+ import "./index.es192.js";
5
+ import "./index.es191.js";
2
6
  import "./index.es197.js";
3
- r();
7
+ var o = m(function(r) {
8
+ return t(2 / (1 + r));
9
+ });
10
+ o.invert = a(function(r) {
11
+ return 2 * i(r / 2);
12
+ });
13
+ export {
14
+ o as azimuthalEqualAreaRaw
15
+ };
4
16
  //# sourceMappingURL=index.es198.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.es198.js","sources":["../../../node_modules/d3-geo/src/bounds.js"],"sourcesContent":["import adder from \"./adder\";\nimport {areaStream, areaRingSum} from \"./area\";\nimport {cartesian, cartesianCross, cartesianNormalizeInPlace, spherical} from \"./cartesian\";\nimport {abs, degrees, epsilon, radians} from \"./math\";\nimport stream from \"./stream\";\n\nvar lambda0, phi0, lambda1, phi1, // bounds\n lambda2, // previous lambda-coordinate\n lambda00, phi00, // first point\n p0, // previous 3D point\n deltaSum = adder(),\n ranges,\n range;\n\nvar boundsStream = {\n point: boundsPoint,\n lineStart: boundsLineStart,\n lineEnd: boundsLineEnd,\n polygonStart: function() {\n boundsStream.point = boundsRingPoint;\n boundsStream.lineStart = boundsRingStart;\n boundsStream.lineEnd = boundsRingEnd;\n deltaSum.reset();\n areaStream.polygonStart();\n },\n polygonEnd: function() {\n areaStream.polygonEnd();\n boundsStream.point = boundsPoint;\n boundsStream.lineStart = boundsLineStart;\n boundsStream.lineEnd = boundsLineEnd;\n if (areaRingSum < 0) lambda0 = -(lambda1 = 180), phi0 = -(phi1 = 90);\n else if (deltaSum > epsilon) phi1 = 90;\n else if (deltaSum < -epsilon) phi0 = -90;\n range[0] = lambda0, range[1] = lambda1;\n }\n};\n\nfunction boundsPoint(lambda, phi) {\n ranges.push(range = [lambda0 = lambda, lambda1 = lambda]);\n if (phi < phi0) phi0 = phi;\n if (phi > phi1) phi1 = phi;\n}\n\nfunction linePoint(lambda, phi) {\n var p = cartesian([lambda * radians, phi * radians]);\n if (p0) {\n var normal = cartesianCross(p0, p),\n equatorial = [normal[1], -normal[0], 0],\n inflection = cartesianCross(equatorial, normal);\n cartesianNormalizeInPlace(inflection);\n inflection = spherical(inflection);\n var delta = lambda - lambda2,\n sign = delta > 0 ? 1 : -1,\n lambdai = inflection[0] * degrees * sign,\n phii,\n antimeridian = abs(delta) > 180;\n if (antimeridian ^ (sign * lambda2 < lambdai && lambdai < sign * lambda)) {\n phii = inflection[1] * degrees;\n if (phii > phi1) phi1 = phii;\n } else if (lambdai = (lambdai + 360) % 360 - 180, antimeridian ^ (sign * lambda2 < lambdai && lambdai < sign * lambda)) {\n phii = -inflection[1] * degrees;\n if (phii < phi0) phi0 = phii;\n } else {\n if (phi < phi0) phi0 = phi;\n if (phi > phi1) phi1 = phi;\n }\n if (antimeridian) {\n if (lambda < lambda2) {\n if (angle(lambda0, lambda) > angle(lambda0, lambda1)) lambda1 = lambda;\n } else {\n if (angle(lambda, lambda1) > angle(lambda0, lambda1)) lambda0 = lambda;\n }\n } else {\n if (lambda1 >= lambda0) {\n if (lambda < lambda0) lambda0 = lambda;\n if (lambda > lambda1) lambda1 = lambda;\n } else {\n if (lambda > lambda2) {\n if (angle(lambda0, lambda) > angle(lambda0, lambda1)) lambda1 = lambda;\n } else {\n if (angle(lambda, lambda1) > angle(lambda0, lambda1)) lambda0 = lambda;\n }\n }\n }\n } else {\n ranges.push(range = [lambda0 = lambda, lambda1 = lambda]);\n }\n if (phi < phi0) phi0 = phi;\n if (phi > phi1) phi1 = phi;\n p0 = p, lambda2 = lambda;\n}\n\nfunction boundsLineStart() {\n boundsStream.point = linePoint;\n}\n\nfunction boundsLineEnd() {\n range[0] = lambda0, range[1] = lambda1;\n boundsStream.point = boundsPoint;\n p0 = null;\n}\n\nfunction boundsRingPoint(lambda, phi) {\n if (p0) {\n var delta = lambda - lambda2;\n deltaSum.add(abs(delta) > 180 ? delta + (delta > 0 ? 360 : -360) : delta);\n } else {\n lambda00 = lambda, phi00 = phi;\n }\n areaStream.point(lambda, phi);\n linePoint(lambda, phi);\n}\n\nfunction boundsRingStart() {\n areaStream.lineStart();\n}\n\nfunction boundsRingEnd() {\n boundsRingPoint(lambda00, phi00);\n areaStream.lineEnd();\n if (abs(deltaSum) > epsilon) lambda0 = -(lambda1 = 180);\n range[0] = lambda0, range[1] = lambda1;\n p0 = null;\n}\n\n// Finds the left-right distance between two longitudes.\n// This is almost the same as (lambda1 - lambda0 + 360°) % 360°, except that we want\n// the distance between ±180° to be 360°.\nfunction angle(lambda0, lambda1) {\n return (lambda1 -= lambda0) < 0 ? lambda1 + 360 : lambda1;\n}\n\nfunction rangeCompare(a, b) {\n return a[0] - b[0];\n}\n\nfunction rangeContains(range, x) {\n return range[0] <= range[1] ? range[0] <= x && x <= range[1] : x < range[0] || range[1] < x;\n}\n\nexport default function(feature) {\n var i, n, a, b, merged, deltaMax, delta;\n\n phi1 = lambda1 = -(lambda0 = phi0 = Infinity);\n ranges = [];\n stream(feature, boundsStream);\n\n // First, sort ranges by their minimum longitudes.\n if (n = ranges.length) {\n ranges.sort(rangeCompare);\n\n // Then, merge any ranges that overlap.\n for (i = 1, a = ranges[0], merged = [a]; i < n; ++i) {\n b = ranges[i];\n if (rangeContains(a, b[0]) || rangeContains(a, b[1])) {\n if (angle(a[0], b[1]) > angle(a[0], a[1])) a[1] = b[1];\n if (angle(b[0], a[1]) > angle(a[0], a[1])) a[0] = b[0];\n } else {\n merged.push(a = b);\n }\n }\n\n // Finally, find the largest gap between the merged ranges.\n // The final bounding box will be the inverse of this gap.\n for (deltaMax = -Infinity, n = merged.length - 1, i = 0, a = merged[n]; i <= n; a = b, ++i) {\n b = merged[i];\n if ((delta = angle(a[1], b[0])) > deltaMax) deltaMax = delta, lambda0 = b[0], lambda1 = a[1];\n }\n }\n\n ranges = range = null;\n\n return lambda0 === Infinity || phi0 === Infinity\n ? [[NaN, NaN], [NaN, NaN]]\n : [[lambda0, phi0], [lambda1, phi1]];\n}\n"],"names":["adder"],"mappings":";;AAUeA,EAAA;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"index.es198.js","sources":["../../../node_modules/d3-geo/src/projection/azimuthalEqualArea.js"],"sourcesContent":["import {asin, sqrt} from \"../math\";\nimport {azimuthalRaw, azimuthalInvert} from \"./azimuthal\";\nimport projection from \"./index\";\n\nexport var azimuthalEqualAreaRaw = azimuthalRaw(function(cxcy) {\n return sqrt(2 / (1 + cxcy));\n});\n\nazimuthalEqualAreaRaw.invert = azimuthalInvert(function(z) {\n return 2 * asin(z / 2);\n});\n\nexport default function() {\n return projection(azimuthalEqualAreaRaw)\n .scale(124.75)\n .clipAngle(180 - 1e-3);\n}\n"],"names":["azimuthalEqualAreaRaw","azimuthalRaw","cxcy","sqrt","azimuthalInvert","z","asin"],"mappings":";;;;;;AAIO,IAAIA,IAAwBC,EAAa,SAASC,GAAM;AAC7D,SAAOC,EAAK,KAAK,IAAID,EAAK;AAC5B,CAAC;AAEDF,EAAsB,SAASI,EAAgB,SAASC,GAAG;AACzD,SAAO,IAAIC,EAAKD,IAAI,CAAC;AACvB,CAAC;","x_google_ignoreList":[0]}
@@ -1,39 +1,17 @@
1
- import A from "./index.es256.js";
2
- import { tau as p, atan2 as I, asin as P, pi as z, sin as t, cos as i } from "./index.es246.js";
3
- function R(r, n) {
4
- return [r > z ? r - p : r < -z ? r + p : r, n];
5
- }
6
- R.invert = R;
7
- function E(r, n, o) {
8
- return (r %= p) ? n || o ? A(j(r), q(n, o)) : j(r) : n || o ? q(n, o) : R;
9
- }
10
- function g(r) {
11
- return function(n, o) {
12
- return n += r, [n > z ? n - p : n < -z ? n + p : n, o];
13
- };
14
- }
15
- function j(r) {
16
- var n = g(r);
17
- return n.invert = g(-r), n;
18
- }
19
- function q(r, n) {
20
- var o = i(r), x = t(r), y = i(n), k = t(n);
21
- function w(u, c) {
22
- var f = i(c), s = i(u) * f, e = t(u) * f, v = t(c), D = v * o + s * x;
23
- return [
24
- I(e * y - D * k, s * o - v * x),
25
- P(D * y + e * k)
26
- ];
27
- }
28
- return w.invert = function(u, c) {
29
- var f = i(c), s = i(u) * f, e = t(u) * f, v = t(c), D = v * y - e * k;
30
- return [
31
- I(e * y + v * k, s * o + D * x),
32
- P(D * o - s * x)
33
- ];
34
- }, w;
1
+ import { acos as r, sin as a } from "./index.es246.js";
2
+ import { azimuthalInvert as n, azimuthalRaw as o } from "./index.es252.js";
3
+ import u from "./index.es253.js";
4
+ var i = o(function(t) {
5
+ return (t = r(t)) && t / a(t);
6
+ });
7
+ i.invert = n(function(t) {
8
+ return t;
9
+ });
10
+ function f() {
11
+ return u(i).scale(79.4188).clipAngle(180 - 1e-3);
35
12
  }
36
13
  export {
37
- E as rotateRadians
14
+ i as azimuthalEquidistantRaw,
15
+ f as default
38
16
  };
39
17
  //# sourceMappingURL=index.es199.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.es199.js","sources":["../../../node_modules/d3-geo/src/rotation.js"],"sourcesContent":["import compose from \"./compose\";\nimport {asin, atan2, cos, degrees, pi, radians, sin, tau} from \"./math\";\n\nfunction rotationIdentity(lambda, phi) {\n return [lambda > pi ? lambda - tau : lambda < -pi ? lambda + tau : lambda, phi];\n}\n\nrotationIdentity.invert = rotationIdentity;\n\nexport function rotateRadians(deltaLambda, deltaPhi, deltaGamma) {\n return (deltaLambda %= tau) ? (deltaPhi || deltaGamma ? compose(rotationLambda(deltaLambda), rotationPhiGamma(deltaPhi, deltaGamma))\n : rotationLambda(deltaLambda))\n : (deltaPhi || deltaGamma ? rotationPhiGamma(deltaPhi, deltaGamma)\n : rotationIdentity);\n}\n\nfunction forwardRotationLambda(deltaLambda) {\n return function(lambda, phi) {\n return lambda += deltaLambda, [lambda > pi ? lambda - tau : lambda < -pi ? lambda + tau : lambda, phi];\n };\n}\n\nfunction rotationLambda(deltaLambda) {\n var rotation = forwardRotationLambda(deltaLambda);\n rotation.invert = forwardRotationLambda(-deltaLambda);\n return rotation;\n}\n\nfunction rotationPhiGamma(deltaPhi, deltaGamma) {\n var cosDeltaPhi = cos(deltaPhi),\n sinDeltaPhi = sin(deltaPhi),\n cosDeltaGamma = cos(deltaGamma),\n sinDeltaGamma = sin(deltaGamma);\n\n function rotation(lambda, phi) {\n var cosPhi = cos(phi),\n x = cos(lambda) * cosPhi,\n y = sin(lambda) * cosPhi,\n z = sin(phi),\n k = z * cosDeltaPhi + x * sinDeltaPhi;\n return [\n atan2(y * cosDeltaGamma - k * sinDeltaGamma, x * cosDeltaPhi - z * sinDeltaPhi),\n asin(k * cosDeltaGamma + y * sinDeltaGamma)\n ];\n }\n\n rotation.invert = function(lambda, phi) {\n var cosPhi = cos(phi),\n x = cos(lambda) * cosPhi,\n y = sin(lambda) * cosPhi,\n z = sin(phi),\n k = z * cosDeltaGamma - y * sinDeltaGamma;\n return [\n atan2(y * cosDeltaGamma + z * sinDeltaGamma, x * cosDeltaPhi + k * sinDeltaPhi),\n asin(k * cosDeltaPhi - x * sinDeltaPhi)\n ];\n };\n\n return rotation;\n}\n\nexport default function(rotate) {\n rotate = rotateRadians(rotate[0] * radians, rotate[1] * radians, rotate.length > 2 ? rotate[2] * radians : 0);\n\n function forward(coordinates) {\n coordinates = rotate(coordinates[0] * radians, coordinates[1] * radians);\n return coordinates[0] *= degrees, coordinates[1] *= degrees, coordinates;\n }\n\n forward.invert = function(coordinates) {\n coordinates = rotate.invert(coordinates[0] * radians, coordinates[1] * radians);\n return coordinates[0] *= degrees, coordinates[1] *= degrees, coordinates;\n };\n\n return forward;\n}\n"],"names":["rotationIdentity","lambda","phi","pi","tau","rotateRadians","deltaLambda","deltaPhi","deltaGamma","compose","rotationLambda","rotationPhiGamma","forwardRotationLambda","rotation","cosDeltaPhi","cos","sinDeltaPhi","sin","cosDeltaGamma","sinDeltaGamma","cosPhi","x","y","z","k","atan2","asin"],"mappings":";;AAGA,SAASA,EAAiBC,GAAQC,GAAK;AACrC,SAAO,CAACD,IAASE,IAAKF,IAASG,IAAMH,IAAS,CAACE,IAAKF,IAASG,IAAMH,GAAQC,CAAG;AAChF;AAEAF,EAAiB,SAASA;AAEnB,SAASK,EAAcC,GAAaC,GAAUC,GAAY;AAC/D,UAAQF,KAAeF,KAAQG,KAAYC,IAAaC,EAAQC,EAAeJ,C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AAIP,IAAcU,IAAIR,CAAW;AAAA,MAC9EU,EAAKF,IAAIV,IAAcO,IAAIL,CAAW;AAAA,IAAA;AAAA,EAE1C,GAEOH;AACT;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"index.es199.js","sources":["../../../node_modules/d3-geo/src/projection/azimuthalEquidistant.js"],"sourcesContent":["import {acos, sin} from \"../math\";\nimport {azimuthalRaw, azimuthalInvert} from \"./azimuthal\";\nimport projection from \"./index\";\n\nexport var azimuthalEquidistantRaw = azimuthalRaw(function(c) {\n return (c = acos(c)) && c / sin(c);\n});\n\nazimuthalEquidistantRaw.invert = azimuthalInvert(function(z) {\n return z;\n});\n\nexport default function() {\n return projection(azimuthalEquidistantRaw)\n .scale(79.4188)\n .clipAngle(180 - 1e-3);\n}\n"],"names":["azimuthalEquidistantRaw","azimuthalRaw","c","acos","sin","azimuthalInvert","z","geoAzimuthalEquidistant","projection"],"mappings":";;;AAIO,IAAIA,IAA0BC,EAAa,SAASC,GAAG;AAC5D,UAAQA,IAAIC,EAAKD,CAAC,MAAMA,IAAIE,EAAIF,CAAC;AACnC,CAAC;AAEDF,EAAwB,SAASK,EAAgB,SAASC,GAAG;AAC3D,SAAOA;AACT,CAAC;AAED,SAAAC,IAA0B;AACxB,SAAOC,EAAWR,CAAuB,EACpC,MAAM,OAAO,EACb,UAAU,MAAM,IAAI;AAC3B;","x_google_ignoreList":[0]}
@@ -1,5 +1,5 @@
1
1
  import { memo as u, forwardRef as i, useRef as l, useImperativeHandle as f, useEffect as p } from "react";
2
- import { applyReactStyle as m } from "./index.es190.js";
2
+ import { applyReactStyle as m } from "./index.es205.js";
3
3
  import { useControl as d } from "./index.es25.js";
4
4
  function U(r, c) {
5
5
  const e = l({ props: r }), n = d(({ mapLib: s }) => {
@@ -1,4 +1,12 @@
1
- import o from "./index.es265.js";
2
- import r from "./index.es266.js";
3
- r(o);
1
+ import "./index.es193.js";
2
+ import "./index.es192.js";
3
+ import "./index.es191.js";
4
+ import "./index.es197.js";
5
+ function r(t, i) {
6
+ return [t, i];
7
+ }
8
+ r.invert = r;
9
+ export {
10
+ r as equirectangularRaw
11
+ };
4
12
  //# sourceMappingURL=index.es200.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.es200.js","sources":["../../../node_modules/d3-geo/node_modules/d3-array/src/bisect.js"],"sourcesContent":["import ascending from \"./ascending\";\nimport bisector from \"./bisector\";\n\nvar ascendingBisect = bisector(ascending);\nexport var bisectRight = ascendingBisect.right;\nexport var bisectLeft = ascendingBisect.left;\nexport default bisectRight;\n"],"names":["bisector","ascending"],"mappings":";;AAGsBA,EAASC,CAAS;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"index.es200.js","sources":["../../../node_modules/d3-geo/src/projection/equirectangular.js"],"sourcesContent":["import projection from \"./index\";\n\nexport function equirectangularRaw(lambda, phi) {\n return [lambda, phi];\n}\n\nequirectangularRaw.invert = equirectangularRaw;\n\nexport default function() {\n return projection(equirectangularRaw)\n .scale(152.63);\n}\n"],"names":["equirectangularRaw","lambda","phi"],"mappings":";;;;AAEO,SAASA,EAAmBC,GAAQC,GAAK;AAC9C,SAAO,CAACD,GAAQC,CAAG;AACrB;AAEAF,EAAmB,SAASA;","x_google_ignoreList":[0]}
@@ -1,26 +1,246 @@
1
- import Y from "./index.es243.js";
2
- import { cartesianCross as S, cartesian as T, cartesianNormalizeInPlace as U } from "./index.es245.js";
3
- import { quarterPi as V, atan2 as Z, sin as e, cos as s, asin as _, epsilon as g, pi as $, tau as k } from "./index.es246.js";
4
- var n = Y();
5
- function l(y, B) {
6
- var f = B[0], E = B[1], W = [e(f), -s(f), 0], C = 0, F = 0;
7
- n.reset();
8
- for (var m = 0, X = y.length; m < X; ++m)
9
- if (w = (q = y[m]).length)
10
- for (var q, w, v = q[w - 1], x = v[0], G = v[1] / 2 + V, H = e(G), J = s(G), z = 0; z < w; ++z, x = I, H = L, J = M, v = o) {
11
- var o = q[z], I = o[0], K = o[1] / 2 + V, L = e(K), M = s(K), r = I - x, N = r >= 0 ? 1 : -1, c = N * r, u = c > $, O = H * L;
12
- if (n.add(Z(O * N * e(c), J * M + O * s(c))), C += u ? r + N * k : r, u ^ x >= f ^ I >= f) {
13
- var a = S(T(v), T(o));
14
- U(a);
15
- var Q = S(W, a);
16
- U(Q);
17
- var R = (u ^ r >= 0 ? -1 : 1) * _(Q[2]);
18
- (E > R || E === R && (a[0] || a[1])) && (F += u ^ r >= 0 ? 1 : -1);
19
- }
20
- }
21
- return (C < -g || C < g && n < -g) ^ F & 1;
1
+ import { transformToViewState as d, applyViewStateToTransform as p } from "./index.es238.js";
2
+ import { normalizeStyle as l } from "./index.es239.js";
3
+ import { deepEqual as i } from "./index.es206.js";
4
+ const u = { version: 8, sources: {}, layers: [] }, h = {
5
+ mousedown: "onMouseDown",
6
+ mouseup: "onMouseUp",
7
+ mouseover: "onMouseOver",
8
+ mousemove: "onMouseMove",
9
+ click: "onClick",
10
+ dblclick: "onDblClick",
11
+ mouseenter: "onMouseEnter",
12
+ mouseleave: "onMouseLeave",
13
+ mouseout: "onMouseOut",
14
+ contextmenu: "onContextMenu",
15
+ touchstart: "onTouchStart",
16
+ touchend: "onTouchEnd",
17
+ touchmove: "onTouchMove",
18
+ touchcancel: "onTouchCancel"
19
+ }, m = {
20
+ movestart: "onMoveStart",
21
+ move: "onMove",
22
+ moveend: "onMoveEnd",
23
+ dragstart: "onDragStart",
24
+ drag: "onDrag",
25
+ dragend: "onDragEnd",
26
+ zoomstart: "onZoomStart",
27
+ zoom: "onZoom",
28
+ zoomend: "onZoomEnd",
29
+ rotatestart: "onRotateStart",
30
+ rotate: "onRotate",
31
+ rotateend: "onRotateEnd",
32
+ pitchstart: "onPitchStart",
33
+ pitch: "onPitch",
34
+ pitchend: "onPitchEnd"
35
+ }, f = {
36
+ wheel: "onWheel",
37
+ boxzoomstart: "onBoxZoomStart",
38
+ boxzoomend: "onBoxZoomEnd",
39
+ boxzoomcancel: "onBoxZoomCancel",
40
+ resize: "onResize",
41
+ load: "onLoad",
42
+ render: "onRender",
43
+ idle: "onIdle",
44
+ remove: "onRemove",
45
+ data: "onData",
46
+ styledata: "onStyleData",
47
+ sourcedata: "onSourceData",
48
+ error: "onError"
49
+ }, v = [
50
+ "minZoom",
51
+ "maxZoom",
52
+ "minPitch",
53
+ "maxPitch",
54
+ "maxBounds",
55
+ "projection",
56
+ "renderWorldCopies"
57
+ ], _ = [
58
+ "scrollZoom",
59
+ "boxZoom",
60
+ "dragRotate",
61
+ "dragPan",
62
+ "keyboard",
63
+ "doubleClickZoom",
64
+ "touchZoomRotate",
65
+ "touchPitch"
66
+ ];
67
+ class c {
68
+ constructor(t, o, a) {
69
+ this._map = null, this._internalUpdate = !1, this._hoveredFeatures = null, this._propsedCameraUpdate = null, this._styleComponents = {}, this._onEvent = (e) => {
70
+ const s = this.props[f[e.type]];
71
+ s ? s(e) : e.type === "error" && console.error(e.error);
72
+ }, this._onCameraEvent = (e) => {
73
+ if (this._internalUpdate)
74
+ return;
75
+ e.viewState = this._propsedCameraUpdate || d(this._map.transform);
76
+ const s = this.props[m[e.type]];
77
+ s && s(e);
78
+ }, this._onCameraUpdate = (e) => this._internalUpdate ? e : (this._propsedCameraUpdate = d(e), p(e, this.props)), this._onPointerEvent = (e) => {
79
+ (e.type === "mousemove" || e.type === "mouseout") && this._updateHover(e);
80
+ const s = this.props[h[e.type]];
81
+ s && (this.props.interactiveLayerIds && e.type !== "mouseover" && e.type !== "mouseout" && (e.features = this._hoveredFeatures || this._queryRenderedFeatures(e.point)), s(e), delete e.features);
82
+ }, this._MapClass = t, this.props = o, this._initialize(a);
83
+ }
84
+ get map() {
85
+ return this._map;
86
+ }
87
+ setProps(t) {
88
+ const o = this.props;
89
+ this.props = t;
90
+ const a = this._updateSettings(t, o), e = this._updateSize(t), s = this._updateViewState(t);
91
+ this._updateStyle(t, o), this._updateStyleComponents(t), this._updateHandlers(t, o), (a || e || s && !this._map.isMoving()) && this.redraw();
92
+ }
93
+ static reuse(t, o) {
94
+ const a = c.savedMaps.pop();
95
+ if (!a)
96
+ return null;
97
+ const e = a.map, s = e.getContainer();
98
+ for (o.className = s.className; s.childNodes.length > 0; )
99
+ o.appendChild(s.childNodes[0]);
100
+ e._container = o;
101
+ const n = e._resizeObserver;
102
+ n && (n.disconnect(), n.observe(o)), a.setProps({ ...t, styleDiffing: !1 }), e.resize();
103
+ const { initialViewState: r } = t;
104
+ return r && (r.bounds ? e.fitBounds(r.bounds, { ...r.fitBoundsOptions, duration: 0 }) : a._updateViewState(r)), e.isStyleLoaded() ? e.fire("load") : e.once("style.load", () => e.fire("load")), e._update(), a;
105
+ }
106
+ /* eslint-disable complexity,max-statements */
107
+ _initialize(t) {
108
+ const { props: o } = this, { mapStyle: a = u } = o, e = {
109
+ ...o,
110
+ ...o.initialViewState,
111
+ container: t,
112
+ style: l(a)
113
+ }, s = e.initialViewState || e.viewState || e;
114
+ if (Object.assign(e, {
115
+ center: [s.longitude || 0, s.latitude || 0],
116
+ zoom: s.zoom || 0,
117
+ pitch: s.pitch || 0,
118
+ bearing: s.bearing || 0
119
+ }), o.gl) {
120
+ const r = HTMLCanvasElement.prototype.getContext;
121
+ HTMLCanvasElement.prototype.getContext = () => (HTMLCanvasElement.prototype.getContext = r, o.gl);
122
+ }
123
+ const n = new this._MapClass(e);
124
+ s.padding && n.setPadding(s.padding), o.cursor && (n.getCanvas().style.cursor = o.cursor), n.transformCameraUpdate = this._onCameraUpdate, n.on("style.load", () => {
125
+ this._styleComponents = {
126
+ light: n.getLight(),
127
+ sky: n.getSky(),
128
+ // @ts-ignore getProjection() does not exist in v4
129
+ projection: n.getProjection?.(),
130
+ terrain: n.getTerrain()
131
+ }, this._updateStyleComponents(this.props);
132
+ }), n.on("sourcedata", () => {
133
+ this._updateStyleComponents(this.props);
134
+ });
135
+ for (const r in h)
136
+ n.on(r, this._onPointerEvent);
137
+ for (const r in m)
138
+ n.on(r, this._onCameraEvent);
139
+ for (const r in f)
140
+ n.on(r, this._onEvent);
141
+ this._map = n;
142
+ }
143
+ /* eslint-enable complexity,max-statements */
144
+ recycle() {
145
+ this.map.getContainer().querySelector("[mapboxgl-children]")?.remove(), c.savedMaps.push(this);
146
+ }
147
+ destroy() {
148
+ this._map.remove();
149
+ }
150
+ // Force redraw the map now. Typically resize() and jumpTo() is reflected in the next
151
+ // render cycle, which is managed by Mapbox's animation loop.
152
+ // This removes the synchronization issue caused by requestAnimationFrame.
153
+ redraw() {
154
+ const t = this._map;
155
+ t.style && (t._frame && (t._frame.cancel(), t._frame = null), t._render());
156
+ }
157
+ /* Trigger map resize if size is controlled
158
+ @param {object} nextProps
159
+ @returns {bool} true if size has changed
160
+ */
161
+ _updateSize(t) {
162
+ const { viewState: o } = t;
163
+ if (o) {
164
+ const a = this._map;
165
+ if (o.width !== a.transform.width || o.height !== a.transform.height)
166
+ return a.resize(), !0;
167
+ }
168
+ return !1;
169
+ }
170
+ // Adapted from map.jumpTo
171
+ /* Update camera to match props
172
+ @param {object} nextProps
173
+ @param {bool} triggerEvents - should fire camera events
174
+ @returns {bool} true if anything is changed
175
+ */
176
+ _updateViewState(t) {
177
+ const o = this._map, a = o.transform;
178
+ if (!o.isMoving()) {
179
+ const s = p(a, t);
180
+ if (Object.keys(s).length > 0)
181
+ return this._internalUpdate = !0, o.jumpTo(s), this._internalUpdate = !1, !0;
182
+ }
183
+ return !1;
184
+ }
185
+ /* Update camera constraints and projection settings to match props
186
+ @param {object} nextProps
187
+ @param {object} currProps
188
+ @returns {bool} true if anything is changed
189
+ */
190
+ _updateSettings(t, o) {
191
+ const a = this._map;
192
+ let e = !1;
193
+ for (const s of v)
194
+ s in t && !i(t[s], o[s]) && (e = !0, a[`set${s[0].toUpperCase()}${s.slice(1)}`]?.call(a, t[s]));
195
+ return e;
196
+ }
197
+ /* Update map style to match props */
198
+ _updateStyle(t, o) {
199
+ if (t.cursor !== o.cursor && (this._map.getCanvas().style.cursor = t.cursor || ""), t.mapStyle !== o.mapStyle) {
200
+ const { mapStyle: a = u, styleDiffing: e = !0 } = t, s = {
201
+ diff: e
202
+ };
203
+ "localIdeographFontFamily" in t && (s.localIdeographFontFamily = t.localIdeographFontFamily), this._map.setStyle(l(a), s);
204
+ }
205
+ }
206
+ /* Update fog, light, projection and terrain to match props
207
+ * These props are special because
208
+ * 1. They can not be applied right away. Certain conditions (style loaded, source loaded, etc.) must be met
209
+ * 2. They can be overwritten by mapStyle
210
+ */
211
+ _updateStyleComponents({ light: t, projection: o, sky: a, terrain: e }) {
212
+ const s = this._map, n = this._styleComponents;
213
+ s.style._loaded && (t && !i(t, n.light) && (n.light = t, s.setLight(t)), o && !i(o, n.projection) && o !== n.projection?.type && (n.projection = typeof o == "string" ? { type: o } : o, s.setProjection?.(n.projection)), a && !i(a, n.sky) && (n.sky = a, s.setSky(a)), e !== void 0 && !i(e, n.terrain) && (!e || s.getSource(e.source)) && (n.terrain = e, s.setTerrain(e)));
214
+ }
215
+ /* Update interaction handlers to match props */
216
+ _updateHandlers(t, o) {
217
+ const a = this._map;
218
+ for (const e of _) {
219
+ const s = t[e] ?? !0, n = o[e] ?? !0;
220
+ i(s, n) || (s ? a[e].enable(s) : a[e].disable());
221
+ }
222
+ }
223
+ _queryRenderedFeatures(t) {
224
+ const o = this._map, { interactiveLayerIds: a = [] } = this.props;
225
+ try {
226
+ return o.queryRenderedFeatures(t, {
227
+ layers: a.filter(o.getLayer.bind(o))
228
+ });
229
+ } catch {
230
+ return [];
231
+ }
232
+ }
233
+ _updateHover(t) {
234
+ const { props: o } = this;
235
+ if (o.interactiveLayerIds && (o.onMouseMove || o.onMouseEnter || o.onMouseLeave)) {
236
+ const e = t.type, s = this._hoveredFeatures?.length > 0, n = this._queryRenderedFeatures(t.point), r = n.length > 0;
237
+ !r && s && (t.type = "mouseleave", this._onPointerEvent(t)), this._hoveredFeatures = n, r && !s && (t.type = "mouseenter", this._onPointerEvent(t)), t.type = e;
238
+ } else
239
+ this._hoveredFeatures = null;
240
+ }
22
241
  }
242
+ c.savedMaps = [];
23
243
  export {
24
- l as default
244
+ c as default
25
245
  };
26
246
  //# sourceMappingURL=index.es201.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.es201.js","sources":["../../../node_modules/d3-geo/src/polygonContains.js"],"sourcesContent":["import adder from \"./adder\";\nimport {cartesian, cartesianCross, cartesianNormalizeInPlace} from \"./cartesian\";\nimport {asin, atan2, cos, epsilon, pi, quarterPi, sin, tau} from \"./math\";\n\nvar sum = adder();\n\nexport default function(polygon, point) {\n var lambda = point[0],\n phi = point[1],\n normal = [sin(lambda), -cos(lambda), 0],\n angle = 0,\n winding = 0;\n\n sum.reset();\n\n for (var i = 0, n = polygon.length; i < n; ++i) {\n if (!(m = (ring = polygon[i]).length)) continue;\n var ring,\n m,\n point0 = ring[m - 1],\n lambda0 = point0[0],\n phi0 = point0[1] / 2 + quarterPi,\n sinPhi0 = sin(phi0),\n cosPhi0 = cos(phi0);\n\n for (var j = 0; j < m; ++j, lambda0 = lambda1, sinPhi0 = sinPhi1, cosPhi0 = cosPhi1, point0 = point1) {\n var point1 = ring[j],\n lambda1 = point1[0],\n phi1 = point1[1] / 2 + quarterPi,\n sinPhi1 = sin(phi1),\n cosPhi1 = cos(phi1),\n delta = lambda1 - lambda0,\n sign = delta >= 0 ? 1 : -1,\n absDelta = sign * delta,\n antimeridian = absDelta > pi,\n k = sinPhi0 * sinPhi1;\n\n sum.add(atan2(k * sign * sin(absDelta), cosPhi0 * cosPhi1 + k * cos(absDelta)));\n angle += antimeridian ? delta + sign * tau : delta;\n\n // Are the longitudes either side of the point’s meridian (lambda),\n // and are the latitudes smaller than the parallel (phi)?\n if (antimeridian ^ lambda0 >= lambda ^ lambda1 >= lambda) {\n var arc = cartesianCross(cartesian(point0), cartesian(point1));\n cartesianNormalizeInPlace(arc);\n var intersection = cartesianCross(normal, arc);\n cartesianNormalizeInPlace(intersection);\n var phiArc = (antimeridian ^ delta >= 0 ? -1 : 1) * asin(intersection[2]);\n if (phi > phiArc || phi === phiArc && (arc[0] || arc[1])) {\n winding += antimeridian ^ delta >= 0 ? 1 : -1;\n }\n }\n }\n }\n\n // First, determine whether the South pole is inside or outside:\n //\n // It is inside if:\n // * the polygon winds around it in a clockwise direction.\n // * the polygon does not (cumulatively) wind around it, but has a negative\n // (counter-clockwise) area.\n //\n // Second, count the (signed) number of times a segment crosses a lambda\n // from the point to the South pole. If it is zero, then the point is the\n // same side as the South pole.\n\n return (angle < -epsilon || angle < epsilon && sum < -epsilon) ^ (winding & 1);\n}\n"],"names":["sum","adder","polygonContains","polygon","point","lambda","phi","normal","sin","cos","angle","winding","i","n","m","ring","point0","lambda0","phi0","quarterPi","sinPhi0","cosPhi0","j","lambda1","sinPhi1","cosPhi1","point1","phi1","delta","sign","absDelta","antimeridian","pi","k","atan2","tau","arc","cartesianCross","cartesian","cartesianNormalizeInPlace","intersection","phiArc","asin","epsilon"],"mappings":";;;AAIA,IAAIA,IAAMC,EAAA;AAEV,SAAAC,EAAwBC,GAASC,GAAO;AACtC,MAAIC,IAASD,EAAM,CAAC,GAChBE,IAAMF,EAAM,CAAC,GACbG,IAAS,CAACC,EAAIH,CAAM,GAAG,CAACI,EAAIJ,CAAM,GAAG,CAAC,GACtCK,IAAQ,GACRC,IAAU;AAEd,EAAAX,EAAI,MAAA;AAEJ,WAASY,IAAI,GAAGC,IAAIV,EAAQ,QAAQS,IAAIC,GAAG,EAAED;AAC3C,QAAME,KAAKC,IAAOZ,EAAQS,CAAC,GAAG;AAS9B,eARIG,GACAD,GACAE,IAASD,EAAKD,IAAI,CAAC,GACnBG,IAAUD,EAAO,CAAC,GAClBE,IAAOF,EAAO,CAAC,IAAI,IAAIG,GACvBC,IAAUZ,EAAIU,CAAI,GAClBG,IAAUZ,EAAIS,CAAI,GAEbI,IAAI,GAAGA,IAAIR,GAAG,EAAEQ,GAAGL,IAAUM,GAASH,IAAUI,GAASH,IAAUI,GAAST,IAASU,GAAQ;AACpG,YAAIA,IAASX,EAAKO,CAAC,GACfC,IAAUG,EAAO,CAAC,GAClBC,IAAOD,EAAO,CAAC,IAAI,IAAIP,GACvBK,IAAUhB,EAAImB,CAAI,GAClBF,IAAUhB,EAAIkB,CAAI,GAClBC,IAAQL,IAAUN,GAClBY,IAAOD,KAAS,IAAI,IAAI,IACxBE,IAAWD,IAAOD,GAClBG,IAAeD,IAAWE,GAC1BC,IAAIb,IAAUI;AAOlB,YALAxB,EAAI,IAAIkC,EAAMD,IAAIJ,IAAOrB,EAAIsB,CAAQ,GAAGT,IAAUI,IAAUQ,IAAIxB,EAAIqB,CAAQ,CAAC,CAAC,GAC9EpB,KAASqB,IAAeH,IAAQC,IAAOM,IAAMP,GAIzCG,IAAed,KAAWZ,IAASkB,KAAWlB,GAAQ;AACxD,cAAI+B,IAAMC,EAAeC,EAAUtB,CAAM,GAAGsB,EAAUZ,CAAM,CAAC;AAC7D,UAAAa,EAA0BH,CAAG;AAC7B,cAAII,IAAeH,EAAe9B,GAAQ6B,CAAG;AAC7C,UAAAG,EAA0BC,CAAY;AACtC,cAAIC,KAAUV,IAAeH,KAAS,IAAI,KAAK,KAAKc,EAAKF,EAAa,CAAC,CAAC;AACxE,WAAIlC,IAAMmC,KAAUnC,MAAQmC,MAAWL,EAAI,CAAC,KAAKA,EAAI,CAAC,QACpDzB,KAAWoB,IAAeH,KAAS,IAAI,IAAI;AAAA,QAE/C;AAAA,MACF;AAcF,UAAQlB,IAAQ,CAACiC,KAAWjC,IAAQiC,KAAW3C,IAAM,CAAC2C,KAAYhC,IAAU;AAC9E;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"index.es201.js","sources":["../../../node_modules/@vis.gl/react-maplibre/dist/maplibre/maplibre.js"],"sourcesContent":["import { transformToViewState, applyViewStateToTransform } from \"../utils/transform.js\";\nimport { normalizeStyle } from \"../utils/style-utils.js\";\nimport { deepEqual } from \"../utils/deep-equal.js\";\nconst DEFAULT_STYLE = { version: 8, sources: {}, layers: [] };\nconst pointerEvents = {\n mousedown: 'onMouseDown',\n mouseup: 'onMouseUp',\n mouseover: 'onMouseOver',\n mousemove: 'onMouseMove',\n click: 'onClick',\n dblclick: 'onDblClick',\n mouseenter: 'onMouseEnter',\n mouseleave: 'onMouseLeave',\n mouseout: 'onMouseOut',\n contextmenu: 'onContextMenu',\n touchstart: 'onTouchStart',\n touchend: 'onTouchEnd',\n touchmove: 'onTouchMove',\n touchcancel: 'onTouchCancel'\n};\nconst cameraEvents = {\n movestart: 'onMoveStart',\n move: 'onMove',\n moveend: 'onMoveEnd',\n dragstart: 'onDragStart',\n drag: 'onDrag',\n dragend: 'onDragEnd',\n zoomstart: 'onZoomStart',\n zoom: 'onZoom',\n zoomend: 'onZoomEnd',\n rotatestart: 'onRotateStart',\n rotate: 'onRotate',\n rotateend: 'onRotateEnd',\n pitchstart: 'onPitchStart',\n pitch: 'onPitch',\n pitchend: 'onPitchEnd'\n};\nconst otherEvents = {\n wheel: 'onWheel',\n boxzoomstart: 'onBoxZoomStart',\n boxzoomend: 'onBoxZoomEnd',\n boxzoomcancel: 'onBoxZoomCancel',\n resize: 'onResize',\n load: 'onLoad',\n render: 'onRender',\n idle: 'onIdle',\n remove: 'onRemove',\n data: 'onData',\n styledata: 'onStyleData',\n sourcedata: 'onSourceData',\n error: 'onError'\n};\nconst settingNames = [\n 'minZoom',\n 'maxZoom',\n 'minPitch',\n 'maxPitch',\n 'maxBounds',\n 'projection',\n 'renderWorldCopies'\n];\nconst handlerNames = [\n 'scrollZoom',\n 'boxZoom',\n 'dragRotate',\n 'dragPan',\n 'keyboard',\n 'doubleClickZoom',\n 'touchZoomRotate',\n 'touchPitch'\n];\n/**\n * A wrapper for mapbox-gl's Map class\n */\nclass Maplibre {\n constructor(MapClass, props, container) {\n // mapboxgl.Map instance\n this._map = null;\n // Internal states\n this._internalUpdate = false;\n this._hoveredFeatures = null;\n this._propsedCameraUpdate = null;\n this._styleComponents = {};\n this._onEvent = (e) => {\n // @ts-ignore\n const cb = this.props[otherEvents[e.type]];\n if (cb) {\n cb(e);\n }\n else if (e.type === 'error') {\n console.error(e.error); // eslint-disable-line\n }\n };\n this._onCameraEvent = (e) => {\n if (this._internalUpdate) {\n return;\n }\n e.viewState = this._propsedCameraUpdate || transformToViewState(this._map.transform);\n // @ts-ignore\n const cb = this.props[cameraEvents[e.type]];\n if (cb) {\n cb(e);\n }\n };\n this._onCameraUpdate = (tr) => {\n if (this._internalUpdate) {\n return tr;\n }\n this._propsedCameraUpdate = transformToViewState(tr);\n return applyViewStateToTransform(tr, this.props);\n };\n this._onPointerEvent = (e) => {\n if (e.type === 'mousemove' || e.type === 'mouseout') {\n this._updateHover(e);\n }\n // @ts-ignore\n const cb = this.props[pointerEvents[e.type]];\n if (cb) {\n if (this.props.interactiveLayerIds && e.type !== 'mouseover' && e.type !== 'mouseout') {\n e.features = this._hoveredFeatures || this._queryRenderedFeatures(e.point);\n }\n cb(e);\n delete e.features;\n }\n };\n this._MapClass = MapClass;\n this.props = props;\n this._initialize(container);\n }\n get map() {\n return this._map;\n }\n setProps(props) {\n const oldProps = this.props;\n this.props = props;\n const settingsChanged = this._updateSettings(props, oldProps);\n const sizeChanged = this._updateSize(props);\n const viewStateChanged = this._updateViewState(props);\n this._updateStyle(props, oldProps);\n this._updateStyleComponents(props);\n this._updateHandlers(props, oldProps);\n // If 1) view state has changed to match props and\n // 2) the props change is not triggered by map events,\n // it's driven by an external state change. Redraw immediately\n if (settingsChanged || sizeChanged || (viewStateChanged && !this._map.isMoving())) {\n this.redraw();\n }\n }\n static reuse(props, container) {\n const that = Maplibre.savedMaps.pop();\n if (!that) {\n return null;\n }\n const map = that.map;\n // When reusing the saved map, we need to reparent the map(canvas) and other child nodes\n // intoto the new container from the props.\n // Step 1: reparenting child nodes from old container to new container\n const oldContainer = map.getContainer();\n container.className = oldContainer.className;\n while (oldContainer.childNodes.length > 0) {\n container.appendChild(oldContainer.childNodes[0]);\n }\n // Step 2: replace the internal container with new container from the react component\n // @ts-ignore\n map._container = container;\n // With maplibre-gl as mapLib, map uses ResizeObserver to observe when its container resizes.\n // When reusing the saved map, we need to disconnect the observer and observe the new container.\n // Step 3: telling the ResizeObserver to disconnect and observe the new container\n // @ts-ignore\n const resizeObserver = map._resizeObserver;\n if (resizeObserver) {\n resizeObserver.disconnect();\n resizeObserver.observe(container);\n }\n // Step 4: apply new props\n that.setProps({ ...props, styleDiffing: false });\n map.resize();\n const { initialViewState } = props;\n if (initialViewState) {\n if (initialViewState.bounds) {\n map.fitBounds(initialViewState.bounds, { ...initialViewState.fitBoundsOptions, duration: 0 });\n }\n else {\n that._updateViewState(initialViewState);\n }\n }\n // Simulate load event\n if (map.isStyleLoaded()) {\n map.fire('load');\n }\n else {\n map.once('style.load', () => map.fire('load'));\n }\n // Force reload\n // @ts-ignore\n map._update();\n return that;\n }\n /* eslint-disable complexity,max-statements */\n _initialize(container) {\n const { props } = this;\n const { mapStyle = DEFAULT_STYLE } = props;\n const mapOptions = {\n ...props,\n ...props.initialViewState,\n container,\n style: normalizeStyle(mapStyle)\n };\n const viewState = mapOptions.initialViewState || mapOptions.viewState || mapOptions;\n Object.assign(mapOptions, {\n center: [viewState.longitude || 0, viewState.latitude || 0],\n zoom: viewState.zoom || 0,\n pitch: viewState.pitch || 0,\n bearing: viewState.bearing || 0\n });\n if (props.gl) {\n // eslint-disable-next-line\n const getContext = HTMLCanvasElement.prototype.getContext;\n // Hijack canvas.getContext to return our own WebGLContext\n // This will be called inside the mapboxgl.Map constructor\n // @ts-expect-error\n HTMLCanvasElement.prototype.getContext = () => {\n // Unhijack immediately\n HTMLCanvasElement.prototype.getContext = getContext;\n return props.gl;\n };\n }\n const map = new this._MapClass(mapOptions);\n // Props that are not part of constructor options\n if (viewState.padding) {\n map.setPadding(viewState.padding);\n }\n if (props.cursor) {\n map.getCanvas().style.cursor = props.cursor;\n }\n // add listeners\n map.transformCameraUpdate = this._onCameraUpdate;\n map.on('style.load', () => {\n // Map style has changed, this would have wiped out all settings from props\n this._styleComponents = {\n light: map.getLight(),\n sky: map.getSky(),\n // @ts-ignore getProjection() does not exist in v4\n projection: map.getProjection?.(),\n terrain: map.getTerrain()\n };\n this._updateStyleComponents(this.props);\n });\n map.on('sourcedata', () => {\n // Some sources have loaded, we may need them to attach terrain\n this._updateStyleComponents(this.props);\n });\n for (const eventName in pointerEvents) {\n map.on(eventName, this._onPointerEvent);\n }\n for (const eventName in cameraEvents) {\n map.on(eventName, this._onCameraEvent);\n }\n for (const eventName in otherEvents) {\n map.on(eventName, this._onEvent);\n }\n this._map = map;\n }\n /* eslint-enable complexity,max-statements */\n recycle() {\n // Clean up unnecessary elements before storing for reuse.\n const container = this.map.getContainer();\n const children = container.querySelector('[mapboxgl-children]');\n children?.remove();\n Maplibre.savedMaps.push(this);\n }\n destroy() {\n this._map.remove();\n }\n // Force redraw the map now. Typically resize() and jumpTo() is reflected in the next\n // render cycle, which is managed by Mapbox's animation loop.\n // This removes the synchronization issue caused by requestAnimationFrame.\n redraw() {\n const map = this._map;\n // map._render will throw error if style does not exist\n // https://github.com/mapbox/mapbox-gl-js/blob/fb9fc316da14e99ff4368f3e4faa3888fb43c513\n // /src/ui/map.js#L1834\n if (map.style) {\n // cancel the scheduled update\n if (map._frame) {\n map._frame.cancel();\n map._frame = null;\n }\n // the order is important - render() may schedule another update\n map._render();\n }\n }\n /* Trigger map resize if size is controlled\n @param {object} nextProps\n @returns {bool} true if size has changed\n */\n _updateSize(nextProps) {\n // Check if size is controlled\n const { viewState } = nextProps;\n if (viewState) {\n const map = this._map;\n if (viewState.width !== map.transform.width || viewState.height !== map.transform.height) {\n map.resize();\n return true;\n }\n }\n return false;\n }\n // Adapted from map.jumpTo\n /* Update camera to match props\n @param {object} nextProps\n @param {bool} triggerEvents - should fire camera events\n @returns {bool} true if anything is changed\n */\n _updateViewState(nextProps) {\n const map = this._map;\n const tr = map.transform;\n const isMoving = map.isMoving();\n // Avoid manipulating the real transform when interaction/animation is ongoing\n // as it would interfere with Mapbox's handlers\n if (!isMoving) {\n const changes = applyViewStateToTransform(tr, nextProps);\n if (Object.keys(changes).length > 0) {\n this._internalUpdate = true;\n map.jumpTo(changes);\n this._internalUpdate = false;\n return true;\n }\n }\n return false;\n }\n /* Update camera constraints and projection settings to match props\n @param {object} nextProps\n @param {object} currProps\n @returns {bool} true if anything is changed\n */\n _updateSettings(nextProps, currProps) {\n const map = this._map;\n let changed = false;\n for (const propName of settingNames) {\n if (propName in nextProps && !deepEqual(nextProps[propName], currProps[propName])) {\n changed = true;\n const setter = map[`set${propName[0].toUpperCase()}${propName.slice(1)}`];\n setter?.call(map, nextProps[propName]);\n }\n }\n return changed;\n }\n /* Update map style to match props */\n _updateStyle(nextProps, currProps) {\n if (nextProps.cursor !== currProps.cursor) {\n this._map.getCanvas().style.cursor = nextProps.cursor || '';\n }\n if (nextProps.mapStyle !== currProps.mapStyle) {\n const { mapStyle = DEFAULT_STYLE, styleDiffing = true } = nextProps;\n const options = {\n diff: styleDiffing\n };\n if ('localIdeographFontFamily' in nextProps) {\n // @ts-ignore Mapbox specific prop\n options.localIdeographFontFamily = nextProps.localIdeographFontFamily;\n }\n this._map.setStyle(normalizeStyle(mapStyle), options);\n }\n }\n /* Update fog, light, projection and terrain to match props\n * These props are special because\n * 1. They can not be applied right away. Certain conditions (style loaded, source loaded, etc.) must be met\n * 2. They can be overwritten by mapStyle\n */\n _updateStyleComponents({ light, projection, sky, terrain }) {\n const map = this._map;\n const currProps = this._styleComponents;\n // We can safely manipulate map style once it's loaded\n if (map.style._loaded) {\n if (light && !deepEqual(light, currProps.light)) {\n currProps.light = light;\n map.setLight(light);\n }\n if (projection &&\n !deepEqual(projection, currProps.projection) &&\n projection !== currProps.projection?.type) {\n currProps.projection = typeof projection === 'string' ? { type: projection } : projection;\n // @ts-ignore setProjection does not exist in v4\n map.setProjection?.(currProps.projection);\n }\n if (sky && !deepEqual(sky, currProps.sky)) {\n currProps.sky = sky;\n map.setSky(sky);\n }\n if (terrain !== undefined && !deepEqual(terrain, currProps.terrain)) {\n if (!terrain || map.getSource(terrain.source)) {\n currProps.terrain = terrain;\n map.setTerrain(terrain);\n }\n }\n }\n }\n /* Update interaction handlers to match props */\n _updateHandlers(nextProps, currProps) {\n const map = this._map;\n for (const propName of handlerNames) {\n const newValue = nextProps[propName] ?? true;\n const oldValue = currProps[propName] ?? true;\n if (!deepEqual(newValue, oldValue)) {\n if (newValue) {\n map[propName].enable(newValue);\n }\n else {\n map[propName].disable();\n }\n }\n }\n }\n _queryRenderedFeatures(point) {\n const map = this._map;\n const { interactiveLayerIds = [] } = this.props;\n try {\n return map.queryRenderedFeatures(point, {\n layers: interactiveLayerIds.filter(map.getLayer.bind(map))\n });\n }\n catch {\n // May fail if style is not loaded\n return [];\n }\n }\n _updateHover(e) {\n const { props } = this;\n const shouldTrackHoveredFeatures = props.interactiveLayerIds && (props.onMouseMove || props.onMouseEnter || props.onMouseLeave);\n if (shouldTrackHoveredFeatures) {\n const eventType = e.type;\n const wasHovering = this._hoveredFeatures?.length > 0;\n const features = this._queryRenderedFeatures(e.point);\n const isHovering = features.length > 0;\n if (!isHovering && wasHovering) {\n e.type = 'mouseleave';\n this._onPointerEvent(e);\n }\n this._hoveredFeatures = features;\n if (isHovering && !wasHovering) {\n e.type = 'mouseenter';\n this._onPointerEvent(e);\n }\n e.type = eventType;\n }\n else {\n this._hoveredFeatures = null;\n }\n }\n}\nMaplibre.savedMaps = [];\nexport default Maplibre;\n//# sourceMappingURL=maplibre.js.map"],"names":["DEFAULT_STYLE","pointerEvents","cameraEvents","otherEvents","settingNames","handlerNames","Maplibre","MapClass","props","container","cb","transformToViewState","tr","applyViewStateToTransform","oldProps","settingsChanged","sizeChanged","viewStateChanged","that","map","oldContainer","resizeObserver","initialViewState","mapStyle","mapOptions","normalizeStyle","viewState","getContext","eventName","nextProps","changes","currProps","changed","propName","deepEqual","styleDiffing","options","light","projection","sky","terrain","newValue","oldValue","point","interactiveLayerIds","e","eventType","wasHovering","features","isHovering"],"mappings":";;;AAGA,MAAMA,IAAgB,EAAE,SAAS,GAAG,SAAS,CAAA,GAAI,QAAQ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,uBAAuBU,GAAO;AAC1B,UAAMxB,IAAM,KAAK,MACX,EAAE,qBAAAyB,IAAsB,GAAC,IAAM,KAAK;AAC1C,QAAI;AACA,aAAOzB,EAAI,sBAAsBwB,GAAO;AAAA,QACpC,QAAQC,EAAoB,OAAOzB,EAAI,SAAS,KAAKA,CAAG,CAAC;AAAA,MAAA,CAC5D;AAAA,IACL,QACM;AAEF,aAAO,CAAA;AAAA,IACX;AAAA,EACJ;AAAA,EACA,aAAa0B,GAAG;AACZ,UAAM,EAAE,OAAArC,MAAU;AAElB,QADmCA,EAAM,wBAAwBA,EAAM,eAAeA,EAAM,gBAAgBA,EAAM,eAClF;AAC5B,YAAMsC,IAAYD,EAAE,MACdE,IAAc,KAAK,kBAAkB,SAAS,GAC9CC,IAAW,KAAK,uBAAuBH,EAAE,KAAK,GAC9CI,IAAaD,EAAS,SAAS;AACrC,MAAI,CAACC,KAAcF,MACfF,EAAE,OAAO,cACT,KAAK,gBAAgBA,CAAC,IAE1B,KAAK,mBAAmBG,GACpBC,KAAc,CAACF,MACfF,EAAE,OAAO,cACT,KAAK,gBAAgBA,CAAC,IAE1BA,EAAE,OAAOC;AAAA,IACb;AAEI,WAAK,mBAAmB;AAAA,EAEhC;AACJ;AACAxC,EAAS,YAAY,CAAA;","x_google_ignoreList":[0]}
@@ -1,3 +1,46 @@
1
- import r from "./index.es243.js";
2
- r();
1
+ const s = [
2
+ "setMaxBounds",
3
+ "setMinZoom",
4
+ "setMaxZoom",
5
+ "setMinPitch",
6
+ "setMaxPitch",
7
+ "setRenderWorldCopies",
8
+ "setProjection",
9
+ "setStyle",
10
+ "addSource",
11
+ "removeSource",
12
+ "addLayer",
13
+ "removeLayer",
14
+ "setLayerZoomRange",
15
+ "setFilter",
16
+ "setPaintProperty",
17
+ "setLayoutProperty",
18
+ "setLight",
19
+ "setTerrain",
20
+ "setFog",
21
+ "remove"
22
+ ];
23
+ function i(r) {
24
+ if (!r)
25
+ return null;
26
+ const o = r.map, t = {
27
+ getMap: () => o
28
+ };
29
+ for (const e of n(o))
30
+ !(e in t) && !s.includes(e) && (t[e] = o[e].bind(o));
31
+ return t;
32
+ }
33
+ function n(r) {
34
+ const o = /* @__PURE__ */ new Set();
35
+ let t = r;
36
+ for (; t; ) {
37
+ for (const e of Object.getOwnPropertyNames(t))
38
+ e[0] !== "_" && typeof r[e] == "function" && e !== "fire" && e !== "setEventedParent" && o.add(e);
39
+ t = Object.getPrototypeOf(t);
40
+ }
41
+ return Array.from(o);
42
+ }
43
+ export {
44
+ i as default
45
+ };
3
46
  //# sourceMappingURL=index.es202.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.es202.js","sources":["../../../node_modules/d3-geo/src/length.js"],"sourcesContent":["import adder from \"./adder\";\nimport {abs, atan2, cos, radians, sin, sqrt} from \"./math\";\nimport noop from \"./noop\";\nimport stream from \"./stream\";\n\nvar lengthSum = adder(),\n lambda0,\n sinPhi0,\n cosPhi0;\n\nvar lengthStream = {\n sphere: noop,\n point: noop,\n lineStart: lengthLineStart,\n lineEnd: noop,\n polygonStart: noop,\n polygonEnd: noop\n};\n\nfunction lengthLineStart() {\n lengthStream.point = lengthPointFirst;\n lengthStream.lineEnd = lengthLineEnd;\n}\n\nfunction lengthLineEnd() {\n lengthStream.point = lengthStream.lineEnd = noop;\n}\n\nfunction lengthPointFirst(lambda, phi) {\n lambda *= radians, phi *= radians;\n lambda0 = lambda, sinPhi0 = sin(phi), cosPhi0 = cos(phi);\n lengthStream.point = lengthPoint;\n}\n\nfunction lengthPoint(lambda, phi) {\n lambda *= radians, phi *= radians;\n var sinPhi = sin(phi),\n cosPhi = cos(phi),\n delta = abs(lambda - lambda0),\n cosDelta = cos(delta),\n sinDelta = sin(delta),\n x = cosPhi * sinDelta,\n y = cosPhi0 * sinPhi - sinPhi0 * cosPhi * cosDelta,\n z = sinPhi0 * sinPhi + cosPhi0 * cosPhi * cosDelta;\n lengthSum.add(atan2(sqrt(x * x + y * y), z));\n lambda0 = lambda, sinPhi0 = sinPhi, cosPhi0 = cosPhi;\n}\n\nexport default function(object) {\n lengthSum.reset();\n stream(object, lengthStream);\n return +lengthSum;\n}\n"],"names":["adder"],"mappings":";AAKgBA,EAAA;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"index.es202.js","sources":["../../../node_modules/@vis.gl/react-maplibre/dist/maplibre/create-ref.js"],"sourcesContent":["/** These methods may break the react binding if called directly */\nconst skipMethods = [\n 'setMaxBounds',\n 'setMinZoom',\n 'setMaxZoom',\n 'setMinPitch',\n 'setMaxPitch',\n 'setRenderWorldCopies',\n 'setProjection',\n 'setStyle',\n 'addSource',\n 'removeSource',\n 'addLayer',\n 'removeLayer',\n 'setLayerZoomRange',\n 'setFilter',\n 'setPaintProperty',\n 'setLayoutProperty',\n 'setLight',\n 'setTerrain',\n 'setFog',\n 'remove'\n];\nexport default function createRef(mapInstance) {\n if (!mapInstance) {\n return null;\n }\n const map = mapInstance.map;\n const result = {\n getMap: () => map\n };\n for (const key of getMethodNames(map)) {\n // @ts-expect-error\n if (!(key in result) && !skipMethods.includes(key)) {\n result[key] = map[key].bind(map);\n }\n }\n return result;\n}\nfunction getMethodNames(obj) {\n const result = new Set();\n let proto = obj;\n while (proto) {\n for (const key of Object.getOwnPropertyNames(proto)) {\n if (key[0] !== '_' &&\n typeof obj[key] === 'function' &&\n key !== 'fire' &&\n key !== 'setEventedParent') {\n result.add(key);\n }\n }\n proto = Object.getPrototypeOf(proto);\n }\n return Array.from(result);\n}\n//# sourceMappingURL=create-ref.js.map"],"names":["skipMethods","createRef","mapInstance","map","result","key","getMethodNames","obj","proto"],"mappings":"AACA,MAAMA,IAAc;AAAA,EAChB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACJ;AACA,SAAwBC,EAAUC,GAAa;AAC3C,MAAI,CAACA;AACD,WAAO;AAEX,QAAMC,IAAMD,EAAY,KAClBE,IAAS;AAAA,IACX,QAAQ,MAAMD;AAAA,EAAA;AAElB,aAAWE,KAAOC,EAAeH,CAAG;AAEhC,IAAI,EAAEE,KAAOD,MAAW,CAACJ,EAAY,SAASK,CAAG,MAC7CD,EAAOC,CAAG,IAAIF,EAAIE,CAAG,EAAE,KAAKF,CAAG;AAGvC,SAAOC;AACX;AACA,SAASE,EAAeC,GAAK;AACzB,QAAMH,wBAAa,IAAA;AACnB,MAAII,IAAQD;AACZ,SAAOC,KAAO;AACV,eAAWH,KAAO,OAAO,oBAAoBG,CAAK;AAC9C,MAAIH,EAAI,CAAC,MAAM,OACX,OAAOE,EAAIF,CAAG,KAAM,cACpBA,MAAQ,UACRA,MAAQ,sBACRD,EAAO,IAAIC,CAAG;AAGtB,IAAAG,IAAQ,OAAO,eAAeA,CAAK;AAAA,EACvC;AACA,SAAO,MAAM,KAAKJ,CAAM;AAC5B;","x_google_ignoreList":[0]}
@@ -1,4 +1,6 @@
1
- import r from "./index.es243.js";
2
- r();
3
- r();
1
+ import { useLayoutEffect as e, useEffect as t } from "react";
2
+ const o = typeof document < "u" ? e : t;
3
+ export {
4
+ o as default
5
+ };
4
6
  //# sourceMappingURL=index.es203.js.map