node-red-contrib-tak-registration 0.13.1 → 0.14.1

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 (921) 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/kinks/dist/cjs/index.cjs.map +1 -1
  355. package/node_modules/@turf/kinks/dist/cjs/index.d.cts +1 -1
  356. package/node_modules/@turf/kinks/dist/esm/index.d.ts +1 -1
  357. package/node_modules/@turf/kinks/dist/esm/index.js.map +1 -1
  358. package/node_modules/@turf/kinks/package.json +10 -10
  359. package/node_modules/@turf/length/dist/cjs/index.cjs.map +1 -1
  360. package/node_modules/@turf/length/dist/cjs/index.d.cts +1 -1
  361. package/node_modules/@turf/length/dist/esm/index.d.ts +1 -1
  362. package/node_modules/@turf/length/dist/esm/index.js.map +1 -1
  363. package/node_modules/@turf/length/package.json +11 -11
  364. package/node_modules/@turf/line-arc/dist/cjs/index.cjs.map +1 -1
  365. package/node_modules/@turf/line-arc/dist/cjs/index.d.cts +1 -1
  366. package/node_modules/@turf/line-arc/dist/esm/index.d.ts +1 -1
  367. package/node_modules/@turf/line-arc/dist/esm/index.js.map +1 -1
  368. package/node_modules/@turf/line-arc/package.json +12 -12
  369. package/node_modules/@turf/line-chunk/dist/cjs/index.cjs +3 -6
  370. package/node_modules/@turf/line-chunk/dist/cjs/index.cjs.map +1 -1
  371. package/node_modules/@turf/line-chunk/dist/esm/index.js +3 -6
  372. package/node_modules/@turf/line-chunk/dist/esm/index.js.map +1 -1
  373. package/node_modules/@turf/line-chunk/package.json +11 -11
  374. package/node_modules/@turf/line-intersect/README.md +1 -1
  375. package/node_modules/@turf/line-intersect/dist/cjs/index.cjs +3 -5
  376. package/node_modules/@turf/line-intersect/dist/cjs/index.cjs.map +1 -1
  377. package/node_modules/@turf/line-intersect/dist/cjs/index.d.cts +2 -2
  378. package/node_modules/@turf/line-intersect/dist/esm/index.d.ts +2 -2
  379. package/node_modules/@turf/line-intersect/dist/esm/index.js +3 -5
  380. package/node_modules/@turf/line-intersect/dist/esm/index.js.map +1 -1
  381. package/node_modules/@turf/line-intersect/package.json +10 -10
  382. package/node_modules/@turf/line-offset/dist/cjs/index.cjs +3 -6
  383. package/node_modules/@turf/line-offset/dist/cjs/index.cjs.map +1 -1
  384. package/node_modules/@turf/line-offset/dist/esm/index.js +3 -6
  385. package/node_modules/@turf/line-offset/dist/esm/index.js.map +1 -1
  386. package/node_modules/@turf/line-offset/package.json +10 -10
  387. package/node_modules/@turf/line-overlap/dist/cjs/index.cjs +10 -20
  388. package/node_modules/@turf/line-overlap/dist/cjs/index.cjs.map +1 -1
  389. package/node_modules/@turf/line-overlap/dist/cjs/index.d.cts +1 -1
  390. package/node_modules/@turf/line-overlap/dist/esm/index.d.ts +1 -1
  391. package/node_modules/@turf/line-overlap/dist/esm/index.js +10 -20
  392. package/node_modules/@turf/line-overlap/dist/esm/index.js.map +1 -1
  393. package/node_modules/@turf/line-overlap/package.json +15 -15
  394. package/node_modules/@turf/line-segment/dist/cjs/index.cjs.map +1 -1
  395. package/node_modules/@turf/line-segment/dist/cjs/index.d.cts +1 -1
  396. package/node_modules/@turf/line-segment/dist/esm/index.d.ts +1 -1
  397. package/node_modules/@turf/line-segment/dist/esm/index.js.map +1 -1
  398. package/node_modules/@turf/line-segment/package.json +11 -11
  399. package/node_modules/@turf/line-slice/dist/cjs/index.cjs.map +1 -1
  400. package/node_modules/@turf/line-slice/dist/esm/index.js.map +1 -1
  401. package/node_modules/@turf/line-slice/package.json +10 -10
  402. package/node_modules/@turf/line-slice-along/dist/cjs/index.cjs +5 -10
  403. package/node_modules/@turf/line-slice-along/dist/cjs/index.cjs.map +1 -1
  404. package/node_modules/@turf/line-slice-along/dist/esm/index.js +5 -10
  405. package/node_modules/@turf/line-slice-along/dist/esm/index.js.map +1 -1
  406. package/node_modules/@turf/line-slice-along/package.json +12 -12
  407. package/node_modules/@turf/line-split/dist/cjs/index.cjs +7 -14
  408. package/node_modules/@turf/line-split/dist/cjs/index.cjs.map +1 -1
  409. package/node_modules/@turf/line-split/dist/esm/index.js +7 -14
  410. package/node_modules/@turf/line-split/dist/esm/index.js.map +1 -1
  411. package/node_modules/@turf/line-split/package.json +16 -16
  412. package/node_modules/@turf/line-to-polygon/dist/cjs/index.cjs +4 -8
  413. package/node_modules/@turf/line-to-polygon/dist/cjs/index.cjs.map +1 -1
  414. package/node_modules/@turf/line-to-polygon/dist/cjs/index.d.cts +1 -1
  415. package/node_modules/@turf/line-to-polygon/dist/esm/index.d.ts +1 -1
  416. package/node_modules/@turf/line-to-polygon/dist/esm/index.js +4 -8
  417. package/node_modules/@turf/line-to-polygon/dist/esm/index.js.map +1 -1
  418. package/node_modules/@turf/line-to-polygon/package.json +12 -12
  419. package/node_modules/@turf/mask/dist/cjs/index.cjs +7 -7
  420. package/node_modules/@turf/mask/dist/cjs/index.cjs.map +1 -1
  421. package/node_modules/@turf/mask/dist/cjs/index.d.cts +1 -1
  422. package/node_modules/@turf/mask/dist/esm/index.d.ts +1 -1
  423. package/node_modules/@turf/mask/dist/esm/index.js +6 -6
  424. package/node_modules/@turf/mask/dist/esm/index.js.map +1 -1
  425. package/node_modules/@turf/mask/package.json +11 -11
  426. package/node_modules/@turf/meta/README.md +145 -93
  427. package/node_modules/@turf/meta/dist/cjs/index.cjs +22 -44
  428. package/node_modules/@turf/meta/dist/cjs/index.cjs.map +1 -1
  429. package/node_modules/@turf/meta/dist/esm/index.js +22 -44
  430. package/node_modules/@turf/meta/dist/esm/index.js.map +1 -1
  431. package/node_modules/@turf/meta/package.json +7 -7
  432. package/node_modules/@turf/midpoint/dist/cjs/index.cjs.map +1 -1
  433. package/node_modules/@turf/midpoint/dist/cjs/index.d.cts +1 -1
  434. package/node_modules/@turf/midpoint/dist/esm/index.d.ts +1 -1
  435. package/node_modules/@turf/midpoint/dist/esm/index.js.map +1 -1
  436. package/node_modules/@turf/midpoint/package.json +12 -12
  437. package/node_modules/@turf/moran-index/README.md +25 -47
  438. package/node_modules/@turf/moran-index/dist/cjs/index.cjs.map +1 -1
  439. package/node_modules/@turf/moran-index/dist/cjs/index.d.cts +16 -8
  440. package/node_modules/@turf/moran-index/dist/esm/index.d.ts +16 -8
  441. package/node_modules/@turf/moran-index/dist/esm/index.js.map +1 -1
  442. package/node_modules/@turf/moran-index/package.json +11 -11
  443. package/node_modules/@turf/nearest-neighbor-analysis/README.md +50 -21
  444. package/node_modules/@turf/nearest-neighbor-analysis/dist/cjs/index.cjs.map +1 -1
  445. package/node_modules/@turf/nearest-neighbor-analysis/dist/cjs/index.d.cts +25 -6
  446. package/node_modules/@turf/nearest-neighbor-analysis/dist/esm/index.d.ts +25 -6
  447. package/node_modules/@turf/nearest-neighbor-analysis/dist/esm/index.js.map +1 -1
  448. package/node_modules/@turf/nearest-neighbor-analysis/package.json +17 -17
  449. package/node_modules/@turf/nearest-point/dist/cjs/index.cjs +2 -4
  450. package/node_modules/@turf/nearest-point/dist/cjs/index.cjs.map +1 -1
  451. package/node_modules/@turf/nearest-point/dist/cjs/index.d.cts +1 -1
  452. package/node_modules/@turf/nearest-point/dist/esm/index.d.ts +1 -1
  453. package/node_modules/@turf/nearest-point/dist/esm/index.js +2 -4
  454. package/node_modules/@turf/nearest-point/dist/esm/index.js.map +1 -1
  455. package/node_modules/@turf/nearest-point/package.json +12 -12
  456. package/node_modules/@turf/nearest-point-on-line/README.md +9 -9
  457. package/node_modules/@turf/nearest-point-on-line/dist/cjs/index.cjs +97 -53
  458. package/node_modules/@turf/nearest-point-on-line/dist/cjs/index.cjs.map +1 -1
  459. package/node_modules/@turf/nearest-point-on-line/dist/cjs/index.d.cts +2 -2
  460. package/node_modules/@turf/nearest-point-on-line/dist/esm/index.d.ts +2 -2
  461. package/node_modules/@turf/nearest-point-on-line/dist/esm/index.js +99 -55
  462. package/node_modules/@turf/nearest-point-on-line/dist/esm/index.js.map +1 -1
  463. package/node_modules/@turf/nearest-point-on-line/package.json +15 -18
  464. package/node_modules/@turf/nearest-point-to-line/README.md +1 -9
  465. package/node_modules/@turf/nearest-point-to-line/dist/cjs/index.cjs.map +1 -1
  466. package/node_modules/@turf/nearest-point-to-line/dist/cjs/index.d.cts +1 -1
  467. package/node_modules/@turf/nearest-point-to-line/dist/esm/index.d.ts +1 -1
  468. package/node_modules/@turf/nearest-point-to-line/dist/esm/index.js.map +1 -1
  469. package/node_modules/@turf/nearest-point-to-line/package.json +14 -14
  470. package/node_modules/@turf/planepoint/dist/cjs/index.cjs.map +1 -1
  471. package/node_modules/@turf/planepoint/dist/cjs/index.d.cts +1 -1
  472. package/node_modules/@turf/planepoint/dist/esm/index.d.ts +1 -1
  473. package/node_modules/@turf/planepoint/dist/esm/index.js.map +1 -1
  474. package/node_modules/@turf/planepoint/package.json +10 -10
  475. package/node_modules/@turf/point-grid/dist/cjs/index.cjs +2 -4
  476. package/node_modules/@turf/point-grid/dist/cjs/index.cjs.map +1 -1
  477. package/node_modules/@turf/point-grid/dist/cjs/index.d.cts +1 -1
  478. package/node_modules/@turf/point-grid/dist/esm/index.d.ts +1 -1
  479. package/node_modules/@turf/point-grid/dist/esm/index.js +2 -4
  480. package/node_modules/@turf/point-grid/dist/esm/index.js.map +1 -1
  481. package/node_modules/@turf/point-grid/package.json +14 -14
  482. package/node_modules/@turf/point-on-feature/dist/cjs/index.cjs.map +1 -1
  483. package/node_modules/@turf/point-on-feature/dist/cjs/index.d.cts +1 -1
  484. package/node_modules/@turf/point-on-feature/dist/esm/index.d.ts +1 -1
  485. package/node_modules/@turf/point-on-feature/dist/esm/index.js.map +1 -1
  486. package/node_modules/@turf/point-on-feature/package.json +15 -15
  487. package/node_modules/@turf/point-to-line-distance/README.md +10 -10
  488. package/node_modules/@turf/point-to-line-distance/dist/cjs/index.cjs +21 -19
  489. package/node_modules/@turf/point-to-line-distance/dist/cjs/index.cjs.map +1 -1
  490. package/node_modules/@turf/point-to-line-distance/dist/cjs/index.d.cts +3 -3
  491. package/node_modules/@turf/point-to-line-distance/dist/esm/index.d.ts +3 -3
  492. package/node_modules/@turf/point-to-line-distance/dist/esm/index.js +22 -20
  493. package/node_modules/@turf/point-to-line-distance/dist/esm/index.js.map +1 -1
  494. package/node_modules/@turf/point-to-line-distance/package.json +18 -17
  495. package/node_modules/@turf/point-to-polygon-distance/LICENSE +20 -0
  496. package/node_modules/@turf/point-to-polygon-distance/README.md +61 -0
  497. package/node_modules/@turf/point-to-polygon-distance/dist/cjs/index.cjs +49 -0
  498. package/node_modules/@turf/point-to-polygon-distance/dist/cjs/index.cjs.map +1 -0
  499. package/node_modules/@turf/point-to-polygon-distance/dist/cjs/index.d.cts +23 -0
  500. package/node_modules/@turf/point-to-polygon-distance/dist/esm/index.d.ts +23 -0
  501. package/node_modules/@turf/point-to-polygon-distance/dist/esm/index.js +49 -0
  502. package/node_modules/@turf/point-to-polygon-distance/dist/esm/index.js.map +1 -0
  503. package/node_modules/@turf/point-to-polygon-distance/package.json +80 -0
  504. package/node_modules/@turf/points-within-polygon/dist/cjs/index.cjs.map +1 -1
  505. package/node_modules/@turf/points-within-polygon/dist/cjs/index.d.cts +1 -1
  506. package/node_modules/@turf/points-within-polygon/dist/esm/index.d.ts +1 -1
  507. package/node_modules/@turf/points-within-polygon/dist/esm/index.js.map +1 -1
  508. package/node_modules/@turf/points-within-polygon/package.json +11 -11
  509. package/node_modules/@turf/polygon-smooth/dist/cjs/index.cjs +1 -2
  510. package/node_modules/@turf/polygon-smooth/dist/cjs/index.cjs.map +1 -1
  511. package/node_modules/@turf/polygon-smooth/dist/cjs/index.d.cts +1 -1
  512. package/node_modules/@turf/polygon-smooth/dist/esm/index.d.ts +1 -1
  513. package/node_modules/@turf/polygon-smooth/dist/esm/index.js +1 -2
  514. package/node_modules/@turf/polygon-smooth/dist/esm/index.js.map +1 -1
  515. package/node_modules/@turf/polygon-smooth/package.json +10 -10
  516. package/node_modules/@turf/polygon-tangents/dist/cjs/index.cjs +1 -2
  517. package/node_modules/@turf/polygon-tangents/dist/cjs/index.cjs.map +1 -1
  518. package/node_modules/@turf/polygon-tangents/dist/cjs/index.d.cts +1 -1
  519. package/node_modules/@turf/polygon-tangents/dist/esm/index.d.ts +1 -1
  520. package/node_modules/@turf/polygon-tangents/dist/esm/index.js +1 -2
  521. package/node_modules/@turf/polygon-tangents/dist/esm/index.js.map +1 -1
  522. package/node_modules/@turf/polygon-tangents/package.json +14 -14
  523. package/node_modules/@turf/polygon-to-line/dist/cjs/index.cjs.map +1 -1
  524. package/node_modules/@turf/polygon-to-line/dist/cjs/index.d.cts +1 -1
  525. package/node_modules/@turf/polygon-to-line/dist/esm/index.d.ts +1 -1
  526. package/node_modules/@turf/polygon-to-line/dist/esm/index.js.map +1 -1
  527. package/node_modules/@turf/polygon-to-line/package.json +10 -10
  528. package/node_modules/@turf/polygonize/dist/cjs/index.cjs +20 -40
  529. package/node_modules/@turf/polygonize/dist/cjs/index.cjs.map +1 -1
  530. package/node_modules/@turf/polygonize/dist/cjs/index.d.cts +1 -1
  531. package/node_modules/@turf/polygonize/dist/esm/index.d.ts +1 -1
  532. package/node_modules/@turf/polygonize/dist/esm/index.js +20 -40
  533. package/node_modules/@turf/polygonize/dist/esm/index.js.map +1 -1
  534. package/node_modules/@turf/polygonize/package.json +13 -13
  535. package/node_modules/@turf/projection/README.md +2 -2
  536. package/node_modules/@turf/projection/dist/cjs/index.cjs +6 -12
  537. package/node_modules/@turf/projection/dist/cjs/index.cjs.map +1 -1
  538. package/node_modules/@turf/projection/dist/cjs/index.d.cts +2 -2
  539. package/node_modules/@turf/projection/dist/esm/index.d.ts +2 -2
  540. package/node_modules/@turf/projection/dist/esm/index.js +6 -12
  541. package/node_modules/@turf/projection/dist/esm/index.js.map +1 -1
  542. package/node_modules/@turf/projection/package.json +12 -12
  543. package/node_modules/@turf/quadrat-analysis/README.md +10 -10
  544. package/node_modules/@turf/quadrat-analysis/dist/cjs/index.cjs.map +1 -1
  545. package/node_modules/@turf/quadrat-analysis/dist/cjs/index.d.cts +4 -4
  546. package/node_modules/@turf/quadrat-analysis/dist/esm/index.d.ts +4 -4
  547. package/node_modules/@turf/quadrat-analysis/dist/esm/index.js.map +1 -1
  548. package/node_modules/@turf/quadrat-analysis/package.json +18 -18
  549. package/node_modules/@turf/random/README.md +27 -29
  550. package/node_modules/@turf/random/dist/cjs/index.cjs +1 -3
  551. package/node_modules/@turf/random/dist/cjs/index.cjs.map +1 -1
  552. package/node_modules/@turf/random/dist/cjs/index.d.cts +11 -11
  553. package/node_modules/@turf/random/dist/esm/index.d.ts +11 -11
  554. package/node_modules/@turf/random/dist/esm/index.js +1 -3
  555. package/node_modules/@turf/random/dist/esm/index.js.map +1 -1
  556. package/node_modules/@turf/random/package.json +9 -9
  557. package/node_modules/@turf/rectangle-grid/dist/cjs/index.cjs.map +1 -1
  558. package/node_modules/@turf/rectangle-grid/dist/cjs/index.d.cts +1 -1
  559. package/node_modules/@turf/rectangle-grid/dist/esm/index.d.ts +1 -1
  560. package/node_modules/@turf/rectangle-grid/dist/esm/index.js.map +1 -1
  561. package/node_modules/@turf/rectangle-grid/package.json +13 -13
  562. package/node_modules/@turf/rewind/dist/cjs/index.cjs +3 -6
  563. package/node_modules/@turf/rewind/dist/cjs/index.cjs.map +1 -1
  564. package/node_modules/@turf/rewind/dist/cjs/index.d.cts +1 -1
  565. package/node_modules/@turf/rewind/dist/esm/index.d.ts +1 -1
  566. package/node_modules/@turf/rewind/dist/esm/index.js +3 -6
  567. package/node_modules/@turf/rewind/dist/esm/index.js.map +1 -1
  568. package/node_modules/@turf/rewind/package.json +13 -13
  569. package/node_modules/@turf/rhumb-bearing/README.md +1 -1
  570. package/node_modules/@turf/rhumb-bearing/dist/cjs/index.cjs.map +1 -1
  571. package/node_modules/@turf/rhumb-bearing/dist/cjs/index.d.cts +1 -1
  572. package/node_modules/@turf/rhumb-bearing/dist/esm/index.d.ts +1 -1
  573. package/node_modules/@turf/rhumb-bearing/dist/esm/index.js.map +1 -1
  574. package/node_modules/@turf/rhumb-bearing/package.json +11 -11
  575. package/node_modules/@turf/rhumb-destination/dist/cjs/index.cjs +1 -2
  576. package/node_modules/@turf/rhumb-destination/dist/cjs/index.cjs.map +1 -1
  577. package/node_modules/@turf/rhumb-destination/dist/cjs/index.d.cts +1 -1
  578. package/node_modules/@turf/rhumb-destination/dist/esm/index.d.ts +1 -1
  579. package/node_modules/@turf/rhumb-destination/dist/esm/index.js +1 -2
  580. package/node_modules/@turf/rhumb-destination/dist/esm/index.js.map +1 -1
  581. package/node_modules/@turf/rhumb-destination/package.json +11 -11
  582. package/node_modules/@turf/rhumb-distance/README.md +1 -1
  583. package/node_modules/@turf/rhumb-distance/dist/cjs/index.cjs.map +1 -1
  584. package/node_modules/@turf/rhumb-distance/dist/cjs/index.d.cts +1 -1
  585. package/node_modules/@turf/rhumb-distance/dist/esm/index.d.ts +1 -1
  586. package/node_modules/@turf/rhumb-distance/dist/esm/index.js.map +1 -1
  587. package/node_modules/@turf/rhumb-distance/package.json +11 -11
  588. package/node_modules/@turf/sample/README.md +2 -1
  589. package/node_modules/@turf/sample/dist/cjs/index.cjs +3 -6
  590. package/node_modules/@turf/sample/dist/cjs/index.cjs.map +1 -1
  591. package/node_modules/@turf/sample/dist/cjs/index.d.cts +1 -1
  592. package/node_modules/@turf/sample/dist/esm/index.d.ts +1 -1
  593. package/node_modules/@turf/sample/dist/esm/index.js +3 -6
  594. package/node_modules/@turf/sample/dist/esm/index.js.map +1 -1
  595. package/node_modules/@turf/sample/package.json +9 -9
  596. package/node_modules/@turf/sector/dist/cjs/index.cjs +4 -8
  597. package/node_modules/@turf/sector/dist/cjs/index.cjs.map +1 -1
  598. package/node_modules/@turf/sector/dist/cjs/index.d.cts +1 -1
  599. package/node_modules/@turf/sector/dist/esm/index.d.ts +1 -1
  600. package/node_modules/@turf/sector/dist/esm/index.js +4 -8
  601. package/node_modules/@turf/sector/dist/esm/index.js.map +1 -1
  602. package/node_modules/@turf/sector/package.json +14 -14
  603. package/node_modules/@turf/shortest-path/README.md +13 -19
  604. package/node_modules/@turf/shortest-path/dist/cjs/index.cjs +3 -6
  605. package/node_modules/@turf/shortest-path/dist/cjs/index.cjs.map +1 -1
  606. package/node_modules/@turf/shortest-path/dist/cjs/index.d.cts +5 -5
  607. package/node_modules/@turf/shortest-path/dist/esm/index.d.ts +5 -5
  608. package/node_modules/@turf/shortest-path/dist/esm/index.js +3 -6
  609. package/node_modules/@turf/shortest-path/dist/esm/index.js.map +1 -1
  610. package/node_modules/@turf/shortest-path/package.json +18 -18
  611. package/node_modules/@turf/simplify/dist/cjs/index.cjs +8 -16
  612. package/node_modules/@turf/simplify/dist/cjs/index.cjs.map +1 -1
  613. package/node_modules/@turf/simplify/dist/cjs/index.d.cts +1 -1
  614. package/node_modules/@turf/simplify/dist/esm/index.d.ts +1 -1
  615. package/node_modules/@turf/simplify/dist/esm/index.js +8 -16
  616. package/node_modules/@turf/simplify/dist/esm/index.js.map +1 -1
  617. package/node_modules/@turf/simplify/package.json +13 -13
  618. package/node_modules/@turf/square/dist/cjs/index.cjs.map +1 -1
  619. package/node_modules/@turf/square/dist/cjs/index.d.cts +1 -1
  620. package/node_modules/@turf/square/dist/esm/index.d.ts +1 -1
  621. package/node_modules/@turf/square/dist/esm/index.js.map +1 -1
  622. package/node_modules/@turf/square/package.json +10 -10
  623. package/node_modules/@turf/square-grid/dist/cjs/index.cjs.map +1 -1
  624. package/node_modules/@turf/square-grid/dist/cjs/index.d.cts +1 -1
  625. package/node_modules/@turf/square-grid/dist/esm/index.d.ts +1 -1
  626. package/node_modules/@turf/square-grid/dist/esm/index.js.map +1 -1
  627. package/node_modules/@turf/square-grid/package.json +12 -12
  628. package/node_modules/@turf/standard-deviational-ellipse/dist/cjs/index.cjs +3 -6
  629. package/node_modules/@turf/standard-deviational-ellipse/dist/cjs/index.cjs.map +1 -1
  630. package/node_modules/@turf/standard-deviational-ellipse/dist/cjs/index.d.cts +1 -1
  631. package/node_modules/@turf/standard-deviational-ellipse/dist/esm/index.d.ts +1 -1
  632. package/node_modules/@turf/standard-deviational-ellipse/dist/esm/index.js +3 -6
  633. package/node_modules/@turf/standard-deviational-ellipse/dist/esm/index.js.map +1 -1
  634. package/node_modules/@turf/standard-deviational-ellipse/package.json +16 -16
  635. package/node_modules/@turf/tag/dist/cjs/index.cjs +1 -2
  636. package/node_modules/@turf/tag/dist/cjs/index.cjs.map +1 -1
  637. package/node_modules/@turf/tag/dist/cjs/index.d.cts +1 -1
  638. package/node_modules/@turf/tag/dist/esm/index.d.ts +1 -1
  639. package/node_modules/@turf/tag/dist/esm/index.js +1 -2
  640. package/node_modules/@turf/tag/dist/esm/index.js.map +1 -1
  641. package/node_modules/@turf/tag/package.json +12 -12
  642. package/node_modules/@turf/tesselate/dist/cjs/index.cjs +1 -2
  643. package/node_modules/@turf/tesselate/dist/cjs/index.cjs.map +1 -1
  644. package/node_modules/@turf/tesselate/dist/cjs/index.d.cts +1 -1
  645. package/node_modules/@turf/tesselate/dist/esm/index.d.ts +1 -1
  646. package/node_modules/@turf/tesselate/dist/esm/index.js +1 -2
  647. package/node_modules/@turf/tesselate/dist/esm/index.js.map +1 -1
  648. package/node_modules/@turf/tesselate/package.json +9 -9
  649. package/node_modules/@turf/tin/dist/cjs/index.cjs +13 -14
  650. package/node_modules/@turf/tin/dist/cjs/index.cjs.map +1 -1
  651. package/node_modules/@turf/tin/dist/cjs/index.d.cts +1 -1
  652. package/node_modules/@turf/tin/dist/esm/index.d.ts +1 -1
  653. package/node_modules/@turf/tin/dist/esm/index.js +13 -14
  654. package/node_modules/@turf/tin/dist/esm/index.js.map +1 -1
  655. package/node_modules/@turf/tin/package.json +9 -9
  656. package/node_modules/@turf/transform-rotate/dist/cjs/index.cjs +4 -8
  657. package/node_modules/@turf/transform-rotate/dist/cjs/index.cjs.map +1 -1
  658. package/node_modules/@turf/transform-rotate/dist/cjs/index.d.cts +1 -1
  659. package/node_modules/@turf/transform-rotate/dist/esm/index.d.ts +1 -1
  660. package/node_modules/@turf/transform-rotate/dist/esm/index.js +4 -8
  661. package/node_modules/@turf/transform-rotate/dist/esm/index.js.map +1 -1
  662. package/node_modules/@turf/transform-rotate/package.json +17 -17
  663. package/node_modules/@turf/transform-scale/dist/cjs/index.cjs +18 -12
  664. package/node_modules/@turf/transform-scale/dist/cjs/index.cjs.map +1 -1
  665. package/node_modules/@turf/transform-scale/dist/cjs/index.d.cts +1 -1
  666. package/node_modules/@turf/transform-scale/dist/esm/index.d.ts +1 -1
  667. package/node_modules/@turf/transform-scale/dist/esm/index.js +18 -12
  668. package/node_modules/@turf/transform-scale/dist/esm/index.js.map +1 -1
  669. package/node_modules/@turf/transform-scale/package.json +21 -21
  670. package/node_modules/@turf/transform-translate/dist/cjs/index.cjs +4 -8
  671. package/node_modules/@turf/transform-translate/dist/cjs/index.cjs.map +1 -1
  672. package/node_modules/@turf/transform-translate/dist/cjs/index.d.cts +1 -1
  673. package/node_modules/@turf/transform-translate/dist/esm/index.d.ts +1 -1
  674. package/node_modules/@turf/transform-translate/dist/esm/index.js +4 -8
  675. package/node_modules/@turf/transform-translate/dist/esm/index.js.map +1 -1
  676. package/node_modules/@turf/transform-translate/package.json +14 -14
  677. package/node_modules/@turf/triangle-grid/dist/cjs/index.cjs.map +1 -1
  678. package/node_modules/@turf/triangle-grid/dist/cjs/index.d.cts +1 -1
  679. package/node_modules/@turf/triangle-grid/dist/esm/index.d.ts +1 -1
  680. package/node_modules/@turf/triangle-grid/dist/esm/index.js.map +1 -1
  681. package/node_modules/@turf/triangle-grid/package.json +13 -13
  682. package/node_modules/@turf/truncate/dist/cjs/index.cjs +3 -6
  683. package/node_modules/@turf/truncate/dist/cjs/index.cjs.map +1 -1
  684. package/node_modules/@turf/truncate/dist/cjs/index.d.cts +1 -1
  685. package/node_modules/@turf/truncate/dist/esm/index.d.ts +1 -1
  686. package/node_modules/@turf/truncate/dist/esm/index.js +3 -6
  687. package/node_modules/@turf/truncate/dist/esm/index.js.map +1 -1
  688. package/node_modules/@turf/truncate/package.json +10 -10
  689. package/node_modules/@turf/turf/dist/cjs/index.cjs +3 -1
  690. package/node_modules/@turf/turf/dist/cjs/index.cjs.map +1 -1
  691. package/node_modules/@turf/turf/dist/cjs/index.d.cts +1 -0
  692. package/node_modules/@turf/turf/dist/esm/index.d.ts +1 -0
  693. package/node_modules/@turf/turf/dist/esm/index.js +2 -0
  694. package/node_modules/@turf/turf/dist/esm/index.js.map +1 -1
  695. package/node_modules/@turf/turf/package.json +126 -125
  696. package/node_modules/@turf/turf/turf.min.js +3 -26
  697. package/node_modules/@turf/union/README.md +44 -24
  698. package/node_modules/@turf/union/dist/cjs/index.cjs +9 -12
  699. package/node_modules/@turf/union/dist/cjs/index.cjs.map +1 -1
  700. package/node_modules/@turf/union/dist/cjs/index.d.cts +40 -21
  701. package/node_modules/@turf/union/dist/esm/index.d.ts +40 -21
  702. package/node_modules/@turf/union/dist/esm/index.js +8 -11
  703. package/node_modules/@turf/union/dist/esm/index.js.map +1 -1
  704. package/node_modules/@turf/union/package.json +11 -11
  705. package/node_modules/@turf/unkink-polygon/dist/cjs/index.cjs +14 -28
  706. package/node_modules/@turf/unkink-polygon/dist/cjs/index.cjs.map +1 -1
  707. package/node_modules/@turf/unkink-polygon/dist/cjs/index.d.cts +1 -1
  708. package/node_modules/@turf/unkink-polygon/dist/esm/index.d.ts +1 -1
  709. package/node_modules/@turf/unkink-polygon/dist/esm/index.js +14 -28
  710. package/node_modules/@turf/unkink-polygon/dist/esm/index.js.map +1 -1
  711. package/node_modules/@turf/unkink-polygon/package.json +13 -13
  712. package/node_modules/@turf/voronoi/dist/cjs/index.cjs +3 -6
  713. package/node_modules/@turf/voronoi/dist/cjs/index.cjs.map +1 -1
  714. package/node_modules/@turf/voronoi/dist/cjs/index.d.cts +1 -1
  715. package/node_modules/@turf/voronoi/dist/esm/index.d.ts +1 -1
  716. package/node_modules/@turf/voronoi/dist/esm/index.js +3 -6
  717. package/node_modules/@turf/voronoi/dist/esm/index.js.map +1 -1
  718. package/node_modules/@turf/voronoi/package.json +11 -11
  719. package/node_modules/@types/node/README.md +1 -1
  720. package/node_modules/@types/node/events.d.ts +1 -1
  721. package/node_modules/@types/node/globals.d.ts +8 -6
  722. package/node_modules/@types/node/module.d.ts +10 -3
  723. package/node_modules/@types/node/net.d.ts +3 -0
  724. package/node_modules/@types/node/package.json +2 -2
  725. package/node_modules/@types/node/process.d.ts +35 -2
  726. package/node_modules/@types/node/sqlite.d.ts +30 -9
  727. package/node_modules/bignumber.js/CHANGELOG.md +295 -0
  728. package/node_modules/bignumber.js/LICENCE.md +26 -0
  729. package/node_modules/bignumber.js/README.md +286 -0
  730. package/node_modules/bignumber.js/bignumber.d.ts +1831 -0
  731. package/node_modules/bignumber.js/bignumber.js +2922 -0
  732. package/node_modules/bignumber.js/bignumber.mjs +2907 -0
  733. package/node_modules/bignumber.js/doc/API.html +2249 -0
  734. package/node_modules/bignumber.js/package.json +50 -0
  735. package/node_modules/long/index.d.ts +1 -456
  736. package/node_modules/long/package.json +1 -1
  737. package/node_modules/long/umd/index.d.ts +456 -1
  738. package/node_modules/polyclip-ts/LICENSE +21 -0
  739. package/node_modules/{polygon-clipping → polyclip-ts}/README.md +35 -36
  740. package/node_modules/polyclip-ts/dist/cjs/index.cjs +1179 -0
  741. package/node_modules/polyclip-ts/dist/cjs/index.cjs.map +1 -0
  742. package/node_modules/polyclip-ts/dist/cjs/index.d.cts +12 -0
  743. package/node_modules/polyclip-ts/dist/esm/index.d.ts +12 -0
  744. package/node_modules/polyclip-ts/dist/esm/index.js +1138 -0
  745. package/node_modules/polyclip-ts/dist/esm/index.js.map +1 -0
  746. package/node_modules/polyclip-ts/dist/polyclip-ts.umd.js +4811 -0
  747. package/node_modules/polyclip-ts/dist/polyclip-ts.umd.min.js +2 -0
  748. package/node_modules/polyclip-ts/package.json +72 -0
  749. package/node_modules/splaytree-ts/LICENSE +29 -0
  750. package/node_modules/splaytree-ts/README.md +296 -0
  751. package/node_modules/splaytree-ts/dist/cjs/index.cjs +714 -0
  752. package/node_modules/splaytree-ts/dist/cjs/index.cjs.map +1 -0
  753. package/node_modules/splaytree-ts/dist/cjs/index.d.cts +105 -0
  754. package/node_modules/splaytree-ts/dist/esm/index.d.ts +105 -0
  755. package/node_modules/splaytree-ts/dist/esm/index.js +688 -0
  756. package/node_modules/splaytree-ts/dist/esm/index.js.map +1 -0
  757. package/node_modules/splaytree-ts/dist/splaytree-ts.umd.js +736 -0
  758. package/node_modules/splaytree-ts/dist/splaytree-ts.umd.min.js +2 -0
  759. package/node_modules/splaytree-ts/package.json +59 -0
  760. package/node_modules/uuid/README.md +29 -16
  761. package/node_modules/uuid/dist/cjs/md5.d.ts +2 -0
  762. package/node_modules/uuid/dist/cjs/native.d.ts +1 -0
  763. package/node_modules/uuid/dist/cjs/rng.js +1 -1
  764. package/node_modules/uuid/dist/cjs/sha1.d.ts +2 -0
  765. package/node_modules/uuid/dist/cjs/stringify.js +2 -1
  766. package/node_modules/uuid/dist/cjs/v1.js +10 -1
  767. package/node_modules/uuid/dist/cjs/v1ToV6.js +1 -1
  768. package/node_modules/uuid/dist/cjs/v35.js +3 -3
  769. package/node_modules/uuid/dist/cjs/v4.js +7 -1
  770. package/node_modules/uuid/dist/cjs/v6ToV1.js +1 -1
  771. package/node_modules/uuid/dist/cjs/v7.js +10 -1
  772. package/node_modules/uuid/dist/cjs-browser/rng.js +1 -1
  773. package/node_modules/uuid/dist/cjs-browser/stringify.js +2 -1
  774. package/node_modules/uuid/dist/cjs-browser/v1.js +10 -1
  775. package/node_modules/uuid/dist/cjs-browser/v1ToV6.js +1 -1
  776. package/node_modules/uuid/dist/cjs-browser/v35.js +3 -3
  777. package/node_modules/uuid/dist/cjs-browser/v4.js +7 -1
  778. package/node_modules/uuid/dist/cjs-browser/v6ToV1.js +1 -1
  779. package/node_modules/uuid/dist/cjs-browser/v7.js +10 -1
  780. package/node_modules/uuid/dist/esm/md5.d.ts +2 -0
  781. package/node_modules/uuid/dist/esm/native.d.ts +1 -0
  782. package/node_modules/uuid/dist/esm/sha1.d.ts +2 -0
  783. package/node_modules/uuid/dist/esm/v1.js +8 -0
  784. package/node_modules/uuid/dist/esm/v4.js +7 -1
  785. package/node_modules/uuid/dist/esm/v7.js +8 -0
  786. package/node_modules/uuid/dist/esm-browser/v1.js +8 -0
  787. package/node_modules/uuid/dist/esm-browser/v4.js +7 -1
  788. package/node_modules/uuid/dist/esm-browser/v7.js +8 -0
  789. package/node_modules/uuid/package.json +26 -28
  790. package/package.json +4 -4
  791. package/tak-registration.js +3 -1
  792. package/node_modules/polygon-clipping/LICENSE.md +0 -11
  793. package/node_modules/polygon-clipping/dist/polygon-clipping.cjs.js +0 -1803
  794. package/node_modules/polygon-clipping/dist/polygon-clipping.d.ts +0 -14
  795. package/node_modules/polygon-clipping/dist/polygon-clipping.esm.js +0 -1532
  796. package/node_modules/polygon-clipping/dist/polygon-clipping.umd.js +0 -2496
  797. package/node_modules/polygon-clipping/dist/polygon-clipping.umd.min.js +0 -24
  798. package/node_modules/polygon-clipping/dist/polygon-clipping.umd.min.js.map +0 -1
  799. package/node_modules/polygon-clipping/node_modules/robust-predicates/LICENSE +0 -24
  800. package/node_modules/polygon-clipping/node_modules/robust-predicates/README.md +0 -82
  801. package/node_modules/polygon-clipping/node_modules/robust-predicates/esm/incircle.js +0 -765
  802. package/node_modules/polygon-clipping/node_modules/robust-predicates/esm/insphere.js +0 -766
  803. package/node_modules/polygon-clipping/node_modules/robust-predicates/esm/orient2d.js +0 -184
  804. package/node_modules/polygon-clipping/node_modules/robust-predicates/esm/orient3d.js +0 -462
  805. package/node_modules/polygon-clipping/node_modules/robust-predicates/esm/util.js +0 -138
  806. package/node_modules/polygon-clipping/node_modules/robust-predicates/index.d.ts +0 -49
  807. package/node_modules/polygon-clipping/node_modules/robust-predicates/index.js +0 -5
  808. package/node_modules/polygon-clipping/node_modules/robust-predicates/package.json +0 -75
  809. package/node_modules/polygon-clipping/node_modules/robust-predicates/umd/incircle.js +0 -908
  810. package/node_modules/polygon-clipping/node_modules/robust-predicates/umd/incircle.min.js +0 -1
  811. package/node_modules/polygon-clipping/node_modules/robust-predicates/umd/insphere.js +0 -914
  812. package/node_modules/polygon-clipping/node_modules/robust-predicates/umd/insphere.min.js +0 -1
  813. package/node_modules/polygon-clipping/node_modules/robust-predicates/umd/orient2d.js +0 -280
  814. package/node_modules/polygon-clipping/node_modules/robust-predicates/umd/orient2d.min.js +0 -1
  815. package/node_modules/polygon-clipping/node_modules/robust-predicates/umd/orient3d.js +0 -601
  816. package/node_modules/polygon-clipping/node_modules/robust-predicates/umd/orient3d.min.js +0 -1
  817. package/node_modules/polygon-clipping/node_modules/robust-predicates/umd/predicates.js +0 -2328
  818. package/node_modules/polygon-clipping/node_modules/robust-predicates/umd/predicates.min.js +0 -1
  819. package/node_modules/polygon-clipping/package.json +0 -79
  820. package/node_modules/splaytree/Readme.md +0 -222
  821. package/node_modules/splaytree/dist/splay.esm.js +0 -686
  822. package/node_modules/splaytree/dist/splay.esm.js.map +0 -1
  823. package/node_modules/splaytree/dist/splay.js +0 -694
  824. package/node_modules/splaytree/dist/splay.js.map +0 -1
  825. package/node_modules/splaytree/package.json +0 -91
  826. package/node_modules/splaytree/src/index.ts +0 -679
  827. package/node_modules/splaytree/src/node.ts +0 -15
  828. package/node_modules/splaytree/src/types.ts +0 -2
  829. package/node_modules/splaytree/typings/index.d.ts +0 -82
  830. package/node_modules/splaytree/typings/node.d.ts +0 -8
  831. package/node_modules/splaytree/typings/types.d.ts +0 -2
  832. package/node_modules/uuid/CHANGELOG.md +0 -335
  833. package/node_modules/uuid/CONTRIBUTING.md +0 -18
  834. package/node_modules/uuid/dist/cjs/test/parse.test.d.ts +0 -1
  835. package/node_modules/uuid/dist/cjs/test/parse.test.js +0 -50
  836. package/node_modules/uuid/dist/cjs/test/rng.test.d.ts +0 -1
  837. package/node_modules/uuid/dist/cjs/test/rng.test.js +0 -14
  838. package/node_modules/uuid/dist/cjs/test/stringify.test.d.ts +0 -1
  839. package/node_modules/uuid/dist/cjs/test/stringify.test.js +0 -23
  840. package/node_modules/uuid/dist/cjs/test/test_constants.d.ts +0 -33
  841. package/node_modules/uuid/dist/cjs/test/test_constants.js +0 -91
  842. package/node_modules/uuid/dist/cjs/test/v1.test.d.ts +0 -1
  843. package/node_modules/uuid/dist/cjs/test/v1.test.js +0 -127
  844. package/node_modules/uuid/dist/cjs/test/v35.test.d.ts +0 -1
  845. package/node_modules/uuid/dist/cjs/test/v35.test.js +0 -143
  846. package/node_modules/uuid/dist/cjs/test/v4.test.d.ts +0 -1
  847. package/node_modules/uuid/dist/cjs/test/v4.test.js +0 -60
  848. package/node_modules/uuid/dist/cjs/test/v6.test.d.ts +0 -1
  849. package/node_modules/uuid/dist/cjs/test/v6.test.js +0 -56
  850. package/node_modules/uuid/dist/cjs/test/v7.test.d.ts +0 -1
  851. package/node_modules/uuid/dist/cjs/test/v7.test.js +0 -194
  852. package/node_modules/uuid/dist/cjs/test/validate.test.d.ts +0 -1
  853. package/node_modules/uuid/dist/cjs/test/validate.test.js +0 -13
  854. package/node_modules/uuid/dist/cjs/test/version.test.d.ts +0 -1
  855. package/node_modules/uuid/dist/cjs/test/version.test.js +0 -20
  856. package/node_modules/uuid/dist/cjs-browser/test/parse.test.d.ts +0 -1
  857. package/node_modules/uuid/dist/cjs-browser/test/parse.test.js +0 -50
  858. package/node_modules/uuid/dist/cjs-browser/test/rng.test.d.ts +0 -1
  859. package/node_modules/uuid/dist/cjs-browser/test/rng.test.js +0 -14
  860. package/node_modules/uuid/dist/cjs-browser/test/stringify.test.d.ts +0 -1
  861. package/node_modules/uuid/dist/cjs-browser/test/stringify.test.js +0 -23
  862. package/node_modules/uuid/dist/cjs-browser/test/test_constants.d.ts +0 -33
  863. package/node_modules/uuid/dist/cjs-browser/test/test_constants.js +0 -91
  864. package/node_modules/uuid/dist/cjs-browser/test/v1.test.d.ts +0 -1
  865. package/node_modules/uuid/dist/cjs-browser/test/v1.test.js +0 -127
  866. package/node_modules/uuid/dist/cjs-browser/test/v35.test.d.ts +0 -1
  867. package/node_modules/uuid/dist/cjs-browser/test/v35.test.js +0 -143
  868. package/node_modules/uuid/dist/cjs-browser/test/v4.test.d.ts +0 -1
  869. package/node_modules/uuid/dist/cjs-browser/test/v4.test.js +0 -60
  870. package/node_modules/uuid/dist/cjs-browser/test/v6.test.d.ts +0 -1
  871. package/node_modules/uuid/dist/cjs-browser/test/v6.test.js +0 -56
  872. package/node_modules/uuid/dist/cjs-browser/test/v7.test.d.ts +0 -1
  873. package/node_modules/uuid/dist/cjs-browser/test/v7.test.js +0 -194
  874. package/node_modules/uuid/dist/cjs-browser/test/validate.test.d.ts +0 -1
  875. package/node_modules/uuid/dist/cjs-browser/test/validate.test.js +0 -13
  876. package/node_modules/uuid/dist/cjs-browser/test/version.test.d.ts +0 -1
  877. package/node_modules/uuid/dist/cjs-browser/test/version.test.js +0 -20
  878. package/node_modules/uuid/dist/esm/test/parse.test.d.ts +0 -1
  879. package/node_modules/uuid/dist/esm/test/parse.test.js +0 -48
  880. package/node_modules/uuid/dist/esm/test/rng.test.d.ts +0 -1
  881. package/node_modules/uuid/dist/esm/test/rng.test.js +0 -12
  882. package/node_modules/uuid/dist/esm/test/stringify.test.d.ts +0 -1
  883. package/node_modules/uuid/dist/esm/test/stringify.test.js +0 -21
  884. package/node_modules/uuid/dist/esm/test/test_constants.d.ts +0 -33
  885. package/node_modules/uuid/dist/esm/test/test_constants.js +0 -88
  886. package/node_modules/uuid/dist/esm/test/v1.test.d.ts +0 -1
  887. package/node_modules/uuid/dist/esm/test/v1.test.js +0 -125
  888. package/node_modules/uuid/dist/esm/test/v35.test.d.ts +0 -1
  889. package/node_modules/uuid/dist/esm/test/v35.test.js +0 -141
  890. package/node_modules/uuid/dist/esm/test/v4.test.d.ts +0 -1
  891. package/node_modules/uuid/dist/esm/test/v4.test.js +0 -58
  892. package/node_modules/uuid/dist/esm/test/v6.test.d.ts +0 -1
  893. package/node_modules/uuid/dist/esm/test/v6.test.js +0 -54
  894. package/node_modules/uuid/dist/esm/test/v7.test.d.ts +0 -1
  895. package/node_modules/uuid/dist/esm/test/v7.test.js +0 -192
  896. package/node_modules/uuid/dist/esm/test/validate.test.d.ts +0 -1
  897. package/node_modules/uuid/dist/esm/test/validate.test.js +0 -11
  898. package/node_modules/uuid/dist/esm/test/version.test.d.ts +0 -1
  899. package/node_modules/uuid/dist/esm/test/version.test.js +0 -18
  900. package/node_modules/uuid/dist/esm-browser/test/parse.test.d.ts +0 -1
  901. package/node_modules/uuid/dist/esm-browser/test/parse.test.js +0 -48
  902. package/node_modules/uuid/dist/esm-browser/test/rng.test.d.ts +0 -1
  903. package/node_modules/uuid/dist/esm-browser/test/rng.test.js +0 -12
  904. package/node_modules/uuid/dist/esm-browser/test/stringify.test.d.ts +0 -1
  905. package/node_modules/uuid/dist/esm-browser/test/stringify.test.js +0 -21
  906. package/node_modules/uuid/dist/esm-browser/test/test_constants.d.ts +0 -33
  907. package/node_modules/uuid/dist/esm-browser/test/test_constants.js +0 -88
  908. package/node_modules/uuid/dist/esm-browser/test/v1.test.d.ts +0 -1
  909. package/node_modules/uuid/dist/esm-browser/test/v1.test.js +0 -125
  910. package/node_modules/uuid/dist/esm-browser/test/v35.test.d.ts +0 -1
  911. package/node_modules/uuid/dist/esm-browser/test/v35.test.js +0 -141
  912. package/node_modules/uuid/dist/esm-browser/test/v4.test.d.ts +0 -1
  913. package/node_modules/uuid/dist/esm-browser/test/v4.test.js +0 -58
  914. package/node_modules/uuid/dist/esm-browser/test/v6.test.d.ts +0 -1
  915. package/node_modules/uuid/dist/esm-browser/test/v6.test.js +0 -54
  916. package/node_modules/uuid/dist/esm-browser/test/v7.test.d.ts +0 -1
  917. package/node_modules/uuid/dist/esm-browser/test/v7.test.js +0 -192
  918. package/node_modules/uuid/dist/esm-browser/test/validate.test.d.ts +0 -1
  919. package/node_modules/uuid/dist/esm-browser/test/validate.test.js +0 -11
  920. package/node_modules/uuid/dist/esm-browser/test/version.test.d.ts +0 -1
  921. package/node_modules/uuid/dist/esm-browser/test/version.test.js +0 -18
