mirage2d 1.1.3 → 1.1.4

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 (192) hide show
  1. package/dist/assets/js/basedecoder-fa2b8e8d.js +107 -0
  2. package/dist/assets/js/decoder-f19e05cf.js +6 -0
  3. package/dist/assets/js/deflate-adb9a67b.js +8 -0
  4. package/dist/{js/dist/_html2canvas@1.4.1@html2canvas.e8006fee.js → assets/js/html2canvas.esm-3dd231c5.js} +0 -0
  5. package/dist/assets/js/index-3263db85.js +1 -0
  6. package/dist/assets/js/index-a9db46a5.js +212968 -0
  7. package/dist/{js/lib/_canvg@3.0.10@canvg.bd557ac8.js → assets/js/index.es-38f73a27.js} +2179 -351
  8. package/dist/assets/js/jpeg-3bf23728.js +835 -0
  9. package/dist/{js/_lerc@3.0.0@lerc/_lerc@3.0.0@lerc.dc2ff398.js → assets/js/lerc-4c39f39b.js} +26 -1
  10. package/dist/assets/js/lzw-d0cad8af.js +123 -0
  11. package/dist/assets/js/packbits-d75b4cce.js +25 -0
  12. package/dist/{js/_pako@2.0.4@pako/_pako@2.0.4@pako.52d6b320.js → assets/js/pako.esm-49deb4d7.js} +0 -0
  13. package/dist/{js/dist/_dompurify@2.4.0@dompurify.e7ba523e.js → assets/js/purify.es-1915dfae.js} +0 -0
  14. package/dist/assets/js/raw-9656f9cc.js +7 -0
  15. package/dist/assets/js/webimage-edb7156c.js +27 -0
  16. package/package.json +3 -3
  17. package/dist/js/_@babel_runtime@7.18.9@@babel/_@babel_runtime@7.18.9@@babel.e0126ca2.js +0 -51
  18. package/dist/js/_@petamoriken_float16@3.6.6@@petamoriken/_@petamoriken_float16@3.6.6@@petamoriken.c5188241.js +0 -217
  19. package/dist/js/_@turf_along@6.5.0@@turf/_@turf_along@6.5.0@@turf.18dbc1a3.js +0 -31
  20. package/dist/js/_@turf_angle@6.5.0@@turf/_@turf_angle@6.5.0@@turf.554ac9bf.js +0 -1
  21. package/dist/js/_@turf_area@6.5.0@@turf/_@turf_area@6.5.0@@turf.6cbf0cc1.js +0 -74
  22. package/dist/js/_@turf_bbox-clip@6.5.0@@turf/_@turf_bbox-clip@6.5.0@@turf.e491cb90.js +0 -1
  23. package/dist/js/_@turf_bbox-polygon@6.5.0@@turf/_@turf_bbox-polygon@6.5.0@@turf.523f1c20.js +0 -19
  24. package/dist/js/_@turf_bbox@6.5.0@@turf/_@turf_bbox@6.5.0@@turf.4c59feee.js +0 -48
  25. package/dist/js/_@turf_bearing@6.5.0@@turf/_@turf_bearing@6.5.0@@turf.f2555a09.js +0 -25
  26. package/dist/js/_@turf_bezier-spline@6.5.0@@turf/_@turf_bezier-spline@6.5.0@@turf.fa7991dd.js +0 -137
  27. package/dist/js/_@turf_boolean-clockwise@6.5.0@@turf/_@turf_boolean-clockwise@6.5.0@@turf.4031f280.js +0 -1
  28. package/dist/js/_@turf_boolean-contains@6.5.0@@turf/_@turf_boolean-contains@6.5.0@@turf.836d55d8.js +0 -191
  29. package/dist/js/_@turf_boolean-crosses@6.5.0@@turf/_@turf_boolean-crosses@6.5.0@@turf.c5f65a28.js +0 -125
  30. package/dist/js/_@turf_boolean-disjoint@6.5.0@@turf/_@turf_boolean-disjoint@6.5.0@@turf.bbd60872.js +0 -122
  31. package/dist/js/_@turf_boolean-equal@6.5.0@@turf/_@turf_boolean-equal@6.5.0@@turf.341ffa01.js +0 -1
  32. package/dist/js/_@turf_boolean-intersects@6.5.0@@turf/_@turf_boolean-intersects@6.5.0@@turf.05fc28b3.js +0 -15
  33. package/dist/js/_@turf_boolean-overlap@6.5.0@@turf/_@turf_boolean-overlap@6.5.0@@turf.a519db25.js +0 -53
  34. package/dist/js/_@turf_boolean-parallel@6.5.0@@turf/_@turf_boolean-parallel@6.5.0@@turf.dbf2bc2d.js +0 -1
  35. package/dist/js/_@turf_boolean-point-in-polygon@6.5.0@@turf/_@turf_boolean-point-in-polygon@6.5.0@@turf.62a2d48a.js +0 -65
  36. package/dist/js/_@turf_boolean-point-on-line@6.5.0@@turf/_@turf_boolean-point-on-line@6.5.0@@turf.3cf3aaa1.js +0 -69
  37. package/dist/js/_@turf_boolean-within@6.5.0@@turf/_@turf_boolean-within@6.5.0@@turf.d70d6bfc.js +0 -172
  38. package/dist/js/_@turf_buffer@6.5.0@@turf/_@turf_buffer@6.5.0@@turf.88330dfe.js +0 -99
  39. package/dist/js/_@turf_center-mean@6.5.0@@turf/_@turf_center-mean@6.5.0@@turf.b3d7c917.js +0 -1
  40. package/dist/js/_@turf_center-median@6.5.0@@turf/_@turf_center-median@6.5.0@@turf.44c4669e.js +0 -1
  41. package/dist/js/_@turf_center-of-mass@6.5.0@@turf/_@turf_center-of-mass@6.5.0@@turf.63ce279e.js +0 -1
  42. package/dist/js/_@turf_center@6.5.0@@turf/_@turf_center@6.5.0@@turf.a45495b5.js +0 -12
  43. package/dist/js/_@turf_centroid@6.5.0@@turf/_@turf_centroid@6.5.0@@turf.0a5be869.js +0 -17
  44. package/dist/js/_@turf_circle@6.5.0@@turf/_@turf_circle@6.5.0@@turf.0166b8c2.js +0 -16
  45. package/dist/js/_@turf_clean-coords@6.5.0@@turf/_@turf_clean-coords@6.5.0@@turf.8c76bd63.js +0 -111
  46. package/dist/js/_@turf_clone@6.5.0@@turf/_@turf_clone@6.5.0@@turf.cd05b1f8.js +0 -100
  47. package/dist/js/_@turf_clusters-dbscan@6.5.0@@turf/_@turf_clusters-dbscan@6.5.0@@turf.6bbee7e9.js +0 -1
  48. package/dist/js/_@turf_clusters-kmeans@6.5.0@@turf/_@turf_clusters-kmeans@6.5.0@@turf.505415df.js +0 -1
  49. package/dist/js/_@turf_clusters@6.5.0@@turf/_@turf_clusters@6.5.0@@turf.84cb9680.js +0 -1
  50. package/dist/js/_@turf_collect@6.5.0@@turf/_@turf_collect@6.5.0@@turf.93e41b5f.js +0 -1
  51. package/dist/js/_@turf_combine@6.5.0@@turf/_@turf_combine@6.5.0@@turf.33ee6336.js +0 -1
  52. package/dist/js/_@turf_concave@6.5.0@@turf/_@turf_concave@6.5.0@@turf.6fb6a8be.js +0 -179
  53. package/dist/js/_@turf_convex@6.5.0@@turf/_@turf_convex@6.5.0@@turf.24600ac2.js +0 -1
  54. package/dist/js/_@turf_destination@6.5.0@@turf/_@turf_destination@6.5.0@@turf.2621651e.js +0 -18
  55. package/dist/js/_@turf_difference@6.5.0@@turf/_@turf_difference@6.5.0@@turf.70df5e79.js +0 -18
  56. package/dist/js/_@turf_dissolve@6.5.0@@turf/_@turf_dissolve@6.5.0@@turf.edb28fc1.js +0 -1
  57. package/dist/js/_@turf_distance-weight@6.5.0@@turf/_@turf_distance-weight@6.5.0@@turf.e168af7f.js +0 -1
  58. package/dist/js/_@turf_distance@6.5.0@@turf/_@turf_distance@6.5.0@@turf.0c7b8aea.js +0 -22
  59. package/dist/js/_@turf_ellipse@6.5.0@@turf/_@turf_ellipse@6.5.0@@turf.37986056.js +0 -1
  60. package/dist/js/_@turf_envelope@6.5.0@@turf/_@turf_envelope@6.5.0@@turf.599c5772.js +0 -1
  61. package/dist/js/_@turf_explode@6.5.0@@turf/_@turf_explode@6.5.0@@turf.5c768db5.js +0 -24
  62. package/dist/js/_@turf_flatten@6.5.0@@turf/_@turf_flatten@6.5.0@@turf.57e9114c.js +0 -1
  63. package/dist/js/_@turf_flip@6.5.0@@turf/_@turf_flip@6.5.0@@turf.1f02101f.js +0 -1
  64. package/dist/js/_@turf_great-circle@6.5.0@@turf/_@turf_great-circle@6.5.0@@turf.2ca021a8.js +0 -1
  65. package/dist/js/_@turf_helpers@6.5.0@@turf/_@turf_helpers@6.5.0@@turf.f1480aa1.js +0 -364
  66. package/dist/js/_@turf_hex-grid@6.5.0@@turf/_@turf_hex-grid@6.5.0@@turf.a6a45778.js +0 -99
  67. package/dist/js/_@turf_interpolate@6.5.0@@turf/_@turf_interpolate@6.5.0@@turf.4d39bd8c.js +0 -1
  68. package/dist/js/_@turf_intersect@6.5.0@@turf/_@turf_intersect@6.5.0@@turf.34082cdf.js +0 -17
  69. package/dist/js/_@turf_invariant@6.5.0@@turf/_@turf_invariant@6.5.0@@turf.0ef69f8c.js +0 -71
  70. package/dist/js/_@turf_isobands@6.5.0@@turf/_@turf_isobands@6.5.0@@turf.def019df.js +0 -3109
  71. package/dist/js/_@turf_isolines@6.5.0@@turf/_@turf_isolines@6.5.0@@turf.da623b25.js +0 -1
  72. package/dist/js/_@turf_kinks@6.5.0@@turf/_@turf_kinks@6.5.0@@turf.ee61685b.js +0 -87
  73. package/dist/js/_@turf_length@6.5.0@@turf/_@turf_length@6.5.0@@turf.f73f6c98.js +0 -12
  74. package/dist/js/_@turf_line-arc@6.5.0@@turf/_@turf_line-arc@6.5.0@@turf.3dc57055.js +0 -37
  75. package/dist/js/_@turf_line-chunk@6.5.0@@turf/_@turf_line-chunk@6.5.0@@turf.1867af48.js +0 -43
  76. package/dist/js/_@turf_line-intersect@6.5.0@@turf/_@turf_line-intersect@6.5.0@@turf.c4d81948.js +0 -73
  77. package/dist/js/_@turf_line-offset@6.5.0@@turf/_@turf_line-offset@6.5.0@@turf.e6846793.js +0 -116
  78. package/dist/js/_@turf_line-overlap@6.5.0@@turf/_@turf_line-overlap@6.5.0@@turf.addba9a5.js +0 -76
  79. package/dist/js/_@turf_line-segment@6.5.0@@turf/_@turf_line-segment@6.5.0@@turf.18ce3010.js +0 -55
  80. package/dist/js/_@turf_line-slice-along@6.5.0@@turf/_@turf_line-slice-along@6.5.0@@turf.2b802464.js +0 -57
  81. package/dist/js/_@turf_line-slice@6.5.0@@turf/_@turf_line-slice@6.5.0@@turf.6423a053.js +0 -23
  82. package/dist/js/_@turf_line-split@6.5.0@@turf/_@turf_line-split@6.5.0@@turf.2022f104.js +0 -125
  83. package/dist/js/_@turf_line-to-polygon@6.5.0@@turf/_@turf_line-to-polygon@6.5.0@@turf.83f5e69f.js +0 -1
  84. package/dist/js/_@turf_mask@6.5.0@@turf/_@turf_mask@6.5.0@@turf.96cd5a94.js +0 -1
  85. package/dist/js/_@turf_meta@6.5.0@@turf/_@turf_meta@6.5.0@@turf.1b9d5da5.js +0 -611
  86. package/dist/js/_@turf_midpoint@6.5.0@@turf/_@turf_midpoint@6.5.0@@turf.67c14f94.js +0 -1
  87. package/dist/js/_@turf_moran-index@6.5.0@@turf/_@turf_moran-index@6.5.0@@turf.2ad5365a.js +0 -1
  88. package/dist/js/_@turf_nearest-point-on-line@6.5.0@@turf/_@turf_nearest-point-on-line@6.5.0@@turf.095c8c0d.js +0 -57
  89. package/dist/js/_@turf_nearest-point-to-line@6.5.0@@turf/_@turf_nearest-point-to-line@6.5.0@@turf.68484097.js +0 -1
  90. package/dist/js/_@turf_nearest-point@6.5.0@@turf/_@turf_nearest-point@6.5.0@@turf.e0d2f509.js +0 -24
  91. package/dist/js/_@turf_planepoint@6.5.0@@turf/_@turf_planepoint@6.5.0@@turf.56fc70b3.js +0 -1
  92. package/dist/js/_@turf_point-grid@6.5.0@@turf/_@turf_point-grid@6.5.0@@turf.2d278644.js +0 -42
  93. package/dist/js/_@turf_point-on-feature@6.5.0@@turf/_@turf_point-on-feature@6.5.0@@turf.0c740874.js +0 -1
  94. package/dist/js/_@turf_point-to-line-distance@6.5.0@@turf/_@turf_point-to-line-distance@6.5.0@@turf.33105d82.js +0 -1
  95. package/dist/js/_@turf_points-within-polygon@6.5.0@@turf/_@turf_points-within-polygon@6.5.0@@turf.659cd335.js +0 -35
  96. package/dist/js/_@turf_polygon-smooth@6.5.0@@turf/_@turf_polygon-smooth@6.5.0@@turf.43a7c33e.js +0 -1
  97. package/dist/js/_@turf_polygon-tangents@6.5.0@@turf/_@turf_polygon-tangents@6.5.0@@turf.a2c3a7b6.js +0 -1
  98. package/dist/js/_@turf_polygon-to-line@6.5.0@@turf/_@turf_polygon-to-line@6.5.0@@turf.3177cfb1.js +0 -48
  99. package/dist/js/_@turf_polygonize@6.5.0@@turf/_@turf_polygonize@6.5.0@@turf.f7cc4910.js +0 -1
  100. package/dist/js/_@turf_projection@6.5.0@@turf/_@turf_projection@6.5.0@@turf.ffdd3321.js +0 -1
  101. package/dist/js/_@turf_random@6.5.0@@turf/_@turf_random@6.5.0@@turf.f65251e4.js +0 -130
  102. package/dist/js/_@turf_rectangle-grid@6.5.0@@turf/_@turf_rectangle-grid@6.5.0@@turf.7e8b1a1f.js +0 -49
  103. package/dist/js/_@turf_rewind@6.5.0@@turf/_@turf_rewind@6.5.0@@turf.5d137ee9.js +0 -1
  104. package/dist/js/_@turf_rhumb-bearing@6.5.0@@turf/_@turf_rhumb-bearing@6.5.0@@turf.fb8f6ade.js +0 -30
  105. package/dist/js/_@turf_rhumb-destination@6.5.0@@turf/_@turf_rhumb-destination@6.5.0@@turf.dc0e4753.js +0 -36
  106. package/dist/js/_@turf_rhumb-distance@6.5.0@@turf/_@turf_rhumb-distance@6.5.0@@turf.94e475b8.js +0 -30
  107. package/dist/js/_@turf_sample@6.5.0@@turf/_@turf_sample@6.5.0@@turf.7181d7a7.js +0 -1
  108. package/dist/js/_@turf_sector@6.5.0@@turf/_@turf_sector@6.5.0@@turf.04ffddfe.js +0 -39
  109. package/dist/js/_@turf_shortest-path@6.5.0@@turf/_@turf_shortest-path@6.5.0@@turf.0c1b62a8.js +0 -367
  110. package/dist/js/_@turf_simplify@6.5.0@@turf/_@turf_simplify@6.5.0@@turf.46703d2e.js +0 -1
  111. package/dist/js/_@turf_square-grid@6.5.0@@turf/_@turf_square-grid@6.5.0@@turf.38bd2eaa.js +0 -8
  112. package/dist/js/_@turf_square@6.5.0@@turf/_@turf_square@6.5.0@@turf.2705289a.js +0 -27
  113. package/dist/js/_@turf_standard-deviational-ellipse@6.5.0@@turf/_@turf_standard-deviational-ellipse@6.5.0@@turf.7094e432.js +0 -1
  114. package/dist/js/_@turf_tag@6.5.0@@turf/_@turf_tag@6.5.0@@turf.cb60b0c1.js +0 -1
  115. package/dist/js/_@turf_tesselate@6.5.0@@turf/_@turf_tesselate@6.5.0@@turf.330e4aae.js +0 -1
  116. package/dist/js/_@turf_tin@6.5.0@@turf/_@turf_tin@6.5.0@@turf.077204c4.js +0 -173
  117. package/dist/js/_@turf_transform-rotate@6.5.0@@turf/_@turf_transform-rotate@6.5.0@@turf.6d350d36.js +0 -1
  118. package/dist/js/_@turf_transform-scale@6.5.0@@turf/_@turf_transform-scale@6.5.0@@turf.d6f65671.js +0 -90
  119. package/dist/js/_@turf_transform-translate@6.5.0@@turf/_@turf_transform-translate@6.5.0@@turf.9296b81a.js +0 -1
  120. package/dist/js/_@turf_triangle-grid@6.5.0@@turf/_@turf_triangle-grid@6.5.0@@turf.939f94ab.js +0 -107
  121. package/dist/js/_@turf_truncate@6.5.0@@turf/_@turf_truncate@6.5.0@@turf.ed70ebcb.js +0 -33
  122. package/dist/js/_@turf_turf@6.4.0@@turf/_@turf_turf@6.4.0@@turf.34fde8ec.js +0 -1
  123. package/dist/js/_@turf_union@6.5.0@@turf/_@turf_union@6.5.0@@turf.386ee2eb.js +0 -1
  124. package/dist/js/_@turf_unkink-polygon@6.5.0@@turf/_@turf_unkink-polygon@6.5.0@@turf.cb446e47.js +0 -1
  125. package/dist/js/_@turf_voronoi@6.5.0@@turf/_@turf_voronoi@6.5.0@@turf.c30d929e.js +0 -30
  126. package/dist/js/_call-bind@1.0.2@call-bind/_call-bind@1.0.2@call-bind.3811d387.js +0 -53
  127. package/dist/js/_concaveman@1.2.1@concaveman/_concaveman@1.2.1@concaveman.e747f731.js +0 -1
  128. package/dist/js/_core-js@3.25.0@core-js/_core-js@3.25.0@core-js.003355ed.js +0 -5029
  129. package/dist/js/_crypto-js@4.1.1@crypto-js/_crypto-js@4.1.1@crypto-js.e2f7f158.js +0 -1823
  130. package/dist/js/_d3-array@1.2.4@d3-array/_d3-array@1.2.4@d3-array.d606df6b.js +0 -58
  131. package/dist/js/_d3-geo@1.7.1@d3-geo/_d3-geo@1.7.1@d3-geo.7d357be1.js +0 -1094
  132. package/dist/js/_d3-voronoi@1.1.2@d3-voronoi/_d3-voronoi@1.1.2@d3-voronoi.072f12a6.js +0 -816
  133. package/dist/js/_deep-equal@1.1.1@deep-equal/_deep-equal@1.1.1@deep-equal.98576c17.js +0 -108
  134. package/dist/js/_define-properties@1.1.4@define-properties/_define-properties@1.1.4@define-properties.647c3367.js +0 -40
  135. package/dist/js/_density-clustering@1.3.0@density-clustering/_density-clustering@1.3.0@density-clustering.a07fc6ae.js +0 -1
  136. package/dist/js/_earcut@2.2.4@earcut/_earcut@2.2.4@earcut.972ebfd3.js +0 -1
  137. package/dist/js/_echarts-gl@1.1.2@echarts-gl/_echarts-gl@1.1.2@echarts-gl.1e3964b9.js +0 -36533
  138. package/dist/js/_echarts@4.9.0@echarts/_echarts@4.9.0@echarts.7d74ba77.js +0 -44219
  139. package/dist/js/_fflate@0.4.8@fflate/_fflate@0.4.8@fflate.d8111196.js +0 -571
  140. package/dist/js/_function-bind@1.1.1@function-bind/_function-bind@1.1.1@function-bind.de3cf11d.js +0 -46
  141. package/dist/js/_functions-have-names@1.2.3@functions-have-names/_functions-have-names@1.2.3@functions-have-names.7def2408.js +0 -27
  142. package/dist/js/_geojson-equality@0.1.6@geojson-equality/_geojson-equality@0.1.6@geojson-equality.09ffa121.js +0 -133
  143. package/dist/js/_geojson-path-finder@1.5.3@geojson-path-finder/_geojson-path-finder@1.5.3@geojson-path-finder.7a10eb99.js +0 -348
  144. package/dist/js/_geojson-rbush@3.2.0@geojson-rbush/_geojson-rbush@3.2.0@geojson-rbush.2adaeedb.js +0 -93
  145. package/dist/js/_geotiff@2.0.4@geotiff/_geotiff@2.0.4@geotiff.5b08f79e.js +0 -3663
  146. package/dist/js/_get-intrinsic@1.1.2@get-intrinsic/_get-intrinsic@1.1.2@get-intrinsic.a633bd68.js +0 -291
  147. package/dist/js/_has-property-descriptors@1.0.0@has-property-descriptors/_has-property-descriptors@1.0.0@has-property-descriptors.6bd2d302.js +0 -26
  148. package/dist/js/_has-symbols@1.0.3@has-symbols/_has-symbols@1.0.3@has-symbols.70406077.js +0 -63
  149. package/dist/js/_has-tostringtag@1.0.0@has-tostringtag/_has-tostringtag@1.0.0@has-tostringtag.2d502422.js +0 -6
  150. package/dist/js/_has@1.0.3@has/_has@1.0.3@has.ddd2eb68.js +0 -4
  151. package/dist/js/_ieee754@1.2.1@ieee754/_ieee754@1.2.1@ieee754.56426503.js +0 -80
  152. package/dist/js/_is-arguments@1.1.1@is-arguments/_is-arguments@1.1.1@is-arguments.7d77e24a.js +0 -23
  153. package/dist/js/_is-date-object@1.0.5@is-date-object/_is-date-object@1.0.5@is-date-object.08cc2543.js +0 -20
  154. package/dist/js/_is-regex@1.1.4@is-regex/_is-regex@1.1.4@is-regex.6417e007.js +0 -47
  155. package/dist/js/_jspdf@2.5.1@jspdf/_jspdf@2.5.1@jspdf.e927dbd8.js +0 -8494
  156. package/dist/js/_kml-geojson@1.2.0@kml-geojson/_kml-geojson@1.2.0@kml-geojson.f1ae86e4.js +0 -7858
  157. package/dist/js/_lru-cache@6.0.0@lru-cache/_lru-cache@6.0.0@lru-cache.dd72cc1b.js +0 -263
  158. package/dist/js/_mgrs@1.0.0@mgrs/_mgrs@1.0.0@mgrs.12d1da3e.js +0 -432
  159. package/dist/js/_object-assign@4.1.1@object-assign/_object-assign@4.1.1@object-assign.e4009c1c.js +0 -69
  160. package/dist/js/_object-is@1.1.5@object-is/_object-is@1.1.5@object-is.e47f5d65.js +0 -45
  161. package/dist/js/_object-keys@1.1.1@object-keys/_object-keys@1.1.1@object-keys.4b1d0a99.js +0 -151
  162. package/dist/js/_ol-echarts@2.0.6@ol-echarts/_ol-echarts@2.0.6@ol-echarts.658aaf82.js +0 -841
  163. package/dist/js/_ol-ext@3.2.30@ol-ext/_ol-ext@3.2.30@ol-ext.b94220dd.js +0 -4614
  164. package/dist/js/_ol-mapbox-style@8.2.1@ol-mapbox-style/_ol-mapbox-style@8.2.1@ol-mapbox-style.795310f3.js +0 -1
  165. package/dist/js/_ol@6.15.1@ol/_ol@6.15.1@ol.8fd0cbb5.js +0 -31823
  166. package/dist/js/_pbf@3.2.1@pbf/_pbf@3.2.1@pbf.330acf55.js +0 -647
  167. package/dist/js/_performance-now@2.1.0@performance-now/_performance-now@2.1.0@performance-now.a51379c2.js +0 -34
  168. package/dist/js/_point-in-polygon@1.1.0@point-in-polygon/_point-in-polygon@1.1.0@point-in-polygon.2cc4306e.js +0 -1
  169. package/dist/js/_polygon-clipping@0.15.3@polygon-clipping/_polygon-clipping@0.15.3@polygon-clipping.c0e9ec57.js +0 -1363
  170. package/dist/js/_proj4@2.8.0@proj4/_proj4@2.8.0@proj4.1600352c.js +0 -4885
  171. package/dist/js/_quickselect@1.1.1@quickselect/_quickselect@1.1.1@quickselect.8afce154.js +0 -1
  172. package/dist/js/_quickselect@2.0.0@quickselect/_quickselect@2.0.0@quickselect.9f5c1e48.js +0 -51
  173. package/dist/js/_raf@3.4.1@raf/_raf@3.4.1@raf.ac0d6c66.js +0 -60
  174. package/dist/js/_rbush@2.0.2@rbush/_rbush@2.0.2@rbush.7149e620.js +0 -1
  175. package/dist/js/_rbush@3.0.1@rbush/_rbush@3.0.1@rbush.57d33d95.js +0 -402
  176. package/dist/js/_regexp.prototype.flags@1.4.3@regexp.prototype.flags/_regexp.prototype.flags@1.4.3@regexp.prototype.flags.8b6921c6.js +0 -102
  177. package/dist/js/_rgbcolor@1.0.1@rgbcolor/_rgbcolor@1.0.1@rgbcolor.dd87e013.js +0 -272
  178. package/dist/js/_robust-predicates@2.0.4@robust-predicates/_robust-predicates@2.0.4@robust-predicates.564bf2f8.js +0 -1
  179. package/dist/js/_skmeans@0.9.7@skmeans/_skmeans@0.9.7@skmeans.933c6a76.js +0 -1
  180. package/dist/js/_splaytree@3.1.1@splaytree/_splaytree@3.1.1@splaytree.6cb55ed3.js +0 -671
  181. package/dist/js/_stackblur-canvas@2.5.0@stackblur-canvas/_stackblur-canvas@2.5.0@stackblur-canvas.dd883d14.js +0 -214
  182. package/dist/js/_svg-pathdata@6.0.3@svg-pathdata/_svg-pathdata@6.0.3@svg-pathdata.7e858a5f.js +0 -441
  183. package/dist/js/_tinyqueue@2.0.3@tinyqueue/_tinyqueue@2.0.3@tinyqueue.78918532.js +0 -73
  184. package/dist/js/_topojson-client@3.1.0@topojson-client/_topojson-client@3.1.0@topojson-client.aef4e2d5.js +0 -238
  185. package/dist/js/_topojson-server@3.0.1@topojson-server/_topojson-server@3.0.1@topojson-server.b521a412.js +0 -662
  186. package/dist/js/_turf-jsts@1.2.3@turf-jsts/_turf-jsts@1.2.3@turf-jsts.6ef42696.js +0 -18934
  187. package/dist/js/_web-worker@1.2.0@web-worker/_web-worker@1.2.0@web-worker.43288df7.js +0 -2
  188. package/dist/js/_wkt-parser@1.3.2@wkt-parser/_wkt-parser@1.3.2@wkt-parser.0e1cf374.js +0 -461
  189. package/dist/js/_xml-utils@1.2.0@xml-utils/_xml-utils@1.2.0@xml-utils.2a8ae655.js +0 -126
  190. package/dist/js/_yallist@4.0.0@yallist/_yallist@4.0.0@yallist.8350aafe.js +0 -363
  191. package/dist/js/_zrender@4.3.2@zrender/_zrender@4.3.2@zrender.1feea14d.js +0 -12455
  192. package/dist/mirage2d.es.js +0 -15894
