node-red-contrib-tak-registration 0.13.0 → 0.14.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (1151) hide show
  1. package/node_modules/@turf/along/README.md +3 -5
  2. package/node_modules/@turf/along/dist/cjs/index.cjs.map +1 -1
  3. package/node_modules/@turf/along/dist/cjs/index.d.cts +3 -3
  4. package/node_modules/@turf/along/dist/esm/index.d.ts +3 -3
  5. package/node_modules/@turf/along/dist/esm/index.js.map +1 -1
  6. package/node_modules/@turf/along/package.json +13 -13
  7. package/node_modules/@turf/angle/dist/cjs/index.cjs +10 -7
  8. package/node_modules/@turf/angle/dist/cjs/index.cjs.map +1 -1
  9. package/node_modules/@turf/angle/dist/cjs/index.d.cts +1 -1
  10. package/node_modules/@turf/angle/dist/esm/index.d.ts +1 -1
  11. package/node_modules/@turf/angle/dist/esm/index.js +10 -7
  12. package/node_modules/@turf/angle/dist/esm/index.js.map +1 -1
  13. package/node_modules/@turf/angle/package.json +15 -15
  14. package/node_modules/@turf/area/dist/cjs/index.cjs +1 -2
  15. package/node_modules/@turf/area/dist/cjs/index.cjs.map +1 -1
  16. package/node_modules/@turf/area/dist/cjs/index.d.cts +1 -1
  17. package/node_modules/@turf/area/dist/esm/index.d.ts +1 -1
  18. package/node_modules/@turf/area/dist/esm/index.js +1 -2
  19. package/node_modules/@turf/area/dist/esm/index.js.map +1 -1
  20. package/node_modules/@turf/area/package.json +10 -10
  21. package/node_modules/@turf/bbox/dist/cjs/index.cjs.map +1 -1
  22. package/node_modules/@turf/bbox/dist/cjs/index.d.cts +1 -1
  23. package/node_modules/@turf/bbox/dist/esm/index.d.ts +1 -1
  24. package/node_modules/@turf/bbox/dist/esm/index.js.map +1 -1
  25. package/node_modules/@turf/bbox/package.json +10 -10
  26. package/node_modules/@turf/bbox-clip/dist/cjs/index.cjs +9 -18
  27. package/node_modules/@turf/bbox-clip/dist/cjs/index.cjs.map +1 -1
  28. package/node_modules/@turf/bbox-clip/dist/cjs/index.d.cts +1 -1
  29. package/node_modules/@turf/bbox-clip/dist/esm/index.d.ts +1 -1
  30. package/node_modules/@turf/bbox-clip/dist/esm/index.js +9 -18
  31. package/node_modules/@turf/bbox-clip/dist/esm/index.js.map +1 -1
  32. package/node_modules/@turf/bbox-clip/package.json +11 -11
  33. package/node_modules/@turf/bbox-polygon/README.md +6 -6
  34. package/node_modules/@turf/bbox-polygon/dist/cjs/index.cjs.map +1 -1
  35. package/node_modules/@turf/bbox-polygon/dist/cjs/index.d.cts +2 -2
  36. package/node_modules/@turf/bbox-polygon/dist/esm/index.d.ts +2 -2
  37. package/node_modules/@turf/bbox-polygon/dist/esm/index.js.map +1 -1
  38. package/node_modules/@turf/bbox-polygon/package.json +9 -9
  39. package/node_modules/@turf/bearing/dist/cjs/index.cjs.map +1 -1
  40. package/node_modules/@turf/bearing/dist/cjs/index.d.cts +1 -1
  41. package/node_modules/@turf/bearing/dist/esm/index.d.ts +1 -1
  42. package/node_modules/@turf/bearing/dist/esm/index.js.map +1 -1
  43. package/node_modules/@turf/bearing/package.json +11 -11
  44. package/node_modules/@turf/bezier-spline/dist/cjs/index.cjs.map +1 -1
  45. package/node_modules/@turf/bezier-spline/dist/cjs/index.d.cts +1 -1
  46. package/node_modules/@turf/bezier-spline/dist/esm/index.d.ts +1 -1
  47. package/node_modules/@turf/bezier-spline/dist/esm/index.js.map +1 -1
  48. package/node_modules/@turf/bezier-spline/package.json +10 -10
  49. package/node_modules/@turf/boolean-clockwise/dist/cjs/index.cjs.map +1 -1
  50. package/node_modules/@turf/boolean-clockwise/dist/cjs/index.d.cts +1 -1
  51. package/node_modules/@turf/boolean-clockwise/dist/esm/index.d.ts +1 -1
  52. package/node_modules/@turf/boolean-clockwise/dist/esm/index.js.map +1 -1
  53. package/node_modules/@turf/boolean-clockwise/package.json +10 -10
  54. package/node_modules/@turf/boolean-concave/dist/cjs/index.cjs.map +1 -1
  55. package/node_modules/@turf/boolean-concave/dist/cjs/index.d.cts +1 -1
  56. package/node_modules/@turf/boolean-concave/dist/esm/index.d.ts +1 -1
  57. package/node_modules/@turf/boolean-concave/dist/esm/index.js.map +1 -1
  58. package/node_modules/@turf/boolean-concave/package.json +10 -10
  59. package/node_modules/@turf/boolean-contains/dist/cjs/index.cjs.map +1 -1
  60. package/node_modules/@turf/boolean-contains/dist/cjs/index.d.cts +1 -1
  61. package/node_modules/@turf/boolean-contains/dist/esm/index.d.ts +1 -1
  62. package/node_modules/@turf/boolean-contains/dist/esm/index.js.map +1 -1
  63. package/node_modules/@turf/boolean-contains/package.json +13 -13
  64. package/node_modules/@turf/boolean-crosses/dist/cjs/index.cjs.map +1 -1
  65. package/node_modules/@turf/boolean-crosses/dist/cjs/index.d.cts +1 -1
  66. package/node_modules/@turf/boolean-crosses/dist/esm/index.d.ts +1 -1
  67. package/node_modules/@turf/boolean-crosses/dist/esm/index.js.map +1 -1
  68. package/node_modules/@turf/boolean-crosses/package.json +13 -13
  69. package/node_modules/@turf/boolean-disjoint/README.md +1 -1
  70. package/node_modules/@turf/boolean-disjoint/dist/cjs/index.cjs +3 -3
  71. package/node_modules/@turf/boolean-disjoint/dist/cjs/index.cjs.map +1 -1
  72. package/node_modules/@turf/boolean-disjoint/dist/cjs/index.d.cts +3 -3
  73. package/node_modules/@turf/boolean-disjoint/dist/esm/index.d.ts +3 -3
  74. package/node_modules/@turf/boolean-disjoint/dist/esm/index.js +3 -3
  75. package/node_modules/@turf/boolean-disjoint/dist/esm/index.js.map +1 -1
  76. package/node_modules/@turf/boolean-disjoint/package.json +13 -13
  77. package/node_modules/@turf/boolean-equal/dist/cjs/index.cjs +1 -2
  78. package/node_modules/@turf/boolean-equal/dist/cjs/index.cjs.map +1 -1
  79. package/node_modules/@turf/boolean-equal/dist/cjs/index.d.cts +1 -1
  80. package/node_modules/@turf/boolean-equal/dist/esm/index.d.ts +1 -1
  81. package/node_modules/@turf/boolean-equal/dist/esm/index.js +1 -2
  82. package/node_modules/@turf/boolean-equal/dist/esm/index.js.map +1 -1
  83. package/node_modules/@turf/boolean-equal/package.json +11 -11
  84. package/node_modules/@turf/boolean-intersects/dist/cjs/index.cjs +3 -3
  85. package/node_modules/@turf/boolean-intersects/dist/cjs/index.cjs.map +1 -1
  86. package/node_modules/@turf/boolean-intersects/dist/cjs/index.d.cts +3 -3
  87. package/node_modules/@turf/boolean-intersects/dist/esm/index.d.ts +3 -3
  88. package/node_modules/@turf/boolean-intersects/dist/esm/index.js +3 -3
  89. package/node_modules/@turf/boolean-intersects/dist/esm/index.js.map +1 -1
  90. package/node_modules/@turf/boolean-intersects/package.json +11 -11
  91. package/node_modules/@turf/boolean-overlap/dist/cjs/index.cjs +3 -6
  92. package/node_modules/@turf/boolean-overlap/dist/cjs/index.cjs.map +1 -1
  93. package/node_modules/@turf/boolean-overlap/dist/cjs/index.d.cts +1 -1
  94. package/node_modules/@turf/boolean-overlap/dist/esm/index.d.ts +1 -1
  95. package/node_modules/@turf/boolean-overlap/dist/esm/index.js +3 -6
  96. package/node_modules/@turf/boolean-overlap/dist/esm/index.js.map +1 -1
  97. package/node_modules/@turf/boolean-overlap/package.json +13 -13
  98. package/node_modules/@turf/boolean-parallel/dist/cjs/index.cjs +7 -14
  99. package/node_modules/@turf/boolean-parallel/dist/cjs/index.cjs.map +1 -1
  100. package/node_modules/@turf/boolean-parallel/dist/cjs/index.d.cts +1 -1
  101. package/node_modules/@turf/boolean-parallel/dist/esm/index.d.ts +1 -1
  102. package/node_modules/@turf/boolean-parallel/dist/esm/index.js +7 -14
  103. package/node_modules/@turf/boolean-parallel/dist/esm/index.js.map +1 -1
  104. package/node_modules/@turf/boolean-parallel/package.json +12 -12
  105. package/node_modules/@turf/boolean-point-in-polygon/dist/cjs/index.cjs +2 -4
  106. package/node_modules/@turf/boolean-point-in-polygon/dist/cjs/index.cjs.map +1 -1
  107. package/node_modules/@turf/boolean-point-in-polygon/dist/cjs/index.d.cts +1 -1
  108. package/node_modules/@turf/boolean-point-in-polygon/dist/esm/index.d.ts +1 -1
  109. package/node_modules/@turf/boolean-point-in-polygon/dist/esm/index.js +2 -4
  110. package/node_modules/@turf/boolean-point-in-polygon/dist/esm/index.js.map +1 -1
  111. package/node_modules/@turf/boolean-point-in-polygon/package.json +10 -10
  112. package/node_modules/@turf/boolean-point-on-line/dist/cjs/index.cjs +10 -0
  113. package/node_modules/@turf/boolean-point-on-line/dist/cjs/index.cjs.map +1 -1
  114. package/node_modules/@turf/boolean-point-on-line/dist/cjs/index.d.cts +1 -1
  115. package/node_modules/@turf/boolean-point-on-line/dist/esm/index.d.ts +1 -1
  116. package/node_modules/@turf/boolean-point-on-line/dist/esm/index.js +10 -0
  117. package/node_modules/@turf/boolean-point-on-line/dist/esm/index.js.map +1 -1
  118. package/node_modules/@turf/boolean-point-on-line/package.json +10 -10
  119. package/node_modules/@turf/boolean-touches/dist/cjs/index.cjs +2 -4
  120. package/node_modules/@turf/boolean-touches/dist/cjs/index.cjs.map +1 -1
  121. package/node_modules/@turf/boolean-touches/dist/cjs/index.d.cts +2 -1
  122. package/node_modules/@turf/boolean-touches/dist/esm/index.d.ts +2 -1
  123. package/node_modules/@turf/boolean-touches/dist/esm/index.js +2 -4
  124. package/node_modules/@turf/boolean-touches/dist/esm/index.js.map +1 -1
  125. package/node_modules/@turf/boolean-touches/package.json +12 -12
  126. package/node_modules/@turf/boolean-valid/dist/cjs/index.cjs +14 -28
  127. package/node_modules/@turf/boolean-valid/dist/cjs/index.cjs.map +1 -1
  128. package/node_modules/@turf/boolean-valid/dist/cjs/index.d.cts +1 -1
  129. package/node_modules/@turf/boolean-valid/dist/esm/index.d.ts +1 -1
  130. package/node_modules/@turf/boolean-valid/dist/esm/index.js +14 -28
  131. package/node_modules/@turf/boolean-valid/dist/esm/index.js.map +1 -1
  132. package/node_modules/@turf/boolean-valid/package.json +17 -17
  133. package/node_modules/@turf/boolean-within/dist/cjs/index.cjs +4 -8
  134. package/node_modules/@turf/boolean-within/dist/cjs/index.cjs.map +1 -1
  135. package/node_modules/@turf/boolean-within/dist/cjs/index.d.cts +1 -1
  136. package/node_modules/@turf/boolean-within/dist/esm/index.d.ts +1 -1
  137. package/node_modules/@turf/boolean-within/dist/esm/index.js +4 -8
  138. package/node_modules/@turf/boolean-within/dist/esm/index.js.map +1 -1
  139. package/node_modules/@turf/boolean-within/package.json +13 -13
  140. package/node_modules/@turf/buffer/dist/cjs/index.cjs +12 -24
  141. package/node_modules/@turf/buffer/dist/cjs/index.cjs.map +1 -1
  142. package/node_modules/@turf/buffer/dist/esm/index.js +12 -24
  143. package/node_modules/@turf/buffer/dist/esm/index.js.map +1 -1
  144. package/node_modules/@turf/buffer/package.json +12 -12
  145. package/node_modules/@turf/center/dist/cjs/index.cjs.map +1 -1
  146. package/node_modules/@turf/center/dist/cjs/index.d.cts +1 -1
  147. package/node_modules/@turf/center/dist/esm/index.d.ts +1 -1
  148. package/node_modules/@turf/center/dist/esm/index.js.map +1 -1
  149. package/node_modules/@turf/center/package.json +12 -12
  150. package/node_modules/@turf/center-mean/dist/cjs/index.cjs.map +1 -1
  151. package/node_modules/@turf/center-mean/dist/cjs/index.d.cts +1 -1
  152. package/node_modules/@turf/center-mean/dist/esm/index.d.ts +1 -1
  153. package/node_modules/@turf/center-mean/dist/esm/index.js.map +1 -1
  154. package/node_modules/@turf/center-mean/package.json +13 -13
  155. package/node_modules/@turf/center-median/dist/cjs/index.cjs +5 -10
  156. package/node_modules/@turf/center-median/dist/cjs/index.cjs.map +1 -1
  157. package/node_modules/@turf/center-median/dist/cjs/index.d.cts +1 -1
  158. package/node_modules/@turf/center-median/dist/esm/index.d.ts +1 -1
  159. package/node_modules/@turf/center-median/dist/esm/index.js +5 -10
  160. package/node_modules/@turf/center-median/dist/esm/index.js.map +1 -1
  161. package/node_modules/@turf/center-median/package.json +17 -17
  162. package/node_modules/@turf/center-of-mass/dist/cjs/index.cjs +2 -4
  163. package/node_modules/@turf/center-of-mass/dist/cjs/index.cjs.map +1 -1
  164. package/node_modules/@turf/center-of-mass/dist/cjs/index.d.cts +1 -1
  165. package/node_modules/@turf/center-of-mass/dist/esm/index.d.ts +1 -1
  166. package/node_modules/@turf/center-of-mass/dist/esm/index.js +2 -4
  167. package/node_modules/@turf/center-of-mass/dist/esm/index.js.map +1 -1
  168. package/node_modules/@turf/center-of-mass/package.json +13 -13
  169. package/node_modules/@turf/centroid/dist/cjs/index.cjs.map +1 -1
  170. package/node_modules/@turf/centroid/dist/cjs/index.d.cts +1 -1
  171. package/node_modules/@turf/centroid/dist/esm/index.d.ts +1 -1
  172. package/node_modules/@turf/centroid/dist/esm/index.js.map +1 -1
  173. package/node_modules/@turf/centroid/package.json +10 -10
  174. package/node_modules/@turf/circle/dist/cjs/index.cjs.map +1 -1
  175. package/node_modules/@turf/circle/dist/cjs/index.d.cts +1 -1
  176. package/node_modules/@turf/circle/dist/esm/index.d.ts +1 -1
  177. package/node_modules/@turf/circle/dist/esm/index.js.map +1 -1
  178. package/node_modules/@turf/circle/package.json +11 -11
  179. package/node_modules/@turf/clean-coords/dist/cjs/index.cjs +4 -8
  180. package/node_modules/@turf/clean-coords/dist/cjs/index.cjs.map +1 -1
  181. package/node_modules/@turf/clean-coords/dist/cjs/index.d.cts +1 -1
  182. package/node_modules/@turf/clean-coords/dist/esm/index.d.ts +1 -1
  183. package/node_modules/@turf/clean-coords/dist/esm/index.js +4 -8
  184. package/node_modules/@turf/clean-coords/dist/esm/index.js.map +1 -1
  185. package/node_modules/@turf/clean-coords/package.json +11 -11
  186. package/node_modules/@turf/clone/dist/cjs/index.cjs.map +1 -1
  187. package/node_modules/@turf/clone/dist/cjs/index.d.cts +1 -1
  188. package/node_modules/@turf/clone/dist/esm/index.d.ts +1 -1
  189. package/node_modules/@turf/clone/dist/esm/index.js.map +1 -1
  190. package/node_modules/@turf/clone/package.json +10 -10
  191. package/node_modules/@turf/clusters/README.md +8 -2
  192. package/node_modules/@turf/clusters/dist/cjs/index.cjs +9 -18
  193. package/node_modules/@turf/clusters/dist/cjs/index.cjs.map +1 -1
  194. package/node_modules/@turf/clusters/dist/cjs/index.d.cts +9 -8
  195. package/node_modules/@turf/clusters/dist/esm/index.d.ts +9 -8
  196. package/node_modules/@turf/clusters/dist/esm/index.js +9 -18
  197. package/node_modules/@turf/clusters/dist/esm/index.js.map +1 -1
  198. package/node_modules/@turf/clusters/package.json +10 -10
  199. package/node_modules/@turf/clusters-dbscan/README.md +38 -15
  200. package/node_modules/@turf/clusters-dbscan/dist/cjs/index.cjs +2 -4
  201. package/node_modules/@turf/clusters-dbscan/dist/cjs/index.cjs.map +1 -1
  202. package/node_modules/@turf/clusters-dbscan/dist/cjs/index.d.cts +16 -3
  203. package/node_modules/@turf/clusters-dbscan/dist/esm/index.d.ts +16 -3
  204. package/node_modules/@turf/clusters-dbscan/dist/esm/index.js +2 -4
  205. package/node_modules/@turf/clusters-dbscan/dist/esm/index.js.map +1 -1
  206. package/node_modules/@turf/clusters-dbscan/package.json +14 -14
  207. package/node_modules/@turf/clusters-kmeans/dist/cjs/index.cjs +2 -4
  208. package/node_modules/@turf/clusters-kmeans/dist/cjs/index.cjs.map +1 -1
  209. package/node_modules/@turf/clusters-kmeans/dist/cjs/index.d.cts +1 -1
  210. package/node_modules/@turf/clusters-kmeans/dist/esm/index.d.ts +1 -1
  211. package/node_modules/@turf/clusters-kmeans/dist/esm/index.js +2 -4
  212. package/node_modules/@turf/clusters-kmeans/dist/esm/index.js.map +1 -1
  213. package/node_modules/@turf/clusters-kmeans/package.json +15 -15
  214. package/node_modules/@turf/collect/dist/cjs/index.cjs.map +1 -1
  215. package/node_modules/@turf/collect/dist/cjs/index.d.cts +1 -1
  216. package/node_modules/@turf/collect/dist/esm/index.d.ts +1 -1
  217. package/node_modules/@turf/collect/dist/esm/index.js.map +1 -1
  218. package/node_modules/@turf/collect/package.json +11 -11
  219. package/node_modules/@turf/combine/dist/cjs/index.cjs.map +1 -1
  220. package/node_modules/@turf/combine/dist/cjs/index.d.cts +1 -1
  221. package/node_modules/@turf/combine/dist/esm/index.d.ts +1 -1
  222. package/node_modules/@turf/combine/dist/esm/index.js.map +1 -1
  223. package/node_modules/@turf/combine/package.json +10 -10
  224. package/node_modules/@turf/concave/dist/cjs/index.cjs.map +1 -1
  225. package/node_modules/@turf/concave/dist/cjs/index.d.cts +1 -1
  226. package/node_modules/@turf/concave/dist/esm/index.d.ts +1 -1
  227. package/node_modules/@turf/concave/dist/esm/index.js.map +1 -1
  228. package/node_modules/@turf/concave/package.json +14 -14
  229. package/node_modules/@turf/convex/dist/cjs/index.cjs.map +1 -1
  230. package/node_modules/@turf/convex/dist/cjs/index.d.cts +1 -1
  231. package/node_modules/@turf/convex/dist/esm/index.d.ts +1 -1
  232. package/node_modules/@turf/convex/dist/esm/index.js.map +1 -1
  233. package/node_modules/@turf/convex/package.json +10 -10
  234. package/node_modules/@turf/destination/dist/cjs/index.cjs.map +1 -1
  235. package/node_modules/@turf/destination/dist/cjs/index.d.cts +1 -1
  236. package/node_modules/@turf/destination/dist/esm/index.d.ts +1 -1
  237. package/node_modules/@turf/destination/dist/esm/index.js.map +1 -1
  238. package/node_modules/@turf/destination/package.json +11 -11
  239. package/node_modules/@turf/difference/dist/cjs/index.cjs +8 -10
  240. package/node_modules/@turf/difference/dist/cjs/index.cjs.map +1 -1
  241. package/node_modules/@turf/difference/dist/cjs/index.d.cts +1 -1
  242. package/node_modules/@turf/difference/dist/esm/index.d.ts +1 -1
  243. package/node_modules/@turf/difference/dist/esm/index.js +7 -9
  244. package/node_modules/@turf/difference/dist/esm/index.js.map +1 -1
  245. package/node_modules/@turf/difference/package.json +11 -11
  246. package/node_modules/@turf/dissolve/README.md +11 -12
  247. package/node_modules/@turf/dissolve/dist/cjs/index.cjs +5 -6
  248. package/node_modules/@turf/dissolve/dist/cjs/index.cjs.map +1 -1
  249. package/node_modules/@turf/dissolve/dist/cjs/index.d.cts +3 -3
  250. package/node_modules/@turf/dissolve/dist/esm/index.d.ts +3 -3
  251. package/node_modules/@turf/dissolve/dist/esm/index.js +4 -5
  252. package/node_modules/@turf/dissolve/dist/esm/index.js.map +1 -1
  253. package/node_modules/@turf/dissolve/package.json +13 -13
  254. package/node_modules/@turf/distance/dist/cjs/index.cjs.map +1 -1
  255. package/node_modules/@turf/distance/dist/cjs/index.d.cts +1 -1
  256. package/node_modules/@turf/distance/dist/esm/index.d.ts +1 -1
  257. package/node_modules/@turf/distance/dist/esm/index.js.map +1 -1
  258. package/node_modules/@turf/distance/package.json +10 -10
  259. package/node_modules/@turf/distance-weight/dist/cjs/index.cjs.map +1 -1
  260. package/node_modules/@turf/distance-weight/dist/cjs/index.d.cts +3 -1
  261. package/node_modules/@turf/distance-weight/dist/esm/index.d.ts +3 -1
  262. package/node_modules/@turf/distance-weight/dist/esm/index.js.map +1 -1
  263. package/node_modules/@turf/distance-weight/package.json +12 -12
  264. package/node_modules/@turf/ellipse/dist/cjs/index.cjs +8 -16
  265. package/node_modules/@turf/ellipse/dist/cjs/index.cjs.map +1 -1
  266. package/node_modules/@turf/ellipse/dist/esm/index.js +8 -16
  267. package/node_modules/@turf/ellipse/dist/esm/index.js.map +1 -1
  268. package/node_modules/@turf/ellipse/package.json +16 -16
  269. package/node_modules/@turf/envelope/dist/cjs/index.cjs.map +1 -1
  270. package/node_modules/@turf/envelope/dist/cjs/index.d.cts +1 -1
  271. package/node_modules/@turf/envelope/dist/esm/index.d.ts +1 -1
  272. package/node_modules/@turf/envelope/dist/esm/index.js.map +1 -1
  273. package/node_modules/@turf/envelope/package.json +11 -11
  274. package/node_modules/@turf/explode/dist/cjs/index.cjs.map +1 -1
  275. package/node_modules/@turf/explode/dist/cjs/index.d.cts +1 -1
  276. package/node_modules/@turf/explode/dist/esm/index.d.ts +1 -1
  277. package/node_modules/@turf/explode/dist/esm/index.js.map +1 -1
  278. package/node_modules/@turf/explode/package.json +10 -10
  279. package/node_modules/@turf/flatten/dist/cjs/index.cjs +1 -2
  280. package/node_modules/@turf/flatten/dist/cjs/index.cjs.map +1 -1
  281. package/node_modules/@turf/flatten/dist/cjs/index.d.cts +1 -1
  282. package/node_modules/@turf/flatten/dist/esm/index.d.ts +1 -1
  283. package/node_modules/@turf/flatten/dist/esm/index.js +1 -2
  284. package/node_modules/@turf/flatten/dist/esm/index.js.map +1 -1
  285. package/node_modules/@turf/flatten/package.json +10 -10
  286. package/node_modules/@turf/flip/dist/cjs/index.cjs +3 -6
  287. package/node_modules/@turf/flip/dist/cjs/index.cjs.map +1 -1
  288. package/node_modules/@turf/flip/dist/cjs/index.d.cts +1 -1
  289. package/node_modules/@turf/flip/dist/esm/index.d.ts +1 -1
  290. package/node_modules/@turf/flip/dist/esm/index.js +3 -6
  291. package/node_modules/@turf/flip/dist/esm/index.js.map +1 -1
  292. package/node_modules/@turf/flip/package.json +11 -11
  293. package/node_modules/@turf/geojson-rbush/dist/cjs/index.cjs +9 -18
  294. package/node_modules/@turf/geojson-rbush/dist/cjs/index.cjs.map +1 -1
  295. package/node_modules/@turf/geojson-rbush/dist/esm/index.js +9 -18
  296. package/node_modules/@turf/geojson-rbush/dist/esm/index.js.map +1 -1
  297. package/node_modules/@turf/geojson-rbush/package.json +11 -11
  298. package/node_modules/@turf/great-circle/README.md +2 -1
  299. package/node_modules/@turf/great-circle/dist/cjs/index.cjs +7 -2
  300. package/node_modules/@turf/great-circle/dist/cjs/index.cjs.map +1 -1
  301. package/node_modules/@turf/great-circle/dist/esm/index.js +7 -2
  302. package/node_modules/@turf/great-circle/dist/esm/index.js.map +1 -1
  303. package/node_modules/@turf/great-circle/package.json +9 -9
  304. package/node_modules/@turf/helpers/README.md +199 -154
  305. package/node_modules/@turf/helpers/dist/cjs/index.cjs +10 -7
  306. package/node_modules/@turf/helpers/dist/cjs/index.cjs.map +1 -1
  307. package/node_modules/@turf/helpers/dist/cjs/index.d.cts +149 -110
  308. package/node_modules/@turf/helpers/dist/esm/index.d.ts +149 -110
  309. package/node_modules/@turf/helpers/dist/esm/index.js +10 -7
  310. package/node_modules/@turf/helpers/dist/esm/index.js.map +1 -1
  311. package/node_modules/@turf/helpers/package.json +8 -8
  312. package/node_modules/@turf/hex-grid/dist/cjs/index.cjs +2 -4
  313. package/node_modules/@turf/hex-grid/dist/cjs/index.cjs.map +1 -1
  314. package/node_modules/@turf/hex-grid/dist/cjs/index.d.cts +1 -1
  315. package/node_modules/@turf/hex-grid/dist/esm/index.d.ts +1 -1
  316. package/node_modules/@turf/hex-grid/dist/esm/index.js +2 -4
  317. package/node_modules/@turf/hex-grid/dist/esm/index.js.map +1 -1
  318. package/node_modules/@turf/hex-grid/package.json +14 -14
  319. package/node_modules/@turf/interpolate/README.md +5 -2
  320. package/node_modules/@turf/interpolate/dist/cjs/index.cjs +10 -15
  321. package/node_modules/@turf/interpolate/dist/cjs/index.cjs.map +1 -1
  322. package/node_modules/@turf/interpolate/dist/cjs/index.d.cts +3 -1
  323. package/node_modules/@turf/interpolate/dist/esm/index.d.ts +3 -1
  324. package/node_modules/@turf/interpolate/dist/esm/index.js +11 -16
  325. package/node_modules/@turf/interpolate/dist/esm/index.js.map +1 -1
  326. package/node_modules/@turf/interpolate/package.json +18 -18
  327. package/node_modules/@turf/intersect/dist/cjs/index.cjs +7 -11
  328. package/node_modules/@turf/intersect/dist/cjs/index.cjs.map +1 -1
  329. package/node_modules/@turf/intersect/dist/cjs/index.d.cts +1 -1
  330. package/node_modules/@turf/intersect/dist/esm/index.d.ts +1 -1
  331. package/node_modules/@turf/intersect/dist/esm/index.js +6 -10
  332. package/node_modules/@turf/intersect/dist/esm/index.js.map +1 -1
  333. package/node_modules/@turf/intersect/package.json +11 -11
  334. package/node_modules/@turf/invariant/README.md +4 -0
  335. package/node_modules/@turf/invariant/dist/cjs/index.cjs.map +1 -1
  336. package/node_modules/@turf/invariant/dist/cjs/index.d.cts +6 -6
  337. package/node_modules/@turf/invariant/dist/esm/index.d.ts +6 -6
  338. package/node_modules/@turf/invariant/dist/esm/index.js.map +1 -1
  339. package/node_modules/@turf/invariant/package.json +9 -9
  340. package/node_modules/@turf/isobands/dist/cjs/index.cjs +10 -20
  341. package/node_modules/@turf/isobands/dist/cjs/index.cjs.map +1 -1
  342. package/node_modules/@turf/isobands/dist/cjs/index.d.cts +1 -1
  343. package/node_modules/@turf/isobands/dist/esm/index.d.ts +1 -1
  344. package/node_modules/@turf/isobands/dist/esm/index.js +10 -20
  345. package/node_modules/@turf/isobands/dist/esm/index.js.map +1 -1
  346. package/node_modules/@turf/isobands/package.json +20 -20
  347. package/node_modules/@turf/isolines/dist/cjs/index.cjs +10 -20
  348. package/node_modules/@turf/isolines/dist/cjs/index.cjs.map +1 -1
  349. package/node_modules/@turf/isolines/dist/cjs/index.d.cts +1 -1
  350. package/node_modules/@turf/isolines/dist/esm/index.d.ts +1 -1
  351. package/node_modules/@turf/isolines/dist/esm/index.js +10 -20
  352. package/node_modules/@turf/isolines/dist/esm/index.js.map +1 -1
  353. package/node_modules/@turf/isolines/package.json +17 -17
  354. package/node_modules/@turf/jsts/dist/jsts.min.js +1 -1
  355. package/node_modules/@turf/jsts/dist/jsts.min.js.map +1 -0
  356. package/node_modules/@turf/jsts/package.json +17 -17
  357. package/node_modules/@turf/kinks/dist/cjs/index.cjs.map +1 -1
  358. package/node_modules/@turf/kinks/dist/cjs/index.d.cts +1 -1
  359. package/node_modules/@turf/kinks/dist/esm/index.d.ts +1 -1
  360. package/node_modules/@turf/kinks/dist/esm/index.js.map +1 -1
  361. package/node_modules/@turf/kinks/package.json +10 -10
  362. package/node_modules/@turf/length/dist/cjs/index.cjs.map +1 -1
  363. package/node_modules/@turf/length/dist/cjs/index.d.cts +1 -1
  364. package/node_modules/@turf/length/dist/esm/index.d.ts +1 -1
  365. package/node_modules/@turf/length/dist/esm/index.js.map +1 -1
  366. package/node_modules/@turf/length/package.json +11 -11
  367. package/node_modules/@turf/line-arc/dist/cjs/index.cjs.map +1 -1
  368. package/node_modules/@turf/line-arc/dist/cjs/index.d.cts +1 -1
  369. package/node_modules/@turf/line-arc/dist/esm/index.d.ts +1 -1
  370. package/node_modules/@turf/line-arc/dist/esm/index.js.map +1 -1
  371. package/node_modules/@turf/line-arc/package.json +12 -12
  372. package/node_modules/@turf/line-chunk/dist/cjs/index.cjs +3 -6
  373. package/node_modules/@turf/line-chunk/dist/cjs/index.cjs.map +1 -1
  374. package/node_modules/@turf/line-chunk/dist/esm/index.js +3 -6
  375. package/node_modules/@turf/line-chunk/dist/esm/index.js.map +1 -1
  376. package/node_modules/@turf/line-chunk/package.json +11 -11
  377. package/node_modules/@turf/line-intersect/README.md +1 -1
  378. package/node_modules/@turf/line-intersect/dist/cjs/index.cjs +3 -5
  379. package/node_modules/@turf/line-intersect/dist/cjs/index.cjs.map +1 -1
  380. package/node_modules/@turf/line-intersect/dist/cjs/index.d.cts +2 -2
  381. package/node_modules/@turf/line-intersect/dist/esm/index.d.ts +2 -2
  382. package/node_modules/@turf/line-intersect/dist/esm/index.js +3 -5
  383. package/node_modules/@turf/line-intersect/dist/esm/index.js.map +1 -1
  384. package/node_modules/@turf/line-intersect/package.json +10 -10
  385. package/node_modules/@turf/line-offset/dist/cjs/index.cjs +3 -6
  386. package/node_modules/@turf/line-offset/dist/cjs/index.cjs.map +1 -1
  387. package/node_modules/@turf/line-offset/dist/esm/index.js +3 -6
  388. package/node_modules/@turf/line-offset/dist/esm/index.js.map +1 -1
  389. package/node_modules/@turf/line-offset/package.json +10 -10
  390. package/node_modules/@turf/line-overlap/dist/cjs/index.cjs +10 -20
  391. package/node_modules/@turf/line-overlap/dist/cjs/index.cjs.map +1 -1
  392. package/node_modules/@turf/line-overlap/dist/cjs/index.d.cts +1 -1
  393. package/node_modules/@turf/line-overlap/dist/esm/index.d.ts +1 -1
  394. package/node_modules/@turf/line-overlap/dist/esm/index.js +10 -20
  395. package/node_modules/@turf/line-overlap/dist/esm/index.js.map +1 -1
  396. package/node_modules/@turf/line-overlap/package.json +15 -15
  397. package/node_modules/@turf/line-segment/dist/cjs/index.cjs.map +1 -1
  398. package/node_modules/@turf/line-segment/dist/cjs/index.d.cts +1 -1
  399. package/node_modules/@turf/line-segment/dist/esm/index.d.ts +1 -1
  400. package/node_modules/@turf/line-segment/dist/esm/index.js.map +1 -1
  401. package/node_modules/@turf/line-segment/package.json +11 -11
  402. package/node_modules/@turf/line-slice/dist/cjs/index.cjs.map +1 -1
  403. package/node_modules/@turf/line-slice/dist/esm/index.js.map +1 -1
  404. package/node_modules/@turf/line-slice/package.json +10 -10
  405. package/node_modules/@turf/line-slice-along/dist/cjs/index.cjs +5 -10
  406. package/node_modules/@turf/line-slice-along/dist/cjs/index.cjs.map +1 -1
  407. package/node_modules/@turf/line-slice-along/dist/esm/index.js +5 -10
  408. package/node_modules/@turf/line-slice-along/dist/esm/index.js.map +1 -1
  409. package/node_modules/@turf/line-slice-along/package.json +12 -12
  410. package/node_modules/@turf/line-split/dist/cjs/index.cjs +7 -14
  411. package/node_modules/@turf/line-split/dist/cjs/index.cjs.map +1 -1
  412. package/node_modules/@turf/line-split/dist/esm/index.js +7 -14
  413. package/node_modules/@turf/line-split/dist/esm/index.js.map +1 -1
  414. package/node_modules/@turf/line-split/package.json +16 -16
  415. package/node_modules/@turf/line-to-polygon/dist/cjs/index.cjs +4 -8
  416. package/node_modules/@turf/line-to-polygon/dist/cjs/index.cjs.map +1 -1
  417. package/node_modules/@turf/line-to-polygon/dist/cjs/index.d.cts +1 -1
  418. package/node_modules/@turf/line-to-polygon/dist/esm/index.d.ts +1 -1
  419. package/node_modules/@turf/line-to-polygon/dist/esm/index.js +4 -8
  420. package/node_modules/@turf/line-to-polygon/dist/esm/index.js.map +1 -1
  421. package/node_modules/@turf/line-to-polygon/package.json +12 -12
  422. package/node_modules/@turf/mask/dist/cjs/index.cjs +7 -7
  423. package/node_modules/@turf/mask/dist/cjs/index.cjs.map +1 -1
  424. package/node_modules/@turf/mask/dist/cjs/index.d.cts +1 -1
  425. package/node_modules/@turf/mask/dist/esm/index.d.ts +1 -1
  426. package/node_modules/@turf/mask/dist/esm/index.js +6 -6
  427. package/node_modules/@turf/mask/dist/esm/index.js.map +1 -1
  428. package/node_modules/@turf/mask/package.json +11 -11
  429. package/node_modules/@turf/meta/README.md +145 -93
  430. package/node_modules/@turf/meta/dist/cjs/index.cjs +22 -44
  431. package/node_modules/@turf/meta/dist/cjs/index.cjs.map +1 -1
  432. package/node_modules/@turf/meta/dist/esm/index.js +22 -44
  433. package/node_modules/@turf/meta/dist/esm/index.js.map +1 -1
  434. package/node_modules/@turf/meta/package.json +7 -7
  435. package/node_modules/@turf/midpoint/dist/cjs/index.cjs.map +1 -1
  436. package/node_modules/@turf/midpoint/dist/cjs/index.d.cts +1 -1
  437. package/node_modules/@turf/midpoint/dist/esm/index.d.ts +1 -1
  438. package/node_modules/@turf/midpoint/dist/esm/index.js.map +1 -1
  439. package/node_modules/@turf/midpoint/package.json +12 -12
  440. package/node_modules/@turf/moran-index/README.md +25 -47
  441. package/node_modules/@turf/moran-index/dist/cjs/index.cjs.map +1 -1
  442. package/node_modules/@turf/moran-index/dist/cjs/index.d.cts +16 -8
  443. package/node_modules/@turf/moran-index/dist/esm/index.d.ts +16 -8
  444. package/node_modules/@turf/moran-index/dist/esm/index.js.map +1 -1
  445. package/node_modules/@turf/moran-index/package.json +11 -11
  446. package/node_modules/@turf/nearest-neighbor-analysis/README.md +50 -21
  447. package/node_modules/@turf/nearest-neighbor-analysis/dist/cjs/index.cjs.map +1 -1
  448. package/node_modules/@turf/nearest-neighbor-analysis/dist/cjs/index.d.cts +25 -6
  449. package/node_modules/@turf/nearest-neighbor-analysis/dist/esm/index.d.ts +25 -6
  450. package/node_modules/@turf/nearest-neighbor-analysis/dist/esm/index.js.map +1 -1
  451. package/node_modules/@turf/nearest-neighbor-analysis/package.json +17 -17
  452. package/node_modules/@turf/nearest-point/dist/cjs/index.cjs +2 -4
  453. package/node_modules/@turf/nearest-point/dist/cjs/index.cjs.map +1 -1
  454. package/node_modules/@turf/nearest-point/dist/cjs/index.d.cts +1 -1
  455. package/node_modules/@turf/nearest-point/dist/esm/index.d.ts +1 -1
  456. package/node_modules/@turf/nearest-point/dist/esm/index.js +2 -4
  457. package/node_modules/@turf/nearest-point/dist/esm/index.js.map +1 -1
  458. package/node_modules/@turf/nearest-point/package.json +12 -12
  459. package/node_modules/@turf/nearest-point-on-line/README.md +9 -9
  460. package/node_modules/@turf/nearest-point-on-line/dist/cjs/index.cjs +97 -53
  461. package/node_modules/@turf/nearest-point-on-line/dist/cjs/index.cjs.map +1 -1
  462. package/node_modules/@turf/nearest-point-on-line/dist/cjs/index.d.cts +2 -2
  463. package/node_modules/@turf/nearest-point-on-line/dist/esm/index.d.ts +2 -2
  464. package/node_modules/@turf/nearest-point-on-line/dist/esm/index.js +99 -55
  465. package/node_modules/@turf/nearest-point-on-line/dist/esm/index.js.map +1 -1
  466. package/node_modules/@turf/nearest-point-on-line/package.json +15 -18
  467. package/node_modules/@turf/nearest-point-to-line/README.md +1 -9
  468. package/node_modules/@turf/nearest-point-to-line/dist/cjs/index.cjs.map +1 -1
  469. package/node_modules/@turf/nearest-point-to-line/dist/cjs/index.d.cts +1 -1
  470. package/node_modules/@turf/nearest-point-to-line/dist/esm/index.d.ts +1 -1
  471. package/node_modules/@turf/nearest-point-to-line/dist/esm/index.js.map +1 -1
  472. package/node_modules/@turf/nearest-point-to-line/package.json +14 -14
  473. package/node_modules/@turf/planepoint/dist/cjs/index.cjs.map +1 -1
  474. package/node_modules/@turf/planepoint/dist/cjs/index.d.cts +1 -1
  475. package/node_modules/@turf/planepoint/dist/esm/index.d.ts +1 -1
  476. package/node_modules/@turf/planepoint/dist/esm/index.js.map +1 -1
  477. package/node_modules/@turf/planepoint/package.json +10 -10
  478. package/node_modules/@turf/point-grid/dist/cjs/index.cjs +2 -4
  479. package/node_modules/@turf/point-grid/dist/cjs/index.cjs.map +1 -1
  480. package/node_modules/@turf/point-grid/dist/cjs/index.d.cts +1 -1
  481. package/node_modules/@turf/point-grid/dist/esm/index.d.ts +1 -1
  482. package/node_modules/@turf/point-grid/dist/esm/index.js +2 -4
  483. package/node_modules/@turf/point-grid/dist/esm/index.js.map +1 -1
  484. package/node_modules/@turf/point-grid/package.json +14 -14
  485. package/node_modules/@turf/point-on-feature/dist/cjs/index.cjs.map +1 -1
  486. package/node_modules/@turf/point-on-feature/dist/cjs/index.d.cts +1 -1
  487. package/node_modules/@turf/point-on-feature/dist/esm/index.d.ts +1 -1
  488. package/node_modules/@turf/point-on-feature/dist/esm/index.js.map +1 -1
  489. package/node_modules/@turf/point-on-feature/package.json +15 -15
  490. package/node_modules/@turf/point-to-line-distance/README.md +10 -10
  491. package/node_modules/@turf/point-to-line-distance/dist/cjs/index.cjs +21 -19
  492. package/node_modules/@turf/point-to-line-distance/dist/cjs/index.cjs.map +1 -1
  493. package/node_modules/@turf/point-to-line-distance/dist/cjs/index.d.cts +3 -3
  494. package/node_modules/@turf/point-to-line-distance/dist/esm/index.d.ts +3 -3
  495. package/node_modules/@turf/point-to-line-distance/dist/esm/index.js +22 -20
  496. package/node_modules/@turf/point-to-line-distance/dist/esm/index.js.map +1 -1
  497. package/node_modules/@turf/point-to-line-distance/package.json +18 -17
  498. package/node_modules/@turf/point-to-polygon-distance/LICENSE +20 -0
  499. package/node_modules/@turf/point-to-polygon-distance/README.md +61 -0
  500. package/node_modules/@turf/point-to-polygon-distance/dist/cjs/index.cjs +49 -0
  501. package/node_modules/@turf/point-to-polygon-distance/dist/cjs/index.cjs.map +1 -0
  502. package/node_modules/@turf/point-to-polygon-distance/dist/cjs/index.d.cts +23 -0
  503. package/node_modules/@turf/point-to-polygon-distance/dist/esm/index.d.ts +23 -0
  504. package/node_modules/@turf/point-to-polygon-distance/dist/esm/index.js +49 -0
  505. package/node_modules/@turf/point-to-polygon-distance/dist/esm/index.js.map +1 -0
  506. package/node_modules/@turf/point-to-polygon-distance/package.json +80 -0
  507. package/node_modules/@turf/points-within-polygon/dist/cjs/index.cjs.map +1 -1
  508. package/node_modules/@turf/points-within-polygon/dist/cjs/index.d.cts +1 -1
  509. package/node_modules/@turf/points-within-polygon/dist/esm/index.d.ts +1 -1
  510. package/node_modules/@turf/points-within-polygon/dist/esm/index.js.map +1 -1
  511. package/node_modules/@turf/points-within-polygon/package.json +11 -11
  512. package/node_modules/@turf/polygon-smooth/dist/cjs/index.cjs +1 -2
  513. package/node_modules/@turf/polygon-smooth/dist/cjs/index.cjs.map +1 -1
  514. package/node_modules/@turf/polygon-smooth/dist/cjs/index.d.cts +1 -1
  515. package/node_modules/@turf/polygon-smooth/dist/esm/index.d.ts +1 -1
  516. package/node_modules/@turf/polygon-smooth/dist/esm/index.js +1 -2
  517. package/node_modules/@turf/polygon-smooth/dist/esm/index.js.map +1 -1
  518. package/node_modules/@turf/polygon-smooth/package.json +10 -10
  519. package/node_modules/@turf/polygon-tangents/dist/cjs/index.cjs +1 -2
  520. package/node_modules/@turf/polygon-tangents/dist/cjs/index.cjs.map +1 -1
  521. package/node_modules/@turf/polygon-tangents/dist/cjs/index.d.cts +1 -1
  522. package/node_modules/@turf/polygon-tangents/dist/esm/index.d.ts +1 -1
  523. package/node_modules/@turf/polygon-tangents/dist/esm/index.js +1 -2
  524. package/node_modules/@turf/polygon-tangents/dist/esm/index.js.map +1 -1
  525. package/node_modules/@turf/polygon-tangents/package.json +14 -14
  526. package/node_modules/@turf/polygon-to-line/dist/cjs/index.cjs.map +1 -1
  527. package/node_modules/@turf/polygon-to-line/dist/cjs/index.d.cts +1 -1
  528. package/node_modules/@turf/polygon-to-line/dist/esm/index.d.ts +1 -1
  529. package/node_modules/@turf/polygon-to-line/dist/esm/index.js.map +1 -1
  530. package/node_modules/@turf/polygon-to-line/package.json +10 -10
  531. package/node_modules/@turf/polygonize/dist/cjs/index.cjs +20 -40
  532. package/node_modules/@turf/polygonize/dist/cjs/index.cjs.map +1 -1
  533. package/node_modules/@turf/polygonize/dist/cjs/index.d.cts +1 -1
  534. package/node_modules/@turf/polygonize/dist/esm/index.d.ts +1 -1
  535. package/node_modules/@turf/polygonize/dist/esm/index.js +20 -40
  536. package/node_modules/@turf/polygonize/dist/esm/index.js.map +1 -1
  537. package/node_modules/@turf/polygonize/package.json +13 -13
  538. package/node_modules/@turf/projection/README.md +2 -2
  539. package/node_modules/@turf/projection/dist/cjs/index.cjs +6 -12
  540. package/node_modules/@turf/projection/dist/cjs/index.cjs.map +1 -1
  541. package/node_modules/@turf/projection/dist/cjs/index.d.cts +2 -2
  542. package/node_modules/@turf/projection/dist/esm/index.d.ts +2 -2
  543. package/node_modules/@turf/projection/dist/esm/index.js +6 -12
  544. package/node_modules/@turf/projection/dist/esm/index.js.map +1 -1
  545. package/node_modules/@turf/projection/package.json +12 -12
  546. package/node_modules/@turf/quadrat-analysis/README.md +10 -10
  547. package/node_modules/@turf/quadrat-analysis/dist/cjs/index.cjs.map +1 -1
  548. package/node_modules/@turf/quadrat-analysis/dist/cjs/index.d.cts +4 -4
  549. package/node_modules/@turf/quadrat-analysis/dist/esm/index.d.ts +4 -4
  550. package/node_modules/@turf/quadrat-analysis/dist/esm/index.js.map +1 -1
  551. package/node_modules/@turf/quadrat-analysis/package.json +18 -18
  552. package/node_modules/@turf/random/README.md +27 -29
  553. package/node_modules/@turf/random/dist/cjs/index.cjs +1 -3
  554. package/node_modules/@turf/random/dist/cjs/index.cjs.map +1 -1
  555. package/node_modules/@turf/random/dist/cjs/index.d.cts +11 -11
  556. package/node_modules/@turf/random/dist/esm/index.d.ts +11 -11
  557. package/node_modules/@turf/random/dist/esm/index.js +1 -3
  558. package/node_modules/@turf/random/dist/esm/index.js.map +1 -1
  559. package/node_modules/@turf/random/package.json +9 -9
  560. package/node_modules/@turf/rectangle-grid/dist/cjs/index.cjs.map +1 -1
  561. package/node_modules/@turf/rectangle-grid/dist/cjs/index.d.cts +1 -1
  562. package/node_modules/@turf/rectangle-grid/dist/esm/index.d.ts +1 -1
  563. package/node_modules/@turf/rectangle-grid/dist/esm/index.js.map +1 -1
  564. package/node_modules/@turf/rectangle-grid/package.json +13 -13
  565. package/node_modules/@turf/rewind/dist/cjs/index.cjs +3 -6
  566. package/node_modules/@turf/rewind/dist/cjs/index.cjs.map +1 -1
  567. package/node_modules/@turf/rewind/dist/cjs/index.d.cts +1 -1
  568. package/node_modules/@turf/rewind/dist/esm/index.d.ts +1 -1
  569. package/node_modules/@turf/rewind/dist/esm/index.js +3 -6
  570. package/node_modules/@turf/rewind/dist/esm/index.js.map +1 -1
  571. package/node_modules/@turf/rewind/package.json +13 -13
  572. package/node_modules/@turf/rhumb-bearing/README.md +1 -1
  573. package/node_modules/@turf/rhumb-bearing/dist/cjs/index.cjs.map +1 -1
  574. package/node_modules/@turf/rhumb-bearing/dist/cjs/index.d.cts +1 -1
  575. package/node_modules/@turf/rhumb-bearing/dist/esm/index.d.ts +1 -1
  576. package/node_modules/@turf/rhumb-bearing/dist/esm/index.js.map +1 -1
  577. package/node_modules/@turf/rhumb-bearing/package.json +11 -11
  578. package/node_modules/@turf/rhumb-destination/dist/cjs/index.cjs +1 -2
  579. package/node_modules/@turf/rhumb-destination/dist/cjs/index.cjs.map +1 -1
  580. package/node_modules/@turf/rhumb-destination/dist/cjs/index.d.cts +1 -1
  581. package/node_modules/@turf/rhumb-destination/dist/esm/index.d.ts +1 -1
  582. package/node_modules/@turf/rhumb-destination/dist/esm/index.js +1 -2
  583. package/node_modules/@turf/rhumb-destination/dist/esm/index.js.map +1 -1
  584. package/node_modules/@turf/rhumb-destination/package.json +11 -11
  585. package/node_modules/@turf/rhumb-distance/README.md +1 -1
  586. package/node_modules/@turf/rhumb-distance/dist/cjs/index.cjs.map +1 -1
  587. package/node_modules/@turf/rhumb-distance/dist/cjs/index.d.cts +1 -1
  588. package/node_modules/@turf/rhumb-distance/dist/esm/index.d.ts +1 -1
  589. package/node_modules/@turf/rhumb-distance/dist/esm/index.js.map +1 -1
  590. package/node_modules/@turf/rhumb-distance/package.json +11 -11
  591. package/node_modules/@turf/sample/README.md +2 -1
  592. package/node_modules/@turf/sample/dist/cjs/index.cjs +3 -6
  593. package/node_modules/@turf/sample/dist/cjs/index.cjs.map +1 -1
  594. package/node_modules/@turf/sample/dist/cjs/index.d.cts +1 -1
  595. package/node_modules/@turf/sample/dist/esm/index.d.ts +1 -1
  596. package/node_modules/@turf/sample/dist/esm/index.js +3 -6
  597. package/node_modules/@turf/sample/dist/esm/index.js.map +1 -1
  598. package/node_modules/@turf/sample/package.json +9 -9
  599. package/node_modules/@turf/sector/dist/cjs/index.cjs +4 -8
  600. package/node_modules/@turf/sector/dist/cjs/index.cjs.map +1 -1
  601. package/node_modules/@turf/sector/dist/cjs/index.d.cts +1 -1
  602. package/node_modules/@turf/sector/dist/esm/index.d.ts +1 -1
  603. package/node_modules/@turf/sector/dist/esm/index.js +4 -8
  604. package/node_modules/@turf/sector/dist/esm/index.js.map +1 -1
  605. package/node_modules/@turf/sector/package.json +14 -14
  606. package/node_modules/@turf/shortest-path/README.md +13 -19
  607. package/node_modules/@turf/shortest-path/dist/cjs/index.cjs +3 -6
  608. package/node_modules/@turf/shortest-path/dist/cjs/index.cjs.map +1 -1
  609. package/node_modules/@turf/shortest-path/dist/cjs/index.d.cts +5 -5
  610. package/node_modules/@turf/shortest-path/dist/esm/index.d.ts +5 -5
  611. package/node_modules/@turf/shortest-path/dist/esm/index.js +3 -6
  612. package/node_modules/@turf/shortest-path/dist/esm/index.js.map +1 -1
  613. package/node_modules/@turf/shortest-path/package.json +18 -18
  614. package/node_modules/@turf/simplify/dist/cjs/index.cjs +8 -16
  615. package/node_modules/@turf/simplify/dist/cjs/index.cjs.map +1 -1
  616. package/node_modules/@turf/simplify/dist/cjs/index.d.cts +1 -1
  617. package/node_modules/@turf/simplify/dist/esm/index.d.ts +1 -1
  618. package/node_modules/@turf/simplify/dist/esm/index.js +8 -16
  619. package/node_modules/@turf/simplify/dist/esm/index.js.map +1 -1
  620. package/node_modules/@turf/simplify/package.json +13 -13
  621. package/node_modules/@turf/square/dist/cjs/index.cjs.map +1 -1
  622. package/node_modules/@turf/square/dist/cjs/index.d.cts +1 -1
  623. package/node_modules/@turf/square/dist/esm/index.d.ts +1 -1
  624. package/node_modules/@turf/square/dist/esm/index.js.map +1 -1
  625. package/node_modules/@turf/square/package.json +10 -10
  626. package/node_modules/@turf/square-grid/dist/cjs/index.cjs.map +1 -1
  627. package/node_modules/@turf/square-grid/dist/cjs/index.d.cts +1 -1
  628. package/node_modules/@turf/square-grid/dist/esm/index.d.ts +1 -1
  629. package/node_modules/@turf/square-grid/dist/esm/index.js.map +1 -1
  630. package/node_modules/@turf/square-grid/package.json +12 -12
  631. package/node_modules/@turf/standard-deviational-ellipse/dist/cjs/index.cjs +3 -6
  632. package/node_modules/@turf/standard-deviational-ellipse/dist/cjs/index.cjs.map +1 -1
  633. package/node_modules/@turf/standard-deviational-ellipse/dist/cjs/index.d.cts +1 -1
  634. package/node_modules/@turf/standard-deviational-ellipse/dist/esm/index.d.ts +1 -1
  635. package/node_modules/@turf/standard-deviational-ellipse/dist/esm/index.js +3 -6
  636. package/node_modules/@turf/standard-deviational-ellipse/dist/esm/index.js.map +1 -1
  637. package/node_modules/@turf/standard-deviational-ellipse/package.json +16 -16
  638. package/node_modules/@turf/tag/dist/cjs/index.cjs +1 -2
  639. package/node_modules/@turf/tag/dist/cjs/index.cjs.map +1 -1
  640. package/node_modules/@turf/tag/dist/cjs/index.d.cts +1 -1
  641. package/node_modules/@turf/tag/dist/esm/index.d.ts +1 -1
  642. package/node_modules/@turf/tag/dist/esm/index.js +1 -2
  643. package/node_modules/@turf/tag/dist/esm/index.js.map +1 -1
  644. package/node_modules/@turf/tag/package.json +12 -12
  645. package/node_modules/@turf/tesselate/dist/cjs/index.cjs +1 -2
  646. package/node_modules/@turf/tesselate/dist/cjs/index.cjs.map +1 -1
  647. package/node_modules/@turf/tesselate/dist/cjs/index.d.cts +1 -1
  648. package/node_modules/@turf/tesselate/dist/esm/index.d.ts +1 -1
  649. package/node_modules/@turf/tesselate/dist/esm/index.js +1 -2
  650. package/node_modules/@turf/tesselate/dist/esm/index.js.map +1 -1
  651. package/node_modules/@turf/tesselate/package.json +9 -9
  652. package/node_modules/@turf/tin/dist/cjs/index.cjs +13 -14
  653. package/node_modules/@turf/tin/dist/cjs/index.cjs.map +1 -1
  654. package/node_modules/@turf/tin/dist/cjs/index.d.cts +1 -1
  655. package/node_modules/@turf/tin/dist/esm/index.d.ts +1 -1
  656. package/node_modules/@turf/tin/dist/esm/index.js +13 -14
  657. package/node_modules/@turf/tin/dist/esm/index.js.map +1 -1
  658. package/node_modules/@turf/tin/package.json +9 -9
  659. package/node_modules/@turf/transform-rotate/dist/cjs/index.cjs +4 -8
  660. package/node_modules/@turf/transform-rotate/dist/cjs/index.cjs.map +1 -1
  661. package/node_modules/@turf/transform-rotate/dist/cjs/index.d.cts +1 -1
  662. package/node_modules/@turf/transform-rotate/dist/esm/index.d.ts +1 -1
  663. package/node_modules/@turf/transform-rotate/dist/esm/index.js +4 -8
  664. package/node_modules/@turf/transform-rotate/dist/esm/index.js.map +1 -1
  665. package/node_modules/@turf/transform-rotate/package.json +17 -17
  666. package/node_modules/@turf/transform-scale/dist/cjs/index.cjs +18 -12
  667. package/node_modules/@turf/transform-scale/dist/cjs/index.cjs.map +1 -1
  668. package/node_modules/@turf/transform-scale/dist/cjs/index.d.cts +1 -1
  669. package/node_modules/@turf/transform-scale/dist/esm/index.d.ts +1 -1
  670. package/node_modules/@turf/transform-scale/dist/esm/index.js +18 -12
  671. package/node_modules/@turf/transform-scale/dist/esm/index.js.map +1 -1
  672. package/node_modules/@turf/transform-scale/package.json +21 -21
  673. package/node_modules/@turf/transform-translate/dist/cjs/index.cjs +4 -8
  674. package/node_modules/@turf/transform-translate/dist/cjs/index.cjs.map +1 -1
  675. package/node_modules/@turf/transform-translate/dist/cjs/index.d.cts +1 -1
  676. package/node_modules/@turf/transform-translate/dist/esm/index.d.ts +1 -1
  677. package/node_modules/@turf/transform-translate/dist/esm/index.js +4 -8
  678. package/node_modules/@turf/transform-translate/dist/esm/index.js.map +1 -1
  679. package/node_modules/@turf/transform-translate/package.json +14 -14
  680. package/node_modules/@turf/triangle-grid/dist/cjs/index.cjs.map +1 -1
  681. package/node_modules/@turf/triangle-grid/dist/cjs/index.d.cts +1 -1
  682. package/node_modules/@turf/triangle-grid/dist/esm/index.d.ts +1 -1
  683. package/node_modules/@turf/triangle-grid/dist/esm/index.js.map +1 -1
  684. package/node_modules/@turf/triangle-grid/package.json +13 -13
  685. package/node_modules/@turf/truncate/dist/cjs/index.cjs +3 -6
  686. package/node_modules/@turf/truncate/dist/cjs/index.cjs.map +1 -1
  687. package/node_modules/@turf/truncate/dist/cjs/index.d.cts +1 -1
  688. package/node_modules/@turf/truncate/dist/esm/index.d.ts +1 -1
  689. package/node_modules/@turf/truncate/dist/esm/index.js +3 -6
  690. package/node_modules/@turf/truncate/dist/esm/index.js.map +1 -1
  691. package/node_modules/@turf/truncate/package.json +10 -10
  692. package/node_modules/@turf/turf/dist/cjs/index.cjs +3 -1
  693. package/node_modules/@turf/turf/dist/cjs/index.cjs.map +1 -1
  694. package/node_modules/@turf/turf/dist/cjs/index.d.cts +1 -0
  695. package/node_modules/@turf/turf/dist/esm/index.d.ts +1 -0
  696. package/node_modules/@turf/turf/dist/esm/index.js +2 -0
  697. package/node_modules/@turf/turf/dist/esm/index.js.map +1 -1
  698. package/node_modules/@turf/turf/package.json +126 -125
  699. package/node_modules/@turf/turf/turf.min.js +3 -26
  700. package/node_modules/@turf/union/README.md +44 -24
  701. package/node_modules/@turf/union/dist/cjs/index.cjs +9 -12
  702. package/node_modules/@turf/union/dist/cjs/index.cjs.map +1 -1
  703. package/node_modules/@turf/union/dist/cjs/index.d.cts +40 -21
  704. package/node_modules/@turf/union/dist/esm/index.d.ts +40 -21
  705. package/node_modules/@turf/union/dist/esm/index.js +8 -11
  706. package/node_modules/@turf/union/dist/esm/index.js.map +1 -1
  707. package/node_modules/@turf/union/package.json +11 -11
  708. package/node_modules/@turf/unkink-polygon/dist/cjs/index.cjs +14 -28
  709. package/node_modules/@turf/unkink-polygon/dist/cjs/index.cjs.map +1 -1
  710. package/node_modules/@turf/unkink-polygon/dist/cjs/index.d.cts +1 -1
  711. package/node_modules/@turf/unkink-polygon/dist/esm/index.d.ts +1 -1
  712. package/node_modules/@turf/unkink-polygon/dist/esm/index.js +14 -28
  713. package/node_modules/@turf/unkink-polygon/dist/esm/index.js.map +1 -1
  714. package/node_modules/@turf/unkink-polygon/package.json +13 -13
  715. package/node_modules/@turf/voronoi/dist/cjs/index.cjs +3 -6
  716. package/node_modules/@turf/voronoi/dist/cjs/index.cjs.map +1 -1
  717. package/node_modules/@turf/voronoi/dist/cjs/index.d.cts +1 -1
  718. package/node_modules/@turf/voronoi/dist/esm/index.d.ts +1 -1
  719. package/node_modules/@turf/voronoi/dist/esm/index.js +3 -6
  720. package/node_modules/@turf/voronoi/dist/esm/index.js.map +1 -1
  721. package/node_modules/@turf/voronoi/package.json +11 -11
  722. package/node_modules/@types/geojson/README.md +1 -1
  723. package/node_modules/@types/geojson/index.d.ts +4 -1
  724. package/node_modules/@types/geojson/package.json +4 -3
  725. package/node_modules/@types/node/README.md +2 -2
  726. package/node_modules/@types/node/assert.d.ts +2 -2
  727. package/node_modules/@types/node/compatibility/disposable.d.ts +16 -0
  728. package/node_modules/@types/node/compatibility/index.d.ts +9 -0
  729. package/node_modules/@types/node/compatibility/indexable.d.ts +23 -0
  730. package/node_modules/@types/node/compatibility/iterators.d.ts +21 -0
  731. package/node_modules/@types/node/crypto.d.ts +33 -9
  732. package/node_modules/@types/node/events.d.ts +3 -3
  733. package/node_modules/@types/node/fs/promises.d.ts +16 -5
  734. package/node_modules/@types/node/fs.d.ts +14 -8
  735. package/node_modules/@types/node/globals.d.ts +25 -54
  736. package/node_modules/@types/node/http.d.ts +38 -1
  737. package/node_modules/@types/node/http2.d.ts +4 -1
  738. package/node_modules/@types/node/https.d.ts +0 -1
  739. package/node_modules/@types/node/index.d.ts +8 -10
  740. package/node_modules/@types/node/module.d.ts +112 -4
  741. package/node_modules/@types/node/net.d.ts +3 -0
  742. package/node_modules/@types/node/package.json +5 -9
  743. package/node_modules/@types/node/perf_hooks.d.ts +24 -0
  744. package/node_modules/@types/node/process.d.ts +96 -12
  745. package/node_modules/@types/node/readline/promises.d.ts +14 -2
  746. package/node_modules/@types/node/readline.d.ts +58 -9
  747. package/node_modules/@types/node/sqlite.d.ts +30 -9
  748. package/node_modules/@types/node/stream/promises.d.ts +8 -1
  749. package/node_modules/@types/node/stream/web.d.ts +5 -2
  750. package/node_modules/@types/node/stream.d.ts +2 -2
  751. package/node_modules/@types/node/test.d.ts +155 -5
  752. package/node_modules/@types/node/timers/promises.d.ts +1 -1
  753. package/node_modules/@types/node/tls.d.ts +6 -0
  754. package/node_modules/@types/node/ts5.6/index.d.ts +8 -10
  755. package/node_modules/@types/node/url.d.ts +7 -4
  756. package/node_modules/@types/node/util.d.ts +80 -10
  757. package/node_modules/@types/node/v8.d.ts +1 -1
  758. package/node_modules/@types/node/vm.d.ts +81 -27
  759. package/node_modules/@types/node/worker_threads.d.ts +34 -1
  760. package/node_modules/axios/CHANGELOG.md +49 -0
  761. package/node_modules/axios/README.md +20 -8
  762. package/node_modules/axios/dist/axios.js +34 -63
  763. package/node_modules/axios/dist/axios.js.map +1 -1
  764. package/node_modules/axios/dist/axios.min.js +1 -1
  765. package/node_modules/axios/dist/axios.min.js.map +1 -1
  766. package/node_modules/axios/dist/browser/axios.cjs +40 -71
  767. package/node_modules/axios/dist/browser/axios.cjs.map +1 -1
  768. package/node_modules/axios/dist/esm/axios.js +40 -71
  769. package/node_modules/axios/dist/esm/axios.js.map +1 -1
  770. package/node_modules/axios/dist/esm/axios.min.js +1 -1
  771. package/node_modules/axios/dist/esm/axios.min.js.map +1 -1
  772. package/node_modules/axios/dist/node/axios.cjs +45 -75
  773. package/node_modules/axios/dist/node/axios.cjs.map +1 -1
  774. package/node_modules/axios/index.d.cts +5 -1
  775. package/node_modules/axios/index.d.ts +8 -1
  776. package/node_modules/axios/lib/adapters/http.js +4 -4
  777. package/node_modules/axios/lib/core/Axios.js +7 -2
  778. package/node_modules/axios/lib/core/mergeConfig.js +5 -5
  779. package/node_modules/axios/lib/env/data.js +1 -1
  780. package/node_modules/axios/lib/helpers/buildURL.js +7 -1
  781. package/node_modules/axios/lib/helpers/formDataToStream.js +2 -2
  782. package/node_modules/axios/lib/helpers/isURLSameOrigin.js +12 -65
  783. package/node_modules/axios/lib/helpers/validator.js +8 -0
  784. package/node_modules/axios/package.json +3 -3
  785. package/node_modules/bignumber.js/CHANGELOG.md +295 -0
  786. package/node_modules/bignumber.js/LICENCE.md +26 -0
  787. package/node_modules/bignumber.js/README.md +286 -0
  788. package/node_modules/bignumber.js/bignumber.d.ts +1831 -0
  789. package/node_modules/bignumber.js/bignumber.js +2922 -0
  790. package/node_modules/bignumber.js/bignumber.mjs +2907 -0
  791. package/node_modules/bignumber.js/doc/API.html +2249 -0
  792. package/node_modules/bignumber.js/package.json +50 -0
  793. package/node_modules/fast-xml-parser/CHANGELOG.md +4 -0
  794. package/node_modules/fast-xml-parser/README.md +3 -2
  795. package/node_modules/fast-xml-parser/package.json +1 -1
  796. package/node_modules/fast-xml-parser/src/v5/XmlPartReader.js +21 -17
  797. package/node_modules/fast-xml-parser/src/xmlparser/DocTypeReader.js +1 -0
  798. package/node_modules/long/index.d.ts +1 -456
  799. package/node_modules/long/package.json +1 -1
  800. package/node_modules/long/umd/index.d.ts +456 -1
  801. package/node_modules/point-in-polygon-hao/README.md +8 -7
  802. package/node_modules/point-in-polygon-hao/dist/cjs/index.cjs +322 -0
  803. package/node_modules/point-in-polygon-hao/dist/esm/index.d.ts +10 -0
  804. package/node_modules/point-in-polygon-hao/dist/esm/index.js +56 -0
  805. package/node_modules/point-in-polygon-hao/dist/pointInPolygon.js +286 -42
  806. package/node_modules/point-in-polygon-hao/dist/pointInPolygon.min.js +1 -1
  807. package/node_modules/point-in-polygon-hao/package.json +24 -20
  808. package/node_modules/polyclip-ts/LICENSE +21 -0
  809. package/node_modules/{polygon-clipping → polyclip-ts}/README.md +35 -36
  810. package/node_modules/polyclip-ts/dist/cjs/index.cjs +1179 -0
  811. package/node_modules/polyclip-ts/dist/cjs/index.cjs.map +1 -0
  812. package/node_modules/polyclip-ts/dist/cjs/index.d.cts +12 -0
  813. package/node_modules/polyclip-ts/dist/esm/index.d.ts +12 -0
  814. package/node_modules/polyclip-ts/dist/esm/index.js +1138 -0
  815. package/node_modules/polyclip-ts/dist/esm/index.js.map +1 -0
  816. package/node_modules/polyclip-ts/dist/polyclip-ts.umd.js +4811 -0
  817. package/node_modules/polyclip-ts/dist/polyclip-ts.umd.min.js +2 -0
  818. package/node_modules/polyclip-ts/package.json +72 -0
  819. package/node_modules/splaytree-ts/LICENSE +29 -0
  820. package/node_modules/splaytree-ts/README.md +296 -0
  821. package/node_modules/splaytree-ts/dist/cjs/index.cjs +714 -0
  822. package/node_modules/splaytree-ts/dist/cjs/index.cjs.map +1 -0
  823. package/node_modules/splaytree-ts/dist/cjs/index.d.cts +105 -0
  824. package/node_modules/splaytree-ts/dist/esm/index.d.ts +105 -0
  825. package/node_modules/splaytree-ts/dist/esm/index.js +688 -0
  826. package/node_modules/splaytree-ts/dist/esm/index.js.map +1 -0
  827. package/node_modules/splaytree-ts/dist/splaytree-ts.umd.js +736 -0
  828. package/node_modules/splaytree-ts/dist/splaytree-ts.umd.min.js +2 -0
  829. package/node_modules/splaytree-ts/package.json +59 -0
  830. package/node_modules/tslib/modules/index.d.ts +1 -0
  831. package/node_modules/tslib/modules/index.js +2 -0
  832. package/node_modules/tslib/package.json +1 -1
  833. package/node_modules/tslib/tslib.d.ts +7 -0
  834. package/node_modules/tslib/tslib.es6.js +24 -1
  835. package/node_modules/tslib/tslib.es6.mjs +24 -1
  836. package/node_modules/tslib/tslib.js +56 -1
  837. package/node_modules/undici-types/eventsource.d.ts +0 -2
  838. package/node_modules/undici-types/filereader.d.ts +1 -1
  839. package/node_modules/undici-types/interceptors.d.ts +3 -1
  840. package/node_modules/undici-types/package.json +1 -1
  841. package/node_modules/undici-types/patch.d.ts +0 -38
  842. package/node_modules/undici-types/websocket.d.ts +0 -2
  843. package/node_modules/uuid/README.md +82 -156
  844. package/node_modules/uuid/dist/cjs/index.d.ts +15 -0
  845. package/node_modules/uuid/dist/cjs/index.js +31 -0
  846. package/node_modules/uuid/dist/cjs/max.d.ts +2 -0
  847. package/node_modules/uuid/dist/cjs/max.js +3 -0
  848. package/node_modules/uuid/dist/cjs/md5.d.ts +4 -0
  849. package/node_modules/uuid/dist/cjs/md5.js +13 -0
  850. package/node_modules/uuid/dist/cjs/native.d.ts +6 -0
  851. package/node_modules/uuid/dist/cjs/native.js +4 -0
  852. package/node_modules/uuid/dist/cjs/nil.d.ts +2 -0
  853. package/node_modules/uuid/dist/cjs/nil.js +3 -0
  854. package/node_modules/uuid/dist/cjs/package.json +1 -0
  855. package/node_modules/uuid/dist/cjs/parse.d.ts +2 -0
  856. package/node_modules/uuid/dist/cjs/parse.js +11 -0
  857. package/node_modules/uuid/dist/cjs/regex.d.ts +2 -0
  858. package/node_modules/uuid/dist/cjs/regex.js +3 -0
  859. package/node_modules/uuid/dist/cjs/rng.d.ts +1 -0
  860. package/node_modules/uuid/dist/cjs/rng.js +13 -0
  861. package/node_modules/uuid/dist/cjs/sha1.d.ts +4 -0
  862. package/node_modules/uuid/dist/cjs/sha1.js +13 -0
  863. package/node_modules/uuid/dist/cjs/stringify.d.ts +3 -0
  864. package/node_modules/uuid/dist/cjs/stringify.js +39 -0
  865. package/node_modules/uuid/dist/cjs/types.d.ts +21 -0
  866. package/node_modules/uuid/dist/cjs/types.js +2 -0
  867. package/node_modules/uuid/dist/cjs/uuid-bin.d.ts +1 -0
  868. package/node_modules/uuid/dist/cjs/uuid-bin.js +72 -0
  869. package/node_modules/uuid/dist/cjs/v1.d.ts +11 -0
  870. package/node_modules/uuid/dist/cjs/v1.js +87 -0
  871. package/node_modules/uuid/dist/cjs/v1ToV6.d.ts +2 -0
  872. package/node_modules/uuid/dist/cjs/v1ToV6.js +13 -0
  873. package/node_modules/uuid/dist/cjs/v3.d.ts +9 -0
  874. package/node_modules/uuid/dist/cjs/v3.js +14 -0
  875. package/node_modules/uuid/dist/cjs/v35.d.ts +7 -0
  876. package/node_modules/uuid/dist/cjs/v35.js +41 -0
  877. package/node_modules/uuid/dist/cjs/v4.d.ts +4 -0
  878. package/node_modules/uuid/dist/cjs/v4.js +29 -0
  879. package/node_modules/uuid/dist/cjs/v5.d.ts +9 -0
  880. package/node_modules/uuid/dist/cjs/v5.js +14 -0
  881. package/node_modules/uuid/dist/cjs/v6.d.ts +4 -0
  882. package/node_modules/uuid/dist/cjs/v6.js +19 -0
  883. package/node_modules/uuid/dist/cjs/v6ToV1.d.ts +2 -0
  884. package/node_modules/uuid/dist/cjs/v6ToV1.js +13 -0
  885. package/node_modules/uuid/dist/cjs/v7.d.ts +9 -0
  886. package/node_modules/uuid/dist/cjs/v7.js +69 -0
  887. package/node_modules/uuid/dist/cjs/validate.d.ts +2 -0
  888. package/node_modules/uuid/dist/cjs/validate.js +7 -0
  889. package/node_modules/uuid/dist/cjs/version.d.ts +2 -0
  890. package/node_modules/uuid/dist/cjs/version.js +10 -0
  891. package/node_modules/uuid/dist/cjs-browser/index.d.ts +15 -0
  892. package/node_modules/uuid/dist/cjs-browser/index.js +31 -0
  893. package/node_modules/uuid/dist/cjs-browser/max.d.ts +2 -0
  894. package/node_modules/uuid/dist/cjs-browser/max.js +3 -0
  895. package/node_modules/uuid/dist/cjs-browser/md5.d.ts +2 -0
  896. package/node_modules/uuid/dist/cjs-browser/md5.js +137 -0
  897. package/node_modules/uuid/dist/cjs-browser/native.d.ts +4 -0
  898. package/node_modules/uuid/dist/cjs-browser/native.js +4 -0
  899. package/node_modules/uuid/dist/cjs-browser/nil.d.ts +2 -0
  900. package/node_modules/uuid/dist/cjs-browser/nil.js +3 -0
  901. package/node_modules/uuid/dist/cjs-browser/package.json +1 -0
  902. package/node_modules/uuid/dist/cjs-browser/parse.d.ts +2 -0
  903. package/node_modules/uuid/dist/cjs-browser/parse.js +11 -0
  904. package/node_modules/uuid/dist/cjs-browser/regex.d.ts +2 -0
  905. package/node_modules/uuid/dist/cjs-browser/regex.js +3 -0
  906. package/node_modules/uuid/dist/cjs-browser/rng.d.ts +1 -0
  907. package/node_modules/uuid/dist/cjs-browser/rng.js +14 -0
  908. package/node_modules/uuid/dist/cjs-browser/sha1.d.ts +2 -0
  909. package/node_modules/uuid/dist/cjs-browser/sha1.js +72 -0
  910. package/node_modules/uuid/dist/cjs-browser/stringify.d.ts +3 -0
  911. package/node_modules/uuid/dist/cjs-browser/stringify.js +39 -0
  912. package/node_modules/uuid/dist/cjs-browser/types.d.ts +21 -0
  913. package/node_modules/uuid/dist/cjs-browser/types.js +2 -0
  914. package/node_modules/uuid/dist/cjs-browser/uuid-bin.d.ts +1 -0
  915. package/node_modules/uuid/dist/cjs-browser/uuid-bin.js +72 -0
  916. package/node_modules/uuid/dist/cjs-browser/v1.d.ts +11 -0
  917. package/node_modules/uuid/dist/cjs-browser/v1.js +87 -0
  918. package/node_modules/uuid/dist/cjs-browser/v1ToV6.d.ts +2 -0
  919. package/node_modules/uuid/dist/cjs-browser/v1ToV6.js +13 -0
  920. package/node_modules/uuid/dist/cjs-browser/v3.d.ts +9 -0
  921. package/node_modules/uuid/dist/cjs-browser/v3.js +14 -0
  922. package/node_modules/uuid/dist/cjs-browser/v35.d.ts +7 -0
  923. package/node_modules/uuid/dist/cjs-browser/v35.js +41 -0
  924. package/node_modules/uuid/dist/cjs-browser/v4.d.ts +4 -0
  925. package/node_modules/uuid/dist/cjs-browser/v4.js +29 -0
  926. package/node_modules/uuid/dist/cjs-browser/v5.d.ts +9 -0
  927. package/node_modules/uuid/dist/cjs-browser/v5.js +14 -0
  928. package/node_modules/uuid/dist/cjs-browser/v6.d.ts +4 -0
  929. package/node_modules/uuid/dist/cjs-browser/v6.js +19 -0
  930. package/node_modules/uuid/dist/cjs-browser/v6ToV1.d.ts +2 -0
  931. package/node_modules/uuid/dist/cjs-browser/v6ToV1.js +13 -0
  932. package/node_modules/uuid/dist/cjs-browser/v7.d.ts +9 -0
  933. package/node_modules/uuid/dist/cjs-browser/v7.js +69 -0
  934. package/node_modules/uuid/dist/cjs-browser/validate.d.ts +2 -0
  935. package/node_modules/uuid/dist/cjs-browser/validate.js +7 -0
  936. package/node_modules/uuid/dist/cjs-browser/version.d.ts +2 -0
  937. package/node_modules/uuid/dist/cjs-browser/version.js +10 -0
  938. package/node_modules/uuid/dist/esm/bin/uuid +2 -0
  939. package/node_modules/uuid/dist/esm/index.d.ts +15 -0
  940. package/node_modules/uuid/dist/{esm-node → esm}/index.js +1 -1
  941. package/node_modules/uuid/dist/esm/max.d.ts +2 -0
  942. package/node_modules/uuid/dist/esm/max.js +1 -0
  943. package/node_modules/uuid/dist/esm/md5.d.ts +4 -0
  944. package/node_modules/uuid/dist/esm/md5.js +11 -0
  945. package/node_modules/uuid/dist/esm/native.d.ts +6 -0
  946. package/node_modules/uuid/dist/esm/native.js +2 -0
  947. package/node_modules/uuid/dist/esm/nil.d.ts +2 -0
  948. package/node_modules/uuid/dist/esm/nil.js +1 -0
  949. package/node_modules/uuid/dist/esm/parse.d.ts +2 -0
  950. package/node_modules/uuid/dist/esm/parse.js +9 -0
  951. package/node_modules/uuid/dist/esm/regex.d.ts +2 -0
  952. package/node_modules/uuid/dist/{esm-node → esm}/regex.js +1 -1
  953. package/node_modules/uuid/dist/esm/rng.d.ts +1 -0
  954. package/node_modules/uuid/dist/esm/rng.js +10 -0
  955. package/node_modules/uuid/dist/esm/sha1.d.ts +4 -0
  956. package/node_modules/uuid/dist/esm/sha1.js +11 -0
  957. package/node_modules/uuid/dist/esm/stringify.d.ts +3 -0
  958. package/node_modules/uuid/dist/esm/stringify.js +35 -0
  959. package/node_modules/uuid/dist/esm/types.d.ts +21 -0
  960. package/node_modules/uuid/dist/esm/types.js +1 -0
  961. package/node_modules/uuid/dist/esm/uuid-bin.d.ts +1 -0
  962. package/node_modules/uuid/dist/esm/uuid-bin.js +70 -0
  963. package/node_modules/uuid/dist/esm/v1.d.ts +11 -0
  964. package/node_modules/uuid/dist/esm/v1.js +83 -0
  965. package/node_modules/uuid/dist/esm/v1ToV6.d.ts +2 -0
  966. package/node_modules/uuid/dist/esm/v1ToV6.js +10 -0
  967. package/node_modules/uuid/dist/esm/v3.d.ts +9 -0
  968. package/node_modules/uuid/dist/esm/v3.js +9 -0
  969. package/node_modules/uuid/dist/esm/v35.d.ts +7 -0
  970. package/node_modules/uuid/dist/esm/v35.js +36 -0
  971. package/node_modules/uuid/dist/esm/v4.d.ts +4 -0
  972. package/node_modules/uuid/dist/esm/v4.js +27 -0
  973. package/node_modules/uuid/dist/esm/v5.d.ts +9 -0
  974. package/node_modules/uuid/dist/esm/v5.js +9 -0
  975. package/node_modules/uuid/dist/esm/v6.d.ts +4 -0
  976. package/node_modules/uuid/dist/esm/v6.js +17 -0
  977. package/node_modules/uuid/dist/esm/v6ToV1.d.ts +2 -0
  978. package/node_modules/uuid/dist/esm/v6ToV1.js +10 -0
  979. package/node_modules/uuid/dist/esm/v7.d.ts +9 -0
  980. package/node_modules/uuid/dist/esm/v7.js +65 -0
  981. package/node_modules/uuid/dist/esm/validate.d.ts +2 -0
  982. package/node_modules/uuid/dist/esm/validate.js +5 -0
  983. package/node_modules/uuid/dist/esm/version.d.ts +2 -0
  984. package/node_modules/uuid/dist/esm/version.js +8 -0
  985. package/node_modules/uuid/dist/esm-browser/index.d.ts +15 -0
  986. package/node_modules/uuid/dist/esm-browser/index.js +1 -1
  987. package/node_modules/uuid/dist/esm-browser/max.d.ts +2 -0
  988. package/node_modules/uuid/dist/esm-browser/max.js +1 -1
  989. package/node_modules/uuid/dist/esm-browser/md5.d.ts +2 -0
  990. package/node_modules/uuid/dist/esm-browser/md5.js +113 -172
  991. package/node_modules/uuid/dist/esm-browser/native.d.ts +4 -0
  992. package/node_modules/uuid/dist/esm-browser/native.js +2 -4
  993. package/node_modules/uuid/dist/esm-browser/nil.d.ts +2 -0
  994. package/node_modules/uuid/dist/esm-browser/nil.js +1 -1
  995. package/node_modules/uuid/dist/esm-browser/parse.d.ts +2 -0
  996. package/node_modules/uuid/dist/esm-browser/parse.js +6 -34
  997. package/node_modules/uuid/dist/esm-browser/regex.d.ts +2 -0
  998. package/node_modules/uuid/dist/esm-browser/regex.js +1 -1
  999. package/node_modules/uuid/dist/esm-browser/rng.d.ts +1 -0
  1000. package/node_modules/uuid/dist/esm-browser/rng.js +8 -14
  1001. package/node_modules/uuid/dist/esm-browser/sha1.d.ts +2 -0
  1002. package/node_modules/uuid/dist/esm-browser/sha1.js +62 -68
  1003. package/node_modules/uuid/dist/esm-browser/stringify.d.ts +3 -0
  1004. package/node_modules/uuid/dist/esm-browser/stringify.js +29 -25
  1005. package/node_modules/uuid/dist/esm-browser/types.d.ts +21 -0
  1006. package/node_modules/uuid/dist/esm-browser/types.js +1 -0
  1007. package/node_modules/uuid/dist/esm-browser/uuid-bin.d.ts +1 -0
  1008. package/node_modules/uuid/dist/esm-browser/uuid-bin.js +70 -0
  1009. package/node_modules/uuid/dist/esm-browser/v1.d.ts +11 -0
  1010. package/node_modules/uuid/dist/esm-browser/v1.js +75 -117
  1011. package/node_modules/uuid/dist/esm-browser/v1ToV6.d.ts +2 -0
  1012. package/node_modules/uuid/dist/esm-browser/v1ToV6.js +6 -16
  1013. package/node_modules/uuid/dist/esm-browser/v3.d.ts +9 -0
  1014. package/node_modules/uuid/dist/esm-browser/v3.js +8 -3
  1015. package/node_modules/uuid/dist/esm-browser/v35.d.ts +7 -0
  1016. package/node_modules/uuid/dist/esm-browser/v35.js +28 -47
  1017. package/node_modules/uuid/dist/esm-browser/v4.d.ts +4 -0
  1018. package/node_modules/uuid/dist/esm-browser/v4.js +21 -19
  1019. package/node_modules/uuid/dist/esm-browser/v5.d.ts +9 -0
  1020. package/node_modules/uuid/dist/esm-browser/v5.js +8 -3
  1021. package/node_modules/uuid/dist/esm-browser/v6.d.ts +4 -0
  1022. package/node_modules/uuid/dist/esm-browser/v6.js +13 -32
  1023. package/node_modules/uuid/dist/esm-browser/v6ToV1.d.ts +2 -0
  1024. package/node_modules/uuid/dist/esm-browser/v6ToV1.js +5 -15
  1025. package/node_modules/uuid/dist/esm-browser/v7.d.ts +9 -0
  1026. package/node_modules/uuid/dist/esm-browser/v7.js +58 -139
  1027. package/node_modules/uuid/dist/esm-browser/validate.d.ts +2 -0
  1028. package/node_modules/uuid/dist/esm-browser/validate.js +2 -2
  1029. package/node_modules/uuid/dist/esm-browser/version.d.ts +2 -0
  1030. package/node_modules/uuid/dist/esm-browser/version.js +5 -5
  1031. package/node_modules/uuid/package.json +65 -75
  1032. package/package.json +6 -6
  1033. package/tak-registration.js +1 -4
  1034. package/node_modules/@types/node/globals.global.d.ts +0 -1
  1035. package/node_modules/point-in-polygon-hao/.eslintrc +0 -10
  1036. package/node_modules/point-in-polygon-hao/CHANGES.md +0 -8
  1037. package/node_modules/point-in-polygon-hao/FUNDING.yml +0 -2
  1038. package/node_modules/point-in-polygon-hao/dist/pointInPolygon.mjs +0 -76
  1039. package/node_modules/point-in-polygon-hao/rollup.config.js +0 -19
  1040. package/node_modules/point-in-polygon-hao/src/index.js +0 -74
  1041. package/node_modules/polygon-clipping/LICENSE.md +0 -11
  1042. package/node_modules/polygon-clipping/dist/polygon-clipping.cjs.js +0 -1803
  1043. package/node_modules/polygon-clipping/dist/polygon-clipping.d.ts +0 -14
  1044. package/node_modules/polygon-clipping/dist/polygon-clipping.esm.js +0 -1532
  1045. package/node_modules/polygon-clipping/dist/polygon-clipping.umd.js +0 -2496
  1046. package/node_modules/polygon-clipping/dist/polygon-clipping.umd.min.js +0 -24
  1047. package/node_modules/polygon-clipping/dist/polygon-clipping.umd.min.js.map +0 -1
  1048. package/node_modules/polygon-clipping/package.json +0 -79
  1049. package/node_modules/splaytree/Readme.md +0 -222
  1050. package/node_modules/splaytree/dist/splay.esm.js +0 -686
  1051. package/node_modules/splaytree/dist/splay.esm.js.map +0 -1
  1052. package/node_modules/splaytree/dist/splay.js +0 -694
  1053. package/node_modules/splaytree/dist/splay.js.map +0 -1
  1054. package/node_modules/splaytree/package.json +0 -91
  1055. package/node_modules/splaytree/src/index.ts +0 -679
  1056. package/node_modules/splaytree/src/node.ts +0 -15
  1057. package/node_modules/splaytree/src/types.ts +0 -2
  1058. package/node_modules/splaytree/typings/index.d.ts +0 -82
  1059. package/node_modules/splaytree/typings/node.d.ts +0 -8
  1060. package/node_modules/splaytree/typings/types.d.ts +0 -2
  1061. package/node_modules/uuid/CHANGELOG.md +0 -292
  1062. package/node_modules/uuid/CONTRIBUTING.md +0 -18
  1063. package/node_modules/uuid/dist/bin/uuid +0 -2
  1064. package/node_modules/uuid/dist/commonjs-browser/index.js +0 -104
  1065. package/node_modules/uuid/dist/commonjs-browser/max.js +0 -7
  1066. package/node_modules/uuid/dist/commonjs-browser/md5.js +0 -200
  1067. package/node_modules/uuid/dist/commonjs-browser/native.js +0 -10
  1068. package/node_modules/uuid/dist/commonjs-browser/nil.js +0 -7
  1069. package/node_modules/uuid/dist/commonjs-browser/parse.js +0 -44
  1070. package/node_modules/uuid/dist/commonjs-browser/regex.js +0 -7
  1071. package/node_modules/uuid/dist/commonjs-browser/rng.js +0 -23
  1072. package/node_modules/uuid/dist/commonjs-browser/sha1.js +0 -82
  1073. package/node_modules/uuid/dist/commonjs-browser/stringify.js +0 -38
  1074. package/node_modules/uuid/dist/commonjs-browser/v1.js +0 -131
  1075. package/node_modules/uuid/dist/commonjs-browser/v1ToV6.js +0 -26
  1076. package/node_modules/uuid/dist/commonjs-browser/v3.js +0 -11
  1077. package/node_modules/uuid/dist/commonjs-browser/v35.js +0 -63
  1078. package/node_modules/uuid/dist/commonjs-browser/v4.js +0 -32
  1079. package/node_modules/uuid/dist/commonjs-browser/v5.js +0 -11
  1080. package/node_modules/uuid/dist/commonjs-browser/v6.js +0 -42
  1081. package/node_modules/uuid/dist/commonjs-browser/v6ToV1.js +0 -26
  1082. package/node_modules/uuid/dist/commonjs-browser/v7.js +0 -152
  1083. package/node_modules/uuid/dist/commonjs-browser/validate.js +0 -12
  1084. package/node_modules/uuid/dist/commonjs-browser/version.js +0 -15
  1085. package/node_modules/uuid/dist/esm-node/max.js +0 -1
  1086. package/node_modules/uuid/dist/esm-node/md5.js +0 -10
  1087. package/node_modules/uuid/dist/esm-node/native.js +0 -4
  1088. package/node_modules/uuid/dist/esm-node/nil.js +0 -1
  1089. package/node_modules/uuid/dist/esm-node/parse.js +0 -37
  1090. package/node_modules/uuid/dist/esm-node/rng.js +0 -10
  1091. package/node_modules/uuid/dist/esm-node/sha1.js +0 -10
  1092. package/node_modules/uuid/dist/esm-node/stringify.js +0 -31
  1093. package/node_modules/uuid/dist/esm-node/v1.js +0 -125
  1094. package/node_modules/uuid/dist/esm-node/v1ToV6.js +0 -20
  1095. package/node_modules/uuid/dist/esm-node/v3.js +0 -4
  1096. package/node_modules/uuid/dist/esm-node/v35.js +0 -55
  1097. package/node_modules/uuid/dist/esm-node/v4.js +0 -25
  1098. package/node_modules/uuid/dist/esm-node/v5.js +0 -4
  1099. package/node_modules/uuid/dist/esm-node/v6.js +0 -32
  1100. package/node_modules/uuid/dist/esm-node/v6ToV1.js +0 -20
  1101. package/node_modules/uuid/dist/esm-node/v7.js +0 -146
  1102. package/node_modules/uuid/dist/esm-node/validate.js +0 -5
  1103. package/node_modules/uuid/dist/esm-node/version.js +0 -8
  1104. package/node_modules/uuid/dist/index.js +0 -104
  1105. package/node_modules/uuid/dist/max.js +0 -7
  1106. package/node_modules/uuid/dist/md5-browser.js +0 -200
  1107. package/node_modules/uuid/dist/md5.js +0 -17
  1108. package/node_modules/uuid/dist/native-browser.js +0 -10
  1109. package/node_modules/uuid/dist/native.js +0 -11
  1110. package/node_modules/uuid/dist/nil.js +0 -7
  1111. package/node_modules/uuid/dist/parse.js +0 -44
  1112. package/node_modules/uuid/dist/regex.js +0 -7
  1113. package/node_modules/uuid/dist/rng-browser.js +0 -23
  1114. package/node_modules/uuid/dist/rng.js +0 -17
  1115. package/node_modules/uuid/dist/sha1-browser.js +0 -82
  1116. package/node_modules/uuid/dist/sha1.js +0 -17
  1117. package/node_modules/uuid/dist/stringify.js +0 -38
  1118. package/node_modules/uuid/dist/uuid-bin.js +0 -75
  1119. package/node_modules/uuid/dist/v1.js +0 -131
  1120. package/node_modules/uuid/dist/v1ToV6.js +0 -26
  1121. package/node_modules/uuid/dist/v3.js +0 -11
  1122. package/node_modules/uuid/dist/v35.js +0 -63
  1123. package/node_modules/uuid/dist/v4.js +0 -32
  1124. package/node_modules/uuid/dist/v5.js +0 -11
  1125. package/node_modules/uuid/dist/v6.js +0 -38
  1126. package/node_modules/uuid/dist/v6ToV1.js +0 -26
  1127. package/node_modules/uuid/dist/v7.js +0 -152
  1128. package/node_modules/uuid/dist/validate.js +0 -12
  1129. package/node_modules/uuid/dist/version.js +0 -15
  1130. package/node_modules/uuid/wrapper.mjs +0 -15
  1131. /package/node_modules/point-in-polygon-hao/{index.d.ts → dist/cjs/index.d.cts} +0 -0
  1132. /package/node_modules/{polygon-clipping → point-in-polygon-hao}/node_modules/robust-predicates/LICENSE +0 -0
  1133. /package/node_modules/{polygon-clipping → point-in-polygon-hao}/node_modules/robust-predicates/README.md +0 -0
  1134. /package/node_modules/{polygon-clipping → point-in-polygon-hao}/node_modules/robust-predicates/esm/incircle.js +0 -0
  1135. /package/node_modules/{polygon-clipping → point-in-polygon-hao}/node_modules/robust-predicates/esm/insphere.js +0 -0
  1136. /package/node_modules/{polygon-clipping → point-in-polygon-hao}/node_modules/robust-predicates/esm/orient2d.js +0 -0
  1137. /package/node_modules/{polygon-clipping → point-in-polygon-hao}/node_modules/robust-predicates/esm/orient3d.js +0 -0
  1138. /package/node_modules/{polygon-clipping → point-in-polygon-hao}/node_modules/robust-predicates/esm/util.js +0 -0
  1139. /package/node_modules/{polygon-clipping → point-in-polygon-hao}/node_modules/robust-predicates/index.d.ts +0 -0
  1140. /package/node_modules/{polygon-clipping → point-in-polygon-hao}/node_modules/robust-predicates/index.js +0 -0
  1141. /package/node_modules/{polygon-clipping → point-in-polygon-hao}/node_modules/robust-predicates/package.json +0 -0
  1142. /package/node_modules/{polygon-clipping → point-in-polygon-hao}/node_modules/robust-predicates/umd/incircle.js +0 -0
  1143. /package/node_modules/{polygon-clipping → point-in-polygon-hao}/node_modules/robust-predicates/umd/incircle.min.js +0 -0
  1144. /package/node_modules/{polygon-clipping → point-in-polygon-hao}/node_modules/robust-predicates/umd/insphere.js +0 -0
  1145. /package/node_modules/{polygon-clipping → point-in-polygon-hao}/node_modules/robust-predicates/umd/insphere.min.js +0 -0
  1146. /package/node_modules/{polygon-clipping → point-in-polygon-hao}/node_modules/robust-predicates/umd/orient2d.js +0 -0
  1147. /package/node_modules/{polygon-clipping → point-in-polygon-hao}/node_modules/robust-predicates/umd/orient2d.min.js +0 -0
  1148. /package/node_modules/{polygon-clipping → point-in-polygon-hao}/node_modules/robust-predicates/umd/orient3d.js +0 -0
  1149. /package/node_modules/{polygon-clipping → point-in-polygon-hao}/node_modules/robust-predicates/umd/orient3d.min.js +0 -0
  1150. /package/node_modules/{polygon-clipping → point-in-polygon-hao}/node_modules/robust-predicates/umd/predicates.js +0 -0
  1151. /package/node_modules/{polygon-clipping → point-in-polygon-hao}/node_modules/robust-predicates/umd/predicates.min.js +0 -0