@@ -1 +1 @@
1
- {"version":3,"sources":["../../index.ts","../../lib/geojson-polygon-self-intersections.js","../../lib/simplepolygon.js"],"sourcesContent":["import { Polygon, MultiPolygon, Feature, FeatureCollection } from \"geojson\";\nimport { flattenEach, featureEach } from \"@turf/meta\";\nimport { polygon, featureCollection } from \"@turf/helpers\";\nimport { simplepolygon } from \"./lib/simplepolygon.js\";\n\n/**\n * Takes a kinked polygon and returns a feature collection of polygons that have\n * no kinks.\n *\n * Uses [simplepolygon](https://github.com/mclaeysb/simplepolygon) internally.\n *\n * @name unkinkPolygon\n * @param {FeatureCollection<Polygon|MultiPolygon>|Feature<Polygon|MultiPolygon>|Polygon|MultiPolygon} geojson polygons to unkink\n * @returns {FeatureCollection<Polygon>} Unkinked polygons\n * @example\n * const poly = turf.polygon([[[0, 0], [2, 0], [0, 2], [2, 2], [0, 0]]]);\n *\n * const result = turf.unkinkPolygon(poly);\n *\n * //addToMap\n * const addToMap = [poly, result]\n */\nfunction unkinkPolygon<T extends Polygon | MultiPolygon>(\n geojson: Feature<T> | FeatureCollection<T> | T\n): FeatureCollection<Polygon> {\n var features: Feature<Polygon>[] = [];\n flattenEach(geojson, function (feature) {\n if (feature.geometry.type !== \"Polygon\") return;\n // Safe to treat feature as Feature<Polygon>\n featureEach(simplepolygon(feature as Feature<Polygon>), function (poly) {\n features.push(polygon(poly.geometry.coordinates, feature.properties));\n });\n });\n return featureCollection(features);\n}\n\nexport { unkinkPolygon };\nexport default unkinkPolygon;\n","// Find self-intersections in geojson polygon (possibly with interior rings)\nimport rbush from \"rbush\";\n\nfunction geojsonPolygonSelfIntersections(feature, filterFn, useSpatialIndex) {\n if (feature.geometry.type !== \"Polygon\")\n throw new Error(\"The input feature must be a Polygon\");\n if (useSpatialIndex === undefined) useSpatialIndex = 1;\n\n var coord = feature.geometry.coordinates;\n\n var output = [];\n var seen = {};\n\n if (useSpatialIndex) {\n var allEdgesAsRbushTreeItems = [];\n for (var ring0 = 0; ring0 < coord.length; ring0++) {\n for (var edge0 = 0; edge0 < coord[ring0].length - 1; edge0++) {\n allEdgesAsRbushTreeItems.push(rbushTreeItem(ring0, edge0));\n }\n }\n var tree = new rbush();\n tree.load(allEdgesAsRbushTreeItems);\n }\n\n for (var ringA = 0; ringA < coord.length; ringA++) {\n for (var edgeA = 0; edgeA < coord[ringA].length - 1; edgeA++) {\n if (useSpatialIndex) {\n var bboxOverlaps = tree.search(rbushTreeItem(ringA, edgeA));\n bboxOverlaps.forEach(function (bboxIsect) {\n var ring1 = bboxIsect.ring;\n var edge1 = bboxIsect.edge;\n ifIsectAddToOutput(ringA, edgeA, ring1, edge1);\n });\n } else {\n for (var ring1 = 0; ring1 < coord.length; ring1++) {\n for (var edge1 = 0; edge1 < coord[ring1].length - 1; edge1++) {\n // TODO: speedup possible if only interested in unique: start last two loops at ringA and edgeA+1\n ifIsectAddToOutput(ringA, edgeA, ring1, edge1);\n }\n }\n }\n }\n }\n\n if (!filterFn)\n output = {\n type: \"Feature\",\n geometry: { type: \"MultiPoint\", coordinates: output },\n };\n return output;\n\n // Function to check if two edges intersect and add the intersection to the output\n function ifIsectAddToOutput(ring0, edge0, ring1, edge1) {\n var start0 = coord[ring0][edge0];\n var end0 = coord[ring0][edge0 + 1];\n var start1 = coord[ring1][edge1];\n var end1 = coord[ring1][edge1 + 1];\n\n var isect = intersect(start0, end0, start1, end1);\n\n if (isect === null) return; // discard parallels and coincidence\n var frac0;\n var frac1;\n if (end0[0] !== start0[0]) {\n frac0 = (isect[0] - start0[0]) / (end0[0] - start0[0]);\n } else {\n frac0 = (isect[1] - start0[1]) / (end0[1] - start0[1]);\n }\n if (end1[0] !== start1[0]) {\n frac1 = (isect[0] - start1[0]) / (end1[0] - start1[0]);\n } else {\n frac1 = (isect[1] - start1[1]) / (end1[1] - start1[1]);\n }\n if (frac0 >= 1 || frac0 <= 0 || frac1 >= 1 || frac1 <= 0) return; // require segment intersection\n\n var key = isect;\n var unique = !seen[key];\n if (unique) {\n seen[key] = true;\n }\n\n if (filterFn) {\n output.push(\n filterFn(\n isect,\n ring0,\n edge0,\n start0,\n end0,\n frac0,\n ring1,\n edge1,\n start1,\n end1,\n frac1,\n unique\n )\n );\n } else {\n output.push(isect);\n }\n }\n\n // Function to return a rbush tree item given an ring and edge number\n function rbushTreeItem(ring, edge) {\n var start = coord[ring][edge];\n var end = coord[ring][edge + 1];\n var minX;\n var maxX;\n var minY;\n var maxY;\n if (start[0] < end[0]) {\n minX = start[0];\n maxX = end[0];\n } else {\n minX = end[0];\n maxX = start[0];\n }\n if (start[1] < end[1]) {\n minY = start[1];\n maxY = end[1];\n } else {\n minY = end[1];\n maxY = start[1];\n }\n return {\n minX: minX,\n minY: minY,\n maxX: maxX,\n maxY: maxY,\n ring: ring,\n edge: edge,\n };\n }\n}\n\n// Function to compute where two lines (not segments) intersect. From https://en.wikipedia.org/wiki/Line%E2%80%93line_intersection\nfunction intersect(start0, end0, start1, end1) {\n if (\n equalArrays(start0, start1) ||\n equalArrays(start0, end1) ||\n equalArrays(end0, start1) ||\n equalArrays(end1, start1)\n )\n return null;\n var x0 = start0[0],\n y0 = start0[1],\n x1 = end0[0],\n y1 = end0[1],\n x2 = start1[0],\n y2 = start1[1],\n x3 = end1[0],\n y3 = end1[1];\n var denom = (x0 - x1) * (y2 - y3) - (y0 - y1) * (x2 - x3);\n if (denom === 0) return null;\n var x4 =\n ((x0 * y1 - y0 * x1) * (x2 - x3) - (x0 - x1) * (x2 * y3 - y2 * x3)) / denom;\n var y4 =\n ((x0 * y1 - y0 * x1) * (y2 - y3) - (y0 - y1) * (x2 * y3 - y2 * x3)) / denom;\n return [x4, y4];\n}\n\n// Function to compare Arrays of numbers. From http://stackoverflow.com/questions/7837456/how-to-compare-arrays-in-javascript\nfunction equalArrays(array1, array2) {\n // if the other array is a falsy value, return\n if (!array1 || !array2) return false;\n\n // compare lengths - can save a lot of time\n if (array1.length !== array2.length) return false;\n\n for (var i = 0, l = array1.length; i < l; i++) {\n // Check if we have nested arrays\n if (array1[i] instanceof Array && array2[i] instanceof Array) {\n // recurse into the nested arrays\n if (!equalArrays(array1[i], array2[i])) return false;\n } else if (array1[i] !== array2[i]) {\n // Warning - two different object instances will never be equal: {x:20} !== {x:20}\n return false;\n }\n }\n return true;\n}\n\nexport { geojsonPolygonSelfIntersections };\nexport default geojsonPolygonSelfIntersections;\n","import { geojsonPolygonSelfIntersections as isects } from \"./geojson-polygon-self-intersections\";\nimport { area } from \"@turf/area\";\nimport { featureCollection, polygon } from \"@turf/helpers\";\nimport { booleanPointInPolygon } from \"@turf/boolean-point-in-polygon\";\nimport rbush from \"rbush\";\n\n/**\n * Takes a complex (i.e. self-intersecting) geojson polygon, and breaks it down into its composite simple, non-self-intersecting one-ring polygons.\n *\n * @module simplepolygon\n * @param {Feature} feature Input polygon. This polygon may be unconform the {@link https://en.wikipedia.org/wiki/Simple_Features|Simple Features standard} in the sense that it's inner and outer rings may cross-intersect or self-intersect, that the outer ring must not contain the optional inner rings and that the winding number must not be positive for the outer and negative for the inner rings.\n * @return {FeatureCollection} Feature collection containing the simple, non-self-intersecting one-ring polygon features that the complex polygon is composed of. These simple polygons have properties such as their parent polygon, winding number and net winding number.\n *\n * @example\n * var poly = {\n * \"type\": \"Feature\",\n * \"geometry\": {\n * \"type\": \"Polygon\",\n * \"coordinates\": [[[0,0],[2,0],[0,2],[2,2],[0,0]]]\n * }\n * };\n *\n * var result = simplepolygon(poly);\n *\n * // =result\n * // which will be a featureCollection of two polygons, one with coordinates [[[0,0],[2,0],[1,1],[0,0]]], parent -1, winding 1 and net winding 1, and one with coordinates [[[1,1],[0,2],[2,2],[1,1]]], parent -1, winding -1 and net winding -1\n */\nfunction simplepolygon(feature) {\n // Check input\n if (feature.type != \"Feature\")\n throw new Error(\"The input must a geojson object of type Feature\");\n if (feature.geometry === undefined || feature.geometry == null)\n throw new Error(\n \"The input must a geojson object with a non-empty geometry\"\n );\n if (feature.geometry.type != \"Polygon\")\n throw new Error(\"The input must be a geojson Polygon\");\n\n // Process input\n var numRings = feature.geometry.coordinates.length;\n var vertices = [];\n for (var i = 0; i < numRings; i++) {\n var ring = feature.geometry.coordinates[i];\n if (!equalArrays(ring[0], ring[ring.length - 1])) {\n ring.push(ring[0]); // Close input ring if it is not\n }\n for (var j = 0; j < ring.length - 1; j++) {\n vertices.push(ring[j]);\n }\n }\n if (!isUnique(vertices))\n throw new Error(\n \"The input polygon may not have duplicate vertices (except for the first and last vertex of each ring)\"\n );\n var numvertices = vertices.length; // number of input ring vertices, with the last closing vertices not counted\n\n // Compute self-intersections\n var selfIsectsData = isects(\n feature,\n function filterFn(\n isect,\n ring0,\n edge0,\n start0,\n end0,\n frac0,\n ring1,\n edge1,\n start1,\n end1,\n frac1,\n unique\n ) {\n return [\n isect,\n ring0,\n edge0,\n start0,\n end0,\n frac0,\n ring1,\n edge1,\n start1,\n end1,\n frac1,\n unique,\n ];\n }\n );\n var numSelfIsect = selfIsectsData.length;\n\n // If no self-intersections are found, the input rings are the output rings. Hence, we must only compute their winding numbers, net winding numbers and (since ohers rings could lie outside the first ring) parents.\n if (numSelfIsect == 0) {\n var outputFeatureArray = [];\n for (var i = 0; i < numRings; i++) {\n outputFeatureArray.push(\n polygon([feature.geometry.coordinates[i]], {\n parent: -1,\n winding: windingOfRing(feature.geometry.coordinates[i]),\n })\n );\n }\n var output = featureCollection(outputFeatureArray);\n determineParents();\n setNetWinding();\n\n return output;\n }\n\n // If self-intersections are found, we will compute the output rings with the help of two intermediate variables\n // First, we build the pseudo vertex list and intersection list\n // The Pseudo vertex list is an array with for each ring an array with for each edge an array containing the pseudo-vertices (as made by their constructor) that have this ring and edge as ringAndEdgeIn, sorted for each edge by their fractional distance on this edge. It's length hence equals numRings.\n var pseudoVtxListByRingAndEdge = [];\n // The intersection list is an array containing intersections (as made by their constructor). First all numvertices ring-vertex-intersections, then all self-intersections (intra- and inter-ring). The order of the latter is not important but is permanent once given.\n var isectList = [];\n // Adding ring-pseudo-vertices to pseudoVtxListByRingAndEdge and ring-vertex-intersections to isectList\n for (var i = 0; i < numRings; i++) {\n pseudoVtxListByRingAndEdge.push([]);\n for (var j = 0; j < feature.geometry.coordinates[i].length - 1; j++) {\n // Each edge will feature one ring-pseudo-vertex in its array, on the last position. i.e. edge j features the ring-pseudo-vertex of the ring vertex j+1, which has ringAndEdgeIn = [i,j], on the last position.\n pseudoVtxListByRingAndEdge[i].push([\n new PseudoVtx(\n feature.geometry.coordinates[i][\n modulo(j + 1, feature.geometry.coordinates[i].length - 1)\n ],\n 1,\n [i, j],\n [i, modulo(j + 1, feature.geometry.coordinates[i].length - 1)],\n undefined\n ),\n ]);\n // The first numvertices elements in isectList correspond to the ring-vertex-intersections\n isectList.push(\n new Isect(\n feature.geometry.coordinates[i][j],\n [i, modulo(j - 1, feature.geometry.coordinates[i].length - 1)],\n [i, j],\n undefined,\n undefined,\n false,\n true\n )\n );\n }\n }\n // Adding intersection-pseudo-vertices to pseudoVtxListByRingAndEdge and self-intersections to isectList\n for (var i = 0; i < numSelfIsect; i++) {\n // Adding intersection-pseudo-vertices made using selfIsectsData to pseudoVtxListByRingAndEdge's array corresponding to the incomming ring and edge\n pseudoVtxListByRingAndEdge[selfIsectsData[i][1]][selfIsectsData[i][2]].push(\n new PseudoVtx(\n selfIsectsData[i][0],\n selfIsectsData[i][5],\n [selfIsectsData[i][1], selfIsectsData[i][2]],\n [selfIsectsData[i][6], selfIsectsData[i][7]],\n undefined\n )\n );\n // selfIsectsData contains double mentions of each intersection, but we only want to add them once to isectList\n if (selfIsectsData[i][11])\n isectList.push(\n new Isect(\n selfIsectsData[i][0],\n [selfIsectsData[i][1], selfIsectsData[i][2]],\n [selfIsectsData[i][6], selfIsectsData[i][7]],\n undefined,\n undefined,\n true,\n true\n )\n );\n }\n var numIsect = isectList.length;\n // Sort edge arrays of pseudoVtxListByRingAndEdge by the fractional distance 'param'\n for (var i = 0; i < pseudoVtxListByRingAndEdge.length; i++) {\n for (var j = 0; j < pseudoVtxListByRingAndEdge[i].length; j++) {\n pseudoVtxListByRingAndEdge[i][j].sort(function (a, b) {\n return a.param < b.param ? -1 : 1;\n });\n }\n }\n\n // Make a spatial index of intersections, in preperation for the following two steps\n var allIsectsAsIsectRbushTreeItem = [];\n for (var i = 0; i < numIsect; i++) {\n allIsectsAsIsectRbushTreeItem.push({\n minX: isectList[i].coord[0],\n minY: isectList[i].coord[1],\n maxX: isectList[i].coord[0],\n maxY: isectList[i].coord[1],\n index: i,\n }); // could pass isect: isectList[i], but not necessary\n }\n var isectRbushTree = new rbush();\n isectRbushTree.load(allIsectsAsIsectRbushTreeItem);\n\n // Now we will teach each intersection in isectList which is the next intersection along both it's [ring, edge]'s, in two steps.\n // First, we find the next intersection for each pseudo-vertex in pseudoVtxListByRingAndEdge:\n // For each pseudovertex in pseudoVtxListByRingAndEdge (3 loops) look at the next pseudovertex on that edge and find the corresponding intersection by comparing coordinates\n for (var i = 0; i < pseudoVtxListByRingAndEdge.length; i++) {\n for (var j = 0; j < pseudoVtxListByRingAndEdge[i].length; j++) {\n for (var k = 0; k < pseudoVtxListByRingAndEdge[i][j].length; k++) {\n var coordToFind;\n if (k == pseudoVtxListByRingAndEdge[i][j].length - 1) {\n // If it's the last pseudoVertex on that edge, then the next pseudoVertex is the first one on the next edge of that ring.\n coordToFind =\n pseudoVtxListByRingAndEdge[i][\n modulo(j + 1, feature.geometry.coordinates[i].length - 1)\n ][0].coord;\n } else {\n coordToFind = pseudoVtxListByRingAndEdge[i][j][k + 1].coord;\n }\n var IsectRbushTreeItemFound = isectRbushTree.search({\n minX: coordToFind[0],\n minY: coordToFind[1],\n maxX: coordToFind[0],\n maxY: coordToFind[1],\n })[0]; // We can take [0] of the result, because there is only one isect correponding to a pseudo-vertex\n pseudoVtxListByRingAndEdge[i][j][k].nxtIsectAlongEdgeIn =\n IsectRbushTreeItemFound.index;\n }\n }\n }\n\n // Second, we port this knowledge of the next intersection over to the intersections in isectList, by finding the intersection corresponding to each pseudo-vertex and copying the pseudo-vertex' knownledge of the next-intersection over to the intersection\n for (var i = 0; i < pseudoVtxListByRingAndEdge.length; i++) {\n for (var j = 0; j < pseudoVtxListByRingAndEdge[i].length; j++) {\n for (var k = 0; k < pseudoVtxListByRingAndEdge[i][j].length; k++) {\n var coordToFind = pseudoVtxListByRingAndEdge[i][j][k].coord;\n var IsectRbushTreeItemFound = isectRbushTree.search({\n minX: coordToFind[0],\n minY: coordToFind[1],\n maxX: coordToFind[0],\n maxY: coordToFind[1],\n })[0]; // We can take [0] of the result, because there is only one isect correponding to a pseudo-vertex\n var l = IsectRbushTreeItemFound.index;\n if (l < numvertices) {\n // Special treatment at ring-vertices: we correct the misnaming that happened in the previous block, since ringAndEdgeOut = ringAndEdge2 for ring vertices.\n isectList[l].nxtIsectAlongRingAndEdge2 =\n pseudoVtxListByRingAndEdge[i][j][k].nxtIsectAlongEdgeIn;\n } else {\n // Port the knowledge of the next intersection from the pseudo-vertices to the intersections, depending on how the edges are labeled in the pseudo-vertex and intersection.\n if (\n equalArrays(\n isectList[l].ringAndEdge1,\n pseudoVtxListByRingAndEdge[i][j][k].ringAndEdgeIn\n )\n ) {\n isectList[l].nxtIsectAlongRingAndEdge1 =\n pseudoVtxListByRingAndEdge[i][j][k].nxtIsectAlongEdgeIn;\n } else {\n isectList[l].nxtIsectAlongRingAndEdge2 =\n pseudoVtxListByRingAndEdge[i][j][k].nxtIsectAlongEdgeIn;\n }\n }\n }\n }\n }\n // This explains why, eventhough when we will walk away from an intersection, we will walk way from the corresponding pseudo-vertex along edgeOut, pseudo-vertices have the property 'nxtIsectAlongEdgeIn' in stead of some propery 'nxtPseudoVtxAlongEdgeOut'. This is because this property (which is easy to find out) is used in the above for nxtIsectAlongRingAndEdge1 and nxtIsectAlongRingAndEdge2!\n\n // Before we start walking over the intersections to build the output rings, we prepare a queue that stores information on intersections we still have to deal with, and put at least one intersection in it.\n // This queue will contain information on intersections where we can start walking from once the current walk is finished, and its parent output ring (the smallest output ring it lies within, -1 if no parent or parent unknown yet) and its winding number (which we can already determine).\n var queue = [];\n // For each output ring, add the ring-vertex-intersection with the smalles x-value (i.e. the left-most) as a start intersection. By choosing such an extremal intersections, we are sure to start at an intersection that is a convex vertex of its output ring. By adding them all to the queue, we are sure that no rings will be forgotten. If due to ring-intersections such an intersection will be encountered while walking, it will be removed from the queue.\n var i = 0;\n for (var j = 0; j < numRings; j++) {\n var leftIsect = i;\n for (var k = 0; k < feature.geometry.coordinates[j].length - 1; k++) {\n if (isectList[i].coord[0] < isectList[leftIsect].coord[0]) {\n leftIsect = i;\n }\n i++;\n }\n // Compute winding at this left-most ring-vertex-intersection. We thus this by using our knowledge that this extremal vertex must be a convex vertex.\n // We first find the intersection before and after it, and then use them to determine the winding number of the corresponding output ring, since we know that an extremal vertex of a simple, non-self-intersecting ring is always convex, so the only reason it would not be is because the winding number we use to compute it is wrong\n var isectAfterLeftIsect = isectList[leftIsect].nxtIsectAlongRingAndEdge2;\n for (var k = 0; k < isectList.length; k++) {\n if (\n isectList[k].nxtIsectAlongRingAndEdge1 == leftIsect ||\n isectList[k].nxtIsectAlongRingAndEdge2 == leftIsect\n ) {\n var isectBeforeLeftIsect = k;\n break;\n }\n }\n var windingAtIsect = isConvex(\n [\n isectList[isectBeforeLeftIsect].coord,\n isectList[leftIsect].coord,\n isectList[isectAfterLeftIsect].coord,\n ],\n true\n )\n ? 1\n : -1;\n\n queue.push({ isect: leftIsect, parent: -1, winding: windingAtIsect });\n }\n // Sort the queue by the same criterion used to find the leftIsect: the left-most leftIsect must be last in the queue, such that it will be popped first, such that we will work from out to in regarding input rings. This assumtion is used when predicting the winding number and parent of a new queue member.\n queue.sort(function (a, b) {\n return isectList[a.isect].coord > isectList[b.isect].coord ? -1 : 1;\n });\n\n // Initialise output\n var outputFeatureArray = [];\n\n // While the queue is not empty, take the last object (i.e. its intersection) out and start making an output ring by walking in the direction that has not been walked away over yet.\n while (queue.length > 0) {\n // Get the last object out of the queue\n var popped = queue.pop();\n var startIsect = popped.isect;\n var currentOutputRingParent = popped.parent;\n var currentOutputRingWinding = popped.winding;\n // Make new output ring and add vertex from starting intersection\n var currentOutputRing = outputFeatureArray.length;\n var currentOutputRingCoords = [isectList[startIsect].coord];\n // Set up the variables used while walking over intersections: 'currentIsect', 'nxtIsect' and 'walkingRingAndEdge'\n var currentIsect = startIsect;\n if (isectList[startIsect].ringAndEdge1Walkable) {\n var walkingRingAndEdge = isectList[startIsect].ringAndEdge1;\n var nxtIsect = isectList[startIsect].nxtIsectAlongRingAndEdge1;\n } else {\n var walkingRingAndEdge = isectList[startIsect].ringAndEdge2;\n var nxtIsect = isectList[startIsect].nxtIsectAlongRingAndEdge2;\n }\n // While we have not arrived back at the same intersection, keep walking\n while (\n !equalArrays(isectList[startIsect].coord, isectList[nxtIsect].coord)\n ) {\n currentOutputRingCoords.push(isectList[nxtIsect].coord);\n // If the next intersection is queued, we can remove it, because we will go there now.\n var nxtIsectInQueue = undefined;\n for (var i = 0; i < queue.length; i++) {\n if (queue[i].isect == nxtIsect) {\n nxtIsectInQueue = i;\n break;\n }\n }\n if (nxtIsectInQueue != undefined) {\n queue.splice(nxtIsectInQueue, 1);\n }\n // Arriving at this new intersection, we know which will be our next walking ring and edge (if we came from 1 we will walk away from 2 and vice versa),\n // So we can set it as our new walking ring and intersection and remember that we (will) have walked over it\n // If we have never walked away from this new intersection along the other ring and edge then we will soon do, add the intersection (and the parent wand winding number) to the queue\n // (We can predict the winding number and parent as follows: if the edge is convex, the other output ring started from there will have the alternate winding and lie outside of the current one, and thus have the same parent ring as the current ring. Otherwise, it will have the same winding number and lie inside of the current ring. We are, however, only sure of this of an output ring started from there does not enclose the current ring. This is why the initial queue's intersections must be sorted such that outer ones come out first.)\n // We then update the other two walking variables.\n if (equalArrays(walkingRingAndEdge, isectList[nxtIsect].ringAndEdge1)) {\n walkingRingAndEdge = isectList[nxtIsect].ringAndEdge2;\n isectList[nxtIsect].ringAndEdge2Walkable = false;\n if (isectList[nxtIsect].ringAndEdge1Walkable) {\n var pushing = { isect: nxtIsect };\n if (\n isConvex(\n [\n isectList[currentIsect].coord,\n isectList[nxtIsect].coord,\n isectList[isectList[nxtIsect].nxtIsectAlongRingAndEdge2].coord,\n ],\n currentOutputRingWinding == 1\n )\n ) {\n pushing.parent = currentOutputRingParent;\n pushing.winding = -currentOutputRingWinding;\n } else {\n pushing.parent = currentOutputRing;\n pushing.winding = currentOutputRingWinding;\n }\n queue.push(pushing);\n }\n currentIsect = nxtIsect;\n nxtIsect = isectList[nxtIsect].nxtIsectAlongRingAndEdge2;\n } else {\n walkingRingAndEdge = isectList[nxtIsect].ringAndEdge1;\n isectList[nxtIsect].ringAndEdge1Walkable = false;\n if (isectList[nxtIsect].ringAndEdge2Walkable) {\n var pushing = { isect: nxtIsect };\n if (\n isConvex(\n [\n isectList[currentIsect].coord,\n isectList[nxtIsect].coord,\n isectList[isectList[nxtIsect].nxtIsectAlongRingAndEdge1].coord,\n ],\n currentOutputRingWinding == 1\n )\n ) {\n pushing.parent = currentOutputRingParent;\n pushing.winding = -currentOutputRingWinding;\n } else {\n pushing.parent = currentOutputRing;\n pushing.winding = currentOutputRingWinding;\n }\n queue.push(pushing);\n }\n currentIsect = nxtIsect;\n nxtIsect = isectList[nxtIsect].nxtIsectAlongRingAndEdge1;\n }\n }\n // Close output ring\n currentOutputRingCoords.push(isectList[nxtIsect].coord);\n // Push output ring to output\n outputFeatureArray.push(\n polygon([currentOutputRingCoords], {\n index: currentOutputRing,\n parent: currentOutputRingParent,\n winding: currentOutputRingWinding,\n netWinding: undefined,\n })\n );\n }\n\n var output = featureCollection(outputFeatureArray);\n\n determineParents();\n\n setNetWinding();\n\n // These functions are also used if no intersections are found\n function determineParents() {\n var featuresWithoutParent = [];\n for (var i = 0; i < output.features.length; i++) {\n if (output.features[i].properties.parent == -1)\n featuresWithoutParent.push(i);\n }\n if (featuresWithoutParent.length > 1) {\n for (var i = 0; i < featuresWithoutParent.length; i++) {\n var parent = -1;\n var parentArea = Infinity;\n for (var j = 0; j < output.features.length; j++) {\n if (featuresWithoutParent[i] == j) continue;\n if (\n booleanPointInPolygon(\n output.features[featuresWithoutParent[i]].geometry\n .coordinates[0][0],\n output.features[j],\n { ignoreBoundary: true }\n )\n ) {\n if (area(output.features[j]) < parentArea) {\n parent = j;\n }\n }\n }\n output.features[featuresWithoutParent[i]].properties.parent = parent;\n }\n }\n }\n\n function setNetWinding() {\n for (var i = 0; i < output.features.length; i++) {\n if (output.features[i].properties.parent == -1) {\n var netWinding = output.features[i].properties.winding;\n output.features[i].properties.netWinding = netWinding;\n setNetWindingOfChildren(i, netWinding);\n }\n }\n }\n\n function setNetWindingOfChildren(parent, ParentNetWinding) {\n for (var i = 0; i < output.features.length; i++) {\n if (output.features[i].properties.parent == parent) {\n var netWinding =\n ParentNetWinding + output.features[i].properties.winding;\n output.features[i].properties.netWinding = netWinding;\n setNetWindingOfChildren(i, netWinding);\n }\n }\n }\n\n return output;\n}\n\n// Constructor for (ring- or intersection-) pseudo-vertices.\nvar PseudoVtx = function (\n coord,\n param,\n ringAndEdgeIn,\n ringAndEdgeOut,\n nxtIsectAlongEdgeIn\n) {\n this.coord = coord; // [x,y] of this pseudo-vertex\n this.param = param; // fractional distance of this intersection on incomming edge\n this.ringAndEdgeIn = ringAndEdgeIn; // [ring index, edge index] of incomming edge\n this.ringAndEdgeOut = ringAndEdgeOut; // [ring index, edge index] of outgoing edge\n this.nxtIsectAlongEdgeIn = nxtIsectAlongEdgeIn; // The next intersection when following the incomming edge (so not when following ringAndEdgeOut!)\n};\n\n// Constructor for an intersection. There are two intersection-pseudo-vertices per self-intersection and one ring-pseudo-vertex per ring-vertex-intersection. Their labels 1 and 2 are not assigned a particular meaning but are permanent once given.\nvar Isect = function (\n coord,\n ringAndEdge1,\n ringAndEdge2,\n nxtIsectAlongRingAndEdge1,\n nxtIsectAlongRingAndEdge2,\n ringAndEdge1Walkable,\n ringAndEdge2Walkable\n) {\n this.coord = coord; // [x,y] of this intersection\n this.ringAndEdge1 = ringAndEdge1; // first edge of this intersection\n this.ringAndEdge2 = ringAndEdge2; // second edge of this intersection\n this.nxtIsectAlongRingAndEdge1 = nxtIsectAlongRingAndEdge1; // the next intersection when following ringAndEdge1\n this.nxtIsectAlongRingAndEdge2 = nxtIsectAlongRingAndEdge2; // the next intersection when following ringAndEdge2\n this.ringAndEdge1Walkable = ringAndEdge1Walkable; // May we (still) walk away from this intersection over ringAndEdge1?\n this.ringAndEdge2Walkable = ringAndEdge2Walkable; // May we (still) walk away from this intersection over ringAndEdge2?\n};\n\n// Function to determine if three consecutive points of a simple, non-self-intersecting ring make up a convex vertex, assuming the ring is right- or lefthanded\nfunction isConvex(pts, righthanded) {\n // 'pts' is an [x,y] pair\n // 'righthanded' is a boolean\n if (typeof righthanded === \"undefined\") righthanded = true;\n if (pts.length != 3)\n throw new Error(\"This function requires an array of three points [x,y]\");\n var d =\n (pts[1][0] - pts[0][0]) * (pts[2][1] - pts[0][1]) -\n (pts[1][1] - pts[0][1]) * (pts[2][0] - pts[0][0]);\n return d >= 0 == righthanded;\n}\n\n// Function to compute winding of simple, non-self-intersecting ring\nfunction windingOfRing(ring) {\n // 'ring' is an array of [x,y] pairs with the last equal to the first\n // Compute the winding number based on the vertex with the smallest x-value, it precessor and successor. An extremal vertex of a simple, non-self-intersecting ring is always convex, so the only reason it is not is because the winding number we use to compute it is wrong\n var leftVtx = 0;\n for (var i = 0; i < ring.length - 1; i++) {\n if (ring[i][0] < ring[leftVtx][0]) leftVtx = i;\n }\n if (\n isConvex(\n [\n ring[modulo(leftVtx - 1, ring.length - 1)],\n ring[leftVtx],\n ring[modulo(leftVtx + 1, ring.length - 1)],\n ],\n true\n )\n ) {\n var winding = 1;\n } else {\n var winding = -1;\n }\n return winding;\n}\n\n// Function to compare Arrays of numbers. From http://stackoverflow.com/questions/7837456/how-to-compare-arrays-in-javascript\nfunction equalArrays(array1, array2) {\n // if the other array is a falsy value, return\n if (!array1 || !array2) return false;\n\n // compare lengths - can save a lot of time\n if (array1.length != array2.length) return false;\n\n for (var i = 0, l = array1.length; i < l; i++) {\n // Check if we have nested arrays\n if (array1[i] instanceof Array && array2[i] instanceof Array) {\n // recurse into the nested arrays\n if (!equalArrays(array1[i], array2[i])) return false;\n } else if (array1[i] != array2[i]) {\n // Warning - two different object instances will never be equal: {x:20} != {x:20}\n return false;\n }\n }\n return true;\n}\n\n// Fix Javascript modulo for negative number. From http://stackoverflow.com/questions/4467539/javascript-modulo-not-behaving\nfunction modulo(n, m) {\n return ((n % m) + m) % m;\n}\n\n// Function to check if array is unique (i.e. all unique elements, i.e. no duplicate elements)\nfunction isUnique(array) {\n var u = {};\n var isUnique = 1;\n for (var i = 0, l = array.length; i < l; ++i) {\n if (Object.prototype.hasOwnProperty.call(u, array[i])) {\n isUnique = 0;\n break;\n }\n u[array[i]] = 1;\n }\n return isUnique;\n}\n\nexport { simplepolygon };\nexport default simplepolygon;\n"],"mappings":";AACA,SAAS,aAAa,mBAAmB;AACzC,SAAS,WAAAA,UAAS,qBAAAC,0BAAyB;;;ACD3C,OAAO,WAAW;AAElB,SAAS,gCAAgC,SAAS,UAAU,iBAAiB;AAC3E,MAAI,QAAQ,SAAS,SAAS;AAC5B,UAAM,IAAI,MAAM,qCAAqC;AACvD,MAAI,oBAAoB;AAAW,sBAAkB;AAErD,MAAI,QAAQ,QAAQ,SAAS;AAE7B,MAAI,SAAS,CAAC;AACd,MAAI,OAAO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AS,SAAU,SAAS;AACtC,QAAI,QAAQ,SAAS,SAAS;AAAW;AAEzC,gBAAY,cAAc,OAA2B,GAAG,SAAU,MAAM;AACtE,eAAS,KAAKC,SAAQ,KAAK,SAAS,aAAa,QAAQ,UAAU,CAAC;AAAA,IACtE,CAAC;AAAA,EACH,CAAC;AACD,SAAOC,mBAAkB,QAAQ;AACnC;AAGA,IAAO,8BAAQ;","names":["polygon","featureCollection","ring1","edge1","ring0","edge0","rbush","equalArrays","i","j","isUnique","polygon","featureCollection"]}
1
+ {"version":3,"sources":["../../index.ts","../../lib/geojson-polygon-self-intersections.js","../../lib/simplepolygon.js"],"sourcesContent":["import { Polygon, MultiPolygon, Feature, FeatureCollection } from \"geojson\";\nimport { flattenEach, featureEach } from \"@turf/meta\";\nimport { polygon, featureCollection } from \"@turf/helpers\";\nimport { simplepolygon } from \"./lib/simplepolygon.js\";\n\n/**\n * Takes a kinked polygon and returns a feature collection of polygons that have\n * no kinks.\n *\n * Uses [simplepolygon](https://github.com/mclaeysb/simplepolygon) internally.\n *\n * @function\n * @param {FeatureCollection<Polygon|MultiPolygon>|Feature<Polygon|MultiPolygon>|Polygon|MultiPolygon} geojson polygons to unkink\n * @returns {FeatureCollection<Polygon>} Unkinked polygons\n * @example\n * const poly = turf.polygon([[[0, 0], [2, 0], [0, 2], [2, 2], [0, 0]]]);\n *\n * const result = turf.unkinkPolygon(poly);\n *\n * //addToMap\n * const addToMap = [poly, result]\n */\nfunction unkinkPolygon<T extends Polygon | MultiPolygon>(\n geojson: Feature<T> | FeatureCollection<T> | T\n): FeatureCollection<Polygon> {\n var features: Feature<Polygon>[] = [];\n flattenEach(geojson, function (feature) {\n if (feature.geometry.type !== \"Polygon\") return;\n // Safe to treat feature as Feature<Polygon>\n featureEach(simplepolygon(feature as Feature<Polygon>), function (poly) {\n features.push(polygon(poly.geometry.coordinates, feature.properties));\n });\n });\n return featureCollection(features);\n}\n\nexport { unkinkPolygon };\nexport default unkinkPolygon;\n","// Find self-intersections in geojson polygon (possibly with interior rings)\nimport rbush from \"rbush\";\n\nfunction geojsonPolygonSelfIntersections(feature, filterFn, useSpatialIndex) {\n if (feature.geometry.type !== \"Polygon\")\n throw new Error(\"The input feature must be a Polygon\");\n if (useSpatialIndex === undefined) useSpatialIndex = 1;\n\n var coord = feature.geometry.coordinates;\n\n var output = [];\n var seen = {};\n\n if (useSpatialIndex) {\n var allEdgesAsRbushTreeItems = [];\n for (var ring0 = 0; ring0 < coord.length; ring0++) {\n for (var edge0 = 0; edge0 < coord[ring0].length - 1; edge0++) {\n allEdgesAsRbushTreeItems.push(rbushTreeItem(ring0, edge0));\n }\n }\n var tree = new rbush();\n tree.load(allEdgesAsRbushTreeItems);\n }\n\n for (var ringA = 0; ringA < coord.length; ringA++) {\n for (var edgeA = 0; edgeA < coord[ringA].length - 1; edgeA++) {\n if (useSpatialIndex) {\n var bboxOverlaps = tree.search(rbushTreeItem(ringA, edgeA));\n bboxOverlaps.forEach(function (bboxIsect) {\n var ring1 = bboxIsect.ring;\n var edge1 = bboxIsect.edge;\n ifIsectAddToOutput(ringA, edgeA, ring1, edge1);\n });\n } else {\n for (var ring1 = 0; ring1 < coord.length; ring1++) {\n for (var edge1 = 0; edge1 < coord[ring1].length - 1; edge1++) {\n // TODO: speedup possible if only interested in unique: start last two loops at ringA and edgeA+1\n ifIsectAddToOutput(ringA, edgeA, ring1, edge1);\n }\n }\n }\n }\n }\n\n if (!filterFn)\n output = {\n type: \"Feature\",\n geometry: { type: \"MultiPoint\", coordinates: output },\n };\n return output;\n\n // Function to check if two edges intersect and add the intersection to the output\n function ifIsectAddToOutput(ring0, edge0, ring1, edge1) {\n var start0 = coord[ring0][edge0];\n var end0 = coord[ring0][edge0 + 1];\n var start1 = coord[ring1][edge1];\n var end1 = coord[ring1][edge1 + 1];\n\n var isect = intersect(start0, end0, start1, end1);\n\n if (isect === null) return; // discard parallels and coincidence\n var frac0;\n var frac1;\n if (end0[0] !== start0[0]) {\n frac0 = (isect[0] - start0[0]) / (end0[0] - start0[0]);\n } else {\n frac0 = (isect[1] - start0[1]) / (end0[1] - start0[1]);\n }\n if (end1[0] !== start1[0]) {\n frac1 = (isect[0] - start1[0]) / (end1[0] - start1[0]);\n } else {\n frac1 = (isect[1] - start1[1]) / (end1[1] - start1[1]);\n }\n if (frac0 >= 1 || frac0 <= 0 || frac1 >= 1 || frac1 <= 0) return; // require segment intersection\n\n var key = isect;\n var unique = !seen[key];\n if (unique) {\n seen[key] = true;\n }\n\n if (filterFn) {\n output.push(\n filterFn(\n isect,\n ring0,\n edge0,\n start0,\n end0,\n frac0,\n ring1,\n edge1,\n start1,\n end1,\n frac1,\n unique\n )\n );\n } else {\n output.push(isect);\n }\n }\n\n // Function to return a rbush tree item given an ring and edge number\n function rbushTreeItem(ring, edge) {\n var start = coord[ring][edge];\n var end = coord[ring][edge + 1];\n var minX;\n var maxX;\n var minY;\n var maxY;\n if (start[0] < end[0]) {\n minX = start[0];\n maxX = end[0];\n } else {\n minX = end[0];\n maxX = start[0];\n }\n if (start[1] < end[1]) {\n minY = start[1];\n maxY = end[1];\n } else {\n minY = end[1];\n maxY = start[1];\n }\n return {\n minX: minX,\n minY: minY,\n maxX: maxX,\n maxY: maxY,\n ring: ring,\n edge: edge,\n };\n }\n}\n\n// Function to compute where two lines (not segments) intersect. From https://en.wikipedia.org/wiki/Line%E2%80%93line_intersection\nfunction intersect(start0, end0, start1, end1) {\n if (\n equalArrays(start0, start1) ||\n equalArrays(start0, end1) ||\n equalArrays(end0, start1) ||\n equalArrays(end1, start1)\n )\n return null;\n var x0 = start0[0],\n y0 = start0[1],\n x1 = end0[0],\n y1 = end0[1],\n x2 = start1[0],\n y2 = start1[1],\n x3 = end1[0],\n y3 = end1[1];\n var denom = (x0 - x1) * (y2 - y3) - (y0 - y1) * (x2 - x3);\n if (denom === 0) return null;\n var x4 =\n ((x0 * y1 - y0 * x1) * (x2 - x3) - (x0 - x1) * (x2 * y3 - y2 * x3)) / denom;\n var y4 =\n ((x0 * y1 - y0 * x1) * (y2 - y3) - (y0 - y1) * (x2 * y3 - y2 * x3)) / denom;\n return [x4, y4];\n}\n\n// Function to compare Arrays of numbers. From http://stackoverflow.com/questions/7837456/how-to-compare-arrays-in-javascript\nfunction equalArrays(array1, array2) {\n // if the other array is a falsy value, return\n if (!array1 || !array2) return false;\n\n // compare lengths - can save a lot of time\n if (array1.length !== array2.length) return false;\n\n for (var i = 0, l = array1.length; i < l; i++) {\n // Check if we have nested arrays\n if (array1[i] instanceof Array && array2[i] instanceof Array) {\n // recurse into the nested arrays\n if (!equalArrays(array1[i], array2[i])) return false;\n } else if (array1[i] !== array2[i]) {\n // Warning - two different object instances will never be equal: {x:20} !== {x:20}\n return false;\n }\n }\n return true;\n}\n\nexport { geojsonPolygonSelfIntersections };\nexport default geojsonPolygonSelfIntersections;\n","import { geojsonPolygonSelfIntersections as isects } from \"./geojson-polygon-self-intersections\";\nimport { area } from \"@turf/area\";\nimport { featureCollection, polygon } from \"@turf/helpers\";\nimport { booleanPointInPolygon } from \"@turf/boolean-point-in-polygon\";\nimport rbush from \"rbush\";\n\n/**\n * Takes a complex (i.e. self-intersecting) geojson polygon, and breaks it down into its composite simple, non-self-intersecting one-ring polygons.\n *\n * @module simplepolygon\n * @param {Feature} feature Input polygon. This polygon may be unconform the {@link https://en.wikipedia.org/wiki/Simple_Features|Simple Features standard} in the sense that it's inner and outer rings may cross-intersect or self-intersect, that the outer ring must not contain the optional inner rings and that the winding number must not be positive for the outer and negative for the inner rings.\n * @return {FeatureCollection} Feature collection containing the simple, non-self-intersecting one-ring polygon features that the complex polygon is composed of. These simple polygons have properties such as their parent polygon, winding number and net winding number.\n *\n * @example\n * var poly = {\n * \"type\": \"Feature\",\n * \"geometry\": {\n * \"type\": \"Polygon\",\n * \"coordinates\": [[[0,0],[2,0],[0,2],[2,2],[0,0]]]\n * }\n * };\n *\n * var result = simplepolygon(poly);\n *\n * // =result\n * // which will be a featureCollection of two polygons, one with coordinates [[[0,0],[2,0],[1,1],[0,0]]], parent -1, winding 1 and net winding 1, and one with coordinates [[[1,1],[0,2],[2,2],[1,1]]], parent -1, winding -1 and net winding -1\n */\nfunction simplepolygon(feature) {\n // Check input\n if (feature.type != \"Feature\")\n throw new Error(\"The input must a geojson object of type Feature\");\n if (feature.geometry === undefined || feature.geometry == null)\n throw new Error(\n \"The input must a geojson object with a non-empty geometry\"\n );\n if (feature.geometry.type != \"Polygon\")\n throw new Error(\"The input must be a geojson Polygon\");\n\n // Process input\n var numRings = feature.geometry.coordinates.length;\n var vertices = [];\n for (var i = 0; i < numRings; i++) {\n var ring = feature.geometry.coordinates[i];\n if (!equalArrays(ring[0], ring[ring.length - 1])) {\n ring.push(ring[0]); // Close input ring if it is not\n }\n for (var j = 0; j < ring.length - 1; j++) {\n vertices.push(ring[j]);\n }\n }\n if (!isUnique(vertices))\n throw new Error(\n \"The input polygon may not have duplicate vertices (except for the first and last vertex of each ring)\"\n );\n var numvertices = vertices.length; // number of input ring vertices, with the last closing vertices not counted\n\n // Compute self-intersections\n var selfIsectsData = isects(\n feature,\n function filterFn(\n isect,\n ring0,\n edge0,\n start0,\n end0,\n frac0,\n ring1,\n edge1,\n start1,\n end1,\n frac1,\n unique\n ) {\n return [\n isect,\n ring0,\n edge0,\n start0,\n end0,\n frac0,\n ring1,\n edge1,\n start1,\n end1,\n frac1,\n unique,\n ];\n }\n );\n var numSelfIsect = selfIsectsData.length;\n\n // If no self-intersections are found, the input rings are the output rings. Hence, we must only compute their winding numbers, net winding numbers and (since ohers rings could lie outside the first ring) parents.\n if (numSelfIsect == 0) {\n var outputFeatureArray = [];\n for (var i = 0; i < numRings; i++) {\n outputFeatureArray.push(\n polygon([feature.geometry.coordinates[i]], {\n parent: -1,\n winding: windingOfRing(feature.geometry.coordinates[i]),\n })\n );\n }\n var output = featureCollection(outputFeatureArray);\n determineParents();\n setNetWinding();\n\n return output;\n }\n\n // If self-intersections are found, we will compute the output rings with the help of two intermediate variables\n // First, we build the pseudo vertex list and intersection list\n // The Pseudo vertex list is an array with for each ring an array with for each edge an array containing the pseudo-vertices (as made by their constructor) that have this ring and edge as ringAndEdgeIn, sorted for each edge by their fractional distance on this edge. It's length hence equals numRings.\n var pseudoVtxListByRingAndEdge = [];\n // The intersection list is an array containing intersections (as made by their constructor). First all numvertices ring-vertex-intersections, then all self-intersections (intra- and inter-ring). The order of the latter is not important but is permanent once given.\n var isectList = [];\n // Adding ring-pseudo-vertices to pseudoVtxListByRingAndEdge and ring-vertex-intersections to isectList\n for (var i = 0; i < numRings; i++) {\n pseudoVtxListByRingAndEdge.push([]);\n for (var j = 0; j < feature.geometry.coordinates[i].length - 1; j++) {\n // Each edge will feature one ring-pseudo-vertex in its array, on the last position. i.e. edge j features the ring-pseudo-vertex of the ring vertex j+1, which has ringAndEdgeIn = [i,j], on the last position.\n pseudoVtxListByRingAndEdge[i].push([\n new PseudoVtx(\n feature.geometry.coordinates[i][\n modulo(j + 1, feature.geometry.coordinates[i].length - 1)\n ],\n 1,\n [i, j],\n [i, modulo(j + 1, feature.geometry.coordinates[i].length - 1)],\n undefined\n ),\n ]);\n // The first numvertices elements in isectList correspond to the ring-vertex-intersections\n isectList.push(\n new Isect(\n feature.geometry.coordinates[i][j],\n [i, modulo(j - 1, feature.geometry.coordinates[i].length - 1)],\n [i, j],\n undefined,\n undefined,\n false,\n true\n )\n );\n }\n }\n // Adding intersection-pseudo-vertices to pseudoVtxListByRingAndEdge and self-intersections to isectList\n for (var i = 0; i < numSelfIsect; i++) {\n // Adding intersection-pseudo-vertices made using selfIsectsData to pseudoVtxListByRingAndEdge's array corresponding to the incomming ring and edge\n pseudoVtxListByRingAndEdge[selfIsectsData[i][1]][selfIsectsData[i][2]].push(\n new PseudoVtx(\n selfIsectsData[i][0],\n selfIsectsData[i][5],\n [selfIsectsData[i][1], selfIsectsData[i][2]],\n [selfIsectsData[i][6], selfIsectsData[i][7]],\n undefined\n )\n );\n // selfIsectsData contains double mentions of each intersection, but we only want to add them once to isectList\n if (selfIsectsData[i][11])\n isectList.push(\n new Isect(\n selfIsectsData[i][0],\n [selfIsectsData[i][1], selfIsectsData[i][2]],\n [selfIsectsData[i][6], selfIsectsData[i][7]],\n undefined,\n undefined,\n true,\n true\n )\n );\n }\n var numIsect = isectList.length;\n // Sort edge arrays of pseudoVtxListByRingAndEdge by the fractional distance 'param'\n for (var i = 0; i < pseudoVtxListByRingAndEdge.length; i++) {\n for (var j = 0; j < pseudoVtxListByRingAndEdge[i].length; j++) {\n pseudoVtxListByRingAndEdge[i][j].sort(function (a, b) {\n return a.param < b.param ? -1 : 1;\n });\n }\n }\n\n // Make a spatial index of intersections, in preperation for the following two steps\n var allIsectsAsIsectRbushTreeItem = [];\n for (var i = 0; i < numIsect; i++) {\n allIsectsAsIsectRbushTreeItem.push({\n minX: isectList[i].coord[0],\n minY: isectList[i].coord[1],\n maxX: isectList[i].coord[0],\n maxY: isectList[i].coord[1],\n index: i,\n }); // could pass isect: isectList[i], but not necessary\n }\n var isectRbushTree = new rbush();\n isectRbushTree.load(allIsectsAsIsectRbushTreeItem);\n\n // Now we will teach each intersection in isectList which is the next intersection along both it's [ring, edge]'s, in two steps.\n // First, we find the next intersection for each pseudo-vertex in pseudoVtxListByRingAndEdge:\n // For each pseudovertex in pseudoVtxListByRingAndEdge (3 loops) look at the next pseudovertex on that edge and find the corresponding intersection by comparing coordinates\n for (var i = 0; i < pseudoVtxListByRingAndEdge.length; i++) {\n for (var j = 0; j < pseudoVtxListByRingAndEdge[i].length; j++) {\n for (var k = 0; k < pseudoVtxListByRingAndEdge[i][j].length; k++) {\n var coordToFind;\n if (k == pseudoVtxListByRingAndEdge[i][j].length - 1) {\n // If it's the last pseudoVertex on that edge, then the next pseudoVertex is the first one on the next edge of that ring.\n coordToFind =\n pseudoVtxListByRingAndEdge[i][\n modulo(j + 1, feature.geometry.coordinates[i].length - 1)\n ][0].coord;\n } else {\n coordToFind = pseudoVtxListByRingAndEdge[i][j][k + 1].coord;\n }\n var IsectRbushTreeItemFound = isectRbushTree.search({\n minX: coordToFind[0],\n minY: coordToFind[1],\n maxX: coordToFind[0],\n maxY: coordToFind[1],\n })[0]; // We can take [0] of the result, because there is only one isect correponding to a pseudo-vertex\n pseudoVtxListByRingAndEdge[i][j][k].nxtIsectAlongEdgeIn =\n IsectRbushTreeItemFound.index;\n }\n }\n }\n\n // Second, we port this knowledge of the next intersection over to the intersections in isectList, by finding the intersection corresponding to each pseudo-vertex and copying the pseudo-vertex' knownledge of the next-intersection over to the intersection\n for (var i = 0; i < pseudoVtxListByRingAndEdge.length; i++) {\n for (var j = 0; j < pseudoVtxListByRingAndEdge[i].length; j++) {\n for (var k = 0; k < pseudoVtxListByRingAndEdge[i][j].length; k++) {\n var coordToFind = pseudoVtxListByRingAndEdge[i][j][k].coord;\n var IsectRbushTreeItemFound = isectRbushTree.search({\n minX: coordToFind[0],\n minY: coordToFind[1],\n maxX: coordToFind[0],\n maxY: coordToFind[1],\n })[0]; // We can take [0] of the result, because there is only one isect correponding to a pseudo-vertex\n var l = IsectRbushTreeItemFound.index;\n if (l < numvertices) {\n // Special treatment at ring-vertices: we correct the misnaming that happened in the previous block, since ringAndEdgeOut = ringAndEdge2 for ring vertices.\n isectList[l].nxtIsectAlongRingAndEdge2 =\n pseudoVtxListByRingAndEdge[i][j][k].nxtIsectAlongEdgeIn;\n } else {\n // Port the knowledge of the next intersection from the pseudo-vertices to the intersections, depending on how the edges are labeled in the pseudo-vertex and intersection.\n if (\n equalArrays(\n isectList[l].ringAndEdge1,\n pseudoVtxListByRingAndEdge[i][j][k].ringAndEdgeIn\n )\n ) {\n isectList[l].nxtIsectAlongRingAndEdge1 =\n pseudoVtxListByRingAndEdge[i][j][k].nxtIsectAlongEdgeIn;\n } else {\n isectList[l].nxtIsectAlongRingAndEdge2 =\n pseudoVtxListByRingAndEdge[i][j][k].nxtIsectAlongEdgeIn;\n }\n }\n }\n }\n }\n // This explains why, eventhough when we will walk away from an intersection, we will walk way from the corresponding pseudo-vertex along edgeOut, pseudo-vertices have the property 'nxtIsectAlongEdgeIn' in stead of some propery 'nxtPseudoVtxAlongEdgeOut'. This is because this property (which is easy to find out) is used in the above for nxtIsectAlongRingAndEdge1 and nxtIsectAlongRingAndEdge2!\n\n // Before we start walking over the intersections to build the output rings, we prepare a queue that stores information on intersections we still have to deal with, and put at least one intersection in it.\n // This queue will contain information on intersections where we can start walking from once the current walk is finished, and its parent output ring (the smallest output ring it lies within, -1 if no parent or parent unknown yet) and its winding number (which we can already determine).\n var queue = [];\n // For each output ring, add the ring-vertex-intersection with the smalles x-value (i.e. the left-most) as a start intersection. By choosing such an extremal intersections, we are sure to start at an intersection that is a convex vertex of its output ring. By adding them all to the queue, we are sure that no rings will be forgotten. If due to ring-intersections such an intersection will be encountered while walking, it will be removed from the queue.\n var i = 0;\n for (var j = 0; j < numRings; j++) {\n var leftIsect = i;\n for (var k = 0; k < feature.geometry.coordinates[j].length - 1; k++) {\n if (isectList[i].coord[0] < isectList[leftIsect].coord[0]) {\n leftIsect = i;\n }\n i++;\n }\n // Compute winding at this left-most ring-vertex-intersection. We thus this by using our knowledge that this extremal vertex must be a convex vertex.\n // We first find the intersection before and after it, and then use them to determine the winding number of the corresponding output ring, since we know that an extremal vertex of a simple, non-self-intersecting ring is always convex, so the only reason it would not be is because the winding number we use to compute it is wrong\n var isectAfterLeftIsect = isectList[leftIsect].nxtIsectAlongRingAndEdge2;\n for (var k = 0; k < isectList.length; k++) {\n if (\n isectList[k].nxtIsectAlongRingAndEdge1 == leftIsect ||\n isectList[k].nxtIsectAlongRingAndEdge2 == leftIsect\n ) {\n var isectBeforeLeftIsect = k;\n break;\n }\n }\n var windingAtIsect = isConvex(\n [\n isectList[isectBeforeLeftIsect].coord,\n isectList[leftIsect].coord,\n isectList[isectAfterLeftIsect].coord,\n ],\n true\n )\n ? 1\n : -1;\n\n queue.push({ isect: leftIsect, parent: -1, winding: windingAtIsect });\n }\n // Sort the queue by the same criterion used to find the leftIsect: the left-most leftIsect must be last in the queue, such that it will be popped first, such that we will work from out to in regarding input rings. This assumtion is used when predicting the winding number and parent of a new queue member.\n queue.sort(function (a, b) {\n return isectList[a.isect].coord > isectList[b.isect].coord ? -1 : 1;\n });\n\n // Initialise output\n var outputFeatureArray = [];\n\n // While the queue is not empty, take the last object (i.e. its intersection) out and start making an output ring by walking in the direction that has not been walked away over yet.\n while (queue.length > 0) {\n // Get the last object out of the queue\n var popped = queue.pop();\n var startIsect = popped.isect;\n var currentOutputRingParent = popped.parent;\n var currentOutputRingWinding = popped.winding;\n // Make new output ring and add vertex from starting intersection\n var currentOutputRing = outputFeatureArray.length;\n var currentOutputRingCoords = [isectList[startIsect].coord];\n // Set up the variables used while walking over intersections: 'currentIsect', 'nxtIsect' and 'walkingRingAndEdge'\n var currentIsect = startIsect;\n if (isectList[startIsect].ringAndEdge1Walkable) {\n var walkingRingAndEdge = isectList[startIsect].ringAndEdge1;\n var nxtIsect = isectList[startIsect].nxtIsectAlongRingAndEdge1;\n } else {\n var walkingRingAndEdge = isectList[startIsect].ringAndEdge2;\n var nxtIsect = isectList[startIsect].nxtIsectAlongRingAndEdge2;\n }\n // While we have not arrived back at the same intersection, keep walking\n while (\n !equalArrays(isectList[startIsect].coord, isectList[nxtIsect].coord)\n ) {\n currentOutputRingCoords.push(isectList[nxtIsect].coord);\n // If the next intersection is queued, we can remove it, because we will go there now.\n var nxtIsectInQueue = undefined;\n for (var i = 0; i < queue.length; i++) {\n if (queue[i].isect == nxtIsect) {\n nxtIsectInQueue = i;\n break;\n }\n }\n if (nxtIsectInQueue != undefined) {\n queue.splice(nxtIsectInQueue, 1);\n }\n // Arriving at this new intersection, we know which will be our next walking ring and edge (if we came from 1 we will walk away from 2 and vice versa),\n // So we can set it as our new walking ring and intersection and remember that we (will) have walked over it\n // If we have never walked away from this new intersection along the other ring and edge then we will soon do, add the intersection (and the parent wand winding number) to the queue\n // (We can predict the winding number and parent as follows: if the edge is convex, the other output ring started from there will have the alternate winding and lie outside of the current one, and thus have the same parent ring as the current ring. Otherwise, it will have the same winding number and lie inside of the current ring. We are, however, only sure of this of an output ring started from there does not enclose the current ring. This is why the initial queue's intersections must be sorted such that outer ones come out first.)\n // We then update the other two walking variables.\n if (equalArrays(walkingRingAndEdge, isectList[nxtIsect].ringAndEdge1)) {\n walkingRingAndEdge = isectList[nxtIsect].ringAndEdge2;\n isectList[nxtIsect].ringAndEdge2Walkable = false;\n if (isectList[nxtIsect].ringAndEdge1Walkable) {\n var pushing = { isect: nxtIsect };\n if (\n isConvex(\n [\n isectList[currentIsect].coord,\n isectList[nxtIsect].coord,\n isectList[isectList[nxtIsect].nxtIsectAlongRingAndEdge2].coord,\n ],\n currentOutputRingWinding == 1\n )\n ) {\n pushing.parent = currentOutputRingParent;\n pushing.winding = -currentOutputRingWinding;\n } else {\n pushing.parent = currentOutputRing;\n pushing.winding = currentOutputRingWinding;\n }\n queue.push(pushing);\n }\n currentIsect = nxtIsect;\n nxtIsect = isectList[nxtIsect].nxtIsectAlongRingAndEdge2;\n } else {\n walkingRingAndEdge = isectList[nxtIsect].ringAndEdge1;\n isectList[nxtIsect].ringAndEdge1Walkable = false;\n if (isectList[nxtIsect].ringAndEdge2Walkable) {\n var pushing = { isect: nxtIsect };\n if (\n isConvex(\n [\n isectList[currentIsect].coord,\n isectList[nxtIsect].coord,\n isectList[isectList[nxtIsect].nxtIsectAlongRingAndEdge1].coord,\n ],\n currentOutputRingWinding == 1\n )\n ) {\n pushing.parent = currentOutputRingParent;\n pushing.winding = -currentOutputRingWinding;\n } else {\n pushing.parent = currentOutputRing;\n pushing.winding = currentOutputRingWinding;\n }\n queue.push(pushing);\n }\n currentIsect = nxtIsect;\n nxtIsect = isectList[nxtIsect].nxtIsectAlongRingAndEdge1;\n }\n }\n // Close output ring\n currentOutputRingCoords.push(isectList[nxtIsect].coord);\n // Push output ring to output\n outputFeatureArray.push(\n polygon([currentOutputRingCoords], {\n index: currentOutputRing,\n parent: currentOutputRingParent,\n winding: currentOutputRingWinding,\n netWinding: undefined,\n })\n );\n }\n\n var output = featureCollection(outputFeatureArray);\n\n determineParents();\n\n setNetWinding();\n\n // These functions are also used if no intersections are found\n function determineParents() {\n var featuresWithoutParent = [];\n for (var i = 0; i < output.features.length; i++) {\n if (output.features[i].properties.parent == -1)\n featuresWithoutParent.push(i);\n }\n if (featuresWithoutParent.length > 1) {\n for (var i = 0; i < featuresWithoutParent.length; i++) {\n var parent = -1;\n var parentArea = Infinity;\n for (var j = 0; j < output.features.length; j++) {\n if (featuresWithoutParent[i] == j) continue;\n if (\n booleanPointInPolygon(\n output.features[featuresWithoutParent[i]].geometry\n .coordinates[0][0],\n output.features[j],\n { ignoreBoundary: true }\n )\n ) {\n if (area(output.features[j]) < parentArea) {\n parent = j;\n }\n }\n }\n output.features[featuresWithoutParent[i]].properties.parent = parent;\n }\n }\n }\n\n function setNetWinding() {\n for (var i = 0; i < output.features.length; i++) {\n if (output.features[i].properties.parent == -1) {\n var netWinding = output.features[i].properties.winding;\n output.features[i].properties.netWinding = netWinding;\n setNetWindingOfChildren(i, netWinding);\n }\n }\n }\n\n function setNetWindingOfChildren(parent, ParentNetWinding) {\n for (var i = 0; i < output.features.length; i++) {\n if (output.features[i].properties.parent == parent) {\n var netWinding =\n ParentNetWinding + output.features[i].properties.winding;\n output.features[i].properties.netWinding = netWinding;\n setNetWindingOfChildren(i, netWinding);\n }\n }\n }\n\n return output;\n}\n\n// Constructor for (ring- or intersection-) pseudo-vertices.\nvar PseudoVtx = function (\n coord,\n param,\n ringAndEdgeIn,\n ringAndEdgeOut,\n nxtIsectAlongEdgeIn\n) {\n this.coord = coord; // [x,y] of this pseudo-vertex\n this.param = param; // fractional distance of this intersection on incomming edge\n this.ringAndEdgeIn = ringAndEdgeIn; // [ring index, edge index] of incomming edge\n this.ringAndEdgeOut = ringAndEdgeOut; // [ring index, edge index] of outgoing edge\n this.nxtIsectAlongEdgeIn = nxtIsectAlongEdgeIn; // The next intersection when following the incomming edge (so not when following ringAndEdgeOut!)\n};\n\n// Constructor for an intersection. There are two intersection-pseudo-vertices per self-intersection and one ring-pseudo-vertex per ring-vertex-intersection. Their labels 1 and 2 are not assigned a particular meaning but are permanent once given.\nvar Isect = function (\n coord,\n ringAndEdge1,\n ringAndEdge2,\n nxtIsectAlongRingAndEdge1,\n nxtIsectAlongRingAndEdge2,\n ringAndEdge1Walkable,\n ringAndEdge2Walkable\n) {\n this.coord = coord; // [x,y] of this intersection\n this.ringAndEdge1 = ringAndEdge1; // first edge of this intersection\n this.ringAndEdge2 = ringAndEdge2; // second edge of this intersection\n this.nxtIsectAlongRingAndEdge1 = nxtIsectAlongRingAndEdge1; // the next intersection when following ringAndEdge1\n this.nxtIsectAlongRingAndEdge2 = nxtIsectAlongRingAndEdge2; // the next intersection when following ringAndEdge2\n this.ringAndEdge1Walkable = ringAndEdge1Walkable; // May we (still) walk away from this intersection over ringAndEdge1?\n this.ringAndEdge2Walkable = ringAndEdge2Walkable; // May we (still) walk away from this intersection over ringAndEdge2?\n};\n\n// Function to determine if three consecutive points of a simple, non-self-intersecting ring make up a convex vertex, assuming the ring is right- or lefthanded\nfunction isConvex(pts, righthanded) {\n // 'pts' is an [x,y] pair\n // 'righthanded' is a boolean\n if (typeof righthanded === \"undefined\") righthanded = true;\n if (pts.length != 3)\n throw new Error(\"This function requires an array of three points [x,y]\");\n var d =\n (pts[1][0] - pts[0][0]) * (pts[2][1] - pts[0][1]) -\n (pts[1][1] - pts[0][1]) * (pts[2][0] - pts[0][0]);\n return d >= 0 == righthanded;\n}\n\n// Function to compute winding of simple, non-self-intersecting ring\nfunction windingOfRing(ring) {\n // 'ring' is an array of [x,y] pairs with the last equal to the first\n // Compute the winding number based on the vertex with the smallest x-value, it precessor and successor. An extremal vertex of a simple, non-self-intersecting ring is always convex, so the only reason it is not is because the winding number we use to compute it is wrong\n var leftVtx = 0;\n for (var i = 0; i < ring.length - 1; i++) {\n if (ring[i][0] < ring[leftVtx][0]) leftVtx = i;\n }\n if (\n isConvex(\n [\n ring[modulo(leftVtx - 1, ring.length - 1)],\n ring[leftVtx],\n ring[modulo(leftVtx + 1, ring.length - 1)],\n ],\n true\n )\n ) {\n var winding = 1;\n } else {\n var winding = -1;\n }\n return winding;\n}\n\n// Function to compare Arrays of numbers. From http://stackoverflow.com/questions/7837456/how-to-compare-arrays-in-javascript\nfunction equalArrays(array1, array2) {\n // if the other array is a falsy value, return\n if (!array1 || !array2) return false;\n\n // compare lengths - can save a lot of time\n if (array1.length != array2.length) return false;\n\n for (var i = 0, l = array1.length; i < l; i++) {\n // Check if we have nested arrays\n if (array1[i] instanceof Array && array2[i] instanceof Array) {\n // recurse into the nested arrays\n if (!equalArrays(array1[i], array2[i])) return false;\n } else if (array1[i] != array2[i]) {\n // Warning - two different object instances will never be equal: {x:20} != {x:20}\n return false;\n }\n }\n return true;\n}\n\n// Fix Javascript modulo for negative number. From http://stackoverflow.com/questions/4467539/javascript-modulo-not-behaving\nfunction modulo(n, m) {\n return ((n % m) + m) % m;\n}\n\n// Function to check if array is unique (i.e. all unique elements, i.e. no duplicate elements)\nfunction isUnique(array) {\n var u = {};\n var isUnique = 1;\n for (var i = 0, l = array.length; i < l; ++i) {\n if (Object.prototype.hasOwnProperty.call(u, array[i])) {\n isUnique = 0;\n break;\n }\n u[array[i]] = 1;\n }\n return isUnique;\n}\n\nexport { simplepolygon };\nexport default simplepolygon;\n"],"mappings":";AACA,SAAS,aAAa,mBAAmB;AACzC,SAAS,WAAAA,UAAS,qBAAAC,0BAAyB;;;ACD3C,OAAO,WAAW;AAElB,SAAS,gCAAgC,SAAS,UAAU,iBAAiB;AAC3E,MAAI,QAAQ,SAAS,SAAS;AAC5B,UAAM,IAAI,MAAM,qCAAqC;AACvD,MAAI,oBAAoB,OAAW,mBAAkB;AAErD,MAAI,QAAQ,QAAQ,SAAS;AAE7B,MAAI,SAAS,CAAC;AACd,MAAI,OAAO,CAAC;AAEZ,MAAI,iBAAiB;AACnB,QAAI,2BAA2B,CAAC;AAChC,aAAS,QAAQ,GAAG,QAAQ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AAU,MAAM;AACtE,eAAS,KAAKC,SAAQ,KAAK,SAAS,aAAa,QAAQ,UAAU,CAAC;AAAA,IACtE,CAAC;AAAA,EACH,CAAC;AACD,SAAOC,mBAAkB,QAAQ;AACnC;AAGA,IAAO,8BAAQ;","names":["polygon","featureCollection","ring1","edge1","ring0","edge0","rbush","equalArrays","i","j","isUnique","polygon","featureCollection"]}
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@turf/unkink-polygon",
3
- "version": "7.1.0",
3
+ "version": "7.2.0",
4
4
  "description": "turf unkink-polygon module",