@@ -1,263 +0,0 @@
1
- import { y as yallist } from "../_yallist@4.0.0@yallist/_yallist@4.0.0@yallist.8350aafe.js";
2
- const Yallist = yallist;
3
- const MAX = Symbol("max");
4
- const LENGTH = Symbol("length");
5
- const LENGTH_CALCULATOR = Symbol("lengthCalculator");
6
- const ALLOW_STALE = Symbol("allowStale");
7
- const MAX_AGE = Symbol("maxAge");
8
- const DISPOSE = Symbol("dispose");
9
- const NO_DISPOSE_ON_SET = Symbol("noDisposeOnSet");
10
- const LRU_LIST = Symbol("lruList");
11
- const CACHE = Symbol("cache");
12
- const UPDATE_AGE_ON_GET = Symbol("updateAgeOnGet");
13
- const naiveLength = () => 1;
14
- class LRUCache {
15
- constructor(options) {
16
- if (typeof options === "number")
17
- options = { max: options };
18
- if (!options)
19
- options = {};
20
- if (options.max && (typeof options.max !== "number" || options.max < 0))
21
- throw new TypeError("max must be a non-negative number");
22
- this[MAX] = options.max || Infinity;
23
- const lc = options.length || naiveLength;
24
- this[LENGTH_CALCULATOR] = typeof lc !== "function" ? naiveLength : lc;
25
- this[ALLOW_STALE] = options.stale || false;
26
- if (options.maxAge && typeof options.maxAge !== "number")
27
- throw new TypeError("maxAge must be a number");
28
- this[MAX_AGE] = options.maxAge || 0;
29
- this[DISPOSE] = options.dispose;
30
- this[NO_DISPOSE_ON_SET] = options.noDisposeOnSet || false;
31
- this[UPDATE_AGE_ON_GET] = options.updateAgeOnGet || false;
32
- this.reset();
33
- }
34
- set max(mL) {
35
- if (typeof mL !== "number" || mL < 0)
36
- throw new TypeError("max must be a non-negative number");
37
- this[MAX] = mL || Infinity;
38
- trim(this);
39
- }
40
- get max() {
41
- return this[MAX];
42
- }
43
- set allowStale(allowStale) {
44
- this[ALLOW_STALE] = !!allowStale;
45
- }
46
- get allowStale() {
47
- return this[ALLOW_STALE];
48
- }
49
- set maxAge(mA) {
50
- if (typeof mA !== "number")
51
- throw new TypeError("maxAge must be a non-negative number");
52
- this[MAX_AGE] = mA;
53
- trim(this);
54
- }
55
- get maxAge() {
56
- return this[MAX_AGE];
57
- }
58
- set lengthCalculator(lC) {
59
- if (typeof lC !== "function")
60
- lC = naiveLength;
61
- if (lC !== this[LENGTH_CALCULATOR]) {
62
- this[LENGTH_CALCULATOR] = lC;
63
- this[LENGTH] = 0;
64
- this[LRU_LIST].forEach((hit) => {
65
- hit.length = this[LENGTH_CALCULATOR](hit.value, hit.key);
66
- this[LENGTH] += hit.length;
67
- });
68
- }
69
- trim(this);
70
- }
71
- get lengthCalculator() {
72
- return this[LENGTH_CALCULATOR];
73
- }
74
- get length() {
75
- return this[LENGTH];
76
- }
77
- get itemCount() {
78
- return this[LRU_LIST].length;
79
- }
80
- rforEach(fn, thisp) {
81
- thisp = thisp || this;
82
- for (let walker = this[LRU_LIST].tail; walker !== null; ) {
83
- const prev = walker.prev;
84
- forEachStep(this, fn, walker, thisp);
85
- walker = prev;
86
- }
87
- }
88
- forEach(fn, thisp) {
89
- thisp = thisp || this;
90
- for (let walker = this[LRU_LIST].head; walker !== null; ) {
91
- const next = walker.next;
92
- forEachStep(this, fn, walker, thisp);
93
- walker = next;
94
- }
95
- }
96
- keys() {
97
- return this[LRU_LIST].toArray().map((k) => k.key);
98
- }
99
- values() {
100
- return this[LRU_LIST].toArray().map((k) => k.value);
101
- }
102
- reset() {
103
- if (this[DISPOSE] && this[LRU_LIST] && this[LRU_LIST].length) {
104
- this[LRU_LIST].forEach((hit) => this[DISPOSE](hit.key, hit.value));
105
- }
106
- this[CACHE] = /* @__PURE__ */ new Map();
107
- this[LRU_LIST] = new Yallist();
108
- this[LENGTH] = 0;
109
- }
110
- dump() {
111
- return this[LRU_LIST].map((hit) => isStale(this, hit) ? false : {
112
- k: hit.key,
113
- v: hit.value,
114
- e: hit.now + (hit.maxAge || 0)
115
- }).toArray().filter((h) => h);
116
- }
117
- dumpLru() {
118
- return this[LRU_LIST];
119
- }
120
- set(key, value, maxAge) {
121
- maxAge = maxAge || this[MAX_AGE];
122
- if (maxAge && typeof maxAge !== "number")
123
- throw new TypeError("maxAge must be a number");
124
- const now = maxAge ? Date.now() : 0;
125
- const len = this[LENGTH_CALCULATOR](value, key);
126
- if (this[CACHE].has(key)) {
127
- if (len > this[MAX]) {
128
- del(this, this[CACHE].get(key));
129
- return false;
130
- }
131
- const node = this[CACHE].get(key);
132
- const item = node.value;
133
- if (this[DISPOSE]) {
134
- if (!this[NO_DISPOSE_ON_SET])
135
- this[DISPOSE](key, item.value);
136
- }
137
- item.now = now;
138
- item.maxAge = maxAge;
139
- item.value = value;
140
- this[LENGTH] += len - item.length;
141
- item.length = len;
142
- this.get(key);
143
- trim(this);
144
- return true;
145
- }
146
- const hit = new Entry(key, value, len, now, maxAge);
147
- if (hit.length > this[MAX]) {
148
- if (this[DISPOSE])
149
- this[DISPOSE](key, value);
150
- return false;
151
- }
152
- this[LENGTH] += hit.length;
153
- this[LRU_LIST].unshift(hit);
154
- this[CACHE].set(key, this[LRU_LIST].head);
155
- trim(this);
156
- return true;
157
- }
158
- has(key) {
159
- if (!this[CACHE].has(key))
160
- return false;
161
- const hit = this[CACHE].get(key).value;
162
- return !isStale(this, hit);
163
- }
164
- get(key) {
165
- return get(this, key, true);
166
- }
167
- peek(key) {
168
- return get(this, key, false);
169
- }
170
- pop() {
171
- const node = this[LRU_LIST].tail;
172
- if (!node)
173
- return null;
174
- del(this, node);
175
- return node.value;
176
- }
177
- del(key) {
178
- del(this, this[CACHE].get(key));
179
- }
180
- load(arr) {
181
- this.reset();
182
- const now = Date.now();
183
- for (let l = arr.length - 1; l >= 0; l--) {
184
- const hit = arr[l];
185
- const expiresAt = hit.e || 0;
186
- if (expiresAt === 0)
187
- this.set(hit.k, hit.v);
188
- else {
189
- const maxAge = expiresAt - now;
190
- if (maxAge > 0) {
191
- this.set(hit.k, hit.v, maxAge);
192
- }
193
- }
194
- }
195
- }
196
- prune() {
197
- this[CACHE].forEach((value, key) => get(this, key, false));
198
- }
199
- }
200
- const get = (self, key, doUse) => {
201
- const node = self[CACHE].get(key);
202
- if (node) {
203
- const hit = node.value;
204
- if (isStale(self, hit)) {
205
- del(self, node);
206
- if (!self[ALLOW_STALE])
207
- return void 0;
208
- } else {
209
- if (doUse) {
210
- if (self[UPDATE_AGE_ON_GET])
211
- node.value.now = Date.now();
212
- self[LRU_LIST].unshiftNode(node);
213
- }
214
- }
215
- return hit.value;
216
- }
217
- };
218
- const isStale = (self, hit) => {
219
- if (!hit || !hit.maxAge && !self[MAX_AGE])
220
- return false;
221
- const diff = Date.now() - hit.now;
222
- return hit.maxAge ? diff > hit.maxAge : self[MAX_AGE] && diff > self[MAX_AGE];
223
- };
224
- const trim = (self) => {
225
- if (self[LENGTH] > self[MAX]) {
226
- for (let walker = self[LRU_LIST].tail; self[LENGTH] > self[MAX] && walker !== null; ) {
227
- const prev = walker.prev;
228
- del(self, walker);
229
- walker = prev;
230
- }
231
- }
232
- };
233
- const del = (self, node) => {
234
- if (node) {
235
- const hit = node.value;
236
- if (self[DISPOSE])
237
- self[DISPOSE](hit.key, hit.value);
238
- self[LENGTH] -= hit.length;
239
- self[CACHE].delete(hit.key);
240
- self[LRU_LIST].removeNode(node);
241
- }
242
- };
243
- class Entry {
244
- constructor(key, value, length, now, maxAge) {
245
- this.key = key;
246
- this.value = value;
247
- this.length = length;
248
- this.now = now;
249
- this.maxAge = maxAge || 0;
250
- }
251
- }
252
- const forEachStep = (self, fn, node, thisp) => {
253
- let hit = node.value;
254
- if (isStale(self, hit)) {
255
- del(self, node);
256
- if (!self[ALLOW_STALE])
257
- hit = void 0;
258
- }
259
- if (hit)
260
- fn.call(thisp, hit.value, hit.key, self);
261
- };
262
- var _lruCache_6_0_0_lruCache = LRUCache;
263
- export { _lruCache_6_0_0_lruCache as _ };
@@ -1,432 +0,0 @@
1
- var NUM_100K_SETS = 6;
2
- var SET_ORIGIN_COLUMN_LETTERS = "AJSAJS";
3
- var SET_ORIGIN_ROW_LETTERS = "AFAFAF";
4
- var A = 65;
5
- var I = 73;
6
- var O = 79;
7
- var V = 86;
8
- var Z = 90;
9
- var mgrs = {
10
- forward,
11
- inverse,
12
- toPoint
13
- };
14
- function forward(ll, accuracy) {
15
- accuracy = accuracy || 5;
16
- return encode(LLtoUTM({
17
- lat: ll[1],
18
- lon: ll[0]
19
- }), accuracy);
20
- }
21
- function inverse(mgrs2) {
22
- var bbox = UTMtoLL(decode(mgrs2.toUpperCase()));
23
- if (bbox.lat && bbox.lon) {
24
- return [bbox.lon, bbox.lat, bbox.lon, bbox.lat];
25
- }
26
- return [bbox.left, bbox.bottom, bbox.right, bbox.top];
27
- }
28
- function toPoint(mgrs2) {
29
- var bbox = UTMtoLL(decode(mgrs2.toUpperCase()));
30
- if (bbox.lat && bbox.lon) {
31
- return [bbox.lon, bbox.lat];
32
- }
33
- return [(bbox.left + bbox.right) / 2, (bbox.top + bbox.bottom) / 2];
34
- }
35
- function degToRad(deg) {
36
- return deg * (Math.PI / 180);
37
- }
38
- function radToDeg(rad) {
39
- return 180 * (rad / Math.PI);
40
- }
41
- function LLtoUTM(ll) {
42
- var Lat = ll.lat;
43
- var Long = ll.lon;
44
- var a = 6378137;
45
- var eccSquared = 669438e-8;
46
- var k0 = 0.9996;
47
- var LongOrigin;
48
- var eccPrimeSquared;
49
- var N, T, C, A2, M;
50
- var LatRad = degToRad(Lat);
51
- var LongRad = degToRad(Long);
52
- var LongOriginRad;
53
- var ZoneNumber;
54
- ZoneNumber = Math.floor((Long + 180) / 6) + 1;
55
- if (Long === 180) {
56
- ZoneNumber = 60;
57
- }
58
- if (Lat >= 56 && Lat < 64 && Long >= 3 && Long < 12) {
59
- ZoneNumber = 32;
60
- }
61
- if (Lat >= 72 && Lat < 84) {
62
- if (Long >= 0 && Long < 9) {
63
- ZoneNumber = 31;
64
- } else if (Long >= 9 && Long < 21) {
65
- ZoneNumber = 33;
66
- } else if (Long >= 21 && Long < 33) {
67
- ZoneNumber = 35;
68
- } else if (Long >= 33 && Long < 42) {
69
- ZoneNumber = 37;
70
- }
71
- }
72
- LongOrigin = (ZoneNumber - 1) * 6 - 180 + 3;
73
- LongOriginRad = degToRad(LongOrigin);
74
- eccPrimeSquared = eccSquared / (1 - eccSquared);
75
- N = a / Math.sqrt(1 - eccSquared * Math.sin(LatRad) * Math.sin(LatRad));
76
- T = Math.tan(LatRad) * Math.tan(LatRad);
77
- C = eccPrimeSquared * Math.cos(LatRad) * Math.cos(LatRad);
78
- A2 = Math.cos(LatRad) * (LongRad - LongOriginRad);
79
- M = a * ((1 - eccSquared / 4 - 3 * eccSquared * eccSquared / 64 - 5 * eccSquared * eccSquared * eccSquared / 256) * LatRad - (3 * eccSquared / 8 + 3 * eccSquared * eccSquared / 32 + 45 * eccSquared * eccSquared * eccSquared / 1024) * Math.sin(2 * LatRad) + (15 * eccSquared * eccSquared / 256 + 45 * eccSquared * eccSquared * eccSquared / 1024) * Math.sin(4 * LatRad) - 35 * eccSquared * eccSquared * eccSquared / 3072 * Math.sin(6 * LatRad));
80
- var UTMEasting = k0 * N * (A2 + (1 - T + C) * A2 * A2 * A2 / 6 + (5 - 18 * T + T * T + 72 * C - 58 * eccPrimeSquared) * A2 * A2 * A2 * A2 * A2 / 120) + 5e5;
81
- var UTMNorthing = k0 * (M + N * Math.tan(LatRad) * (A2 * A2 / 2 + (5 - T + 9 * C + 4 * C * C) * A2 * A2 * A2 * A2 / 24 + (61 - 58 * T + T * T + 600 * C - 330 * eccPrimeSquared) * A2 * A2 * A2 * A2 * A2 * A2 / 720));
82
- if (Lat < 0) {
83
- UTMNorthing += 1e7;
84
- }
85
- return {
86
- northing: Math.round(UTMNorthing),
87
- easting: Math.round(UTMEasting),
88
- zoneNumber: ZoneNumber,
89
- zoneLetter: getLetterDesignator(Lat)
90
- };
91
- }
92
- function UTMtoLL(utm) {
93
- var UTMNorthing = utm.northing;
94
- var UTMEasting = utm.easting;
95
- var zoneLetter = utm.zoneLetter;
96
- var zoneNumber = utm.zoneNumber;
97
- if (zoneNumber < 0 || zoneNumber > 60) {
98
- return null;
99
- }
100
- var k0 = 0.9996;
101
- var a = 6378137;
102
- var eccSquared = 669438e-8;
103
- var eccPrimeSquared;
104
- var e1 = (1 - Math.sqrt(1 - eccSquared)) / (1 + Math.sqrt(1 - eccSquared));
105
- var N1, T1, C1, R1, D, M;
106
- var LongOrigin;
107
- var mu, phi1Rad;
108
- var x = UTMEasting - 5e5;
109
- var y = UTMNorthing;
110
- if (zoneLetter < "N") {
111
- y -= 1e7;
112
- }
113
- LongOrigin = (zoneNumber - 1) * 6 - 180 + 3;
114
- eccPrimeSquared = eccSquared / (1 - eccSquared);
115
- M = y / k0;
116
- mu = M / (a * (1 - eccSquared / 4 - 3 * eccSquared * eccSquared / 64 - 5 * eccSquared * eccSquared * eccSquared / 256));
117
- phi1Rad = mu + (3 * e1 / 2 - 27 * e1 * e1 * e1 / 32) * Math.sin(2 * mu) + (21 * e1 * e1 / 16 - 55 * e1 * e1 * e1 * e1 / 32) * Math.sin(4 * mu) + 151 * e1 * e1 * e1 / 96 * Math.sin(6 * mu);
118
- N1 = a / Math.sqrt(1 - eccSquared * Math.sin(phi1Rad) * Math.sin(phi1Rad));
119
- T1 = Math.tan(phi1Rad) * Math.tan(phi1Rad);
120
- C1 = eccPrimeSquared * Math.cos(phi1Rad) * Math.cos(phi1Rad);
121
- R1 = a * (1 - eccSquared) / Math.pow(1 - eccSquared * Math.sin(phi1Rad) * Math.sin(phi1Rad), 1.5);
122
- D = x / (N1 * k0);
123
- var lat = phi1Rad - N1 * Math.tan(phi1Rad) / R1 * (D * D / 2 - (5 + 3 * T1 + 10 * C1 - 4 * C1 * C1 - 9 * eccPrimeSquared) * D * D * D * D / 24 + (61 + 90 * T1 + 298 * C1 + 45 * T1 * T1 - 252 * eccPrimeSquared - 3 * C1 * C1) * D * D * D * D * D * D / 720);
124
- lat = radToDeg(lat);
125
- var lon = (D - (1 + 2 * T1 + C1) * D * D * D / 6 + (5 - 2 * C1 + 28 * T1 - 3 * C1 * C1 + 8 * eccPrimeSquared + 24 * T1 * T1) * D * D * D * D * D / 120) / Math.cos(phi1Rad);
126
- lon = LongOrigin + radToDeg(lon);
127
- var result;
128
- if (utm.accuracy) {
129
- var topRight = UTMtoLL({
130
- northing: utm.northing + utm.accuracy,
131
- easting: utm.easting + utm.accuracy,
132
- zoneLetter: utm.zoneLetter,
133
- zoneNumber: utm.zoneNumber
134
- });
135
- result = {
136
- top: topRight.lat,
137
- right: topRight.lon,
138
- bottom: lat,
139
- left: lon
140
- };
141
- } else {
142
- result = {
143
- lat,
144
- lon
145
- };
146
- }
147
- return result;
148
- }
149
- function getLetterDesignator(lat) {
150
- var LetterDesignator = "Z";
151
- if (84 >= lat && lat >= 72) {
152
- LetterDesignator = "X";
153
- } else if (72 > lat && lat >= 64) {
154
- LetterDesignator = "W";
155
- } else if (64 > lat && lat >= 56) {
156
- LetterDesignator = "V";
157
- } else if (56 > lat && lat >= 48) {
158
- LetterDesignator = "U";
159
- } else if (48 > lat && lat >= 40) {
160
- LetterDesignator = "T";
161
- } else if (40 > lat && lat >= 32) {
162
- LetterDesignator = "S";
163
- } else if (32 > lat && lat >= 24) {
164
- LetterDesignator = "R";
165
- } else if (24 > lat && lat >= 16) {
166
- LetterDesignator = "Q";
167
- } else if (16 > lat && lat >= 8) {
168
- LetterDesignator = "P";
169
- } else if (8 > lat && lat >= 0) {
170
- LetterDesignator = "N";
171
- } else if (0 > lat && lat >= -8) {
172
- LetterDesignator = "M";
173
- } else if (-8 > lat && lat >= -16) {
174
- LetterDesignator = "L";
175
- } else if (-16 > lat && lat >= -24) {
176
- LetterDesignator = "K";
177
- } else if (-24 > lat && lat >= -32) {
178
- LetterDesignator = "J";
179
- } else if (-32 > lat && lat >= -40) {
180
- LetterDesignator = "H";
181
- } else if (-40 > lat && lat >= -48) {
182
- LetterDesignator = "G";
183
- } else if (-48 > lat && lat >= -56) {
184
- LetterDesignator = "F";
185
- } else if (-56 > lat && lat >= -64) {
186
- LetterDesignator = "E";
187
- } else if (-64 > lat && lat >= -72) {
188
- LetterDesignator = "D";
189
- } else if (-72 > lat && lat >= -80) {
190
- LetterDesignator = "C";
191
- }
192
- return LetterDesignator;
193
- }
194
- function encode(utm, accuracy) {
195
- var seasting = "00000" + utm.easting, snorthing = "00000" + utm.northing;
196
- return utm.zoneNumber + utm.zoneLetter + get100kID(utm.easting, utm.northing, utm.zoneNumber) + seasting.substr(seasting.length - 5, accuracy) + snorthing.substr(snorthing.length - 5, accuracy);
197
- }
198
- function get100kID(easting, northing, zoneNumber) {
199
- var setParm = get100kSetForZone(zoneNumber);
200
- var setColumn = Math.floor(easting / 1e5);
201
- var setRow = Math.floor(northing / 1e5) % 20;
202
- return getLetter100kID(setColumn, setRow, setParm);
203
- }
204
- function get100kSetForZone(i) {
205
- var setParm = i % NUM_100K_SETS;
206
- if (setParm === 0) {
207
- setParm = NUM_100K_SETS;
208
- }
209
- return setParm;
210
- }
211
- function getLetter100kID(column, row, parm) {
212
- var index = parm - 1;
213
- var colOrigin = SET_ORIGIN_COLUMN_LETTERS.charCodeAt(index);
214
- var rowOrigin = SET_ORIGIN_ROW_LETTERS.charCodeAt(index);
215
- var colInt = colOrigin + column - 1;
216
- var rowInt = rowOrigin + row;
217
- var rollover = false;
218
- if (colInt > Z) {
219
- colInt = colInt - Z + A - 1;
220
- rollover = true;
221
- }
222
- if (colInt === I || colOrigin < I && colInt > I || (colInt > I || colOrigin < I) && rollover) {
223
- colInt++;
224
- }
225
- if (colInt === O || colOrigin < O && colInt > O || (colInt > O || colOrigin < O) && rollover) {
226
- colInt++;
227
- if (colInt === I) {
228
- colInt++;
229
- }
230
- }
231
- if (colInt > Z) {
232
- colInt = colInt - Z + A - 1;
233
- }
234
- if (rowInt > V) {
235
- rowInt = rowInt - V + A - 1;
236
- rollover = true;
237
- } else {
238
- rollover = false;
239
- }
240
- if (rowInt === I || rowOrigin < I && rowInt > I || (rowInt > I || rowOrigin < I) && rollover) {
241
- rowInt++;
242
- }
243
- if (rowInt === O || rowOrigin < O && rowInt > O || (rowInt > O || rowOrigin < O) && rollover) {
244
- rowInt++;
245
- if (rowInt === I) {
246
- rowInt++;
247
- }
248
- }
249
- if (rowInt > V) {
250
- rowInt = rowInt - V + A - 1;
251
- }
252
- var twoLetter = String.fromCharCode(colInt) + String.fromCharCode(rowInt);
253
- return twoLetter;
254
- }
255
- function decode(mgrsString) {
256
- if (mgrsString && mgrsString.length === 0) {
257
- throw "MGRSPoint coverting from nothing";
258
- }
259
- var length = mgrsString.length;
260
- var hunK = null;
261
- var sb = "";
262
- var testChar;
263
- var i = 0;
264
- while (!/[A-Z]/.test(testChar = mgrsString.charAt(i))) {
265
- if (i >= 2) {
266
- throw "MGRSPoint bad conversion from: " + mgrsString;
267
- }
268
- sb += testChar;
269
- i++;
270
- }
271
- var zoneNumber = parseInt(sb, 10);
272
- if (i === 0 || i + 3 > length) {
273
- throw "MGRSPoint bad conversion from: " + mgrsString;
274
- }
275
- var zoneLetter = mgrsString.charAt(i++);
276
- if (zoneLetter <= "A" || zoneLetter === "B" || zoneLetter === "Y" || zoneLetter >= "Z" || zoneLetter === "I" || zoneLetter === "O") {
277
- throw "MGRSPoint zone letter " + zoneLetter + " not handled: " + mgrsString;
278
- }
279
- hunK = mgrsString.substring(i, i += 2);
280
- var set = get100kSetForZone(zoneNumber);
281
- var east100k = getEastingFromChar(hunK.charAt(0), set);
282
- var north100k = getNorthingFromChar(hunK.charAt(1), set);
283
- while (north100k < getMinNorthing(zoneLetter)) {
284
- north100k += 2e6;
285
- }
286
- var remainder = length - i;
287
- if (remainder % 2 !== 0) {
288
- throw "MGRSPoint has to have an even number \nof digits after the zone letter and two 100km letters - front \nhalf for easting meters, second half for \nnorthing meters" + mgrsString;
289
- }
290
- var sep = remainder / 2;
291
- var sepEasting = 0;
292
- var sepNorthing = 0;
293
- var accuracyBonus, sepEastingString, sepNorthingString, easting, northing;
294
- if (sep > 0) {
295
- accuracyBonus = 1e5 / Math.pow(10, sep);
296
- sepEastingString = mgrsString.substring(i, i + sep);
297
- sepEasting = parseFloat(sepEastingString) * accuracyBonus;
298
- sepNorthingString = mgrsString.substring(i + sep);
299
- sepNorthing = parseFloat(sepNorthingString) * accuracyBonus;
300
- }
301
- easting = sepEasting + east100k;
302
- northing = sepNorthing + north100k;
303
- return {
304
- easting,
305
- northing,
306
- zoneLetter,
307
- zoneNumber,
308
- accuracy: accuracyBonus
309
- };
310
- }
311
- function getEastingFromChar(e, set) {
312
- var curCol = SET_ORIGIN_COLUMN_LETTERS.charCodeAt(set - 1);
313
- var eastingValue = 1e5;
314
- var rewindMarker = false;
315
- while (curCol !== e.charCodeAt(0)) {
316
- curCol++;
317
- if (curCol === I) {
318
- curCol++;
319
- }
320
- if (curCol === O) {
321
- curCol++;
322
- }
323
- if (curCol > Z) {
324
- if (rewindMarker) {
325
- throw "Bad character: " + e;
326
- }
327
- curCol = A;
328
- rewindMarker = true;
329
- }
330
- eastingValue += 1e5;
331
- }
332
- return eastingValue;
333
- }
334
- function getNorthingFromChar(n, set) {
335
- if (n > "V") {
336
- throw "MGRSPoint given invalid Northing " + n;
337
- }
338
- var curRow = SET_ORIGIN_ROW_LETTERS.charCodeAt(set - 1);
339
- var northingValue = 0;
340
- var rewindMarker = false;
341
- while (curRow !== n.charCodeAt(0)) {
342
- curRow++;
343
- if (curRow === I) {
344
- curRow++;
345
- }
346
- if (curRow === O) {
347
- curRow++;
348
- }
349
- if (curRow > V) {
350
- if (rewindMarker) {
351
- throw "Bad character: " + n;
352
- }
353
- curRow = A;
354
- rewindMarker = true;
355
- }
356
- northingValue += 1e5;
357
- }
358
- return northingValue;
359
- }
360
- function getMinNorthing(zoneLetter) {
361
- var northing;
362
- switch (zoneLetter) {
363
- case "C":
364
- northing = 11e5;
365
- break;
366
- case "D":
367
- northing = 2e6;
368
- break;
369
- case "E":
370
- northing = 28e5;
371
- break;
372
- case "F":
373
- northing = 37e5;
374
- break;
375
- case "G":
376
- northing = 46e5;
377
- break;
378
- case "H":
379
- northing = 55e5;
380
- break;
381
- case "J":
382
- northing = 64e5;
383
- break;
384
- case "K":
385
- northing = 73e5;
386
- break;
387
- case "L":
388
- northing = 82e5;
389
- break;
390
- case "M":
391
- northing = 91e5;
392
- break;
393
- case "N":
394
- northing = 0;
395
- break;
396
- case "P":
397
- northing = 8e5;
398
- break;
399
- case "Q":
400
- northing = 17e5;
401
- break;
402
- case "R":
403
- northing = 26e5;
404
- break;
405
- case "S":
406
- northing = 35e5;
407
- break;
408
- case "T":
409
- northing = 44e5;
410
- break;
411
- case "U":
412
- northing = 53e5;
413
- break;
414
- case "V":
415
- northing = 62e5;
416
- break;
417
- case "W":
418
- northing = 7e6;
419
- break;
420
- case "X":
421
- northing = 79e5;
422
- break;
423
- default:
424
- northing = -1;
425
- }
426
- if (northing >= 0) {
427
- return northing;
428
- } else {
429
- throw "Invalid zone letter: " + zoneLetter;
430
- }
431
- }
432
- export { forward as f, mgrs as m, toPoint as t };