@@ -1,1803 +0,0 @@
1
- 'use strict';
2
-
3
- var SplayTree = require('splaytree');
4
-
5
- function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
6
-
7
- var SplayTree__default = /*#__PURE__*/_interopDefaultLegacy(SplayTree);
8
-
9
- /**
10
- * A bounding box has the format:
11
- *
12
- * { ll: { x: xmin, y: ymin }, ur: { x: xmax, y: ymax } }
13
- *
14
- */
15
-
16
- const isInBbox = (bbox, point) => {
17
- return bbox.ll.x <= point.x && point.x <= bbox.ur.x && bbox.ll.y <= point.y && point.y <= bbox.ur.y;
18
- };
19
-
20
- /* Returns either null, or a bbox (aka an ordered pair of points)
21
- * If there is only one point of overlap, a bbox with identical points
22
- * will be returned */
23
- const getBboxOverlap = (b1, b2) => {
24
- // check if the bboxes overlap at all
25
- if (b2.ur.x < b1.ll.x || b1.ur.x < b2.ll.x || b2.ur.y < b1.ll.y || b1.ur.y < b2.ll.y) return null;
26
-
27
- // find the middle two X values
28
- const lowerX = b1.ll.x < b2.ll.x ? b2.ll.x : b1.ll.x;
29
- const upperX = b1.ur.x < b2.ur.x ? b1.ur.x : b2.ur.x;
30
-
31
- // find the middle two Y values
32
- const lowerY = b1.ll.y < b2.ll.y ? b2.ll.y : b1.ll.y;
33
- const upperY = b1.ur.y < b2.ur.y ? b1.ur.y : b2.ur.y;
34
-
35
- // put those middle values together to get the overlap
36
- return {
37
- ll: {
38
- x: lowerX,
39
- y: lowerY
40
- },
41
- ur: {
42
- x: upperX,
43
- y: upperY
44
- }
45
- };
46
- };
47
-
48
- /* Javascript doesn't do integer math. Everything is
49
- * floating point with percision Number.EPSILON.
50
- *
51
- * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/EPSILON
52
- */
53
-
54
- let epsilon$1 = Number.EPSILON;
55
-
56
- // IE Polyfill
57
- if (epsilon$1 === undefined) epsilon$1 = Math.pow(2, -52);
58
- const EPSILON_SQ = epsilon$1 * epsilon$1;
59
-
60
- /* FLP comparator */
61
- const cmp = (a, b) => {
62
- // check if they're both 0
63
- if (-epsilon$1 < a && a < epsilon$1) {
64
- if (-epsilon$1 < b && b < epsilon$1) {
65
- return 0;
66
- }
67
- }
68
-
69
- // check if they're flp equal
70
- const ab = a - b;
71
- if (ab * ab < EPSILON_SQ * a * b) {
72
- return 0;
73
- }
74
-
75
- // normal comparison
76
- return a < b ? -1 : 1;
77
- };
78
-
79
- /**
80
- * This class rounds incoming values sufficiently so that
81
- * floating points problems are, for the most part, avoided.
82
- *
83
- * Incoming points are have their x & y values tested against
84
- * all previously seen x & y values. If either is 'too close'
85
- * to a previously seen value, it's value is 'snapped' to the
86
- * previously seen value.
87
- *
88
- * All points should be rounded by this class before being
89
- * stored in any data structures in the rest of this algorithm.
90
- */
91
-
92
- class PtRounder {
93
- constructor() {
94
- this.reset();
95
- }
96
- reset() {
97
- this.xRounder = new CoordRounder();
98
- this.yRounder = new CoordRounder();
99
- }
100
- round(x, y) {
101
- return {
102
- x: this.xRounder.round(x),
103
- y: this.yRounder.round(y)
104
- };
105
- }
106
- }
107
- class CoordRounder {
108
- constructor() {
109
- this.tree = new SplayTree__default["default"]();
110
- // preseed with 0 so we don't end up with values < Number.EPSILON
111
- this.round(0);
112
- }
113
-
114
- // Note: this can rounds input values backwards or forwards.
115
- // You might ask, why not restrict this to just rounding
116
- // forwards? Wouldn't that allow left endpoints to always
117
- // remain left endpoints during splitting (never change to
118
- // right). No - it wouldn't, because we snap intersections
119
- // to endpoints (to establish independence from the segment
120
- // angle for t-intersections).
121
- round(coord) {
122
- const node = this.tree.add(coord);
123
- const prevNode = this.tree.prev(node);
124
- if (prevNode !== null && cmp(node.key, prevNode.key) === 0) {
125
- this.tree.remove(coord);
126
- return prevNode.key;
127
- }
128
- const nextNode = this.tree.next(node);
129
- if (nextNode !== null && cmp(node.key, nextNode.key) === 0) {
130
- this.tree.remove(coord);
131
- return nextNode.key;
132
- }
133
- return coord;
134
- }
135
- }
136
-
137
- // singleton available by import
138
- const rounder = new PtRounder();
139
-
140
- const epsilon = 1.1102230246251565e-16;
141
- const splitter = 134217729;
142
- const resulterrbound = (3 + 8 * epsilon) * epsilon;
143
-
144
- // fast_expansion_sum_zeroelim routine from oritinal code
145
- function sum(elen, e, flen, f, h) {
146
- let Q, Qnew, hh, bvirt;
147
- let enow = e[0];
148
- let fnow = f[0];
149
- let eindex = 0;
150
- let findex = 0;
151
- if ((fnow > enow) === (fnow > -enow)) {
152
- Q = enow;
153
- enow = e[++eindex];
154
- } else {
155
- Q = fnow;
156
- fnow = f[++findex];
157
- }
158
- let hindex = 0;
159
- if (eindex < elen && findex < flen) {
160
- if ((fnow > enow) === (fnow > -enow)) {
161
- Qnew = enow + Q;
162
- hh = Q - (Qnew - enow);
163
- enow = e[++eindex];
164
- } else {
165
- Qnew = fnow + Q;
166
- hh = Q - (Qnew - fnow);
167
- fnow = f[++findex];
168
- }
169
- Q = Qnew;
170
- if (hh !== 0) {
171
- h[hindex++] = hh;
172
- }
173
- while (eindex < elen && findex < flen) {
174
- if ((fnow > enow) === (fnow > -enow)) {
175
- Qnew = Q + enow;
176
- bvirt = Qnew - Q;
177
- hh = Q - (Qnew - bvirt) + (enow - bvirt);
178
- enow = e[++eindex];
179
- } else {
180
- Qnew = Q + fnow;
181
- bvirt = Qnew - Q;
182
- hh = Q - (Qnew - bvirt) + (fnow - bvirt);
183
- fnow = f[++findex];
184
- }
185
- Q = Qnew;
186
- if (hh !== 0) {
187
- h[hindex++] = hh;
188
- }
189
- }
190
- }
191
- while (eindex < elen) {
192
- Qnew = Q + enow;
193
- bvirt = Qnew - Q;
194
- hh = Q - (Qnew - bvirt) + (enow - bvirt);
195
- enow = e[++eindex];
196
- Q = Qnew;
197
- if (hh !== 0) {
198
- h[hindex++] = hh;
199
- }
200
- }
201
- while (findex < flen) {
202
- Qnew = Q + fnow;
203
- bvirt = Qnew - Q;
204
- hh = Q - (Qnew - bvirt) + (fnow - bvirt);
205
- fnow = f[++findex];
206
- Q = Qnew;
207
- if (hh !== 0) {
208
- h[hindex++] = hh;
209
- }
210
- }
211
- if (Q !== 0 || hindex === 0) {
212
- h[hindex++] = Q;
213
- }
214
- return hindex;
215
- }
216
-
217
- function estimate(elen, e) {
218
- let Q = e[0];
219
- for (let i = 1; i < elen; i++) Q += e[i];
220
- return Q;
221
- }
222
-
223
- function vec(n) {
224
- return new Float64Array(n);
225
- }
226
-
227
- const ccwerrboundA = (3 + 16 * epsilon) * epsilon;
228
- const ccwerrboundB = (2 + 12 * epsilon) * epsilon;
229
- const ccwerrboundC = (9 + 64 * epsilon) * epsilon * epsilon;
230
-
231
- const B = vec(4);
232
- const C1 = vec(8);
233
- const C2 = vec(12);
234
- const D = vec(16);
235
- const u = vec(4);
236
-
237
- function orient2dadapt(ax, ay, bx, by, cx, cy, detsum) {
238
- let acxtail, acytail, bcxtail, bcytail;
239
- let bvirt, c, ahi, alo, bhi, blo, _i, _j, _0, s1, s0, t1, t0, u3;
240
-
241
- const acx = ax - cx;
242
- const bcx = bx - cx;
243
- const acy = ay - cy;
244
- const bcy = by - cy;
245
-
246
- s1 = acx * bcy;
247
- c = splitter * acx;
248
- ahi = c - (c - acx);
249
- alo = acx - ahi;
250
- c = splitter * bcy;
251
- bhi = c - (c - bcy);
252
- blo = bcy - bhi;
253
- s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);
254
- t1 = acy * bcx;
255
- c = splitter * acy;
256
- ahi = c - (c - acy);
257
- alo = acy - ahi;
258
- c = splitter * bcx;
259
- bhi = c - (c - bcx);
260
- blo = bcx - bhi;
261
- t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);
262
- _i = s0 - t0;
263
- bvirt = s0 - _i;
264
- B[0] = s0 - (_i + bvirt) + (bvirt - t0);
265
- _j = s1 + _i;
266
- bvirt = _j - s1;
267
- _0 = s1 - (_j - bvirt) + (_i - bvirt);
268
- _i = _0 - t1;
269
- bvirt = _0 - _i;
270
- B[1] = _0 - (_i + bvirt) + (bvirt - t1);
271
- u3 = _j + _i;
272
- bvirt = u3 - _j;
273
- B[2] = _j - (u3 - bvirt) + (_i - bvirt);
274
- B[3] = u3;
275
-
276
- let det = estimate(4, B);
277
- let errbound = ccwerrboundB * detsum;
278
- if (det >= errbound || -det >= errbound) {
279
- return det;
280
- }
281
-
282
- bvirt = ax - acx;
283
- acxtail = ax - (acx + bvirt) + (bvirt - cx);
284
- bvirt = bx - bcx;
285
- bcxtail = bx - (bcx + bvirt) + (bvirt - cx);
286
- bvirt = ay - acy;
287
- acytail = ay - (acy + bvirt) + (bvirt - cy);
288
- bvirt = by - bcy;
289
- bcytail = by - (bcy + bvirt) + (bvirt - cy);
290
-
291
- if (acxtail === 0 && acytail === 0 && bcxtail === 0 && bcytail === 0) {
292
- return det;
293
- }
294
-
295
- errbound = ccwerrboundC * detsum + resulterrbound * Math.abs(det);
296
- det += (acx * bcytail + bcy * acxtail) - (acy * bcxtail + bcx * acytail);
297
- if (det >= errbound || -det >= errbound) return det;
298
-
299
- s1 = acxtail * bcy;
300
- c = splitter * acxtail;
301
- ahi = c - (c - acxtail);
302
- alo = acxtail - ahi;
303
- c = splitter * bcy;
304
- bhi = c - (c - bcy);
305
- blo = bcy - bhi;
306
- s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);
307
- t1 = acytail * bcx;
308
- c = splitter * acytail;
309
- ahi = c - (c - acytail);
310
- alo = acytail - ahi;
311
- c = splitter * bcx;
312
- bhi = c - (c - bcx);
313
- blo = bcx - bhi;
314
- t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);
315
- _i = s0 - t0;
316
- bvirt = s0 - _i;
317
- u[0] = s0 - (_i + bvirt) + (bvirt - t0);
318
- _j = s1 + _i;
319
- bvirt = _j - s1;
320
- _0 = s1 - (_j - bvirt) + (_i - bvirt);
321
- _i = _0 - t1;
322
- bvirt = _0 - _i;
323
- u[1] = _0 - (_i + bvirt) + (bvirt - t1);
324
- u3 = _j + _i;
325
- bvirt = u3 - _j;
326
- u[2] = _j - (u3 - bvirt) + (_i - bvirt);
327
- u[3] = u3;
328
- const C1len = sum(4, B, 4, u, C1);
329
-
330
- s1 = acx * bcytail;
331
- c = splitter * acx;
332
- ahi = c - (c - acx);
333
- alo = acx - ahi;
334
- c = splitter * bcytail;
335
- bhi = c - (c - bcytail);
336
- blo = bcytail - bhi;
337
- s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);
338
- t1 = acy * bcxtail;
339
- c = splitter * acy;
340
- ahi = c - (c - acy);
341
- alo = acy - ahi;
342
- c = splitter * bcxtail;
343
- bhi = c - (c - bcxtail);
344
- blo = bcxtail - bhi;
345
- t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);
346
- _i = s0 - t0;
347
- bvirt = s0 - _i;
348
- u[0] = s0 - (_i + bvirt) + (bvirt - t0);
349
- _j = s1 + _i;
350
- bvirt = _j - s1;
351
- _0 = s1 - (_j - bvirt) + (_i - bvirt);
352
- _i = _0 - t1;
353
- bvirt = _0 - _i;
354
- u[1] = _0 - (_i + bvirt) + (bvirt - t1);
355
- u3 = _j + _i;
356
- bvirt = u3 - _j;
357
- u[2] = _j - (u3 - bvirt) + (_i - bvirt);
358
- u[3] = u3;
359
- const C2len = sum(C1len, C1, 4, u, C2);
360
-
361
- s1 = acxtail * bcytail;
362
- c = splitter * acxtail;
363
- ahi = c - (c - acxtail);
364
- alo = acxtail - ahi;
365
- c = splitter * bcytail;
366
- bhi = c - (c - bcytail);
367
- blo = bcytail - bhi;
368
- s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);
369
- t1 = acytail * bcxtail;
370
- c = splitter * acytail;
371
- ahi = c - (c - acytail);
372
- alo = acytail - ahi;
373
- c = splitter * bcxtail;
374
- bhi = c - (c - bcxtail);
375
- blo = bcxtail - bhi;
376
- t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);
377
- _i = s0 - t0;
378
- bvirt = s0 - _i;
379
- u[0] = s0 - (_i + bvirt) + (bvirt - t0);
380
- _j = s1 + _i;
381
- bvirt = _j - s1;
382
- _0 = s1 - (_j - bvirt) + (_i - bvirt);
383
- _i = _0 - t1;
384
- bvirt = _0 - _i;
385
- u[1] = _0 - (_i + bvirt) + (bvirt - t1);
386
- u3 = _j + _i;
387
- bvirt = u3 - _j;
388
- u[2] = _j - (u3 - bvirt) + (_i - bvirt);
389
- u[3] = u3;
390
- const Dlen = sum(C2len, C2, 4, u, D);
391
-
392
- return D[Dlen - 1];
393
- }
394
-
395
- function orient2d(ax, ay, bx, by, cx, cy) {
396
- const detleft = (ay - cy) * (bx - cx);
397
- const detright = (ax - cx) * (by - cy);
398
- const det = detleft - detright;
399
-
400
- const detsum = Math.abs(detleft + detright);
401
- if (Math.abs(det) >= ccwerrboundA * detsum) return det;
402
-
403
- return -orient2dadapt(ax, ay, bx, by, cx, cy, detsum);
404
- }
405
-
406
- /* Cross Product of two vectors with first point at origin */
407
- const crossProduct = (a, b) => a.x * b.y - a.y * b.x;
408
-
409
- /* Dot Product of two vectors with first point at origin */
410
- const dotProduct = (a, b) => a.x * b.x + a.y * b.y;
411
-
412
- /* Comparator for two vectors with same starting point */
413
- const compareVectorAngles = (basePt, endPt1, endPt2) => {
414
- const res = orient2d(basePt.x, basePt.y, endPt1.x, endPt1.y, endPt2.x, endPt2.y);
415
- if (res > 0) return -1;
416
- if (res < 0) return 1;
417
- return 0;
418
- };
419
- const length = v => Math.sqrt(dotProduct(v, v));
420
-
421
- /* Get the sine of the angle from pShared -> pAngle to pShaed -> pBase */
422
- const sineOfAngle = (pShared, pBase, pAngle) => {
423
- const vBase = {
424
- x: pBase.x - pShared.x,
425
- y: pBase.y - pShared.y
426
- };
427
- const vAngle = {
428
- x: pAngle.x - pShared.x,
429
- y: pAngle.y - pShared.y
430
- };
431
- return crossProduct(vAngle, vBase) / length(vAngle) / length(vBase);
432
- };
433
-
434
- /* Get the cosine of the angle from pShared -> pAngle to pShaed -> pBase */
435
- const cosineOfAngle = (pShared, pBase, pAngle) => {
436
- const vBase = {
437
- x: pBase.x - pShared.x,
438
- y: pBase.y - pShared.y
439
- };
440
- const vAngle = {
441
- x: pAngle.x - pShared.x,
442
- y: pAngle.y - pShared.y
443
- };
444
- return dotProduct(vAngle, vBase) / length(vAngle) / length(vBase);
445
- };
446
-
447
- /* Get the x coordinate where the given line (defined by a point and vector)
448
- * crosses the horizontal line with the given y coordiante.
449
- * In the case of parrallel lines (including overlapping ones) returns null. */
450
- const horizontalIntersection = (pt, v, y) => {
451
- if (v.y === 0) return null;
452
- return {
453
- x: pt.x + v.x / v.y * (y - pt.y),
454
- y: y
455
- };
456
- };
457
-
458
- /* Get the y coordinate where the given line (defined by a point and vector)
459
- * crosses the vertical line with the given x coordiante.
460
- * In the case of parrallel lines (including overlapping ones) returns null. */
461
- const verticalIntersection = (pt, v, x) => {
462
- if (v.x === 0) return null;
463
- return {
464
- x: x,
465
- y: pt.y + v.y / v.x * (x - pt.x)
466
- };
467
- };
468
-
469
- /* Get the intersection of two lines, each defined by a base point and a vector.
470
- * In the case of parrallel lines (including overlapping ones) returns null. */
471
- const intersection$1 = (pt1, v1, pt2, v2) => {
472
- // take some shortcuts for vertical and horizontal lines
473
- // this also ensures we don't calculate an intersection and then discover
474
- // it's actually outside the bounding box of the line
475
- if (v1.x === 0) return verticalIntersection(pt2, v2, pt1.x);
476
- if (v2.x === 0) return verticalIntersection(pt1, v1, pt2.x);
477
- if (v1.y === 0) return horizontalIntersection(pt2, v2, pt1.y);
478
- if (v2.y === 0) return horizontalIntersection(pt1, v1, pt2.y);
479
-
480
- // General case for non-overlapping segments.
481
- // This algorithm is based on Schneider and Eberly.
482
- // http://www.cimec.org.ar/~ncalvo/Schneider_Eberly.pdf - pg 244
483
-
484
- const kross = crossProduct(v1, v2);
485
- if (kross == 0) return null;
486
- const ve = {
487
- x: pt2.x - pt1.x,
488
- y: pt2.y - pt1.y
489
- };
490
- const d1 = crossProduct(ve, v1) / kross;
491
- const d2 = crossProduct(ve, v2) / kross;
492
-
493
- // take the average of the two calculations to minimize rounding error
494
- const x1 = pt1.x + d2 * v1.x,
495
- x2 = pt2.x + d1 * v2.x;
496
- const y1 = pt1.y + d2 * v1.y,
497
- y2 = pt2.y + d1 * v2.y;
498
- const x = (x1 + x2) / 2;
499
- const y = (y1 + y2) / 2;
500
- return {
501
- x: x,
502
- y: y
503
- };
504
- };
505
-
506
- class SweepEvent {
507
- // for ordering sweep events in the sweep event queue
508
- static compare(a, b) {
509
- // favor event with a point that the sweep line hits first
510
- const ptCmp = SweepEvent.comparePoints(a.point, b.point);
511
- if (ptCmp !== 0) return ptCmp;
512
-
513
- // the points are the same, so link them if needed
514
- if (a.point !== b.point) a.link(b);
515
-
516
- // favor right events over left
517
- if (a.isLeft !== b.isLeft) return a.isLeft ? 1 : -1;
518
-
519
- // we have two matching left or right endpoints
520
- // ordering of this case is the same as for their segments
521
- return Segment.compare(a.segment, b.segment);
522
- }
523
-
524
- // for ordering points in sweep line order
525
- static comparePoints(aPt, bPt) {
526
- if (aPt.x < bPt.x) return -1;
527
- if (aPt.x > bPt.x) return 1;
528
- if (aPt.y < bPt.y) return -1;
529
- if (aPt.y > bPt.y) return 1;
530
- return 0;
531
- }
532
-
533
- // Warning: 'point' input will be modified and re-used (for performance)
534
- constructor(point, isLeft) {
535
- if (point.events === undefined) point.events = [this];else point.events.push(this);
536
- this.point = point;
537
- this.isLeft = isLeft;
538
- // this.segment, this.otherSE set by factory
539
- }
540
- link(other) {
541
- if (other.point === this.point) {
542
- throw new Error("Tried to link already linked events");
543
- }
544
- const otherEvents = other.point.events;
545
- for (let i = 0, iMax = otherEvents.length; i < iMax; i++) {
546
- const evt = otherEvents[i];
547
- this.point.events.push(evt);
548
- evt.point = this.point;
549
- }
550
- this.checkForConsuming();
551
- }
552
-
553
- /* Do a pass over our linked events and check to see if any pair
554
- * of segments match, and should be consumed. */
555
- checkForConsuming() {
556
- // FIXME: The loops in this method run O(n^2) => no good.
557
- // Maintain little ordered sweep event trees?
558
- // Can we maintaining an ordering that avoids the need
559
- // for the re-sorting with getLeftmostComparator in geom-out?
560
-
561
- // Compare each pair of events to see if other events also match
562
- const numEvents = this.point.events.length;
563
- for (let i = 0; i < numEvents; i++) {
564
- const evt1 = this.point.events[i];
565
- if (evt1.segment.consumedBy !== undefined) continue;
566
- for (let j = i + 1; j < numEvents; j++) {
567
- const evt2 = this.point.events[j];
568
- if (evt2.consumedBy !== undefined) continue;
569
- if (evt1.otherSE.point.events !== evt2.otherSE.point.events) continue;
570
- evt1.segment.consume(evt2.segment);
571
- }
572
- }
573
- }
574
- getAvailableLinkedEvents() {
575
- // point.events is always of length 2 or greater
576
- const events = [];
577
- for (let i = 0, iMax = this.point.events.length; i < iMax; i++) {
578
- const evt = this.point.events[i];
579
- if (evt !== this && !evt.segment.ringOut && evt.segment.isInResult()) {
580
- events.push(evt);
581
- }
582
- }
583
- return events;
584
- }
585
-
586
- /**
587
- * Returns a comparator function for sorting linked events that will
588
- * favor the event that will give us the smallest left-side angle.
589
- * All ring construction starts as low as possible heading to the right,
590
- * so by always turning left as sharp as possible we'll get polygons
591
- * without uncessary loops & holes.
592
- *
593
- * The comparator function has a compute cache such that it avoids
594
- * re-computing already-computed values.
595
- */
596
- getLeftmostComparator(baseEvent) {
597
- const cache = new Map();
598
- const fillCache = linkedEvent => {
599
- const nextEvent = linkedEvent.otherSE;
600
- cache.set(linkedEvent, {
601
- sine: sineOfAngle(this.point, baseEvent.point, nextEvent.point),
602
- cosine: cosineOfAngle(this.point, baseEvent.point, nextEvent.point)
603
- });
604
- };
605
- return (a, b) => {
606
- if (!cache.has(a)) fillCache(a);
607
- if (!cache.has(b)) fillCache(b);
608
- const {
609
- sine: asine,
610
- cosine: acosine
611
- } = cache.get(a);
612
- const {
613
- sine: bsine,
614
- cosine: bcosine
615
- } = cache.get(b);
616
-
617
- // both on or above x-axis
618
- if (asine >= 0 && bsine >= 0) {
619
- if (acosine < bcosine) return 1;
620
- if (acosine > bcosine) return -1;
621
- return 0;
622
- }
623
-
624
- // both below x-axis
625
- if (asine < 0 && bsine < 0) {
626
- if (acosine < bcosine) return -1;
627
- if (acosine > bcosine) return 1;
628
- return 0;
629
- }
630
-
631
- // one above x-axis, one below
632
- if (bsine < asine) return -1;
633
- if (bsine > asine) return 1;
634
- return 0;
635
- };
636
- }
637
- }
638
-
639
- // Give segments unique ID's to get consistent sorting of
640
- // segments and sweep events when all else is identical
641
- let segmentId = 0;
642
- class Segment {
643
- /* This compare() function is for ordering segments in the sweep
644
- * line tree, and does so according to the following criteria:
645
- *
646
- * Consider the vertical line that lies an infinestimal step to the
647
- * right of the right-more of the two left endpoints of the input
648
- * segments. Imagine slowly moving a point up from negative infinity
649
- * in the increasing y direction. Which of the two segments will that
650
- * point intersect first? That segment comes 'before' the other one.
651
- *
652
- * If neither segment would be intersected by such a line, (if one
653
- * or more of the segments are vertical) then the line to be considered
654
- * is directly on the right-more of the two left inputs.
655
- */
656
- static compare(a, b) {
657
- const alx = a.leftSE.point.x;
658
- const blx = b.leftSE.point.x;
659
- const arx = a.rightSE.point.x;
660
- const brx = b.rightSE.point.x;
661
-
662
- // check if they're even in the same vertical plane
663
- if (brx < alx) return 1;
664
- if (arx < blx) return -1;
665
- const aly = a.leftSE.point.y;
666
- const bly = b.leftSE.point.y;
667
- const ary = a.rightSE.point.y;
668
- const bry = b.rightSE.point.y;
669
-
670
- // is left endpoint of segment B the right-more?
671
- if (alx < blx) {
672
- // are the two segments in the same horizontal plane?
673
- if (bly < aly && bly < ary) return 1;
674
- if (bly > aly && bly > ary) return -1;
675
-
676
- // is the B left endpoint colinear to segment A?
677
- const aCmpBLeft = a.comparePoint(b.leftSE.point);
678
- if (aCmpBLeft < 0) return 1;
679
- if (aCmpBLeft > 0) return -1;
680
-
681
- // is the A right endpoint colinear to segment B ?
682
- const bCmpARight = b.comparePoint(a.rightSE.point);
683
- if (bCmpARight !== 0) return bCmpARight;
684
-
685
- // colinear segments, consider the one with left-more
686
- // left endpoint to be first (arbitrary?)
687
- return -1;
688
- }
689
-
690
- // is left endpoint of segment A the right-more?
691
- if (alx > blx) {
692
- if (aly < bly && aly < bry) return -1;
693
- if (aly > bly && aly > bry) return 1;
694
-
695
- // is the A left endpoint colinear to segment B?
696
- const bCmpALeft = b.comparePoint(a.leftSE.point);
697
- if (bCmpALeft !== 0) return bCmpALeft;
698
-
699
- // is the B right endpoint colinear to segment A?
700
- const aCmpBRight = a.comparePoint(b.rightSE.point);
701
- if (aCmpBRight < 0) return 1;
702
- if (aCmpBRight > 0) return -1;
703
-
704
- // colinear segments, consider the one with left-more
705
- // left endpoint to be first (arbitrary?)
706
- return 1;
707
- }
708
-
709
- // if we get here, the two left endpoints are in the same
710
- // vertical plane, ie alx === blx
711
-
712
- // consider the lower left-endpoint to come first
713
- if (aly < bly) return -1;
714
- if (aly > bly) return 1;
715
-
716
- // left endpoints are identical
717
- // check for colinearity by using the left-more right endpoint
718
-
719
- // is the A right endpoint more left-more?
720
- if (arx < brx) {
721
- const bCmpARight = b.comparePoint(a.rightSE.point);
722
- if (bCmpARight !== 0) return bCmpARight;
723
- }
724
-
725
- // is the B right endpoint more left-more?
726
- if (arx > brx) {
727
- const aCmpBRight = a.comparePoint(b.rightSE.point);
728
- if (aCmpBRight < 0) return 1;
729
- if (aCmpBRight > 0) return -1;
730
- }
731
- if (arx !== brx) {
732
- // are these two [almost] vertical segments with opposite orientation?
733
- // if so, the one with the lower right endpoint comes first
734
- const ay = ary - aly;
735
- const ax = arx - alx;
736
- const by = bry - bly;
737
- const bx = brx - blx;
738
- if (ay > ax && by < bx) return 1;
739
- if (ay < ax && by > bx) return -1;
740
- }
741
-
742
- // we have colinear segments with matching orientation
743
- // consider the one with more left-more right endpoint to be first
744
- if (arx > brx) return 1;
745
- if (arx < brx) return -1;
746
-
747
- // if we get here, two two right endpoints are in the same
748
- // vertical plane, ie arx === brx
749
-
750
- // consider the lower right-endpoint to come first
751
- if (ary < bry) return -1;
752
- if (ary > bry) return 1;
753
-
754
- // right endpoints identical as well, so the segments are idential
755
- // fall back on creation order as consistent tie-breaker
756
- if (a.id < b.id) return -1;
757
- if (a.id > b.id) return 1;
758
-
759
- // identical segment, ie a === b
760
- return 0;
761
- }
762
-
763
- /* Warning: a reference to ringWindings input will be stored,
764
- * and possibly will be later modified */
765
- constructor(leftSE, rightSE, rings, windings) {
766
- this.id = ++segmentId;
767
- this.leftSE = leftSE;
768
- leftSE.segment = this;
769
- leftSE.otherSE = rightSE;
770
- this.rightSE = rightSE;
771
- rightSE.segment = this;
772
- rightSE.otherSE = leftSE;
773
- this.rings = rings;
774
- this.windings = windings;
775
- // left unset for performance, set later in algorithm
776
- // this.ringOut, this.consumedBy, this.prev
777
- }
778
- static fromRing(pt1, pt2, ring) {
779
- let leftPt, rightPt, winding;
780
-
781
- // ordering the two points according to sweep line ordering
782
- const cmpPts = SweepEvent.comparePoints(pt1, pt2);
783
- if (cmpPts < 0) {
784
- leftPt = pt1;
785
- rightPt = pt2;
786
- winding = 1;
787
- } else if (cmpPts > 0) {
788
- leftPt = pt2;
789
- rightPt = pt1;
790
- winding = -1;
791
- } else throw new Error(`Tried to create degenerate segment at [${pt1.x}, ${pt1.y}]`);
792
- const leftSE = new SweepEvent(leftPt, true);
793
- const rightSE = new SweepEvent(rightPt, false);
794
- return new Segment(leftSE, rightSE, [ring], [winding]);
795
- }
796
-
797
- /* When a segment is split, the rightSE is replaced with a new sweep event */
798
- replaceRightSE(newRightSE) {
799
- this.rightSE = newRightSE;
800
- this.rightSE.segment = this;
801
- this.rightSE.otherSE = this.leftSE;
802
- this.leftSE.otherSE = this.rightSE;
803
- }
804
- bbox() {
805
- const y1 = this.leftSE.point.y;
806
- const y2 = this.rightSE.point.y;
807
- return {
808
- ll: {
809
- x: this.leftSE.point.x,
810
- y: y1 < y2 ? y1 : y2
811
- },
812
- ur: {
813
- x: this.rightSE.point.x,
814
- y: y1 > y2 ? y1 : y2
815
- }
816
- };
817
- }
818
-
819
- /* A vector from the left point to the right */
820
- vector() {
821
- return {
822
- x: this.rightSE.point.x - this.leftSE.point.x,
823
- y: this.rightSE.point.y - this.leftSE.point.y
824
- };
825
- }
826
- isAnEndpoint(pt) {
827
- return pt.x === this.leftSE.point.x && pt.y === this.leftSE.point.y || pt.x === this.rightSE.point.x && pt.y === this.rightSE.point.y;
828
- }
829
-
830
- /* Compare this segment with a point.
831
- *
832
- * A point P is considered to be colinear to a segment if there
833
- * exists a distance D such that if we travel along the segment
834
- * from one * endpoint towards the other a distance D, we find
835
- * ourselves at point P.
836
- *
837
- * Return value indicates:
838
- *
839
- * 1: point lies above the segment (to the left of vertical)
840
- * 0: point is colinear to segment
841
- * -1: point lies below the segment (to the right of vertical)
842
- */
843
- comparePoint(point) {
844
- if (this.isAnEndpoint(point)) return 0;
845
- const lPt = this.leftSE.point;
846
- const rPt = this.rightSE.point;
847
- const v = this.vector();
848
-
849
- // Exactly vertical segments.
850
- if (lPt.x === rPt.x) {
851
- if (point.x === lPt.x) return 0;
852
- return point.x < lPt.x ? 1 : -1;
853
- }
854
-
855
- // Nearly vertical segments with an intersection.
856
- // Check to see where a point on the line with matching Y coordinate is.
857
- const yDist = (point.y - lPt.y) / v.y;
858
- const xFromYDist = lPt.x + yDist * v.x;
859
- if (point.x === xFromYDist) return 0;
860
-
861
- // General case.
862
- // Check to see where a point on the line with matching X coordinate is.
863
- const xDist = (point.x - lPt.x) / v.x;
864
- const yFromXDist = lPt.y + xDist * v.y;
865
- if (point.y === yFromXDist) return 0;
866
- return point.y < yFromXDist ? -1 : 1;
867
- }
868
-
869
- /**
870
- * Given another segment, returns the first non-trivial intersection
871
- * between the two segments (in terms of sweep line ordering), if it exists.
872
- *
873
- * A 'non-trivial' intersection is one that will cause one or both of the
874
- * segments to be split(). As such, 'trivial' vs. 'non-trivial' intersection:
875
- *
876
- * * endpoint of segA with endpoint of segB --> trivial
877
- * * endpoint of segA with point along segB --> non-trivial
878
- * * endpoint of segB with point along segA --> non-trivial
879
- * * point along segA with point along segB --> non-trivial
880
- *
881
- * If no non-trivial intersection exists, return null
882
- * Else, return null.
883
- */
884
- getIntersection(other) {
885
- // If bboxes don't overlap, there can't be any intersections
886
- const tBbox = this.bbox();
887
- const oBbox = other.bbox();
888
- const bboxOverlap = getBboxOverlap(tBbox, oBbox);
889
- if (bboxOverlap === null) return null;
890
-
891
- // We first check to see if the endpoints can be considered intersections.
892
- // This will 'snap' intersections to endpoints if possible, and will
893
- // handle cases of colinearity.
894
-
895
- const tlp = this.leftSE.point;
896
- const trp = this.rightSE.point;
897
- const olp = other.leftSE.point;
898
- const orp = other.rightSE.point;
899
-
900
- // does each endpoint touch the other segment?
901
- // note that we restrict the 'touching' definition to only allow segments
902
- // to touch endpoints that lie forward from where we are in the sweep line pass
903
- const touchesOtherLSE = isInBbox(tBbox, olp) && this.comparePoint(olp) === 0;
904
- const touchesThisLSE = isInBbox(oBbox, tlp) && other.comparePoint(tlp) === 0;
905
- const touchesOtherRSE = isInBbox(tBbox, orp) && this.comparePoint(orp) === 0;
906
- const touchesThisRSE = isInBbox(oBbox, trp) && other.comparePoint(trp) === 0;
907
-
908
- // do left endpoints match?
909
- if (touchesThisLSE && touchesOtherLSE) {
910
- // these two cases are for colinear segments with matching left
911
- // endpoints, and one segment being longer than the other
912
- if (touchesThisRSE && !touchesOtherRSE) return trp;
913
- if (!touchesThisRSE && touchesOtherRSE) return orp;
914
- // either the two segments match exactly (two trival intersections)
915
- // or just on their left endpoint (one trivial intersection
916
- return null;
917
- }
918
-
919
- // does this left endpoint matches (other doesn't)
920
- if (touchesThisLSE) {
921
- // check for segments that just intersect on opposing endpoints
922
- if (touchesOtherRSE) {
923
- if (tlp.x === orp.x && tlp.y === orp.y) return null;
924
- }
925
- // t-intersection on left endpoint
926
- return tlp;
927
- }
928
-
929
- // does other left endpoint matches (this doesn't)
930
- if (touchesOtherLSE) {
931
- // check for segments that just intersect on opposing endpoints
932
- if (touchesThisRSE) {
933
- if (trp.x === olp.x && trp.y === olp.y) return null;
934
- }
935
- // t-intersection on left endpoint
936
- return olp;
937
- }
938
-
939
- // trivial intersection on right endpoints
940
- if (touchesThisRSE && touchesOtherRSE) return null;
941
-
942
- // t-intersections on just one right endpoint
943
- if (touchesThisRSE) return trp;
944
- if (touchesOtherRSE) return orp;
945
-
946
- // None of our endpoints intersect. Look for a general intersection between
947
- // infinite lines laid over the segments
948
- const pt = intersection$1(tlp, this.vector(), olp, other.vector());
949
-
950
- // are the segments parrallel? Note that if they were colinear with overlap,
951
- // they would have an endpoint intersection and that case was already handled above
952
- if (pt === null) return null;
953
-
954
- // is the intersection found between the lines not on the segments?
955
- if (!isInBbox(bboxOverlap, pt)) return null;
956
-
957
- // round the the computed point if needed
958
- return rounder.round(pt.x, pt.y);
959
- }
960
-
961
- /**
962
- * Split the given segment into multiple segments on the given points.
963
- * * Each existing segment will retain its leftSE and a new rightSE will be
964
- * generated for it.
965
- * * A new segment will be generated which will adopt the original segment's
966
- * rightSE, and a new leftSE will be generated for it.
967
- * * If there are more than two points given to split on, new segments
968
- * in the middle will be generated with new leftSE and rightSE's.
969
- * * An array of the newly generated SweepEvents will be returned.
970
- *
971
- * Warning: input array of points is modified
972
- */
973
- split(point) {
974
- const newEvents = [];
975
- const alreadyLinked = point.events !== undefined;
976
- const newLeftSE = new SweepEvent(point, true);
977
- const newRightSE = new SweepEvent(point, false);
978
- const oldRightSE = this.rightSE;
979
- this.replaceRightSE(newRightSE);
980
- newEvents.push(newRightSE);
981
- newEvents.push(newLeftSE);
982
- const newSeg = new Segment(newLeftSE, oldRightSE, this.rings.slice(), this.windings.slice());
983
-
984
- // when splitting a nearly vertical downward-facing segment,
985
- // sometimes one of the resulting new segments is vertical, in which
986
- // case its left and right events may need to be swapped
987
- if (SweepEvent.comparePoints(newSeg.leftSE.point, newSeg.rightSE.point) > 0) {
988
- newSeg.swapEvents();
989
- }
990
- if (SweepEvent.comparePoints(this.leftSE.point, this.rightSE.point) > 0) {
991
- this.swapEvents();
992
- }
993
-
994
- // in the point we just used to create new sweep events with was already
995
- // linked to other events, we need to check if either of the affected
996
- // segments should be consumed
997
- if (alreadyLinked) {
998
- newLeftSE.checkForConsuming();
999
- newRightSE.checkForConsuming();
1000
- }
1001
- return newEvents;
1002
- }
1003
-
1004
- /* Swap which event is left and right */
1005
- swapEvents() {
1006
- const tmpEvt = this.rightSE;
1007
- this.rightSE = this.leftSE;
1008
- this.leftSE = tmpEvt;
1009
- this.leftSE.isLeft = true;
1010
- this.rightSE.isLeft = false;
1011
- for (let i = 0, iMax = this.windings.length; i < iMax; i++) {
1012
- this.windings[i] *= -1;
1013
- }
1014
- }
1015
-
1016
- /* Consume another segment. We take their rings under our wing
1017
- * and mark them as consumed. Use for perfectly overlapping segments */
1018
- consume(other) {
1019
- let consumer = this;
1020
- let consumee = other;
1021
- while (consumer.consumedBy) consumer = consumer.consumedBy;
1022
- while (consumee.consumedBy) consumee = consumee.consumedBy;
1023
- const cmp = Segment.compare(consumer, consumee);
1024
- if (cmp === 0) return; // already consumed
1025
- // the winner of the consumption is the earlier segment
1026
- // according to sweep line ordering
1027
- if (cmp > 0) {
1028
- const tmp = consumer;
1029
- consumer = consumee;
1030
- consumee = tmp;
1031
- }
1032
-
1033
- // make sure a segment doesn't consume it's prev
1034
- if (consumer.prev === consumee) {
1035
- const tmp = consumer;
1036
- consumer = consumee;
1037
- consumee = tmp;
1038
- }
1039
- for (let i = 0, iMax = consumee.rings.length; i < iMax; i++) {
1040
- const ring = consumee.rings[i];
1041
- const winding = consumee.windings[i];
1042
- const index = consumer.rings.indexOf(ring);
1043
- if (index === -1) {
1044
- consumer.rings.push(ring);
1045
- consumer.windings.push(winding);
1046
- } else consumer.windings[index] += winding;
1047
- }
1048
- consumee.rings = null;
1049
- consumee.windings = null;
1050
- consumee.consumedBy = consumer;
1051
-
1052
- // mark sweep events consumed as to maintain ordering in sweep event queue
1053
- consumee.leftSE.consumedBy = consumer.leftSE;
1054
- consumee.rightSE.consumedBy = consumer.rightSE;
1055
- }
1056
-
1057
- /* The first segment previous segment chain that is in the result */
1058
- prevInResult() {
1059
- if (this._prevInResult !== undefined) return this._prevInResult;
1060
- if (!this.prev) this._prevInResult = null;else if (this.prev.isInResult()) this._prevInResult = this.prev;else this._prevInResult = this.prev.prevInResult();
1061
- return this._prevInResult;
1062
- }
1063
- beforeState() {
1064
- if (this._beforeState !== undefined) return this._beforeState;
1065
- if (!this.prev) this._beforeState = {
1066
- rings: [],
1067
- windings: [],
1068
- multiPolys: []
1069
- };else {
1070
- const seg = this.prev.consumedBy || this.prev;
1071
- this._beforeState = seg.afterState();
1072
- }
1073
- return this._beforeState;
1074
- }
1075
- afterState() {
1076
- if (this._afterState !== undefined) return this._afterState;
1077
- const beforeState = this.beforeState();
1078
- this._afterState = {
1079
- rings: beforeState.rings.slice(0),
1080
- windings: beforeState.windings.slice(0),
1081
- multiPolys: []
1082
- };
1083
- const ringsAfter = this._afterState.rings;
1084
- const windingsAfter = this._afterState.windings;
1085
- const mpsAfter = this._afterState.multiPolys;
1086
-
1087
- // calculate ringsAfter, windingsAfter
1088
- for (let i = 0, iMax = this.rings.length; i < iMax; i++) {
1089
- const ring = this.rings[i];
1090
- const winding = this.windings[i];
1091
- const index = ringsAfter.indexOf(ring);
1092
- if (index === -1) {
1093
- ringsAfter.push(ring);
1094
- windingsAfter.push(winding);
1095
- } else windingsAfter[index] += winding;
1096
- }
1097
-
1098
- // calcualte polysAfter
1099
- const polysAfter = [];
1100
- const polysExclude = [];
1101
- for (let i = 0, iMax = ringsAfter.length; i < iMax; i++) {
1102
- if (windingsAfter[i] === 0) continue; // non-zero rule
1103
- const ring = ringsAfter[i];
1104
- const poly = ring.poly;
1105
- if (polysExclude.indexOf(poly) !== -1) continue;
1106
- if (ring.isExterior) polysAfter.push(poly);else {
1107
- if (polysExclude.indexOf(poly) === -1) polysExclude.push(poly);
1108
- const index = polysAfter.indexOf(ring.poly);
1109
- if (index !== -1) polysAfter.splice(index, 1);
1110
- }
1111
- }
1112
-
1113
- // calculate multiPolysAfter
1114
- for (let i = 0, iMax = polysAfter.length; i < iMax; i++) {
1115
- const mp = polysAfter[i].multiPoly;
1116
- if (mpsAfter.indexOf(mp) === -1) mpsAfter.push(mp);
1117
- }
1118
- return this._afterState;
1119
- }
1120
-
1121
- /* Is this segment part of the final result? */
1122
- isInResult() {
1123
- // if we've been consumed, we're not in the result
1124
- if (this.consumedBy) return false;
1125
- if (this._isInResult !== undefined) return this._isInResult;
1126
- const mpsBefore = this.beforeState().multiPolys;
1127
- const mpsAfter = this.afterState().multiPolys;
1128
- switch (operation.type) {
1129
- case "union":
1130
- {
1131
- // UNION - included iff:
1132
- // * On one side of us there is 0 poly interiors AND
1133
- // * On the other side there is 1 or more.
1134
- const noBefores = mpsBefore.length === 0;
1135
- const noAfters = mpsAfter.length === 0;
1136
- this._isInResult = noBefores !== noAfters;
1137
- break;
1138
- }
1139
- case "intersection":
1140
- {
1141
- // INTERSECTION - included iff:
1142
- // * on one side of us all multipolys are rep. with poly interiors AND
1143
- // * on the other side of us, not all multipolys are repsented
1144
- // with poly interiors
1145
- let least;
1146
- let most;
1147
- if (mpsBefore.length < mpsAfter.length) {
1148
- least = mpsBefore.length;
1149
- most = mpsAfter.length;
1150
- } else {
1151
- least = mpsAfter.length;
1152
- most = mpsBefore.length;
1153
- }
1154
- this._isInResult = most === operation.numMultiPolys && least < most;
1155
- break;
1156
- }
1157
- case "xor":
1158
- {
1159
- // XOR - included iff:
1160
- // * the difference between the number of multipolys represented
1161
- // with poly interiors on our two sides is an odd number
1162
- const diff = Math.abs(mpsBefore.length - mpsAfter.length);
1163
- this._isInResult = diff % 2 === 1;
1164
- break;
1165
- }
1166
- case "difference":
1167
- {
1168
- // DIFFERENCE included iff:
1169
- // * on exactly one side, we have just the subject
1170
- const isJustSubject = mps => mps.length === 1 && mps[0].isSubject;
1171
- this._isInResult = isJustSubject(mpsBefore) !== isJustSubject(mpsAfter);
1172
- break;
1173
- }
1174
- default:
1175
- throw new Error(`Unrecognized operation type found ${operation.type}`);
1176
- }
1177
- return this._isInResult;
1178
- }
1179
- }
1180
-
1181
- class RingIn {
1182
- constructor(geomRing, poly, isExterior) {
1183
- if (!Array.isArray(geomRing) || geomRing.length === 0) {
1184
- throw new Error("Input geometry is not a valid Polygon or MultiPolygon");
1185
- }
1186
- this.poly = poly;
1187
- this.isExterior = isExterior;
1188
- this.segments = [];
1189
- if (typeof geomRing[0][0] !== "number" || typeof geomRing[0][1] !== "number") {
1190
- throw new Error("Input geometry is not a valid Polygon or MultiPolygon");
1191
- }
1192
- const firstPoint = rounder.round(geomRing[0][0], geomRing[0][1]);
1193
- this.bbox = {
1194
- ll: {
1195
- x: firstPoint.x,
1196
- y: firstPoint.y
1197
- },
1198
- ur: {
1199
- x: firstPoint.x,
1200
- y: firstPoint.y
1201
- }
1202
- };
1203
- let prevPoint = firstPoint;
1204
- for (let i = 1, iMax = geomRing.length; i < iMax; i++) {
1205
- if (typeof geomRing[i][0] !== "number" || typeof geomRing[i][1] !== "number") {
1206
- throw new Error("Input geometry is not a valid Polygon or MultiPolygon");
1207
- }
1208
- let point = rounder.round(geomRing[i][0], geomRing[i][1]);
1209
- // skip repeated points
1210
- if (point.x === prevPoint.x && point.y === prevPoint.y) continue;
1211
- this.segments.push(Segment.fromRing(prevPoint, point, this));
1212
- if (point.x < this.bbox.ll.x) this.bbox.ll.x = point.x;
1213
- if (point.y < this.bbox.ll.y) this.bbox.ll.y = point.y;
1214
- if (point.x > this.bbox.ur.x) this.bbox.ur.x = point.x;
1215
- if (point.y > this.bbox.ur.y) this.bbox.ur.y = point.y;
1216
- prevPoint = point;
1217
- }
1218
- // add segment from last to first if last is not the same as first
1219
- if (firstPoint.x !== prevPoint.x || firstPoint.y !== prevPoint.y) {
1220
- this.segments.push(Segment.fromRing(prevPoint, firstPoint, this));
1221
- }
1222
- }
1223
- getSweepEvents() {
1224
- const sweepEvents = [];
1225
- for (let i = 0, iMax = this.segments.length; i < iMax; i++) {
1226
- const segment = this.segments[i];
1227
- sweepEvents.push(segment.leftSE);
1228
- sweepEvents.push(segment.rightSE);
1229
- }
1230
- return sweepEvents;
1231
- }
1232
- }
1233
- class PolyIn {
1234
- constructor(geomPoly, multiPoly) {
1235
- if (!Array.isArray(geomPoly)) {
1236
- throw new Error("Input geometry is not a valid Polygon or MultiPolygon");
1237
- }
1238
- this.exteriorRing = new RingIn(geomPoly[0], this, true);
1239
- // copy by value
1240
- this.bbox = {
1241
- ll: {
1242
- x: this.exteriorRing.bbox.ll.x,
1243
- y: this.exteriorRing.bbox.ll.y
1244
- },
1245
- ur: {
1246
- x: this.exteriorRing.bbox.ur.x,
1247
- y: this.exteriorRing.bbox.ur.y
1248
- }
1249
- };
1250
- this.interiorRings = [];
1251
- for (let i = 1, iMax = geomPoly.length; i < iMax; i++) {
1252
- const ring = new RingIn(geomPoly[i], this, false);
1253
- if (ring.bbox.ll.x < this.bbox.ll.x) this.bbox.ll.x = ring.bbox.ll.x;
1254
- if (ring.bbox.ll.y < this.bbox.ll.y) this.bbox.ll.y = ring.bbox.ll.y;
1255
- if (ring.bbox.ur.x > this.bbox.ur.x) this.bbox.ur.x = ring.bbox.ur.x;
1256
- if (ring.bbox.ur.y > this.bbox.ur.y) this.bbox.ur.y = ring.bbox.ur.y;
1257
- this.interiorRings.push(ring);
1258
- }
1259
- this.multiPoly = multiPoly;
1260
- }
1261
- getSweepEvents() {
1262
- const sweepEvents = this.exteriorRing.getSweepEvents();
1263
- for (let i = 0, iMax = this.interiorRings.length; i < iMax; i++) {
1264
- const ringSweepEvents = this.interiorRings[i].getSweepEvents();
1265
- for (let j = 0, jMax = ringSweepEvents.length; j < jMax; j++) {
1266
- sweepEvents.push(ringSweepEvents[j]);
1267
- }
1268
- }
1269
- return sweepEvents;
1270
- }
1271
- }
1272
- class MultiPolyIn {
1273
- constructor(geom, isSubject) {
1274
- if (!Array.isArray(geom)) {
1275
- throw new Error("Input geometry is not a valid Polygon or MultiPolygon");
1276
- }
1277
- try {
1278
- // if the input looks like a polygon, convert it to a multipolygon
1279
- if (typeof geom[0][0][0] === "number") geom = [geom];
1280
- } catch (ex) {
1281
- // The input is either malformed or has empty arrays.
1282
- // In either case, it will be handled later on.
1283
- }
1284
- this.polys = [];
1285
- this.bbox = {
1286
- ll: {
1287
- x: Number.POSITIVE_INFINITY,
1288
- y: Number.POSITIVE_INFINITY
1289
- },
1290
- ur: {
1291
- x: Number.NEGATIVE_INFINITY,
1292
- y: Number.NEGATIVE_INFINITY
1293
- }
1294
- };
1295
- for (let i = 0, iMax = geom.length; i < iMax; i++) {
1296
- const poly = new PolyIn(geom[i], this);
1297
- if (poly.bbox.ll.x < this.bbox.ll.x) this.bbox.ll.x = poly.bbox.ll.x;
1298
- if (poly.bbox.ll.y < this.bbox.ll.y) this.bbox.ll.y = poly.bbox.ll.y;
1299
- if (poly.bbox.ur.x > this.bbox.ur.x) this.bbox.ur.x = poly.bbox.ur.x;
1300
- if (poly.bbox.ur.y > this.bbox.ur.y) this.bbox.ur.y = poly.bbox.ur.y;
1301
- this.polys.push(poly);
1302
- }
1303
- this.isSubject = isSubject;
1304
- }
1305
- getSweepEvents() {
1306
- const sweepEvents = [];
1307
- for (let i = 0, iMax = this.polys.length; i < iMax; i++) {
1308
- const polySweepEvents = this.polys[i].getSweepEvents();
1309
- for (let j = 0, jMax = polySweepEvents.length; j < jMax; j++) {
1310
- sweepEvents.push(polySweepEvents[j]);
1311
- }
1312
- }
1313
- return sweepEvents;
1314
- }
1315
- }
1316
-
1317
- class RingOut {
1318
- /* Given the segments from the sweep line pass, compute & return a series
1319
- * of closed rings from all the segments marked to be part of the result */
1320
- static factory(allSegments) {
1321
- const ringsOut = [];
1322
- for (let i = 0, iMax = allSegments.length; i < iMax; i++) {
1323
- const segment = allSegments[i];
1324
- if (!segment.isInResult() || segment.ringOut) continue;
1325
- let prevEvent = null;
1326
- let event = segment.leftSE;
1327
- let nextEvent = segment.rightSE;
1328
- const events = [event];
1329
- const startingPoint = event.point;
1330
- const intersectionLEs = [];
1331
-
1332
- /* Walk the chain of linked events to form a closed ring */
1333
- while (true) {
1334
- prevEvent = event;
1335
- event = nextEvent;
1336
- events.push(event);
1337
-
1338
- /* Is the ring complete? */
1339
- if (event.point === startingPoint) break;
1340
- while (true) {
1341
- const availableLEs = event.getAvailableLinkedEvents();
1342
-
1343
- /* Did we hit a dead end? This shouldn't happen.
1344
- * Indicates some earlier part of the algorithm malfunctioned. */
1345
- if (availableLEs.length === 0) {
1346
- const firstPt = events[0].point;
1347
- const lastPt = events[events.length - 1].point;
1348
- throw new Error(`Unable to complete output ring starting at [${firstPt.x},` + ` ${firstPt.y}]. Last matching segment found ends at` + ` [${lastPt.x}, ${lastPt.y}].`);
1349
- }
1350
-
1351
- /* Only one way to go, so cotinue on the path */
1352
- if (availableLEs.length === 1) {
1353
- nextEvent = availableLEs[0].otherSE;
1354
- break;
1355
- }
1356
-
1357
- /* We must have an intersection. Check for a completed loop */
1358
- let indexLE = null;
1359
- for (let j = 0, jMax = intersectionLEs.length; j < jMax; j++) {
1360
- if (intersectionLEs[j].point === event.point) {
1361
- indexLE = j;
1362
- break;
1363
- }
1364
- }
1365
- /* Found a completed loop. Cut that off and make a ring */
1366
- if (indexLE !== null) {
1367
- const intersectionLE = intersectionLEs.splice(indexLE)[0];
1368
- const ringEvents = events.splice(intersectionLE.index);
1369
- ringEvents.unshift(ringEvents[0].otherSE);
1370
- ringsOut.push(new RingOut(ringEvents.reverse()));
1371
- continue;
1372
- }
1373
- /* register the intersection */
1374
- intersectionLEs.push({
1375
- index: events.length,
1376
- point: event.point
1377
- });
1378
- /* Choose the left-most option to continue the walk */
1379
- const comparator = event.getLeftmostComparator(prevEvent);
1380
- nextEvent = availableLEs.sort(comparator)[0].otherSE;
1381
- break;
1382
- }
1383
- }
1384
- ringsOut.push(new RingOut(events));
1385
- }
1386
- return ringsOut;
1387
- }
1388
- constructor(events) {
1389
- this.events = events;
1390
- for (let i = 0, iMax = events.length; i < iMax; i++) {
1391
- events[i].segment.ringOut = this;
1392
- }
1393
- this.poly = null;
1394
- }
1395
- getGeom() {
1396
- // Remove superfluous points (ie extra points along a straight line),
1397
- let prevPt = this.events[0].point;
1398
- const points = [prevPt];
1399
- for (let i = 1, iMax = this.events.length - 1; i < iMax; i++) {
1400
- const pt = this.events[i].point;
1401
- const nextPt = this.events[i + 1].point;
1402
- if (compareVectorAngles(pt, prevPt, nextPt) === 0) continue;
1403
- points.push(pt);
1404
- prevPt = pt;
1405
- }
1406
-
1407
- // ring was all (within rounding error of angle calc) colinear points
1408
- if (points.length === 1) return null;
1409
-
1410
- // check if the starting point is necessary
1411
- const pt = points[0];
1412
- const nextPt = points[1];
1413
- if (compareVectorAngles(pt, prevPt, nextPt) === 0) points.shift();
1414
- points.push(points[0]);
1415
- const step = this.isExteriorRing() ? 1 : -1;
1416
- const iStart = this.isExteriorRing() ? 0 : points.length - 1;
1417
- const iEnd = this.isExteriorRing() ? points.length : -1;
1418
- const orderedPoints = [];
1419
- for (let i = iStart; i != iEnd; i += step) orderedPoints.push([points[i].x, points[i].y]);
1420
- return orderedPoints;
1421
- }
1422
- isExteriorRing() {
1423
- if (this._isExteriorRing === undefined) {
1424
- const enclosing = this.enclosingRing();
1425
- this._isExteriorRing = enclosing ? !enclosing.isExteriorRing() : true;
1426
- }
1427
- return this._isExteriorRing;
1428
- }
1429
- enclosingRing() {
1430
- if (this._enclosingRing === undefined) {
1431
- this._enclosingRing = this._calcEnclosingRing();
1432
- }
1433
- return this._enclosingRing;
1434
- }
1435
-
1436
- /* Returns the ring that encloses this one, if any */
1437
- _calcEnclosingRing() {
1438
- // start with the ealier sweep line event so that the prevSeg
1439
- // chain doesn't lead us inside of a loop of ours
1440
- let leftMostEvt = this.events[0];
1441
- for (let i = 1, iMax = this.events.length; i < iMax; i++) {
1442
- const evt = this.events[i];
1443
- if (SweepEvent.compare(leftMostEvt, evt) > 0) leftMostEvt = evt;
1444
- }
1445
- let prevSeg = leftMostEvt.segment.prevInResult();
1446
- let prevPrevSeg = prevSeg ? prevSeg.prevInResult() : null;
1447
- while (true) {
1448
- // no segment found, thus no ring can enclose us
1449
- if (!prevSeg) return null;
1450
-
1451
- // no segments below prev segment found, thus the ring of the prev
1452
- // segment must loop back around and enclose us
1453
- if (!prevPrevSeg) return prevSeg.ringOut;
1454
-
1455
- // if the two segments are of different rings, the ring of the prev
1456
- // segment must either loop around us or the ring of the prev prev
1457
- // seg, which would make us and the ring of the prev peers
1458
- if (prevPrevSeg.ringOut !== prevSeg.ringOut) {
1459
- if (prevPrevSeg.ringOut.enclosingRing() !== prevSeg.ringOut) {
1460
- return prevSeg.ringOut;
1461
- } else return prevSeg.ringOut.enclosingRing();
1462
- }
1463
-
1464
- // two segments are from the same ring, so this was a penisula
1465
- // of that ring. iterate downward, keep searching
1466
- prevSeg = prevPrevSeg.prevInResult();
1467
- prevPrevSeg = prevSeg ? prevSeg.prevInResult() : null;
1468
- }
1469
- }
1470
- }
1471
- class PolyOut {
1472
- constructor(exteriorRing) {
1473
- this.exteriorRing = exteriorRing;
1474
- exteriorRing.poly = this;
1475
- this.interiorRings = [];
1476
- }
1477
- addInterior(ring) {
1478
- this.interiorRings.push(ring);
1479
- ring.poly = this;
1480
- }
1481
- getGeom() {
1482
- const geom = [this.exteriorRing.getGeom()];
1483
- // exterior ring was all (within rounding error of angle calc) colinear points
1484
- if (geom[0] === null) return null;
1485
- for (let i = 0, iMax = this.interiorRings.length; i < iMax; i++) {
1486
- const ringGeom = this.interiorRings[i].getGeom();
1487
- // interior ring was all (within rounding error of angle calc) colinear points
1488
- if (ringGeom === null) continue;
1489
- geom.push(ringGeom);
1490
- }
1491
- return geom;
1492
- }
1493
- }
1494
- class MultiPolyOut {
1495
- constructor(rings) {
1496
- this.rings = rings;
1497
- this.polys = this._composePolys(rings);
1498
- }
1499
- getGeom() {
1500
- const geom = [];
1501
- for (let i = 0, iMax = this.polys.length; i < iMax; i++) {
1502
- const polyGeom = this.polys[i].getGeom();
1503
- // exterior ring was all (within rounding error of angle calc) colinear points
1504
- if (polyGeom === null) continue;
1505
- geom.push(polyGeom);
1506
- }
1507
- return geom;
1508
- }
1509
- _composePolys(rings) {
1510
- const polys = [];
1511
- for (let i = 0, iMax = rings.length; i < iMax; i++) {
1512
- const ring = rings[i];
1513
- if (ring.poly) continue;
1514
- if (ring.isExteriorRing()) polys.push(new PolyOut(ring));else {
1515
- const enclosingRing = ring.enclosingRing();
1516
- if (!enclosingRing.poly) polys.push(new PolyOut(enclosingRing));
1517
- enclosingRing.poly.addInterior(ring);
1518
- }
1519
- }
1520
- return polys;
1521
- }
1522
- }
1523
-
1524
- /**
1525
- * NOTE: We must be careful not to change any segments while
1526
- * they are in the SplayTree. AFAIK, there's no way to tell
1527
- * the tree to rebalance itself - thus before splitting
1528
- * a segment that's in the tree, we remove it from the tree,
1529
- * do the split, then re-insert it. (Even though splitting a
1530
- * segment *shouldn't* change its correct position in the
1531
- * sweep line tree, the reality is because of rounding errors,
1532
- * it sometimes does.)
1533
- */
1534
-
1535
- class SweepLine {
1536
- constructor(queue) {
1537
- let comparator = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : Segment.compare;
1538
- this.queue = queue;
1539
- this.tree = new SplayTree__default["default"](comparator);
1540
- this.segments = [];
1541
- }
1542
- process(event) {
1543
- const segment = event.segment;
1544
- const newEvents = [];
1545
-
1546
- // if we've already been consumed by another segment,
1547
- // clean up our body parts and get out
1548
- if (event.consumedBy) {
1549
- if (event.isLeft) this.queue.remove(event.otherSE);else this.tree.remove(segment);
1550
- return newEvents;
1551
- }
1552
- const node = event.isLeft ? this.tree.add(segment) : this.tree.find(segment);
1553
- if (!node) throw new Error(`Unable to find segment #${segment.id} ` + `[${segment.leftSE.point.x}, ${segment.leftSE.point.y}] -> ` + `[${segment.rightSE.point.x}, ${segment.rightSE.point.y}] ` + "in SweepLine tree.");
1554
- let prevNode = node;
1555
- let nextNode = node;
1556
- let prevSeg = undefined;
1557
- let nextSeg = undefined;
1558
-
1559
- // skip consumed segments still in tree
1560
- while (prevSeg === undefined) {
1561
- prevNode = this.tree.prev(prevNode);
1562
- if (prevNode === null) prevSeg = null;else if (prevNode.key.consumedBy === undefined) prevSeg = prevNode.key;
1563
- }
1564
-
1565
- // skip consumed segments still in tree
1566
- while (nextSeg === undefined) {
1567
- nextNode = this.tree.next(nextNode);
1568
- if (nextNode === null) nextSeg = null;else if (nextNode.key.consumedBy === undefined) nextSeg = nextNode.key;
1569
- }
1570
- if (event.isLeft) {
1571
- // Check for intersections against the previous segment in the sweep line
1572
- let prevMySplitter = null;
1573
- if (prevSeg) {
1574
- const prevInter = prevSeg.getIntersection(segment);
1575
- if (prevInter !== null) {
1576
- if (!segment.isAnEndpoint(prevInter)) prevMySplitter = prevInter;
1577
- if (!prevSeg.isAnEndpoint(prevInter)) {
1578
- const newEventsFromSplit = this._splitSafely(prevSeg, prevInter);
1579
- for (let i = 0, iMax = newEventsFromSplit.length; i < iMax; i++) {
1580
- newEvents.push(newEventsFromSplit[i]);
1581
- }
1582
- }
1583
- }
1584
- }
1585
-
1586
- // Check for intersections against the next segment in the sweep line
1587
- let nextMySplitter = null;
1588
- if (nextSeg) {
1589
- const nextInter = nextSeg.getIntersection(segment);
1590
- if (nextInter !== null) {
1591
- if (!segment.isAnEndpoint(nextInter)) nextMySplitter = nextInter;
1592
- if (!nextSeg.isAnEndpoint(nextInter)) {
1593
- const newEventsFromSplit = this._splitSafely(nextSeg, nextInter);
1594
- for (let i = 0, iMax = newEventsFromSplit.length; i < iMax; i++) {
1595
- newEvents.push(newEventsFromSplit[i]);
1596
- }
1597
- }
1598
- }
1599
- }
1600
-
1601
- // For simplicity, even if we find more than one intersection we only
1602
- // spilt on the 'earliest' (sweep-line style) of the intersections.
1603
- // The other intersection will be handled in a future process().
1604
- if (prevMySplitter !== null || nextMySplitter !== null) {
1605
- let mySplitter = null;
1606
- if (prevMySplitter === null) mySplitter = nextMySplitter;else if (nextMySplitter === null) mySplitter = prevMySplitter;else {
1607
- const cmpSplitters = SweepEvent.comparePoints(prevMySplitter, nextMySplitter);
1608
- mySplitter = cmpSplitters <= 0 ? prevMySplitter : nextMySplitter;
1609
- }
1610
-
1611
- // Rounding errors can cause changes in ordering,
1612
- // so remove afected segments and right sweep events before splitting
1613
- this.queue.remove(segment.rightSE);
1614
- newEvents.push(segment.rightSE);
1615
- const newEventsFromSplit = segment.split(mySplitter);
1616
- for (let i = 0, iMax = newEventsFromSplit.length; i < iMax; i++) {
1617
- newEvents.push(newEventsFromSplit[i]);
1618
- }
1619
- }
1620
- if (newEvents.length > 0) {
1621
- // We found some intersections, so re-do the current event to
1622
- // make sure sweep line ordering is totally consistent for later
1623
- // use with the segment 'prev' pointers
1624
- this.tree.remove(segment);
1625
- newEvents.push(event);
1626
- } else {
1627
- // done with left event
1628
- this.segments.push(segment);
1629
- segment.prev = prevSeg;
1630
- }
1631
- } else {
1632
- // event.isRight
1633
-
1634
- // since we're about to be removed from the sweep line, check for
1635
- // intersections between our previous and next segments
1636
- if (prevSeg && nextSeg) {
1637
- const inter = prevSeg.getIntersection(nextSeg);
1638
- if (inter !== null) {
1639
- if (!prevSeg.isAnEndpoint(inter)) {
1640
- const newEventsFromSplit = this._splitSafely(prevSeg, inter);
1641
- for (let i = 0, iMax = newEventsFromSplit.length; i < iMax; i++) {
1642
- newEvents.push(newEventsFromSplit[i]);
1643
- }
1644
- }
1645
- if (!nextSeg.isAnEndpoint(inter)) {
1646
- const newEventsFromSplit = this._splitSafely(nextSeg, inter);
1647
- for (let i = 0, iMax = newEventsFromSplit.length; i < iMax; i++) {
1648
- newEvents.push(newEventsFromSplit[i]);
1649
- }
1650
- }
1651
- }
1652
- }
1653
- this.tree.remove(segment);
1654
- }
1655
- return newEvents;
1656
- }
1657
-
1658
- /* Safely split a segment that is currently in the datastructures
1659
- * IE - a segment other than the one that is currently being processed. */
1660
- _splitSafely(seg, pt) {
1661
- // Rounding errors can cause changes in ordering,
1662
- // so remove afected segments and right sweep events before splitting
1663
- // removeNode() doesn't work, so have re-find the seg
1664
- // https://github.com/w8r/splay-tree/pull/5
1665
- this.tree.remove(seg);
1666
- const rightSE = seg.rightSE;
1667
- this.queue.remove(rightSE);
1668
- const newEvents = seg.split(pt);
1669
- newEvents.push(rightSE);
1670
- // splitting can trigger consumption
1671
- if (seg.consumedBy === undefined) this.tree.add(seg);
1672
- return newEvents;
1673
- }
1674
- }
1675
-
1676
- // Limits on iterative processes to prevent infinite loops - usually caused by floating-point math round-off errors.
1677
- const POLYGON_CLIPPING_MAX_QUEUE_SIZE = typeof process !== "undefined" && process.env.POLYGON_CLIPPING_MAX_QUEUE_SIZE || 1000000;
1678
- const POLYGON_CLIPPING_MAX_SWEEPLINE_SEGMENTS = typeof process !== "undefined" && process.env.POLYGON_CLIPPING_MAX_SWEEPLINE_SEGMENTS || 1000000;
1679
- class Operation {
1680
- run(type, geom, moreGeoms) {
1681
- operation.type = type;
1682
- rounder.reset();
1683
-
1684
- /* Convert inputs to MultiPoly objects */
1685
- const multipolys = [new MultiPolyIn(geom, true)];
1686
- for (let i = 0, iMax = moreGeoms.length; i < iMax; i++) {
1687
- multipolys.push(new MultiPolyIn(moreGeoms[i], false));
1688
- }
1689
- operation.numMultiPolys = multipolys.length;
1690
-
1691
- /* BBox optimization for difference operation
1692
- * If the bbox of a multipolygon that's part of the clipping doesn't
1693
- * intersect the bbox of the subject at all, we can just drop that
1694
- * multiploygon. */
1695
- if (operation.type === "difference") {
1696
- // in place removal
1697
- const subject = multipolys[0];
1698
- let i = 1;
1699
- while (i < multipolys.length) {
1700
- if (getBboxOverlap(multipolys[i].bbox, subject.bbox) !== null) i++;else multipolys.splice(i, 1);
1701
- }
1702
- }
1703
-
1704
- /* BBox optimization for intersection operation
1705
- * If we can find any pair of multipolygons whose bbox does not overlap,
1706
- * then the result will be empty. */
1707
- if (operation.type === "intersection") {
1708
- // TODO: this is O(n^2) in number of polygons. By sorting the bboxes,
1709
- // it could be optimized to O(n * ln(n))
1710
- for (let i = 0, iMax = multipolys.length; i < iMax; i++) {
1711
- const mpA = multipolys[i];
1712
- for (let j = i + 1, jMax = multipolys.length; j < jMax; j++) {
1713
- if (getBboxOverlap(mpA.bbox, multipolys[j].bbox) === null) return [];
1714
- }
1715
- }
1716
- }
1717
-
1718
- /* Put segment endpoints in a priority queue */
1719
- const queue = new SplayTree__default["default"](SweepEvent.compare);
1720
- for (let i = 0, iMax = multipolys.length; i < iMax; i++) {
1721
- const sweepEvents = multipolys[i].getSweepEvents();
1722
- for (let j = 0, jMax = sweepEvents.length; j < jMax; j++) {
1723
- queue.insert(sweepEvents[j]);
1724
- if (queue.size > POLYGON_CLIPPING_MAX_QUEUE_SIZE) {
1725
- // prevents an infinite loop, an otherwise common manifestation of bugs
1726
- throw new Error("Infinite loop when putting segment endpoints in a priority queue " + "(queue size too big).");
1727
- }
1728
- }
1729
- }
1730
-
1731
- /* Pass the sweep line over those endpoints */
1732
- const sweepLine = new SweepLine(queue);
1733
- let prevQueueSize = queue.size;
1734
- let node = queue.pop();
1735
- while (node) {
1736
- const evt = node.key;
1737
- if (queue.size === prevQueueSize) {
1738
- // prevents an infinite loop, an otherwise common manifestation of bugs
1739
- const seg = evt.segment;
1740
- throw new Error(`Unable to pop() ${evt.isLeft ? "left" : "right"} SweepEvent ` + `[${evt.point.x}, ${evt.point.y}] from segment #${seg.id} ` + `[${seg.leftSE.point.x}, ${seg.leftSE.point.y}] -> ` + `[${seg.rightSE.point.x}, ${seg.rightSE.point.y}] from queue.`);
1741
- }
1742
- if (queue.size > POLYGON_CLIPPING_MAX_QUEUE_SIZE) {
1743
- // prevents an infinite loop, an otherwise common manifestation of bugs
1744
- throw new Error("Infinite loop when passing sweep line over endpoints " + "(queue size too big).");
1745
- }
1746
- if (sweepLine.segments.length > POLYGON_CLIPPING_MAX_SWEEPLINE_SEGMENTS) {
1747
- // prevents an infinite loop, an otherwise common manifestation of bugs
1748
- throw new Error("Infinite loop when passing sweep line over endpoints " + "(too many sweep line segments).");
1749
- }
1750
- const newEvents = sweepLine.process(evt);
1751
- for (let i = 0, iMax = newEvents.length; i < iMax; i++) {
1752
- const evt = newEvents[i];
1753
- if (evt.consumedBy === undefined) queue.insert(evt);
1754
- }
1755
- prevQueueSize = queue.size;
1756
- node = queue.pop();
1757
- }
1758
-
1759
- // free some memory we don't need anymore
1760
- rounder.reset();
1761
-
1762
- /* Collect and compile segments we're keeping into a multipolygon */
1763
- const ringsOut = RingOut.factory(sweepLine.segments);
1764
- const result = new MultiPolyOut(ringsOut);
1765
- return result.getGeom();
1766
- }
1767
- }
1768
-
1769
- // singleton available by import
1770
- const operation = new Operation();
1771
-
1772
- const union = function (geom) {
1773
- for (var _len = arguments.length, moreGeoms = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
1774
- moreGeoms[_key - 1] = arguments[_key];
1775
- }
1776
- return operation.run("union", geom, moreGeoms);
1777
- };
1778
- const intersection = function (geom) {
1779
- for (var _len2 = arguments.length, moreGeoms = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
1780
- moreGeoms[_key2 - 1] = arguments[_key2];
1781
- }
1782
- return operation.run("intersection", geom, moreGeoms);
1783
- };
1784
- const xor = function (geom) {
1785
- for (var _len3 = arguments.length, moreGeoms = new Array(_len3 > 1 ? _len3 - 1 : 0), _key3 = 1; _key3 < _len3; _key3++) {
1786
- moreGeoms[_key3 - 1] = arguments[_key3];
1787
- }
1788
- return operation.run("xor", geom, moreGeoms);
1789
- };
1790
- const difference = function (subjectGeom) {
1791
- for (var _len4 = arguments.length, clippingGeoms = new Array(_len4 > 1 ? _len4 - 1 : 0), _key4 = 1; _key4 < _len4; _key4++) {
1792
- clippingGeoms[_key4 - 1] = arguments[_key4];
1793
- }
1794
- return operation.run("difference", subjectGeom, clippingGeoms);
1795
- };
1796
- var index = {
1797
- union: union,
1798
- intersection: intersection,
1799
- xor: xor,
1800
- difference: difference
1801
- };
1802
-
1803
- module.exports = index;