5
5
  "author": "Turf Authors",
6
6
  "license": "MIT",
@@ -53,26 +53,26 @@
53
53
  "test:types": "tsc --esModuleInterop --module node16 --moduleResolution node16 --noEmit --strict types.ts"
54
54
  },
55
55
  "devDependencies": {
56
- "@turf/kinks": "^7.1.0",
56
+ "@turf/kinks": "^7.2.0",
57
57
  "@types/benchmark": "^2.1.5",
58
- "@types/tape": "^4.2.32",
58
+ "@types/tape": "^4.13.4",
59
59
  "benchmark": "^2.1.4",
60
60
  "load-json-file": "^7.0.1",
61
61
  "npm-run-all": "^4.1.5",
62
- "tape": "^5.7.2",
63
- "tsup": "^8.0.1",
64
- "tsx": "^4.6.2",
65
- "typescript": "^5.2.2",
62
+ "tape": "^5.9.0",
63
+ "tsup": "^8.3.5",
64
+ "tsx": "^4.19.2",
65
+ "typescript": "^5.5.4",
66
66
  "write-json-file": "^5.0.0"
67
67
  },
68
68
  "dependencies": {
69
- "@turf/area": "^7.1.0",
70
- "@turf/boolean-point-in-polygon": "^7.1.0",
71
- "@turf/helpers": "^7.1.0",
72
- "@turf/meta": "^7.1.0",
69
+ "@turf/area": "^7.2.0",
70
+ "@turf/boolean-point-in-polygon": "^7.2.0",
71
+ "@turf/helpers": "^7.2.0",
72
+ "@turf/meta": "^7.2.0",
73
73
  "@types/geojson": "^7946.0.10",
74
74
  "rbush": "^3.0.1",
75
- "tslib": "^2.6.2"
75
+ "tslib": "^2.8.1"
76
76
  },
77
- "gitHead": "68915eeebc9278bb40dec3f1034499698a0561ef"
77
+ "gitHead": "7b0f0374c4668cd569f8904c71e2ae7d941be867"
78
78
  }
@@ -10,13 +10,10 @@ function coordsToPolygon(coords) {
10
10
  }
11
11
  function voronoi2(points, options) {
12
12
  options = options || {};
13
- if (!_helpers.isObject.call(void 0, options))
14
- throw new Error("options is invalid");
13
+ if (!_helpers.isObject.call(void 0, options)) throw new Error("options is invalid");
15
14
  const bbox = options.bbox || [-180, -85, 180, 85];
16
- if (!points)
17
- throw new Error("points is required");
18
- if (!Array.isArray(bbox))
19
- throw new Error("bbox is invalid");
15
+ if (!points) throw new Error("points is required");
16
+ if (!Array.isArray(bbox)) throw new Error("bbox is invalid");
20
17
  _invariant.collectionOf.call(void 0, points, "Point", "points");
21
18
  return _helpers.featureCollection.call(void 0,
22
19
  d3voronoi.voronoi().x((feature) => feature.geometry.coordinates[0]).y((feature) => feature.geometry.coordinates[1]).extent([
@@ -1 +1 @@
1
- {"version":3,"sources":["../../index.ts"],"names":["voronoi"],"mappings":";AAQA,SAAS,SAAS,mBAAmB,gBAAgB;AACrD,SAAS,oBAAoB;AAC7B,SAAS,uBAAuB;AAChC,YAAY,eAAe;AAS3B,SAAS,gBAAgB,QAAoB;AAC3C,WAAS,OAAO,MAAM;AACtB,SAAO,KAAK,OAAO,CAAC,CAAC;AACrB,SAAO,QAAQ,CAAC,MAAM,CAAC;AACzB;AAuBA,SAASA,SACP,QACA,SAC4B;AAE5B,YAAU,WAAW,CAAC;AACtB,MAAI,CAAC,SAAS,OAAO;AAAG,UAAM,IAAI,MAAM,oBAAoB;AAC5D,QAAM,OAAO,QAAQ,QAAQ,CAAC,MAAM,KAAK,KAAK,EAAE;AAGhD,MAAI,CAAC;AAAQ,UAAM,IAAI,MAAM,oBAAoB;AACjD,MAAI,CAAC,MAAM,QAAQ,IAAI;AAAG,UAAM,IAAI,MAAM,iBAAiB;AAC3D,eAAa,QAAQ,SAAS,QAAQ;AAGtC,SAAO;AAAA,IAEF,kBAAwB,EACxB,EAAE,CAAC,YAAY,QAAQ,SAAS,YAAY,CAAC,CAAC,EAC9C,EAAE,CAAC,YAAY,QAAQ,SAAS,YAAY,CAAC,CAAC,EAC9C,OAAO;AAAA,MACN,CAAC,KAAK,CAAC,GAAG,KAAK,CAAC,CAAC;AAAA,MACjB,CAAC,KAAK,CAAC,GAAG,KAAK,CAAC,CAAC;AAAA,IACnB,CAAC,EACA,SAAS,OAAO,QAAQ,EACxB,IAAI,SAAU,QAAQ,OAAO;AAC5B,aAAO,OAAO,OAAO,gBAAgB,MAAM,GAAG;AAAA,QAC5C,YAAY,gBAAgB,OAAO,SAAS,KAAK,EAAE,UAAU;AAAA,MAC/D,CAAC;AAAA,IACH,CAAC;AAAA,EACL;AACF;AAGA,IAAO,uBAAQA","sourcesContent":["import {\n BBox,\n Feature,\n FeatureCollection,\n Point,\n Polygon,\n Position,\n} from \"geojson\";\nimport { polygon, featureCollection, isObject } from \"@turf/helpers\";\nimport { collectionOf } from \"@turf/invariant\";\nimport { cloneProperties } from \"@turf/clone\";\nimport * as d3voronoi from \"d3-voronoi\";\n\n/**\n * Creates a polygon from a list of coordinates. Ensures the polygon is closed.\n *\n * @private\n * @param {Position[]} coords representing a polygon\n * @returns {Feature<Polygon>} polygon\n */\nfunction coordsToPolygon(coords: Position[]) {\n coords = coords.slice();\n coords.push(coords[0]);\n return polygon([coords]);\n}\n\n/**\n * Takes a collection of points and a bounding box, and returns a collection\n * of Voronoi polygons.\n *\n * The Voronoi algorithim used comes from the d3-voronoi package.\n *\n * @name voronoi\n * @param {FeatureCollection<Point>} points points around which to calculate the Voronoi polygons\n * @param {Object} [options={}] Optional parameters\n * @param {BBox} [options.bbox=[-180, -85, 180, -85]] clipping rectangle, in [minX, minY, maxX, MaxY] order\n * @returns {FeatureCollection<Polygon>} a set of polygons, one per input point\n * @example\n * const options = {\n * bbox: [-70, 40, -60, 60]\n * };\n * const points = turf.randomPoint(100, options);\n * const voronoiPolygons = turf.voronoi(points, options);\n *\n * //addToMap\n * const addToMap = [voronoiPolygons, points];\n */\nfunction voronoi(\n points: FeatureCollection<Point>,\n options?: { bbox?: BBox }\n): FeatureCollection<Polygon> {\n // Optional params\n options = options || {};\n if (!isObject(options)) throw new Error(\"options is invalid\");\n const bbox = options.bbox || [-180, -85, 180, 85];\n\n // Input Validation\n if (!points) throw new Error(\"points is required\");\n if (!Array.isArray(bbox)) throw new Error(\"bbox is invalid\");\n collectionOf(points, \"Point\", \"points\");\n\n // Main\n return featureCollection(\n d3voronoi\n .voronoi<Feature<Point>>()\n .x((feature) => feature.geometry.coordinates[0])\n .y((feature) => feature.geometry.coordinates[1])\n .extent([\n [bbox[0], bbox[1]],\n [bbox[2], bbox[3]],\n ])\n .polygons(points.features)\n .map(function (coords, index) {\n return Object.assign(coordsToPolygon(coords), {\n properties: cloneProperties(points.features[index].properties),\n });\n })\n );\n}\n\nexport { voronoi };\nexport default voronoi;\n"]}
1
+ {"version":3,"sources":["/home/runner/work/turf/turf/packages/turf-voronoi/dist/cjs/index.cjs","../../index.ts"],"names":["voronoi"],"mappings":"AAAA;ACQA,wCAAqD;AACrD,4CAA6B;AAC7B,oCAAgC;AAChC,4FAA2B;AAS3B,SAAS,eAAA,CAAgB,MAAA,EAAoB;AAC3C,EAAA,OAAA,EAAS,MAAA,CAAO,KAAA,CAAM,CAAA;AACtB,EAAA,MAAA,CAAO,IAAA,CAAK,MAAA,CAAO,CAAC,CAAC,CAAA;AACrB,EAAA,OAAO,8BAAA,CAAS,MAAM,CAAC,CAAA;AACzB;AAuBA,SAASA,QAAAA,CACP,MAAA,EACA,OAAA,EAC4B;AAE5B,EAAA,QAAA,EAAU,QAAA,GAAW,CAAC,CAAA;AACtB,EAAA,GAAA,CAAI,CAAC,+BAAA,OAAgB,CAAA,EAAG,MAAM,IAAI,KAAA,CAAM,oBAAoB,CAAA;AAC5D,EAAA,MAAM,KAAA,EAAO,OAAA,CAAQ,KAAA,GAAQ,CAAC,CAAA,GA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ollection,\n Point,\n Polygon,\n Position,\n} from \"geojson\";\nimport { polygon, featureCollection, isObject } from \"@turf/helpers\";\nimport { collectionOf } from \"@turf/invariant\";\nimport { cloneProperties } from \"@turf/clone\";\nimport * as d3voronoi from \"d3-voronoi\";\n\n/**\n * Creates a polygon from a list of coordinates. Ensures the polygon is closed.\n *\n * @private\n * @param {Position[]} coords representing a polygon\n * @returns {Feature<Polygon>} polygon\n */\nfunction coordsToPolygon(coords: Position[]) {\n coords = coords.slice();\n coords.push(coords[0]);\n return polygon([coords]);\n}\n\n/**\n * Takes a collection of points and a bounding box, and returns a collection\n * of Voronoi polygons.\n *\n * The Voronoi algorithim used comes from the d3-voronoi package.\n *\n * @function\n * @param {FeatureCollection<Point>} points points around which to calculate the Voronoi polygons\n * @param {Object} [options={}] Optional parameters\n * @param {BBox} [options.bbox=[-180, -85, 180, -85]] clipping rectangle, in [minX, minY, maxX, MaxY] order\n * @returns {FeatureCollection<Polygon>} a set of polygons, one per input point\n * @example\n * const options = {\n * bbox: [-70, 40, -60, 60]\n * };\n * const points = turf.randomPoint(100, options);\n * const voronoiPolygons = turf.voronoi(points, options);\n *\n * //addToMap\n * const addToMap = [voronoiPolygons, points];\n */\nfunction voronoi(\n points: FeatureCollection<Point>,\n options?: { bbox?: BBox }\n): FeatureCollection<Polygon> {\n // Optional params\n options = options || {};\n if (!isObject(options)) throw new Error(\"options is invalid\");\n const bbox = options.bbox || [-180, -85, 180, 85];\n\n // Input Validation\n if (!points) throw new Error(\"points is required\");\n if (!Array.isArray(bbox)) throw new Error(\"bbox is invalid\");\n collectionOf(points, \"Point\", \"points\");\n\n // Main\n return featureCollection(\n d3voronoi\n .voronoi<Feature<Point>>()\n .x((feature) => feature.geometry.coordinates[0])\n .y((feature) => feature.geometry.coordinates[1])\n .extent([\n [bbox[0], bbox[1]],\n [bbox[2], bbox[3]],\n ])\n .polygons(points.features)\n .map(function (coords, index) {\n return Object.assign(coordsToPolygon(coords), {\n properties: cloneProperties(points.features[index].properties),\n });\n })\n );\n}\n\nexport { voronoi };\nexport default voronoi;\n"]}
@@ -6,7 +6,7 @@ import { FeatureCollection, Point, BBox, Polygon } from 'geojson';
6
6
  *
7
7
  * The Voronoi algorithim used comes from the d3-voronoi package.
8
8
  *
9
- * @name voronoi
9
+ * @function
10
10
  * @param {FeatureCollection<Point>} points points around which to calculate the Voronoi polygons
11
11
  * @param {Object} [options={}] Optional parameters
12
12
  * @param {BBox} [options.bbox=[-180, -85, 180, -85]] clipping rectangle, in [minX, minY, maxX, MaxY] order
@@ -6,7 +6,7 @@ import { FeatureCollection, Point, BBox, Polygon } from 'geojson';
6
6
  *
7
7
  * The Voronoi algorithim used comes from the d3-voronoi package.
8
8
  *
9
- * @name voronoi
9
+ * @function
10
10
  * @param {FeatureCollection<Point>} points points around which to calculate the Voronoi polygons
11
11
  * @param {Object} [options={}] Optional parameters
12
12
  * @param {BBox} [options.bbox=[-180, -85, 180, -85]] clipping rectangle, in [minX, minY, maxX, MaxY] order
@@ -10,13 +10,10 @@ function coordsToPolygon(coords) {
10
10
  }
11
11
  function voronoi2(points, options) {
12
12
  options = options || {};
13
- if (!isObject(options))
14
- throw new Error("options is invalid");
13
+ if (!isObject(options)) throw new Error("options is invalid");
15
14
  const bbox = options.bbox || [-180, -85, 180, 85];
16
- if (!points)
17
- throw new Error("points is required");
18
- if (!Array.isArray(bbox))
19
- throw new Error("bbox is invalid");
15
+ if (!points) throw new Error("points is required");
16
+ if (!Array.isArray(bbox)) throw new Error("bbox is invalid");
20
17
  collectionOf(points, "Point", "points");
21
18
  return featureCollection(
22
19
  d3voronoi.voronoi().x((feature) => feature.geometry.coordinates[0]).y((feature) => feature.geometry.coordinates[1]).extent([
@@ -1 +1 @@
1
- {"version":3,"sources":["../../index.ts"],"sourcesContent":["import {\n BBox,\n Feature,\n FeatureCollection,\n Point,\n Polygon,\n Position,\n} from \"geojson\";\nimport { polygon, featureCollection, isObject } from \"@turf/helpers\";\nimport { collectionOf } from \"@turf/invariant\";\nimport { cloneProperties } from \"@turf/clone\";\nimport * as d3voronoi from \"d3-voronoi\";\n\n/**\n * Creates a polygon from a list of coordinates. Ensures the polygon is closed.\n *\n * @private\n * @param {Position[]} coords representing a polygon\n * @returns {Feature<Polygon>} polygon\n */\nfunction coordsToPolygon(coords: Position[]) {\n coords = coords.slice();\n coords.push(coords[0]);\n return polygon([coords]);\n}\n\n/**\n * Takes a collection of points and a bounding box, and returns a collection\n * of Voronoi polygons.\n *\n * The Voronoi algorithim used comes from the d3-voronoi package.\n *\n * @name voronoi\n * @param {FeatureCollection<Point>} points points around which to calculate the Voronoi polygons\n * @param {Object} [options={}] Optional parameters\n * @param {BBox} [options.bbox=[-180, -85, 180, -85]] clipping rectangle, in [minX, minY, maxX, MaxY] order\n * @returns {FeatureCollection<Polygon>} a set of polygons, one per input point\n * @example\n * const options = {\n * bbox: [-70, 40, -60, 60]\n * };\n * const points = turf.randomPoint(100, options);\n * const voronoiPolygons = turf.voronoi(points, options);\n *\n * //addToMap\n * const addToMap = [voronoiPolygons, points];\n */\nfunction voronoi(\n points: FeatureCollection<Point>,\n options?: { bbox?: BBox }\n): FeatureCollection<Polygon> {\n // Optional params\n options = options || {};\n if (!isObject(options)) throw new Error(\"options is invalid\");\n const bbox = options.bbox || [-180, -85, 180, 85];\n\n // Input Validation\n if (!points) throw new Error(\"points is required\");\n if (!Array.isArray(bbox)) throw new Error(\"bbox is invalid\");\n collectionOf(points, \"Point\", \"points\");\n\n // Main\n return featureCollection(\n d3voronoi\n .voronoi<Feature<Point>>()\n .x((feature) => feature.geometry.coordinates[0])\n .y((feature) => feature.geometry.coordinates[1])\n .extent([\n [bbox[0], bbox[1]],\n [bbox[2], bbox[3]],\n ])\n .polygons(points.features)\n .map(function (coords, index) {\n return Object.assign(coordsToPolygon(coords), {\n properties: cloneProperties(points.features[index].properties),\n });\n })\n );\n}\n\nexport { voronoi };\nexport default voronoi;\n"],"mappings":";AAQA,SAAS,SAAS,mBAAmB,gBAAgB;AACrD,SAAS,oBAAoB;AAC7B,SAAS,uBAAuB;AAChC,YAAY,eAAe;AAS3B,SAAS,gBAAgB,QAAoB;AAC3C,WAAS,OAAO,MAAM;AACtB,SAAO,KAAK,OAAO,CAAC,CAAC;AACrB,SAAO,QAAQ,CAAC,MAAM,CAAC;AACzB;AAuBA,SAASA,SACP,QACA,SAC4B;AAE5B,YAAU,WAAW,CAAC;AACtB,MAAI,CAAC,SAAS,OAAO;AAAG,UAAM,IAAI,MAAM,oBAAoB;AAC5D,QAAM,OAAO,QAAQ,QAAQ,CAAC,MAAM,KAAK,KAAK,EAAE;AAGhD,MAAI,CAAC;AAAQ,UAAM,IAAI,MAAM,oBAAoB;AACjD,MAAI,CAAC,MAAM,QAAQ,IAAI;AAAG,UAAM,IAAI,MAAM,iBAAiB;AAC3D,eAAa,QAAQ,SAAS,QAAQ;AAGtC,SAAO;AAAA,IAEF,kBAAwB,EACxB,EAAE,CAAC,YAAY,QAAQ,SAAS,YAAY,CAAC,CAAC,EAC9C,EAAE,CAAC,YAAY,QAAQ,SAAS,YAAY,CAAC,CAAC,EAC9C,OAAO;AAAA,MACN,CAAC,KAAK,CAAC,GAAG,KAAK,CAAC,CAAC;AAAA,MACjB,CAAC,KAAK,CAAC,GAAG,KAAK,CAAC,CAAC;AAAA,IACnB,CAAC,EACA,SAAS,OAAO,QAAQ,EACxB,IAAI,SAAU,QAAQ,OAAO;AAC5B,aAAO,OAAO,OAAO,gBAAgB,MAAM,GAAG;AAAA,QAC5C,YAAY,gBAAgB,OAAO,SAAS,KAAK,EAAE,UAAU;AAAA,MAC/D,CAAC;AAAA,IACH,CAAC;AAAA,EACL;AACF;AAGA,IAAO,uBAAQC;","names":["voronoi","voronoi"]}
1
+ {"version":3,"sources":["../../index.ts"],"sourcesContent":["import {\n BBox,\n Feature,\n FeatureCollection,\n Point,\n Polygon,\n Position,\n} from \"geojson\";\nimport { polygon, featureCollection, isObject } from \"@turf/helpers\";\nimport { collectionOf } from \"@turf/invariant\";\nimport { cloneProperties } from \"@turf/clone\";\nimport * as d3voronoi from \"d3-voronoi\";\n\n/**\n * Creates a polygon from a list of coordinates. Ensures the polygon is closed.\n *\n * @private\n * @param {Position[]} coords representing a polygon\n * @returns {Feature<Polygon>} polygon\n */\nfunction coordsToPolygon(coords: Position[]) {\n coords = coords.slice();\n coords.push(coords[0]);\n return polygon([coords]);\n}\n\n/**\n * Takes a collection of points and a bounding box, and returns a collection\n * of Voronoi polygons.\n *\n * The Voronoi algorithim used comes from the d3-voronoi package.\n *\n * @function\n * @param {FeatureCollection<Point>} points points around which to calculate the Voronoi polygons\n * @param {Object} [options={}] Optional parameters\n * @param {BBox} [options.bbox=[-180, -85, 180, -85]] clipping rectangle, in [minX, minY, maxX, MaxY] order\n * @returns {FeatureCollection<Polygon>} a set of polygons, one per input point\n * @example\n * const options = {\n * bbox: [-70, 40, -60, 60]\n * };\n * const points = turf.randomPoint(100, options);\n * const voronoiPolygons = turf.voronoi(points, options);\n *\n * //addToMap\n * const addToMap = [voronoiPolygons, points];\n */\nfunction voronoi(\n points: FeatureCollection<Point>,\n options?: { bbox?: BBox }\n): FeatureCollection<Polygon> {\n // Optional params\n options = options || {};\n if (!isObject(options)) throw new Error(\"options is invalid\");\n const bbox = options.bbox || [-180, -85, 180, 85];\n\n // Input Validation\n if (!points) throw new Error(\"points is required\");\n if (!Array.isArray(bbox)) throw new Error(\"bbox is invalid\");\n collectionOf(points, \"Point\", \"points\");\n\n // Main\n return featureCollection(\n d3voronoi\n .voronoi<Feature<Point>>()\n .x((feature) => feature.geometry.coordinates[0])\n .y((feature) => feature.geometry.coordinates[1])\n .extent([\n [bbox[0], bbox[1]],\n [bbox[2], bbox[3]],\n ])\n .polygons(points.features)\n .map(function (coords, index) {\n return Object.assign(coordsToPolygon(coords), {\n properties: cloneProperties(points.features[index].properties),\n });\n })\n );\n}\n\nexport { voronoi };\nexport default voronoi;\n"],"mappings":";AAQA,SAAS,SAAS,mBAAmB,gBAAgB;AACrD,SAAS,oBAAoB;AAC7B,SAAS,uBAAuB;AAChC,YAAY,eAAe;AAS3B,SAAS,gBAAgB,QAAoB;AAC3C,WAAS,OAAO,MAAM;AACtB,SAAO,KAAK,OAAO,CAAC,CAAC;AACrB,SAAO,QAAQ,CAAC,MAAM,CAAC;AACzB;AAuBA,SAASA,SACP,QACA,SAC4B;AAE5B,YAAU,WAAW,CAAC;AACtB,MAAI,CAAC,SAAS,OAAO,EAAG,OAAM,IAAI,MAAM,oBAAoB;AAC5D,QAAM,OAAO,QAAQ,QAAQ,CAAC,MAAM,KAAK,KAAK,EAAE;AAGhD,MAAI,CAAC,OAAQ,OAAM,IAAI,MAAM,oBAAoB;AACjD,MAAI,CAAC,MAAM,QAAQ,IAAI,EAAG,OAAM,IAAI,MAAM,iBAAiB;AAC3D,eAAa,QAAQ,SAAS,QAAQ;AAGtC,SAAO;AAAA,IAEF,kBAAwB,EACxB,EAAE,CAAC,YAAY,QAAQ,SAAS,YAAY,CAAC,CAAC,EAC9C,EAAE,CAAC,YAAY,QAAQ,SAAS,YAAY,CAAC,CAAC,EAC9C,OAAO;AAAA,MACN,CAAC,KAAK,CAAC,GAAG,KAAK,CAAC,CAAC;AAAA,MACjB,CAAC,KAAK,CAAC,GAAG,KAAK,CAAC,CAAC;AAAA,IACnB,CAAC,EACA,SAAS,OAAO,QAAQ,EACxB,IAAI,SAAU,QAAQ,OAAO;AAC5B,aAAO,OAAO,OAAO,gBAAgB,MAAM,GAAG;AAAA,QAC5C,YAAY,gBAAgB,OAAO,SAAS,KAAK,EAAE,UAAU;AAAA,MAC/D,CAAC;AAAA,IACH,CAAC;AAAA,EACL;AACF;AAGA,IAAO,uBAAQC;","names":["voronoi","voronoi"]}
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@turf/voronoi",
3
- "version": "7.1.0",
3
+ "version": "7.2.0",
4
4
  "description": "turf voronoi module",
5
5
  "author": "Turf Authors",
6
6
  "contributors": [
@@ -59,25 +59,25 @@
59
59
  },
60
60
  "devDependencies": {
61
61
  "@types/benchmark": "^2.1.5",
62
- "@types/tape": "^4.2.32",
62
+ "@types/tape": "^4.13.4",
63
63
  "benchmark": "^2.1.4",
64
64
  "glob": "^10.3.10",
65
65
  "load-json-file": "^7.0.1",
66
66
  "npm-run-all": "^4.1.5",
67
- "tape": "^5.7.2",
68
- "tsup": "^8.0.1",
69
- "tsx": "^4.6.2",
70
- "typescript": "^5.2.2",
67
+ "tape": "^5.9.0",
68
+ "tsup": "^8.3.5",
69
+ "tsx": "^4.19.2",
70
+ "typescript": "^5.5.4",
71
71
  "write-json-file": "^5.0.0"
72
72
  },
73
73
  "dependencies": {
74
- "@turf/clone": "^7.1.0",
75
- "@turf/helpers": "^7.1.0",
76
- "@turf/invariant": "^7.1.0",
74
+ "@turf/clone": "^7.2.0",
75
+ "@turf/helpers": "^7.2.0",
76
+ "@turf/invariant": "^7.2.0",
77
77
  "@types/d3-voronoi": "^1.1.12",
78
78
  "@types/geojson": "^7946.0.10",
79
79
  "d3-voronoi": "1.1.2",
80
- "tslib": "^2.6.2"
80
+ "tslib": "^2.8.1"
81
81
  },
82
- "gitHead": "68915eeebc9278bb40dec3f1034499698a0561ef"
82
+ "gitHead": "7b0f0374c4668cd569f8904c71e2ae7d941be867"
83
83
  }
@@ -8,7 +8,7 @@ This package contains type definitions for node (https://nodejs.org/).
8
8
  Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node.
9
9
 
10
10
  ### Additional Details
11
- * Last updated: Wed, 11 Dec 2024 09:35:14 GMT
11
+ * Last updated: Thu, 16 Jan 2025 00:46:49 GMT
12
12
  * Dependencies: [undici-types](https://npmjs.com/package/undici-types)
13
13
 
14
14
  # Credits
@@ -768,7 +768,7 @@ declare module "events" {
768
768
  setMaxListeners(n: number): this;
769
769
  /**
770
770
  * Returns the current max listener value for the `EventEmitter` which is either
771
- * set by `emitter.setMaxListeners(n)` or defaults to {@link defaultMaxListeners}.
771
+ * set by `emitter.setMaxListeners(n)` or defaults to {@link EventEmitter.defaultMaxListeners}.
772
772
  * @since v1.0.0
773
773
  */
774
774
  getMaxListeners(): number;
@@ -249,19 +249,21 @@ declare global {
249
249
  };
250
250
 
251
251
  /**
252
- * A browser-compatible implementation of [`localStorage`](https://developer.mozilla.org/en-US/docs/Web/API/Window/localStorage).
253
- * Data is stored unencrypted in the file specified by the `--localstorage-file` CLI flag.
252
+ * A browser-compatible implementation of [`localStorage`](https://developer.mozilla.org/en-US/docs/Web/API/Window/localStorage). Data is stored
253
+ * unencrypted in the file specified by the `--localstorage-file` CLI flag.
254
+ * The maximum amount of data that can be stored is 10 MB.
254
255
  * Any modification of this data outside of the Web Storage API is not supported.
255
256
  * Enable this API with the `--experimental-webstorage` CLI flag.
257
+ * `localStorage` data is not stored per user or per request when used in the context
258
+ * of a server, it is shared across all users and requests.
256
259
  * @since v22.4.0
257
260
  */
258
261
  var localStorage: Storage;
259
262
 
260
263
  /**
261
- * A browser-compatible implementation of [`sessionStorage`](https://developer.mozilla.org/en-US/docs/Web/API/Window/sessionStorage).
262
- * Data is stored in memory, with a storage quota of 10 MB.
263
- * Any modification of this data outside of the Web Storage API is not supported.
264
- * Enable this API with the `--experimental-webstorage` CLI flag.
264
+ * A browser-compatible implementation of [`sessionStorage`](https://developer.mozilla.org/en-US/docs/Web/API/Window/sessionStorage). Data is stored in
265
+ * memory, with a storage quota of 10 MB. `sessionStorage` data persists only within
266
+ * the currently running process, and is not shared between workers.
265
267
  * @since v22.4.0
266
268
  */
267
269
  var sessionStorage: Storage;
@@ -125,7 +125,14 @@ declare module "module" {
125
125
  interface ImportAttributes extends NodeJS.Dict<string> {
126
126
  type?: string | undefined;
127
127
  }
128
- type ModuleFormat = "builtin" | "commonjs" | "json" | "module" | "wasm";
128
+ type ModuleFormat =
129
+ | "builtin"
130
+ | "commonjs"
131
+ | "commonjs-typescript"
132
+ | "json"
133
+ | "module"
134
+ | "module-typescript"
135
+ | "wasm";
129
136
  type ModuleSource = string | ArrayBuffer | NodeJS.TypedArray;
130
137
  interface GlobalPreloadContext {
131
138
  port: MessagePort;
@@ -196,7 +203,7 @@ declare module "module" {
196
203
  context: ResolveHookContext,
197
204
  nextResolve: (
198
205
  specifier: string,
199
- context?: ResolveHookContext,
206
+ context?: Partial<ResolveHookContext>,
200
207
  ) => ResolveFnOutput | Promise<ResolveFnOutput>,
201
208
  ) => ResolveFnOutput | Promise<ResolveFnOutput>;
202
209
  interface LoadHookContext {
@@ -236,7 +243,7 @@ declare module "module" {
236
243
  type LoadHook = (
237
244
  url: string,
238
245
  context: LoadHookContext,
239
- nextLoad: (url: string, context?: LoadHookContext) => LoadFnOutput | Promise<LoadFnOutput>,
246
+ nextLoad: (url: string, context?: Partial<LoadHookContext>) => LoadFnOutput | Promise<LoadFnOutput>,
240
247
  ) => LoadFnOutput | Promise<LoadFnOutput>;
241
248
  namespace constants {
242
249
  /**
@@ -896,6 +896,9 @@ declare module "net" {
896
896
  function getDefaultAutoSelectFamily(): boolean;
897
897
  /**
898
898
  * Sets the default value of the `autoSelectFamily` option of `socket.connect(options)`.
899
+ * @param value The new default value.
900
+ * The initial default value is `true`, unless the command line option
901
+ * `--no-network-family-autoselection` is provided.
899
902
  * @since v19.4.0
900
903
  */
901
904
  function setDefaultAutoSelectFamily(value: boolean): void;
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@types/node",
3
- "version": "22.10.2",
3
+ "version": "22.10.7",
4
4
  "description": "TypeScript definitions for node",
5
5
  "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node",
6
6
  "license": "MIT",
@@ -215,6 +215,6 @@
215
215
  "undici-types": "~6.20.0"
216
216
  },
217
217
  "peerDependencies": {},
218
- "typesPublisherContentHash": "1c1003be2fa8d4f16936ac129ec72142249d4a14af58831bef4147ca7035833b",
218
+ "typesPublisherContentHash": "0179bf8f3b9c8f59fbbc60e9561901be4c7e49c60dbc58088a1bf6f1f83564bc",
219
219
  "typeScriptVersion": "5.0"
220
220
  }
@@ -333,11 +333,43 @@ declare module "process" {
333
333
  TZ?: string;
334
334
  }
335
335
  interface HRTime {
336
+ /**
337
+ * This is the legacy version of {@link process.hrtime.bigint()}
338
+ * before bigint was introduced in JavaScript.
339
+ *
340
+ * The `process.hrtime()` method returns the current high-resolution real time in a `[seconds, nanoseconds]` tuple `Array`,
341
+ * where `nanoseconds` is the remaining part of the real time that can't be represented in second precision.
342
+ *
343
+ * `time` is an optional parameter that must be the result of a previous `process.hrtime()` call to diff with the current time.
344
+ * If the parameter passed in is not a tuple `Array`, a TypeError will be thrown.
345
+ * Passing in a user-defined array instead of the result of a previous call to `process.hrtime()` will lead to undefined behavior.
346
+ *
347
+ * These times are relative to an arbitrary time in the past,
348
+ * and not related to the time of day and therefore not subject to clock drift.
349
+ * The primary use is for measuring performance between intervals:
350
+ * ```js
351
+ * const { hrtime } = require('node:process');
352
+ * const NS_PER_SEC = 1e9;
353
+ * const time = hrtime();
354
+ * // [ 1800216, 25 ]
355
+ *
356
+ * setTimeout(() => {
357
+ * const diff = hrtime(time);
358
+ * // [ 1, 552 ]
359
+ *
360
+ * console.log(`Benchmark took ${diff[0] * NS_PER_SEC + diff[1]} nanoseconds`);
361
+ * // Benchmark took 1000000552 nanoseconds
362
+ * }, 1000);
363
+ * ```
364
+ * @since 0.7.6
365
+ * @legacy Use {@link process.hrtime.bigint()} instead.
366
+ * @param time The result of a previous call to `process.hrtime()`
367
+ */
336
368
  (time?: [number, number]): [number, number];
337
369
  /**
338
- * The `bigint` version of the `{@link hrtime()}` method returning the current high-resolution real time in nanoseconds as a `bigint`.
370
+ * The `bigint` version of the {@link process.hrtime()} method returning the current high-resolution real time in nanoseconds as a `bigint`.
339
371
  *
340
- * Unlike `{@link hrtime()}`, it does not support an additional time argument since the difference can just be computed directly by subtraction of the two `bigint`s.
372
+ * Unlike {@link process.hrtime()}, it does not support an additional time argument since the difference can just be computed directly by subtraction of the two `bigint`s.
341
373
  * ```js
342
374
  * import { hrtime } from 'node:process';
343
375
  *
@@ -352,6 +384,7 @@ declare module "process" {
352
384
  * // Benchmark took 1154389282 nanoseconds
353
385
  * }, 1000);
354
386
  * ```
387
+ * @since v10.7.0
355
388
  */
356
389
  bigint(): bigint;
357
390
  }