earthsdk3 3.4.0-beta.7 → 3.4.0-beta.8

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 (253) hide show
  1. package/dist/earthsdk3.iife.js +55 -119
  2. package/dist/earthsdk3.js +22515 -26765
  3. package/dist/earthsdk3.umd.cjs +56 -120
  4. package/dist/types/ESJTypes/properties/index.d.ts +7 -5
  5. package/dist/types/ESJTypes/properties/index.d.ts.map +1 -1
  6. package/dist/types/ESJTypes/props/ColorProperty.d.ts.map +1 -1
  7. package/dist/types/ESJTypes/props/ColorRgbProperty.d.ts.map +1 -1
  8. package/dist/types/ESJTypes/props/DashPatternProperty.d.ts.map +1 -1
  9. package/dist/types/ESJTypes/props/DateProperty.d.ts.map +1 -1
  10. package/dist/types/ESJTypes/props/DatesProperty.d.ts.map +1 -1
  11. package/dist/types/ESJTypes/props/EnumProperty.d.ts +1 -1
  12. package/dist/types/ESJTypes/props/EnumProperty.d.ts.map +1 -1
  13. package/dist/types/ESJTypes/props/EnumStringsProperty.d.ts +1 -1
  14. package/dist/types/ESJTypes/props/EnumStringsProperty.d.ts.map +1 -1
  15. package/dist/types/ESJTypes/props/EvalStringProperty.d.ts +1 -1
  16. package/dist/types/ESJTypes/props/EvalStringProperty.d.ts.map +1 -1
  17. package/dist/types/ESJTypes/props/FunctionProperty.d.ts +1 -1
  18. package/dist/types/ESJTypes/props/FunctionProperty.d.ts.map +1 -1
  19. package/dist/types/ESJTypes/props/GroupProperty.d.ts +1 -1
  20. package/dist/types/ESJTypes/props/GroupProperty.d.ts.map +1 -1
  21. package/dist/types/ESJTypes/props/JsonProperty.d.ts +1 -1
  22. package/dist/types/ESJTypes/props/JsonProperty.d.ts.map +1 -1
  23. package/dist/types/ESJTypes/props/LongStringProperty.d.ts +1 -1
  24. package/dist/types/ESJTypes/props/LongStringProperty.d.ts.map +1 -1
  25. package/dist/types/ESJTypes/props/NativeProperty.d.ts.map +1 -1
  26. package/dist/types/ESJTypes/props/NonreactiveJsonStringProperty.d.ts +1 -1
  27. package/dist/types/ESJTypes/props/NonreactiveJsonStringProperty.d.ts.map +1 -1
  28. package/dist/types/ESJTypes/props/NumberSliderProperty.d.ts +1 -1
  29. package/dist/types/ESJTypes/props/NumberSliderProperty.d.ts.map +1 -1
  30. package/dist/types/ESJTypes/props/ParamsProperty.d.ts +3 -3
  31. package/dist/types/ESJTypes/props/ParamsProperty.d.ts.map +1 -1
  32. package/dist/types/ESJTypes/props/PlayerProperty.d.ts +1 -1
  33. package/dist/types/ESJTypes/props/PlayerProperty.d.ts.map +1 -1
  34. package/dist/types/ESJTypes/props/ReactVarProperty.d.ts +1 -1
  35. package/dist/types/ESJTypes/props/ReactVarProperty.d.ts.map +1 -1
  36. package/dist/types/ESJTypes/props/RotationProperty.d.ts.map +1 -1
  37. package/dist/types/ESJTypes/props/ViewPlayerProperty.d.ts +1 -1
  38. package/dist/types/ESJTypes/props/ViewPlayerProperty.d.ts.map +1 -1
  39. package/dist/types/ESObjectManager/index.d.ts.map +1 -1
  40. package/dist/types/ESObjects/base/ESGeoVector.d.ts +36 -66
  41. package/dist/types/ESObjects/base/ESGeoVector.d.ts.map +1 -1
  42. package/dist/types/ESObjects/base/ESLabel.d.ts +25 -56
  43. package/dist/types/ESObjects/base/ESLabel.d.ts.map +1 -1
  44. package/dist/types/ESObjects/base/ESLocalVector.d.ts +26 -131
  45. package/dist/types/ESObjects/base/ESLocalVector.d.ts.map +1 -1
  46. package/dist/types/ESObjects/base/ESLocalVector2D.d.ts +2 -74
  47. package/dist/types/ESObjects/base/ESLocalVector2D.d.ts.map +1 -1
  48. package/dist/types/ESObjects/base/ESObjectWithLocation.d.ts +32 -55
  49. package/dist/types/ESObjects/base/ESObjectWithLocation.d.ts.map +1 -1
  50. package/dist/types/ESObjects/base/ESSceneObject/index.d.ts +66 -58
  51. package/dist/types/ESObjects/base/ESSceneObject/index.d.ts.map +1 -1
  52. package/dist/types/ESObjects/base/ESTestObject.d.ts +21 -0
  53. package/dist/types/ESObjects/base/ESTestObject.d.ts.map +1 -0
  54. package/dist/types/ESObjects/base/ESVisualObject.d.ts +41 -51
  55. package/dist/types/ESObjects/base/ESVisualObject.d.ts.map +1 -1
  56. package/dist/types/ESObjects/base/index.d.ts +1 -0
  57. package/dist/types/ESObjects/base/index.d.ts.map +1 -1
  58. package/dist/types/ESObjects/general/ES3DTileset/index.d.ts +16 -202
  59. package/dist/types/ESObjects/general/ES3DTileset/index.d.ts.map +1 -1
  60. package/dist/types/ESObjects/general/ESAlarm.d.ts +7 -75
  61. package/dist/types/ESObjects/general/ESAlarm.d.ts.map +1 -1
  62. package/dist/types/ESObjects/general/ESApertureEffect.d.ts +9 -80
  63. package/dist/types/ESObjects/general/ESApertureEffect.d.ts.map +1 -1
  64. package/dist/types/ESObjects/general/ESAreaMeasurement.d.ts +9 -75
  65. package/dist/types/ESObjects/general/ESAreaMeasurement.d.ts.map +1 -1
  66. package/dist/types/ESObjects/general/ESBlastParticleSystem.d.ts +8 -80
  67. package/dist/types/ESObjects/general/ESBlastParticleSystem.d.ts.map +1 -1
  68. package/dist/types/ESObjects/general/ESBoxClipping.d.ts +4 -79
  69. package/dist/types/ESObjects/general/ESBoxClipping.d.ts.map +1 -1
  70. package/dist/types/ESObjects/general/ESCameraView.d.ts +9 -79
  71. package/dist/types/ESObjects/general/ESCameraView.d.ts.map +1 -1
  72. package/dist/types/ESObjects/general/ESCameraViewCollection/index.d.ts +17 -62
  73. package/dist/types/ESObjects/general/ESCameraViewCollection/index.d.ts.map +1 -1
  74. package/dist/types/ESObjects/general/ESCameraVisibleRange.d.ts +7 -86
  75. package/dist/types/ESObjects/general/ESCameraVisibleRange.d.ts.map +1 -1
  76. package/dist/types/ESObjects/general/ESCar.d.ts +9 -76
  77. package/dist/types/ESObjects/general/ESCar.d.ts.map +1 -1
  78. package/dist/types/ESObjects/general/ESCityBasePoint.d.ts +10 -62
  79. package/dist/types/ESObjects/general/ESCityBasePoint.d.ts.map +1 -1
  80. package/dist/types/ESObjects/general/ESClassification.d.ts +8 -75
  81. package/dist/types/ESObjects/general/ESClassification.d.ts.map +1 -1
  82. package/dist/types/ESObjects/general/ESClippingPlane.d.ts +10 -96
  83. package/dist/types/ESObjects/general/ESClippingPlane.d.ts.map +1 -1
  84. package/dist/types/ESObjects/general/ESCustomDiv/index.d.ts +7 -65
  85. package/dist/types/ESObjects/general/ESCustomDiv/index.d.ts.map +1 -1
  86. package/dist/types/ESObjects/general/ESCzml.d.ts +53 -133
  87. package/dist/types/ESObjects/general/ESCzml.d.ts.map +1 -1
  88. package/dist/types/ESObjects/general/ESDataMesh.d.ts +13 -100
  89. package/dist/types/ESObjects/general/ESDataMesh.d.ts.map +1 -1
  90. package/dist/types/ESObjects/general/ESDatasmithRuntimeModel.d.ts +7 -89
  91. package/dist/types/ESObjects/general/ESDatasmithRuntimeModel.d.ts.map +1 -1
  92. package/dist/types/ESObjects/general/ESDirectionMeasurement.d.ts +11 -83
  93. package/dist/types/ESObjects/general/ESDirectionMeasurement.d.ts.map +1 -1
  94. package/dist/types/ESObjects/general/ESDistanceMeasurement.d.ts +5 -83
  95. package/dist/types/ESObjects/general/ESDistanceMeasurement.d.ts.map +1 -1
  96. package/dist/types/ESObjects/general/ESDynamicWater.d.ts +7 -116
  97. package/dist/types/ESObjects/general/ESDynamicWater.d.ts.map +1 -1
  98. package/dist/types/ESObjects/general/ESEntityCluster.d.ts +10 -83
  99. package/dist/types/ESObjects/general/ESEntityCluster.d.ts.map +1 -1
  100. package/dist/types/ESObjects/general/ESExcavate.d.ts +10 -79
  101. package/dist/types/ESObjects/general/ESExcavate.d.ts.map +1 -1
  102. package/dist/types/ESObjects/general/ESFireParticleSystem.d.ts +8 -72
  103. package/dist/types/ESObjects/general/ESFireParticleSystem.d.ts.map +1 -1
  104. package/dist/types/ESObjects/general/ESForestTileset.d.ts +18 -84
  105. package/dist/types/ESObjects/general/ESForestTileset.d.ts.map +1 -1
  106. package/dist/types/ESObjects/general/ESGaussianSplatting.d.ts +21 -88
  107. package/dist/types/ESObjects/general/ESGaussianSplatting.d.ts.map +1 -1
  108. package/dist/types/ESObjects/general/ESGeoDiv/index.d.ts +9 -94
  109. package/dist/types/ESObjects/general/ESGeoDiv/index.d.ts.map +1 -1
  110. package/dist/types/ESObjects/general/ESGeoDivTextPoi.d.ts +27 -144
  111. package/dist/types/ESObjects/general/ESGeoDivTextPoi.d.ts.map +1 -1
  112. package/dist/types/ESObjects/general/ESGeoExtrudedPolygon.d.ts +15 -84
  113. package/dist/types/ESObjects/general/ESGeoExtrudedPolygon.d.ts.map +1 -1
  114. package/dist/types/ESObjects/general/ESGeoJson/index.d.ts +15 -189
  115. package/dist/types/ESObjects/general/ESGeoJson/index.d.ts.map +1 -1
  116. package/dist/types/ESObjects/general/ESGeoLineString.d.ts +9 -70
  117. package/dist/types/ESObjects/general/ESGeoLineString.d.ts.map +1 -1
  118. package/dist/types/ESObjects/general/ESGeoPoints/index.d.ts +10 -34
  119. package/dist/types/ESObjects/general/ESGeoPoints/index.d.ts.map +1 -1
  120. package/dist/types/ESObjects/general/ESGeoPolygon.d.ts +11 -72
  121. package/dist/types/ESObjects/general/ESGeoPolygon.d.ts.map +1 -1
  122. package/dist/types/ESObjects/general/ESGeoRectangle.d.ts +14 -82
  123. package/dist/types/ESObjects/general/ESGeoRectangle.d.ts.map +1 -1
  124. package/dist/types/ESObjects/general/ESGeoWater.d.ts +9 -110
  125. package/dist/types/ESObjects/general/ESGeoWater.d.ts.map +1 -1
  126. package/dist/types/ESObjects/general/ESGltfModel.d.ts +18 -135
  127. package/dist/types/ESObjects/general/ESGltfModel.d.ts.map +1 -1
  128. package/dist/types/ESObjects/general/ESHeatMap/index.d.ts +13 -47
  129. package/dist/types/ESObjects/general/ESHeatMap/index.d.ts.map +1 -1
  130. package/dist/types/ESObjects/general/ESHeightLimitAnalysis.d.ts +20 -77
  131. package/dist/types/ESObjects/general/ESHeightLimitAnalysis.d.ts.map +1 -1
  132. package/dist/types/ESObjects/general/ESHeightMeasurement.d.ts +8 -70
  133. package/dist/types/ESObjects/general/ESHeightMeasurement.d.ts.map +1 -1
  134. package/dist/types/ESObjects/general/ESHole.d.ts +18 -71
  135. package/dist/types/ESObjects/general/ESHole.d.ts.map +1 -1
  136. package/dist/types/ESObjects/general/ESHuman.d.ts +15 -99
  137. package/dist/types/ESObjects/general/ESHuman.d.ts.map +1 -1
  138. package/dist/types/ESObjects/general/ESHumanPoi.d.ts +6 -100
  139. package/dist/types/ESObjects/general/ESHumanPoi.d.ts.map +1 -1
  140. package/dist/types/ESObjects/general/ESImageLabel.d.ts +10 -104
  141. package/dist/types/ESObjects/general/ESImageLabel.d.ts.map +1 -1
  142. package/dist/types/ESObjects/general/ESImageryLayer/index.d.ts +4 -168
  143. package/dist/types/ESObjects/general/ESImageryLayer/index.d.ts.map +1 -1
  144. package/dist/types/ESObjects/general/ESLevelRuntimeModel.d.ts +5 -83
  145. package/dist/types/ESObjects/general/ESLevelRuntimeModel.d.ts.map +1 -1
  146. package/dist/types/ESObjects/general/ESLocalCircle.d.ts +14 -85
  147. package/dist/types/ESObjects/general/ESLocalCircle.d.ts.map +1 -1
  148. package/dist/types/ESObjects/general/ESLocalPolygon.d.ts +7 -85
  149. package/dist/types/ESObjects/general/ESLocalPolygon.d.ts.map +1 -1
  150. package/dist/types/ESObjects/general/ESLocalPolygonZ.d.ts +20 -57
  151. package/dist/types/ESObjects/general/ESLocalPolygonZ.d.ts.map +1 -1
  152. package/dist/types/ESObjects/general/ESLocalRectangle.d.ts +14 -76
  153. package/dist/types/ESObjects/general/ESLocalRectangle.d.ts.map +1 -1
  154. package/dist/types/ESObjects/general/ESLocalSkyBox.d.ts +9 -94
  155. package/dist/types/ESObjects/general/ESLocalSkyBox.d.ts.map +1 -1
  156. package/dist/types/ESObjects/general/ESLocationMeasurement.d.ts +0 -78
  157. package/dist/types/ESObjects/general/ESLocationMeasurement.d.ts.map +1 -1
  158. package/dist/types/ESObjects/general/ESMsTileset/index.d.ts +1 -158
  159. package/dist/types/ESObjects/general/ESMsTileset/index.d.ts.map +1 -1
  160. package/dist/types/ESObjects/general/ESNavigator.d.ts +12 -57
  161. package/dist/types/ESObjects/general/ESNavigator.d.ts.map +1 -1
  162. package/dist/types/ESObjects/general/ESParticleSystemPrimitive.d.ts +17 -242
  163. package/dist/types/ESObjects/general/ESParticleSystemPrimitive.d.ts.map +1 -1
  164. package/dist/types/ESObjects/general/ESPath/ESPathImpl/computeRotIfUndefined.d.ts.map +1 -1
  165. package/dist/types/ESObjects/general/ESPath/ESPathImpl/getCurrent.d.ts.map +1 -1
  166. package/dist/types/ESObjects/general/ESPath/ESPathImpl/index.d.ts +1 -3
  167. package/dist/types/ESObjects/general/ESPath/ESPathImpl/index.d.ts.map +1 -1
  168. package/dist/types/ESObjects/general/ESPath/index.d.ts +10 -100
  169. package/dist/types/ESObjects/general/ESPath/index.d.ts.map +1 -1
  170. package/dist/types/ESObjects/general/ESPipeFence.d.ts +11 -85
  171. package/dist/types/ESObjects/general/ESPipeFence.d.ts.map +1 -1
  172. package/dist/types/ESObjects/general/ESPipeline.d.ts +9 -94
  173. package/dist/types/ESObjects/general/ESPipeline.d.ts.map +1 -1
  174. package/dist/types/ESObjects/general/ESPipeserTileset.d.ts +21 -90
  175. package/dist/types/ESObjects/general/ESPipeserTileset.d.ts.map +1 -1
  176. package/dist/types/ESObjects/general/ESPit.d.ts +16 -116
  177. package/dist/types/ESObjects/general/ESPit.d.ts.map +1 -1
  178. package/dist/types/ESObjects/general/ESPlayer/index.d.ts +12 -52
  179. package/dist/types/ESObjects/general/ESPlayer/index.d.ts.map +1 -1
  180. package/dist/types/ESObjects/general/ESPoi2D.d.ts +8 -109
  181. package/dist/types/ESObjects/general/ESPoi2D.d.ts.map +1 -1
  182. package/dist/types/ESObjects/general/ESPoi3D.d.ts +7 -90
  183. package/dist/types/ESObjects/general/ESPoi3D.d.ts.map +1 -1
  184. package/dist/types/ESObjects/general/ESPoiTileset.d.ts +13 -73
  185. package/dist/types/ESObjects/general/ESPoiTileset.d.ts.map +1 -1
  186. package/dist/types/ESObjects/general/ESPolygonFence.d.ts +27 -107
  187. package/dist/types/ESObjects/general/ESPolygonFence.d.ts.map +1 -1
  188. package/dist/types/ESObjects/general/ESPolygonFlattenedPlane.d.ts +12 -72
  189. package/dist/types/ESObjects/general/ESPolygonFlattenedPlane.d.ts.map +1 -1
  190. package/dist/types/ESObjects/general/ESPolygonWithHole.d.ts +10 -78
  191. package/dist/types/ESObjects/general/ESPolygonWithHole.d.ts.map +1 -1
  192. package/dist/types/ESObjects/general/ESRectangle.d.ts +18 -132
  193. package/dist/types/ESObjects/general/ESRectangle.d.ts.map +1 -1
  194. package/dist/types/ESObjects/general/ESRtsFeatureEditing/index.d.ts +6 -115
  195. package/dist/types/ESObjects/general/ESRtsFeatureEditing/index.d.ts.map +1 -1
  196. package/dist/types/ESObjects/general/ESRtsTileset/index.d.ts +15 -109
  197. package/dist/types/ESObjects/general/ESRtsTileset/index.d.ts.map +1 -1
  198. package/dist/types/ESObjects/general/ESScale.d.ts +12 -58
  199. package/dist/types/ESObjects/general/ESScale.d.ts.map +1 -1
  200. package/dist/types/ESObjects/general/ESSeparateFoliage/index.d.ts +16 -70
  201. package/dist/types/ESObjects/general/ESSeparateFoliage/index.d.ts.map +1 -1
  202. package/dist/types/ESObjects/general/ESSkylineAnalysis/index.d.ts +18 -86
  203. package/dist/types/ESObjects/general/ESSkylineAnalysis/index.d.ts.map +1 -1
  204. package/dist/types/ESObjects/general/ESStaticMesh.d.ts +5 -66
  205. package/dist/types/ESObjects/general/ESStaticMesh.d.ts.map +1 -1
  206. package/dist/types/ESObjects/general/ESSubmergingAnalysis/index.d.ts +8 -131
  207. package/dist/types/ESObjects/general/ESSubmergingAnalysis/index.d.ts.map +1 -1
  208. package/dist/types/ESObjects/general/ESSubmergingAnalysis/parseGlb.d.ts.map +1 -1
  209. package/dist/types/ESObjects/general/ESSunshineAnalysis/index.d.ts +21 -87
  210. package/dist/types/ESObjects/general/ESSunshineAnalysis/index.d.ts.map +1 -1
  211. package/dist/types/ESObjects/general/ESSurfaceAreaMeasurement.d.ts +20 -91
  212. package/dist/types/ESObjects/general/ESSurfaceAreaMeasurement.d.ts.map +1 -1
  213. package/dist/types/ESObjects/general/ESTerrainLayer.d.ts +7 -105
  214. package/dist/types/ESObjects/general/ESTerrainLayer.d.ts.map +1 -1
  215. package/dist/types/ESObjects/general/ESTextLabel.d.ts +10 -180
  216. package/dist/types/ESObjects/general/ESTextLabel.d.ts.map +1 -1
  217. package/dist/types/ESObjects/general/ESUEWidget.d.ts +20 -128
  218. package/dist/types/ESObjects/general/ESUEWidget.d.ts.map +1 -1
  219. package/dist/types/ESObjects/general/ESUnrealActor.d.ts +8 -70
  220. package/dist/types/ESObjects/general/ESUnrealActor.d.ts.map +1 -1
  221. package/dist/types/ESObjects/general/ESVideoFusion.d.ts +10 -110
  222. package/dist/types/ESObjects/general/ESVideoFusion.d.ts.map +1 -1
  223. package/dist/types/ESObjects/general/ESViewShed.d.ts +11 -97
  224. package/dist/types/ESObjects/general/ESViewShed.d.ts.map +1 -1
  225. package/dist/types/ESObjects/general/ESViewerStatusBar.d.ts +15 -58
  226. package/dist/types/ESObjects/general/ESViewerStatusBar.d.ts.map +1 -1
  227. package/dist/types/ESObjects/general/ESViewerStatusBarScale.d.ts +12 -72
  228. package/dist/types/ESObjects/general/ESViewerStatusBarScale.d.ts.map +1 -1
  229. package/dist/types/ESObjects/general/ESVisibilityAnalysis.d.ts +6 -84
  230. package/dist/types/ESObjects/general/ESVisibilityAnalysis.d.ts.map +1 -1
  231. package/dist/types/ESObjects/general/ESVolumeMeasurement.d.ts +20 -109
  232. package/dist/types/ESObjects/general/ESVolumeMeasurement.d.ts.map +1 -1
  233. package/dist/types/ESObjects/general/ESWidget.d.ts +4 -120
  234. package/dist/types/ESObjects/general/ESWidget.d.ts.map +1 -1
  235. package/dist/types/ESViewer/ESViewer.d.ts +12 -6
  236. package/dist/types/ESViewer/ESViewer.d.ts.map +1 -1
  237. package/dist/types/ESViewer/GeneralAnalysis/RollerShutterAnalysis.d.ts.map +1 -1
  238. package/dist/types/EngineObject/EngineObjectsContext.d.ts +3 -3
  239. package/dist/types/EngineObject/EngineObjectsContext.d.ts.map +1 -1
  240. package/dist/types/EngineObject/index.d.ts.map +1 -1
  241. package/dist/types/utils/SceneTrees/SceneTreeItem.d.ts.map +1 -1
  242. package/dist/types/utils/SceneTrees/SceneTreeItemDragDrop.d.ts.map +1 -1
  243. package/dist/types/utils/SceneTrees/defaultLight122FromEnvironmentMapManager.d.ts.map +1 -1
  244. package/dist/types/utils/SceneTrees/defaultShowSceneObject.d.ts.map +1 -1
  245. package/dist/types/utils/base/bindCustomEditing.d.ts +2 -2
  246. package/dist/types/utils/base/bindCustomEditing.d.ts.map +1 -1
  247. package/dist/types/utils/components/WatcherTools/toolsForWatcher.d.ts.map +1 -1
  248. package/dist/types/utils/proj4/getDistancesFromPositions.d.ts.map +1 -1
  249. package/dist/types/utils/proj4/getXyzFromPostion.d.ts.map +1 -1
  250. package/dist/types/utils/proj4/lbhToXyz.d.ts.map +1 -1
  251. package/dist/types/utils/registerCreatedEventUpdate.d.ts.map +1 -1
  252. package/dist/types/utils/turf/geoMidpoint.d.ts.map +1 -1
  253. package/package.json +2 -2
@@ -1,9 +1,9 @@
1
- (function(P,c){typeof exports=="object"&&typeof module<"u"?c(exports,require("xbsj-base"),require("@turf/turf"),require("proj4")):typeof define=="function"&&define.amd?define(["exports","xbsj-base","@turf/turf","proj4"],c):(P=typeof globalThis<"u"?globalThis:P||self,c(P.EarthSDK3={},P.xbsj_base,P.turf,P.proj4))})(this,function(P,c,ja,xh){"use strict";var L0=Object.defineProperty;var A0=(P,c,ja)=>c in P?L0(P,c,{enumerable:!0,configurable:!0,writable:!0,value:ja}):P[c]=ja;var d=(P,c,ja)=>A0(P,typeof c!="symbol"?c+"":c,ja);function Kp(n){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(n){for(const t in n)if(t!=="default"){const r=Object.getOwnPropertyDescriptor(n,t);Object.defineProperty(e,t,r.get?r:{enumerable:!0,get:()=>n[t]})}}return e.default=n,Object.freeze(e)}const yc=Kp(ja);class Qp extends c.Destroyable{constructor(){super(...arguments);d(this,"registerEngines",{})}register(t,r,i){const s=this.registerEngines[t]||new Map;s.has(r)&&console.warn(`register warn:${t}中${r}的实现类已经被注册,再次注册会覆盖。`),s.set(r,i),this.registerEngines[t]=s}getEngineObjConstructor(t,r){const s=(this.registerEngines[r]||new Map).get(t);if(s)return s;console.warn(`未找到${t}在${r}中对应的实现类!`)}createEngineObject(t,r){const i=this.getEngineObjConstructor(t.typeName,r.typeName);if(i){const s=new i(t,r);return s.createdEvent.emit(),s}else{const s=new Hs(t,r);return s.createdEvent.emit(),s}}}class Bp extends c.Destroyable{constructor(){super(...arguments);d(this,"registerEngines",{})}register(t,r,i){const s=this.registerEngines[t]||new Map;s.has(r)&&console.warn(`register warn:${t}中${r}的实现类已经被注册,再次注册会覆盖。`),s.set(r,i),this.registerEngines[t]=s}getEngineObjConstructor(t,r){const s=(this.registerEngines[r]||new Map).get(t);if(s)return s;console.warn(`未找到${t}在${r}中对应的实现类!`)}createEngineObject(t,r){const i=this.getEngineObjConstructor(t.typeName,r.typeName);if(i){const s=new i(t,r);return s.createdEvent.emit(),s}else{const s=new Hs(t,r);return s.createdEvent.emit(),s}}}const In=class In extends c.Destroyable{constructor(t,r,i=!1){super();d(this,"_createdEvent",this.dv(new c.Event));d(this,"_id",++In._accumId);this._sceneObject=t,this._viewer=r;{if(i)return;t.viewer=r,t.viewerChanged.emit(r);const s=(o,a)=>{for(let l of o)this._viewer.delete(l);for(let l of a)this._viewer.add(l)};s([],this._sceneObject.components.values()),this.d(this._sceneObject.components.toChange.don(s)),this.d(()=>s(this._sceneObject.components.values(),[]))}}get createdEvent(){return this._createdEvent}get sceneObject(){return this._sceneObject}get viewer(){return this._viewer}get id(){return this._id}};d(In,"context",new Qp),d(In,"contextEditing",new Bp),d(In,"register",In.context.register.bind(In.context)),d(In,"registerEditing",In.contextEditing.register.bind(In.contextEditing)),d(In,"_accumId",-1);let Hs=In;const vc=class vc extends c.Destroyable{constructor(t,r){super();d(this,"_id",++vc._accumId);this._name=t,this._description=r}get id(){return this._id}get name(){return this._name}get description(){return this._description}};d(vc,"_accumId",-1);let cs=vc;class _c extends cs{constructor(e,t,r,i,s){super(e,t),this._withUndefined=r,this._readonly=i,this._defaultValue=s}get withUndefined(){return this._withUndefined}get readonly(){return this._readonly}get defaultValue(){return this._defaultValue instanceof Function?this._defaultValue():this._defaultValue}}class Ee extends _c{constructor(e,t,r,i,s,o){super(e,t,r,i,o),this._reactVar=s}get reactVar(){return this._reactVar}}class F extends Ee{get type(){return"BooleanProperty"}}class Z extends Ee{get type(){return"StringProperty"}}class S extends Ee{get type(){return"NumberProperty"}}class $p extends Ee{get type(){return"MaximumScreenSpaceErrorProperty"}}class Lh extends Ee{get type(){return"StringsProperty"}}class jp extends Ee{get type(){return"NumbersProperty"}}class eg extends Ee{get type(){return"BooleansProperty"}}class tg extends Ee{get type(){return"String2Property"}}class rg extends Ee{get type(){return"String3Property"}}class ng extends Ee{get type(){return"String4Property"}}class Ah extends Ee{get type(){return"String2sProperty"}}class ig extends Ee{get type(){return"String3sProperty"}}class sg extends Ee{get type(){return"String4sProperty"}}class ze extends Ee{get type(){return"Number2Property"}}class It extends Ee{get type(){return"Number3Property"}}class or extends Ee{get type(){return"Number4Property"}}class og extends Ee{get type(){return"Number4WithUndefinedProperty"}}class Rh extends Ee{get type(){return"Number2sProperty"}}class wc extends Ee{get type(){return"Number3sProperty"}}class ag extends Ee{get type(){return"Number4sProperty"}}class lg extends Ee{get type(){return"Boolean2Property"}}class ug extends Ee{get type(){return"Boolean3Property"}}class cg extends Ee{get type(){return"Boolean4Property"}}class hg extends Ee{get type(){return"Boolean2sProperty"}}class fg extends Ee{get type(){return"Boolean3sProperty"}}class dg extends Ee{get type(){return"Boolean4sProperty"}}class pg extends Ee{get type(){return"StringNumberProperty"}}class gg extends Ee{get type(){return"StringNumbersProperty"}}class J extends or{get type(){return"ColorProperty"}}class mg extends It{get type(){return"ColorRgbProperty"}}class vg extends S{get type(){return"DashPatternProperty"}}class H extends Ee{constructor(e,t,r,i,s,o,a){super(e,t,r,i,s,a),this._enums=o}get type(){return"EnumProperty"}get enums(){return this._enums}}class yg extends Ee{constructor(e,t,r,i,s,o,a){super(e,t,r,i,s,a),this._enums=o}get type(){return"EnumStringsProperty"}get enums(){return this._enums}}class ni extends Ee{constructor(e,t,r,i,s,o,a){super(e,t,r,i,s,o),this._sampleValue=a}get sampleValue(){return this._sampleValue}get type(){return"EvalStringProperty"}}class Fh extends Ee{constructor(e,t,r,i,s){super(e,t,!1,!1,r,s),this._paramTypes=i}get type(){return"ParamsProperty"}get paramTypes(){return this._paramTypes}}class ie extends cs{constructor(t,r,i,s,o){super(t,r);d(this,"_paramsProperty");d(this,"_getValueFunc");this._func=s;const a=this.disposeVar(c.reactJson(o));this._paramsProperty=this.disposeVar(new Fh(t+"_params",t+"_params",a,i,o));const[l]=c.getReactFuncs(this._paramsProperty.reactVar);this._getValueFunc=l}get paramsProperty(){return this._paramsProperty}exec(){this._func(...this._getValueFunc())}get type(){return"FunctionProperty"}}class z extends cs{constructor(e,t,r){super(e,t),this._children=r}get type(){return"GroupProperty"}get children(){return this._children}}class U extends Ee{constructor(e,t,r,i,s,o,a){super(e,t,r,i,s,o),this._sampleValue=a}get sampleValue(){return this._sampleValue}get type(){return"JsonProperty"}}class wu extends Ee{constructor(e,t,r,i,s,o,a){super(e,t,r,i,s,o),this._sampleValue=a}get sampleValue(){return this._sampleValue}get type(){return"LongStringProperty"}}class _g extends ze{get type(){return"MinmaxProperty"}}class wg extends or{get type(){return"NearFarScalerProperty"}}class kh extends _c{constructor(e,t,r,i,s,o,a){super(e,t,r,i,a),this._getJsonStringFunc=s,this._setJsonStringFunc=o}get type(){return"NonreactiveJsonStringProperty"}get getJsonStringFunc(){return this._getJsonStringFunc}get setJsonStringFunc(){return this._setJsonStringFunc}}class Eg extends ze{get type(){return"NumberRangeProperty"}}class Me extends Ee{constructor(e,t,r,i,s,o,a,l){super(e,t,r,i,s,l),this._step=o,this._minMax=a}get type(){return"NumberSliderProperty"}get minMax(){return this._minMax}get step(){return this._step}}function Sg(n,e){const[t,r,i]=c.getReactFuncs(n),[s,o,a]=c.getReactFuncs(e),l=c.react((t()??0)/(s()??3e3)),u=()=>{const h=l.value,f=s()??3e3,p=t()??0;if(!Number.isFinite(f)||!Number.isFinite(p)){console.warn(`duration || currentTime error: duration: ${f} currentTime: ${p}`);return}Math.abs(h*f-p)<.001||(f<=0?l.value=0:l.value=p/f)};return l.dispose(i.disposableOn(u)),l.dispose(a.disposableOn(u)),l.dispose(l.changed.disposableOn(()=>{const h=l.value,f=s()??3e3,p=t()??0;if(!Number.isFinite(f)||!Number.isFinite(p)){console.warn(`duration || currentTime error: duration: ${f} currentTime: ${p}`);return}Math.abs(h*f-p)<.001||r(h*f)})),l}class Eu extends cs{constructor(t,r,i,s,o,a){super(t,r);d(this,"_defaults",{playing:!1,ratio:0,loop:!1});this._playingReact=i,this._ratioReact=s,this._loopReact=o,a&&(this._defaults.playing=a.playing??this._defaults.playing,this._defaults.ratio=a.ratio??this._defaults.ratio,this._defaults.loop=a.loop??this._defaults.loop)}get type(){return"PlayerProperty"}get playingReact(){return this._playingReact}get ratioReact(){return this._ratioReact}get loopReact(){return this._loopReact}get defaults(){return this._defaults}}d(Eu,"createPlayingRatio",Sg);class Nn extends It{get type(){return"PositionProperty"}}class Vh extends Ee{get type(){return"PositionsProperty"}}class Cg extends Ee{get type(){return"PositionsSetPropety"}}class Su extends It{get type(){return"RotationProperty"}}class Vl extends Z{get type(){return"UriProperty"}}class zh extends cs{constructor(t,r,i,s,o,a){super(t,r);d(this,"_defaults",{playing:!1,loop:!1});this._playingReact=i,this._stopFn=s,this._loopReact=o,a&&(this._defaults.playing=a.playing??this._defaults.playing,this._defaults.loop=a.loop??this._defaults.loop)}get type(){return"ViewPlayerProperty"}get playingReact(){return this._playingReact}get loopReact(){return this._loopReact}get stopFn(){return this._stopFn}get defaults(){return this._defaults}}class Ec extends Ee{get type(){return"DatesProperty"}}class ii extends Ee{get type(){return"DateProperty"}}var se=(n=>(n.Place="place",n.Translation="translation",n.Rotation="rotation",n.Scale="scale",n.DoublePointsAppend="doublePointsAppend",n.DoublePointsModify="doublePointsModify",n.CircularAppend="circularAppend",n.CircularInsert="circularInsert",n.LineStringAppend="lineStringAppend",n.LineStringInsert="lineStringInsert",n.ScatterAppend="scatterAppend",n.ScatterModify="scatterModify",n.VisibilityAppend="visibilityAppend",n.VisibilityModify="visibilityModify",n.HeightModify="heightModify",n))(se||{}),Uh=(n=>(n.DECIMAL_DEGREE="DECIMAL_DEGREE",n.DEGREES_DECIMAL_MINUTES="DEGREES_DECIMAL_MINUTES",n.SEXAGESIMAL_DEGREE="SEXAGESIMAL_DEGREE",n))(Uh||{});class Pg{constructor(e){this.childPickedInfo=e}}class Ig{constructor(e,t,r,i,s,o){this.pickResult=e,this.sceneObject=t,this.tilesetPickInfo=r,this.geojsonPickInfo=i,this.attachedInfo=s,this.screenPosition=o}assign(e){e!=null&&e.pickedResult&&(this.pickResult=e.pickedResult),e!=null&&e.sceneObject&&(this.sceneObject=e.sceneObject),e!=null&&e.tilesetPickInfo&&(this.tilesetPickInfo=e.tilesetPickInfo),e!=null&&e.geojsonPickInfo&&(this.geojsonPickInfo=e.geojsonPickInfo),e!=null&&e.attachedInfo&&(this.attachedInfo=e.attachedInfo),e!=null&&e.screenPosition&&(this.screenPosition=e.screenPosition)}}class Tg extends c.Destroyable{constructor(t){super();d(this,"_sceneObjRefs",new Map);d(this,"_refs",{});d(this,"_refsChanged",this.dv(new c.Event));const r=(i,s,o)=>{if(o){const a=this.getLastSceneObject(o),l=this._sceneObjRefs.get(o);if(!l)console.warn(`this._sceneObjRefs中不存在ref(${o}), 可能系统存在逻辑问题`);else{const h=l.indexOf(i);h===-1?console.warn(`this._sceneObjRefs中不存在当前对象(id: ${i.id} type: ${i.typeName})!可能系统存在逻辑问题`):(l.splice(h,1),l.length===0&&this._sceneObjRefs.delete(o))}const u=this.getLastSceneObject(o);this._refs[o]=u,this._refsChanged.emit(u,a)}if(s){const a=this.getLastSceneObject(s),l=this._sceneObjRefs.get(s);l?(l.push(i),l.length>0&&console.warn(`同时存在多个ref${s}相同的场景对象!
2
- ${l.map(h=>`${h.id} ${h.typeName}
3
- `).join(" ")}`)):this._sceneObjRefs.set(s,[i]);const u=this.getLastSceneObject(s);this._refs[s]=u,this._refsChanged.emit(u,a)}};this.d(t.sceneObjCreatedEvent.don(i=>{const s=(o,a)=>r(i,o,a);i.ref&&s(i.ref,void 0),i.refChanged.don(s)})),this.d(t.sceneObjToDestroyEvent.don(i=>{i.ref&&r(i,void 0,i.ref)}))}get sceneObjRefs(){return this._sceneObjRefs}get refs(){return this._refs}get refsChanged(){return this._refsChanged}getLastSceneObject(t){const r=this.getSceneObjects(t);if(r)return r[r.length-1]}getSceneObjects(t){const r=this._sceneObjRefs.get(t);if(!(!r||r.length===0))return r}}function Gh(n,e){const[t,r,i]=c.getReactFuncs(n),s=c.react(void 0),o=()=>{const a=t()??e;s.value=a&&j.context.getStrFromEnv(a)};return o(),i&&s.d(i.don(o)),s.d(j.context.environmentVariablesChanged.don(o)),s}function Wh(n){const e=/\${(.*?)\}/g;if(!e.test(n))return n;const t=n.replace(e,(r,i)=>{const s=j.context.getEnv(i);return s===void 0?(console.warn(`环境变量(${i})不存在,无法进行转换`),"{env-error}"):s});return Wh(t)}class Dg extends c.Destroyable{constructor(){super();d(this,"_esObjConstructors",new Map);d(this,"_sceneObjs",new Map);d(this,"_sceneObjCreatedEvent",new c.Event);d(this,"_sceneObjToDestroyEvent",new c.Event);d(this,"_refsManager",this.dv(new Tg(this)));d(this,"_environmentVariables",window.ESSDK_ENV||{});d(this,"_environmentVariablesChanged",this.dv(new c.Event))}get typeNames(){return this._esObjConstructors.keys()}get sceneObjs(){return this._sceneObjs.values()}get sceneObjCreatedEvent(){return this._sceneObjCreatedEvent}get sceneObjToDestroyEvent(){return this._sceneObjToDestroyEvent}get refsManager(){return this._refsManager}get $refs(){return this._refsManager.refs}register(t,r,i){return this._esObjConstructors.has(t)&&console.warn(`register warn: ${t} has registered ! will be override!`),this._esObjConstructors.set(t,r),i&&c.setExtProp(r,"__sceneObjExtraInfo",i),t}_addSceneObject(t){this._sceneObjs.set(t.id,t),this._sceneObjCreatedEvent.emit(t),t.d(()=>this._deleteSceneObject(t))}addSceneObject(t){this._addSceneObject(t)}_deleteSceneObject(t){this._sceneObjToDestroyEvent.emit(t),this._sceneObjs.delete(t.id)}deleteSceneObject(t){this._deleteSceneObject(t)}createSceneObjectFromClass(t,r){if(!r||this._sceneObjs.has(r)){const s=c.createGuid();r&&console.warn(`已存在相同id的对象!id自动变更!${r} -> ${s} 请注意:id变更可能导致引用失效!`),r=s}if(!r)throw new Error("id不能为空!");const i=new t(r);return i.id!==r&&(console.warn(`sceneObj.id(${i.id}) !== id(${r}) sceneObjectType: ${i.typeName}`),console.warn("出现这种问题有可能是自定义的场景对象,没有在构造函数中传递id参数!示例如下:"),console.warn("class XXX extends XXX { constructor(id) { super(id); } }")),this._addSceneObject(i),i}createSceneObject(t,r){if(typeof t=="string"){const i=this._getSceneObjConstructor(t);if(!i){console.warn(`Cannot find SceneObjectType: ${t}`);return}return this.createSceneObjectFromClass(i,r)}else return this.createSceneObjectFromClass(t,r)}createSceneObjectFromJson(t){const r=this.createSceneObject(t.type,t.id);return r&&(r.json=t),r}destroySceneObject(t){return this._deleteSceneObject(t),t.destroy(),t.isDestroyed()}getSceneObjectById(t){return this._sceneObjs.get(t)}getSceneObject(t){if(!t&&t!="")return Array.from(this._sceneObjs.values());if(t.startsWith("ES")){const r=[];for(const i of this._sceneObjs.values())i.typeName===t&&r.push(i);return r}else return this._sceneObjs.get(t)}_getSceneObjConstructor(t){const r=this._esObjConstructors.get(t);if(r)return r}getProps(t){const r=this._getSceneObjConstructor(t);if(!r){console.warn(`cannot get constructor from type: ${t}`);return}return c.getExtProp(r,"__sceneObjExtraInfo")}setProps(t,r){const i=this._getSceneObjConstructor(t);if(!i){console.warn(`cannot get constructor from type: ${t}`);return}let s=c.getExtProp(i,"__sceneObjExtraInfo");s||(s={},c.setExtProp(i,"__sceneObjExtraInfo",s)),Object.assign(s,r)}getProp(t,r){const i=this.getProps(t);return i&&i[r]}setProp(t,r,i){this.setProps(t,{[r]:i})}get environmentVariables(){return this._environmentVariables}set environmentVariables(t){for(let[r,i]of Object.entries(t))this.setEnv(r,i)}get environmentVariablesChanged(){return this._environmentVariablesChanged}setEnv(t,r){if(this._environmentVariables[t]!==r){const i=this._environmentVariables[t];this._environmentVariables[t]=r,this._environmentVariablesChanged.emit(t,r,i)}window.ESSDK_ENV={...this._environmentVariables}}getEnv(t){return this._environmentVariables[t]}getStrFromEnv(t){return Wh(t)}createEnvStrReact(t,r){return Gh(t,r)}createEvnStrReact(t,r){return Gh(t,r)}}const me=class me extends c.Destroyable{constructor(t){super();d(this,"_components",this.dv(new c.ObservableSet));d(this,"_viewerAttached",this.dv(new c.Event));d(this,"_viewerDetached",this.dv(new c.Event));d(this,"_attachedViewers",(()=>{const t=new Set;return this.d(this._viewerAttached.don(r=>{t.add(r)})),this.d(this._viewerDetached.don(r=>{t.delete(r)})),t})());d(this,"_createdEvent",this.dv(new c.Event));d(this,"_flushEvent",this.dv(new c.Event));d(this,"_id");d(this,"viewer");d(this,"viewerChanged",this.ad(new c.Event));d(this,"combinationClass",!1);d(this,"mainClass");d(this,"_updateFuncReact",this.dv(c.react(void 0)));d(this,"_toDestroyFuncReact",this.dv(c.react(void 0)));d(this,"_parentID",this.disposeVar(c.react(void 0)));t!==void 0&&(typeof t!="string"?console.warn(`对象id必须是字符串类型,当前id的类型是${typeof t},值为${t}`):t.trim()===""?console.warn("场景对象创建时的id不能是空字符串!"):t.trim()!==t&&console.warn(`id前后有空字符串!id: ${t}`)),this._id=t??c.createGuid(),this._initName();{const r=()=>{if(this.execOnceFuncStr)try{Function(`"use strict";return (${this.execOnceFuncStr})`)()(this)}catch(i){console.warn(`execOnceFuncStr不能转成函数!或者函数执行时错误!id: ${this.id} ${this.typeName} error: ${i}`)}};r(),this.d(this.execOnceFuncStrChanged.don(r))}{const r=()=>{if(this.updateFuncStr)try{this.updateFunc=Function(`"use strict";return (${this.updateFuncStr})`)()}catch(s){console.warn(`updateFuncStr不能转成函数!或者函数执行时错误!id: ${this.id} ${this.typeName} error: ${s}`)}};r(),this.d(this.updateFuncStrChanged.don(r));let i;this.d(()=>i&&i.destroy()),this.d(this.updateFuncChanged.don(()=>{i&&i.cancel(),this.updateFunc&&(i=i||c.createAnimateFrame(),i.restart(void 0,s=>{this.updateFunc&&this.updateFunc(this,s)}))}))}{const r=()=>{try{this.toDestroyFunc=this.toDestroyFuncStr&&Function(`"use strict";return (${this.toDestroyFuncStr})`)()||void 0}catch(i){console.warn(`toDestroyFuncStr不能转成函数!或者函数执行时错误!id: ${this.id} ${this.typeName} error: ${i}`),this.toDestroyFunc=void 0}};r(),this.d(this.toDestroyFuncStrChanged.don(r)),this.d(this.toDestroyEvent.don(()=>{this.toDestroyFunc&&this.toDestroyFunc(this)}))}}static get envs(){return me.context.environmentVariables}static get $refs(){return me.context.refsManager.refs}get components(){return this._components}get viewerAttached(){return this._viewerAttached}get viewerDetached(){return this._viewerDetached}get attachedViewers(){return this._attachedViewers}removefromViewer(t){this.attachedViewers.has(t)&&t.delete(this)}addToViewer(t){this.attachedViewers.has(t)||t.add(this)}registerAttachedObject(t){const r=new Map;this.d(()=>{r.size>0&&console.warn("viewerPropSceneObjects.size > 0")}),this.d(this._viewerAttached.don(i=>{const s=t(i);s&&r.set(i,s)})),this.d(this._viewerDetached.don(i=>{if(!r.has(i))return;const s=r.get(i);s&&(s.destroy(),r.delete(i))}))}createAttachedObject(t){const r=new Map,i=()=>{for(let[l,u]of r.entries())u.destroy();r.clear()},s=l=>{const u=t(l);u&&r.set(l,u)};for(let l of this.attachedViewers)s(l);const o=this._viewerAttached.don(s),a=this._viewerDetached.don(l=>{if(!r.has(l))return;const u=r.get(l);u&&(u.destroy(),r.delete(l))});return()=>{a(),o(),i()}}registerAttachedObjectForContainer(t){this.registerAttachedObject(r=>new Ng(r,t))}get createdEvent(){return this._createdEvent}get flushEvent(){return this._flushEvent}flush(){this.flushEvent.emit()}get id(){return this._id}_initName(){this.name=`${this.typeName}_${(""+this.id).slice(-4)}`}get defaultProps(){return me.createDefaultProps()}getMainClass(){return this.mainClass??this}_innerGetJson(t=!0){const r={id:this.id,type:this.typeName};for(let i of Object.keys(this.defaultProps))if(t){let s,o=this.defaultProps[i];o instanceof c.ReactiveVariable?s=o.equals(this[i]):s=o===this[i],s||(r[i]=this[i])}else r[i]=this[i];return r}_innerSetJson(t,r,i){if(!(t instanceof Object)||t.type&&t.type!==this.typeName){console.error(`value.type && value.type${t.type} !== this.typeName${this.typeName}`);return}t.id&&t.id!==this.id&&console.warn(`value.id === undefined || value.id${t.id} !== this.id(${this.id})`);const s=r||[];s.push("id","type");const o=Object.keys(this.defaultProps).filter(a=>!s.includes(a));for(let a of o)if(a in t)this[a]=t[a]===null?void 0:t[a];else if(!(i??!1)){let l=this.defaultProps[a];l instanceof c.ReactiveVariable&&(l=l.value),this[a]=l}}get json(){return this._innerGetJson()}set json(t){this._innerSetJson(t)}get _jsonStr(){return JSON.stringify(this.json,null,4)}set _jsonStr(t){this._innerSetJson(JSON.parse(t))}get updateFunc(){return this._updateFuncReact.value}set updateFunc(t){this._updateFuncReact.value=t}get updateFuncChanged(){return this._updateFuncReact.changed}get toDestroyFunc(){return this._toDestroyFuncReact.value}set toDestroyFunc(t){this._toDestroyFuncReact.value=t}get toDestroyFuncChanged(){return this._toDestroyFuncReact.changed}get parentID(){return this._parentID.value}set parentID(t){this._parentID.value=t}get parentIDChanged(){return this._parentID.changed}getProperties(t){return[new z("ESSceneObject","ESSceneObject",[new Z("对象类型","类型(type)",!1,!0,[this,"typeName"]),new Z("对象id","唯一标识符(id)",!1,!0,[this,"id"]),new Z("对象名称","名称(name)",!1,!1,[this,"name"]),new Z("ref","标识(ref),可通过 ESSceneObject.$refs.xxx快速获取到对象",!0,!1,[this,"ref"]),new U("extras","扩展属性,必须整体赋值(extras)",!0,!1,[this,"extras"]),new kh("JSON","对象JSON数据动态更改导入导出。",!1,!1,()=>this._jsonStr,r=>r&&(this._jsonStr=r))])]}getESProperties(){return{defaultMenu:"basic",basic:[],general:[],dataSource:[],location:[],coordinate:[],style:[]}}};d(me,"context",new Dg),d(me,"register",me.context.register.bind(me.context)),d(me,"create",me.context.createSceneObject.bind(me.context)),d(me,"createFromClass",me.context.createSceneObjectFromClass.bind(me.context)),d(me,"createFromJson",me.context.createSceneObjectFromJson.bind(me.context)),d(me,"destroySceneObject",me.context.destroySceneObject.bind(me.context)),d(me,"getSceneObjById",me.context.getSceneObjectById.bind(me.context)),d(me,"getSceneObj",me.context.getSceneObject.bind(me.context)),d(me,"getEnv",me.context.getEnv.bind(me.context)),d(me,"setEnv",me.context.setEnv.bind(me.context)),d(me,"getStrFromEnv",me.context.getStrFromEnv.bind(me.context)),d(me,"getSceneObjectById",me.context.getSceneObjectById.bind(me.context)),d(me,"getSceneObject",me.context.getSceneObject.bind(me.context)),d(me,"defaults",{}),d(me,"createDefaultProps",()=>({name:"未命名场景对象",ref:void 0,extras:c.reactJson(void 0),devTags:c.reactArrayWithUndefined(void 0),execOnceFuncStr:void 0,updateFuncStr:void 0,toDestroyFuncStr:void 0}));let j=me;c.extendClassProps(j.prototype,j.createDefaultProps);class Ng extends c.Destroyable{constructor(e,t){super(),this.dv(new c.ObjResettingWithEvent(e.subContainerChanged,()=>{if(e.subContainer)return t(e,e.subContainer)}))}}function Sc(n){return c.reactDeepArrayWithUndefined(n,(e,t)=>e[0]===t[0]&&e[1]===t[1],e=>[...e])}function qh(n,e){const t=new Array;for(let r of n)t.push(e(r));return t}function Cc(n,e){return n===void 0&&e===void 0?!0:!n||!e?!1:n[0]===e[0]&&n[1]===e[1]&&n[2]===e[2]}function bg(n,e){(n[0][0]!==n[n.length-1][0]||n[0][1]!==n[n.length-1][1])&&n.push(n[0]);const t=yc.point(e),r=yc.polygon([n]);return yc.booleanPointInPolygon(t,r)}var Ut=63710088e-1,Xh={centimeters:Ut*100,centimetres:Ut*100,degrees:Ut/111325,feet:Ut*3.28084,inches:Ut*39.37,kilometers:Ut/1e3,kilometres:Ut/1e3,meters:Ut,metres:Ut,miles:Ut/1609.344,millimeters:Ut*1e3,millimetres:Ut*1e3,nauticalmiles:Ut/1852,radians:1,yards:Ut*1.0936};function bn(n,e,t){t===void 0&&(t={});var r={type:"Feature"};return(t.id===0||t.id)&&(r.id=t.id),t.bbox&&(r.bbox=t.bbox),r.properties=e||{},r.geometry=n,r}function Xe(n,e,t){if(t===void 0&&(t={}),!n)throw new Error("coordinates is required");if(!Array.isArray(n))throw new Error("coordinates must be an Array");if(n.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!Hh(n[0])||!Hh(n[1]))throw new Error("coordinates must contain numbers");var r={type:"Point",coordinates:n};return bn(r,e,t)}function ar(n,e,t){t===void 0&&(t={});for(var r=0,i=n;r<i.length;r++){var s=i[r];if(s.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");for(var o=0;o<s[s.length-1].length;o++)if(s[s.length-1][o]!==s[0][o])throw new Error("First and last Position are not equivalent.")}var a={type:"Polygon",coordinates:n};return bn(a,e,t)}function On(n,e,t){if(t===void 0&&(t={}),n.length<2)throw new Error("coordinates must be an array of two or more positions");var r={type:"LineString",coordinates:n};return bn(r,e,t)}function el(n,e){e===void 0&&(e={});var t={type:"FeatureCollection"};return e.id&&(t.id=e.id),e.bbox&&(t.bbox=e.bbox),t.features=n,t}function Pc(n,e,t){t===void 0&&(t={});var r={type:"MultiPolygon",coordinates:n};return bn(r,e,t)}function Ic(n,e){e===void 0&&(e="kilometers");var t=Xh[e];if(!t)throw new Error(e+" units is invalid");return n*t}function Tc(n,e){e===void 0&&(e="kilometers");var t=Xh[e];if(!t)throw new Error(e+" units is invalid");return n/t}function Cu(n){var e=n%(2*Math.PI);return e*180/Math.PI}function $t(n){var e=n%360;return e*Math.PI/180}function Dc(n,e,t){if(e===void 0&&(e="kilometers"),t===void 0&&(t="kilometers"),!(n>=0))throw new Error("length must be a positive number");return Ic(Tc(n,e),t)}function Hh(n){return!isNaN(n)&&n!==null&&!Array.isArray(n)}function lr(n){if(!n)throw new Error("coord is required");if(!Array.isArray(n)){if(n.type==="Feature"&&n.geometry!==null&&n.geometry.type==="Point")return n.geometry.coordinates;if(n.type==="Point")return n.coordinates}if(Array.isArray(n)&&n.length>=2&&!Array.isArray(n[0])&&!Array.isArray(n[1]))return n;throw new Error("coord must be GeoJSON Point or an Array of numbers")}function Ys(n){if(Array.isArray(n))return n;if(n.type==="Feature"){if(n.geometry!==null)return n.geometry.coordinates}else if(n.coordinates)return n.coordinates;throw new Error("coords must be GeoJSON Feature, Geometry Object or an Array")}function Yh(n,e,t){if(!n)throw new Error("No feature passed");if(!t)throw new Error(".featureOf() requires a name");if(!n||n.type!=="Feature"||!n.geometry)throw new Error("Invalid input to "+t+", Feature with geometry required");if(!n.geometry||n.geometry.type!==e)throw new Error("Invalid input to "+t+": must be a "+e+", given "+n.geometry.type)}function Wr(n){return n.type==="Feature"?n.geometry:n}function Og(n,e){return n.type==="FeatureCollection"?"FeatureCollection":n.type==="GeometryCollection"?"GeometryCollection":n.type==="Feature"&&n.geometry!==null?n.geometry.type:n.type}function zl(n,e,t){if(t===void 0&&(t={}),t.final===!0)return Mg(n,e);var r=lr(n),i=lr(e),s=$t(r[0]),o=$t(i[0]),a=$t(r[1]),l=$t(i[1]),u=Math.sin(o-s)*Math.cos(l),h=Math.cos(a)*Math.sin(l)-Math.sin(a)*Math.cos(l)*Math.cos(o-s);return Cu(Math.atan2(u,h))}function Mg(n,e){var t=zl(e,n);return t=(t+180)%360,t}function tl(n,e,t,r){r===void 0&&(r={});var i=lr(n),s=$t(i[0]),o=$t(i[1]),a=$t(t),l=Tc(e,r.units),u=Math.asin(Math.sin(o)*Math.cos(l)+Math.cos(o)*Math.sin(l)*Math.cos(a)),h=s+Math.atan2(Math.sin(a)*Math.sin(l)*Math.cos(o),Math.cos(l)-Math.sin(o)*Math.sin(u)),f=Cu(h),p=Cu(u);return Xe([f,p],r.properties)}function xi(n,e,t){t===void 0&&(t={});var r=lr(n),i=lr(e),s=$t(i[1]-r[1]),o=$t(i[0]-r[0]),a=$t(r[1]),l=$t(i[1]),u=Math.pow(Math.sin(s/2),2)+Math.pow(Math.sin(o/2),2)*Math.cos(a)*Math.cos(l);return Ic(2*Math.atan2(Math.sqrt(u),Math.sqrt(1-u)),t.units)}function xg(n,e,t){t===void 0&&(t={});for(var r=Wr(n),i=r.coordinates,s=0,o=0;o<i.length&&!(e>=s&&o===i.length-1);o++)if(s>=e){var a=e-s;if(a){var l=zl(i[o],i[o-1])-180,u=tl(i[o],a,l,t);return u}else return Xe(i[o])}else s+=xi(i[o],i[o+1],t);return Xe(i[i.length-1])}function Lg(n,e){const t=On(n);return xg(t,e,{units:"meters"}).geometry.coordinates}function rl(n,e,t){if(n!==null)for(var r,i,s,o,a,l,u,h=0,f=0,p,v=n.type,w=v==="FeatureCollection",I=v==="Feature",T=w?n.features.length:1,L=0;L<T;L++){u=w?n.features[L].geometry:I?n.geometry:n,p=u?u.type==="GeometryCollection":!1,a=p?u.geometries.length:1;for(var m=0;m<a;m++){var _=0,g=0;if(o=p?u.geometries[m]:u,o!==null){l=o.coordinates;var y=o.type;switch(h=t&&(y==="Polygon"||y==="MultiPolygon")?1:0,y){case null:break;case"Point":if(e(l,f,L,_,g)===!1)return!1;f++,_++;break;case"LineString":case"MultiPoint":for(r=0;r<l.length;r++){if(e(l[r],f,L,_,g)===!1)return!1;f++,y==="MultiPoint"&&_++}y==="LineString"&&_++;break;case"Polygon":case"MultiLineString":for(r=0;r<l.length;r++){for(i=0;i<l[r].length-h;i++){if(e(l[r][i],f,L,_,g)===!1)return!1;f++}y==="MultiLineString"&&_++,y==="Polygon"&&g++}y==="Polygon"&&_++;break;case"MultiPolygon":for(r=0;r<l.length;r++){for(g=0,i=0;i<l[r].length;i++){for(s=0;s<l[r][i].length-h;s++){if(e(l[r][i][s],f,L,_,g)===!1)return!1;f++}g++}_++}break;case"GeometryCollection":for(r=0;r<o.geometries.length;r++)if(rl(o.geometries[r],e,t)===!1)return!1;break;default:throw new Error("Unknown Geometry Type")}}}}}function Pu(n,e){if(n.type==="Feature")e(n,0);else if(n.type==="FeatureCollection")for(var t=0;t<n.features.length&&e(n.features[t],t)!==!1;t++);}function Iu(n,e){var t,r,i,s,o,a,l,u,h,f,p=0,v=n.type==="FeatureCollection",w=n.type==="Feature",I=v?n.features.length:1;for(t=0;t<I;t++){for(a=v?n.features[t].geometry:w?n.geometry:n,u=v?n.features[t].properties:w?n.properties:{},h=v?n.features[t].bbox:w?n.bbox:void 0,f=v?n.features[t].id:w?n.id:void 0,l=a?a.type==="GeometryCollection":!1,o=l?a.geometries.length:1,i=0;i<o;i++){if(s=l?a.geometries[i]:a,s===null){if(e(null,p,u,h,f)===!1)return!1;continue}switch(s.type){case"Point":case"LineString":case"MultiPoint":case"Polygon":case"MultiLineString":case"MultiPolygon":{if(e(s,p,u,h,f)===!1)return!1;break}case"GeometryCollection":{for(r=0;r<s.geometries.length;r++)if(e(s.geometries[r],p,u,h,f)===!1)return!1;break}default:throw new Error("Unknown Geometry Type")}}p++}}function Ag(n,e,t){var r=t;return Iu(n,function(i,s,o,a,l){r=e(r,i,s,o,a,l)}),r}function Nc(n,e){Iu(n,function(t,r,i,s,o){var a=t===null?null:t.type;switch(a){case null:case"Point":case"LineString":case"Polygon":return e(bn(t,i,{bbox:s,id:o}),r,0)===!1?!1:void 0}var l;switch(a){case"MultiPoint":l="Point";break;case"MultiLineString":l="LineString";break;case"MultiPolygon":l="Polygon";break}for(var u=0;u<t.coordinates.length;u++){var h=t.coordinates[u],f={type:l,coordinates:h};if(e(bn(f,i),r,u)===!1)return!1}})}function Rg(n,e){Nc(n,function(t,r,i){var s=0;if(t.geometry){var o=t.geometry.type;if(!(o==="Point"||o==="MultiPoint")){var a,l=0,u=0,h=0;if(rl(t,function(f,p,v,w,I){if(a===void 0||r>l||w>u||I>h){a=f,l=r,u=w,h=I,s=0;return}var T=On([a,f],t.properties);if(e(T,r,i,I,s)===!1)return!1;s++,a=f})===!1)return!1}}})}var Jh=6378137;function Fg(n){return Ag(n,function(e,t){return e+kg(t)},0)}function kg(n){var e=0,t;switch(n.type){case"Polygon":return Zh(n.coordinates);case"MultiPolygon":for(t=0;t<n.coordinates.length;t++)e+=Zh(n.coordinates[t]);return e;case"Point":case"MultiPoint":case"LineString":case"MultiLineString":return 0}return 0}function Zh(n){var e=0;if(n&&n.length>0){e+=Math.abs(Kh(n[0]));for(var t=1;t<n.length;t++)e-=Math.abs(Kh(n[t]))}return e}function Kh(n){var e,t,r,i,s,o,a,l=0,u=n.length;if(u>2){for(a=0;a<u;a++)a===u-2?(i=u-2,s=u-1,o=0):a===u-1?(i=u-1,s=0,o=1):(i=a,s=a+1,o=a+2),e=n[i],t=n[s],r=n[o],l+=(bc(r[0])-bc(e[0]))*Math.sin(bc(t[1]));l=l*Jh*Jh/2}return l}function bc(n){return n*Math.PI/180}function Oc(n){if((n[0][0]!==n[n.length-1][0]||n[0][1]!==n[n.length-1][1]||n[0][2]!==n[n.length-1][2])&&n.push(n[0]),n.length<=3)return 0;const e=ar([n]);return Fg(e)}function Qh(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}function Vg(n){if(Object.prototype.hasOwnProperty.call(n,"__esModule"))return n;var e=n.default;if(typeof e=="function"){var t=function r(){return this instanceof r?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};t.prototype=e.prototype}else t={};return Object.defineProperty(t,"__esModule",{value:!0}),Object.keys(n).forEach(function(r){var i=Object.getOwnPropertyDescriptor(n,r);Object.defineProperty(t,r,i.get?i:{enumerable:!0,get:function(){return n[r]}})}),t}var Tu={exports:{}},Du={exports:{}},zg=Du.exports,Bh;function $h(){return Bh||(Bh=1,function(n,e){(function(t,r){n.exports=r()})(zg,function(){function t(m,_,g,y,E){(function C(D,b,x,N,O){for(;N>x;){if(N-x>600){var A=N-x+1,k=b-x+1,B=Math.log(A),X=.5*Math.exp(2*B/3),ne=.5*Math.sqrt(B*X*(A-X)/A)*(k-A/2<0?-1:1),ce=Math.max(x,Math.floor(b-k*X/A+ne)),de=Math.min(N,Math.floor(b+(A-k)*X/A+ne));C(D,b,ce,de,O)}var K=D[b],$=x,ee=N;for(r(D,x,b),O(D[N],K)>0&&r(D,x,N);$<ee;){for(r(D,$,ee),$++,ee--;O(D[$],K)<0;)$++;for(;O(D[ee],K)>0;)ee--}O(D[x],K)===0?r(D,x,ee):r(D,++ee,N),ee<=b&&(x=ee+1),b<=ee&&(N=ee-1)}})(m,_,g||0,y||m.length-1,E||i)}function r(m,_,g){var y=m[_];m[_]=m[g],m[g]=y}function i(m,_){return m<_?-1:m>_?1:0}var s=function(m){m===void 0&&(m=9),this._maxEntries=Math.max(4,m),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),this.clear()};function o(m,_,g){if(!g)return _.indexOf(m);for(var y=0;y<_.length;y++)if(g(m,_[y]))return y;return-1}function a(m,_){l(m,0,m.children.length,_,m)}function l(m,_,g,y,E){E||(E=T(null)),E.minX=1/0,E.minY=1/0,E.maxX=-1/0,E.maxY=-1/0;for(var C=_;C<g;C++){var D=m.children[C];u(E,m.leaf?y(D):D)}return E}function u(m,_){return m.minX=Math.min(m.minX,_.minX),m.minY=Math.min(m.minY,_.minY),m.maxX=Math.max(m.maxX,_.maxX),m.maxY=Math.max(m.maxY,_.maxY),m}function h(m,_){return m.minX-_.minX}function f(m,_){return m.minY-_.minY}function p(m){return(m.maxX-m.minX)*(m.maxY-m.minY)}function v(m){return m.maxX-m.minX+(m.maxY-m.minY)}function w(m,_){return m.minX<=_.minX&&m.minY<=_.minY&&_.maxX<=m.maxX&&_.maxY<=m.maxY}function I(m,_){return _.minX<=m.maxX&&_.minY<=m.maxY&&_.maxX>=m.minX&&_.maxY>=m.minY}function T(m){return{children:m,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function L(m,_,g,y,E){for(var C=[_,g];C.length;)if(!((g=C.pop())-(_=C.pop())<=y)){var D=_+Math.ceil((g-_)/y/2)*y;t(m,D,_,g,E),C.push(_,D,D,g)}}return s.prototype.all=function(){return this._all(this.data,[])},s.prototype.search=function(m){var _=this.data,g=[];if(!I(m,_))return g;for(var y=this.toBBox,E=[];_;){for(var C=0;C<_.children.length;C++){var D=_.children[C],b=_.leaf?y(D):D;I(m,b)&&(_.leaf?g.push(D):w(m,b)?this._all(D,g):E.push(D))}_=E.pop()}return g},s.prototype.collides=function(m){var _=this.data;if(!I(m,_))return!1;for(var g=[];_;){for(var y=0;y<_.children.length;y++){var E=_.children[y],C=_.leaf?this.toBBox(E):E;if(I(m,C)){if(_.leaf||w(m,C))return!0;g.push(E)}}_=g.pop()}return!1},s.prototype.load=function(m){if(!m||!m.length)return this;if(m.length<this._minEntries){for(var _=0;_<m.length;_++)this.insert(m[_]);return this}var g=this._build(m.slice(),0,m.length-1,0);if(this.data.children.length)if(this.data.height===g.height)this._splitRoot(this.data,g);else{if(this.data.height<g.height){var y=this.data;this.data=g,g=y}this._insert(g,this.data.height-g.height-1,!0)}else this.data=g;return this},s.prototype.insert=function(m){return m&&this._insert(m,this.data.height-1),this},s.prototype.clear=function(){return this.data=T([]),this},s.prototype.remove=function(m,_){if(!m)return this;for(var g,y,E,C=this.data,D=this.toBBox(m),b=[],x=[];C||b.length;){if(C||(C=b.pop(),y=b[b.length-1],g=x.pop(),E=!0),C.leaf){var N=o(m,C.children,_);if(N!==-1)return C.children.splice(N,1),b.push(C),this._condense(b),this}E||C.leaf||!w(C,D)?y?(g++,C=y.children[g],E=!1):C=null:(b.push(C),x.push(g),g=0,y=C,C=C.children[0])}return this},s.prototype.toBBox=function(m){return m},s.prototype.compareMinX=function(m,_){return m.minX-_.minX},s.prototype.compareMinY=function(m,_){return m.minY-_.minY},s.prototype.toJSON=function(){return this.data},s.prototype.fromJSON=function(m){return this.data=m,this},s.prototype._all=function(m,_){for(var g=[];m;)m.leaf?_.push.apply(_,m.children):g.push.apply(g,m.children),m=g.pop();return _},s.prototype._build=function(m,_,g,y){var E,C=g-_+1,D=this._maxEntries;if(C<=D)return a(E=T(m.slice(_,g+1)),this.toBBox),E;y||(y=Math.ceil(Math.log(C)/Math.log(D)),D=Math.ceil(C/Math.pow(D,y-1))),(E=T([])).leaf=!1,E.height=y;var b=Math.ceil(C/D),x=b*Math.ceil(Math.sqrt(D));L(m,_,g,x,this.compareMinX);for(var N=_;N<=g;N+=x){var O=Math.min(N+x-1,g);L(m,N,O,b,this.compareMinY);for(var A=N;A<=O;A+=b){var k=Math.min(A+b-1,O);E.children.push(this._build(m,A,k,y-1))}}return a(E,this.toBBox),E},s.prototype._chooseSubtree=function(m,_,g,y){for(;y.push(_),!_.leaf&&y.length-1!==g;){for(var E=1/0,C=1/0,D=void 0,b=0;b<_.children.length;b++){var x=_.children[b],N=p(x),O=(A=m,k=x,(Math.max(k.maxX,A.maxX)-Math.min(k.minX,A.minX))*(Math.max(k.maxY,A.maxY)-Math.min(k.minY,A.minY))-N);O<C?(C=O,E=N<E?N:E,D=x):O===C&&N<E&&(E=N,D=x)}_=D||_.children[0]}var A,k;return _},s.prototype._insert=function(m,_,g){var y=g?m:this.toBBox(m),E=[],C=this._chooseSubtree(y,this.data,_,E);for(C.children.push(m),u(C,y);_>=0&&E[_].children.length>this._maxEntries;)this._split(E,_),_--;this._adjustParentBBoxes(y,E,_)},s.prototype._split=function(m,_){var g=m[_],y=g.children.length,E=this._minEntries;this._chooseSplitAxis(g,E,y);var C=this._chooseSplitIndex(g,E,y),D=T(g.children.splice(C,g.children.length-C));D.height=g.height,D.leaf=g.leaf,a(g,this.toBBox),a(D,this.toBBox),_?m[_-1].children.push(D):this._splitRoot(g,D)},s.prototype._splitRoot=function(m,_){this.data=T([m,_]),this.data.height=m.height+1,this.data.leaf=!1,a(this.data,this.toBBox)},s.prototype._chooseSplitIndex=function(m,_,g){for(var y,E,C,D,b,x,N,O=1/0,A=1/0,k=_;k<=g-_;k++){var B=l(m,0,k,this.toBBox),X=l(m,k,g,this.toBBox),ne=(E=B,C=X,D=void 0,b=void 0,x=void 0,N=void 0,D=Math.max(E.minX,C.minX),b=Math.max(E.minY,C.minY),x=Math.min(E.maxX,C.maxX),N=Math.min(E.maxY,C.maxY),Math.max(0,x-D)*Math.max(0,N-b)),ce=p(B)+p(X);ne<O?(O=ne,y=k,A=ce<A?ce:A):ne===O&&ce<A&&(A=ce,y=k)}return y||g-_},s.prototype._chooseSplitAxis=function(m,_,g){var y=m.leaf?this.compareMinX:h,E=m.leaf?this.compareMinY:f;this._allDistMargin(m,_,g,y)<this._allDistMargin(m,_,g,E)&&m.children.sort(y)},s.prototype._allDistMargin=function(m,_,g,y){m.children.sort(y);for(var E=this.toBBox,C=l(m,0,_,E),D=l(m,g-_,g,E),b=v(C)+v(D),x=_;x<g-_;x++){var N=m.children[x];u(C,m.leaf?E(N):N),b+=v(C)}for(var O=g-_-1;O>=_;O--){var A=m.children[O];u(D,m.leaf?E(A):A),b+=v(D)}return b},s.prototype._adjustParentBBoxes=function(m,_,g){for(var y=g;y>=0;y--)u(_[y],m)},s.prototype._condense=function(m){for(var _=m.length-1,g=void 0;_>=0;_--)m[_].children.length===0?_>0?(g=m[_-1].children).splice(g.indexOf(m[_]),1):this.clear():a(m[_],this.toBBox)},s})}(Du)),Du.exports}class Ug{constructor(e=[],t=Gg){if(this.data=e,this.length=this.data.length,this.compare=t,this.length>0)for(let r=(this.length>>1)-1;r>=0;r--)this._down(r)}push(e){this.data.push(e),this.length++,this._up(this.length-1)}pop(){if(this.length===0)return;const e=this.data[0],t=this.data.pop();return this.length--,this.length>0&&(this.data[0]=t,this._down(0)),e}peek(){return this.data[0]}_up(e){const{data:t,compare:r}=this,i=t[e];for(;e>0;){const s=e-1>>1,o=t[s];if(r(i,o)>=0)break;t[e]=o,e=s}t[e]=i}_down(e){const{data:t,compare:r}=this,i=this.length>>1,s=t[e];for(;e<i;){let o=(e<<1)+1,a=t[o];const l=o+1;if(l<this.length&&r(t[l],a)<0&&(o=l,a=t[l]),r(a,s)>=0)break;t[e]=a,e=o}t[e]=s}}function Gg(n,e){return n<e?-1:n>e?1:0}const Wg=Vg(Object.freeze(Object.defineProperty({__proto__:null,default:Ug},Symbol.toStringTag,{value:"Module"})));var Ul={exports:{}},Mc,jh;function qg(){return jh||(jh=1,Mc=function(e,t,r,i){var s=e[0],o=e[1],a=!1;r===void 0&&(r=0),i===void 0&&(i=t.length);for(var l=(i-r)/2,u=0,h=l-1;u<l;h=u++){var f=t[r+u*2+0],p=t[r+u*2+1],v=t[r+h*2+0],w=t[r+h*2+1],I=p>o!=w>o&&s<(v-f)*(o-p)/(w-p)+f;I&&(a=!a)}return a}),Mc}var xc,ef;function Xg(){return ef||(ef=1,xc=function(e,t,r,i){var s=e[0],o=e[1],a=!1;r===void 0&&(r=0),i===void 0&&(i=t.length);for(var l=i-r,u=0,h=l-1;u<l;h=u++){var f=t[u+r][0],p=t[u+r][1],v=t[h+r][0],w=t[h+r][1],I=p>o!=w>o&&s<(v-f)*(o-p)/(w-p)+f;I&&(a=!a)}return a}),xc}var tf;function Hg(){if(tf)return Ul.exports;tf=1;var n=qg(),e=Xg();return Ul.exports=function(r,i,s,o){return i.length>0&&Array.isArray(i[0])?e(r,i,s,o):n(r,i,s,o)},Ul.exports.nested=e,Ul.exports.flat=n,Ul.exports}var Gl={exports:{}},Yg=Gl.exports,rf;function Jg(){return rf||(rf=1,function(n,e){(function(t,r){r(e)})(Yg,function(t){const i=33306690738754706e-32;function s(I,T,L,m,_){let g,y,E,C,D=T[0],b=m[0],x=0,N=0;b>D==b>-D?(g=D,D=T[++x]):(g=b,b=m[++N]);let O=0;if(x<I&&N<L)for(b>D==b>-D?(E=g-((y=D+g)-D),D=T[++x]):(E=g-((y=b+g)-b),b=m[++N]),g=y,E!==0&&(_[O++]=E);x<I&&N<L;)b>D==b>-D?(E=g-((y=g+D)-(C=y-g))+(D-C),D=T[++x]):(E=g-((y=g+b)-(C=y-g))+(b-C),b=m[++N]),g=y,E!==0&&(_[O++]=E);for(;x<I;)E=g-((y=g+D)-(C=y-g))+(D-C),D=T[++x],g=y,E!==0&&(_[O++]=E);for(;N<L;)E=g-((y=g+b)-(C=y-g))+(b-C),b=m[++N],g=y,E!==0&&(_[O++]=E);return g===0&&O!==0||(_[O++]=g),O}function o(I){return new Float64Array(I)}const a=33306690738754716e-32,l=22204460492503146e-32,u=11093356479670487e-47,h=o(4),f=o(8),p=o(12),v=o(16),w=o(4);t.orient2d=function(I,T,L,m,_,g){const y=(T-g)*(L-_),E=(I-_)*(m-g),C=y-E;if(y===0||E===0||y>0!=E>0)return C;const D=Math.abs(y+E);return Math.abs(C)>=a*D?C:-function(b,x,N,O,A,k,B){let X,ne,ce,de,K,$,ee,ye,Oe,Ce,Pe,Fe,gt,lt,kr,Vr,Mi,zr;const Ur=b-A,Gr=N-A,ti=x-k,ri=O-k;K=(kr=(ye=Ur-(ee=($=134217729*Ur)-($-Ur)))*(Ce=ri-(Oe=($=134217729*ri)-($-ri)))-((lt=Ur*ri)-ee*Oe-ye*Oe-ee*Ce))-(Pe=kr-(Mi=(ye=ti-(ee=($=134217729*ti)-($-ti)))*(Ce=Gr-(Oe=($=134217729*Gr)-($-Gr)))-((Vr=ti*Gr)-ee*Oe-ye*Oe-ee*Ce))),h[0]=kr-(Pe+K)+(K-Mi),K=(gt=lt-((Fe=lt+Pe)-(K=Fe-lt))+(Pe-K))-(Pe=gt-Vr),h[1]=gt-(Pe+K)+(K-Vr),K=(zr=Fe+Pe)-Fe,h[2]=Fe-(zr-K)+(Pe-K),h[3]=zr;let Xs=function(x0,Jp){let Zp=Jp[0];for(let Mh=1;Mh<x0;Mh++)Zp+=Jp[Mh];return Zp}(4,h),_u=l*B;if(Xs>=_u||-Xs>=_u||(X=b-(Ur+(K=b-Ur))+(K-A),ce=N-(Gr+(K=N-Gr))+(K-A),ne=x-(ti+(K=x-ti))+(K-k),de=O-(ri+(K=O-ri))+(K-k),X===0&&ne===0&&ce===0&&de===0)||(_u=u*B+i*Math.abs(Xs),(Xs+=Ur*de+ri*X-(ti*ce+Gr*ne))>=_u||-Xs>=_u))return Xs;K=(kr=(ye=X-(ee=($=134217729*X)-($-X)))*(Ce=ri-(Oe=($=134217729*ri)-($-ri)))-((lt=X*ri)-ee*Oe-ye*Oe-ee*Ce))-(Pe=kr-(Mi=(ye=ne-(ee=($=134217729*ne)-($-ne)))*(Ce=Gr-(Oe=($=134217729*Gr)-($-Gr)))-((Vr=ne*Gr)-ee*Oe-ye*Oe-ee*Ce))),w[0]=kr-(Pe+K)+(K-Mi),K=(gt=lt-((Fe=lt+Pe)-(K=Fe-lt))+(Pe-K))-(Pe=gt-Vr),w[1]=gt-(Pe+K)+(K-Vr),K=(zr=Fe+Pe)-Fe,w[2]=Fe-(zr-K)+(Pe-K),w[3]=zr;const b0=s(4,h,4,w,f);K=(kr=(ye=Ur-(ee=($=134217729*Ur)-($-Ur)))*(Ce=de-(Oe=($=134217729*de)-($-de)))-((lt=Ur*de)-ee*Oe-ye*Oe-ee*Ce))-(Pe=kr-(Mi=(ye=ti-(ee=($=134217729*ti)-($-ti)))*(Ce=ce-(Oe=($=134217729*ce)-($-ce)))-((Vr=ti*ce)-ee*Oe-ye*Oe-ee*Ce))),w[0]=kr-(Pe+K)+(K-Mi),K=(gt=lt-((Fe=lt+Pe)-(K=Fe-lt))+(Pe-K))-(Pe=gt-Vr),w[1]=gt-(Pe+K)+(K-Vr),K=(zr=Fe+Pe)-Fe,w[2]=Fe-(zr-K)+(Pe-K),w[3]=zr;const O0=s(b0,f,4,w,p);K=(kr=(ye=X-(ee=($=134217729*X)-($-X)))*(Ce=de-(Oe=($=134217729*de)-($-de)))-((lt=X*de)-ee*Oe-ye*Oe-ee*Ce))-(Pe=kr-(Mi=(ye=ne-(ee=($=134217729*ne)-($-ne)))*(Ce=ce-(Oe=($=134217729*ce)-($-ce)))-((Vr=ne*ce)-ee*Oe-ye*Oe-ee*Ce))),w[0]=kr-(Pe+K)+(K-Mi),K=(gt=lt-((Fe=lt+Pe)-(K=Fe-lt))+(Pe-K))-(Pe=gt-Vr),w[1]=gt-(Pe+K)+(K-Vr),K=(zr=Fe+Pe)-Fe,w[2]=Fe-(zr-K)+(Pe-K),w[3]=zr;const M0=s(O0,p,4,w,v);return v[M0-1]}(I,T,L,m,_,g,D)},t.orient2dfast=function(I,T,L,m,_,g){return(T-g)*(L-_)-(I-_)*(m-g)},Object.defineProperty(t,"__esModule",{value:!0})})}(Gl,Gl.exports)),Gl.exports}var nf;function Zg(){if(nf)return Tu.exports;nf=1;var n=$h(),e=Wg,t=Hg(),r=Jg().orient2d;e.default&&(e=e.default),Tu.exports=i,Tu.exports.default=i;function i(g,y,E){y=Math.max(0,y===void 0?2:y),E=E||0;var C=v(g),D=new n(16);D.toBBox=function(ee){return{minX:ee[0],minY:ee[1],maxX:ee[0],maxY:ee[1]}},D.compareMinX=function(ee,ye){return ee[0]-ye[0]},D.compareMinY=function(ee,ye){return ee[1]-ye[1]},D.load(g);for(var b=[],x=0,N;x<C.length;x++){var O=C[x];D.remove(O),N=w(O,N),b.push(N)}var A=new n(16);for(x=0;x<b.length;x++)A.insert(p(b[x]));for(var k=y*y,B=E*E;b.length;){var X=b.shift(),ne=X.p,ce=X.next.p,de=I(ne,ce);if(!(de<B)){var K=de/k;O=s(D,X.prev.p,ne,ce,X.next.next.p,K,A),O&&Math.min(I(O,ne),I(O,ce))<=K&&(b.push(X),b.push(w(O,X)),D.remove(O),A.remove(X),A.insert(p(X)),A.insert(p(X.next)))}}X=N;var $=[];do $.push(X.p),X=X.next;while(X!==N);return $.push(X.p),$}function s(g,y,E,C,D,b,x){for(var N=new e([],o),O=g.data;O;){for(var A=0;A<O.children.length;A++){var k=O.children[A],B=O.leaf?T(k,E,C):a(E,C,k);B>b||N.push({node:k,dist:B})}for(;N.length&&!N.peek().node.children;){var X=N.pop(),ne=X.node,ce=T(ne,y,E),de=T(ne,C,D);if(X.dist<ce&&X.dist<de&&u(E,ne,x)&&u(C,ne,x))return ne}O=N.pop(),O&&(O=O.node)}return null}function o(g,y){return g.dist-y.dist}function a(g,y,E){if(l(g,E)||l(y,E))return 0;var C=L(g[0],g[1],y[0],y[1],E.minX,E.minY,E.maxX,E.minY);if(C===0)return 0;var D=L(g[0],g[1],y[0],y[1],E.minX,E.minY,E.minX,E.maxY);if(D===0)return 0;var b=L(g[0],g[1],y[0],y[1],E.maxX,E.minY,E.maxX,E.maxY);if(b===0)return 0;var x=L(g[0],g[1],y[0],y[1],E.minX,E.maxY,E.maxX,E.maxY);return x===0?0:Math.min(C,D,b,x)}function l(g,y){return g[0]>=y.minX&&g[0]<=y.maxX&&g[1]>=y.minY&&g[1]<=y.maxY}function u(g,y,E){for(var C=Math.min(g[0],y[0]),D=Math.min(g[1],y[1]),b=Math.max(g[0],y[0]),x=Math.max(g[1],y[1]),N=E.search({minX:C,minY:D,maxX:b,maxY:x}),O=0;O<N.length;O++)if(f(N[O].p,N[O].next.p,g,y))return!1;return!0}function h(g,y,E){return r(g[0],g[1],y[0],y[1],E[0],E[1])}function f(g,y,E,C){return g!==C&&y!==E&&h(g,y,E)>0!=h(g,y,C)>0&&h(E,C,g)>0!=h(E,C,y)>0}function p(g){var y=g.p,E=g.next.p;return g.minX=Math.min(y[0],E[0]),g.minY=Math.min(y[1],E[1]),g.maxX=Math.max(y[0],E[0]),g.maxY=Math.max(y[1],E[1]),g}function v(g){for(var y=g[0],E=g[0],C=g[0],D=g[0],b=0;b<g.length;b++){var x=g[b];x[0]<y[0]&&(y=x),x[0]>C[0]&&(C=x),x[1]<E[1]&&(E=x),x[1]>D[1]&&(D=x)}var N=[y,E,C,D],O=N.slice();for(b=0;b<g.length;b++)t(g[b],N)||O.push(g[b]);return _(O)}function w(g,y){var E={p:g,prev:null,next:null,minX:0,minY:0,maxX:0,maxY:0};return y?(E.next=y.next,E.prev=y,y.next.prev=E,y.next=E):(E.prev=E,E.next=E),E}function I(g,y){var E=g[0]-y[0],C=g[1]-y[1];return E*E+C*C}function T(g,y,E){var C=y[0],D=y[1],b=E[0]-C,x=E[1]-D;if(b!==0||x!==0){var N=((g[0]-C)*b+(g[1]-D)*x)/(b*b+x*x);N>1?(C=E[0],D=E[1]):N>0&&(C+=b*N,D+=x*N)}return b=g[0]-C,x=g[1]-D,b*b+x*x}function L(g,y,E,C,D,b,x,N){var O=E-g,A=C-y,k=x-D,B=N-b,X=g-D,ne=y-b,ce=O*O+A*A,de=O*k+A*B,K=k*k+B*B,$=O*X+A*ne,ee=k*X+B*ne,ye=ce*K-de*de,Oe,Ce,Pe,Fe,gt=ye,lt=ye;ye===0?(Ce=0,gt=1,Fe=ee,lt=K):(Ce=de*ee-K*$,Fe=ce*ee-de*$,Ce<0?(Ce=0,Fe=ee,lt=K):Ce>gt&&(Ce=gt,Fe=ee+de,lt=K)),Fe<0?(Fe=0,-$<0?Ce=0:-$>ce?Ce=gt:(Ce=-$,gt=ce)):Fe>lt&&(Fe=lt,-$+de<0?Ce=0:-$+de>ce?Ce=gt:(Ce=-$+de,gt=ce)),Oe=Ce===0?0:Ce/gt,Pe=Fe===0?0:Fe/lt;var kr=(1-Oe)*g+Oe*E,Vr=(1-Oe)*y+Oe*C,Mi=(1-Pe)*D+Pe*x,zr=(1-Pe)*b+Pe*N,Ur=Mi-kr,Gr=zr-Vr;return Ur*Ur+Gr*Gr}function m(g,y){return g[0]===y[0]?g[1]-y[1]:g[0]-y[0]}function _(g){g.sort(m);for(var y=[],E=0;E<g.length;E++){for(;y.length>=2&&h(y[y.length-2],y[y.length-1],g[E])<=0;)y.pop();y.push(g[E])}for(var C=[],D=g.length-1;D>=0;D--){for(;C.length>=2&&h(C[C.length-2],C[C.length-1],g[D])<=0;)C.pop();C.push(g[D])}return C.pop(),y.pop(),y.concat(C)}return Tu.exports}var Kg=Zg();const Qg=Qh(Kg);function Bg(n,e){e===void 0&&(e={}),e.concavity=e.concavity||1/0;var t=[];if(rl(n,function(i){t.push([i[0],i[1]])}),!t.length)return null;var r=Qg(t,e.concavity);return r.length>3?ar([r]):null}function sf(n,e){e===void 0&&(e={});var t=0,r=0,i=0;return rl(n,function(s){t+=s[0],r+=s[1],i++},!0),Xe([t/i,r/i],e.properties)}function of(n,e){switch(e===void 0&&(e={}),Og(n)){case"Point":return Xe(lr(n),e.properties);case"Polygon":var t=[];rl(n,function(g){t.push(g)});var r=sf(n,{properties:e.properties}),i=r.geometry.coordinates,s=0,o=0,a=0,l,u,h,f,p,v,w,I,T=t.map(function(g){return[g[0]-i[0],g[1]-i[1]]});for(l=0;l<t.length-1;l++)u=T[l],f=u[0],v=u[1],h=T[l+1],p=h[0],w=h[1],I=f*w-p*v,a+=I,s+=(f+p)*I,o+=(v+w)*I;if(a===0)return r;var L=a*.5,m=1/(6*L);return Xe([i[0]+m*s,i[1]+m*o],e.properties);default:var _=Bg(n);return _?of(_,{properties:e.properties}):sf(n,{properties:e.properties})}}function $g(n){(n[0][0]!==n[n.length-1][0]||n[0][1]!==n[n.length-1][1]||n[0][2]!==n[n.length-1][2])&&n.push(n[0]);const e=ar([n]),r=of(e).geometry.coordinates;return[r[0],r[1],r[2]??n[0][2]??0]}function jg(n,e,t,r){const[i,s,o]=n,a=tl(Xe([i,s]),e,t,{units:"meters"});if(!(!a||!a.geometry||!a.geometry.coordinates))return r=r||[0,0,0],r[0]=a.geometry.coordinates[0],r[1]=a.geometry.coordinates[1],r[2]=o,r}function Lc(n,e){return xi(Xe(n),Xe(e),{units:"meters"})}function Nu(n,e){return zl(Xe(n),Xe(e))}function af(n){if(!n)throw new Error("geojson is required");var e=[];return Nc(n,function(t){em(t,e)}),el(e)}function em(n,e){var t=[],r=n.geometry;if(r!==null){switch(r.type){case"Polygon":t=Ys(r);break;case"LineString":t=[Ys(r)]}t.forEach(function(i){var s=tm(i,n.properties);s.forEach(function(o){o.id=e.length,e.push(o)})})}}function tm(n,e){var t=[];return n.reduce(function(r,i){var s=On([r,i],e);return s.bbox=rm(r,i),t.push(s),i}),t}function rm(n,e){var t=n[0],r=n[1],i=e[0],s=e[1],o=t<i?t:i,a=r<s?r:s,l=t>i?t:i,u=r>s?r:s;return[o,a,l,u]}var bu={exports:{}},Ac={},lf;function uf(){return lf||(lf=1,function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.earthRadius=63710088e-1,n.factors={centimeters:n.earthRadius*100,centimetres:n.earthRadius*100,degrees:n.earthRadius/111325,feet:n.earthRadius*3.28084,inches:n.earthRadius*39.37,kilometers:n.earthRadius/1e3,kilometres:n.earthRadius/1e3,meters:n.earthRadius,metres:n.earthRadius,miles:n.earthRadius/1609.344,millimeters:n.earthRadius*1e3,millimetres:n.earthRadius*1e3,nauticalmiles:n.earthRadius/1852,radians:1,yards:n.earthRadius*1.0936},n.unitsFactors={centimeters:100,centimetres:100,degrees:1/111325,feet:3.28084,inches:39.37,kilometers:1/1e3,kilometres:1/1e3,meters:1,metres:1,miles:1/1609.344,millimeters:1e3,millimetres:1e3,nauticalmiles:1/1852,radians:1/n.earthRadius,yards:1.0936133},n.areaFactors={acres:247105e-9,centimeters:1e4,centimetres:1e4,feet:10.763910417,hectares:1e-4,inches:1550.003100006,kilometers:1e-6,kilometres:1e-6,meters:1,metres:1,miles:386e-9,millimeters:1e6,millimetres:1e6,yards:1.195990046};function e(N,O,A){A===void 0&&(A={});var k={type:"Feature"};return(A.id===0||A.id)&&(k.id=A.id),A.bbox&&(k.bbox=A.bbox),k.properties=O||{},k.geometry=N,k}n.feature=e;function t(N,O,A){switch(N){case"Point":return r(O).geometry;case"LineString":return a(O).geometry;case"Polygon":return s(O).geometry;case"MultiPoint":return f(O).geometry;case"MultiLineString":return h(O).geometry;case"MultiPolygon":return p(O).geometry;default:throw new Error(N+" is invalid")}}n.geometry=t;function r(N,O,A){if(A===void 0&&(A={}),!N)throw new Error("coordinates is required");if(!Array.isArray(N))throw new Error("coordinates must be an Array");if(N.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!C(N[0])||!C(N[1]))throw new Error("coordinates must contain numbers");var k={type:"Point",coordinates:N};return e(k,O,A)}n.point=r;function i(N,O,A){return A===void 0&&(A={}),u(N.map(function(k){return r(k,O)}),A)}n.points=i;function s(N,O,A){A===void 0&&(A={});for(var k=0,B=N;k<B.length;k++){var X=B[k];if(X.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");for(var ne=0;ne<X[X.length-1].length;ne++)if(X[X.length-1][ne]!==X[0][ne])throw new Error("First and last Position are not equivalent.")}var ce={type:"Polygon",coordinates:N};return e(ce,O,A)}n.polygon=s;function o(N,O,A){return A===void 0&&(A={}),u(N.map(function(k){return s(k,O)}),A)}n.polygons=o;function a(N,O,A){if(A===void 0&&(A={}),N.length<2)throw new Error("coordinates must be an array of two or more positions");var k={type:"LineString",coordinates:N};return e(k,O,A)}n.lineString=a;function l(N,O,A){return A===void 0&&(A={}),u(N.map(function(k){return a(k,O)}),A)}n.lineStrings=l;function u(N,O){O===void 0&&(O={});var A={type:"FeatureCollection"};return O.id&&(A.id=O.id),O.bbox&&(A.bbox=O.bbox),A.features=N,A}n.featureCollection=u;function h(N,O,A){A===void 0&&(A={});var k={type:"MultiLineString",coordinates:N};return e(k,O,A)}n.multiLineString=h;function f(N,O,A){A===void 0&&(A={});var k={type:"MultiPoint",coordinates:N};return e(k,O,A)}n.multiPoint=f;function p(N,O,A){A===void 0&&(A={});var k={type:"MultiPolygon",coordinates:N};return e(k,O,A)}n.multiPolygon=p;function v(N,O,A){A===void 0&&(A={});var k={type:"GeometryCollection",geometries:N};return e(k,O,A)}n.geometryCollection=v;function w(N,O){if(O===void 0&&(O=0),O&&!(O>=0))throw new Error("precision must be a positive number");var A=Math.pow(10,O||0);return Math.round(N*A)/A}n.round=w;function I(N,O){O===void 0&&(O="kilometers");var A=n.factors[O];if(!A)throw new Error(O+" units is invalid");return N*A}n.radiansToLength=I;function T(N,O){O===void 0&&(O="kilometers");var A=n.factors[O];if(!A)throw new Error(O+" units is invalid");return N/A}n.lengthToRadians=T;function L(N,O){return _(T(N,O))}n.lengthToDegrees=L;function m(N){var O=N%360;return O<0&&(O+=360),O}n.bearingToAzimuth=m;function _(N){var O=N%(2*Math.PI);return O*180/Math.PI}n.radiansToDegrees=_;function g(N){var O=N%360;return O*Math.PI/180}n.degreesToRadians=g;function y(N,O,A){if(O===void 0&&(O="kilometers"),A===void 0&&(A="kilometers"),!(N>=0))throw new Error("length must be a positive number");return I(T(N,O),A)}n.convertLength=y;function E(N,O,A){if(O===void 0&&(O="meters"),A===void 0&&(A="kilometers"),!(N>=0))throw new Error("area must be a positive number");var k=n.areaFactors[O];if(!k)throw new Error("invalid original units");var B=n.areaFactors[A];if(!B)throw new Error("invalid final units");return N/k*B}n.convertArea=E;function C(N){return!isNaN(N)&&N!==null&&!Array.isArray(N)}n.isNumber=C;function D(N){return!!N&&N.constructor===Object}n.isObject=D;function b(N){if(!N)throw new Error("bbox is required");if(!Array.isArray(N))throw new Error("bbox must be an Array");if(N.length!==4&&N.length!==6)throw new Error("bbox must be an Array of 4 or 6 numbers");N.forEach(function(O){if(!C(O))throw new Error("bbox must only contain numbers")})}n.validateBBox=b;function x(N){if(!N)throw new Error("id is required");if(["string","number"].indexOf(typeof N)===-1)throw new Error("id must be a number or a string")}n.validateId=x}(Ac)),Ac}var mt={},cf;function hf(){if(cf)return mt;cf=1,Object.defineProperty(mt,"__esModule",{value:!0});var n=uf();function e(m,_,g){if(m!==null)for(var y,E,C,D,b,x,N,O=0,A=0,k,B=m.type,X=B==="FeatureCollection",ne=B==="Feature",ce=X?m.features.length:1,de=0;de<ce;de++){N=X?m.features[de].geometry:ne?m.geometry:m,k=N?N.type==="GeometryCollection":!1,b=k?N.geometries.length:1;for(var K=0;K<b;K++){var $=0,ee=0;if(D=k?N.geometries[K]:N,D!==null){x=D.coordinates;var ye=D.type;switch(O=g&&(ye==="Polygon"||ye==="MultiPolygon")?1:0,ye){case null:break;case"Point":if(_(x,A,de,$,ee)===!1)return!1;A++,$++;break;case"LineString":case"MultiPoint":for(y=0;y<x.length;y++){if(_(x[y],A,de,$,ee)===!1)return!1;A++,ye==="MultiPoint"&&$++}ye==="LineString"&&$++;break;case"Polygon":case"MultiLineString":for(y=0;y<x.length;y++){for(E=0;E<x[y].length-O;E++){if(_(x[y][E],A,de,$,ee)===!1)return!1;A++}ye==="MultiLineString"&&$++,ye==="Polygon"&&ee++}ye==="Polygon"&&$++;break;case"MultiPolygon":for(y=0;y<x.length;y++){for(ee=0,E=0;E<x[y].length;E++){for(C=0;C<x[y][E].length-O;C++){if(_(x[y][E][C],A,de,$,ee)===!1)return!1;A++}ee++}$++}break;case"GeometryCollection":for(y=0;y<D.geometries.length;y++)if(e(D.geometries[y],_,g)===!1)return!1;break;default:throw new Error("Unknown Geometry Type")}}}}}function t(m,_,g,y){var E=g;return e(m,function(C,D,b,x,N){D===0&&g===void 0?E=C:E=_(E,C,D,b,x,N)},y),E}function r(m,_){var g;switch(m.type){case"FeatureCollection":for(g=0;g<m.features.length&&_(m.features[g].properties,g)!==!1;g++);break;case"Feature":_(m.properties,0);break}}function i(m,_,g){var y=g;return r(m,function(E,C){C===0&&g===void 0?y=E:y=_(y,E,C)}),y}function s(m,_){if(m.type==="Feature")_(m,0);else if(m.type==="FeatureCollection")for(var g=0;g<m.features.length&&_(m.features[g],g)!==!1;g++);}function o(m,_,g){var y=g;return s(m,function(E,C){C===0&&g===void 0?y=E:y=_(y,E,C)}),y}function a(m){var _=[];return e(m,function(g){_.push(g)}),_}function l(m,_){var g,y,E,C,D,b,x,N,O,A,k=0,B=m.type==="FeatureCollection",X=m.type==="Feature",ne=B?m.features.length:1;for(g=0;g<ne;g++){for(b=B?m.features[g].geometry:X?m.geometry:m,N=B?m.features[g].properties:X?m.properties:{},O=B?m.features[g].bbox:X?m.bbox:void 0,A=B?m.features[g].id:X?m.id:void 0,x=b?b.type==="GeometryCollection":!1,D=x?b.geometries.length:1,E=0;E<D;E++){if(C=x?b.geometries[E]:b,C===null){if(_(null,k,N,O,A)===!1)return!1;continue}switch(C.type){case"Point":case"LineString":case"MultiPoint":case"Polygon":case"MultiLineString":case"MultiPolygon":{if(_(C,k,N,O,A)===!1)return!1;break}case"GeometryCollection":{for(y=0;y<C.geometries.length;y++)if(_(C.geometries[y],k,N,O,A)===!1)return!1;break}default:throw new Error("Unknown Geometry Type")}}k++}}function u(m,_,g){var y=g;return l(m,function(E,C,D,b,x){C===0&&g===void 0?y=E:y=_(y,E,C,D,b,x)}),y}function h(m,_){l(m,function(g,y,E,C,D){var b=g===null?null:g.type;switch(b){case null:case"Point":case"LineString":case"Polygon":return _(n.feature(g,E,{bbox:C,id:D}),y,0)===!1?!1:void 0}var x;switch(b){case"MultiPoint":x="Point";break;case"MultiLineString":x="LineString";break;case"MultiPolygon":x="Polygon";break}for(var N=0;N<g.coordinates.length;N++){var O=g.coordinates[N],A={type:x,coordinates:O};if(_(n.feature(A,E),y,N)===!1)return!1}})}function f(m,_,g){var y=g;return h(m,function(E,C,D){C===0&&D===0&&g===void 0?y=E:y=_(y,E,C,D)}),y}function p(m,_){h(m,function(g,y,E){var C=0;if(g.geometry){var D=g.geometry.type;if(!(D==="Point"||D==="MultiPoint")){var b,x=0,N=0,O=0;if(e(g,function(A,k,B,X,ne){if(b===void 0||y>x||X>N||ne>O){b=A,x=y,N=X,O=ne,C=0;return}var ce=n.lineString([b,A],g.properties);if(_(ce,y,E,ne,C)===!1)return!1;C++,b=A})===!1)return!1}}})}function v(m,_,g){var y=g,E=!1;return p(m,function(C,D,b,x,N){E===!1&&g===void 0?y=C:y=_(y,C,D,b,x,N),E=!0}),y}function w(m,_){if(!m)throw new Error("geojson is required");h(m,function(g,y,E){if(g.geometry!==null){var C=g.geometry.type,D=g.geometry.coordinates;switch(C){case"LineString":if(_(g,y,E,0,0)===!1)return!1;break;case"Polygon":for(var b=0;b<D.length;b++)if(_(n.lineString(D[b],g.properties),y,E,b)===!1)return!1;break}}})}function I(m,_,g){var y=g;return w(m,function(E,C,D,b){C===0&&g===void 0?y=E:y=_(y,E,C,D,b)}),y}function T(m,_){if(_=_||{},!n.isObject(_))throw new Error("options is invalid");var g=_.featureIndex||0,y=_.multiFeatureIndex||0,E=_.geometryIndex||0,C=_.segmentIndex||0,D=_.properties,b;switch(m.type){case"FeatureCollection":g<0&&(g=m.features.length+g),D=D||m.features[g].properties,b=m.features[g].geometry;break;case"Feature":D=D||m.properties,b=m.geometry;break;case"Point":case"MultiPoint":return null;case"LineString":case"Polygon":case"MultiLineString":case"MultiPolygon":b=m;break;default:throw new Error("geojson is invalid")}if(b===null)return null;var x=b.coordinates;switch(b.type){case"Point":case"MultiPoint":return null;case"LineString":return C<0&&(C=x.length+C-1),n.lineString([x[C],x[C+1]],D,_);case"Polygon":return E<0&&(E=x.length+E),C<0&&(C=x[E].length+C-1),n.lineString([x[E][C],x[E][C+1]],D,_);case"MultiLineString":return y<0&&(y=x.length+y),C<0&&(C=x[y].length+C-1),n.lineString([x[y][C],x[y][C+1]],D,_);case"MultiPolygon":return y<0&&(y=x.length+y),E<0&&(E=x[y].length+E),C<0&&(C=x[y][E].length-C-1),n.lineString([x[y][E][C],x[y][E][C+1]],D,_)}throw new Error("geojson is invalid")}function L(m,_){if(_=_||{},!n.isObject(_))throw new Error("options is invalid");var g=_.featureIndex||0,y=_.multiFeatureIndex||0,E=_.geometryIndex||0,C=_.coordIndex||0,D=_.properties,b;switch(m.type){case"FeatureCollection":g<0&&(g=m.features.length+g),D=D||m.features[g].properties,b=m.features[g].geometry;break;case"Feature":D=D||m.properties,b=m.geometry;break;case"Point":case"MultiPoint":return null;case"LineString":case"Polygon":case"MultiLineString":case"MultiPolygon":b=m;break;default:throw new Error("geojson is invalid")}if(b===null)return null;var x=b.coordinates;switch(b.type){case"Point":return n.point(x,D,_);case"MultiPoint":return y<0&&(y=x.length+y),n.point(x[y],D,_);case"LineString":return C<0&&(C=x.length+C),n.point(x[C],D,_);case"Polygon":return E<0&&(E=x.length+E),C<0&&(C=x[E].length+C),n.point(x[E][C],D,_);case"MultiLineString":return y<0&&(y=x.length+y),C<0&&(C=x[y].length+C),n.point(x[y][C],D,_);case"MultiPolygon":return y<0&&(y=x.length+y),E<0&&(E=x[y].length+E),C<0&&(C=x[y][E].length-C),n.point(x[y][E][C],D,_)}throw new Error("geojson is invalid")}return mt.coordAll=a,mt.coordEach=e,mt.coordReduce=t,mt.featureEach=s,mt.featureReduce=o,mt.findPoint=L,mt.findSegment=T,mt.flattenEach=h,mt.flattenReduce=f,mt.geomEach=l,mt.geomReduce=u,mt.lineEach=w,mt.lineReduce=I,mt.propEach=r,mt.propReduce=i,mt.segmentEach=p,mt.segmentReduce=v,mt}var Ou={},ff;function nm(){if(ff)return Ou;ff=1,Object.defineProperty(Ou,"__esModule",{value:!0});var n=hf();function e(t){var r=[1/0,1/0,-1/0,-1/0];return n.coordEach(t,function(i){r[0]>i[0]&&(r[0]=i[0]),r[1]>i[1]&&(r[1]=i[1]),r[2]<i[0]&&(r[2]=i[0]),r[3]<i[1]&&(r[3]=i[1])}),r}return e.default=e,Ou.default=e,Ou}var df;function im(){if(df)return bu.exports;df=1;var n=$h(),e=uf(),t=hf(),r=nm().default,i=t.featureEach;t.coordEach,e.polygon;var s=e.featureCollection;function o(a){var l=new n(a);return l.insert=function(u){if(u.type!=="Feature")throw new Error("invalid feature");return u.bbox=u.bbox?u.bbox:r(u),n.prototype.insert.call(this,u)},l.load=function(u){var h=[];return Array.isArray(u)?u.forEach(function(f){if(f.type!=="Feature")throw new Error("invalid features");f.bbox=f.bbox?f.bbox:r(f),h.push(f)}):i(u,function(f){if(f.type!=="Feature")throw new Error("invalid features");f.bbox=f.bbox?f.bbox:r(f),h.push(f)}),n.prototype.load.call(this,h)},l.remove=function(u,h){if(u.type!=="Feature")throw new Error("invalid feature");return u.bbox=u.bbox?u.bbox:r(u),n.prototype.remove.call(this,u,h)},l.clear=function(){return n.prototype.clear.call(this)},l.search=function(u){var h=n.prototype.search.call(this,this.toBBox(u));return s(h)},l.collides=function(u){return n.prototype.collides.call(this,this.toBBox(u))},l.all=function(){var u=n.prototype.all.call(this);return s(u)},l.toJSON=function(){return n.prototype.toJSON.call(this)},l.fromJSON=function(u){return n.prototype.fromJSON.call(this,u)},l.toBBox=function(u){var h;if(u.bbox)h=u.bbox;else if(Array.isArray(u)&&u.length===4)h=u;else if(Array.isArray(u)&&u.length===6)h=[u[0],u[1],u[3],u[4]];else if(u.type==="Feature")h=r(u);else if(u.type==="FeatureCollection")h=r(u);else throw new Error("invalid geojson");return{minX:h[0],minY:h[1],maxX:h[2],maxY:h[3]}},l}return bu.exports=o,bu.exports.default=o,bu.exports}var sm=im();const om=Qh(sm);function pf(n,e){var t={},r=[];if(n.type==="LineString"&&(n=bn(n)),e.type==="LineString"&&(e=bn(e)),n.type==="Feature"&&e.type==="Feature"&&n.geometry!==null&&e.geometry!==null&&n.geometry.type==="LineString"&&e.geometry.type==="LineString"&&n.geometry.coordinates.length===2&&e.geometry.coordinates.length===2){var i=gf(n,e);return i&&r.push(i),el(r)}var s=om();return s.load(af(e)),Pu(af(n),function(o){Pu(s.search(o),function(a){var l=gf(o,a);if(l){var u=Ys(l).join(",");t[u]||(t[u]=!0,r.push(l))}})}),el(r)}function gf(n,e){var t=Ys(n),r=Ys(e);if(t.length!==2)throw new Error("<intersects> line1 must only contain 2 coordinates");if(r.length!==2)throw new Error("<intersects> line2 must only contain 2 coordinates");var i=t[0][0],s=t[0][1],o=t[1][0],a=t[1][1],l=r[0][0],u=r[0][1],h=r[1][0],f=r[1][1],p=(f-u)*(o-i)-(h-l)*(a-s),v=(h-l)*(s-u)-(f-u)*(i-l),w=(o-i)*(s-u)-(a-s)*(i-l);if(p===0)return null;var I=v/p,T=w/p;if(I>=0&&I<=1&&T>=0&&T<=1){var L=i+I*(o-i),m=s+I*(a-s);return Xe([L,m])}return null}function am(n,e){return pf(On(n),On(e))}function lm(n,e){var t=xi(n,e),r=zl(n,e),i=tl(n,t/2,r);return i}function um(n,e){const t=Xe(n),r=Xe(e),i=lm(t,r),s=(n[2]+e[2])/2;return[...i.geometry.coordinates,s]}function cm(n,e,t){t===void 0&&(t={});var r=Xe([1/0,1/0],{dist:1/0}),i=0;return Nc(n,function(s){for(var o=Ys(s),a=0;a<o.length-1;a++){var l=Xe(o[a]);l.properties.dist=xi(e,l,t);var u=Xe(o[a+1]);u.properties.dist=xi(e,u,t);var h=xi(l,u,t),f=Math.max(l.properties.dist,u.properties.dist),p=zl(l,u),v=tl(e,f,p+90,t),w=tl(e,f,p-90,t),I=pf(On([v.geometry.coordinates,w.geometry.coordinates]),On([l.geometry.coordinates,u.geometry.coordinates])),T=null;I.features.length>0&&(T=I.features[0],T.properties.dist=xi(e,T,t),T.properties.location=i+xi(l,T,t)),l.properties.dist<r.properties.dist&&(r=l,r.properties.index=a,r.properties.location=i),u.properties.dist<r.properties.dist&&(r=u,r.properties.index=a+1,r.properties.location=i+h),T&&T.properties.dist<r.properties.dist&&(r=T,r.properties.index=a),i+=h}}),r}function hm(n,e){const t=Xe(e),r=On(n);return cm(r,t,{units:"meters"})}function mf(n,e,t){t===void 0&&(t={});var r=lr(n),i=lr(e);i[0]+=i[0]-r[0]>180?-360:r[0]-i[0]>180?360:0;var s=fm(r,i),o=Dc(s,"meters",t.units);return o}function fm(n,e,t){t=t===void 0?Ut:Number(t);var r=t,i=n[1]*Math.PI/180,s=e[1]*Math.PI/180,o=s-i,a=Math.abs(e[0]-n[0])*Math.PI/180;a>Math.PI&&(a-=2*Math.PI);var l=Math.log(Math.tan(s/2+Math.PI/4)/Math.tan(i/2+Math.PI/4)),u=Math.abs(l)>1e-11?o/l:Math.cos(i),h=Math.sqrt(o*o+u*u*a*a),f=h*r;return f}function dm(n,e,t){if(t===void 0&&(t={}),t.method||(t.method="geodesic"),t.units||(t.units="kilometers"),!n)throw new Error("pt is required");if(Array.isArray(n)?n=Xe(n):n.type==="Point"?n=bn(n):Yh(n,"Point","point"),!e)throw new Error("line is required");Array.isArray(e)?e=On(e):e.type==="LineString"?e=bn(e):Yh(e,"LineString","line");var r=1/0,i=n.geometry.coordinates;return Rg(e,function(s){var o=s.geometry.coordinates[0],a=s.geometry.coordinates[1],l=pm(i,o,a,t);l<r&&(r=l)}),Dc(r,"degrees",t.units)}function pm(n,e,t,r){var i=[t[0]-e[0],t[1]-e[1]],s=[n[0]-e[0],n[1]-e[1]],o=vf(s,i);if(o<=0)return Rc(n,e,{method:r.method,units:"degrees"});var a=vf(i,i);if(a<=o)return Rc(n,t,{method:r.method,units:"degrees"});var l=o/a,u=[e[0]+l*i[0],e[1]+l*i[1]];return Rc(n,u,{method:r.method,units:"degrees"})}function vf(n,e){return n[0]*e[0]+n[1]*e[1]}function Rc(n,e,t){return t.method==="planar"?mf(n,e,t):xi(n,e,t)}function gm(n,e){const t=Xe(n),r=On(e);return dm(t,r,{units:"meters"})}function mm(n,e,t,r){r===void 0&&(r={});var i=e<0,s=Dc(Math.abs(e),r.units,"meters");i&&(s=-Math.abs(s));var o=lr(n),a=vm(o,s,t);return a[0]+=a[0]-o[0]>180?-360:o[0]-a[0]>180?360:0,Xe(a,r.properties)}function vm(n,e,t,r){r=r===void 0?Ut:Number(r);var i=e/r,s=n[0]*Math.PI/180,o=$t(n[1]),a=$t(t),l=i*Math.cos(a),u=o+l;Math.abs(u)>Math.PI/2&&(u=u>0?Math.PI-u:-Math.PI-u);var h=Math.log(Math.tan(u/2+Math.PI/4)/Math.tan(o/2+Math.PI/4)),f=Math.abs(h)>1e-11?l/h:Math.cos(o),p=i*Math.sin(a)/f,v=s+p;return[(v*180/Math.PI+540)%360-180,u*180/Math.PI]}function ym(n,e,t,r){const[i,s,o]=n,a=mm(Xe([i,s]),e,t,{units:"meters"});if(!(!a||!a.geometry||!a.geometry.coordinates))return r=r||[0,0,0],r[0]=a.geometry.coordinates[0],r[1]=a.geometry.coordinates[1],r[2]=o,r}function yf(n,e){return mf(Xe(n),Xe(e),{units:"meters"})}function _m(n,e,t){t===void 0&&(t={});var r;t.final?r=_f(lr(e),lr(n)):r=_f(lr(n),lr(e));var i=r>180?-(360-r):r;return i}function _f(n,e){var t=$t(n[1]),r=$t(e[1]),i=$t(e[0]-n[0]);i>Math.PI&&(i-=2*Math.PI),i<-Math.PI&&(i+=2*Math.PI);var s=Math.log(Math.tan(r/2+Math.PI/4)/Math.tan(t/2+Math.PI/4)),o=Math.atan2(i,s);return(Cu(o)+360)%360}function wm(n,e){return _m(Xe(n),Xe(e))}function Mn(n){var e=[1/0,1/0,-1/0,-1/0];return rl(n,function(t){e[0]>t[0]&&(e[0]=t[0]),e[1]>t[1]&&(e[1]=t[1]),e[2]<t[0]&&(e[2]=t[0]),e[3]<t[1]&&(e[3]=t[1])}),e}Mn.default=Mn;function xn(n,e,t){if(t===void 0&&(t={}),!n)throw new Error("point is required");if(!e)throw new Error("polygon is required");var r=lr(n),i=Wr(e),s=i.type,o=e.bbox,a=i.coordinates;if(o&&Em(r,o)===!1)return!1;s==="Polygon"&&(a=[a]);for(var l=!1,u=0;u<a.length&&!l;u++)if(wf(r,a[u][0],t.ignoreBoundary)){for(var h=!1,f=1;f<a[u].length&&!h;)wf(r,a[u][f],!t.ignoreBoundary)&&(h=!0),f++;h||(l=!0)}return l}function wf(n,e,t){var r=!1;e[0][0]===e[e.length-1][0]&&e[0][1]===e[e.length-1][1]&&(e=e.slice(0,e.length-1));for(var i=0,s=e.length-1;i<e.length;s=i++){var o=e[i][0],a=e[i][1],l=e[s][0],u=e[s][1],h=n[1]*(o-l)+a*(l-n[0])+u*(n[0]-o)===0&&(o-n[0])*(l-n[0])<=0&&(a-n[1])*(u-n[1])<=0;if(h)return!t;var f=a>n[1]!=u>n[1]&&n[0]<(l-o)*(n[1]-a)/(u-a)+o;f&&(r=!r)}return r}function Em(n,e){return e[0]<=n[0]&&e[1]<=n[1]&&e[2]>=n[0]&&e[3]>=n[1]}function Li(n,e,t){t===void 0&&(t={});for(var r=lr(n),i=Ys(e),s=0;s<i.length-1;s++){var o=!1;if(t.ignoreEndVertices&&(s===0&&(o="start"),s===i.length-2&&(o="end"),s===0&&s+1===i.length-1&&(o="both")),Sm(i[s],i[s+1],r,o,typeof t.epsilon>"u"?null:t.epsilon))return!0}return!1}function Sm(n,e,t,r,i){var s=t[0],o=t[1],a=n[0],l=n[1],u=e[0],h=e[1],f=t[0]-a,p=t[1]-l,v=u-a,w=h-l,I=f*w-p*v;if(i!==null){if(Math.abs(I)>i)return!1}else if(I!==0)return!1;if(r){if(r==="start")return Math.abs(v)>=Math.abs(w)?v>0?a<s&&s<=u:u<=s&&s<a:w>0?l<o&&o<=h:h<=o&&o<l;if(r==="end")return Math.abs(v)>=Math.abs(w)?v>0?a<=s&&s<u:u<s&&s<=a:w>0?l<=o&&o<h:h<o&&o<=l;if(r==="both")return Math.abs(v)>=Math.abs(w)?v>0?a<s&&s<u:u<s&&s<a:w>0?l<o&&o<h:h<o&&o<l}else return Math.abs(v)>=Math.abs(w)?v>0?a<=s&&s<=u:u<=s&&s<=a:w>0?l<=o&&o<=h:h<=o&&o<=l;return!1}function Cm(n,e){var t=Wr(n),r=Wr(e),i=t.type,s=r.type,o=t.coordinates,a=r.coordinates;switch(i){case"Point":switch(s){case"Point":return Fc(o,a);default:throw new Error("feature2 "+s+" geometry not supported")}case"MultiPoint":switch(s){case"Point":return Pm(t,r);case"MultiPoint":return Im(t,r);default:throw new Error("feature2 "+s+" geometry not supported")}case"LineString":switch(s){case"Point":return Li(r,t,{ignoreEndVertices:!0});case"LineString":return Nm(t,r);case"MultiPoint":return Tm(t,r);default:throw new Error("feature2 "+s+" geometry not supported")}case"Polygon":switch(s){case"Point":return xn(r,t,{ignoreBoundary:!0});case"LineString":return bm(t,r);case"Polygon":return Om(t,r);case"MultiPoint":return Dm(t,r);default:throw new Error("feature2 "+s+" geometry not supported")}default:throw new Error("feature1 "+i+" geometry not supported")}}function Pm(n,e){var t,r=!1;for(t=0;t<n.coordinates.length;t++)if(Fc(n.coordinates[t],e.coordinates)){r=!0;break}return r}function Im(n,e){for(var t=0,r=e.coordinates;t<r.length;t++){for(var i=r[t],s=!1,o=0,a=n.coordinates;o<a.length;o++){var l=a[o];if(Fc(i,l)){s=!0;break}}if(!s)return!1}return!0}function Tm(n,e){for(var t=!1,r=0,i=e.coordinates;r<i.length;r++){var s=i[r];if(Li(s,n,{ignoreEndVertices:!0})&&(t=!0),!Li(s,n))return!1}return!!t}function Dm(n,e){for(var t=0,r=e.coordinates;t<r.length;t++){var i=r[t];if(!xn(i,n,{ignoreBoundary:!0}))return!1}return!0}function Nm(n,e){for(var t=!1,r=0,i=e.coordinates;r<i.length;r++){var s=i[r];if(Li({type:"Point",coordinates:s},n,{ignoreEndVertices:!0})&&(t=!0),!Li({type:"Point",coordinates:s},n,{ignoreEndVertices:!1}))return!1}return t}function bm(n,e){var t=!1,r=0,i=Mn(n),s=Mn(e);if(!Ef(i,s))return!1;for(r;r<e.coordinates.length-1;r++){var o=Mm(e.coordinates[r],e.coordinates[r+1]);if(xn({type:"Point",coordinates:o},n,{ignoreBoundary:!0})){t=!0;break}}return t}function Om(n,e){if(n.type==="Feature"&&n.geometry===null||e.type==="Feature"&&e.geometry===null)return!1;var t=Mn(n),r=Mn(e);if(!Ef(t,r))return!1;for(var i=Wr(e).coordinates,s=0,o=i;s<o.length;s++)for(var a=o[s],l=0,u=a;l<u.length;l++){var h=u[l];if(!xn(h,n))return!1}return!0}function Ef(n,e){return!(n[0]>e[0]||n[2]<e[2]||n[1]>e[1]||n[3]<e[3])}function Fc(n,e){return n[0]===e[0]&&n[1]===e[1]}function Mm(n,e){return[(n[0]+e[0])/2,(n[1]+e[1])/2]}function xm(n,e){var t=Wr(n),r=Wr(e),i=t.type,s=r.type;switch(i){case"Point":switch(s){case"MultiPoint":return Lm(t,r);case"LineString":return Li(t,r,{ignoreEndVertices:!0});case"Polygon":case"MultiPolygon":return xn(t,r,{ignoreBoundary:!0});default:throw new Error("feature2 "+s+" geometry not supported")}case"MultiPoint":switch(s){case"MultiPoint":return Am(t,r);case"LineString":return Rm(t,r);case"Polygon":case"MultiPolygon":return Fm(t,r);default:throw new Error("feature2 "+s+" geometry not supported")}case"LineString":switch(s){case"LineString":return km(t,r);case"Polygon":case"MultiPolygon":return Vm(t,r);default:throw new Error("feature2 "+s+" geometry not supported")}case"Polygon":switch(s){case"Polygon":case"MultiPolygon":return zm(t,r);default:throw new Error("feature2 "+s+" geometry not supported")}default:throw new Error("feature1 "+i+" geometry not supported")}}function Lm(n,e){var t,r=!1;for(t=0;t<e.coordinates.length;t++)if(Cf(e.coordinates[t],n.coordinates)){r=!0;break}return r}function Am(n,e){for(var t=0;t<n.coordinates.length;t++){for(var r=!1,i=0;i<e.coordinates.length;i++)Cf(n.coordinates[t],e.coordinates[i])&&(r=!0);if(!r)return!1}return!0}function Rm(n,e){for(var t=!1,r=0;r<n.coordinates.length;r++){if(!Li(n.coordinates[r],e))return!1;t||(t=Li(n.coordinates[r],e,{ignoreEndVertices:!0}))}return t}function Fm(n,e){for(var t=!0,r=!1,i=0;i<n.coordinates.length;i++){if(r=xn(n.coordinates[1],e),!r){t=!1;break}r=xn(n.coordinates[1],e,{ignoreBoundary:!0})}return t&&r}function km(n,e){for(var t=0;t<n.coordinates.length;t++)if(!Li(n.coordinates[t],e))return!1;return!0}function Vm(n,e){var t=Mn(e),r=Mn(n);if(!Sf(t,r))return!1;for(var i=!1,s=0;s<n.coordinates.length-1;s++){if(!xn(n.coordinates[s],e))return!1;if(i||(i=xn(n.coordinates[s],e,{ignoreBoundary:!0})),!i){var o=Um(n.coordinates[s],n.coordinates[s+1]);i=xn(o,e,{ignoreBoundary:!0})}}return i}function zm(n,e){var t=Mn(n),r=Mn(e);if(!Sf(r,t))return!1;for(var i=0;i<n.coordinates[0].length;i++)if(!xn(n.coordinates[0][i],e))return!1;return!0}function Sf(n,e){return!(n[0]>e[0]||n[2]<e[2]||n[1]>e[1]||n[3]<e[3])}function Cf(n,e){return n[0]===e[0]&&n[1]===e[1]}function Um(n,e){return[(n[0]+e[0])/2,(n[1]+e[1])/2]}function Gm(n,e){e===void 0&&(e={});var t=Mn(n),r=(t[0]+t[2])/2,i=(t[1]+t[3])/2;return Xe([r,i],e.properties,e)}"fill"in Array.prototype||Object.defineProperty(Array.prototype,"fill",{configurable:!0,value:function(e){if(this===void 0||this===null)throw new TypeError(this+" is not an object");var t=Object(this),r=Math.max(Math.min(t.length,9007199254740991),0)||0,i=1 in arguments&&parseInt(Number(arguments[1]),10)||0;i=i<0?Math.max(r+i,0):Math.min(i,r);var s=2 in arguments&&arguments[2]!==void 0?parseInt(Number(arguments[2]),10)||0:r;for(s=s<0?Math.max(r+arguments[2],0):Math.min(s,r);i<s;)t[i]=e,++i;return t},writable:!0}),Number.isFinite=Number.isFinite||function(n){return typeof n=="number"&&isFinite(n)},Number.isInteger=Number.isInteger||function(n){return typeof n=="number"&&isFinite(n)&&Math.floor(n)===n},Number.parseFloat=Number.parseFloat||parseFloat,Number.isNaN=Number.isNaN||function(n){return n!==n},Math.trunc=Math.trunc||function(n){return n<0?Math.ceil(n):Math.floor(n)};var Js=function(){};Js.prototype.interfaces_=function(){return[]},Js.prototype.getClass=function(){return Js},Js.prototype.equalsWithTolerance=function(e,t,r){return Math.abs(e-t)<=r};var Ue=function(n){function e(t){n.call(this,t),this.name="IllegalArgumentException",this.message=t,this.stack=new n().stack}return n&&(e.__proto__=n),e.prototype=Object.create(n&&n.prototype),e.prototype.constructor=e,e}(Error),ue=function(){},Pf={MAX_VALUE:{configurable:!0}};ue.isNaN=function(e){return Number.isNaN(e)},ue.doubleToLongBits=function(e){return e},ue.longBitsToDouble=function(e){return e},ue.isInfinite=function(e){return!Number.isFinite(e)},Pf.MAX_VALUE.get=function(){return Number.MAX_VALUE},Object.defineProperties(ue,Pf);var Sr=function(){},Mu=function(){},nl=function(){};function Cr(){}var M=function n(){if(this.x=null,this.y=null,this.z=null,arguments.length===0)this.x=0,this.y=0,this.z=n.NULL_ORDINATE;else if(arguments.length===1){var e=arguments[0];this.x=e.x,this.y=e.y,this.z=e.z}else arguments.length===2?(this.x=arguments[0],this.y=arguments[1],this.z=n.NULL_ORDINATE):arguments.length===3&&(this.x=arguments[0],this.y=arguments[1],this.z=arguments[2])},Zs={DimensionalComparator:{configurable:!0},serialVersionUID:{configurable:!0},NULL_ORDINATE:{configurable:!0},X:{configurable:!0},Y:{configurable:!0},Z:{configurable:!0}};M.prototype.setOrdinate=function(e,t){switch(e){case M.X:this.x=t;break;case M.Y:this.y=t;break;case M.Z:this.z=t;break;default:throw new Ue("Invalid ordinate index: "+e)}},M.prototype.equals2D=function(){if(arguments.length===1){var e=arguments[0];return!(this.x!==e.x||this.y!==e.y)}else if(arguments.length===2){var t=arguments[0],r=arguments[1];return!(!Js.equalsWithTolerance(this.x,t.x,r)||!Js.equalsWithTolerance(this.y,t.y,r))}},M.prototype.getOrdinate=function(e){switch(e){case M.X:return this.x;case M.Y:return this.y;case M.Z:return this.z}throw new Ue("Invalid ordinate index: "+e)},M.prototype.equals3D=function(e){return this.x===e.x&&this.y===e.y&&(this.z===e.z||ue.isNaN(this.z))&&ue.isNaN(e.z)},M.prototype.equals=function(e){return e instanceof M?this.equals2D(e):!1},M.prototype.equalInZ=function(e,t){return Js.equalsWithTolerance(this.z,e.z,t)},M.prototype.compareTo=function(e){var t=e;return this.x<t.x?-1:this.x>t.x?1:this.y<t.y?-1:this.y>t.y?1:0},M.prototype.clone=function(){},M.prototype.copy=function(){return new M(this)},M.prototype.toString=function(){return"("+this.x+", "+this.y+", "+this.z+")"},M.prototype.distance3D=function(e){var t=this.x-e.x,r=this.y-e.y,i=this.z-e.z;return Math.sqrt(t*t+r*r+i*i)},M.prototype.distance=function(e){var t=this.x-e.x,r=this.y-e.y;return Math.sqrt(t*t+r*r)},M.prototype.hashCode=function(){var e=17;return e=37*e+M.hashCode(this.x),e=37*e+M.hashCode(this.y),e},M.prototype.setCoordinate=function(e){this.x=e.x,this.y=e.y,this.z=e.z},M.prototype.interfaces_=function(){return[Sr,Mu,Cr]},M.prototype.getClass=function(){return M},M.hashCode=function(){if(arguments.length===1){var e=arguments[0],t=ue.doubleToLongBits(e);return Math.trunc((t^t)>>>32)}},Zs.DimensionalComparator.get=function(){return Ai},Zs.serialVersionUID.get=function(){return 6683108902428367e3},Zs.NULL_ORDINATE.get=function(){return ue.NaN},Zs.X.get=function(){return 0},Zs.Y.get=function(){return 1},Zs.Z.get=function(){return 2},Object.defineProperties(M,Zs);var Ai=function(e){if(this._dimensionsToTest=2,arguments.length!==0){if(arguments.length===1){var t=arguments[0];if(t!==2&&t!==3)throw new Ue("only 2 or 3 dimensions may be specified");this._dimensionsToTest=t}}};Ai.prototype.compare=function(e,t){var r=e,i=t,s=Ai.compare(r.x,i.x);if(s!==0)return s;var o=Ai.compare(r.y,i.y);if(o!==0)return o;if(this._dimensionsToTest<=2)return 0;var a=Ai.compare(r.z,i.z);return a},Ai.prototype.interfaces_=function(){return[nl]},Ai.prototype.getClass=function(){return Ai},Ai.compare=function(e,t){return e<t?-1:e>t?1:ue.isNaN(e)?ue.isNaN(t)?0:-1:ue.isNaN(t)?1:0};var il=function(){};il.prototype.create=function(){},il.prototype.interfaces_=function(){return[]},il.prototype.getClass=function(){return il};var R=function(){},Wl={INTERIOR:{configurable:!0},BOUNDARY:{configurable:!0},EXTERIOR:{configurable:!0},NONE:{configurable:!0}};R.prototype.interfaces_=function(){return[]},R.prototype.getClass=function(){return R},R.toLocationSymbol=function(e){switch(e){case R.EXTERIOR:return"e";case R.BOUNDARY:return"b";case R.INTERIOR:return"i";case R.NONE:return"-"}throw new Ue("Unknown location value: "+e)},Wl.INTERIOR.get=function(){return 0},Wl.BOUNDARY.get=function(){return 1},Wl.EXTERIOR.get=function(){return 2},Wl.NONE.get=function(){return-1},Object.defineProperties(R,Wl);var ae=function(n,e){return n.interfaces_&&n.interfaces_().indexOf(e)>-1},ur=function(){},If={LOG_10:{configurable:!0}};ur.prototype.interfaces_=function(){return[]},ur.prototype.getClass=function(){return ur},ur.log10=function(e){var t=Math.log(e);return ue.isInfinite(t)||ue.isNaN(t)?t:t/ur.LOG_10},ur.min=function(e,t,r,i){var s=e;return t<s&&(s=t),r<s&&(s=r),i<s&&(s=i),s},ur.clamp=function(){if(typeof arguments[2]=="number"&&typeof arguments[0]=="number"&&typeof arguments[1]=="number"){var e=arguments[0],t=arguments[1],r=arguments[2];return e<t?t:e>r?r:e}else if(Number.isInteger(arguments[2])&&Number.isInteger(arguments[0])&&Number.isInteger(arguments[1])){var i=arguments[0],s=arguments[1],o=arguments[2];return i<s?s:i>o?o:i}},ur.wrap=function(e,t){return e<0?t- -e%t:e%t},ur.max=function(){if(arguments.length===3){var e=arguments[0],t=arguments[1],r=arguments[2],i=e;return t>i&&(i=t),r>i&&(i=r),i}else if(arguments.length===4){var s=arguments[0],o=arguments[1],a=arguments[2],l=arguments[3],u=s;return o>u&&(u=o),a>u&&(u=a),l>u&&(u=l),u}},ur.average=function(e,t){return(e+t)/2},If.LOG_10.get=function(){return Math.log(10)},Object.defineProperties(ur,If);var on=function(e){this.str=e};on.prototype.append=function(e){this.str+=e},on.prototype.setCharAt=function(e,t){this.str=this.str.substr(0,e)+t+this.str.substr(e+1)},on.prototype.toString=function(e){return this.str};var an=function(e){this.value=e};an.prototype.intValue=function(){return this.value},an.prototype.compareTo=function(e){return this.value<e?-1:this.value>e?1:0},an.isNaN=function(e){return Number.isNaN(e)};var ql=function(){};ql.isWhitespace=function(e){return e<=32&&e>=0||e===127},ql.toUpperCase=function(e){return e.toUpperCase()};var V=function n(){if(this._hi=0,this._lo=0,arguments.length===0)this.init(0);else if(arguments.length===1){if(typeof arguments[0]=="number"){var e=arguments[0];this.init(e)}else if(arguments[0]instanceof n){var t=arguments[0];this.init(t)}else if(typeof arguments[0]=="string"){var r=arguments[0];n.call(this,n.parse(r))}}else if(arguments.length===2){var i=arguments[0],s=arguments[1];this.init(i,s)}},qr={PI:{configurable:!0},TWO_PI:{configurable:!0},PI_2:{configurable:!0},E:{configurable:!0},NaN:{configurable:!0},EPS:{configurable:!0},SPLIT:{configurable:!0},MAX_PRINT_DIGITS:{configurable:!0},TEN:{configurable:!0},ONE:{configurable:!0},SCI_NOT_EXPONENT_CHAR:{configurable:!0},SCI_NOT_ZERO:{configurable:!0}};V.prototype.le=function(e){return(this._hi<e._hi||this._hi===e._hi)&&this._lo<=e._lo},V.prototype.extractSignificantDigits=function(e,t){var r=this.abs(),i=V.magnitude(r._hi),s=V.TEN.pow(i);r=r.divide(s),r.gt(V.TEN)?(r=r.divide(V.TEN),i+=1):r.lt(V.ONE)&&(r=r.multiply(V.TEN),i-=1);for(var o=i+1,a=new on,l=V.MAX_PRINT_DIGITS-1,u=0;u<=l;u++){e&&u===o&&a.append(".");var h=Math.trunc(r._hi);if(h<0)break;var f=!1,p=0;h>9?(f=!0,p="9"):p="0"+h,a.append(p),r=r.subtract(V.valueOf(h)).multiply(V.TEN),f&&r.selfAdd(V.TEN);var v=!0,w=V.magnitude(r._hi);if(w<0&&Math.abs(w)>=l-u&&(v=!1),!v)break}return t[0]=i,a.toString()},V.prototype.sqr=function(){return this.multiply(this)},V.prototype.doubleValue=function(){return this._hi+this._lo},V.prototype.subtract=function(){if(arguments[0]instanceof V){var e=arguments[0];return this.add(e.negate())}else if(typeof arguments[0]=="number"){var t=arguments[0];return this.add(-t)}},V.prototype.equals=function(){if(arguments.length===1){var e=arguments[0];return this._hi===e._hi&&this._lo===e._lo}},V.prototype.isZero=function(){return this._hi===0&&this._lo===0},V.prototype.selfSubtract=function(){if(arguments[0]instanceof V){var e=arguments[0];return this.isNaN()?this:this.selfAdd(-e._hi,-e._lo)}else if(typeof arguments[0]=="number"){var t=arguments[0];return this.isNaN()?this:this.selfAdd(-t,0)}},V.prototype.getSpecialNumberString=function(){return this.isZero()?"0.0":this.isNaN()?"NaN ":null},V.prototype.min=function(e){return this.le(e)?this:e},V.prototype.selfDivide=function(){if(arguments.length===1){if(arguments[0]instanceof V){var e=arguments[0];return this.selfDivide(e._hi,e._lo)}else if(typeof arguments[0]=="number"){var t=arguments[0];return this.selfDivide(t,0)}}else if(arguments.length===2){var r=arguments[0],i=arguments[1],s=null,o=null,a=null,l=null,u=null,h=null,f=null,p=null;return u=this._hi/r,h=V.SPLIT*u,s=h-u,p=V.SPLIT*r,s=h-s,o=u-s,a=p-r,f=u*r,a=p-a,l=r-a,p=s*a-f+s*l+o*a+o*l,h=(this._hi-f-p+this._lo-u*i)/r,p=u+h,this._hi=p,this._lo=u-p+h,this}},V.prototype.dump=function(){return"DD<"+this._hi+", "+this._lo+">"},V.prototype.divide=function(){if(arguments[0]instanceof V){var e=arguments[0],t=null,r=null,i=null,s=null,o=null,a=null,l=null,u=null;o=this._hi/e._hi,a=V.SPLIT*o,t=a-o,u=V.SPLIT*e._hi,t=a-t,r=o-t,i=u-e._hi,l=o*e._hi,i=u-i,s=e._hi-i,u=t*i-l+t*s+r*i+r*s,a=(this._hi-l-u+this._lo-o*e._lo)/e._hi,u=o+a;var h=u,f=o-u+a;return new V(h,f)}else if(typeof arguments[0]=="number"){var p=arguments[0];return ue.isNaN(p)?V.createNaN():V.copy(this).selfDivide(p,0)}},V.prototype.ge=function(e){return(this._hi>e._hi||this._hi===e._hi)&&this._lo>=e._lo},V.prototype.pow=function(e){if(e===0)return V.valueOf(1);var t=new V(this),r=V.valueOf(1),i=Math.abs(e);if(i>1)for(;i>0;)i%2===1&&r.selfMultiply(t),i/=2,i>0&&(t=t.sqr());else r=t;return e<0?r.reciprocal():r},V.prototype.ceil=function(){if(this.isNaN())return V.NaN;var e=Math.ceil(this._hi),t=0;return e===this._hi&&(t=Math.ceil(this._lo)),new V(e,t)},V.prototype.compareTo=function(e){var t=e;return this._hi<t._hi?-1:this._hi>t._hi?1:this._lo<t._lo?-1:this._lo>t._lo?1:0},V.prototype.rint=function(){if(this.isNaN())return this;var e=this.add(.5);return e.floor()},V.prototype.setValue=function(){if(arguments[0]instanceof V){var e=arguments[0];return this.init(e),this}else if(typeof arguments[0]=="number"){var t=arguments[0];return this.init(t),this}},V.prototype.max=function(e){return this.ge(e)?this:e},V.prototype.sqrt=function(){if(this.isZero())return V.valueOf(0);if(this.isNegative())return V.NaN;var e=1/Math.sqrt(this._hi),t=this._hi*e,r=V.valueOf(t),i=this.subtract(r.sqr()),s=i._hi*(e*.5);return r.add(s)},V.prototype.selfAdd=function(){if(arguments.length===1){if(arguments[0]instanceof V){var e=arguments[0];return this.selfAdd(e._hi,e._lo)}else if(typeof arguments[0]=="number"){var t=arguments[0],r=null,i=null,s=null,o=null,a=null,l=null;return s=this._hi+t,a=s-this._hi,o=s-a,o=t-a+(this._hi-o),l=o+this._lo,r=s+l,i=l+(s-r),this._hi=r+i,this._lo=i+(r-this._hi),this}}else if(arguments.length===2){var u=arguments[0],h=arguments[1],f=null,p=null,v=null,w=null,I=null,T=null,L=null,m=null;I=this._hi+u,v=this._lo+h,L=I-this._hi,m=v-this._lo,T=I-L,w=v-m,T=u-L+(this._hi-T),w=h-m+(this._lo-w),L=T+v,f=I+L,p=L+(I-f),L=w+p;var _=f+L,g=L+(f-_);return this._hi=_,this._lo=g,this}},V.prototype.selfMultiply=function(){if(arguments.length===1){if(arguments[0]instanceof V){var e=arguments[0];return this.selfMultiply(e._hi,e._lo)}else if(typeof arguments[0]=="number"){var t=arguments[0];return this.selfMultiply(t,0)}}else if(arguments.length===2){var r=arguments[0],i=arguments[1],s=null,o=null,a=null,l=null,u=null,h=null;u=V.SPLIT*this._hi,s=u-this._hi,h=V.SPLIT*r,s=u-s,o=this._hi-s,a=h-r,u=this._hi*r,a=h-a,l=r-a,h=s*a-u+s*l+o*a+o*l+(this._hi*i+this._lo*r);var f=u+h;s=u-f;var p=h+s;return this._hi=f,this._lo=p,this}},V.prototype.selfSqr=function(){return this.selfMultiply(this)},V.prototype.floor=function(){if(this.isNaN())return V.NaN;var e=Math.floor(this._hi),t=0;return e===this._hi&&(t=Math.floor(this._lo)),new V(e,t)},V.prototype.negate=function(){return this.isNaN()?this:new V(-this._hi,-this._lo)},V.prototype.clone=function(){},V.prototype.multiply=function(){if(arguments[0]instanceof V){var e=arguments[0];return e.isNaN()?V.createNaN():V.copy(this).selfMultiply(e)}else if(typeof arguments[0]=="number"){var t=arguments[0];return ue.isNaN(t)?V.createNaN():V.copy(this).selfMultiply(t,0)}},V.prototype.isNaN=function(){return ue.isNaN(this._hi)},V.prototype.intValue=function(){return Math.trunc(this._hi)},V.prototype.toString=function(){var e=V.magnitude(this._hi);return e>=-3&&e<=20?this.toStandardNotation():this.toSciNotation()},V.prototype.toStandardNotation=function(){var e=this.getSpecialNumberString();if(e!==null)return e;var t=new Array(1).fill(null),r=this.extractSignificantDigits(!0,t),i=t[0]+1,s=r;if(r.charAt(0)===".")s="0"+r;else if(i<0)s="0."+V.stringOfChar("0",-i)+r;else if(r.indexOf(".")===-1){var o=i-r.length,a=V.stringOfChar("0",o);s=r+a+".0"}return this.isNegative()?"-"+s:s},V.prototype.reciprocal=function(){var e=null,t=null,r=null,i=null,s=null,o=null,a=null,l=null;s=1/this._hi,o=V.SPLIT*s,e=o-s,l=V.SPLIT*this._hi,e=o-e,t=s-e,r=l-this._hi,a=s*this._hi,r=l-r,i=this._hi-r,l=e*r-a+e*i+t*r+t*i,o=(1-a-l-s*this._lo)/this._hi;var u=s+o,h=s-u+o;return new V(u,h)},V.prototype.toSciNotation=function(){if(this.isZero())return V.SCI_NOT_ZERO;var e=this.getSpecialNumberString();if(e!==null)return e;var t=new Array(1).fill(null),r=this.extractSignificantDigits(!1,t),i=V.SCI_NOT_EXPONENT_CHAR+t[0];if(r.charAt(0)==="0")throw new Error("Found leading zero: "+r);var s="";r.length>1&&(s=r.substring(1));var o=r.charAt(0)+"."+s;return this.isNegative()?"-"+o+i:o+i},V.prototype.abs=function(){return this.isNaN()?V.NaN:this.isNegative()?this.negate():new V(this)},V.prototype.isPositive=function(){return(this._hi>0||this._hi===0)&&this._lo>0},V.prototype.lt=function(e){return(this._hi<e._hi||this._hi===e._hi)&&this._lo<e._lo},V.prototype.add=function(){if(arguments[0]instanceof V){var e=arguments[0];return V.copy(this).selfAdd(e)}else if(typeof arguments[0]=="number"){var t=arguments[0];return V.copy(this).selfAdd(t)}},V.prototype.init=function(){if(arguments.length===1){if(typeof arguments[0]=="number"){var e=arguments[0];this._hi=e,this._lo=0}else if(arguments[0]instanceof V){var t=arguments[0];this._hi=t._hi,this._lo=t._lo}}else if(arguments.length===2){var r=arguments[0],i=arguments[1];this._hi=r,this._lo=i}},V.prototype.gt=function(e){return(this._hi>e._hi||this._hi===e._hi)&&this._lo>e._lo},V.prototype.isNegative=function(){return(this._hi<0||this._hi===0)&&this._lo<0},V.prototype.trunc=function(){return this.isNaN()?V.NaN:this.isPositive()?this.floor():this.ceil()},V.prototype.signum=function(){return this._hi>0?1:this._hi<0?-1:this._lo>0?1:this._lo<0?-1:0},V.prototype.interfaces_=function(){return[Cr,Sr,Mu]},V.prototype.getClass=function(){return V},V.sqr=function(e){return V.valueOf(e).selfMultiply(e)},V.valueOf=function(){if(typeof arguments[0]=="string"){var e=arguments[0];return V.parse(e)}else if(typeof arguments[0]=="number"){var t=arguments[0];return new V(t)}},V.sqrt=function(e){return V.valueOf(e).sqrt()},V.parse=function(e){for(var t=0,r=e.length;ql.isWhitespace(e.charAt(t));)t++;var i=!1;if(t<r){var s=e.charAt(t);(s==="-"||s==="+")&&(t++,s==="-"&&(i=!0))}for(var o=new V,a=0,l=0,u=0;!(t>=r);){var h=e.charAt(t);if(t++,ql.isDigit(h)){var f=h-"0";o.selfMultiply(V.TEN),o.selfAdd(f),a++;continue}if(h==="."){l=a;continue}if(h==="e"||h==="E"){var p=e.substring(t);try{u=an.parseInt(p)}catch(L){throw L instanceof Error?new Error("Invalid exponent "+p+" in string "+e):L}finally{}break}throw new Error("Unexpected character '"+h+"' at position "+t+" in string "+e)}var v=o,w=a-l-u;if(w===0)v=o;else if(w>0){var I=V.TEN.pow(w);v=o.divide(I)}else if(w<0){var T=V.TEN.pow(-w);v=o.multiply(T)}return i?v.negate():v},V.createNaN=function(){return new V(ue.NaN,ue.NaN)},V.copy=function(e){return new V(e)},V.magnitude=function(e){var t=Math.abs(e),r=Math.log(t)/Math.log(10),i=Math.trunc(Math.floor(r)),s=Math.pow(10,i);return s*10<=t&&(i+=1),i},V.stringOfChar=function(e,t){for(var r=new on,i=0;i<t;i++)r.append(e);return r.toString()},qr.PI.get=function(){return new V(3.141592653589793,12246467991473532e-32)},qr.TWO_PI.get=function(){return new V(6.283185307179586,24492935982947064e-32)},qr.PI_2.get=function(){return new V(1.5707963267948966,6123233995736766e-32)},qr.E.get=function(){return new V(2.718281828459045,14456468917292502e-32)},qr.NaN.get=function(){return new V(ue.NaN,ue.NaN)},qr.EPS.get=function(){return 123259516440783e-46},qr.SPLIT.get=function(){return 134217729},qr.MAX_PRINT_DIGITS.get=function(){return 32},qr.TEN.get=function(){return V.valueOf(10)},qr.ONE.get=function(){return V.valueOf(1)},qr.SCI_NOT_EXPONENT_CHAR.get=function(){return"E"},qr.SCI_NOT_ZERO.get=function(){return"0.0E0"},Object.defineProperties(V,qr);var Gt=function(){},Tf={DP_SAFE_EPSILON:{configurable:!0}};Gt.prototype.interfaces_=function(){return[]},Gt.prototype.getClass=function(){return Gt},Gt.orientationIndex=function(e,t,r){var i=Gt.orientationIndexFilter(e,t,r);if(i<=1)return i;var s=V.valueOf(t.x).selfAdd(-e.x),o=V.valueOf(t.y).selfAdd(-e.y),a=V.valueOf(r.x).selfAdd(-t.x),l=V.valueOf(r.y).selfAdd(-t.y);return s.selfMultiply(l).selfSubtract(o.selfMultiply(a)).signum()},Gt.signOfDet2x2=function(e,t,r,i){var s=e.multiply(i).selfSubtract(t.multiply(r));return s.signum()},Gt.intersection=function(e,t,r,i){var s=V.valueOf(i.y).selfSubtract(r.y).selfMultiply(V.valueOf(t.x).selfSubtract(e.x)),o=V.valueOf(i.x).selfSubtract(r.x).selfMultiply(V.valueOf(t.y).selfSubtract(e.y)),a=s.subtract(o),l=V.valueOf(i.x).selfSubtract(r.x).selfMultiply(V.valueOf(e.y).selfSubtract(r.y)),u=V.valueOf(i.y).selfSubtract(r.y).selfMultiply(V.valueOf(e.x).selfSubtract(r.x)),h=l.subtract(u),f=h.selfDivide(a).doubleValue(),p=V.valueOf(e.x).selfAdd(V.valueOf(t.x).selfSubtract(e.x).selfMultiply(f)).doubleValue(),v=V.valueOf(t.x).selfSubtract(e.x).selfMultiply(V.valueOf(e.y).selfSubtract(r.y)),w=V.valueOf(t.y).selfSubtract(e.y).selfMultiply(V.valueOf(e.x).selfSubtract(r.x)),I=v.subtract(w),T=I.selfDivide(a).doubleValue(),L=V.valueOf(r.y).selfAdd(V.valueOf(i.y).selfSubtract(r.y).selfMultiply(T)).doubleValue();return new M(p,L)},Gt.orientationIndexFilter=function(e,t,r){var i=null,s=(e.x-r.x)*(t.y-r.y),o=(e.y-r.y)*(t.x-r.x),a=s-o;if(s>0){if(o<=0)return Gt.signum(a);i=s+o}else if(s<0){if(o>=0)return Gt.signum(a);i=-s-o}else return Gt.signum(a);var l=Gt.DP_SAFE_EPSILON*i;return a>=l||-a>=l?Gt.signum(a):2},Gt.signum=function(e){return e>0?1:e<0?-1:0},Tf.DP_SAFE_EPSILON.get=function(){return 1e-15},Object.defineProperties(Gt,Tf);var Se=function(){},Xl={X:{configurable:!0},Y:{configurable:!0},Z:{configurable:!0},M:{configurable:!0}};Xl.X.get=function(){return 0},Xl.Y.get=function(){return 1},Xl.Z.get=function(){return 2},Xl.M.get=function(){return 3},Se.prototype.setOrdinate=function(e,t,r){},Se.prototype.size=function(){},Se.prototype.getOrdinate=function(e,t){},Se.prototype.getCoordinate=function(){},Se.prototype.getCoordinateCopy=function(e){},Se.prototype.getDimension=function(){},Se.prototype.getX=function(e){},Se.prototype.clone=function(){},Se.prototype.expandEnvelope=function(e){},Se.prototype.copy=function(){},Se.prototype.getY=function(e){},Se.prototype.toCoordinateArray=function(){},Se.prototype.interfaces_=function(){return[Mu]},Se.prototype.getClass=function(){return Se},Object.defineProperties(Se,Xl);var Df=function(){},sl=function(n){function e(){n.call(this,"Projective point not representable on the Cartesian plane.")}return n&&(e.__proto__=n),e.prototype=Object.create(n&&n.prototype),e.prototype.constructor=e,e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e}(Df),vt=function(){};vt.arraycopy=function(e,t,r,i,s){for(var o=0,a=t;a<t+s;a++)r[i+o]=e[a],o++},vt.getProperty=function(e){return{"line.separator":`
4
- `}[e]};var Xr=function n(){if(this.x=null,this.y=null,this.w=null,arguments.length===0)this.x=0,this.y=0,this.w=1;else if(arguments.length===1){var e=arguments[0];this.x=e.x,this.y=e.y,this.w=1}else if(arguments.length===2){if(typeof arguments[0]=="number"&&typeof arguments[1]=="number"){var t=arguments[0],r=arguments[1];this.x=t,this.y=r,this.w=1}else if(arguments[0]instanceof n&&arguments[1]instanceof n){var i=arguments[0],s=arguments[1];this.x=i.y*s.w-s.y*i.w,this.y=s.x*i.w-i.x*s.w,this.w=i.x*s.y-s.x*i.y}else if(arguments[0]instanceof M&&arguments[1]instanceof M){var o=arguments[0],a=arguments[1];this.x=o.y-a.y,this.y=a.x-o.x,this.w=o.x*a.y-a.x*o.y}}else if(arguments.length===3){var l=arguments[0],u=arguments[1],h=arguments[2];this.x=l,this.y=u,this.w=h}else if(arguments.length===4){var f=arguments[0],p=arguments[1],v=arguments[2],w=arguments[3],I=f.y-p.y,T=p.x-f.x,L=f.x*p.y-p.x*f.y,m=v.y-w.y,_=w.x-v.x,g=v.x*w.y-w.x*v.y;this.x=T*g-_*L,this.y=m*L-I*g,this.w=I*_-m*T}};Xr.prototype.getY=function(){var e=this.y/this.w;if(ue.isNaN(e)||ue.isInfinite(e))throw new sl;return e},Xr.prototype.getX=function(){var e=this.x/this.w;if(ue.isNaN(e)||ue.isInfinite(e))throw new sl;return e},Xr.prototype.getCoordinate=function(){var e=new M;return e.x=this.getX(),e.y=this.getY(),e},Xr.prototype.interfaces_=function(){return[]},Xr.prototype.getClass=function(){return Xr},Xr.intersection=function(e,t,r,i){var s=e.y-t.y,o=t.x-e.x,a=e.x*t.y-t.x*e.y,l=r.y-i.y,u=i.x-r.x,h=r.x*i.y-i.x*r.y,f=o*h-u*a,p=l*a-s*h,v=s*u-l*o,w=f/v,I=p/v;if(ue.isNaN(w)||ue.isInfinite(w)||ue.isNaN(I)||ue.isInfinite(I))throw new sl;return new M(w,I)};var te=function n(){if(this._minx=null,this._maxx=null,this._miny=null,this._maxy=null,arguments.length===0)this.init();else if(arguments.length===1){if(arguments[0]instanceof M){var e=arguments[0];this.init(e.x,e.x,e.y,e.y)}else if(arguments[0]instanceof n){var t=arguments[0];this.init(t)}}else if(arguments.length===2){var r=arguments[0],i=arguments[1];this.init(r.x,i.x,r.y,i.y)}else if(arguments.length===4){var s=arguments[0],o=arguments[1],a=arguments[2],l=arguments[3];this.init(s,o,a,l)}},Nf={serialVersionUID:{configurable:!0}};te.prototype.getArea=function(){return this.getWidth()*this.getHeight()},te.prototype.equals=function(e){if(!(e instanceof te))return!1;var t=e;return this.isNull()?t.isNull():this._maxx===t.getMaxX()&&this._maxy===t.getMaxY()&&this._minx===t.getMinX()&&this._miny===t.getMinY()},te.prototype.intersection=function(e){if(this.isNull()||e.isNull()||!this.intersects(e))return new te;var t=this._minx>e._minx?this._minx:e._minx,r=this._miny>e._miny?this._miny:e._miny,i=this._maxx<e._maxx?this._maxx:e._maxx,s=this._maxy<e._maxy?this._maxy:e._maxy;return new te(t,i,r,s)},te.prototype.isNull=function(){return this._maxx<this._minx},te.prototype.getMaxX=function(){return this._maxx},te.prototype.covers=function(){if(arguments.length===1){if(arguments[0]instanceof M){var e=arguments[0];return this.covers(e.x,e.y)}else if(arguments[0]instanceof te){var t=arguments[0];return this.isNull()||t.isNull()?!1:t.getMinX()>=this._minx&&t.getMaxX()<=this._maxx&&t.getMinY()>=this._miny&&t.getMaxY()<=this._maxy}}else if(arguments.length===2){var r=arguments[0],i=arguments[1];return this.isNull()?!1:r>=this._minx&&r<=this._maxx&&i>=this._miny&&i<=this._maxy}},te.prototype.intersects=function(){if(arguments.length===1){if(arguments[0]instanceof te){var e=arguments[0];return this.isNull()||e.isNull()?!1:!(e._minx>this._maxx||e._maxx<this._minx||e._miny>this._maxy||e._maxy<this._miny)}else if(arguments[0]instanceof M){var t=arguments[0];return this.intersects(t.x,t.y)}}else if(arguments.length===2){var r=arguments[0],i=arguments[1];return this.isNull()?!1:!(r>this._maxx||r<this._minx||i>this._maxy||i<this._miny)}},te.prototype.getMinY=function(){return this._miny},te.prototype.getMinX=function(){return this._minx},te.prototype.expandToInclude=function(){if(arguments.length===1){if(arguments[0]instanceof M){var e=arguments[0];this.expandToInclude(e.x,e.y)}else if(arguments[0]instanceof te){var t=arguments[0];if(t.isNull())return null;this.isNull()?(this._minx=t.getMinX(),this._maxx=t.getMaxX(),this._miny=t.getMinY(),this._maxy=t.getMaxY()):(t._minx<this._minx&&(this._minx=t._minx),t._maxx>this._maxx&&(this._maxx=t._maxx),t._miny<this._miny&&(this._miny=t._miny),t._maxy>this._maxy&&(this._maxy=t._maxy))}}else if(arguments.length===2){var r=arguments[0],i=arguments[1];this.isNull()?(this._minx=r,this._maxx=r,this._miny=i,this._maxy=i):(r<this._minx&&(this._minx=r),r>this._maxx&&(this._maxx=r),i<this._miny&&(this._miny=i),i>this._maxy&&(this._maxy=i))}},te.prototype.minExtent=function(){if(this.isNull())return 0;var e=this.getWidth(),t=this.getHeight();return e<t?e:t},te.prototype.getWidth=function(){return this.isNull()?0:this._maxx-this._minx},te.prototype.compareTo=function(e){var t=e;return this.isNull()?t.isNull()?0:-1:t.isNull()?1:this._minx<t._minx?-1:this._minx>t._minx?1:this._miny<t._miny?-1:this._miny>t._miny?1:this._maxx<t._maxx?-1:this._maxx>t._maxx?1:this._maxy<t._maxy?-1:this._maxy>t._maxy?1:0},te.prototype.translate=function(e,t){if(this.isNull())return null;this.init(this.getMinX()+e,this.getMaxX()+e,this.getMinY()+t,this.getMaxY()+t)},te.prototype.toString=function(){return"Env["+this._minx+" : "+this._maxx+", "+this._miny+" : "+this._maxy+"]"},te.prototype.setToNull=function(){this._minx=0,this._maxx=-1,this._miny=0,this._maxy=-1},te.prototype.getHeight=function(){return this.isNull()?0:this._maxy-this._miny},te.prototype.maxExtent=function(){if(this.isNull())return 0;var e=this.getWidth(),t=this.getHeight();return e>t?e:t},te.prototype.expandBy=function(){if(arguments.length===1){var e=arguments[0];this.expandBy(e,e)}else if(arguments.length===2){var t=arguments[0],r=arguments[1];if(this.isNull())return null;this._minx-=t,this._maxx+=t,this._miny-=r,this._maxy+=r,(this._minx>this._maxx||this._miny>this._maxy)&&this.setToNull()}},te.prototype.contains=function(){if(arguments.length===1){if(arguments[0]instanceof te){var e=arguments[0];return this.covers(e)}else if(arguments[0]instanceof M){var t=arguments[0];return this.covers(t)}}else if(arguments.length===2){var r=arguments[0],i=arguments[1];return this.covers(r,i)}},te.prototype.centre=function(){return this.isNull()?null:new M((this.getMinX()+this.getMaxX())/2,(this.getMinY()+this.getMaxY())/2)},te.prototype.init=function(){if(arguments.length===0)this.setToNull();else if(arguments.length===1){if(arguments[0]instanceof M){var e=arguments[0];this.init(e.x,e.x,e.y,e.y)}else if(arguments[0]instanceof te){var t=arguments[0];this._minx=t._minx,this._maxx=t._maxx,this._miny=t._miny,this._maxy=t._maxy}}else if(arguments.length===2){var r=arguments[0],i=arguments[1];this.init(r.x,i.x,r.y,i.y)}else if(arguments.length===4){var s=arguments[0],o=arguments[1],a=arguments[2],l=arguments[3];s<o?(this._minx=s,this._maxx=o):(this._minx=o,this._maxx=s),a<l?(this._miny=a,this._maxy=l):(this._miny=l,this._maxy=a)}},te.prototype.getMaxY=function(){return this._maxy},te.prototype.distance=function(e){if(this.intersects(e))return 0;var t=0;this._maxx<e._minx?t=e._minx-this._maxx:this._minx>e._maxx&&(t=this._minx-e._maxx);var r=0;return this._maxy<e._miny?r=e._miny-this._maxy:this._miny>e._maxy&&(r=this._miny-e._maxy),t===0?r:r===0?t:Math.sqrt(t*t+r*r)},te.prototype.hashCode=function(){var e=17;return e=37*e+M.hashCode(this._minx),e=37*e+M.hashCode(this._maxx),e=37*e+M.hashCode(this._miny),e=37*e+M.hashCode(this._maxy),e},te.prototype.interfaces_=function(){return[Sr,Cr]},te.prototype.getClass=function(){return te},te.intersects=function(){if(arguments.length===3){var e=arguments[0],t=arguments[1],r=arguments[2];return r.x>=(e.x<t.x?e.x:t.x)&&r.x<=(e.x>t.x?e.x:t.x)&&r.y>=(e.y<t.y?e.y:t.y)&&r.y<=(e.y>t.y?e.y:t.y)}else if(arguments.length===4){var i=arguments[0],s=arguments[1],o=arguments[2],a=arguments[3],l=Math.min(o.x,a.x),u=Math.max(o.x,a.x),h=Math.min(i.x,s.x),f=Math.max(i.x,s.x);return!(h>u||f<l||(l=Math.min(o.y,a.y),u=Math.max(o.y,a.y),h=Math.min(i.y,s.y),f=Math.max(i.y,s.y),h>u)||f<l)}},Nf.serialVersionUID.get=function(){return 5873921885273102e3},Object.defineProperties(te,Nf);var ln={typeStr:/^\s*(\w+)\s*\(\s*(.*)\s*\)\s*$/,emptyTypeStr:/^\s*(\w+)\s*EMPTY\s*$/,spaces:/\s+/,parenComma:/\)\s*,\s*\(/,doubleParenComma:/\)\s*\)\s*,\s*\(\s*\(/,trimParens:/^\s*\(?(.*?)\)?\s*$/},xu=function(e){this.geometryFactory=e||new ge};xu.prototype.read=function(e){var t,r,i;e=e.replace(/[\n\r]/g," ");var s=ln.typeStr.exec(e);if(e.search("EMPTY")!==-1&&(s=ln.emptyTypeStr.exec(e),s[2]=void 0),s&&(r=s[1].toLowerCase(),i=s[2],ol[r]&&(t=ol[r].apply(this,[i]))),t===void 0)throw new Error("Could not parse WKT "+e);return t},xu.prototype.write=function(e){return this.extractGeometry(e)},xu.prototype.extractGeometry=function(e){var t=e.getGeometryType().toLowerCase();if(!si[t])return null;var r=t.toUpperCase(),i;return e.isEmpty()?i=r+" EMPTY":i=r+"("+si[t].apply(this,[e])+")",i};var si={coordinate:function(e){return e.x+" "+e.y},point:function(e){return si.coordinate.call(this,e._coordinates._coordinates[0])},multipoint:function(e){for(var t=this,r=[],i=0,s=e._geometries.length;i<s;++i)r.push("("+si.point.apply(t,[e._geometries[i]])+")");return r.join(",")},linestring:function(e){for(var t=this,r=[],i=0,s=e._points._coordinates.length;i<s;++i)r.push(si.coordinate.apply(t,[e._points._coordinates[i]]));return r.join(",")},linearring:function(e){for(var t=this,r=[],i=0,s=e._points._coordinates.length;i<s;++i)r.push(si.coordinate.apply(t,[e._points._coordinates[i]]));return r.join(",")},multilinestring:function(e){for(var t=this,r=[],i=0,s=e._geometries.length;i<s;++i)r.push("("+si.linestring.apply(t,[e._geometries[i]])+")");return r.join(",")},polygon:function(e){var t=this,r=[];r.push("("+si.linestring.apply(this,[e._shell])+")");for(var i=0,s=e._holes.length;i<s;++i)r.push("("+si.linestring.apply(t,[e._holes[i]])+")");return r.join(",")},multipolygon:function(e){for(var t=this,r=[],i=0,s=e._geometries.length;i<s;++i)r.push("("+si.polygon.apply(t,[e._geometries[i]])+")");return r.join(",")},geometrycollection:function(e){for(var t=this,r=[],i=0,s=e._geometries.length;i<s;++i)r.push(t.extractGeometry(e._geometries[i]));return r.join(",")}},ol={point:function(e){if(e===void 0)return this.geometryFactory.createPoint();var t=e.trim().split(ln.spaces);return this.geometryFactory.createPoint(new M(Number.parseFloat(t[0]),Number.parseFloat(t[1])))},multipoint:function(e){var t=this;if(e===void 0)return this.geometryFactory.createMultiPoint();for(var r,i=e.trim().split(","),s=[],o=0,a=i.length;o<a;++o)r=i[o].replace(ln.trimParens,"$1"),s.push(ol.point.apply(t,[r]));return this.geometryFactory.createMultiPoint(s)},linestring:function(e){if(e===void 0)return this.geometryFactory.createLineString();for(var t=e.trim().split(","),r=[],i,s=0,o=t.length;s<o;++s)i=t[s].trim().split(ln.spaces),r.push(new M(Number.parseFloat(i[0]),Number.parseFloat(i[1])));return this.geometryFactory.createLineString(r)},linearring:function(e){if(e===void 0)return this.geometryFactory.createLinearRing();for(var t=e.trim().split(","),r=[],i,s=0,o=t.length;s<o;++s)i=t[s].trim().split(ln.spaces),r.push(new M(Number.parseFloat(i[0]),Number.parseFloat(i[1])));return this.geometryFactory.createLinearRing(r)},multilinestring:function(e){var t=this;if(e===void 0)return this.geometryFactory.createMultiLineString();for(var r,i=e.trim().split(ln.parenComma),s=[],o=0,a=i.length;o<a;++o)r=i[o].replace(ln.trimParens,"$1"),s.push(ol.linestring.apply(t,[r]));return this.geometryFactory.createMultiLineString(s)},polygon:function(e){var t=this;if(e===void 0)return this.geometryFactory.createPolygon();for(var r,i,s,o=e.trim().split(ln.parenComma),a,l=[],u=0,h=o.length;u<h;++u)r=o[u].replace(ln.trimParens,"$1"),i=ol.linestring.apply(t,[r]),s=t.geometryFactory.createLinearRing(i._points),u===0?a=s:l.push(s);return this.geometryFactory.createPolygon(a,l)},multipolygon:function(e){var t=this;if(e===void 0)return this.geometryFactory.createMultiPolygon();for(var r,i=e.trim().split(ln.doubleParenComma),s=[],o=0,a=i.length;o<a;++o)r=i[o].replace(ln.trimParens,"$1"),s.push(ol.polygon.apply(t,[r]));return this.geometryFactory.createMultiPolygon(s)},geometrycollection:function(e){var t=this;if(e===void 0)return this.geometryFactory.createGeometryCollection();e=e.replace(/,\s*([A-Za-z])/g,"|$1");for(var r=e.trim().split("|"),i=[],s=0,o=r.length;s<o;++s)i.push(t.read(r[s]));return this.geometryFactory.createGeometryCollection(i)}},Hr=function(e){this.parser=new xu(e)};Hr.prototype.write=function(e){return this.parser.write(e)},Hr.toLineString=function(e,t){if(arguments.length!==2)throw new Error("Not implemented");return"LINESTRING ( "+e.x+" "+e.y+", "+t.x+" "+t.y+" )"};var oi=function(n){function e(t){n.call(this,t),this.name="RuntimeException",this.message=t,this.stack=new n().stack}return n&&(e.__proto__=n),e.prototype=Object.create(n&&n.prototype),e.prototype.constructor=e,e}(Error),Lu=function(n){function e(){if(n.call(this),arguments.length===0)n.call(this);else if(arguments.length===1){var t=arguments[0];n.call(this,t)}}return n&&(e.__proto__=n),e.prototype=Object.create(n&&n.prototype),e.prototype.constructor=e,e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e}(oi),fe=function(){};fe.prototype.interfaces_=function(){return[]},fe.prototype.getClass=function(){return fe},fe.shouldNeverReachHere=function(){if(arguments.length===0)fe.shouldNeverReachHere(null);else if(arguments.length===1){var e=arguments[0];throw new Lu("Should never reach here"+(e!==null?": "+e:""))}},fe.isTrue=function(){var e,t;if(arguments.length===1)e=arguments[0],fe.isTrue(e,null);else if(arguments.length===2&&(e=arguments[0],t=arguments[1],!e))throw t===null?new Lu:new Lu(t)},fe.equals=function(){var e,t,r;if(arguments.length===2)e=arguments[0],t=arguments[1],fe.equals(e,t,null);else if(arguments.length===3&&(e=arguments[0],t=arguments[1],r=arguments[2],!t.equals(e)))throw new Lu("Expected "+e+" but encountered "+t+(r!==null?": "+r:""))};var He=function(){this._result=null,this._inputLines=Array(2).fill().map(function(){return Array(2)}),this._intPt=new Array(2).fill(null),this._intLineIndex=null,this._isProper=null,this._pa=null,this._pb=null,this._precisionModel=null,this._intPt[0]=new M,this._intPt[1]=new M,this._pa=this._intPt[0],this._pb=this._intPt[1],this._result=0},Ks={DONT_INTERSECT:{configurable:!0},DO_INTERSECT:{configurable:!0},COLLINEAR:{configurable:!0},NO_INTERSECTION:{configurable:!0},POINT_INTERSECTION:{configurable:!0},COLLINEAR_INTERSECTION:{configurable:!0}};He.prototype.getIndexAlongSegment=function(e,t){return this.computeIntLineIndex(),this._intLineIndex[e][t]},He.prototype.getTopologySummary=function(){var e=new on;return this.isEndPoint()&&e.append(" endpoint"),this._isProper&&e.append(" proper"),this.isCollinear()&&e.append(" collinear"),e.toString()},He.prototype.computeIntersection=function(e,t,r,i){this._inputLines[0][0]=e,this._inputLines[0][1]=t,this._inputLines[1][0]=r,this._inputLines[1][1]=i,this._result=this.computeIntersect(e,t,r,i)},He.prototype.getIntersectionNum=function(){return this._result},He.prototype.computeIntLineIndex=function(){if(arguments.length===0)this._intLineIndex===null&&(this._intLineIndex=Array(2).fill().map(function(){return Array(2)}),this.computeIntLineIndex(0),this.computeIntLineIndex(1));else if(arguments.length===1){var e=arguments[0],t=this.getEdgeDistance(e,0),r=this.getEdgeDistance(e,1);t>r?(this._intLineIndex[e][0]=0,this._intLineIndex[e][1]=1):(this._intLineIndex[e][0]=1,this._intLineIndex[e][1]=0)}},He.prototype.isProper=function(){return this.hasIntersection()&&this._isProper},He.prototype.setPrecisionModel=function(e){this._precisionModel=e},He.prototype.isInteriorIntersection=function(){var e=this;if(arguments.length===0)return!!(this.isInteriorIntersection(0)||this.isInteriorIntersection(1));if(arguments.length===1){for(var t=arguments[0],r=0;r<this._result;r++)if(!(e._intPt[r].equals2D(e._inputLines[t][0])||e._intPt[r].equals2D(e._inputLines[t][1])))return!0;return!1}},He.prototype.getIntersection=function(e){return this._intPt[e]},He.prototype.isEndPoint=function(){return this.hasIntersection()&&!this._isProper},He.prototype.hasIntersection=function(){return this._result!==He.NO_INTERSECTION},He.prototype.getEdgeDistance=function(e,t){var r=He.computeEdgeDistance(this._intPt[t],this._inputLines[e][0],this._inputLines[e][1]);return r},He.prototype.isCollinear=function(){return this._result===He.COLLINEAR_INTERSECTION},He.prototype.toString=function(){return Hr.toLineString(this._inputLines[0][0],this._inputLines[0][1])+" - "+Hr.toLineString(this._inputLines[1][0],this._inputLines[1][1])+this.getTopologySummary()},He.prototype.getEndpoint=function(e,t){return this._inputLines[e][t]},He.prototype.isIntersection=function(e){for(var t=this,r=0;r<this._result;r++)if(t._intPt[r].equals2D(e))return!0;return!1},He.prototype.getIntersectionAlongSegment=function(e,t){return this.computeIntLineIndex(),this._intPt[this._intLineIndex[e][t]]},He.prototype.interfaces_=function(){return[]},He.prototype.getClass=function(){return He},He.computeEdgeDistance=function(e,t,r){var i=Math.abs(r.x-t.x),s=Math.abs(r.y-t.y),o=-1;if(e.equals(t))o=0;else if(e.equals(r))i>s?o=i:o=s;else{var a=Math.abs(e.x-t.x),l=Math.abs(e.y-t.y);i>s?o=a:o=l,o===0&&!e.equals(t)&&(o=Math.max(a,l))}return fe.isTrue(!(o===0&&!e.equals(t)),"Bad distance calculation"),o},He.nonRobustComputeEdgeDistance=function(e,t,r){var i=e.x-t.x,s=e.y-t.y,o=Math.sqrt(i*i+s*s);return fe.isTrue(!(o===0&&!e.equals(t)),"Invalid distance calculation"),o},Ks.DONT_INTERSECT.get=function(){return 0},Ks.DO_INTERSECT.get=function(){return 1},Ks.COLLINEAR.get=function(){return 2},Ks.NO_INTERSECTION.get=function(){return 0},Ks.POINT_INTERSECTION.get=function(){return 1},Ks.COLLINEAR_INTERSECTION.get=function(){return 2},Object.defineProperties(He,Ks);var hs=function(n){function e(){n.apply(this,arguments)}return n&&(e.__proto__=n),e.prototype=Object.create(n&&n.prototype),e.prototype.constructor=e,e.prototype.isInSegmentEnvelopes=function(r){var i=new te(this._inputLines[0][0],this._inputLines[0][1]),s=new te(this._inputLines[1][0],this._inputLines[1][1]);return i.contains(r)&&s.contains(r)},e.prototype.computeIntersection=function(){if(arguments.length===3){var r=arguments[0],i=arguments[1],s=arguments[2];if(this._isProper=!1,te.intersects(i,s,r)&&Y.orientationIndex(i,s,r)===0&&Y.orientationIndex(s,i,r)===0)return this._isProper=!0,(r.equals(i)||r.equals(s))&&(this._isProper=!1),this._result=n.POINT_INTERSECTION,null;this._result=n.NO_INTERSECTION}else return n.prototype.computeIntersection.apply(this,arguments)},e.prototype.normalizeToMinimum=function(r,i,s,o,a){a.x=this.smallestInAbsValue(r.x,i.x,s.x,o.x),a.y=this.smallestInAbsValue(r.y,i.y,s.y,o.y),r.x-=a.x,r.y-=a.y,i.x-=a.x,i.y-=a.y,s.x-=a.x,s.y-=a.y,o.x-=a.x,o.y-=a.y},e.prototype.safeHCoordinateIntersection=function(r,i,s,o){var a=null;try{a=Xr.intersection(r,i,s,o)}catch(l){if(l instanceof sl)a=e.nearestEndpoint(r,i,s,o);else throw l}finally{}return a},e.prototype.intersection=function(r,i,s,o){var a=this.intersectionWithNormalization(r,i,s,o);return this.isInSegmentEnvelopes(a)||(a=new M(e.nearestEndpoint(r,i,s,o))),this._precisionModel!==null&&this._precisionModel.makePrecise(a),a},e.prototype.smallestInAbsValue=function(r,i,s,o){var a=r,l=Math.abs(a);return Math.abs(i)<l&&(a=i,l=Math.abs(i)),Math.abs(s)<l&&(a=s,l=Math.abs(s)),Math.abs(o)<l&&(a=o),a},e.prototype.checkDD=function(r,i,s,o,a){var l=Gt.intersection(r,i,s,o),u=this.isInSegmentEnvelopes(l);vt.out.println("DD in env = "+u+" --------------------- "+l),a.distance(l)>1e-4&&vt.out.println("Distance = "+a.distance(l))},e.prototype.intersectionWithNormalization=function(r,i,s,o){var a=new M(r),l=new M(i),u=new M(s),h=new M(o),f=new M;this.normalizeToEnvCentre(a,l,u,h,f);var p=this.safeHCoordinateIntersection(a,l,u,h);return p.x+=f.x,p.y+=f.y,p},e.prototype.computeCollinearIntersection=function(r,i,s,o){var a=te.intersects(r,i,s),l=te.intersects(r,i,o),u=te.intersects(s,o,r),h=te.intersects(s,o,i);return a&&l?(this._intPt[0]=s,this._intPt[1]=o,n.COLLINEAR_INTERSECTION):u&&h?(this._intPt[0]=r,this._intPt[1]=i,n.COLLINEAR_INTERSECTION):a&&u?(this._intPt[0]=s,this._intPt[1]=r,s.equals(r)&&!l&&!h?n.POINT_INTERSECTION:n.COLLINEAR_INTERSECTION):a&&h?(this._intPt[0]=s,this._intPt[1]=i,s.equals(i)&&!l&&!u?n.POINT_INTERSECTION:n.COLLINEAR_INTERSECTION):l&&u?(this._intPt[0]=o,this._intPt[1]=r,o.equals(r)&&!a&&!h?n.POINT_INTERSECTION:n.COLLINEAR_INTERSECTION):l&&h?(this._intPt[0]=o,this._intPt[1]=i,o.equals(i)&&!a&&!u?n.POINT_INTERSECTION:n.COLLINEAR_INTERSECTION):n.NO_INTERSECTION},e.prototype.normalizeToEnvCentre=function(r,i,s,o,a){var l=r.x<i.x?r.x:i.x,u=r.y<i.y?r.y:i.y,h=r.x>i.x?r.x:i.x,f=r.y>i.y?r.y:i.y,p=s.x<o.x?s.x:o.x,v=s.y<o.y?s.y:o.y,w=s.x>o.x?s.x:o.x,I=s.y>o.y?s.y:o.y,T=l>p?l:p,L=h<w?h:w,m=u>v?u:v,_=f<I?f:I,g=(T+L)/2,y=(m+_)/2;a.x=g,a.y=y,r.x-=a.x,r.y-=a.y,i.x-=a.x,i.y-=a.y,s.x-=a.x,s.y-=a.y,o.x-=a.x,o.y-=a.y},e.prototype.computeIntersect=function(r,i,s,o){if(this._isProper=!1,!te.intersects(r,i,s,o))return n.NO_INTERSECTION;var a=Y.orientationIndex(r,i,s),l=Y.orientationIndex(r,i,o);if(a>0&&l>0||a<0&&l<0)return n.NO_INTERSECTION;var u=Y.orientationIndex(s,o,r),h=Y.orientationIndex(s,o,i);if(u>0&&h>0||u<0&&h<0)return n.NO_INTERSECTION;var f=a===0&&l===0&&u===0&&h===0;return f?this.computeCollinearIntersection(r,i,s,o):(a===0||l===0||u===0||h===0?(this._isProper=!1,r.equals2D(s)||r.equals2D(o)?this._intPt[0]=r:i.equals2D(s)||i.equals2D(o)?this._intPt[0]=i:a===0?this._intPt[0]=new M(s):l===0?this._intPt[0]=new M(o):u===0?this._intPt[0]=new M(r):h===0&&(this._intPt[0]=new M(i))):(this._isProper=!0,this._intPt[0]=this.intersection(r,i,s,o)),n.POINT_INTERSECTION)},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e.nearestEndpoint=function(r,i,s,o){var a=r,l=Y.distancePointLine(r,s,o),u=Y.distancePointLine(i,s,o);return u<l&&(l=u,a=i),u=Y.distancePointLine(s,r,i),u<l&&(l=u,a=s),u=Y.distancePointLine(o,r,i),u<l&&(l=u,a=o),a},e}(He),Qs=function(){};Qs.prototype.interfaces_=function(){return[]},Qs.prototype.getClass=function(){return Qs},Qs.orientationIndex=function(e,t,r){var i=t.x-e.x,s=t.y-e.y,o=r.x-t.x,a=r.y-t.y;return Qs.signOfDet2x2(i,s,o,a)},Qs.signOfDet2x2=function(e,t,r,i){var s=null,o=null,a=null;if(s=1,e===0||i===0)return t===0||r===0?0:t>0?r>0?-s:s:r>0?s:-s;if(t===0||r===0)return i>0?e>0?s:-s:e>0?-s:s;if(t>0?i>0?t<=i||(s=-s,o=e,e=r,r=o,o=t,t=i,i=o):t<=-i?(s=-s,r=-r,i=-i):(o=e,e=-r,r=o,o=t,t=-i,i=o):i>0?-t<=i?(s=-s,e=-e,t=-t):(o=-e,e=r,r=o,o=-t,t=i,i=o):t>=i?(e=-e,t=-t,r=-r,i=-i):(s=-s,o=-e,e=-r,r=o,o=-t,t=-i,i=o),e>0)if(r>0){if(!(e<=r))return s}else return s;else{if(r>0)return-s;if(e>=r)s=-s,e=-e,r=-r;else return-s}for(;;){if(a=Math.floor(r/e),r=r-a*e,i=i-a*t,i<0)return-s;if(i>t)return s;if(e>r+r){if(t<i+i)return s}else{if(t>i+i)return-s;r=e-r,i=t-i,s=-s}if(i===0)return r===0?0:-s;if(r===0||(a=Math.floor(e/r),e=e-a*r,t=t-a*i,t<0))return s;if(t>i)return-s;if(r>e+e){if(i<t+t)return-s}else{if(i>t+t)return s;e=r-e,t=i-t,s=-s}if(t===0)return e===0?0:s;if(e===0)return-s}};var un=function(){this._p=null,this._crossingCount=0,this._isPointOnSegment=!1;var e=arguments[0];this._p=e};un.prototype.countSegment=function(e,t){if(e.x<this._p.x&&t.x<this._p.x)return null;if(this._p.x===t.x&&this._p.y===t.y)return this._isPointOnSegment=!0,null;if(e.y===this._p.y&&t.y===this._p.y){var r=e.x,i=t.x;return r>i&&(r=t.x,i=e.x),this._p.x>=r&&this._p.x<=i&&(this._isPointOnSegment=!0),null}if(e.y>this._p.y&&t.y<=this._p.y||t.y>this._p.y&&e.y<=this._p.y){var s=e.x-this._p.x,o=e.y-this._p.y,a=t.x-this._p.x,l=t.y-this._p.y,u=Qs.signOfDet2x2(s,o,a,l);if(u===0)return this._isPointOnSegment=!0,null;l<o&&(u=-u),u>0&&this._crossingCount++}},un.prototype.isPointInPolygon=function(){return this.getLocation()!==R.EXTERIOR},un.prototype.getLocation=function(){return this._isPointOnSegment?R.BOUNDARY:this._crossingCount%2===1?R.INTERIOR:R.EXTERIOR},un.prototype.isOnSegment=function(){return this._isPointOnSegment},un.prototype.interfaces_=function(){return[]},un.prototype.getClass=function(){return un},un.locatePointInRing=function(){if(arguments[0]instanceof M&&ae(arguments[1],Se)){for(var e=arguments[0],t=arguments[1],r=new un(e),i=new M,s=new M,o=1;o<t.size();o++)if(t.getCoordinate(o,i),t.getCoordinate(o-1,s),r.countSegment(i,s),r.isOnSegment())return r.getLocation();return r.getLocation()}else if(arguments[0]instanceof M&&arguments[1]instanceof Array){for(var a=arguments[0],l=arguments[1],u=new un(a),h=1;h<l.length;h++){var f=l[h],p=l[h-1];if(u.countSegment(f,p),u.isOnSegment())return u.getLocation()}return u.getLocation()}};var Y=function(){},Bs={CLOCKWISE:{configurable:!0},RIGHT:{configurable:!0},COUNTERCLOCKWISE:{configurable:!0},LEFT:{configurable:!0},COLLINEAR:{configurable:!0},STRAIGHT:{configurable:!0}};Y.prototype.interfaces_=function(){return[]},Y.prototype.getClass=function(){return Y},Y.orientationIndex=function(e,t,r){return Gt.orientationIndex(e,t,r)},Y.signedArea=function(){if(arguments[0]instanceof Array){var e=arguments[0];if(e.length<3)return 0;for(var t=0,r=e[0].x,i=1;i<e.length-1;i++){var s=e[i].x-r,o=e[i+1].y,a=e[i-1].y;t+=s*(a-o)}return t/2}else if(ae(arguments[0],Se)){var l=arguments[0],u=l.size();if(u<3)return 0;var h=new M,f=new M,p=new M;l.getCoordinate(0,f),l.getCoordinate(1,p);var v=f.x;p.x-=v;for(var w=0,I=1;I<u-1;I++)h.y=f.y,f.x=p.x,f.y=p.y,l.getCoordinate(I+1,p),p.x-=v,w+=f.x*(h.y-p.y);return w/2}},Y.distanceLineLine=function(e,t,r,i){if(e.equals(t))return Y.distancePointLine(e,r,i);if(r.equals(i))return Y.distancePointLine(i,e,t);var s=!1;if(!te.intersects(e,t,r,i))s=!0;else{var o=(t.x-e.x)*(i.y-r.y)-(t.y-e.y)*(i.x-r.x);if(o===0)s=!0;else{var a=(e.y-r.y)*(i.x-r.x)-(e.x-r.x)*(i.y-r.y),l=(e.y-r.y)*(t.x-e.x)-(e.x-r.x)*(t.y-e.y),u=l/o,h=a/o;(h<0||h>1||u<0||u>1)&&(s=!0)}}return s?ur.min(Y.distancePointLine(e,r,i),Y.distancePointLine(t,r,i),Y.distancePointLine(r,e,t),Y.distancePointLine(i,e,t)):0},Y.isPointInRing=function(e,t){return Y.locatePointInRing(e,t)!==R.EXTERIOR},Y.computeLength=function(e){var t=e.size();if(t<=1)return 0;var r=0,i=new M;e.getCoordinate(0,i);for(var s=i.x,o=i.y,a=1;a<t;a++){e.getCoordinate(a,i);var l=i.x,u=i.y,h=l-s,f=u-o;r+=Math.sqrt(h*h+f*f),s=l,o=u}return r},Y.isCCW=function(e){var t=e.length-1;if(t<3)throw new Ue("Ring has fewer than 4 points, so orientation cannot be determined");for(var r=e[0],i=0,s=1;s<=t;s++){var o=e[s];o.y>r.y&&(r=o,i=s)}var a=i;do a=a-1,a<0&&(a=t);while(e[a].equals2D(r)&&a!==i);var l=i;do l=(l+1)%t;while(e[l].equals2D(r)&&l!==i);var u=e[a],h=e[l];if(u.equals2D(r)||h.equals2D(r)||u.equals2D(h))return!1;var f=Y.computeOrientation(u,r,h),p=!1;return f===0?p=u.x>h.x:p=f>0,p},Y.locatePointInRing=function(e,t){return un.locatePointInRing(e,t)},Y.distancePointLinePerpendicular=function(e,t,r){var i=(r.x-t.x)*(r.x-t.x)+(r.y-t.y)*(r.y-t.y),s=((t.y-e.y)*(r.x-t.x)-(t.x-e.x)*(r.y-t.y))/i;return Math.abs(s)*Math.sqrt(i)},Y.computeOrientation=function(e,t,r){return Y.orientationIndex(e,t,r)},Y.distancePointLine=function(){if(arguments.length===2){var e=arguments[0],t=arguments[1];if(t.length===0)throw new Ue("Line array must contain at least one vertex");for(var r=e.distance(t[0]),i=0;i<t.length-1;i++){var s=Y.distancePointLine(e,t[i],t[i+1]);s<r&&(r=s)}return r}else if(arguments.length===3){var o=arguments[0],a=arguments[1],l=arguments[2];if(a.x===l.x&&a.y===l.y)return o.distance(a);var u=(l.x-a.x)*(l.x-a.x)+(l.y-a.y)*(l.y-a.y),h=((o.x-a.x)*(l.x-a.x)+(o.y-a.y)*(l.y-a.y))/u;if(h<=0)return o.distance(a);if(h>=1)return o.distance(l);var f=((a.y-o.y)*(l.x-a.x)-(a.x-o.x)*(l.y-a.y))/u;return Math.abs(f)*Math.sqrt(u)}},Y.isOnLine=function(e,t){for(var r=new hs,i=1;i<t.length;i++){var s=t[i-1],o=t[i];if(r.computeIntersection(e,s,o),r.hasIntersection())return!0}return!1},Bs.CLOCKWISE.get=function(){return-1},Bs.RIGHT.get=function(){return Y.CLOCKWISE},Bs.COUNTERCLOCKWISE.get=function(){return 1},Bs.LEFT.get=function(){return Y.COUNTERCLOCKWISE},Bs.COLLINEAR.get=function(){return 0},Bs.STRAIGHT.get=function(){return Y.COLLINEAR},Object.defineProperties(Y,Bs);var ai=function(){};ai.prototype.filter=function(e){},ai.prototype.interfaces_=function(){return[]},ai.prototype.getClass=function(){return ai};var oe=function(){var e=arguments[0];this._envelope=null,this._factory=null,this._SRID=null,this._userData=null,this._factory=e,this._SRID=e.getSRID()},Ln={serialVersionUID:{configurable:!0},SORTINDEX_POINT:{configurable:!0},SORTINDEX_MULTIPOINT:{configurable:!0},SORTINDEX_LINESTRING:{configurable:!0},SORTINDEX_LINEARRING:{configurable:!0},SORTINDEX_MULTILINESTRING:{configurable:!0},SORTINDEX_POLYGON:{configurable:!0},SORTINDEX_MULTIPOLYGON:{configurable:!0},SORTINDEX_GEOMETRYCOLLECTION:{configurable:!0},geometryChangedFilter:{configurable:!0}};oe.prototype.isGeometryCollection=function(){return this.getSortIndex()===oe.SORTINDEX_GEOMETRYCOLLECTION},oe.prototype.getFactory=function(){return this._factory},oe.prototype.getGeometryN=function(e){return this},oe.prototype.getArea=function(){return 0},oe.prototype.isRectangle=function(){return!1},oe.prototype.equals=function(){if(arguments[0]instanceof oe){var e=arguments[0];return e===null?!1:this.equalsTopo(e)}else if(arguments[0]instanceof Object){var t=arguments[0];if(!(t instanceof oe))return!1;var r=t;return this.equalsExact(r)}},oe.prototype.equalsExact=function(e){return this===e||this.equalsExact(e,0)},oe.prototype.geometryChanged=function(){this.apply(oe.geometryChangedFilter)},oe.prototype.geometryChangedAction=function(){this._envelope=null},oe.prototype.equalsNorm=function(e){return e===null?!1:this.norm().equalsExact(e.norm())},oe.prototype.getLength=function(){return 0},oe.prototype.getNumGeometries=function(){return 1},oe.prototype.compareTo=function(){if(arguments.length===1){var e=arguments[0],t=e;return this.getSortIndex()!==t.getSortIndex()?this.getSortIndex()-t.getSortIndex():this.isEmpty()&&t.isEmpty()?0:this.isEmpty()?-1:t.isEmpty()?1:this.compareToSameClass(e)}else if(arguments.length===2){var r=arguments[0],i=arguments[1];return this.getSortIndex()!==r.getSortIndex()?this.getSortIndex()-r.getSortIndex():this.isEmpty()&&r.isEmpty()?0:this.isEmpty()?-1:r.isEmpty()?1:this.compareToSameClass(r,i)}},oe.prototype.getUserData=function(){return this._userData},oe.prototype.getSRID=function(){return this._SRID},oe.prototype.getEnvelope=function(){return this.getFactory().toGeometry(this.getEnvelopeInternal())},oe.prototype.checkNotGeometryCollection=function(e){if(e.getSortIndex()===oe.SORTINDEX_GEOMETRYCOLLECTION)throw new Ue("This method does not support GeometryCollection arguments")},oe.prototype.equal=function(e,t,r){return r===0?e.equals(t):e.distance(t)<=r},oe.prototype.norm=function(){var e=this.copy();return e.normalize(),e},oe.prototype.getPrecisionModel=function(){return this._factory.getPrecisionModel()},oe.prototype.getEnvelopeInternal=function(){return this._envelope===null&&(this._envelope=this.computeEnvelopeInternal()),new te(this._envelope)},oe.prototype.setSRID=function(e){this._SRID=e},oe.prototype.setUserData=function(e){this._userData=e},oe.prototype.compare=function(e,t){for(var r=e.iterator(),i=t.iterator();r.hasNext()&&i.hasNext();){var s=r.next(),o=i.next(),a=s.compareTo(o);if(a!==0)return a}return r.hasNext()?1:i.hasNext()?-1:0},oe.prototype.hashCode=function(){return this.getEnvelopeInternal().hashCode()},oe.prototype.isGeometryCollectionOrDerived=function(){return this.getSortIndex()===oe.SORTINDEX_GEOMETRYCOLLECTION||this.getSortIndex()===oe.SORTINDEX_MULTIPOINT||this.getSortIndex()===oe.SORTINDEX_MULTILINESTRING||this.getSortIndex()===oe.SORTINDEX_MULTIPOLYGON},oe.prototype.interfaces_=function(){return[Mu,Sr,Cr]},oe.prototype.getClass=function(){return oe},oe.hasNonEmptyElements=function(e){for(var t=0;t<e.length;t++)if(!e[t].isEmpty())return!0;return!1},oe.hasNullElements=function(e){for(var t=0;t<e.length;t++)if(e[t]===null)return!0;return!1},Ln.serialVersionUID.get=function(){return 8763622679187377e3},Ln.SORTINDEX_POINT.get=function(){return 0},Ln.SORTINDEX_MULTIPOINT.get=function(){return 1},Ln.SORTINDEX_LINESTRING.get=function(){return 2},Ln.SORTINDEX_LINEARRING.get=function(){return 3},Ln.SORTINDEX_MULTILINESTRING.get=function(){return 4},Ln.SORTINDEX_POLYGON.get=function(){return 5},Ln.SORTINDEX_MULTIPOLYGON.get=function(){return 6},Ln.SORTINDEX_GEOMETRYCOLLECTION.get=function(){return 7},Ln.geometryChangedFilter.get=function(){return kc},Object.defineProperties(oe,Ln);var kc=function(){};kc.interfaces_=function(){return[ai]},kc.filter=function(e){e.geometryChangedAction()};var An=function(){};An.prototype.filter=function(e){},An.prototype.interfaces_=function(){return[]},An.prototype.getClass=function(){return An};var Pr=function(){},li={Mod2BoundaryNodeRule:{configurable:!0},EndPointBoundaryNodeRule:{configurable:!0},MultiValentEndPointBoundaryNodeRule:{configurable:!0},MonoValentEndPointBoundaryNodeRule:{configurable:!0},MOD2_BOUNDARY_RULE:{configurable:!0},ENDPOINT_BOUNDARY_RULE:{configurable:!0},MULTIVALENT_ENDPOINT_BOUNDARY_RULE:{configurable:!0},MONOVALENT_ENDPOINT_BOUNDARY_RULE:{configurable:!0},OGC_SFS_BOUNDARY_RULE:{configurable:!0}};Pr.prototype.isInBoundary=function(e){},Pr.prototype.interfaces_=function(){return[]},Pr.prototype.getClass=function(){return Pr},li.Mod2BoundaryNodeRule.get=function(){return al},li.EndPointBoundaryNodeRule.get=function(){return ll},li.MultiValentEndPointBoundaryNodeRule.get=function(){return ul},li.MonoValentEndPointBoundaryNodeRule.get=function(){return cl},li.MOD2_BOUNDARY_RULE.get=function(){return new al},li.ENDPOINT_BOUNDARY_RULE.get=function(){return new ll},li.MULTIVALENT_ENDPOINT_BOUNDARY_RULE.get=function(){return new ul},li.MONOVALENT_ENDPOINT_BOUNDARY_RULE.get=function(){return new cl},li.OGC_SFS_BOUNDARY_RULE.get=function(){return Pr.MOD2_BOUNDARY_RULE},Object.defineProperties(Pr,li);var al=function(){};al.prototype.isInBoundary=function(e){return e%2===1},al.prototype.interfaces_=function(){return[Pr]},al.prototype.getClass=function(){return al};var ll=function(){};ll.prototype.isInBoundary=function(e){return e>0},ll.prototype.interfaces_=function(){return[Pr]},ll.prototype.getClass=function(){return ll};var ul=function(){};ul.prototype.isInBoundary=function(e){return e>1},ul.prototype.interfaces_=function(){return[Pr]},ul.prototype.getClass=function(){return ul};var cl=function(){};cl.prototype.isInBoundary=function(e){return e===1},cl.prototype.interfaces_=function(){return[Pr]},cl.prototype.getClass=function(){return cl};var nt=function(){};nt.prototype.add=function(){},nt.prototype.addAll=function(){},nt.prototype.isEmpty=function(){},nt.prototype.iterator=function(){},nt.prototype.size=function(){},nt.prototype.toArray=function(){},nt.prototype.remove=function(){};function Vc(n){this.message=n||""}Vc.prototype=new Error,Vc.prototype.name="IndexOutOfBoundsException";var hl=function(){};hl.prototype.hasNext=function(){},hl.prototype.next=function(){},hl.prototype.remove=function(){};var Yr=function(n){function e(){n.apply(this,arguments)}return n&&(e.__proto__=n),e.prototype=Object.create(n&&n.prototype),e.prototype.constructor=e,e.prototype.get=function(){},e.prototype.set=function(){},e.prototype.isEmpty=function(){},e}(nt);function fl(n){this.message=n||""}fl.prototype=new Error,fl.prototype.name="NoSuchElementException";var W=function(n){function e(){n.call(this),this.array_=[],arguments[0]instanceof nt&&this.addAll(arguments[0])}return n&&(e.__proto__=n),e.prototype=Object.create(n&&n.prototype),e.prototype.constructor=e,e.prototype.ensureCapacity=function(){},e.prototype.interfaces_=function(){return[n,nt]},e.prototype.add=function(r){return arguments.length===1?this.array_.push(r):this.array_.splice(arguments[0],arguments[1]),!0},e.prototype.clear=function(){this.array_=[]},e.prototype.addAll=function(r){for(var i=this,s=r.iterator();s.hasNext();)i.add(s.next());return!0},e.prototype.set=function(r,i){var s=this.array_[r];return this.array_[r]=i,s},e.prototype.iterator=function(){return new Wm(this)},e.prototype.get=function(r){if(r<0||r>=this.size())throw new Vc;return this.array_[r]},e.prototype.isEmpty=function(){return this.array_.length===0},e.prototype.size=function(){return this.array_.length},e.prototype.toArray=function(){for(var r=this,i=[],s=0,o=this.array_.length;s<o;s++)i.push(r.array_[s]);return i},e.prototype.remove=function(r){for(var i=this,s=!1,o=0,a=this.array_.length;o<a;o++)if(i.array_[o]===r){i.array_.splice(o,1),s=!0;break}return s},e}(Yr),Wm=function(n){function e(t){n.call(this),this.arrayList_=t,this.position_=0}return n&&(e.__proto__=n),e.prototype=Object.create(n&&n.prototype),e.prototype.constructor=e,e.prototype.next=function(){if(this.position_===this.arrayList_.size())throw new fl;return this.arrayList_.get(this.position_++)},e.prototype.hasNext=function(){return this.position_<this.arrayList_.size()},e.prototype.set=function(r){return this.arrayList_.set(this.position_-1,r)},e.prototype.remove=function(){this.arrayList_.remove(this.arrayList_.get(this.position_))},e}(hl),Hl=function(n){function e(){if(n.call(this),arguments.length!==0){if(arguments.length===1){var r=arguments[0];this.ensureCapacity(r.length),this.add(r,!0)}else if(arguments.length===2){var i=arguments[0],s=arguments[1];this.ensureCapacity(i.length),this.add(i,s)}}}n&&(e.__proto__=n),e.prototype=Object.create(n&&n.prototype),e.prototype.constructor=e;var t={coordArrayType:{configurable:!0}};return t.coordArrayType.get=function(){return new Array(0).fill(null)},e.prototype.getCoordinate=function(i){return this.get(i)},e.prototype.addAll=function(){var i=this;if(arguments.length===2){for(var s=arguments[0],o=arguments[1],a=!1,l=s.iterator();l.hasNext();)i.add(l.next(),o),a=!0;return a}else return n.prototype.addAll.apply(this,arguments)},e.prototype.clone=function(){for(var i=this,s=n.prototype.clone.call(this),o=0;o<this.size();o++)s.add(o,i.get(o).copy());return s},e.prototype.toCoordinateArray=function(){return this.toArray(e.coordArrayType)},e.prototype.add=function(){var i=this;if(arguments.length===1){var s=arguments[0];n.prototype.add.call(this,s)}else if(arguments.length===2){if(arguments[0]instanceof Array&&typeof arguments[1]=="boolean"){var o=arguments[0],a=arguments[1];return this.add(o,a,!0),!0}else if(arguments[0]instanceof M&&typeof arguments[1]=="boolean"){var l=arguments[0],u=arguments[1];if(!u&&this.size()>=1){var h=this.get(this.size()-1);if(h.equals2D(l))return null}n.prototype.add.call(this,l)}else if(arguments[0]instanceof Object&&typeof arguments[1]=="boolean"){var f=arguments[0],p=arguments[1];return this.add(f,p),!0}}else if(arguments.length===3){if(typeof arguments[2]=="boolean"&&arguments[0]instanceof Array&&typeof arguments[1]=="boolean"){var v=arguments[0],w=arguments[1],I=arguments[2];if(I)for(var T=0;T<v.length;T++)i.add(v[T],w);else for(var L=v.length-1;L>=0;L--)i.add(v[L],w);return!0}else if(typeof arguments[2]=="boolean"&&Number.isInteger(arguments[0])&&arguments[1]instanceof M){var m=arguments[0],_=arguments[1],g=arguments[2];if(!g){var y=this.size();if(y>0){if(m>0){var E=this.get(m-1);if(E.equals2D(_))return null}if(m<y){var C=this.get(m);if(C.equals2D(_))return null}}}n.prototype.add.call(this,m,_)}}else if(arguments.length===4){var D=arguments[0],b=arguments[1],x=arguments[2],N=arguments[3],O=1;x>N&&(O=-1);for(var A=x;A!==N;A+=O)i.add(D[A],b);return!0}},e.prototype.closeRing=function(){this.size()>0&&this.add(new M(this.get(0)),!1)},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},Object.defineProperties(e,t),e}(W),pe=function(){},Au={ForwardComparator:{configurable:!0},BidirectionalComparator:{configurable:!0},coordArrayType:{configurable:!0}};Au.ForwardComparator.get=function(){return Yl},Au.BidirectionalComparator.get=function(){return dl},Au.coordArrayType.get=function(){return new Array(0).fill(null)},pe.prototype.interfaces_=function(){return[]},pe.prototype.getClass=function(){return pe},pe.isRing=function(e){return!(e.length<4||!e[0].equals2D(e[e.length-1]))},pe.ptNotInList=function(e,t){for(var r=0;r<e.length;r++){var i=e[r];if(pe.indexOf(i,t)<0)return i}return null},pe.scroll=function(e,t){var r=pe.indexOf(t,e);if(r<0)return null;var i=new Array(e.length).fill(null);vt.arraycopy(e,r,i,0,e.length-r),vt.arraycopy(e,0,i,e.length-r,r),vt.arraycopy(i,0,e,0,e.length)},pe.equals=function(){if(arguments.length===2){var e=arguments[0],t=arguments[1];if(e===t)return!0;if(e===null||t===null||e.length!==t.length)return!1;for(var r=0;r<e.length;r++)if(!e[r].equals(t[r]))return!1;return!0}else if(arguments.length===3){var i=arguments[0],s=arguments[1],o=arguments[2];if(i===s)return!0;if(i===null||s===null||i.length!==s.length)return!1;for(var a=0;a<i.length;a++)if(o.compare(i[a],s[a])!==0)return!1;return!0}},pe.intersection=function(e,t){for(var r=new Hl,i=0;i<e.length;i++)t.intersects(e[i])&&r.add(e[i],!0);return r.toCoordinateArray()},pe.hasRepeatedPoints=function(e){for(var t=1;t<e.length;t++)if(e[t-1].equals(e[t]))return!0;return!1},pe.removeRepeatedPoints=function(e){if(!pe.hasRepeatedPoints(e))return e;var t=new Hl(e,!1);return t.toCoordinateArray()},pe.reverse=function(e){for(var t=e.length-1,r=Math.trunc(t/2),i=0;i<=r;i++){var s=e[i];e[i]=e[t-i],e[t-i]=s}},pe.removeNull=function(e){for(var t=0,r=0;r<e.length;r++)e[r]!==null&&t++;var i=new Array(t).fill(null);if(t===0)return i;for(var s=0,o=0;o<e.length;o++)e[o]!==null&&(i[s++]=e[o]);return i},pe.copyDeep=function(){if(arguments.length===1){for(var e=arguments[0],t=new Array(e.length).fill(null),r=0;r<e.length;r++)t[r]=new M(e[r]);return t}else if(arguments.length===5)for(var i=arguments[0],s=arguments[1],o=arguments[2],a=arguments[3],l=arguments[4],u=0;u<l;u++)o[a+u]=new M(i[s+u])},pe.isEqualReversed=function(e,t){for(var r=0;r<e.length;r++){var i=e[r],s=t[e.length-r-1];if(i.compareTo(s)!==0)return!1}return!0},pe.envelope=function(e){for(var t=new te,r=0;r<e.length;r++)t.expandToInclude(e[r]);return t},pe.toCoordinateArray=function(e){return e.toArray(pe.coordArrayType)},pe.atLeastNCoordinatesOrNothing=function(e,t){return t.length>=e?t:[]},pe.indexOf=function(e,t){for(var r=0;r<t.length;r++)if(e.equals(t[r]))return r;return-1},pe.increasingDirection=function(e){for(var t=0;t<Math.trunc(e.length/2);t++){var r=e.length-1-t,i=e[t].compareTo(e[r]);if(i!==0)return i}return 1},pe.compare=function(e,t){for(var r=0;r<e.length&&r<t.length;){var i=e[r].compareTo(t[r]);if(i!==0)return i;r++}return r<t.length?-1:r<e.length?1:0},pe.minCoordinate=function(e){for(var t=null,r=0;r<e.length;r++)(t===null||t.compareTo(e[r])>0)&&(t=e[r]);return t},pe.extract=function(e,t,r){t=ur.clamp(t,0,e.length),r=ur.clamp(r,-1,e.length);var i=r-t+1;r<0&&(i=0),t>=e.length&&(i=0),r<t&&(i=0);var s=new Array(i).fill(null);if(i===0)return s;for(var o=0,a=t;a<=r;a++)s[o++]=e[a];return s},Object.defineProperties(pe,Au);var Yl=function(){};Yl.prototype.compare=function(e,t){var r=e,i=t;return pe.compare(r,i)},Yl.prototype.interfaces_=function(){return[nl]},Yl.prototype.getClass=function(){return Yl};var dl=function(){};dl.prototype.compare=function(e,t){var r=e,i=t;if(r.length<i.length)return-1;if(r.length>i.length)return 1;if(r.length===0)return 0;var s=pe.compare(r,i),o=pe.isEqualReversed(r,i);return o?0:s},dl.prototype.OLDcompare=function(e,t){var r=e,i=t;if(r.length<i.length)return-1;if(r.length>i.length)return 1;if(r.length===0)return 0;for(var s=pe.increasingDirection(r),o=pe.increasingDirection(i),a=s>0?0:r.length-1,l=o>0?0:r.length-1,u=0;u<r.length;u++){var h=r[a].compareTo(i[l]);if(h!==0)return h;a+=s,l+=o}return 0},dl.prototype.interfaces_=function(){return[nl]},dl.prototype.getClass=function(){return dl};var $s=function(){};$s.prototype.get=function(){},$s.prototype.put=function(){},$s.prototype.size=function(){},$s.prototype.values=function(){},$s.prototype.entrySet=function(){};var qm=function(n){function e(){n.apply(this,arguments)}return n&&(e.__proto__=n),e.prototype=Object.create(n&&n.prototype),e.prototype.constructor=e,e}($s);function Jl(n){this.message=n||""}Jl.prototype=new Error,Jl.prototype.name="OperationNotSupported";function Ru(){}Ru.prototype=new nt,Ru.prototype.contains=function(){};var zc=function(n){function e(){n.call(this),this.array_=[],arguments[0]instanceof nt&&this.addAll(arguments[0])}return n&&(e.__proto__=n),e.prototype=Object.create(n&&n.prototype),e.prototype.constructor=e,e.prototype.contains=function(r){for(var i=this,s=0,o=this.array_.length;s<o;s++){var a=i.array_[s];if(a===r)return!0}return!1},e.prototype.add=function(r){return this.contains(r)?!1:(this.array_.push(r),!0)},e.prototype.addAll=function(r){for(var i=this,s=r.iterator();s.hasNext();)i.add(s.next());return!0},e.prototype.remove=function(r){throw new Error},e.prototype.size=function(){return this.array_.length},e.prototype.isEmpty=function(){return this.array_.length===0},e.prototype.toArray=function(){for(var r=this,i=[],s=0,o=this.array_.length;s<o;s++)i.push(r.array_[s]);return i},e.prototype.iterator=function(){return new Xm(this)},e}(Ru),Xm=function(n){function e(t){n.call(this),this.hashSet_=t,this.position_=0}return n&&(e.__proto__=n),e.prototype=Object.create(n&&n.prototype),e.prototype.constructor=e,e.prototype.next=function(){if(this.position_===this.hashSet_.size())throw new fl;return this.hashSet_.array_[this.position_++]},e.prototype.hasNext=function(){return this.position_<this.hashSet_.size()},e.prototype.remove=function(){throw new Jl},e}(hl),ui=0,fs=1;function bf(n){return n===null?ui:n.color}function Ae(n){return n===null?null:n.parent}function ci(n,e){n!==null&&(n.color=e)}function Uc(n){return n===null?null:n.left}function Of(n){return n===null?null:n.right}function Tt(){this.root_=null,this.size_=0}Tt.prototype=new qm,Tt.prototype.get=function(n){for(var e=this.root_;e!==null;){var t=n.compareTo(e.key);if(t<0)e=e.left;else if(t>0)e=e.right;else return e.value}return null},Tt.prototype.put=function(n,e){if(this.root_===null)return this.root_={key:n,value:e,left:null,right:null,parent:null,color:ui,getValue:function(){return this.value},getKey:function(){return this.key}},this.size_=1,null;var t=this.root_,r,i;do if(r=t,i=n.compareTo(t.key),i<0)t=t.left;else if(i>0)t=t.right;else{var s=t.value;return t.value=e,s}while(t!==null);var o={key:n,left:null,right:null,value:e,parent:r,color:ui,getValue:function(){return this.value},getKey:function(){return this.key}};return i<0?r.left=o:r.right=o,this.fixAfterInsertion(o),this.size_++,null},Tt.prototype.fixAfterInsertion=function(n){var e=this;for(n.color=fs;n!=null&&n!==this.root_&&n.parent.color===fs;)if(Ae(n)===Uc(Ae(Ae(n)))){var t=Of(Ae(Ae(n)));bf(t)===fs?(ci(Ae(n),ui),ci(t,ui),ci(Ae(Ae(n)),fs),n=Ae(Ae(n))):(n===Of(Ae(n))&&(n=Ae(n),e.rotateLeft(n)),ci(Ae(n),ui),ci(Ae(Ae(n)),fs),e.rotateRight(Ae(Ae(n))))}else{var r=Uc(Ae(Ae(n)));bf(r)===fs?(ci(Ae(n),ui),ci(r,ui),ci(Ae(Ae(n)),fs),n=Ae(Ae(n))):(n===Uc(Ae(n))&&(n=Ae(n),e.rotateRight(n)),ci(Ae(n),ui),ci(Ae(Ae(n)),fs),e.rotateLeft(Ae(Ae(n))))}this.root_.color=ui},Tt.prototype.values=function(){var n=new W,e=this.getFirstEntry();if(e!==null)for(n.add(e.value);(e=Tt.successor(e))!==null;)n.add(e.value);return n},Tt.prototype.entrySet=function(){var n=new zc,e=this.getFirstEntry();if(e!==null)for(n.add(e);(e=Tt.successor(e))!==null;)n.add(e);return n},Tt.prototype.rotateLeft=function(n){if(n!=null){var e=n.right;n.right=e.left,e.left!=null&&(e.left.parent=n),e.parent=n.parent,n.parent===null?this.root_=e:n.parent.left===n?n.parent.left=e:n.parent.right=e,e.left=n,n.parent=e}},Tt.prototype.rotateRight=function(n){if(n!=null){var e=n.left;n.left=e.right,e.right!=null&&(e.right.parent=n),e.parent=n.parent,n.parent===null?this.root_=e:n.parent.right===n?n.parent.right=e:n.parent.left=e,e.right=n,n.parent=e}},Tt.prototype.getFirstEntry=function(){var n=this.root_;if(n!=null)for(;n.left!=null;)n=n.left;return n},Tt.successor=function(n){if(n===null)return null;if(n.right!==null){for(var e=n.right;e.left!==null;)e=e.left;return e}else{for(var t=n.parent,r=n;t!==null&&r===t.right;)r=t,t=t.parent;return t}},Tt.prototype.size=function(){return this.size_};var Zl=function(){};Zl.prototype.interfaces_=function(){return[]},Zl.prototype.getClass=function(){return Zl};function Mf(){}Mf.prototype=new Ru;function cn(){this.array_=[],arguments[0]instanceof nt&&this.addAll(arguments[0])}cn.prototype=new Mf,cn.prototype.contains=function(n){for(var e=this,t=0,r=this.array_.length;t<r;t++){var i=e.array_[t];if(i.compareTo(n)===0)return!0}return!1},cn.prototype.add=function(n){var e=this;if(this.contains(n))return!1;for(var t=0,r=this.array_.length;t<r;t++){var i=e.array_[t];if(i.compareTo(n)===1)return e.array_.splice(t,0,n),!0}return this.array_.push(n),!0},cn.prototype.addAll=function(n){for(var e=this,t=n.iterator();t.hasNext();)e.add(t.next());return!0},cn.prototype.remove=function(n){throw new Jl},cn.prototype.size=function(){return this.array_.length},cn.prototype.isEmpty=function(){return this.array_.length===0},cn.prototype.toArray=function(){for(var n=this,e=[],t=0,r=this.array_.length;t<r;t++)e.push(n.array_[t]);return e},cn.prototype.iterator=function(){return new Fu(this)};var Fu=function(n){this.treeSet_=n,this.position_=0};Fu.prototype.next=function(){if(this.position_===this.treeSet_.size())throw new fl;return this.treeSet_.array_[this.position_++]},Fu.prototype.hasNext=function(){return this.position_<this.treeSet_.size()},Fu.prototype.remove=function(){throw new Jl};var ds=function(){};ds.sort=function(){var e=arguments[0],t,r,i,s;if(arguments.length===1)s=function(a,l){return a.compareTo(l)},e.sort(s);else if(arguments.length===2)i=arguments[1],s=function(a,l){return i.compare(a,l)},e.sort(s);else if(arguments.length===3){r=e.slice(arguments[1],arguments[2]),r.sort();var o=e.slice(0,arguments[1]).concat(r,e.slice(arguments[2],e.length));for(e.splice(0,e.length),t=0;t<o.length;t++)e.push(o[t])}else if(arguments.length===4)for(r=e.slice(arguments[1],arguments[2]),i=arguments[3],s=function(a,l){return i.compare(a,l)},r.sort(s),o=e.slice(0,arguments[1]).concat(r,e.slice(arguments[2],e.length)),e.splice(0,e.length),t=0;t<o.length;t++)e.push(o[t])},ds.asList=function(e){for(var t=new W,r=0,i=e.length;r<i;r++)t.add(e[r]);return t};var Ie=function(){},Jr={P:{configurable:!0},L:{configurable:!0},A:{configurable:!0},FALSE:{configurable:!0},TRUE:{configurable:!0},DONTCARE:{configurable:!0},SYM_FALSE:{configurable:!0},SYM_TRUE:{configurable:!0},SYM_DONTCARE:{configurable:!0},SYM_P:{configurable:!0},SYM_L:{configurable:!0},SYM_A:{configurable:!0}};Jr.P.get=function(){return 0},Jr.L.get=function(){return 1},Jr.A.get=function(){return 2},Jr.FALSE.get=function(){return-1},Jr.TRUE.get=function(){return-2},Jr.DONTCARE.get=function(){return-3},Jr.SYM_FALSE.get=function(){return"F"},Jr.SYM_TRUE.get=function(){return"T"},Jr.SYM_DONTCARE.get=function(){return"*"},Jr.SYM_P.get=function(){return"0"},Jr.SYM_L.get=function(){return"1"},Jr.SYM_A.get=function(){return"2"},Ie.prototype.interfaces_=function(){return[]},Ie.prototype.getClass=function(){return Ie},Ie.toDimensionSymbol=function(e){switch(e){case Ie.FALSE:return Ie.SYM_FALSE;case Ie.TRUE:return Ie.SYM_TRUE;case Ie.DONTCARE:return Ie.SYM_DONTCARE;case Ie.P:return Ie.SYM_P;case Ie.L:return Ie.SYM_L;case Ie.A:return Ie.SYM_A}throw new Ue("Unknown dimension value: "+e)},Ie.toDimensionValue=function(e){switch(ql.toUpperCase(e)){case Ie.SYM_FALSE:return Ie.FALSE;case Ie.SYM_TRUE:return Ie.TRUE;case Ie.SYM_DONTCARE:return Ie.DONTCARE;case Ie.SYM_P:return Ie.P;case Ie.SYM_L:return Ie.L;case Ie.SYM_A:return Ie.A}throw new Ue("Unknown dimension symbol: "+e)},Object.defineProperties(Ie,Jr);var hn=function(){};hn.prototype.filter=function(e){},hn.prototype.interfaces_=function(){return[]},hn.prototype.getClass=function(){return hn};var Zr=function(){};Zr.prototype.filter=function(e,t){},Zr.prototype.isDone=function(){},Zr.prototype.isGeometryChanged=function(){},Zr.prototype.interfaces_=function(){return[]},Zr.prototype.getClass=function(){return Zr};var Mt=function(n){function e(r,i){if(n.call(this,i),this._geometries=r||[],n.hasNullElements(this._geometries))throw new Ue("geometries must not contain null elements")}n&&(e.__proto__=n),e.prototype=Object.create(n&&n.prototype),e.prototype.constructor=e;var t={serialVersionUID:{configurable:!0}};return e.prototype.computeEnvelopeInternal=function(){for(var i=this,s=new te,o=0;o<this._geometries.length;o++)s.expandToInclude(i._geometries[o].getEnvelopeInternal());return s},e.prototype.getGeometryN=function(i){return this._geometries[i]},e.prototype.getSortIndex=function(){return n.SORTINDEX_GEOMETRYCOLLECTION},e.prototype.getCoordinates=function(){for(var i=this,s=new Array(this.getNumPoints()).fill(null),o=-1,a=0;a<this._geometries.length;a++)for(var l=i._geometries[a].getCoordinates(),u=0;u<l.length;u++)o++,s[o]=l[u];return s},e.prototype.getArea=function(){for(var i=this,s=0,o=0;o<this._geometries.length;o++)s+=i._geometries[o].getArea();return s},e.prototype.equalsExact=function(){var i=this;if(arguments.length===2){var s=arguments[0],o=arguments[1];if(!this.isEquivalentClass(s))return!1;var a=s;if(this._geometries.length!==a._geometries.length)return!1;for(var l=0;l<this._geometries.length;l++)if(!i._geometries[l].equalsExact(a._geometries[l],o))return!1;return!0}else return n.prototype.equalsExact.apply(this,arguments)},e.prototype.normalize=function(){for(var i=this,s=0;s<this._geometries.length;s++)i._geometries[s].normalize();ds.sort(this._geometries)},e.prototype.getCoordinate=function(){return this.isEmpty()?null:this._geometries[0].getCoordinate()},e.prototype.getBoundaryDimension=function(){for(var i=this,s=Ie.FALSE,o=0;o<this._geometries.length;o++)s=Math.max(s,i._geometries[o].getBoundaryDimension());return s},e.prototype.getDimension=function(){for(var i=this,s=Ie.FALSE,o=0;o<this._geometries.length;o++)s=Math.max(s,i._geometries[o].getDimension());return s},e.prototype.getLength=function(){for(var i=this,s=0,o=0;o<this._geometries.length;o++)s+=i._geometries[o].getLength();return s},e.prototype.getNumPoints=function(){for(var i=this,s=0,o=0;o<this._geometries.length;o++)s+=i._geometries[o].getNumPoints();return s},e.prototype.getNumGeometries=function(){return this._geometries.length},e.prototype.reverse=function(){for(var i=this,s=this._geometries.length,o=new Array(s).fill(null),a=0;a<this._geometries.length;a++)o[a]=i._geometries[a].reverse();return this.getFactory().createGeometryCollection(o)},e.prototype.compareToSameClass=function(){var i=this;if(arguments.length===1){var s=arguments[0],o=new cn(ds.asList(this._geometries)),a=new cn(ds.asList(s._geometries));return this.compare(o,a)}else if(arguments.length===2){for(var l=arguments[0],u=arguments[1],h=l,f=this.getNumGeometries(),p=h.getNumGeometries(),v=0;v<f&&v<p;){var w=i.getGeometryN(v),I=h.getGeometryN(v),T=w.compareToSameClass(I,u);if(T!==0)return T;v++}return v<f?1:v<p?-1:0}},e.prototype.apply=function(){var i=this;if(ae(arguments[0],An))for(var s=arguments[0],o=0;o<this._geometries.length;o++)i._geometries[o].apply(s);else if(ae(arguments[0],Zr)){var a=arguments[0];if(this._geometries.length===0)return null;for(var l=0;l<this._geometries.length&&(i._geometries[l].apply(a),!a.isDone());l++);a.isGeometryChanged()&&this.geometryChanged()}else if(ae(arguments[0],hn)){var u=arguments[0];u.filter(this);for(var h=0;h<this._geometries.length;h++)i._geometries[h].apply(u)}else if(ae(arguments[0],ai)){var f=arguments[0];f.filter(this);for(var p=0;p<this._geometries.length;p++)i._geometries[p].apply(f)}},e.prototype.getBoundary=function(){return this.checkNotGeometryCollection(this),fe.shouldNeverReachHere(),null},e.prototype.clone=function(){var i=this,s=n.prototype.clone.call(this);s._geometries=new Array(this._geometries.length).fill(null);for(var o=0;o<this._geometries.length;o++)s._geometries[o]=i._geometries[o].clone();return s},e.prototype.getGeometryType=function(){return"GeometryCollection"},e.prototype.copy=function(){for(var i=this,s=new Array(this._geometries.length).fill(null),o=0;o<s.length;o++)s[o]=i._geometries[o].copy();return new e(s,this._factory)},e.prototype.isEmpty=function(){for(var i=this,s=0;s<this._geometries.length;s++)if(!i._geometries[s].isEmpty())return!1;return!0},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},t.serialVersionUID.get=function(){return-5694727726395021e3},Object.defineProperties(e,t),e}(oe),ps=function(n){function e(){n.apply(this,arguments)}n&&(e.__proto__=n),e.prototype=Object.create(n&&n.prototype),e.prototype.constructor=e;var t={serialVersionUID:{configurable:!0}};return e.prototype.getSortIndex=function(){return oe.SORTINDEX_MULTILINESTRING},e.prototype.equalsExact=function(){if(arguments.length===2){var i=arguments[0],s=arguments[1];return this.isEquivalentClass(i)?n.prototype.equalsExact.call(this,i,s):!1}else return n.prototype.equalsExact.apply(this,arguments)},e.prototype.getBoundaryDimension=function(){return this.isClosed()?Ie.FALSE:0},e.prototype.isClosed=function(){var i=this;if(this.isEmpty())return!1;for(var s=0;s<this._geometries.length;s++)if(!i._geometries[s].isClosed())return!1;return!0},e.prototype.getDimension=function(){return 1},e.prototype.reverse=function(){for(var i=this,s=this._geometries.length,o=new Array(s).fill(null),a=0;a<this._geometries.length;a++)o[s-1-a]=i._geometries[a].reverse();return this.getFactory().createMultiLineString(o)},e.prototype.getBoundary=function(){return new Ir(this).getBoundary()},e.prototype.getGeometryType=function(){return"MultiLineString"},e.prototype.copy=function(){for(var i=this,s=new Array(this._geometries.length).fill(null),o=0;o<s.length;o++)s[o]=i._geometries[o].copy();return new e(s,this._factory)},e.prototype.interfaces_=function(){return[Zl]},e.prototype.getClass=function(){return e},t.serialVersionUID.get=function(){return 8166665132445434e3},Object.defineProperties(e,t),e}(Mt),Ir=function(){if(this._geom=null,this._geomFact=null,this._bnRule=null,this._endpointMap=null,arguments.length===1){var e=arguments[0],t=Pr.MOD2_BOUNDARY_RULE;this._geom=e,this._geomFact=e.getFactory(),this._bnRule=t}else if(arguments.length===2){var r=arguments[0],i=arguments[1];this._geom=r,this._geomFact=r.getFactory(),this._bnRule=i}};Ir.prototype.boundaryMultiLineString=function(e){if(this._geom.isEmpty())return this.getEmptyMultiPoint();var t=this.computeBoundaryCoordinates(e);return t.length===1?this._geomFact.createPoint(t[0]):this._geomFact.createMultiPointFromCoords(t)},Ir.prototype.getBoundary=function(){return this._geom instanceof Je?this.boundaryLineString(this._geom):this._geom instanceof ps?this.boundaryMultiLineString(this._geom):this._geom.getBoundary()},Ir.prototype.boundaryLineString=function(e){if(this._geom.isEmpty())return this.getEmptyMultiPoint();if(e.isClosed()){var t=this._bnRule.isInBoundary(2);return t?e.getStartPoint():this._geomFact.createMultiPoint()}return this._geomFact.createMultiPoint([e.getStartPoint(),e.getEndPoint()])},Ir.prototype.getEmptyMultiPoint=function(){return this._geomFact.createMultiPoint()},Ir.prototype.computeBoundaryCoordinates=function(e){var t=this,r=new W;this._endpointMap=new Tt;for(var i=0;i<e.getNumGeometries();i++){var s=e.getGeometryN(i);s.getNumPoints()!==0&&(t.addEndpoint(s.getCoordinateN(0)),t.addEndpoint(s.getCoordinateN(s.getNumPoints()-1)))}for(var o=this._endpointMap.entrySet().iterator();o.hasNext();){var a=o.next(),l=a.getValue(),u=l.count;t._bnRule.isInBoundary(u)&&r.add(a.getKey())}return pe.toCoordinateArray(r)},Ir.prototype.addEndpoint=function(e){var t=this._endpointMap.get(e);t===null&&(t=new ku,this._endpointMap.put(e,t)),t.count++},Ir.prototype.interfaces_=function(){return[]},Ir.prototype.getClass=function(){return Ir},Ir.getBoundary=function(){if(arguments.length===1){var e=arguments[0],t=new Ir(e);return t.getBoundary()}else if(arguments.length===2){var r=arguments[0],i=arguments[1],s=new Ir(r,i);return s.getBoundary()}};var ku=function(){this.count=null};ku.prototype.interfaces_=function(){return[]},ku.prototype.getClass=function(){return ku};function Hm(){}function Ym(){}var Jm=function(){};function Zm(){}function Km(){}function Qm(){}var Tr=function(){},Gc={NEWLINE:{configurable:!0},SIMPLE_ORDINATE_FORMAT:{configurable:!0}};Tr.prototype.interfaces_=function(){return[]},Tr.prototype.getClass=function(){return Tr},Tr.chars=function(e,t){for(var r=new Array(t).fill(null),i=0;i<t;i++)r[i]=e;return String(r)},Tr.getStackTrace=function(){if(arguments.length===1){var e=arguments[0],t=new Zm,r=new Hm;return e.printStackTrace(r),t.toString()}else if(arguments.length===2){var i=arguments[0],s=arguments[1],o="";new Ym(Tr.getStackTrace(i));for(var a=new Qm,l=0;l<s;l++)try{o+=a.readLine()+Tr.NEWLINE}catch(u){if(u instanceof Km)fe.shouldNeverReachHere();else throw u}finally{}return o}},Tr.split=function(e,t){for(var r=t.length,i=new W,s=""+e,o=s.indexOf(t);o>=0;){var a=s.substring(0,o);i.add(a),s=s.substring(o+r),o=s.indexOf(t)}s.length>0&&i.add(s);for(var l=new Array(i.size()).fill(null),u=0;u<l.length;u++)l[u]=i.get(u);return l},Tr.toString=function(){if(arguments.length===1){var e=arguments[0];return Tr.SIMPLE_ORDINATE_FORMAT.format(e)}},Tr.spaces=function(e){return Tr.chars(" ",e)},Gc.NEWLINE.get=function(){return vt.getProperty("line.separator")},Gc.SIMPLE_ORDINATE_FORMAT.get=function(){return new Jm},Object.defineProperties(Tr,Gc);var Ke=function(){};Ke.prototype.interfaces_=function(){return[]},Ke.prototype.getClass=function(){return Ke},Ke.copyCoord=function(e,t,r,i){for(var s=Math.min(e.getDimension(),r.getDimension()),o=0;o<s;o++)r.setOrdinate(i,o,e.getOrdinate(t,o))},Ke.isRing=function(e){var t=e.size();return t===0?!0:t<=3?!1:e.getOrdinate(0,Se.X)===e.getOrdinate(t-1,Se.X)&&e.getOrdinate(0,Se.Y)===e.getOrdinate(t-1,Se.Y)},Ke.isEqual=function(e,t){var r=e.size(),i=t.size();if(r!==i)return!1;for(var s=Math.min(e.getDimension(),t.getDimension()),o=0;o<r;o++)for(var a=0;a<s;a++){var l=e.getOrdinate(o,a),u=t.getOrdinate(o,a);if(e.getOrdinate(o,a)!==t.getOrdinate(o,a)&&!(ue.isNaN(l)&&ue.isNaN(u)))return!1}return!0},Ke.extend=function(e,t,r){var i=e.create(r,t.getDimension()),s=t.size();if(Ke.copy(t,0,i,0,s),s>0)for(var o=s;o<r;o++)Ke.copy(t,s-1,i,o,1);return i},Ke.reverse=function(e){for(var t=e.size()-1,r=Math.trunc(t/2),i=0;i<=r;i++)Ke.swap(e,i,t-i)},Ke.swap=function(e,t,r){if(t===r)return null;for(var i=0;i<e.getDimension();i++){var s=e.getOrdinate(t,i);e.setOrdinate(t,i,e.getOrdinate(r,i)),e.setOrdinate(r,i,s)}},Ke.copy=function(e,t,r,i,s){for(var o=0;o<s;o++)Ke.copyCoord(e,t+o,r,i+o)},Ke.toString=function(){if(arguments.length===1){var e=arguments[0],t=e.size();if(t===0)return"()";var r=e.getDimension(),i=new on;i.append("(");for(var s=0;s<t;s++){s>0&&i.append(" ");for(var o=0;o<r;o++)o>0&&i.append(","),i.append(Tr.toString(e.getOrdinate(s,o)))}return i.append(")"),i.toString()}},Ke.ensureValidRing=function(e,t){var r=t.size();if(r===0)return t;if(r<=3)return Ke.createClosedRing(e,t,4);var i=t.getOrdinate(0,Se.X)===t.getOrdinate(r-1,Se.X)&&t.getOrdinate(0,Se.Y)===t.getOrdinate(r-1,Se.Y);return i?t:Ke.createClosedRing(e,t,r+1)},Ke.createClosedRing=function(e,t,r){var i=e.create(r,t.getDimension()),s=t.size();Ke.copy(t,0,i,0,s);for(var o=s;o<r;o++)Ke.copy(t,0,i,o,1);return i};var Je=function(n){function e(r,i){n.call(this,i),this._points=null,this.init(r)}n&&(e.__proto__=n),e.prototype=Object.create(n&&n.prototype),e.prototype.constructor=e;var t={serialVersionUID:{configurable:!0}};return e.prototype.computeEnvelopeInternal=function(){return this.isEmpty()?new te:this._points.expandEnvelope(new te)},e.prototype.isRing=function(){return this.isClosed()&&this.isSimple()},e.prototype.getSortIndex=function(){return n.SORTINDEX_LINESTRING},e.prototype.getCoordinates=function(){return this._points.toCoordinateArray()},e.prototype.equalsExact=function(){var i=this;if(arguments.length===2){var s=arguments[0],o=arguments[1];if(!this.isEquivalentClass(s))return!1;var a=s;if(this._points.size()!==a._points.size())return!1;for(var l=0;l<this._points.size();l++)if(!i.equal(i._points.getCoordinate(l),a._points.getCoordinate(l),o))return!1;return!0}else return n.prototype.equalsExact.apply(this,arguments)},e.prototype.normalize=function(){for(var i=this,s=0;s<Math.trunc(this._points.size()/2);s++){var o=i._points.size()-1-s;if(!i._points.getCoordinate(s).equals(i._points.getCoordinate(o)))return i._points.getCoordinate(s).compareTo(i._points.getCoordinate(o))>0&&Ke.reverse(i._points),null}},e.prototype.getCoordinate=function(){return this.isEmpty()?null:this._points.getCoordinate(0)},e.prototype.getBoundaryDimension=function(){return this.isClosed()?Ie.FALSE:0},e.prototype.isClosed=function(){return this.isEmpty()?!1:this.getCoordinateN(0).equals2D(this.getCoordinateN(this.getNumPoints()-1))},e.prototype.getEndPoint=function(){return this.isEmpty()?null:this.getPointN(this.getNumPoints()-1)},e.prototype.getDimension=function(){return 1},e.prototype.getLength=function(){return Y.computeLength(this._points)},e.prototype.getNumPoints=function(){return this._points.size()},e.prototype.reverse=function(){var i=this._points.copy();Ke.reverse(i);var s=this.getFactory().createLineString(i);return s},e.prototype.compareToSameClass=function(){var i=this;if(arguments.length===1){for(var s=arguments[0],o=s,a=0,l=0;a<this._points.size()&&l<o._points.size();){var u=i._points.getCoordinate(a).compareTo(o._points.getCoordinate(l));if(u!==0)return u;a++,l++}return a<this._points.size()?1:l<o._points.size()?-1:0}else if(arguments.length===2){var h=arguments[0],f=arguments[1],p=h;return f.compare(this._points,p._points)}},e.prototype.apply=function(){var i=this;if(ae(arguments[0],An))for(var s=arguments[0],o=0;o<this._points.size();o++)s.filter(i._points.getCoordinate(o));else if(ae(arguments[0],Zr)){var a=arguments[0];if(this._points.size()===0)return null;for(var l=0;l<this._points.size()&&(a.filter(i._points,l),!a.isDone());l++);a.isGeometryChanged()&&this.geometryChanged()}else if(ae(arguments[0],hn)){var u=arguments[0];u.filter(this)}else if(ae(arguments[0],ai)){var h=arguments[0];h.filter(this)}},e.prototype.getBoundary=function(){return new Ir(this).getBoundary()},e.prototype.isEquivalentClass=function(i){return i instanceof e},e.prototype.clone=function(){var i=n.prototype.clone.call(this);return i._points=this._points.clone(),i},e.prototype.getCoordinateN=function(i){return this._points.getCoordinate(i)},e.prototype.getGeometryType=function(){return"LineString"},e.prototype.copy=function(){return new e(this._points.copy(),this._factory)},e.prototype.getCoordinateSequence=function(){return this._points},e.prototype.isEmpty=function(){return this._points.size()===0},e.prototype.init=function(i){if(i===null&&(i=this.getFactory().getCoordinateSequenceFactory().create([])),i.size()===1)throw new Ue("Invalid number of points in LineString (found "+i.size()+" - must be 0 or >= 2)");this._points=i},e.prototype.isCoordinate=function(i){for(var s=this,o=0;o<this._points.size();o++)if(s._points.getCoordinate(o).equals(i))return!0;return!1},e.prototype.getStartPoint=function(){return this.isEmpty()?null:this.getPointN(0)},e.prototype.getPointN=function(i){return this.getFactory().createPoint(this._points.getCoordinate(i))},e.prototype.interfaces_=function(){return[Zl]},e.prototype.getClass=function(){return e},t.serialVersionUID.get=function(){return 0x2b2b51ba435c8e00},Object.defineProperties(e,t),e}(oe),Kl=function(){};Kl.prototype.interfaces_=function(){return[]},Kl.prototype.getClass=function(){return Kl};var jt=function(n){function e(r,i){n.call(this,i),this._coordinates=r||null,this.init(this._coordinates)}n&&(e.__proto__=n),e.prototype=Object.create(n&&n.prototype),e.prototype.constructor=e;var t={serialVersionUID:{configurable:!0}};return e.prototype.computeEnvelopeInternal=function(){if(this.isEmpty())return new te;var i=new te;return i.expandToInclude(this._coordinates.getX(0),this._coordinates.getY(0)),i},e.prototype.getSortIndex=function(){return n.SORTINDEX_POINT},e.prototype.getCoordinates=function(){return this.isEmpty()?[]:[this.getCoordinate()]},e.prototype.equalsExact=function(){if(arguments.length===2){var i=arguments[0],s=arguments[1];return this.isEquivalentClass(i)?this.isEmpty()&&i.isEmpty()?!0:this.isEmpty()!==i.isEmpty()?!1:this.equal(i.getCoordinate(),this.getCoordinate(),s):!1}else return n.prototype.equalsExact.apply(this,arguments)},e.prototype.normalize=function(){},e.prototype.getCoordinate=function(){return this._coordinates.size()!==0?this._coordinates.getCoordinate(0):null},e.prototype.getBoundaryDimension=function(){return Ie.FALSE},e.prototype.getDimension=function(){return 0},e.prototype.getNumPoints=function(){return this.isEmpty()?0:1},e.prototype.reverse=function(){return this.copy()},e.prototype.getX=function(){if(this.getCoordinate()===null)throw new Error("getX called on empty Point");return this.getCoordinate().x},e.prototype.compareToSameClass=function(){if(arguments.length===1){var i=arguments[0],s=i;return this.getCoordinate().compareTo(s.getCoordinate())}else if(arguments.length===2){var o=arguments[0],a=arguments[1],l=o;return a.compare(this._coordinates,l._coordinates)}},e.prototype.apply=function(){if(ae(arguments[0],An)){var i=arguments[0];if(this.isEmpty())return null;i.filter(this.getCoordinate())}else if(ae(arguments[0],Zr)){var s=arguments[0];if(this.isEmpty())return null;s.filter(this._coordinates,0),s.isGeometryChanged()&&this.geometryChanged()}else if(ae(arguments[0],hn)){var o=arguments[0];o.filter(this)}else if(ae(arguments[0],ai)){var a=arguments[0];a.filter(this)}},e.prototype.getBoundary=function(){return this.getFactory().createGeometryCollection(null)},e.prototype.clone=function(){var i=n.prototype.clone.call(this);return i._coordinates=this._coordinates.clone(),i},e.prototype.getGeometryType=function(){return"Point"},e.prototype.copy=function(){return new e(this._coordinates.copy(),this._factory)},e.prototype.getCoordinateSequence=function(){return this._coordinates},e.prototype.getY=function(){if(this.getCoordinate()===null)throw new Error("getY called on empty Point");return this.getCoordinate().y},e.prototype.isEmpty=function(){return this._coordinates.size()===0},e.prototype.init=function(i){i===null&&(i=this.getFactory().getCoordinateSequenceFactory().create([])),fe.isTrue(i.size()<=1),this._coordinates=i},e.prototype.isSimple=function(){return!0},e.prototype.interfaces_=function(){return[Kl]},e.prototype.getClass=function(){return e},t.serialVersionUID.get=function(){return 4902022702746615e3},Object.defineProperties(e,t),e}(oe),Ri=function(){};Ri.prototype.interfaces_=function(){return[]},Ri.prototype.getClass=function(){return Ri};var it=function(n){function e(r,i,s){if(n.call(this,s),this._shell=null,this._holes=null,r===null&&(r=this.getFactory().createLinearRing()),i===null&&(i=[]),n.hasNullElements(i))throw new Ue("holes must not contain null elements");if(r.isEmpty()&&n.hasNonEmptyElements(i))throw new Ue("shell is empty but holes are not");this._shell=r,this._holes=i}n&&(e.__proto__=n),e.prototype=Object.create(n&&n.prototype),e.prototype.constructor=e;var t={serialVersionUID:{configurable:!0}};return e.prototype.computeEnvelopeInternal=function(){return this._shell.getEnvelopeInternal()},e.prototype.getSortIndex=function(){return n.SORTINDEX_POLYGON},e.prototype.getCoordinates=function(){var i=this;if(this.isEmpty())return[];for(var s=new Array(this.getNumPoints()).fill(null),o=-1,a=this._shell.getCoordinates(),l=0;l<a.length;l++)o++,s[o]=a[l];for(var u=0;u<this._holes.length;u++)for(var h=i._holes[u].getCoordinates(),f=0;f<h.length;f++)o++,s[o]=h[f];return s},e.prototype.getArea=function(){var i=this,s=0;s+=Math.abs(Y.signedArea(this._shell.getCoordinateSequence()));for(var o=0;o<this._holes.length;o++)s-=Math.abs(Y.signedArea(i._holes[o].getCoordinateSequence()));return s},e.prototype.isRectangle=function(){if(this.getNumInteriorRing()!==0||this._shell===null||this._shell.getNumPoints()!==5)return!1;for(var i=this._shell.getCoordinateSequence(),s=this.getEnvelopeInternal(),o=0;o<5;o++){var a=i.getX(o);if(!(a===s.getMinX()||a===s.getMaxX()))return!1;var l=i.getY(o);if(!(l===s.getMinY()||l===s.getMaxY()))return!1}for(var u=i.getX(0),h=i.getY(0),f=1;f<=4;f++){var p=i.getX(f),v=i.getY(f),w=p!==u,I=v!==h;if(w===I)return!1;u=p,h=v}return!0},e.prototype.equalsExact=function(){var i=this;if(arguments.length===2){var s=arguments[0],o=arguments[1];if(!this.isEquivalentClass(s))return!1;var a=s,l=this._shell,u=a._shell;if(!l.equalsExact(u,o)||this._holes.length!==a._holes.length)return!1;for(var h=0;h<this._holes.length;h++)if(!i._holes[h].equalsExact(a._holes[h],o))return!1;return!0}else return n.prototype.equalsExact.apply(this,arguments)},e.prototype.normalize=function(){var i=this;if(arguments.length===0){this.normalize(this._shell,!0);for(var s=0;s<this._holes.length;s++)i.normalize(i._holes[s],!1);ds.sort(this._holes)}else if(arguments.length===2){var o=arguments[0],a=arguments[1];if(o.isEmpty())return null;var l=new Array(o.getCoordinates().length-1).fill(null);vt.arraycopy(o.getCoordinates(),0,l,0,l.length);var u=pe.minCoordinate(o.getCoordinates());pe.scroll(l,u),vt.arraycopy(l,0,o.getCoordinates(),0,l.length),o.getCoordinates()[l.length]=l[0],Y.isCCW(o.getCoordinates())===a&&pe.reverse(o.getCoordinates())}},e.prototype.getCoordinate=function(){return this._shell.getCoordinate()},e.prototype.getNumInteriorRing=function(){return this._holes.length},e.prototype.getBoundaryDimension=function(){return 1},e.prototype.getDimension=function(){return 2},e.prototype.getLength=function(){var i=this,s=0;s+=this._shell.getLength();for(var o=0;o<this._holes.length;o++)s+=i._holes[o].getLength();return s},e.prototype.getNumPoints=function(){for(var i=this,s=this._shell.getNumPoints(),o=0;o<this._holes.length;o++)s+=i._holes[o].getNumPoints();return s},e.prototype.reverse=function(){var i=this,s=this.copy();s._shell=this._shell.copy().reverse(),s._holes=new Array(this._holes.length).fill(null);for(var o=0;o<this._holes.length;o++)s._holes[o]=i._holes[o].copy().reverse();return s},e.prototype.convexHull=function(){return this.getExteriorRing().convexHull()},e.prototype.compareToSameClass=function(){var i=this;if(arguments.length===1){var s=arguments[0],o=this._shell,a=s._shell;return o.compareToSameClass(a)}else if(arguments.length===2){var l=arguments[0],u=arguments[1],h=l,f=this._shell,p=h._shell,v=f.compareToSameClass(p,u);if(v!==0)return v;for(var w=this.getNumInteriorRing(),I=h.getNumInteriorRing(),T=0;T<w&&T<I;){var L=i.getInteriorRingN(T),m=h.getInteriorRingN(T),_=L.compareToSameClass(m,u);if(_!==0)return _;T++}return T<w?1:T<I?-1:0}},e.prototype.apply=function(i){var s=this;if(ae(i,An)){this._shell.apply(i);for(var o=0;o<this._holes.length;o++)s._holes[o].apply(i)}else if(ae(i,Zr)){if(this._shell.apply(i),!i.isDone())for(var a=0;a<this._holes.length&&(s._holes[a].apply(i),!i.isDone());a++);i.isGeometryChanged()&&this.geometryChanged()}else if(ae(i,hn))i.filter(this);else if(ae(i,ai)){i.filter(this),this._shell.apply(i);for(var l=0;l<this._holes.length;l++)s._holes[l].apply(i)}},e.prototype.getBoundary=function(){var i=this;if(this.isEmpty())return this.getFactory().createMultiLineString();var s=new Array(this._holes.length+1).fill(null);s[0]=this._shell;for(var o=0;o<this._holes.length;o++)s[o+1]=i._holes[o];return s.length<=1?this.getFactory().createLinearRing(s[0].getCoordinateSequence()):this.getFactory().createMultiLineString(s)},e.prototype.clone=function(){var i=this,s=n.prototype.clone.call(this);s._shell=this._shell.clone(),s._holes=new Array(this._holes.length).fill(null);for(var o=0;o<this._holes.length;o++)s._holes[o]=i._holes[o].clone();return s},e.prototype.getGeometryType=function(){return"Polygon"},e.prototype.copy=function(){for(var i=this,s=this._shell.copy(),o=new Array(this._holes.length).fill(null),a=0;a<o.length;a++)o[a]=i._holes[a].copy();return new e(s,o,this._factory)},e.prototype.getExteriorRing=function(){return this._shell},e.prototype.isEmpty=function(){return this._shell.isEmpty()},e.prototype.getInteriorRingN=function(i){return this._holes[i]},e.prototype.interfaces_=function(){return[Ri]},e.prototype.getClass=function(){return e},t.serialVersionUID.get=function(){return-0x307ffefd8dc97200},Object.defineProperties(e,t),e}(oe),pl=function(n){function e(){n.apply(this,arguments)}n&&(e.__proto__=n),e.prototype=Object.create(n&&n.prototype),e.prototype.constructor=e;var t={serialVersionUID:{configurable:!0}};return e.prototype.getSortIndex=function(){return oe.SORTINDEX_MULTIPOINT},e.prototype.isValid=function(){return!0},e.prototype.equalsExact=function(){if(arguments.length===2){var i=arguments[0],s=arguments[1];return this.isEquivalentClass(i)?n.prototype.equalsExact.call(this,i,s):!1}else return n.prototype.equalsExact.apply(this,arguments)},e.prototype.getCoordinate=function(){if(arguments.length===1){var i=arguments[0];return this._geometries[i].getCoordinate()}else return n.prototype.getCoordinate.apply(this,arguments)},e.prototype.getBoundaryDimension=function(){return Ie.FALSE},e.prototype.getDimension=function(){return 0},e.prototype.getBoundary=function(){return this.getFactory().createGeometryCollection(null)},e.prototype.getGeometryType=function(){return"MultiPoint"},e.prototype.copy=function(){for(var i=this,s=new Array(this._geometries.length).fill(null),o=0;o<s.length;o++)s[o]=i._geometries[o].copy();return new e(s,this._factory)},e.prototype.interfaces_=function(){return[Kl]},e.prototype.getClass=function(){return e},t.serialVersionUID.get=function(){return-8048474874175356e3},Object.defineProperties(e,t),e}(Mt),Rn=function(n){function e(r,i){r instanceof M&&i instanceof ge&&(r=i.getCoordinateSequenceFactory().create(r)),n.call(this,r,i),this.validateConstruction()}n&&(e.__proto__=n),e.prototype=Object.create(n&&n.prototype),e.prototype.constructor=e;var t={MINIMUM_VALID_SIZE:{configurable:!0},serialVersionUID:{configurable:!0}};return e.prototype.getSortIndex=function(){return oe.SORTINDEX_LINEARRING},e.prototype.getBoundaryDimension=function(){return Ie.FALSE},e.prototype.isClosed=function(){return this.isEmpty()?!0:n.prototype.isClosed.call(this)},e.prototype.reverse=function(){var i=this._points.copy();Ke.reverse(i);var s=this.getFactory().createLinearRing(i);return s},e.prototype.validateConstruction=function(){if(!this.isEmpty()&&!n.prototype.isClosed.call(this))throw new Ue("Points of LinearRing do not form a closed linestring");if(this.getCoordinateSequence().size()>=1&&this.getCoordinateSequence().size()<e.MINIMUM_VALID_SIZE)throw new Ue("Invalid number of points in LinearRing (found "+this.getCoordinateSequence().size()+" - must be 0 or >= 4)")},e.prototype.getGeometryType=function(){return"LinearRing"},e.prototype.copy=function(){return new e(this._points.copy(),this._factory)},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},t.MINIMUM_VALID_SIZE.get=function(){return 4},t.serialVersionUID.get=function(){return-0x3b229e262367a600},Object.defineProperties(e,t),e}(Je),Fn=function(n){function e(){n.apply(this,arguments)}n&&(e.__proto__=n),e.prototype=Object.create(n&&n.prototype),e.prototype.constructor=e;var t={serialVersionUID:{configurable:!0}};return e.prototype.getSortIndex=function(){return oe.SORTINDEX_MULTIPOLYGON},e.prototype.equalsExact=function(){if(arguments.length===2){var i=arguments[0],s=arguments[1];return this.isEquivalentClass(i)?n.prototype.equalsExact.call(this,i,s):!1}else return n.prototype.equalsExact.apply(this,arguments)},e.prototype.getBoundaryDimension=function(){return 1},e.prototype.getDimension=function(){return 2},e.prototype.reverse=function(){for(var i=this,s=this._geometries.length,o=new Array(s).fill(null),a=0;a<this._geometries.length;a++)o[a]=i._geometries[a].reverse();return this.getFactory().createMultiPolygon(o)},e.prototype.getBoundary=function(){var i=this;if(this.isEmpty())return this.getFactory().createMultiLineString();for(var s=new W,o=0;o<this._geometries.length;o++)for(var a=i._geometries[o],l=a.getBoundary(),u=0;u<l.getNumGeometries();u++)s.add(l.getGeometryN(u));var h=new Array(s.size()).fill(null);return this.getFactory().createMultiLineString(s.toArray(h))},e.prototype.getGeometryType=function(){return"MultiPolygon"},e.prototype.copy=function(){for(var i=this,s=new Array(this._geometries.length).fill(null),o=0;o<s.length;o++)s[o]=i._geometries[o].copy();return new e(s,this._factory)},e.prototype.interfaces_=function(){return[Ri]},e.prototype.getClass=function(){return e},t.serialVersionUID.get=function(){return-0x7a5aa1369171980},Object.defineProperties(e,t),e}(Mt),Dr=function(e){this._factory=e||null,this._isUserDataCopied=!1},Vu={NoOpGeometryOperation:{configurable:!0},CoordinateOperation:{configurable:!0},CoordinateSequenceOperation:{configurable:!0}};Dr.prototype.setCopyUserData=function(e){this._isUserDataCopied=e},Dr.prototype.edit=function(e,t){if(e===null)return null;var r=this.editInternal(e,t);return this._isUserDataCopied&&r.setUserData(e.getUserData()),r},Dr.prototype.editInternal=function(e,t){return this._factory===null&&(this._factory=e.getFactory()),e instanceof Mt?this.editGeometryCollection(e,t):e instanceof it?this.editPolygon(e,t):e instanceof jt?t.edit(e,this._factory):e instanceof Je?t.edit(e,this._factory):(fe.shouldNeverReachHere("Unsupported Geometry class: "+e.getClass().getName()),null)},Dr.prototype.editGeometryCollection=function(e,t){for(var r=this,i=t.edit(e,this._factory),s=new W,o=0;o<i.getNumGeometries();o++){var a=r.edit(i.getGeometryN(o),t);a===null||a.isEmpty()||s.add(a)}return i.getClass()===pl?this._factory.createMultiPoint(s.toArray([])):i.getClass()===ps?this._factory.createMultiLineString(s.toArray([])):i.getClass()===Fn?this._factory.createMultiPolygon(s.toArray([])):this._factory.createGeometryCollection(s.toArray([]))},Dr.prototype.editPolygon=function(e,t){var r=this,i=t.edit(e,this._factory);if(i===null&&(i=this._factory.createPolygon(null)),i.isEmpty())return i;var s=this.edit(i.getExteriorRing(),t);if(s===null||s.isEmpty())return this._factory.createPolygon();for(var o=new W,a=0;a<i.getNumInteriorRing();a++){var l=r.edit(i.getInteriorRingN(a),t);l===null||l.isEmpty()||o.add(l)}return this._factory.createPolygon(s,o.toArray([]))},Dr.prototype.interfaces_=function(){return[]},Dr.prototype.getClass=function(){return Dr},Dr.GeometryEditorOperation=function(){},Vu.NoOpGeometryOperation.get=function(){return Ql},Vu.CoordinateOperation.get=function(){return Bl},Vu.CoordinateSequenceOperation.get=function(){return $l},Object.defineProperties(Dr,Vu);var Ql=function(){};Ql.prototype.edit=function(e,t){return e},Ql.prototype.interfaces_=function(){return[Dr.GeometryEditorOperation]},Ql.prototype.getClass=function(){return Ql};var Bl=function(){};Bl.prototype.edit=function(e,t){var r=this.editCoordinates(e.getCoordinates(),e);return r===null?e:e instanceof Rn?t.createLinearRing(r):e instanceof Je?t.createLineString(r):e instanceof jt?r.length>0?t.createPoint(r[0]):t.createPoint():e},Bl.prototype.interfaces_=function(){return[Dr.GeometryEditorOperation]},Bl.prototype.getClass=function(){return Bl};var $l=function(){};$l.prototype.edit=function(e,t){return e instanceof Rn?t.createLinearRing(this.edit(e.getCoordinateSequence(),e)):e instanceof Je?t.createLineString(this.edit(e.getCoordinateSequence(),e)):e instanceof jt?t.createPoint(this.edit(e.getCoordinateSequence(),e)):e},$l.prototype.interfaces_=function(){return[Dr.GeometryEditorOperation]},$l.prototype.getClass=function(){return $l};var Qe=function(){var e=this;if(this._dimension=3,this._coordinates=null,arguments.length===1){if(arguments[0]instanceof Array)this._coordinates=arguments[0],this._dimension=3;else if(Number.isInteger(arguments[0])){var t=arguments[0];this._coordinates=new Array(t).fill(null);for(var r=0;r<t;r++)e._coordinates[r]=new M}else if(ae(arguments[0],Se)){var i=arguments[0];if(i===null)return this._coordinates=new Array(0).fill(null),null;this._dimension=i.getDimension(),this._coordinates=new Array(i.size()).fill(null);for(var s=0;s<this._coordinates.length;s++)e._coordinates[s]=i.getCoordinateCopy(s)}}else if(arguments.length===2){if(arguments[0]instanceof Array&&Number.isInteger(arguments[1])){var o=arguments[0],a=arguments[1];this._coordinates=o,this._dimension=a,o===null&&(this._coordinates=new Array(0).fill(null))}else if(Number.isInteger(arguments[0])&&Number.isInteger(arguments[1])){var l=arguments[0],u=arguments[1];this._coordinates=new Array(l).fill(null),this._dimension=u;for(var h=0;h<l;h++)e._coordinates[h]=new M}}},xf={serialVersionUID:{configurable:!0}};Qe.prototype.setOrdinate=function(e,t,r){switch(t){case Se.X:this._coordinates[e].x=r;break;case Se.Y:this._coordinates[e].y=r;break;case Se.Z:this._coordinates[e].z=r;break;default:throw new Ue("invalid ordinateIndex")}},Qe.prototype.size=function(){return this._coordinates.length},Qe.prototype.getOrdinate=function(e,t){switch(t){case Se.X:return this._coordinates[e].x;case Se.Y:return this._coordinates[e].y;case Se.Z:return this._coordinates[e].z}return ue.NaN},Qe.prototype.getCoordinate=function(){if(arguments.length===1){var e=arguments[0];return this._coordinates[e]}else if(arguments.length===2){var t=arguments[0],r=arguments[1];r.x=this._coordinates[t].x,r.y=this._coordinates[t].y,r.z=this._coordinates[t].z}},Qe.prototype.getCoordinateCopy=function(e){return new M(this._coordinates[e])},Qe.prototype.getDimension=function(){return this._dimension},Qe.prototype.getX=function(e){return this._coordinates[e].x},Qe.prototype.clone=function(){for(var e=this,t=new Array(this.size()).fill(null),r=0;r<this._coordinates.length;r++)t[r]=e._coordinates[r].clone();return new Qe(t,this._dimension)},Qe.prototype.expandEnvelope=function(e){for(var t=this,r=0;r<this._coordinates.length;r++)e.expandToInclude(t._coordinates[r]);return e},Qe.prototype.copy=function(){for(var e=this,t=new Array(this.size()).fill(null),r=0;r<this._coordinates.length;r++)t[r]=e._coordinates[r].copy();return new Qe(t,this._dimension)},Qe.prototype.toString=function(){var e=this;if(this._coordinates.length>0){var t=new on(17*this._coordinates.length);t.append("("),t.append(this._coordinates[0]);for(var r=1;r<this._coordinates.length;r++)t.append(", "),t.append(e._coordinates[r]);return t.append(")"),t.toString()}else return"()"},Qe.prototype.getY=function(e){return this._coordinates[e].y},Qe.prototype.toCoordinateArray=function(){return this._coordinates},Qe.prototype.interfaces_=function(){return[Se,Cr]},Qe.prototype.getClass=function(){return Qe},xf.serialVersionUID.get=function(){return-0xcb44a778db18e00},Object.defineProperties(Qe,xf);var kn=function(){},Wc={serialVersionUID:{configurable:!0},instanceObject:{configurable:!0}};kn.prototype.readResolve=function(){return kn.instance()},kn.prototype.create=function(){if(arguments.length===1){if(arguments[0]instanceof Array){var e=arguments[0];return new Qe(e)}else if(ae(arguments[0],Se)){var t=arguments[0];return new Qe(t)}}else if(arguments.length===2){var r=arguments[0],i=arguments[1];return i>3&&(i=3),i<2?new Qe(r):new Qe(r,i)}},kn.prototype.interfaces_=function(){return[il,Cr]},kn.prototype.getClass=function(){return kn},kn.instance=function(){return kn.instanceObject},Wc.serialVersionUID.get=function(){return-0x38e49fa6cf6f2e00},Wc.instanceObject.get=function(){return new kn},Object.defineProperties(kn,Wc);var Lf=function(n){function e(){n.call(this),this.map_=new Map}return n&&(e.__proto__=n),e.prototype=Object.create(n&&n.prototype),e.prototype.constructor=e,e.prototype.get=function(r){return this.map_.get(r)||null},e.prototype.put=function(r,i){return this.map_.set(r,i),i},e.prototype.values=function(){for(var r=new W,i=this.map_.values(),s=i.next();!s.done;)r.add(s.value),s=i.next();return r},e.prototype.entrySet=function(){var r=new zc;return this.map_.entries().forEach(function(i){return r.add(i)}),r},e.prototype.size=function(){return this.map_.size()},e}($s),Te=function n(){if(this._modelType=null,this._scale=null,arguments.length===0)this._modelType=n.FLOATING;else if(arguments.length===1){if(arguments[0]instanceof fn){var e=arguments[0];this._modelType=e,e===n.FIXED&&this.setScale(1)}else if(typeof arguments[0]=="number"){var t=arguments[0];this._modelType=n.FIXED,this.setScale(t)}else if(arguments[0]instanceof n){var r=arguments[0];this._modelType=r._modelType,this._scale=r._scale}}},qc={serialVersionUID:{configurable:!0},maximumPreciseValue:{configurable:!0}};Te.prototype.equals=function(e){if(!(e instanceof Te))return!1;var t=e;return this._modelType===t._modelType&&this._scale===t._scale},Te.prototype.compareTo=function(e){var t=e,r=this.getMaximumSignificantDigits(),i=t.getMaximumSignificantDigits();return new an(r).compareTo(new an(i))},Te.prototype.getScale=function(){return this._scale},Te.prototype.isFloating=function(){return this._modelType===Te.FLOATING||this._modelType===Te.FLOATING_SINGLE},Te.prototype.getType=function(){return this._modelType},Te.prototype.toString=function(){var e="UNKNOWN";return this._modelType===Te.FLOATING?e="Floating":this._modelType===Te.FLOATING_SINGLE?e="Floating-Single":this._modelType===Te.FIXED&&(e="Fixed (Scale="+this.getScale()+")"),e},Te.prototype.makePrecise=function(){if(typeof arguments[0]=="number"){var e=arguments[0];if(ue.isNaN(e))return e;if(this._modelType===Te.FLOATING_SINGLE){var t=e;return t}return this._modelType===Te.FIXED?Math.round(e*this._scale)/this._scale:e}else if(arguments[0]instanceof M){var r=arguments[0];if(this._modelType===Te.FLOATING)return null;r.x=this.makePrecise(r.x),r.y=this.makePrecise(r.y)}},Te.prototype.getMaximumSignificantDigits=function(){var e=16;return this._modelType===Te.FLOATING?e=16:this._modelType===Te.FLOATING_SINGLE?e=6:this._modelType===Te.FIXED&&(e=1+Math.trunc(Math.ceil(Math.log(this.getScale())/Math.log(10)))),e},Te.prototype.setScale=function(e){this._scale=Math.abs(e)},Te.prototype.interfaces_=function(){return[Cr,Sr]},Te.prototype.getClass=function(){return Te},Te.mostPrecise=function(e,t){return e.compareTo(t)>=0?e:t},qc.serialVersionUID.get=function(){return 7777263578777804e3},qc.maximumPreciseValue.get=function(){return 9007199254740992},Object.defineProperties(Te,qc);var fn=function n(e){this._name=e||null,n.nameToTypeMap.put(e,this)},Xc={serialVersionUID:{configurable:!0},nameToTypeMap:{configurable:!0}};fn.prototype.readResolve=function(){return fn.nameToTypeMap.get(this._name)},fn.prototype.toString=function(){return this._name},fn.prototype.interfaces_=function(){return[Cr]},fn.prototype.getClass=function(){return fn},Xc.serialVersionUID.get=function(){return-552860263173159e4},Xc.nameToTypeMap.get=function(){return new Lf},Object.defineProperties(fn,Xc),Te.Type=fn,Te.FIXED=new fn("FIXED"),Te.FLOATING=new fn("FLOATING"),Te.FLOATING_SINGLE=new fn("FLOATING SINGLE");var ge=function n(){this._precisionModel=new Te,this._SRID=0,this._coordinateSequenceFactory=n.getDefaultCoordinateSequenceFactory(),arguments.length===0||(arguments.length===1?ae(arguments[0],il)?this._coordinateSequenceFactory=arguments[0]:arguments[0]instanceof Te&&(this._precisionModel=arguments[0]):arguments.length===2?(this._precisionModel=arguments[0],this._SRID=arguments[1]):arguments.length===3&&(this._precisionModel=arguments[0],this._SRID=arguments[1],this._coordinateSequenceFactory=arguments[2]))},Af={serialVersionUID:{configurable:!0}};ge.prototype.toGeometry=function(e){return e.isNull()?this.createPoint(null):e.getMinX()===e.getMaxX()&&e.getMinY()===e.getMaxY()?this.createPoint(new M(e.getMinX(),e.getMinY())):e.getMinX()===e.getMaxX()||e.getMinY()===e.getMaxY()?this.createLineString([new M(e.getMinX(),e.getMinY()),new M(e.getMaxX(),e.getMaxY())]):this.createPolygon(this.createLinearRing([new M(e.getMinX(),e.getMinY()),new M(e.getMinX(),e.getMaxY()),new M(e.getMaxX(),e.getMaxY()),new M(e.getMaxX(),e.getMinY()),new M(e.getMinX(),e.getMinY())]),null)},ge.prototype.createLineString=function(e){if(e){if(e instanceof Array)return new Je(this.getCoordinateSequenceFactory().create(e),this);if(ae(e,Se))return new Je(e,this)}else return new Je(this.getCoordinateSequenceFactory().create([]),this)},ge.prototype.createMultiLineString=function(){if(arguments.length===0)return new ps(null,this);if(arguments.length===1){var e=arguments[0];return new ps(e,this)}},ge.prototype.buildGeometry=function(e){for(var t=null,r=!1,i=!1,s=e.iterator();s.hasNext();){var o=s.next(),a=o.getClass();t===null&&(t=a),a!==t&&(r=!0),o.isGeometryCollectionOrDerived()&&(i=!0)}if(t===null)return this.createGeometryCollection();if(r||i)return this.createGeometryCollection(ge.toGeometryArray(e));var l=e.iterator().next(),u=e.size()>1;if(u){if(l instanceof it)return this.createMultiPolygon(ge.toPolygonArray(e));if(l instanceof Je)return this.createMultiLineString(ge.toLineStringArray(e));if(l instanceof jt)return this.createMultiPoint(ge.toPointArray(e));fe.shouldNeverReachHere("Unhandled class: "+l.getClass().getName())}return l},ge.prototype.createMultiPointFromCoords=function(e){return this.createMultiPoint(e!==null?this.getCoordinateSequenceFactory().create(e):null)},ge.prototype.createPoint=function(){if(arguments.length===0)return this.createPoint(this.getCoordinateSequenceFactory().create([]));if(arguments.length===1){if(arguments[0]instanceof M){var e=arguments[0];return this.createPoint(e!==null?this.getCoordinateSequenceFactory().create([e]):null)}else if(ae(arguments[0],Se)){var t=arguments[0];return new jt(t,this)}}},ge.prototype.getCoordinateSequenceFactory=function(){return this._coordinateSequenceFactory},ge.prototype.createPolygon=function(){if(arguments.length===0)return new it(null,null,this);if(arguments.length===1){if(ae(arguments[0],Se)){var e=arguments[0];return this.createPolygon(this.createLinearRing(e))}else if(arguments[0]instanceof Array){var t=arguments[0];return this.createPolygon(this.createLinearRing(t))}else if(arguments[0]instanceof Rn){var r=arguments[0];return this.createPolygon(r,null)}}else if(arguments.length===2){var i=arguments[0],s=arguments[1];return new it(i,s,this)}},ge.prototype.getSRID=function(){return this._SRID},ge.prototype.createGeometryCollection=function(){if(arguments.length===0)return new Mt(null,this);if(arguments.length===1){var e=arguments[0];return new Mt(e,this)}},ge.prototype.createGeometry=function(e){var t=new Dr(this);return t.edit(e,{edit:function(){if(arguments.length===2){var r=arguments[0];return this._coordinateSequenceFactory.create(r)}}})},ge.prototype.getPrecisionModel=function(){return this._precisionModel},ge.prototype.createLinearRing=function(){if(arguments.length===0)return this.createLinearRing(this.getCoordinateSequenceFactory().create([]));if(arguments.length===1){if(arguments[0]instanceof Array){var e=arguments[0];return this.createLinearRing(e!==null?this.getCoordinateSequenceFactory().create(e):null)}else if(ae(arguments[0],Se)){var t=arguments[0];return new Rn(t,this)}}},ge.prototype.createMultiPolygon=function(){if(arguments.length===0)return new Fn(null,this);if(arguments.length===1){var e=arguments[0];return new Fn(e,this)}},ge.prototype.createMultiPoint=function(){var e=this;if(arguments.length===0)return new pl(null,this);if(arguments.length===1){if(arguments[0]instanceof Array){var t=arguments[0];return new pl(t,this)}else if(arguments[0]instanceof Array){var r=arguments[0];return this.createMultiPoint(r!==null?this.getCoordinateSequenceFactory().create(r):null)}else if(ae(arguments[0],Se)){var i=arguments[0];if(i===null)return this.createMultiPoint(new Array(0).fill(null));for(var s=new Array(i.size()).fill(null),o=0;o<i.size();o++){var a=e.getCoordinateSequenceFactory().create(1,i.getDimension());Ke.copy(i,o,a,0,1),s[o]=e.createPoint(a)}return this.createMultiPoint(s)}}},ge.prototype.interfaces_=function(){return[Cr]},ge.prototype.getClass=function(){return ge},ge.toMultiPolygonArray=function(e){var t=new Array(e.size()).fill(null);return e.toArray(t)},ge.toGeometryArray=function(e){if(e===null)return null;var t=new Array(e.size()).fill(null);return e.toArray(t)},ge.getDefaultCoordinateSequenceFactory=function(){return kn.instance()},ge.toMultiLineStringArray=function(e){var t=new Array(e.size()).fill(null);return e.toArray(t)},ge.toLineStringArray=function(e){var t=new Array(e.size()).fill(null);return e.toArray(t)},ge.toMultiPointArray=function(e){var t=new Array(e.size()).fill(null);return e.toArray(t)},ge.toLinearRingArray=function(e){var t=new Array(e.size()).fill(null);return e.toArray(t)},ge.toPointArray=function(e){var t=new Array(e.size()).fill(null);return e.toArray(t)},ge.toPolygonArray=function(e){var t=new Array(e.size()).fill(null);return e.toArray(t)},ge.createPointFromInternalCoord=function(e,t){return t.getPrecisionModel().makePrecise(e),t.getFactory().createPoint(e)},Af.serialVersionUID.get=function(){return-6820524753094096e3},Object.defineProperties(ge,Af);var Bm=["Point","MultiPoint","LineString","MultiLineString","Polygon","MultiPolygon"],zu=function(e){this.geometryFactory=e||new ge};zu.prototype.read=function(e){var t;typeof e=="string"?t=JSON.parse(e):t=e;var r=t.type;if(!dn[r])throw new Error("Unknown GeoJSON type: "+t.type);return Bm.indexOf(r)!==-1?dn[r].apply(this,[t.coordinates]):r==="GeometryCollection"?dn[r].apply(this,[t.geometries]):dn[r].apply(this,[t])},zu.prototype.write=function(e){var t=e.getGeometryType();if(!hi[t])throw new Error("Geometry is not supported");return hi[t].apply(this,[e])};var dn={Feature:function(n){var e={};for(var t in n)e[t]=n[t];if(n.geometry){var r=n.geometry.type;if(!dn[r])throw new Error("Unknown GeoJSON type: "+n.type);e.geometry=this.read(n.geometry)}return n.bbox&&(e.bbox=dn.bbox.apply(this,[n.bbox])),e},FeatureCollection:function(n){var e=this,t={};if(n.features){t.features=[];for(var r=0;r<n.features.length;++r)t.features.push(e.read(n.features[r]))}return n.bbox&&(t.bbox=this.parse.bbox.apply(this,[n.bbox])),t},coordinates:function(n){for(var e=[],t=0;t<n.length;++t){var r=n[t];e.push(new M(r[0],r[1]))}return e},bbox:function(n){return this.geometryFactory.createLinearRing([new M(n[0],n[1]),new M(n[2],n[1]),new M(n[2],n[3]),new M(n[0],n[3]),new M(n[0],n[1])])},Point:function(n){var e=new M(n[0],n[1]);return this.geometryFactory.createPoint(e)},MultiPoint:function(n){for(var e=this,t=[],r=0;r<n.length;++r)t.push(dn.Point.apply(e,[n[r]]));return this.geometryFactory.createMultiPoint(t)},LineString:function(n){var e=dn.coordinates.apply(this,[n]);return this.geometryFactory.createLineString(e)},MultiLineString:function(n){for(var e=this,t=[],r=0;r<n.length;++r)t.push(dn.LineString.apply(e,[n[r]]));return this.geometryFactory.createMultiLineString(t)},Polygon:function(n){for(var e=this,t=dn.coordinates.apply(this,[n[0]]),r=this.geometryFactory.createLinearRing(t),i=[],s=1;s<n.length;++s){var o=n[s],a=dn.coordinates.apply(e,[o]),l=e.geometryFactory.createLinearRing(a);i.push(l)}return this.geometryFactory.createPolygon(r,i)},MultiPolygon:function(n){for(var e=this,t=[],r=0;r<n.length;++r){var i=n[r];t.push(dn.Polygon.apply(e,[i]))}return this.geometryFactory.createMultiPolygon(t)},GeometryCollection:function(n){for(var e=this,t=[],r=0;r<n.length;++r){var i=n[r];t.push(e.read(i))}return this.geometryFactory.createGeometryCollection(t)}},hi={coordinate:function(n){return[n.x,n.y]},Point:function(n){var e=hi.coordinate.apply(this,[n.getCoordinate()]);return{type:"Point",coordinates:e}},MultiPoint:function(n){for(var e=this,t=[],r=0;r<n._geometries.length;++r){var i=n._geometries[r],s=hi.Point.apply(e,[i]);t.push(s.coordinates)}return{type:"MultiPoint",coordinates:t}},LineString:function(n){for(var e=this,t=[],r=n.getCoordinates(),i=0;i<r.length;++i){var s=r[i];t.push(hi.coordinate.apply(e,[s]))}return{type:"LineString",coordinates:t}},MultiLineString:function(n){for(var e=this,t=[],r=0;r<n._geometries.length;++r){var i=n._geometries[r],s=hi.LineString.apply(e,[i]);t.push(s.coordinates)}return{type:"MultiLineString",coordinates:t}},Polygon:function(n){var e=this,t=[],r=hi.LineString.apply(this,[n._shell]);t.push(r.coordinates);for(var i=0;i<n._holes.length;++i){var s=n._holes[i],o=hi.LineString.apply(e,[s]);t.push(o.coordinates)}return{type:"Polygon",coordinates:t}},MultiPolygon:function(n){for(var e=this,t=[],r=0;r<n._geometries.length;++r){var i=n._geometries[r],s=hi.Polygon.apply(e,[i]);t.push(s.coordinates)}return{type:"MultiPolygon",coordinates:t}},GeometryCollection:function(n){for(var e=this,t=[],r=0;r<n._geometries.length;++r){var i=n._geometries[r],s=i.getGeometryType();t.push(hi[s].apply(e,[i]))}return{type:"GeometryCollection",geometries:t}}},Hc=function(e){this.geometryFactory=e||new ge,this.precisionModel=this.geometryFactory.getPrecisionModel(),this.parser=new zu(this.geometryFactory)};Hc.prototype.read=function(e){var t=this.parser.read(e);return this.precisionModel.getType()===Te.FIXED&&this.reducePrecision(t),t},Hc.prototype.reducePrecision=function(e){var t=this,r,i;if(e.coordinate)this.precisionModel.makePrecise(e.coordinate);else if(e.points)for(r=0,i=e.points.length;r<i;r++)t.precisionModel.makePrecise(e.points[r]);else if(e.geometries)for(r=0,i=e.geometries.length;r<i;r++)t.reducePrecision(e.geometries[r])};var Rf=function(){this.parser=new zu(this.geometryFactory)};Rf.prototype.write=function(e){return this.parser.write(e)};var G=function(){},Uu={ON:{configurable:!0},LEFT:{configurable:!0},RIGHT:{configurable:!0}};G.prototype.interfaces_=function(){return[]},G.prototype.getClass=function(){return G},G.opposite=function(e){return e===G.LEFT?G.RIGHT:e===G.RIGHT?G.LEFT:e},Uu.ON.get=function(){return 0},Uu.LEFT.get=function(){return 1},Uu.RIGHT.get=function(){return 2},Object.defineProperties(G,Uu);function Gu(n){this.message=n||""}Gu.prototype=new Error,Gu.prototype.name="EmptyStackException";function pn(){this.array_=[]}pn.prototype=new Yr,pn.prototype.add=function(n){return this.array_.push(n),!0},pn.prototype.get=function(n){if(n<0||n>=this.size())throw new Error;return this.array_[n]},pn.prototype.push=function(n){return this.array_.push(n),n},pn.prototype.pop=function(n){if(this.array_.length===0)throw new Gu;return this.array_.pop()},pn.prototype.peek=function(){if(this.array_.length===0)throw new Gu;return this.array_[this.array_.length-1]},pn.prototype.empty=function(){return this.array_.length===0},pn.prototype.isEmpty=function(){return this.empty()},pn.prototype.search=function(n){return this.array_.indexOf(n)},pn.prototype.size=function(){return this.array_.length},pn.prototype.toArray=function(){for(var n=this,e=[],t=0,r=this.array_.length;t<r;t++)e.push(n.array_[t]);return e};var gn=function(){this._minIndex=-1,this._minCoord=null,this._minDe=null,this._orientedDe=null};gn.prototype.getCoordinate=function(){return this._minCoord},gn.prototype.getRightmostSide=function(e,t){var r=this.getRightmostSideOfSegment(e,t);return r<0&&(r=this.getRightmostSideOfSegment(e,t-1)),r<0&&(this._minCoord=null,this.checkForRightmostCoordinate(e)),r},gn.prototype.findRightmostEdgeAtVertex=function(){var e=this._minDe.getEdge().getCoordinates();fe.isTrue(this._minIndex>0&&this._minIndex<e.length,"rightmost point expected to be interior vertex of edge");var t=e[this._minIndex-1],r=e[this._minIndex+1],i=Y.computeOrientation(this._minCoord,r,t),s=!1;(t.y<this._minCoord.y&&r.y<this._minCoord.y&&i===Y.COUNTERCLOCKWISE||t.y>this._minCoord.y&&r.y>this._minCoord.y&&i===Y.CLOCKWISE)&&(s=!0),s&&(this._minIndex=this._minIndex-1)},gn.prototype.getRightmostSideOfSegment=function(e,t){var r=e.getEdge(),i=r.getCoordinates();if(t<0||t+1>=i.length||i[t].y===i[t+1].y)return-1;var s=G.LEFT;return i[t].y<i[t+1].y&&(s=G.RIGHT),s},gn.prototype.getEdge=function(){return this._orientedDe},gn.prototype.checkForRightmostCoordinate=function(e){for(var t=this,r=e.getEdge().getCoordinates(),i=0;i<r.length-1;i++)(t._minCoord===null||r[i].x>t._minCoord.x)&&(t._minDe=e,t._minIndex=i,t._minCoord=r[i])},gn.prototype.findRightmostEdgeAtNode=function(){var e=this._minDe.getNode(),t=e.getEdges();this._minDe=t.getRightmostEdge(),this._minDe.isForward()||(this._minDe=this._minDe.getSym(),this._minIndex=this._minDe.getEdge().getCoordinates().length-1)},gn.prototype.findEdge=function(e){for(var t=this,r=e.iterator();r.hasNext();){var i=r.next();i.isForward()&&t.checkForRightmostCoordinate(i)}fe.isTrue(this._minIndex!==0||this._minCoord.equals(this._minDe.getCoordinate()),"inconsistency in rightmost processing"),this._minIndex===0?this.findRightmostEdgeAtNode():this.findRightmostEdgeAtVertex(),this._orientedDe=this._minDe;var s=this.getRightmostSide(this._minDe,this._minIndex);s===G.LEFT&&(this._orientedDe=this._minDe.getSym())},gn.prototype.interfaces_=function(){return[]},gn.prototype.getClass=function(){return gn};var fi=function(n){function e(t,r){n.call(this,e.msgWithCoord(t,r)),this.pt=r?new M(r):null,this.name="TopologyException"}return n&&(e.__proto__=n),e.prototype=Object.create(n&&n.prototype),e.prototype.constructor=e,e.prototype.getCoordinate=function(){return this.pt},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e.msgWithCoord=function(r,i){return i?r:r+" [ "+i+" ]"},e}(oi),Wu=function(){this.array_=[]};Wu.prototype.addLast=function(e){this.array_.push(e)},Wu.prototype.removeFirst=function(){return this.array_.shift()},Wu.prototype.isEmpty=function(){return this.array_.length===0};var xt=function(){this._finder=null,this._dirEdgeList=new W,this._nodes=new W,this._rightMostCoord=null,this._env=null,this._finder=new gn};xt.prototype.clearVisitedEdges=function(){for(var e=this._dirEdgeList.iterator();e.hasNext();){var t=e.next();t.setVisited(!1)}},xt.prototype.getRightmostCoordinate=function(){return this._rightMostCoord},xt.prototype.computeNodeDepth=function(e){for(var t=this,r=null,i=e.getEdges().iterator();i.hasNext();){var s=i.next();if(s.isVisited()||s.getSym().isVisited()){r=s;break}}if(r===null)throw new fi("unable to find edge to compute depths at "+e.getCoordinate());e.getEdges().computeDepths(r);for(var o=e.getEdges().iterator();o.hasNext();){var a=o.next();a.setVisited(!0),t.copySymDepths(a)}},xt.prototype.computeDepth=function(e){this.clearVisitedEdges();var t=this._finder.getEdge();t.setEdgeDepths(G.RIGHT,e),this.copySymDepths(t),this.computeDepths(t)},xt.prototype.create=function(e){this.addReachable(e),this._finder.findEdge(this._dirEdgeList),this._rightMostCoord=this._finder.getCoordinate()},xt.prototype.findResultEdges=function(){for(var e=this._dirEdgeList.iterator();e.hasNext();){var t=e.next();t.getDepth(G.RIGHT)>=1&&t.getDepth(G.LEFT)<=0&&!t.isInteriorAreaEdge()&&t.setInResult(!0)}},xt.prototype.computeDepths=function(e){var t=this,r=new zc,i=new Wu,s=e.getNode();for(i.addLast(s),r.add(s),e.setVisited(!0);!i.isEmpty();){var o=i.removeFirst();r.add(o),t.computeNodeDepth(o);for(var a=o.getEdges().iterator();a.hasNext();){var l=a.next(),u=l.getSym();if(!u.isVisited()){var h=u.getNode();r.contains(h)||(i.addLast(h),r.add(h))}}}},xt.prototype.compareTo=function(e){var t=e;return this._rightMostCoord.x<t._rightMostCoord.x?-1:this._rightMostCoord.x>t._rightMostCoord.x?1:0},xt.prototype.getEnvelope=function(){if(this._env===null){for(var e=new te,t=this._dirEdgeList.iterator();t.hasNext();)for(var r=t.next(),i=r.getEdge().getCoordinates(),s=0;s<i.length-1;s++)e.expandToInclude(i[s]);this._env=e}return this._env},xt.prototype.addReachable=function(e){var t=this,r=new pn;for(r.add(e);!r.empty();){var i=r.pop();t.add(i,r)}},xt.prototype.copySymDepths=function(e){var t=e.getSym();t.setDepth(G.LEFT,e.getDepth(G.RIGHT)),t.setDepth(G.RIGHT,e.getDepth(G.LEFT))},xt.prototype.add=function(e,t){var r=this;e.setVisited(!0),this._nodes.add(e);for(var i=e.getEdges().iterator();i.hasNext();){var s=i.next();r._dirEdgeList.add(s);var o=s.getSym(),a=o.getNode();a.isVisited()||t.push(a)}},xt.prototype.getNodes=function(){return this._nodes},xt.prototype.getDirectedEdges=function(){return this._dirEdgeList},xt.prototype.interfaces_=function(){return[Sr]},xt.prototype.getClass=function(){return xt};var Re=function n(){var e=this;if(this.location=null,arguments.length===1){if(arguments[0]instanceof Array){var t=arguments[0];this.init(t.length)}else if(Number.isInteger(arguments[0])){var r=arguments[0];this.init(1),this.location[G.ON]=r}else if(arguments[0]instanceof n){var i=arguments[0];if(this.init(i.location.length),i!==null)for(var s=0;s<this.location.length;s++)e.location[s]=i.location[s]}}else if(arguments.length===3){var o=arguments[0],a=arguments[1],l=arguments[2];this.init(3),this.location[G.ON]=o,this.location[G.LEFT]=a,this.location[G.RIGHT]=l}};Re.prototype.setAllLocations=function(e){for(var t=this,r=0;r<this.location.length;r++)t.location[r]=e},Re.prototype.isNull=function(){for(var e=this,t=0;t<this.location.length;t++)if(e.location[t]!==R.NONE)return!1;return!0},Re.prototype.setAllLocationsIfNull=function(e){for(var t=this,r=0;r<this.location.length;r++)t.location[r]===R.NONE&&(t.location[r]=e)},Re.prototype.isLine=function(){return this.location.length===1},Re.prototype.merge=function(e){var t=this;if(e.location.length>this.location.length){var r=new Array(3).fill(null);r[G.ON]=this.location[G.ON],r[G.LEFT]=R.NONE,r[G.RIGHT]=R.NONE,this.location=r}for(var i=0;i<this.location.length;i++)t.location[i]===R.NONE&&i<e.location.length&&(t.location[i]=e.location[i])},Re.prototype.getLocations=function(){return this.location},Re.prototype.flip=function(){if(this.location.length<=1)return null;var e=this.location[G.LEFT];this.location[G.LEFT]=this.location[G.RIGHT],this.location[G.RIGHT]=e},Re.prototype.toString=function(){var e=new on;return this.location.length>1&&e.append(R.toLocationSymbol(this.location[G.LEFT])),e.append(R.toLocationSymbol(this.location[G.ON])),this.location.length>1&&e.append(R.toLocationSymbol(this.location[G.RIGHT])),e.toString()},Re.prototype.setLocations=function(e,t,r){this.location[G.ON]=e,this.location[G.LEFT]=t,this.location[G.RIGHT]=r},Re.prototype.get=function(e){return e<this.location.length?this.location[e]:R.NONE},Re.prototype.isArea=function(){return this.location.length>1},Re.prototype.isAnyNull=function(){for(var e=this,t=0;t<this.location.length;t++)if(e.location[t]===R.NONE)return!0;return!1},Re.prototype.setLocation=function(){if(arguments.length===1){var e=arguments[0];this.setLocation(G.ON,e)}else if(arguments.length===2){var t=arguments[0],r=arguments[1];this.location[t]=r}},Re.prototype.init=function(e){this.location=new Array(e).fill(null),this.setAllLocations(R.NONE)},Re.prototype.isEqualOnSide=function(e,t){return this.location[t]===e.location[t]},Re.prototype.allPositionsEqual=function(e){for(var t=this,r=0;r<this.location.length;r++)if(t.location[r]!==e)return!1;return!0},Re.prototype.interfaces_=function(){return[]},Re.prototype.getClass=function(){return Re};var be=function n(){if(this.elt=new Array(2).fill(null),arguments.length===1){if(Number.isInteger(arguments[0])){var e=arguments[0];this.elt[0]=new Re(e),this.elt[1]=new Re(e)}else if(arguments[0]instanceof n){var t=arguments[0];this.elt[0]=new Re(t.elt[0]),this.elt[1]=new Re(t.elt[1])}}else if(arguments.length===2){var r=arguments[0],i=arguments[1];this.elt[0]=new Re(R.NONE),this.elt[1]=new Re(R.NONE),this.elt[r].setLocation(i)}else if(arguments.length===3){var s=arguments[0],o=arguments[1],a=arguments[2];this.elt[0]=new Re(s,o,a),this.elt[1]=new Re(s,o,a)}else if(arguments.length===4){var l=arguments[0],u=arguments[1],h=arguments[2],f=arguments[3];this.elt[0]=new Re(R.NONE,R.NONE,R.NONE),this.elt[1]=new Re(R.NONE,R.NONE,R.NONE),this.elt[l].setLocations(u,h,f)}};be.prototype.getGeometryCount=function(){var e=0;return this.elt[0].isNull()||e++,this.elt[1].isNull()||e++,e},be.prototype.setAllLocations=function(e,t){this.elt[e].setAllLocations(t)},be.prototype.isNull=function(e){return this.elt[e].isNull()},be.prototype.setAllLocationsIfNull=function(){if(arguments.length===1){var e=arguments[0];this.setAllLocationsIfNull(0,e),this.setAllLocationsIfNull(1,e)}else if(arguments.length===2){var t=arguments[0],r=arguments[1];this.elt[t].setAllLocationsIfNull(r)}},be.prototype.isLine=function(e){return this.elt[e].isLine()},be.prototype.merge=function(e){for(var t=this,r=0;r<2;r++)t.elt[r]===null&&e.elt[r]!==null?t.elt[r]=new Re(e.elt[r]):t.elt[r].merge(e.elt[r])},be.prototype.flip=function(){this.elt[0].flip(),this.elt[1].flip()},be.prototype.getLocation=function(){if(arguments.length===1){var e=arguments[0];return this.elt[e].get(G.ON)}else if(arguments.length===2){var t=arguments[0],r=arguments[1];return this.elt[t].get(r)}},be.prototype.toString=function(){var e=new on;return this.elt[0]!==null&&(e.append("A:"),e.append(this.elt[0].toString())),this.elt[1]!==null&&(e.append(" B:"),e.append(this.elt[1].toString())),e.toString()},be.prototype.isArea=function(){if(arguments.length===0)return this.elt[0].isArea()||this.elt[1].isArea();if(arguments.length===1){var e=arguments[0];return this.elt[e].isArea()}},be.prototype.isAnyNull=function(e){return this.elt[e].isAnyNull()},be.prototype.setLocation=function(){if(arguments.length===2){var e=arguments[0],t=arguments[1];this.elt[e].setLocation(G.ON,t)}else if(arguments.length===3){var r=arguments[0],i=arguments[1],s=arguments[2];this.elt[r].setLocation(i,s)}},be.prototype.isEqualOnSide=function(e,t){return this.elt[0].isEqualOnSide(e.elt[0],t)&&this.elt[1].isEqualOnSide(e.elt[1],t)},be.prototype.allPositionsEqual=function(e,t){return this.elt[e].allPositionsEqual(t)},be.prototype.toLine=function(e){this.elt[e].isArea()&&(this.elt[e]=new Re(this.elt[e].location[0]))},be.prototype.interfaces_=function(){return[]},be.prototype.getClass=function(){return be},be.toLineLabel=function(e){for(var t=new be(R.NONE),r=0;r<2;r++)t.setLocation(r,e.getLocation(r));return t};var je=function(){this._startDe=null,this._maxNodeDegree=-1,this._edges=new W,this._pts=new W,this._label=new be(R.NONE),this._ring=null,this._isHole=null,this._shell=null,this._holes=new W,this._geometryFactory=null;var e=arguments[0],t=arguments[1];this._geometryFactory=t,this.computePoints(e),this.computeRing()};je.prototype.computeRing=function(){var e=this;if(this._ring!==null)return null;for(var t=new Array(this._pts.size()).fill(null),r=0;r<this._pts.size();r++)t[r]=e._pts.get(r);this._ring=this._geometryFactory.createLinearRing(t),this._isHole=Y.isCCW(this._ring.getCoordinates())},je.prototype.isIsolated=function(){return this._label.getGeometryCount()===1},je.prototype.computePoints=function(e){var t=this;this._startDe=e;var r=e,i=!0;do{if(r===null)throw new fi("Found null DirectedEdge");if(r.getEdgeRing()===t)throw new fi("Directed Edge visited twice during ring-building at "+r.getCoordinate());t._edges.add(r);var s=r.getLabel();fe.isTrue(s.isArea()),t.mergeLabel(s),t.addPoints(r.getEdge(),r.isForward(),i),i=!1,t.setEdgeRing(r,t),r=t.getNext(r)}while(r!==this._startDe)},je.prototype.getLinearRing=function(){return this._ring},je.prototype.getCoordinate=function(e){return this._pts.get(e)},je.prototype.computeMaxNodeDegree=function(){var e=this;this._maxNodeDegree=0;var t=this._startDe;do{var r=t.getNode(),i=r.getEdges().getOutgoingDegree(e);i>e._maxNodeDegree&&(e._maxNodeDegree=i),t=e.getNext(t)}while(t!==this._startDe);this._maxNodeDegree*=2},je.prototype.addPoints=function(e,t,r){var i=this,s=e.getCoordinates();if(t){var o=1;r&&(o=0);for(var a=o;a<s.length;a++)i._pts.add(s[a])}else{var l=s.length-2;r&&(l=s.length-1);for(var u=l;u>=0;u--)i._pts.add(s[u])}},je.prototype.isHole=function(){return this._isHole},je.prototype.setInResult=function(){var e=this._startDe;do e.getEdge().setInResult(!0),e=e.getNext();while(e!==this._startDe)},je.prototype.containsPoint=function(e){var t=this.getLinearRing(),r=t.getEnvelopeInternal();if(!r.contains(e)||!Y.isPointInRing(e,t.getCoordinates()))return!1;for(var i=this._holes.iterator();i.hasNext();){var s=i.next();if(s.containsPoint(e))return!1}return!0},je.prototype.addHole=function(e){this._holes.add(e)},je.prototype.isShell=function(){return this._shell===null},je.prototype.getLabel=function(){return this._label},je.prototype.getEdges=function(){return this._edges},je.prototype.getMaxNodeDegree=function(){return this._maxNodeDegree<0&&this.computeMaxNodeDegree(),this._maxNodeDegree},je.prototype.getShell=function(){return this._shell},je.prototype.mergeLabel=function(){if(arguments.length===1){var e=arguments[0];this.mergeLabel(e,0),this.mergeLabel(e,1)}else if(arguments.length===2){var t=arguments[0],r=arguments[1],i=t.getLocation(r,G.RIGHT);if(i===R.NONE)return null;if(this._label.getLocation(r)===R.NONE)return this._label.setLocation(r,i),null}},je.prototype.setShell=function(e){this._shell=e,e!==null&&e.addHole(this)},je.prototype.toPolygon=function(e){for(var t=this,r=new Array(this._holes.size()).fill(null),i=0;i<this._holes.size();i++)r[i]=t._holes.get(i).getLinearRing();var s=e.createPolygon(this.getLinearRing(),r);return s},je.prototype.interfaces_=function(){return[]},je.prototype.getClass=function(){return je};var $m=function(n){function e(){var t=arguments[0],r=arguments[1];n.call(this,t,r)}return n&&(e.__proto__=n),e.prototype=Object.create(n&&n.prototype),e.prototype.constructor=e,e.prototype.setEdgeRing=function(r,i){r.setMinEdgeRing(i)},e.prototype.getNext=function(r){return r.getNextMin()},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e}(je),jm=function(n){function e(){var t=arguments[0],r=arguments[1];n.call(this,t,r)}return n&&(e.__proto__=n),e.prototype=Object.create(n&&n.prototype),e.prototype.constructor=e,e.prototype.buildMinimalRings=function(){var r=this,i=new W,s=this._startDe;do{if(s.getMinEdgeRing()===null){var o=new $m(s,r._geometryFactory);i.add(o)}s=s.getNext()}while(s!==this._startDe);return i},e.prototype.setEdgeRing=function(r,i){r.setEdgeRing(i)},e.prototype.linkDirectedEdgesForMinimalEdgeRings=function(){var r=this,i=this._startDe;do{var s=i.getNode();s.getEdges().linkMinimalDirectedEdges(r),i=i.getNext()}while(i!==this._startDe)},e.prototype.getNext=function(r){return r.getNext()},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e}(je),cr=function(){if(this._label=null,this._isInResult=!1,this._isCovered=!1,this._isCoveredSet=!1,this._isVisited=!1,arguments.length!==0){if(arguments.length===1){var e=arguments[0];this._label=e}}};cr.prototype.setVisited=function(e){this._isVisited=e},cr.prototype.setInResult=function(e){this._isInResult=e},cr.prototype.isCovered=function(){return this._isCovered},cr.prototype.isCoveredSet=function(){return this._isCoveredSet},cr.prototype.setLabel=function(e){this._label=e},cr.prototype.getLabel=function(){return this._label},cr.prototype.setCovered=function(e){this._isCovered=e,this._isCoveredSet=!0},cr.prototype.updateIM=function(e){fe.isTrue(this._label.getGeometryCount()>=2,"found partial label"),this.computeIM(e)},cr.prototype.isInResult=function(){return this._isInResult},cr.prototype.isVisited=function(){return this._isVisited},cr.prototype.interfaces_=function(){return[]},cr.prototype.getClass=function(){return cr};var qu=function(n){function e(){n.call(this),this._coord=null,this._edges=null;var t=arguments[0],r=arguments[1];this._coord=t,this._edges=r,this._label=new be(0,R.NONE)}return n&&(e.__proto__=n),e.prototype=Object.create(n&&n.prototype),e.prototype.constructor=e,e.prototype.isIncidentEdgeInResult=function(){for(var r=this.getEdges().getEdges().iterator();r.hasNext();){var i=r.next();if(i.getEdge().isInResult())return!0}return!1},e.prototype.isIsolated=function(){return this._label.getGeometryCount()===1},e.prototype.getCoordinate=function(){return this._coord},e.prototype.print=function(r){r.println("node "+this._coord+" lbl: "+this._label)},e.prototype.computeIM=function(r){},e.prototype.computeMergedLocation=function(r,i){var s=R.NONE;if(s=this._label.getLocation(i),!r.isNull(i)){var o=r.getLocation(i);s!==R.BOUNDARY&&(s=o)}return s},e.prototype.setLabel=function(){if(arguments.length===2){var r=arguments[0],i=arguments[1];this._label===null?this._label=new be(r,i):this._label.setLocation(r,i)}else return n.prototype.setLabel.apply(this,arguments)},e.prototype.getEdges=function(){return this._edges},e.prototype.mergeLabel=function(){var r=this;if(arguments[0]instanceof e){var i=arguments[0];this.mergeLabel(i._label)}else if(arguments[0]instanceof be)for(var s=arguments[0],o=0;o<2;o++){var a=r.computeMergedLocation(s,o),l=r._label.getLocation(o);l===R.NONE&&r._label.setLocation(o,a)}},e.prototype.add=function(r){this._edges.insert(r),r.setNode(this)},e.prototype.setLabelBoundary=function(r){if(this._label===null)return null;var i=R.NONE;this._label!==null&&(i=this._label.getLocation(r));var s=null;switch(i){case R.BOUNDARY:s=R.INTERIOR;break;case R.INTERIOR:s=R.BOUNDARY;break;default:s=R.BOUNDARY;break}this._label.setLocation(r,s)},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e}(cr),mn=function(){this.nodeMap=new Tt,this.nodeFact=null;var e=arguments[0];this.nodeFact=e};mn.prototype.find=function(e){return this.nodeMap.get(e)},mn.prototype.addNode=function(){if(arguments[0]instanceof M){var e=arguments[0],t=this.nodeMap.get(e);return t===null&&(t=this.nodeFact.createNode(e),this.nodeMap.put(e,t)),t}else if(arguments[0]instanceof qu){var r=arguments[0],i=this.nodeMap.get(r.getCoordinate());return i===null?(this.nodeMap.put(r.getCoordinate(),r),r):(i.mergeLabel(r),i)}},mn.prototype.print=function(e){for(var t=this.iterator();t.hasNext();){var r=t.next();r.print(e)}},mn.prototype.iterator=function(){return this.nodeMap.values().iterator()},mn.prototype.values=function(){return this.nodeMap.values()},mn.prototype.getBoundaryNodes=function(e){for(var t=new W,r=this.iterator();r.hasNext();){var i=r.next();i.getLabel().getLocation(e)===R.BOUNDARY&&t.add(i)}return t},mn.prototype.add=function(e){var t=e.getCoordinate(),r=this.addNode(t);r.add(e)},mn.prototype.interfaces_=function(){return[]},mn.prototype.getClass=function(){return mn};var xe=function(){},jl={NE:{configurable:!0},NW:{configurable:!0},SW:{configurable:!0},SE:{configurable:!0}};xe.prototype.interfaces_=function(){return[]},xe.prototype.getClass=function(){return xe},xe.isNorthern=function(e){return e===xe.NE||e===xe.NW},xe.isOpposite=function(e,t){if(e===t)return!1;var r=(e-t+4)%4;return r===2},xe.commonHalfPlane=function(e,t){if(e===t)return e;var r=(e-t+4)%4;if(r===2)return-1;var i=e<t?e:t,s=e>t?e:t;return i===0&&s===3?3:i},xe.isInHalfPlane=function(e,t){return t===xe.SE?e===xe.SE||e===xe.SW:e===t||e===t+1},xe.quadrant=function(){if(typeof arguments[0]=="number"&&typeof arguments[1]=="number"){var e=arguments[0],t=arguments[1];if(e===0&&t===0)throw new Ue("Cannot compute the quadrant for point ( "+e+", "+t+" )");return e>=0?t>=0?xe.NE:xe.SE:t>=0?xe.NW:xe.SW}else if(arguments[0]instanceof M&&arguments[1]instanceof M){var r=arguments[0],i=arguments[1];if(i.x===r.x&&i.y===r.y)throw new Ue("Cannot compute the quadrant for two identical points "+r);return i.x>=r.x?i.y>=r.y?xe.NE:xe.SE:i.y>=r.y?xe.NW:xe.SW}},jl.NE.get=function(){return 0},jl.NW.get=function(){return 1},jl.SW.get=function(){return 2},jl.SE.get=function(){return 3},Object.defineProperties(xe,jl);var Dt=function(){if(this._edge=null,this._label=null,this._node=null,this._p0=null,this._p1=null,this._dx=null,this._dy=null,this._quadrant=null,arguments.length===1){var e=arguments[0];this._edge=e}else if(arguments.length===3){var t=arguments[0],r=arguments[1],i=arguments[2],s=null;this._edge=t,this.init(r,i),this._label=s}else if(arguments.length===4){var o=arguments[0],a=arguments[1],l=arguments[2],u=arguments[3];this._edge=o,this.init(a,l),this._label=u}};Dt.prototype.compareDirection=function(e){return this._dx===e._dx&&this._dy===e._dy?0:this._quadrant>e._quadrant?1:this._quadrant<e._quadrant?-1:Y.computeOrientation(e._p0,e._p1,this._p1)},Dt.prototype.getDy=function(){return this._dy},Dt.prototype.getCoordinate=function(){return this._p0},Dt.prototype.setNode=function(e){this._node=e},Dt.prototype.print=function(e){var t=Math.atan2(this._dy,this._dx),r=this.getClass().getName(),i=r.lastIndexOf("."),s=r.substring(i+1);e.print(" "+s+": "+this._p0+" - "+this._p1+" "+this._quadrant+":"+t+" "+this._label)},Dt.prototype.compareTo=function(e){var t=e;return this.compareDirection(t)},Dt.prototype.getDirectedCoordinate=function(){return this._p1},Dt.prototype.getDx=function(){return this._dx},Dt.prototype.getLabel=function(){return this._label},Dt.prototype.getEdge=function(){return this._edge},Dt.prototype.getQuadrant=function(){return this._quadrant},Dt.prototype.getNode=function(){return this._node},Dt.prototype.toString=function(){var e=Math.atan2(this._dy,this._dx),t=this.getClass().getName(),r=t.lastIndexOf("."),i=t.substring(r+1);return" "+i+": "+this._p0+" - "+this._p1+" "+this._quadrant+":"+e+" "+this._label},Dt.prototype.computeLabel=function(e){},Dt.prototype.init=function(e,t){this._p0=e,this._p1=t,this._dx=t.x-e.x,this._dy=t.y-e.y,this._quadrant=xe.quadrant(this._dx,this._dy),fe.isTrue(!(this._dx===0&&this._dy===0),"EdgeEnd with identical endpoints found")},Dt.prototype.interfaces_=function(){return[Sr]},Dt.prototype.getClass=function(){return Dt};var Yc=function(n){function e(){var t=arguments[0],r=arguments[1];if(n.call(this,t),this._isForward=null,this._isInResult=!1,this._isVisited=!1,this._sym=null,this._next=null,this._nextMin=null,this._edgeRing=null,this._minEdgeRing=null,this._depth=[0,-999,-999],this._isForward=r,r)this.init(t.getCoordinate(0),t.getCoordinate(1));else{var i=t.getNumPoints()-1;this.init(t.getCoordinate(i),t.getCoordinate(i-1))}this.computeDirectedLabel()}return n&&(e.__proto__=n),e.prototype=Object.create(n&&n.prototype),e.prototype.constructor=e,e.prototype.getNextMin=function(){return this._nextMin},e.prototype.getDepth=function(r){return this._depth[r]},e.prototype.setVisited=function(r){this._isVisited=r},e.prototype.computeDirectedLabel=function(){this._label=new be(this._edge.getLabel()),this._isForward||this._label.flip()},e.prototype.getNext=function(){return this._next},e.prototype.setDepth=function(r,i){if(this._depth[r]!==-999&&this._depth[r]!==i)throw new fi("assigned depths do not match",this.getCoordinate());this._depth[r]=i},e.prototype.isInteriorAreaEdge=function(){for(var r=this,i=!0,s=0;s<2;s++)r._label.isArea(s)&&r._label.getLocation(s,G.LEFT)===R.INTERIOR&&r._label.getLocation(s,G.RIGHT)===R.INTERIOR||(i=!1);return i},e.prototype.setNextMin=function(r){this._nextMin=r},e.prototype.print=function(r){n.prototype.print.call(this,r),r.print(" "+this._depth[G.LEFT]+"/"+this._depth[G.RIGHT]),r.print(" ("+this.getDepthDelta()+")"),this._isInResult&&r.print(" inResult")},e.prototype.setMinEdgeRing=function(r){this._minEdgeRing=r},e.prototype.isLineEdge=function(){var r=this._label.isLine(0)||this._label.isLine(1),i=!this._label.isArea(0)||this._label.allPositionsEqual(0,R.EXTERIOR),s=!this._label.isArea(1)||this._label.allPositionsEqual(1,R.EXTERIOR);return r&&i&&s},e.prototype.setEdgeRing=function(r){this._edgeRing=r},e.prototype.getMinEdgeRing=function(){return this._minEdgeRing},e.prototype.getDepthDelta=function(){var r=this._edge.getDepthDelta();return this._isForward||(r=-r),r},e.prototype.setInResult=function(r){this._isInResult=r},e.prototype.getSym=function(){return this._sym},e.prototype.isForward=function(){return this._isForward},e.prototype.getEdge=function(){return this._edge},e.prototype.printEdge=function(r){this.print(r),r.print(" "),this._isForward?this._edge.print(r):this._edge.printReverse(r)},e.prototype.setSym=function(r){this._sym=r},e.prototype.setVisitedEdge=function(r){this.setVisited(r),this._sym.setVisited(r)},e.prototype.setEdgeDepths=function(r,i){var s=this.getEdge().getDepthDelta();this._isForward||(s=-s);var o=1;r===G.LEFT&&(o=-1);var a=G.opposite(r),l=s*o,u=i+l;this.setDepth(r,i),this.setDepth(a,u)},e.prototype.getEdgeRing=function(){return this._edgeRing},e.prototype.isInResult=function(){return this._isInResult},e.prototype.setNext=function(r){this._next=r},e.prototype.isVisited=function(){return this._isVisited},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e.depthFactor=function(r,i){return r===R.EXTERIOR&&i===R.INTERIOR?1:r===R.INTERIOR&&i===R.EXTERIOR?-1:0},e}(Dt),gl=function(){};gl.prototype.createNode=function(e){return new qu(e,null)},gl.prototype.interfaces_=function(){return[]},gl.prototype.getClass=function(){return gl};var Ye=function(){if(this._edges=new W,this._nodes=null,this._edgeEndList=new W,arguments.length===0)this._nodes=new mn(new gl);else if(arguments.length===1){var e=arguments[0];this._nodes=new mn(e)}};Ye.prototype.printEdges=function(e){var t=this;e.println("Edges:");for(var r=0;r<this._edges.size();r++){e.println("edge "+r+":");var i=t._edges.get(r);i.print(e),i.eiList.print(e)}},Ye.prototype.find=function(e){return this._nodes.find(e)},Ye.prototype.addNode=function(){if(arguments[0]instanceof qu){var e=arguments[0];return this._nodes.addNode(e)}else if(arguments[0]instanceof M){var t=arguments[0];return this._nodes.addNode(t)}},Ye.prototype.getNodeIterator=function(){return this._nodes.iterator()},Ye.prototype.linkResultDirectedEdges=function(){for(var e=this._nodes.iterator();e.hasNext();){var t=e.next();t.getEdges().linkResultDirectedEdges()}},Ye.prototype.debugPrintln=function(e){vt.out.println(e)},Ye.prototype.isBoundaryNode=function(e,t){var r=this._nodes.find(t);if(r===null)return!1;var i=r.getLabel();return i!==null&&i.getLocation(e)===R.BOUNDARY},Ye.prototype.linkAllDirectedEdges=function(){for(var e=this._nodes.iterator();e.hasNext();){var t=e.next();t.getEdges().linkAllDirectedEdges()}},Ye.prototype.matchInSameDirection=function(e,t,r,i){return e.equals(r)?Y.computeOrientation(e,t,i)===Y.COLLINEAR&&xe.quadrant(e,t)===xe.quadrant(r,i):!1},Ye.prototype.getEdgeEnds=function(){return this._edgeEndList},Ye.prototype.debugPrint=function(e){vt.out.print(e)},Ye.prototype.getEdgeIterator=function(){return this._edges.iterator()},Ye.prototype.findEdgeInSameDirection=function(e,t){for(var r=this,i=0;i<this._edges.size();i++){var s=r._edges.get(i),o=s.getCoordinates();if(r.matchInSameDirection(e,t,o[0],o[1])||r.matchInSameDirection(e,t,o[o.length-1],o[o.length-2]))return s}return null},Ye.prototype.insertEdge=function(e){this._edges.add(e)},Ye.prototype.findEdgeEnd=function(e){for(var t=this.getEdgeEnds().iterator();t.hasNext();){var r=t.next();if(r.getEdge()===e)return r}return null},Ye.prototype.addEdges=function(e){for(var t=this,r=e.iterator();r.hasNext();){var i=r.next();t._edges.add(i);var s=new Yc(i,!0),o=new Yc(i,!1);s.setSym(o),o.setSym(s),t.add(s),t.add(o)}},Ye.prototype.add=function(e){this._nodes.add(e),this._edgeEndList.add(e)},Ye.prototype.getNodes=function(){return this._nodes.values()},Ye.prototype.findEdge=function(e,t){for(var r=this,i=0;i<this._edges.size();i++){var s=r._edges.get(i),o=s.getCoordinates();if(e.equals(o[0])&&t.equals(o[1]))return s}return null},Ye.prototype.interfaces_=function(){return[]},Ye.prototype.getClass=function(){return Ye},Ye.linkResultDirectedEdges=function(e){for(var t=e.iterator();t.hasNext();){var r=t.next();r.getEdges().linkResultDirectedEdges()}};var er=function(){this._geometryFactory=null,this._shellList=new W;var e=arguments[0];this._geometryFactory=e};er.prototype.sortShellsAndHoles=function(e,t,r){for(var i=e.iterator();i.hasNext();){var s=i.next();s.isHole()?r.add(s):t.add(s)}},er.prototype.computePolygons=function(e){for(var t=this,r=new W,i=e.iterator();i.hasNext();){var s=i.next(),o=s.toPolygon(t._geometryFactory);r.add(o)}return r},er.prototype.placeFreeHoles=function(e,t){for(var r=this,i=t.iterator();i.hasNext();){var s=i.next();if(s.getShell()===null){var o=r.findEdgeRingContaining(s,e);if(o===null)throw new fi("unable to assign hole to a shell",s.getCoordinate(0));s.setShell(o)}}},er.prototype.buildMinimalEdgeRings=function(e,t,r){for(var i=this,s=new W,o=e.iterator();o.hasNext();){var a=o.next();if(a.getMaxNodeDegree()>2){a.linkDirectedEdgesForMinimalEdgeRings();var l=a.buildMinimalRings(),u=i.findShell(l);u!==null?(i.placePolygonHoles(u,l),t.add(u)):r.addAll(l)}else s.add(a)}return s},er.prototype.containsPoint=function(e){for(var t=this._shellList.iterator();t.hasNext();){var r=t.next();if(r.containsPoint(e))return!0}return!1},er.prototype.buildMaximalEdgeRings=function(e){for(var t=this,r=new W,i=e.iterator();i.hasNext();){var s=i.next();if(s.isInResult()&&s.getLabel().isArea()&&s.getEdgeRing()===null){var o=new jm(s,t._geometryFactory);r.add(o),o.setInResult()}}return r},er.prototype.placePolygonHoles=function(e,t){for(var r=t.iterator();r.hasNext();){var i=r.next();i.isHole()&&i.setShell(e)}},er.prototype.getPolygons=function(){var e=this.computePolygons(this._shellList);return e},er.prototype.findEdgeRingContaining=function(e,t){for(var r=e.getLinearRing(),i=r.getEnvelopeInternal(),s=r.getCoordinateN(0),o=null,a=null,l=t.iterator();l.hasNext();){var u=l.next(),h=u.getLinearRing(),f=h.getEnvelopeInternal();o!==null&&(a=o.getLinearRing().getEnvelopeInternal());var p=!1;f.contains(i)&&Y.isPointInRing(s,h.getCoordinates())&&(p=!0),p&&(o===null||a.contains(f))&&(o=u)}return o},er.prototype.findShell=function(e){for(var t=0,r=null,i=e.iterator();i.hasNext();){var s=i.next();s.isHole()||(r=s,t++)}return fe.isTrue(t<=1,"found two shells in MinimalEdgeRing list"),r},er.prototype.add=function(){if(arguments.length===1){var e=arguments[0];this.add(e.getEdgeEnds(),e.getNodes())}else if(arguments.length===2){var t=arguments[0],r=arguments[1];Ye.linkResultDirectedEdges(r);var i=this.buildMaximalEdgeRings(t),s=new W,o=this.buildMinimalEdgeRings(i,this._shellList,s);this.sortShellsAndHoles(o,this._shellList,s),this.placeFreeHoles(this._shellList,s)}},er.prototype.interfaces_=function(){return[]},er.prototype.getClass=function(){return er};var ml=function(){};ml.prototype.getBounds=function(){},ml.prototype.interfaces_=function(){return[]},ml.prototype.getClass=function(){return ml};var Kr=function(){this._bounds=null,this._item=null;var e=arguments[0],t=arguments[1];this._bounds=e,this._item=t};Kr.prototype.getItem=function(){return this._item},Kr.prototype.getBounds=function(){return this._bounds},Kr.prototype.interfaces_=function(){return[ml,Cr]},Kr.prototype.getClass=function(){return Kr};var di=function(){this._size=null,this._items=null,this._size=0,this._items=new W,this._items.add(null)};di.prototype.poll=function(){if(this.isEmpty())return null;var e=this._items.get(1);return this._items.set(1,this._items.get(this._size)),this._size-=1,this.reorder(1),e},di.prototype.size=function(){return this._size},di.prototype.reorder=function(e){for(var t=this,r=null,i=this._items.get(e);e*2<=this._size&&(r=e*2,r!==t._size&&t._items.get(r+1).compareTo(t._items.get(r))<0&&r++,t._items.get(r).compareTo(i)<0);e=r)t._items.set(e,t._items.get(r));this._items.set(e,i)},di.prototype.clear=function(){this._size=0,this._items.clear()},di.prototype.isEmpty=function(){return this._size===0},di.prototype.add=function(e){var t=this;this._items.add(null),this._size+=1;var r=this._size;for(this._items.set(0,e);e.compareTo(this._items.get(Math.trunc(r/2)))<0;r/=2)t._items.set(r,t._items.get(Math.trunc(r/2)));this._items.set(r,e)},di.prototype.interfaces_=function(){return[]},di.prototype.getClass=function(){return di};var Fi=function(){};Fi.prototype.visitItem=function(e){},Fi.prototype.interfaces_=function(){return[]},Fi.prototype.getClass=function(){return Fi};var js=function(){};js.prototype.insert=function(e,t){},js.prototype.remove=function(e,t){},js.prototype.query=function(){},js.prototype.interfaces_=function(){return[]},js.prototype.getClass=function(){return js};var st=function(){if(this._childBoundables=new W,this._bounds=null,this._level=null,arguments.length!==0){if(arguments.length===1){var e=arguments[0];this._level=e}}},Ff={serialVersionUID:{configurable:!0}};st.prototype.getLevel=function(){return this._level},st.prototype.size=function(){return this._childBoundables.size()},st.prototype.getChildBoundables=function(){return this._childBoundables},st.prototype.addChildBoundable=function(e){fe.isTrue(this._bounds===null),this._childBoundables.add(e)},st.prototype.isEmpty=function(){return this._childBoundables.isEmpty()},st.prototype.getBounds=function(){return this._bounds===null&&(this._bounds=this.computeBounds()),this._bounds},st.prototype.interfaces_=function(){return[ml,Cr]},st.prototype.getClass=function(){return st},Ff.serialVersionUID.get=function(){return 6493722185909574e3},Object.defineProperties(st,Ff);var Qr=function(){};Qr.reverseOrder=function(){return{compare:function(t,r){return r.compareTo(t)}}},Qr.min=function(e){return Qr.sort(e),e.get(0)},Qr.sort=function(e,t){var r=e.toArray();t?ds.sort(r,t):ds.sort(r);for(var i=e.iterator(),s=0,o=r.length;s<o;s++)i.next(),i.set(r[s])},Qr.singletonList=function(e){var t=new W;return t.add(e),t};var et=function(){this._boundable1=null,this._boundable2=null,this._distance=null,this._itemDistance=null;var e=arguments[0],t=arguments[1],r=arguments[2];this._boundable1=e,this._boundable2=t,this._itemDistance=r,this._distance=this.distance()};et.prototype.expandToQueue=function(e,t){var r=et.isComposite(this._boundable1),i=et.isComposite(this._boundable2);if(r&&i)return et.area(this._boundable1)>et.area(this._boundable2)?(this.expand(this._boundable1,this._boundable2,e,t),null):(this.expand(this._boundable2,this._boundable1,e,t),null);if(r)return this.expand(this._boundable1,this._boundable2,e,t),null;if(i)return this.expand(this._boundable2,this._boundable1,e,t),null;throw new Ue("neither boundable is composite")},et.prototype.isLeaves=function(){return!(et.isComposite(this._boundable1)||et.isComposite(this._boundable2))},et.prototype.compareTo=function(e){var t=e;return this._distance<t._distance?-1:this._distance>t._distance?1:0},et.prototype.expand=function(e,t,r,i){for(var s=this,o=e.getChildBoundables(),a=o.iterator();a.hasNext();){var l=a.next(),u=new et(l,t,s._itemDistance);u.getDistance()<i&&r.add(u)}},et.prototype.getBoundable=function(e){return e===0?this._boundable1:this._boundable2},et.prototype.getDistance=function(){return this._distance},et.prototype.distance=function(){return this.isLeaves()?this._itemDistance.distance(this._boundable1,this._boundable2):this._boundable1.getBounds().distance(this._boundable2.getBounds())},et.prototype.interfaces_=function(){return[Sr]},et.prototype.getClass=function(){return et},et.area=function(e){return e.getBounds().getArea()},et.isComposite=function(e){return e instanceof st};var ut=function n(){if(this._root=null,this._built=!1,this._itemBoundables=new W,this._nodeCapacity=null,arguments.length===0){var e=n.DEFAULT_NODE_CAPACITY;this._nodeCapacity=e}else if(arguments.length===1){var t=arguments[0];fe.isTrue(t>1,"Node capacity must be greater than 1"),this._nodeCapacity=t}},Xu={IntersectsOp:{configurable:!0},serialVersionUID:{configurable:!0},DEFAULT_NODE_CAPACITY:{configurable:!0}};ut.prototype.getNodeCapacity=function(){return this._nodeCapacity},ut.prototype.lastNode=function(e){return e.get(e.size()-1)},ut.prototype.size=function(){var e=this;if(arguments.length===0)return this.isEmpty()?0:(this.build(),this.size(this._root));if(arguments.length===1){for(var t=arguments[0],r=0,i=t.getChildBoundables().iterator();i.hasNext();){var s=i.next();s instanceof st?r+=e.size(s):s instanceof Kr&&(r+=1)}return r}},ut.prototype.removeItem=function(e,t){for(var r=null,i=e.getChildBoundables().iterator();i.hasNext();){var s=i.next();s instanceof Kr&&s.getItem()===t&&(r=s)}return r!==null?(e.getChildBoundables().remove(r),!0):!1},ut.prototype.itemsTree=function(){var e=this;if(arguments.length===0){this.build();var t=this.itemsTree(this._root);return t===null?new W:t}else if(arguments.length===1){for(var r=arguments[0],i=new W,s=r.getChildBoundables().iterator();s.hasNext();){var o=s.next();if(o instanceof st){var a=e.itemsTree(o);a!==null&&i.add(a)}else o instanceof Kr?i.add(o.getItem()):fe.shouldNeverReachHere()}return i.size()<=0?null:i}},ut.prototype.insert=function(e,t){fe.isTrue(!this._built,"Cannot insert items into an STR packed R-tree after it has been built."),this._itemBoundables.add(new Kr(e,t))},ut.prototype.boundablesAtLevel=function(){var e=this;if(arguments.length===1){var t=arguments[0],r=new W;return this.boundablesAtLevel(t,this._root,r),r}else if(arguments.length===3){var i=arguments[0],s=arguments[1],o=arguments[2];if(fe.isTrue(i>-2),s.getLevel()===i)return o.add(s),null;for(var a=s.getChildBoundables().iterator();a.hasNext();){var l=a.next();l instanceof st?e.boundablesAtLevel(i,l,o):(fe.isTrue(l instanceof Kr),i===-1&&o.add(l))}return null}},ut.prototype.query=function(){var e=this;if(arguments.length===1){var t=arguments[0];this.build();var r=new W;return this.isEmpty()||this.getIntersectsOp().intersects(this._root.getBounds(),t)&&this.query(t,this._root,r),r}else if(arguments.length===2){var i=arguments[0],s=arguments[1];if(this.build(),this.isEmpty())return null;this.getIntersectsOp().intersects(this._root.getBounds(),i)&&this.query(i,this._root,s)}else if(arguments.length===3){if(ae(arguments[2],Fi)&&arguments[0]instanceof Object&&arguments[1]instanceof st)for(var o=arguments[0],a=arguments[1],l=arguments[2],u=a.getChildBoundables(),h=0;h<u.size();h++){var f=u.get(h);e.getIntersectsOp().intersects(f.getBounds(),o)&&(f instanceof st?e.query(o,f,l):f instanceof Kr?l.visitItem(f.getItem()):fe.shouldNeverReachHere())}else if(ae(arguments[2],Yr)&&arguments[0]instanceof Object&&arguments[1]instanceof st)for(var p=arguments[0],v=arguments[1],w=arguments[2],I=v.getChildBoundables(),T=0;T<I.size();T++){var L=I.get(T);e.getIntersectsOp().intersects(L.getBounds(),p)&&(L instanceof st?e.query(p,L,w):L instanceof Kr?w.add(L.getItem()):fe.shouldNeverReachHere())}}},ut.prototype.build=function(){if(this._built)return null;this._root=this._itemBoundables.isEmpty()?this.createNode(0):this.createHigherLevels(this._itemBoundables,-1),this._itemBoundables=null,this._built=!0},ut.prototype.getRoot=function(){return this.build(),this._root},ut.prototype.remove=function(){var e=this;if(arguments.length===2){var t=arguments[0],r=arguments[1];return this.build(),this.getIntersectsOp().intersects(this._root.getBounds(),t)?this.remove(t,this._root,r):!1}else if(arguments.length===3){var i=arguments[0],s=arguments[1],o=arguments[2],a=this.removeItem(s,o);if(a)return!0;for(var l=null,u=s.getChildBoundables().iterator();u.hasNext();){var h=u.next();if(e.getIntersectsOp().intersects(h.getBounds(),i)&&h instanceof st&&(a=e.remove(i,h,o),a)){l=h;break}}return l!==null&&l.getChildBoundables().isEmpty()&&s.getChildBoundables().remove(l),a}},ut.prototype.createHigherLevels=function(e,t){fe.isTrue(!e.isEmpty());var r=this.createParentBoundables(e,t+1);return r.size()===1?r.get(0):this.createHigherLevels(r,t+1)},ut.prototype.depth=function(){var e=this;if(arguments.length===0)return this.isEmpty()?0:(this.build(),this.depth(this._root));if(arguments.length===1){for(var t=arguments[0],r=0,i=t.getChildBoundables().iterator();i.hasNext();){var s=i.next();if(s instanceof st){var o=e.depth(s);o>r&&(r=o)}}return r+1}},ut.prototype.createParentBoundables=function(e,t){var r=this;fe.isTrue(!e.isEmpty());var i=new W;i.add(this.createNode(t));var s=new W(e);Qr.sort(s,this.getComparator());for(var o=s.iterator();o.hasNext();){var a=o.next();r.lastNode(i).getChildBoundables().size()===r.getNodeCapacity()&&i.add(r.createNode(t)),r.lastNode(i).addChildBoundable(a)}return i},ut.prototype.isEmpty=function(){return this._built?this._root.isEmpty():this._itemBoundables.isEmpty()},ut.prototype.interfaces_=function(){return[Cr]},ut.prototype.getClass=function(){return ut},ut.compareDoubles=function(e,t){return e>t?1:e<t?-1:0},Xu.IntersectsOp.get=function(){return ev},Xu.serialVersionUID.get=function(){return-3886435814360241e3},Xu.DEFAULT_NODE_CAPACITY.get=function(){return 10},Object.defineProperties(ut,Xu);var ev=function(){},vl=function(){};vl.prototype.distance=function(e,t){},vl.prototype.interfaces_=function(){return[]},vl.prototype.getClass=function(){return vl};var kf=function(n){function e(r){r=r||e.DEFAULT_NODE_CAPACITY,n.call(this,r)}n&&(e.__proto__=n),e.prototype=Object.create(n&&n.prototype),e.prototype.constructor=e;var t={STRtreeNode:{configurable:!0},serialVersionUID:{configurable:!0},xComparator:{configurable:!0},yComparator:{configurable:!0},intersectsOp:{configurable:!0},DEFAULT_NODE_CAPACITY:{configurable:!0}};return e.prototype.createParentBoundablesFromVerticalSlices=function(i,s){var o=this;fe.isTrue(i.length>0);for(var a=new W,l=0;l<i.length;l++)a.addAll(o.createParentBoundablesFromVerticalSlice(i[l],s));return a},e.prototype.createNode=function(i){return new Vf(i)},e.prototype.size=function(){return arguments.length===0?n.prototype.size.call(this):n.prototype.size.apply(this,arguments)},e.prototype.insert=function(){if(arguments.length===2){var i=arguments[0],s=arguments[1];if(i.isNull())return null;n.prototype.insert.call(this,i,s)}else return n.prototype.insert.apply(this,arguments)},e.prototype.getIntersectsOp=function(){return e.intersectsOp},e.prototype.verticalSlices=function(i,s){for(var o=Math.trunc(Math.ceil(i.size()/s)),a=new Array(s).fill(null),l=i.iterator(),u=0;u<s;u++){a[u]=new W;for(var h=0;l.hasNext()&&h<o;){var f=l.next();a[u].add(f),h++}}return a},e.prototype.query=function(){if(arguments.length===1){var i=arguments[0];return n.prototype.query.call(this,i)}else if(arguments.length===2){var s=arguments[0],o=arguments[1];n.prototype.query.call(this,s,o)}else if(arguments.length===3){if(ae(arguments[2],Fi)&&arguments[0]instanceof Object&&arguments[1]instanceof st){var a=arguments[0],l=arguments[1],u=arguments[2];n.prototype.query.call(this,a,l,u)}else if(ae(arguments[2],Yr)&&arguments[0]instanceof Object&&arguments[1]instanceof st){var h=arguments[0],f=arguments[1],p=arguments[2];n.prototype.query.call(this,h,f,p)}}},e.prototype.getComparator=function(){return e.yComparator},e.prototype.createParentBoundablesFromVerticalSlice=function(i,s){return n.prototype.createParentBoundables.call(this,i,s)},e.prototype.remove=function(){if(arguments.length===2){var i=arguments[0],s=arguments[1];return n.prototype.remove.call(this,i,s)}else return n.prototype.remove.apply(this,arguments)},e.prototype.depth=function(){return arguments.length===0?n.prototype.depth.call(this):n.prototype.depth.apply(this,arguments)},e.prototype.createParentBoundables=function(i,s){fe.isTrue(!i.isEmpty());var o=Math.trunc(Math.ceil(i.size()/this.getNodeCapacity())),a=new W(i);Qr.sort(a,e.xComparator);var l=this.verticalSlices(a,Math.trunc(Math.ceil(Math.sqrt(o))));return this.createParentBoundablesFromVerticalSlices(l,s)},e.prototype.nearestNeighbour=function(){if(arguments.length===1){if(ae(arguments[0],vl)){var i=arguments[0],s=new et(this.getRoot(),this.getRoot(),i);return this.nearestNeighbour(s)}else if(arguments[0]instanceof et){var o=arguments[0];return this.nearestNeighbour(o,ue.POSITIVE_INFINITY)}}else if(arguments.length===2){if(arguments[0]instanceof e&&ae(arguments[1],vl)){var a=arguments[0],l=arguments[1],u=new et(this.getRoot(),a.getRoot(),l);return this.nearestNeighbour(u)}else if(arguments[0]instanceof et&&typeof arguments[1]=="number"){var h=arguments[0],f=arguments[1],p=f,v=null,w=new di;for(w.add(h);!w.isEmpty()&&p>0;){var I=w.poll(),T=I.getDistance();if(T>=p)break;I.isLeaves()?(p=T,v=I):I.expandToQueue(w,p)}return[v.getBoundable(0).getItem(),v.getBoundable(1).getItem()]}}else if(arguments.length===3){var L=arguments[0],m=arguments[1],_=arguments[2],g=new Kr(L,m),y=new et(this.getRoot(),g,_);return this.nearestNeighbour(y)[0]}},e.prototype.interfaces_=function(){return[js,Cr]},e.prototype.getClass=function(){return e},e.centreX=function(i){return e.avg(i.getMinX(),i.getMaxX())},e.avg=function(i,s){return(i+s)/2},e.centreY=function(i){return e.avg(i.getMinY(),i.getMaxY())},t.STRtreeNode.get=function(){return Vf},t.serialVersionUID.get=function(){return 0x39920f7d5f261e0},t.xComparator.get=function(){return{interfaces_:function(){return[nl]},compare:function(r,i){return n.compareDoubles(e.centreX(r.getBounds()),e.centreX(i.getBounds()))}}},t.yComparator.get=function(){return{interfaces_:function(){return[nl]},compare:function(r,i){return n.compareDoubles(e.centreY(r.getBounds()),e.centreY(i.getBounds()))}}},t.intersectsOp.get=function(){return{interfaces_:function(){return[n.IntersectsOp]},intersects:function(r,i){return r.intersects(i)}}},t.DEFAULT_NODE_CAPACITY.get=function(){return 10},Object.defineProperties(e,t),e}(ut),Vf=function(n){function e(){var t=arguments[0];n.call(this,t)}return n&&(e.__proto__=n),e.prototype=Object.create(n&&n.prototype),e.prototype.constructor=e,e.prototype.computeBounds=function(){for(var r=null,i=this.getChildBoundables().iterator();i.hasNext();){var s=i.next();r===null?r=new te(s.getBounds()):r.expandToInclude(s.getBounds())}return r},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e}(st),Wt=function(){};Wt.prototype.interfaces_=function(){return[]},Wt.prototype.getClass=function(){return Wt},Wt.relativeSign=function(e,t){return e<t?-1:e>t?1:0},Wt.compare=function(e,t,r){if(t.equals2D(r))return 0;var i=Wt.relativeSign(t.x,r.x),s=Wt.relativeSign(t.y,r.y);switch(e){case 0:return Wt.compareValue(i,s);case 1:return Wt.compareValue(s,i);case 2:return Wt.compareValue(s,-i);case 3:return Wt.compareValue(-i,s);case 4:return Wt.compareValue(-i,-s);case 5:return Wt.compareValue(-s,-i);case 6:return Wt.compareValue(-s,i);case 7:return Wt.compareValue(i,-s)}return fe.shouldNeverReachHere("invalid octant value"),0},Wt.compareValue=function(e,t){return e<0?-1:e>0?1:t<0?-1:t>0?1:0};var ki=function(){this._segString=null,this.coord=null,this.segmentIndex=null,this._segmentOctant=null,this._isInterior=null;var e=arguments[0],t=arguments[1],r=arguments[2],i=arguments[3];this._segString=e,this.coord=new M(t),this.segmentIndex=r,this._segmentOctant=i,this._isInterior=!t.equals2D(e.getCoordinate(r))};ki.prototype.getCoordinate=function(){return this.coord},ki.prototype.print=function(e){e.print(this.coord),e.print(" seg # = "+this.segmentIndex)},ki.prototype.compareTo=function(e){var t=e;return this.segmentIndex<t.segmentIndex?-1:this.segmentIndex>t.segmentIndex?1:this.coord.equals2D(t.coord)?0:Wt.compare(this._segmentOctant,this.coord,t.coord)},ki.prototype.isEndPoint=function(e){return this.segmentIndex===0&&!this._isInterior||this.segmentIndex===e},ki.prototype.isInterior=function(){return this._isInterior},ki.prototype.interfaces_=function(){return[Sr]},ki.prototype.getClass=function(){return ki};var Lt=function(){this._nodeMap=new Tt,this._edge=null;var e=arguments[0];this._edge=e};Lt.prototype.getSplitCoordinates=function(){var e=this,t=new Hl;this.addEndpoints();for(var r=this.iterator(),i=r.next();r.hasNext();){var s=r.next();e.addEdgeCoordinates(i,s,t),i=s}return t.toCoordinateArray()},Lt.prototype.addCollapsedNodes=function(){var e=this,t=new W;this.findCollapsesFromInsertedNodes(t),this.findCollapsesFromExistingVertices(t);for(var r=t.iterator();r.hasNext();){var i=r.next().intValue();e.add(e._edge.getCoordinate(i),i)}},Lt.prototype.print=function(e){e.println("Intersections:");for(var t=this.iterator();t.hasNext();){var r=t.next();r.print(e)}},Lt.prototype.findCollapsesFromExistingVertices=function(e){for(var t=this,r=0;r<this._edge.size()-2;r++){var i=t._edge.getCoordinate(r),s=t._edge.getCoordinate(r+2);i.equals2D(s)&&e.add(new an(r+1))}},Lt.prototype.addEdgeCoordinates=function(e,t,r){var i=this,s=this._edge.getCoordinate(t.segmentIndex),o=t.isInterior()||!t.coord.equals2D(s);r.add(new M(e.coord),!1);for(var a=e.segmentIndex+1;a<=t.segmentIndex;a++)r.add(i._edge.getCoordinate(a));o&&r.add(new M(t.coord))},Lt.prototype.iterator=function(){return this._nodeMap.values().iterator()},Lt.prototype.addSplitEdges=function(e){var t=this;this.addEndpoints(),this.addCollapsedNodes();for(var r=this.iterator(),i=r.next();r.hasNext();){var s=r.next(),o=t.createSplitEdge(i,s);e.add(o),i=s}},Lt.prototype.findCollapseIndex=function(e,t,r){if(!e.coord.equals2D(t.coord))return!1;var i=t.segmentIndex-e.segmentIndex;return t.isInterior()||i--,i===1?(r[0]=e.segmentIndex+1,!0):!1},Lt.prototype.findCollapsesFromInsertedNodes=function(e){for(var t=this,r=new Array(1).fill(null),i=this.iterator(),s=i.next();i.hasNext();){var o=i.next(),a=t.findCollapseIndex(s,o,r);a&&e.add(new an(r[0])),s=o}},Lt.prototype.getEdge=function(){return this._edge},Lt.prototype.addEndpoints=function(){var e=this._edge.size()-1;this.add(this._edge.getCoordinate(0),0),this.add(this._edge.getCoordinate(e),e)},Lt.prototype.createSplitEdge=function(e,t){var r=this,i=t.segmentIndex-e.segmentIndex+2,s=this._edge.getCoordinate(t.segmentIndex),o=t.isInterior()||!t.coord.equals2D(s);o||i--;var a=new Array(i).fill(null),l=0;a[l++]=new M(e.coord);for(var u=e.segmentIndex+1;u<=t.segmentIndex;u++)a[l++]=r._edge.getCoordinate(u);return o&&(a[l]=new M(t.coord)),new Be(a,this._edge.getData())},Lt.prototype.add=function(e,t){var r=new ki(this._edge,e,t,this._edge.getSegmentOctant(t)),i=this._nodeMap.get(r);return i!==null?(fe.isTrue(i.coord.equals2D(e),"Found equal nodes with different coordinates"),i):(this._nodeMap.put(r,r),r)},Lt.prototype.checkSplitEdgesCorrectness=function(e){var t=this._edge.getCoordinates(),r=e.get(0),i=r.getCoordinate(0);if(!i.equals2D(t[0]))throw new oi("bad split edge start point at "+i);var s=e.get(e.size()-1),o=s.getCoordinates(),a=o[o.length-1];if(!a.equals2D(t[t.length-1]))throw new oi("bad split edge end point at "+a)},Lt.prototype.interfaces_=function(){return[]},Lt.prototype.getClass=function(){return Lt};var eo=function(){};eo.prototype.interfaces_=function(){return[]},eo.prototype.getClass=function(){return eo},eo.octant=function(){if(typeof arguments[0]=="number"&&typeof arguments[1]=="number"){var e=arguments[0],t=arguments[1];if(e===0&&t===0)throw new Ue("Cannot compute the octant for point ( "+e+", "+t+" )");var r=Math.abs(e),i=Math.abs(t);return e>=0?t>=0?r>=i?0:1:r>=i?7:6:t>=0?r>=i?3:2:r>=i?4:5}else if(arguments[0]instanceof M&&arguments[1]instanceof M){var s=arguments[0],o=arguments[1],a=o.x-s.x,l=o.y-s.y;if(a===0&&l===0)throw new Ue("Cannot compute the octant for two identical points "+s);return eo.octant(a,l)}};var Vn=function(){};Vn.prototype.getCoordinates=function(){},Vn.prototype.size=function(){},Vn.prototype.getCoordinate=function(e){},Vn.prototype.isClosed=function(){},Vn.prototype.setData=function(e){},Vn.prototype.getData=function(){},Vn.prototype.interfaces_=function(){return[]},Vn.prototype.getClass=function(){return Vn};var eu=function(){};eu.prototype.addIntersection=function(e,t){},eu.prototype.interfaces_=function(){return[Vn]},eu.prototype.getClass=function(){return eu};var Be=function(){this._nodeList=new Lt(this),this._pts=null,this._data=null;var e=arguments[0],t=arguments[1];this._pts=e,this._data=t};Be.prototype.getCoordinates=function(){return this._pts},Be.prototype.size=function(){return this._pts.length},Be.prototype.getCoordinate=function(e){return this._pts[e]},Be.prototype.isClosed=function(){return this._pts[0].equals(this._pts[this._pts.length-1])},Be.prototype.getSegmentOctant=function(e){return e===this._pts.length-1?-1:this.safeOctant(this.getCoordinate(e),this.getCoordinate(e+1))},Be.prototype.setData=function(e){this._data=e},Be.prototype.safeOctant=function(e,t){return e.equals2D(t)?0:eo.octant(e,t)},Be.prototype.getData=function(){return this._data},Be.prototype.addIntersection=function(){if(arguments.length===2){var e=arguments[0],t=arguments[1];this.addIntersectionNode(e,t)}else if(arguments.length===4){var r=arguments[0],i=arguments[1],s=arguments[3],o=new M(r.getIntersection(s));this.addIntersection(o,i)}},Be.prototype.toString=function(){return Hr.toLineString(new Qe(this._pts))},Be.prototype.getNodeList=function(){return this._nodeList},Be.prototype.addIntersectionNode=function(e,t){var r=t,i=r+1;if(i<this._pts.length){var s=this._pts[i];e.equals2D(s)&&(r=i)}var o=this._nodeList.add(e,r);return o},Be.prototype.addIntersections=function(e,t,r){for(var i=this,s=0;s<e.getIntersectionNum();s++)i.addIntersection(e,t,r,s)},Be.prototype.interfaces_=function(){return[eu]},Be.prototype.getClass=function(){return Be},Be.getNodedSubstrings=function(){if(arguments.length===1){var e=arguments[0],t=new W;return Be.getNodedSubstrings(e,t),t}else if(arguments.length===2)for(var r=arguments[0],i=arguments[1],s=r.iterator();s.hasNext();){var o=s.next();o.getNodeList().addSplitEdges(i)}};var re=function(){if(this.p0=null,this.p1=null,arguments.length===0)this.p0=new M,this.p1=new M;else if(arguments.length===1){var e=arguments[0];this.p0=new M(e.p0),this.p1=new M(e.p1)}else if(arguments.length===2)this.p0=arguments[0],this.p1=arguments[1];else if(arguments.length===4){var t=arguments[0],r=arguments[1],i=arguments[2],s=arguments[3];this.p0=new M(t,r),this.p1=new M(i,s)}},zf={serialVersionUID:{configurable:!0}};re.prototype.minX=function(){return Math.min(this.p0.x,this.p1.x)},re.prototype.orientationIndex=function(){if(arguments[0]instanceof re){var e=arguments[0],t=Y.orientationIndex(this.p0,this.p1,e.p0),r=Y.orientationIndex(this.p0,this.p1,e.p1);return t>=0&&r>=0||t<=0&&r<=0?Math.max(t,r):0}else if(arguments[0]instanceof M){var i=arguments[0];return Y.orientationIndex(this.p0,this.p1,i)}},re.prototype.toGeometry=function(e){return e.createLineString([this.p0,this.p1])},re.prototype.isVertical=function(){return this.p0.x===this.p1.x},re.prototype.equals=function(e){if(!(e instanceof re))return!1;var t=e;return this.p0.equals(t.p0)&&this.p1.equals(t.p1)},re.prototype.intersection=function(e){var t=new hs;return t.computeIntersection(this.p0,this.p1,e.p0,e.p1),t.hasIntersection()?t.getIntersection(0):null},re.prototype.project=function(){if(arguments[0]instanceof M){var e=arguments[0];if(e.equals(this.p0)||e.equals(this.p1))return new M(e);var t=this.projectionFactor(e),r=new M;return r.x=this.p0.x+t*(this.p1.x-this.p0.x),r.y=this.p0.y+t*(this.p1.y-this.p0.y),r}else if(arguments[0]instanceof re){var i=arguments[0],s=this.projectionFactor(i.p0),o=this.projectionFactor(i.p1);if(s>=1&&o>=1||s<=0&&o<=0)return null;var a=this.project(i.p0);s<0&&(a=this.p0),s>1&&(a=this.p1);var l=this.project(i.p1);return o<0&&(l=this.p0),o>1&&(l=this.p1),new re(a,l)}},re.prototype.normalize=function(){this.p1.compareTo(this.p0)<0&&this.reverse()},re.prototype.angle=function(){return Math.atan2(this.p1.y-this.p0.y,this.p1.x-this.p0.x)},re.prototype.getCoordinate=function(e){return e===0?this.p0:this.p1},re.prototype.distancePerpendicular=function(e){return Y.distancePointLinePerpendicular(e,this.p0,this.p1)},re.prototype.minY=function(){return Math.min(this.p0.y,this.p1.y)},re.prototype.midPoint=function(){return re.midPoint(this.p0,this.p1)},re.prototype.projectionFactor=function(e){if(e.equals(this.p0))return 0;if(e.equals(this.p1))return 1;var t=this.p1.x-this.p0.x,r=this.p1.y-this.p0.y,i=t*t+r*r;if(i<=0)return ue.NaN;var s=((e.x-this.p0.x)*t+(e.y-this.p0.y)*r)/i;return s},re.prototype.closestPoints=function(e){var t=this.intersection(e);if(t!==null)return[t,t];var r=new Array(2).fill(null),i=ue.MAX_VALUE,s=null,o=this.closestPoint(e.p0);i=o.distance(e.p0),r[0]=o,r[1]=e.p0;var a=this.closestPoint(e.p1);s=a.distance(e.p1),s<i&&(i=s,r[0]=a,r[1]=e.p1);var l=e.closestPoint(this.p0);s=l.distance(this.p0),s<i&&(i=s,r[0]=this.p0,r[1]=l);var u=e.closestPoint(this.p1);return s=u.distance(this.p1),s<i&&(i=s,r[0]=this.p1,r[1]=u),r},re.prototype.closestPoint=function(e){var t=this.projectionFactor(e);if(t>0&&t<1)return this.project(e);var r=this.p0.distance(e),i=this.p1.distance(e);return r<i?this.p0:this.p1},re.prototype.maxX=function(){return Math.max(this.p0.x,this.p1.x)},re.prototype.getLength=function(){return this.p0.distance(this.p1)},re.prototype.compareTo=function(e){var t=e,r=this.p0.compareTo(t.p0);return r!==0?r:this.p1.compareTo(t.p1)},re.prototype.reverse=function(){var e=this.p0;this.p0=this.p1,this.p1=e},re.prototype.equalsTopo=function(e){return this.p0.equals(e.p0)&&(this.p1.equals(e.p1)||this.p0.equals(e.p1))&&this.p1.equals(e.p0)},re.prototype.lineIntersection=function(e){try{var t=Xr.intersection(this.p0,this.p1,e.p0,e.p1);return t}catch(r){if(!(r instanceof sl))throw r}finally{}return null},re.prototype.maxY=function(){return Math.max(this.p0.y,this.p1.y)},re.prototype.pointAlongOffset=function(e,t){var r=this.p0.x+e*(this.p1.x-this.p0.x),i=this.p0.y+e*(this.p1.y-this.p0.y),s=this.p1.x-this.p0.x,o=this.p1.y-this.p0.y,a=Math.sqrt(s*s+o*o),l=0,u=0;if(t!==0){if(a<=0)throw new Error("Cannot compute offset from zero-length line segment");l=t*s/a,u=t*o/a}var h=r-u,f=i+l,p=new M(h,f);return p},re.prototype.setCoordinates=function(){if(arguments.length===1){var e=arguments[0];this.setCoordinates(e.p0,e.p1)}else if(arguments.length===2){var t=arguments[0],r=arguments[1];this.p0.x=t.x,this.p0.y=t.y,this.p1.x=r.x,this.p1.y=r.y}},re.prototype.segmentFraction=function(e){var t=this.projectionFactor(e);return t<0?t=0:(t>1||ue.isNaN(t))&&(t=1),t},re.prototype.toString=function(){return"LINESTRING( "+this.p0.x+" "+this.p0.y+", "+this.p1.x+" "+this.p1.y+")"},re.prototype.isHorizontal=function(){return this.p0.y===this.p1.y},re.prototype.distance=function(){if(arguments[0]instanceof re){var e=arguments[0];return Y.distanceLineLine(this.p0,this.p1,e.p0,e.p1)}else if(arguments[0]instanceof M){var t=arguments[0];return Y.distancePointLine(t,this.p0,this.p1)}},re.prototype.pointAlong=function(e){var t=new M;return t.x=this.p0.x+e*(this.p1.x-this.p0.x),t.y=this.p0.y+e*(this.p1.y-this.p0.y),t},re.prototype.hashCode=function(){var e=ue.doubleToLongBits(this.p0.x);e^=ue.doubleToLongBits(this.p0.y)*31;var t=Math.trunc(e)^Math.trunc(e>>32),r=ue.doubleToLongBits(this.p1.x);r^=ue.doubleToLongBits(this.p1.y)*31;var i=Math.trunc(r)^Math.trunc(r>>32);return t^i},re.prototype.interfaces_=function(){return[Sr,Cr]},re.prototype.getClass=function(){return re},re.midPoint=function(e,t){return new M((e.x+t.x)/2,(e.y+t.y)/2)},zf.serialVersionUID.get=function(){return 0x2d2172135f411c00},Object.defineProperties(re,zf);var tu=function(){this.tempEnv1=new te,this.tempEnv2=new te,this._overlapSeg1=new re,this._overlapSeg2=new re};tu.prototype.overlap=function(){if(arguments.length!==2){if(arguments.length===4){var e=arguments[0],t=arguments[1],r=arguments[2],i=arguments[3];e.getLineSegment(t,this._overlapSeg1),r.getLineSegment(i,this._overlapSeg2),this.overlap(this._overlapSeg1,this._overlapSeg2)}}},tu.prototype.interfaces_=function(){return[]},tu.prototype.getClass=function(){return tu};var tr=function(){this._pts=null,this._start=null,this._end=null,this._env=null,this._context=null,this._id=null;var e=arguments[0],t=arguments[1],r=arguments[2],i=arguments[3];this._pts=e,this._start=t,this._end=r,this._context=i};tr.prototype.getLineSegment=function(e,t){t.p0=this._pts[e],t.p1=this._pts[e+1]},tr.prototype.computeSelect=function(e,t,r,i){var s=this._pts[t],o=this._pts[r];if(i.tempEnv1.init(s,o),r-t===1)return i.select(this,t),null;if(!e.intersects(i.tempEnv1))return null;var a=Math.trunc((t+r)/2);t<a&&this.computeSelect(e,t,a,i),a<r&&this.computeSelect(e,a,r,i)},tr.prototype.getCoordinates=function(){for(var e=this,t=new Array(this._end-this._start+1).fill(null),r=0,i=this._start;i<=this._end;i++)t[r++]=e._pts[i];return t},tr.prototype.computeOverlaps=function(e,t){this.computeOverlapsInternal(this._start,this._end,e,e._start,e._end,t)},tr.prototype.setId=function(e){this._id=e},tr.prototype.select=function(e,t){this.computeSelect(e,this._start,this._end,t)},tr.prototype.getEnvelope=function(){if(this._env===null){var e=this._pts[this._start],t=this._pts[this._end];this._env=new te(e,t)}return this._env},tr.prototype.getEndIndex=function(){return this._end},tr.prototype.getStartIndex=function(){return this._start},tr.prototype.getContext=function(){return this._context},tr.prototype.getId=function(){return this._id},tr.prototype.computeOverlapsInternal=function(e,t,r,i,s,o){var a=this._pts[e],l=this._pts[t],u=r._pts[i],h=r._pts[s];if(t-e===1&&s-i===1)return o.overlap(this,e,r,i),null;if(o.tempEnv1.init(a,l),o.tempEnv2.init(u,h),!o.tempEnv1.intersects(o.tempEnv2))return null;var f=Math.trunc((e+t)/2),p=Math.trunc((i+s)/2);e<f&&(i<p&&this.computeOverlapsInternal(e,f,r,i,p,o),p<s&&this.computeOverlapsInternal(e,f,r,p,s,o)),f<t&&(i<p&&this.computeOverlapsInternal(f,t,r,i,p,o),p<s&&this.computeOverlapsInternal(f,t,r,p,s,o))},tr.prototype.interfaces_=function(){return[]},tr.prototype.getClass=function(){return tr};var vn=function(){};vn.prototype.interfaces_=function(){return[]},vn.prototype.getClass=function(){return vn},vn.getChainStartIndices=function(e){var t=0,r=new W;r.add(new an(t));do{var i=vn.findChainEnd(e,t);r.add(new an(i)),t=i}while(t<e.length-1);var s=vn.toIntArray(r);return s},vn.findChainEnd=function(e,t){for(var r=t;r<e.length-1&&e[r].equals2D(e[r+1]);)r++;if(r>=e.length-1)return e.length-1;for(var i=xe.quadrant(e[r],e[r+1]),s=t+1;s<e.length;){if(!e[s-1].equals2D(e[s])){var o=xe.quadrant(e[s-1],e[s]);if(o!==i)break}s++}return s-1},vn.getChains=function(){if(arguments.length===1){var e=arguments[0];return vn.getChains(e,null)}else if(arguments.length===2){for(var t=arguments[0],r=arguments[1],i=new W,s=vn.getChainStartIndices(t),o=0;o<s.length-1;o++){var a=new tr(t,s[o],s[o+1],r);i.add(a)}return i}},vn.toIntArray=function(e){for(var t=new Array(e.size()).fill(null),r=0;r<t.length;r++)t[r]=e.get(r).intValue();return t};var gs=function(){};gs.prototype.computeNodes=function(e){},gs.prototype.getNodedSubstrings=function(){},gs.prototype.interfaces_=function(){return[]},gs.prototype.getClass=function(){return gs};var ru=function(){if(this._segInt=null,arguments.length!==0){if(arguments.length===1){var e=arguments[0];this.setSegmentIntersector(e)}}};ru.prototype.setSegmentIntersector=function(e){this._segInt=e},ru.prototype.interfaces_=function(){return[gs]},ru.prototype.getClass=function(){return ru};var Jc=function(n){function e(r){r?n.call(this,r):n.call(this),this._monoChains=new W,this._index=new kf,this._idCounter=0,this._nodedSegStrings=null,this._nOverlaps=0}n&&(e.__proto__=n),e.prototype=Object.create(n&&n.prototype),e.prototype.constructor=e;var t={SegmentOverlapAction:{configurable:!0}};return e.prototype.getMonotoneChains=function(){return this._monoChains},e.prototype.getNodedSubstrings=function(){return Be.getNodedSubstrings(this._nodedSegStrings)},e.prototype.getIndex=function(){return this._index},e.prototype.add=function(i){for(var s=this,o=vn.getChains(i.getCoordinates(),i),a=o.iterator();a.hasNext();){var l=a.next();l.setId(s._idCounter++),s._index.insert(l.getEnvelope(),l),s._monoChains.add(l)}},e.prototype.computeNodes=function(i){var s=this;this._nodedSegStrings=i;for(var o=i.iterator();o.hasNext();)s.add(o.next());this.intersectChains()},e.prototype.intersectChains=function(){for(var i=this,s=new Uf(this._segInt),o=this._monoChains.iterator();o.hasNext();)for(var a=o.next(),l=i._index.query(a.getEnvelope()),u=l.iterator();u.hasNext();){var h=u.next();if(h.getId()>a.getId()&&(a.computeOverlaps(h,s),i._nOverlaps++),i._segInt.isDone())return null}},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},t.SegmentOverlapAction.get=function(){return Uf},Object.defineProperties(e,t),e}(ru),Uf=function(n){function e(){n.call(this),this._si=null;var t=arguments[0];this._si=t}return n&&(e.__proto__=n),e.prototype=Object.create(n&&n.prototype),e.prototype.constructor=e,e.prototype.overlap=function(){if(arguments.length===4){var r=arguments[0],i=arguments[1],s=arguments[2],o=arguments[3],a=r.getContext(),l=s.getContext();this._si.processIntersections(a,i,l,o)}else return n.prototype.overlap.apply(this,arguments)},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e}(tu),De=function n(){if(this._quadrantSegments=n.DEFAULT_QUADRANT_SEGMENTS,this._endCapStyle=n.CAP_ROUND,this._joinStyle=n.JOIN_ROUND,this._mitreLimit=n.DEFAULT_MITRE_LIMIT,this._isSingleSided=!1,this._simplifyFactor=n.DEFAULT_SIMPLIFY_FACTOR,arguments.length!==0){if(arguments.length===1){var e=arguments[0];this.setQuadrantSegments(e)}else if(arguments.length===2){var t=arguments[0],r=arguments[1];this.setQuadrantSegments(t),this.setEndCapStyle(r)}else if(arguments.length===4){var i=arguments[0],s=arguments[1],o=arguments[2],a=arguments[3];this.setQuadrantSegments(i),this.setEndCapStyle(s),this.setJoinStyle(o),this.setMitreLimit(a)}}},pi={CAP_ROUND:{configurable:!0},CAP_FLAT:{configurable:!0},CAP_SQUARE:{configurable:!0},JOIN_ROUND:{configurable:!0},JOIN_MITRE:{configurable:!0},JOIN_BEVEL:{configurable:!0},DEFAULT_QUADRANT_SEGMENTS:{configurable:!0},DEFAULT_MITRE_LIMIT:{configurable:!0},DEFAULT_SIMPLIFY_FACTOR:{configurable:!0}};De.prototype.getEndCapStyle=function(){return this._endCapStyle},De.prototype.isSingleSided=function(){return this._isSingleSided},De.prototype.setQuadrantSegments=function(e){this._quadrantSegments=e,this._quadrantSegments===0&&(this._joinStyle=De.JOIN_BEVEL),this._quadrantSegments<0&&(this._joinStyle=De.JOIN_MITRE,this._mitreLimit=Math.abs(this._quadrantSegments)),e<=0&&(this._quadrantSegments=1),this._joinStyle!==De.JOIN_ROUND&&(this._quadrantSegments=De.DEFAULT_QUADRANT_SEGMENTS)},De.prototype.getJoinStyle=function(){return this._joinStyle},De.prototype.setJoinStyle=function(e){this._joinStyle=e},De.prototype.setSimplifyFactor=function(e){this._simplifyFactor=e<0?0:e},De.prototype.getSimplifyFactor=function(){return this._simplifyFactor},De.prototype.getQuadrantSegments=function(){return this._quadrantSegments},De.prototype.setEndCapStyle=function(e){this._endCapStyle=e},De.prototype.getMitreLimit=function(){return this._mitreLimit},De.prototype.setMitreLimit=function(e){this._mitreLimit=e},De.prototype.setSingleSided=function(e){this._isSingleSided=e},De.prototype.interfaces_=function(){return[]},De.prototype.getClass=function(){return De},De.bufferDistanceError=function(e){var t=Math.PI/2/e;return 1-Math.cos(t/2)},pi.CAP_ROUND.get=function(){return 1},pi.CAP_FLAT.get=function(){return 2},pi.CAP_SQUARE.get=function(){return 3},pi.JOIN_ROUND.get=function(){return 1},pi.JOIN_MITRE.get=function(){return 2},pi.JOIN_BEVEL.get=function(){return 3},pi.DEFAULT_QUADRANT_SEGMENTS.get=function(){return 8},pi.DEFAULT_MITRE_LIMIT.get=function(){return 5},pi.DEFAULT_SIMPLIFY_FACTOR.get=function(){return .01},Object.defineProperties(De,pi);var Ze=function(e){this._distanceTol=null,this._isDeleted=null,this._angleOrientation=Y.COUNTERCLOCKWISE,this._inputLine=e||null},nu={INIT:{configurable:!0},DELETE:{configurable:!0},KEEP:{configurable:!0},NUM_PTS_TO_CHECK:{configurable:!0}};Ze.prototype.isDeletable=function(e,t,r,i){var s=this._inputLine[e],o=this._inputLine[t],a=this._inputLine[r];return!this.isConcave(s,o,a)||!this.isShallow(s,o,a,i)?!1:this.isShallowSampled(s,o,e,r,i)},Ze.prototype.deleteShallowConcavities=function(){for(var e=this,t=1,r=this.findNextNonDeletedIndex(t),i=this.findNextNonDeletedIndex(r),s=!1;i<this._inputLine.length;){var o=!1;e.isDeletable(t,r,i,e._distanceTol)&&(e._isDeleted[r]=Ze.DELETE,o=!0,s=!0),o?t=i:t=r,r=e.findNextNonDeletedIndex(t),i=e.findNextNonDeletedIndex(r)}return s},Ze.prototype.isShallowConcavity=function(e,t,r,i){var s=Y.computeOrientation(e,t,r),o=s===this._angleOrientation;if(!o)return!1;var a=Y.distancePointLine(t,e,r);return a<i},Ze.prototype.isShallowSampled=function(e,t,r,i,s){var o=this,a=Math.trunc((i-r)/Ze.NUM_PTS_TO_CHECK);a<=0&&(a=1);for(var l=r;l<i;l+=a)if(!o.isShallow(e,t,o._inputLine[l],s))return!1;return!0},Ze.prototype.isConcave=function(e,t,r){var i=Y.computeOrientation(e,t,r),s=i===this._angleOrientation;return s},Ze.prototype.simplify=function(e){var t=this;this._distanceTol=Math.abs(e),e<0&&(this._angleOrientation=Y.CLOCKWISE),this._isDeleted=new Array(this._inputLine.length).fill(null);var r=!1;do r=t.deleteShallowConcavities();while(r);return this.collapseLine()},Ze.prototype.findNextNonDeletedIndex=function(e){for(var t=e+1;t<this._inputLine.length&&this._isDeleted[t]===Ze.DELETE;)t++;return t},Ze.prototype.isShallow=function(e,t,r,i){var s=Y.distancePointLine(t,e,r);return s<i},Ze.prototype.collapseLine=function(){for(var e=this,t=new Hl,r=0;r<this._inputLine.length;r++)e._isDeleted[r]!==Ze.DELETE&&t.add(e._inputLine[r]);return t.toCoordinateArray()},Ze.prototype.interfaces_=function(){return[]},Ze.prototype.getClass=function(){return Ze},Ze.simplify=function(e,t){var r=new Ze(e);return r.simplify(t)},nu.INIT.get=function(){return 0},nu.DELETE.get=function(){return 1},nu.KEEP.get=function(){return 1},nu.NUM_PTS_TO_CHECK.get=function(){return 10},Object.defineProperties(Ze,nu);var hr=function(){this._ptList=null,this._precisionModel=null,this._minimimVertexDistance=0,this._ptList=new W},Gf={COORDINATE_ARRAY_TYPE:{configurable:!0}};hr.prototype.getCoordinates=function(){var e=this._ptList.toArray(hr.COORDINATE_ARRAY_TYPE);return e},hr.prototype.setPrecisionModel=function(e){this._precisionModel=e},hr.prototype.addPt=function(e){var t=new M(e);if(this._precisionModel.makePrecise(t),this.isRedundant(t))return null;this._ptList.add(t)},hr.prototype.revere=function(){},hr.prototype.addPts=function(e,t){var r=this;if(t)for(var i=0;i<e.length;i++)r.addPt(e[i]);else for(var s=e.length-1;s>=0;s--)r.addPt(e[s])},hr.prototype.isRedundant=function(e){if(this._ptList.size()<1)return!1;var t=this._ptList.get(this._ptList.size()-1),r=e.distance(t);return r<this._minimimVertexDistance},hr.prototype.toString=function(){var e=new ge,t=e.createLineString(this.getCoordinates());return t.toString()},hr.prototype.closeRing=function(){if(this._ptList.size()<1)return null;var e=new M(this._ptList.get(0)),t=this._ptList.get(this._ptList.size()-1);if(e.equals(t))return null;this._ptList.add(e)},hr.prototype.setMinimumVertexDistance=function(e){this._minimimVertexDistance=e},hr.prototype.interfaces_=function(){return[]},hr.prototype.getClass=function(){return hr},Gf.COORDINATE_ARRAY_TYPE.get=function(){return new Array(0).fill(null)},Object.defineProperties(hr,Gf);var we=function(){},to={PI_TIMES_2:{configurable:!0},PI_OVER_2:{configurable:!0},PI_OVER_4:{configurable:!0},COUNTERCLOCKWISE:{configurable:!0},CLOCKWISE:{configurable:!0},NONE:{configurable:!0}};we.prototype.interfaces_=function(){return[]},we.prototype.getClass=function(){return we},we.toDegrees=function(e){return e*180/Math.PI},we.normalize=function(e){for(;e>Math.PI;)e-=we.PI_TIMES_2;for(;e<=-Math.PI;)e+=we.PI_TIMES_2;return e},we.angle=function(){if(arguments.length===1){var e=arguments[0];return Math.atan2(e.y,e.x)}else if(arguments.length===2){var t=arguments[0],r=arguments[1],i=r.x-t.x,s=r.y-t.y;return Math.atan2(s,i)}},we.isAcute=function(e,t,r){var i=e.x-t.x,s=e.y-t.y,o=r.x-t.x,a=r.y-t.y,l=i*o+s*a;return l>0},we.isObtuse=function(e,t,r){var i=e.x-t.x,s=e.y-t.y,o=r.x-t.x,a=r.y-t.y,l=i*o+s*a;return l<0},we.interiorAngle=function(e,t,r){var i=we.angle(t,e),s=we.angle(t,r);return Math.abs(s-i)},we.normalizePositive=function(e){if(e<0){for(;e<0;)e+=we.PI_TIMES_2;e>=we.PI_TIMES_2&&(e=0)}else{for(;e>=we.PI_TIMES_2;)e-=we.PI_TIMES_2;e<0&&(e=0)}return e},we.angleBetween=function(e,t,r){var i=we.angle(t,e),s=we.angle(t,r);return we.diff(i,s)},we.diff=function(e,t){var r=null;return e<t?r=t-e:r=e-t,r>Math.PI&&(r=2*Math.PI-r),r},we.toRadians=function(e){return e*Math.PI/180},we.getTurn=function(e,t){var r=Math.sin(t-e);return r>0?we.COUNTERCLOCKWISE:r<0?we.CLOCKWISE:we.NONE},we.angleBetweenOriented=function(e,t,r){var i=we.angle(t,e),s=we.angle(t,r),o=s-i;return o<=-Math.PI?o+we.PI_TIMES_2:o>Math.PI?o-we.PI_TIMES_2:o},to.PI_TIMES_2.get=function(){return 2*Math.PI},to.PI_OVER_2.get=function(){return Math.PI/2},to.PI_OVER_4.get=function(){return Math.PI/4},to.COUNTERCLOCKWISE.get=function(){return Y.COUNTERCLOCKWISE},to.CLOCKWISE.get=function(){return Y.CLOCKWISE},to.NONE.get=function(){return Y.COLLINEAR},Object.defineProperties(we,to);var ke=function n(){this._maxCurveSegmentError=0,this._filletAngleQuantum=null,this._closingSegLengthFactor=1,this._segList=null,this._distance=0,this._precisionModel=null,this._bufParams=null,this._li=null,this._s0=null,this._s1=null,this._s2=null,this._seg0=new re,this._seg1=new re,this._offset0=new re,this._offset1=new re,this._side=0,this._hasNarrowConcaveAngle=!1;var e=arguments[0],t=arguments[1],r=arguments[2];this._precisionModel=e,this._bufParams=t,this._li=new hs,this._filletAngleQuantum=Math.PI/2/t.getQuadrantSegments(),t.getQuadrantSegments()>=8&&t.getJoinStyle()===De.JOIN_ROUND&&(this._closingSegLengthFactor=n.MAX_CLOSING_SEG_LEN_FACTOR),this.init(r)},iu={OFFSET_SEGMENT_SEPARATION_FACTOR:{configurable:!0},INSIDE_TURN_VERTEX_SNAP_DISTANCE_FACTOR:{configurable:!0},CURVE_VERTEX_SNAP_DISTANCE_FACTOR:{configurable:!0},MAX_CLOSING_SEG_LEN_FACTOR:{configurable:!0}};ke.prototype.addNextSegment=function(e,t){if(this._s0=this._s1,this._s1=this._s2,this._s2=e,this._seg0.setCoordinates(this._s0,this._s1),this.computeOffsetSegment(this._seg0,this._side,this._distance,this._offset0),this._seg1.setCoordinates(this._s1,this._s2),this.computeOffsetSegment(this._seg1,this._side,this._distance,this._offset1),this._s1.equals(this._s2))return null;var r=Y.computeOrientation(this._s0,this._s1,this._s2),i=r===Y.CLOCKWISE&&this._side===G.LEFT||r===Y.COUNTERCLOCKWISE&&this._side===G.RIGHT;r===0?this.addCollinear(t):i?this.addOutsideTurn(r,t):this.addInsideTurn(r,t)},ke.prototype.addLineEndCap=function(e,t){var r=new re(e,t),i=new re;this.computeOffsetSegment(r,G.LEFT,this._distance,i);var s=new re;this.computeOffsetSegment(r,G.RIGHT,this._distance,s);var o=t.x-e.x,a=t.y-e.y,l=Math.atan2(a,o);switch(this._bufParams.getEndCapStyle()){case De.CAP_ROUND:this._segList.addPt(i.p1),this.addFilletArc(t,l+Math.PI/2,l-Math.PI/2,Y.CLOCKWISE,this._distance),this._segList.addPt(s.p1);break;case De.CAP_FLAT:this._segList.addPt(i.p1),this._segList.addPt(s.p1);break;case De.CAP_SQUARE:var u=new M;u.x=Math.abs(this._distance)*Math.cos(l),u.y=Math.abs(this._distance)*Math.sin(l);var h=new M(i.p1.x+u.x,i.p1.y+u.y),f=new M(s.p1.x+u.x,s.p1.y+u.y);this._segList.addPt(h),this._segList.addPt(f);break}},ke.prototype.getCoordinates=function(){var e=this._segList.getCoordinates();return e},ke.prototype.addMitreJoin=function(e,t,r,i){var s=!0,o=null;try{o=Xr.intersection(t.p0,t.p1,r.p0,r.p1);var a=i<=0?1:o.distance(e)/Math.abs(i);a>this._bufParams.getMitreLimit()&&(s=!1)}catch(l){if(l instanceof sl)o=new M(0,0),s=!1;else throw l}finally{}s?this._segList.addPt(o):this.addLimitedMitreJoin(t,r,i,this._bufParams.getMitreLimit())},ke.prototype.addFilletCorner=function(e,t,r,i,s){var o=t.x-e.x,a=t.y-e.y,l=Math.atan2(a,o),u=r.x-e.x,h=r.y-e.y,f=Math.atan2(h,u);i===Y.CLOCKWISE?l<=f&&(l+=2*Math.PI):l>=f&&(l-=2*Math.PI),this._segList.addPt(t),this.addFilletArc(e,l,f,i,s),this._segList.addPt(r)},ke.prototype.addOutsideTurn=function(e,t){if(this._offset0.p1.distance(this._offset1.p0)<this._distance*ke.OFFSET_SEGMENT_SEPARATION_FACTOR)return this._segList.addPt(this._offset0.p1),null;this._bufParams.getJoinStyle()===De.JOIN_MITRE?this.addMitreJoin(this._s1,this._offset0,this._offset1,this._distance):this._bufParams.getJoinStyle()===De.JOIN_BEVEL?this.addBevelJoin(this._offset0,this._offset1):(t&&this._segList.addPt(this._offset0.p1),this.addFilletCorner(this._s1,this._offset0.p1,this._offset1.p0,e,this._distance),this._segList.addPt(this._offset1.p0))},ke.prototype.createSquare=function(e){this._segList.addPt(new M(e.x+this._distance,e.y+this._distance)),this._segList.addPt(new M(e.x+this._distance,e.y-this._distance)),this._segList.addPt(new M(e.x-this._distance,e.y-this._distance)),this._segList.addPt(new M(e.x-this._distance,e.y+this._distance)),this._segList.closeRing()},ke.prototype.addSegments=function(e,t){this._segList.addPts(e,t)},ke.prototype.addFirstSegment=function(){this._segList.addPt(this._offset1.p0)},ke.prototype.addLastSegment=function(){this._segList.addPt(this._offset1.p1)},ke.prototype.initSideSegments=function(e,t,r){this._s1=e,this._s2=t,this._side=r,this._seg1.setCoordinates(e,t),this.computeOffsetSegment(this._seg1,r,this._distance,this._offset1)},ke.prototype.addLimitedMitreJoin=function(e,t,r,i){var s=this._seg0.p1,o=we.angle(s,this._seg0.p0),a=we.angleBetweenOriented(this._seg0.p0,s,this._seg1.p1),l=a/2,u=we.normalize(o+l),h=we.normalize(u+Math.PI),f=i*r,p=f*Math.abs(Math.sin(l)),v=r-p,w=s.x+f*Math.cos(h),I=s.y+f*Math.sin(h),T=new M(w,I),L=new re(s,T),m=L.pointAlongOffset(1,v),_=L.pointAlongOffset(1,-v);this._side===G.LEFT?(this._segList.addPt(m),this._segList.addPt(_)):(this._segList.addPt(_),this._segList.addPt(m))},ke.prototype.computeOffsetSegment=function(e,t,r,i){var s=t===G.LEFT?1:-1,o=e.p1.x-e.p0.x,a=e.p1.y-e.p0.y,l=Math.sqrt(o*o+a*a),u=s*r*o/l,h=s*r*a/l;i.p0.x=e.p0.x-h,i.p0.y=e.p0.y+u,i.p1.x=e.p1.x-h,i.p1.y=e.p1.y+u},ke.prototype.addFilletArc=function(e,t,r,i,s){var o=this,a=i===Y.CLOCKWISE?-1:1,l=Math.abs(t-r),u=Math.trunc(l/this._filletAngleQuantum+.5);if(u<1)return null;for(var h=0,f=l/u,p=h,v=new M;p<l;){var w=t+a*p;v.x=e.x+s*Math.cos(w),v.y=e.y+s*Math.sin(w),o._segList.addPt(v),p+=f}},ke.prototype.addInsideTurn=function(e,t){if(this._li.computeIntersection(this._offset0.p0,this._offset0.p1,this._offset1.p0,this._offset1.p1),this._li.hasIntersection())this._segList.addPt(this._li.getIntersection(0));else if(this._hasNarrowConcaveAngle=!0,this._offset0.p1.distance(this._offset1.p0)<this._distance*ke.INSIDE_TURN_VERTEX_SNAP_DISTANCE_FACTOR)this._segList.addPt(this._offset0.p1);else{if(this._segList.addPt(this._offset0.p1),this._closingSegLengthFactor>0){var r=new M((this._closingSegLengthFactor*this._offset0.p1.x+this._s1.x)/(this._closingSegLengthFactor+1),(this._closingSegLengthFactor*this._offset0.p1.y+this._s1.y)/(this._closingSegLengthFactor+1));this._segList.addPt(r);var i=new M((this._closingSegLengthFactor*this._offset1.p0.x+this._s1.x)/(this._closingSegLengthFactor+1),(this._closingSegLengthFactor*this._offset1.p0.y+this._s1.y)/(this._closingSegLengthFactor+1));this._segList.addPt(i)}else this._segList.addPt(this._s1);this._segList.addPt(this._offset1.p0)}},ke.prototype.createCircle=function(e){var t=new M(e.x+this._distance,e.y);this._segList.addPt(t),this.addFilletArc(e,0,2*Math.PI,-1,this._distance),this._segList.closeRing()},ke.prototype.addBevelJoin=function(e,t){this._segList.addPt(e.p1),this._segList.addPt(t.p0)},ke.prototype.init=function(e){this._distance=e,this._maxCurveSegmentError=e*(1-Math.cos(this._filletAngleQuantum/2)),this._segList=new hr,this._segList.setPrecisionModel(this._precisionModel),this._segList.setMinimumVertexDistance(e*ke.CURVE_VERTEX_SNAP_DISTANCE_FACTOR)},ke.prototype.addCollinear=function(e){this._li.computeIntersection(this._s0,this._s1,this._s1,this._s2);var t=this._li.getIntersectionNum();t>=2&&(this._bufParams.getJoinStyle()===De.JOIN_BEVEL||this._bufParams.getJoinStyle()===De.JOIN_MITRE?(e&&this._segList.addPt(this._offset0.p1),this._segList.addPt(this._offset1.p0)):this.addFilletCorner(this._s1,this._offset0.p1,this._offset1.p0,Y.CLOCKWISE,this._distance))},ke.prototype.closeRing=function(){this._segList.closeRing()},ke.prototype.hasNarrowConcaveAngle=function(){return this._hasNarrowConcaveAngle},ke.prototype.interfaces_=function(){return[]},ke.prototype.getClass=function(){return ke},iu.OFFSET_SEGMENT_SEPARATION_FACTOR.get=function(){return .001},iu.INSIDE_TURN_VERTEX_SNAP_DISTANCE_FACTOR.get=function(){return .001},iu.CURVE_VERTEX_SNAP_DISTANCE_FACTOR.get=function(){return 1e-6},iu.MAX_CLOSING_SEG_LEN_FACTOR.get=function(){return 80},Object.defineProperties(ke,iu);var qt=function(){this._distance=0,this._precisionModel=null,this._bufParams=null;var e=arguments[0],t=arguments[1];this._precisionModel=e,this._bufParams=t};qt.prototype.getOffsetCurve=function(e,t){if(this._distance=t,t===0)return null;var r=t<0,i=Math.abs(t),s=this.getSegGen(i);e.length<=1?this.computePointCurve(e[0],s):this.computeOffsetCurve(e,r,s);var o=s.getCoordinates();return r&&pe.reverse(o),o},qt.prototype.computeSingleSidedBufferCurve=function(e,t,r){var i=this.simplifyTolerance(this._distance);if(t){r.addSegments(e,!0);var s=Ze.simplify(e,-i),o=s.length-1;r.initSideSegments(s[o],s[o-1],G.LEFT),r.addFirstSegment();for(var a=o-2;a>=0;a--)r.addNextSegment(s[a],!0)}else{r.addSegments(e,!1);var l=Ze.simplify(e,i),u=l.length-1;r.initSideSegments(l[0],l[1],G.LEFT),r.addFirstSegment();for(var h=2;h<=u;h++)r.addNextSegment(l[h],!0)}r.addLastSegment(),r.closeRing()},qt.prototype.computeRingBufferCurve=function(e,t,r){var i=this.simplifyTolerance(this._distance);t===G.RIGHT&&(i=-i);var s=Ze.simplify(e,i),o=s.length-1;r.initSideSegments(s[o-1],s[0],t);for(var a=1;a<=o;a++){var l=a!==1;r.addNextSegment(s[a],l)}r.closeRing()},qt.prototype.computeLineBufferCurve=function(e,t){var r=this.simplifyTolerance(this._distance),i=Ze.simplify(e,r),s=i.length-1;t.initSideSegments(i[0],i[1],G.LEFT);for(var o=2;o<=s;o++)t.addNextSegment(i[o],!0);t.addLastSegment(),t.addLineEndCap(i[s-1],i[s]);var a=Ze.simplify(e,-r),l=a.length-1;t.initSideSegments(a[l],a[l-1],G.LEFT);for(var u=l-2;u>=0;u--)t.addNextSegment(a[u],!0);t.addLastSegment(),t.addLineEndCap(a[1],a[0]),t.closeRing()},qt.prototype.computePointCurve=function(e,t){switch(this._bufParams.getEndCapStyle()){case De.CAP_ROUND:t.createCircle(e);break;case De.CAP_SQUARE:t.createSquare(e);break}},qt.prototype.getLineCurve=function(e,t){if(this._distance=t,t<0&&!this._bufParams.isSingleSided()||t===0)return null;var r=Math.abs(t),i=this.getSegGen(r);if(e.length<=1)this.computePointCurve(e[0],i);else if(this._bufParams.isSingleSided()){var s=t<0;this.computeSingleSidedBufferCurve(e,s,i)}else this.computeLineBufferCurve(e,i);var o=i.getCoordinates();return o},qt.prototype.getBufferParameters=function(){return this._bufParams},qt.prototype.simplifyTolerance=function(e){return e*this._bufParams.getSimplifyFactor()},qt.prototype.getRingCurve=function(e,t,r){if(this._distance=r,e.length<=2)return this.getLineCurve(e,r);if(r===0)return qt.copyCoordinates(e);var i=this.getSegGen(r);return this.computeRingBufferCurve(e,t,i),i.getCoordinates()},qt.prototype.computeOffsetCurve=function(e,t,r){var i=this.simplifyTolerance(this._distance);if(t){var s=Ze.simplify(e,-i),o=s.length-1;r.initSideSegments(s[o],s[o-1],G.LEFT),r.addFirstSegment();for(var a=o-2;a>=0;a--)r.addNextSegment(s[a],!0)}else{var l=Ze.simplify(e,i),u=l.length-1;r.initSideSegments(l[0],l[1],G.LEFT),r.addFirstSegment();for(var h=2;h<=u;h++)r.addNextSegment(l[h],!0)}r.addLastSegment()},qt.prototype.getSegGen=function(e){return new ke(this._precisionModel,this._bufParams,e)},qt.prototype.interfaces_=function(){return[]},qt.prototype.getClass=function(){return qt},qt.copyCoordinates=function(e){for(var t=new Array(e.length).fill(null),r=0;r<t.length;r++)t[r]=new M(e[r]);return t};var ro=function(){this._subgraphs=null,this._seg=new re,this._cga=new Y;var e=arguments[0];this._subgraphs=e},Wf={DepthSegment:{configurable:!0}};ro.prototype.findStabbedSegments=function(){var e=this;if(arguments.length===1){for(var t=arguments[0],r=new W,i=this._subgraphs.iterator();i.hasNext();){var s=i.next(),o=s.getEnvelope();t.y<o.getMinY()||t.y>o.getMaxY()||e.findStabbedSegments(t,s.getDirectedEdges(),r)}return r}else if(arguments.length===3){if(ae(arguments[2],Yr)&&arguments[0]instanceof M&&arguments[1]instanceof Yc)for(var a=arguments[0],l=arguments[1],u=arguments[2],h=l.getEdge().getCoordinates(),f=0;f<h.length-1;f++){e._seg.p0=h[f],e._seg.p1=h[f+1],e._seg.p0.y>e._seg.p1.y&&e._seg.reverse();var p=Math.max(e._seg.p0.x,e._seg.p1.x);if(!(p<a.x)&&!e._seg.isHorizontal()&&!(a.y<e._seg.p0.y||a.y>e._seg.p1.y)&&Y.computeOrientation(e._seg.p0,e._seg.p1,a)!==Y.RIGHT){var v=l.getDepth(G.LEFT);e._seg.p0.equals(h[f])||(v=l.getDepth(G.RIGHT));var w=new ms(e._seg,v);u.add(w)}}else if(ae(arguments[2],Yr)&&arguments[0]instanceof M&&ae(arguments[1],Yr))for(var I=arguments[0],T=arguments[1],L=arguments[2],m=T.iterator();m.hasNext();){var _=m.next();_.isForward()&&e.findStabbedSegments(I,_,L)}}},ro.prototype.getDepth=function(e){var t=this.findStabbedSegments(e);if(t.size()===0)return 0;var r=Qr.min(t);return r._leftDepth},ro.prototype.interfaces_=function(){return[]},ro.prototype.getClass=function(){return ro},Wf.DepthSegment.get=function(){return ms},Object.defineProperties(ro,Wf);var ms=function(){this._upwardSeg=null,this._leftDepth=null;var e=arguments[0],t=arguments[1];this._upwardSeg=new re(e),this._leftDepth=t};ms.prototype.compareTo=function(e){var t=e;if(this._upwardSeg.minX()>=t._upwardSeg.maxX())return 1;if(this._upwardSeg.maxX()<=t._upwardSeg.minX())return-1;var r=this._upwardSeg.orientationIndex(t._upwardSeg);return r!==0||(r=-1*t._upwardSeg.orientationIndex(this._upwardSeg),r!==0)?r:this._upwardSeg.compareTo(t._upwardSeg)},ms.prototype.compareX=function(e,t){var r=e.p0.compareTo(t.p0);return r!==0?r:e.p1.compareTo(t.p1)},ms.prototype.toString=function(){return this._upwardSeg.toString()},ms.prototype.interfaces_=function(){return[Sr]},ms.prototype.getClass=function(){return ms};var Ne=function(e,t,r){this.p0=e||null,this.p1=t||null,this.p2=r||null};Ne.prototype.area=function(){return Ne.area(this.p0,this.p1,this.p2)},Ne.prototype.signedArea=function(){return Ne.signedArea(this.p0,this.p1,this.p2)},Ne.prototype.interpolateZ=function(e){if(e===null)throw new Ue("Supplied point is null.");return Ne.interpolateZ(e,this.p0,this.p1,this.p2)},Ne.prototype.longestSideLength=function(){return Ne.longestSideLength(this.p0,this.p1,this.p2)},Ne.prototype.isAcute=function(){return Ne.isAcute(this.p0,this.p1,this.p2)},Ne.prototype.circumcentre=function(){return Ne.circumcentre(this.p0,this.p1,this.p2)},Ne.prototype.area3D=function(){return Ne.area3D(this.p0,this.p1,this.p2)},Ne.prototype.centroid=function(){return Ne.centroid(this.p0,this.p1,this.p2)},Ne.prototype.inCentre=function(){return Ne.inCentre(this.p0,this.p1,this.p2)},Ne.prototype.interfaces_=function(){return[]},Ne.prototype.getClass=function(){return Ne},Ne.area=function(e,t,r){return Math.abs(((r.x-e.x)*(t.y-e.y)-(t.x-e.x)*(r.y-e.y))/2)},Ne.signedArea=function(e,t,r){return((r.x-e.x)*(t.y-e.y)-(t.x-e.x)*(r.y-e.y))/2},Ne.det=function(e,t,r,i){return e*i-t*r},Ne.interpolateZ=function(e,t,r,i){var s=t.x,o=t.y,a=r.x-s,l=i.x-s,u=r.y-o,h=i.y-o,f=a*h-l*u,p=e.x-s,v=e.y-o,w=(h*p-l*v)/f,I=(-u*p+a*v)/f,T=t.z+w*(r.z-t.z)+I*(i.z-t.z);return T},Ne.longestSideLength=function(e,t,r){var i=e.distance(t),s=t.distance(r),o=r.distance(e),a=i;return s>a&&(a=s),o>a&&(a=o),a},Ne.isAcute=function(e,t,r){return!(!we.isAcute(e,t,r)||!we.isAcute(t,r,e)||!we.isAcute(r,e,t))},Ne.circumcentre=function(e,t,r){var i=r.x,s=r.y,o=e.x-i,a=e.y-s,l=t.x-i,u=t.y-s,h=2*Ne.det(o,a,l,u),f=Ne.det(a,o*o+a*a,u,l*l+u*u),p=Ne.det(o,o*o+a*a,l,l*l+u*u),v=i-f/h,w=s+p/h;return new M(v,w)},Ne.perpendicularBisector=function(e,t){var r=t.x-e.x,i=t.y-e.y,s=new Xr(e.x+r/2,e.y+i/2,1),o=new Xr(e.x-i+r/2,e.y+r+i/2,1);return new Xr(s,o)},Ne.angleBisector=function(e,t,r){var i=t.distance(e),s=t.distance(r),o=i/(i+s),a=r.x-e.x,l=r.y-e.y,u=new M(e.x+o*a,e.y+o*l);return u},Ne.area3D=function(e,t,r){var i=t.x-e.x,s=t.y-e.y,o=t.z-e.z,a=r.x-e.x,l=r.y-e.y,u=r.z-e.z,h=s*u-o*l,f=o*a-i*u,p=i*l-s*a,v=h*h+f*f+p*p,w=Math.sqrt(v)/2;return w},Ne.centroid=function(e,t,r){var i=(e.x+t.x+r.x)/3,s=(e.y+t.y+r.y)/3;return new M(i,s)},Ne.inCentre=function(e,t,r){var i=t.distance(r),s=e.distance(r),o=e.distance(t),a=i+s+o,l=(i*e.x+s*t.x+o*r.x)/a,u=(i*e.y+s*t.y+o*r.y)/a;return new M(l,u)};var Nr=function(){this._inputGeom=null,this._distance=null,this._curveBuilder=null,this._curveList=new W;var e=arguments[0],t=arguments[1],r=arguments[2];this._inputGeom=e,this._distance=t,this._curveBuilder=r};Nr.prototype.addPoint=function(e){if(this._distance<=0)return null;var t=e.getCoordinates(),r=this._curveBuilder.getLineCurve(t,this._distance);this.addCurve(r,R.EXTERIOR,R.INTERIOR)},Nr.prototype.addPolygon=function(e){var t=this,r=this._distance,i=G.LEFT;this._distance<0&&(r=-this._distance,i=G.RIGHT);var s=e.getExteriorRing(),o=pe.removeRepeatedPoints(s.getCoordinates());if(this._distance<0&&this.isErodedCompletely(s,this._distance)||this._distance<=0&&o.length<3)return null;this.addPolygonRing(o,r,i,R.EXTERIOR,R.INTERIOR);for(var a=0;a<e.getNumInteriorRing();a++){var l=e.getInteriorRingN(a),u=pe.removeRepeatedPoints(l.getCoordinates());t._distance>0&&t.isErodedCompletely(l,-t._distance)||t.addPolygonRing(u,r,G.opposite(i),R.INTERIOR,R.EXTERIOR)}},Nr.prototype.isTriangleErodedCompletely=function(e,t){var r=new Ne(e[0],e[1],e[2]),i=r.inCentre(),s=Y.distancePointLine(i,r.p0,r.p1);return s<Math.abs(t)},Nr.prototype.addLineString=function(e){if(this._distance<=0&&!this._curveBuilder.getBufferParameters().isSingleSided())return null;var t=pe.removeRepeatedPoints(e.getCoordinates()),r=this._curveBuilder.getLineCurve(t,this._distance);this.addCurve(r,R.EXTERIOR,R.INTERIOR)},Nr.prototype.addCurve=function(e,t,r){if(e===null||e.length<2)return null;var i=new Be(e,new be(0,R.BOUNDARY,t,r));this._curveList.add(i)},Nr.prototype.getCurves=function(){return this.add(this._inputGeom),this._curveList},Nr.prototype.addPolygonRing=function(e,t,r,i,s){if(t===0&&e.length<Rn.MINIMUM_VALID_SIZE)return null;var o=i,a=s;e.length>=Rn.MINIMUM_VALID_SIZE&&Y.isCCW(e)&&(o=s,a=i,r=G.opposite(r));var l=this._curveBuilder.getRingCurve(e,r,t);this.addCurve(l,o,a)},Nr.prototype.add=function(e){if(e.isEmpty())return null;e instanceof it?this.addPolygon(e):e instanceof Je?this.addLineString(e):e instanceof jt?this.addPoint(e):e instanceof pl?this.addCollection(e):e instanceof ps?this.addCollection(e):e instanceof Fn?this.addCollection(e):e instanceof Mt&&this.addCollection(e)},Nr.prototype.isErodedCompletely=function(e,t){var r=e.getCoordinates();if(r.length<4)return t<0;if(r.length===4)return this.isTriangleErodedCompletely(r,t);var i=e.getEnvelopeInternal(),s=Math.min(i.getHeight(),i.getWidth());return t<0&&2*Math.abs(t)>s},Nr.prototype.addCollection=function(e){for(var t=this,r=0;r<e.getNumGeometries();r++){var i=e.getGeometryN(r);t.add(i)}},Nr.prototype.interfaces_=function(){return[]},Nr.prototype.getClass=function(){return Nr};var yl=function(){};yl.prototype.locate=function(e){},yl.prototype.interfaces_=function(){return[]},yl.prototype.getClass=function(){return yl};var zn=function(){this._parent=null,this._atStart=null,this._max=null,this._index=null,this._subcollectionIterator=null;var e=arguments[0];this._parent=e,this._atStart=!0,this._index=0,this._max=e.getNumGeometries()};zn.prototype.next=function(){if(this._atStart)return this._atStart=!1,zn.isAtomic(this._parent)&&this._index++,this._parent;if(this._subcollectionIterator!==null){if(this._subcollectionIterator.hasNext())return this._subcollectionIterator.next();this._subcollectionIterator=null}if(this._index>=this._max)throw new fl;var e=this._parent.getGeometryN(this._index++);return e instanceof Mt?(this._subcollectionIterator=new zn(e),this._subcollectionIterator.next()):e},zn.prototype.remove=function(){throw new Error(this.getClass().getName())},zn.prototype.hasNext=function(){if(this._atStart)return!0;if(this._subcollectionIterator!==null){if(this._subcollectionIterator.hasNext())return!0;this._subcollectionIterator=null}return!(this._index>=this._max)},zn.prototype.interfaces_=function(){return[hl]},zn.prototype.getClass=function(){return zn},zn.isAtomic=function(e){return!(e instanceof Mt)};var fr=function(){this._geom=null;var e=arguments[0];this._geom=e};fr.prototype.locate=function(e){return fr.locate(e,this._geom)},fr.prototype.interfaces_=function(){return[yl]},fr.prototype.getClass=function(){return fr},fr.isPointInRing=function(e,t){return t.getEnvelopeInternal().intersects(e)?Y.isPointInRing(e,t.getCoordinates()):!1},fr.containsPointInPolygon=function(e,t){if(t.isEmpty())return!1;var r=t.getExteriorRing();if(!fr.isPointInRing(e,r))return!1;for(var i=0;i<t.getNumInteriorRing();i++){var s=t.getInteriorRingN(i);if(fr.isPointInRing(e,s))return!1}return!0},fr.containsPoint=function(e,t){if(t instanceof it)return fr.containsPointInPolygon(e,t);if(t instanceof Mt)for(var r=new zn(t);r.hasNext();){var i=r.next();if(i!==t&&fr.containsPoint(e,i))return!0}return!1},fr.locate=function(e,t){return t.isEmpty()?R.EXTERIOR:fr.containsPoint(e,t)?R.INTERIOR:R.EXTERIOR};var Nt=function(){this._edgeMap=new Tt,this._edgeList=null,this._ptInAreaLocation=[R.NONE,R.NONE]};Nt.prototype.getNextCW=function(e){this.getEdges();var t=this._edgeList.indexOf(e),r=t-1;return t===0&&(r=this._edgeList.size()-1),this._edgeList.get(r)},Nt.prototype.propagateSideLabels=function(e){for(var t=R.NONE,r=this.iterator();r.hasNext();){var i=r.next(),s=i.getLabel();s.isArea(e)&&s.getLocation(e,G.LEFT)!==R.NONE&&(t=s.getLocation(e,G.LEFT))}if(t===R.NONE)return null;for(var o=t,a=this.iterator();a.hasNext();){var l=a.next(),u=l.getLabel();if(u.getLocation(e,G.ON)===R.NONE&&u.setLocation(e,G.ON,o),u.isArea(e)){var h=u.getLocation(e,G.LEFT),f=u.getLocation(e,G.RIGHT);if(f!==R.NONE){if(f!==o)throw new fi("side location conflict",l.getCoordinate());h===R.NONE&&fe.shouldNeverReachHere("found single null side (at "+l.getCoordinate()+")"),o=h}else fe.isTrue(u.getLocation(e,G.LEFT)===R.NONE,"found single null side"),u.setLocation(e,G.RIGHT,o),u.setLocation(e,G.LEFT,o)}}},Nt.prototype.getCoordinate=function(){var e=this.iterator();if(!e.hasNext())return null;var t=e.next();return t.getCoordinate()},Nt.prototype.print=function(e){vt.out.println("EdgeEndStar: "+this.getCoordinate());for(var t=this.iterator();t.hasNext();){var r=t.next();r.print(e)}},Nt.prototype.isAreaLabelsConsistent=function(e){return this.computeEdgeEndLabels(e.getBoundaryNodeRule()),this.checkAreaLabelsConsistent(0)},Nt.prototype.checkAreaLabelsConsistent=function(e){var t=this.getEdges();if(t.size()<=0)return!0;var r=t.size()-1,i=t.get(r).getLabel(),s=i.getLocation(e,G.LEFT);fe.isTrue(s!==R.NONE,"Found unlabelled area edge");for(var o=s,a=this.iterator();a.hasNext();){var l=a.next(),u=l.getLabel();fe.isTrue(u.isArea(e),"Found non-area edge");var h=u.getLocation(e,G.LEFT),f=u.getLocation(e,G.RIGHT);if(h===f||f!==o)return!1;o=h}return!0},Nt.prototype.findIndex=function(e){var t=this;this.iterator();for(var r=0;r<this._edgeList.size();r++){var i=t._edgeList.get(r);if(i===e)return r}return-1},Nt.prototype.iterator=function(){return this.getEdges().iterator()},Nt.prototype.getEdges=function(){return this._edgeList===null&&(this._edgeList=new W(this._edgeMap.values())),this._edgeList},Nt.prototype.getLocation=function(e,t,r){return this._ptInAreaLocation[e]===R.NONE&&(this._ptInAreaLocation[e]=fr.locate(t,r[e].getGeometry())),this._ptInAreaLocation[e]},Nt.prototype.toString=function(){var e=new on;e.append("EdgeEndStar: "+this.getCoordinate()),e.append(`
5
- `);for(var t=this.iterator();t.hasNext();){var r=t.next();e.append(r),e.append(`
6
- `)}return e.toString()},Nt.prototype.computeEdgeEndLabels=function(e){for(var t=this.iterator();t.hasNext();){var r=t.next();r.computeLabel(e)}},Nt.prototype.computeLabelling=function(e){var t=this;this.computeEdgeEndLabels(e[0].getBoundaryNodeRule()),this.propagateSideLabels(0),this.propagateSideLabels(1);for(var r=[!1,!1],i=this.iterator();i.hasNext();)for(var s=i.next(),o=s.getLabel(),a=0;a<2;a++)o.isLine(a)&&o.getLocation(a)===R.BOUNDARY&&(r[a]=!0);for(var l=this.iterator();l.hasNext();)for(var u=l.next(),h=u.getLabel(),f=0;f<2;f++)if(h.isAnyNull(f)){var p=R.NONE;if(r[f])p=R.EXTERIOR;else{var v=u.getCoordinate();p=t.getLocation(f,v,e)}h.setAllLocationsIfNull(f,p)}},Nt.prototype.getDegree=function(){return this._edgeMap.size()},Nt.prototype.insertEdgeEnd=function(e,t){this._edgeMap.put(e,t),this._edgeList=null},Nt.prototype.interfaces_=function(){return[]},Nt.prototype.getClass=function(){return Nt};var tv=function(n){function e(){n.call(this),this._resultAreaEdgeList=null,this._label=null,this._SCANNING_FOR_INCOMING=1,this._LINKING_TO_OUTGOING=2}return n&&(e.__proto__=n),e.prototype=Object.create(n&&n.prototype),e.prototype.constructor=e,e.prototype.linkResultDirectedEdges=function(){var r=this;this.getResultAreaEdges();for(var i=null,s=null,o=this._SCANNING_FOR_INCOMING,a=0;a<this._resultAreaEdgeList.size();a++){var l=r._resultAreaEdgeList.get(a),u=l.getSym();if(l.getLabel().isArea())switch(i===null&&l.isInResult()&&(i=l),o){case r._SCANNING_FOR_INCOMING:if(!u.isInResult())continue;s=u,o=r._LINKING_TO_OUTGOING;break;case r._LINKING_TO_OUTGOING:if(!l.isInResult())continue;s.setNext(l),o=r._SCANNING_FOR_INCOMING;break}}if(o===this._LINKING_TO_OUTGOING){if(i===null)throw new fi("no outgoing dirEdge found",this.getCoordinate());fe.isTrue(i.isInResult(),"unable to link last incoming dirEdge"),s.setNext(i)}},e.prototype.insert=function(r){var i=r;this.insertEdgeEnd(i,i)},e.prototype.getRightmostEdge=function(){var r=this.getEdges(),i=r.size();if(i<1)return null;var s=r.get(0);if(i===1)return s;var o=r.get(i-1),a=s.getQuadrant(),l=o.getQuadrant();return xe.isNorthern(a)&&xe.isNorthern(l)?s:!xe.isNorthern(a)&&!xe.isNorthern(l)?o:s.getDy()!==0?s:o.getDy()!==0?o:(fe.shouldNeverReachHere("found two horizontal edges incident on node"),null)},e.prototype.print=function(r){vt.out.println("DirectedEdgeStar: "+this.getCoordinate());for(var i=this.iterator();i.hasNext();){var s=i.next();r.print("out "),s.print(r),r.println(),r.print("in "),s.getSym().print(r),r.println()}},e.prototype.getResultAreaEdges=function(){var r=this;if(this._resultAreaEdgeList!==null)return this._resultAreaEdgeList;this._resultAreaEdgeList=new W;for(var i=this.iterator();i.hasNext();){var s=i.next();(s.isInResult()||s.getSym().isInResult())&&r._resultAreaEdgeList.add(s)}return this._resultAreaEdgeList},e.prototype.updateLabelling=function(r){for(var i=this.iterator();i.hasNext();){var s=i.next(),o=s.getLabel();o.setAllLocationsIfNull(0,r.getLocation(0)),o.setAllLocationsIfNull(1,r.getLocation(1))}},e.prototype.linkAllDirectedEdges=function(){var r=this;this.getEdges();for(var i=null,s=null,o=this._edgeList.size()-1;o>=0;o--){var a=r._edgeList.get(o),l=a.getSym();s===null&&(s=l),i!==null&&l.setNext(i),i=a}s.setNext(i)},e.prototype.computeDepths=function(){var r=this;if(arguments.length===1){var i=arguments[0],s=this.findIndex(i),o=i.getDepth(G.LEFT),a=i.getDepth(G.RIGHT),l=this.computeDepths(s+1,this._edgeList.size(),o),u=this.computeDepths(0,s,l);if(u!==a)throw new fi("depth mismatch at "+i.getCoordinate())}else if(arguments.length===3){for(var h=arguments[0],f=arguments[1],p=arguments[2],v=p,w=h;w<f;w++){var I=r._edgeList.get(w);I.setEdgeDepths(G.RIGHT,v),v=I.getDepth(G.LEFT)}return v}},e.prototype.mergeSymLabels=function(){for(var r=this.iterator();r.hasNext();){var i=r.next(),s=i.getLabel();s.merge(i.getSym().getLabel())}},e.prototype.linkMinimalDirectedEdges=function(r){for(var i=this,s=null,o=null,a=this._SCANNING_FOR_INCOMING,l=this._resultAreaEdgeList.size()-1;l>=0;l--){var u=i._resultAreaEdgeList.get(l),h=u.getSym();switch(s===null&&u.getEdgeRing()===r&&(s=u),a){case i._SCANNING_FOR_INCOMING:if(h.getEdgeRing()!==r)continue;o=h,a=i._LINKING_TO_OUTGOING;break;case i._LINKING_TO_OUTGOING:if(u.getEdgeRing()!==r)continue;o.setNextMin(u),a=i._SCANNING_FOR_INCOMING;break}}a===this._LINKING_TO_OUTGOING&&(fe.isTrue(s!==null,"found null for first outgoing dirEdge"),fe.isTrue(s.getEdgeRing()===r,"unable to link last incoming dirEdge"),o.setNextMin(s))},e.prototype.getOutgoingDegree=function(){if(arguments.length===0){for(var r=0,i=this.iterator();i.hasNext();){var s=i.next();s.isInResult()&&r++}return r}else if(arguments.length===1){for(var o=arguments[0],a=0,l=this.iterator();l.hasNext();){var u=l.next();u.getEdgeRing()===o&&a++}return a}},e.prototype.getLabel=function(){return this._label},e.prototype.findCoveredLineEdges=function(){for(var r=R.NONE,i=this.iterator();i.hasNext();){var s=i.next(),o=s.getSym();if(!s.isLineEdge()){if(s.isInResult()){r=R.INTERIOR;break}if(o.isInResult()){r=R.EXTERIOR;break}}}if(r===R.NONE)return null;for(var a=r,l=this.iterator();l.hasNext();){var u=l.next(),h=u.getSym();u.isLineEdge()?u.getEdge().setCovered(a===R.INTERIOR):(u.isInResult()&&(a=R.EXTERIOR),h.isInResult()&&(a=R.INTERIOR))}},e.prototype.computeLabelling=function(r){var i=this;n.prototype.computeLabelling.call(this,r),this._label=new be(R.NONE);for(var s=this.iterator();s.hasNext();)for(var o=s.next(),a=o.getEdge(),l=a.getLabel(),u=0;u<2;u++){var h=l.getLocation(u);(h===R.INTERIOR||h===R.BOUNDARY)&&i._label.setLocation(u,R.INTERIOR)}},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e}(Nt),qf=function(n){function e(){n.apply(this,arguments)}return n&&(e.__proto__=n),e.prototype=Object.create(n&&n.prototype),e.prototype.constructor=e,e.prototype.createNode=function(r){return new qu(r,new tv)},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e}(gl),Vi=function n(){this._pts=null,this._orientation=null;var e=arguments[0];this._pts=e,this._orientation=n.orientation(e)};Vi.prototype.compareTo=function(e){var t=e,r=Vi.compareOriented(this._pts,this._orientation,t._pts,t._orientation);return r},Vi.prototype.interfaces_=function(){return[Sr]},Vi.prototype.getClass=function(){return Vi},Vi.orientation=function(e){return pe.increasingDirection(e)===1},Vi.compareOriented=function(e,t,r,i){for(var s=t?1:-1,o=i?1:-1,a=t?e.length:-1,l=i?r.length:-1,u=t?0:e.length-1,h=i?0:r.length-1;;){var f=e[u].compareTo(r[h]);if(f!==0)return f;u+=s,h+=o;var p=u===a,v=h===l;if(p&&!v)return-1;if(!p&&v)return 1;if(p&&v)return 0}};var Br=function(){this._edges=new W,this._ocaMap=new Tt};Br.prototype.print=function(e){var t=this;e.print("MULTILINESTRING ( ");for(var r=0;r<this._edges.size();r++){var i=t._edges.get(r);r>0&&e.print(","),e.print("(");for(var s=i.getCoordinates(),o=0;o<s.length;o++)o>0&&e.print(","),e.print(s[o].x+" "+s[o].y);e.println(")")}e.print(") ")},Br.prototype.addAll=function(e){for(var t=this,r=e.iterator();r.hasNext();)t.add(r.next())},Br.prototype.findEdgeIndex=function(e){for(var t=this,r=0;r<this._edges.size();r++)if(t._edges.get(r).equals(e))return r;return-1},Br.prototype.iterator=function(){return this._edges.iterator()},Br.prototype.getEdges=function(){return this._edges},Br.prototype.get=function(e){return this._edges.get(e)},Br.prototype.findEqualEdge=function(e){var t=new Vi(e.getCoordinates()),r=this._ocaMap.get(t);return r},Br.prototype.add=function(e){this._edges.add(e);var t=new Vi(e.getCoordinates());this._ocaMap.put(t,e)},Br.prototype.interfaces_=function(){return[]},Br.prototype.getClass=function(){return Br};var vs=function(){};vs.prototype.processIntersections=function(e,t,r,i){},vs.prototype.isDone=function(){},vs.prototype.interfaces_=function(){return[]},vs.prototype.getClass=function(){return vs};var dr=function(){this._hasIntersection=!1,this._hasProper=!1,this._hasProperInterior=!1,this._hasInterior=!1,this._properIntersectionPoint=null,this._li=null,this._isSelfIntersection=null,this.numIntersections=0,this.numInteriorIntersections=0,this.numProperIntersections=0,this.numTests=0;var e=arguments[0];this._li=e};dr.prototype.isTrivialIntersection=function(e,t,r,i){if(e===r&&this._li.getIntersectionNum()===1){if(dr.isAdjacentSegments(t,i))return!0;if(e.isClosed()){var s=e.size()-1;if(t===0&&i===s||i===0&&t===s)return!0}}return!1},dr.prototype.getProperIntersectionPoint=function(){return this._properIntersectionPoint},dr.prototype.hasProperInteriorIntersection=function(){return this._hasProperInterior},dr.prototype.getLineIntersector=function(){return this._li},dr.prototype.hasProperIntersection=function(){return this._hasProper},dr.prototype.processIntersections=function(e,t,r,i){if(e===r&&t===i)return null;this.numTests++;var s=e.getCoordinates()[t],o=e.getCoordinates()[t+1],a=r.getCoordinates()[i],l=r.getCoordinates()[i+1];this._li.computeIntersection(s,o,a,l),this._li.hasIntersection()&&(this.numIntersections++,this._li.isInteriorIntersection()&&(this.numInteriorIntersections++,this._hasInterior=!0),this.isTrivialIntersection(e,t,r,i)||(this._hasIntersection=!0,e.addIntersections(this._li,t,0),r.addIntersections(this._li,i,1),this._li.isProper()&&(this.numProperIntersections++,this._hasProper=!0,this._hasProperInterior=!0)))},dr.prototype.hasIntersection=function(){return this._hasIntersection},dr.prototype.isDone=function(){return!1},dr.prototype.hasInteriorIntersection=function(){return this._hasInterior},dr.prototype.interfaces_=function(){return[vs]},dr.prototype.getClass=function(){return dr},dr.isAdjacentSegments=function(e,t){return Math.abs(e-t)===1};var yn=function(){this.coord=null,this.segmentIndex=null,this.dist=null;var e=arguments[0],t=arguments[1],r=arguments[2];this.coord=new M(e),this.segmentIndex=t,this.dist=r};yn.prototype.getSegmentIndex=function(){return this.segmentIndex},yn.prototype.getCoordinate=function(){return this.coord},yn.prototype.print=function(e){e.print(this.coord),e.print(" seg # = "+this.segmentIndex),e.println(" dist = "+this.dist)},yn.prototype.compareTo=function(e){var t=e;return this.compare(t.segmentIndex,t.dist)},yn.prototype.isEndPoint=function(e){return this.segmentIndex===0&&this.dist===0||this.segmentIndex===e},yn.prototype.toString=function(){return this.coord+" seg # = "+this.segmentIndex+" dist = "+this.dist},yn.prototype.getDistance=function(){return this.dist},yn.prototype.compare=function(e,t){return this.segmentIndex<e?-1:this.segmentIndex>e?1:this.dist<t?-1:this.dist>t?1:0},yn.prototype.interfaces_=function(){return[Sr]},yn.prototype.getClass=function(){return yn};var Un=function(){this._nodeMap=new Tt,this.edge=null;var e=arguments[0];this.edge=e};Un.prototype.print=function(e){e.println("Intersections:");for(var t=this.iterator();t.hasNext();){var r=t.next();r.print(e)}},Un.prototype.iterator=function(){return this._nodeMap.values().iterator()},Un.prototype.addSplitEdges=function(e){var t=this;this.addEndpoints();for(var r=this.iterator(),i=r.next();r.hasNext();){var s=r.next(),o=t.createSplitEdge(i,s);e.add(o),i=s}},Un.prototype.addEndpoints=function(){var e=this.edge.pts.length-1;this.add(this.edge.pts[0],0,0),this.add(this.edge.pts[e],e,0)},Un.prototype.createSplitEdge=function(e,t){var r=this,i=t.segmentIndex-e.segmentIndex+2,s=this.edge.pts[t.segmentIndex],o=t.dist>0||!t.coord.equals2D(s);o||i--;var a=new Array(i).fill(null),l=0;a[l++]=new M(e.coord);for(var u=e.segmentIndex+1;u<=t.segmentIndex;u++)a[l++]=r.edge.pts[u];return o&&(a[l]=t.coord),new Hu(a,new be(this.edge._label))},Un.prototype.add=function(e,t,r){var i=new yn(e,t,r),s=this._nodeMap.get(i);return s!==null?s:(this._nodeMap.put(i,i),i)},Un.prototype.isIntersection=function(e){for(var t=this.iterator();t.hasNext();){var r=t.next();if(r.coord.equals(e))return!0}return!1},Un.prototype.interfaces_=function(){return[]},Un.prototype.getClass=function(){return Un};var ys=function(){};ys.prototype.getChainStartIndices=function(e){var t=this,r=0,i=new W;i.add(new an(r));do{var s=t.findChainEnd(e,r);i.add(new an(s)),r=s}while(r<e.length-1);var o=ys.toIntArray(i);return o},ys.prototype.findChainEnd=function(e,t){for(var r=xe.quadrant(e[t],e[t+1]),i=t+1;i<e.length;){var s=xe.quadrant(e[i-1],e[i]);if(s!==r)break;i++}return i-1},ys.prototype.interfaces_=function(){return[]},ys.prototype.getClass=function(){return ys},ys.toIntArray=function(e){for(var t=new Array(e.size()).fill(null),r=0;r<t.length;r++)t[r]=e.get(r).intValue();return t};var gi=function(){this.e=null,this.pts=null,this.startIndex=null,this.env1=new te,this.env2=new te;var e=arguments[0];this.e=e,this.pts=e.getCoordinates();var t=new ys;this.startIndex=t.getChainStartIndices(this.pts)};gi.prototype.getCoordinates=function(){return this.pts},gi.prototype.getMaxX=function(e){var t=this.pts[this.startIndex[e]].x,r=this.pts[this.startIndex[e+1]].x;return t>r?t:r},gi.prototype.getMinX=function(e){var t=this.pts[this.startIndex[e]].x,r=this.pts[this.startIndex[e+1]].x;return t<r?t:r},gi.prototype.computeIntersectsForChain=function(){if(arguments.length===4){var e=arguments[0],t=arguments[1],r=arguments[2],i=arguments[3];this.computeIntersectsForChain(this.startIndex[e],this.startIndex[e+1],t,t.startIndex[r],t.startIndex[r+1],i)}else if(arguments.length===6){var s=arguments[0],o=arguments[1],a=arguments[2],l=arguments[3],u=arguments[4],h=arguments[5],f=this.pts[s],p=this.pts[o],v=a.pts[l],w=a.pts[u];if(o-s===1&&u-l===1)return h.addIntersections(this.e,s,a.e,l),null;if(this.env1.init(f,p),this.env2.init(v,w),!this.env1.intersects(this.env2))return null;var I=Math.trunc((s+o)/2),T=Math.trunc((l+u)/2);s<I&&(l<T&&this.computeIntersectsForChain(s,I,a,l,T,h),T<u&&this.computeIntersectsForChain(s,I,a,T,u,h)),I<o&&(l<T&&this.computeIntersectsForChain(I,o,a,l,T,h),T<u&&this.computeIntersectsForChain(I,o,a,T,u,h))}},gi.prototype.getStartIndexes=function(){return this.startIndex},gi.prototype.computeIntersects=function(e,t){for(var r=this,i=0;i<this.startIndex.length-1;i++)for(var s=0;s<e.startIndex.length-1;s++)r.computeIntersectsForChain(i,e,s,t)},gi.prototype.interfaces_=function(){return[]},gi.prototype.getClass=function(){return gi};var yt=function n(){var e=this;this._depth=Array(2).fill().map(function(){return Array(3)});for(var t=0;t<2;t++)for(var r=0;r<3;r++)e._depth[t][r]=n.NULL_VALUE},Xf={NULL_VALUE:{configurable:!0}};yt.prototype.getDepth=function(e,t){return this._depth[e][t]},yt.prototype.setDepth=function(e,t,r){this._depth[e][t]=r},yt.prototype.isNull=function(){var e=this;if(arguments.length===0){for(var t=0;t<2;t++)for(var r=0;r<3;r++)if(e._depth[t][r]!==yt.NULL_VALUE)return!1;return!0}else if(arguments.length===1){var i=arguments[0];return this._depth[i][1]===yt.NULL_VALUE}else if(arguments.length===2){var s=arguments[0],o=arguments[1];return this._depth[s][o]===yt.NULL_VALUE}},yt.prototype.normalize=function(){for(var e=this,t=0;t<2;t++)if(!e.isNull(t)){var r=e._depth[t][1];e._depth[t][2]<r&&(r=e._depth[t][2]),r<0&&(r=0);for(var i=1;i<3;i++){var s=0;e._depth[t][i]>r&&(s=1),e._depth[t][i]=s}}},yt.prototype.getDelta=function(e){return this._depth[e][G.RIGHT]-this._depth[e][G.LEFT]},yt.prototype.getLocation=function(e,t){return this._depth[e][t]<=0?R.EXTERIOR:R.INTERIOR},yt.prototype.toString=function(){return"A: "+this._depth[0][1]+","+this._depth[0][2]+" B: "+this._depth[1][1]+","+this._depth[1][2]},yt.prototype.add=function(){var e=this;if(arguments.length===1)for(var t=arguments[0],r=0;r<2;r++)for(var i=1;i<3;i++){var s=t.getLocation(r,i);(s===R.EXTERIOR||s===R.INTERIOR)&&(e.isNull(r,i)?e._depth[r][i]=yt.depthAtLocation(s):e._depth[r][i]+=yt.depthAtLocation(s))}else if(arguments.length===3){var o=arguments[0],a=arguments[1],l=arguments[2];l===R.INTERIOR&&this._depth[o][a]++}},yt.prototype.interfaces_=function(){return[]},yt.prototype.getClass=function(){return yt},yt.depthAtLocation=function(e){return e===R.EXTERIOR?0:e===R.INTERIOR?1:yt.NULL_VALUE},Xf.NULL_VALUE.get=function(){return-1},Object.defineProperties(yt,Xf);var Hu=function(n){function e(){if(n.call(this),this.pts=null,this._env=null,this.eiList=new Un(this),this._name=null,this._mce=null,this._isIsolated=!0,this._depth=new yt,this._depthDelta=0,arguments.length===1){var t=arguments[0];e.call(this,t,null)}else if(arguments.length===2){var r=arguments[0],i=arguments[1];this.pts=r,this._label=i}}return n&&(e.__proto__=n),e.prototype=Object.create(n&&n.prototype),e.prototype.constructor=e,e.prototype.getDepth=function(){return this._depth},e.prototype.getCollapsedEdge=function(){var r=new Array(2).fill(null);r[0]=this.pts[0],r[1]=this.pts[1];var i=new e(r,be.toLineLabel(this._label));return i},e.prototype.isIsolated=function(){return this._isIsolated},e.prototype.getCoordinates=function(){return this.pts},e.prototype.setIsolated=function(r){this._isIsolated=r},e.prototype.setName=function(r){this._name=r},e.prototype.equals=function(r){var i=this;if(!(r instanceof e))return!1;var s=r;if(this.pts.length!==s.pts.length)return!1;for(var o=!0,a=!0,l=this.pts.length,u=0;u<this.pts.length;u++)if(i.pts[u].equals2D(s.pts[u])||(o=!1),i.pts[u].equals2D(s.pts[--l])||(a=!1),!o&&!a)return!1;return!0},e.prototype.getCoordinate=function(){if(arguments.length===0)return this.pts.length>0?this.pts[0]:null;if(arguments.length===1){var r=arguments[0];return this.pts[r]}},e.prototype.print=function(r){var i=this;r.print("edge "+this._name+": "),r.print("LINESTRING (");for(var s=0;s<this.pts.length;s++)s>0&&r.print(","),r.print(i.pts[s].x+" "+i.pts[s].y);r.print(") "+this._label+" "+this._depthDelta)},e.prototype.computeIM=function(r){e.updateIM(this._label,r)},e.prototype.isCollapsed=function(){return!this._label.isArea()||this.pts.length!==3?!1:!!this.pts[0].equals(this.pts[2])},e.prototype.isClosed=function(){return this.pts[0].equals(this.pts[this.pts.length-1])},e.prototype.getMaximumSegmentIndex=function(){return this.pts.length-1},e.prototype.getDepthDelta=function(){return this._depthDelta},e.prototype.getNumPoints=function(){return this.pts.length},e.prototype.printReverse=function(r){var i=this;r.print("edge "+this._name+": ");for(var s=this.pts.length-1;s>=0;s--)r.print(i.pts[s]+" ");r.println("")},e.prototype.getMonotoneChainEdge=function(){return this._mce===null&&(this._mce=new gi(this)),this._mce},e.prototype.getEnvelope=function(){var r=this;if(this._env===null){this._env=new te;for(var i=0;i<this.pts.length;i++)r._env.expandToInclude(r.pts[i])}return this._env},e.prototype.addIntersection=function(r,i,s,o){var a=new M(r.getIntersection(o)),l=i,u=r.getEdgeDistance(s,o),h=l+1;if(h<this.pts.length){var f=this.pts[h];a.equals2D(f)&&(l=h,u=0)}this.eiList.add(a,l,u)},e.prototype.toString=function(){var r=this,i=new on;i.append("edge "+this._name+": "),i.append("LINESTRING (");for(var s=0;s<this.pts.length;s++)s>0&&i.append(","),i.append(r.pts[s].x+" "+r.pts[s].y);return i.append(") "+this._label+" "+this._depthDelta),i.toString()},e.prototype.isPointwiseEqual=function(r){var i=this;if(this.pts.length!==r.pts.length)return!1;for(var s=0;s<this.pts.length;s++)if(!i.pts[s].equals2D(r.pts[s]))return!1;return!0},e.prototype.setDepthDelta=function(r){this._depthDelta=r},e.prototype.getEdgeIntersectionList=function(){return this.eiList},e.prototype.addIntersections=function(r,i,s){for(var o=this,a=0;a<r.getIntersectionNum();a++)o.addIntersection(r,i,s,a)},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e.updateIM=function(){if(arguments.length===2){var r=arguments[0],i=arguments[1];i.setAtLeastIfValid(r.getLocation(0,G.ON),r.getLocation(1,G.ON),1),r.isArea()&&(i.setAtLeastIfValid(r.getLocation(0,G.LEFT),r.getLocation(1,G.LEFT),2),i.setAtLeastIfValid(r.getLocation(0,G.RIGHT),r.getLocation(1,G.RIGHT),2))}else return n.prototype.updateIM.apply(this,arguments)},e}(cr),At=function(e){this._workingPrecisionModel=null,this._workingNoder=null,this._geomFact=null,this._graph=null,this._edgeList=new Br,this._bufParams=e||null};At.prototype.setWorkingPrecisionModel=function(e){this._workingPrecisionModel=e},At.prototype.insertUniqueEdge=function(e){var t=this._edgeList.findEqualEdge(e);if(t!==null){var r=t.getLabel(),i=e.getLabel();t.isPointwiseEqual(e)||(i=new be(e.getLabel()),i.flip()),r.merge(i);var s=At.depthDelta(i),o=t.getDepthDelta(),a=o+s;t.setDepthDelta(a)}else this._edgeList.add(e),e.setDepthDelta(At.depthDelta(e.getLabel()))},At.prototype.buildSubgraphs=function(e,t){for(var r=new W,i=e.iterator();i.hasNext();){var s=i.next(),o=s.getRightmostCoordinate(),a=new ro(r),l=a.getDepth(o);s.computeDepth(l),s.findResultEdges(),r.add(s),t.add(s.getDirectedEdges(),s.getNodes())}},At.prototype.createSubgraphs=function(e){for(var t=new W,r=e.getNodes().iterator();r.hasNext();){var i=r.next();if(!i.isVisited()){var s=new xt;s.create(i),t.add(s)}}return Qr.sort(t,Qr.reverseOrder()),t},At.prototype.createEmptyResultGeometry=function(){var e=this._geomFact.createPolygon();return e},At.prototype.getNoder=function(e){if(this._workingNoder!==null)return this._workingNoder;var t=new Jc,r=new hs;return r.setPrecisionModel(e),t.setSegmentIntersector(new dr(r)),t},At.prototype.buffer=function(e,t){var r=this._workingPrecisionModel;r===null&&(r=e.getPrecisionModel()),this._geomFact=e.getFactory();var i=new qt(r,this._bufParams),s=new Nr(e,t,i),o=s.getCurves();if(o.size()<=0)return this.createEmptyResultGeometry();this.computeNodedEdges(o,r),this._graph=new Ye(new qf),this._graph.addEdges(this._edgeList.getEdges());var a=this.createSubgraphs(this._graph),l=new er(this._geomFact);this.buildSubgraphs(a,l);var u=l.getPolygons();if(u.size()<=0)return this.createEmptyResultGeometry();var h=this._geomFact.buildGeometry(u);return h},At.prototype.computeNodedEdges=function(e,t){var r=this,i=this.getNoder(t);i.computeNodes(e);for(var s=i.getNodedSubstrings(),o=s.iterator();o.hasNext();){var a=o.next(),l=a.getCoordinates();if(!(l.length===2&&l[0].equals2D(l[1]))){var u=a.getData(),h=new Hu(a.getCoordinates(),new be(u));r.insertUniqueEdge(h)}}},At.prototype.setNoder=function(e){this._workingNoder=e},At.prototype.interfaces_=function(){return[]},At.prototype.getClass=function(){return At},At.depthDelta=function(e){var t=e.getLocation(0,G.LEFT),r=e.getLocation(0,G.RIGHT);return t===R.INTERIOR&&r===R.EXTERIOR?1:t===R.EXTERIOR&&r===R.INTERIOR?-1:0},At.convertSegStrings=function(e){for(var t=new ge,r=new W;e.hasNext();){var i=e.next(),s=t.createLineString(i.getCoordinates());r.add(s)}return t.buildGeometry(r)};var zi=function(){if(this._noder=null,this._scaleFactor=null,this._offsetX=null,this._offsetY=null,this._isScaled=!1,arguments.length===2){var e=arguments[0],t=arguments[1];this._noder=e,this._scaleFactor=t,this._offsetX=0,this._offsetY=0,this._isScaled=!this.isIntegerPrecision()}else if(arguments.length===4){var r=arguments[0],i=arguments[1],s=arguments[2],o=arguments[3];this._noder=r,this._scaleFactor=i,this._offsetX=s,this._offsetY=o,this._isScaled=!this.isIntegerPrecision()}};zi.prototype.rescale=function(){var e=this;if(ae(arguments[0],nt))for(var t=arguments[0],r=t.iterator();r.hasNext();){var i=r.next();e.rescale(i.getCoordinates())}else if(arguments[0]instanceof Array){for(var s=arguments[0],o=0;o<s.length;o++)s[o].x=s[o].x/e._scaleFactor+e._offsetX,s[o].y=s[o].y/e._scaleFactor+e._offsetY;s.length===2&&s[0].equals2D(s[1])&&vt.out.println(s)}},zi.prototype.scale=function(){var e=this;if(ae(arguments[0],nt)){for(var t=arguments[0],r=new W,i=t.iterator();i.hasNext();){var s=i.next();r.add(new Be(e.scale(s.getCoordinates()),s.getData()))}return r}else if(arguments[0]instanceof Array){for(var o=arguments[0],a=new Array(o.length).fill(null),l=0;l<o.length;l++)a[l]=new M(Math.round((o[l].x-e._offsetX)*e._scaleFactor),Math.round((o[l].y-e._offsetY)*e._scaleFactor),o[l].z);var u=pe.removeRepeatedPoints(a);return u}},zi.prototype.isIntegerPrecision=function(){return this._scaleFactor===1},zi.prototype.getNodedSubstrings=function(){var e=this._noder.getNodedSubstrings();return this._isScaled&&this.rescale(e),e},zi.prototype.computeNodes=function(e){var t=e;this._isScaled&&(t=this.scale(e)),this._noder.computeNodes(t)},zi.prototype.interfaces_=function(){return[gs]},zi.prototype.getClass=function(){return zi};var _n=function(){this._li=new hs,this._segStrings=null;var e=arguments[0];this._segStrings=e},Hf={fact:{configurable:!0}};_n.prototype.checkEndPtVertexIntersections=function(){var e=this;if(arguments.length===0)for(var t=this._segStrings.iterator();t.hasNext();){var r=t.next(),i=r.getCoordinates();e.checkEndPtVertexIntersections(i[0],e._segStrings),e.checkEndPtVertexIntersections(i[i.length-1],e._segStrings)}else if(arguments.length===2){for(var s=arguments[0],o=arguments[1],a=o.iterator();a.hasNext();)for(var l=a.next(),u=l.getCoordinates(),h=1;h<u.length-1;h++)if(u[h].equals(s))throw new oi("found endpt/interior pt intersection at index "+h+" :pt "+s)}},_n.prototype.checkInteriorIntersections=function(){var e=this;if(arguments.length===0)for(var t=this._segStrings.iterator();t.hasNext();)for(var r=t.next(),i=this._segStrings.iterator();i.hasNext();){var s=i.next();e.checkInteriorIntersections(r,s)}else if(arguments.length===2)for(var o=arguments[0],a=arguments[1],l=o.getCoordinates(),u=a.getCoordinates(),h=0;h<l.length-1;h++)for(var f=0;f<u.length-1;f++)e.checkInteriorIntersections(o,h,a,f);else if(arguments.length===4){var p=arguments[0],v=arguments[1],w=arguments[2],I=arguments[3];if(p===w&&v===I)return null;var T=p.getCoordinates()[v],L=p.getCoordinates()[v+1],m=w.getCoordinates()[I],_=w.getCoordinates()[I+1];if(this._li.computeIntersection(T,L,m,_),this._li.hasIntersection()&&(this._li.isProper()||this.hasInteriorIntersection(this._li,T,L)||this.hasInteriorIntersection(this._li,m,_)))throw new oi("found non-noded intersection at "+T+"-"+L+" and "+m+"-"+_)}},_n.prototype.checkValid=function(){this.checkEndPtVertexIntersections(),this.checkInteriorIntersections(),this.checkCollapses()},_n.prototype.checkCollapses=function(){var e=this;if(arguments.length===0)for(var t=this._segStrings.iterator();t.hasNext();){var r=t.next();e.checkCollapses(r)}else if(arguments.length===1)for(var i=arguments[0],s=i.getCoordinates(),o=0;o<s.length-2;o++)e.checkCollapse(s[o],s[o+1],s[o+2])},_n.prototype.hasInteriorIntersection=function(e,t,r){for(var i=0;i<e.getIntersectionNum();i++){var s=e.getIntersection(i);if(!(s.equals(t)||s.equals(r)))return!0}return!1},_n.prototype.checkCollapse=function(e,t,r){if(e.equals(r))throw new oi("found non-noded collapse at "+_n.fact.createLineString([e,t,r]))},_n.prototype.interfaces_=function(){return[]},_n.prototype.getClass=function(){return _n},Hf.fact.get=function(){return new ge},Object.defineProperties(_n,Hf);var Xt=function(){this._li=null,this._pt=null,this._originalPt=null,this._ptScaled=null,this._p0Scaled=null,this._p1Scaled=null,this._scaleFactor=null,this._minx=null,this._maxx=null,this._miny=null,this._maxy=null,this._corner=new Array(4).fill(null),this._safeEnv=null;var e=arguments[0],t=arguments[1],r=arguments[2];if(this._originalPt=e,this._pt=e,this._scaleFactor=t,this._li=r,t<=0)throw new Ue("Scale factor must be non-zero");t!==1&&(this._pt=new M(this.scale(e.x),this.scale(e.y)),this._p0Scaled=new M,this._p1Scaled=new M),this.initCorners(this._pt)},Yf={SAFE_ENV_EXPANSION_FACTOR:{configurable:!0}};Xt.prototype.intersectsScaled=function(e,t){var r=Math.min(e.x,t.x),i=Math.max(e.x,t.x),s=Math.min(e.y,t.y),o=Math.max(e.y,t.y),a=this._maxx<r||this._minx>i||this._maxy<s||this._miny>o;if(a)return!1;var l=this.intersectsToleranceSquare(e,t);return fe.isTrue(!(a&&l),"Found bad envelope test"),l},Xt.prototype.initCorners=function(e){var t=.5;this._minx=e.x-t,this._maxx=e.x+t,this._miny=e.y-t,this._maxy=e.y+t,this._corner[0]=new M(this._maxx,this._maxy),this._corner[1]=new M(this._minx,this._maxy),this._corner[2]=new M(this._minx,this._miny),this._corner[3]=new M(this._maxx,this._miny)},Xt.prototype.intersects=function(e,t){return this._scaleFactor===1?this.intersectsScaled(e,t):(this.copyScaled(e,this._p0Scaled),this.copyScaled(t,this._p1Scaled),this.intersectsScaled(this._p0Scaled,this._p1Scaled))},Xt.prototype.scale=function(e){return Math.round(e*this._scaleFactor)},Xt.prototype.getCoordinate=function(){return this._originalPt},Xt.prototype.copyScaled=function(e,t){t.x=this.scale(e.x),t.y=this.scale(e.y)},Xt.prototype.getSafeEnvelope=function(){if(this._safeEnv===null){var e=Xt.SAFE_ENV_EXPANSION_FACTOR/this._scaleFactor;this._safeEnv=new te(this._originalPt.x-e,this._originalPt.x+e,this._originalPt.y-e,this._originalPt.y+e)}return this._safeEnv},Xt.prototype.intersectsPixelClosure=function(e,t){return this._li.computeIntersection(e,t,this._corner[0],this._corner[1]),!!(this._li.hasIntersection()||(this._li.computeIntersection(e,t,this._corner[1],this._corner[2]),this._li.hasIntersection())||(this._li.computeIntersection(e,t,this._corner[2],this._corner[3]),this._li.hasIntersection())||(this._li.computeIntersection(e,t,this._corner[3],this._corner[0]),this._li.hasIntersection()))},Xt.prototype.intersectsToleranceSquare=function(e,t){var r=!1,i=!1;return this._li.computeIntersection(e,t,this._corner[0],this._corner[1]),!!(this._li.isProper()||(this._li.computeIntersection(e,t,this._corner[1],this._corner[2]),this._li.isProper())||(this._li.hasIntersection()&&(r=!0),this._li.computeIntersection(e,t,this._corner[2],this._corner[3]),this._li.isProper())||(this._li.hasIntersection()&&(i=!0),this._li.computeIntersection(e,t,this._corner[3],this._corner[0]),this._li.isProper())||r&&i||e.equals(this._pt)||t.equals(this._pt))},Xt.prototype.addSnappedNode=function(e,t){var r=e.getCoordinate(t),i=e.getCoordinate(t+1);return this.intersects(r,i)?(e.addIntersection(this.getCoordinate(),t),!0):!1},Xt.prototype.interfaces_=function(){return[]},Xt.prototype.getClass=function(){return Xt},Yf.SAFE_ENV_EXPANSION_FACTOR.get=function(){return .75},Object.defineProperties(Xt,Yf);var su=function(){this.tempEnv1=new te,this.selectedSegment=new re};su.prototype.select=function(){if(arguments.length!==1){if(arguments.length===2){var e=arguments[0],t=arguments[1];e.getLineSegment(t,this.selectedSegment),this.select(this.selectedSegment)}}},su.prototype.interfaces_=function(){return[]},su.prototype.getClass=function(){return su};var _l=function(){this._index=null;var e=arguments[0];this._index=e},Jf={HotPixelSnapAction:{configurable:!0}};_l.prototype.snap=function(){if(arguments.length===1){var e=arguments[0];return this.snap(e,null,-1)}else if(arguments.length===3){var t=arguments[0],r=arguments[1],i=arguments[2],s=t.getSafeEnvelope(),o=new Zf(t,r,i);return this._index.query(s,{interfaces_:function(){return[Fi]},visitItem:function(a){var l=a;l.select(s,o)}}),o.isNodeAdded()}},_l.prototype.interfaces_=function(){return[]},_l.prototype.getClass=function(){return _l},Jf.HotPixelSnapAction.get=function(){return Zf},Object.defineProperties(_l,Jf);var Zf=function(n){function e(){n.call(this),this._hotPixel=null,this._parentEdge=null,this._hotPixelVertexIndex=null,this._isNodeAdded=!1;var t=arguments[0],r=arguments[1],i=arguments[2];this._hotPixel=t,this._parentEdge=r,this._hotPixelVertexIndex=i}return n&&(e.__proto__=n),e.prototype=Object.create(n&&n.prototype),e.prototype.constructor=e,e.prototype.isNodeAdded=function(){return this._isNodeAdded},e.prototype.select=function(){if(arguments.length===2){var r=arguments[0],i=arguments[1],s=r.getContext();if(this._parentEdge!==null&&s===this._parentEdge&&i===this._hotPixelVertexIndex)return null;this._isNodeAdded=this._hotPixel.addSnappedNode(s,i)}else return n.prototype.select.apply(this,arguments)},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e}(su),no=function(){this._li=null,this._interiorIntersections=null;var e=arguments[0];this._li=e,this._interiorIntersections=new W};no.prototype.processIntersections=function(e,t,r,i){var s=this;if(e===r&&t===i)return null;var o=e.getCoordinates()[t],a=e.getCoordinates()[t+1],l=r.getCoordinates()[i],u=r.getCoordinates()[i+1];if(this._li.computeIntersection(o,a,l,u),this._li.hasIntersection()&&this._li.isInteriorIntersection()){for(var h=0;h<this._li.getIntersectionNum();h++)s._interiorIntersections.add(s._li.getIntersection(h));e.addIntersections(this._li,t,0),r.addIntersections(this._li,i,1)}},no.prototype.isDone=function(){return!1},no.prototype.getInteriorIntersections=function(){return this._interiorIntersections},no.prototype.interfaces_=function(){return[vs]},no.prototype.getClass=function(){return no};var Gn=function(){this._pm=null,this._li=null,this._scaleFactor=null,this._noder=null,this._pointSnapper=null,this._nodedSegStrings=null;var e=arguments[0];this._pm=e,this._li=new hs,this._li.setPrecisionModel(e),this._scaleFactor=e.getScale()};Gn.prototype.checkCorrectness=function(e){var t=Be.getNodedSubstrings(e),r=new _n(t);try{r.checkValid()}catch(i){if(i instanceof Df)i.printStackTrace();else throw i}finally{}},Gn.prototype.getNodedSubstrings=function(){return Be.getNodedSubstrings(this._nodedSegStrings)},Gn.prototype.snapRound=function(e,t){var r=this.findInteriorIntersections(e,t);this.computeIntersectionSnaps(r),this.computeVertexSnaps(e)},Gn.prototype.findInteriorIntersections=function(e,t){var r=new no(t);return this._noder.setSegmentIntersector(r),this._noder.computeNodes(e),r.getInteriorIntersections()},Gn.prototype.computeVertexSnaps=function(){var e=this;if(ae(arguments[0],nt))for(var t=arguments[0],r=t.iterator();r.hasNext();){var i=r.next();e.computeVertexSnaps(i)}else if(arguments[0]instanceof Be)for(var s=arguments[0],o=s.getCoordinates(),a=0;a<o.length;a++){var l=new Xt(o[a],e._scaleFactor,e._li),u=e._pointSnapper.snap(l,s,a);u&&s.addIntersection(o[a],a)}},Gn.prototype.computeNodes=function(e){this._nodedSegStrings=e,this._noder=new Jc,this._pointSnapper=new _l(this._noder.getIndex()),this.snapRound(e,this._li)},Gn.prototype.computeIntersectionSnaps=function(e){for(var t=this,r=e.iterator();r.hasNext();){var i=r.next(),s=new Xt(i,t._scaleFactor,t._li);t._pointSnapper.snap(s)}},Gn.prototype.interfaces_=function(){return[gs]},Gn.prototype.getClass=function(){return Gn};var _t=function(){if(this._argGeom=null,this._distance=null,this._bufParams=new De,this._resultGeometry=null,this._saveException=null,arguments.length===1){var e=arguments[0];this._argGeom=e}else if(arguments.length===2){var t=arguments[0],r=arguments[1];this._argGeom=t,this._bufParams=r}},wl={CAP_ROUND:{configurable:!0},CAP_BUTT:{configurable:!0},CAP_FLAT:{configurable:!0},CAP_SQUARE:{configurable:!0},MAX_PRECISION_DIGITS:{configurable:!0}};_t.prototype.bufferFixedPrecision=function(e){var t=new zi(new Gn(new Te(1)),e.getScale()),r=new At(this._bufParams);r.setWorkingPrecisionModel(e),r.setNoder(t),this._resultGeometry=r.buffer(this._argGeom,this._distance)},_t.prototype.bufferReducedPrecision=function(){var e=this;if(arguments.length===0){for(var t=_t.MAX_PRECISION_DIGITS;t>=0;t--){try{e.bufferReducedPrecision(t)}catch(o){if(o instanceof fi)e._saveException=o;else throw o}finally{}if(e._resultGeometry!==null)return null}throw this._saveException}else if(arguments.length===1){var r=arguments[0],i=_t.precisionScaleFactor(this._argGeom,this._distance,r),s=new Te(i);this.bufferFixedPrecision(s)}},_t.prototype.computeGeometry=function(){if(this.bufferOriginalPrecision(),this._resultGeometry!==null)return null;var e=this._argGeom.getFactory().getPrecisionModel();e.getType()===Te.FIXED?this.bufferFixedPrecision(e):this.bufferReducedPrecision()},_t.prototype.setQuadrantSegments=function(e){this._bufParams.setQuadrantSegments(e)},_t.prototype.bufferOriginalPrecision=function(){try{var e=new At(this._bufParams);this._resultGeometry=e.buffer(this._argGeom,this._distance)}catch(t){if(t instanceof oi)this._saveException=t;else throw t}finally{}},_t.prototype.getResultGeometry=function(e){return this._distance=e,this.computeGeometry(),this._resultGeometry},_t.prototype.setEndCapStyle=function(e){this._bufParams.setEndCapStyle(e)},_t.prototype.interfaces_=function(){return[]},_t.prototype.getClass=function(){return _t},_t.bufferOp=function(){if(arguments.length===2){var e=arguments[0],t=arguments[1],r=new _t(e),i=r.getResultGeometry(t);return i}else if(arguments.length===3){if(Number.isInteger(arguments[2])&&arguments[0]instanceof oe&&typeof arguments[1]=="number"){var s=arguments[0],o=arguments[1],a=arguments[2],l=new _t(s);l.setQuadrantSegments(a);var u=l.getResultGeometry(o);return u}else if(arguments[2]instanceof De&&arguments[0]instanceof oe&&typeof arguments[1]=="number"){var h=arguments[0],f=arguments[1],p=arguments[2],v=new _t(h,p),w=v.getResultGeometry(f);return w}}else if(arguments.length===4){var I=arguments[0],T=arguments[1],L=arguments[2],m=arguments[3],_=new _t(I);_.setQuadrantSegments(L),_.setEndCapStyle(m);var g=_.getResultGeometry(T);return g}},_t.precisionScaleFactor=function(e,t,r){var i=e.getEnvelopeInternal(),s=ur.max(Math.abs(i.getMaxX()),Math.abs(i.getMaxY()),Math.abs(i.getMinX()),Math.abs(i.getMinY())),o=t>0?t:0,a=s+2*o,l=Math.trunc(Math.log(a)/Math.log(10)+1),u=r-l,h=Math.pow(10,u);return h},wl.CAP_ROUND.get=function(){return De.CAP_ROUND},wl.CAP_BUTT.get=function(){return De.CAP_FLAT},wl.CAP_FLAT.get=function(){return De.CAP_FLAT},wl.CAP_SQUARE.get=function(){return De.CAP_SQUARE},wl.MAX_PRECISION_DIGITS.get=function(){return 12},Object.defineProperties(_t,wl);var Rt=function(){this._pt=[new M,new M],this._distance=ue.NaN,this._isNull=!0};Rt.prototype.getCoordinates=function(){return this._pt},Rt.prototype.getCoordinate=function(e){return this._pt[e]},Rt.prototype.setMinimum=function(){if(arguments.length===1){var e=arguments[0];this.setMinimum(e._pt[0],e._pt[1])}else if(arguments.length===2){var t=arguments[0],r=arguments[1];if(this._isNull)return this.initialize(t,r),null;var i=t.distance(r);i<this._distance&&this.initialize(t,r,i)}},Rt.prototype.initialize=function(){if(arguments.length===0)this._isNull=!0;else if(arguments.length===2){var e=arguments[0],t=arguments[1];this._pt[0].setCoordinate(e),this._pt[1].setCoordinate(t),this._distance=e.distance(t),this._isNull=!1}else if(arguments.length===3){var r=arguments[0],i=arguments[1],s=arguments[2];this._pt[0].setCoordinate(r),this._pt[1].setCoordinate(i),this._distance=s,this._isNull=!1}},Rt.prototype.getDistance=function(){return this._distance},Rt.prototype.setMaximum=function(){if(arguments.length===1){var e=arguments[0];this.setMaximum(e._pt[0],e._pt[1])}else if(arguments.length===2){var t=arguments[0],r=arguments[1];if(this._isNull)return this.initialize(t,r),null;var i=t.distance(r);i>this._distance&&this.initialize(t,r,i)}},Rt.prototype.interfaces_=function(){return[]},Rt.prototype.getClass=function(){return Rt};var Wn=function(){};Wn.prototype.interfaces_=function(){return[]},Wn.prototype.getClass=function(){return Wn},Wn.computeDistance=function(){if(arguments[2]instanceof Rt&&arguments[0]instanceof Je&&arguments[1]instanceof M)for(var e=arguments[0],t=arguments[1],r=arguments[2],i=e.getCoordinates(),s=new re,o=0;o<i.length-1;o++){s.setCoordinates(i[o],i[o+1]);var a=s.closestPoint(t);r.setMinimum(a,t)}else if(arguments[2]instanceof Rt&&arguments[0]instanceof it&&arguments[1]instanceof M){var l=arguments[0],u=arguments[1],h=arguments[2];Wn.computeDistance(l.getExteriorRing(),u,h);for(var f=0;f<l.getNumInteriorRing();f++)Wn.computeDistance(l.getInteriorRingN(f),u,h)}else if(arguments[2]instanceof Rt&&arguments[0]instanceof oe&&arguments[1]instanceof M){var p=arguments[0],v=arguments[1],w=arguments[2];if(p instanceof Je)Wn.computeDistance(p,v,w);else if(p instanceof it)Wn.computeDistance(p,v,w);else if(p instanceof Mt)for(var I=p,T=0;T<I.getNumGeometries();T++){var L=I.getGeometryN(T);Wn.computeDistance(L,v,w)}else w.setMinimum(p.getCoordinate(),v)}else if(arguments[2]instanceof Rt&&arguments[0]instanceof re&&arguments[1]instanceof M){var m=arguments[0],_=arguments[1],g=arguments[2],y=m.closestPoint(_);g.setMinimum(y,_)}};var _s=function(e){this._maxPtDist=new Rt,this._inputGeom=e||null},Zc={MaxPointDistanceFilter:{configurable:!0},MaxMidpointDistanceFilter:{configurable:!0}};_s.prototype.computeMaxMidpointDistance=function(e){var t=new Ui(this._inputGeom);e.apply(t),this._maxPtDist.setMaximum(t.getMaxPointDistance())},_s.prototype.computeMaxVertexDistance=function(e){var t=new io(this._inputGeom);e.apply(t),this._maxPtDist.setMaximum(t.getMaxPointDistance())},_s.prototype.findDistance=function(e){return this.computeMaxVertexDistance(e),this.computeMaxMidpointDistance(e),this._maxPtDist.getDistance()},_s.prototype.getDistancePoints=function(){return this._maxPtDist},_s.prototype.interfaces_=function(){return[]},_s.prototype.getClass=function(){return _s},Zc.MaxPointDistanceFilter.get=function(){return io},Zc.MaxMidpointDistanceFilter.get=function(){return Ui},Object.defineProperties(_s,Zc);var io=function(e){this._maxPtDist=new Rt,this._minPtDist=new Rt,this._geom=e||null};io.prototype.filter=function(e){this._minPtDist.initialize(),Wn.computeDistance(this._geom,e,this._minPtDist),this._maxPtDist.setMaximum(this._minPtDist)},io.prototype.getMaxPointDistance=function(){return this._maxPtDist},io.prototype.interfaces_=function(){return[An]},io.prototype.getClass=function(){return io};var Ui=function(e){this._maxPtDist=new Rt,this._minPtDist=new Rt,this._geom=e||null};Ui.prototype.filter=function(e,t){if(t===0)return null;var r=e.getCoordinate(t-1),i=e.getCoordinate(t),s=new M((r.x+i.x)/2,(r.y+i.y)/2);this._minPtDist.initialize(),Wn.computeDistance(this._geom,s,this._minPtDist),this._maxPtDist.setMaximum(this._minPtDist)},Ui.prototype.isDone=function(){return!1},Ui.prototype.isGeometryChanged=function(){return!1},Ui.prototype.getMaxPointDistance=function(){return this._maxPtDist},Ui.prototype.interfaces_=function(){return[Zr]},Ui.prototype.getClass=function(){return Ui};var mi=function(e){this._comps=e||null};mi.prototype.filter=function(e){e instanceof it&&this._comps.add(e)},mi.prototype.interfaces_=function(){return[hn]},mi.prototype.getClass=function(){return mi},mi.getPolygons=function(){if(arguments.length===1){var e=arguments[0];return mi.getPolygons(e,new W)}else if(arguments.length===2){var t=arguments[0],r=arguments[1];return t instanceof it?r.add(t):t instanceof Mt&&t.apply(new mi(r)),r}};var wt=function(){if(this._lines=null,this._isForcedToLineString=!1,arguments.length===1){var e=arguments[0];this._lines=e}else if(arguments.length===2){var t=arguments[0],r=arguments[1];this._lines=t,this._isForcedToLineString=r}};wt.prototype.filter=function(e){if(this._isForcedToLineString&&e instanceof Rn){var t=e.getFactory().createLineString(e.getCoordinateSequence());return this._lines.add(t),null}e instanceof Je&&this._lines.add(e)},wt.prototype.setForceToLineString=function(e){this._isForcedToLineString=e},wt.prototype.interfaces_=function(){return[ai]},wt.prototype.getClass=function(){return wt},wt.getGeometry=function(){if(arguments.length===1){var e=arguments[0];return e.getFactory().buildGeometry(wt.getLines(e))}else if(arguments.length===2){var t=arguments[0],r=arguments[1];return t.getFactory().buildGeometry(wt.getLines(t,r))}},wt.getLines=function(){if(arguments.length===1){var e=arguments[0];return wt.getLines(e,!1)}else if(arguments.length===2){if(ae(arguments[0],nt)&&ae(arguments[1],nt)){for(var t=arguments[0],r=arguments[1],i=t.iterator();i.hasNext();){var s=i.next();wt.getLines(s,r)}return r}else if(arguments[0]instanceof oe&&typeof arguments[1]=="boolean"){var o=arguments[0],a=arguments[1],l=new W;return o.apply(new wt(l,a)),l}else if(arguments[0]instanceof oe&&ae(arguments[1],nt)){var u=arguments[0],h=arguments[1];return u instanceof Je?h.add(u):u.apply(new wt(h)),h}}else if(arguments.length===3){if(typeof arguments[2]=="boolean"&&ae(arguments[0],nt)&&ae(arguments[1],nt)){for(var f=arguments[0],p=arguments[1],v=arguments[2],w=f.iterator();w.hasNext();){var I=w.next();wt.getLines(I,p,v)}return p}else if(typeof arguments[2]=="boolean"&&arguments[0]instanceof oe&&ae(arguments[1],nt)){var T=arguments[0],L=arguments[1],m=arguments[2];return T.apply(new wt(L,m)),L}}};var $r=function(){if(this._boundaryRule=Pr.OGC_SFS_BOUNDARY_RULE,this._isIn=null,this._numBoundaries=null,arguments.length!==0){if(arguments.length===1){var e=arguments[0];if(e===null)throw new Ue("Rule must be non-null");this._boundaryRule=e}}};$r.prototype.locateInternal=function(){var e=this;if(arguments[0]instanceof M&&arguments[1]instanceof it){var t=arguments[0],r=arguments[1];if(r.isEmpty())return R.EXTERIOR;var i=r.getExteriorRing(),s=this.locateInPolygonRing(t,i);if(s===R.EXTERIOR)return R.EXTERIOR;if(s===R.BOUNDARY)return R.BOUNDARY;for(var o=0;o<r.getNumInteriorRing();o++){var a=r.getInteriorRingN(o),l=e.locateInPolygonRing(t,a);if(l===R.INTERIOR)return R.EXTERIOR;if(l===R.BOUNDARY)return R.BOUNDARY}return R.INTERIOR}else if(arguments[0]instanceof M&&arguments[1]instanceof Je){var u=arguments[0],h=arguments[1];if(!h.getEnvelopeInternal().intersects(u))return R.EXTERIOR;var f=h.getCoordinates();return!h.isClosed()&&(u.equals(f[0])||u.equals(f[f.length-1]))?R.BOUNDARY:Y.isOnLine(u,f)?R.INTERIOR:R.EXTERIOR}else if(arguments[0]instanceof M&&arguments[1]instanceof jt){var p=arguments[0],v=arguments[1],w=v.getCoordinate();return w.equals2D(p)?R.INTERIOR:R.EXTERIOR}},$r.prototype.locateInPolygonRing=function(e,t){return t.getEnvelopeInternal().intersects(e)?Y.locatePointInRing(e,t.getCoordinates()):R.EXTERIOR},$r.prototype.intersects=function(e,t){return this.locate(e,t)!==R.EXTERIOR},$r.prototype.updateLocationInfo=function(e){e===R.INTERIOR&&(this._isIn=!0),e===R.BOUNDARY&&this._numBoundaries++},$r.prototype.computeLocation=function(e,t){var r=this;if(t instanceof jt&&this.updateLocationInfo(this.locateInternal(e,t)),t instanceof Je)this.updateLocationInfo(this.locateInternal(e,t));else if(t instanceof it)this.updateLocationInfo(this.locateInternal(e,t));else if(t instanceof ps)for(var i=t,s=0;s<i.getNumGeometries();s++){var o=i.getGeometryN(s);r.updateLocationInfo(r.locateInternal(e,o))}else if(t instanceof Fn)for(var a=t,l=0;l<a.getNumGeometries();l++){var u=a.getGeometryN(l);r.updateLocationInfo(r.locateInternal(e,u))}else if(t instanceof Mt)for(var h=new zn(t);h.hasNext();){var f=h.next();f!==t&&r.computeLocation(e,f)}},$r.prototype.locate=function(e,t){return t.isEmpty()?R.EXTERIOR:t instanceof Je?this.locateInternal(e,t):t instanceof it?this.locateInternal(e,t):(this._isIn=!1,this._numBoundaries=0,this.computeLocation(e,t),this._boundaryRule.isInBoundary(this._numBoundaries)?R.BOUNDARY:this._numBoundaries>0||this._isIn?R.INTERIOR:R.EXTERIOR)},$r.prototype.interfaces_=function(){return[]},$r.prototype.getClass=function(){return $r};var Ft=function n(){if(this._component=null,this._segIndex=null,this._pt=null,arguments.length===2){var e=arguments[0],t=arguments[1];n.call(this,e,n.INSIDE_AREA,t)}else if(arguments.length===3){var r=arguments[0],i=arguments[1],s=arguments[2];this._component=r,this._segIndex=i,this._pt=s}},Kf={INSIDE_AREA:{configurable:!0}};Ft.prototype.isInsideArea=function(){return this._segIndex===Ft.INSIDE_AREA},Ft.prototype.getCoordinate=function(){return this._pt},Ft.prototype.getGeometryComponent=function(){return this._component},Ft.prototype.getSegmentIndex=function(){return this._segIndex},Ft.prototype.interfaces_=function(){return[]},Ft.prototype.getClass=function(){return Ft},Kf.INSIDE_AREA.get=function(){return-1},Object.defineProperties(Ft,Kf);var Gi=function(e){this._pts=e||null};Gi.prototype.filter=function(e){e instanceof jt&&this._pts.add(e)},Gi.prototype.interfaces_=function(){return[hn]},Gi.prototype.getClass=function(){return Gi},Gi.getPoints=function(){if(arguments.length===1){var e=arguments[0];return e instanceof jt?Qr.singletonList(e):Gi.getPoints(e,new W)}else if(arguments.length===2){var t=arguments[0],r=arguments[1];return t instanceof jt?r.add(t):t instanceof Mt&&t.apply(new Gi(r)),r}};var so=function(){this._locations=null;var e=arguments[0];this._locations=e};so.prototype.filter=function(e){(e instanceof jt||e instanceof Je||e instanceof it)&&this._locations.add(new Ft(e,0,e.getCoordinate()))},so.prototype.interfaces_=function(){return[hn]},so.prototype.getClass=function(){return so},so.getLocations=function(e){var t=new W;return e.apply(new so(t)),t};var Et=function(){if(this._geom=null,this._terminateDistance=0,this._ptLocator=new $r,this._minDistanceLocation=null,this._minDistance=ue.MAX_VALUE,arguments.length===2){var e=arguments[0],t=arguments[1];this._geom=[e,t],this._terminateDistance=0}else if(arguments.length===3){var r=arguments[0],i=arguments[1],s=arguments[2];this._geom=new Array(2).fill(null),this._geom[0]=r,this._geom[1]=i,this._terminateDistance=s}};Et.prototype.computeContainmentDistance=function(){var e=this;if(arguments.length===0){var t=new Array(2).fill(null);if(this.computeContainmentDistance(0,t),this._minDistance<=this._terminateDistance)return null;this.computeContainmentDistance(1,t)}else if(arguments.length===2){var r=arguments[0],i=arguments[1],s=1-r,o=mi.getPolygons(this._geom[r]);if(o.size()>0){var a=so.getLocations(this._geom[s]);if(this.computeContainmentDistance(a,o,i),this._minDistance<=this._terminateDistance)return this._minDistanceLocation[s]=i[0],this._minDistanceLocation[r]=i[1],null}}else if(arguments.length===3){if(arguments[2]instanceof Array&&ae(arguments[0],Yr)&&ae(arguments[1],Yr)){for(var l=arguments[0],u=arguments[1],h=arguments[2],f=0;f<l.size();f++)for(var p=l.get(f),v=0;v<u.size();v++)if(e.computeContainmentDistance(p,u.get(v),h),e._minDistance<=e._terminateDistance)return null}else if(arguments[2]instanceof Array&&arguments[0]instanceof Ft&&arguments[1]instanceof it){var w=arguments[0],I=arguments[1],T=arguments[2],L=w.getCoordinate();if(R.EXTERIOR!==this._ptLocator.locate(L,I))return this._minDistance=0,T[0]=w,T[1]=new Ft(I,L),null}}},Et.prototype.computeMinDistanceLinesPoints=function(e,t,r){for(var i=this,s=0;s<e.size();s++)for(var o=e.get(s),a=0;a<t.size();a++){var l=t.get(a);if(i.computeMinDistance(o,l,r),i._minDistance<=i._terminateDistance)return null}},Et.prototype.computeFacetDistance=function(){var e=new Array(2).fill(null),t=wt.getLines(this._geom[0]),r=wt.getLines(this._geom[1]),i=Gi.getPoints(this._geom[0]),s=Gi.getPoints(this._geom[1]);if(this.computeMinDistanceLines(t,r,e),this.updateMinDistance(e,!1),this._minDistance<=this._terminateDistance||(e[0]=null,e[1]=null,this.computeMinDistanceLinesPoints(t,s,e),this.updateMinDistance(e,!1),this._minDistance<=this._terminateDistance)||(e[0]=null,e[1]=null,this.computeMinDistanceLinesPoints(r,i,e),this.updateMinDistance(e,!0),this._minDistance<=this._terminateDistance))return null;e[0]=null,e[1]=null,this.computeMinDistancePoints(i,s,e),this.updateMinDistance(e,!1)},Et.prototype.nearestLocations=function(){return this.computeMinDistance(),this._minDistanceLocation},Et.prototype.updateMinDistance=function(e,t){if(e[0]===null)return null;t?(this._minDistanceLocation[0]=e[1],this._minDistanceLocation[1]=e[0]):(this._minDistanceLocation[0]=e[0],this._minDistanceLocation[1]=e[1])},Et.prototype.nearestPoints=function(){this.computeMinDistance();var e=[this._minDistanceLocation[0].getCoordinate(),this._minDistanceLocation[1].getCoordinate()];return e},Et.prototype.computeMinDistance=function(){var e=this;if(arguments.length===0){if(this._minDistanceLocation!==null||(this._minDistanceLocation=new Array(2).fill(null),this.computeContainmentDistance(),this._minDistance<=this._terminateDistance))return null;this.computeFacetDistance()}else if(arguments.length===3){if(arguments[2]instanceof Array&&arguments[0]instanceof Je&&arguments[1]instanceof jt){var t=arguments[0],r=arguments[1],i=arguments[2];if(t.getEnvelopeInternal().distance(r.getEnvelopeInternal())>this._minDistance)return null;for(var s=t.getCoordinates(),o=r.getCoordinate(),a=0;a<s.length-1;a++){var l=Y.distancePointLine(o,s[a],s[a+1]);if(l<e._minDistance){e._minDistance=l;var u=new re(s[a],s[a+1]),h=u.closestPoint(o);i[0]=new Ft(t,a,h),i[1]=new Ft(r,0,o)}if(e._minDistance<=e._terminateDistance)return null}}else if(arguments[2]instanceof Array&&arguments[0]instanceof Je&&arguments[1]instanceof Je){var f=arguments[0],p=arguments[1],v=arguments[2];if(f.getEnvelopeInternal().distance(p.getEnvelopeInternal())>this._minDistance)return null;for(var w=f.getCoordinates(),I=p.getCoordinates(),T=0;T<w.length-1;T++)for(var L=0;L<I.length-1;L++){var m=Y.distanceLineLine(w[T],w[T+1],I[L],I[L+1]);if(m<e._minDistance){e._minDistance=m;var _=new re(w[T],w[T+1]),g=new re(I[L],I[L+1]),y=_.closestPoints(g);v[0]=new Ft(f,T,y[0]),v[1]=new Ft(p,L,y[1])}if(e._minDistance<=e._terminateDistance)return null}}}},Et.prototype.computeMinDistancePoints=function(e,t,r){for(var i=this,s=0;s<e.size();s++)for(var o=e.get(s),a=0;a<t.size();a++){var l=t.get(a),u=o.getCoordinate().distance(l.getCoordinate());if(u<i._minDistance&&(i._minDistance=u,r[0]=new Ft(o,0,o.getCoordinate()),r[1]=new Ft(l,0,l.getCoordinate())),i._minDistance<=i._terminateDistance)return null}},Et.prototype.distance=function(){if(this._geom[0]===null||this._geom[1]===null)throw new Ue("null geometries are not supported");return this._geom[0].isEmpty()||this._geom[1].isEmpty()?0:(this.computeMinDistance(),this._minDistance)},Et.prototype.computeMinDistanceLines=function(e,t,r){for(var i=this,s=0;s<e.size();s++)for(var o=e.get(s),a=0;a<t.size();a++){var l=t.get(a);if(i.computeMinDistance(o,l,r),i._minDistance<=i._terminateDistance)return null}},Et.prototype.interfaces_=function(){return[]},Et.prototype.getClass=function(){return Et},Et.distance=function(e,t){var r=new Et(e,t);return r.distance()},Et.isWithinDistance=function(e,t,r){var i=new Et(e,t,r);return i.distance()<=r},Et.nearestPoints=function(e,t){var r=new Et(e,t);return r.nearestPoints()};var bt=function(){this._pt=[new M,new M],this._distance=ue.NaN,this._isNull=!0};bt.prototype.getCoordinates=function(){return this._pt},bt.prototype.getCoordinate=function(e){return this._pt[e]},bt.prototype.setMinimum=function(){if(arguments.length===1){var e=arguments[0];this.setMinimum(e._pt[0],e._pt[1])}else if(arguments.length===2){var t=arguments[0],r=arguments[1];if(this._isNull)return this.initialize(t,r),null;var i=t.distance(r);i<this._distance&&this.initialize(t,r,i)}},bt.prototype.initialize=function(){if(arguments.length===0)this._isNull=!0;else if(arguments.length===2){var e=arguments[0],t=arguments[1];this._pt[0].setCoordinate(e),this._pt[1].setCoordinate(t),this._distance=e.distance(t),this._isNull=!1}else if(arguments.length===3){var r=arguments[0],i=arguments[1],s=arguments[2];this._pt[0].setCoordinate(r),this._pt[1].setCoordinate(i),this._distance=s,this._isNull=!1}},bt.prototype.toString=function(){return Hr.toLineString(this._pt[0],this._pt[1])},bt.prototype.getDistance=function(){return this._distance},bt.prototype.setMaximum=function(){if(arguments.length===1){var e=arguments[0];this.setMaximum(e._pt[0],e._pt[1])}else if(arguments.length===2){var t=arguments[0],r=arguments[1];if(this._isNull)return this.initialize(t,r),null;var i=t.distance(r);i>this._distance&&this.initialize(t,r,i)}},bt.prototype.interfaces_=function(){return[]},bt.prototype.getClass=function(){return bt};var wn=function(){};wn.prototype.interfaces_=function(){return[]},wn.prototype.getClass=function(){return wn},wn.computeDistance=function(){if(arguments[2]instanceof bt&&arguments[0]instanceof Je&&arguments[1]instanceof M)for(var e=arguments[0],t=arguments[1],r=arguments[2],i=new re,s=e.getCoordinates(),o=0;o<s.length-1;o++){i.setCoordinates(s[o],s[o+1]);var a=i.closestPoint(t);r.setMinimum(a,t)}else if(arguments[2]instanceof bt&&arguments[0]instanceof it&&arguments[1]instanceof M){var l=arguments[0],u=arguments[1],h=arguments[2];wn.computeDistance(l.getExteriorRing(),u,h);for(var f=0;f<l.getNumInteriorRing();f++)wn.computeDistance(l.getInteriorRingN(f),u,h)}else if(arguments[2]instanceof bt&&arguments[0]instanceof oe&&arguments[1]instanceof M){var p=arguments[0],v=arguments[1],w=arguments[2];if(p instanceof Je)wn.computeDistance(p,v,w);else if(p instanceof it)wn.computeDistance(p,v,w);else if(p instanceof Mt)for(var I=p,T=0;T<I.getNumGeometries();T++){var L=I.getGeometryN(T);wn.computeDistance(L,v,w)}else w.setMinimum(p.getCoordinate(),v)}else if(arguments[2]instanceof bt&&arguments[0]instanceof re&&arguments[1]instanceof M){var m=arguments[0],_=arguments[1],g=arguments[2],y=m.closestPoint(_);g.setMinimum(y,_)}};var br=function(){this._g0=null,this._g1=null,this._ptDist=new bt,this._densifyFrac=0;var e=arguments[0],t=arguments[1];this._g0=e,this._g1=t},Kc={MaxPointDistanceFilter:{configurable:!0},MaxDensifiedByFractionDistanceFilter:{configurable:!0}};br.prototype.getCoordinates=function(){return this._ptDist.getCoordinates()},br.prototype.setDensifyFraction=function(e){if(e>1||e<=0)throw new Ue("Fraction is not in range (0.0 - 1.0]");this._densifyFrac=e},br.prototype.compute=function(e,t){this.computeOrientedDistance(e,t,this._ptDist),this.computeOrientedDistance(t,e,this._ptDist)},br.prototype.distance=function(){return this.compute(this._g0,this._g1),this._ptDist.getDistance()},br.prototype.computeOrientedDistance=function(e,t,r){var i=new oo(t);if(e.apply(i),r.setMaximum(i.getMaxPointDistance()),this._densifyFrac>0){var s=new Wi(t,this._densifyFrac);e.apply(s),r.setMaximum(s.getMaxPointDistance())}},br.prototype.orientedDistance=function(){return this.computeOrientedDistance(this._g0,this._g1,this._ptDist),this._ptDist.getDistance()},br.prototype.interfaces_=function(){return[]},br.prototype.getClass=function(){return br},br.distance=function(){if(arguments.length===2){var e=arguments[0],t=arguments[1],r=new br(e,t);return r.distance()}else if(arguments.length===3){var i=arguments[0],s=arguments[1],o=arguments[2],a=new br(i,s);return a.setDensifyFraction(o),a.distance()}},Kc.MaxPointDistanceFilter.get=function(){return oo},Kc.MaxDensifiedByFractionDistanceFilter.get=function(){return Wi},Object.defineProperties(br,Kc);var oo=function(){this._maxPtDist=new bt,this._minPtDist=new bt,this._euclideanDist=new wn,this._geom=null;var e=arguments[0];this._geom=e};oo.prototype.filter=function(e){this._minPtDist.initialize(),wn.computeDistance(this._geom,e,this._minPtDist),this._maxPtDist.setMaximum(this._minPtDist)},oo.prototype.getMaxPointDistance=function(){return this._maxPtDist},oo.prototype.interfaces_=function(){return[An]},oo.prototype.getClass=function(){return oo};var Wi=function(){this._maxPtDist=new bt,this._minPtDist=new bt,this._geom=null,this._numSubSegs=0;var e=arguments[0],t=arguments[1];this._geom=e,this._numSubSegs=Math.trunc(Math.round(1/t))};Wi.prototype.filter=function(e,t){var r=this;if(t===0)return null;for(var i=e.getCoordinate(t-1),s=e.getCoordinate(t),o=(s.x-i.x)/this._numSubSegs,a=(s.y-i.y)/this._numSubSegs,l=0;l<this._numSubSegs;l++){var u=i.x+l*o,h=i.y+l*a,f=new M(u,h);r._minPtDist.initialize(),wn.computeDistance(r._geom,f,r._minPtDist),r._maxPtDist.setMaximum(r._minPtDist)}},Wi.prototype.isDone=function(){return!1},Wi.prototype.isGeometryChanged=function(){return!1},Wi.prototype.getMaxPointDistance=function(){return this._maxPtDist},Wi.prototype.interfaces_=function(){return[Zr]},Wi.prototype.getClass=function(){return Wi};var rr=function(e,t,r){this._minValidDistance=null,this._maxValidDistance=null,this._minDistanceFound=null,this._maxDistanceFound=null,this._isValid=!0,this._errMsg=null,this._errorLocation=null,this._errorIndicator=null,this._input=e||null,this._bufDistance=t||null,this._result=r||null},Qc={VERBOSE:{configurable:!0},MAX_DISTANCE_DIFF_FRAC:{configurable:!0}};rr.prototype.checkMaximumDistance=function(e,t,r){var i=new br(t,e);if(i.setDensifyFraction(.25),this._maxDistanceFound=i.orientedDistance(),this._maxDistanceFound>r){this._isValid=!1;var s=i.getCoordinates();this._errorLocation=s[1],this._errorIndicator=e.getFactory().createLineString(s),this._errMsg="Distance between buffer curve and input is too large ("+this._maxDistanceFound+" at "+Hr.toLineString(s[0],s[1])+")"}},rr.prototype.isValid=function(){var e=Math.abs(this._bufDistance),t=rr.MAX_DISTANCE_DIFF_FRAC*e;return this._minValidDistance=e-t,this._maxValidDistance=e+t,this._input.isEmpty()||this._result.isEmpty()?!0:(this._bufDistance>0?this.checkPositiveValid():this.checkNegativeValid(),rr.VERBOSE&&vt.out.println("Min Dist= "+this._minDistanceFound+" err= "+(1-this._minDistanceFound/this._bufDistance)+" Max Dist= "+this._maxDistanceFound+" err= "+(this._maxDistanceFound/this._bufDistance-1)),this._isValid)},rr.prototype.checkNegativeValid=function(){if(!(this._input instanceof it||this._input instanceof Fn||this._input instanceof Mt))return null;var e=this.getPolygonLines(this._input);if(this.checkMinimumDistance(e,this._result,this._minValidDistance),!this._isValid)return null;this.checkMaximumDistance(e,this._result,this._maxValidDistance)},rr.prototype.getErrorIndicator=function(){return this._errorIndicator},rr.prototype.checkMinimumDistance=function(e,t,r){var i=new Et(e,t,r);if(this._minDistanceFound=i.distance(),this._minDistanceFound<r){this._isValid=!1;var s=i.nearestPoints();this._errorLocation=i.nearestPoints()[1],this._errorIndicator=e.getFactory().createLineString(s),this._errMsg="Distance between buffer curve and input is too small ("+this._minDistanceFound+" at "+Hr.toLineString(s[0],s[1])+" )"}},rr.prototype.checkPositiveValid=function(){var e=this._result.getBoundary();if(this.checkMinimumDistance(this._input,e,this._minValidDistance),!this._isValid)return null;this.checkMaximumDistance(this._input,e,this._maxValidDistance)},rr.prototype.getErrorLocation=function(){return this._errorLocation},rr.prototype.getPolygonLines=function(e){for(var t=new W,r=new wt(t),i=mi.getPolygons(e),s=i.iterator();s.hasNext();){var o=s.next();o.apply(r)}return e.getFactory().buildGeometry(t)},rr.prototype.getErrorMessage=function(){return this._errMsg},rr.prototype.interfaces_=function(){return[]},rr.prototype.getClass=function(){return rr},Qc.VERBOSE.get=function(){return!1},Qc.MAX_DISTANCE_DIFF_FRAC.get=function(){return .012},Object.defineProperties(rr,Qc);var St=function(e,t,r){this._isValid=!0,this._errorMsg=null,this._errorLocation=null,this._errorIndicator=null,this._input=e||null,this._distance=t||null,this._result=r||null},Bc={VERBOSE:{configurable:!0},MAX_ENV_DIFF_FRAC:{configurable:!0}};St.prototype.isValid=function(){return this.checkPolygonal(),this._isValid?(this.checkExpectedEmpty(),this._isValid?(this.checkEnvelope(),this._isValid?(this.checkArea(),this._isValid?(this.checkDistance(),this._isValid):this._isValid):this._isValid):this._isValid):this._isValid},St.prototype.checkEnvelope=function(){if(this._distance<0)return null;var e=this._distance*St.MAX_ENV_DIFF_FRAC;e===0&&(e=.001);var t=new te(this._input.getEnvelopeInternal());t.expandBy(this._distance);var r=new te(this._result.getEnvelopeInternal());r.expandBy(e),r.contains(t)||(this._isValid=!1,this._errorMsg="Buffer envelope is incorrect",this._errorIndicator=this._input.getFactory().toGeometry(r)),this.report("Envelope")},St.prototype.checkDistance=function(){var e=new rr(this._input,this._distance,this._result);e.isValid()||(this._isValid=!1,this._errorMsg=e.getErrorMessage(),this._errorLocation=e.getErrorLocation(),this._errorIndicator=e.getErrorIndicator()),this.report("Distance")},St.prototype.checkArea=function(){var e=this._input.getArea(),t=this._result.getArea();this._distance>0&&e>t&&(this._isValid=!1,this._errorMsg="Area of positive buffer is smaller than input",this._errorIndicator=this._result),this._distance<0&&e<t&&(this._isValid=!1,this._errorMsg="Area of negative buffer is larger than input",this._errorIndicator=this._result),this.report("Area")},St.prototype.checkPolygonal=function(){this._result instanceof it||this._result instanceof Fn||(this._isValid=!1),this._errorMsg="Result is not polygonal",this._errorIndicator=this._result,this.report("Polygonal")},St.prototype.getErrorIndicator=function(){return this._errorIndicator},St.prototype.getErrorLocation=function(){return this._errorLocation},St.prototype.checkExpectedEmpty=function(){if(this._input.getDimension()>=2||this._distance>0)return null;this._result.isEmpty()||(this._isValid=!1,this._errorMsg="Result is non-empty",this._errorIndicator=this._result),this.report("ExpectedEmpty")},St.prototype.report=function(e){if(!St.VERBOSE)return null;vt.out.println("Check "+e+": "+(this._isValid?"passed":"FAILED"))},St.prototype.getErrorMessage=function(){return this._errorMsg},St.prototype.interfaces_=function(){return[]},St.prototype.getClass=function(){return St},St.isValidMsg=function(e,t,r){var i=new St(e,t,r);return i.isValid()?null:i.getErrorMessage()},St.isValid=function(e,t,r){var i=new St(e,t,r);return!!i.isValid()},Bc.VERBOSE.get=function(){return!1},Bc.MAX_ENV_DIFF_FRAC.get=function(){return .012},Object.defineProperties(St,Bc);var En=function(){this._pts=null,this._data=null;var e=arguments[0],t=arguments[1];this._pts=e,this._data=t};En.prototype.getCoordinates=function(){return this._pts},En.prototype.size=function(){return this._pts.length},En.prototype.getCoordinate=function(e){return this._pts[e]},En.prototype.isClosed=function(){return this._pts[0].equals(this._pts[this._pts.length-1])},En.prototype.getSegmentOctant=function(e){return e===this._pts.length-1?-1:eo.octant(this.getCoordinate(e),this.getCoordinate(e+1))},En.prototype.setData=function(e){this._data=e},En.prototype.getData=function(){return this._data},En.prototype.toString=function(){return Hr.toLineString(new Qe(this._pts))},En.prototype.interfaces_=function(){return[Vn]},En.prototype.getClass=function(){return En};var ct=function(){this._findAllIntersections=!1,this._isCheckEndSegmentsOnly=!1,this._li=null,this._interiorIntersection=null,this._intSegments=null,this._intersections=new W,this._intersectionCount=0,this._keepIntersections=!0;var e=arguments[0];this._li=e,this._interiorIntersection=null};ct.prototype.getInteriorIntersection=function(){return this._interiorIntersection},ct.prototype.setCheckEndSegmentsOnly=function(e){this._isCheckEndSegmentsOnly=e},ct.prototype.getIntersectionSegments=function(){return this._intSegments},ct.prototype.count=function(){return this._intersectionCount},ct.prototype.getIntersections=function(){return this._intersections},ct.prototype.setFindAllIntersections=function(e){this._findAllIntersections=e},ct.prototype.setKeepIntersections=function(e){this._keepIntersections=e},ct.prototype.processIntersections=function(e,t,r,i){if(!this._findAllIntersections&&this.hasIntersection()||e===r&&t===i)return null;if(this._isCheckEndSegmentsOnly){var s=this.isEndSegment(e,t)||this.isEndSegment(r,i);if(!s)return null}var o=e.getCoordinates()[t],a=e.getCoordinates()[t+1],l=r.getCoordinates()[i],u=r.getCoordinates()[i+1];this._li.computeIntersection(o,a,l,u),this._li.hasIntersection()&&this._li.isInteriorIntersection()&&(this._intSegments=new Array(4).fill(null),this._intSegments[0]=o,this._intSegments[1]=a,this._intSegments[2]=l,this._intSegments[3]=u,this._interiorIntersection=this._li.getIntersection(0),this._keepIntersections&&this._intersections.add(this._interiorIntersection),this._intersectionCount++)},ct.prototype.isEndSegment=function(e,t){return t===0||t>=e.size()-2},ct.prototype.hasIntersection=function(){return this._interiorIntersection!==null},ct.prototype.isDone=function(){return this._findAllIntersections?!1:this._interiorIntersection!==null},ct.prototype.interfaces_=function(){return[vs]},ct.prototype.getClass=function(){return ct},ct.createAllIntersectionsFinder=function(e){var t=new ct(e);return t.setFindAllIntersections(!0),t},ct.createAnyIntersectionFinder=function(e){return new ct(e)},ct.createIntersectionCounter=function(e){var t=new ct(e);return t.setFindAllIntersections(!0),t.setKeepIntersections(!1),t};var jr=function(){this._li=new hs,this._segStrings=null,this._findAllIntersections=!1,this._segInt=null,this._isValid=!0;var e=arguments[0];this._segStrings=e};jr.prototype.execute=function(){if(this._segInt!==null)return null;this.checkInteriorIntersections()},jr.prototype.getIntersections=function(){return this._segInt.getIntersections()},jr.prototype.isValid=function(){return this.execute(),this._isValid},jr.prototype.setFindAllIntersections=function(e){this._findAllIntersections=e},jr.prototype.checkInteriorIntersections=function(){this._isValid=!0,this._segInt=new ct(this._li),this._segInt.setFindAllIntersections(this._findAllIntersections);var e=new Jc;if(e.setSegmentIntersector(this._segInt),e.computeNodes(this._segStrings),this._segInt.hasIntersection())return this._isValid=!1,null},jr.prototype.checkValid=function(){if(this.execute(),!this._isValid)throw new fi(this.getErrorMessage(),this._segInt.getInteriorIntersection())},jr.prototype.getErrorMessage=function(){if(this._isValid)return"no intersections found";var e=this._segInt.getIntersectionSegments();return"found non-noded intersection between "+Hr.toLineString(e[0],e[1])+" and "+Hr.toLineString(e[2],e[3])},jr.prototype.interfaces_=function(){return[]},jr.prototype.getClass=function(){return jr},jr.computeIntersections=function(e){var t=new jr(e);return t.setFindAllIntersections(!0),t.isValid(),t.getIntersections()};var ws=function n(){this._nv=null;var e=arguments[0];this._nv=new jr(n.toSegmentStrings(e))};ws.prototype.checkValid=function(){this._nv.checkValid()},ws.prototype.interfaces_=function(){return[]},ws.prototype.getClass=function(){return ws},ws.toSegmentStrings=function(e){for(var t=new W,r=e.iterator();r.hasNext();){var i=r.next();t.add(new En(i.getCoordinates(),i))}return t},ws.checkValid=function(e){var t=new ws(e);t.checkValid()};var ao=function(e){this._mapOp=e};ao.prototype.map=function(e){for(var t=this,r=new W,i=0;i<e.getNumGeometries();i++){var s=t._mapOp.map(e.getGeometryN(i));s.isEmpty()||r.add(s)}return e.getFactory().createGeometryCollection(ge.toGeometryArray(r))},ao.prototype.interfaces_=function(){return[]},ao.prototype.getClass=function(){return ao},ao.map=function(e,t){var r=new ao(t);return r.map(e)};var Sn=function(){this._op=null,this._geometryFactory=null,this._ptLocator=null,this._lineEdgesList=new W,this._resultLineList=new W;var e=arguments[0],t=arguments[1],r=arguments[2];this._op=e,this._geometryFactory=t,this._ptLocator=r};Sn.prototype.collectLines=function(e){for(var t=this,r=this._op.getGraph().getEdgeEnds().iterator();r.hasNext();){var i=r.next();t.collectLineEdge(i,e,t._lineEdgesList),t.collectBoundaryTouchEdge(i,e,t._lineEdgesList)}},Sn.prototype.labelIsolatedLine=function(e,t){var r=this._ptLocator.locate(e.getCoordinate(),this._op.getArgGeometry(t));e.getLabel().setLocation(t,r)},Sn.prototype.build=function(e){return this.findCoveredLineEdges(),this.collectLines(e),this.buildLines(e),this._resultLineList},Sn.prototype.collectLineEdge=function(e,t,r){var i=e.getLabel(),s=e.getEdge();e.isLineEdge()&&!e.isVisited()&&he.isResultOfOp(i,t)&&!s.isCovered()&&(r.add(s),e.setVisitedEdge(!0))},Sn.prototype.findCoveredLineEdges=function(){for(var e=this,t=this._op.getGraph().getNodes().iterator();t.hasNext();){var r=t.next();r.getEdges().findCoveredLineEdges()}for(var i=this._op.getGraph().getEdgeEnds().iterator();i.hasNext();){var s=i.next(),o=s.getEdge();if(s.isLineEdge()&&!o.isCoveredSet()){var a=e._op.isCoveredByA(s.getCoordinate());o.setCovered(a)}}},Sn.prototype.labelIsolatedLines=function(e){for(var t=this,r=e.iterator();r.hasNext();){var i=r.next(),s=i.getLabel();i.isIsolated()&&(s.isNull(0)?t.labelIsolatedLine(i,0):t.labelIsolatedLine(i,1))}},Sn.prototype.buildLines=function(e){for(var t=this,r=this._lineEdgesList.iterator();r.hasNext();){var i=r.next(),s=t._geometryFactory.createLineString(i.getCoordinates());t._resultLineList.add(s),i.setInResult(!0)}},Sn.prototype.collectBoundaryTouchEdge=function(e,t,r){var i=e.getLabel();if(e.isLineEdge()||e.isVisited()||e.isInteriorAreaEdge()||e.getEdge().isInResult())return null;fe.isTrue(!(e.isInResult()||e.getSym().isInResult())||!e.getEdge().isInResult()),he.isResultOfOp(i,t)&&t===he.INTERSECTION&&(r.add(e.getEdge()),e.setVisitedEdge(!0))},Sn.prototype.interfaces_=function(){return[]},Sn.prototype.getClass=function(){return Sn};var lo=function(){this._op=null,this._geometryFactory=null,this._resultPointList=new W;var e=arguments[0],t=arguments[1];this._op=e,this._geometryFactory=t};lo.prototype.filterCoveredNodeToPoint=function(e){var t=e.getCoordinate();if(!this._op.isCoveredByLA(t)){var r=this._geometryFactory.createPoint(t);this._resultPointList.add(r)}},lo.prototype.extractNonCoveredResultNodes=function(e){for(var t=this,r=this._op.getGraph().getNodes().iterator();r.hasNext();){var i=r.next();if(!i.isInResult()&&!i.isIncidentEdgeInResult()&&(i.getEdges().getDegree()===0||e===he.INTERSECTION)){var s=i.getLabel();he.isResultOfOp(s,e)&&t.filterCoveredNodeToPoint(i)}}},lo.prototype.build=function(e){return this.extractNonCoveredResultNodes(e),this._resultPointList},lo.prototype.interfaces_=function(){return[]},lo.prototype.getClass=function(){return lo};var Ht=function(){this._inputGeom=null,this._factory=null,this._pruneEmptyGeometry=!0,this._preserveGeometryCollectionType=!0,this._preserveCollections=!1,this._preserveType=!1};Ht.prototype.transformPoint=function(e,t){return this._factory.createPoint(this.transformCoordinates(e.getCoordinateSequence(),e))},Ht.prototype.transformPolygon=function(e,t){var r=this,i=!0,s=this.transformLinearRing(e.getExteriorRing(),e);(s===null||!(s instanceof Rn)||s.isEmpty())&&(i=!1);for(var o=new W,a=0;a<e.getNumInteriorRing();a++){var l=r.transformLinearRing(e.getInteriorRingN(a),e);l===null||l.isEmpty()||(l instanceof Rn||(i=!1),o.add(l))}if(i)return this._factory.createPolygon(s,o.toArray([]));var u=new W;return s!==null&&u.add(s),u.addAll(o),this._factory.buildGeometry(u)},Ht.prototype.createCoordinateSequence=function(e){return this._factory.getCoordinateSequenceFactory().create(e)},Ht.prototype.getInputGeometry=function(){return this._inputGeom},Ht.prototype.transformMultiLineString=function(e,t){for(var r=this,i=new W,s=0;s<e.getNumGeometries();s++){var o=r.transformLineString(e.getGeometryN(s),e);o!==null&&(o.isEmpty()||i.add(o))}return this._factory.buildGeometry(i)},Ht.prototype.transformCoordinates=function(e,t){return this.copy(e)},Ht.prototype.transformLineString=function(e,t){return this._factory.createLineString(this.transformCoordinates(e.getCoordinateSequence(),e))},Ht.prototype.transformMultiPoint=function(e,t){for(var r=this,i=new W,s=0;s<e.getNumGeometries();s++){var o=r.transformPoint(e.getGeometryN(s),e);o!==null&&(o.isEmpty()||i.add(o))}return this._factory.buildGeometry(i)},Ht.prototype.transformMultiPolygon=function(e,t){for(var r=this,i=new W,s=0;s<e.getNumGeometries();s++){var o=r.transformPolygon(e.getGeometryN(s),e);o!==null&&(o.isEmpty()||i.add(o))}return this._factory.buildGeometry(i)},Ht.prototype.copy=function(e){return e.copy()},Ht.prototype.transformGeometryCollection=function(e,t){for(var r=this,i=new W,s=0;s<e.getNumGeometries();s++){var o=r.transform(e.getGeometryN(s));o!==null&&(r._pruneEmptyGeometry&&o.isEmpty()||i.add(o))}return this._preserveGeometryCollectionType?this._factory.createGeometryCollection(ge.toGeometryArray(i)):this._factory.buildGeometry(i)},Ht.prototype.transform=function(e){if(this._inputGeom=e,this._factory=e.getFactory(),e instanceof jt)return this.transformPoint(e,null);if(e instanceof pl)return this.transformMultiPoint(e,null);if(e instanceof Rn)return this.transformLinearRing(e,null);if(e instanceof Je)return this.transformLineString(e,null);if(e instanceof ps)return this.transformMultiLineString(e,null);if(e instanceof it)return this.transformPolygon(e,null);if(e instanceof Fn)return this.transformMultiPolygon(e,null);if(e instanceof Mt)return this.transformGeometryCollection(e,null);throw new Ue("Unknown Geometry subtype: "+e.getClass().getName())},Ht.prototype.transformLinearRing=function(e,t){var r=this.transformCoordinates(e.getCoordinateSequence(),e);if(r===null)return this._factory.createLinearRing(null);var i=r.size();return i>0&&i<4&&!this._preserveType?this._factory.createLineString(r):this._factory.createLinearRing(r)},Ht.prototype.interfaces_=function(){return[]},Ht.prototype.getClass=function(){return Ht};var qn=function n(){if(this._snapTolerance=0,this._srcPts=null,this._seg=new re,this._allowSnappingToSourceVertices=!1,this._isClosed=!1,arguments[0]instanceof Je&&typeof arguments[1]=="number"){var e=arguments[0],t=arguments[1];n.call(this,e.getCoordinates(),t)}else if(arguments[0]instanceof Array&&typeof arguments[1]=="number"){var r=arguments[0],i=arguments[1];this._srcPts=r,this._isClosed=n.isClosed(r),this._snapTolerance=i}};qn.prototype.snapVertices=function(e,t){for(var r=this,i=this._isClosed?e.size()-1:e.size(),s=0;s<i;s++){var o=e.get(s),a=r.findSnapForVertex(o,t);a!==null&&(e.set(s,new M(a)),s===0&&r._isClosed&&e.set(e.size()-1,new M(a)))}},qn.prototype.findSnapForVertex=function(e,t){for(var r=this,i=0;i<t.length;i++){if(e.equals2D(t[i]))return null;if(e.distance(t[i])<r._snapTolerance)return t[i]}return null},qn.prototype.snapTo=function(e){var t=new Hl(this._srcPts);this.snapVertices(t,e),this.snapSegments(t,e);var r=t.toCoordinateArray();return r},qn.prototype.snapSegments=function(e,t){var r=this;if(t.length===0)return null;var i=t.length;t[0].equals2D(t[t.length-1])&&(i=t.length-1);for(var s=0;s<i;s++){var o=t[s],a=r.findSegmentIndexToSnap(o,e);a>=0&&e.add(a+1,new M(o),!1)}},qn.prototype.findSegmentIndexToSnap=function(e,t){for(var r=this,i=ue.MAX_VALUE,s=-1,o=0;o<t.size()-1;o++){if(r._seg.p0=t.get(o),r._seg.p1=t.get(o+1),r._seg.p0.equals2D(e)||r._seg.p1.equals2D(e)){if(r._allowSnappingToSourceVertices)continue;return-1}var a=r._seg.distance(e);a<r._snapTolerance&&a<i&&(i=a,s=o)}return s},qn.prototype.setAllowSnappingToSourceVertices=function(e){this._allowSnappingToSourceVertices=e},qn.prototype.interfaces_=function(){return[]},qn.prototype.getClass=function(){return qn},qn.isClosed=function(e){return e.length<=1?!1:e[0].equals2D(e[e.length-1])};var $e=function(e){this._srcGeom=e||null},Qf={SNAP_PRECISION_FACTOR:{configurable:!0}};$e.prototype.snapTo=function(e,t){var r=this.extractTargetCoordinates(e),i=new Bf(t,r);return i.transform(this._srcGeom)},$e.prototype.snapToSelf=function(e,t){var r=this.extractTargetCoordinates(this._srcGeom),i=new Bf(e,r,!0),s=i.transform(this._srcGeom),o=s;return t&&ae(o,Ri)&&(o=s.buffer(0)),o},$e.prototype.computeSnapTolerance=function(e){var t=this.computeMinimumSegmentLength(e),r=t/10;return r},$e.prototype.extractTargetCoordinates=function(e){for(var t=new cn,r=e.getCoordinates(),i=0;i<r.length;i++)t.add(r[i]);return t.toArray(new Array(0).fill(null))},$e.prototype.computeMinimumSegmentLength=function(e){for(var t=ue.MAX_VALUE,r=0;r<e.length-1;r++){var i=e[r].distance(e[r+1]);i<t&&(t=i)}return t},$e.prototype.interfaces_=function(){return[]},$e.prototype.getClass=function(){return $e},$e.snap=function(e,t,r){var i=new Array(2).fill(null),s=new $e(e);i[0]=s.snapTo(t,r);var o=new $e(t);return i[1]=o.snapTo(i[0],r),i},$e.computeOverlaySnapTolerance=function(){if(arguments.length===1){var e=arguments[0],t=$e.computeSizeBasedSnapTolerance(e),r=e.getPrecisionModel();if(r.getType()===Te.FIXED){var i=1/r.getScale()*2/1.415;i>t&&(t=i)}return t}else if(arguments.length===2){var s=arguments[0],o=arguments[1];return Math.min($e.computeOverlaySnapTolerance(s),$e.computeOverlaySnapTolerance(o))}},$e.computeSizeBasedSnapTolerance=function(e){var t=e.getEnvelopeInternal(),r=Math.min(t.getHeight(),t.getWidth()),i=r*$e.SNAP_PRECISION_FACTOR;return i},$e.snapToSelf=function(e,t,r){var i=new $e(e);return i.snapToSelf(t,r)},Qf.SNAP_PRECISION_FACTOR.get=function(){return 1e-9},Object.defineProperties($e,Qf);var Bf=function(n){function e(t,r,i){n.call(this),this._snapTolerance=t||null,this._snapPts=r||null,this._isSelfSnap=i!==void 0?i:!1}return n&&(e.__proto__=n),e.prototype=Object.create(n&&n.prototype),e.prototype.constructor=e,e.prototype.snapLine=function(r,i){var s=new qn(r,this._snapTolerance);return s.setAllowSnappingToSourceVertices(this._isSelfSnap),s.snapTo(i)},e.prototype.transformCoordinates=function(r,i){var s=r.toCoordinateArray(),o=this.snapLine(s,this._snapPts);return this._factory.getCoordinateSequenceFactory().create(o)},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e}(Ht),kt=function(){this._isFirst=!0,this._commonMantissaBitsCount=53,this._commonBits=0,this._commonSignExp=null};kt.prototype.getCommon=function(){return ue.longBitsToDouble(this._commonBits)},kt.prototype.add=function(e){var t=ue.doubleToLongBits(e);if(this._isFirst)return this._commonBits=t,this._commonSignExp=kt.signExpBits(this._commonBits),this._isFirst=!1,null;var r=kt.signExpBits(t);if(r!==this._commonSignExp)return this._commonBits=0,null;this._commonMantissaBitsCount=kt.numCommonMostSigMantissaBits(this._commonBits,t),this._commonBits=kt.zeroLowerBits(this._commonBits,64-(12+this._commonMantissaBitsCount))},kt.prototype.toString=function(){if(arguments.length===1){var e=arguments[0],t=ue.longBitsToDouble(e),r=ue.toBinaryString(e),i="0000000000000000000000000000000000000000000000000000000000000000"+r,s=i.substring(i.length-64),o=s.substring(0,1)+" "+s.substring(1,12)+"(exp) "+s.substring(12)+" [ "+t+" ]";return o}},kt.prototype.interfaces_=function(){return[]},kt.prototype.getClass=function(){return kt},kt.getBit=function(e,t){var r=1<<t;return(e&r)!==0?1:0},kt.signExpBits=function(e){return e>>52},kt.zeroLowerBits=function(e,t){var r=(1<<t)-1,i=~r,s=e&i;return s},kt.numCommonMostSigMantissaBits=function(e,t){for(var r=0,i=52;i>=0;i--){if(kt.getBit(e,i)!==kt.getBit(t,i))return r;r++}return 52};var qi=function(){this._commonCoord=null,this._ccFilter=new uo},$c={CommonCoordinateFilter:{configurable:!0},Translater:{configurable:!0}};qi.prototype.addCommonBits=function(e){var t=new Xi(this._commonCoord);e.apply(t),e.geometryChanged()},qi.prototype.removeCommonBits=function(e){if(this._commonCoord.x===0&&this._commonCoord.y===0)return e;var t=new M(this._commonCoord);t.x=-t.x,t.y=-t.y;var r=new Xi(t);return e.apply(r),e.geometryChanged(),e},qi.prototype.getCommonCoordinate=function(){return this._commonCoord},qi.prototype.add=function(e){e.apply(this._ccFilter),this._commonCoord=this._ccFilter.getCommonCoordinate()},qi.prototype.interfaces_=function(){return[]},qi.prototype.getClass=function(){return qi},$c.CommonCoordinateFilter.get=function(){return uo},$c.Translater.get=function(){return Xi},Object.defineProperties(qi,$c);var uo=function(){this._commonBitsX=new kt,this._commonBitsY=new kt};uo.prototype.filter=function(e){this._commonBitsX.add(e.x),this._commonBitsY.add(e.y)},uo.prototype.getCommonCoordinate=function(){return new M(this._commonBitsX.getCommon(),this._commonBitsY.getCommon())},uo.prototype.interfaces_=function(){return[An]},uo.prototype.getClass=function(){return uo};var Xi=function(){this.trans=null;var e=arguments[0];this.trans=e};Xi.prototype.filter=function(e,t){var r=e.getOrdinate(t,0)+this.trans.x,i=e.getOrdinate(t,1)+this.trans.y;e.setOrdinate(t,0,r),e.setOrdinate(t,1,i)},Xi.prototype.isDone=function(){return!1},Xi.prototype.isGeometryChanged=function(){return!0},Xi.prototype.interfaces_=function(){return[Zr]},Xi.prototype.getClass=function(){return Xi};var ht=function(e,t){this._geom=new Array(2).fill(null),this._snapTolerance=null,this._cbr=null,this._geom[0]=e,this._geom[1]=t,this.computeSnapTolerance()};ht.prototype.selfSnap=function(e){var t=new $e(e),r=t.snapTo(e,this._snapTolerance);return r},ht.prototype.removeCommonBits=function(e){this._cbr=new qi,this._cbr.add(e[0]),this._cbr.add(e[1]);var t=new Array(2).fill(null);return t[0]=this._cbr.removeCommonBits(e[0].copy()),t[1]=this._cbr.removeCommonBits(e[1].copy()),t},ht.prototype.prepareResult=function(e){return this._cbr.addCommonBits(e),e},ht.prototype.getResultGeometry=function(e){var t=this.snap(this._geom),r=he.overlayOp(t[0],t[1],e);return this.prepareResult(r)},ht.prototype.checkValid=function(e){e.isValid()||vt.out.println("Snapped geometry is invalid")},ht.prototype.computeSnapTolerance=function(){this._snapTolerance=$e.computeOverlaySnapTolerance(this._geom[0],this._geom[1])},ht.prototype.snap=function(e){var t=this.removeCommonBits(e),r=$e.snap(t[0],t[1],this._snapTolerance);return r},ht.prototype.interfaces_=function(){return[]},ht.prototype.getClass=function(){return ht},ht.overlayOp=function(e,t,r){var i=new ht(e,t);return i.getResultGeometry(r)},ht.union=function(e,t){return ht.overlayOp(e,t,he.UNION)},ht.intersection=function(e,t){return ht.overlayOp(e,t,he.INTERSECTION)},ht.symDifference=function(e,t){return ht.overlayOp(e,t,he.SYMDIFFERENCE)},ht.difference=function(e,t){return ht.overlayOp(e,t,he.DIFFERENCE)};var Vt=function(e,t){this._geom=new Array(2).fill(null),this._geom[0]=e,this._geom[1]=t};Vt.prototype.getResultGeometry=function(e){var t=null,r=!1,i=null;try{t=he.overlayOp(this._geom[0],this._geom[1],e);var s=!0;s&&(r=!0)}catch(o){if(o instanceof oi)i=o;else throw o}finally{}if(!r)try{t=ht.overlayOp(this._geom[0],this._geom[1],e)}catch(o){throw o instanceof oi?i:o}finally{}return t},Vt.prototype.interfaces_=function(){return[]},Vt.prototype.getClass=function(){return Vt},Vt.overlayOp=function(e,t,r){var i=new Vt(e,t);return i.getResultGeometry(r)},Vt.union=function(e,t){return Vt.overlayOp(e,t,he.UNION)},Vt.intersection=function(e,t){return Vt.overlayOp(e,t,he.INTERSECTION)},Vt.symDifference=function(e,t){return Vt.overlayOp(e,t,he.SYMDIFFERENCE)},Vt.difference=function(e,t){return Vt.overlayOp(e,t,he.DIFFERENCE)};var ou=function(){this.mce=null,this.chainIndex=null;var e=arguments[0],t=arguments[1];this.mce=e,this.chainIndex=t};ou.prototype.computeIntersections=function(e,t){this.mce.computeIntersectsForChain(this.chainIndex,e.mce,e.chainIndex,t)},ou.prototype.interfaces_=function(){return[]},ou.prototype.getClass=function(){return ou};var nr=function n(){if(this._label=null,this._xValue=null,this._eventType=null,this._insertEvent=null,this._deleteEventIndex=null,this._obj=null,arguments.length===2){var e=arguments[0],t=arguments[1];this._eventType=n.DELETE,this._xValue=e,this._insertEvent=t}else if(arguments.length===3){var r=arguments[0],i=arguments[1],s=arguments[2];this._eventType=n.INSERT,this._label=r,this._xValue=i,this._obj=s}},jc={INSERT:{configurable:!0},DELETE:{configurable:!0}};nr.prototype.isDelete=function(){return this._eventType===nr.DELETE},nr.prototype.setDeleteEventIndex=function(e){this._deleteEventIndex=e},nr.prototype.getObject=function(){return this._obj},nr.prototype.compareTo=function(e){var t=e;return this._xValue<t._xValue?-1:this._xValue>t._xValue?1:this._eventType<t._eventType?-1:this._eventType>t._eventType?1:0},nr.prototype.getInsertEvent=function(){return this._insertEvent},nr.prototype.isInsert=function(){return this._eventType===nr.INSERT},nr.prototype.isSameLabel=function(e){return this._label===null?!1:this._label===e._label},nr.prototype.getDeleteEventIndex=function(){return this._deleteEventIndex},nr.prototype.interfaces_=function(){return[Sr]},nr.prototype.getClass=function(){return nr},jc.INSERT.get=function(){return 1},jc.DELETE.get=function(){return 2},Object.defineProperties(nr,jc);var Yu=function(){};Yu.prototype.interfaces_=function(){return[]},Yu.prototype.getClass=function(){return Yu};var Ct=function(){this._hasIntersection=!1,this._hasProper=!1,this._hasProperInterior=!1,this._properIntersectionPoint=null,this._li=null,this._includeProper=null,this._recordIsolated=null,this._isSelfIntersection=null,this._numIntersections=0,this.numTests=0,this._bdyNodes=null,this._isDone=!1,this._isDoneWhenProperInt=!1;var e=arguments[0],t=arguments[1],r=arguments[2];this._li=e,this._includeProper=t,this._recordIsolated=r};Ct.prototype.isTrivialIntersection=function(e,t,r,i){if(e===r&&this._li.getIntersectionNum()===1){if(Ct.isAdjacentSegments(t,i))return!0;if(e.isClosed()){var s=e.getNumPoints()-1;if(t===0&&i===s||i===0&&t===s)return!0}}return!1},Ct.prototype.getProperIntersectionPoint=function(){return this._properIntersectionPoint},Ct.prototype.setIsDoneIfProperInt=function(e){this._isDoneWhenProperInt=e},Ct.prototype.hasProperInteriorIntersection=function(){return this._hasProperInterior},Ct.prototype.isBoundaryPointInternal=function(e,t){for(var r=t.iterator();r.hasNext();){var i=r.next(),s=i.getCoordinate();if(e.isIntersection(s))return!0}return!1},Ct.prototype.hasProperIntersection=function(){return this._hasProper},Ct.prototype.hasIntersection=function(){return this._hasIntersection},Ct.prototype.isDone=function(){return this._isDone},Ct.prototype.isBoundaryPoint=function(e,t){return t===null?!1:!!(this.isBoundaryPointInternal(e,t[0])||this.isBoundaryPointInternal(e,t[1]))},Ct.prototype.setBoundaryNodes=function(e,t){this._bdyNodes=new Array(2).fill(null),this._bdyNodes[0]=e,this._bdyNodes[1]=t},Ct.prototype.addIntersections=function(e,t,r,i){if(e===r&&t===i)return null;this.numTests++;var s=e.getCoordinates()[t],o=e.getCoordinates()[t+1],a=r.getCoordinates()[i],l=r.getCoordinates()[i+1];this._li.computeIntersection(s,o,a,l),this._li.hasIntersection()&&(this._recordIsolated&&(e.setIsolated(!1),r.setIsolated(!1)),this._numIntersections++,this.isTrivialIntersection(e,t,r,i)||(this._hasIntersection=!0,(this._includeProper||!this._li.isProper())&&(e.addIntersections(this._li,t,0),r.addIntersections(this._li,i,1)),this._li.isProper()&&(this._properIntersectionPoint=this._li.getIntersection(0).copy(),this._hasProper=!0,this._isDoneWhenProperInt&&(this._isDone=!0),this.isBoundaryPoint(this._li,this._bdyNodes)||(this._hasProperInterior=!0))))},Ct.prototype.interfaces_=function(){return[]},Ct.prototype.getClass=function(){return Ct},Ct.isAdjacentSegments=function(e,t){return Math.abs(e-t)===1};var rv=function(n){function e(){n.call(this),this.events=new W,this.nOverlaps=null}return n&&(e.__proto__=n),e.prototype=Object.create(n&&n.prototype),e.prototype.constructor=e,e.prototype.prepareEvents=function(){var r=this;Qr.sort(this.events);for(var i=0;i<this.events.size();i++){var s=r.events.get(i);s.isDelete()&&s.getInsertEvent().setDeleteEventIndex(i)}},e.prototype.computeIntersections=function(){var r=this;if(arguments.length===1){var i=arguments[0];this.nOverlaps=0,this.prepareEvents();for(var s=0;s<this.events.size();s++){var o=r.events.get(s);if(o.isInsert()&&r.processOverlaps(s,o.getDeleteEventIndex(),o,i),i.isDone())break}}else if(arguments.length===3){if(arguments[2]instanceof Ct&&ae(arguments[0],Yr)&&ae(arguments[1],Yr)){var a=arguments[0],l=arguments[1],u=arguments[2];this.addEdges(a,a),this.addEdges(l,l),this.computeIntersections(u)}else if(typeof arguments[2]=="boolean"&&ae(arguments[0],Yr)&&arguments[1]instanceof Ct){var h=arguments[0],f=arguments[1],p=arguments[2];p?this.addEdges(h,null):this.addEdges(h),this.computeIntersections(f)}}},e.prototype.addEdge=function(r,i){for(var s=this,o=r.getMonotoneChainEdge(),a=o.getStartIndexes(),l=0;l<a.length-1;l++){var u=new ou(o,l),h=new nr(i,o.getMinX(l),u);s.events.add(h),s.events.add(new nr(o.getMaxX(l),h))}},e.prototype.processOverlaps=function(r,i,s,o){for(var a=this,l=s.getObject(),u=r;u<i;u++){var h=a.events.get(u);if(h.isInsert()){var f=h.getObject();s.isSameLabel(h)||(l.computeIntersections(f,o),a.nOverlaps++)}}},e.prototype.addEdges=function(){var r=this;if(arguments.length===1)for(var i=arguments[0],s=i.iterator();s.hasNext();){var o=s.next();r.addEdge(o,o)}else if(arguments.length===2)for(var a=arguments[0],l=arguments[1],u=a.iterator();u.hasNext();){var h=u.next();r.addEdge(h,l)}},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e}(Yu),Xn=function(){this._min=ue.POSITIVE_INFINITY,this._max=ue.NEGATIVE_INFINITY},$f={NodeComparator:{configurable:!0}};Xn.prototype.getMin=function(){return this._min},Xn.prototype.intersects=function(e,t){return!(this._min>t||this._max<e)},Xn.prototype.getMax=function(){return this._max},Xn.prototype.toString=function(){return Hr.toLineString(new M(this._min,0),new M(this._max,0))},Xn.prototype.interfaces_=function(){return[]},Xn.prototype.getClass=function(){return Xn},$f.NodeComparator.get=function(){return au},Object.defineProperties(Xn,$f);var au=function(){};au.prototype.compare=function(e,t){var r=e,i=t,s=(r._min+r._max)/2,o=(i._min+i._max)/2;return s<o?-1:s>o?1:0},au.prototype.interfaces_=function(){return[nl]},au.prototype.getClass=function(){return au};var nv=function(n){function e(){n.call(this),this._item=null;var t=arguments[0],r=arguments[1],i=arguments[2];this._min=t,this._max=r,this._item=i}return n&&(e.__proto__=n),e.prototype=Object.create(n&&n.prototype),e.prototype.constructor=e,e.prototype.query=function(r,i,s){if(!this.intersects(r,i))return null;s.visitItem(this._item)},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e}(Xn),iv=function(n){function e(){n.call(this),this._node1=null,this._node2=null;var t=arguments[0],r=arguments[1];this._node1=t,this._node2=r,this.buildExtent(this._node1,this._node2)}return n&&(e.__proto__=n),e.prototype=Object.create(n&&n.prototype),e.prototype.constructor=e,e.prototype.buildExtent=function(r,i){this._min=Math.min(r._min,i._min),this._max=Math.max(r._max,i._max)},e.prototype.query=function(r,i,s){if(!this.intersects(r,i))return null;this._node1!==null&&this._node1.query(r,i,s),this._node2!==null&&this._node2.query(r,i,s)},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e}(Xn),Hn=function(){this._leaves=new W,this._root=null,this._level=0};Hn.prototype.buildTree=function(){var e=this;Qr.sort(this._leaves,new Xn.NodeComparator);for(var t=this._leaves,r=null,i=new W;;){if(e.buildLevel(t,i),i.size()===1)return i.get(0);r=t,t=i,i=r}},Hn.prototype.insert=function(e,t,r){if(this._root!==null)throw new Error("Index cannot be added to once it has been queried");this._leaves.add(new nv(e,t,r))},Hn.prototype.query=function(e,t,r){this.init(),this._root.query(e,t,r)},Hn.prototype.buildRoot=function(){if(this._root!==null)return null;this._root=this.buildTree()},Hn.prototype.printNode=function(e){vt.out.println(Hr.toLineString(new M(e._min,this._level),new M(e._max,this._level)))},Hn.prototype.init=function(){if(this._root!==null)return null;this.buildRoot()},Hn.prototype.buildLevel=function(e,t){this._level++,t.clear();for(var r=0;r<e.size();r+=2){var i=e.get(r),s=r+1<e.size()?e.get(r):null;if(s===null)t.add(i);else{var o=new iv(e.get(r),e.get(r+1));t.add(o)}}},Hn.prototype.interfaces_=function(){return[]},Hn.prototype.getClass=function(){return Hn};var El=function(){this._items=new W};El.prototype.visitItem=function(e){this._items.add(e)},El.prototype.getItems=function(){return this._items},El.prototype.interfaces_=function(){return[Fi]},El.prototype.getClass=function(){return El};var Sl=function(){this._index=null;var e=arguments[0];if(!ae(e,Ri))throw new Ue("Argument must be Polygonal");this._index=new Es(e)},eh={SegmentVisitor:{configurable:!0},IntervalIndexedGeometry:{configurable:!0}};Sl.prototype.locate=function(e){var t=new un(e),r=new Cl(t);return this._index.query(e.y,e.y,r),t.getLocation()},Sl.prototype.interfaces_=function(){return[yl]},Sl.prototype.getClass=function(){return Sl},eh.SegmentVisitor.get=function(){return Cl},eh.IntervalIndexedGeometry.get=function(){return Es},Object.defineProperties(Sl,eh);var Cl=function(){this._counter=null;var e=arguments[0];this._counter=e};Cl.prototype.visitItem=function(e){var t=e;this._counter.countSegment(t.getCoordinate(0),t.getCoordinate(1))},Cl.prototype.interfaces_=function(){return[Fi]},Cl.prototype.getClass=function(){return Cl};var Es=function(){this._index=new Hn;var e=arguments[0];this.init(e)};Es.prototype.init=function(e){for(var t=this,r=wt.getLines(e),i=r.iterator();i.hasNext();){var s=i.next(),o=s.getCoordinates();t.addLine(o)}},Es.prototype.addLine=function(e){for(var t=this,r=1;r<e.length;r++){var i=new re(e[r-1],e[r]),s=Math.min(i.p0.y,i.p1.y),o=Math.max(i.p0.y,i.p1.y);t._index.insert(s,o,i)}},Es.prototype.query=function(){if(arguments.length===2){var e=arguments[0],t=arguments[1],r=new El;return this._index.query(e,t,r),r.getItems()}else if(arguments.length===3){var i=arguments[0],s=arguments[1],o=arguments[2];this._index.query(i,s,o)}},Es.prototype.interfaces_=function(){return[]},Es.prototype.getClass=function(){return Es};var lu=function(n){function e(){if(n.call(this),this._parentGeom=null,this._lineEdgeMap=new Lf,this._boundaryNodeRule=null,this._useBoundaryDeterminationRule=!0,this._argIndex=null,this._boundaryNodes=null,this._hasTooFewPoints=!1,this._invalidPoint=null,this._areaPtLocator=null,this._ptLocator=new $r,arguments.length===2){var t=arguments[0],r=arguments[1],i=Pr.OGC_SFS_BOUNDARY_RULE;this._argIndex=t,this._parentGeom=r,this._boundaryNodeRule=i,r!==null&&this.add(r)}else if(arguments.length===3){var s=arguments[0],o=arguments[1],a=arguments[2];this._argIndex=s,this._parentGeom=o,this._boundaryNodeRule=a,o!==null&&this.add(o)}}return n&&(e.__proto__=n),e.prototype=Object.create(n&&n.prototype),e.prototype.constructor=e,e.prototype.insertBoundaryPoint=function(r,i){var s=this._nodes.addNode(i),o=s.getLabel(),a=1,l=R.NONE;l=o.getLocation(r,G.ON),l===R.BOUNDARY&&a++;var u=e.determineBoundary(this._boundaryNodeRule,a);o.setLocation(r,u)},e.prototype.computeSelfNodes=function(){if(arguments.length===2){var r=arguments[0],i=arguments[1];return this.computeSelfNodes(r,i,!1)}else if(arguments.length===3){var s=arguments[0],o=arguments[1],a=arguments[2],l=new Ct(s,!0,!1);l.setIsDoneIfProperInt(a);var u=this.createEdgeSetIntersector(),h=this._parentGeom instanceof Rn||this._parentGeom instanceof it||this._parentGeom instanceof Fn,f=o||!h;return u.computeIntersections(this._edges,l,f),this.addSelfIntersectionNodes(this._argIndex),l}},e.prototype.computeSplitEdges=function(r){for(var i=this._edges.iterator();i.hasNext();){var s=i.next();s.eiList.addSplitEdges(r)}},e.prototype.computeEdgeIntersections=function(r,i,s){var o=new Ct(i,s,!0);o.setBoundaryNodes(this.getBoundaryNodes(),r.getBoundaryNodes());var a=this.createEdgeSetIntersector();return a.computeIntersections(this._edges,r._edges,o),o},e.prototype.getGeometry=function(){return this._parentGeom},e.prototype.getBoundaryNodeRule=function(){return this._boundaryNodeRule},e.prototype.hasTooFewPoints=function(){return this._hasTooFewPoints},e.prototype.addPoint=function(){if(arguments[0]instanceof jt){var r=arguments[0],i=r.getCoordinate();this.insertPoint(this._argIndex,i,R.INTERIOR)}else if(arguments[0]instanceof M){var s=arguments[0];this.insertPoint(this._argIndex,s,R.INTERIOR)}},e.prototype.addPolygon=function(r){var i=this;this.addPolygonRing(r.getExteriorRing(),R.EXTERIOR,R.INTERIOR);for(var s=0;s<r.getNumInteriorRing();s++){var o=r.getInteriorRingN(s);i.addPolygonRing(o,R.INTERIOR,R.EXTERIOR)}},e.prototype.addEdge=function(r){this.insertEdge(r);var i=r.getCoordinates();this.insertPoint(this._argIndex,i[0],R.BOUNDARY),this.insertPoint(this._argIndex,i[i.length-1],R.BOUNDARY)},e.prototype.addLineString=function(r){var i=pe.removeRepeatedPoints(r.getCoordinates());if(i.length<2)return this._hasTooFewPoints=!0,this._invalidPoint=i[0],null;var s=new Hu(i,new be(this._argIndex,R.INTERIOR));this._lineEdgeMap.put(r,s),this.insertEdge(s),fe.isTrue(i.length>=2,"found LineString with single point"),this.insertBoundaryPoint(this._argIndex,i[0]),this.insertBoundaryPoint(this._argIndex,i[i.length-1])},e.prototype.getInvalidPoint=function(){return this._invalidPoint},e.prototype.getBoundaryPoints=function(){for(var r=this.getBoundaryNodes(),i=new Array(r.size()).fill(null),s=0,o=r.iterator();o.hasNext();){var a=o.next();i[s++]=a.getCoordinate().copy()}return i},e.prototype.getBoundaryNodes=function(){return this._boundaryNodes===null&&(this._boundaryNodes=this._nodes.getBoundaryNodes(this._argIndex)),this._boundaryNodes},e.prototype.addSelfIntersectionNode=function(r,i,s){if(this.isBoundaryNode(r,i))return null;s===R.BOUNDARY&&this._useBoundaryDeterminationRule?this.insertBoundaryPoint(r,i):this.insertPoint(r,i,s)},e.prototype.addPolygonRing=function(r,i,s){if(r.isEmpty())return null;var o=pe.removeRepeatedPoints(r.getCoordinates());if(o.length<4)return this._hasTooFewPoints=!0,this._invalidPoint=o[0],null;var a=i,l=s;Y.isCCW(o)&&(a=s,l=i);var u=new Hu(o,new be(this._argIndex,R.BOUNDARY,a,l));this._lineEdgeMap.put(r,u),this.insertEdge(u),this.insertPoint(this._argIndex,o[0],R.BOUNDARY)},e.prototype.insertPoint=function(r,i,s){var o=this._nodes.addNode(i),a=o.getLabel();a===null?o._label=new be(r,s):a.setLocation(r,s)},e.prototype.createEdgeSetIntersector=function(){return new rv},e.prototype.addSelfIntersectionNodes=function(r){for(var i=this,s=this._edges.iterator();s.hasNext();)for(var o=s.next(),a=o.getLabel().getLocation(r),l=o.eiList.iterator();l.hasNext();){var u=l.next();i.addSelfIntersectionNode(r,u.coord,a)}},e.prototype.add=function(){if(arguments.length===1){var r=arguments[0];if(r.isEmpty())return null;if(r instanceof Fn&&(this._useBoundaryDeterminationRule=!1),r instanceof it)this.addPolygon(r);else if(r instanceof Je)this.addLineString(r);else if(r instanceof jt)this.addPoint(r);else if(r instanceof pl)this.addCollection(r);else if(r instanceof ps)this.addCollection(r);else if(r instanceof Fn)this.addCollection(r);else if(r instanceof Mt)this.addCollection(r);else throw new Error(r.getClass().getName())}else return n.prototype.add.apply(this,arguments)},e.prototype.addCollection=function(r){for(var i=this,s=0;s<r.getNumGeometries();s++){var o=r.getGeometryN(s);i.add(o)}},e.prototype.locate=function(r){return ae(this._parentGeom,Ri)&&this._parentGeom.getNumGeometries()>50?(this._areaPtLocator===null&&(this._areaPtLocator=new Sl(this._parentGeom)),this._areaPtLocator.locate(r)):this._ptLocator.locate(r,this._parentGeom)},e.prototype.findEdge=function(){if(arguments.length===1){var r=arguments[0];return this._lineEdgeMap.get(r)}else return n.prototype.findEdge.apply(this,arguments)},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e.determineBoundary=function(r,i){return r.isInBoundary(i)?R.BOUNDARY:R.INTERIOR},e}(Ye),Pl=function(){if(this._li=new hs,this._resultPrecisionModel=null,this._arg=null,arguments.length===1){var e=arguments[0];this.setComputationPrecision(e.getPrecisionModel()),this._arg=new Array(1).fill(null),this._arg[0]=new lu(0,e)}else if(arguments.length===2){var t=arguments[0],r=arguments[1],i=Pr.OGC_SFS_BOUNDARY_RULE;t.getPrecisionModel().compareTo(r.getPrecisionModel())>=0?this.setComputationPrecision(t.getPrecisionModel()):this.setComputationPrecision(r.getPrecisionModel()),this._arg=new Array(2).fill(null),this._arg[0]=new lu(0,t,i),this._arg[1]=new lu(1,r,i)}else if(arguments.length===3){var s=arguments[0],o=arguments[1],a=arguments[2];s.getPrecisionModel().compareTo(o.getPrecisionModel())>=0?this.setComputationPrecision(s.getPrecisionModel()):this.setComputationPrecision(o.getPrecisionModel()),this._arg=new Array(2).fill(null),this._arg[0]=new lu(0,s,a),this._arg[1]=new lu(1,o,a)}};Pl.prototype.getArgGeometry=function(e){return this._arg[e].getGeometry()},Pl.prototype.setComputationPrecision=function(e){this._resultPrecisionModel=e,this._li.setPrecisionModel(this._resultPrecisionModel)},Pl.prototype.interfaces_=function(){return[]},Pl.prototype.getClass=function(){return Pl};var Ss=function(){};Ss.prototype.interfaces_=function(){return[]},Ss.prototype.getClass=function(){return Ss},Ss.map=function(){if(arguments[0]instanceof oe&&ae(arguments[1],Ss.MapOp)){for(var e=arguments[0],t=arguments[1],r=new W,i=0;i<e.getNumGeometries();i++){var s=t.map(e.getGeometryN(i));s!==null&&r.add(s)}return e.getFactory().buildGeometry(r)}else if(ae(arguments[0],nt)&&ae(arguments[1],Ss.MapOp)){for(var o=arguments[0],a=arguments[1],l=new W,u=o.iterator();u.hasNext();){var h=u.next(),f=a.map(h);f!==null&&l.add(f)}return l}},Ss.MapOp=function(){};var he=function(n){function e(){var t=arguments[0],r=arguments[1];n.call(this,t,r),this._ptLocator=new $r,this._geomFact=null,this._resultGeom=null,this._graph=null,this._edgeList=new Br,this._resultPolyList=new W,this._resultLineList=new W,this._resultPointList=new W,this._graph=new Ye(new qf),this._geomFact=t.getFactory()}return n&&(e.__proto__=n),e.prototype=Object.create(n&&n.prototype),e.prototype.constructor=e,e.prototype.insertUniqueEdge=function(r){var i=this._edgeList.findEqualEdge(r);if(i!==null){var s=i.getLabel(),o=r.getLabel();i.isPointwiseEqual(r)||(o=new be(r.getLabel()),o.flip());var a=i.getDepth();a.isNull()&&a.add(s),a.add(o),s.merge(o)}else this._edgeList.add(r)},e.prototype.getGraph=function(){return this._graph},e.prototype.cancelDuplicateResultEdges=function(){for(var r=this._graph.getEdgeEnds().iterator();r.hasNext();){var i=r.next(),s=i.getSym();i.isInResult()&&s.isInResult()&&(i.setInResult(!1),s.setInResult(!1))}},e.prototype.isCoveredByLA=function(r){return!!(this.isCovered(r,this._resultLineList)||this.isCovered(r,this._resultPolyList))},e.prototype.computeGeometry=function(r,i,s,o){var a=new W;return a.addAll(r),a.addAll(i),a.addAll(s),a.isEmpty()?e.createEmptyResult(o,this._arg[0].getGeometry(),this._arg[1].getGeometry(),this._geomFact):this._geomFact.buildGeometry(a)},e.prototype.mergeSymLabels=function(){for(var r=this._graph.getNodes().iterator();r.hasNext();){var i=r.next();i.getEdges().mergeSymLabels()}},e.prototype.isCovered=function(r,i){for(var s=this,o=i.iterator();o.hasNext();){var a=o.next(),l=s._ptLocator.locate(r,a);if(l!==R.EXTERIOR)return!0}return!1},e.prototype.replaceCollapsedEdges=function(){for(var r=new W,i=this._edgeList.iterator();i.hasNext();){var s=i.next();s.isCollapsed()&&(i.remove(),r.add(s.getCollapsedEdge()))}this._edgeList.addAll(r)},e.prototype.updateNodeLabelling=function(){for(var r=this._graph.getNodes().iterator();r.hasNext();){var i=r.next(),s=i.getEdges().getLabel();i.getLabel().merge(s)}},e.prototype.getResultGeometry=function(r){return this.computeOverlay(r),this._resultGeom},e.prototype.insertUniqueEdges=function(r){for(var i=this,s=r.iterator();s.hasNext();){var o=s.next();i.insertUniqueEdge(o)}},e.prototype.computeOverlay=function(r){this.copyPoints(0),this.copyPoints(1),this._arg[0].computeSelfNodes(this._li,!1),this._arg[1].computeSelfNodes(this._li,!1),this._arg[0].computeEdgeIntersections(this._arg[1],this._li,!0);var i=new W;this._arg[0].computeSplitEdges(i),this._arg[1].computeSplitEdges(i),this.insertUniqueEdges(i),this.computeLabelsFromDepths(),this.replaceCollapsedEdges(),ws.checkValid(this._edgeList.getEdges()),this._graph.addEdges(this._edgeList.getEdges()),this.computeLabelling(),this.labelIncompleteNodes(),this.findResultAreaEdges(r),this.cancelDuplicateResultEdges();var s=new er(this._geomFact);s.add(this._graph),this._resultPolyList=s.getPolygons();var o=new Sn(this,this._geomFact,this._ptLocator);this._resultLineList=o.build(r);var a=new lo(this,this._geomFact,this._ptLocator);this._resultPointList=a.build(r),this._resultGeom=this.computeGeometry(this._resultPointList,this._resultLineList,this._resultPolyList,r)},e.prototype.labelIncompleteNode=function(r,i){var s=this._ptLocator.locate(r.getCoordinate(),this._arg[i].getGeometry());r.getLabel().setLocation(i,s)},e.prototype.copyPoints=function(r){for(var i=this,s=this._arg[r].getNodeIterator();s.hasNext();){var o=s.next(),a=i._graph.addNode(o.getCoordinate());a.setLabel(r,o.getLabel().getLocation(r))}},e.prototype.findResultAreaEdges=function(r){for(var i=this._graph.getEdgeEnds().iterator();i.hasNext();){var s=i.next(),o=s.getLabel();o.isArea()&&!s.isInteriorAreaEdge()&&e.isResultOfOp(o.getLocation(0,G.RIGHT),o.getLocation(1,G.RIGHT),r)&&s.setInResult(!0)}},e.prototype.computeLabelsFromDepths=function(){for(var r=this._edgeList.iterator();r.hasNext();){var i=r.next(),s=i.getLabel(),o=i.getDepth();if(!o.isNull()){o.normalize();for(var a=0;a<2;a++)!s.isNull(a)&&s.isArea()&&!o.isNull(a)&&(o.getDelta(a)===0?s.toLine(a):(fe.isTrue(!o.isNull(a,G.LEFT),"depth of LEFT side has not been initialized"),s.setLocation(a,G.LEFT,o.getLocation(a,G.LEFT)),fe.isTrue(!o.isNull(a,G.RIGHT),"depth of RIGHT side has not been initialized"),s.setLocation(a,G.RIGHT,o.getLocation(a,G.RIGHT))))}}},e.prototype.computeLabelling=function(){for(var r=this,i=this._graph.getNodes().iterator();i.hasNext();){var s=i.next();s.getEdges().computeLabelling(r._arg)}this.mergeSymLabels(),this.updateNodeLabelling()},e.prototype.labelIncompleteNodes=function(){for(var r=this,i=this._graph.getNodes().iterator();i.hasNext();){var s=i.next(),o=s.getLabel();s.isIsolated()&&(o.isNull(0)?r.labelIncompleteNode(s,0):r.labelIncompleteNode(s,1)),s.getEdges().updateLabelling(o)}},e.prototype.isCoveredByA=function(r){return!!this.isCovered(r,this._resultPolyList)},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e}(Pl);he.overlayOp=function(n,e,t){var r=new he(n,e),i=r.getResultGeometry(t);return i},he.intersection=function(n,e){if(n.isEmpty()||e.isEmpty())return he.createEmptyResult(he.INTERSECTION,n,e,n.getFactory());if(n.isGeometryCollection()){var t=e;return ao.map(n,{interfaces_:function(){return[Ss.MapOp]},map:function(r){return r.intersection(t)}})}return n.checkNotGeometryCollection(n),n.checkNotGeometryCollection(e),Vt.overlayOp(n,e,he.INTERSECTION)},he.symDifference=function(n,e){if(n.isEmpty()||e.isEmpty()){if(n.isEmpty()&&e.isEmpty())return he.createEmptyResult(he.SYMDIFFERENCE,n,e,n.getFactory());if(n.isEmpty())return e.copy();if(e.isEmpty())return n.copy()}return n.checkNotGeometryCollection(n),n.checkNotGeometryCollection(e),Vt.overlayOp(n,e,he.SYMDIFFERENCE)},he.resultDimension=function(n,e,t){var r=e.getDimension(),i=t.getDimension(),s=-1;switch(n){case he.INTERSECTION:s=Math.min(r,i);break;case he.UNION:s=Math.max(r,i);break;case he.DIFFERENCE:s=r;break;case he.SYMDIFFERENCE:s=Math.max(r,i);break}return s},he.createEmptyResult=function(n,e,t,r){var i=null;switch(he.resultDimension(n,e,t)){case-1:i=r.createGeometryCollection(new Array(0).fill(null));break;case 0:i=r.createPoint();break;case 1:i=r.createLineString();break;case 2:i=r.createPolygon();break}return i},he.difference=function(n,e){return n.isEmpty()?he.createEmptyResult(he.DIFFERENCE,n,e,n.getFactory()):e.isEmpty()?n.copy():(n.checkNotGeometryCollection(n),n.checkNotGeometryCollection(e),Vt.overlayOp(n,e,he.DIFFERENCE))},he.isResultOfOp=function(){if(arguments.length===2){var n=arguments[0],e=arguments[1],t=n.getLocation(0),r=n.getLocation(1);return he.isResultOfOp(t,r,e)}else if(arguments.length===3){var i=arguments[0],s=arguments[1],o=arguments[2];switch(i===R.BOUNDARY&&(i=R.INTERIOR),s===R.BOUNDARY&&(s=R.INTERIOR),o){case he.INTERSECTION:return i===R.INTERIOR&&s===R.INTERIOR;case he.UNION:return i===R.INTERIOR||s===R.INTERIOR;case he.DIFFERENCE:return i===R.INTERIOR&&s!==R.INTERIOR;case he.SYMDIFFERENCE:return i===R.INTERIOR&&s!==R.INTERIOR||i!==R.INTERIOR&&s===R.INTERIOR}return!1}},he.INTERSECTION=1,he.UNION=2,he.DIFFERENCE=3,he.SYMDIFFERENCE=4;var Hi=function(){this._g=null,this._boundaryDistanceTolerance=null,this._linework=null,this._ptLocator=new $r,this._seg=new re;var e=arguments[0],t=arguments[1];this._g=e,this._boundaryDistanceTolerance=t,this._linework=this.extractLinework(e)};Hi.prototype.isWithinToleranceOfBoundary=function(e){for(var t=this,r=0;r<this._linework.getNumGeometries();r++)for(var i=t._linework.getGeometryN(r),s=i.getCoordinateSequence(),o=0;o<s.size()-1;o++){s.getCoordinate(o,t._seg.p0),s.getCoordinate(o+1,t._seg.p1);var a=t._seg.distance(e);if(a<=t._boundaryDistanceTolerance)return!0}return!1},Hi.prototype.getLocation=function(e){return this.isWithinToleranceOfBoundary(e)?R.BOUNDARY:this._ptLocator.locate(e,this._g)},Hi.prototype.extractLinework=function(e){var t=new Il;e.apply(t);var r=t.getLinework(),i=ge.toLineStringArray(r);return e.getFactory().createMultiLineString(i)},Hi.prototype.interfaces_=function(){return[]},Hi.prototype.getClass=function(){return Hi};var Il=function(){this._linework=null,this._linework=new W};Il.prototype.getLinework=function(){return this._linework},Il.prototype.filter=function(e){var t=this;if(e instanceof it){var r=e;this._linework.add(r.getExteriorRing());for(var i=0;i<r.getNumInteriorRing();i++)t._linework.add(r.getInteriorRingN(i))}},Il.prototype.interfaces_=function(){return[hn]},Il.prototype.getClass=function(){return Il};var Cs=function(){this._g=null,this._doLeft=!0,this._doRight=!0;var e=arguments[0];this._g=e};Cs.prototype.extractPoints=function(e,t,r){for(var i=this,s=e.getCoordinates(),o=0;o<s.length-1;o++)i.computeOffsetPoints(s[o],s[o+1],t,r)},Cs.prototype.setSidesToGenerate=function(e,t){this._doLeft=e,this._doRight=t},Cs.prototype.getPoints=function(e){for(var t=this,r=new W,i=wt.getLines(this._g),s=i.iterator();s.hasNext();){var o=s.next();t.extractPoints(o,e,r)}return r},Cs.prototype.computeOffsetPoints=function(e,t,r,i){var s=t.x-e.x,o=t.y-e.y,a=Math.sqrt(s*s+o*o),l=r*s/a,u=r*o/a,h=(t.x+e.x)/2,f=(t.y+e.y)/2;if(this._doLeft){var p=new M(h-u,f+l);i.add(p)}if(this._doRight){var v=new M(h+u,f-l);i.add(v)}},Cs.prototype.interfaces_=function(){return[]},Cs.prototype.getClass=function(){return Cs};var pr=function n(){this._geom=null,this._locFinder=null,this._location=new Array(3).fill(null),this._invalidLocation=null,this._boundaryDistanceTolerance=n.TOLERANCE,this._testCoords=new W;var e=arguments[0],t=arguments[1],r=arguments[2];this._boundaryDistanceTolerance=n.computeBoundaryDistanceTolerance(e,t),this._geom=[e,t,r],this._locFinder=[new Hi(this._geom[0],this._boundaryDistanceTolerance),new Hi(this._geom[1],this._boundaryDistanceTolerance),new Hi(this._geom[2],this._boundaryDistanceTolerance)]},jf={TOLERANCE:{configurable:!0}};pr.prototype.reportResult=function(e,t,r){vt.out.println("Overlay result invalid - A:"+R.toLocationSymbol(t[0])+" B:"+R.toLocationSymbol(t[1])+" expected:"+(r?"i":"e")+" actual:"+R.toLocationSymbol(t[2]))},pr.prototype.isValid=function(e){this.addTestPts(this._geom[0]),this.addTestPts(this._geom[1]);var t=this.checkValid(e);return t},pr.prototype.checkValid=function(){var e=this;if(arguments.length===1){for(var t=arguments[0],r=0;r<this._testCoords.size();r++){var i=e._testCoords.get(r);if(!e.checkValid(t,i))return e._invalidLocation=i,!1}return!0}else if(arguments.length===2){var s=arguments[0],o=arguments[1];return this._location[0]=this._locFinder[0].getLocation(o),this._location[1]=this._locFinder[1].getLocation(o),this._location[2]=this._locFinder[2].getLocation(o),pr.hasLocation(this._location,R.BOUNDARY)?!0:this.isValidResult(s,this._location)}},pr.prototype.addTestPts=function(e){var t=new Cs(e);this._testCoords.addAll(t.getPoints(5*this._boundaryDistanceTolerance))},pr.prototype.isValidResult=function(e,t){var r=he.isResultOfOp(t[0],t[1],e),i=t[2]===R.INTERIOR,s=!(r^i);return s||this.reportResult(e,t,r),s},pr.prototype.getInvalidLocation=function(){return this._invalidLocation},pr.prototype.interfaces_=function(){return[]},pr.prototype.getClass=function(){return pr},pr.hasLocation=function(e,t){for(var r=0;r<3;r++)if(e[r]===t)return!0;return!1},pr.computeBoundaryDistanceTolerance=function(e,t){return Math.min($e.computeSizeBasedSnapTolerance(e),$e.computeSizeBasedSnapTolerance(t))},pr.isValid=function(e,t,r,i){var s=new pr(e,t,i);return s.isValid(r)},jf.TOLERANCE.get=function(){return 1e-6},Object.defineProperties(pr,jf);var gr=function n(e){this._geomFactory=null,this._skipEmpty=!1,this._inputGeoms=null,this._geomFactory=n.extractFactory(e),this._inputGeoms=e};gr.prototype.extractElements=function(e,t){var r=this;if(e===null)return null;for(var i=0;i<e.getNumGeometries();i++){var s=e.getGeometryN(i);r._skipEmpty&&s.isEmpty()||t.add(s)}},gr.prototype.combine=function(){for(var e=this,t=new W,r=this._inputGeoms.iterator();r.hasNext();){var i=r.next();e.extractElements(i,t)}return t.size()===0?this._geomFactory!==null?this._geomFactory.createGeometryCollection(null):null:this._geomFactory.buildGeometry(t)},gr.prototype.interfaces_=function(){return[]},gr.prototype.getClass=function(){return gr},gr.combine=function(){if(arguments.length===1){var e=arguments[0],t=new gr(e);return t.combine()}else if(arguments.length===2){var r=arguments[0],i=arguments[1],s=new gr(gr.createList(r,i));return s.combine()}else if(arguments.length===3){var o=arguments[0],a=arguments[1],l=arguments[2],u=new gr(gr.createList(o,a,l));return u.combine()}},gr.extractFactory=function(e){return e.isEmpty()?null:e.iterator().next().getFactory()},gr.createList=function(){if(arguments.length===2){var e=arguments[0],t=arguments[1],r=new W;return r.add(e),r.add(t),r}else if(arguments.length===3){var i=arguments[0],s=arguments[1],o=arguments[2],a=new W;return a.add(i),a.add(s),a.add(o),a}};var tt=function(){this._inputPolys=null,this._geomFactory=null;var e=arguments[0];this._inputPolys=e,this._inputPolys===null&&(this._inputPolys=new W)},ed={STRTREE_NODE_CAPACITY:{configurable:!0}};tt.prototype.reduceToGeometries=function(e){for(var t=this,r=new W,i=e.iterator();i.hasNext();){var s=i.next(),o=null;ae(s,Yr)?o=t.unionTree(s):s instanceof oe&&(o=s),r.add(o)}return r},tt.prototype.extractByEnvelope=function(e,t,r){for(var i=new W,s=0;s<t.getNumGeometries();s++){var o=t.getGeometryN(s);o.getEnvelopeInternal().intersects(e)?i.add(o):r.add(o)}return this._geomFactory.buildGeometry(i)},tt.prototype.unionOptimized=function(e,t){var r=e.getEnvelopeInternal(),i=t.getEnvelopeInternal();if(!r.intersects(i)){var s=gr.combine(e,t);return s}if(e.getNumGeometries()<=1&&t.getNumGeometries()<=1)return this.unionActual(e,t);var o=r.intersection(i);return this.unionUsingEnvelopeIntersection(e,t,o)},tt.prototype.union=function(){if(this._inputPolys===null)throw new Error("union() method cannot be called twice");if(this._inputPolys.isEmpty())return null;this._geomFactory=this._inputPolys.iterator().next().getFactory();for(var e=new kf(tt.STRTREE_NODE_CAPACITY),t=this._inputPolys.iterator();t.hasNext();){var r=t.next();e.insert(r.getEnvelopeInternal(),r)}this._inputPolys=null;var i=e.itemsTree(),s=this.unionTree(i);return s},tt.prototype.binaryUnion=function(){if(arguments.length===1){var e=arguments[0];return this.binaryUnion(e,0,e.size())}else if(arguments.length===3){var t=arguments[0],r=arguments[1],i=arguments[2];if(i-r<=1){var s=tt.getGeometry(t,r);return this.unionSafe(s,null)}else{if(i-r===2)return this.unionSafe(tt.getGeometry(t,r),tt.getGeometry(t,r+1));var o=Math.trunc((i+r)/2),a=this.binaryUnion(t,r,o),l=this.binaryUnion(t,o,i);return this.unionSafe(a,l)}}},tt.prototype.repeatedUnion=function(e){for(var t=null,r=e.iterator();r.hasNext();){var i=r.next();t===null?t=i.copy():t=t.union(i)}return t},tt.prototype.unionSafe=function(e,t){return e===null&&t===null?null:e===null?t.copy():t===null?e.copy():this.unionOptimized(e,t)},tt.prototype.unionActual=function(e,t){return tt.restrictToPolygons(e.union(t))},tt.prototype.unionTree=function(e){var t=this.reduceToGeometries(e),r=this.binaryUnion(t);return r},tt.prototype.unionUsingEnvelopeIntersection=function(e,t,r){var i=new W,s=this.extractByEnvelope(r,e,i),o=this.extractByEnvelope(r,t,i),a=this.unionActual(s,o);i.add(a);var l=gr.combine(i);return l},tt.prototype.bufferUnion=function(){if(arguments.length===1){var e=arguments[0],t=e.get(0).getFactory(),r=t.buildGeometry(e),i=r.buffer(0);return i}else if(arguments.length===2){var s=arguments[0],o=arguments[1],a=s.getFactory(),l=a.createGeometryCollection([s,o]),u=l.buffer(0);return u}},tt.prototype.interfaces_=function(){return[]},tt.prototype.getClass=function(){return tt},tt.restrictToPolygons=function(e){if(ae(e,Ri))return e;var t=mi.getPolygons(e);return t.size()===1?t.get(0):e.getFactory().createMultiPolygon(ge.toPolygonArray(t))},tt.getGeometry=function(e,t){return t>=e.size()?null:e.get(t)},tt.union=function(e){var t=new tt(e);return t.union()},ed.STRTREE_NODE_CAPACITY.get=function(){return 4},Object.defineProperties(tt,ed);var Ju=function(){};Ju.prototype.interfaces_=function(){return[]},Ju.prototype.getClass=function(){return Ju},Ju.union=function(e,t){if(e.isEmpty()||t.isEmpty()){if(e.isEmpty()&&t.isEmpty())return he.createEmptyResult(he.UNION,e,t,e.getFactory());if(e.isEmpty())return t.copy();if(t.isEmpty())return e.copy()}return e.checkNotGeometryCollection(e),e.checkNotGeometryCollection(t),Vt.overlayOp(e,t,he.UNION)};function Ps(){return new Zu}function Zu(){this.reset()}Zu.prototype={constructor:Zu,reset:function(){this.s=this.t=0},add:function(n){td(Ku,n,this.t),td(this,Ku.s,this.s),this.s?this.t+=Ku.t:this.s=Ku.t},valueOf:function(){return this.s}};var Ku=new Zu;function td(n,e,t){var r=n.s=e+t,i=r-e,s=r-i;n.t=e-s+(t-i)}var rt=1e-6,Le=Math.PI,vi=Le/2,rd=Le/4,yi=Le*2,Is=180/Le,Cn=Le/180,zt=Math.abs,sv=Math.atan,Tl=Math.atan2,ot=Math.cos,at=Math.sin,Dl=Math.sqrt;function nd(n){return n>1?0:n<-1?Le:Math.acos(n)}function co(n){return n>1?vi:n<-1?-vi:Math.asin(n)}function uu(){}function Qu(n,e){n&&sd.hasOwnProperty(n.type)&&sd[n.type](n,e)}var id={Feature:function(n,e){Qu(n.geometry,e)},FeatureCollection:function(n,e){for(var t=n.features,r=-1,i=t.length;++r<i;)Qu(t[r].geometry,e)}},sd={Sphere:function(n,e){e.sphere()},Point:function(n,e){n=n.coordinates,e.point(n[0],n[1],n[2])},MultiPoint:function(n,e){for(var t=n.coordinates,r=-1,i=t.length;++r<i;)n=t[r],e.point(n[0],n[1],n[2])},LineString:function(n,e){th(n.coordinates,e,0)},MultiLineString:function(n,e){for(var t=n.coordinates,r=-1,i=t.length;++r<i;)th(t[r],e,0)},Polygon:function(n,e){od(n.coordinates,e)},MultiPolygon:function(n,e){for(var t=n.coordinates,r=-1,i=t.length;++r<i;)od(t[r],e)},GeometryCollection:function(n,e){for(var t=n.geometries,r=-1,i=t.length;++r<i;)Qu(t[r],e)}};function th(n,e,t){var r=-1,i=n.length-t,s;for(e.lineStart();++r<i;)s=n[r],e.point(s[0],s[1],s[2]);e.lineEnd()}function od(n,e){var t=-1,r=n.length;for(e.polygonStart();++t<r;)th(n[t],e,1);e.polygonEnd()}function ov(n,e){n&&id.hasOwnProperty(n.type)?id[n.type](n,e):Qu(n,e)}Ps(),Ps();function rh(n){return[Tl(n[1],n[0]),co(n[2])]}function Nl(n){var e=n[0],t=n[1],r=ot(t);return[r*ot(e),r*at(e),at(t)]}function Bu(n,e){return n[0]*e[0]+n[1]*e[1]+n[2]*e[2]}function $u(n,e){return[n[1]*e[2]-n[2]*e[1],n[2]*e[0]-n[0]*e[2],n[0]*e[1]-n[1]*e[0]]}function nh(n,e){n[0]+=e[0],n[1]+=e[1],n[2]+=e[2]}function ju(n,e){return[n[0]*e,n[1]*e,n[2]*e]}function ih(n){var e=Dl(n[0]*n[0]+n[1]*n[1]+n[2]*n[2]);n[0]/=e,n[1]/=e,n[2]/=e}Ps();function ad(n,e){function t(r,i){return r=n(r,i),e(r[0],r[1])}return n.invert&&e.invert&&(t.invert=function(r,i){return r=e.invert(r,i),r&&n.invert(r[0],r[1])}),t}function sh(n,e){return[n>Le?n-yi:n<-Le?n+yi:n,e]}sh.invert=sh;function av(n,e,t){return(n%=yi)?e||t?ad(ud(n),cd(e,t)):ud(n):e||t?cd(e,t):sh}function ld(n){return function(e,t){return e+=n,[e>Le?e-yi:e<-Le?e+yi:e,t]}}function ud(n){var e=ld(n);return e.invert=ld(-n),e}function cd(n,e){var t=ot(n),r=at(n),i=ot(e),s=at(e);function o(a,l){var u=ot(l),h=ot(a)*u,f=at(a)*u,p=at(l),v=p*t+h*r;return[Tl(f*i-v*s,h*t-p*r),co(v*i+f*s)]}return o.invert=function(a,l){var u=ot(l),h=ot(a)*u,f=at(a)*u,p=at(l),v=p*i-f*s;return[Tl(f*i+p*s,h*t+v*r),co(v*t-h*r)]},o}function lv(n,e,t,r,i,s){if(t){var o=ot(e),a=at(e),l=r*t;i==null?(i=e+r*yi,s=e-l/2):(i=hd(o,i),s=hd(o,s),(r>0?i<s:i>s)&&(i+=r*yi));for(var u,h=i;r>0?h>s:h<s;h-=l)u=rh([o,-a*ot(h),-a*at(h)]),n.point(u[0],u[1])}}function hd(n,e){e=Nl(e),e[0]-=n,ih(e);var t=nd(-e[1]);return((-e[2]<0?-t:t)+yi-rt)%yi}function fd(){var n=[],e;return{point:function(t,r){e.push([t,r])},lineStart:function(){n.push(e=[])},lineEnd:uu,rejoin:function(){n.length>1&&n.push(n.pop().concat(n.shift()))},result:function(){var t=n;return n=[],e=null,t}}}function uv(n,e,t,r,i,s){var o=n[0],a=n[1],l=e[0],u=e[1],h=0,f=1,p=l-o,v=u-a,w;if(w=t-o,!(!p&&w>0)){if(w/=p,p<0){if(w<h)return;w<f&&(f=w)}else if(p>0){if(w>f)return;w>h&&(h=w)}if(w=i-o,!(!p&&w<0)){if(w/=p,p<0){if(w>f)return;w>h&&(h=w)}else if(p>0){if(w<h)return;w<f&&(f=w)}if(w=r-a,!(!v&&w>0)){if(w/=v,v<0){if(w<h)return;w<f&&(f=w)}else if(v>0){if(w>f)return;w>h&&(h=w)}if(w=s-a,!(!v&&w<0)){if(w/=v,v<0){if(w>f)return;w>h&&(h=w)}else if(v>0){if(w<h)return;w<f&&(f=w)}return h>0&&(n[0]=o+h*p,n[1]=a+h*v),f<1&&(e[0]=o+f*p,e[1]=a+f*v),!0}}}}}function ec(n,e){return zt(n[0]-e[0])<rt&&zt(n[1]-e[1])<rt}function tc(n,e,t,r){this.x=n,this.z=e,this.o=t,this.e=r,this.v=!1,this.n=this.p=null}function dd(n,e,t,r,i){var s=[],o=[],a,l;if(n.forEach(function(w){if(!((I=w.length-1)<=0)){var I,T=w[0],L=w[I],m;if(ec(T,L)){for(i.lineStart(),a=0;a<I;++a)i.point((T=w[a])[0],T[1]);i.lineEnd();return}s.push(m=new tc(T,w,null,!0)),o.push(m.o=new tc(T,null,m,!1)),s.push(m=new tc(L,w,null,!1)),o.push(m.o=new tc(L,null,m,!0))}}),!!s.length){for(o.sort(e),pd(s),pd(o),a=0,l=o.length;a<l;++a)o[a].e=t=!t;for(var u=s[0],h,f;;){for(var p=u,v=!0;p.v;)if((p=p.n)===u)return;h=p.z,i.lineStart();do{if(p.v=p.o.v=!0,p.e){if(v)for(a=0,l=h.length;a<l;++a)i.point((f=h[a])[0],f[1]);else r(p.x,p.n.x,1,i);p=p.n}else{if(v)for(h=p.p.z,a=h.length-1;a>=0;--a)i.point((f=h[a])[0],f[1]);else r(p.x,p.p.x,-1,i);p=p.p}p=p.o,h=p.z,v=!v}while(!p.v);i.lineEnd()}}}function pd(n){if(e=n.length){for(var e,t=0,r=n[0],i;++t<e;)r.n=i=n[t],i.p=r,r=i;r.n=i=n[0],i.p=r}}function gd(n,e){return n<e?-1:n>e?1:n>=e?0:NaN}function cv(n){return n.length===1&&(n=hv(n)),{left:function(e,t,r,i){for(r==null&&(r=0),i==null&&(i=e.length);r<i;){var s=r+i>>>1;n(e[s],t)<0?r=s+1:i=s}return r},right:function(e,t,r,i){for(r==null&&(r=0),i==null&&(i=e.length);r<i;){var s=r+i>>>1;n(e[s],t)>0?i=s:r=s+1}return r}}}function hv(n){return function(e,t){return gd(n(e),t)}}cv(gd);function md(n){for(var e=n.length,t,r=-1,i=0,s,o;++r<e;)i+=n[r].length;for(s=new Array(i);--e>=0;)for(o=n[e],t=o.length;--t>=0;)s[--i]=o[t];return s}var rc=1e9,nc=-1e9;function fv(n,e,t,r){function i(u,h){return n<=u&&u<=t&&e<=h&&h<=r}function s(u,h,f,p){var v=0,w=0;if(u==null||(v=o(u,f))!==(w=o(h,f))||l(u,h)<0^f>0)do p.point(v===0||v===3?n:t,v>1?r:e);while((v=(v+f+4)%4)!==w);else p.point(h[0],h[1])}function o(u,h){return zt(u[0]-n)<rt?h>0?0:3:zt(u[0]-t)<rt?h>0?2:1:zt(u[1]-e)<rt?h>0?1:0:h>0?3:2}function a(u,h){return l(u.x,h.x)}function l(u,h){var f=o(u,1),p=o(h,1);return f!==p?f-p:f===0?h[1]-u[1]:f===1?u[0]-h[0]:f===2?u[1]-h[1]:h[0]-u[0]}return function(u){var h=u,f=fd(),p,v,w,I,T,L,m,_,g,y,E,C={point:D,lineStart:O,lineEnd:A,polygonStart:x,polygonEnd:N};function D(B,X){i(B,X)&&h.point(B,X)}function b(){for(var B=0,X=0,ne=v.length;X<ne;++X)for(var ce=v[X],de=1,K=ce.length,$=ce[0],ee,ye,Oe=$[0],Ce=$[1];de<K;++de)ee=Oe,ye=Ce,$=ce[de],Oe=$[0],Ce=$[1],ye<=r?Ce>r&&(Oe-ee)*(r-ye)>(Ce-ye)*(n-ee)&&++B:Ce<=r&&(Oe-ee)*(r-ye)<(Ce-ye)*(n-ee)&&--B;return B}function x(){h=f,p=[],v=[],E=!0}function N(){var B=b(),X=E&&B,ne=(p=md(p)).length;(X||ne)&&(u.polygonStart(),X&&(u.lineStart(),s(null,null,1,u),u.lineEnd()),ne&&dd(p,a,B,s,u),u.polygonEnd()),h=u,p=v=w=null}function O(){C.point=k,v&&v.push(w=[]),y=!0,g=!1,m=_=NaN}function A(){p&&(k(I,T),L&&g&&f.rejoin(),p.push(f.result())),C.point=D,g&&h.lineEnd()}function k(B,X){var ne=i(B,X);if(v&&w.push([B,X]),y)I=B,T=X,L=ne,y=!1,ne&&(h.lineStart(),h.point(B,X));else if(ne&&g)h.point(B,X);else{var ce=[m=Math.max(nc,Math.min(rc,m)),_=Math.max(nc,Math.min(rc,_))],de=[B=Math.max(nc,Math.min(rc,B)),X=Math.max(nc,Math.min(rc,X))];uv(ce,de,n,e,t,r)?(g||(h.lineStart(),h.point(ce[0],ce[1])),h.point(de[0],de[1]),ne||h.lineEnd(),E=!1):ne&&(h.lineStart(),h.point(B,X),E=!1)}m=B,_=X,g=ne}return C}}var oh=Ps();function dv(n,e){var t=e[0],r=e[1],i=[at(t),-ot(t),0],s=0,o=0;oh.reset();for(var a=0,l=n.length;a<l;++a)if(h=(u=n[a]).length)for(var u,h,f=u[h-1],p=f[0],v=f[1]/2+rd,w=at(v),I=ot(v),T=0;T<h;++T,p=m,w=g,I=y,f=L){var L=u[T],m=L[0],_=L[1]/2+rd,g=at(_),y=ot(_),E=m-p,C=E>=0?1:-1,D=C*E,b=D>Le,x=w*g;if(oh.add(Tl(x*C*at(D),I*y+x*ot(D))),s+=b?E+C*yi:E,b^p>=t^m>=t){var N=$u(Nl(f),Nl(L));ih(N);var O=$u(i,N);ih(O);var A=(b^E>=0?-1:1)*co(O[2]);(r>A||r===A&&(N[0]||N[1]))&&(o+=b^E>=0?1:-1)}}return(s<-1e-6||s<rt&&oh<-1e-6)^o&1}Ps();function vd(n){return n}Ps(),Ps();var bl=1/0,ic=bl,cu=-bl,sc=cu,yd={point:pv,lineStart:uu,lineEnd:uu,polygonStart:uu,polygonEnd:uu,result:function(){var n=[[bl,ic],[cu,sc]];return cu=sc=-(ic=bl=1/0),n}};function pv(n,e){n<bl&&(bl=n),n>cu&&(cu=n),e<ic&&(ic=e),e>sc&&(sc=e)}Ps();function _d(n,e,t,r){return function(i,s){var o=e(s),a=i.invert(r[0],r[1]),l=fd(),u=e(l),h=!1,f,p,v,w={point:I,lineStart:L,lineEnd:m,polygonStart:function(){w.point=_,w.lineStart=g,w.lineEnd=y,p=[],f=[]},polygonEnd:function(){w.point=I,w.lineStart=L,w.lineEnd=m,p=md(p);var E=dv(f,a);p.length?(h||(s.polygonStart(),h=!0),dd(p,mv,E,t,s)):E&&(h||(s.polygonStart(),h=!0),s.lineStart(),t(null,null,1,s),s.lineEnd()),h&&(s.polygonEnd(),h=!1),p=f=null},sphere:function(){s.polygonStart(),s.lineStart(),t(null,null,1,s),s.lineEnd(),s.polygonEnd()}};function I(E,C){var D=i(E,C);n(E=D[0],C=D[1])&&s.point(E,C)}function T(E,C){var D=i(E,C);o.point(D[0],D[1])}function L(){w.point=T,o.lineStart()}function m(){w.point=I,o.lineEnd()}function _(E,C){v.push([E,C]);var D=i(E,C);u.point(D[0],D[1])}function g(){u.lineStart(),v=[]}function y(){_(v[0][0],v[0][1]),u.lineEnd();var E=u.clean(),C=l.result(),D,b=C.length,x,N,O;if(v.pop(),f.push(v),v=null,!!b){if(E&1){if(N=C[0],(x=N.length-1)>0){for(h||(s.polygonStart(),h=!0),s.lineStart(),D=0;D<x;++D)s.point((O=N[D])[0],O[1]);s.lineEnd()}return}b>1&&E&2&&C.push(C.pop().concat(C.shift())),p.push(C.filter(gv))}}return w}}function gv(n){return n.length>1}function mv(n,e){return((n=n.x)[0]<0?n[1]-vi-rt:vi-n[1])-((e=e.x)[0]<0?e[1]-vi-rt:vi-e[1])}const wd=_d(function(){return!0},vv,_v,[-Le,-vi]);function vv(n){var e=NaN,t=NaN,r=NaN,i;return{lineStart:function(){n.lineStart(),i=1},point:function(s,o){var a=s>0?Le:-Le,l=zt(s-e);zt(l-Le)<rt?(n.point(e,t=(t+o)/2>0?vi:-vi),n.point(r,t),n.lineEnd(),n.lineStart(),n.point(a,t),n.point(s,t),i=0):r!==a&&l>=Le&&(zt(e-r)<rt&&(e-=r*rt),zt(s-a)<rt&&(s-=a*rt),t=yv(e,t,s,o),n.point(r,t),n.lineEnd(),n.lineStart(),n.point(a,t),i=0),n.point(e=s,t=o),r=a},lineEnd:function(){n.lineEnd(),e=t=NaN},clean:function(){return 2-i}}}function yv(n,e,t,r){var i,s,o=at(n-t);return zt(o)>rt?sv((at(e)*(s=ot(r))*at(t)-at(r)*(i=ot(e))*at(n))/(i*s*o)):(e+r)/2}function _v(n,e,t,r){var i;if(n==null)i=t*vi,r.point(-Le,i),r.point(0,i),r.point(Le,i),r.point(Le,0),r.point(Le,-i),r.point(0,-i),r.point(-Le,-i),r.point(-Le,0),r.point(-Le,i);else if(zt(n[0]-e[0])>rt){var s=n[0]<e[0]?Le:-Le;i=t*s/2,r.point(-s,i),r.point(0,i),r.point(s,i)}else r.point(e[0],e[1])}function wv(n,e){var t=ot(n),r=t>0,i=zt(t)>rt;function s(h,f,p,v){lv(v,n,e,p,h,f)}function o(h,f){return ot(h)*ot(f)>t}function a(h){var f,p,v,w,I;return{lineStart:function(){w=v=!1,I=1},point:function(T,L){var m=[T,L],_,g=o(T,L),y=r?g?0:u(T,L):g?u(T+(T<0?Le:-Le),L):0;if(!f&&(w=v=g)&&h.lineStart(),g!==v&&(_=l(f,m),(!_||ec(f,_)||ec(m,_))&&(m[0]+=rt,m[1]+=rt,g=o(m[0],m[1]))),g!==v)I=0,g?(h.lineStart(),_=l(m,f),h.point(_[0],_[1])):(_=l(f,m),h.point(_[0],_[1]),h.lineEnd()),f=_;else if(i&&f&&r^g){var E;!(y&p)&&(E=l(m,f,!0))&&(I=0,r?(h.lineStart(),h.point(E[0][0],E[0][1]),h.point(E[1][0],E[1][1]),h.lineEnd()):(h.point(E[1][0],E[1][1]),h.lineEnd(),h.lineStart(),h.point(E[0][0],E[0][1])))}g&&(!f||!ec(f,m))&&h.point(m[0],m[1]),f=m,v=g,p=y},lineEnd:function(){v&&h.lineEnd(),f=null},clean:function(){return I|(w&&v)<<1}}}function l(h,f,p){var v=Nl(h),w=Nl(f),I=[1,0,0],T=$u(v,w),L=Bu(T,T),m=T[0],_=L-m*m;if(!_)return!p&&h;var g=t*L/_,y=-t*m/_,E=$u(I,T),C=ju(I,g),D=ju(T,y);nh(C,D);var b=E,x=Bu(C,b),N=Bu(b,b),O=x*x-N*(Bu(C,C)-1);if(!(O<0)){var A=Dl(O),k=ju(b,(-x-A)/N);if(nh(k,C),k=rh(k),!p)return k;var B=h[0],X=f[0],ne=h[1],ce=f[1],de;X<B&&(de=B,B=X,X=de);var K=X-B,$=zt(K-Le)<rt,ee=$||K<rt;if(!$&&ce<ne&&(de=ne,ne=ce,ce=de),ee?$?ne+ce>0^k[1]<(zt(k[0]-B)<rt?ne:ce):ne<=k[1]&&k[1]<=ce:K>Le^(B<=k[0]&&k[0]<=X)){var ye=ju(b,(-x+A)/N);return nh(ye,C),[k,rh(ye)]}}}function u(h,f){var p=r?n:Le-n,v=0;return h<-p?v|=1:h>p&&(v|=2),f<-p?v|=4:f>p&&(v|=8),v}return _d(o,a,s,r?[0,-n]:[-Le,n-Le])}function Ed(n){return function(e){var t=new ah;for(var r in n)t[r]=n[r];return t.stream=e,t}}function ah(){}ah.prototype={constructor:ah,point:function(n,e){this.stream.point(n,e)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}};function Sd(n,e,t){var r=e[1][0]-e[0][0],i=e[1][1]-e[0][1],s=n.clipExtent&&n.clipExtent();n.scale(150).translate([0,0]),s!=null&&n.clipExtent(null),ov(t,n.stream(yd));var o=yd.result(),a=Math.min(r/(o[1][0]-o[0][0]),i/(o[1][1]-o[0][1])),l=+e[0][0]+(r-a*(o[1][0]+o[0][0]))/2,u=+e[0][1]+(i-a*(o[1][1]+o[0][1]))/2;return s!=null&&n.clipExtent(s),n.scale(a*150).translate([l,u])}function Ev(n,e,t){return Sd(n,[[0,0],e],t)}var Cd=16,Sv=ot(30*Cn);function Pd(n,e){return+e?Pv(n,e):Cv(n)}function Cv(n){return Ed({point:function(e,t){e=n(e,t),this.stream.point(e[0],e[1])}})}function Pv(n,e){function t(r,i,s,o,a,l,u,h,f,p,v,w,I,T){var L=u-r,m=h-i,_=L*L+m*m;if(_>4*e&&I--){var g=o+p,y=a+v,E=l+w,C=Dl(g*g+y*y+E*E),D=co(E/=C),b=zt(zt(E)-1)<rt||zt(s-f)<rt?(s+f)/2:Tl(y,g),x=n(b,D),N=x[0],O=x[1],A=N-r,k=O-i,B=m*A-L*k;(B*B/_>e||zt((L*A+m*k)/_-.5)>.3||o*p+a*v+l*w<Sv)&&(t(r,i,s,o,a,l,N,O,b,g/=C,y/=C,E,I,T),T.point(N,O),t(N,O,b,g,y,E,u,h,f,p,v,w,I,T))}}return function(r){var i,s,o,a,l,u,h,f,p,v,w,I,T={point:L,lineStart:m,lineEnd:g,polygonStart:function(){r.polygonStart(),T.lineStart=y},polygonEnd:function(){r.polygonEnd(),T.lineStart=m}};function L(D,b){D=n(D,b),r.point(D[0],D[1])}function m(){f=NaN,T.point=_,r.lineStart()}function _(D,b){var x=Nl([D,b]),N=n(D,b);t(f,p,h,v,w,I,f=N[0],p=N[1],h=D,v=x[0],w=x[1],I=x[2],Cd,r),r.point(f,p)}function g(){T.point=L,r.lineEnd()}function y(){m(),T.point=E,T.lineEnd=C}function E(D,b){_(i=D,b),s=f,o=p,a=v,l=w,u=I,T.point=_}function C(){t(f,p,h,v,w,I,s,o,i,a,l,u,Cd,r),T.lineEnd=g,g()}return T}}var Iv=Ed({point:function(n,e){this.stream.point(n*Cn,e*Cn)}});function Tv(n){return Dv(function(){return n})()}function Dv(n){var e,t=150,r=480,i=250,s,o,a=0,l=0,u=0,h=0,f=0,p,v,w=null,I=wd,T=null,L,m,_,g=vd,y=.5,E=Pd(N,y),C,D;function b(k){return k=v(k[0]*Cn,k[1]*Cn),[k[0]*t+s,o-k[1]*t]}function x(k){return k=v.invert((k[0]-s)/t,(o-k[1])/t),k&&[k[0]*Is,k[1]*Is]}function N(k,B){return k=e(k,B),[k[0]*t+s,o-k[1]*t]}b.stream=function(k){return C&&D===k?C:C=Iv(I(p,E(g(D=k))))},b.clipAngle=function(k){return arguments.length?(I=+k?wv(w=k*Cn,6*Cn):(w=null,wd),A()):w*Is},b.clipExtent=function(k){return arguments.length?(g=k==null?(T=L=m=_=null,vd):fv(T=+k[0][0],L=+k[0][1],m=+k[1][0],_=+k[1][1]),A()):T==null?null:[[T,L],[m,_]]},b.scale=function(k){return arguments.length?(t=+k,O()):t},b.translate=function(k){return arguments.length?(r=+k[0],i=+k[1],O()):[r,i]},b.center=function(k){return arguments.length?(a=k[0]%360*Cn,l=k[1]%360*Cn,O()):[a*Is,l*Is]},b.rotate=function(k){return arguments.length?(u=k[0]%360*Cn,h=k[1]%360*Cn,f=k.length>2?k[2]%360*Cn:0,O()):[u*Is,h*Is,f*Is]},b.precision=function(k){return arguments.length?(E=Pd(N,y=k*k),A()):Dl(y)},b.fitExtent=function(k,B){return Sd(b,k,B)},b.fitSize=function(k,B){return Ev(b,k,B)};function O(){v=ad(p=av(u,h,f),e);var k=e(a,l);return s=r-k[0]*t,o=i+k[1]*t,A()}function A(){return C=D=null,b}return function(){return e=n.apply(this,arguments),b.invert=e.invert&&x,O()}}function Id(n){return function(e,t){var r=ot(e),i=ot(t),s=n(r*i);return[s*i*at(e),s*at(t)]}}function Td(n){return function(e,t){var r=Dl(e*e+t*t),i=n(r),s=at(i),o=ot(i);return[Tl(e*s,r*o),co(r&&t*s/r)]}}var Nv=Id(function(n){return Dl(2/(1+n))});Nv.invert=Td(function(n){return 2*co(n/2)});var Dd=Id(function(n){return(n=nd(n))&&n/at(n)});Dd.invert=Td(function(n){return n});function bv(){return Tv(Dd).scale(79.4188).clipAngle(180-.001)}function Nd(n,e){return[n,e]}Nd.invert=Nd;function Ov(n,e,t){t=t||{};var r=t.units||"kilometers",i=t.steps||8;if(!n)throw new Error("geojson is required");if(typeof t!="object")throw new Error("options must be an object");if(typeof i!="number")throw new Error("steps must be an number");if(e===void 0)throw new Error("radius is required");if(i<=0)throw new Error("steps must be greater than 0");var s=[];switch(n.type){case"GeometryCollection":return Iu(n,function(o){var a=oc(o,e,r,i);a&&s.push(a)}),el(s);case"FeatureCollection":return Pu(n,function(o){var a=oc(o,e,r,i);a&&Pu(a,function(l){l&&s.push(l)})}),el(s)}return oc(n,e,r,i)}function oc(n,e,t,r){var i=n.properties||{},s=n.type==="Feature"?n.geometry:n;if(s.type==="GeometryCollection"){var o=[];return Iu(n,function(I){var T=oc(I,e,t,r);T&&o.push(T)}),el(o)}var a=Mv(s),l={type:s.type,coordinates:Od(s.coordinates,a)},u=new Hc,h=u.read(l),f=Ic(Tc(e,t),"meters"),p=_t.bufferOp(h,f,r),v=new Rf;if(p=v.write(p),!bd(p.coordinates)){var w={type:p.type,coordinates:Md(p.coordinates,a)};return bn(w,i)}}function bd(n){return Array.isArray(n[0])?bd(n[0]):isNaN(n[0])}function Od(n,e){return typeof n[0]!="object"?e(n):n.map(function(t){return Od(t,e)})}function Md(n,e){return typeof n[0]!="object"?e.invert(n):n.map(function(t){return Md(t,e)})}function Mv(n){var e=Gm(n).geometry.coordinates,t=[-e[0],-e[1]];return bv().rotate(t).scale(Ut)}function xv(n,e,t){t===void 0&&(t={});for(var r=t.steps||64,i=t.properties?t.properties:!Array.isArray(n)&&n.type==="Feature"&&n.properties?n.properties:{},s=[],o=0;o<r;o++)s.push(tl(n,e,o*-360/r,t).geometry.coordinates);return s.push(s[0]),ar([s],i)}/**
1
+ (function(C,h){typeof exports=="object"&&typeof module<"u"?h(exports,require("xbsj-base"),require("@turf/turf"),require("proj4")):typeof define=="function"&&define.amd?define(["exports","xbsj-base","@turf/turf","proj4"],h):(C=typeof globalThis<"u"?globalThis:C||self,h(C.EarthSDK3={},C.xbsj_base,C.turf,C.proj4))})(this,function(C,h,js,Vh){"use strict";var U_=Object.defineProperty;var G_=(C,h,js)=>h in C?U_(C,h,{enumerable:!0,configurable:!0,writable:!0,value:js}):C[h]=js;var d=(C,h,js)=>G_(C,typeof h!="symbol"?h+"":h,js);function Bp(n){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(n){for(const e in n)if(e!=="default"){const r=Object.getOwnPropertyDescriptor(n,e);Object.defineProperty(t,e,r.get?r:{enumerable:!0,get:()=>n[e]})}}return t.default=n,Object.freeze(t)}const ol=Bp(js);class $p extends h.Destroyable{constructor(){super(...arguments);d(this,"registerEngines",{})}register(e,r,i){const s=this.registerEngines[e]||new Map;s.has(r)&&console.warn(`register warn:${e}中${r}的实现类已经被注册,再次注册会覆盖。`),s.set(r,i),this.registerEngines[e]=s}getEngineObjConstructor(e,r){const i=this.registerEngines[r];if(!i)return;let s=e.constructor,o=e.typeName,a=i.get(o);if(a)return a;const u=o;for(;o!=="ESSceneObject"&&(s=s.getParentClass(),!!s);)if(o=s.type,a=i.get(o),a)return console.warn(`未找到${u}在${r}中对应的实现类! 使用父类${o}的实现类!`),a}createEngineObject(e,r){const i=this.getEngineObjConstructor(e,r.typeName);if(i){const s=new i(e,r);return s.createdEvent.emit(),s}else{const s=new ds(e,r);return s.createdEvent.emit(),s}}}class jp extends h.Destroyable{constructor(){super(...arguments);d(this,"registerEngines",{})}register(e,r,i){const s=this.registerEngines[e]||new Map;s.has(r)&&console.warn(`register warn:${e}中${r}的实现类已经被注册,再次注册会覆盖。`),s.set(r,i),this.registerEngines[e]=s}getEngineObjConstructor(e,r){const s=(this.registerEngines[r]||new Map).get(e);if(s)return s;console.warn(`未找到${e}在${r}中对应的实现类!`)}createEngineObject(e,r){const i=this.getEngineObjConstructor(e.typeName,r.typeName);if(i){const s=new i(e,r);return s.createdEvent.emit(),s}else{const s=new ds(e,r);return s.createdEvent.emit(),s}}}const nn=class nn extends h.Destroyable{constructor(e,r,i=!1){super();d(this,"_createdEvent",this.dv(new h.Event));d(this,"_id",++nn._accumId);this._sceneObject=e,this._viewer=r;{if(i)return;const s=(o,a)=>{for(let u of o)this._viewer.delete(u);for(let u of a)u.parentID=this.sceneObject.id,this._viewer.add(u)};s([],this._sceneObject.components.values()),this.d(this._sceneObject.components.toChange.don(s)),this.d(()=>s(this._sceneObject.components.values(),[]))}}get createdEvent(){return this._createdEvent}get sceneObject(){return this._sceneObject}get viewer(){return this._viewer}get id(){return this._id}};d(nn,"context",new $p),d(nn,"contextEditing",new jp),d(nn,"register",nn.context.register.bind(nn.context)),d(nn,"registerEditing",nn.contextEditing.register.bind(nn.contextEditing)),d(nn,"_accumId",-1);let ds=nn;const sl=class sl extends h.Destroyable{constructor(e,r){super();d(this,"_id",++sl._accumId);this._name=e,this._description=r}get id(){return this._id}get name(){return this._name}get description(){return this._description}};d(sl,"_accumId",-1);let Ri=sl;class al extends Ri{constructor(t,e,r,i,s){super(t,e),this._withUndefined=r,this._readonly=i,this._defaultValue=s}get withUndefined(){return this._withUndefined}get readonly(){return this._readonly}get defaultValue(){return this._defaultValue instanceof Function?this._defaultValue():this._defaultValue}}class mt extends al{constructor(t,e,r,i,s,o){const a=t instanceof h.ReactiveVariable?"未获取到属性名":t[1].toString();super(e??a,o??a,i??!1,s??!1,r),this._reactVar=t}get reactVar(){return this._reactVar}}class W extends mt{get type(){return"BooleanProperty"}}class ot extends mt{get type(){return"StringProperty"}}class L extends mt{get type(){return"NumberProperty"}}class tg extends mt{get type(){return"MaximumScreenSpaceErrorProperty"}}class zh extends mt{get type(){return"StringsProperty"}}class eg extends mt{get type(){return"NumbersProperty"}}class rg extends mt{get type(){return"BooleansProperty"}}class ng extends mt{get type(){return"String2Property"}}class ig extends mt{get type(){return"String3Property"}}class sg extends mt{get type(){return"String4Property"}}class Uh extends mt{get type(){return"String2sProperty"}}class og extends mt{get type(){return"String3sProperty"}}class ag extends mt{get type(){return"String4sProperty"}}class ge extends mt{get type(){return"Number2Property"}}class Ve extends mt{get type(){return"Number3Property"}}class hn extends mt{get type(){return"Number4Property"}}class ug extends mt{get type(){return"Number4WithUndefinedProperty"}}class Gh extends mt{get type(){return"Number2sProperty"}}class ul extends mt{get type(){return"Number3sProperty"}}class lg extends mt{get type(){return"Number4sProperty"}}class cg extends mt{get type(){return"Boolean2Property"}}class hg extends mt{get type(){return"Boolean3Property"}}class fg extends mt{get type(){return"Boolean4Property"}}class dg extends mt{get type(){return"Boolean2sProperty"}}class pg extends mt{get type(){return"Boolean3sProperty"}}class gg extends mt{get type(){return"Boolean4sProperty"}}class mg extends mt{get type(){return"StringNumberProperty"}}class vg extends mt{get type(){return"StringNumbersProperty"}}class _t extends hn{get type(){return"ColorProperty"}}class yg extends Ve{get type(){return"ColorRgbProperty"}}class _g extends L{get type(){return"DashPatternProperty"}}class pt extends mt{constructor(t,e,r,i,s,o,a){super(t,r,i,s,o,a),this._enums=e}get type(){return"EnumProperty"}get enums(){return this._enums}}class wg extends mt{constructor(t,e,r,i,s,o,a){super(t,r,i,s,o,a),this._enums=e}get type(){return"EnumStringsProperty"}get enums(){return this._enums}}class Fi extends mt{constructor(t,e,r,i,s,o,a){super(t,e,r,s,o,a),this._sampleValue=i}get sampleValue(){return this._sampleValue}get type(){return"EvalStringProperty"}}class Wh extends mt{constructor(t,e,r,i,s){super(t,e,i,!1,!1,s),this._paramTypes=r}get type(){return"ParamsProperty"}get paramTypes(){return this._paramTypes}}class nt extends Ri{constructor(e,r,i,s,o){const a=s??"Unnamed Function";super(a,o??a);d(this,"_paramsProperty");d(this,"_getValueFunc");this._func=r;const u=this.disposeVar(h.reactJson(i));this._paramsProperty=this.disposeVar(new Wh(u,a+"_params",e,i));const[l]=h.getReactFuncs(this._paramsProperty.reactVar);this._getValueFunc=l}get paramsProperty(){return this._paramsProperty}exec(){this._func(...this._getValueFunc())}get type(){return"FunctionProperty"}}class rt extends Ri{constructor(t,e,r){const i=e??"分组";super(i,r??i),this._children=t}get type(){return"GroupProperty"}get children(){return this._children}}class Q extends mt{constructor(t,e,r,i,s,o,a){super(t,e,r,s,o,a),this._sampleValue=i}get sampleValue(){return this._sampleValue}get type(){return"JsonProperty"}}class ll extends mt{constructor(t,e,r,i,s,o,a){super(t,e,r,s,o,a),this._sampleValue=i}get sampleValue(){return this._sampleValue}get type(){return"LongStringProperty"}}class Eg extends ge{get type(){return"MinmaxProperty"}}class Sg extends hn{get type(){return"NearFarScalerProperty"}}class qh extends al{constructor(t,e,r,i,s,o,a){const u=r??"非响应式Json";super(u,a??u,s??!1,o??!1,i),this._getJsonStringFunc=t,this._setJsonStringFunc=e}get type(){return"NonreactiveJsonStringProperty"}get getJsonStringFunc(){return this._getJsonStringFunc}get setJsonStringFunc(){return this._setJsonStringFunc}}class Cg extends ge{get type(){return"NumberRangeProperty"}}class we extends mt{constructor(t,e,r,i,s,o,a,u){super(t,i,s,o,a,u),this._step=e,this._minMax=r}get type(){return"NumberSliderProperty"}get minMax(){return this._minMax}get step(){return this._step}}function Ig(n,t){const[e,r,i]=h.getReactFuncs(n),[s,o,a]=h.getReactFuncs(t),u=h.react((e()??0)/(s()??3e3)),l=()=>{const c=u.value,f=s()??3e3,p=e()??0;if(!Number.isFinite(f)||!Number.isFinite(p)){console.warn(`duration || currentTime error: duration: ${f} currentTime: ${p}`);return}Math.abs(c*f-p)<.001||(f<=0?u.value=0:u.value=p/f)};return u.dispose(i.disposableOn(l)),u.dispose(a.disposableOn(l)),u.dispose(u.changed.disposableOn(()=>{const c=u.value,f=s()??3e3,p=e()??0;if(!Number.isFinite(f)||!Number.isFinite(p)){console.warn(`duration || currentTime error: duration: ${f} currentTime: ${p}`);return}Math.abs(c*f-p)<.001||r(c*f)})),u}class ou extends Ri{constructor(e,r,i,s,o,a){super(s??"播放器",a??"播放器");d(this,"_defaults",{playing:!1,ratio:0,loop:!1});this._playingReact=e,this._ratioReact=r,this._loopReact=i,o&&(this._defaults.playing=o.playing??this._defaults.playing,this._defaults.ratio=o.ratio??this._defaults.ratio,this._defaults.loop=o.loop??this._defaults.loop)}get type(){return"PlayerProperty"}get playingReact(){return this._playingReact}get ratioReact(){return this._ratioReact}get loopReact(){return this._loopReact}get defaults(){return this._defaults}}d(ou,"createPlayingRatio",Ig);class to extends Ve{get type(){return"PositionProperty"}}class Xh extends mt{get type(){return"PositionsProperty"}}class Pg extends mt{get type(){return"PositionsSetPropety"}}class cl extends Ve{get type(){return"RotationProperty"}}class pa extends ot{get type(){return"UriProperty"}}class Yh extends Ri{constructor(e,r,i,s,o,a){const u=s??"视角播放器";super(u,a??u);d(this,"_defaults",{playing:!1,loop:!1});this._playingReact=e,this._stopFn=r,this._loopReact=i,o&&(this._defaults.playing=o.playing??this._defaults.playing,this._defaults.loop=o.loop??this._defaults.loop)}get type(){return"ViewPlayerProperty"}get playingReact(){return this._playingReact}get loopReact(){return this._loopReact}get stopFn(){return this._stopFn}get defaults(){return this._defaults}}class Hh extends mt{get type(){return"DatesProperty"}}class ps extends mt{get type(){return"DateProperty"}}var B=(n=>(n.Place="place",n.Translation="translation",n.Rotation="rotation",n.Scale="scale",n.DoublePointsAppend="doublePointsAppend",n.DoublePointsModify="doublePointsModify",n.CircularAppend="circularAppend",n.CircularInsert="circularInsert",n.LineStringAppend="lineStringAppend",n.LineStringInsert="lineStringInsert",n.ScatterAppend="scatterAppend",n.ScatterModify="scatterModify",n.VisibilityAppend="visibilityAppend",n.VisibilityModify="visibilityModify",n.HeightModify="heightModify",n))(B||{}),Jh=(n=>(n.DECIMAL_DEGREE="DECIMAL_DEGREE",n.DEGREES_DECIMAL_MINUTES="DEGREES_DECIMAL_MINUTES",n.SEXAGESIMAL_DEGREE="SEXAGESIMAL_DEGREE",n))(Jh||{});class Ng{constructor(t){this.childPickedInfo=t}}class bg{constructor(t,e,r,i,s,o){this.pickResult=t,this.sceneObject=e,this.tilesetPickInfo=r,this.geojsonPickInfo=i,this.attachedInfo=s,this.screenPosition=o}assign(t){t!=null&&t.pickedResult&&(this.pickResult=t.pickedResult),t!=null&&t.sceneObject&&(this.sceneObject=t.sceneObject),t!=null&&t.tilesetPickInfo&&(this.tilesetPickInfo=t.tilesetPickInfo),t!=null&&t.geojsonPickInfo&&(this.geojsonPickInfo=t.geojsonPickInfo),t!=null&&t.attachedInfo&&(this.attachedInfo=t.attachedInfo),t!=null&&t.screenPosition&&(this.screenPosition=t.screenPosition)}}class Tg extends h.Destroyable{constructor(e){super();d(this,"_sceneObjRefs",new Map);d(this,"_refs",{});d(this,"_refsChanged",this.dv(new h.Event));const r=(i,s,o)=>{if(o){const a=this.getLastSceneObject(o),u=this._sceneObjRefs.get(o);if(!u)console.warn(`this._sceneObjRefs中不存在ref(${o}), 可能系统存在逻辑问题`);else{const c=u.indexOf(i);c===-1?console.warn(`this._sceneObjRefs中不存在当前对象(id: ${i.id} type: ${i.typeName})!可能系统存在逻辑问题`):(u.splice(c,1),u.length===0&&this._sceneObjRefs.delete(o))}const l=this.getLastSceneObject(o);this._refs[o]=l,this._refsChanged.emit(l,a)}if(s){const a=this.getLastSceneObject(s),u=this._sceneObjRefs.get(s);u?(u.push(i),u.length>0&&console.warn(`同时存在多个ref${s}相同的场景对象!
2
+ ${u.map(c=>`${c.id} ${c.typeName}
3
+ `).join(" ")}`)):this._sceneObjRefs.set(s,[i]);const l=this.getLastSceneObject(s);this._refs[s]=l,this._refsChanged.emit(l,a)}};this.d(e.sceneObjCreatedEvent.don(i=>{const s=(o,a)=>r(i,o,a);i.ref&&s(i.ref,void 0),i.refChanged.don(s)})),this.d(e.sceneObjToDestroyEvent.don(i=>{i.ref&&r(i,void 0,i.ref)}))}get sceneObjRefs(){return this._sceneObjRefs}get refs(){return this._refs}get refsChanged(){return this._refsChanged}getLastSceneObject(e){const r=this.getSceneObjects(e);if(r)return r[r.length-1]}getSceneObjects(e){const r=this._sceneObjRefs.get(e);if(!(!r||r.length===0))return r}}function Zh(n,t){const[e,r,i]=h.getReactFuncs(n),s=h.react(void 0),o=()=>{const a=e()??t;s.value=a&&$.context.getStrFromEnv(a)};return o(),i&&s.d(i.don(o)),s.d($.context.environmentVariablesChanged.don(o)),s}function Kh(n){const t=/\${(.*?)\}/g;if(!t.test(n))return n;const e=n.replace(t,(r,i)=>{const s=$.context.getEnv(i);return s===void 0?(console.warn(`环境变量(${i})不存在,无法进行转换`),"{env-error}"):s});return Kh(e)}class Og extends h.Destroyable{constructor(){super();d(this,"_esObjConstructors",new Map);d(this,"_sceneObjs",new Map);d(this,"_sceneObjCreatedEvent",new h.Event);d(this,"_sceneObjToDestroyEvent",new h.Event);d(this,"_refsManager",this.dv(new Tg(this)));d(this,"_environmentVariables",window.ESSDK_ENV||{});d(this,"_environmentVariablesChanged",this.dv(new h.Event))}get typeNames(){return this._esObjConstructors.keys()}get sceneObjs(){return this._sceneObjs.values()}get sceneObjCreatedEvent(){return this._sceneObjCreatedEvent}get sceneObjToDestroyEvent(){return this._sceneObjToDestroyEvent}get refsManager(){return this._refsManager}get $refs(){return this._refsManager.refs}register(e,r,i){return this._esObjConstructors.has(e)&&console.warn(`register warn: ${e} has registered ! will be override!`),this._esObjConstructors.set(e,r),i&&h.setExtProp(r,"__sceneObjExtraInfo",i),e}_addSceneObject(e){this._sceneObjs.set(e.id,e),this._sceneObjCreatedEvent.emit(e),e.d(()=>this._deleteSceneObject(e))}addSceneObject(e){this._addSceneObject(e)}_deleteSceneObject(e){this._sceneObjToDestroyEvent.emit(e),this._sceneObjs.delete(e.id)}deleteSceneObject(e){this._deleteSceneObject(e)}createSceneObjectFromClass(e,r){if(!r||this._sceneObjs.has(r)){const s=h.createGuid();r&&console.warn(`已存在相同id的对象!id自动变更!${r} -> ${s} 请注意:id变更可能导致引用失效!`),r=s}if(!r)throw new Error("id不能为空!");const i=new e(r);return i.id!==r&&(console.warn(`sceneObj.id(${i.id}) !== id(${r}) sceneObjectType: ${i.typeName}`),console.warn("出现这种问题有可能是自定义的场景对象,没有在构造函数中传递id参数!示例如下:"),console.warn("class XXX extends XXX { constructor(id) { super(id); } }")),this._addSceneObject(i),i}createSceneObject(e,r){if(typeof e=="string"){const i=this._getSceneObjConstructor(e);if(!i){console.warn(`Cannot find SceneObjectType: ${e}`);return}return this.createSceneObjectFromClass(i,r)}else return this.createSceneObjectFromClass(e,r)}createSceneObjectFromJson(e){const r=this.createSceneObject(e.type,e.id);return r&&(r.json=e),r}destroySceneObject(e){return this._deleteSceneObject(e),e.destroy(),e.isDestroyed()}getSceneObjectById(e){return this._sceneObjs.get(e)}getSceneObject(e){if(!e&&e!="")return Array.from(this._sceneObjs.values());if(e.startsWith("ES")){const r=[];for(const i of this._sceneObjs.values())i.typeName===e&&r.push(i);return r}else return this._sceneObjs.get(e)}_getSceneObjConstructor(e){const r=this._esObjConstructors.get(e);if(r)return r}getProps(e){const r=this._getSceneObjConstructor(e);if(!r){console.warn(`cannot get constructor from type: ${e}`);return}return h.getExtProp(r,"__sceneObjExtraInfo")}setProps(e,r){const i=this._getSceneObjConstructor(e);if(!i){console.warn(`cannot get constructor from type: ${e}`);return}let s=h.getExtProp(i,"__sceneObjExtraInfo");s||(s={},h.setExtProp(i,"__sceneObjExtraInfo",s)),Object.assign(s,r)}getProp(e,r){const i=this.getProps(e);return i&&i[r]}setProp(e,r,i){this.setProps(e,{[r]:i})}get environmentVariables(){return this._environmentVariables}set environmentVariables(e){for(let[r,i]of Object.entries(e))this.setEnv(r,i)}get environmentVariablesChanged(){return this._environmentVariablesChanged}setEnv(e,r){if(this._environmentVariables[e]!==r){const i=this._environmentVariables[e];this._environmentVariables[e]=r,this._environmentVariablesChanged.emit(e,r,i)}window.ESSDK_ENV={...this._environmentVariables}}getEnv(e){return this._environmentVariables[e]}getStrFromEnv(e){return Kh(e)}createEnvStrReact(e,r){return Zh(e,r)}createEvnStrReact(e,r){return Zh(e,r)}}const ct=class ct extends h.Destroyable{constructor(e){super();d(this,"_components",this.dv(new h.ObservableSet));d(this,"_viewerAttached",this.dv(new h.Event));d(this,"_viewerDetached",this.dv(new h.Event));d(this,"_attachedViewers",(()=>{const e=new Set;return this.d(this._viewerAttached.don(r=>{r.actived&&(this.activeViewer=r),r.ad(r.activedChanged.don(i=>{i&&e.has(r)&&(this.activeViewer=r)})),e.add(r)})),this.d(this._viewerDetached.don(r=>{e.delete(r),this.activeViewer==r&&(this.activeViewer=void 0)})),e})());d(this,"_activeViewer",this.disposeVar(h.react(void 0)));d(this,"_createdEvent",this.dv(new h.Event));d(this,"_flushEvent",this.dv(new h.Event));d(this,"_id");d(this,"_mainClass");d(this,"_updateFuncReact",this.dv(h.react(void 0)));d(this,"_toDestroyFuncReact",this.dv(h.react(void 0)));d(this,"_parentID");e!==void 0&&(typeof e!="string"?console.warn(`对象id必须是字符串类型,当前id的类型是${typeof e},值为${e}`):e.trim()===""?console.warn("场景对象创建时的id不能是空字符串!"):e.trim()!==e&&console.warn(`id前后有空字符串!id: ${e}`)),this._id=e??h.createGuid(),this._initName();{const r=()=>{if(this.execOnceFuncStr)try{Function(`"use strict";return (${this.execOnceFuncStr})`)()(this)}catch(i){console.warn(`execOnceFuncStr不能转成函数!或者函数执行时错误!id: ${this.id} ${this.typeName} error: ${i}`)}};r(),this.d(this.execOnceFuncStrChanged.don(r))}{const r=()=>{if(this.updateFuncStr)try{this.updateFunc=Function(`"use strict";return (${this.updateFuncStr})`)()}catch(s){console.warn(`updateFuncStr不能转成函数!或者函数执行时错误!id: ${this.id} ${this.typeName} error: ${s}`)}};r(),this.d(this.updateFuncStrChanged.don(r));let i;this.d(()=>i&&i.destroy()),this.d(this.updateFuncChanged.don(()=>{i&&i.cancel(),this.updateFunc&&(i=i||h.createAnimateFrame(),i.restart(void 0,s=>{this.updateFunc&&this.updateFunc(this,s)}))}))}{const r=()=>{try{this.toDestroyFunc=this.toDestroyFuncStr&&Function(`"use strict";return (${this.toDestroyFuncStr})`)()||void 0}catch(i){console.warn(`toDestroyFuncStr不能转成函数!或者函数执行时错误!id: ${this.id} ${this.typeName} error: ${i}`),this.toDestroyFunc=void 0}};r(),this.d(this.toDestroyFuncStrChanged.don(r)),this.d(this.toDestroyEvent.don(()=>{this.toDestroyFunc&&this.toDestroyFunc(this)}))}}static getParentClass(){return Object.getPrototypeOf(this)}static register(e,r,i){h.extendClassProps(r.prototype,r.createDefaultProps);const s=r.createDefaultProps();for(const o of Object.keys(s))r.defaults[o]=s[o]instanceof h.ReactiveVariable?s[o].value:s[o];return this.innerRegister(e,r,i),e}static get envs(){return ct.context.environmentVariables}static get $refs(){return ct.context.refsManager.refs}get components(){return this._components}get viewerAttached(){return this._viewerAttached}get viewerDetached(){return this._viewerDetached}get attachedViewers(){return this._attachedViewers}get activeViewer(){return this._activeViewer.value}set activeViewer(e){this._activeViewer.value=e}get activeViewerChanged(){return this._activeViewer.changed}removefromViewer(e){this.attachedViewers.has(e)&&e.delete(this)}addToViewer(e){this.attachedViewers.has(e)||e.add(this)}registerAttachedObject(e){const r=new Map;this.d(()=>{r.size>0&&console.warn("viewerPropSceneObjects.size > 0")}),this.d(this._viewerAttached.don(i=>{const s=e(i);s&&r.set(i,s)})),this.d(this._viewerDetached.don(i=>{if(!r.has(i))return;const s=r.get(i);s&&(s.destroy(),r.delete(i))}))}createAttachedObject(e){const r=new Map,i=()=>{for(let[u,l]of r.entries())l.destroy();r.clear()},s=u=>{const l=e(u);l&&r.set(u,l)};for(let u of this.attachedViewers)s(u);const o=this._viewerAttached.don(s),a=this._viewerDetached.don(u=>{if(!r.has(u))return;const l=r.get(u);l&&(l.destroy(),r.delete(u))});return()=>{a(),o(),i()}}registerAttachedObjectForContainer(e){this.registerAttachedObject(r=>new Dg(r,e))}get createdEvent(){return this._createdEvent}get flushEvent(){return this._flushEvent}flush(){this.flushEvent.emit()}get id(){return this._id}get typeName(){return this.constructor.type}_initName(){this.name=`${this.typeName}_${(""+this.id).slice(-4)}`}get defaultProps(){return this.constructor.createDefaultProps()}get mainClass(){return this._mainClass??this}set mainClass(e){this._mainClass=e}_innerGetJson(e=!0){const r={id:this.id,type:this.typeName};for(let i of Object.keys(this.defaultProps))if(e){let s,o=this.defaultProps[i];o instanceof h.ReactiveVariable?s=o.equals(this[i]):s=o===this[i],s||(r[i]=this[i])}else r[i]=this[i];return r}_innerSetJson(e,r,i){if(!(e instanceof Object)||e.type&&e.type!==this.typeName){console.error(`value.type && value.type${e.type} !== this.typeName${this.typeName}`);return}e.id&&e.id!==this.id&&console.warn(`value.id === undefined || value.id${e.id} !== this.id(${this.id})`);const s=r||[];s.push("id","type");const o=Object.keys(this.defaultProps).filter(a=>!s.includes(a));for(let a of o)if(a in e)this[a]=e[a]===null?void 0:e[a];else if(!(i??!1)){let u=this.defaultProps[a];u instanceof h.ReactiveVariable&&(u=u.value),this[a]=u}}get json(){return this._innerGetJson()}set json(e){this._innerSetJson(e)}get _jsonStr(){return JSON.stringify(this.json,null,4)}set _jsonStr(e){this._innerSetJson(JSON.parse(e))}get updateFunc(){return this._updateFuncReact.value}set updateFunc(e){this._updateFuncReact.value=e}get updateFuncChanged(){return this._updateFuncReact.changed}get toDestroyFunc(){return this._toDestroyFuncReact.value}set toDestroyFunc(e){this._toDestroyFuncReact.value=e}get toDestroyFuncChanged(){return this._toDestroyFuncReact.changed}get parentID(){return this._parentID??this.id}set parentID(e){this._parentID=e}getProperties(e){const r={...this.getESProperties()},i=[];return r.general.length>0&&i.push(new rt(r.general,"general")),Object.keys(r).forEach(s=>{s!=="defaultMenu"&&s!=="general"&&r[s].length>0&&i.push(new rt(r[s],s))}),i}getESProperties(){return{defaultMenu:"general",basic:[],general:[new ot([this,"typeName"],"类型",void 0,!1,!0),new ot([this,"id"],"唯一标识",void 0,!1,!0),new ot([this,"name"],"名称")],dataSource:[],location:[],coordinate:[],style:[],more:[new ot([this,"ref"],"ref",void 0,!0),new Q([this,"extras"],"extras",void 0,void 0,!0),new qh(()=>this._jsonStr,e=>e&&(this._jsonStr=e),"JSON")]}}};d(ct,"context",new Og),d(ct,"innerRegister",ct.context.register.bind(ct.context)),d(ct,"defaults",{}),d(ct,"createDefaultProps",()=>({name:"未命名场景对象",ref:void 0,extras:h.reactJson(void 0),devTags:h.reactArrayWithUndefined(void 0),execOnceFuncStr:void 0,updateFuncStr:void 0,toDestroyFuncStr:void 0})),d(ct,"type",ct.register("ESSceneObject",ct,{chsName:"场景类",tags:["ESObjects"],description:""})),d(ct,"create",ct.context.createSceneObject.bind(ct.context)),d(ct,"createFromClass",ct.context.createSceneObjectFromClass.bind(ct.context)),d(ct,"createFromJson",ct.context.createSceneObjectFromJson.bind(ct.context)),d(ct,"destroySceneObject",ct.context.destroySceneObject.bind(ct.context)),d(ct,"getSceneObjById",ct.context.getSceneObjectById.bind(ct.context)),d(ct,"getSceneObj",ct.context.getSceneObject.bind(ct.context)),d(ct,"getEnv",ct.context.getEnv.bind(ct.context)),d(ct,"setEnv",ct.context.setEnv.bind(ct.context)),d(ct,"getStrFromEnv",ct.context.getStrFromEnv.bind(ct.context)),d(ct,"getSceneObjectById",ct.context.getSceneObjectById.bind(ct.context)),d(ct,"getSceneObject",ct.context.getSceneObject.bind(ct.context));let $=ct;class Dg extends h.Destroyable{constructor(t,e){super(),this.dv(new h.ObjResettingWithEvent(t.subContainerChanged,()=>{if(t.subContainer)return e(t,t.subContainer)}))}}const gs={distance:100,heading:0,pitch:0,flyDuration:1,hDelta:0,pDelta:0},Mg={position:[0,0,0],rotation:[0,0,0],flyDuration:1},mr=class mr extends ${constructor(e){super(e);d(this,"_editing",this.dv(h.react(!1)));d(this,"editingID");d(this,"editingBindMode","singlePoint");d(this,"_deprecated",[]);d(this,"_flyInEvent",this.dv(new h.Event));d(this,"_flyToEvent",this.dv(new h.Event));d(this,"_flyOverEvent",this.disposeVar(new h.Event));d(this,"_pickedEvent",this.dv(new h.Event));d(this,"_calcFlyToParamEvent",this.dv(new h.Event));d(this,"_calcFlyInParamEvent",this.dv(new h.Event));d(this,"useCalcFlyToParamInESObjectWithLocation",!1);dp(this,this.updateEditing)}supportEditingModes(){return this.constructor.supportEditingModes}get editing(){return this._editing.value}set editing(e){this._editing.value=e}get editingChanged(){return this._editing.changed}updateEditing(){}_deprecatedWarning(){const e=this._deprecated;for(let r=0;r<e.length;r++){const i=e[r];typeof i=="string"?Reflect.has(this,i+"Changed")&&this.d(this[i+"Changed"].don(()=>{console.warn(`注意:${this.typeName} 的 ${i} 属性下版本将会被移除!`)})):Object.keys(i).forEach(s=>{Reflect.has(this,s+"Changed")&&this.d(this[s+"Changed"].don(a=>{const u=i[s];typeof u=="string"?console.warn(`注意:${this.typeName} 的 ${s} 属性下版本将会被移除!`):Object.keys(u).forEach(l=>{a===l&&console.warn(`注意:${this.typeName} 的 ${s} 属性值 ${l} 下版本将会被移除,推荐使用属性值 ${u[l]}`)})}))})}}get flyInEvent(){return this._flyInEvent}flyIn(e=1){this._flyInEvent.emit(e,mr._lastFlyInId)}get flyToEvent(){return this._flyToEvent}flyTo(e=1){this._flyToEvent.emit(e,mr._lastFlyToId)}get flyOverEvent(){return this._flyOverEvent}get pickedEvent(){return this._pickedEvent}get calcFlyToParamEvent(){return this._calcFlyToParamEvent}calcFlyToParam(){this._calcFlyToParamEvent.emit()}get calcFlyInParamEvent(){return this._calcFlyInParamEvent}calcFlyInParam(){this._calcFlyInParamEvent.emit()}emptyFlyToParam(){this.flyToParam=void 0}emptyFlyInParam(){this.flyInParam=void 0}async getBoundSphere(e){return await e.getBoundSphere(this.id)}getESProperties(){const e={...super.getESProperties()};return{...e,general:[...e.general,new W([this,"show"],"是否显示",mr.defaults.show),new W([this,"collision"],"开启碰撞",mr.defaults.collision),new W([this,"allowPicking"],"允许拾取",mr.defaults.allowPicking),new nt([],()=>this.calcFlyToParam(),[],"保存观察视角","保存当前flyToParam"),new nt([],()=>this.emptyFlyToParam(),[],"清空飞向参数","清空飞向参数"),new nt([],()=>this.emptyFlyInParam(),[],"清空飞入参数","清空飞入参数"),new nt([],()=>this.calcFlyInParam(),[],"保存飞入参数","保存飞入参数flyInParam")],more:[...e.more,new rt([],"飞行定位","飞向参数"),new nt(["number"],r=>this.flyTo(r),[1],"飞向"),new Q([this,"flyToParam"],"flyToParam",void 0,void 0,!0),new L([this,"flyToDistance"],"flyToDistance",void 0,!0),new L([this,"flyToHeading"],"flyToHeading",void 0,!0),new L([this,"flyToPitch"],"flyToPitch",void 0,!0),new L([this,"flyToFlyDuration"],"flyToFlyDuration",void 0,!0),new L([this,"flyToHDelta"],"flyToHDelta",void 0,!0),new L([this,"flyToPDelta"],"flyToPDelta",void 0,!0),new rt([],"飞入参数"),new nt(["number"],r=>this.flyIn(r),[1],"飞入"),new Q([this,"flyInParam"],"flyInParam",void 0,void 0,!0)]}}get flyToDistance(){return this.flyToParam&&this.flyToParam.distance}get flyToHeading(){return this.flyToParam&&this.flyToParam.heading}get flyToPitch(){return this.flyToParam&&this.flyToParam.pitch}get flyToFlyDuration(){return this.flyToParam&&this.flyToParam.flyDuration}get flyToHDelta(){return this.flyToParam&&this.flyToParam.hDelta}get flyToPDelta(){return this.flyToParam&&this.flyToParam.pDelta}get flyToDistanceChanged(){return this.flyToParamChanged}get flyToHeadingChanged(){return this.flyToParamChanged}get flyToPitchChanged(){return this.flyToParamChanged}get flyToFlyDurationChanged(){return this.flyToParamChanged}get flyToHDeltaChanged(){return this.flyToParamChanged}get flyToPDeltaChanged(){return this.flyToParamChanged}set flyToDistance(e){this.flyToParam=e!==void 0?{...this.flyToParam??gs,distance:e}:void 0}set flyToHeading(e){this.flyToParam=e!==void 0?{...this.flyToParam??gs,heading:e}:void 0}set flyToPitch(e){this.flyToParam=e!==void 0?{...this.flyToParam??gs,pitch:e}:void 0}set flyToFlyDuration(e){this.flyToParam=e!==void 0?{...this.flyToParam??gs,flyDuration:e}:void 0}set flyToHDelta(e){this.flyToParam=e!==void 0?{...this.flyToParam??gs,hDelta:e}:void 0}set flyToPDelta(e){this.flyToParam=e!==void 0?{...this.flyToParam??gs,pDelta:e}:void 0}};d(mr,"createDefaultProps",()=>({...$.createDefaultProps(),show:!0,collision:!0,allowPicking:!1,flyToParam:h.reactJsonWithUndefined(void 0),flyInParam:h.reactJsonWithUndefined(void 0)})),d(mr,"type",mr.register("ESVisualObject",mr,{chsName:"可视化对象",tags:["ESObjects"],description:"可视化对象"})),d(mr,"supportEditingModes",[]),d(mr,"_lastFlyInId",0),d(mr,"_lastFlyToId",0);let Rt=mr;function hl(n){return h.reactDeepArrayWithUndefined(n,(t,e)=>t[0]===e[0]&&t[1]===e[1],t=>[...t])}function Qh(n,t){const e=new Array;for(let r of n)e.push(t(r));return e}function fl(n,t){return n===void 0&&t===void 0?!0:!n||!t?!1:n[0]===t[0]&&n[1]===t[1]&&n[2]===t[2]}function xg(n,t){(n[0][0]!==n[n.length-1][0]||n[0][1]!==n[n.length-1][1])&&n.push(n[0]);const e=ol.point(t),r=ol.polygon([n]);return ol.booleanPointInPolygon(e,r)}var De=63710088e-1,Bh={centimeters:De*100,centimetres:De*100,degrees:De/111325,feet:De*3.28084,inches:De*39.37,kilometers:De/1e3,kilometres:De/1e3,meters:De,metres:De,miles:De/1609.344,millimeters:De*1e3,millimetres:De*1e3,nauticalmiles:De/1852,radians:1,yards:De*1.0936};function fn(n,t,e){e===void 0&&(e={});var r={type:"Feature"};return(e.id===0||e.id)&&(r.id=e.id),e.bbox&&(r.bbox=e.bbox),r.properties=t||{},r.geometry=n,r}function Vt(n,t,e){if(e===void 0&&(e={}),!n)throw new Error("coordinates is required");if(!Array.isArray(n))throw new Error("coordinates must be an Array");if(n.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!$h(n[0])||!$h(n[1]))throw new Error("coordinates must contain numbers");var r={type:"Point",coordinates:n};return fn(r,t,e)}function Be(n,t,e){e===void 0&&(e={});for(var r=0,i=n;r<i.length;r++){var s=i[r];if(s.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");for(var o=0;o<s[s.length-1].length;o++)if(s[s.length-1][o]!==s[0][o])throw new Error("First and last Position are not equivalent.")}var a={type:"Polygon",coordinates:n};return fn(a,t,e)}function dn(n,t,e){if(e===void 0&&(e={}),n.length<2)throw new Error("coordinates must be an array of two or more positions");var r={type:"LineString",coordinates:n};return fn(r,t,e)}function eo(n,t){t===void 0&&(t={});var e={type:"FeatureCollection"};return t.id&&(e.id=t.id),t.bbox&&(e.bbox=t.bbox),e.features=n,e}function dl(n,t,e){e===void 0&&(e={});var r={type:"MultiPolygon",coordinates:n};return fn(r,t,e)}function pl(n,t){t===void 0&&(t="kilometers");var e=Bh[t];if(!e)throw new Error(t+" units is invalid");return n*e}function gl(n,t){t===void 0&&(t="kilometers");var e=Bh[t];if(!e)throw new Error(t+" units is invalid");return n/e}function au(n){var t=n%(2*Math.PI);return t*180/Math.PI}function ze(n){var t=n%360;return t*Math.PI/180}function ml(n,t,e){if(t===void 0&&(t="kilometers"),e===void 0&&(e="kilometers"),!(n>=0))throw new Error("length must be a positive number");return pl(gl(n,t),e)}function $h(n){return!isNaN(n)&&n!==null&&!Array.isArray(n)}function $e(n){if(!n)throw new Error("coord is required");if(!Array.isArray(n)){if(n.type==="Feature"&&n.geometry!==null&&n.geometry.type==="Point")return n.geometry.coordinates;if(n.type==="Point")return n.coordinates}if(Array.isArray(n)&&n.length>=2&&!Array.isArray(n[0])&&!Array.isArray(n[1]))return n;throw new Error("coord must be GeoJSON Point or an Array of numbers")}function ms(n){if(Array.isArray(n))return n;if(n.type==="Feature"){if(n.geometry!==null)return n.geometry.coordinates}else if(n.coordinates)return n.coordinates;throw new Error("coords must be GeoJSON Feature, Geometry Object or an Array")}function jh(n,t,e){if(!n)throw new Error("No feature passed");if(!e)throw new Error(".featureOf() requires a name");if(!n||n.type!=="Feature"||!n.geometry)throw new Error("Invalid input to "+e+", Feature with geometry required");if(!n.geometry||n.geometry.type!==t)throw new Error("Invalid input to "+e+": must be a "+t+", given "+n.geometry.type)}function Cr(n){return n.type==="Feature"?n.geometry:n}function Lg(n,t){return n.type==="FeatureCollection"?"FeatureCollection":n.type==="GeometryCollection"?"GeometryCollection":n.type==="Feature"&&n.geometry!==null?n.geometry.type:n.type}function ga(n,t,e){if(e===void 0&&(e={}),e.final===!0)return Ag(n,t);var r=$e(n),i=$e(t),s=ze(r[0]),o=ze(i[0]),a=ze(r[1]),u=ze(i[1]),l=Math.sin(o-s)*Math.cos(u),c=Math.cos(a)*Math.sin(u)-Math.sin(a)*Math.cos(u)*Math.cos(o-s);return au(Math.atan2(l,c))}function Ag(n,t){var e=ga(t,n);return e=(e+180)%360,e}function ro(n,t,e,r){r===void 0&&(r={});var i=$e(n),s=ze(i[0]),o=ze(i[1]),a=ze(e),u=gl(t,r.units),l=Math.asin(Math.sin(o)*Math.cos(u)+Math.cos(o)*Math.sin(u)*Math.cos(a)),c=s+Math.atan2(Math.sin(a)*Math.sin(u)*Math.cos(o),Math.cos(u)-Math.sin(o)*Math.sin(l)),f=au(c),p=au(l);return Vt([f,p],r.properties)}function fi(n,t,e){e===void 0&&(e={});var r=$e(n),i=$e(t),s=ze(i[1]-r[1]),o=ze(i[0]-r[0]),a=ze(r[1]),u=ze(i[1]),l=Math.pow(Math.sin(s/2),2)+Math.pow(Math.sin(o/2),2)*Math.cos(a)*Math.cos(u);return pl(2*Math.atan2(Math.sqrt(l),Math.sqrt(1-l)),e.units)}function Rg(n,t,e){e===void 0&&(e={});for(var r=Cr(n),i=r.coordinates,s=0,o=0;o<i.length&&!(t>=s&&o===i.length-1);o++)if(s>=t){var a=t-s;if(a){var u=ga(i[o],i[o-1])-180,l=ro(i[o],a,u,e);return l}else return Vt(i[o])}else s+=fi(i[o],i[o+1],e);return Vt(i[i.length-1])}function Fg(n,t){const e=dn(n);return Rg(e,t,{units:"meters"}).geometry.coordinates}function no(n,t,e){if(n!==null)for(var r,i,s,o,a,u,l,c=0,f=0,p,v=n.type,w=v==="FeatureCollection",I=v==="Feature",P=w?n.features.length:1,M=0;M<P;M++){l=w?n.features[M].geometry:I?n.geometry:n,p=l?l.type==="GeometryCollection":!1,a=p?l.geometries.length:1;for(var m=0;m<a;m++){var _=0,g=0;if(o=p?l.geometries[m]:l,o!==null){u=o.coordinates;var y=o.type;switch(c=e&&(y==="Polygon"||y==="MultiPolygon")?1:0,y){case null:break;case"Point":if(t(u,f,M,_,g)===!1)return!1;f++,_++;break;case"LineString":case"MultiPoint":for(r=0;r<u.length;r++){if(t(u[r],f,M,_,g)===!1)return!1;f++,y==="MultiPoint"&&_++}y==="LineString"&&_++;break;case"Polygon":case"MultiLineString":for(r=0;r<u.length;r++){for(i=0;i<u[r].length-c;i++){if(t(u[r][i],f,M,_,g)===!1)return!1;f++}y==="MultiLineString"&&_++,y==="Polygon"&&g++}y==="Polygon"&&_++;break;case"MultiPolygon":for(r=0;r<u.length;r++){for(g=0,i=0;i<u[r].length;i++){for(s=0;s<u[r][i].length-c;s++){if(t(u[r][i][s],f,M,_,g)===!1)return!1;f++}g++}_++}break;case"GeometryCollection":for(r=0;r<o.geometries.length;r++)if(no(o.geometries[r],t,e)===!1)return!1;break;default:throw new Error("Unknown Geometry Type")}}}}}function uu(n,t){if(n.type==="Feature")t(n,0);else if(n.type==="FeatureCollection")for(var e=0;e<n.features.length&&t(n.features[e],e)!==!1;e++);}function lu(n,t){var e,r,i,s,o,a,u,l,c,f,p=0,v=n.type==="FeatureCollection",w=n.type==="Feature",I=v?n.features.length:1;for(e=0;e<I;e++){for(a=v?n.features[e].geometry:w?n.geometry:n,l=v?n.features[e].properties:w?n.properties:{},c=v?n.features[e].bbox:w?n.bbox:void 0,f=v?n.features[e].id:w?n.id:void 0,u=a?a.type==="GeometryCollection":!1,o=u?a.geometries.length:1,i=0;i<o;i++){if(s=u?a.geometries[i]:a,s===null){if(t(null,p,l,c,f)===!1)return!1;continue}switch(s.type){case"Point":case"LineString":case"MultiPoint":case"Polygon":case"MultiLineString":case"MultiPolygon":{if(t(s,p,l,c,f)===!1)return!1;break}case"GeometryCollection":{for(r=0;r<s.geometries.length;r++)if(t(s.geometries[r],p,l,c,f)===!1)return!1;break}default:throw new Error("Unknown Geometry Type")}}p++}}function kg(n,t,e){var r=e;return lu(n,function(i,s,o,a,u){r=t(r,i,s,o,a,u)}),r}function vl(n,t){lu(n,function(e,r,i,s,o){var a=e===null?null:e.type;switch(a){case null:case"Point":case"LineString":case"Polygon":return t(fn(e,i,{bbox:s,id:o}),r,0)===!1?!1:void 0}var u;switch(a){case"MultiPoint":u="Point";break;case"MultiLineString":u="LineString";break;case"MultiPolygon":u="Polygon";break}for(var l=0;l<e.coordinates.length;l++){var c=e.coordinates[l],f={type:u,coordinates:c};if(t(fn(f,i),r,l)===!1)return!1}})}function Vg(n,t){vl(n,function(e,r,i){var s=0;if(e.geometry){var o=e.geometry.type;if(!(o==="Point"||o==="MultiPoint")){var a,u=0,l=0,c=0;if(no(e,function(f,p,v,w,I){if(a===void 0||r>u||w>l||I>c){a=f,u=r,l=w,c=I,s=0;return}var P=dn([a,f],e.properties);if(t(P,r,i,I,s)===!1)return!1;s++,a=f})===!1)return!1}}})}var tf=6378137;function zg(n){return kg(n,function(t,e){return t+Ug(e)},0)}function Ug(n){var t=0,e;switch(n.type){case"Polygon":return ef(n.coordinates);case"MultiPolygon":for(e=0;e<n.coordinates.length;e++)t+=ef(n.coordinates[e]);return t;case"Point":case"MultiPoint":case"LineString":case"MultiLineString":return 0}return 0}function ef(n){var t=0;if(n&&n.length>0){t+=Math.abs(rf(n[0]));for(var e=1;e<n.length;e++)t-=Math.abs(rf(n[e]))}return t}function rf(n){var t,e,r,i,s,o,a,u=0,l=n.length;if(l>2){for(a=0;a<l;a++)a===l-2?(i=l-2,s=l-1,o=0):a===l-1?(i=l-1,s=0,o=1):(i=a,s=a+1,o=a+2),t=n[i],e=n[s],r=n[o],u+=(yl(r[0])-yl(t[0]))*Math.sin(yl(e[1]));u=u*tf*tf/2}return u}function yl(n){return n*Math.PI/180}function _l(n){if((n[0][0]!==n[n.length-1][0]||n[0][1]!==n[n.length-1][1]||n[0][2]!==n[n.length-1][2])&&n.push(n[0]),n.length<=3)return 0;const t=Be([n]);return zg(t)}function nf(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}function Gg(n){if(Object.prototype.hasOwnProperty.call(n,"__esModule"))return n;var t=n.default;if(typeof t=="function"){var e=function r(){return this instanceof r?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};e.prototype=t.prototype}else e={};return Object.defineProperty(e,"__esModule",{value:!0}),Object.keys(n).forEach(function(r){var i=Object.getOwnPropertyDescriptor(n,r);Object.defineProperty(e,r,i.get?i:{enumerable:!0,get:function(){return n[r]}})}),e}var cu={exports:{}},hu={exports:{}},Wg=hu.exports,sf;function of(){return sf||(sf=1,function(n,t){(function(e,r){n.exports=r()})(Wg,function(){function e(m,_,g,y,E){(function S(N,T,x,b,O){for(;b>x;){if(b-x>600){var A=b-x+1,F=T-x+1,X=Math.log(A),U=.5*Math.exp(2*X/3),K=.5*Math.sqrt(X*U*(A-U)/A)*(F-A/2<0?-1:1),st=Math.max(x,Math.floor(T-F*U/A+K)),lt=Math.min(b,Math.floor(T+(A-F)*U/A+K));S(N,T,st,lt,O)}var q=N[T],Y=x,H=b;for(r(N,x,T),O(N[b],q)>0&&r(N,x,b);Y<H;){for(r(N,Y,H),Y++,H--;O(N[Y],q)<0;)Y++;for(;O(N[H],q)>0;)H--}O(N[x],q)===0?r(N,x,H):r(N,++H,b),H<=T&&(x=H+1),T<=H&&(b=H-1)}})(m,_,g||0,y||m.length-1,E||i)}function r(m,_,g){var y=m[_];m[_]=m[g],m[g]=y}function i(m,_){return m<_?-1:m>_?1:0}var s=function(m){m===void 0&&(m=9),this._maxEntries=Math.max(4,m),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),this.clear()};function o(m,_,g){if(!g)return _.indexOf(m);for(var y=0;y<_.length;y++)if(g(m,_[y]))return y;return-1}function a(m,_){u(m,0,m.children.length,_,m)}function u(m,_,g,y,E){E||(E=P(null)),E.minX=1/0,E.minY=1/0,E.maxX=-1/0,E.maxY=-1/0;for(var S=_;S<g;S++){var N=m.children[S];l(E,m.leaf?y(N):N)}return E}function l(m,_){return m.minX=Math.min(m.minX,_.minX),m.minY=Math.min(m.minY,_.minY),m.maxX=Math.max(m.maxX,_.maxX),m.maxY=Math.max(m.maxY,_.maxY),m}function c(m,_){return m.minX-_.minX}function f(m,_){return m.minY-_.minY}function p(m){return(m.maxX-m.minX)*(m.maxY-m.minY)}function v(m){return m.maxX-m.minX+(m.maxY-m.minY)}function w(m,_){return m.minX<=_.minX&&m.minY<=_.minY&&_.maxX<=m.maxX&&_.maxY<=m.maxY}function I(m,_){return _.minX<=m.maxX&&_.minY<=m.maxY&&_.maxX>=m.minX&&_.maxY>=m.minY}function P(m){return{children:m,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function M(m,_,g,y,E){for(var S=[_,g];S.length;)if(!((g=S.pop())-(_=S.pop())<=y)){var N=_+Math.ceil((g-_)/y/2)*y;e(m,N,_,g,E),S.push(_,N,N,g)}}return s.prototype.all=function(){return this._all(this.data,[])},s.prototype.search=function(m){var _=this.data,g=[];if(!I(m,_))return g;for(var y=this.toBBox,E=[];_;){for(var S=0;S<_.children.length;S++){var N=_.children[S],T=_.leaf?y(N):N;I(m,T)&&(_.leaf?g.push(N):w(m,T)?this._all(N,g):E.push(N))}_=E.pop()}return g},s.prototype.collides=function(m){var _=this.data;if(!I(m,_))return!1;for(var g=[];_;){for(var y=0;y<_.children.length;y++){var E=_.children[y],S=_.leaf?this.toBBox(E):E;if(I(m,S)){if(_.leaf||w(m,S))return!0;g.push(E)}}_=g.pop()}return!1},s.prototype.load=function(m){if(!m||!m.length)return this;if(m.length<this._minEntries){for(var _=0;_<m.length;_++)this.insert(m[_]);return this}var g=this._build(m.slice(),0,m.length-1,0);if(this.data.children.length)if(this.data.height===g.height)this._splitRoot(this.data,g);else{if(this.data.height<g.height){var y=this.data;this.data=g,g=y}this._insert(g,this.data.height-g.height-1,!0)}else this.data=g;return this},s.prototype.insert=function(m){return m&&this._insert(m,this.data.height-1),this},s.prototype.clear=function(){return this.data=P([]),this},s.prototype.remove=function(m,_){if(!m)return this;for(var g,y,E,S=this.data,N=this.toBBox(m),T=[],x=[];S||T.length;){if(S||(S=T.pop(),y=T[T.length-1],g=x.pop(),E=!0),S.leaf){var b=o(m,S.children,_);if(b!==-1)return S.children.splice(b,1),T.push(S),this._condense(T),this}E||S.leaf||!w(S,N)?y?(g++,S=y.children[g],E=!1):S=null:(T.push(S),x.push(g),g=0,y=S,S=S.children[0])}return this},s.prototype.toBBox=function(m){return m},s.prototype.compareMinX=function(m,_){return m.minX-_.minX},s.prototype.compareMinY=function(m,_){return m.minY-_.minY},s.prototype.toJSON=function(){return this.data},s.prototype.fromJSON=function(m){return this.data=m,this},s.prototype._all=function(m,_){for(var g=[];m;)m.leaf?_.push.apply(_,m.children):g.push.apply(g,m.children),m=g.pop();return _},s.prototype._build=function(m,_,g,y){var E,S=g-_+1,N=this._maxEntries;if(S<=N)return a(E=P(m.slice(_,g+1)),this.toBBox),E;y||(y=Math.ceil(Math.log(S)/Math.log(N)),N=Math.ceil(S/Math.pow(N,y-1))),(E=P([])).leaf=!1,E.height=y;var T=Math.ceil(S/N),x=T*Math.ceil(Math.sqrt(N));M(m,_,g,x,this.compareMinX);for(var b=_;b<=g;b+=x){var O=Math.min(b+x-1,g);M(m,b,O,T,this.compareMinY);for(var A=b;A<=O;A+=T){var F=Math.min(A+T-1,O);E.children.push(this._build(m,A,F,y-1))}}return a(E,this.toBBox),E},s.prototype._chooseSubtree=function(m,_,g,y){for(;y.push(_),!_.leaf&&y.length-1!==g;){for(var E=1/0,S=1/0,N=void 0,T=0;T<_.children.length;T++){var x=_.children[T],b=p(x),O=(A=m,F=x,(Math.max(F.maxX,A.maxX)-Math.min(F.minX,A.minX))*(Math.max(F.maxY,A.maxY)-Math.min(F.minY,A.minY))-b);O<S?(S=O,E=b<E?b:E,N=x):O===S&&b<E&&(E=b,N=x)}_=N||_.children[0]}var A,F;return _},s.prototype._insert=function(m,_,g){var y=g?m:this.toBBox(m),E=[],S=this._chooseSubtree(y,this.data,_,E);for(S.children.push(m),l(S,y);_>=0&&E[_].children.length>this._maxEntries;)this._split(E,_),_--;this._adjustParentBBoxes(y,E,_)},s.prototype._split=function(m,_){var g=m[_],y=g.children.length,E=this._minEntries;this._chooseSplitAxis(g,E,y);var S=this._chooseSplitIndex(g,E,y),N=P(g.children.splice(S,g.children.length-S));N.height=g.height,N.leaf=g.leaf,a(g,this.toBBox),a(N,this.toBBox),_?m[_-1].children.push(N):this._splitRoot(g,N)},s.prototype._splitRoot=function(m,_){this.data=P([m,_]),this.data.height=m.height+1,this.data.leaf=!1,a(this.data,this.toBBox)},s.prototype._chooseSplitIndex=function(m,_,g){for(var y,E,S,N,T,x,b,O=1/0,A=1/0,F=_;F<=g-_;F++){var X=u(m,0,F,this.toBBox),U=u(m,F,g,this.toBBox),K=(E=X,S=U,N=void 0,T=void 0,x=void 0,b=void 0,N=Math.max(E.minX,S.minX),T=Math.max(E.minY,S.minY),x=Math.min(E.maxX,S.maxX),b=Math.min(E.maxY,S.maxY),Math.max(0,x-N)*Math.max(0,b-T)),st=p(X)+p(U);K<O?(O=K,y=F,A=st<A?st:A):K===O&&st<A&&(A=st,y=F)}return y||g-_},s.prototype._chooseSplitAxis=function(m,_,g){var y=m.leaf?this.compareMinX:c,E=m.leaf?this.compareMinY:f;this._allDistMargin(m,_,g,y)<this._allDistMargin(m,_,g,E)&&m.children.sort(y)},s.prototype._allDistMargin=function(m,_,g,y){m.children.sort(y);for(var E=this.toBBox,S=u(m,0,_,E),N=u(m,g-_,g,E),T=v(S)+v(N),x=_;x<g-_;x++){var b=m.children[x];l(S,m.leaf?E(b):b),T+=v(S)}for(var O=g-_-1;O>=_;O--){var A=m.children[O];l(N,m.leaf?E(A):A),T+=v(N)}return T},s.prototype._adjustParentBBoxes=function(m,_,g){for(var y=g;y>=0;y--)l(_[y],m)},s.prototype._condense=function(m){for(var _=m.length-1,g=void 0;_>=0;_--)m[_].children.length===0?_>0?(g=m[_-1].children).splice(g.indexOf(m[_]),1):this.clear():a(m[_],this.toBBox)},s})}(hu)),hu.exports}class qg{constructor(t=[],e=Xg){if(this.data=t,this.length=this.data.length,this.compare=e,this.length>0)for(let r=(this.length>>1)-1;r>=0;r--)this._down(r)}push(t){this.data.push(t),this.length++,this._up(this.length-1)}pop(){if(this.length===0)return;const t=this.data[0],e=this.data.pop();return this.length--,this.length>0&&(this.data[0]=e,this._down(0)),t}peek(){return this.data[0]}_up(t){const{data:e,compare:r}=this,i=e[t];for(;t>0;){const s=t-1>>1,o=e[s];if(r(i,o)>=0)break;e[t]=o,t=s}e[t]=i}_down(t){const{data:e,compare:r}=this,i=this.length>>1,s=e[t];for(;t<i;){let o=(t<<1)+1,a=e[o];const u=o+1;if(u<this.length&&r(e[u],a)<0&&(o=u,a=e[u]),r(a,s)>=0)break;e[t]=a,t=o}e[t]=s}}function Xg(n,t){return n<t?-1:n>t?1:0}const Yg=Gg(Object.freeze(Object.defineProperty({__proto__:null,default:qg},Symbol.toStringTag,{value:"Module"})));var ma={exports:{}},wl,af;function Hg(){return af||(af=1,wl=function(t,e,r,i){var s=t[0],o=t[1],a=!1;r===void 0&&(r=0),i===void 0&&(i=e.length);for(var u=(i-r)/2,l=0,c=u-1;l<u;c=l++){var f=e[r+l*2+0],p=e[r+l*2+1],v=e[r+c*2+0],w=e[r+c*2+1],I=p>o!=w>o&&s<(v-f)*(o-p)/(w-p)+f;I&&(a=!a)}return a}),wl}var El,uf;function Jg(){return uf||(uf=1,El=function(t,e,r,i){var s=t[0],o=t[1],a=!1;r===void 0&&(r=0),i===void 0&&(i=e.length);for(var u=i-r,l=0,c=u-1;l<u;c=l++){var f=e[l+r][0],p=e[l+r][1],v=e[c+r][0],w=e[c+r][1],I=p>o!=w>o&&s<(v-f)*(o-p)/(w-p)+f;I&&(a=!a)}return a}),El}var lf;function Zg(){if(lf)return ma.exports;lf=1;var n=Hg(),t=Jg();return ma.exports=function(r,i,s,o){return i.length>0&&Array.isArray(i[0])?t(r,i,s,o):n(r,i,s,o)},ma.exports.nested=t,ma.exports.flat=n,ma.exports}var va={exports:{}},Kg=va.exports,cf;function Qg(){return cf||(cf=1,function(n,t){(function(e,r){r(t)})(Kg,function(e){const i=33306690738754706e-32;function s(I,P,M,m,_){let g,y,E,S,N=P[0],T=m[0],x=0,b=0;T>N==T>-N?(g=N,N=P[++x]):(g=T,T=m[++b]);let O=0;if(x<I&&b<M)for(T>N==T>-N?(E=g-((y=N+g)-N),N=P[++x]):(E=g-((y=T+g)-T),T=m[++b]),g=y,E!==0&&(_[O++]=E);x<I&&b<M;)T>N==T>-N?(E=g-((y=g+N)-(S=y-g))+(N-S),N=P[++x]):(E=g-((y=g+T)-(S=y-g))+(T-S),T=m[++b]),g=y,E!==0&&(_[O++]=E);for(;x<I;)E=g-((y=g+N)-(S=y-g))+(N-S),N=P[++x],g=y,E!==0&&(_[O++]=E);for(;b<M;)E=g-((y=g+T)-(S=y-g))+(T-S),T=m[++b],g=y,E!==0&&(_[O++]=E);return g===0&&O!==0||(_[O++]=g),O}function o(I){return new Float64Array(I)}const a=33306690738754716e-32,u=22204460492503146e-32,l=11093356479670487e-47,c=o(4),f=o(8),p=o(12),v=o(16),w=o(4);e.orient2d=function(I,P,M,m,_,g){const y=(P-g)*(M-_),E=(I-_)*(m-g),S=y-E;if(y===0||E===0||y>0!=E>0)return S;const N=Math.abs(y+E);return Math.abs(S)>=a*N?S:-function(T,x,b,O,A,F,X){let U,K,st,lt,q,Y,H,dt,Tt,wt,Et,Lt,oe,re,yr,_r,hi,wr;const Er=T-A,Sr=b-A,zn=x-F,Un=O-F;q=(yr=(dt=Er-(H=(Y=134217729*Er)-(Y-Er)))*(wt=Un-(Tt=(Y=134217729*Un)-(Y-Un)))-((re=Er*Un)-H*Tt-dt*Tt-H*wt))-(Et=yr-(hi=(dt=zn-(H=(Y=134217729*zn)-(Y-zn)))*(wt=Sr-(Tt=(Y=134217729*Sr)-(Y-Sr)))-((_r=zn*Sr)-H*Tt-dt*Tt-H*wt))),c[0]=yr-(Et+q)+(q-hi),q=(oe=re-((Lt=re+Et)-(q=Lt-re))+(Et-q))-(Et=oe-_r),c[1]=oe-(Et+q)+(q-_r),q=(wr=Lt+Et)-Lt,c[2]=Lt-(wr-q)+(Et-q),c[3]=wr;let fs=function(z_,Kp){let Qp=Kp[0];for(let kh=1;kh<z_;kh++)Qp+=Kp[kh];return Qp}(4,c),su=u*X;if(fs>=su||-fs>=su||(U=T-(Er+(q=T-Er))+(q-A),st=b-(Sr+(q=b-Sr))+(q-A),K=x-(zn+(q=x-zn))+(q-F),lt=O-(Un+(q=O-Un))+(q-F),U===0&&K===0&&st===0&&lt===0)||(su=l*X+i*Math.abs(fs),(fs+=Er*lt+Un*U-(zn*st+Sr*K))>=su||-fs>=su))return fs;q=(yr=(dt=U-(H=(Y=134217729*U)-(Y-U)))*(wt=Un-(Tt=(Y=134217729*Un)-(Y-Un)))-((re=U*Un)-H*Tt-dt*Tt-H*wt))-(Et=yr-(hi=(dt=K-(H=(Y=134217729*K)-(Y-K)))*(wt=Sr-(Tt=(Y=134217729*Sr)-(Y-Sr)))-((_r=K*Sr)-H*Tt-dt*Tt-H*wt))),w[0]=yr-(Et+q)+(q-hi),q=(oe=re-((Lt=re+Et)-(q=Lt-re))+(Et-q))-(Et=oe-_r),w[1]=oe-(Et+q)+(q-_r),q=(wr=Lt+Et)-Lt,w[2]=Lt-(wr-q)+(Et-q),w[3]=wr;const F_=s(4,c,4,w,f);q=(yr=(dt=Er-(H=(Y=134217729*Er)-(Y-Er)))*(wt=lt-(Tt=(Y=134217729*lt)-(Y-lt)))-((re=Er*lt)-H*Tt-dt*Tt-H*wt))-(Et=yr-(hi=(dt=zn-(H=(Y=134217729*zn)-(Y-zn)))*(wt=st-(Tt=(Y=134217729*st)-(Y-st)))-((_r=zn*st)-H*Tt-dt*Tt-H*wt))),w[0]=yr-(Et+q)+(q-hi),q=(oe=re-((Lt=re+Et)-(q=Lt-re))+(Et-q))-(Et=oe-_r),w[1]=oe-(Et+q)+(q-_r),q=(wr=Lt+Et)-Lt,w[2]=Lt-(wr-q)+(Et-q),w[3]=wr;const k_=s(F_,f,4,w,p);q=(yr=(dt=U-(H=(Y=134217729*U)-(Y-U)))*(wt=lt-(Tt=(Y=134217729*lt)-(Y-lt)))-((re=U*lt)-H*Tt-dt*Tt-H*wt))-(Et=yr-(hi=(dt=K-(H=(Y=134217729*K)-(Y-K)))*(wt=st-(Tt=(Y=134217729*st)-(Y-st)))-((_r=K*st)-H*Tt-dt*Tt-H*wt))),w[0]=yr-(Et+q)+(q-hi),q=(oe=re-((Lt=re+Et)-(q=Lt-re))+(Et-q))-(Et=oe-_r),w[1]=oe-(Et+q)+(q-_r),q=(wr=Lt+Et)-Lt,w[2]=Lt-(wr-q)+(Et-q),w[3]=wr;const V_=s(k_,p,4,w,v);return v[V_-1]}(I,P,M,m,_,g,N)},e.orient2dfast=function(I,P,M,m,_,g){return(P-g)*(M-_)-(I-_)*(m-g)},Object.defineProperty(e,"__esModule",{value:!0})})}(va,va.exports)),va.exports}var hf;function Bg(){if(hf)return cu.exports;hf=1;var n=of(),t=Yg,e=Zg(),r=Qg().orient2d;t.default&&(t=t.default),cu.exports=i,cu.exports.default=i;function i(g,y,E){y=Math.max(0,y===void 0?2:y),E=E||0;var S=v(g),N=new n(16);N.toBBox=function(H){return{minX:H[0],minY:H[1],maxX:H[0],maxY:H[1]}},N.compareMinX=function(H,dt){return H[0]-dt[0]},N.compareMinY=function(H,dt){return H[1]-dt[1]},N.load(g);for(var T=[],x=0,b;x<S.length;x++){var O=S[x];N.remove(O),b=w(O,b),T.push(b)}var A=new n(16);for(x=0;x<T.length;x++)A.insert(p(T[x]));for(var F=y*y,X=E*E;T.length;){var U=T.shift(),K=U.p,st=U.next.p,lt=I(K,st);if(!(lt<X)){var q=lt/F;O=s(N,U.prev.p,K,st,U.next.next.p,q,A),O&&Math.min(I(O,K),I(O,st))<=q&&(T.push(U),T.push(w(O,U)),N.remove(O),A.remove(U),A.insert(p(U)),A.insert(p(U.next)))}}U=b;var Y=[];do Y.push(U.p),U=U.next;while(U!==b);return Y.push(U.p),Y}function s(g,y,E,S,N,T,x){for(var b=new t([],o),O=g.data;O;){for(var A=0;A<O.children.length;A++){var F=O.children[A],X=O.leaf?P(F,E,S):a(E,S,F);X>T||b.push({node:F,dist:X})}for(;b.length&&!b.peek().node.children;){var U=b.pop(),K=U.node,st=P(K,y,E),lt=P(K,S,N);if(U.dist<st&&U.dist<lt&&l(E,K,x)&&l(S,K,x))return K}O=b.pop(),O&&(O=O.node)}return null}function o(g,y){return g.dist-y.dist}function a(g,y,E){if(u(g,E)||u(y,E))return 0;var S=M(g[0],g[1],y[0],y[1],E.minX,E.minY,E.maxX,E.minY);if(S===0)return 0;var N=M(g[0],g[1],y[0],y[1],E.minX,E.minY,E.minX,E.maxY);if(N===0)return 0;var T=M(g[0],g[1],y[0],y[1],E.maxX,E.minY,E.maxX,E.maxY);if(T===0)return 0;var x=M(g[0],g[1],y[0],y[1],E.minX,E.maxY,E.maxX,E.maxY);return x===0?0:Math.min(S,N,T,x)}function u(g,y){return g[0]>=y.minX&&g[0]<=y.maxX&&g[1]>=y.minY&&g[1]<=y.maxY}function l(g,y,E){for(var S=Math.min(g[0],y[0]),N=Math.min(g[1],y[1]),T=Math.max(g[0],y[0]),x=Math.max(g[1],y[1]),b=E.search({minX:S,minY:N,maxX:T,maxY:x}),O=0;O<b.length;O++)if(f(b[O].p,b[O].next.p,g,y))return!1;return!0}function c(g,y,E){return r(g[0],g[1],y[0],y[1],E[0],E[1])}function f(g,y,E,S){return g!==S&&y!==E&&c(g,y,E)>0!=c(g,y,S)>0&&c(E,S,g)>0!=c(E,S,y)>0}function p(g){var y=g.p,E=g.next.p;return g.minX=Math.min(y[0],E[0]),g.minY=Math.min(y[1],E[1]),g.maxX=Math.max(y[0],E[0]),g.maxY=Math.max(y[1],E[1]),g}function v(g){for(var y=g[0],E=g[0],S=g[0],N=g[0],T=0;T<g.length;T++){var x=g[T];x[0]<y[0]&&(y=x),x[0]>S[0]&&(S=x),x[1]<E[1]&&(E=x),x[1]>N[1]&&(N=x)}var b=[y,E,S,N],O=b.slice();for(T=0;T<g.length;T++)e(g[T],b)||O.push(g[T]);return _(O)}function w(g,y){var E={p:g,prev:null,next:null,minX:0,minY:0,maxX:0,maxY:0};return y?(E.next=y.next,E.prev=y,y.next.prev=E,y.next=E):(E.prev=E,E.next=E),E}function I(g,y){var E=g[0]-y[0],S=g[1]-y[1];return E*E+S*S}function P(g,y,E){var S=y[0],N=y[1],T=E[0]-S,x=E[1]-N;if(T!==0||x!==0){var b=((g[0]-S)*T+(g[1]-N)*x)/(T*T+x*x);b>1?(S=E[0],N=E[1]):b>0&&(S+=T*b,N+=x*b)}return T=g[0]-S,x=g[1]-N,T*T+x*x}function M(g,y,E,S,N,T,x,b){var O=E-g,A=S-y,F=x-N,X=b-T,U=g-N,K=y-T,st=O*O+A*A,lt=O*F+A*X,q=F*F+X*X,Y=O*U+A*K,H=F*U+X*K,dt=st*q-lt*lt,Tt,wt,Et,Lt,oe=dt,re=dt;dt===0?(wt=0,oe=1,Lt=H,re=q):(wt=lt*H-q*Y,Lt=st*H-lt*Y,wt<0?(wt=0,Lt=H,re=q):wt>oe&&(wt=oe,Lt=H+lt,re=q)),Lt<0?(Lt=0,-Y<0?wt=0:-Y>st?wt=oe:(wt=-Y,oe=st)):Lt>re&&(Lt=re,-Y+lt<0?wt=0:-Y+lt>st?wt=oe:(wt=-Y+lt,oe=st)),Tt=wt===0?0:wt/oe,Et=Lt===0?0:Lt/re;var yr=(1-Tt)*g+Tt*E,_r=(1-Tt)*y+Tt*S,hi=(1-Et)*N+Et*x,wr=(1-Et)*T+Et*b,Er=hi-yr,Sr=wr-_r;return Er*Er+Sr*Sr}function m(g,y){return g[0]===y[0]?g[1]-y[1]:g[0]-y[0]}function _(g){g.sort(m);for(var y=[],E=0;E<g.length;E++){for(;y.length>=2&&c(y[y.length-2],y[y.length-1],g[E])<=0;)y.pop();y.push(g[E])}for(var S=[],N=g.length-1;N>=0;N--){for(;S.length>=2&&c(S[S.length-2],S[S.length-1],g[N])<=0;)S.pop();S.push(g[N])}return S.pop(),y.pop(),y.concat(S)}return cu.exports}var $g=Bg();const jg=nf($g);function tm(n,t){t===void 0&&(t={}),t.concavity=t.concavity||1/0;var e=[];if(no(n,function(i){e.push([i[0],i[1]])}),!e.length)return null;var r=jg(e,t.concavity);return r.length>3?Be([r]):null}function ff(n,t){t===void 0&&(t={});var e=0,r=0,i=0;return no(n,function(s){e+=s[0],r+=s[1],i++},!0),Vt([e/i,r/i],t.properties)}function df(n,t){switch(t===void 0&&(t={}),Lg(n)){case"Point":return Vt($e(n),t.properties);case"Polygon":var e=[];no(n,function(g){e.push(g)});var r=ff(n,{properties:t.properties}),i=r.geometry.coordinates,s=0,o=0,a=0,u,l,c,f,p,v,w,I,P=e.map(function(g){return[g[0]-i[0],g[1]-i[1]]});for(u=0;u<e.length-1;u++)l=P[u],f=l[0],v=l[1],c=P[u+1],p=c[0],w=c[1],I=f*w-p*v,a+=I,s+=(f+p)*I,o+=(v+w)*I;if(a===0)return r;var M=a*.5,m=1/(6*M);return Vt([i[0]+m*s,i[1]+m*o],t.properties);default:var _=tm(n);return _?df(_,{properties:t.properties}):ff(n,{properties:t.properties})}}function em(n){(n[0][0]!==n[n.length-1][0]||n[0][1]!==n[n.length-1][1]||n[0][2]!==n[n.length-1][2])&&n.push(n[0]);const t=Be([n]),r=df(t).geometry.coordinates;return[r[0],r[1],r[2]??n[0][2]??0]}function rm(n,t,e,r){const[i,s,o]=n,a=ro(Vt([i,s]),t,e,{units:"meters"});if(!(!a||!a.geometry||!a.geometry.coordinates))return r=r||[0,0,0],r[0]=a.geometry.coordinates[0],r[1]=a.geometry.coordinates[1],r[2]=o,r}function Sl(n,t){return fi(Vt(n),Vt(t),{units:"meters"})}function fu(n,t){return ga(Vt(n),Vt(t))}function pf(n){if(!n)throw new Error("geojson is required");var t=[];return vl(n,function(e){nm(e,t)}),eo(t)}function nm(n,t){var e=[],r=n.geometry;if(r!==null){switch(r.type){case"Polygon":e=ms(r);break;case"LineString":e=[ms(r)]}e.forEach(function(i){var s=im(i,n.properties);s.forEach(function(o){o.id=t.length,t.push(o)})})}}function im(n,t){var e=[];return n.reduce(function(r,i){var s=dn([r,i],t);return s.bbox=sm(r,i),e.push(s),i}),e}function sm(n,t){var e=n[0],r=n[1],i=t[0],s=t[1],o=e<i?e:i,a=r<s?r:s,u=e>i?e:i,l=r>s?r:s;return[o,a,u,l]}var du={exports:{}},Cl={},gf;function mf(){return gf||(gf=1,function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.earthRadius=63710088e-1,n.factors={centimeters:n.earthRadius*100,centimetres:n.earthRadius*100,degrees:n.earthRadius/111325,feet:n.earthRadius*3.28084,inches:n.earthRadius*39.37,kilometers:n.earthRadius/1e3,kilometres:n.earthRadius/1e3,meters:n.earthRadius,metres:n.earthRadius,miles:n.earthRadius/1609.344,millimeters:n.earthRadius*1e3,millimetres:n.earthRadius*1e3,nauticalmiles:n.earthRadius/1852,radians:1,yards:n.earthRadius*1.0936},n.unitsFactors={centimeters:100,centimetres:100,degrees:1/111325,feet:3.28084,inches:39.37,kilometers:1/1e3,kilometres:1/1e3,meters:1,metres:1,miles:1/1609.344,millimeters:1e3,millimetres:1e3,nauticalmiles:1/1852,radians:1/n.earthRadius,yards:1.0936133},n.areaFactors={acres:247105e-9,centimeters:1e4,centimetres:1e4,feet:10.763910417,hectares:1e-4,inches:1550.003100006,kilometers:1e-6,kilometres:1e-6,meters:1,metres:1,miles:386e-9,millimeters:1e6,millimetres:1e6,yards:1.195990046};function t(b,O,A){A===void 0&&(A={});var F={type:"Feature"};return(A.id===0||A.id)&&(F.id=A.id),A.bbox&&(F.bbox=A.bbox),F.properties=O||{},F.geometry=b,F}n.feature=t;function e(b,O,A){switch(b){case"Point":return r(O).geometry;case"LineString":return a(O).geometry;case"Polygon":return s(O).geometry;case"MultiPoint":return f(O).geometry;case"MultiLineString":return c(O).geometry;case"MultiPolygon":return p(O).geometry;default:throw new Error(b+" is invalid")}}n.geometry=e;function r(b,O,A){if(A===void 0&&(A={}),!b)throw new Error("coordinates is required");if(!Array.isArray(b))throw new Error("coordinates must be an Array");if(b.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!S(b[0])||!S(b[1]))throw new Error("coordinates must contain numbers");var F={type:"Point",coordinates:b};return t(F,O,A)}n.point=r;function i(b,O,A){return A===void 0&&(A={}),l(b.map(function(F){return r(F,O)}),A)}n.points=i;function s(b,O,A){A===void 0&&(A={});for(var F=0,X=b;F<X.length;F++){var U=X[F];if(U.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");for(var K=0;K<U[U.length-1].length;K++)if(U[U.length-1][K]!==U[0][K])throw new Error("First and last Position are not equivalent.")}var st={type:"Polygon",coordinates:b};return t(st,O,A)}n.polygon=s;function o(b,O,A){return A===void 0&&(A={}),l(b.map(function(F){return s(F,O)}),A)}n.polygons=o;function a(b,O,A){if(A===void 0&&(A={}),b.length<2)throw new Error("coordinates must be an array of two or more positions");var F={type:"LineString",coordinates:b};return t(F,O,A)}n.lineString=a;function u(b,O,A){return A===void 0&&(A={}),l(b.map(function(F){return a(F,O)}),A)}n.lineStrings=u;function l(b,O){O===void 0&&(O={});var A={type:"FeatureCollection"};return O.id&&(A.id=O.id),O.bbox&&(A.bbox=O.bbox),A.features=b,A}n.featureCollection=l;function c(b,O,A){A===void 0&&(A={});var F={type:"MultiLineString",coordinates:b};return t(F,O,A)}n.multiLineString=c;function f(b,O,A){A===void 0&&(A={});var F={type:"MultiPoint",coordinates:b};return t(F,O,A)}n.multiPoint=f;function p(b,O,A){A===void 0&&(A={});var F={type:"MultiPolygon",coordinates:b};return t(F,O,A)}n.multiPolygon=p;function v(b,O,A){A===void 0&&(A={});var F={type:"GeometryCollection",geometries:b};return t(F,O,A)}n.geometryCollection=v;function w(b,O){if(O===void 0&&(O=0),O&&!(O>=0))throw new Error("precision must be a positive number");var A=Math.pow(10,O||0);return Math.round(b*A)/A}n.round=w;function I(b,O){O===void 0&&(O="kilometers");var A=n.factors[O];if(!A)throw new Error(O+" units is invalid");return b*A}n.radiansToLength=I;function P(b,O){O===void 0&&(O="kilometers");var A=n.factors[O];if(!A)throw new Error(O+" units is invalid");return b/A}n.lengthToRadians=P;function M(b,O){return _(P(b,O))}n.lengthToDegrees=M;function m(b){var O=b%360;return O<0&&(O+=360),O}n.bearingToAzimuth=m;function _(b){var O=b%(2*Math.PI);return O*180/Math.PI}n.radiansToDegrees=_;function g(b){var O=b%360;return O*Math.PI/180}n.degreesToRadians=g;function y(b,O,A){if(O===void 0&&(O="kilometers"),A===void 0&&(A="kilometers"),!(b>=0))throw new Error("length must be a positive number");return I(P(b,O),A)}n.convertLength=y;function E(b,O,A){if(O===void 0&&(O="meters"),A===void 0&&(A="kilometers"),!(b>=0))throw new Error("area must be a positive number");var F=n.areaFactors[O];if(!F)throw new Error("invalid original units");var X=n.areaFactors[A];if(!X)throw new Error("invalid final units");return b/F*X}n.convertArea=E;function S(b){return!isNaN(b)&&b!==null&&!Array.isArray(b)}n.isNumber=S;function N(b){return!!b&&b.constructor===Object}n.isObject=N;function T(b){if(!b)throw new Error("bbox is required");if(!Array.isArray(b))throw new Error("bbox must be an Array");if(b.length!==4&&b.length!==6)throw new Error("bbox must be an Array of 4 or 6 numbers");b.forEach(function(O){if(!S(O))throw new Error("bbox must only contain numbers")})}n.validateBBox=T;function x(b){if(!b)throw new Error("id is required");if(["string","number"].indexOf(typeof b)===-1)throw new Error("id must be a number or a string")}n.validateId=x}(Cl)),Cl}var ae={},vf;function yf(){if(vf)return ae;vf=1,Object.defineProperty(ae,"__esModule",{value:!0});var n=mf();function t(m,_,g){if(m!==null)for(var y,E,S,N,T,x,b,O=0,A=0,F,X=m.type,U=X==="FeatureCollection",K=X==="Feature",st=U?m.features.length:1,lt=0;lt<st;lt++){b=U?m.features[lt].geometry:K?m.geometry:m,F=b?b.type==="GeometryCollection":!1,T=F?b.geometries.length:1;for(var q=0;q<T;q++){var Y=0,H=0;if(N=F?b.geometries[q]:b,N!==null){x=N.coordinates;var dt=N.type;switch(O=g&&(dt==="Polygon"||dt==="MultiPolygon")?1:0,dt){case null:break;case"Point":if(_(x,A,lt,Y,H)===!1)return!1;A++,Y++;break;case"LineString":case"MultiPoint":for(y=0;y<x.length;y++){if(_(x[y],A,lt,Y,H)===!1)return!1;A++,dt==="MultiPoint"&&Y++}dt==="LineString"&&Y++;break;case"Polygon":case"MultiLineString":for(y=0;y<x.length;y++){for(E=0;E<x[y].length-O;E++){if(_(x[y][E],A,lt,Y,H)===!1)return!1;A++}dt==="MultiLineString"&&Y++,dt==="Polygon"&&H++}dt==="Polygon"&&Y++;break;case"MultiPolygon":for(y=0;y<x.length;y++){for(H=0,E=0;E<x[y].length;E++){for(S=0;S<x[y][E].length-O;S++){if(_(x[y][E][S],A,lt,Y,H)===!1)return!1;A++}H++}Y++}break;case"GeometryCollection":for(y=0;y<N.geometries.length;y++)if(t(N.geometries[y],_,g)===!1)return!1;break;default:throw new Error("Unknown Geometry Type")}}}}}function e(m,_,g,y){var E=g;return t(m,function(S,N,T,x,b){N===0&&g===void 0?E=S:E=_(E,S,N,T,x,b)},y),E}function r(m,_){var g;switch(m.type){case"FeatureCollection":for(g=0;g<m.features.length&&_(m.features[g].properties,g)!==!1;g++);break;case"Feature":_(m.properties,0);break}}function i(m,_,g){var y=g;return r(m,function(E,S){S===0&&g===void 0?y=E:y=_(y,E,S)}),y}function s(m,_){if(m.type==="Feature")_(m,0);else if(m.type==="FeatureCollection")for(var g=0;g<m.features.length&&_(m.features[g],g)!==!1;g++);}function o(m,_,g){var y=g;return s(m,function(E,S){S===0&&g===void 0?y=E:y=_(y,E,S)}),y}function a(m){var _=[];return t(m,function(g){_.push(g)}),_}function u(m,_){var g,y,E,S,N,T,x,b,O,A,F=0,X=m.type==="FeatureCollection",U=m.type==="Feature",K=X?m.features.length:1;for(g=0;g<K;g++){for(T=X?m.features[g].geometry:U?m.geometry:m,b=X?m.features[g].properties:U?m.properties:{},O=X?m.features[g].bbox:U?m.bbox:void 0,A=X?m.features[g].id:U?m.id:void 0,x=T?T.type==="GeometryCollection":!1,N=x?T.geometries.length:1,E=0;E<N;E++){if(S=x?T.geometries[E]:T,S===null){if(_(null,F,b,O,A)===!1)return!1;continue}switch(S.type){case"Point":case"LineString":case"MultiPoint":case"Polygon":case"MultiLineString":case"MultiPolygon":{if(_(S,F,b,O,A)===!1)return!1;break}case"GeometryCollection":{for(y=0;y<S.geometries.length;y++)if(_(S.geometries[y],F,b,O,A)===!1)return!1;break}default:throw new Error("Unknown Geometry Type")}}F++}}function l(m,_,g){var y=g;return u(m,function(E,S,N,T,x){S===0&&g===void 0?y=E:y=_(y,E,S,N,T,x)}),y}function c(m,_){u(m,function(g,y,E,S,N){var T=g===null?null:g.type;switch(T){case null:case"Point":case"LineString":case"Polygon":return _(n.feature(g,E,{bbox:S,id:N}),y,0)===!1?!1:void 0}var x;switch(T){case"MultiPoint":x="Point";break;case"MultiLineString":x="LineString";break;case"MultiPolygon":x="Polygon";break}for(var b=0;b<g.coordinates.length;b++){var O=g.coordinates[b],A={type:x,coordinates:O};if(_(n.feature(A,E),y,b)===!1)return!1}})}function f(m,_,g){var y=g;return c(m,function(E,S,N){S===0&&N===0&&g===void 0?y=E:y=_(y,E,S,N)}),y}function p(m,_){c(m,function(g,y,E){var S=0;if(g.geometry){var N=g.geometry.type;if(!(N==="Point"||N==="MultiPoint")){var T,x=0,b=0,O=0;if(t(g,function(A,F,X,U,K){if(T===void 0||y>x||U>b||K>O){T=A,x=y,b=U,O=K,S=0;return}var st=n.lineString([T,A],g.properties);if(_(st,y,E,K,S)===!1)return!1;S++,T=A})===!1)return!1}}})}function v(m,_,g){var y=g,E=!1;return p(m,function(S,N,T,x,b){E===!1&&g===void 0?y=S:y=_(y,S,N,T,x,b),E=!0}),y}function w(m,_){if(!m)throw new Error("geojson is required");c(m,function(g,y,E){if(g.geometry!==null){var S=g.geometry.type,N=g.geometry.coordinates;switch(S){case"LineString":if(_(g,y,E,0,0)===!1)return!1;break;case"Polygon":for(var T=0;T<N.length;T++)if(_(n.lineString(N[T],g.properties),y,E,T)===!1)return!1;break}}})}function I(m,_,g){var y=g;return w(m,function(E,S,N,T){S===0&&g===void 0?y=E:y=_(y,E,S,N,T)}),y}function P(m,_){if(_=_||{},!n.isObject(_))throw new Error("options is invalid");var g=_.featureIndex||0,y=_.multiFeatureIndex||0,E=_.geometryIndex||0,S=_.segmentIndex||0,N=_.properties,T;switch(m.type){case"FeatureCollection":g<0&&(g=m.features.length+g),N=N||m.features[g].properties,T=m.features[g].geometry;break;case"Feature":N=N||m.properties,T=m.geometry;break;case"Point":case"MultiPoint":return null;case"LineString":case"Polygon":case"MultiLineString":case"MultiPolygon":T=m;break;default:throw new Error("geojson is invalid")}if(T===null)return null;var x=T.coordinates;switch(T.type){case"Point":case"MultiPoint":return null;case"LineString":return S<0&&(S=x.length+S-1),n.lineString([x[S],x[S+1]],N,_);case"Polygon":return E<0&&(E=x.length+E),S<0&&(S=x[E].length+S-1),n.lineString([x[E][S],x[E][S+1]],N,_);case"MultiLineString":return y<0&&(y=x.length+y),S<0&&(S=x[y].length+S-1),n.lineString([x[y][S],x[y][S+1]],N,_);case"MultiPolygon":return y<0&&(y=x.length+y),E<0&&(E=x[y].length+E),S<0&&(S=x[y][E].length-S-1),n.lineString([x[y][E][S],x[y][E][S+1]],N,_)}throw new Error("geojson is invalid")}function M(m,_){if(_=_||{},!n.isObject(_))throw new Error("options is invalid");var g=_.featureIndex||0,y=_.multiFeatureIndex||0,E=_.geometryIndex||0,S=_.coordIndex||0,N=_.properties,T;switch(m.type){case"FeatureCollection":g<0&&(g=m.features.length+g),N=N||m.features[g].properties,T=m.features[g].geometry;break;case"Feature":N=N||m.properties,T=m.geometry;break;case"Point":case"MultiPoint":return null;case"LineString":case"Polygon":case"MultiLineString":case"MultiPolygon":T=m;break;default:throw new Error("geojson is invalid")}if(T===null)return null;var x=T.coordinates;switch(T.type){case"Point":return n.point(x,N,_);case"MultiPoint":return y<0&&(y=x.length+y),n.point(x[y],N,_);case"LineString":return S<0&&(S=x.length+S),n.point(x[S],N,_);case"Polygon":return E<0&&(E=x.length+E),S<0&&(S=x[E].length+S),n.point(x[E][S],N,_);case"MultiLineString":return y<0&&(y=x.length+y),S<0&&(S=x[y].length+S),n.point(x[y][S],N,_);case"MultiPolygon":return y<0&&(y=x.length+y),E<0&&(E=x[y].length+E),S<0&&(S=x[y][E].length-S),n.point(x[y][E][S],N,_)}throw new Error("geojson is invalid")}return ae.coordAll=a,ae.coordEach=t,ae.coordReduce=e,ae.featureEach=s,ae.featureReduce=o,ae.findPoint=M,ae.findSegment=P,ae.flattenEach=c,ae.flattenReduce=f,ae.geomEach=u,ae.geomReduce=l,ae.lineEach=w,ae.lineReduce=I,ae.propEach=r,ae.propReduce=i,ae.segmentEach=p,ae.segmentReduce=v,ae}var pu={},_f;function om(){if(_f)return pu;_f=1,Object.defineProperty(pu,"__esModule",{value:!0});var n=yf();function t(e){var r=[1/0,1/0,-1/0,-1/0];return n.coordEach(e,function(i){r[0]>i[0]&&(r[0]=i[0]),r[1]>i[1]&&(r[1]=i[1]),r[2]<i[0]&&(r[2]=i[0]),r[3]<i[1]&&(r[3]=i[1])}),r}return t.default=t,pu.default=t,pu}var wf;function am(){if(wf)return du.exports;wf=1;var n=of(),t=mf(),e=yf(),r=om().default,i=e.featureEach;e.coordEach,t.polygon;var s=t.featureCollection;function o(a){var u=new n(a);return u.insert=function(l){if(l.type!=="Feature")throw new Error("invalid feature");return l.bbox=l.bbox?l.bbox:r(l),n.prototype.insert.call(this,l)},u.load=function(l){var c=[];return Array.isArray(l)?l.forEach(function(f){if(f.type!=="Feature")throw new Error("invalid features");f.bbox=f.bbox?f.bbox:r(f),c.push(f)}):i(l,function(f){if(f.type!=="Feature")throw new Error("invalid features");f.bbox=f.bbox?f.bbox:r(f),c.push(f)}),n.prototype.load.call(this,c)},u.remove=function(l,c){if(l.type!=="Feature")throw new Error("invalid feature");return l.bbox=l.bbox?l.bbox:r(l),n.prototype.remove.call(this,l,c)},u.clear=function(){return n.prototype.clear.call(this)},u.search=function(l){var c=n.prototype.search.call(this,this.toBBox(l));return s(c)},u.collides=function(l){return n.prototype.collides.call(this,this.toBBox(l))},u.all=function(){var l=n.prototype.all.call(this);return s(l)},u.toJSON=function(){return n.prototype.toJSON.call(this)},u.fromJSON=function(l){return n.prototype.fromJSON.call(this,l)},u.toBBox=function(l){var c;if(l.bbox)c=l.bbox;else if(Array.isArray(l)&&l.length===4)c=l;else if(Array.isArray(l)&&l.length===6)c=[l[0],l[1],l[3],l[4]];else if(l.type==="Feature")c=r(l);else if(l.type==="FeatureCollection")c=r(l);else throw new Error("invalid geojson");return{minX:c[0],minY:c[1],maxX:c[2],maxY:c[3]}},u}return du.exports=o,du.exports.default=o,du.exports}var um=am();const lm=nf(um);function Ef(n,t){var e={},r=[];if(n.type==="LineString"&&(n=fn(n)),t.type==="LineString"&&(t=fn(t)),n.type==="Feature"&&t.type==="Feature"&&n.geometry!==null&&t.geometry!==null&&n.geometry.type==="LineString"&&t.geometry.type==="LineString"&&n.geometry.coordinates.length===2&&t.geometry.coordinates.length===2){var i=Sf(n,t);return i&&r.push(i),eo(r)}var s=lm();return s.load(pf(t)),uu(pf(n),function(o){uu(s.search(o),function(a){var u=Sf(o,a);if(u){var l=ms(u).join(",");e[l]||(e[l]=!0,r.push(u))}})}),eo(r)}function Sf(n,t){var e=ms(n),r=ms(t);if(e.length!==2)throw new Error("<intersects> line1 must only contain 2 coordinates");if(r.length!==2)throw new Error("<intersects> line2 must only contain 2 coordinates");var i=e[0][0],s=e[0][1],o=e[1][0],a=e[1][1],u=r[0][0],l=r[0][1],c=r[1][0],f=r[1][1],p=(f-l)*(o-i)-(c-u)*(a-s),v=(c-u)*(s-l)-(f-l)*(i-u),w=(o-i)*(s-l)-(a-s)*(i-u);if(p===0)return null;var I=v/p,P=w/p;if(I>=0&&I<=1&&P>=0&&P<=1){var M=i+I*(o-i),m=s+I*(a-s);return Vt([M,m])}return null}function cm(n,t){return Ef(dn(n),dn(t))}function hm(n,t){var e=fi(n,t),r=ga(n,t),i=ro(n,e/2,r);return i}function fm(n,t){const e=Vt(n),r=Vt(t),i=hm(e,r),s=(n[2]+t[2])/2;return[...i.geometry.coordinates,s]}function dm(n,t,e){e===void 0&&(e={});var r=Vt([1/0,1/0],{dist:1/0}),i=0;return vl(n,function(s){for(var o=ms(s),a=0;a<o.length-1;a++){var u=Vt(o[a]);u.properties.dist=fi(t,u,e);var l=Vt(o[a+1]);l.properties.dist=fi(t,l,e);var c=fi(u,l,e),f=Math.max(u.properties.dist,l.properties.dist),p=ga(u,l),v=ro(t,f,p+90,e),w=ro(t,f,p-90,e),I=Ef(dn([v.geometry.coordinates,w.geometry.coordinates]),dn([u.geometry.coordinates,l.geometry.coordinates])),P=null;I.features.length>0&&(P=I.features[0],P.properties.dist=fi(t,P,e),P.properties.location=i+fi(u,P,e)),u.properties.dist<r.properties.dist&&(r=u,r.properties.index=a,r.properties.location=i),l.properties.dist<r.properties.dist&&(r=l,r.properties.index=a+1,r.properties.location=i+c),P&&P.properties.dist<r.properties.dist&&(r=P,r.properties.index=a),i+=c}}),r}function pm(n,t){const e=Vt(t),r=dn(n);return dm(r,e,{units:"meters"})}function Cf(n,t,e){e===void 0&&(e={});var r=$e(n),i=$e(t);i[0]+=i[0]-r[0]>180?-360:r[0]-i[0]>180?360:0;var s=gm(r,i),o=ml(s,"meters",e.units);return o}function gm(n,t,e){e=e===void 0?De:Number(e);var r=e,i=n[1]*Math.PI/180,s=t[1]*Math.PI/180,o=s-i,a=Math.abs(t[0]-n[0])*Math.PI/180;a>Math.PI&&(a-=2*Math.PI);var u=Math.log(Math.tan(s/2+Math.PI/4)/Math.tan(i/2+Math.PI/4)),l=Math.abs(u)>1e-11?o/u:Math.cos(i),c=Math.sqrt(o*o+l*l*a*a),f=c*r;return f}function mm(n,t,e){if(e===void 0&&(e={}),e.method||(e.method="geodesic"),e.units||(e.units="kilometers"),!n)throw new Error("pt is required");if(Array.isArray(n)?n=Vt(n):n.type==="Point"?n=fn(n):jh(n,"Point","point"),!t)throw new Error("line is required");Array.isArray(t)?t=dn(t):t.type==="LineString"?t=fn(t):jh(t,"LineString","line");var r=1/0,i=n.geometry.coordinates;return Vg(t,function(s){var o=s.geometry.coordinates[0],a=s.geometry.coordinates[1],u=vm(i,o,a,e);u<r&&(r=u)}),ml(r,"degrees",e.units)}function vm(n,t,e,r){var i=[e[0]-t[0],e[1]-t[1]],s=[n[0]-t[0],n[1]-t[1]],o=If(s,i);if(o<=0)return Il(n,t,{method:r.method,units:"degrees"});var a=If(i,i);if(a<=o)return Il(n,e,{method:r.method,units:"degrees"});var u=o/a,l=[t[0]+u*i[0],t[1]+u*i[1]];return Il(n,l,{method:r.method,units:"degrees"})}function If(n,t){return n[0]*t[0]+n[1]*t[1]}function Il(n,t,e){return e.method==="planar"?Cf(n,t,e):fi(n,t,e)}function ym(n,t){const e=Vt(n),r=dn(t);return mm(e,r,{units:"meters"})}function _m(n,t,e,r){r===void 0&&(r={});var i=t<0,s=ml(Math.abs(t),r.units,"meters");i&&(s=-Math.abs(s));var o=$e(n),a=wm(o,s,e);return a[0]+=a[0]-o[0]>180?-360:o[0]-a[0]>180?360:0,Vt(a,r.properties)}function wm(n,t,e,r){r=r===void 0?De:Number(r);var i=t/r,s=n[0]*Math.PI/180,o=ze(n[1]),a=ze(e),u=i*Math.cos(a),l=o+u;Math.abs(l)>Math.PI/2&&(l=l>0?Math.PI-l:-Math.PI-l);var c=Math.log(Math.tan(l/2+Math.PI/4)/Math.tan(o/2+Math.PI/4)),f=Math.abs(c)>1e-11?u/c:Math.cos(o),p=i*Math.sin(a)/f,v=s+p;return[(v*180/Math.PI+540)%360-180,l*180/Math.PI]}function Em(n,t,e,r){const[i,s,o]=n,a=_m(Vt([i,s]),t,e,{units:"meters"});if(!(!a||!a.geometry||!a.geometry.coordinates))return r=r||[0,0,0],r[0]=a.geometry.coordinates[0],r[1]=a.geometry.coordinates[1],r[2]=o,r}function Pf(n,t){return Cf(Vt(n),Vt(t),{units:"meters"})}function Sm(n,t,e){e===void 0&&(e={});var r;e.final?r=Nf($e(t),$e(n)):r=Nf($e(n),$e(t));var i=r>180?-(360-r):r;return i}function Nf(n,t){var e=ze(n[1]),r=ze(t[1]),i=ze(t[0]-n[0]);i>Math.PI&&(i-=2*Math.PI),i<-Math.PI&&(i+=2*Math.PI);var s=Math.log(Math.tan(r/2+Math.PI/4)/Math.tan(e/2+Math.PI/4)),o=Math.atan2(i,s);return(au(o)+360)%360}function Cm(n,t){return Sm(Vt(n),Vt(t))}function pn(n){var t=[1/0,1/0,-1/0,-1/0];return no(n,function(e){t[0]>e[0]&&(t[0]=e[0]),t[1]>e[1]&&(t[1]=e[1]),t[2]<e[0]&&(t[2]=e[0]),t[3]<e[1]&&(t[3]=e[1])}),t}pn.default=pn;function gn(n,t,e){if(e===void 0&&(e={}),!n)throw new Error("point is required");if(!t)throw new Error("polygon is required");var r=$e(n),i=Cr(t),s=i.type,o=t.bbox,a=i.coordinates;if(o&&Im(r,o)===!1)return!1;s==="Polygon"&&(a=[a]);for(var u=!1,l=0;l<a.length&&!u;l++)if(bf(r,a[l][0],e.ignoreBoundary)){for(var c=!1,f=1;f<a[l].length&&!c;)bf(r,a[l][f],!e.ignoreBoundary)&&(c=!0),f++;c||(u=!0)}return u}function bf(n,t,e){var r=!1;t[0][0]===t[t.length-1][0]&&t[0][1]===t[t.length-1][1]&&(t=t.slice(0,t.length-1));for(var i=0,s=t.length-1;i<t.length;s=i++){var o=t[i][0],a=t[i][1],u=t[s][0],l=t[s][1],c=n[1]*(o-u)+a*(u-n[0])+l*(n[0]-o)===0&&(o-n[0])*(u-n[0])<=0&&(a-n[1])*(l-n[1])<=0;if(c)return!e;var f=a>n[1]!=l>n[1]&&n[0]<(u-o)*(n[1]-a)/(l-a)+o;f&&(r=!r)}return r}function Im(n,t){return t[0]<=n[0]&&t[1]<=n[1]&&t[2]>=n[0]&&t[3]>=n[1]}function di(n,t,e){e===void 0&&(e={});for(var r=$e(n),i=ms(t),s=0;s<i.length-1;s++){var o=!1;if(e.ignoreEndVertices&&(s===0&&(o="start"),s===i.length-2&&(o="end"),s===0&&s+1===i.length-1&&(o="both")),Pm(i[s],i[s+1],r,o,typeof e.epsilon>"u"?null:e.epsilon))return!0}return!1}function Pm(n,t,e,r,i){var s=e[0],o=e[1],a=n[0],u=n[1],l=t[0],c=t[1],f=e[0]-a,p=e[1]-u,v=l-a,w=c-u,I=f*w-p*v;if(i!==null){if(Math.abs(I)>i)return!1}else if(I!==0)return!1;if(r){if(r==="start")return Math.abs(v)>=Math.abs(w)?v>0?a<s&&s<=l:l<=s&&s<a:w>0?u<o&&o<=c:c<=o&&o<u;if(r==="end")return Math.abs(v)>=Math.abs(w)?v>0?a<=s&&s<l:l<s&&s<=a:w>0?u<=o&&o<c:c<o&&o<=u;if(r==="both")return Math.abs(v)>=Math.abs(w)?v>0?a<s&&s<l:l<s&&s<a:w>0?u<o&&o<c:c<o&&o<u}else return Math.abs(v)>=Math.abs(w)?v>0?a<=s&&s<=l:l<=s&&s<=a:w>0?u<=o&&o<=c:c<=o&&o<=u;return!1}function Nm(n,t){var e=Cr(n),r=Cr(t),i=e.type,s=r.type,o=e.coordinates,a=r.coordinates;switch(i){case"Point":switch(s){case"Point":return Pl(o,a);default:throw new Error("feature2 "+s+" geometry not supported")}case"MultiPoint":switch(s){case"Point":return bm(e,r);case"MultiPoint":return Tm(e,r);default:throw new Error("feature2 "+s+" geometry not supported")}case"LineString":switch(s){case"Point":return di(r,e,{ignoreEndVertices:!0});case"LineString":return Mm(e,r);case"MultiPoint":return Om(e,r);default:throw new Error("feature2 "+s+" geometry not supported")}case"Polygon":switch(s){case"Point":return gn(r,e,{ignoreBoundary:!0});case"LineString":return xm(e,r);case"Polygon":return Lm(e,r);case"MultiPoint":return Dm(e,r);default:throw new Error("feature2 "+s+" geometry not supported")}default:throw new Error("feature1 "+i+" geometry not supported")}}function bm(n,t){var e,r=!1;for(e=0;e<n.coordinates.length;e++)if(Pl(n.coordinates[e],t.coordinates)){r=!0;break}return r}function Tm(n,t){for(var e=0,r=t.coordinates;e<r.length;e++){for(var i=r[e],s=!1,o=0,a=n.coordinates;o<a.length;o++){var u=a[o];if(Pl(i,u)){s=!0;break}}if(!s)return!1}return!0}function Om(n,t){for(var e=!1,r=0,i=t.coordinates;r<i.length;r++){var s=i[r];if(di(s,n,{ignoreEndVertices:!0})&&(e=!0),!di(s,n))return!1}return!!e}function Dm(n,t){for(var e=0,r=t.coordinates;e<r.length;e++){var i=r[e];if(!gn(i,n,{ignoreBoundary:!0}))return!1}return!0}function Mm(n,t){for(var e=!1,r=0,i=t.coordinates;r<i.length;r++){var s=i[r];if(di({type:"Point",coordinates:s},n,{ignoreEndVertices:!0})&&(e=!0),!di({type:"Point",coordinates:s},n,{ignoreEndVertices:!1}))return!1}return e}function xm(n,t){var e=!1,r=0,i=pn(n),s=pn(t);if(!Tf(i,s))return!1;for(r;r<t.coordinates.length-1;r++){var o=Am(t.coordinates[r],t.coordinates[r+1]);if(gn({type:"Point",coordinates:o},n,{ignoreBoundary:!0})){e=!0;break}}return e}function Lm(n,t){if(n.type==="Feature"&&n.geometry===null||t.type==="Feature"&&t.geometry===null)return!1;var e=pn(n),r=pn(t);if(!Tf(e,r))return!1;for(var i=Cr(t).coordinates,s=0,o=i;s<o.length;s++)for(var a=o[s],u=0,l=a;u<l.length;u++){var c=l[u];if(!gn(c,n))return!1}return!0}function Tf(n,t){return!(n[0]>t[0]||n[2]<t[2]||n[1]>t[1]||n[3]<t[3])}function Pl(n,t){return n[0]===t[0]&&n[1]===t[1]}function Am(n,t){return[(n[0]+t[0])/2,(n[1]+t[1])/2]}function Rm(n,t){var e=Cr(n),r=Cr(t),i=e.type,s=r.type;switch(i){case"Point":switch(s){case"MultiPoint":return Fm(e,r);case"LineString":return di(e,r,{ignoreEndVertices:!0});case"Polygon":case"MultiPolygon":return gn(e,r,{ignoreBoundary:!0});default:throw new Error("feature2 "+s+" geometry not supported")}case"MultiPoint":switch(s){case"MultiPoint":return km(e,r);case"LineString":return Vm(e,r);case"Polygon":case"MultiPolygon":return zm(e,r);default:throw new Error("feature2 "+s+" geometry not supported")}case"LineString":switch(s){case"LineString":return Um(e,r);case"Polygon":case"MultiPolygon":return Gm(e,r);default:throw new Error("feature2 "+s+" geometry not supported")}case"Polygon":switch(s){case"Polygon":case"MultiPolygon":return Wm(e,r);default:throw new Error("feature2 "+s+" geometry not supported")}default:throw new Error("feature1 "+i+" geometry not supported")}}function Fm(n,t){var e,r=!1;for(e=0;e<t.coordinates.length;e++)if(Df(t.coordinates[e],n.coordinates)){r=!0;break}return r}function km(n,t){for(var e=0;e<n.coordinates.length;e++){for(var r=!1,i=0;i<t.coordinates.length;i++)Df(n.coordinates[e],t.coordinates[i])&&(r=!0);if(!r)return!1}return!0}function Vm(n,t){for(var e=!1,r=0;r<n.coordinates.length;r++){if(!di(n.coordinates[r],t))return!1;e||(e=di(n.coordinates[r],t,{ignoreEndVertices:!0}))}return e}function zm(n,t){for(var e=!0,r=!1,i=0;i<n.coordinates.length;i++){if(r=gn(n.coordinates[1],t),!r){e=!1;break}r=gn(n.coordinates[1],t,{ignoreBoundary:!0})}return e&&r}function Um(n,t){for(var e=0;e<n.coordinates.length;e++)if(!di(n.coordinates[e],t))return!1;return!0}function Gm(n,t){var e=pn(t),r=pn(n);if(!Of(e,r))return!1;for(var i=!1,s=0;s<n.coordinates.length-1;s++){if(!gn(n.coordinates[s],t))return!1;if(i||(i=gn(n.coordinates[s],t,{ignoreBoundary:!0})),!i){var o=qm(n.coordinates[s],n.coordinates[s+1]);i=gn(o,t,{ignoreBoundary:!0})}}return i}function Wm(n,t){var e=pn(n),r=pn(t);if(!Of(r,e))return!1;for(var i=0;i<n.coordinates[0].length;i++)if(!gn(n.coordinates[0][i],t))return!1;return!0}function Of(n,t){return!(n[0]>t[0]||n[2]<t[2]||n[1]>t[1]||n[3]<t[3])}function Df(n,t){return n[0]===t[0]&&n[1]===t[1]}function qm(n,t){return[(n[0]+t[0])/2,(n[1]+t[1])/2]}function Xm(n,t){t===void 0&&(t={});var e=pn(n),r=(e[0]+e[2])/2,i=(e[1]+e[3])/2;return Vt([r,i],t.properties,t)}"fill"in Array.prototype||Object.defineProperty(Array.prototype,"fill",{configurable:!0,value:function(t){if(this===void 0||this===null)throw new TypeError(this+" is not an object");var e=Object(this),r=Math.max(Math.min(e.length,9007199254740991),0)||0,i=1 in arguments&&parseInt(Number(arguments[1]),10)||0;i=i<0?Math.max(r+i,0):Math.min(i,r);var s=2 in arguments&&arguments[2]!==void 0?parseInt(Number(arguments[2]),10)||0:r;for(s=s<0?Math.max(r+arguments[2],0):Math.min(s,r);i<s;)e[i]=t,++i;return e},writable:!0}),Number.isFinite=Number.isFinite||function(n){return typeof n=="number"&&isFinite(n)},Number.isInteger=Number.isInteger||function(n){return typeof n=="number"&&isFinite(n)&&Math.floor(n)===n},Number.parseFloat=Number.parseFloat||parseFloat,Number.isNaN=Number.isNaN||function(n){return n!==n},Math.trunc=Math.trunc||function(n){return n<0?Math.ceil(n):Math.floor(n)};var vs=function(){};vs.prototype.interfaces_=function(){return[]},vs.prototype.getClass=function(){return vs},vs.prototype.equalsWithTolerance=function(t,e,r){return Math.abs(t-e)<=r};var Ft=function(n){function t(e){n.call(this,e),this.name="IllegalArgumentException",this.message=e,this.stack=new n().stack}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t}(Error),it=function(){},Mf={MAX_VALUE:{configurable:!0}};it.isNaN=function(t){return Number.isNaN(t)},it.doubleToLongBits=function(t){return t},it.longBitsToDouble=function(t){return t},it.isInfinite=function(t){return!Number.isFinite(t)},Mf.MAX_VALUE.get=function(){return Number.MAX_VALUE},Object.defineProperties(it,Mf);var ur=function(){},gu=function(){},io=function(){};function lr(){}var D=function n(){if(this.x=null,this.y=null,this.z=null,arguments.length===0)this.x=0,this.y=0,this.z=n.NULL_ORDINATE;else if(arguments.length===1){var t=arguments[0];this.x=t.x,this.y=t.y,this.z=t.z}else arguments.length===2?(this.x=arguments[0],this.y=arguments[1],this.z=n.NULL_ORDINATE):arguments.length===3&&(this.x=arguments[0],this.y=arguments[1],this.z=arguments[2])},ys={DimensionalComparator:{configurable:!0},serialVersionUID:{configurable:!0},NULL_ORDINATE:{configurable:!0},X:{configurable:!0},Y:{configurable:!0},Z:{configurable:!0}};D.prototype.setOrdinate=function(t,e){switch(t){case D.X:this.x=e;break;case D.Y:this.y=e;break;case D.Z:this.z=e;break;default:throw new Ft("Invalid ordinate index: "+t)}},D.prototype.equals2D=function(){if(arguments.length===1){var t=arguments[0];return!(this.x!==t.x||this.y!==t.y)}else if(arguments.length===2){var e=arguments[0],r=arguments[1];return!(!vs.equalsWithTolerance(this.x,e.x,r)||!vs.equalsWithTolerance(this.y,e.y,r))}},D.prototype.getOrdinate=function(t){switch(t){case D.X:return this.x;case D.Y:return this.y;case D.Z:return this.z}throw new Ft("Invalid ordinate index: "+t)},D.prototype.equals3D=function(t){return this.x===t.x&&this.y===t.y&&(this.z===t.z||it.isNaN(this.z))&&it.isNaN(t.z)},D.prototype.equals=function(t){return t instanceof D?this.equals2D(t):!1},D.prototype.equalInZ=function(t,e){return vs.equalsWithTolerance(this.z,t.z,e)},D.prototype.compareTo=function(t){var e=t;return this.x<e.x?-1:this.x>e.x?1:this.y<e.y?-1:this.y>e.y?1:0},D.prototype.clone=function(){},D.prototype.copy=function(){return new D(this)},D.prototype.toString=function(){return"("+this.x+", "+this.y+", "+this.z+")"},D.prototype.distance3D=function(t){var e=this.x-t.x,r=this.y-t.y,i=this.z-t.z;return Math.sqrt(e*e+r*r+i*i)},D.prototype.distance=function(t){var e=this.x-t.x,r=this.y-t.y;return Math.sqrt(e*e+r*r)},D.prototype.hashCode=function(){var t=17;return t=37*t+D.hashCode(this.x),t=37*t+D.hashCode(this.y),t},D.prototype.setCoordinate=function(t){this.x=t.x,this.y=t.y,this.z=t.z},D.prototype.interfaces_=function(){return[ur,gu,lr]},D.prototype.getClass=function(){return D},D.hashCode=function(){if(arguments.length===1){var t=arguments[0],e=it.doubleToLongBits(t);return Math.trunc((e^e)>>>32)}},ys.DimensionalComparator.get=function(){return pi},ys.serialVersionUID.get=function(){return 6683108902428367e3},ys.NULL_ORDINATE.get=function(){return it.NaN},ys.X.get=function(){return 0},ys.Y.get=function(){return 1},ys.Z.get=function(){return 2},Object.defineProperties(D,ys);var pi=function(t){if(this._dimensionsToTest=2,arguments.length!==0){if(arguments.length===1){var e=arguments[0];if(e!==2&&e!==3)throw new Ft("only 2 or 3 dimensions may be specified");this._dimensionsToTest=e}}};pi.prototype.compare=function(t,e){var r=t,i=e,s=pi.compare(r.x,i.x);if(s!==0)return s;var o=pi.compare(r.y,i.y);if(o!==0)return o;if(this._dimensionsToTest<=2)return 0;var a=pi.compare(r.z,i.z);return a},pi.prototype.interfaces_=function(){return[io]},pi.prototype.getClass=function(){return pi},pi.compare=function(t,e){return t<e?-1:t>e?1:it.isNaN(t)?it.isNaN(e)?0:-1:it.isNaN(e)?1:0};var so=function(){};so.prototype.create=function(){},so.prototype.interfaces_=function(){return[]},so.prototype.getClass=function(){return so};var R=function(){},ya={INTERIOR:{configurable:!0},BOUNDARY:{configurable:!0},EXTERIOR:{configurable:!0},NONE:{configurable:!0}};R.prototype.interfaces_=function(){return[]},R.prototype.getClass=function(){return R},R.toLocationSymbol=function(t){switch(t){case R.EXTERIOR:return"e";case R.BOUNDARY:return"b";case R.INTERIOR:return"i";case R.NONE:return"-"}throw new Ft("Unknown location value: "+t)},ya.INTERIOR.get=function(){return 0},ya.BOUNDARY.get=function(){return 1},ya.EXTERIOR.get=function(){return 2},ya.NONE.get=function(){return-1},Object.defineProperties(R,ya);var et=function(n,t){return n.interfaces_&&n.interfaces_().indexOf(t)>-1},je=function(){},xf={LOG_10:{configurable:!0}};je.prototype.interfaces_=function(){return[]},je.prototype.getClass=function(){return je},je.log10=function(t){var e=Math.log(t);return it.isInfinite(e)||it.isNaN(e)?e:e/je.LOG_10},je.min=function(t,e,r,i){var s=t;return e<s&&(s=e),r<s&&(s=r),i<s&&(s=i),s},je.clamp=function(){if(typeof arguments[2]=="number"&&typeof arguments[0]=="number"&&typeof arguments[1]=="number"){var t=arguments[0],e=arguments[1],r=arguments[2];return t<e?e:t>r?r:t}else if(Number.isInteger(arguments[2])&&Number.isInteger(arguments[0])&&Number.isInteger(arguments[1])){var i=arguments[0],s=arguments[1],o=arguments[2];return i<s?s:i>o?o:i}},je.wrap=function(t,e){return t<0?e- -t%e:t%e},je.max=function(){if(arguments.length===3){var t=arguments[0],e=arguments[1],r=arguments[2],i=t;return e>i&&(i=e),r>i&&(i=r),i}else if(arguments.length===4){var s=arguments[0],o=arguments[1],a=arguments[2],u=arguments[3],l=s;return o>l&&(l=o),a>l&&(l=a),u>l&&(l=u),l}},je.average=function(t,e){return(t+e)/2},xf.LOG_10.get=function(){return Math.log(10)},Object.defineProperties(je,xf);var kr=function(t){this.str=t};kr.prototype.append=function(t){this.str+=t},kr.prototype.setCharAt=function(t,e){this.str=this.str.substr(0,t)+e+this.str.substr(t+1)},kr.prototype.toString=function(t){return this.str};var Vr=function(t){this.value=t};Vr.prototype.intValue=function(){return this.value},Vr.prototype.compareTo=function(t){return this.value<t?-1:this.value>t?1:0},Vr.isNaN=function(t){return Number.isNaN(t)};var _a=function(){};_a.isWhitespace=function(t){return t<=32&&t>=0||t===127},_a.toUpperCase=function(t){return t.toUpperCase()};var k=function n(){if(this._hi=0,this._lo=0,arguments.length===0)this.init(0);else if(arguments.length===1){if(typeof arguments[0]=="number"){var t=arguments[0];this.init(t)}else if(arguments[0]instanceof n){var e=arguments[0];this.init(e)}else if(typeof arguments[0]=="string"){var r=arguments[0];n.call(this,n.parse(r))}}else if(arguments.length===2){var i=arguments[0],s=arguments[1];this.init(i,s)}},Ir={PI:{configurable:!0},TWO_PI:{configurable:!0},PI_2:{configurable:!0},E:{configurable:!0},NaN:{configurable:!0},EPS:{configurable:!0},SPLIT:{configurable:!0},MAX_PRINT_DIGITS:{configurable:!0},TEN:{configurable:!0},ONE:{configurable:!0},SCI_NOT_EXPONENT_CHAR:{configurable:!0},SCI_NOT_ZERO:{configurable:!0}};k.prototype.le=function(t){return(this._hi<t._hi||this._hi===t._hi)&&this._lo<=t._lo},k.prototype.extractSignificantDigits=function(t,e){var r=this.abs(),i=k.magnitude(r._hi),s=k.TEN.pow(i);r=r.divide(s),r.gt(k.TEN)?(r=r.divide(k.TEN),i+=1):r.lt(k.ONE)&&(r=r.multiply(k.TEN),i-=1);for(var o=i+1,a=new kr,u=k.MAX_PRINT_DIGITS-1,l=0;l<=u;l++){t&&l===o&&a.append(".");var c=Math.trunc(r._hi);if(c<0)break;var f=!1,p=0;c>9?(f=!0,p="9"):p="0"+c,a.append(p),r=r.subtract(k.valueOf(c)).multiply(k.TEN),f&&r.selfAdd(k.TEN);var v=!0,w=k.magnitude(r._hi);if(w<0&&Math.abs(w)>=u-l&&(v=!1),!v)break}return e[0]=i,a.toString()},k.prototype.sqr=function(){return this.multiply(this)},k.prototype.doubleValue=function(){return this._hi+this._lo},k.prototype.subtract=function(){if(arguments[0]instanceof k){var t=arguments[0];return this.add(t.negate())}else if(typeof arguments[0]=="number"){var e=arguments[0];return this.add(-e)}},k.prototype.equals=function(){if(arguments.length===1){var t=arguments[0];return this._hi===t._hi&&this._lo===t._lo}},k.prototype.isZero=function(){return this._hi===0&&this._lo===0},k.prototype.selfSubtract=function(){if(arguments[0]instanceof k){var t=arguments[0];return this.isNaN()?this:this.selfAdd(-t._hi,-t._lo)}else if(typeof arguments[0]=="number"){var e=arguments[0];return this.isNaN()?this:this.selfAdd(-e,0)}},k.prototype.getSpecialNumberString=function(){return this.isZero()?"0.0":this.isNaN()?"NaN ":null},k.prototype.min=function(t){return this.le(t)?this:t},k.prototype.selfDivide=function(){if(arguments.length===1){if(arguments[0]instanceof k){var t=arguments[0];return this.selfDivide(t._hi,t._lo)}else if(typeof arguments[0]=="number"){var e=arguments[0];return this.selfDivide(e,0)}}else if(arguments.length===2){var r=arguments[0],i=arguments[1],s=null,o=null,a=null,u=null,l=null,c=null,f=null,p=null;return l=this._hi/r,c=k.SPLIT*l,s=c-l,p=k.SPLIT*r,s=c-s,o=l-s,a=p-r,f=l*r,a=p-a,u=r-a,p=s*a-f+s*u+o*a+o*u,c=(this._hi-f-p+this._lo-l*i)/r,p=l+c,this._hi=p,this._lo=l-p+c,this}},k.prototype.dump=function(){return"DD<"+this._hi+", "+this._lo+">"},k.prototype.divide=function(){if(arguments[0]instanceof k){var t=arguments[0],e=null,r=null,i=null,s=null,o=null,a=null,u=null,l=null;o=this._hi/t._hi,a=k.SPLIT*o,e=a-o,l=k.SPLIT*t._hi,e=a-e,r=o-e,i=l-t._hi,u=o*t._hi,i=l-i,s=t._hi-i,l=e*i-u+e*s+r*i+r*s,a=(this._hi-u-l+this._lo-o*t._lo)/t._hi,l=o+a;var c=l,f=o-l+a;return new k(c,f)}else if(typeof arguments[0]=="number"){var p=arguments[0];return it.isNaN(p)?k.createNaN():k.copy(this).selfDivide(p,0)}},k.prototype.ge=function(t){return(this._hi>t._hi||this._hi===t._hi)&&this._lo>=t._lo},k.prototype.pow=function(t){if(t===0)return k.valueOf(1);var e=new k(this),r=k.valueOf(1),i=Math.abs(t);if(i>1)for(;i>0;)i%2===1&&r.selfMultiply(e),i/=2,i>0&&(e=e.sqr());else r=e;return t<0?r.reciprocal():r},k.prototype.ceil=function(){if(this.isNaN())return k.NaN;var t=Math.ceil(this._hi),e=0;return t===this._hi&&(e=Math.ceil(this._lo)),new k(t,e)},k.prototype.compareTo=function(t){var e=t;return this._hi<e._hi?-1:this._hi>e._hi?1:this._lo<e._lo?-1:this._lo>e._lo?1:0},k.prototype.rint=function(){if(this.isNaN())return this;var t=this.add(.5);return t.floor()},k.prototype.setValue=function(){if(arguments[0]instanceof k){var t=arguments[0];return this.init(t),this}else if(typeof arguments[0]=="number"){var e=arguments[0];return this.init(e),this}},k.prototype.max=function(t){return this.ge(t)?this:t},k.prototype.sqrt=function(){if(this.isZero())return k.valueOf(0);if(this.isNegative())return k.NaN;var t=1/Math.sqrt(this._hi),e=this._hi*t,r=k.valueOf(e),i=this.subtract(r.sqr()),s=i._hi*(t*.5);return r.add(s)},k.prototype.selfAdd=function(){if(arguments.length===1){if(arguments[0]instanceof k){var t=arguments[0];return this.selfAdd(t._hi,t._lo)}else if(typeof arguments[0]=="number"){var e=arguments[0],r=null,i=null,s=null,o=null,a=null,u=null;return s=this._hi+e,a=s-this._hi,o=s-a,o=e-a+(this._hi-o),u=o+this._lo,r=s+u,i=u+(s-r),this._hi=r+i,this._lo=i+(r-this._hi),this}}else if(arguments.length===2){var l=arguments[0],c=arguments[1],f=null,p=null,v=null,w=null,I=null,P=null,M=null,m=null;I=this._hi+l,v=this._lo+c,M=I-this._hi,m=v-this._lo,P=I-M,w=v-m,P=l-M+(this._hi-P),w=c-m+(this._lo-w),M=P+v,f=I+M,p=M+(I-f),M=w+p;var _=f+M,g=M+(f-_);return this._hi=_,this._lo=g,this}},k.prototype.selfMultiply=function(){if(arguments.length===1){if(arguments[0]instanceof k){var t=arguments[0];return this.selfMultiply(t._hi,t._lo)}else if(typeof arguments[0]=="number"){var e=arguments[0];return this.selfMultiply(e,0)}}else if(arguments.length===2){var r=arguments[0],i=arguments[1],s=null,o=null,a=null,u=null,l=null,c=null;l=k.SPLIT*this._hi,s=l-this._hi,c=k.SPLIT*r,s=l-s,o=this._hi-s,a=c-r,l=this._hi*r,a=c-a,u=r-a,c=s*a-l+s*u+o*a+o*u+(this._hi*i+this._lo*r);var f=l+c;s=l-f;var p=c+s;return this._hi=f,this._lo=p,this}},k.prototype.selfSqr=function(){return this.selfMultiply(this)},k.prototype.floor=function(){if(this.isNaN())return k.NaN;var t=Math.floor(this._hi),e=0;return t===this._hi&&(e=Math.floor(this._lo)),new k(t,e)},k.prototype.negate=function(){return this.isNaN()?this:new k(-this._hi,-this._lo)},k.prototype.clone=function(){},k.prototype.multiply=function(){if(arguments[0]instanceof k){var t=arguments[0];return t.isNaN()?k.createNaN():k.copy(this).selfMultiply(t)}else if(typeof arguments[0]=="number"){var e=arguments[0];return it.isNaN(e)?k.createNaN():k.copy(this).selfMultiply(e,0)}},k.prototype.isNaN=function(){return it.isNaN(this._hi)},k.prototype.intValue=function(){return Math.trunc(this._hi)},k.prototype.toString=function(){var t=k.magnitude(this._hi);return t>=-3&&t<=20?this.toStandardNotation():this.toSciNotation()},k.prototype.toStandardNotation=function(){var t=this.getSpecialNumberString();if(t!==null)return t;var e=new Array(1).fill(null),r=this.extractSignificantDigits(!0,e),i=e[0]+1,s=r;if(r.charAt(0)===".")s="0"+r;else if(i<0)s="0."+k.stringOfChar("0",-i)+r;else if(r.indexOf(".")===-1){var o=i-r.length,a=k.stringOfChar("0",o);s=r+a+".0"}return this.isNegative()?"-"+s:s},k.prototype.reciprocal=function(){var t=null,e=null,r=null,i=null,s=null,o=null,a=null,u=null;s=1/this._hi,o=k.SPLIT*s,t=o-s,u=k.SPLIT*this._hi,t=o-t,e=s-t,r=u-this._hi,a=s*this._hi,r=u-r,i=this._hi-r,u=t*r-a+t*i+e*r+e*i,o=(1-a-u-s*this._lo)/this._hi;var l=s+o,c=s-l+o;return new k(l,c)},k.prototype.toSciNotation=function(){if(this.isZero())return k.SCI_NOT_ZERO;var t=this.getSpecialNumberString();if(t!==null)return t;var e=new Array(1).fill(null),r=this.extractSignificantDigits(!1,e),i=k.SCI_NOT_EXPONENT_CHAR+e[0];if(r.charAt(0)==="0")throw new Error("Found leading zero: "+r);var s="";r.length>1&&(s=r.substring(1));var o=r.charAt(0)+"."+s;return this.isNegative()?"-"+o+i:o+i},k.prototype.abs=function(){return this.isNaN()?k.NaN:this.isNegative()?this.negate():new k(this)},k.prototype.isPositive=function(){return(this._hi>0||this._hi===0)&&this._lo>0},k.prototype.lt=function(t){return(this._hi<t._hi||this._hi===t._hi)&&this._lo<t._lo},k.prototype.add=function(){if(arguments[0]instanceof k){var t=arguments[0];return k.copy(this).selfAdd(t)}else if(typeof arguments[0]=="number"){var e=arguments[0];return k.copy(this).selfAdd(e)}},k.prototype.init=function(){if(arguments.length===1){if(typeof arguments[0]=="number"){var t=arguments[0];this._hi=t,this._lo=0}else if(arguments[0]instanceof k){var e=arguments[0];this._hi=e._hi,this._lo=e._lo}}else if(arguments.length===2){var r=arguments[0],i=arguments[1];this._hi=r,this._lo=i}},k.prototype.gt=function(t){return(this._hi>t._hi||this._hi===t._hi)&&this._lo>t._lo},k.prototype.isNegative=function(){return(this._hi<0||this._hi===0)&&this._lo<0},k.prototype.trunc=function(){return this.isNaN()?k.NaN:this.isPositive()?this.floor():this.ceil()},k.prototype.signum=function(){return this._hi>0?1:this._hi<0?-1:this._lo>0?1:this._lo<0?-1:0},k.prototype.interfaces_=function(){return[lr,ur,gu]},k.prototype.getClass=function(){return k},k.sqr=function(t){return k.valueOf(t).selfMultiply(t)},k.valueOf=function(){if(typeof arguments[0]=="string"){var t=arguments[0];return k.parse(t)}else if(typeof arguments[0]=="number"){var e=arguments[0];return new k(e)}},k.sqrt=function(t){return k.valueOf(t).sqrt()},k.parse=function(t){for(var e=0,r=t.length;_a.isWhitespace(t.charAt(e));)e++;var i=!1;if(e<r){var s=t.charAt(e);(s==="-"||s==="+")&&(e++,s==="-"&&(i=!0))}for(var o=new k,a=0,u=0,l=0;!(e>=r);){var c=t.charAt(e);if(e++,_a.isDigit(c)){var f=c-"0";o.selfMultiply(k.TEN),o.selfAdd(f),a++;continue}if(c==="."){u=a;continue}if(c==="e"||c==="E"){var p=t.substring(e);try{l=Vr.parseInt(p)}catch(M){throw M instanceof Error?new Error("Invalid exponent "+p+" in string "+t):M}finally{}break}throw new Error("Unexpected character '"+c+"' at position "+e+" in string "+t)}var v=o,w=a-u-l;if(w===0)v=o;else if(w>0){var I=k.TEN.pow(w);v=o.divide(I)}else if(w<0){var P=k.TEN.pow(-w);v=o.multiply(P)}return i?v.negate():v},k.createNaN=function(){return new k(it.NaN,it.NaN)},k.copy=function(t){return new k(t)},k.magnitude=function(t){var e=Math.abs(t),r=Math.log(e)/Math.log(10),i=Math.trunc(Math.floor(r)),s=Math.pow(10,i);return s*10<=e&&(i+=1),i},k.stringOfChar=function(t,e){for(var r=new kr,i=0;i<e;i++)r.append(t);return r.toString()},Ir.PI.get=function(){return new k(3.141592653589793,12246467991473532e-32)},Ir.TWO_PI.get=function(){return new k(6.283185307179586,24492935982947064e-32)},Ir.PI_2.get=function(){return new k(1.5707963267948966,6123233995736766e-32)},Ir.E.get=function(){return new k(2.718281828459045,14456468917292502e-32)},Ir.NaN.get=function(){return new k(it.NaN,it.NaN)},Ir.EPS.get=function(){return 123259516440783e-46},Ir.SPLIT.get=function(){return 134217729},Ir.MAX_PRINT_DIGITS.get=function(){return 32},Ir.TEN.get=function(){return k.valueOf(10)},Ir.ONE.get=function(){return k.valueOf(1)},Ir.SCI_NOT_EXPONENT_CHAR.get=function(){return"E"},Ir.SCI_NOT_ZERO.get=function(){return"0.0E0"},Object.defineProperties(k,Ir);var Me=function(){},Lf={DP_SAFE_EPSILON:{configurable:!0}};Me.prototype.interfaces_=function(){return[]},Me.prototype.getClass=function(){return Me},Me.orientationIndex=function(t,e,r){var i=Me.orientationIndexFilter(t,e,r);if(i<=1)return i;var s=k.valueOf(e.x).selfAdd(-t.x),o=k.valueOf(e.y).selfAdd(-t.y),a=k.valueOf(r.x).selfAdd(-e.x),u=k.valueOf(r.y).selfAdd(-e.y);return s.selfMultiply(u).selfSubtract(o.selfMultiply(a)).signum()},Me.signOfDet2x2=function(t,e,r,i){var s=t.multiply(i).selfSubtract(e.multiply(r));return s.signum()},Me.intersection=function(t,e,r,i){var s=k.valueOf(i.y).selfSubtract(r.y).selfMultiply(k.valueOf(e.x).selfSubtract(t.x)),o=k.valueOf(i.x).selfSubtract(r.x).selfMultiply(k.valueOf(e.y).selfSubtract(t.y)),a=s.subtract(o),u=k.valueOf(i.x).selfSubtract(r.x).selfMultiply(k.valueOf(t.y).selfSubtract(r.y)),l=k.valueOf(i.y).selfSubtract(r.y).selfMultiply(k.valueOf(t.x).selfSubtract(r.x)),c=u.subtract(l),f=c.selfDivide(a).doubleValue(),p=k.valueOf(t.x).selfAdd(k.valueOf(e.x).selfSubtract(t.x).selfMultiply(f)).doubleValue(),v=k.valueOf(e.x).selfSubtract(t.x).selfMultiply(k.valueOf(t.y).selfSubtract(r.y)),w=k.valueOf(e.y).selfSubtract(t.y).selfMultiply(k.valueOf(t.x).selfSubtract(r.x)),I=v.subtract(w),P=I.selfDivide(a).doubleValue(),M=k.valueOf(r.y).selfAdd(k.valueOf(i.y).selfSubtract(r.y).selfMultiply(P)).doubleValue();return new D(p,M)},Me.orientationIndexFilter=function(t,e,r){var i=null,s=(t.x-r.x)*(e.y-r.y),o=(t.y-r.y)*(e.x-r.x),a=s-o;if(s>0){if(o<=0)return Me.signum(a);i=s+o}else if(s<0){if(o>=0)return Me.signum(a);i=-s-o}else return Me.signum(a);var u=Me.DP_SAFE_EPSILON*i;return a>=u||-a>=u?Me.signum(a):2},Me.signum=function(t){return t>0?1:t<0?-1:0},Lf.DP_SAFE_EPSILON.get=function(){return 1e-15},Object.defineProperties(Me,Lf);var vt=function(){},wa={X:{configurable:!0},Y:{configurable:!0},Z:{configurable:!0},M:{configurable:!0}};wa.X.get=function(){return 0},wa.Y.get=function(){return 1},wa.Z.get=function(){return 2},wa.M.get=function(){return 3},vt.prototype.setOrdinate=function(t,e,r){},vt.prototype.size=function(){},vt.prototype.getOrdinate=function(t,e){},vt.prototype.getCoordinate=function(){},vt.prototype.getCoordinateCopy=function(t){},vt.prototype.getDimension=function(){},vt.prototype.getX=function(t){},vt.prototype.clone=function(){},vt.prototype.expandEnvelope=function(t){},vt.prototype.copy=function(){},vt.prototype.getY=function(t){},vt.prototype.toCoordinateArray=function(){},vt.prototype.interfaces_=function(){return[gu]},vt.prototype.getClass=function(){return vt},Object.defineProperties(vt,wa);var Af=function(){},oo=function(n){function t(){n.call(this,"Projective point not representable on the Cartesian plane.")}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t}(Af),ue=function(){};ue.arraycopy=function(t,e,r,i,s){for(var o=0,a=e;a<e+s;a++)r[i+o]=t[a],o++},ue.getProperty=function(t){return{"line.separator":`
4
+ `}[t]};var Pr=function n(){if(this.x=null,this.y=null,this.w=null,arguments.length===0)this.x=0,this.y=0,this.w=1;else if(arguments.length===1){var t=arguments[0];this.x=t.x,this.y=t.y,this.w=1}else if(arguments.length===2){if(typeof arguments[0]=="number"&&typeof arguments[1]=="number"){var e=arguments[0],r=arguments[1];this.x=e,this.y=r,this.w=1}else if(arguments[0]instanceof n&&arguments[1]instanceof n){var i=arguments[0],s=arguments[1];this.x=i.y*s.w-s.y*i.w,this.y=s.x*i.w-i.x*s.w,this.w=i.x*s.y-s.x*i.y}else if(arguments[0]instanceof D&&arguments[1]instanceof D){var o=arguments[0],a=arguments[1];this.x=o.y-a.y,this.y=a.x-o.x,this.w=o.x*a.y-a.x*o.y}}else if(arguments.length===3){var u=arguments[0],l=arguments[1],c=arguments[2];this.x=u,this.y=l,this.w=c}else if(arguments.length===4){var f=arguments[0],p=arguments[1],v=arguments[2],w=arguments[3],I=f.y-p.y,P=p.x-f.x,M=f.x*p.y-p.x*f.y,m=v.y-w.y,_=w.x-v.x,g=v.x*w.y-w.x*v.y;this.x=P*g-_*M,this.y=m*M-I*g,this.w=I*_-m*P}};Pr.prototype.getY=function(){var t=this.y/this.w;if(it.isNaN(t)||it.isInfinite(t))throw new oo;return t},Pr.prototype.getX=function(){var t=this.x/this.w;if(it.isNaN(t)||it.isInfinite(t))throw new oo;return t},Pr.prototype.getCoordinate=function(){var t=new D;return t.x=this.getX(),t.y=this.getY(),t},Pr.prototype.interfaces_=function(){return[]},Pr.prototype.getClass=function(){return Pr},Pr.intersection=function(t,e,r,i){var s=t.y-e.y,o=e.x-t.x,a=t.x*e.y-e.x*t.y,u=r.y-i.y,l=i.x-r.x,c=r.x*i.y-i.x*r.y,f=o*c-l*a,p=u*a-s*c,v=s*l-u*o,w=f/v,I=p/v;if(it.isNaN(w)||it.isInfinite(w)||it.isNaN(I)||it.isInfinite(I))throw new oo;return new D(w,I)};var J=function n(){if(this._minx=null,this._maxx=null,this._miny=null,this._maxy=null,arguments.length===0)this.init();else if(arguments.length===1){if(arguments[0]instanceof D){var t=arguments[0];this.init(t.x,t.x,t.y,t.y)}else if(arguments[0]instanceof n){var e=arguments[0];this.init(e)}}else if(arguments.length===2){var r=arguments[0],i=arguments[1];this.init(r.x,i.x,r.y,i.y)}else if(arguments.length===4){var s=arguments[0],o=arguments[1],a=arguments[2],u=arguments[3];this.init(s,o,a,u)}},Rf={serialVersionUID:{configurable:!0}};J.prototype.getArea=function(){return this.getWidth()*this.getHeight()},J.prototype.equals=function(t){if(!(t instanceof J))return!1;var e=t;return this.isNull()?e.isNull():this._maxx===e.getMaxX()&&this._maxy===e.getMaxY()&&this._minx===e.getMinX()&&this._miny===e.getMinY()},J.prototype.intersection=function(t){if(this.isNull()||t.isNull()||!this.intersects(t))return new J;var e=this._minx>t._minx?this._minx:t._minx,r=this._miny>t._miny?this._miny:t._miny,i=this._maxx<t._maxx?this._maxx:t._maxx,s=this._maxy<t._maxy?this._maxy:t._maxy;return new J(e,i,r,s)},J.prototype.isNull=function(){return this._maxx<this._minx},J.prototype.getMaxX=function(){return this._maxx},J.prototype.covers=function(){if(arguments.length===1){if(arguments[0]instanceof D){var t=arguments[0];return this.covers(t.x,t.y)}else if(arguments[0]instanceof J){var e=arguments[0];return this.isNull()||e.isNull()?!1:e.getMinX()>=this._minx&&e.getMaxX()<=this._maxx&&e.getMinY()>=this._miny&&e.getMaxY()<=this._maxy}}else if(arguments.length===2){var r=arguments[0],i=arguments[1];return this.isNull()?!1:r>=this._minx&&r<=this._maxx&&i>=this._miny&&i<=this._maxy}},J.prototype.intersects=function(){if(arguments.length===1){if(arguments[0]instanceof J){var t=arguments[0];return this.isNull()||t.isNull()?!1:!(t._minx>this._maxx||t._maxx<this._minx||t._miny>this._maxy||t._maxy<this._miny)}else if(arguments[0]instanceof D){var e=arguments[0];return this.intersects(e.x,e.y)}}else if(arguments.length===2){var r=arguments[0],i=arguments[1];return this.isNull()?!1:!(r>this._maxx||r<this._minx||i>this._maxy||i<this._miny)}},J.prototype.getMinY=function(){return this._miny},J.prototype.getMinX=function(){return this._minx},J.prototype.expandToInclude=function(){if(arguments.length===1){if(arguments[0]instanceof D){var t=arguments[0];this.expandToInclude(t.x,t.y)}else if(arguments[0]instanceof J){var e=arguments[0];if(e.isNull())return null;this.isNull()?(this._minx=e.getMinX(),this._maxx=e.getMaxX(),this._miny=e.getMinY(),this._maxy=e.getMaxY()):(e._minx<this._minx&&(this._minx=e._minx),e._maxx>this._maxx&&(this._maxx=e._maxx),e._miny<this._miny&&(this._miny=e._miny),e._maxy>this._maxy&&(this._maxy=e._maxy))}}else if(arguments.length===2){var r=arguments[0],i=arguments[1];this.isNull()?(this._minx=r,this._maxx=r,this._miny=i,this._maxy=i):(r<this._minx&&(this._minx=r),r>this._maxx&&(this._maxx=r),i<this._miny&&(this._miny=i),i>this._maxy&&(this._maxy=i))}},J.prototype.minExtent=function(){if(this.isNull())return 0;var t=this.getWidth(),e=this.getHeight();return t<e?t:e},J.prototype.getWidth=function(){return this.isNull()?0:this._maxx-this._minx},J.prototype.compareTo=function(t){var e=t;return this.isNull()?e.isNull()?0:-1:e.isNull()?1:this._minx<e._minx?-1:this._minx>e._minx?1:this._miny<e._miny?-1:this._miny>e._miny?1:this._maxx<e._maxx?-1:this._maxx>e._maxx?1:this._maxy<e._maxy?-1:this._maxy>e._maxy?1:0},J.prototype.translate=function(t,e){if(this.isNull())return null;this.init(this.getMinX()+t,this.getMaxX()+t,this.getMinY()+e,this.getMaxY()+e)},J.prototype.toString=function(){return"Env["+this._minx+" : "+this._maxx+", "+this._miny+" : "+this._maxy+"]"},J.prototype.setToNull=function(){this._minx=0,this._maxx=-1,this._miny=0,this._maxy=-1},J.prototype.getHeight=function(){return this.isNull()?0:this._maxy-this._miny},J.prototype.maxExtent=function(){if(this.isNull())return 0;var t=this.getWidth(),e=this.getHeight();return t>e?t:e},J.prototype.expandBy=function(){if(arguments.length===1){var t=arguments[0];this.expandBy(t,t)}else if(arguments.length===2){var e=arguments[0],r=arguments[1];if(this.isNull())return null;this._minx-=e,this._maxx+=e,this._miny-=r,this._maxy+=r,(this._minx>this._maxx||this._miny>this._maxy)&&this.setToNull()}},J.prototype.contains=function(){if(arguments.length===1){if(arguments[0]instanceof J){var t=arguments[0];return this.covers(t)}else if(arguments[0]instanceof D){var e=arguments[0];return this.covers(e)}}else if(arguments.length===2){var r=arguments[0],i=arguments[1];return this.covers(r,i)}},J.prototype.centre=function(){return this.isNull()?null:new D((this.getMinX()+this.getMaxX())/2,(this.getMinY()+this.getMaxY())/2)},J.prototype.init=function(){if(arguments.length===0)this.setToNull();else if(arguments.length===1){if(arguments[0]instanceof D){var t=arguments[0];this.init(t.x,t.x,t.y,t.y)}else if(arguments[0]instanceof J){var e=arguments[0];this._minx=e._minx,this._maxx=e._maxx,this._miny=e._miny,this._maxy=e._maxy}}else if(arguments.length===2){var r=arguments[0],i=arguments[1];this.init(r.x,i.x,r.y,i.y)}else if(arguments.length===4){var s=arguments[0],o=arguments[1],a=arguments[2],u=arguments[3];s<o?(this._minx=s,this._maxx=o):(this._minx=o,this._maxx=s),a<u?(this._miny=a,this._maxy=u):(this._miny=u,this._maxy=a)}},J.prototype.getMaxY=function(){return this._maxy},J.prototype.distance=function(t){if(this.intersects(t))return 0;var e=0;this._maxx<t._minx?e=t._minx-this._maxx:this._minx>t._maxx&&(e=this._minx-t._maxx);var r=0;return this._maxy<t._miny?r=t._miny-this._maxy:this._miny>t._maxy&&(r=this._miny-t._maxy),e===0?r:r===0?e:Math.sqrt(e*e+r*r)},J.prototype.hashCode=function(){var t=17;return t=37*t+D.hashCode(this._minx),t=37*t+D.hashCode(this._maxx),t=37*t+D.hashCode(this._miny),t=37*t+D.hashCode(this._maxy),t},J.prototype.interfaces_=function(){return[ur,lr]},J.prototype.getClass=function(){return J},J.intersects=function(){if(arguments.length===3){var t=arguments[0],e=arguments[1],r=arguments[2];return r.x>=(t.x<e.x?t.x:e.x)&&r.x<=(t.x>e.x?t.x:e.x)&&r.y>=(t.y<e.y?t.y:e.y)&&r.y<=(t.y>e.y?t.y:e.y)}else if(arguments.length===4){var i=arguments[0],s=arguments[1],o=arguments[2],a=arguments[3],u=Math.min(o.x,a.x),l=Math.max(o.x,a.x),c=Math.min(i.x,s.x),f=Math.max(i.x,s.x);return!(c>l||f<u||(u=Math.min(o.y,a.y),l=Math.max(o.y,a.y),c=Math.min(i.y,s.y),f=Math.max(i.y,s.y),c>l)||f<u)}},Rf.serialVersionUID.get=function(){return 5873921885273102e3},Object.defineProperties(J,Rf);var zr={typeStr:/^\s*(\w+)\s*\(\s*(.*)\s*\)\s*$/,emptyTypeStr:/^\s*(\w+)\s*EMPTY\s*$/,spaces:/\s+/,parenComma:/\)\s*,\s*\(/,doubleParenComma:/\)\s*\)\s*,\s*\(\s*\(/,trimParens:/^\s*\(?(.*?)\)?\s*$/},mu=function(t){this.geometryFactory=t||new ft};mu.prototype.read=function(t){var e,r,i;t=t.replace(/[\n\r]/g," ");var s=zr.typeStr.exec(t);if(t.search("EMPTY")!==-1&&(s=zr.emptyTypeStr.exec(t),s[2]=void 0),s&&(r=s[1].toLowerCase(),i=s[2],ao[r]&&(e=ao[r].apply(this,[i]))),e===void 0)throw new Error("Could not parse WKT "+t);return e},mu.prototype.write=function(t){return this.extractGeometry(t)},mu.prototype.extractGeometry=function(t){var e=t.getGeometryType().toLowerCase();if(!Gn[e])return null;var r=e.toUpperCase(),i;return t.isEmpty()?i=r+" EMPTY":i=r+"("+Gn[e].apply(this,[t])+")",i};var Gn={coordinate:function(t){return t.x+" "+t.y},point:function(t){return Gn.coordinate.call(this,t._coordinates._coordinates[0])},multipoint:function(t){for(var e=this,r=[],i=0,s=t._geometries.length;i<s;++i)r.push("("+Gn.point.apply(e,[t._geometries[i]])+")");return r.join(",")},linestring:function(t){for(var e=this,r=[],i=0,s=t._points._coordinates.length;i<s;++i)r.push(Gn.coordinate.apply(e,[t._points._coordinates[i]]));return r.join(",")},linearring:function(t){for(var e=this,r=[],i=0,s=t._points._coordinates.length;i<s;++i)r.push(Gn.coordinate.apply(e,[t._points._coordinates[i]]));return r.join(",")},multilinestring:function(t){for(var e=this,r=[],i=0,s=t._geometries.length;i<s;++i)r.push("("+Gn.linestring.apply(e,[t._geometries[i]])+")");return r.join(",")},polygon:function(t){var e=this,r=[];r.push("("+Gn.linestring.apply(this,[t._shell])+")");for(var i=0,s=t._holes.length;i<s;++i)r.push("("+Gn.linestring.apply(e,[t._holes[i]])+")");return r.join(",")},multipolygon:function(t){for(var e=this,r=[],i=0,s=t._geometries.length;i<s;++i)r.push("("+Gn.polygon.apply(e,[t._geometries[i]])+")");return r.join(",")},geometrycollection:function(t){for(var e=this,r=[],i=0,s=t._geometries.length;i<s;++i)r.push(e.extractGeometry(t._geometries[i]));return r.join(",")}},ao={point:function(t){if(t===void 0)return this.geometryFactory.createPoint();var e=t.trim().split(zr.spaces);return this.geometryFactory.createPoint(new D(Number.parseFloat(e[0]),Number.parseFloat(e[1])))},multipoint:function(t){var e=this;if(t===void 0)return this.geometryFactory.createMultiPoint();for(var r,i=t.trim().split(","),s=[],o=0,a=i.length;o<a;++o)r=i[o].replace(zr.trimParens,"$1"),s.push(ao.point.apply(e,[r]));return this.geometryFactory.createMultiPoint(s)},linestring:function(t){if(t===void 0)return this.geometryFactory.createLineString();for(var e=t.trim().split(","),r=[],i,s=0,o=e.length;s<o;++s)i=e[s].trim().split(zr.spaces),r.push(new D(Number.parseFloat(i[0]),Number.parseFloat(i[1])));return this.geometryFactory.createLineString(r)},linearring:function(t){if(t===void 0)return this.geometryFactory.createLinearRing();for(var e=t.trim().split(","),r=[],i,s=0,o=e.length;s<o;++s)i=e[s].trim().split(zr.spaces),r.push(new D(Number.parseFloat(i[0]),Number.parseFloat(i[1])));return this.geometryFactory.createLinearRing(r)},multilinestring:function(t){var e=this;if(t===void 0)return this.geometryFactory.createMultiLineString();for(var r,i=t.trim().split(zr.parenComma),s=[],o=0,a=i.length;o<a;++o)r=i[o].replace(zr.trimParens,"$1"),s.push(ao.linestring.apply(e,[r]));return this.geometryFactory.createMultiLineString(s)},polygon:function(t){var e=this;if(t===void 0)return this.geometryFactory.createPolygon();for(var r,i,s,o=t.trim().split(zr.parenComma),a,u=[],l=0,c=o.length;l<c;++l)r=o[l].replace(zr.trimParens,"$1"),i=ao.linestring.apply(e,[r]),s=e.geometryFactory.createLinearRing(i._points),l===0?a=s:u.push(s);return this.geometryFactory.createPolygon(a,u)},multipolygon:function(t){var e=this;if(t===void 0)return this.geometryFactory.createMultiPolygon();for(var r,i=t.trim().split(zr.doubleParenComma),s=[],o=0,a=i.length;o<a;++o)r=i[o].replace(zr.trimParens,"$1"),s.push(ao.polygon.apply(e,[r]));return this.geometryFactory.createMultiPolygon(s)},geometrycollection:function(t){var e=this;if(t===void 0)return this.geometryFactory.createGeometryCollection();t=t.replace(/,\s*([A-Za-z])/g,"|$1");for(var r=t.trim().split("|"),i=[],s=0,o=r.length;s<o;++s)i.push(e.read(r[s]));return this.geometryFactory.createGeometryCollection(i)}},Nr=function(t){this.parser=new mu(t)};Nr.prototype.write=function(t){return this.parser.write(t)},Nr.toLineString=function(t,e){if(arguments.length!==2)throw new Error("Not implemented");return"LINESTRING ( "+t.x+" "+t.y+", "+e.x+" "+e.y+" )"};var Wn=function(n){function t(e){n.call(this,e),this.name="RuntimeException",this.message=e,this.stack=new n().stack}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t}(Error),vu=function(n){function t(){if(n.call(this),arguments.length===0)n.call(this);else if(arguments.length===1){var e=arguments[0];n.call(this,e)}}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t}(Wn),ut=function(){};ut.prototype.interfaces_=function(){return[]},ut.prototype.getClass=function(){return ut},ut.shouldNeverReachHere=function(){if(arguments.length===0)ut.shouldNeverReachHere(null);else if(arguments.length===1){var t=arguments[0];throw new vu("Should never reach here"+(t!==null?": "+t:""))}},ut.isTrue=function(){var t,e;if(arguments.length===1)t=arguments[0],ut.isTrue(t,null);else if(arguments.length===2&&(t=arguments[0],e=arguments[1],!t))throw e===null?new vu:new vu(e)},ut.equals=function(){var t,e,r;if(arguments.length===2)t=arguments[0],e=arguments[1],ut.equals(t,e,null);else if(arguments.length===3&&(t=arguments[0],e=arguments[1],r=arguments[2],!e.equals(t)))throw new vu("Expected "+t+" but encountered "+e+(r!==null?": "+r:""))};var zt=function(){this._result=null,this._inputLines=Array(2).fill().map(function(){return Array(2)}),this._intPt=new Array(2).fill(null),this._intLineIndex=null,this._isProper=null,this._pa=null,this._pb=null,this._precisionModel=null,this._intPt[0]=new D,this._intPt[1]=new D,this._pa=this._intPt[0],this._pb=this._intPt[1],this._result=0},_s={DONT_INTERSECT:{configurable:!0},DO_INTERSECT:{configurable:!0},COLLINEAR:{configurable:!0},NO_INTERSECTION:{configurable:!0},POINT_INTERSECTION:{configurable:!0},COLLINEAR_INTERSECTION:{configurable:!0}};zt.prototype.getIndexAlongSegment=function(t,e){return this.computeIntLineIndex(),this._intLineIndex[t][e]},zt.prototype.getTopologySummary=function(){var t=new kr;return this.isEndPoint()&&t.append(" endpoint"),this._isProper&&t.append(" proper"),this.isCollinear()&&t.append(" collinear"),t.toString()},zt.prototype.computeIntersection=function(t,e,r,i){this._inputLines[0][0]=t,this._inputLines[0][1]=e,this._inputLines[1][0]=r,this._inputLines[1][1]=i,this._result=this.computeIntersect(t,e,r,i)},zt.prototype.getIntersectionNum=function(){return this._result},zt.prototype.computeIntLineIndex=function(){if(arguments.length===0)this._intLineIndex===null&&(this._intLineIndex=Array(2).fill().map(function(){return Array(2)}),this.computeIntLineIndex(0),this.computeIntLineIndex(1));else if(arguments.length===1){var t=arguments[0],e=this.getEdgeDistance(t,0),r=this.getEdgeDistance(t,1);e>r?(this._intLineIndex[t][0]=0,this._intLineIndex[t][1]=1):(this._intLineIndex[t][0]=1,this._intLineIndex[t][1]=0)}},zt.prototype.isProper=function(){return this.hasIntersection()&&this._isProper},zt.prototype.setPrecisionModel=function(t){this._precisionModel=t},zt.prototype.isInteriorIntersection=function(){var t=this;if(arguments.length===0)return!!(this.isInteriorIntersection(0)||this.isInteriorIntersection(1));if(arguments.length===1){for(var e=arguments[0],r=0;r<this._result;r++)if(!(t._intPt[r].equals2D(t._inputLines[e][0])||t._intPt[r].equals2D(t._inputLines[e][1])))return!0;return!1}},zt.prototype.getIntersection=function(t){return this._intPt[t]},zt.prototype.isEndPoint=function(){return this.hasIntersection()&&!this._isProper},zt.prototype.hasIntersection=function(){return this._result!==zt.NO_INTERSECTION},zt.prototype.getEdgeDistance=function(t,e){var r=zt.computeEdgeDistance(this._intPt[e],this._inputLines[t][0],this._inputLines[t][1]);return r},zt.prototype.isCollinear=function(){return this._result===zt.COLLINEAR_INTERSECTION},zt.prototype.toString=function(){return Nr.toLineString(this._inputLines[0][0],this._inputLines[0][1])+" - "+Nr.toLineString(this._inputLines[1][0],this._inputLines[1][1])+this.getTopologySummary()},zt.prototype.getEndpoint=function(t,e){return this._inputLines[t][e]},zt.prototype.isIntersection=function(t){for(var e=this,r=0;r<this._result;r++)if(e._intPt[r].equals2D(t))return!0;return!1},zt.prototype.getIntersectionAlongSegment=function(t,e){return this.computeIntLineIndex(),this._intPt[this._intLineIndex[t][e]]},zt.prototype.interfaces_=function(){return[]},zt.prototype.getClass=function(){return zt},zt.computeEdgeDistance=function(t,e,r){var i=Math.abs(r.x-e.x),s=Math.abs(r.y-e.y),o=-1;if(t.equals(e))o=0;else if(t.equals(r))i>s?o=i:o=s;else{var a=Math.abs(t.x-e.x),u=Math.abs(t.y-e.y);i>s?o=a:o=u,o===0&&!t.equals(e)&&(o=Math.max(a,u))}return ut.isTrue(!(o===0&&!t.equals(e)),"Bad distance calculation"),o},zt.nonRobustComputeEdgeDistance=function(t,e,r){var i=t.x-e.x,s=t.y-e.y,o=Math.sqrt(i*i+s*s);return ut.isTrue(!(o===0&&!t.equals(e)),"Invalid distance calculation"),o},_s.DONT_INTERSECT.get=function(){return 0},_s.DO_INTERSECT.get=function(){return 1},_s.COLLINEAR.get=function(){return 2},_s.NO_INTERSECTION.get=function(){return 0},_s.POINT_INTERSECTION.get=function(){return 1},_s.COLLINEAR_INTERSECTION.get=function(){return 2},Object.defineProperties(zt,_s);var ki=function(n){function t(){n.apply(this,arguments)}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.isInSegmentEnvelopes=function(r){var i=new J(this._inputLines[0][0],this._inputLines[0][1]),s=new J(this._inputLines[1][0],this._inputLines[1][1]);return i.contains(r)&&s.contains(r)},t.prototype.computeIntersection=function(){if(arguments.length===3){var r=arguments[0],i=arguments[1],s=arguments[2];if(this._isProper=!1,J.intersects(i,s,r)&&G.orientationIndex(i,s,r)===0&&G.orientationIndex(s,i,r)===0)return this._isProper=!0,(r.equals(i)||r.equals(s))&&(this._isProper=!1),this._result=n.POINT_INTERSECTION,null;this._result=n.NO_INTERSECTION}else return n.prototype.computeIntersection.apply(this,arguments)},t.prototype.normalizeToMinimum=function(r,i,s,o,a){a.x=this.smallestInAbsValue(r.x,i.x,s.x,o.x),a.y=this.smallestInAbsValue(r.y,i.y,s.y,o.y),r.x-=a.x,r.y-=a.y,i.x-=a.x,i.y-=a.y,s.x-=a.x,s.y-=a.y,o.x-=a.x,o.y-=a.y},t.prototype.safeHCoordinateIntersection=function(r,i,s,o){var a=null;try{a=Pr.intersection(r,i,s,o)}catch(u){if(u instanceof oo)a=t.nearestEndpoint(r,i,s,o);else throw u}finally{}return a},t.prototype.intersection=function(r,i,s,o){var a=this.intersectionWithNormalization(r,i,s,o);return this.isInSegmentEnvelopes(a)||(a=new D(t.nearestEndpoint(r,i,s,o))),this._precisionModel!==null&&this._precisionModel.makePrecise(a),a},t.prototype.smallestInAbsValue=function(r,i,s,o){var a=r,u=Math.abs(a);return Math.abs(i)<u&&(a=i,u=Math.abs(i)),Math.abs(s)<u&&(a=s,u=Math.abs(s)),Math.abs(o)<u&&(a=o),a},t.prototype.checkDD=function(r,i,s,o,a){var u=Me.intersection(r,i,s,o),l=this.isInSegmentEnvelopes(u);ue.out.println("DD in env = "+l+" --------------------- "+u),a.distance(u)>1e-4&&ue.out.println("Distance = "+a.distance(u))},t.prototype.intersectionWithNormalization=function(r,i,s,o){var a=new D(r),u=new D(i),l=new D(s),c=new D(o),f=new D;this.normalizeToEnvCentre(a,u,l,c,f);var p=this.safeHCoordinateIntersection(a,u,l,c);return p.x+=f.x,p.y+=f.y,p},t.prototype.computeCollinearIntersection=function(r,i,s,o){var a=J.intersects(r,i,s),u=J.intersects(r,i,o),l=J.intersects(s,o,r),c=J.intersects(s,o,i);return a&&u?(this._intPt[0]=s,this._intPt[1]=o,n.COLLINEAR_INTERSECTION):l&&c?(this._intPt[0]=r,this._intPt[1]=i,n.COLLINEAR_INTERSECTION):a&&l?(this._intPt[0]=s,this._intPt[1]=r,s.equals(r)&&!u&&!c?n.POINT_INTERSECTION:n.COLLINEAR_INTERSECTION):a&&c?(this._intPt[0]=s,this._intPt[1]=i,s.equals(i)&&!u&&!l?n.POINT_INTERSECTION:n.COLLINEAR_INTERSECTION):u&&l?(this._intPt[0]=o,this._intPt[1]=r,o.equals(r)&&!a&&!c?n.POINT_INTERSECTION:n.COLLINEAR_INTERSECTION):u&&c?(this._intPt[0]=o,this._intPt[1]=i,o.equals(i)&&!a&&!l?n.POINT_INTERSECTION:n.COLLINEAR_INTERSECTION):n.NO_INTERSECTION},t.prototype.normalizeToEnvCentre=function(r,i,s,o,a){var u=r.x<i.x?r.x:i.x,l=r.y<i.y?r.y:i.y,c=r.x>i.x?r.x:i.x,f=r.y>i.y?r.y:i.y,p=s.x<o.x?s.x:o.x,v=s.y<o.y?s.y:o.y,w=s.x>o.x?s.x:o.x,I=s.y>o.y?s.y:o.y,P=u>p?u:p,M=c<w?c:w,m=l>v?l:v,_=f<I?f:I,g=(P+M)/2,y=(m+_)/2;a.x=g,a.y=y,r.x-=a.x,r.y-=a.y,i.x-=a.x,i.y-=a.y,s.x-=a.x,s.y-=a.y,o.x-=a.x,o.y-=a.y},t.prototype.computeIntersect=function(r,i,s,o){if(this._isProper=!1,!J.intersects(r,i,s,o))return n.NO_INTERSECTION;var a=G.orientationIndex(r,i,s),u=G.orientationIndex(r,i,o);if(a>0&&u>0||a<0&&u<0)return n.NO_INTERSECTION;var l=G.orientationIndex(s,o,r),c=G.orientationIndex(s,o,i);if(l>0&&c>0||l<0&&c<0)return n.NO_INTERSECTION;var f=a===0&&u===0&&l===0&&c===0;return f?this.computeCollinearIntersection(r,i,s,o):(a===0||u===0||l===0||c===0?(this._isProper=!1,r.equals2D(s)||r.equals2D(o)?this._intPt[0]=r:i.equals2D(s)||i.equals2D(o)?this._intPt[0]=i:a===0?this._intPt[0]=new D(s):u===0?this._intPt[0]=new D(o):l===0?this._intPt[0]=new D(r):c===0&&(this._intPt[0]=new D(i))):(this._isProper=!0,this._intPt[0]=this.intersection(r,i,s,o)),n.POINT_INTERSECTION)},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t.nearestEndpoint=function(r,i,s,o){var a=r,u=G.distancePointLine(r,s,o),l=G.distancePointLine(i,s,o);return l<u&&(u=l,a=i),l=G.distancePointLine(s,r,i),l<u&&(u=l,a=s),l=G.distancePointLine(o,r,i),l<u&&(u=l,a=o),a},t}(zt),ws=function(){};ws.prototype.interfaces_=function(){return[]},ws.prototype.getClass=function(){return ws},ws.orientationIndex=function(t,e,r){var i=e.x-t.x,s=e.y-t.y,o=r.x-e.x,a=r.y-e.y;return ws.signOfDet2x2(i,s,o,a)},ws.signOfDet2x2=function(t,e,r,i){var s=null,o=null,a=null;if(s=1,t===0||i===0)return e===0||r===0?0:e>0?r>0?-s:s:r>0?s:-s;if(e===0||r===0)return i>0?t>0?s:-s:t>0?-s:s;if(e>0?i>0?e<=i||(s=-s,o=t,t=r,r=o,o=e,e=i,i=o):e<=-i?(s=-s,r=-r,i=-i):(o=t,t=-r,r=o,o=e,e=-i,i=o):i>0?-e<=i?(s=-s,t=-t,e=-e):(o=-t,t=r,r=o,o=-e,e=i,i=o):e>=i?(t=-t,e=-e,r=-r,i=-i):(s=-s,o=-t,t=-r,r=o,o=-e,e=-i,i=o),t>0)if(r>0){if(!(t<=r))return s}else return s;else{if(r>0)return-s;if(t>=r)s=-s,t=-t,r=-r;else return-s}for(;;){if(a=Math.floor(r/t),r=r-a*t,i=i-a*e,i<0)return-s;if(i>e)return s;if(t>r+r){if(e<i+i)return s}else{if(e>i+i)return-s;r=t-r,i=e-i,s=-s}if(i===0)return r===0?0:-s;if(r===0||(a=Math.floor(t/r),t=t-a*r,e=e-a*i,e<0))return s;if(e>i)return-s;if(r>t+t){if(i<e+e)return-s}else{if(i>e+e)return s;t=r-t,e=i-e,s=-s}if(e===0)return t===0?0:s;if(t===0)return-s}};var Ur=function(){this._p=null,this._crossingCount=0,this._isPointOnSegment=!1;var t=arguments[0];this._p=t};Ur.prototype.countSegment=function(t,e){if(t.x<this._p.x&&e.x<this._p.x)return null;if(this._p.x===e.x&&this._p.y===e.y)return this._isPointOnSegment=!0,null;if(t.y===this._p.y&&e.y===this._p.y){var r=t.x,i=e.x;return r>i&&(r=e.x,i=t.x),this._p.x>=r&&this._p.x<=i&&(this._isPointOnSegment=!0),null}if(t.y>this._p.y&&e.y<=this._p.y||e.y>this._p.y&&t.y<=this._p.y){var s=t.x-this._p.x,o=t.y-this._p.y,a=e.x-this._p.x,u=e.y-this._p.y,l=ws.signOfDet2x2(s,o,a,u);if(l===0)return this._isPointOnSegment=!0,null;u<o&&(l=-l),l>0&&this._crossingCount++}},Ur.prototype.isPointInPolygon=function(){return this.getLocation()!==R.EXTERIOR},Ur.prototype.getLocation=function(){return this._isPointOnSegment?R.BOUNDARY:this._crossingCount%2===1?R.INTERIOR:R.EXTERIOR},Ur.prototype.isOnSegment=function(){return this._isPointOnSegment},Ur.prototype.interfaces_=function(){return[]},Ur.prototype.getClass=function(){return Ur},Ur.locatePointInRing=function(){if(arguments[0]instanceof D&&et(arguments[1],vt)){for(var t=arguments[0],e=arguments[1],r=new Ur(t),i=new D,s=new D,o=1;o<e.size();o++)if(e.getCoordinate(o,i),e.getCoordinate(o-1,s),r.countSegment(i,s),r.isOnSegment())return r.getLocation();return r.getLocation()}else if(arguments[0]instanceof D&&arguments[1]instanceof Array){for(var a=arguments[0],u=arguments[1],l=new Ur(a),c=1;c<u.length;c++){var f=u[c],p=u[c-1];if(l.countSegment(f,p),l.isOnSegment())return l.getLocation()}return l.getLocation()}};var G=function(){},Es={CLOCKWISE:{configurable:!0},RIGHT:{configurable:!0},COUNTERCLOCKWISE:{configurable:!0},LEFT:{configurable:!0},COLLINEAR:{configurable:!0},STRAIGHT:{configurable:!0}};G.prototype.interfaces_=function(){return[]},G.prototype.getClass=function(){return G},G.orientationIndex=function(t,e,r){return Me.orientationIndex(t,e,r)},G.signedArea=function(){if(arguments[0]instanceof Array){var t=arguments[0];if(t.length<3)return 0;for(var e=0,r=t[0].x,i=1;i<t.length-1;i++){var s=t[i].x-r,o=t[i+1].y,a=t[i-1].y;e+=s*(a-o)}return e/2}else if(et(arguments[0],vt)){var u=arguments[0],l=u.size();if(l<3)return 0;var c=new D,f=new D,p=new D;u.getCoordinate(0,f),u.getCoordinate(1,p);var v=f.x;p.x-=v;for(var w=0,I=1;I<l-1;I++)c.y=f.y,f.x=p.x,f.y=p.y,u.getCoordinate(I+1,p),p.x-=v,w+=f.x*(c.y-p.y);return w/2}},G.distanceLineLine=function(t,e,r,i){if(t.equals(e))return G.distancePointLine(t,r,i);if(r.equals(i))return G.distancePointLine(i,t,e);var s=!1;if(!J.intersects(t,e,r,i))s=!0;else{var o=(e.x-t.x)*(i.y-r.y)-(e.y-t.y)*(i.x-r.x);if(o===0)s=!0;else{var a=(t.y-r.y)*(i.x-r.x)-(t.x-r.x)*(i.y-r.y),u=(t.y-r.y)*(e.x-t.x)-(t.x-r.x)*(e.y-t.y),l=u/o,c=a/o;(c<0||c>1||l<0||l>1)&&(s=!0)}}return s?je.min(G.distancePointLine(t,r,i),G.distancePointLine(e,r,i),G.distancePointLine(r,t,e),G.distancePointLine(i,t,e)):0},G.isPointInRing=function(t,e){return G.locatePointInRing(t,e)!==R.EXTERIOR},G.computeLength=function(t){var e=t.size();if(e<=1)return 0;var r=0,i=new D;t.getCoordinate(0,i);for(var s=i.x,o=i.y,a=1;a<e;a++){t.getCoordinate(a,i);var u=i.x,l=i.y,c=u-s,f=l-o;r+=Math.sqrt(c*c+f*f),s=u,o=l}return r},G.isCCW=function(t){var e=t.length-1;if(e<3)throw new Ft("Ring has fewer than 4 points, so orientation cannot be determined");for(var r=t[0],i=0,s=1;s<=e;s++){var o=t[s];o.y>r.y&&(r=o,i=s)}var a=i;do a=a-1,a<0&&(a=e);while(t[a].equals2D(r)&&a!==i);var u=i;do u=(u+1)%e;while(t[u].equals2D(r)&&u!==i);var l=t[a],c=t[u];if(l.equals2D(r)||c.equals2D(r)||l.equals2D(c))return!1;var f=G.computeOrientation(l,r,c),p=!1;return f===0?p=l.x>c.x:p=f>0,p},G.locatePointInRing=function(t,e){return Ur.locatePointInRing(t,e)},G.distancePointLinePerpendicular=function(t,e,r){var i=(r.x-e.x)*(r.x-e.x)+(r.y-e.y)*(r.y-e.y),s=((e.y-t.y)*(r.x-e.x)-(e.x-t.x)*(r.y-e.y))/i;return Math.abs(s)*Math.sqrt(i)},G.computeOrientation=function(t,e,r){return G.orientationIndex(t,e,r)},G.distancePointLine=function(){if(arguments.length===2){var t=arguments[0],e=arguments[1];if(e.length===0)throw new Ft("Line array must contain at least one vertex");for(var r=t.distance(e[0]),i=0;i<e.length-1;i++){var s=G.distancePointLine(t,e[i],e[i+1]);s<r&&(r=s)}return r}else if(arguments.length===3){var o=arguments[0],a=arguments[1],u=arguments[2];if(a.x===u.x&&a.y===u.y)return o.distance(a);var l=(u.x-a.x)*(u.x-a.x)+(u.y-a.y)*(u.y-a.y),c=((o.x-a.x)*(u.x-a.x)+(o.y-a.y)*(u.y-a.y))/l;if(c<=0)return o.distance(a);if(c>=1)return o.distance(u);var f=((a.y-o.y)*(u.x-a.x)-(a.x-o.x)*(u.y-a.y))/l;return Math.abs(f)*Math.sqrt(l)}},G.isOnLine=function(t,e){for(var r=new ki,i=1;i<e.length;i++){var s=e[i-1],o=e[i];if(r.computeIntersection(t,s,o),r.hasIntersection())return!0}return!1},Es.CLOCKWISE.get=function(){return-1},Es.RIGHT.get=function(){return G.CLOCKWISE},Es.COUNTERCLOCKWISE.get=function(){return 1},Es.LEFT.get=function(){return G.COUNTERCLOCKWISE},Es.COLLINEAR.get=function(){return 0},Es.STRAIGHT.get=function(){return G.COLLINEAR},Object.defineProperties(G,Es);var qn=function(){};qn.prototype.filter=function(t){},qn.prototype.interfaces_=function(){return[]},qn.prototype.getClass=function(){return qn};var tt=function(){var t=arguments[0];this._envelope=null,this._factory=null,this._SRID=null,this._userData=null,this._factory=t,this._SRID=t.getSRID()},mn={serialVersionUID:{configurable:!0},SORTINDEX_POINT:{configurable:!0},SORTINDEX_MULTIPOINT:{configurable:!0},SORTINDEX_LINESTRING:{configurable:!0},SORTINDEX_LINEARRING:{configurable:!0},SORTINDEX_MULTILINESTRING:{configurable:!0},SORTINDEX_POLYGON:{configurable:!0},SORTINDEX_MULTIPOLYGON:{configurable:!0},SORTINDEX_GEOMETRYCOLLECTION:{configurable:!0},geometryChangedFilter:{configurable:!0}};tt.prototype.isGeometryCollection=function(){return this.getSortIndex()===tt.SORTINDEX_GEOMETRYCOLLECTION},tt.prototype.getFactory=function(){return this._factory},tt.prototype.getGeometryN=function(t){return this},tt.prototype.getArea=function(){return 0},tt.prototype.isRectangle=function(){return!1},tt.prototype.equals=function(){if(arguments[0]instanceof tt){var t=arguments[0];return t===null?!1:this.equalsTopo(t)}else if(arguments[0]instanceof Object){var e=arguments[0];if(!(e instanceof tt))return!1;var r=e;return this.equalsExact(r)}},tt.prototype.equalsExact=function(t){return this===t||this.equalsExact(t,0)},tt.prototype.geometryChanged=function(){this.apply(tt.geometryChangedFilter)},tt.prototype.geometryChangedAction=function(){this._envelope=null},tt.prototype.equalsNorm=function(t){return t===null?!1:this.norm().equalsExact(t.norm())},tt.prototype.getLength=function(){return 0},tt.prototype.getNumGeometries=function(){return 1},tt.prototype.compareTo=function(){if(arguments.length===1){var t=arguments[0],e=t;return this.getSortIndex()!==e.getSortIndex()?this.getSortIndex()-e.getSortIndex():this.isEmpty()&&e.isEmpty()?0:this.isEmpty()?-1:e.isEmpty()?1:this.compareToSameClass(t)}else if(arguments.length===2){var r=arguments[0],i=arguments[1];return this.getSortIndex()!==r.getSortIndex()?this.getSortIndex()-r.getSortIndex():this.isEmpty()&&r.isEmpty()?0:this.isEmpty()?-1:r.isEmpty()?1:this.compareToSameClass(r,i)}},tt.prototype.getUserData=function(){return this._userData},tt.prototype.getSRID=function(){return this._SRID},tt.prototype.getEnvelope=function(){return this.getFactory().toGeometry(this.getEnvelopeInternal())},tt.prototype.checkNotGeometryCollection=function(t){if(t.getSortIndex()===tt.SORTINDEX_GEOMETRYCOLLECTION)throw new Ft("This method does not support GeometryCollection arguments")},tt.prototype.equal=function(t,e,r){return r===0?t.equals(e):t.distance(e)<=r},tt.prototype.norm=function(){var t=this.copy();return t.normalize(),t},tt.prototype.getPrecisionModel=function(){return this._factory.getPrecisionModel()},tt.prototype.getEnvelopeInternal=function(){return this._envelope===null&&(this._envelope=this.computeEnvelopeInternal()),new J(this._envelope)},tt.prototype.setSRID=function(t){this._SRID=t},tt.prototype.setUserData=function(t){this._userData=t},tt.prototype.compare=function(t,e){for(var r=t.iterator(),i=e.iterator();r.hasNext()&&i.hasNext();){var s=r.next(),o=i.next(),a=s.compareTo(o);if(a!==0)return a}return r.hasNext()?1:i.hasNext()?-1:0},tt.prototype.hashCode=function(){return this.getEnvelopeInternal().hashCode()},tt.prototype.isGeometryCollectionOrDerived=function(){return this.getSortIndex()===tt.SORTINDEX_GEOMETRYCOLLECTION||this.getSortIndex()===tt.SORTINDEX_MULTIPOINT||this.getSortIndex()===tt.SORTINDEX_MULTILINESTRING||this.getSortIndex()===tt.SORTINDEX_MULTIPOLYGON},tt.prototype.interfaces_=function(){return[gu,ur,lr]},tt.prototype.getClass=function(){return tt},tt.hasNonEmptyElements=function(t){for(var e=0;e<t.length;e++)if(!t[e].isEmpty())return!0;return!1},tt.hasNullElements=function(t){for(var e=0;e<t.length;e++)if(t[e]===null)return!0;return!1},mn.serialVersionUID.get=function(){return 8763622679187377e3},mn.SORTINDEX_POINT.get=function(){return 0},mn.SORTINDEX_MULTIPOINT.get=function(){return 1},mn.SORTINDEX_LINESTRING.get=function(){return 2},mn.SORTINDEX_LINEARRING.get=function(){return 3},mn.SORTINDEX_MULTILINESTRING.get=function(){return 4},mn.SORTINDEX_POLYGON.get=function(){return 5},mn.SORTINDEX_MULTIPOLYGON.get=function(){return 6},mn.SORTINDEX_GEOMETRYCOLLECTION.get=function(){return 7},mn.geometryChangedFilter.get=function(){return Nl},Object.defineProperties(tt,mn);var Nl=function(){};Nl.interfaces_=function(){return[qn]},Nl.filter=function(t){t.geometryChangedAction()};var vn=function(){};vn.prototype.filter=function(t){},vn.prototype.interfaces_=function(){return[]},vn.prototype.getClass=function(){return vn};var cr=function(){},Xn={Mod2BoundaryNodeRule:{configurable:!0},EndPointBoundaryNodeRule:{configurable:!0},MultiValentEndPointBoundaryNodeRule:{configurable:!0},MonoValentEndPointBoundaryNodeRule:{configurable:!0},MOD2_BOUNDARY_RULE:{configurable:!0},ENDPOINT_BOUNDARY_RULE:{configurable:!0},MULTIVALENT_ENDPOINT_BOUNDARY_RULE:{configurable:!0},MONOVALENT_ENDPOINT_BOUNDARY_RULE:{configurable:!0},OGC_SFS_BOUNDARY_RULE:{configurable:!0}};cr.prototype.isInBoundary=function(t){},cr.prototype.interfaces_=function(){return[]},cr.prototype.getClass=function(){return cr},Xn.Mod2BoundaryNodeRule.get=function(){return uo},Xn.EndPointBoundaryNodeRule.get=function(){return lo},Xn.MultiValentEndPointBoundaryNodeRule.get=function(){return co},Xn.MonoValentEndPointBoundaryNodeRule.get=function(){return ho},Xn.MOD2_BOUNDARY_RULE.get=function(){return new uo},Xn.ENDPOINT_BOUNDARY_RULE.get=function(){return new lo},Xn.MULTIVALENT_ENDPOINT_BOUNDARY_RULE.get=function(){return new co},Xn.MONOVALENT_ENDPOINT_BOUNDARY_RULE.get=function(){return new ho},Xn.OGC_SFS_BOUNDARY_RULE.get=function(){return cr.MOD2_BOUNDARY_RULE},Object.defineProperties(cr,Xn);var uo=function(){};uo.prototype.isInBoundary=function(t){return t%2===1},uo.prototype.interfaces_=function(){return[cr]},uo.prototype.getClass=function(){return uo};var lo=function(){};lo.prototype.isInBoundary=function(t){return t>0},lo.prototype.interfaces_=function(){return[cr]},lo.prototype.getClass=function(){return lo};var co=function(){};co.prototype.isInBoundary=function(t){return t>1},co.prototype.interfaces_=function(){return[cr]},co.prototype.getClass=function(){return co};var ho=function(){};ho.prototype.isInBoundary=function(t){return t===1},ho.prototype.interfaces_=function(){return[cr]},ho.prototype.getClass=function(){return ho};var Bt=function(){};Bt.prototype.add=function(){},Bt.prototype.addAll=function(){},Bt.prototype.isEmpty=function(){},Bt.prototype.iterator=function(){},Bt.prototype.size=function(){},Bt.prototype.toArray=function(){},Bt.prototype.remove=function(){};function bl(n){this.message=n||""}bl.prototype=new Error,bl.prototype.name="IndexOutOfBoundsException";var fo=function(){};fo.prototype.hasNext=function(){},fo.prototype.next=function(){},fo.prototype.remove=function(){};var br=function(n){function t(){n.apply(this,arguments)}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.get=function(){},t.prototype.set=function(){},t.prototype.isEmpty=function(){},t}(Bt);function po(n){this.message=n||""}po.prototype=new Error,po.prototype.name="NoSuchElementException";var z=function(n){function t(){n.call(this),this.array_=[],arguments[0]instanceof Bt&&this.addAll(arguments[0])}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.ensureCapacity=function(){},t.prototype.interfaces_=function(){return[n,Bt]},t.prototype.add=function(r){return arguments.length===1?this.array_.push(r):this.array_.splice(arguments[0],arguments[1]),!0},t.prototype.clear=function(){this.array_=[]},t.prototype.addAll=function(r){for(var i=this,s=r.iterator();s.hasNext();)i.add(s.next());return!0},t.prototype.set=function(r,i){var s=this.array_[r];return this.array_[r]=i,s},t.prototype.iterator=function(){return new Ym(this)},t.prototype.get=function(r){if(r<0||r>=this.size())throw new bl;return this.array_[r]},t.prototype.isEmpty=function(){return this.array_.length===0},t.prototype.size=function(){return this.array_.length},t.prototype.toArray=function(){for(var r=this,i=[],s=0,o=this.array_.length;s<o;s++)i.push(r.array_[s]);return i},t.prototype.remove=function(r){for(var i=this,s=!1,o=0,a=this.array_.length;o<a;o++)if(i.array_[o]===r){i.array_.splice(o,1),s=!0;break}return s},t}(br),Ym=function(n){function t(e){n.call(this),this.arrayList_=e,this.position_=0}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.next=function(){if(this.position_===this.arrayList_.size())throw new po;return this.arrayList_.get(this.position_++)},t.prototype.hasNext=function(){return this.position_<this.arrayList_.size()},t.prototype.set=function(r){return this.arrayList_.set(this.position_-1,r)},t.prototype.remove=function(){this.arrayList_.remove(this.arrayList_.get(this.position_))},t}(fo),Ea=function(n){function t(){if(n.call(this),arguments.length!==0){if(arguments.length===1){var r=arguments[0];this.ensureCapacity(r.length),this.add(r,!0)}else if(arguments.length===2){var i=arguments[0],s=arguments[1];this.ensureCapacity(i.length),this.add(i,s)}}}n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t;var e={coordArrayType:{configurable:!0}};return e.coordArrayType.get=function(){return new Array(0).fill(null)},t.prototype.getCoordinate=function(i){return this.get(i)},t.prototype.addAll=function(){var i=this;if(arguments.length===2){for(var s=arguments[0],o=arguments[1],a=!1,u=s.iterator();u.hasNext();)i.add(u.next(),o),a=!0;return a}else return n.prototype.addAll.apply(this,arguments)},t.prototype.clone=function(){for(var i=this,s=n.prototype.clone.call(this),o=0;o<this.size();o++)s.add(o,i.get(o).copy());return s},t.prototype.toCoordinateArray=function(){return this.toArray(t.coordArrayType)},t.prototype.add=function(){var i=this;if(arguments.length===1){var s=arguments[0];n.prototype.add.call(this,s)}else if(arguments.length===2){if(arguments[0]instanceof Array&&typeof arguments[1]=="boolean"){var o=arguments[0],a=arguments[1];return this.add(o,a,!0),!0}else if(arguments[0]instanceof D&&typeof arguments[1]=="boolean"){var u=arguments[0],l=arguments[1];if(!l&&this.size()>=1){var c=this.get(this.size()-1);if(c.equals2D(u))return null}n.prototype.add.call(this,u)}else if(arguments[0]instanceof Object&&typeof arguments[1]=="boolean"){var f=arguments[0],p=arguments[1];return this.add(f,p),!0}}else if(arguments.length===3){if(typeof arguments[2]=="boolean"&&arguments[0]instanceof Array&&typeof arguments[1]=="boolean"){var v=arguments[0],w=arguments[1],I=arguments[2];if(I)for(var P=0;P<v.length;P++)i.add(v[P],w);else for(var M=v.length-1;M>=0;M--)i.add(v[M],w);return!0}else if(typeof arguments[2]=="boolean"&&Number.isInteger(arguments[0])&&arguments[1]instanceof D){var m=arguments[0],_=arguments[1],g=arguments[2];if(!g){var y=this.size();if(y>0){if(m>0){var E=this.get(m-1);if(E.equals2D(_))return null}if(m<y){var S=this.get(m);if(S.equals2D(_))return null}}}n.prototype.add.call(this,m,_)}}else if(arguments.length===4){var N=arguments[0],T=arguments[1],x=arguments[2],b=arguments[3],O=1;x>b&&(O=-1);for(var A=x;A!==b;A+=O)i.add(N[A],T);return!0}},t.prototype.closeRing=function(){this.size()>0&&this.add(new D(this.get(0)),!1)},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},Object.defineProperties(t,e),t}(z),ht=function(){},yu={ForwardComparator:{configurable:!0},BidirectionalComparator:{configurable:!0},coordArrayType:{configurable:!0}};yu.ForwardComparator.get=function(){return Sa},yu.BidirectionalComparator.get=function(){return go},yu.coordArrayType.get=function(){return new Array(0).fill(null)},ht.prototype.interfaces_=function(){return[]},ht.prototype.getClass=function(){return ht},ht.isRing=function(t){return!(t.length<4||!t[0].equals2D(t[t.length-1]))},ht.ptNotInList=function(t,e){for(var r=0;r<t.length;r++){var i=t[r];if(ht.indexOf(i,e)<0)return i}return null},ht.scroll=function(t,e){var r=ht.indexOf(e,t);if(r<0)return null;var i=new Array(t.length).fill(null);ue.arraycopy(t,r,i,0,t.length-r),ue.arraycopy(t,0,i,t.length-r,r),ue.arraycopy(i,0,t,0,t.length)},ht.equals=function(){if(arguments.length===2){var t=arguments[0],e=arguments[1];if(t===e)return!0;if(t===null||e===null||t.length!==e.length)return!1;for(var r=0;r<t.length;r++)if(!t[r].equals(e[r]))return!1;return!0}else if(arguments.length===3){var i=arguments[0],s=arguments[1],o=arguments[2];if(i===s)return!0;if(i===null||s===null||i.length!==s.length)return!1;for(var a=0;a<i.length;a++)if(o.compare(i[a],s[a])!==0)return!1;return!0}},ht.intersection=function(t,e){for(var r=new Ea,i=0;i<t.length;i++)e.intersects(t[i])&&r.add(t[i],!0);return r.toCoordinateArray()},ht.hasRepeatedPoints=function(t){for(var e=1;e<t.length;e++)if(t[e-1].equals(t[e]))return!0;return!1},ht.removeRepeatedPoints=function(t){if(!ht.hasRepeatedPoints(t))return t;var e=new Ea(t,!1);return e.toCoordinateArray()},ht.reverse=function(t){for(var e=t.length-1,r=Math.trunc(e/2),i=0;i<=r;i++){var s=t[i];t[i]=t[e-i],t[e-i]=s}},ht.removeNull=function(t){for(var e=0,r=0;r<t.length;r++)t[r]!==null&&e++;var i=new Array(e).fill(null);if(e===0)return i;for(var s=0,o=0;o<t.length;o++)t[o]!==null&&(i[s++]=t[o]);return i},ht.copyDeep=function(){if(arguments.length===1){for(var t=arguments[0],e=new Array(t.length).fill(null),r=0;r<t.length;r++)e[r]=new D(t[r]);return e}else if(arguments.length===5)for(var i=arguments[0],s=arguments[1],o=arguments[2],a=arguments[3],u=arguments[4],l=0;l<u;l++)o[a+l]=new D(i[s+l])},ht.isEqualReversed=function(t,e){for(var r=0;r<t.length;r++){var i=t[r],s=e[t.length-r-1];if(i.compareTo(s)!==0)return!1}return!0},ht.envelope=function(t){for(var e=new J,r=0;r<t.length;r++)e.expandToInclude(t[r]);return e},ht.toCoordinateArray=function(t){return t.toArray(ht.coordArrayType)},ht.atLeastNCoordinatesOrNothing=function(t,e){return e.length>=t?e:[]},ht.indexOf=function(t,e){for(var r=0;r<e.length;r++)if(t.equals(e[r]))return r;return-1},ht.increasingDirection=function(t){for(var e=0;e<Math.trunc(t.length/2);e++){var r=t.length-1-e,i=t[e].compareTo(t[r]);if(i!==0)return i}return 1},ht.compare=function(t,e){for(var r=0;r<t.length&&r<e.length;){var i=t[r].compareTo(e[r]);if(i!==0)return i;r++}return r<e.length?-1:r<t.length?1:0},ht.minCoordinate=function(t){for(var e=null,r=0;r<t.length;r++)(e===null||e.compareTo(t[r])>0)&&(e=t[r]);return e},ht.extract=function(t,e,r){e=je.clamp(e,0,t.length),r=je.clamp(r,-1,t.length);var i=r-e+1;r<0&&(i=0),e>=t.length&&(i=0),r<e&&(i=0);var s=new Array(i).fill(null);if(i===0)return s;for(var o=0,a=e;a<=r;a++)s[o++]=t[a];return s},Object.defineProperties(ht,yu);var Sa=function(){};Sa.prototype.compare=function(t,e){var r=t,i=e;return ht.compare(r,i)},Sa.prototype.interfaces_=function(){return[io]},Sa.prototype.getClass=function(){return Sa};var go=function(){};go.prototype.compare=function(t,e){var r=t,i=e;if(r.length<i.length)return-1;if(r.length>i.length)return 1;if(r.length===0)return 0;var s=ht.compare(r,i),o=ht.isEqualReversed(r,i);return o?0:s},go.prototype.OLDcompare=function(t,e){var r=t,i=e;if(r.length<i.length)return-1;if(r.length>i.length)return 1;if(r.length===0)return 0;for(var s=ht.increasingDirection(r),o=ht.increasingDirection(i),a=s>0?0:r.length-1,u=o>0?0:r.length-1,l=0;l<r.length;l++){var c=r[a].compareTo(i[u]);if(c!==0)return c;a+=s,u+=o}return 0},go.prototype.interfaces_=function(){return[io]},go.prototype.getClass=function(){return go};var Ss=function(){};Ss.prototype.get=function(){},Ss.prototype.put=function(){},Ss.prototype.size=function(){},Ss.prototype.values=function(){},Ss.prototype.entrySet=function(){};var Hm=function(n){function t(){n.apply(this,arguments)}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t}(Ss);function Ca(n){this.message=n||""}Ca.prototype=new Error,Ca.prototype.name="OperationNotSupported";function _u(){}_u.prototype=new Bt,_u.prototype.contains=function(){};var Tl=function(n){function t(){n.call(this),this.array_=[],arguments[0]instanceof Bt&&this.addAll(arguments[0])}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.contains=function(r){for(var i=this,s=0,o=this.array_.length;s<o;s++){var a=i.array_[s];if(a===r)return!0}return!1},t.prototype.add=function(r){return this.contains(r)?!1:(this.array_.push(r),!0)},t.prototype.addAll=function(r){for(var i=this,s=r.iterator();s.hasNext();)i.add(s.next());return!0},t.prototype.remove=function(r){throw new Error},t.prototype.size=function(){return this.array_.length},t.prototype.isEmpty=function(){return this.array_.length===0},t.prototype.toArray=function(){for(var r=this,i=[],s=0,o=this.array_.length;s<o;s++)i.push(r.array_[s]);return i},t.prototype.iterator=function(){return new Jm(this)},t}(_u),Jm=function(n){function t(e){n.call(this),this.hashSet_=e,this.position_=0}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.next=function(){if(this.position_===this.hashSet_.size())throw new po;return this.hashSet_.array_[this.position_++]},t.prototype.hasNext=function(){return this.position_<this.hashSet_.size()},t.prototype.remove=function(){throw new Ca},t}(fo),Yn=0,Vi=1;function Ff(n){return n===null?Yn:n.color}function Mt(n){return n===null?null:n.parent}function Hn(n,t){n!==null&&(n.color=t)}function Ol(n){return n===null?null:n.left}function kf(n){return n===null?null:n.right}function me(){this.root_=null,this.size_=0}me.prototype=new Hm,me.prototype.get=function(n){for(var t=this.root_;t!==null;){var e=n.compareTo(t.key);if(e<0)t=t.left;else if(e>0)t=t.right;else return t.value}return null},me.prototype.put=function(n,t){if(this.root_===null)return this.root_={key:n,value:t,left:null,right:null,parent:null,color:Yn,getValue:function(){return this.value},getKey:function(){return this.key}},this.size_=1,null;var e=this.root_,r,i;do if(r=e,i=n.compareTo(e.key),i<0)e=e.left;else if(i>0)e=e.right;else{var s=e.value;return e.value=t,s}while(e!==null);var o={key:n,left:null,right:null,value:t,parent:r,color:Yn,getValue:function(){return this.value},getKey:function(){return this.key}};return i<0?r.left=o:r.right=o,this.fixAfterInsertion(o),this.size_++,null},me.prototype.fixAfterInsertion=function(n){var t=this;for(n.color=Vi;n!=null&&n!==this.root_&&n.parent.color===Vi;)if(Mt(n)===Ol(Mt(Mt(n)))){var e=kf(Mt(Mt(n)));Ff(e)===Vi?(Hn(Mt(n),Yn),Hn(e,Yn),Hn(Mt(Mt(n)),Vi),n=Mt(Mt(n))):(n===kf(Mt(n))&&(n=Mt(n),t.rotateLeft(n)),Hn(Mt(n),Yn),Hn(Mt(Mt(n)),Vi),t.rotateRight(Mt(Mt(n))))}else{var r=Ol(Mt(Mt(n)));Ff(r)===Vi?(Hn(Mt(n),Yn),Hn(r,Yn),Hn(Mt(Mt(n)),Vi),n=Mt(Mt(n))):(n===Ol(Mt(n))&&(n=Mt(n),t.rotateRight(n)),Hn(Mt(n),Yn),Hn(Mt(Mt(n)),Vi),t.rotateLeft(Mt(Mt(n))))}this.root_.color=Yn},me.prototype.values=function(){var n=new z,t=this.getFirstEntry();if(t!==null)for(n.add(t.value);(t=me.successor(t))!==null;)n.add(t.value);return n},me.prototype.entrySet=function(){var n=new Tl,t=this.getFirstEntry();if(t!==null)for(n.add(t);(t=me.successor(t))!==null;)n.add(t);return n},me.prototype.rotateLeft=function(n){if(n!=null){var t=n.right;n.right=t.left,t.left!=null&&(t.left.parent=n),t.parent=n.parent,n.parent===null?this.root_=t:n.parent.left===n?n.parent.left=t:n.parent.right=t,t.left=n,n.parent=t}},me.prototype.rotateRight=function(n){if(n!=null){var t=n.left;n.left=t.right,t.right!=null&&(t.right.parent=n),t.parent=n.parent,n.parent===null?this.root_=t:n.parent.right===n?n.parent.right=t:n.parent.left=t,t.right=n,n.parent=t}},me.prototype.getFirstEntry=function(){var n=this.root_;if(n!=null)for(;n.left!=null;)n=n.left;return n},me.successor=function(n){if(n===null)return null;if(n.right!==null){for(var t=n.right;t.left!==null;)t=t.left;return t}else{for(var e=n.parent,r=n;e!==null&&r===e.right;)r=e,e=e.parent;return e}},me.prototype.size=function(){return this.size_};var Ia=function(){};Ia.prototype.interfaces_=function(){return[]},Ia.prototype.getClass=function(){return Ia};function Vf(){}Vf.prototype=new _u;function Gr(){this.array_=[],arguments[0]instanceof Bt&&this.addAll(arguments[0])}Gr.prototype=new Vf,Gr.prototype.contains=function(n){for(var t=this,e=0,r=this.array_.length;e<r;e++){var i=t.array_[e];if(i.compareTo(n)===0)return!0}return!1},Gr.prototype.add=function(n){var t=this;if(this.contains(n))return!1;for(var e=0,r=this.array_.length;e<r;e++){var i=t.array_[e];if(i.compareTo(n)===1)return t.array_.splice(e,0,n),!0}return this.array_.push(n),!0},Gr.prototype.addAll=function(n){for(var t=this,e=n.iterator();e.hasNext();)t.add(e.next());return!0},Gr.prototype.remove=function(n){throw new Ca},Gr.prototype.size=function(){return this.array_.length},Gr.prototype.isEmpty=function(){return this.array_.length===0},Gr.prototype.toArray=function(){for(var n=this,t=[],e=0,r=this.array_.length;e<r;e++)t.push(n.array_[e]);return t},Gr.prototype.iterator=function(){return new wu(this)};var wu=function(n){this.treeSet_=n,this.position_=0};wu.prototype.next=function(){if(this.position_===this.treeSet_.size())throw new po;return this.treeSet_.array_[this.position_++]},wu.prototype.hasNext=function(){return this.position_<this.treeSet_.size()},wu.prototype.remove=function(){throw new Ca};var zi=function(){};zi.sort=function(){var t=arguments[0],e,r,i,s;if(arguments.length===1)s=function(a,u){return a.compareTo(u)},t.sort(s);else if(arguments.length===2)i=arguments[1],s=function(a,u){return i.compare(a,u)},t.sort(s);else if(arguments.length===3){r=t.slice(arguments[1],arguments[2]),r.sort();var o=t.slice(0,arguments[1]).concat(r,t.slice(arguments[2],t.length));for(t.splice(0,t.length),e=0;e<o.length;e++)t.push(o[e])}else if(arguments.length===4)for(r=t.slice(arguments[1],arguments[2]),i=arguments[3],s=function(a,u){return i.compare(a,u)},r.sort(s),o=t.slice(0,arguments[1]).concat(r,t.slice(arguments[2],t.length)),t.splice(0,t.length),e=0;e<o.length;e++)t.push(o[e])},zi.asList=function(t){for(var e=new z,r=0,i=t.length;r<i;r++)e.add(t[r]);return e};var St=function(){},Tr={P:{configurable:!0},L:{configurable:!0},A:{configurable:!0},FALSE:{configurable:!0},TRUE:{configurable:!0},DONTCARE:{configurable:!0},SYM_FALSE:{configurable:!0},SYM_TRUE:{configurable:!0},SYM_DONTCARE:{configurable:!0},SYM_P:{configurable:!0},SYM_L:{configurable:!0},SYM_A:{configurable:!0}};Tr.P.get=function(){return 0},Tr.L.get=function(){return 1},Tr.A.get=function(){return 2},Tr.FALSE.get=function(){return-1},Tr.TRUE.get=function(){return-2},Tr.DONTCARE.get=function(){return-3},Tr.SYM_FALSE.get=function(){return"F"},Tr.SYM_TRUE.get=function(){return"T"},Tr.SYM_DONTCARE.get=function(){return"*"},Tr.SYM_P.get=function(){return"0"},Tr.SYM_L.get=function(){return"1"},Tr.SYM_A.get=function(){return"2"},St.prototype.interfaces_=function(){return[]},St.prototype.getClass=function(){return St},St.toDimensionSymbol=function(t){switch(t){case St.FALSE:return St.SYM_FALSE;case St.TRUE:return St.SYM_TRUE;case St.DONTCARE:return St.SYM_DONTCARE;case St.P:return St.SYM_P;case St.L:return St.SYM_L;case St.A:return St.SYM_A}throw new Ft("Unknown dimension value: "+t)},St.toDimensionValue=function(t){switch(_a.toUpperCase(t)){case St.SYM_FALSE:return St.FALSE;case St.SYM_TRUE:return St.TRUE;case St.SYM_DONTCARE:return St.DONTCARE;case St.SYM_P:return St.P;case St.SYM_L:return St.L;case St.SYM_A:return St.A}throw new Ft("Unknown dimension symbol: "+t)},Object.defineProperties(St,Tr);var Wr=function(){};Wr.prototype.filter=function(t){},Wr.prototype.interfaces_=function(){return[]},Wr.prototype.getClass=function(){return Wr};var Or=function(){};Or.prototype.filter=function(t,e){},Or.prototype.isDone=function(){},Or.prototype.isGeometryChanged=function(){},Or.prototype.interfaces_=function(){return[]},Or.prototype.getClass=function(){return Or};var Ee=function(n){function t(r,i){if(n.call(this,i),this._geometries=r||[],n.hasNullElements(this._geometries))throw new Ft("geometries must not contain null elements")}n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t;var e={serialVersionUID:{configurable:!0}};return t.prototype.computeEnvelopeInternal=function(){for(var i=this,s=new J,o=0;o<this._geometries.length;o++)s.expandToInclude(i._geometries[o].getEnvelopeInternal());return s},t.prototype.getGeometryN=function(i){return this._geometries[i]},t.prototype.getSortIndex=function(){return n.SORTINDEX_GEOMETRYCOLLECTION},t.prototype.getCoordinates=function(){for(var i=this,s=new Array(this.getNumPoints()).fill(null),o=-1,a=0;a<this._geometries.length;a++)for(var u=i._geometries[a].getCoordinates(),l=0;l<u.length;l++)o++,s[o]=u[l];return s},t.prototype.getArea=function(){for(var i=this,s=0,o=0;o<this._geometries.length;o++)s+=i._geometries[o].getArea();return s},t.prototype.equalsExact=function(){var i=this;if(arguments.length===2){var s=arguments[0],o=arguments[1];if(!this.isEquivalentClass(s))return!1;var a=s;if(this._geometries.length!==a._geometries.length)return!1;for(var u=0;u<this._geometries.length;u++)if(!i._geometries[u].equalsExact(a._geometries[u],o))return!1;return!0}else return n.prototype.equalsExact.apply(this,arguments)},t.prototype.normalize=function(){for(var i=this,s=0;s<this._geometries.length;s++)i._geometries[s].normalize();zi.sort(this._geometries)},t.prototype.getCoordinate=function(){return this.isEmpty()?null:this._geometries[0].getCoordinate()},t.prototype.getBoundaryDimension=function(){for(var i=this,s=St.FALSE,o=0;o<this._geometries.length;o++)s=Math.max(s,i._geometries[o].getBoundaryDimension());return s},t.prototype.getDimension=function(){for(var i=this,s=St.FALSE,o=0;o<this._geometries.length;o++)s=Math.max(s,i._geometries[o].getDimension());return s},t.prototype.getLength=function(){for(var i=this,s=0,o=0;o<this._geometries.length;o++)s+=i._geometries[o].getLength();return s},t.prototype.getNumPoints=function(){for(var i=this,s=0,o=0;o<this._geometries.length;o++)s+=i._geometries[o].getNumPoints();return s},t.prototype.getNumGeometries=function(){return this._geometries.length},t.prototype.reverse=function(){for(var i=this,s=this._geometries.length,o=new Array(s).fill(null),a=0;a<this._geometries.length;a++)o[a]=i._geometries[a].reverse();return this.getFactory().createGeometryCollection(o)},t.prototype.compareToSameClass=function(){var i=this;if(arguments.length===1){var s=arguments[0],o=new Gr(zi.asList(this._geometries)),a=new Gr(zi.asList(s._geometries));return this.compare(o,a)}else if(arguments.length===2){for(var u=arguments[0],l=arguments[1],c=u,f=this.getNumGeometries(),p=c.getNumGeometries(),v=0;v<f&&v<p;){var w=i.getGeometryN(v),I=c.getGeometryN(v),P=w.compareToSameClass(I,l);if(P!==0)return P;v++}return v<f?1:v<p?-1:0}},t.prototype.apply=function(){var i=this;if(et(arguments[0],vn))for(var s=arguments[0],o=0;o<this._geometries.length;o++)i._geometries[o].apply(s);else if(et(arguments[0],Or)){var a=arguments[0];if(this._geometries.length===0)return null;for(var u=0;u<this._geometries.length&&(i._geometries[u].apply(a),!a.isDone());u++);a.isGeometryChanged()&&this.geometryChanged()}else if(et(arguments[0],Wr)){var l=arguments[0];l.filter(this);for(var c=0;c<this._geometries.length;c++)i._geometries[c].apply(l)}else if(et(arguments[0],qn)){var f=arguments[0];f.filter(this);for(var p=0;p<this._geometries.length;p++)i._geometries[p].apply(f)}},t.prototype.getBoundary=function(){return this.checkNotGeometryCollection(this),ut.shouldNeverReachHere(),null},t.prototype.clone=function(){var i=this,s=n.prototype.clone.call(this);s._geometries=new Array(this._geometries.length).fill(null);for(var o=0;o<this._geometries.length;o++)s._geometries[o]=i._geometries[o].clone();return s},t.prototype.getGeometryType=function(){return"GeometryCollection"},t.prototype.copy=function(){for(var i=this,s=new Array(this._geometries.length).fill(null),o=0;o<s.length;o++)s[o]=i._geometries[o].copy();return new t(s,this._factory)},t.prototype.isEmpty=function(){for(var i=this,s=0;s<this._geometries.length;s++)if(!i._geometries[s].isEmpty())return!1;return!0},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},e.serialVersionUID.get=function(){return-5694727726395021e3},Object.defineProperties(t,e),t}(tt),Ui=function(n){function t(){n.apply(this,arguments)}n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t;var e={serialVersionUID:{configurable:!0}};return t.prototype.getSortIndex=function(){return tt.SORTINDEX_MULTILINESTRING},t.prototype.equalsExact=function(){if(arguments.length===2){var i=arguments[0],s=arguments[1];return this.isEquivalentClass(i)?n.prototype.equalsExact.call(this,i,s):!1}else return n.prototype.equalsExact.apply(this,arguments)},t.prototype.getBoundaryDimension=function(){return this.isClosed()?St.FALSE:0},t.prototype.isClosed=function(){var i=this;if(this.isEmpty())return!1;for(var s=0;s<this._geometries.length;s++)if(!i._geometries[s].isClosed())return!1;return!0},t.prototype.getDimension=function(){return 1},t.prototype.reverse=function(){for(var i=this,s=this._geometries.length,o=new Array(s).fill(null),a=0;a<this._geometries.length;a++)o[s-1-a]=i._geometries[a].reverse();return this.getFactory().createMultiLineString(o)},t.prototype.getBoundary=function(){return new hr(this).getBoundary()},t.prototype.getGeometryType=function(){return"MultiLineString"},t.prototype.copy=function(){for(var i=this,s=new Array(this._geometries.length).fill(null),o=0;o<s.length;o++)s[o]=i._geometries[o].copy();return new t(s,this._factory)},t.prototype.interfaces_=function(){return[Ia]},t.prototype.getClass=function(){return t},e.serialVersionUID.get=function(){return 8166665132445434e3},Object.defineProperties(t,e),t}(Ee),hr=function(){if(this._geom=null,this._geomFact=null,this._bnRule=null,this._endpointMap=null,arguments.length===1){var t=arguments[0],e=cr.MOD2_BOUNDARY_RULE;this._geom=t,this._geomFact=t.getFactory(),this._bnRule=e}else if(arguments.length===2){var r=arguments[0],i=arguments[1];this._geom=r,this._geomFact=r.getFactory(),this._bnRule=i}};hr.prototype.boundaryMultiLineString=function(t){if(this._geom.isEmpty())return this.getEmptyMultiPoint();var e=this.computeBoundaryCoordinates(t);return e.length===1?this._geomFact.createPoint(e[0]):this._geomFact.createMultiPointFromCoords(e)},hr.prototype.getBoundary=function(){return this._geom instanceof Gt?this.boundaryLineString(this._geom):this._geom instanceof Ui?this.boundaryMultiLineString(this._geom):this._geom.getBoundary()},hr.prototype.boundaryLineString=function(t){if(this._geom.isEmpty())return this.getEmptyMultiPoint();if(t.isClosed()){var e=this._bnRule.isInBoundary(2);return e?t.getStartPoint():this._geomFact.createMultiPoint()}return this._geomFact.createMultiPoint([t.getStartPoint(),t.getEndPoint()])},hr.prototype.getEmptyMultiPoint=function(){return this._geomFact.createMultiPoint()},hr.prototype.computeBoundaryCoordinates=function(t){var e=this,r=new z;this._endpointMap=new me;for(var i=0;i<t.getNumGeometries();i++){var s=t.getGeometryN(i);s.getNumPoints()!==0&&(e.addEndpoint(s.getCoordinateN(0)),e.addEndpoint(s.getCoordinateN(s.getNumPoints()-1)))}for(var o=this._endpointMap.entrySet().iterator();o.hasNext();){var a=o.next(),u=a.getValue(),l=u.count;e._bnRule.isInBoundary(l)&&r.add(a.getKey())}return ht.toCoordinateArray(r)},hr.prototype.addEndpoint=function(t){var e=this._endpointMap.get(t);e===null&&(e=new Eu,this._endpointMap.put(t,e)),e.count++},hr.prototype.interfaces_=function(){return[]},hr.prototype.getClass=function(){return hr},hr.getBoundary=function(){if(arguments.length===1){var t=arguments[0],e=new hr(t);return e.getBoundary()}else if(arguments.length===2){var r=arguments[0],i=arguments[1],s=new hr(r,i);return s.getBoundary()}};var Eu=function(){this.count=null};Eu.prototype.interfaces_=function(){return[]},Eu.prototype.getClass=function(){return Eu};function Zm(){}function Km(){}var Qm=function(){};function Bm(){}function $m(){}function jm(){}var fr=function(){},Dl={NEWLINE:{configurable:!0},SIMPLE_ORDINATE_FORMAT:{configurable:!0}};fr.prototype.interfaces_=function(){return[]},fr.prototype.getClass=function(){return fr},fr.chars=function(t,e){for(var r=new Array(e).fill(null),i=0;i<e;i++)r[i]=t;return String(r)},fr.getStackTrace=function(){if(arguments.length===1){var t=arguments[0],e=new Bm,r=new Zm;return t.printStackTrace(r),e.toString()}else if(arguments.length===2){var i=arguments[0],s=arguments[1],o="";new Km(fr.getStackTrace(i));for(var a=new jm,u=0;u<s;u++)try{o+=a.readLine()+fr.NEWLINE}catch(l){if(l instanceof $m)ut.shouldNeverReachHere();else throw l}finally{}return o}},fr.split=function(t,e){for(var r=e.length,i=new z,s=""+t,o=s.indexOf(e);o>=0;){var a=s.substring(0,o);i.add(a),s=s.substring(o+r),o=s.indexOf(e)}s.length>0&&i.add(s);for(var u=new Array(i.size()).fill(null),l=0;l<u.length;l++)u[l]=i.get(l);return u},fr.toString=function(){if(arguments.length===1){var t=arguments[0];return fr.SIMPLE_ORDINATE_FORMAT.format(t)}},fr.spaces=function(t){return fr.chars(" ",t)},Dl.NEWLINE.get=function(){return ue.getProperty("line.separator")},Dl.SIMPLE_ORDINATE_FORMAT.get=function(){return new Qm},Object.defineProperties(fr,Dl);var qt=function(){};qt.prototype.interfaces_=function(){return[]},qt.prototype.getClass=function(){return qt},qt.copyCoord=function(t,e,r,i){for(var s=Math.min(t.getDimension(),r.getDimension()),o=0;o<s;o++)r.setOrdinate(i,o,t.getOrdinate(e,o))},qt.isRing=function(t){var e=t.size();return e===0?!0:e<=3?!1:t.getOrdinate(0,vt.X)===t.getOrdinate(e-1,vt.X)&&t.getOrdinate(0,vt.Y)===t.getOrdinate(e-1,vt.Y)},qt.isEqual=function(t,e){var r=t.size(),i=e.size();if(r!==i)return!1;for(var s=Math.min(t.getDimension(),e.getDimension()),o=0;o<r;o++)for(var a=0;a<s;a++){var u=t.getOrdinate(o,a),l=e.getOrdinate(o,a);if(t.getOrdinate(o,a)!==e.getOrdinate(o,a)&&!(it.isNaN(u)&&it.isNaN(l)))return!1}return!0},qt.extend=function(t,e,r){var i=t.create(r,e.getDimension()),s=e.size();if(qt.copy(e,0,i,0,s),s>0)for(var o=s;o<r;o++)qt.copy(e,s-1,i,o,1);return i},qt.reverse=function(t){for(var e=t.size()-1,r=Math.trunc(e/2),i=0;i<=r;i++)qt.swap(t,i,e-i)},qt.swap=function(t,e,r){if(e===r)return null;for(var i=0;i<t.getDimension();i++){var s=t.getOrdinate(e,i);t.setOrdinate(e,i,t.getOrdinate(r,i)),t.setOrdinate(r,i,s)}},qt.copy=function(t,e,r,i,s){for(var o=0;o<s;o++)qt.copyCoord(t,e+o,r,i+o)},qt.toString=function(){if(arguments.length===1){var t=arguments[0],e=t.size();if(e===0)return"()";var r=t.getDimension(),i=new kr;i.append("(");for(var s=0;s<e;s++){s>0&&i.append(" ");for(var o=0;o<r;o++)o>0&&i.append(","),i.append(fr.toString(t.getOrdinate(s,o)))}return i.append(")"),i.toString()}},qt.ensureValidRing=function(t,e){var r=e.size();if(r===0)return e;if(r<=3)return qt.createClosedRing(t,e,4);var i=e.getOrdinate(0,vt.X)===e.getOrdinate(r-1,vt.X)&&e.getOrdinate(0,vt.Y)===e.getOrdinate(r-1,vt.Y);return i?e:qt.createClosedRing(t,e,r+1)},qt.createClosedRing=function(t,e,r){var i=t.create(r,e.getDimension()),s=e.size();qt.copy(e,0,i,0,s);for(var o=s;o<r;o++)qt.copy(e,0,i,o,1);return i};var Gt=function(n){function t(r,i){n.call(this,i),this._points=null,this.init(r)}n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t;var e={serialVersionUID:{configurable:!0}};return t.prototype.computeEnvelopeInternal=function(){return this.isEmpty()?new J:this._points.expandEnvelope(new J)},t.prototype.isRing=function(){return this.isClosed()&&this.isSimple()},t.prototype.getSortIndex=function(){return n.SORTINDEX_LINESTRING},t.prototype.getCoordinates=function(){return this._points.toCoordinateArray()},t.prototype.equalsExact=function(){var i=this;if(arguments.length===2){var s=arguments[0],o=arguments[1];if(!this.isEquivalentClass(s))return!1;var a=s;if(this._points.size()!==a._points.size())return!1;for(var u=0;u<this._points.size();u++)if(!i.equal(i._points.getCoordinate(u),a._points.getCoordinate(u),o))return!1;return!0}else return n.prototype.equalsExact.apply(this,arguments)},t.prototype.normalize=function(){for(var i=this,s=0;s<Math.trunc(this._points.size()/2);s++){var o=i._points.size()-1-s;if(!i._points.getCoordinate(s).equals(i._points.getCoordinate(o)))return i._points.getCoordinate(s).compareTo(i._points.getCoordinate(o))>0&&qt.reverse(i._points),null}},t.prototype.getCoordinate=function(){return this.isEmpty()?null:this._points.getCoordinate(0)},t.prototype.getBoundaryDimension=function(){return this.isClosed()?St.FALSE:0},t.prototype.isClosed=function(){return this.isEmpty()?!1:this.getCoordinateN(0).equals2D(this.getCoordinateN(this.getNumPoints()-1))},t.prototype.getEndPoint=function(){return this.isEmpty()?null:this.getPointN(this.getNumPoints()-1)},t.prototype.getDimension=function(){return 1},t.prototype.getLength=function(){return G.computeLength(this._points)},t.prototype.getNumPoints=function(){return this._points.size()},t.prototype.reverse=function(){var i=this._points.copy();qt.reverse(i);var s=this.getFactory().createLineString(i);return s},t.prototype.compareToSameClass=function(){var i=this;if(arguments.length===1){for(var s=arguments[0],o=s,a=0,u=0;a<this._points.size()&&u<o._points.size();){var l=i._points.getCoordinate(a).compareTo(o._points.getCoordinate(u));if(l!==0)return l;a++,u++}return a<this._points.size()?1:u<o._points.size()?-1:0}else if(arguments.length===2){var c=arguments[0],f=arguments[1],p=c;return f.compare(this._points,p._points)}},t.prototype.apply=function(){var i=this;if(et(arguments[0],vn))for(var s=arguments[0],o=0;o<this._points.size();o++)s.filter(i._points.getCoordinate(o));else if(et(arguments[0],Or)){var a=arguments[0];if(this._points.size()===0)return null;for(var u=0;u<this._points.size()&&(a.filter(i._points,u),!a.isDone());u++);a.isGeometryChanged()&&this.geometryChanged()}else if(et(arguments[0],Wr)){var l=arguments[0];l.filter(this)}else if(et(arguments[0],qn)){var c=arguments[0];c.filter(this)}},t.prototype.getBoundary=function(){return new hr(this).getBoundary()},t.prototype.isEquivalentClass=function(i){return i instanceof t},t.prototype.clone=function(){var i=n.prototype.clone.call(this);return i._points=this._points.clone(),i},t.prototype.getCoordinateN=function(i){return this._points.getCoordinate(i)},t.prototype.getGeometryType=function(){return"LineString"},t.prototype.copy=function(){return new t(this._points.copy(),this._factory)},t.prototype.getCoordinateSequence=function(){return this._points},t.prototype.isEmpty=function(){return this._points.size()===0},t.prototype.init=function(i){if(i===null&&(i=this.getFactory().getCoordinateSequenceFactory().create([])),i.size()===1)throw new Ft("Invalid number of points in LineString (found "+i.size()+" - must be 0 or >= 2)");this._points=i},t.prototype.isCoordinate=function(i){for(var s=this,o=0;o<this._points.size();o++)if(s._points.getCoordinate(o).equals(i))return!0;return!1},t.prototype.getStartPoint=function(){return this.isEmpty()?null:this.getPointN(0)},t.prototype.getPointN=function(i){return this.getFactory().createPoint(this._points.getCoordinate(i))},t.prototype.interfaces_=function(){return[Ia]},t.prototype.getClass=function(){return t},e.serialVersionUID.get=function(){return 0x2b2b51ba435c8e00},Object.defineProperties(t,e),t}(tt),Pa=function(){};Pa.prototype.interfaces_=function(){return[]},Pa.prototype.getClass=function(){return Pa};var Ue=function(n){function t(r,i){n.call(this,i),this._coordinates=r||null,this.init(this._coordinates)}n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t;var e={serialVersionUID:{configurable:!0}};return t.prototype.computeEnvelopeInternal=function(){if(this.isEmpty())return new J;var i=new J;return i.expandToInclude(this._coordinates.getX(0),this._coordinates.getY(0)),i},t.prototype.getSortIndex=function(){return n.SORTINDEX_POINT},t.prototype.getCoordinates=function(){return this.isEmpty()?[]:[this.getCoordinate()]},t.prototype.equalsExact=function(){if(arguments.length===2){var i=arguments[0],s=arguments[1];return this.isEquivalentClass(i)?this.isEmpty()&&i.isEmpty()?!0:this.isEmpty()!==i.isEmpty()?!1:this.equal(i.getCoordinate(),this.getCoordinate(),s):!1}else return n.prototype.equalsExact.apply(this,arguments)},t.prototype.normalize=function(){},t.prototype.getCoordinate=function(){return this._coordinates.size()!==0?this._coordinates.getCoordinate(0):null},t.prototype.getBoundaryDimension=function(){return St.FALSE},t.prototype.getDimension=function(){return 0},t.prototype.getNumPoints=function(){return this.isEmpty()?0:1},t.prototype.reverse=function(){return this.copy()},t.prototype.getX=function(){if(this.getCoordinate()===null)throw new Error("getX called on empty Point");return this.getCoordinate().x},t.prototype.compareToSameClass=function(){if(arguments.length===1){var i=arguments[0],s=i;return this.getCoordinate().compareTo(s.getCoordinate())}else if(arguments.length===2){var o=arguments[0],a=arguments[1],u=o;return a.compare(this._coordinates,u._coordinates)}},t.prototype.apply=function(){if(et(arguments[0],vn)){var i=arguments[0];if(this.isEmpty())return null;i.filter(this.getCoordinate())}else if(et(arguments[0],Or)){var s=arguments[0];if(this.isEmpty())return null;s.filter(this._coordinates,0),s.isGeometryChanged()&&this.geometryChanged()}else if(et(arguments[0],Wr)){var o=arguments[0];o.filter(this)}else if(et(arguments[0],qn)){var a=arguments[0];a.filter(this)}},t.prototype.getBoundary=function(){return this.getFactory().createGeometryCollection(null)},t.prototype.clone=function(){var i=n.prototype.clone.call(this);return i._coordinates=this._coordinates.clone(),i},t.prototype.getGeometryType=function(){return"Point"},t.prototype.copy=function(){return new t(this._coordinates.copy(),this._factory)},t.prototype.getCoordinateSequence=function(){return this._coordinates},t.prototype.getY=function(){if(this.getCoordinate()===null)throw new Error("getY called on empty Point");return this.getCoordinate().y},t.prototype.isEmpty=function(){return this._coordinates.size()===0},t.prototype.init=function(i){i===null&&(i=this.getFactory().getCoordinateSequenceFactory().create([])),ut.isTrue(i.size()<=1),this._coordinates=i},t.prototype.isSimple=function(){return!0},t.prototype.interfaces_=function(){return[Pa]},t.prototype.getClass=function(){return t},e.serialVersionUID.get=function(){return 4902022702746615e3},Object.defineProperties(t,e),t}(tt),gi=function(){};gi.prototype.interfaces_=function(){return[]},gi.prototype.getClass=function(){return gi};var $t=function(n){function t(r,i,s){if(n.call(this,s),this._shell=null,this._holes=null,r===null&&(r=this.getFactory().createLinearRing()),i===null&&(i=[]),n.hasNullElements(i))throw new Ft("holes must not contain null elements");if(r.isEmpty()&&n.hasNonEmptyElements(i))throw new Ft("shell is empty but holes are not");this._shell=r,this._holes=i}n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t;var e={serialVersionUID:{configurable:!0}};return t.prototype.computeEnvelopeInternal=function(){return this._shell.getEnvelopeInternal()},t.prototype.getSortIndex=function(){return n.SORTINDEX_POLYGON},t.prototype.getCoordinates=function(){var i=this;if(this.isEmpty())return[];for(var s=new Array(this.getNumPoints()).fill(null),o=-1,a=this._shell.getCoordinates(),u=0;u<a.length;u++)o++,s[o]=a[u];for(var l=0;l<this._holes.length;l++)for(var c=i._holes[l].getCoordinates(),f=0;f<c.length;f++)o++,s[o]=c[f];return s},t.prototype.getArea=function(){var i=this,s=0;s+=Math.abs(G.signedArea(this._shell.getCoordinateSequence()));for(var o=0;o<this._holes.length;o++)s-=Math.abs(G.signedArea(i._holes[o].getCoordinateSequence()));return s},t.prototype.isRectangle=function(){if(this.getNumInteriorRing()!==0||this._shell===null||this._shell.getNumPoints()!==5)return!1;for(var i=this._shell.getCoordinateSequence(),s=this.getEnvelopeInternal(),o=0;o<5;o++){var a=i.getX(o);if(!(a===s.getMinX()||a===s.getMaxX()))return!1;var u=i.getY(o);if(!(u===s.getMinY()||u===s.getMaxY()))return!1}for(var l=i.getX(0),c=i.getY(0),f=1;f<=4;f++){var p=i.getX(f),v=i.getY(f),w=p!==l,I=v!==c;if(w===I)return!1;l=p,c=v}return!0},t.prototype.equalsExact=function(){var i=this;if(arguments.length===2){var s=arguments[0],o=arguments[1];if(!this.isEquivalentClass(s))return!1;var a=s,u=this._shell,l=a._shell;if(!u.equalsExact(l,o)||this._holes.length!==a._holes.length)return!1;for(var c=0;c<this._holes.length;c++)if(!i._holes[c].equalsExact(a._holes[c],o))return!1;return!0}else return n.prototype.equalsExact.apply(this,arguments)},t.prototype.normalize=function(){var i=this;if(arguments.length===0){this.normalize(this._shell,!0);for(var s=0;s<this._holes.length;s++)i.normalize(i._holes[s],!1);zi.sort(this._holes)}else if(arguments.length===2){var o=arguments[0],a=arguments[1];if(o.isEmpty())return null;var u=new Array(o.getCoordinates().length-1).fill(null);ue.arraycopy(o.getCoordinates(),0,u,0,u.length);var l=ht.minCoordinate(o.getCoordinates());ht.scroll(u,l),ue.arraycopy(u,0,o.getCoordinates(),0,u.length),o.getCoordinates()[u.length]=u[0],G.isCCW(o.getCoordinates())===a&&ht.reverse(o.getCoordinates())}},t.prototype.getCoordinate=function(){return this._shell.getCoordinate()},t.prototype.getNumInteriorRing=function(){return this._holes.length},t.prototype.getBoundaryDimension=function(){return 1},t.prototype.getDimension=function(){return 2},t.prototype.getLength=function(){var i=this,s=0;s+=this._shell.getLength();for(var o=0;o<this._holes.length;o++)s+=i._holes[o].getLength();return s},t.prototype.getNumPoints=function(){for(var i=this,s=this._shell.getNumPoints(),o=0;o<this._holes.length;o++)s+=i._holes[o].getNumPoints();return s},t.prototype.reverse=function(){var i=this,s=this.copy();s._shell=this._shell.copy().reverse(),s._holes=new Array(this._holes.length).fill(null);for(var o=0;o<this._holes.length;o++)s._holes[o]=i._holes[o].copy().reverse();return s},t.prototype.convexHull=function(){return this.getExteriorRing().convexHull()},t.prototype.compareToSameClass=function(){var i=this;if(arguments.length===1){var s=arguments[0],o=this._shell,a=s._shell;return o.compareToSameClass(a)}else if(arguments.length===2){var u=arguments[0],l=arguments[1],c=u,f=this._shell,p=c._shell,v=f.compareToSameClass(p,l);if(v!==0)return v;for(var w=this.getNumInteriorRing(),I=c.getNumInteriorRing(),P=0;P<w&&P<I;){var M=i.getInteriorRingN(P),m=c.getInteriorRingN(P),_=M.compareToSameClass(m,l);if(_!==0)return _;P++}return P<w?1:P<I?-1:0}},t.prototype.apply=function(i){var s=this;if(et(i,vn)){this._shell.apply(i);for(var o=0;o<this._holes.length;o++)s._holes[o].apply(i)}else if(et(i,Or)){if(this._shell.apply(i),!i.isDone())for(var a=0;a<this._holes.length&&(s._holes[a].apply(i),!i.isDone());a++);i.isGeometryChanged()&&this.geometryChanged()}else if(et(i,Wr))i.filter(this);else if(et(i,qn)){i.filter(this),this._shell.apply(i);for(var u=0;u<this._holes.length;u++)s._holes[u].apply(i)}},t.prototype.getBoundary=function(){var i=this;if(this.isEmpty())return this.getFactory().createMultiLineString();var s=new Array(this._holes.length+1).fill(null);s[0]=this._shell;for(var o=0;o<this._holes.length;o++)s[o+1]=i._holes[o];return s.length<=1?this.getFactory().createLinearRing(s[0].getCoordinateSequence()):this.getFactory().createMultiLineString(s)},t.prototype.clone=function(){var i=this,s=n.prototype.clone.call(this);s._shell=this._shell.clone(),s._holes=new Array(this._holes.length).fill(null);for(var o=0;o<this._holes.length;o++)s._holes[o]=i._holes[o].clone();return s},t.prototype.getGeometryType=function(){return"Polygon"},t.prototype.copy=function(){for(var i=this,s=this._shell.copy(),o=new Array(this._holes.length).fill(null),a=0;a<o.length;a++)o[a]=i._holes[a].copy();return new t(s,o,this._factory)},t.prototype.getExteriorRing=function(){return this._shell},t.prototype.isEmpty=function(){return this._shell.isEmpty()},t.prototype.getInteriorRingN=function(i){return this._holes[i]},t.prototype.interfaces_=function(){return[gi]},t.prototype.getClass=function(){return t},e.serialVersionUID.get=function(){return-0x307ffefd8dc97200},Object.defineProperties(t,e),t}(tt),mo=function(n){function t(){n.apply(this,arguments)}n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t;var e={serialVersionUID:{configurable:!0}};return t.prototype.getSortIndex=function(){return tt.SORTINDEX_MULTIPOINT},t.prototype.isValid=function(){return!0},t.prototype.equalsExact=function(){if(arguments.length===2){var i=arguments[0],s=arguments[1];return this.isEquivalentClass(i)?n.prototype.equalsExact.call(this,i,s):!1}else return n.prototype.equalsExact.apply(this,arguments)},t.prototype.getCoordinate=function(){if(arguments.length===1){var i=arguments[0];return this._geometries[i].getCoordinate()}else return n.prototype.getCoordinate.apply(this,arguments)},t.prototype.getBoundaryDimension=function(){return St.FALSE},t.prototype.getDimension=function(){return 0},t.prototype.getBoundary=function(){return this.getFactory().createGeometryCollection(null)},t.prototype.getGeometryType=function(){return"MultiPoint"},t.prototype.copy=function(){for(var i=this,s=new Array(this._geometries.length).fill(null),o=0;o<s.length;o++)s[o]=i._geometries[o].copy();return new t(s,this._factory)},t.prototype.interfaces_=function(){return[Pa]},t.prototype.getClass=function(){return t},e.serialVersionUID.get=function(){return-8048474874175356e3},Object.defineProperties(t,e),t}(Ee),yn=function(n){function t(r,i){r instanceof D&&i instanceof ft&&(r=i.getCoordinateSequenceFactory().create(r)),n.call(this,r,i),this.validateConstruction()}n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t;var e={MINIMUM_VALID_SIZE:{configurable:!0},serialVersionUID:{configurable:!0}};return t.prototype.getSortIndex=function(){return tt.SORTINDEX_LINEARRING},t.prototype.getBoundaryDimension=function(){return St.FALSE},t.prototype.isClosed=function(){return this.isEmpty()?!0:n.prototype.isClosed.call(this)},t.prototype.reverse=function(){var i=this._points.copy();qt.reverse(i);var s=this.getFactory().createLinearRing(i);return s},t.prototype.validateConstruction=function(){if(!this.isEmpty()&&!n.prototype.isClosed.call(this))throw new Ft("Points of LinearRing do not form a closed linestring");if(this.getCoordinateSequence().size()>=1&&this.getCoordinateSequence().size()<t.MINIMUM_VALID_SIZE)throw new Ft("Invalid number of points in LinearRing (found "+this.getCoordinateSequence().size()+" - must be 0 or >= 4)")},t.prototype.getGeometryType=function(){return"LinearRing"},t.prototype.copy=function(){return new t(this._points.copy(),this._factory)},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},e.MINIMUM_VALID_SIZE.get=function(){return 4},e.serialVersionUID.get=function(){return-0x3b229e262367a600},Object.defineProperties(t,e),t}(Gt),_n=function(n){function t(){n.apply(this,arguments)}n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t;var e={serialVersionUID:{configurable:!0}};return t.prototype.getSortIndex=function(){return tt.SORTINDEX_MULTIPOLYGON},t.prototype.equalsExact=function(){if(arguments.length===2){var i=arguments[0],s=arguments[1];return this.isEquivalentClass(i)?n.prototype.equalsExact.call(this,i,s):!1}else return n.prototype.equalsExact.apply(this,arguments)},t.prototype.getBoundaryDimension=function(){return 1},t.prototype.getDimension=function(){return 2},t.prototype.reverse=function(){for(var i=this,s=this._geometries.length,o=new Array(s).fill(null),a=0;a<this._geometries.length;a++)o[a]=i._geometries[a].reverse();return this.getFactory().createMultiPolygon(o)},t.prototype.getBoundary=function(){var i=this;if(this.isEmpty())return this.getFactory().createMultiLineString();for(var s=new z,o=0;o<this._geometries.length;o++)for(var a=i._geometries[o],u=a.getBoundary(),l=0;l<u.getNumGeometries();l++)s.add(u.getGeometryN(l));var c=new Array(s.size()).fill(null);return this.getFactory().createMultiLineString(s.toArray(c))},t.prototype.getGeometryType=function(){return"MultiPolygon"},t.prototype.copy=function(){for(var i=this,s=new Array(this._geometries.length).fill(null),o=0;o<s.length;o++)s[o]=i._geometries[o].copy();return new t(s,this._factory)},t.prototype.interfaces_=function(){return[gi]},t.prototype.getClass=function(){return t},e.serialVersionUID.get=function(){return-0x7a5aa1369171980},Object.defineProperties(t,e),t}(Ee),dr=function(t){this._factory=t||null,this._isUserDataCopied=!1},Su={NoOpGeometryOperation:{configurable:!0},CoordinateOperation:{configurable:!0},CoordinateSequenceOperation:{configurable:!0}};dr.prototype.setCopyUserData=function(t){this._isUserDataCopied=t},dr.prototype.edit=function(t,e){if(t===null)return null;var r=this.editInternal(t,e);return this._isUserDataCopied&&r.setUserData(t.getUserData()),r},dr.prototype.editInternal=function(t,e){return this._factory===null&&(this._factory=t.getFactory()),t instanceof Ee?this.editGeometryCollection(t,e):t instanceof $t?this.editPolygon(t,e):t instanceof Ue?e.edit(t,this._factory):t instanceof Gt?e.edit(t,this._factory):(ut.shouldNeverReachHere("Unsupported Geometry class: "+t.getClass().getName()),null)},dr.prototype.editGeometryCollection=function(t,e){for(var r=this,i=e.edit(t,this._factory),s=new z,o=0;o<i.getNumGeometries();o++){var a=r.edit(i.getGeometryN(o),e);a===null||a.isEmpty()||s.add(a)}return i.getClass()===mo?this._factory.createMultiPoint(s.toArray([])):i.getClass()===Ui?this._factory.createMultiLineString(s.toArray([])):i.getClass()===_n?this._factory.createMultiPolygon(s.toArray([])):this._factory.createGeometryCollection(s.toArray([]))},dr.prototype.editPolygon=function(t,e){var r=this,i=e.edit(t,this._factory);if(i===null&&(i=this._factory.createPolygon(null)),i.isEmpty())return i;var s=this.edit(i.getExteriorRing(),e);if(s===null||s.isEmpty())return this._factory.createPolygon();for(var o=new z,a=0;a<i.getNumInteriorRing();a++){var u=r.edit(i.getInteriorRingN(a),e);u===null||u.isEmpty()||o.add(u)}return this._factory.createPolygon(s,o.toArray([]))},dr.prototype.interfaces_=function(){return[]},dr.prototype.getClass=function(){return dr},dr.GeometryEditorOperation=function(){},Su.NoOpGeometryOperation.get=function(){return Na},Su.CoordinateOperation.get=function(){return ba},Su.CoordinateSequenceOperation.get=function(){return Ta},Object.defineProperties(dr,Su);var Na=function(){};Na.prototype.edit=function(t,e){return t},Na.prototype.interfaces_=function(){return[dr.GeometryEditorOperation]},Na.prototype.getClass=function(){return Na};var ba=function(){};ba.prototype.edit=function(t,e){var r=this.editCoordinates(t.getCoordinates(),t);return r===null?t:t instanceof yn?e.createLinearRing(r):t instanceof Gt?e.createLineString(r):t instanceof Ue?r.length>0?e.createPoint(r[0]):e.createPoint():t},ba.prototype.interfaces_=function(){return[dr.GeometryEditorOperation]},ba.prototype.getClass=function(){return ba};var Ta=function(){};Ta.prototype.edit=function(t,e){return t instanceof yn?e.createLinearRing(this.edit(t.getCoordinateSequence(),t)):t instanceof Gt?e.createLineString(this.edit(t.getCoordinateSequence(),t)):t instanceof Ue?e.createPoint(this.edit(t.getCoordinateSequence(),t)):t},Ta.prototype.interfaces_=function(){return[dr.GeometryEditorOperation]},Ta.prototype.getClass=function(){return Ta};var Xt=function(){var t=this;if(this._dimension=3,this._coordinates=null,arguments.length===1){if(arguments[0]instanceof Array)this._coordinates=arguments[0],this._dimension=3;else if(Number.isInteger(arguments[0])){var e=arguments[0];this._coordinates=new Array(e).fill(null);for(var r=0;r<e;r++)t._coordinates[r]=new D}else if(et(arguments[0],vt)){var i=arguments[0];if(i===null)return this._coordinates=new Array(0).fill(null),null;this._dimension=i.getDimension(),this._coordinates=new Array(i.size()).fill(null);for(var s=0;s<this._coordinates.length;s++)t._coordinates[s]=i.getCoordinateCopy(s)}}else if(arguments.length===2){if(arguments[0]instanceof Array&&Number.isInteger(arguments[1])){var o=arguments[0],a=arguments[1];this._coordinates=o,this._dimension=a,o===null&&(this._coordinates=new Array(0).fill(null))}else if(Number.isInteger(arguments[0])&&Number.isInteger(arguments[1])){var u=arguments[0],l=arguments[1];this._coordinates=new Array(u).fill(null),this._dimension=l;for(var c=0;c<u;c++)t._coordinates[c]=new D}}},zf={serialVersionUID:{configurable:!0}};Xt.prototype.setOrdinate=function(t,e,r){switch(e){case vt.X:this._coordinates[t].x=r;break;case vt.Y:this._coordinates[t].y=r;break;case vt.Z:this._coordinates[t].z=r;break;default:throw new Ft("invalid ordinateIndex")}},Xt.prototype.size=function(){return this._coordinates.length},Xt.prototype.getOrdinate=function(t,e){switch(e){case vt.X:return this._coordinates[t].x;case vt.Y:return this._coordinates[t].y;case vt.Z:return this._coordinates[t].z}return it.NaN},Xt.prototype.getCoordinate=function(){if(arguments.length===1){var t=arguments[0];return this._coordinates[t]}else if(arguments.length===2){var e=arguments[0],r=arguments[1];r.x=this._coordinates[e].x,r.y=this._coordinates[e].y,r.z=this._coordinates[e].z}},Xt.prototype.getCoordinateCopy=function(t){return new D(this._coordinates[t])},Xt.prototype.getDimension=function(){return this._dimension},Xt.prototype.getX=function(t){return this._coordinates[t].x},Xt.prototype.clone=function(){for(var t=this,e=new Array(this.size()).fill(null),r=0;r<this._coordinates.length;r++)e[r]=t._coordinates[r].clone();return new Xt(e,this._dimension)},Xt.prototype.expandEnvelope=function(t){for(var e=this,r=0;r<this._coordinates.length;r++)t.expandToInclude(e._coordinates[r]);return t},Xt.prototype.copy=function(){for(var t=this,e=new Array(this.size()).fill(null),r=0;r<this._coordinates.length;r++)e[r]=t._coordinates[r].copy();return new Xt(e,this._dimension)},Xt.prototype.toString=function(){var t=this;if(this._coordinates.length>0){var e=new kr(17*this._coordinates.length);e.append("("),e.append(this._coordinates[0]);for(var r=1;r<this._coordinates.length;r++)e.append(", "),e.append(t._coordinates[r]);return e.append(")"),e.toString()}else return"()"},Xt.prototype.getY=function(t){return this._coordinates[t].y},Xt.prototype.toCoordinateArray=function(){return this._coordinates},Xt.prototype.interfaces_=function(){return[vt,lr]},Xt.prototype.getClass=function(){return Xt},zf.serialVersionUID.get=function(){return-0xcb44a778db18e00},Object.defineProperties(Xt,zf);var wn=function(){},Ml={serialVersionUID:{configurable:!0},instanceObject:{configurable:!0}};wn.prototype.readResolve=function(){return wn.instance()},wn.prototype.create=function(){if(arguments.length===1){if(arguments[0]instanceof Array){var t=arguments[0];return new Xt(t)}else if(et(arguments[0],vt)){var e=arguments[0];return new Xt(e)}}else if(arguments.length===2){var r=arguments[0],i=arguments[1];return i>3&&(i=3),i<2?new Xt(r):new Xt(r,i)}},wn.prototype.interfaces_=function(){return[so,lr]},wn.prototype.getClass=function(){return wn},wn.instance=function(){return wn.instanceObject},Ml.serialVersionUID.get=function(){return-0x38e49fa6cf6f2e00},Ml.instanceObject.get=function(){return new wn},Object.defineProperties(wn,Ml);var Uf=function(n){function t(){n.call(this),this.map_=new Map}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.get=function(r){return this.map_.get(r)||null},t.prototype.put=function(r,i){return this.map_.set(r,i),i},t.prototype.values=function(){for(var r=new z,i=this.map_.values(),s=i.next();!s.done;)r.add(s.value),s=i.next();return r},t.prototype.entrySet=function(){var r=new Tl;return this.map_.entries().forEach(function(i){return r.add(i)}),r},t.prototype.size=function(){return this.map_.size()},t}(Ss),Ct=function n(){if(this._modelType=null,this._scale=null,arguments.length===0)this._modelType=n.FLOATING;else if(arguments.length===1){if(arguments[0]instanceof qr){var t=arguments[0];this._modelType=t,t===n.FIXED&&this.setScale(1)}else if(typeof arguments[0]=="number"){var e=arguments[0];this._modelType=n.FIXED,this.setScale(e)}else if(arguments[0]instanceof n){var r=arguments[0];this._modelType=r._modelType,this._scale=r._scale}}},xl={serialVersionUID:{configurable:!0},maximumPreciseValue:{configurable:!0}};Ct.prototype.equals=function(t){if(!(t instanceof Ct))return!1;var e=t;return this._modelType===e._modelType&&this._scale===e._scale},Ct.prototype.compareTo=function(t){var e=t,r=this.getMaximumSignificantDigits(),i=e.getMaximumSignificantDigits();return new Vr(r).compareTo(new Vr(i))},Ct.prototype.getScale=function(){return this._scale},Ct.prototype.isFloating=function(){return this._modelType===Ct.FLOATING||this._modelType===Ct.FLOATING_SINGLE},Ct.prototype.getType=function(){return this._modelType},Ct.prototype.toString=function(){var t="UNKNOWN";return this._modelType===Ct.FLOATING?t="Floating":this._modelType===Ct.FLOATING_SINGLE?t="Floating-Single":this._modelType===Ct.FIXED&&(t="Fixed (Scale="+this.getScale()+")"),t},Ct.prototype.makePrecise=function(){if(typeof arguments[0]=="number"){var t=arguments[0];if(it.isNaN(t))return t;if(this._modelType===Ct.FLOATING_SINGLE){var e=t;return e}return this._modelType===Ct.FIXED?Math.round(t*this._scale)/this._scale:t}else if(arguments[0]instanceof D){var r=arguments[0];if(this._modelType===Ct.FLOATING)return null;r.x=this.makePrecise(r.x),r.y=this.makePrecise(r.y)}},Ct.prototype.getMaximumSignificantDigits=function(){var t=16;return this._modelType===Ct.FLOATING?t=16:this._modelType===Ct.FLOATING_SINGLE?t=6:this._modelType===Ct.FIXED&&(t=1+Math.trunc(Math.ceil(Math.log(this.getScale())/Math.log(10)))),t},Ct.prototype.setScale=function(t){this._scale=Math.abs(t)},Ct.prototype.interfaces_=function(){return[lr,ur]},Ct.prototype.getClass=function(){return Ct},Ct.mostPrecise=function(t,e){return t.compareTo(e)>=0?t:e},xl.serialVersionUID.get=function(){return 7777263578777804e3},xl.maximumPreciseValue.get=function(){return 9007199254740992},Object.defineProperties(Ct,xl);var qr=function n(t){this._name=t||null,n.nameToTypeMap.put(t,this)},Ll={serialVersionUID:{configurable:!0},nameToTypeMap:{configurable:!0}};qr.prototype.readResolve=function(){return qr.nameToTypeMap.get(this._name)},qr.prototype.toString=function(){return this._name},qr.prototype.interfaces_=function(){return[lr]},qr.prototype.getClass=function(){return qr},Ll.serialVersionUID.get=function(){return-552860263173159e4},Ll.nameToTypeMap.get=function(){return new Uf},Object.defineProperties(qr,Ll),Ct.Type=qr,Ct.FIXED=new qr("FIXED"),Ct.FLOATING=new qr("FLOATING"),Ct.FLOATING_SINGLE=new qr("FLOATING SINGLE");var ft=function n(){this._precisionModel=new Ct,this._SRID=0,this._coordinateSequenceFactory=n.getDefaultCoordinateSequenceFactory(),arguments.length===0||(arguments.length===1?et(arguments[0],so)?this._coordinateSequenceFactory=arguments[0]:arguments[0]instanceof Ct&&(this._precisionModel=arguments[0]):arguments.length===2?(this._precisionModel=arguments[0],this._SRID=arguments[1]):arguments.length===3&&(this._precisionModel=arguments[0],this._SRID=arguments[1],this._coordinateSequenceFactory=arguments[2]))},Gf={serialVersionUID:{configurable:!0}};ft.prototype.toGeometry=function(t){return t.isNull()?this.createPoint(null):t.getMinX()===t.getMaxX()&&t.getMinY()===t.getMaxY()?this.createPoint(new D(t.getMinX(),t.getMinY())):t.getMinX()===t.getMaxX()||t.getMinY()===t.getMaxY()?this.createLineString([new D(t.getMinX(),t.getMinY()),new D(t.getMaxX(),t.getMaxY())]):this.createPolygon(this.createLinearRing([new D(t.getMinX(),t.getMinY()),new D(t.getMinX(),t.getMaxY()),new D(t.getMaxX(),t.getMaxY()),new D(t.getMaxX(),t.getMinY()),new D(t.getMinX(),t.getMinY())]),null)},ft.prototype.createLineString=function(t){if(t){if(t instanceof Array)return new Gt(this.getCoordinateSequenceFactory().create(t),this);if(et(t,vt))return new Gt(t,this)}else return new Gt(this.getCoordinateSequenceFactory().create([]),this)},ft.prototype.createMultiLineString=function(){if(arguments.length===0)return new Ui(null,this);if(arguments.length===1){var t=arguments[0];return new Ui(t,this)}},ft.prototype.buildGeometry=function(t){for(var e=null,r=!1,i=!1,s=t.iterator();s.hasNext();){var o=s.next(),a=o.getClass();e===null&&(e=a),a!==e&&(r=!0),o.isGeometryCollectionOrDerived()&&(i=!0)}if(e===null)return this.createGeometryCollection();if(r||i)return this.createGeometryCollection(ft.toGeometryArray(t));var u=t.iterator().next(),l=t.size()>1;if(l){if(u instanceof $t)return this.createMultiPolygon(ft.toPolygonArray(t));if(u instanceof Gt)return this.createMultiLineString(ft.toLineStringArray(t));if(u instanceof Ue)return this.createMultiPoint(ft.toPointArray(t));ut.shouldNeverReachHere("Unhandled class: "+u.getClass().getName())}return u},ft.prototype.createMultiPointFromCoords=function(t){return this.createMultiPoint(t!==null?this.getCoordinateSequenceFactory().create(t):null)},ft.prototype.createPoint=function(){if(arguments.length===0)return this.createPoint(this.getCoordinateSequenceFactory().create([]));if(arguments.length===1){if(arguments[0]instanceof D){var t=arguments[0];return this.createPoint(t!==null?this.getCoordinateSequenceFactory().create([t]):null)}else if(et(arguments[0],vt)){var e=arguments[0];return new Ue(e,this)}}},ft.prototype.getCoordinateSequenceFactory=function(){return this._coordinateSequenceFactory},ft.prototype.createPolygon=function(){if(arguments.length===0)return new $t(null,null,this);if(arguments.length===1){if(et(arguments[0],vt)){var t=arguments[0];return this.createPolygon(this.createLinearRing(t))}else if(arguments[0]instanceof Array){var e=arguments[0];return this.createPolygon(this.createLinearRing(e))}else if(arguments[0]instanceof yn){var r=arguments[0];return this.createPolygon(r,null)}}else if(arguments.length===2){var i=arguments[0],s=arguments[1];return new $t(i,s,this)}},ft.prototype.getSRID=function(){return this._SRID},ft.prototype.createGeometryCollection=function(){if(arguments.length===0)return new Ee(null,this);if(arguments.length===1){var t=arguments[0];return new Ee(t,this)}},ft.prototype.createGeometry=function(t){var e=new dr(this);return e.edit(t,{edit:function(){if(arguments.length===2){var r=arguments[0];return this._coordinateSequenceFactory.create(r)}}})},ft.prototype.getPrecisionModel=function(){return this._precisionModel},ft.prototype.createLinearRing=function(){if(arguments.length===0)return this.createLinearRing(this.getCoordinateSequenceFactory().create([]));if(arguments.length===1){if(arguments[0]instanceof Array){var t=arguments[0];return this.createLinearRing(t!==null?this.getCoordinateSequenceFactory().create(t):null)}else if(et(arguments[0],vt)){var e=arguments[0];return new yn(e,this)}}},ft.prototype.createMultiPolygon=function(){if(arguments.length===0)return new _n(null,this);if(arguments.length===1){var t=arguments[0];return new _n(t,this)}},ft.prototype.createMultiPoint=function(){var t=this;if(arguments.length===0)return new mo(null,this);if(arguments.length===1){if(arguments[0]instanceof Array){var e=arguments[0];return new mo(e,this)}else if(arguments[0]instanceof Array){var r=arguments[0];return this.createMultiPoint(r!==null?this.getCoordinateSequenceFactory().create(r):null)}else if(et(arguments[0],vt)){var i=arguments[0];if(i===null)return this.createMultiPoint(new Array(0).fill(null));for(var s=new Array(i.size()).fill(null),o=0;o<i.size();o++){var a=t.getCoordinateSequenceFactory().create(1,i.getDimension());qt.copy(i,o,a,0,1),s[o]=t.createPoint(a)}return this.createMultiPoint(s)}}},ft.prototype.interfaces_=function(){return[lr]},ft.prototype.getClass=function(){return ft},ft.toMultiPolygonArray=function(t){var e=new Array(t.size()).fill(null);return t.toArray(e)},ft.toGeometryArray=function(t){if(t===null)return null;var e=new Array(t.size()).fill(null);return t.toArray(e)},ft.getDefaultCoordinateSequenceFactory=function(){return wn.instance()},ft.toMultiLineStringArray=function(t){var e=new Array(t.size()).fill(null);return t.toArray(e)},ft.toLineStringArray=function(t){var e=new Array(t.size()).fill(null);return t.toArray(e)},ft.toMultiPointArray=function(t){var e=new Array(t.size()).fill(null);return t.toArray(e)},ft.toLinearRingArray=function(t){var e=new Array(t.size()).fill(null);return t.toArray(e)},ft.toPointArray=function(t){var e=new Array(t.size()).fill(null);return t.toArray(e)},ft.toPolygonArray=function(t){var e=new Array(t.size()).fill(null);return t.toArray(e)},ft.createPointFromInternalCoord=function(t,e){return e.getPrecisionModel().makePrecise(t),e.getFactory().createPoint(t)},Gf.serialVersionUID.get=function(){return-6820524753094096e3},Object.defineProperties(ft,Gf);var tv=["Point","MultiPoint","LineString","MultiLineString","Polygon","MultiPolygon"],Cu=function(t){this.geometryFactory=t||new ft};Cu.prototype.read=function(t){var e;typeof t=="string"?e=JSON.parse(t):e=t;var r=e.type;if(!Xr[r])throw new Error("Unknown GeoJSON type: "+e.type);return tv.indexOf(r)!==-1?Xr[r].apply(this,[e.coordinates]):r==="GeometryCollection"?Xr[r].apply(this,[e.geometries]):Xr[r].apply(this,[e])},Cu.prototype.write=function(t){var e=t.getGeometryType();if(!Jn[e])throw new Error("Geometry is not supported");return Jn[e].apply(this,[t])};var Xr={Feature:function(n){var t={};for(var e in n)t[e]=n[e];if(n.geometry){var r=n.geometry.type;if(!Xr[r])throw new Error("Unknown GeoJSON type: "+n.type);t.geometry=this.read(n.geometry)}return n.bbox&&(t.bbox=Xr.bbox.apply(this,[n.bbox])),t},FeatureCollection:function(n){var t=this,e={};if(n.features){e.features=[];for(var r=0;r<n.features.length;++r)e.features.push(t.read(n.features[r]))}return n.bbox&&(e.bbox=this.parse.bbox.apply(this,[n.bbox])),e},coordinates:function(n){for(var t=[],e=0;e<n.length;++e){var r=n[e];t.push(new D(r[0],r[1]))}return t},bbox:function(n){return this.geometryFactory.createLinearRing([new D(n[0],n[1]),new D(n[2],n[1]),new D(n[2],n[3]),new D(n[0],n[3]),new D(n[0],n[1])])},Point:function(n){var t=new D(n[0],n[1]);return this.geometryFactory.createPoint(t)},MultiPoint:function(n){for(var t=this,e=[],r=0;r<n.length;++r)e.push(Xr.Point.apply(t,[n[r]]));return this.geometryFactory.createMultiPoint(e)},LineString:function(n){var t=Xr.coordinates.apply(this,[n]);return this.geometryFactory.createLineString(t)},MultiLineString:function(n){for(var t=this,e=[],r=0;r<n.length;++r)e.push(Xr.LineString.apply(t,[n[r]]));return this.geometryFactory.createMultiLineString(e)},Polygon:function(n){for(var t=this,e=Xr.coordinates.apply(this,[n[0]]),r=this.geometryFactory.createLinearRing(e),i=[],s=1;s<n.length;++s){var o=n[s],a=Xr.coordinates.apply(t,[o]),u=t.geometryFactory.createLinearRing(a);i.push(u)}return this.geometryFactory.createPolygon(r,i)},MultiPolygon:function(n){for(var t=this,e=[],r=0;r<n.length;++r){var i=n[r];e.push(Xr.Polygon.apply(t,[i]))}return this.geometryFactory.createMultiPolygon(e)},GeometryCollection:function(n){for(var t=this,e=[],r=0;r<n.length;++r){var i=n[r];e.push(t.read(i))}return this.geometryFactory.createGeometryCollection(e)}},Jn={coordinate:function(n){return[n.x,n.y]},Point:function(n){var t=Jn.coordinate.apply(this,[n.getCoordinate()]);return{type:"Point",coordinates:t}},MultiPoint:function(n){for(var t=this,e=[],r=0;r<n._geometries.length;++r){var i=n._geometries[r],s=Jn.Point.apply(t,[i]);e.push(s.coordinates)}return{type:"MultiPoint",coordinates:e}},LineString:function(n){for(var t=this,e=[],r=n.getCoordinates(),i=0;i<r.length;++i){var s=r[i];e.push(Jn.coordinate.apply(t,[s]))}return{type:"LineString",coordinates:e}},MultiLineString:function(n){for(var t=this,e=[],r=0;r<n._geometries.length;++r){var i=n._geometries[r],s=Jn.LineString.apply(t,[i]);e.push(s.coordinates)}return{type:"MultiLineString",coordinates:e}},Polygon:function(n){var t=this,e=[],r=Jn.LineString.apply(this,[n._shell]);e.push(r.coordinates);for(var i=0;i<n._holes.length;++i){var s=n._holes[i],o=Jn.LineString.apply(t,[s]);e.push(o.coordinates)}return{type:"Polygon",coordinates:e}},MultiPolygon:function(n){for(var t=this,e=[],r=0;r<n._geometries.length;++r){var i=n._geometries[r],s=Jn.Polygon.apply(t,[i]);e.push(s.coordinates)}return{type:"MultiPolygon",coordinates:e}},GeometryCollection:function(n){for(var t=this,e=[],r=0;r<n._geometries.length;++r){var i=n._geometries[r],s=i.getGeometryType();e.push(Jn[s].apply(t,[i]))}return{type:"GeometryCollection",geometries:e}}},Al=function(t){this.geometryFactory=t||new ft,this.precisionModel=this.geometryFactory.getPrecisionModel(),this.parser=new Cu(this.geometryFactory)};Al.prototype.read=function(t){var e=this.parser.read(t);return this.precisionModel.getType()===Ct.FIXED&&this.reducePrecision(e),e},Al.prototype.reducePrecision=function(t){var e=this,r,i;if(t.coordinate)this.precisionModel.makePrecise(t.coordinate);else if(t.points)for(r=0,i=t.points.length;r<i;r++)e.precisionModel.makePrecise(t.points[r]);else if(t.geometries)for(r=0,i=t.geometries.length;r<i;r++)e.reducePrecision(t.geometries[r])};var Wf=function(){this.parser=new Cu(this.geometryFactory)};Wf.prototype.write=function(t){return this.parser.write(t)};var V=function(){},Iu={ON:{configurable:!0},LEFT:{configurable:!0},RIGHT:{configurable:!0}};V.prototype.interfaces_=function(){return[]},V.prototype.getClass=function(){return V},V.opposite=function(t){return t===V.LEFT?V.RIGHT:t===V.RIGHT?V.LEFT:t},Iu.ON.get=function(){return 0},Iu.LEFT.get=function(){return 1},Iu.RIGHT.get=function(){return 2},Object.defineProperties(V,Iu);function Pu(n){this.message=n||""}Pu.prototype=new Error,Pu.prototype.name="EmptyStackException";function Yr(){this.array_=[]}Yr.prototype=new br,Yr.prototype.add=function(n){return this.array_.push(n),!0},Yr.prototype.get=function(n){if(n<0||n>=this.size())throw new Error;return this.array_[n]},Yr.prototype.push=function(n){return this.array_.push(n),n},Yr.prototype.pop=function(n){if(this.array_.length===0)throw new Pu;return this.array_.pop()},Yr.prototype.peek=function(){if(this.array_.length===0)throw new Pu;return this.array_[this.array_.length-1]},Yr.prototype.empty=function(){return this.array_.length===0},Yr.prototype.isEmpty=function(){return this.empty()},Yr.prototype.search=function(n){return this.array_.indexOf(n)},Yr.prototype.size=function(){return this.array_.length},Yr.prototype.toArray=function(){for(var n=this,t=[],e=0,r=this.array_.length;e<r;e++)t.push(n.array_[e]);return t};var Hr=function(){this._minIndex=-1,this._minCoord=null,this._minDe=null,this._orientedDe=null};Hr.prototype.getCoordinate=function(){return this._minCoord},Hr.prototype.getRightmostSide=function(t,e){var r=this.getRightmostSideOfSegment(t,e);return r<0&&(r=this.getRightmostSideOfSegment(t,e-1)),r<0&&(this._minCoord=null,this.checkForRightmostCoordinate(t)),r},Hr.prototype.findRightmostEdgeAtVertex=function(){var t=this._minDe.getEdge().getCoordinates();ut.isTrue(this._minIndex>0&&this._minIndex<t.length,"rightmost point expected to be interior vertex of edge");var e=t[this._minIndex-1],r=t[this._minIndex+1],i=G.computeOrientation(this._minCoord,r,e),s=!1;(e.y<this._minCoord.y&&r.y<this._minCoord.y&&i===G.COUNTERCLOCKWISE||e.y>this._minCoord.y&&r.y>this._minCoord.y&&i===G.CLOCKWISE)&&(s=!0),s&&(this._minIndex=this._minIndex-1)},Hr.prototype.getRightmostSideOfSegment=function(t,e){var r=t.getEdge(),i=r.getCoordinates();if(e<0||e+1>=i.length||i[e].y===i[e+1].y)return-1;var s=V.LEFT;return i[e].y<i[e+1].y&&(s=V.RIGHT),s},Hr.prototype.getEdge=function(){return this._orientedDe},Hr.prototype.checkForRightmostCoordinate=function(t){for(var e=this,r=t.getEdge().getCoordinates(),i=0;i<r.length-1;i++)(e._minCoord===null||r[i].x>e._minCoord.x)&&(e._minDe=t,e._minIndex=i,e._minCoord=r[i])},Hr.prototype.findRightmostEdgeAtNode=function(){var t=this._minDe.getNode(),e=t.getEdges();this._minDe=e.getRightmostEdge(),this._minDe.isForward()||(this._minDe=this._minDe.getSym(),this._minIndex=this._minDe.getEdge().getCoordinates().length-1)},Hr.prototype.findEdge=function(t){for(var e=this,r=t.iterator();r.hasNext();){var i=r.next();i.isForward()&&e.checkForRightmostCoordinate(i)}ut.isTrue(this._minIndex!==0||this._minCoord.equals(this._minDe.getCoordinate()),"inconsistency in rightmost processing"),this._minIndex===0?this.findRightmostEdgeAtNode():this.findRightmostEdgeAtVertex(),this._orientedDe=this._minDe;var s=this.getRightmostSide(this._minDe,this._minIndex);s===V.LEFT&&(this._orientedDe=this._minDe.getSym())},Hr.prototype.interfaces_=function(){return[]},Hr.prototype.getClass=function(){return Hr};var Zn=function(n){function t(e,r){n.call(this,t.msgWithCoord(e,r)),this.pt=r?new D(r):null,this.name="TopologyException"}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.getCoordinate=function(){return this.pt},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t.msgWithCoord=function(r,i){return i?r:r+" [ "+i+" ]"},t}(Wn),Nu=function(){this.array_=[]};Nu.prototype.addLast=function(t){this.array_.push(t)},Nu.prototype.removeFirst=function(){return this.array_.shift()},Nu.prototype.isEmpty=function(){return this.array_.length===0};var Se=function(){this._finder=null,this._dirEdgeList=new z,this._nodes=new z,this._rightMostCoord=null,this._env=null,this._finder=new Hr};Se.prototype.clearVisitedEdges=function(){for(var t=this._dirEdgeList.iterator();t.hasNext();){var e=t.next();e.setVisited(!1)}},Se.prototype.getRightmostCoordinate=function(){return this._rightMostCoord},Se.prototype.computeNodeDepth=function(t){for(var e=this,r=null,i=t.getEdges().iterator();i.hasNext();){var s=i.next();if(s.isVisited()||s.getSym().isVisited()){r=s;break}}if(r===null)throw new Zn("unable to find edge to compute depths at "+t.getCoordinate());t.getEdges().computeDepths(r);for(var o=t.getEdges().iterator();o.hasNext();){var a=o.next();a.setVisited(!0),e.copySymDepths(a)}},Se.prototype.computeDepth=function(t){this.clearVisitedEdges();var e=this._finder.getEdge();e.setEdgeDepths(V.RIGHT,t),this.copySymDepths(e),this.computeDepths(e)},Se.prototype.create=function(t){this.addReachable(t),this._finder.findEdge(this._dirEdgeList),this._rightMostCoord=this._finder.getCoordinate()},Se.prototype.findResultEdges=function(){for(var t=this._dirEdgeList.iterator();t.hasNext();){var e=t.next();e.getDepth(V.RIGHT)>=1&&e.getDepth(V.LEFT)<=0&&!e.isInteriorAreaEdge()&&e.setInResult(!0)}},Se.prototype.computeDepths=function(t){var e=this,r=new Tl,i=new Nu,s=t.getNode();for(i.addLast(s),r.add(s),t.setVisited(!0);!i.isEmpty();){var o=i.removeFirst();r.add(o),e.computeNodeDepth(o);for(var a=o.getEdges().iterator();a.hasNext();){var u=a.next(),l=u.getSym();if(!l.isVisited()){var c=l.getNode();r.contains(c)||(i.addLast(c),r.add(c))}}}},Se.prototype.compareTo=function(t){var e=t;return this._rightMostCoord.x<e._rightMostCoord.x?-1:this._rightMostCoord.x>e._rightMostCoord.x?1:0},Se.prototype.getEnvelope=function(){if(this._env===null){for(var t=new J,e=this._dirEdgeList.iterator();e.hasNext();)for(var r=e.next(),i=r.getEdge().getCoordinates(),s=0;s<i.length-1;s++)t.expandToInclude(i[s]);this._env=t}return this._env},Se.prototype.addReachable=function(t){var e=this,r=new Yr;for(r.add(t);!r.empty();){var i=r.pop();e.add(i,r)}},Se.prototype.copySymDepths=function(t){var e=t.getSym();e.setDepth(V.LEFT,t.getDepth(V.RIGHT)),e.setDepth(V.RIGHT,t.getDepth(V.LEFT))},Se.prototype.add=function(t,e){var r=this;t.setVisited(!0),this._nodes.add(t);for(var i=t.getEdges().iterator();i.hasNext();){var s=i.next();r._dirEdgeList.add(s);var o=s.getSym(),a=o.getNode();a.isVisited()||e.push(a)}},Se.prototype.getNodes=function(){return this._nodes},Se.prototype.getDirectedEdges=function(){return this._dirEdgeList},Se.prototype.interfaces_=function(){return[ur]},Se.prototype.getClass=function(){return Se};var xt=function n(){var t=this;if(this.location=null,arguments.length===1){if(arguments[0]instanceof Array){var e=arguments[0];this.init(e.length)}else if(Number.isInteger(arguments[0])){var r=arguments[0];this.init(1),this.location[V.ON]=r}else if(arguments[0]instanceof n){var i=arguments[0];if(this.init(i.location.length),i!==null)for(var s=0;s<this.location.length;s++)t.location[s]=i.location[s]}}else if(arguments.length===3){var o=arguments[0],a=arguments[1],u=arguments[2];this.init(3),this.location[V.ON]=o,this.location[V.LEFT]=a,this.location[V.RIGHT]=u}};xt.prototype.setAllLocations=function(t){for(var e=this,r=0;r<this.location.length;r++)e.location[r]=t},xt.prototype.isNull=function(){for(var t=this,e=0;e<this.location.length;e++)if(t.location[e]!==R.NONE)return!1;return!0},xt.prototype.setAllLocationsIfNull=function(t){for(var e=this,r=0;r<this.location.length;r++)e.location[r]===R.NONE&&(e.location[r]=t)},xt.prototype.isLine=function(){return this.location.length===1},xt.prototype.merge=function(t){var e=this;if(t.location.length>this.location.length){var r=new Array(3).fill(null);r[V.ON]=this.location[V.ON],r[V.LEFT]=R.NONE,r[V.RIGHT]=R.NONE,this.location=r}for(var i=0;i<this.location.length;i++)e.location[i]===R.NONE&&i<t.location.length&&(e.location[i]=t.location[i])},xt.prototype.getLocations=function(){return this.location},xt.prototype.flip=function(){if(this.location.length<=1)return null;var t=this.location[V.LEFT];this.location[V.LEFT]=this.location[V.RIGHT],this.location[V.RIGHT]=t},xt.prototype.toString=function(){var t=new kr;return this.location.length>1&&t.append(R.toLocationSymbol(this.location[V.LEFT])),t.append(R.toLocationSymbol(this.location[V.ON])),this.location.length>1&&t.append(R.toLocationSymbol(this.location[V.RIGHT])),t.toString()},xt.prototype.setLocations=function(t,e,r){this.location[V.ON]=t,this.location[V.LEFT]=e,this.location[V.RIGHT]=r},xt.prototype.get=function(t){return t<this.location.length?this.location[t]:R.NONE},xt.prototype.isArea=function(){return this.location.length>1},xt.prototype.isAnyNull=function(){for(var t=this,e=0;e<this.location.length;e++)if(t.location[e]===R.NONE)return!0;return!1},xt.prototype.setLocation=function(){if(arguments.length===1){var t=arguments[0];this.setLocation(V.ON,t)}else if(arguments.length===2){var e=arguments[0],r=arguments[1];this.location[e]=r}},xt.prototype.init=function(t){this.location=new Array(t).fill(null),this.setAllLocations(R.NONE)},xt.prototype.isEqualOnSide=function(t,e){return this.location[e]===t.location[e]},xt.prototype.allPositionsEqual=function(t){for(var e=this,r=0;r<this.location.length;r++)if(e.location[r]!==t)return!1;return!0},xt.prototype.interfaces_=function(){return[]},xt.prototype.getClass=function(){return xt};var bt=function n(){if(this.elt=new Array(2).fill(null),arguments.length===1){if(Number.isInteger(arguments[0])){var t=arguments[0];this.elt[0]=new xt(t),this.elt[1]=new xt(t)}else if(arguments[0]instanceof n){var e=arguments[0];this.elt[0]=new xt(e.elt[0]),this.elt[1]=new xt(e.elt[1])}}else if(arguments.length===2){var r=arguments[0],i=arguments[1];this.elt[0]=new xt(R.NONE),this.elt[1]=new xt(R.NONE),this.elt[r].setLocation(i)}else if(arguments.length===3){var s=arguments[0],o=arguments[1],a=arguments[2];this.elt[0]=new xt(s,o,a),this.elt[1]=new xt(s,o,a)}else if(arguments.length===4){var u=arguments[0],l=arguments[1],c=arguments[2],f=arguments[3];this.elt[0]=new xt(R.NONE,R.NONE,R.NONE),this.elt[1]=new xt(R.NONE,R.NONE,R.NONE),this.elt[u].setLocations(l,c,f)}};bt.prototype.getGeometryCount=function(){var t=0;return this.elt[0].isNull()||t++,this.elt[1].isNull()||t++,t},bt.prototype.setAllLocations=function(t,e){this.elt[t].setAllLocations(e)},bt.prototype.isNull=function(t){return this.elt[t].isNull()},bt.prototype.setAllLocationsIfNull=function(){if(arguments.length===1){var t=arguments[0];this.setAllLocationsIfNull(0,t),this.setAllLocationsIfNull(1,t)}else if(arguments.length===2){var e=arguments[0],r=arguments[1];this.elt[e].setAllLocationsIfNull(r)}},bt.prototype.isLine=function(t){return this.elt[t].isLine()},bt.prototype.merge=function(t){for(var e=this,r=0;r<2;r++)e.elt[r]===null&&t.elt[r]!==null?e.elt[r]=new xt(t.elt[r]):e.elt[r].merge(t.elt[r])},bt.prototype.flip=function(){this.elt[0].flip(),this.elt[1].flip()},bt.prototype.getLocation=function(){if(arguments.length===1){var t=arguments[0];return this.elt[t].get(V.ON)}else if(arguments.length===2){var e=arguments[0],r=arguments[1];return this.elt[e].get(r)}},bt.prototype.toString=function(){var t=new kr;return this.elt[0]!==null&&(t.append("A:"),t.append(this.elt[0].toString())),this.elt[1]!==null&&(t.append(" B:"),t.append(this.elt[1].toString())),t.toString()},bt.prototype.isArea=function(){if(arguments.length===0)return this.elt[0].isArea()||this.elt[1].isArea();if(arguments.length===1){var t=arguments[0];return this.elt[t].isArea()}},bt.prototype.isAnyNull=function(t){return this.elt[t].isAnyNull()},bt.prototype.setLocation=function(){if(arguments.length===2){var t=arguments[0],e=arguments[1];this.elt[t].setLocation(V.ON,e)}else if(arguments.length===3){var r=arguments[0],i=arguments[1],s=arguments[2];this.elt[r].setLocation(i,s)}},bt.prototype.isEqualOnSide=function(t,e){return this.elt[0].isEqualOnSide(t.elt[0],e)&&this.elt[1].isEqualOnSide(t.elt[1],e)},bt.prototype.allPositionsEqual=function(t,e){return this.elt[t].allPositionsEqual(e)},bt.prototype.toLine=function(t){this.elt[t].isArea()&&(this.elt[t]=new xt(this.elt[t].location[0]))},bt.prototype.interfaces_=function(){return[]},bt.prototype.getClass=function(){return bt},bt.toLineLabel=function(t){for(var e=new bt(R.NONE),r=0;r<2;r++)e.setLocation(r,t.getLocation(r));return e};var Jt=function(){this._startDe=null,this._maxNodeDegree=-1,this._edges=new z,this._pts=new z,this._label=new bt(R.NONE),this._ring=null,this._isHole=null,this._shell=null,this._holes=new z,this._geometryFactory=null;var t=arguments[0],e=arguments[1];this._geometryFactory=e,this.computePoints(t),this.computeRing()};Jt.prototype.computeRing=function(){var t=this;if(this._ring!==null)return null;for(var e=new Array(this._pts.size()).fill(null),r=0;r<this._pts.size();r++)e[r]=t._pts.get(r);this._ring=this._geometryFactory.createLinearRing(e),this._isHole=G.isCCW(this._ring.getCoordinates())},Jt.prototype.isIsolated=function(){return this._label.getGeometryCount()===1},Jt.prototype.computePoints=function(t){var e=this;this._startDe=t;var r=t,i=!0;do{if(r===null)throw new Zn("Found null DirectedEdge");if(r.getEdgeRing()===e)throw new Zn("Directed Edge visited twice during ring-building at "+r.getCoordinate());e._edges.add(r);var s=r.getLabel();ut.isTrue(s.isArea()),e.mergeLabel(s),e.addPoints(r.getEdge(),r.isForward(),i),i=!1,e.setEdgeRing(r,e),r=e.getNext(r)}while(r!==this._startDe)},Jt.prototype.getLinearRing=function(){return this._ring},Jt.prototype.getCoordinate=function(t){return this._pts.get(t)},Jt.prototype.computeMaxNodeDegree=function(){var t=this;this._maxNodeDegree=0;var e=this._startDe;do{var r=e.getNode(),i=r.getEdges().getOutgoingDegree(t);i>t._maxNodeDegree&&(t._maxNodeDegree=i),e=t.getNext(e)}while(e!==this._startDe);this._maxNodeDegree*=2},Jt.prototype.addPoints=function(t,e,r){var i=this,s=t.getCoordinates();if(e){var o=1;r&&(o=0);for(var a=o;a<s.length;a++)i._pts.add(s[a])}else{var u=s.length-2;r&&(u=s.length-1);for(var l=u;l>=0;l--)i._pts.add(s[l])}},Jt.prototype.isHole=function(){return this._isHole},Jt.prototype.setInResult=function(){var t=this._startDe;do t.getEdge().setInResult(!0),t=t.getNext();while(t!==this._startDe)},Jt.prototype.containsPoint=function(t){var e=this.getLinearRing(),r=e.getEnvelopeInternal();if(!r.contains(t)||!G.isPointInRing(t,e.getCoordinates()))return!1;for(var i=this._holes.iterator();i.hasNext();){var s=i.next();if(s.containsPoint(t))return!1}return!0},Jt.prototype.addHole=function(t){this._holes.add(t)},Jt.prototype.isShell=function(){return this._shell===null},Jt.prototype.getLabel=function(){return this._label},Jt.prototype.getEdges=function(){return this._edges},Jt.prototype.getMaxNodeDegree=function(){return this._maxNodeDegree<0&&this.computeMaxNodeDegree(),this._maxNodeDegree},Jt.prototype.getShell=function(){return this._shell},Jt.prototype.mergeLabel=function(){if(arguments.length===1){var t=arguments[0];this.mergeLabel(t,0),this.mergeLabel(t,1)}else if(arguments.length===2){var e=arguments[0],r=arguments[1],i=e.getLocation(r,V.RIGHT);if(i===R.NONE)return null;if(this._label.getLocation(r)===R.NONE)return this._label.setLocation(r,i),null}},Jt.prototype.setShell=function(t){this._shell=t,t!==null&&t.addHole(this)},Jt.prototype.toPolygon=function(t){for(var e=this,r=new Array(this._holes.size()).fill(null),i=0;i<this._holes.size();i++)r[i]=e._holes.get(i).getLinearRing();var s=t.createPolygon(this.getLinearRing(),r);return s},Jt.prototype.interfaces_=function(){return[]},Jt.prototype.getClass=function(){return Jt};var ev=function(n){function t(){var e=arguments[0],r=arguments[1];n.call(this,e,r)}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.setEdgeRing=function(r,i){r.setMinEdgeRing(i)},t.prototype.getNext=function(r){return r.getNextMin()},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t}(Jt),rv=function(n){function t(){var e=arguments[0],r=arguments[1];n.call(this,e,r)}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.buildMinimalRings=function(){var r=this,i=new z,s=this._startDe;do{if(s.getMinEdgeRing()===null){var o=new ev(s,r._geometryFactory);i.add(o)}s=s.getNext()}while(s!==this._startDe);return i},t.prototype.setEdgeRing=function(r,i){r.setEdgeRing(i)},t.prototype.linkDirectedEdgesForMinimalEdgeRings=function(){var r=this,i=this._startDe;do{var s=i.getNode();s.getEdges().linkMinimalDirectedEdges(r),i=i.getNext()}while(i!==this._startDe)},t.prototype.getNext=function(r){return r.getNext()},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t}(Jt),tr=function(){if(this._label=null,this._isInResult=!1,this._isCovered=!1,this._isCoveredSet=!1,this._isVisited=!1,arguments.length!==0){if(arguments.length===1){var t=arguments[0];this._label=t}}};tr.prototype.setVisited=function(t){this._isVisited=t},tr.prototype.setInResult=function(t){this._isInResult=t},tr.prototype.isCovered=function(){return this._isCovered},tr.prototype.isCoveredSet=function(){return this._isCoveredSet},tr.prototype.setLabel=function(t){this._label=t},tr.prototype.getLabel=function(){return this._label},tr.prototype.setCovered=function(t){this._isCovered=t,this._isCoveredSet=!0},tr.prototype.updateIM=function(t){ut.isTrue(this._label.getGeometryCount()>=2,"found partial label"),this.computeIM(t)},tr.prototype.isInResult=function(){return this._isInResult},tr.prototype.isVisited=function(){return this._isVisited},tr.prototype.interfaces_=function(){return[]},tr.prototype.getClass=function(){return tr};var bu=function(n){function t(){n.call(this),this._coord=null,this._edges=null;var e=arguments[0],r=arguments[1];this._coord=e,this._edges=r,this._label=new bt(0,R.NONE)}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.isIncidentEdgeInResult=function(){for(var r=this.getEdges().getEdges().iterator();r.hasNext();){var i=r.next();if(i.getEdge().isInResult())return!0}return!1},t.prototype.isIsolated=function(){return this._label.getGeometryCount()===1},t.prototype.getCoordinate=function(){return this._coord},t.prototype.print=function(r){r.println("node "+this._coord+" lbl: "+this._label)},t.prototype.computeIM=function(r){},t.prototype.computeMergedLocation=function(r,i){var s=R.NONE;if(s=this._label.getLocation(i),!r.isNull(i)){var o=r.getLocation(i);s!==R.BOUNDARY&&(s=o)}return s},t.prototype.setLabel=function(){if(arguments.length===2){var r=arguments[0],i=arguments[1];this._label===null?this._label=new bt(r,i):this._label.setLocation(r,i)}else return n.prototype.setLabel.apply(this,arguments)},t.prototype.getEdges=function(){return this._edges},t.prototype.mergeLabel=function(){var r=this;if(arguments[0]instanceof t){var i=arguments[0];this.mergeLabel(i._label)}else if(arguments[0]instanceof bt)for(var s=arguments[0],o=0;o<2;o++){var a=r.computeMergedLocation(s,o),u=r._label.getLocation(o);u===R.NONE&&r._label.setLocation(o,a)}},t.prototype.add=function(r){this._edges.insert(r),r.setNode(this)},t.prototype.setLabelBoundary=function(r){if(this._label===null)return null;var i=R.NONE;this._label!==null&&(i=this._label.getLocation(r));var s=null;switch(i){case R.BOUNDARY:s=R.INTERIOR;break;case R.INTERIOR:s=R.BOUNDARY;break;default:s=R.BOUNDARY;break}this._label.setLocation(r,s)},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t}(tr),Jr=function(){this.nodeMap=new me,this.nodeFact=null;var t=arguments[0];this.nodeFact=t};Jr.prototype.find=function(t){return this.nodeMap.get(t)},Jr.prototype.addNode=function(){if(arguments[0]instanceof D){var t=arguments[0],e=this.nodeMap.get(t);return e===null&&(e=this.nodeFact.createNode(t),this.nodeMap.put(t,e)),e}else if(arguments[0]instanceof bu){var r=arguments[0],i=this.nodeMap.get(r.getCoordinate());return i===null?(this.nodeMap.put(r.getCoordinate(),r),r):(i.mergeLabel(r),i)}},Jr.prototype.print=function(t){for(var e=this.iterator();e.hasNext();){var r=e.next();r.print(t)}},Jr.prototype.iterator=function(){return this.nodeMap.values().iterator()},Jr.prototype.values=function(){return this.nodeMap.values()},Jr.prototype.getBoundaryNodes=function(t){for(var e=new z,r=this.iterator();r.hasNext();){var i=r.next();i.getLabel().getLocation(t)===R.BOUNDARY&&e.add(i)}return e},Jr.prototype.add=function(t){var e=t.getCoordinate(),r=this.addNode(e);r.add(t)},Jr.prototype.interfaces_=function(){return[]},Jr.prototype.getClass=function(){return Jr};var Ot=function(){},Oa={NE:{configurable:!0},NW:{configurable:!0},SW:{configurable:!0},SE:{configurable:!0}};Ot.prototype.interfaces_=function(){return[]},Ot.prototype.getClass=function(){return Ot},Ot.isNorthern=function(t){return t===Ot.NE||t===Ot.NW},Ot.isOpposite=function(t,e){if(t===e)return!1;var r=(t-e+4)%4;return r===2},Ot.commonHalfPlane=function(t,e){if(t===e)return t;var r=(t-e+4)%4;if(r===2)return-1;var i=t<e?t:e,s=t>e?t:e;return i===0&&s===3?3:i},Ot.isInHalfPlane=function(t,e){return e===Ot.SE?t===Ot.SE||t===Ot.SW:t===e||t===e+1},Ot.quadrant=function(){if(typeof arguments[0]=="number"&&typeof arguments[1]=="number"){var t=arguments[0],e=arguments[1];if(t===0&&e===0)throw new Ft("Cannot compute the quadrant for point ( "+t+", "+e+" )");return t>=0?e>=0?Ot.NE:Ot.SE:e>=0?Ot.NW:Ot.SW}else if(arguments[0]instanceof D&&arguments[1]instanceof D){var r=arguments[0],i=arguments[1];if(i.x===r.x&&i.y===r.y)throw new Ft("Cannot compute the quadrant for two identical points "+r);return i.x>=r.x?i.y>=r.y?Ot.NE:Ot.SE:i.y>=r.y?Ot.NW:Ot.SW}},Oa.NE.get=function(){return 0},Oa.NW.get=function(){return 1},Oa.SW.get=function(){return 2},Oa.SE.get=function(){return 3},Object.defineProperties(Ot,Oa);var ve=function(){if(this._edge=null,this._label=null,this._node=null,this._p0=null,this._p1=null,this._dx=null,this._dy=null,this._quadrant=null,arguments.length===1){var t=arguments[0];this._edge=t}else if(arguments.length===3){var e=arguments[0],r=arguments[1],i=arguments[2],s=null;this._edge=e,this.init(r,i),this._label=s}else if(arguments.length===4){var o=arguments[0],a=arguments[1],u=arguments[2],l=arguments[3];this._edge=o,this.init(a,u),this._label=l}};ve.prototype.compareDirection=function(t){return this._dx===t._dx&&this._dy===t._dy?0:this._quadrant>t._quadrant?1:this._quadrant<t._quadrant?-1:G.computeOrientation(t._p0,t._p1,this._p1)},ve.prototype.getDy=function(){return this._dy},ve.prototype.getCoordinate=function(){return this._p0},ve.prototype.setNode=function(t){this._node=t},ve.prototype.print=function(t){var e=Math.atan2(this._dy,this._dx),r=this.getClass().getName(),i=r.lastIndexOf("."),s=r.substring(i+1);t.print(" "+s+": "+this._p0+" - "+this._p1+" "+this._quadrant+":"+e+" "+this._label)},ve.prototype.compareTo=function(t){var e=t;return this.compareDirection(e)},ve.prototype.getDirectedCoordinate=function(){return this._p1},ve.prototype.getDx=function(){return this._dx},ve.prototype.getLabel=function(){return this._label},ve.prototype.getEdge=function(){return this._edge},ve.prototype.getQuadrant=function(){return this._quadrant},ve.prototype.getNode=function(){return this._node},ve.prototype.toString=function(){var t=Math.atan2(this._dy,this._dx),e=this.getClass().getName(),r=e.lastIndexOf("."),i=e.substring(r+1);return" "+i+": "+this._p0+" - "+this._p1+" "+this._quadrant+":"+t+" "+this._label},ve.prototype.computeLabel=function(t){},ve.prototype.init=function(t,e){this._p0=t,this._p1=e,this._dx=e.x-t.x,this._dy=e.y-t.y,this._quadrant=Ot.quadrant(this._dx,this._dy),ut.isTrue(!(this._dx===0&&this._dy===0),"EdgeEnd with identical endpoints found")},ve.prototype.interfaces_=function(){return[ur]},ve.prototype.getClass=function(){return ve};var Rl=function(n){function t(){var e=arguments[0],r=arguments[1];if(n.call(this,e),this._isForward=null,this._isInResult=!1,this._isVisited=!1,this._sym=null,this._next=null,this._nextMin=null,this._edgeRing=null,this._minEdgeRing=null,this._depth=[0,-999,-999],this._isForward=r,r)this.init(e.getCoordinate(0),e.getCoordinate(1));else{var i=e.getNumPoints()-1;this.init(e.getCoordinate(i),e.getCoordinate(i-1))}this.computeDirectedLabel()}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.getNextMin=function(){return this._nextMin},t.prototype.getDepth=function(r){return this._depth[r]},t.prototype.setVisited=function(r){this._isVisited=r},t.prototype.computeDirectedLabel=function(){this._label=new bt(this._edge.getLabel()),this._isForward||this._label.flip()},t.prototype.getNext=function(){return this._next},t.prototype.setDepth=function(r,i){if(this._depth[r]!==-999&&this._depth[r]!==i)throw new Zn("assigned depths do not match",this.getCoordinate());this._depth[r]=i},t.prototype.isInteriorAreaEdge=function(){for(var r=this,i=!0,s=0;s<2;s++)r._label.isArea(s)&&r._label.getLocation(s,V.LEFT)===R.INTERIOR&&r._label.getLocation(s,V.RIGHT)===R.INTERIOR||(i=!1);return i},t.prototype.setNextMin=function(r){this._nextMin=r},t.prototype.print=function(r){n.prototype.print.call(this,r),r.print(" "+this._depth[V.LEFT]+"/"+this._depth[V.RIGHT]),r.print(" ("+this.getDepthDelta()+")"),this._isInResult&&r.print(" inResult")},t.prototype.setMinEdgeRing=function(r){this._minEdgeRing=r},t.prototype.isLineEdge=function(){var r=this._label.isLine(0)||this._label.isLine(1),i=!this._label.isArea(0)||this._label.allPositionsEqual(0,R.EXTERIOR),s=!this._label.isArea(1)||this._label.allPositionsEqual(1,R.EXTERIOR);return r&&i&&s},t.prototype.setEdgeRing=function(r){this._edgeRing=r},t.prototype.getMinEdgeRing=function(){return this._minEdgeRing},t.prototype.getDepthDelta=function(){var r=this._edge.getDepthDelta();return this._isForward||(r=-r),r},t.prototype.setInResult=function(r){this._isInResult=r},t.prototype.getSym=function(){return this._sym},t.prototype.isForward=function(){return this._isForward},t.prototype.getEdge=function(){return this._edge},t.prototype.printEdge=function(r){this.print(r),r.print(" "),this._isForward?this._edge.print(r):this._edge.printReverse(r)},t.prototype.setSym=function(r){this._sym=r},t.prototype.setVisitedEdge=function(r){this.setVisited(r),this._sym.setVisited(r)},t.prototype.setEdgeDepths=function(r,i){var s=this.getEdge().getDepthDelta();this._isForward||(s=-s);var o=1;r===V.LEFT&&(o=-1);var a=V.opposite(r),u=s*o,l=i+u;this.setDepth(r,i),this.setDepth(a,l)},t.prototype.getEdgeRing=function(){return this._edgeRing},t.prototype.isInResult=function(){return this._isInResult},t.prototype.setNext=function(r){this._next=r},t.prototype.isVisited=function(){return this._isVisited},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t.depthFactor=function(r,i){return r===R.EXTERIOR&&i===R.INTERIOR?1:r===R.INTERIOR&&i===R.EXTERIOR?-1:0},t}(ve),vo=function(){};vo.prototype.createNode=function(t){return new bu(t,null)},vo.prototype.interfaces_=function(){return[]},vo.prototype.getClass=function(){return vo};var Ut=function(){if(this._edges=new z,this._nodes=null,this._edgeEndList=new z,arguments.length===0)this._nodes=new Jr(new vo);else if(arguments.length===1){var t=arguments[0];this._nodes=new Jr(t)}};Ut.prototype.printEdges=function(t){var e=this;t.println("Edges:");for(var r=0;r<this._edges.size();r++){t.println("edge "+r+":");var i=e._edges.get(r);i.print(t),i.eiList.print(t)}},Ut.prototype.find=function(t){return this._nodes.find(t)},Ut.prototype.addNode=function(){if(arguments[0]instanceof bu){var t=arguments[0];return this._nodes.addNode(t)}else if(arguments[0]instanceof D){var e=arguments[0];return this._nodes.addNode(e)}},Ut.prototype.getNodeIterator=function(){return this._nodes.iterator()},Ut.prototype.linkResultDirectedEdges=function(){for(var t=this._nodes.iterator();t.hasNext();){var e=t.next();e.getEdges().linkResultDirectedEdges()}},Ut.prototype.debugPrintln=function(t){ue.out.println(t)},Ut.prototype.isBoundaryNode=function(t,e){var r=this._nodes.find(e);if(r===null)return!1;var i=r.getLabel();return i!==null&&i.getLocation(t)===R.BOUNDARY},Ut.prototype.linkAllDirectedEdges=function(){for(var t=this._nodes.iterator();t.hasNext();){var e=t.next();e.getEdges().linkAllDirectedEdges()}},Ut.prototype.matchInSameDirection=function(t,e,r,i){return t.equals(r)?G.computeOrientation(t,e,i)===G.COLLINEAR&&Ot.quadrant(t,e)===Ot.quadrant(r,i):!1},Ut.prototype.getEdgeEnds=function(){return this._edgeEndList},Ut.prototype.debugPrint=function(t){ue.out.print(t)},Ut.prototype.getEdgeIterator=function(){return this._edges.iterator()},Ut.prototype.findEdgeInSameDirection=function(t,e){for(var r=this,i=0;i<this._edges.size();i++){var s=r._edges.get(i),o=s.getCoordinates();if(r.matchInSameDirection(t,e,o[0],o[1])||r.matchInSameDirection(t,e,o[o.length-1],o[o.length-2]))return s}return null},Ut.prototype.insertEdge=function(t){this._edges.add(t)},Ut.prototype.findEdgeEnd=function(t){for(var e=this.getEdgeEnds().iterator();e.hasNext();){var r=e.next();if(r.getEdge()===t)return r}return null},Ut.prototype.addEdges=function(t){for(var e=this,r=t.iterator();r.hasNext();){var i=r.next();e._edges.add(i);var s=new Rl(i,!0),o=new Rl(i,!1);s.setSym(o),o.setSym(s),e.add(s),e.add(o)}},Ut.prototype.add=function(t){this._nodes.add(t),this._edgeEndList.add(t)},Ut.prototype.getNodes=function(){return this._nodes.values()},Ut.prototype.findEdge=function(t,e){for(var r=this,i=0;i<this._edges.size();i++){var s=r._edges.get(i),o=s.getCoordinates();if(t.equals(o[0])&&e.equals(o[1]))return s}return null},Ut.prototype.interfaces_=function(){return[]},Ut.prototype.getClass=function(){return Ut},Ut.linkResultDirectedEdges=function(t){for(var e=t.iterator();e.hasNext();){var r=e.next();r.getEdges().linkResultDirectedEdges()}};var Ge=function(){this._geometryFactory=null,this._shellList=new z;var t=arguments[0];this._geometryFactory=t};Ge.prototype.sortShellsAndHoles=function(t,e,r){for(var i=t.iterator();i.hasNext();){var s=i.next();s.isHole()?r.add(s):e.add(s)}},Ge.prototype.computePolygons=function(t){for(var e=this,r=new z,i=t.iterator();i.hasNext();){var s=i.next(),o=s.toPolygon(e._geometryFactory);r.add(o)}return r},Ge.prototype.placeFreeHoles=function(t,e){for(var r=this,i=e.iterator();i.hasNext();){var s=i.next();if(s.getShell()===null){var o=r.findEdgeRingContaining(s,t);if(o===null)throw new Zn("unable to assign hole to a shell",s.getCoordinate(0));s.setShell(o)}}},Ge.prototype.buildMinimalEdgeRings=function(t,e,r){for(var i=this,s=new z,o=t.iterator();o.hasNext();){var a=o.next();if(a.getMaxNodeDegree()>2){a.linkDirectedEdgesForMinimalEdgeRings();var u=a.buildMinimalRings(),l=i.findShell(u);l!==null?(i.placePolygonHoles(l,u),e.add(l)):r.addAll(u)}else s.add(a)}return s},Ge.prototype.containsPoint=function(t){for(var e=this._shellList.iterator();e.hasNext();){var r=e.next();if(r.containsPoint(t))return!0}return!1},Ge.prototype.buildMaximalEdgeRings=function(t){for(var e=this,r=new z,i=t.iterator();i.hasNext();){var s=i.next();if(s.isInResult()&&s.getLabel().isArea()&&s.getEdgeRing()===null){var o=new rv(s,e._geometryFactory);r.add(o),o.setInResult()}}return r},Ge.prototype.placePolygonHoles=function(t,e){for(var r=e.iterator();r.hasNext();){var i=r.next();i.isHole()&&i.setShell(t)}},Ge.prototype.getPolygons=function(){var t=this.computePolygons(this._shellList);return t},Ge.prototype.findEdgeRingContaining=function(t,e){for(var r=t.getLinearRing(),i=r.getEnvelopeInternal(),s=r.getCoordinateN(0),o=null,a=null,u=e.iterator();u.hasNext();){var l=u.next(),c=l.getLinearRing(),f=c.getEnvelopeInternal();o!==null&&(a=o.getLinearRing().getEnvelopeInternal());var p=!1;f.contains(i)&&G.isPointInRing(s,c.getCoordinates())&&(p=!0),p&&(o===null||a.contains(f))&&(o=l)}return o},Ge.prototype.findShell=function(t){for(var e=0,r=null,i=t.iterator();i.hasNext();){var s=i.next();s.isHole()||(r=s,e++)}return ut.isTrue(e<=1,"found two shells in MinimalEdgeRing list"),r},Ge.prototype.add=function(){if(arguments.length===1){var t=arguments[0];this.add(t.getEdgeEnds(),t.getNodes())}else if(arguments.length===2){var e=arguments[0],r=arguments[1];Ut.linkResultDirectedEdges(r);var i=this.buildMaximalEdgeRings(e),s=new z,o=this.buildMinimalEdgeRings(i,this._shellList,s);this.sortShellsAndHoles(o,this._shellList,s),this.placeFreeHoles(this._shellList,s)}},Ge.prototype.interfaces_=function(){return[]},Ge.prototype.getClass=function(){return Ge};var yo=function(){};yo.prototype.getBounds=function(){},yo.prototype.interfaces_=function(){return[]},yo.prototype.getClass=function(){return yo};var Dr=function(){this._bounds=null,this._item=null;var t=arguments[0],e=arguments[1];this._bounds=t,this._item=e};Dr.prototype.getItem=function(){return this._item},Dr.prototype.getBounds=function(){return this._bounds},Dr.prototype.interfaces_=function(){return[yo,lr]},Dr.prototype.getClass=function(){return Dr};var Kn=function(){this._size=null,this._items=null,this._size=0,this._items=new z,this._items.add(null)};Kn.prototype.poll=function(){if(this.isEmpty())return null;var t=this._items.get(1);return this._items.set(1,this._items.get(this._size)),this._size-=1,this.reorder(1),t},Kn.prototype.size=function(){return this._size},Kn.prototype.reorder=function(t){for(var e=this,r=null,i=this._items.get(t);t*2<=this._size&&(r=t*2,r!==e._size&&e._items.get(r+1).compareTo(e._items.get(r))<0&&r++,e._items.get(r).compareTo(i)<0);t=r)e._items.set(t,e._items.get(r));this._items.set(t,i)},Kn.prototype.clear=function(){this._size=0,this._items.clear()},Kn.prototype.isEmpty=function(){return this._size===0},Kn.prototype.add=function(t){var e=this;this._items.add(null),this._size+=1;var r=this._size;for(this._items.set(0,t);t.compareTo(this._items.get(Math.trunc(r/2)))<0;r/=2)e._items.set(r,e._items.get(Math.trunc(r/2)));this._items.set(r,t)},Kn.prototype.interfaces_=function(){return[]},Kn.prototype.getClass=function(){return Kn};var mi=function(){};mi.prototype.visitItem=function(t){},mi.prototype.interfaces_=function(){return[]},mi.prototype.getClass=function(){return mi};var Cs=function(){};Cs.prototype.insert=function(t,e){},Cs.prototype.remove=function(t,e){},Cs.prototype.query=function(){},Cs.prototype.interfaces_=function(){return[]},Cs.prototype.getClass=function(){return Cs};var jt=function(){if(this._childBoundables=new z,this._bounds=null,this._level=null,arguments.length!==0){if(arguments.length===1){var t=arguments[0];this._level=t}}},qf={serialVersionUID:{configurable:!0}};jt.prototype.getLevel=function(){return this._level},jt.prototype.size=function(){return this._childBoundables.size()},jt.prototype.getChildBoundables=function(){return this._childBoundables},jt.prototype.addChildBoundable=function(t){ut.isTrue(this._bounds===null),this._childBoundables.add(t)},jt.prototype.isEmpty=function(){return this._childBoundables.isEmpty()},jt.prototype.getBounds=function(){return this._bounds===null&&(this._bounds=this.computeBounds()),this._bounds},jt.prototype.interfaces_=function(){return[yo,lr]},jt.prototype.getClass=function(){return jt},qf.serialVersionUID.get=function(){return 6493722185909574e3},Object.defineProperties(jt,qf);var Mr=function(){};Mr.reverseOrder=function(){return{compare:function(e,r){return r.compareTo(e)}}},Mr.min=function(t){return Mr.sort(t),t.get(0)},Mr.sort=function(t,e){var r=t.toArray();e?zi.sort(r,e):zi.sort(r);for(var i=t.iterator(),s=0,o=r.length;s<o;s++)i.next(),i.set(r[s])},Mr.singletonList=function(t){var e=new z;return e.add(t),e};var Zt=function(){this._boundable1=null,this._boundable2=null,this._distance=null,this._itemDistance=null;var t=arguments[0],e=arguments[1],r=arguments[2];this._boundable1=t,this._boundable2=e,this._itemDistance=r,this._distance=this.distance()};Zt.prototype.expandToQueue=function(t,e){var r=Zt.isComposite(this._boundable1),i=Zt.isComposite(this._boundable2);if(r&&i)return Zt.area(this._boundable1)>Zt.area(this._boundable2)?(this.expand(this._boundable1,this._boundable2,t,e),null):(this.expand(this._boundable2,this._boundable1,t,e),null);if(r)return this.expand(this._boundable1,this._boundable2,t,e),null;if(i)return this.expand(this._boundable2,this._boundable1,t,e),null;throw new Ft("neither boundable is composite")},Zt.prototype.isLeaves=function(){return!(Zt.isComposite(this._boundable1)||Zt.isComposite(this._boundable2))},Zt.prototype.compareTo=function(t){var e=t;return this._distance<e._distance?-1:this._distance>e._distance?1:0},Zt.prototype.expand=function(t,e,r,i){for(var s=this,o=t.getChildBoundables(),a=o.iterator();a.hasNext();){var u=a.next(),l=new Zt(u,e,s._itemDistance);l.getDistance()<i&&r.add(l)}},Zt.prototype.getBoundable=function(t){return t===0?this._boundable1:this._boundable2},Zt.prototype.getDistance=function(){return this._distance},Zt.prototype.distance=function(){return this.isLeaves()?this._itemDistance.distance(this._boundable1,this._boundable2):this._boundable1.getBounds().distance(this._boundable2.getBounds())},Zt.prototype.interfaces_=function(){return[ur]},Zt.prototype.getClass=function(){return Zt},Zt.area=function(t){return t.getBounds().getArea()},Zt.isComposite=function(t){return t instanceof jt};var ne=function n(){if(this._root=null,this._built=!1,this._itemBoundables=new z,this._nodeCapacity=null,arguments.length===0){var t=n.DEFAULT_NODE_CAPACITY;this._nodeCapacity=t}else if(arguments.length===1){var e=arguments[0];ut.isTrue(e>1,"Node capacity must be greater than 1"),this._nodeCapacity=e}},Tu={IntersectsOp:{configurable:!0},serialVersionUID:{configurable:!0},DEFAULT_NODE_CAPACITY:{configurable:!0}};ne.prototype.getNodeCapacity=function(){return this._nodeCapacity},ne.prototype.lastNode=function(t){return t.get(t.size()-1)},ne.prototype.size=function(){var t=this;if(arguments.length===0)return this.isEmpty()?0:(this.build(),this.size(this._root));if(arguments.length===1){for(var e=arguments[0],r=0,i=e.getChildBoundables().iterator();i.hasNext();){var s=i.next();s instanceof jt?r+=t.size(s):s instanceof Dr&&(r+=1)}return r}},ne.prototype.removeItem=function(t,e){for(var r=null,i=t.getChildBoundables().iterator();i.hasNext();){var s=i.next();s instanceof Dr&&s.getItem()===e&&(r=s)}return r!==null?(t.getChildBoundables().remove(r),!0):!1},ne.prototype.itemsTree=function(){var t=this;if(arguments.length===0){this.build();var e=this.itemsTree(this._root);return e===null?new z:e}else if(arguments.length===1){for(var r=arguments[0],i=new z,s=r.getChildBoundables().iterator();s.hasNext();){var o=s.next();if(o instanceof jt){var a=t.itemsTree(o);a!==null&&i.add(a)}else o instanceof Dr?i.add(o.getItem()):ut.shouldNeverReachHere()}return i.size()<=0?null:i}},ne.prototype.insert=function(t,e){ut.isTrue(!this._built,"Cannot insert items into an STR packed R-tree after it has been built."),this._itemBoundables.add(new Dr(t,e))},ne.prototype.boundablesAtLevel=function(){var t=this;if(arguments.length===1){var e=arguments[0],r=new z;return this.boundablesAtLevel(e,this._root,r),r}else if(arguments.length===3){var i=arguments[0],s=arguments[1],o=arguments[2];if(ut.isTrue(i>-2),s.getLevel()===i)return o.add(s),null;for(var a=s.getChildBoundables().iterator();a.hasNext();){var u=a.next();u instanceof jt?t.boundablesAtLevel(i,u,o):(ut.isTrue(u instanceof Dr),i===-1&&o.add(u))}return null}},ne.prototype.query=function(){var t=this;if(arguments.length===1){var e=arguments[0];this.build();var r=new z;return this.isEmpty()||this.getIntersectsOp().intersects(this._root.getBounds(),e)&&this.query(e,this._root,r),r}else if(arguments.length===2){var i=arguments[0],s=arguments[1];if(this.build(),this.isEmpty())return null;this.getIntersectsOp().intersects(this._root.getBounds(),i)&&this.query(i,this._root,s)}else if(arguments.length===3){if(et(arguments[2],mi)&&arguments[0]instanceof Object&&arguments[1]instanceof jt)for(var o=arguments[0],a=arguments[1],u=arguments[2],l=a.getChildBoundables(),c=0;c<l.size();c++){var f=l.get(c);t.getIntersectsOp().intersects(f.getBounds(),o)&&(f instanceof jt?t.query(o,f,u):f instanceof Dr?u.visitItem(f.getItem()):ut.shouldNeverReachHere())}else if(et(arguments[2],br)&&arguments[0]instanceof Object&&arguments[1]instanceof jt)for(var p=arguments[0],v=arguments[1],w=arguments[2],I=v.getChildBoundables(),P=0;P<I.size();P++){var M=I.get(P);t.getIntersectsOp().intersects(M.getBounds(),p)&&(M instanceof jt?t.query(p,M,w):M instanceof Dr?w.add(M.getItem()):ut.shouldNeverReachHere())}}},ne.prototype.build=function(){if(this._built)return null;this._root=this._itemBoundables.isEmpty()?this.createNode(0):this.createHigherLevels(this._itemBoundables,-1),this._itemBoundables=null,this._built=!0},ne.prototype.getRoot=function(){return this.build(),this._root},ne.prototype.remove=function(){var t=this;if(arguments.length===2){var e=arguments[0],r=arguments[1];return this.build(),this.getIntersectsOp().intersects(this._root.getBounds(),e)?this.remove(e,this._root,r):!1}else if(arguments.length===3){var i=arguments[0],s=arguments[1],o=arguments[2],a=this.removeItem(s,o);if(a)return!0;for(var u=null,l=s.getChildBoundables().iterator();l.hasNext();){var c=l.next();if(t.getIntersectsOp().intersects(c.getBounds(),i)&&c instanceof jt&&(a=t.remove(i,c,o),a)){u=c;break}}return u!==null&&u.getChildBoundables().isEmpty()&&s.getChildBoundables().remove(u),a}},ne.prototype.createHigherLevels=function(t,e){ut.isTrue(!t.isEmpty());var r=this.createParentBoundables(t,e+1);return r.size()===1?r.get(0):this.createHigherLevels(r,e+1)},ne.prototype.depth=function(){var t=this;if(arguments.length===0)return this.isEmpty()?0:(this.build(),this.depth(this._root));if(arguments.length===1){for(var e=arguments[0],r=0,i=e.getChildBoundables().iterator();i.hasNext();){var s=i.next();if(s instanceof jt){var o=t.depth(s);o>r&&(r=o)}}return r+1}},ne.prototype.createParentBoundables=function(t,e){var r=this;ut.isTrue(!t.isEmpty());var i=new z;i.add(this.createNode(e));var s=new z(t);Mr.sort(s,this.getComparator());for(var o=s.iterator();o.hasNext();){var a=o.next();r.lastNode(i).getChildBoundables().size()===r.getNodeCapacity()&&i.add(r.createNode(e)),r.lastNode(i).addChildBoundable(a)}return i},ne.prototype.isEmpty=function(){return this._built?this._root.isEmpty():this._itemBoundables.isEmpty()},ne.prototype.interfaces_=function(){return[lr]},ne.prototype.getClass=function(){return ne},ne.compareDoubles=function(t,e){return t>e?1:t<e?-1:0},Tu.IntersectsOp.get=function(){return nv},Tu.serialVersionUID.get=function(){return-3886435814360241e3},Tu.DEFAULT_NODE_CAPACITY.get=function(){return 10},Object.defineProperties(ne,Tu);var nv=function(){},_o=function(){};_o.prototype.distance=function(t,e){},_o.prototype.interfaces_=function(){return[]},_o.prototype.getClass=function(){return _o};var Xf=function(n){function t(r){r=r||t.DEFAULT_NODE_CAPACITY,n.call(this,r)}n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t;var e={STRtreeNode:{configurable:!0},serialVersionUID:{configurable:!0},xComparator:{configurable:!0},yComparator:{configurable:!0},intersectsOp:{configurable:!0},DEFAULT_NODE_CAPACITY:{configurable:!0}};return t.prototype.createParentBoundablesFromVerticalSlices=function(i,s){var o=this;ut.isTrue(i.length>0);for(var a=new z,u=0;u<i.length;u++)a.addAll(o.createParentBoundablesFromVerticalSlice(i[u],s));return a},t.prototype.createNode=function(i){return new Yf(i)},t.prototype.size=function(){return arguments.length===0?n.prototype.size.call(this):n.prototype.size.apply(this,arguments)},t.prototype.insert=function(){if(arguments.length===2){var i=arguments[0],s=arguments[1];if(i.isNull())return null;n.prototype.insert.call(this,i,s)}else return n.prototype.insert.apply(this,arguments)},t.prototype.getIntersectsOp=function(){return t.intersectsOp},t.prototype.verticalSlices=function(i,s){for(var o=Math.trunc(Math.ceil(i.size()/s)),a=new Array(s).fill(null),u=i.iterator(),l=0;l<s;l++){a[l]=new z;for(var c=0;u.hasNext()&&c<o;){var f=u.next();a[l].add(f),c++}}return a},t.prototype.query=function(){if(arguments.length===1){var i=arguments[0];return n.prototype.query.call(this,i)}else if(arguments.length===2){var s=arguments[0],o=arguments[1];n.prototype.query.call(this,s,o)}else if(arguments.length===3){if(et(arguments[2],mi)&&arguments[0]instanceof Object&&arguments[1]instanceof jt){var a=arguments[0],u=arguments[1],l=arguments[2];n.prototype.query.call(this,a,u,l)}else if(et(arguments[2],br)&&arguments[0]instanceof Object&&arguments[1]instanceof jt){var c=arguments[0],f=arguments[1],p=arguments[2];n.prototype.query.call(this,c,f,p)}}},t.prototype.getComparator=function(){return t.yComparator},t.prototype.createParentBoundablesFromVerticalSlice=function(i,s){return n.prototype.createParentBoundables.call(this,i,s)},t.prototype.remove=function(){if(arguments.length===2){var i=arguments[0],s=arguments[1];return n.prototype.remove.call(this,i,s)}else return n.prototype.remove.apply(this,arguments)},t.prototype.depth=function(){return arguments.length===0?n.prototype.depth.call(this):n.prototype.depth.apply(this,arguments)},t.prototype.createParentBoundables=function(i,s){ut.isTrue(!i.isEmpty());var o=Math.trunc(Math.ceil(i.size()/this.getNodeCapacity())),a=new z(i);Mr.sort(a,t.xComparator);var u=this.verticalSlices(a,Math.trunc(Math.ceil(Math.sqrt(o))));return this.createParentBoundablesFromVerticalSlices(u,s)},t.prototype.nearestNeighbour=function(){if(arguments.length===1){if(et(arguments[0],_o)){var i=arguments[0],s=new Zt(this.getRoot(),this.getRoot(),i);return this.nearestNeighbour(s)}else if(arguments[0]instanceof Zt){var o=arguments[0];return this.nearestNeighbour(o,it.POSITIVE_INFINITY)}}else if(arguments.length===2){if(arguments[0]instanceof t&&et(arguments[1],_o)){var a=arguments[0],u=arguments[1],l=new Zt(this.getRoot(),a.getRoot(),u);return this.nearestNeighbour(l)}else if(arguments[0]instanceof Zt&&typeof arguments[1]=="number"){var c=arguments[0],f=arguments[1],p=f,v=null,w=new Kn;for(w.add(c);!w.isEmpty()&&p>0;){var I=w.poll(),P=I.getDistance();if(P>=p)break;I.isLeaves()?(p=P,v=I):I.expandToQueue(w,p)}return[v.getBoundable(0).getItem(),v.getBoundable(1).getItem()]}}else if(arguments.length===3){var M=arguments[0],m=arguments[1],_=arguments[2],g=new Dr(M,m),y=new Zt(this.getRoot(),g,_);return this.nearestNeighbour(y)[0]}},t.prototype.interfaces_=function(){return[Cs,lr]},t.prototype.getClass=function(){return t},t.centreX=function(i){return t.avg(i.getMinX(),i.getMaxX())},t.avg=function(i,s){return(i+s)/2},t.centreY=function(i){return t.avg(i.getMinY(),i.getMaxY())},e.STRtreeNode.get=function(){return Yf},e.serialVersionUID.get=function(){return 0x39920f7d5f261e0},e.xComparator.get=function(){return{interfaces_:function(){return[io]},compare:function(r,i){return n.compareDoubles(t.centreX(r.getBounds()),t.centreX(i.getBounds()))}}},e.yComparator.get=function(){return{interfaces_:function(){return[io]},compare:function(r,i){return n.compareDoubles(t.centreY(r.getBounds()),t.centreY(i.getBounds()))}}},e.intersectsOp.get=function(){return{interfaces_:function(){return[n.IntersectsOp]},intersects:function(r,i){return r.intersects(i)}}},e.DEFAULT_NODE_CAPACITY.get=function(){return 10},Object.defineProperties(t,e),t}(ne),Yf=function(n){function t(){var e=arguments[0];n.call(this,e)}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.computeBounds=function(){for(var r=null,i=this.getChildBoundables().iterator();i.hasNext();){var s=i.next();r===null?r=new J(s.getBounds()):r.expandToInclude(s.getBounds())}return r},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t}(jt),xe=function(){};xe.prototype.interfaces_=function(){return[]},xe.prototype.getClass=function(){return xe},xe.relativeSign=function(t,e){return t<e?-1:t>e?1:0},xe.compare=function(t,e,r){if(e.equals2D(r))return 0;var i=xe.relativeSign(e.x,r.x),s=xe.relativeSign(e.y,r.y);switch(t){case 0:return xe.compareValue(i,s);case 1:return xe.compareValue(s,i);case 2:return xe.compareValue(s,-i);case 3:return xe.compareValue(-i,s);case 4:return xe.compareValue(-i,-s);case 5:return xe.compareValue(-s,-i);case 6:return xe.compareValue(-s,i);case 7:return xe.compareValue(i,-s)}return ut.shouldNeverReachHere("invalid octant value"),0},xe.compareValue=function(t,e){return t<0?-1:t>0?1:e<0?-1:e>0?1:0};var vi=function(){this._segString=null,this.coord=null,this.segmentIndex=null,this._segmentOctant=null,this._isInterior=null;var t=arguments[0],e=arguments[1],r=arguments[2],i=arguments[3];this._segString=t,this.coord=new D(e),this.segmentIndex=r,this._segmentOctant=i,this._isInterior=!e.equals2D(t.getCoordinate(r))};vi.prototype.getCoordinate=function(){return this.coord},vi.prototype.print=function(t){t.print(this.coord),t.print(" seg # = "+this.segmentIndex)},vi.prototype.compareTo=function(t){var e=t;return this.segmentIndex<e.segmentIndex?-1:this.segmentIndex>e.segmentIndex?1:this.coord.equals2D(e.coord)?0:xe.compare(this._segmentOctant,this.coord,e.coord)},vi.prototype.isEndPoint=function(t){return this.segmentIndex===0&&!this._isInterior||this.segmentIndex===t},vi.prototype.isInterior=function(){return this._isInterior},vi.prototype.interfaces_=function(){return[ur]},vi.prototype.getClass=function(){return vi};var Ce=function(){this._nodeMap=new me,this._edge=null;var t=arguments[0];this._edge=t};Ce.prototype.getSplitCoordinates=function(){var t=this,e=new Ea;this.addEndpoints();for(var r=this.iterator(),i=r.next();r.hasNext();){var s=r.next();t.addEdgeCoordinates(i,s,e),i=s}return e.toCoordinateArray()},Ce.prototype.addCollapsedNodes=function(){var t=this,e=new z;this.findCollapsesFromInsertedNodes(e),this.findCollapsesFromExistingVertices(e);for(var r=e.iterator();r.hasNext();){var i=r.next().intValue();t.add(t._edge.getCoordinate(i),i)}},Ce.prototype.print=function(t){t.println("Intersections:");for(var e=this.iterator();e.hasNext();){var r=e.next();r.print(t)}},Ce.prototype.findCollapsesFromExistingVertices=function(t){for(var e=this,r=0;r<this._edge.size()-2;r++){var i=e._edge.getCoordinate(r),s=e._edge.getCoordinate(r+2);i.equals2D(s)&&t.add(new Vr(r+1))}},Ce.prototype.addEdgeCoordinates=function(t,e,r){var i=this,s=this._edge.getCoordinate(e.segmentIndex),o=e.isInterior()||!e.coord.equals2D(s);r.add(new D(t.coord),!1);for(var a=t.segmentIndex+1;a<=e.segmentIndex;a++)r.add(i._edge.getCoordinate(a));o&&r.add(new D(e.coord))},Ce.prototype.iterator=function(){return this._nodeMap.values().iterator()},Ce.prototype.addSplitEdges=function(t){var e=this;this.addEndpoints(),this.addCollapsedNodes();for(var r=this.iterator(),i=r.next();r.hasNext();){var s=r.next(),o=e.createSplitEdge(i,s);t.add(o),i=s}},Ce.prototype.findCollapseIndex=function(t,e,r){if(!t.coord.equals2D(e.coord))return!1;var i=e.segmentIndex-t.segmentIndex;return e.isInterior()||i--,i===1?(r[0]=t.segmentIndex+1,!0):!1},Ce.prototype.findCollapsesFromInsertedNodes=function(t){for(var e=this,r=new Array(1).fill(null),i=this.iterator(),s=i.next();i.hasNext();){var o=i.next(),a=e.findCollapseIndex(s,o,r);a&&t.add(new Vr(r[0])),s=o}},Ce.prototype.getEdge=function(){return this._edge},Ce.prototype.addEndpoints=function(){var t=this._edge.size()-1;this.add(this._edge.getCoordinate(0),0),this.add(this._edge.getCoordinate(t),t)},Ce.prototype.createSplitEdge=function(t,e){var r=this,i=e.segmentIndex-t.segmentIndex+2,s=this._edge.getCoordinate(e.segmentIndex),o=e.isInterior()||!e.coord.equals2D(s);o||i--;var a=new Array(i).fill(null),u=0;a[u++]=new D(t.coord);for(var l=t.segmentIndex+1;l<=e.segmentIndex;l++)a[u++]=r._edge.getCoordinate(l);return o&&(a[u]=new D(e.coord)),new Yt(a,this._edge.getData())},Ce.prototype.add=function(t,e){var r=new vi(this._edge,t,e,this._edge.getSegmentOctant(e)),i=this._nodeMap.get(r);return i!==null?(ut.isTrue(i.coord.equals2D(t),"Found equal nodes with different coordinates"),i):(this._nodeMap.put(r,r),r)},Ce.prototype.checkSplitEdgesCorrectness=function(t){var e=this._edge.getCoordinates(),r=t.get(0),i=r.getCoordinate(0);if(!i.equals2D(e[0]))throw new Wn("bad split edge start point at "+i);var s=t.get(t.size()-1),o=s.getCoordinates(),a=o[o.length-1];if(!a.equals2D(e[e.length-1]))throw new Wn("bad split edge end point at "+a)},Ce.prototype.interfaces_=function(){return[]},Ce.prototype.getClass=function(){return Ce};var Is=function(){};Is.prototype.interfaces_=function(){return[]},Is.prototype.getClass=function(){return Is},Is.octant=function(){if(typeof arguments[0]=="number"&&typeof arguments[1]=="number"){var t=arguments[0],e=arguments[1];if(t===0&&e===0)throw new Ft("Cannot compute the octant for point ( "+t+", "+e+" )");var r=Math.abs(t),i=Math.abs(e);return t>=0?e>=0?r>=i?0:1:r>=i?7:6:e>=0?r>=i?3:2:r>=i?4:5}else if(arguments[0]instanceof D&&arguments[1]instanceof D){var s=arguments[0],o=arguments[1],a=o.x-s.x,u=o.y-s.y;if(a===0&&u===0)throw new Ft("Cannot compute the octant for two identical points "+s);return Is.octant(a,u)}};var En=function(){};En.prototype.getCoordinates=function(){},En.prototype.size=function(){},En.prototype.getCoordinate=function(t){},En.prototype.isClosed=function(){},En.prototype.setData=function(t){},En.prototype.getData=function(){},En.prototype.interfaces_=function(){return[]},En.prototype.getClass=function(){return En};var Da=function(){};Da.prototype.addIntersection=function(t,e){},Da.prototype.interfaces_=function(){return[En]},Da.prototype.getClass=function(){return Da};var Yt=function(){this._nodeList=new Ce(this),this._pts=null,this._data=null;var t=arguments[0],e=arguments[1];this._pts=t,this._data=e};Yt.prototype.getCoordinates=function(){return this._pts},Yt.prototype.size=function(){return this._pts.length},Yt.prototype.getCoordinate=function(t){return this._pts[t]},Yt.prototype.isClosed=function(){return this._pts[0].equals(this._pts[this._pts.length-1])},Yt.prototype.getSegmentOctant=function(t){return t===this._pts.length-1?-1:this.safeOctant(this.getCoordinate(t),this.getCoordinate(t+1))},Yt.prototype.setData=function(t){this._data=t},Yt.prototype.safeOctant=function(t,e){return t.equals2D(e)?0:Is.octant(t,e)},Yt.prototype.getData=function(){return this._data},Yt.prototype.addIntersection=function(){if(arguments.length===2){var t=arguments[0],e=arguments[1];this.addIntersectionNode(t,e)}else if(arguments.length===4){var r=arguments[0],i=arguments[1],s=arguments[3],o=new D(r.getIntersection(s));this.addIntersection(o,i)}},Yt.prototype.toString=function(){return Nr.toLineString(new Xt(this._pts))},Yt.prototype.getNodeList=function(){return this._nodeList},Yt.prototype.addIntersectionNode=function(t,e){var r=e,i=r+1;if(i<this._pts.length){var s=this._pts[i];t.equals2D(s)&&(r=i)}var o=this._nodeList.add(t,r);return o},Yt.prototype.addIntersections=function(t,e,r){for(var i=this,s=0;s<t.getIntersectionNum();s++)i.addIntersection(t,e,r,s)},Yt.prototype.interfaces_=function(){return[Da]},Yt.prototype.getClass=function(){return Yt},Yt.getNodedSubstrings=function(){if(arguments.length===1){var t=arguments[0],e=new z;return Yt.getNodedSubstrings(t,e),e}else if(arguments.length===2)for(var r=arguments[0],i=arguments[1],s=r.iterator();s.hasNext();){var o=s.next();o.getNodeList().addSplitEdges(i)}};var Z=function(){if(this.p0=null,this.p1=null,arguments.length===0)this.p0=new D,this.p1=new D;else if(arguments.length===1){var t=arguments[0];this.p0=new D(t.p0),this.p1=new D(t.p1)}else if(arguments.length===2)this.p0=arguments[0],this.p1=arguments[1];else if(arguments.length===4){var e=arguments[0],r=arguments[1],i=arguments[2],s=arguments[3];this.p0=new D(e,r),this.p1=new D(i,s)}},Hf={serialVersionUID:{configurable:!0}};Z.prototype.minX=function(){return Math.min(this.p0.x,this.p1.x)},Z.prototype.orientationIndex=function(){if(arguments[0]instanceof Z){var t=arguments[0],e=G.orientationIndex(this.p0,this.p1,t.p0),r=G.orientationIndex(this.p0,this.p1,t.p1);return e>=0&&r>=0||e<=0&&r<=0?Math.max(e,r):0}else if(arguments[0]instanceof D){var i=arguments[0];return G.orientationIndex(this.p0,this.p1,i)}},Z.prototype.toGeometry=function(t){return t.createLineString([this.p0,this.p1])},Z.prototype.isVertical=function(){return this.p0.x===this.p1.x},Z.prototype.equals=function(t){if(!(t instanceof Z))return!1;var e=t;return this.p0.equals(e.p0)&&this.p1.equals(e.p1)},Z.prototype.intersection=function(t){var e=new ki;return e.computeIntersection(this.p0,this.p1,t.p0,t.p1),e.hasIntersection()?e.getIntersection(0):null},Z.prototype.project=function(){if(arguments[0]instanceof D){var t=arguments[0];if(t.equals(this.p0)||t.equals(this.p1))return new D(t);var e=this.projectionFactor(t),r=new D;return r.x=this.p0.x+e*(this.p1.x-this.p0.x),r.y=this.p0.y+e*(this.p1.y-this.p0.y),r}else if(arguments[0]instanceof Z){var i=arguments[0],s=this.projectionFactor(i.p0),o=this.projectionFactor(i.p1);if(s>=1&&o>=1||s<=0&&o<=0)return null;var a=this.project(i.p0);s<0&&(a=this.p0),s>1&&(a=this.p1);var u=this.project(i.p1);return o<0&&(u=this.p0),o>1&&(u=this.p1),new Z(a,u)}},Z.prototype.normalize=function(){this.p1.compareTo(this.p0)<0&&this.reverse()},Z.prototype.angle=function(){return Math.atan2(this.p1.y-this.p0.y,this.p1.x-this.p0.x)},Z.prototype.getCoordinate=function(t){return t===0?this.p0:this.p1},Z.prototype.distancePerpendicular=function(t){return G.distancePointLinePerpendicular(t,this.p0,this.p1)},Z.prototype.minY=function(){return Math.min(this.p0.y,this.p1.y)},Z.prototype.midPoint=function(){return Z.midPoint(this.p0,this.p1)},Z.prototype.projectionFactor=function(t){if(t.equals(this.p0))return 0;if(t.equals(this.p1))return 1;var e=this.p1.x-this.p0.x,r=this.p1.y-this.p0.y,i=e*e+r*r;if(i<=0)return it.NaN;var s=((t.x-this.p0.x)*e+(t.y-this.p0.y)*r)/i;return s},Z.prototype.closestPoints=function(t){var e=this.intersection(t);if(e!==null)return[e,e];var r=new Array(2).fill(null),i=it.MAX_VALUE,s=null,o=this.closestPoint(t.p0);i=o.distance(t.p0),r[0]=o,r[1]=t.p0;var a=this.closestPoint(t.p1);s=a.distance(t.p1),s<i&&(i=s,r[0]=a,r[1]=t.p1);var u=t.closestPoint(this.p0);s=u.distance(this.p0),s<i&&(i=s,r[0]=this.p0,r[1]=u);var l=t.closestPoint(this.p1);return s=l.distance(this.p1),s<i&&(i=s,r[0]=this.p1,r[1]=l),r},Z.prototype.closestPoint=function(t){var e=this.projectionFactor(t);if(e>0&&e<1)return this.project(t);var r=this.p0.distance(t),i=this.p1.distance(t);return r<i?this.p0:this.p1},Z.prototype.maxX=function(){return Math.max(this.p0.x,this.p1.x)},Z.prototype.getLength=function(){return this.p0.distance(this.p1)},Z.prototype.compareTo=function(t){var e=t,r=this.p0.compareTo(e.p0);return r!==0?r:this.p1.compareTo(e.p1)},Z.prototype.reverse=function(){var t=this.p0;this.p0=this.p1,this.p1=t},Z.prototype.equalsTopo=function(t){return this.p0.equals(t.p0)&&(this.p1.equals(t.p1)||this.p0.equals(t.p1))&&this.p1.equals(t.p0)},Z.prototype.lineIntersection=function(t){try{var e=Pr.intersection(this.p0,this.p1,t.p0,t.p1);return e}catch(r){if(!(r instanceof oo))throw r}finally{}return null},Z.prototype.maxY=function(){return Math.max(this.p0.y,this.p1.y)},Z.prototype.pointAlongOffset=function(t,e){var r=this.p0.x+t*(this.p1.x-this.p0.x),i=this.p0.y+t*(this.p1.y-this.p0.y),s=this.p1.x-this.p0.x,o=this.p1.y-this.p0.y,a=Math.sqrt(s*s+o*o),u=0,l=0;if(e!==0){if(a<=0)throw new Error("Cannot compute offset from zero-length line segment");u=e*s/a,l=e*o/a}var c=r-l,f=i+u,p=new D(c,f);return p},Z.prototype.setCoordinates=function(){if(arguments.length===1){var t=arguments[0];this.setCoordinates(t.p0,t.p1)}else if(arguments.length===2){var e=arguments[0],r=arguments[1];this.p0.x=e.x,this.p0.y=e.y,this.p1.x=r.x,this.p1.y=r.y}},Z.prototype.segmentFraction=function(t){var e=this.projectionFactor(t);return e<0?e=0:(e>1||it.isNaN(e))&&(e=1),e},Z.prototype.toString=function(){return"LINESTRING( "+this.p0.x+" "+this.p0.y+", "+this.p1.x+" "+this.p1.y+")"},Z.prototype.isHorizontal=function(){return this.p0.y===this.p1.y},Z.prototype.distance=function(){if(arguments[0]instanceof Z){var t=arguments[0];return G.distanceLineLine(this.p0,this.p1,t.p0,t.p1)}else if(arguments[0]instanceof D){var e=arguments[0];return G.distancePointLine(e,this.p0,this.p1)}},Z.prototype.pointAlong=function(t){var e=new D;return e.x=this.p0.x+t*(this.p1.x-this.p0.x),e.y=this.p0.y+t*(this.p1.y-this.p0.y),e},Z.prototype.hashCode=function(){var t=it.doubleToLongBits(this.p0.x);t^=it.doubleToLongBits(this.p0.y)*31;var e=Math.trunc(t)^Math.trunc(t>>32),r=it.doubleToLongBits(this.p1.x);r^=it.doubleToLongBits(this.p1.y)*31;var i=Math.trunc(r)^Math.trunc(r>>32);return e^i},Z.prototype.interfaces_=function(){return[ur,lr]},Z.prototype.getClass=function(){return Z},Z.midPoint=function(t,e){return new D((t.x+e.x)/2,(t.y+e.y)/2)},Hf.serialVersionUID.get=function(){return 0x2d2172135f411c00},Object.defineProperties(Z,Hf);var Ma=function(){this.tempEnv1=new J,this.tempEnv2=new J,this._overlapSeg1=new Z,this._overlapSeg2=new Z};Ma.prototype.overlap=function(){if(arguments.length!==2){if(arguments.length===4){var t=arguments[0],e=arguments[1],r=arguments[2],i=arguments[3];t.getLineSegment(e,this._overlapSeg1),r.getLineSegment(i,this._overlapSeg2),this.overlap(this._overlapSeg1,this._overlapSeg2)}}},Ma.prototype.interfaces_=function(){return[]},Ma.prototype.getClass=function(){return Ma};var We=function(){this._pts=null,this._start=null,this._end=null,this._env=null,this._context=null,this._id=null;var t=arguments[0],e=arguments[1],r=arguments[2],i=arguments[3];this._pts=t,this._start=e,this._end=r,this._context=i};We.prototype.getLineSegment=function(t,e){e.p0=this._pts[t],e.p1=this._pts[t+1]},We.prototype.computeSelect=function(t,e,r,i){var s=this._pts[e],o=this._pts[r];if(i.tempEnv1.init(s,o),r-e===1)return i.select(this,e),null;if(!t.intersects(i.tempEnv1))return null;var a=Math.trunc((e+r)/2);e<a&&this.computeSelect(t,e,a,i),a<r&&this.computeSelect(t,a,r,i)},We.prototype.getCoordinates=function(){for(var t=this,e=new Array(this._end-this._start+1).fill(null),r=0,i=this._start;i<=this._end;i++)e[r++]=t._pts[i];return e},We.prototype.computeOverlaps=function(t,e){this.computeOverlapsInternal(this._start,this._end,t,t._start,t._end,e)},We.prototype.setId=function(t){this._id=t},We.prototype.select=function(t,e){this.computeSelect(t,this._start,this._end,e)},We.prototype.getEnvelope=function(){if(this._env===null){var t=this._pts[this._start],e=this._pts[this._end];this._env=new J(t,e)}return this._env},We.prototype.getEndIndex=function(){return this._end},We.prototype.getStartIndex=function(){return this._start},We.prototype.getContext=function(){return this._context},We.prototype.getId=function(){return this._id},We.prototype.computeOverlapsInternal=function(t,e,r,i,s,o){var a=this._pts[t],u=this._pts[e],l=r._pts[i],c=r._pts[s];if(e-t===1&&s-i===1)return o.overlap(this,t,r,i),null;if(o.tempEnv1.init(a,u),o.tempEnv2.init(l,c),!o.tempEnv1.intersects(o.tempEnv2))return null;var f=Math.trunc((t+e)/2),p=Math.trunc((i+s)/2);t<f&&(i<p&&this.computeOverlapsInternal(t,f,r,i,p,o),p<s&&this.computeOverlapsInternal(t,f,r,p,s,o)),f<e&&(i<p&&this.computeOverlapsInternal(f,e,r,i,p,o),p<s&&this.computeOverlapsInternal(f,e,r,p,s,o))},We.prototype.interfaces_=function(){return[]},We.prototype.getClass=function(){return We};var Zr=function(){};Zr.prototype.interfaces_=function(){return[]},Zr.prototype.getClass=function(){return Zr},Zr.getChainStartIndices=function(t){var e=0,r=new z;r.add(new Vr(e));do{var i=Zr.findChainEnd(t,e);r.add(new Vr(i)),e=i}while(e<t.length-1);var s=Zr.toIntArray(r);return s},Zr.findChainEnd=function(t,e){for(var r=e;r<t.length-1&&t[r].equals2D(t[r+1]);)r++;if(r>=t.length-1)return t.length-1;for(var i=Ot.quadrant(t[r],t[r+1]),s=e+1;s<t.length;){if(!t[s-1].equals2D(t[s])){var o=Ot.quadrant(t[s-1],t[s]);if(o!==i)break}s++}return s-1},Zr.getChains=function(){if(arguments.length===1){var t=arguments[0];return Zr.getChains(t,null)}else if(arguments.length===2){for(var e=arguments[0],r=arguments[1],i=new z,s=Zr.getChainStartIndices(e),o=0;o<s.length-1;o++){var a=new We(e,s[o],s[o+1],r);i.add(a)}return i}},Zr.toIntArray=function(t){for(var e=new Array(t.size()).fill(null),r=0;r<e.length;r++)e[r]=t.get(r).intValue();return e};var Gi=function(){};Gi.prototype.computeNodes=function(t){},Gi.prototype.getNodedSubstrings=function(){},Gi.prototype.interfaces_=function(){return[]},Gi.prototype.getClass=function(){return Gi};var xa=function(){if(this._segInt=null,arguments.length!==0){if(arguments.length===1){var t=arguments[0];this.setSegmentIntersector(t)}}};xa.prototype.setSegmentIntersector=function(t){this._segInt=t},xa.prototype.interfaces_=function(){return[Gi]},xa.prototype.getClass=function(){return xa};var Fl=function(n){function t(r){r?n.call(this,r):n.call(this),this._monoChains=new z,this._index=new Xf,this._idCounter=0,this._nodedSegStrings=null,this._nOverlaps=0}n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t;var e={SegmentOverlapAction:{configurable:!0}};return t.prototype.getMonotoneChains=function(){return this._monoChains},t.prototype.getNodedSubstrings=function(){return Yt.getNodedSubstrings(this._nodedSegStrings)},t.prototype.getIndex=function(){return this._index},t.prototype.add=function(i){for(var s=this,o=Zr.getChains(i.getCoordinates(),i),a=o.iterator();a.hasNext();){var u=a.next();u.setId(s._idCounter++),s._index.insert(u.getEnvelope(),u),s._monoChains.add(u)}},t.prototype.computeNodes=function(i){var s=this;this._nodedSegStrings=i;for(var o=i.iterator();o.hasNext();)s.add(o.next());this.intersectChains()},t.prototype.intersectChains=function(){for(var i=this,s=new Jf(this._segInt),o=this._monoChains.iterator();o.hasNext();)for(var a=o.next(),u=i._index.query(a.getEnvelope()),l=u.iterator();l.hasNext();){var c=l.next();if(c.getId()>a.getId()&&(a.computeOverlaps(c,s),i._nOverlaps++),i._segInt.isDone())return null}},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},e.SegmentOverlapAction.get=function(){return Jf},Object.defineProperties(t,e),t}(xa),Jf=function(n){function t(){n.call(this),this._si=null;var e=arguments[0];this._si=e}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.overlap=function(){if(arguments.length===4){var r=arguments[0],i=arguments[1],s=arguments[2],o=arguments[3],a=r.getContext(),u=s.getContext();this._si.processIntersections(a,i,u,o)}else return n.prototype.overlap.apply(this,arguments)},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t}(Ma),It=function n(){if(this._quadrantSegments=n.DEFAULT_QUADRANT_SEGMENTS,this._endCapStyle=n.CAP_ROUND,this._joinStyle=n.JOIN_ROUND,this._mitreLimit=n.DEFAULT_MITRE_LIMIT,this._isSingleSided=!1,this._simplifyFactor=n.DEFAULT_SIMPLIFY_FACTOR,arguments.length!==0){if(arguments.length===1){var t=arguments[0];this.setQuadrantSegments(t)}else if(arguments.length===2){var e=arguments[0],r=arguments[1];this.setQuadrantSegments(e),this.setEndCapStyle(r)}else if(arguments.length===4){var i=arguments[0],s=arguments[1],o=arguments[2],a=arguments[3];this.setQuadrantSegments(i),this.setEndCapStyle(s),this.setJoinStyle(o),this.setMitreLimit(a)}}},Qn={CAP_ROUND:{configurable:!0},CAP_FLAT:{configurable:!0},CAP_SQUARE:{configurable:!0},JOIN_ROUND:{configurable:!0},JOIN_MITRE:{configurable:!0},JOIN_BEVEL:{configurable:!0},DEFAULT_QUADRANT_SEGMENTS:{configurable:!0},DEFAULT_MITRE_LIMIT:{configurable:!0},DEFAULT_SIMPLIFY_FACTOR:{configurable:!0}};It.prototype.getEndCapStyle=function(){return this._endCapStyle},It.prototype.isSingleSided=function(){return this._isSingleSided},It.prototype.setQuadrantSegments=function(t){this._quadrantSegments=t,this._quadrantSegments===0&&(this._joinStyle=It.JOIN_BEVEL),this._quadrantSegments<0&&(this._joinStyle=It.JOIN_MITRE,this._mitreLimit=Math.abs(this._quadrantSegments)),t<=0&&(this._quadrantSegments=1),this._joinStyle!==It.JOIN_ROUND&&(this._quadrantSegments=It.DEFAULT_QUADRANT_SEGMENTS)},It.prototype.getJoinStyle=function(){return this._joinStyle},It.prototype.setJoinStyle=function(t){this._joinStyle=t},It.prototype.setSimplifyFactor=function(t){this._simplifyFactor=t<0?0:t},It.prototype.getSimplifyFactor=function(){return this._simplifyFactor},It.prototype.getQuadrantSegments=function(){return this._quadrantSegments},It.prototype.setEndCapStyle=function(t){this._endCapStyle=t},It.prototype.getMitreLimit=function(){return this._mitreLimit},It.prototype.setMitreLimit=function(t){this._mitreLimit=t},It.prototype.setSingleSided=function(t){this._isSingleSided=t},It.prototype.interfaces_=function(){return[]},It.prototype.getClass=function(){return It},It.bufferDistanceError=function(t){var e=Math.PI/2/t;return 1-Math.cos(e/2)},Qn.CAP_ROUND.get=function(){return 1},Qn.CAP_FLAT.get=function(){return 2},Qn.CAP_SQUARE.get=function(){return 3},Qn.JOIN_ROUND.get=function(){return 1},Qn.JOIN_MITRE.get=function(){return 2},Qn.JOIN_BEVEL.get=function(){return 3},Qn.DEFAULT_QUADRANT_SEGMENTS.get=function(){return 8},Qn.DEFAULT_MITRE_LIMIT.get=function(){return 5},Qn.DEFAULT_SIMPLIFY_FACTOR.get=function(){return .01},Object.defineProperties(It,Qn);var Wt=function(t){this._distanceTol=null,this._isDeleted=null,this._angleOrientation=G.COUNTERCLOCKWISE,this._inputLine=t||null},La={INIT:{configurable:!0},DELETE:{configurable:!0},KEEP:{configurable:!0},NUM_PTS_TO_CHECK:{configurable:!0}};Wt.prototype.isDeletable=function(t,e,r,i){var s=this._inputLine[t],o=this._inputLine[e],a=this._inputLine[r];return!this.isConcave(s,o,a)||!this.isShallow(s,o,a,i)?!1:this.isShallowSampled(s,o,t,r,i)},Wt.prototype.deleteShallowConcavities=function(){for(var t=this,e=1,r=this.findNextNonDeletedIndex(e),i=this.findNextNonDeletedIndex(r),s=!1;i<this._inputLine.length;){var o=!1;t.isDeletable(e,r,i,t._distanceTol)&&(t._isDeleted[r]=Wt.DELETE,o=!0,s=!0),o?e=i:e=r,r=t.findNextNonDeletedIndex(e),i=t.findNextNonDeletedIndex(r)}return s},Wt.prototype.isShallowConcavity=function(t,e,r,i){var s=G.computeOrientation(t,e,r),o=s===this._angleOrientation;if(!o)return!1;var a=G.distancePointLine(e,t,r);return a<i},Wt.prototype.isShallowSampled=function(t,e,r,i,s){var o=this,a=Math.trunc((i-r)/Wt.NUM_PTS_TO_CHECK);a<=0&&(a=1);for(var u=r;u<i;u+=a)if(!o.isShallow(t,e,o._inputLine[u],s))return!1;return!0},Wt.prototype.isConcave=function(t,e,r){var i=G.computeOrientation(t,e,r),s=i===this._angleOrientation;return s},Wt.prototype.simplify=function(t){var e=this;this._distanceTol=Math.abs(t),t<0&&(this._angleOrientation=G.CLOCKWISE),this._isDeleted=new Array(this._inputLine.length).fill(null);var r=!1;do r=e.deleteShallowConcavities();while(r);return this.collapseLine()},Wt.prototype.findNextNonDeletedIndex=function(t){for(var e=t+1;e<this._inputLine.length&&this._isDeleted[e]===Wt.DELETE;)e++;return e},Wt.prototype.isShallow=function(t,e,r,i){var s=G.distancePointLine(e,t,r);return s<i},Wt.prototype.collapseLine=function(){for(var t=this,e=new Ea,r=0;r<this._inputLine.length;r++)t._isDeleted[r]!==Wt.DELETE&&e.add(t._inputLine[r]);return e.toCoordinateArray()},Wt.prototype.interfaces_=function(){return[]},Wt.prototype.getClass=function(){return Wt},Wt.simplify=function(t,e){var r=new Wt(t);return r.simplify(e)},La.INIT.get=function(){return 0},La.DELETE.get=function(){return 1},La.KEEP.get=function(){return 1},La.NUM_PTS_TO_CHECK.get=function(){return 10},Object.defineProperties(Wt,La);var er=function(){this._ptList=null,this._precisionModel=null,this._minimimVertexDistance=0,this._ptList=new z},Zf={COORDINATE_ARRAY_TYPE:{configurable:!0}};er.prototype.getCoordinates=function(){var t=this._ptList.toArray(er.COORDINATE_ARRAY_TYPE);return t},er.prototype.setPrecisionModel=function(t){this._precisionModel=t},er.prototype.addPt=function(t){var e=new D(t);if(this._precisionModel.makePrecise(e),this.isRedundant(e))return null;this._ptList.add(e)},er.prototype.revere=function(){},er.prototype.addPts=function(t,e){var r=this;if(e)for(var i=0;i<t.length;i++)r.addPt(t[i]);else for(var s=t.length-1;s>=0;s--)r.addPt(t[s])},er.prototype.isRedundant=function(t){if(this._ptList.size()<1)return!1;var e=this._ptList.get(this._ptList.size()-1),r=t.distance(e);return r<this._minimimVertexDistance},er.prototype.toString=function(){var t=new ft,e=t.createLineString(this.getCoordinates());return e.toString()},er.prototype.closeRing=function(){if(this._ptList.size()<1)return null;var t=new D(this._ptList.get(0)),e=this._ptList.get(this._ptList.size()-1);if(t.equals(e))return null;this._ptList.add(t)},er.prototype.setMinimumVertexDistance=function(t){this._minimimVertexDistance=t},er.prototype.interfaces_=function(){return[]},er.prototype.getClass=function(){return er},Zf.COORDINATE_ARRAY_TYPE.get=function(){return new Array(0).fill(null)},Object.defineProperties(er,Zf);var gt=function(){},Ps={PI_TIMES_2:{configurable:!0},PI_OVER_2:{configurable:!0},PI_OVER_4:{configurable:!0},COUNTERCLOCKWISE:{configurable:!0},CLOCKWISE:{configurable:!0},NONE:{configurable:!0}};gt.prototype.interfaces_=function(){return[]},gt.prototype.getClass=function(){return gt},gt.toDegrees=function(t){return t*180/Math.PI},gt.normalize=function(t){for(;t>Math.PI;)t-=gt.PI_TIMES_2;for(;t<=-Math.PI;)t+=gt.PI_TIMES_2;return t},gt.angle=function(){if(arguments.length===1){var t=arguments[0];return Math.atan2(t.y,t.x)}else if(arguments.length===2){var e=arguments[0],r=arguments[1],i=r.x-e.x,s=r.y-e.y;return Math.atan2(s,i)}},gt.isAcute=function(t,e,r){var i=t.x-e.x,s=t.y-e.y,o=r.x-e.x,a=r.y-e.y,u=i*o+s*a;return u>0},gt.isObtuse=function(t,e,r){var i=t.x-e.x,s=t.y-e.y,o=r.x-e.x,a=r.y-e.y,u=i*o+s*a;return u<0},gt.interiorAngle=function(t,e,r){var i=gt.angle(e,t),s=gt.angle(e,r);return Math.abs(s-i)},gt.normalizePositive=function(t){if(t<0){for(;t<0;)t+=gt.PI_TIMES_2;t>=gt.PI_TIMES_2&&(t=0)}else{for(;t>=gt.PI_TIMES_2;)t-=gt.PI_TIMES_2;t<0&&(t=0)}return t},gt.angleBetween=function(t,e,r){var i=gt.angle(e,t),s=gt.angle(e,r);return gt.diff(i,s)},gt.diff=function(t,e){var r=null;return t<e?r=e-t:r=t-e,r>Math.PI&&(r=2*Math.PI-r),r},gt.toRadians=function(t){return t*Math.PI/180},gt.getTurn=function(t,e){var r=Math.sin(e-t);return r>0?gt.COUNTERCLOCKWISE:r<0?gt.CLOCKWISE:gt.NONE},gt.angleBetweenOriented=function(t,e,r){var i=gt.angle(e,t),s=gt.angle(e,r),o=s-i;return o<=-Math.PI?o+gt.PI_TIMES_2:o>Math.PI?o-gt.PI_TIMES_2:o},Ps.PI_TIMES_2.get=function(){return 2*Math.PI},Ps.PI_OVER_2.get=function(){return Math.PI/2},Ps.PI_OVER_4.get=function(){return Math.PI/4},Ps.COUNTERCLOCKWISE.get=function(){return G.COUNTERCLOCKWISE},Ps.CLOCKWISE.get=function(){return G.CLOCKWISE},Ps.NONE.get=function(){return G.COLLINEAR},Object.defineProperties(gt,Ps);var At=function n(){this._maxCurveSegmentError=0,this._filletAngleQuantum=null,this._closingSegLengthFactor=1,this._segList=null,this._distance=0,this._precisionModel=null,this._bufParams=null,this._li=null,this._s0=null,this._s1=null,this._s2=null,this._seg0=new Z,this._seg1=new Z,this._offset0=new Z,this._offset1=new Z,this._side=0,this._hasNarrowConcaveAngle=!1;var t=arguments[0],e=arguments[1],r=arguments[2];this._precisionModel=t,this._bufParams=e,this._li=new ki,this._filletAngleQuantum=Math.PI/2/e.getQuadrantSegments(),e.getQuadrantSegments()>=8&&e.getJoinStyle()===It.JOIN_ROUND&&(this._closingSegLengthFactor=n.MAX_CLOSING_SEG_LEN_FACTOR),this.init(r)},Aa={OFFSET_SEGMENT_SEPARATION_FACTOR:{configurable:!0},INSIDE_TURN_VERTEX_SNAP_DISTANCE_FACTOR:{configurable:!0},CURVE_VERTEX_SNAP_DISTANCE_FACTOR:{configurable:!0},MAX_CLOSING_SEG_LEN_FACTOR:{configurable:!0}};At.prototype.addNextSegment=function(t,e){if(this._s0=this._s1,this._s1=this._s2,this._s2=t,this._seg0.setCoordinates(this._s0,this._s1),this.computeOffsetSegment(this._seg0,this._side,this._distance,this._offset0),this._seg1.setCoordinates(this._s1,this._s2),this.computeOffsetSegment(this._seg1,this._side,this._distance,this._offset1),this._s1.equals(this._s2))return null;var r=G.computeOrientation(this._s0,this._s1,this._s2),i=r===G.CLOCKWISE&&this._side===V.LEFT||r===G.COUNTERCLOCKWISE&&this._side===V.RIGHT;r===0?this.addCollinear(e):i?this.addOutsideTurn(r,e):this.addInsideTurn(r,e)},At.prototype.addLineEndCap=function(t,e){var r=new Z(t,e),i=new Z;this.computeOffsetSegment(r,V.LEFT,this._distance,i);var s=new Z;this.computeOffsetSegment(r,V.RIGHT,this._distance,s);var o=e.x-t.x,a=e.y-t.y,u=Math.atan2(a,o);switch(this._bufParams.getEndCapStyle()){case It.CAP_ROUND:this._segList.addPt(i.p1),this.addFilletArc(e,u+Math.PI/2,u-Math.PI/2,G.CLOCKWISE,this._distance),this._segList.addPt(s.p1);break;case It.CAP_FLAT:this._segList.addPt(i.p1),this._segList.addPt(s.p1);break;case It.CAP_SQUARE:var l=new D;l.x=Math.abs(this._distance)*Math.cos(u),l.y=Math.abs(this._distance)*Math.sin(u);var c=new D(i.p1.x+l.x,i.p1.y+l.y),f=new D(s.p1.x+l.x,s.p1.y+l.y);this._segList.addPt(c),this._segList.addPt(f);break}},At.prototype.getCoordinates=function(){var t=this._segList.getCoordinates();return t},At.prototype.addMitreJoin=function(t,e,r,i){var s=!0,o=null;try{o=Pr.intersection(e.p0,e.p1,r.p0,r.p1);var a=i<=0?1:o.distance(t)/Math.abs(i);a>this._bufParams.getMitreLimit()&&(s=!1)}catch(u){if(u instanceof oo)o=new D(0,0),s=!1;else throw u}finally{}s?this._segList.addPt(o):this.addLimitedMitreJoin(e,r,i,this._bufParams.getMitreLimit())},At.prototype.addFilletCorner=function(t,e,r,i,s){var o=e.x-t.x,a=e.y-t.y,u=Math.atan2(a,o),l=r.x-t.x,c=r.y-t.y,f=Math.atan2(c,l);i===G.CLOCKWISE?u<=f&&(u+=2*Math.PI):u>=f&&(u-=2*Math.PI),this._segList.addPt(e),this.addFilletArc(t,u,f,i,s),this._segList.addPt(r)},At.prototype.addOutsideTurn=function(t,e){if(this._offset0.p1.distance(this._offset1.p0)<this._distance*At.OFFSET_SEGMENT_SEPARATION_FACTOR)return this._segList.addPt(this._offset0.p1),null;this._bufParams.getJoinStyle()===It.JOIN_MITRE?this.addMitreJoin(this._s1,this._offset0,this._offset1,this._distance):this._bufParams.getJoinStyle()===It.JOIN_BEVEL?this.addBevelJoin(this._offset0,this._offset1):(e&&this._segList.addPt(this._offset0.p1),this.addFilletCorner(this._s1,this._offset0.p1,this._offset1.p0,t,this._distance),this._segList.addPt(this._offset1.p0))},At.prototype.createSquare=function(t){this._segList.addPt(new D(t.x+this._distance,t.y+this._distance)),this._segList.addPt(new D(t.x+this._distance,t.y-this._distance)),this._segList.addPt(new D(t.x-this._distance,t.y-this._distance)),this._segList.addPt(new D(t.x-this._distance,t.y+this._distance)),this._segList.closeRing()},At.prototype.addSegments=function(t,e){this._segList.addPts(t,e)},At.prototype.addFirstSegment=function(){this._segList.addPt(this._offset1.p0)},At.prototype.addLastSegment=function(){this._segList.addPt(this._offset1.p1)},At.prototype.initSideSegments=function(t,e,r){this._s1=t,this._s2=e,this._side=r,this._seg1.setCoordinates(t,e),this.computeOffsetSegment(this._seg1,r,this._distance,this._offset1)},At.prototype.addLimitedMitreJoin=function(t,e,r,i){var s=this._seg0.p1,o=gt.angle(s,this._seg0.p0),a=gt.angleBetweenOriented(this._seg0.p0,s,this._seg1.p1),u=a/2,l=gt.normalize(o+u),c=gt.normalize(l+Math.PI),f=i*r,p=f*Math.abs(Math.sin(u)),v=r-p,w=s.x+f*Math.cos(c),I=s.y+f*Math.sin(c),P=new D(w,I),M=new Z(s,P),m=M.pointAlongOffset(1,v),_=M.pointAlongOffset(1,-v);this._side===V.LEFT?(this._segList.addPt(m),this._segList.addPt(_)):(this._segList.addPt(_),this._segList.addPt(m))},At.prototype.computeOffsetSegment=function(t,e,r,i){var s=e===V.LEFT?1:-1,o=t.p1.x-t.p0.x,a=t.p1.y-t.p0.y,u=Math.sqrt(o*o+a*a),l=s*r*o/u,c=s*r*a/u;i.p0.x=t.p0.x-c,i.p0.y=t.p0.y+l,i.p1.x=t.p1.x-c,i.p1.y=t.p1.y+l},At.prototype.addFilletArc=function(t,e,r,i,s){var o=this,a=i===G.CLOCKWISE?-1:1,u=Math.abs(e-r),l=Math.trunc(u/this._filletAngleQuantum+.5);if(l<1)return null;for(var c=0,f=u/l,p=c,v=new D;p<u;){var w=e+a*p;v.x=t.x+s*Math.cos(w),v.y=t.y+s*Math.sin(w),o._segList.addPt(v),p+=f}},At.prototype.addInsideTurn=function(t,e){if(this._li.computeIntersection(this._offset0.p0,this._offset0.p1,this._offset1.p0,this._offset1.p1),this._li.hasIntersection())this._segList.addPt(this._li.getIntersection(0));else if(this._hasNarrowConcaveAngle=!0,this._offset0.p1.distance(this._offset1.p0)<this._distance*At.INSIDE_TURN_VERTEX_SNAP_DISTANCE_FACTOR)this._segList.addPt(this._offset0.p1);else{if(this._segList.addPt(this._offset0.p1),this._closingSegLengthFactor>0){var r=new D((this._closingSegLengthFactor*this._offset0.p1.x+this._s1.x)/(this._closingSegLengthFactor+1),(this._closingSegLengthFactor*this._offset0.p1.y+this._s1.y)/(this._closingSegLengthFactor+1));this._segList.addPt(r);var i=new D((this._closingSegLengthFactor*this._offset1.p0.x+this._s1.x)/(this._closingSegLengthFactor+1),(this._closingSegLengthFactor*this._offset1.p0.y+this._s1.y)/(this._closingSegLengthFactor+1));this._segList.addPt(i)}else this._segList.addPt(this._s1);this._segList.addPt(this._offset1.p0)}},At.prototype.createCircle=function(t){var e=new D(t.x+this._distance,t.y);this._segList.addPt(e),this.addFilletArc(t,0,2*Math.PI,-1,this._distance),this._segList.closeRing()},At.prototype.addBevelJoin=function(t,e){this._segList.addPt(t.p1),this._segList.addPt(e.p0)},At.prototype.init=function(t){this._distance=t,this._maxCurveSegmentError=t*(1-Math.cos(this._filletAngleQuantum/2)),this._segList=new er,this._segList.setPrecisionModel(this._precisionModel),this._segList.setMinimumVertexDistance(t*At.CURVE_VERTEX_SNAP_DISTANCE_FACTOR)},At.prototype.addCollinear=function(t){this._li.computeIntersection(this._s0,this._s1,this._s1,this._s2);var e=this._li.getIntersectionNum();e>=2&&(this._bufParams.getJoinStyle()===It.JOIN_BEVEL||this._bufParams.getJoinStyle()===It.JOIN_MITRE?(t&&this._segList.addPt(this._offset0.p1),this._segList.addPt(this._offset1.p0)):this.addFilletCorner(this._s1,this._offset0.p1,this._offset1.p0,G.CLOCKWISE,this._distance))},At.prototype.closeRing=function(){this._segList.closeRing()},At.prototype.hasNarrowConcaveAngle=function(){return this._hasNarrowConcaveAngle},At.prototype.interfaces_=function(){return[]},At.prototype.getClass=function(){return At},Aa.OFFSET_SEGMENT_SEPARATION_FACTOR.get=function(){return .001},Aa.INSIDE_TURN_VERTEX_SNAP_DISTANCE_FACTOR.get=function(){return .001},Aa.CURVE_VERTEX_SNAP_DISTANCE_FACTOR.get=function(){return 1e-6},Aa.MAX_CLOSING_SEG_LEN_FACTOR.get=function(){return 80},Object.defineProperties(At,Aa);var Le=function(){this._distance=0,this._precisionModel=null,this._bufParams=null;var t=arguments[0],e=arguments[1];this._precisionModel=t,this._bufParams=e};Le.prototype.getOffsetCurve=function(t,e){if(this._distance=e,e===0)return null;var r=e<0,i=Math.abs(e),s=this.getSegGen(i);t.length<=1?this.computePointCurve(t[0],s):this.computeOffsetCurve(t,r,s);var o=s.getCoordinates();return r&&ht.reverse(o),o},Le.prototype.computeSingleSidedBufferCurve=function(t,e,r){var i=this.simplifyTolerance(this._distance);if(e){r.addSegments(t,!0);var s=Wt.simplify(t,-i),o=s.length-1;r.initSideSegments(s[o],s[o-1],V.LEFT),r.addFirstSegment();for(var a=o-2;a>=0;a--)r.addNextSegment(s[a],!0)}else{r.addSegments(t,!1);var u=Wt.simplify(t,i),l=u.length-1;r.initSideSegments(u[0],u[1],V.LEFT),r.addFirstSegment();for(var c=2;c<=l;c++)r.addNextSegment(u[c],!0)}r.addLastSegment(),r.closeRing()},Le.prototype.computeRingBufferCurve=function(t,e,r){var i=this.simplifyTolerance(this._distance);e===V.RIGHT&&(i=-i);var s=Wt.simplify(t,i),o=s.length-1;r.initSideSegments(s[o-1],s[0],e);for(var a=1;a<=o;a++){var u=a!==1;r.addNextSegment(s[a],u)}r.closeRing()},Le.prototype.computeLineBufferCurve=function(t,e){var r=this.simplifyTolerance(this._distance),i=Wt.simplify(t,r),s=i.length-1;e.initSideSegments(i[0],i[1],V.LEFT);for(var o=2;o<=s;o++)e.addNextSegment(i[o],!0);e.addLastSegment(),e.addLineEndCap(i[s-1],i[s]);var a=Wt.simplify(t,-r),u=a.length-1;e.initSideSegments(a[u],a[u-1],V.LEFT);for(var l=u-2;l>=0;l--)e.addNextSegment(a[l],!0);e.addLastSegment(),e.addLineEndCap(a[1],a[0]),e.closeRing()},Le.prototype.computePointCurve=function(t,e){switch(this._bufParams.getEndCapStyle()){case It.CAP_ROUND:e.createCircle(t);break;case It.CAP_SQUARE:e.createSquare(t);break}},Le.prototype.getLineCurve=function(t,e){if(this._distance=e,e<0&&!this._bufParams.isSingleSided()||e===0)return null;var r=Math.abs(e),i=this.getSegGen(r);if(t.length<=1)this.computePointCurve(t[0],i);else if(this._bufParams.isSingleSided()){var s=e<0;this.computeSingleSidedBufferCurve(t,s,i)}else this.computeLineBufferCurve(t,i);var o=i.getCoordinates();return o},Le.prototype.getBufferParameters=function(){return this._bufParams},Le.prototype.simplifyTolerance=function(t){return t*this._bufParams.getSimplifyFactor()},Le.prototype.getRingCurve=function(t,e,r){if(this._distance=r,t.length<=2)return this.getLineCurve(t,r);if(r===0)return Le.copyCoordinates(t);var i=this.getSegGen(r);return this.computeRingBufferCurve(t,e,i),i.getCoordinates()},Le.prototype.computeOffsetCurve=function(t,e,r){var i=this.simplifyTolerance(this._distance);if(e){var s=Wt.simplify(t,-i),o=s.length-1;r.initSideSegments(s[o],s[o-1],V.LEFT),r.addFirstSegment();for(var a=o-2;a>=0;a--)r.addNextSegment(s[a],!0)}else{var u=Wt.simplify(t,i),l=u.length-1;r.initSideSegments(u[0],u[1],V.LEFT),r.addFirstSegment();for(var c=2;c<=l;c++)r.addNextSegment(u[c],!0)}r.addLastSegment()},Le.prototype.getSegGen=function(t){return new At(this._precisionModel,this._bufParams,t)},Le.prototype.interfaces_=function(){return[]},Le.prototype.getClass=function(){return Le},Le.copyCoordinates=function(t){for(var e=new Array(t.length).fill(null),r=0;r<e.length;r++)e[r]=new D(t[r]);return e};var Ns=function(){this._subgraphs=null,this._seg=new Z,this._cga=new G;var t=arguments[0];this._subgraphs=t},Kf={DepthSegment:{configurable:!0}};Ns.prototype.findStabbedSegments=function(){var t=this;if(arguments.length===1){for(var e=arguments[0],r=new z,i=this._subgraphs.iterator();i.hasNext();){var s=i.next(),o=s.getEnvelope();e.y<o.getMinY()||e.y>o.getMaxY()||t.findStabbedSegments(e,s.getDirectedEdges(),r)}return r}else if(arguments.length===3){if(et(arguments[2],br)&&arguments[0]instanceof D&&arguments[1]instanceof Rl)for(var a=arguments[0],u=arguments[1],l=arguments[2],c=u.getEdge().getCoordinates(),f=0;f<c.length-1;f++){t._seg.p0=c[f],t._seg.p1=c[f+1],t._seg.p0.y>t._seg.p1.y&&t._seg.reverse();var p=Math.max(t._seg.p0.x,t._seg.p1.x);if(!(p<a.x)&&!t._seg.isHorizontal()&&!(a.y<t._seg.p0.y||a.y>t._seg.p1.y)&&G.computeOrientation(t._seg.p0,t._seg.p1,a)!==G.RIGHT){var v=u.getDepth(V.LEFT);t._seg.p0.equals(c[f])||(v=u.getDepth(V.RIGHT));var w=new Wi(t._seg,v);l.add(w)}}else if(et(arguments[2],br)&&arguments[0]instanceof D&&et(arguments[1],br))for(var I=arguments[0],P=arguments[1],M=arguments[2],m=P.iterator();m.hasNext();){var _=m.next();_.isForward()&&t.findStabbedSegments(I,_,M)}}},Ns.prototype.getDepth=function(t){var e=this.findStabbedSegments(t);if(e.size()===0)return 0;var r=Mr.min(e);return r._leftDepth},Ns.prototype.interfaces_=function(){return[]},Ns.prototype.getClass=function(){return Ns},Kf.DepthSegment.get=function(){return Wi},Object.defineProperties(Ns,Kf);var Wi=function(){this._upwardSeg=null,this._leftDepth=null;var t=arguments[0],e=arguments[1];this._upwardSeg=new Z(t),this._leftDepth=e};Wi.prototype.compareTo=function(t){var e=t;if(this._upwardSeg.minX()>=e._upwardSeg.maxX())return 1;if(this._upwardSeg.maxX()<=e._upwardSeg.minX())return-1;var r=this._upwardSeg.orientationIndex(e._upwardSeg);return r!==0||(r=-1*e._upwardSeg.orientationIndex(this._upwardSeg),r!==0)?r:this._upwardSeg.compareTo(e._upwardSeg)},Wi.prototype.compareX=function(t,e){var r=t.p0.compareTo(e.p0);return r!==0?r:t.p1.compareTo(e.p1)},Wi.prototype.toString=function(){return this._upwardSeg.toString()},Wi.prototype.interfaces_=function(){return[ur]},Wi.prototype.getClass=function(){return Wi};var Pt=function(t,e,r){this.p0=t||null,this.p1=e||null,this.p2=r||null};Pt.prototype.area=function(){return Pt.area(this.p0,this.p1,this.p2)},Pt.prototype.signedArea=function(){return Pt.signedArea(this.p0,this.p1,this.p2)},Pt.prototype.interpolateZ=function(t){if(t===null)throw new Ft("Supplied point is null.");return Pt.interpolateZ(t,this.p0,this.p1,this.p2)},Pt.prototype.longestSideLength=function(){return Pt.longestSideLength(this.p0,this.p1,this.p2)},Pt.prototype.isAcute=function(){return Pt.isAcute(this.p0,this.p1,this.p2)},Pt.prototype.circumcentre=function(){return Pt.circumcentre(this.p0,this.p1,this.p2)},Pt.prototype.area3D=function(){return Pt.area3D(this.p0,this.p1,this.p2)},Pt.prototype.centroid=function(){return Pt.centroid(this.p0,this.p1,this.p2)},Pt.prototype.inCentre=function(){return Pt.inCentre(this.p0,this.p1,this.p2)},Pt.prototype.interfaces_=function(){return[]},Pt.prototype.getClass=function(){return Pt},Pt.area=function(t,e,r){return Math.abs(((r.x-t.x)*(e.y-t.y)-(e.x-t.x)*(r.y-t.y))/2)},Pt.signedArea=function(t,e,r){return((r.x-t.x)*(e.y-t.y)-(e.x-t.x)*(r.y-t.y))/2},Pt.det=function(t,e,r,i){return t*i-e*r},Pt.interpolateZ=function(t,e,r,i){var s=e.x,o=e.y,a=r.x-s,u=i.x-s,l=r.y-o,c=i.y-o,f=a*c-u*l,p=t.x-s,v=t.y-o,w=(c*p-u*v)/f,I=(-l*p+a*v)/f,P=e.z+w*(r.z-e.z)+I*(i.z-e.z);return P},Pt.longestSideLength=function(t,e,r){var i=t.distance(e),s=e.distance(r),o=r.distance(t),a=i;return s>a&&(a=s),o>a&&(a=o),a},Pt.isAcute=function(t,e,r){return!(!gt.isAcute(t,e,r)||!gt.isAcute(e,r,t)||!gt.isAcute(r,t,e))},Pt.circumcentre=function(t,e,r){var i=r.x,s=r.y,o=t.x-i,a=t.y-s,u=e.x-i,l=e.y-s,c=2*Pt.det(o,a,u,l),f=Pt.det(a,o*o+a*a,l,u*u+l*l),p=Pt.det(o,o*o+a*a,u,u*u+l*l),v=i-f/c,w=s+p/c;return new D(v,w)},Pt.perpendicularBisector=function(t,e){var r=e.x-t.x,i=e.y-t.y,s=new Pr(t.x+r/2,t.y+i/2,1),o=new Pr(t.x-i+r/2,t.y+r+i/2,1);return new Pr(s,o)},Pt.angleBisector=function(t,e,r){var i=e.distance(t),s=e.distance(r),o=i/(i+s),a=r.x-t.x,u=r.y-t.y,l=new D(t.x+o*a,t.y+o*u);return l},Pt.area3D=function(t,e,r){var i=e.x-t.x,s=e.y-t.y,o=e.z-t.z,a=r.x-t.x,u=r.y-t.y,l=r.z-t.z,c=s*l-o*u,f=o*a-i*l,p=i*u-s*a,v=c*c+f*f+p*p,w=Math.sqrt(v)/2;return w},Pt.centroid=function(t,e,r){var i=(t.x+e.x+r.x)/3,s=(t.y+e.y+r.y)/3;return new D(i,s)},Pt.inCentre=function(t,e,r){var i=e.distance(r),s=t.distance(r),o=t.distance(e),a=i+s+o,u=(i*t.x+s*e.x+o*r.x)/a,l=(i*t.y+s*e.y+o*r.y)/a;return new D(u,l)};var pr=function(){this._inputGeom=null,this._distance=null,this._curveBuilder=null,this._curveList=new z;var t=arguments[0],e=arguments[1],r=arguments[2];this._inputGeom=t,this._distance=e,this._curveBuilder=r};pr.prototype.addPoint=function(t){if(this._distance<=0)return null;var e=t.getCoordinates(),r=this._curveBuilder.getLineCurve(e,this._distance);this.addCurve(r,R.EXTERIOR,R.INTERIOR)},pr.prototype.addPolygon=function(t){var e=this,r=this._distance,i=V.LEFT;this._distance<0&&(r=-this._distance,i=V.RIGHT);var s=t.getExteriorRing(),o=ht.removeRepeatedPoints(s.getCoordinates());if(this._distance<0&&this.isErodedCompletely(s,this._distance)||this._distance<=0&&o.length<3)return null;this.addPolygonRing(o,r,i,R.EXTERIOR,R.INTERIOR);for(var a=0;a<t.getNumInteriorRing();a++){var u=t.getInteriorRingN(a),l=ht.removeRepeatedPoints(u.getCoordinates());e._distance>0&&e.isErodedCompletely(u,-e._distance)||e.addPolygonRing(l,r,V.opposite(i),R.INTERIOR,R.EXTERIOR)}},pr.prototype.isTriangleErodedCompletely=function(t,e){var r=new Pt(t[0],t[1],t[2]),i=r.inCentre(),s=G.distancePointLine(i,r.p0,r.p1);return s<Math.abs(e)},pr.prototype.addLineString=function(t){if(this._distance<=0&&!this._curveBuilder.getBufferParameters().isSingleSided())return null;var e=ht.removeRepeatedPoints(t.getCoordinates()),r=this._curveBuilder.getLineCurve(e,this._distance);this.addCurve(r,R.EXTERIOR,R.INTERIOR)},pr.prototype.addCurve=function(t,e,r){if(t===null||t.length<2)return null;var i=new Yt(t,new bt(0,R.BOUNDARY,e,r));this._curveList.add(i)},pr.prototype.getCurves=function(){return this.add(this._inputGeom),this._curveList},pr.prototype.addPolygonRing=function(t,e,r,i,s){if(e===0&&t.length<yn.MINIMUM_VALID_SIZE)return null;var o=i,a=s;t.length>=yn.MINIMUM_VALID_SIZE&&G.isCCW(t)&&(o=s,a=i,r=V.opposite(r));var u=this._curveBuilder.getRingCurve(t,r,e);this.addCurve(u,o,a)},pr.prototype.add=function(t){if(t.isEmpty())return null;t instanceof $t?this.addPolygon(t):t instanceof Gt?this.addLineString(t):t instanceof Ue?this.addPoint(t):t instanceof mo?this.addCollection(t):t instanceof Ui?this.addCollection(t):t instanceof _n?this.addCollection(t):t instanceof Ee&&this.addCollection(t)},pr.prototype.isErodedCompletely=function(t,e){var r=t.getCoordinates();if(r.length<4)return e<0;if(r.length===4)return this.isTriangleErodedCompletely(r,e);var i=t.getEnvelopeInternal(),s=Math.min(i.getHeight(),i.getWidth());return e<0&&2*Math.abs(e)>s},pr.prototype.addCollection=function(t){for(var e=this,r=0;r<t.getNumGeometries();r++){var i=t.getGeometryN(r);e.add(i)}},pr.prototype.interfaces_=function(){return[]},pr.prototype.getClass=function(){return pr};var wo=function(){};wo.prototype.locate=function(t){},wo.prototype.interfaces_=function(){return[]},wo.prototype.getClass=function(){return wo};var Sn=function(){this._parent=null,this._atStart=null,this._max=null,this._index=null,this._subcollectionIterator=null;var t=arguments[0];this._parent=t,this._atStart=!0,this._index=0,this._max=t.getNumGeometries()};Sn.prototype.next=function(){if(this._atStart)return this._atStart=!1,Sn.isAtomic(this._parent)&&this._index++,this._parent;if(this._subcollectionIterator!==null){if(this._subcollectionIterator.hasNext())return this._subcollectionIterator.next();this._subcollectionIterator=null}if(this._index>=this._max)throw new po;var t=this._parent.getGeometryN(this._index++);return t instanceof Ee?(this._subcollectionIterator=new Sn(t),this._subcollectionIterator.next()):t},Sn.prototype.remove=function(){throw new Error(this.getClass().getName())},Sn.prototype.hasNext=function(){if(this._atStart)return!0;if(this._subcollectionIterator!==null){if(this._subcollectionIterator.hasNext())return!0;this._subcollectionIterator=null}return!(this._index>=this._max)},Sn.prototype.interfaces_=function(){return[fo]},Sn.prototype.getClass=function(){return Sn},Sn.isAtomic=function(t){return!(t instanceof Ee)};var rr=function(){this._geom=null;var t=arguments[0];this._geom=t};rr.prototype.locate=function(t){return rr.locate(t,this._geom)},rr.prototype.interfaces_=function(){return[wo]},rr.prototype.getClass=function(){return rr},rr.isPointInRing=function(t,e){return e.getEnvelopeInternal().intersects(t)?G.isPointInRing(t,e.getCoordinates()):!1},rr.containsPointInPolygon=function(t,e){if(e.isEmpty())return!1;var r=e.getExteriorRing();if(!rr.isPointInRing(t,r))return!1;for(var i=0;i<e.getNumInteriorRing();i++){var s=e.getInteriorRingN(i);if(rr.isPointInRing(t,s))return!1}return!0},rr.containsPoint=function(t,e){if(e instanceof $t)return rr.containsPointInPolygon(t,e);if(e instanceof Ee)for(var r=new Sn(e);r.hasNext();){var i=r.next();if(i!==e&&rr.containsPoint(t,i))return!0}return!1},rr.locate=function(t,e){return e.isEmpty()?R.EXTERIOR:rr.containsPoint(t,e)?R.INTERIOR:R.EXTERIOR};var ye=function(){this._edgeMap=new me,this._edgeList=null,this._ptInAreaLocation=[R.NONE,R.NONE]};ye.prototype.getNextCW=function(t){this.getEdges();var e=this._edgeList.indexOf(t),r=e-1;return e===0&&(r=this._edgeList.size()-1),this._edgeList.get(r)},ye.prototype.propagateSideLabels=function(t){for(var e=R.NONE,r=this.iterator();r.hasNext();){var i=r.next(),s=i.getLabel();s.isArea(t)&&s.getLocation(t,V.LEFT)!==R.NONE&&(e=s.getLocation(t,V.LEFT))}if(e===R.NONE)return null;for(var o=e,a=this.iterator();a.hasNext();){var u=a.next(),l=u.getLabel();if(l.getLocation(t,V.ON)===R.NONE&&l.setLocation(t,V.ON,o),l.isArea(t)){var c=l.getLocation(t,V.LEFT),f=l.getLocation(t,V.RIGHT);if(f!==R.NONE){if(f!==o)throw new Zn("side location conflict",u.getCoordinate());c===R.NONE&&ut.shouldNeverReachHere("found single null side (at "+u.getCoordinate()+")"),o=c}else ut.isTrue(l.getLocation(t,V.LEFT)===R.NONE,"found single null side"),l.setLocation(t,V.RIGHT,o),l.setLocation(t,V.LEFT,o)}}},ye.prototype.getCoordinate=function(){var t=this.iterator();if(!t.hasNext())return null;var e=t.next();return e.getCoordinate()},ye.prototype.print=function(t){ue.out.println("EdgeEndStar: "+this.getCoordinate());for(var e=this.iterator();e.hasNext();){var r=e.next();r.print(t)}},ye.prototype.isAreaLabelsConsistent=function(t){return this.computeEdgeEndLabels(t.getBoundaryNodeRule()),this.checkAreaLabelsConsistent(0)},ye.prototype.checkAreaLabelsConsistent=function(t){var e=this.getEdges();if(e.size()<=0)return!0;var r=e.size()-1,i=e.get(r).getLabel(),s=i.getLocation(t,V.LEFT);ut.isTrue(s!==R.NONE,"Found unlabelled area edge");for(var o=s,a=this.iterator();a.hasNext();){var u=a.next(),l=u.getLabel();ut.isTrue(l.isArea(t),"Found non-area edge");var c=l.getLocation(t,V.LEFT),f=l.getLocation(t,V.RIGHT);if(c===f||f!==o)return!1;o=c}return!0},ye.prototype.findIndex=function(t){var e=this;this.iterator();for(var r=0;r<this._edgeList.size();r++){var i=e._edgeList.get(r);if(i===t)return r}return-1},ye.prototype.iterator=function(){return this.getEdges().iterator()},ye.prototype.getEdges=function(){return this._edgeList===null&&(this._edgeList=new z(this._edgeMap.values())),this._edgeList},ye.prototype.getLocation=function(t,e,r){return this._ptInAreaLocation[t]===R.NONE&&(this._ptInAreaLocation[t]=rr.locate(e,r[t].getGeometry())),this._ptInAreaLocation[t]},ye.prototype.toString=function(){var t=new kr;t.append("EdgeEndStar: "+this.getCoordinate()),t.append(`
5
+ `);for(var e=this.iterator();e.hasNext();){var r=e.next();t.append(r),t.append(`
6
+ `)}return t.toString()},ye.prototype.computeEdgeEndLabels=function(t){for(var e=this.iterator();e.hasNext();){var r=e.next();r.computeLabel(t)}},ye.prototype.computeLabelling=function(t){var e=this;this.computeEdgeEndLabels(t[0].getBoundaryNodeRule()),this.propagateSideLabels(0),this.propagateSideLabels(1);for(var r=[!1,!1],i=this.iterator();i.hasNext();)for(var s=i.next(),o=s.getLabel(),a=0;a<2;a++)o.isLine(a)&&o.getLocation(a)===R.BOUNDARY&&(r[a]=!0);for(var u=this.iterator();u.hasNext();)for(var l=u.next(),c=l.getLabel(),f=0;f<2;f++)if(c.isAnyNull(f)){var p=R.NONE;if(r[f])p=R.EXTERIOR;else{var v=l.getCoordinate();p=e.getLocation(f,v,t)}c.setAllLocationsIfNull(f,p)}},ye.prototype.getDegree=function(){return this._edgeMap.size()},ye.prototype.insertEdgeEnd=function(t,e){this._edgeMap.put(t,e),this._edgeList=null},ye.prototype.interfaces_=function(){return[]},ye.prototype.getClass=function(){return ye};var iv=function(n){function t(){n.call(this),this._resultAreaEdgeList=null,this._label=null,this._SCANNING_FOR_INCOMING=1,this._LINKING_TO_OUTGOING=2}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.linkResultDirectedEdges=function(){var r=this;this.getResultAreaEdges();for(var i=null,s=null,o=this._SCANNING_FOR_INCOMING,a=0;a<this._resultAreaEdgeList.size();a++){var u=r._resultAreaEdgeList.get(a),l=u.getSym();if(u.getLabel().isArea())switch(i===null&&u.isInResult()&&(i=u),o){case r._SCANNING_FOR_INCOMING:if(!l.isInResult())continue;s=l,o=r._LINKING_TO_OUTGOING;break;case r._LINKING_TO_OUTGOING:if(!u.isInResult())continue;s.setNext(u),o=r._SCANNING_FOR_INCOMING;break}}if(o===this._LINKING_TO_OUTGOING){if(i===null)throw new Zn("no outgoing dirEdge found",this.getCoordinate());ut.isTrue(i.isInResult(),"unable to link last incoming dirEdge"),s.setNext(i)}},t.prototype.insert=function(r){var i=r;this.insertEdgeEnd(i,i)},t.prototype.getRightmostEdge=function(){var r=this.getEdges(),i=r.size();if(i<1)return null;var s=r.get(0);if(i===1)return s;var o=r.get(i-1),a=s.getQuadrant(),u=o.getQuadrant();return Ot.isNorthern(a)&&Ot.isNorthern(u)?s:!Ot.isNorthern(a)&&!Ot.isNorthern(u)?o:s.getDy()!==0?s:o.getDy()!==0?o:(ut.shouldNeverReachHere("found two horizontal edges incident on node"),null)},t.prototype.print=function(r){ue.out.println("DirectedEdgeStar: "+this.getCoordinate());for(var i=this.iterator();i.hasNext();){var s=i.next();r.print("out "),s.print(r),r.println(),r.print("in "),s.getSym().print(r),r.println()}},t.prototype.getResultAreaEdges=function(){var r=this;if(this._resultAreaEdgeList!==null)return this._resultAreaEdgeList;this._resultAreaEdgeList=new z;for(var i=this.iterator();i.hasNext();){var s=i.next();(s.isInResult()||s.getSym().isInResult())&&r._resultAreaEdgeList.add(s)}return this._resultAreaEdgeList},t.prototype.updateLabelling=function(r){for(var i=this.iterator();i.hasNext();){var s=i.next(),o=s.getLabel();o.setAllLocationsIfNull(0,r.getLocation(0)),o.setAllLocationsIfNull(1,r.getLocation(1))}},t.prototype.linkAllDirectedEdges=function(){var r=this;this.getEdges();for(var i=null,s=null,o=this._edgeList.size()-1;o>=0;o--){var a=r._edgeList.get(o),u=a.getSym();s===null&&(s=u),i!==null&&u.setNext(i),i=a}s.setNext(i)},t.prototype.computeDepths=function(){var r=this;if(arguments.length===1){var i=arguments[0],s=this.findIndex(i),o=i.getDepth(V.LEFT),a=i.getDepth(V.RIGHT),u=this.computeDepths(s+1,this._edgeList.size(),o),l=this.computeDepths(0,s,u);if(l!==a)throw new Zn("depth mismatch at "+i.getCoordinate())}else if(arguments.length===3){for(var c=arguments[0],f=arguments[1],p=arguments[2],v=p,w=c;w<f;w++){var I=r._edgeList.get(w);I.setEdgeDepths(V.RIGHT,v),v=I.getDepth(V.LEFT)}return v}},t.prototype.mergeSymLabels=function(){for(var r=this.iterator();r.hasNext();){var i=r.next(),s=i.getLabel();s.merge(i.getSym().getLabel())}},t.prototype.linkMinimalDirectedEdges=function(r){for(var i=this,s=null,o=null,a=this._SCANNING_FOR_INCOMING,u=this._resultAreaEdgeList.size()-1;u>=0;u--){var l=i._resultAreaEdgeList.get(u),c=l.getSym();switch(s===null&&l.getEdgeRing()===r&&(s=l),a){case i._SCANNING_FOR_INCOMING:if(c.getEdgeRing()!==r)continue;o=c,a=i._LINKING_TO_OUTGOING;break;case i._LINKING_TO_OUTGOING:if(l.getEdgeRing()!==r)continue;o.setNextMin(l),a=i._SCANNING_FOR_INCOMING;break}}a===this._LINKING_TO_OUTGOING&&(ut.isTrue(s!==null,"found null for first outgoing dirEdge"),ut.isTrue(s.getEdgeRing()===r,"unable to link last incoming dirEdge"),o.setNextMin(s))},t.prototype.getOutgoingDegree=function(){if(arguments.length===0){for(var r=0,i=this.iterator();i.hasNext();){var s=i.next();s.isInResult()&&r++}return r}else if(arguments.length===1){for(var o=arguments[0],a=0,u=this.iterator();u.hasNext();){var l=u.next();l.getEdgeRing()===o&&a++}return a}},t.prototype.getLabel=function(){return this._label},t.prototype.findCoveredLineEdges=function(){for(var r=R.NONE,i=this.iterator();i.hasNext();){var s=i.next(),o=s.getSym();if(!s.isLineEdge()){if(s.isInResult()){r=R.INTERIOR;break}if(o.isInResult()){r=R.EXTERIOR;break}}}if(r===R.NONE)return null;for(var a=r,u=this.iterator();u.hasNext();){var l=u.next(),c=l.getSym();l.isLineEdge()?l.getEdge().setCovered(a===R.INTERIOR):(l.isInResult()&&(a=R.EXTERIOR),c.isInResult()&&(a=R.INTERIOR))}},t.prototype.computeLabelling=function(r){var i=this;n.prototype.computeLabelling.call(this,r),this._label=new bt(R.NONE);for(var s=this.iterator();s.hasNext();)for(var o=s.next(),a=o.getEdge(),u=a.getLabel(),l=0;l<2;l++){var c=u.getLocation(l);(c===R.INTERIOR||c===R.BOUNDARY)&&i._label.setLocation(l,R.INTERIOR)}},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t}(ye),Qf=function(n){function t(){n.apply(this,arguments)}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.createNode=function(r){return new bu(r,new iv)},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t}(vo),yi=function n(){this._pts=null,this._orientation=null;var t=arguments[0];this._pts=t,this._orientation=n.orientation(t)};yi.prototype.compareTo=function(t){var e=t,r=yi.compareOriented(this._pts,this._orientation,e._pts,e._orientation);return r},yi.prototype.interfaces_=function(){return[ur]},yi.prototype.getClass=function(){return yi},yi.orientation=function(t){return ht.increasingDirection(t)===1},yi.compareOriented=function(t,e,r,i){for(var s=e?1:-1,o=i?1:-1,a=e?t.length:-1,u=i?r.length:-1,l=e?0:t.length-1,c=i?0:r.length-1;;){var f=t[l].compareTo(r[c]);if(f!==0)return f;l+=s,c+=o;var p=l===a,v=c===u;if(p&&!v)return-1;if(!p&&v)return 1;if(p&&v)return 0}};var xr=function(){this._edges=new z,this._ocaMap=new me};xr.prototype.print=function(t){var e=this;t.print("MULTILINESTRING ( ");for(var r=0;r<this._edges.size();r++){var i=e._edges.get(r);r>0&&t.print(","),t.print("(");for(var s=i.getCoordinates(),o=0;o<s.length;o++)o>0&&t.print(","),t.print(s[o].x+" "+s[o].y);t.println(")")}t.print(") ")},xr.prototype.addAll=function(t){for(var e=this,r=t.iterator();r.hasNext();)e.add(r.next())},xr.prototype.findEdgeIndex=function(t){for(var e=this,r=0;r<this._edges.size();r++)if(e._edges.get(r).equals(t))return r;return-1},xr.prototype.iterator=function(){return this._edges.iterator()},xr.prototype.getEdges=function(){return this._edges},xr.prototype.get=function(t){return this._edges.get(t)},xr.prototype.findEqualEdge=function(t){var e=new yi(t.getCoordinates()),r=this._ocaMap.get(e);return r},xr.prototype.add=function(t){this._edges.add(t);var e=new yi(t.getCoordinates());this._ocaMap.put(e,t)},xr.prototype.interfaces_=function(){return[]},xr.prototype.getClass=function(){return xr};var qi=function(){};qi.prototype.processIntersections=function(t,e,r,i){},qi.prototype.isDone=function(){},qi.prototype.interfaces_=function(){return[]},qi.prototype.getClass=function(){return qi};var nr=function(){this._hasIntersection=!1,this._hasProper=!1,this._hasProperInterior=!1,this._hasInterior=!1,this._properIntersectionPoint=null,this._li=null,this._isSelfIntersection=null,this.numIntersections=0,this.numInteriorIntersections=0,this.numProperIntersections=0,this.numTests=0;var t=arguments[0];this._li=t};nr.prototype.isTrivialIntersection=function(t,e,r,i){if(t===r&&this._li.getIntersectionNum()===1){if(nr.isAdjacentSegments(e,i))return!0;if(t.isClosed()){var s=t.size()-1;if(e===0&&i===s||i===0&&e===s)return!0}}return!1},nr.prototype.getProperIntersectionPoint=function(){return this._properIntersectionPoint},nr.prototype.hasProperInteriorIntersection=function(){return this._hasProperInterior},nr.prototype.getLineIntersector=function(){return this._li},nr.prototype.hasProperIntersection=function(){return this._hasProper},nr.prototype.processIntersections=function(t,e,r,i){if(t===r&&e===i)return null;this.numTests++;var s=t.getCoordinates()[e],o=t.getCoordinates()[e+1],a=r.getCoordinates()[i],u=r.getCoordinates()[i+1];this._li.computeIntersection(s,o,a,u),this._li.hasIntersection()&&(this.numIntersections++,this._li.isInteriorIntersection()&&(this.numInteriorIntersections++,this._hasInterior=!0),this.isTrivialIntersection(t,e,r,i)||(this._hasIntersection=!0,t.addIntersections(this._li,e,0),r.addIntersections(this._li,i,1),this._li.isProper()&&(this.numProperIntersections++,this._hasProper=!0,this._hasProperInterior=!0)))},nr.prototype.hasIntersection=function(){return this._hasIntersection},nr.prototype.isDone=function(){return!1},nr.prototype.hasInteriorIntersection=function(){return this._hasInterior},nr.prototype.interfaces_=function(){return[qi]},nr.prototype.getClass=function(){return nr},nr.isAdjacentSegments=function(t,e){return Math.abs(t-e)===1};var Kr=function(){this.coord=null,this.segmentIndex=null,this.dist=null;var t=arguments[0],e=arguments[1],r=arguments[2];this.coord=new D(t),this.segmentIndex=e,this.dist=r};Kr.prototype.getSegmentIndex=function(){return this.segmentIndex},Kr.prototype.getCoordinate=function(){return this.coord},Kr.prototype.print=function(t){t.print(this.coord),t.print(" seg # = "+this.segmentIndex),t.println(" dist = "+this.dist)},Kr.prototype.compareTo=function(t){var e=t;return this.compare(e.segmentIndex,e.dist)},Kr.prototype.isEndPoint=function(t){return this.segmentIndex===0&&this.dist===0||this.segmentIndex===t},Kr.prototype.toString=function(){return this.coord+" seg # = "+this.segmentIndex+" dist = "+this.dist},Kr.prototype.getDistance=function(){return this.dist},Kr.prototype.compare=function(t,e){return this.segmentIndex<t?-1:this.segmentIndex>t?1:this.dist<e?-1:this.dist>e?1:0},Kr.prototype.interfaces_=function(){return[ur]},Kr.prototype.getClass=function(){return Kr};var Cn=function(){this._nodeMap=new me,this.edge=null;var t=arguments[0];this.edge=t};Cn.prototype.print=function(t){t.println("Intersections:");for(var e=this.iterator();e.hasNext();){var r=e.next();r.print(t)}},Cn.prototype.iterator=function(){return this._nodeMap.values().iterator()},Cn.prototype.addSplitEdges=function(t){var e=this;this.addEndpoints();for(var r=this.iterator(),i=r.next();r.hasNext();){var s=r.next(),o=e.createSplitEdge(i,s);t.add(o),i=s}},Cn.prototype.addEndpoints=function(){var t=this.edge.pts.length-1;this.add(this.edge.pts[0],0,0),this.add(this.edge.pts[t],t,0)},Cn.prototype.createSplitEdge=function(t,e){var r=this,i=e.segmentIndex-t.segmentIndex+2,s=this.edge.pts[e.segmentIndex],o=e.dist>0||!e.coord.equals2D(s);o||i--;var a=new Array(i).fill(null),u=0;a[u++]=new D(t.coord);for(var l=t.segmentIndex+1;l<=e.segmentIndex;l++)a[u++]=r.edge.pts[l];return o&&(a[u]=e.coord),new Ou(a,new bt(this.edge._label))},Cn.prototype.add=function(t,e,r){var i=new Kr(t,e,r),s=this._nodeMap.get(i);return s!==null?s:(this._nodeMap.put(i,i),i)},Cn.prototype.isIntersection=function(t){for(var e=this.iterator();e.hasNext();){var r=e.next();if(r.coord.equals(t))return!0}return!1},Cn.prototype.interfaces_=function(){return[]},Cn.prototype.getClass=function(){return Cn};var Xi=function(){};Xi.prototype.getChainStartIndices=function(t){var e=this,r=0,i=new z;i.add(new Vr(r));do{var s=e.findChainEnd(t,r);i.add(new Vr(s)),r=s}while(r<t.length-1);var o=Xi.toIntArray(i);return o},Xi.prototype.findChainEnd=function(t,e){for(var r=Ot.quadrant(t[e],t[e+1]),i=e+1;i<t.length;){var s=Ot.quadrant(t[i-1],t[i]);if(s!==r)break;i++}return i-1},Xi.prototype.interfaces_=function(){return[]},Xi.prototype.getClass=function(){return Xi},Xi.toIntArray=function(t){for(var e=new Array(t.size()).fill(null),r=0;r<e.length;r++)e[r]=t.get(r).intValue();return e};var Bn=function(){this.e=null,this.pts=null,this.startIndex=null,this.env1=new J,this.env2=new J;var t=arguments[0];this.e=t,this.pts=t.getCoordinates();var e=new Xi;this.startIndex=e.getChainStartIndices(this.pts)};Bn.prototype.getCoordinates=function(){return this.pts},Bn.prototype.getMaxX=function(t){var e=this.pts[this.startIndex[t]].x,r=this.pts[this.startIndex[t+1]].x;return e>r?e:r},Bn.prototype.getMinX=function(t){var e=this.pts[this.startIndex[t]].x,r=this.pts[this.startIndex[t+1]].x;return e<r?e:r},Bn.prototype.computeIntersectsForChain=function(){if(arguments.length===4){var t=arguments[0],e=arguments[1],r=arguments[2],i=arguments[3];this.computeIntersectsForChain(this.startIndex[t],this.startIndex[t+1],e,e.startIndex[r],e.startIndex[r+1],i)}else if(arguments.length===6){var s=arguments[0],o=arguments[1],a=arguments[2],u=arguments[3],l=arguments[4],c=arguments[5],f=this.pts[s],p=this.pts[o],v=a.pts[u],w=a.pts[l];if(o-s===1&&l-u===1)return c.addIntersections(this.e,s,a.e,u),null;if(this.env1.init(f,p),this.env2.init(v,w),!this.env1.intersects(this.env2))return null;var I=Math.trunc((s+o)/2),P=Math.trunc((u+l)/2);s<I&&(u<P&&this.computeIntersectsForChain(s,I,a,u,P,c),P<l&&this.computeIntersectsForChain(s,I,a,P,l,c)),I<o&&(u<P&&this.computeIntersectsForChain(I,o,a,u,P,c),P<l&&this.computeIntersectsForChain(I,o,a,P,l,c))}},Bn.prototype.getStartIndexes=function(){return this.startIndex},Bn.prototype.computeIntersects=function(t,e){for(var r=this,i=0;i<this.startIndex.length-1;i++)for(var s=0;s<t.startIndex.length-1;s++)r.computeIntersectsForChain(i,t,s,e)},Bn.prototype.interfaces_=function(){return[]},Bn.prototype.getClass=function(){return Bn};var le=function n(){var t=this;this._depth=Array(2).fill().map(function(){return Array(3)});for(var e=0;e<2;e++)for(var r=0;r<3;r++)t._depth[e][r]=n.NULL_VALUE},Bf={NULL_VALUE:{configurable:!0}};le.prototype.getDepth=function(t,e){return this._depth[t][e]},le.prototype.setDepth=function(t,e,r){this._depth[t][e]=r},le.prototype.isNull=function(){var t=this;if(arguments.length===0){for(var e=0;e<2;e++)for(var r=0;r<3;r++)if(t._depth[e][r]!==le.NULL_VALUE)return!1;return!0}else if(arguments.length===1){var i=arguments[0];return this._depth[i][1]===le.NULL_VALUE}else if(arguments.length===2){var s=arguments[0],o=arguments[1];return this._depth[s][o]===le.NULL_VALUE}},le.prototype.normalize=function(){for(var t=this,e=0;e<2;e++)if(!t.isNull(e)){var r=t._depth[e][1];t._depth[e][2]<r&&(r=t._depth[e][2]),r<0&&(r=0);for(var i=1;i<3;i++){var s=0;t._depth[e][i]>r&&(s=1),t._depth[e][i]=s}}},le.prototype.getDelta=function(t){return this._depth[t][V.RIGHT]-this._depth[t][V.LEFT]},le.prototype.getLocation=function(t,e){return this._depth[t][e]<=0?R.EXTERIOR:R.INTERIOR},le.prototype.toString=function(){return"A: "+this._depth[0][1]+","+this._depth[0][2]+" B: "+this._depth[1][1]+","+this._depth[1][2]},le.prototype.add=function(){var t=this;if(arguments.length===1)for(var e=arguments[0],r=0;r<2;r++)for(var i=1;i<3;i++){var s=e.getLocation(r,i);(s===R.EXTERIOR||s===R.INTERIOR)&&(t.isNull(r,i)?t._depth[r][i]=le.depthAtLocation(s):t._depth[r][i]+=le.depthAtLocation(s))}else if(arguments.length===3){var o=arguments[0],a=arguments[1],u=arguments[2];u===R.INTERIOR&&this._depth[o][a]++}},le.prototype.interfaces_=function(){return[]},le.prototype.getClass=function(){return le},le.depthAtLocation=function(t){return t===R.EXTERIOR?0:t===R.INTERIOR?1:le.NULL_VALUE},Bf.NULL_VALUE.get=function(){return-1},Object.defineProperties(le,Bf);var Ou=function(n){function t(){if(n.call(this),this.pts=null,this._env=null,this.eiList=new Cn(this),this._name=null,this._mce=null,this._isIsolated=!0,this._depth=new le,this._depthDelta=0,arguments.length===1){var e=arguments[0];t.call(this,e,null)}else if(arguments.length===2){var r=arguments[0],i=arguments[1];this.pts=r,this._label=i}}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.getDepth=function(){return this._depth},t.prototype.getCollapsedEdge=function(){var r=new Array(2).fill(null);r[0]=this.pts[0],r[1]=this.pts[1];var i=new t(r,bt.toLineLabel(this._label));return i},t.prototype.isIsolated=function(){return this._isIsolated},t.prototype.getCoordinates=function(){return this.pts},t.prototype.setIsolated=function(r){this._isIsolated=r},t.prototype.setName=function(r){this._name=r},t.prototype.equals=function(r){var i=this;if(!(r instanceof t))return!1;var s=r;if(this.pts.length!==s.pts.length)return!1;for(var o=!0,a=!0,u=this.pts.length,l=0;l<this.pts.length;l++)if(i.pts[l].equals2D(s.pts[l])||(o=!1),i.pts[l].equals2D(s.pts[--u])||(a=!1),!o&&!a)return!1;return!0},t.prototype.getCoordinate=function(){if(arguments.length===0)return this.pts.length>0?this.pts[0]:null;if(arguments.length===1){var r=arguments[0];return this.pts[r]}},t.prototype.print=function(r){var i=this;r.print("edge "+this._name+": "),r.print("LINESTRING (");for(var s=0;s<this.pts.length;s++)s>0&&r.print(","),r.print(i.pts[s].x+" "+i.pts[s].y);r.print(") "+this._label+" "+this._depthDelta)},t.prototype.computeIM=function(r){t.updateIM(this._label,r)},t.prototype.isCollapsed=function(){return!this._label.isArea()||this.pts.length!==3?!1:!!this.pts[0].equals(this.pts[2])},t.prototype.isClosed=function(){return this.pts[0].equals(this.pts[this.pts.length-1])},t.prototype.getMaximumSegmentIndex=function(){return this.pts.length-1},t.prototype.getDepthDelta=function(){return this._depthDelta},t.prototype.getNumPoints=function(){return this.pts.length},t.prototype.printReverse=function(r){var i=this;r.print("edge "+this._name+": ");for(var s=this.pts.length-1;s>=0;s--)r.print(i.pts[s]+" ");r.println("")},t.prototype.getMonotoneChainEdge=function(){return this._mce===null&&(this._mce=new Bn(this)),this._mce},t.prototype.getEnvelope=function(){var r=this;if(this._env===null){this._env=new J;for(var i=0;i<this.pts.length;i++)r._env.expandToInclude(r.pts[i])}return this._env},t.prototype.addIntersection=function(r,i,s,o){var a=new D(r.getIntersection(o)),u=i,l=r.getEdgeDistance(s,o),c=u+1;if(c<this.pts.length){var f=this.pts[c];a.equals2D(f)&&(u=c,l=0)}this.eiList.add(a,u,l)},t.prototype.toString=function(){var r=this,i=new kr;i.append("edge "+this._name+": "),i.append("LINESTRING (");for(var s=0;s<this.pts.length;s++)s>0&&i.append(","),i.append(r.pts[s].x+" "+r.pts[s].y);return i.append(") "+this._label+" "+this._depthDelta),i.toString()},t.prototype.isPointwiseEqual=function(r){var i=this;if(this.pts.length!==r.pts.length)return!1;for(var s=0;s<this.pts.length;s++)if(!i.pts[s].equals2D(r.pts[s]))return!1;return!0},t.prototype.setDepthDelta=function(r){this._depthDelta=r},t.prototype.getEdgeIntersectionList=function(){return this.eiList},t.prototype.addIntersections=function(r,i,s){for(var o=this,a=0;a<r.getIntersectionNum();a++)o.addIntersection(r,i,s,a)},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t.updateIM=function(){if(arguments.length===2){var r=arguments[0],i=arguments[1];i.setAtLeastIfValid(r.getLocation(0,V.ON),r.getLocation(1,V.ON),1),r.isArea()&&(i.setAtLeastIfValid(r.getLocation(0,V.LEFT),r.getLocation(1,V.LEFT),2),i.setAtLeastIfValid(r.getLocation(0,V.RIGHT),r.getLocation(1,V.RIGHT),2))}else return n.prototype.updateIM.apply(this,arguments)},t}(tr),Ie=function(t){this._workingPrecisionModel=null,this._workingNoder=null,this._geomFact=null,this._graph=null,this._edgeList=new xr,this._bufParams=t||null};Ie.prototype.setWorkingPrecisionModel=function(t){this._workingPrecisionModel=t},Ie.prototype.insertUniqueEdge=function(t){var e=this._edgeList.findEqualEdge(t);if(e!==null){var r=e.getLabel(),i=t.getLabel();e.isPointwiseEqual(t)||(i=new bt(t.getLabel()),i.flip()),r.merge(i);var s=Ie.depthDelta(i),o=e.getDepthDelta(),a=o+s;e.setDepthDelta(a)}else this._edgeList.add(t),t.setDepthDelta(Ie.depthDelta(t.getLabel()))},Ie.prototype.buildSubgraphs=function(t,e){for(var r=new z,i=t.iterator();i.hasNext();){var s=i.next(),o=s.getRightmostCoordinate(),a=new Ns(r),u=a.getDepth(o);s.computeDepth(u),s.findResultEdges(),r.add(s),e.add(s.getDirectedEdges(),s.getNodes())}},Ie.prototype.createSubgraphs=function(t){for(var e=new z,r=t.getNodes().iterator();r.hasNext();){var i=r.next();if(!i.isVisited()){var s=new Se;s.create(i),e.add(s)}}return Mr.sort(e,Mr.reverseOrder()),e},Ie.prototype.createEmptyResultGeometry=function(){var t=this._geomFact.createPolygon();return t},Ie.prototype.getNoder=function(t){if(this._workingNoder!==null)return this._workingNoder;var e=new Fl,r=new ki;return r.setPrecisionModel(t),e.setSegmentIntersector(new nr(r)),e},Ie.prototype.buffer=function(t,e){var r=this._workingPrecisionModel;r===null&&(r=t.getPrecisionModel()),this._geomFact=t.getFactory();var i=new Le(r,this._bufParams),s=new pr(t,e,i),o=s.getCurves();if(o.size()<=0)return this.createEmptyResultGeometry();this.computeNodedEdges(o,r),this._graph=new Ut(new Qf),this._graph.addEdges(this._edgeList.getEdges());var a=this.createSubgraphs(this._graph),u=new Ge(this._geomFact);this.buildSubgraphs(a,u);var l=u.getPolygons();if(l.size()<=0)return this.createEmptyResultGeometry();var c=this._geomFact.buildGeometry(l);return c},Ie.prototype.computeNodedEdges=function(t,e){var r=this,i=this.getNoder(e);i.computeNodes(t);for(var s=i.getNodedSubstrings(),o=s.iterator();o.hasNext();){var a=o.next(),u=a.getCoordinates();if(!(u.length===2&&u[0].equals2D(u[1]))){var l=a.getData(),c=new Ou(a.getCoordinates(),new bt(l));r.insertUniqueEdge(c)}}},Ie.prototype.setNoder=function(t){this._workingNoder=t},Ie.prototype.interfaces_=function(){return[]},Ie.prototype.getClass=function(){return Ie},Ie.depthDelta=function(t){var e=t.getLocation(0,V.LEFT),r=t.getLocation(0,V.RIGHT);return e===R.INTERIOR&&r===R.EXTERIOR?1:e===R.EXTERIOR&&r===R.INTERIOR?-1:0},Ie.convertSegStrings=function(t){for(var e=new ft,r=new z;t.hasNext();){var i=t.next(),s=e.createLineString(i.getCoordinates());r.add(s)}return e.buildGeometry(r)};var _i=function(){if(this._noder=null,this._scaleFactor=null,this._offsetX=null,this._offsetY=null,this._isScaled=!1,arguments.length===2){var t=arguments[0],e=arguments[1];this._noder=t,this._scaleFactor=e,this._offsetX=0,this._offsetY=0,this._isScaled=!this.isIntegerPrecision()}else if(arguments.length===4){var r=arguments[0],i=arguments[1],s=arguments[2],o=arguments[3];this._noder=r,this._scaleFactor=i,this._offsetX=s,this._offsetY=o,this._isScaled=!this.isIntegerPrecision()}};_i.prototype.rescale=function(){var t=this;if(et(arguments[0],Bt))for(var e=arguments[0],r=e.iterator();r.hasNext();){var i=r.next();t.rescale(i.getCoordinates())}else if(arguments[0]instanceof Array){for(var s=arguments[0],o=0;o<s.length;o++)s[o].x=s[o].x/t._scaleFactor+t._offsetX,s[o].y=s[o].y/t._scaleFactor+t._offsetY;s.length===2&&s[0].equals2D(s[1])&&ue.out.println(s)}},_i.prototype.scale=function(){var t=this;if(et(arguments[0],Bt)){for(var e=arguments[0],r=new z,i=e.iterator();i.hasNext();){var s=i.next();r.add(new Yt(t.scale(s.getCoordinates()),s.getData()))}return r}else if(arguments[0]instanceof Array){for(var o=arguments[0],a=new Array(o.length).fill(null),u=0;u<o.length;u++)a[u]=new D(Math.round((o[u].x-t._offsetX)*t._scaleFactor),Math.round((o[u].y-t._offsetY)*t._scaleFactor),o[u].z);var l=ht.removeRepeatedPoints(a);return l}},_i.prototype.isIntegerPrecision=function(){return this._scaleFactor===1},_i.prototype.getNodedSubstrings=function(){var t=this._noder.getNodedSubstrings();return this._isScaled&&this.rescale(t),t},_i.prototype.computeNodes=function(t){var e=t;this._isScaled&&(e=this.scale(t)),this._noder.computeNodes(e)},_i.prototype.interfaces_=function(){return[Gi]},_i.prototype.getClass=function(){return _i};var Qr=function(){this._li=new ki,this._segStrings=null;var t=arguments[0];this._segStrings=t},$f={fact:{configurable:!0}};Qr.prototype.checkEndPtVertexIntersections=function(){var t=this;if(arguments.length===0)for(var e=this._segStrings.iterator();e.hasNext();){var r=e.next(),i=r.getCoordinates();t.checkEndPtVertexIntersections(i[0],t._segStrings),t.checkEndPtVertexIntersections(i[i.length-1],t._segStrings)}else if(arguments.length===2){for(var s=arguments[0],o=arguments[1],a=o.iterator();a.hasNext();)for(var u=a.next(),l=u.getCoordinates(),c=1;c<l.length-1;c++)if(l[c].equals(s))throw new Wn("found endpt/interior pt intersection at index "+c+" :pt "+s)}},Qr.prototype.checkInteriorIntersections=function(){var t=this;if(arguments.length===0)for(var e=this._segStrings.iterator();e.hasNext();)for(var r=e.next(),i=this._segStrings.iterator();i.hasNext();){var s=i.next();t.checkInteriorIntersections(r,s)}else if(arguments.length===2)for(var o=arguments[0],a=arguments[1],u=o.getCoordinates(),l=a.getCoordinates(),c=0;c<u.length-1;c++)for(var f=0;f<l.length-1;f++)t.checkInteriorIntersections(o,c,a,f);else if(arguments.length===4){var p=arguments[0],v=arguments[1],w=arguments[2],I=arguments[3];if(p===w&&v===I)return null;var P=p.getCoordinates()[v],M=p.getCoordinates()[v+1],m=w.getCoordinates()[I],_=w.getCoordinates()[I+1];if(this._li.computeIntersection(P,M,m,_),this._li.hasIntersection()&&(this._li.isProper()||this.hasInteriorIntersection(this._li,P,M)||this.hasInteriorIntersection(this._li,m,_)))throw new Wn("found non-noded intersection at "+P+"-"+M+" and "+m+"-"+_)}},Qr.prototype.checkValid=function(){this.checkEndPtVertexIntersections(),this.checkInteriorIntersections(),this.checkCollapses()},Qr.prototype.checkCollapses=function(){var t=this;if(arguments.length===0)for(var e=this._segStrings.iterator();e.hasNext();){var r=e.next();t.checkCollapses(r)}else if(arguments.length===1)for(var i=arguments[0],s=i.getCoordinates(),o=0;o<s.length-2;o++)t.checkCollapse(s[o],s[o+1],s[o+2])},Qr.prototype.hasInteriorIntersection=function(t,e,r){for(var i=0;i<t.getIntersectionNum();i++){var s=t.getIntersection(i);if(!(s.equals(e)||s.equals(r)))return!0}return!1},Qr.prototype.checkCollapse=function(t,e,r){if(t.equals(r))throw new Wn("found non-noded collapse at "+Qr.fact.createLineString([t,e,r]))},Qr.prototype.interfaces_=function(){return[]},Qr.prototype.getClass=function(){return Qr},$f.fact.get=function(){return new ft},Object.defineProperties(Qr,$f);var Ae=function(){this._li=null,this._pt=null,this._originalPt=null,this._ptScaled=null,this._p0Scaled=null,this._p1Scaled=null,this._scaleFactor=null,this._minx=null,this._maxx=null,this._miny=null,this._maxy=null,this._corner=new Array(4).fill(null),this._safeEnv=null;var t=arguments[0],e=arguments[1],r=arguments[2];if(this._originalPt=t,this._pt=t,this._scaleFactor=e,this._li=r,e<=0)throw new Ft("Scale factor must be non-zero");e!==1&&(this._pt=new D(this.scale(t.x),this.scale(t.y)),this._p0Scaled=new D,this._p1Scaled=new D),this.initCorners(this._pt)},jf={SAFE_ENV_EXPANSION_FACTOR:{configurable:!0}};Ae.prototype.intersectsScaled=function(t,e){var r=Math.min(t.x,e.x),i=Math.max(t.x,e.x),s=Math.min(t.y,e.y),o=Math.max(t.y,e.y),a=this._maxx<r||this._minx>i||this._maxy<s||this._miny>o;if(a)return!1;var u=this.intersectsToleranceSquare(t,e);return ut.isTrue(!(a&&u),"Found bad envelope test"),u},Ae.prototype.initCorners=function(t){var e=.5;this._minx=t.x-e,this._maxx=t.x+e,this._miny=t.y-e,this._maxy=t.y+e,this._corner[0]=new D(this._maxx,this._maxy),this._corner[1]=new D(this._minx,this._maxy),this._corner[2]=new D(this._minx,this._miny),this._corner[3]=new D(this._maxx,this._miny)},Ae.prototype.intersects=function(t,e){return this._scaleFactor===1?this.intersectsScaled(t,e):(this.copyScaled(t,this._p0Scaled),this.copyScaled(e,this._p1Scaled),this.intersectsScaled(this._p0Scaled,this._p1Scaled))},Ae.prototype.scale=function(t){return Math.round(t*this._scaleFactor)},Ae.prototype.getCoordinate=function(){return this._originalPt},Ae.prototype.copyScaled=function(t,e){e.x=this.scale(t.x),e.y=this.scale(t.y)},Ae.prototype.getSafeEnvelope=function(){if(this._safeEnv===null){var t=Ae.SAFE_ENV_EXPANSION_FACTOR/this._scaleFactor;this._safeEnv=new J(this._originalPt.x-t,this._originalPt.x+t,this._originalPt.y-t,this._originalPt.y+t)}return this._safeEnv},Ae.prototype.intersectsPixelClosure=function(t,e){return this._li.computeIntersection(t,e,this._corner[0],this._corner[1]),!!(this._li.hasIntersection()||(this._li.computeIntersection(t,e,this._corner[1],this._corner[2]),this._li.hasIntersection())||(this._li.computeIntersection(t,e,this._corner[2],this._corner[3]),this._li.hasIntersection())||(this._li.computeIntersection(t,e,this._corner[3],this._corner[0]),this._li.hasIntersection()))},Ae.prototype.intersectsToleranceSquare=function(t,e){var r=!1,i=!1;return this._li.computeIntersection(t,e,this._corner[0],this._corner[1]),!!(this._li.isProper()||(this._li.computeIntersection(t,e,this._corner[1],this._corner[2]),this._li.isProper())||(this._li.hasIntersection()&&(r=!0),this._li.computeIntersection(t,e,this._corner[2],this._corner[3]),this._li.isProper())||(this._li.hasIntersection()&&(i=!0),this._li.computeIntersection(t,e,this._corner[3],this._corner[0]),this._li.isProper())||r&&i||t.equals(this._pt)||e.equals(this._pt))},Ae.prototype.addSnappedNode=function(t,e){var r=t.getCoordinate(e),i=t.getCoordinate(e+1);return this.intersects(r,i)?(t.addIntersection(this.getCoordinate(),e),!0):!1},Ae.prototype.interfaces_=function(){return[]},Ae.prototype.getClass=function(){return Ae},jf.SAFE_ENV_EXPANSION_FACTOR.get=function(){return .75},Object.defineProperties(Ae,jf);var Ra=function(){this.tempEnv1=new J,this.selectedSegment=new Z};Ra.prototype.select=function(){if(arguments.length!==1){if(arguments.length===2){var t=arguments[0],e=arguments[1];t.getLineSegment(e,this.selectedSegment),this.select(this.selectedSegment)}}},Ra.prototype.interfaces_=function(){return[]},Ra.prototype.getClass=function(){return Ra};var Eo=function(){this._index=null;var t=arguments[0];this._index=t},td={HotPixelSnapAction:{configurable:!0}};Eo.prototype.snap=function(){if(arguments.length===1){var t=arguments[0];return this.snap(t,null,-1)}else if(arguments.length===3){var e=arguments[0],r=arguments[1],i=arguments[2],s=e.getSafeEnvelope(),o=new ed(e,r,i);return this._index.query(s,{interfaces_:function(){return[mi]},visitItem:function(a){var u=a;u.select(s,o)}}),o.isNodeAdded()}},Eo.prototype.interfaces_=function(){return[]},Eo.prototype.getClass=function(){return Eo},td.HotPixelSnapAction.get=function(){return ed},Object.defineProperties(Eo,td);var ed=function(n){function t(){n.call(this),this._hotPixel=null,this._parentEdge=null,this._hotPixelVertexIndex=null,this._isNodeAdded=!1;var e=arguments[0],r=arguments[1],i=arguments[2];this._hotPixel=e,this._parentEdge=r,this._hotPixelVertexIndex=i}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.isNodeAdded=function(){return this._isNodeAdded},t.prototype.select=function(){if(arguments.length===2){var r=arguments[0],i=arguments[1],s=r.getContext();if(this._parentEdge!==null&&s===this._parentEdge&&i===this._hotPixelVertexIndex)return null;this._isNodeAdded=this._hotPixel.addSnappedNode(s,i)}else return n.prototype.select.apply(this,arguments)},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t}(Ra),bs=function(){this._li=null,this._interiorIntersections=null;var t=arguments[0];this._li=t,this._interiorIntersections=new z};bs.prototype.processIntersections=function(t,e,r,i){var s=this;if(t===r&&e===i)return null;var o=t.getCoordinates()[e],a=t.getCoordinates()[e+1],u=r.getCoordinates()[i],l=r.getCoordinates()[i+1];if(this._li.computeIntersection(o,a,u,l),this._li.hasIntersection()&&this._li.isInteriorIntersection()){for(var c=0;c<this._li.getIntersectionNum();c++)s._interiorIntersections.add(s._li.getIntersection(c));t.addIntersections(this._li,e,0),r.addIntersections(this._li,i,1)}},bs.prototype.isDone=function(){return!1},bs.prototype.getInteriorIntersections=function(){return this._interiorIntersections},bs.prototype.interfaces_=function(){return[qi]},bs.prototype.getClass=function(){return bs};var In=function(){this._pm=null,this._li=null,this._scaleFactor=null,this._noder=null,this._pointSnapper=null,this._nodedSegStrings=null;var t=arguments[0];this._pm=t,this._li=new ki,this._li.setPrecisionModel(t),this._scaleFactor=t.getScale()};In.prototype.checkCorrectness=function(t){var e=Yt.getNodedSubstrings(t),r=new Qr(e);try{r.checkValid()}catch(i){if(i instanceof Af)i.printStackTrace();else throw i}finally{}},In.prototype.getNodedSubstrings=function(){return Yt.getNodedSubstrings(this._nodedSegStrings)},In.prototype.snapRound=function(t,e){var r=this.findInteriorIntersections(t,e);this.computeIntersectionSnaps(r),this.computeVertexSnaps(t)},In.prototype.findInteriorIntersections=function(t,e){var r=new bs(e);return this._noder.setSegmentIntersector(r),this._noder.computeNodes(t),r.getInteriorIntersections()},In.prototype.computeVertexSnaps=function(){var t=this;if(et(arguments[0],Bt))for(var e=arguments[0],r=e.iterator();r.hasNext();){var i=r.next();t.computeVertexSnaps(i)}else if(arguments[0]instanceof Yt)for(var s=arguments[0],o=s.getCoordinates(),a=0;a<o.length;a++){var u=new Ae(o[a],t._scaleFactor,t._li),l=t._pointSnapper.snap(u,s,a);l&&s.addIntersection(o[a],a)}},In.prototype.computeNodes=function(t){this._nodedSegStrings=t,this._noder=new Fl,this._pointSnapper=new Eo(this._noder.getIndex()),this.snapRound(t,this._li)},In.prototype.computeIntersectionSnaps=function(t){for(var e=this,r=t.iterator();r.hasNext();){var i=r.next(),s=new Ae(i,e._scaleFactor,e._li);e._pointSnapper.snap(s)}},In.prototype.interfaces_=function(){return[Gi]},In.prototype.getClass=function(){return In};var ce=function(){if(this._argGeom=null,this._distance=null,this._bufParams=new It,this._resultGeometry=null,this._saveException=null,arguments.length===1){var t=arguments[0];this._argGeom=t}else if(arguments.length===2){var e=arguments[0],r=arguments[1];this._argGeom=e,this._bufParams=r}},So={CAP_ROUND:{configurable:!0},CAP_BUTT:{configurable:!0},CAP_FLAT:{configurable:!0},CAP_SQUARE:{configurable:!0},MAX_PRECISION_DIGITS:{configurable:!0}};ce.prototype.bufferFixedPrecision=function(t){var e=new _i(new In(new Ct(1)),t.getScale()),r=new Ie(this._bufParams);r.setWorkingPrecisionModel(t),r.setNoder(e),this._resultGeometry=r.buffer(this._argGeom,this._distance)},ce.prototype.bufferReducedPrecision=function(){var t=this;if(arguments.length===0){for(var e=ce.MAX_PRECISION_DIGITS;e>=0;e--){try{t.bufferReducedPrecision(e)}catch(o){if(o instanceof Zn)t._saveException=o;else throw o}finally{}if(t._resultGeometry!==null)return null}throw this._saveException}else if(arguments.length===1){var r=arguments[0],i=ce.precisionScaleFactor(this._argGeom,this._distance,r),s=new Ct(i);this.bufferFixedPrecision(s)}},ce.prototype.computeGeometry=function(){if(this.bufferOriginalPrecision(),this._resultGeometry!==null)return null;var t=this._argGeom.getFactory().getPrecisionModel();t.getType()===Ct.FIXED?this.bufferFixedPrecision(t):this.bufferReducedPrecision()},ce.prototype.setQuadrantSegments=function(t){this._bufParams.setQuadrantSegments(t)},ce.prototype.bufferOriginalPrecision=function(){try{var t=new Ie(this._bufParams);this._resultGeometry=t.buffer(this._argGeom,this._distance)}catch(e){if(e instanceof Wn)this._saveException=e;else throw e}finally{}},ce.prototype.getResultGeometry=function(t){return this._distance=t,this.computeGeometry(),this._resultGeometry},ce.prototype.setEndCapStyle=function(t){this._bufParams.setEndCapStyle(t)},ce.prototype.interfaces_=function(){return[]},ce.prototype.getClass=function(){return ce},ce.bufferOp=function(){if(arguments.length===2){var t=arguments[0],e=arguments[1],r=new ce(t),i=r.getResultGeometry(e);return i}else if(arguments.length===3){if(Number.isInteger(arguments[2])&&arguments[0]instanceof tt&&typeof arguments[1]=="number"){var s=arguments[0],o=arguments[1],a=arguments[2],u=new ce(s);u.setQuadrantSegments(a);var l=u.getResultGeometry(o);return l}else if(arguments[2]instanceof It&&arguments[0]instanceof tt&&typeof arguments[1]=="number"){var c=arguments[0],f=arguments[1],p=arguments[2],v=new ce(c,p),w=v.getResultGeometry(f);return w}}else if(arguments.length===4){var I=arguments[0],P=arguments[1],M=arguments[2],m=arguments[3],_=new ce(I);_.setQuadrantSegments(M),_.setEndCapStyle(m);var g=_.getResultGeometry(P);return g}},ce.precisionScaleFactor=function(t,e,r){var i=t.getEnvelopeInternal(),s=je.max(Math.abs(i.getMaxX()),Math.abs(i.getMaxY()),Math.abs(i.getMinX()),Math.abs(i.getMinY())),o=e>0?e:0,a=s+2*o,u=Math.trunc(Math.log(a)/Math.log(10)+1),l=r-u,c=Math.pow(10,l);return c},So.CAP_ROUND.get=function(){return It.CAP_ROUND},So.CAP_BUTT.get=function(){return It.CAP_FLAT},So.CAP_FLAT.get=function(){return It.CAP_FLAT},So.CAP_SQUARE.get=function(){return It.CAP_SQUARE},So.MAX_PRECISION_DIGITS.get=function(){return 12},Object.defineProperties(ce,So);var Pe=function(){this._pt=[new D,new D],this._distance=it.NaN,this._isNull=!0};Pe.prototype.getCoordinates=function(){return this._pt},Pe.prototype.getCoordinate=function(t){return this._pt[t]},Pe.prototype.setMinimum=function(){if(arguments.length===1){var t=arguments[0];this.setMinimum(t._pt[0],t._pt[1])}else if(arguments.length===2){var e=arguments[0],r=arguments[1];if(this._isNull)return this.initialize(e,r),null;var i=e.distance(r);i<this._distance&&this.initialize(e,r,i)}},Pe.prototype.initialize=function(){if(arguments.length===0)this._isNull=!0;else if(arguments.length===2){var t=arguments[0],e=arguments[1];this._pt[0].setCoordinate(t),this._pt[1].setCoordinate(e),this._distance=t.distance(e),this._isNull=!1}else if(arguments.length===3){var r=arguments[0],i=arguments[1],s=arguments[2];this._pt[0].setCoordinate(r),this._pt[1].setCoordinate(i),this._distance=s,this._isNull=!1}},Pe.prototype.getDistance=function(){return this._distance},Pe.prototype.setMaximum=function(){if(arguments.length===1){var t=arguments[0];this.setMaximum(t._pt[0],t._pt[1])}else if(arguments.length===2){var e=arguments[0],r=arguments[1];if(this._isNull)return this.initialize(e,r),null;var i=e.distance(r);i>this._distance&&this.initialize(e,r,i)}},Pe.prototype.interfaces_=function(){return[]},Pe.prototype.getClass=function(){return Pe};var Pn=function(){};Pn.prototype.interfaces_=function(){return[]},Pn.prototype.getClass=function(){return Pn},Pn.computeDistance=function(){if(arguments[2]instanceof Pe&&arguments[0]instanceof Gt&&arguments[1]instanceof D)for(var t=arguments[0],e=arguments[1],r=arguments[2],i=t.getCoordinates(),s=new Z,o=0;o<i.length-1;o++){s.setCoordinates(i[o],i[o+1]);var a=s.closestPoint(e);r.setMinimum(a,e)}else if(arguments[2]instanceof Pe&&arguments[0]instanceof $t&&arguments[1]instanceof D){var u=arguments[0],l=arguments[1],c=arguments[2];Pn.computeDistance(u.getExteriorRing(),l,c);for(var f=0;f<u.getNumInteriorRing();f++)Pn.computeDistance(u.getInteriorRingN(f),l,c)}else if(arguments[2]instanceof Pe&&arguments[0]instanceof tt&&arguments[1]instanceof D){var p=arguments[0],v=arguments[1],w=arguments[2];if(p instanceof Gt)Pn.computeDistance(p,v,w);else if(p instanceof $t)Pn.computeDistance(p,v,w);else if(p instanceof Ee)for(var I=p,P=0;P<I.getNumGeometries();P++){var M=I.getGeometryN(P);Pn.computeDistance(M,v,w)}else w.setMinimum(p.getCoordinate(),v)}else if(arguments[2]instanceof Pe&&arguments[0]instanceof Z&&arguments[1]instanceof D){var m=arguments[0],_=arguments[1],g=arguments[2],y=m.closestPoint(_);g.setMinimum(y,_)}};var Yi=function(t){this._maxPtDist=new Pe,this._inputGeom=t||null},kl={MaxPointDistanceFilter:{configurable:!0},MaxMidpointDistanceFilter:{configurable:!0}};Yi.prototype.computeMaxMidpointDistance=function(t){var e=new wi(this._inputGeom);t.apply(e),this._maxPtDist.setMaximum(e.getMaxPointDistance())},Yi.prototype.computeMaxVertexDistance=function(t){var e=new Ts(this._inputGeom);t.apply(e),this._maxPtDist.setMaximum(e.getMaxPointDistance())},Yi.prototype.findDistance=function(t){return this.computeMaxVertexDistance(t),this.computeMaxMidpointDistance(t),this._maxPtDist.getDistance()},Yi.prototype.getDistancePoints=function(){return this._maxPtDist},Yi.prototype.interfaces_=function(){return[]},Yi.prototype.getClass=function(){return Yi},kl.MaxPointDistanceFilter.get=function(){return Ts},kl.MaxMidpointDistanceFilter.get=function(){return wi},Object.defineProperties(Yi,kl);var Ts=function(t){this._maxPtDist=new Pe,this._minPtDist=new Pe,this._geom=t||null};Ts.prototype.filter=function(t){this._minPtDist.initialize(),Pn.computeDistance(this._geom,t,this._minPtDist),this._maxPtDist.setMaximum(this._minPtDist)},Ts.prototype.getMaxPointDistance=function(){return this._maxPtDist},Ts.prototype.interfaces_=function(){return[vn]},Ts.prototype.getClass=function(){return Ts};var wi=function(t){this._maxPtDist=new Pe,this._minPtDist=new Pe,this._geom=t||null};wi.prototype.filter=function(t,e){if(e===0)return null;var r=t.getCoordinate(e-1),i=t.getCoordinate(e),s=new D((r.x+i.x)/2,(r.y+i.y)/2);this._minPtDist.initialize(),Pn.computeDistance(this._geom,s,this._minPtDist),this._maxPtDist.setMaximum(this._minPtDist)},wi.prototype.isDone=function(){return!1},wi.prototype.isGeometryChanged=function(){return!1},wi.prototype.getMaxPointDistance=function(){return this._maxPtDist},wi.prototype.interfaces_=function(){return[Or]},wi.prototype.getClass=function(){return wi};var $n=function(t){this._comps=t||null};$n.prototype.filter=function(t){t instanceof $t&&this._comps.add(t)},$n.prototype.interfaces_=function(){return[Wr]},$n.prototype.getClass=function(){return $n},$n.getPolygons=function(){if(arguments.length===1){var t=arguments[0];return $n.getPolygons(t,new z)}else if(arguments.length===2){var e=arguments[0],r=arguments[1];return e instanceof $t?r.add(e):e instanceof Ee&&e.apply(new $n(r)),r}};var he=function(){if(this._lines=null,this._isForcedToLineString=!1,arguments.length===1){var t=arguments[0];this._lines=t}else if(arguments.length===2){var e=arguments[0],r=arguments[1];this._lines=e,this._isForcedToLineString=r}};he.prototype.filter=function(t){if(this._isForcedToLineString&&t instanceof yn){var e=t.getFactory().createLineString(t.getCoordinateSequence());return this._lines.add(e),null}t instanceof Gt&&this._lines.add(t)},he.prototype.setForceToLineString=function(t){this._isForcedToLineString=t},he.prototype.interfaces_=function(){return[qn]},he.prototype.getClass=function(){return he},he.getGeometry=function(){if(arguments.length===1){var t=arguments[0];return t.getFactory().buildGeometry(he.getLines(t))}else if(arguments.length===2){var e=arguments[0],r=arguments[1];return e.getFactory().buildGeometry(he.getLines(e,r))}},he.getLines=function(){if(arguments.length===1){var t=arguments[0];return he.getLines(t,!1)}else if(arguments.length===2){if(et(arguments[0],Bt)&&et(arguments[1],Bt)){for(var e=arguments[0],r=arguments[1],i=e.iterator();i.hasNext();){var s=i.next();he.getLines(s,r)}return r}else if(arguments[0]instanceof tt&&typeof arguments[1]=="boolean"){var o=arguments[0],a=arguments[1],u=new z;return o.apply(new he(u,a)),u}else if(arguments[0]instanceof tt&&et(arguments[1],Bt)){var l=arguments[0],c=arguments[1];return l instanceof Gt?c.add(l):l.apply(new he(c)),c}}else if(arguments.length===3){if(typeof arguments[2]=="boolean"&&et(arguments[0],Bt)&&et(arguments[1],Bt)){for(var f=arguments[0],p=arguments[1],v=arguments[2],w=f.iterator();w.hasNext();){var I=w.next();he.getLines(I,p,v)}return p}else if(typeof arguments[2]=="boolean"&&arguments[0]instanceof tt&&et(arguments[1],Bt)){var P=arguments[0],M=arguments[1],m=arguments[2];return P.apply(new he(M,m)),M}}};var Lr=function(){if(this._boundaryRule=cr.OGC_SFS_BOUNDARY_RULE,this._isIn=null,this._numBoundaries=null,arguments.length!==0){if(arguments.length===1){var t=arguments[0];if(t===null)throw new Ft("Rule must be non-null");this._boundaryRule=t}}};Lr.prototype.locateInternal=function(){var t=this;if(arguments[0]instanceof D&&arguments[1]instanceof $t){var e=arguments[0],r=arguments[1];if(r.isEmpty())return R.EXTERIOR;var i=r.getExteriorRing(),s=this.locateInPolygonRing(e,i);if(s===R.EXTERIOR)return R.EXTERIOR;if(s===R.BOUNDARY)return R.BOUNDARY;for(var o=0;o<r.getNumInteriorRing();o++){var a=r.getInteriorRingN(o),u=t.locateInPolygonRing(e,a);if(u===R.INTERIOR)return R.EXTERIOR;if(u===R.BOUNDARY)return R.BOUNDARY}return R.INTERIOR}else if(arguments[0]instanceof D&&arguments[1]instanceof Gt){var l=arguments[0],c=arguments[1];if(!c.getEnvelopeInternal().intersects(l))return R.EXTERIOR;var f=c.getCoordinates();return!c.isClosed()&&(l.equals(f[0])||l.equals(f[f.length-1]))?R.BOUNDARY:G.isOnLine(l,f)?R.INTERIOR:R.EXTERIOR}else if(arguments[0]instanceof D&&arguments[1]instanceof Ue){var p=arguments[0],v=arguments[1],w=v.getCoordinate();return w.equals2D(p)?R.INTERIOR:R.EXTERIOR}},Lr.prototype.locateInPolygonRing=function(t,e){return e.getEnvelopeInternal().intersects(t)?G.locatePointInRing(t,e.getCoordinates()):R.EXTERIOR},Lr.prototype.intersects=function(t,e){return this.locate(t,e)!==R.EXTERIOR},Lr.prototype.updateLocationInfo=function(t){t===R.INTERIOR&&(this._isIn=!0),t===R.BOUNDARY&&this._numBoundaries++},Lr.prototype.computeLocation=function(t,e){var r=this;if(e instanceof Ue&&this.updateLocationInfo(this.locateInternal(t,e)),e instanceof Gt)this.updateLocationInfo(this.locateInternal(t,e));else if(e instanceof $t)this.updateLocationInfo(this.locateInternal(t,e));else if(e instanceof Ui)for(var i=e,s=0;s<i.getNumGeometries();s++){var o=i.getGeometryN(s);r.updateLocationInfo(r.locateInternal(t,o))}else if(e instanceof _n)for(var a=e,u=0;u<a.getNumGeometries();u++){var l=a.getGeometryN(u);r.updateLocationInfo(r.locateInternal(t,l))}else if(e instanceof Ee)for(var c=new Sn(e);c.hasNext();){var f=c.next();f!==e&&r.computeLocation(t,f)}},Lr.prototype.locate=function(t,e){return e.isEmpty()?R.EXTERIOR:e instanceof Gt?this.locateInternal(t,e):e instanceof $t?this.locateInternal(t,e):(this._isIn=!1,this._numBoundaries=0,this.computeLocation(t,e),this._boundaryRule.isInBoundary(this._numBoundaries)?R.BOUNDARY:this._numBoundaries>0||this._isIn?R.INTERIOR:R.EXTERIOR)},Lr.prototype.interfaces_=function(){return[]},Lr.prototype.getClass=function(){return Lr};var Ne=function n(){if(this._component=null,this._segIndex=null,this._pt=null,arguments.length===2){var t=arguments[0],e=arguments[1];n.call(this,t,n.INSIDE_AREA,e)}else if(arguments.length===3){var r=arguments[0],i=arguments[1],s=arguments[2];this._component=r,this._segIndex=i,this._pt=s}},rd={INSIDE_AREA:{configurable:!0}};Ne.prototype.isInsideArea=function(){return this._segIndex===Ne.INSIDE_AREA},Ne.prototype.getCoordinate=function(){return this._pt},Ne.prototype.getGeometryComponent=function(){return this._component},Ne.prototype.getSegmentIndex=function(){return this._segIndex},Ne.prototype.interfaces_=function(){return[]},Ne.prototype.getClass=function(){return Ne},rd.INSIDE_AREA.get=function(){return-1},Object.defineProperties(Ne,rd);var Ei=function(t){this._pts=t||null};Ei.prototype.filter=function(t){t instanceof Ue&&this._pts.add(t)},Ei.prototype.interfaces_=function(){return[Wr]},Ei.prototype.getClass=function(){return Ei},Ei.getPoints=function(){if(arguments.length===1){var t=arguments[0];return t instanceof Ue?Mr.singletonList(t):Ei.getPoints(t,new z)}else if(arguments.length===2){var e=arguments[0],r=arguments[1];return e instanceof Ue?r.add(e):e instanceof Ee&&e.apply(new Ei(r)),r}};var Os=function(){this._locations=null;var t=arguments[0];this._locations=t};Os.prototype.filter=function(t){(t instanceof Ue||t instanceof Gt||t instanceof $t)&&this._locations.add(new Ne(t,0,t.getCoordinate()))},Os.prototype.interfaces_=function(){return[Wr]},Os.prototype.getClass=function(){return Os},Os.getLocations=function(t){var e=new z;return t.apply(new Os(e)),e};var fe=function(){if(this._geom=null,this._terminateDistance=0,this._ptLocator=new Lr,this._minDistanceLocation=null,this._minDistance=it.MAX_VALUE,arguments.length===2){var t=arguments[0],e=arguments[1];this._geom=[t,e],this._terminateDistance=0}else if(arguments.length===3){var r=arguments[0],i=arguments[1],s=arguments[2];this._geom=new Array(2).fill(null),this._geom[0]=r,this._geom[1]=i,this._terminateDistance=s}};fe.prototype.computeContainmentDistance=function(){var t=this;if(arguments.length===0){var e=new Array(2).fill(null);if(this.computeContainmentDistance(0,e),this._minDistance<=this._terminateDistance)return null;this.computeContainmentDistance(1,e)}else if(arguments.length===2){var r=arguments[0],i=arguments[1],s=1-r,o=$n.getPolygons(this._geom[r]);if(o.size()>0){var a=Os.getLocations(this._geom[s]);if(this.computeContainmentDistance(a,o,i),this._minDistance<=this._terminateDistance)return this._minDistanceLocation[s]=i[0],this._minDistanceLocation[r]=i[1],null}}else if(arguments.length===3){if(arguments[2]instanceof Array&&et(arguments[0],br)&&et(arguments[1],br)){for(var u=arguments[0],l=arguments[1],c=arguments[2],f=0;f<u.size();f++)for(var p=u.get(f),v=0;v<l.size();v++)if(t.computeContainmentDistance(p,l.get(v),c),t._minDistance<=t._terminateDistance)return null}else if(arguments[2]instanceof Array&&arguments[0]instanceof Ne&&arguments[1]instanceof $t){var w=arguments[0],I=arguments[1],P=arguments[2],M=w.getCoordinate();if(R.EXTERIOR!==this._ptLocator.locate(M,I))return this._minDistance=0,P[0]=w,P[1]=new Ne(I,M),null}}},fe.prototype.computeMinDistanceLinesPoints=function(t,e,r){for(var i=this,s=0;s<t.size();s++)for(var o=t.get(s),a=0;a<e.size();a++){var u=e.get(a);if(i.computeMinDistance(o,u,r),i._minDistance<=i._terminateDistance)return null}},fe.prototype.computeFacetDistance=function(){var t=new Array(2).fill(null),e=he.getLines(this._geom[0]),r=he.getLines(this._geom[1]),i=Ei.getPoints(this._geom[0]),s=Ei.getPoints(this._geom[1]);if(this.computeMinDistanceLines(e,r,t),this.updateMinDistance(t,!1),this._minDistance<=this._terminateDistance||(t[0]=null,t[1]=null,this.computeMinDistanceLinesPoints(e,s,t),this.updateMinDistance(t,!1),this._minDistance<=this._terminateDistance)||(t[0]=null,t[1]=null,this.computeMinDistanceLinesPoints(r,i,t),this.updateMinDistance(t,!0),this._minDistance<=this._terminateDistance))return null;t[0]=null,t[1]=null,this.computeMinDistancePoints(i,s,t),this.updateMinDistance(t,!1)},fe.prototype.nearestLocations=function(){return this.computeMinDistance(),this._minDistanceLocation},fe.prototype.updateMinDistance=function(t,e){if(t[0]===null)return null;e?(this._minDistanceLocation[0]=t[1],this._minDistanceLocation[1]=t[0]):(this._minDistanceLocation[0]=t[0],this._minDistanceLocation[1]=t[1])},fe.prototype.nearestPoints=function(){this.computeMinDistance();var t=[this._minDistanceLocation[0].getCoordinate(),this._minDistanceLocation[1].getCoordinate()];return t},fe.prototype.computeMinDistance=function(){var t=this;if(arguments.length===0){if(this._minDistanceLocation!==null||(this._minDistanceLocation=new Array(2).fill(null),this.computeContainmentDistance(),this._minDistance<=this._terminateDistance))return null;this.computeFacetDistance()}else if(arguments.length===3){if(arguments[2]instanceof Array&&arguments[0]instanceof Gt&&arguments[1]instanceof Ue){var e=arguments[0],r=arguments[1],i=arguments[2];if(e.getEnvelopeInternal().distance(r.getEnvelopeInternal())>this._minDistance)return null;for(var s=e.getCoordinates(),o=r.getCoordinate(),a=0;a<s.length-1;a++){var u=G.distancePointLine(o,s[a],s[a+1]);if(u<t._minDistance){t._minDistance=u;var l=new Z(s[a],s[a+1]),c=l.closestPoint(o);i[0]=new Ne(e,a,c),i[1]=new Ne(r,0,o)}if(t._minDistance<=t._terminateDistance)return null}}else if(arguments[2]instanceof Array&&arguments[0]instanceof Gt&&arguments[1]instanceof Gt){var f=arguments[0],p=arguments[1],v=arguments[2];if(f.getEnvelopeInternal().distance(p.getEnvelopeInternal())>this._minDistance)return null;for(var w=f.getCoordinates(),I=p.getCoordinates(),P=0;P<w.length-1;P++)for(var M=0;M<I.length-1;M++){var m=G.distanceLineLine(w[P],w[P+1],I[M],I[M+1]);if(m<t._minDistance){t._minDistance=m;var _=new Z(w[P],w[P+1]),g=new Z(I[M],I[M+1]),y=_.closestPoints(g);v[0]=new Ne(f,P,y[0]),v[1]=new Ne(p,M,y[1])}if(t._minDistance<=t._terminateDistance)return null}}}},fe.prototype.computeMinDistancePoints=function(t,e,r){for(var i=this,s=0;s<t.size();s++)for(var o=t.get(s),a=0;a<e.size();a++){var u=e.get(a),l=o.getCoordinate().distance(u.getCoordinate());if(l<i._minDistance&&(i._minDistance=l,r[0]=new Ne(o,0,o.getCoordinate()),r[1]=new Ne(u,0,u.getCoordinate())),i._minDistance<=i._terminateDistance)return null}},fe.prototype.distance=function(){if(this._geom[0]===null||this._geom[1]===null)throw new Ft("null geometries are not supported");return this._geom[0].isEmpty()||this._geom[1].isEmpty()?0:(this.computeMinDistance(),this._minDistance)},fe.prototype.computeMinDistanceLines=function(t,e,r){for(var i=this,s=0;s<t.size();s++)for(var o=t.get(s),a=0;a<e.size();a++){var u=e.get(a);if(i.computeMinDistance(o,u,r),i._minDistance<=i._terminateDistance)return null}},fe.prototype.interfaces_=function(){return[]},fe.prototype.getClass=function(){return fe},fe.distance=function(t,e){var r=new fe(t,e);return r.distance()},fe.isWithinDistance=function(t,e,r){var i=new fe(t,e,r);return i.distance()<=r},fe.nearestPoints=function(t,e){var r=new fe(t,e);return r.nearestPoints()};var _e=function(){this._pt=[new D,new D],this._distance=it.NaN,this._isNull=!0};_e.prototype.getCoordinates=function(){return this._pt},_e.prototype.getCoordinate=function(t){return this._pt[t]},_e.prototype.setMinimum=function(){if(arguments.length===1){var t=arguments[0];this.setMinimum(t._pt[0],t._pt[1])}else if(arguments.length===2){var e=arguments[0],r=arguments[1];if(this._isNull)return this.initialize(e,r),null;var i=e.distance(r);i<this._distance&&this.initialize(e,r,i)}},_e.prototype.initialize=function(){if(arguments.length===0)this._isNull=!0;else if(arguments.length===2){var t=arguments[0],e=arguments[1];this._pt[0].setCoordinate(t),this._pt[1].setCoordinate(e),this._distance=t.distance(e),this._isNull=!1}else if(arguments.length===3){var r=arguments[0],i=arguments[1],s=arguments[2];this._pt[0].setCoordinate(r),this._pt[1].setCoordinate(i),this._distance=s,this._isNull=!1}},_e.prototype.toString=function(){return Nr.toLineString(this._pt[0],this._pt[1])},_e.prototype.getDistance=function(){return this._distance},_e.prototype.setMaximum=function(){if(arguments.length===1){var t=arguments[0];this.setMaximum(t._pt[0],t._pt[1])}else if(arguments.length===2){var e=arguments[0],r=arguments[1];if(this._isNull)return this.initialize(e,r),null;var i=e.distance(r);i>this._distance&&this.initialize(e,r,i)}},_e.prototype.interfaces_=function(){return[]},_e.prototype.getClass=function(){return _e};var Br=function(){};Br.prototype.interfaces_=function(){return[]},Br.prototype.getClass=function(){return Br},Br.computeDistance=function(){if(arguments[2]instanceof _e&&arguments[0]instanceof Gt&&arguments[1]instanceof D)for(var t=arguments[0],e=arguments[1],r=arguments[2],i=new Z,s=t.getCoordinates(),o=0;o<s.length-1;o++){i.setCoordinates(s[o],s[o+1]);var a=i.closestPoint(e);r.setMinimum(a,e)}else if(arguments[2]instanceof _e&&arguments[0]instanceof $t&&arguments[1]instanceof D){var u=arguments[0],l=arguments[1],c=arguments[2];Br.computeDistance(u.getExteriorRing(),l,c);for(var f=0;f<u.getNumInteriorRing();f++)Br.computeDistance(u.getInteriorRingN(f),l,c)}else if(arguments[2]instanceof _e&&arguments[0]instanceof tt&&arguments[1]instanceof D){var p=arguments[0],v=arguments[1],w=arguments[2];if(p instanceof Gt)Br.computeDistance(p,v,w);else if(p instanceof $t)Br.computeDistance(p,v,w);else if(p instanceof Ee)for(var I=p,P=0;P<I.getNumGeometries();P++){var M=I.getGeometryN(P);Br.computeDistance(M,v,w)}else w.setMinimum(p.getCoordinate(),v)}else if(arguments[2]instanceof _e&&arguments[0]instanceof Z&&arguments[1]instanceof D){var m=arguments[0],_=arguments[1],g=arguments[2],y=m.closestPoint(_);g.setMinimum(y,_)}};var gr=function(){this._g0=null,this._g1=null,this._ptDist=new _e,this._densifyFrac=0;var t=arguments[0],e=arguments[1];this._g0=t,this._g1=e},Vl={MaxPointDistanceFilter:{configurable:!0},MaxDensifiedByFractionDistanceFilter:{configurable:!0}};gr.prototype.getCoordinates=function(){return this._ptDist.getCoordinates()},gr.prototype.setDensifyFraction=function(t){if(t>1||t<=0)throw new Ft("Fraction is not in range (0.0 - 1.0]");this._densifyFrac=t},gr.prototype.compute=function(t,e){this.computeOrientedDistance(t,e,this._ptDist),this.computeOrientedDistance(e,t,this._ptDist)},gr.prototype.distance=function(){return this.compute(this._g0,this._g1),this._ptDist.getDistance()},gr.prototype.computeOrientedDistance=function(t,e,r){var i=new Ds(e);if(t.apply(i),r.setMaximum(i.getMaxPointDistance()),this._densifyFrac>0){var s=new Si(e,this._densifyFrac);t.apply(s),r.setMaximum(s.getMaxPointDistance())}},gr.prototype.orientedDistance=function(){return this.computeOrientedDistance(this._g0,this._g1,this._ptDist),this._ptDist.getDistance()},gr.prototype.interfaces_=function(){return[]},gr.prototype.getClass=function(){return gr},gr.distance=function(){if(arguments.length===2){var t=arguments[0],e=arguments[1],r=new gr(t,e);return r.distance()}else if(arguments.length===3){var i=arguments[0],s=arguments[1],o=arguments[2],a=new gr(i,s);return a.setDensifyFraction(o),a.distance()}},Vl.MaxPointDistanceFilter.get=function(){return Ds},Vl.MaxDensifiedByFractionDistanceFilter.get=function(){return Si},Object.defineProperties(gr,Vl);var Ds=function(){this._maxPtDist=new _e,this._minPtDist=new _e,this._euclideanDist=new Br,this._geom=null;var t=arguments[0];this._geom=t};Ds.prototype.filter=function(t){this._minPtDist.initialize(),Br.computeDistance(this._geom,t,this._minPtDist),this._maxPtDist.setMaximum(this._minPtDist)},Ds.prototype.getMaxPointDistance=function(){return this._maxPtDist},Ds.prototype.interfaces_=function(){return[vn]},Ds.prototype.getClass=function(){return Ds};var Si=function(){this._maxPtDist=new _e,this._minPtDist=new _e,this._geom=null,this._numSubSegs=0;var t=arguments[0],e=arguments[1];this._geom=t,this._numSubSegs=Math.trunc(Math.round(1/e))};Si.prototype.filter=function(t,e){var r=this;if(e===0)return null;for(var i=t.getCoordinate(e-1),s=t.getCoordinate(e),o=(s.x-i.x)/this._numSubSegs,a=(s.y-i.y)/this._numSubSegs,u=0;u<this._numSubSegs;u++){var l=i.x+u*o,c=i.y+u*a,f=new D(l,c);r._minPtDist.initialize(),Br.computeDistance(r._geom,f,r._minPtDist),r._maxPtDist.setMaximum(r._minPtDist)}},Si.prototype.isDone=function(){return!1},Si.prototype.isGeometryChanged=function(){return!1},Si.prototype.getMaxPointDistance=function(){return this._maxPtDist},Si.prototype.interfaces_=function(){return[Or]},Si.prototype.getClass=function(){return Si};var qe=function(t,e,r){this._minValidDistance=null,this._maxValidDistance=null,this._minDistanceFound=null,this._maxDistanceFound=null,this._isValid=!0,this._errMsg=null,this._errorLocation=null,this._errorIndicator=null,this._input=t||null,this._bufDistance=e||null,this._result=r||null},zl={VERBOSE:{configurable:!0},MAX_DISTANCE_DIFF_FRAC:{configurable:!0}};qe.prototype.checkMaximumDistance=function(t,e,r){var i=new gr(e,t);if(i.setDensifyFraction(.25),this._maxDistanceFound=i.orientedDistance(),this._maxDistanceFound>r){this._isValid=!1;var s=i.getCoordinates();this._errorLocation=s[1],this._errorIndicator=t.getFactory().createLineString(s),this._errMsg="Distance between buffer curve and input is too large ("+this._maxDistanceFound+" at "+Nr.toLineString(s[0],s[1])+")"}},qe.prototype.isValid=function(){var t=Math.abs(this._bufDistance),e=qe.MAX_DISTANCE_DIFF_FRAC*t;return this._minValidDistance=t-e,this._maxValidDistance=t+e,this._input.isEmpty()||this._result.isEmpty()?!0:(this._bufDistance>0?this.checkPositiveValid():this.checkNegativeValid(),qe.VERBOSE&&ue.out.println("Min Dist= "+this._minDistanceFound+" err= "+(1-this._minDistanceFound/this._bufDistance)+" Max Dist= "+this._maxDistanceFound+" err= "+(this._maxDistanceFound/this._bufDistance-1)),this._isValid)},qe.prototype.checkNegativeValid=function(){if(!(this._input instanceof $t||this._input instanceof _n||this._input instanceof Ee))return null;var t=this.getPolygonLines(this._input);if(this.checkMinimumDistance(t,this._result,this._minValidDistance),!this._isValid)return null;this.checkMaximumDistance(t,this._result,this._maxValidDistance)},qe.prototype.getErrorIndicator=function(){return this._errorIndicator},qe.prototype.checkMinimumDistance=function(t,e,r){var i=new fe(t,e,r);if(this._minDistanceFound=i.distance(),this._minDistanceFound<r){this._isValid=!1;var s=i.nearestPoints();this._errorLocation=i.nearestPoints()[1],this._errorIndicator=t.getFactory().createLineString(s),this._errMsg="Distance between buffer curve and input is too small ("+this._minDistanceFound+" at "+Nr.toLineString(s[0],s[1])+" )"}},qe.prototype.checkPositiveValid=function(){var t=this._result.getBoundary();if(this.checkMinimumDistance(this._input,t,this._minValidDistance),!this._isValid)return null;this.checkMaximumDistance(this._input,t,this._maxValidDistance)},qe.prototype.getErrorLocation=function(){return this._errorLocation},qe.prototype.getPolygonLines=function(t){for(var e=new z,r=new he(e),i=$n.getPolygons(t),s=i.iterator();s.hasNext();){var o=s.next();o.apply(r)}return t.getFactory().buildGeometry(e)},qe.prototype.getErrorMessage=function(){return this._errMsg},qe.prototype.interfaces_=function(){return[]},qe.prototype.getClass=function(){return qe},zl.VERBOSE.get=function(){return!1},zl.MAX_DISTANCE_DIFF_FRAC.get=function(){return .012},Object.defineProperties(qe,zl);var de=function(t,e,r){this._isValid=!0,this._errorMsg=null,this._errorLocation=null,this._errorIndicator=null,this._input=t||null,this._distance=e||null,this._result=r||null},Ul={VERBOSE:{configurable:!0},MAX_ENV_DIFF_FRAC:{configurable:!0}};de.prototype.isValid=function(){return this.checkPolygonal(),this._isValid?(this.checkExpectedEmpty(),this._isValid?(this.checkEnvelope(),this._isValid?(this.checkArea(),this._isValid?(this.checkDistance(),this._isValid):this._isValid):this._isValid):this._isValid):this._isValid},de.prototype.checkEnvelope=function(){if(this._distance<0)return null;var t=this._distance*de.MAX_ENV_DIFF_FRAC;t===0&&(t=.001);var e=new J(this._input.getEnvelopeInternal());e.expandBy(this._distance);var r=new J(this._result.getEnvelopeInternal());r.expandBy(t),r.contains(e)||(this._isValid=!1,this._errorMsg="Buffer envelope is incorrect",this._errorIndicator=this._input.getFactory().toGeometry(r)),this.report("Envelope")},de.prototype.checkDistance=function(){var t=new qe(this._input,this._distance,this._result);t.isValid()||(this._isValid=!1,this._errorMsg=t.getErrorMessage(),this._errorLocation=t.getErrorLocation(),this._errorIndicator=t.getErrorIndicator()),this.report("Distance")},de.prototype.checkArea=function(){var t=this._input.getArea(),e=this._result.getArea();this._distance>0&&t>e&&(this._isValid=!1,this._errorMsg="Area of positive buffer is smaller than input",this._errorIndicator=this._result),this._distance<0&&t<e&&(this._isValid=!1,this._errorMsg="Area of negative buffer is larger than input",this._errorIndicator=this._result),this.report("Area")},de.prototype.checkPolygonal=function(){this._result instanceof $t||this._result instanceof _n||(this._isValid=!1),this._errorMsg="Result is not polygonal",this._errorIndicator=this._result,this.report("Polygonal")},de.prototype.getErrorIndicator=function(){return this._errorIndicator},de.prototype.getErrorLocation=function(){return this._errorLocation},de.prototype.checkExpectedEmpty=function(){if(this._input.getDimension()>=2||this._distance>0)return null;this._result.isEmpty()||(this._isValid=!1,this._errorMsg="Result is non-empty",this._errorIndicator=this._result),this.report("ExpectedEmpty")},de.prototype.report=function(t){if(!de.VERBOSE)return null;ue.out.println("Check "+t+": "+(this._isValid?"passed":"FAILED"))},de.prototype.getErrorMessage=function(){return this._errorMsg},de.prototype.interfaces_=function(){return[]},de.prototype.getClass=function(){return de},de.isValidMsg=function(t,e,r){var i=new de(t,e,r);return i.isValid()?null:i.getErrorMessage()},de.isValid=function(t,e,r){var i=new de(t,e,r);return!!i.isValid()},Ul.VERBOSE.get=function(){return!1},Ul.MAX_ENV_DIFF_FRAC.get=function(){return .012},Object.defineProperties(de,Ul);var $r=function(){this._pts=null,this._data=null;var t=arguments[0],e=arguments[1];this._pts=t,this._data=e};$r.prototype.getCoordinates=function(){return this._pts},$r.prototype.size=function(){return this._pts.length},$r.prototype.getCoordinate=function(t){return this._pts[t]},$r.prototype.isClosed=function(){return this._pts[0].equals(this._pts[this._pts.length-1])},$r.prototype.getSegmentOctant=function(t){return t===this._pts.length-1?-1:Is.octant(this.getCoordinate(t),this.getCoordinate(t+1))},$r.prototype.setData=function(t){this._data=t},$r.prototype.getData=function(){return this._data},$r.prototype.toString=function(){return Nr.toLineString(new Xt(this._pts))},$r.prototype.interfaces_=function(){return[En]},$r.prototype.getClass=function(){return $r};var ie=function(){this._findAllIntersections=!1,this._isCheckEndSegmentsOnly=!1,this._li=null,this._interiorIntersection=null,this._intSegments=null,this._intersections=new z,this._intersectionCount=0,this._keepIntersections=!0;var t=arguments[0];this._li=t,this._interiorIntersection=null};ie.prototype.getInteriorIntersection=function(){return this._interiorIntersection},ie.prototype.setCheckEndSegmentsOnly=function(t){this._isCheckEndSegmentsOnly=t},ie.prototype.getIntersectionSegments=function(){return this._intSegments},ie.prototype.count=function(){return this._intersectionCount},ie.prototype.getIntersections=function(){return this._intersections},ie.prototype.setFindAllIntersections=function(t){this._findAllIntersections=t},ie.prototype.setKeepIntersections=function(t){this._keepIntersections=t},ie.prototype.processIntersections=function(t,e,r,i){if(!this._findAllIntersections&&this.hasIntersection()||t===r&&e===i)return null;if(this._isCheckEndSegmentsOnly){var s=this.isEndSegment(t,e)||this.isEndSegment(r,i);if(!s)return null}var o=t.getCoordinates()[e],a=t.getCoordinates()[e+1],u=r.getCoordinates()[i],l=r.getCoordinates()[i+1];this._li.computeIntersection(o,a,u,l),this._li.hasIntersection()&&this._li.isInteriorIntersection()&&(this._intSegments=new Array(4).fill(null),this._intSegments[0]=o,this._intSegments[1]=a,this._intSegments[2]=u,this._intSegments[3]=l,this._interiorIntersection=this._li.getIntersection(0),this._keepIntersections&&this._intersections.add(this._interiorIntersection),this._intersectionCount++)},ie.prototype.isEndSegment=function(t,e){return e===0||e>=t.size()-2},ie.prototype.hasIntersection=function(){return this._interiorIntersection!==null},ie.prototype.isDone=function(){return this._findAllIntersections?!1:this._interiorIntersection!==null},ie.prototype.interfaces_=function(){return[qi]},ie.prototype.getClass=function(){return ie},ie.createAllIntersectionsFinder=function(t){var e=new ie(t);return e.setFindAllIntersections(!0),e},ie.createAnyIntersectionFinder=function(t){return new ie(t)},ie.createIntersectionCounter=function(t){var e=new ie(t);return e.setFindAllIntersections(!0),e.setKeepIntersections(!1),e};var Ar=function(){this._li=new ki,this._segStrings=null,this._findAllIntersections=!1,this._segInt=null,this._isValid=!0;var t=arguments[0];this._segStrings=t};Ar.prototype.execute=function(){if(this._segInt!==null)return null;this.checkInteriorIntersections()},Ar.prototype.getIntersections=function(){return this._segInt.getIntersections()},Ar.prototype.isValid=function(){return this.execute(),this._isValid},Ar.prototype.setFindAllIntersections=function(t){this._findAllIntersections=t},Ar.prototype.checkInteriorIntersections=function(){this._isValid=!0,this._segInt=new ie(this._li),this._segInt.setFindAllIntersections(this._findAllIntersections);var t=new Fl;if(t.setSegmentIntersector(this._segInt),t.computeNodes(this._segStrings),this._segInt.hasIntersection())return this._isValid=!1,null},Ar.prototype.checkValid=function(){if(this.execute(),!this._isValid)throw new Zn(this.getErrorMessage(),this._segInt.getInteriorIntersection())},Ar.prototype.getErrorMessage=function(){if(this._isValid)return"no intersections found";var t=this._segInt.getIntersectionSegments();return"found non-noded intersection between "+Nr.toLineString(t[0],t[1])+" and "+Nr.toLineString(t[2],t[3])},Ar.prototype.interfaces_=function(){return[]},Ar.prototype.getClass=function(){return Ar},Ar.computeIntersections=function(t){var e=new Ar(t);return e.setFindAllIntersections(!0),e.isValid(),e.getIntersections()};var Hi=function n(){this._nv=null;var t=arguments[0];this._nv=new Ar(n.toSegmentStrings(t))};Hi.prototype.checkValid=function(){this._nv.checkValid()},Hi.prototype.interfaces_=function(){return[]},Hi.prototype.getClass=function(){return Hi},Hi.toSegmentStrings=function(t){for(var e=new z,r=t.iterator();r.hasNext();){var i=r.next();e.add(new $r(i.getCoordinates(),i))}return e},Hi.checkValid=function(t){var e=new Hi(t);e.checkValid()};var Ms=function(t){this._mapOp=t};Ms.prototype.map=function(t){for(var e=this,r=new z,i=0;i<t.getNumGeometries();i++){var s=e._mapOp.map(t.getGeometryN(i));s.isEmpty()||r.add(s)}return t.getFactory().createGeometryCollection(ft.toGeometryArray(r))},Ms.prototype.interfaces_=function(){return[]},Ms.prototype.getClass=function(){return Ms},Ms.map=function(t,e){var r=new Ms(e);return r.map(t)};var jr=function(){this._op=null,this._geometryFactory=null,this._ptLocator=null,this._lineEdgesList=new z,this._resultLineList=new z;var t=arguments[0],e=arguments[1],r=arguments[2];this._op=t,this._geometryFactory=e,this._ptLocator=r};jr.prototype.collectLines=function(t){for(var e=this,r=this._op.getGraph().getEdgeEnds().iterator();r.hasNext();){var i=r.next();e.collectLineEdge(i,t,e._lineEdgesList),e.collectBoundaryTouchEdge(i,t,e._lineEdgesList)}},jr.prototype.labelIsolatedLine=function(t,e){var r=this._ptLocator.locate(t.getCoordinate(),this._op.getArgGeometry(e));t.getLabel().setLocation(e,r)},jr.prototype.build=function(t){return this.findCoveredLineEdges(),this.collectLines(t),this.buildLines(t),this._resultLineList},jr.prototype.collectLineEdge=function(t,e,r){var i=t.getLabel(),s=t.getEdge();t.isLineEdge()&&!t.isVisited()&&at.isResultOfOp(i,e)&&!s.isCovered()&&(r.add(s),t.setVisitedEdge(!0))},jr.prototype.findCoveredLineEdges=function(){for(var t=this,e=this._op.getGraph().getNodes().iterator();e.hasNext();){var r=e.next();r.getEdges().findCoveredLineEdges()}for(var i=this._op.getGraph().getEdgeEnds().iterator();i.hasNext();){var s=i.next(),o=s.getEdge();if(s.isLineEdge()&&!o.isCoveredSet()){var a=t._op.isCoveredByA(s.getCoordinate());o.setCovered(a)}}},jr.prototype.labelIsolatedLines=function(t){for(var e=this,r=t.iterator();r.hasNext();){var i=r.next(),s=i.getLabel();i.isIsolated()&&(s.isNull(0)?e.labelIsolatedLine(i,0):e.labelIsolatedLine(i,1))}},jr.prototype.buildLines=function(t){for(var e=this,r=this._lineEdgesList.iterator();r.hasNext();){var i=r.next(),s=e._geometryFactory.createLineString(i.getCoordinates());e._resultLineList.add(s),i.setInResult(!0)}},jr.prototype.collectBoundaryTouchEdge=function(t,e,r){var i=t.getLabel();if(t.isLineEdge()||t.isVisited()||t.isInteriorAreaEdge()||t.getEdge().isInResult())return null;ut.isTrue(!(t.isInResult()||t.getSym().isInResult())||!t.getEdge().isInResult()),at.isResultOfOp(i,e)&&e===at.INTERSECTION&&(r.add(t.getEdge()),t.setVisitedEdge(!0))},jr.prototype.interfaces_=function(){return[]},jr.prototype.getClass=function(){return jr};var xs=function(){this._op=null,this._geometryFactory=null,this._resultPointList=new z;var t=arguments[0],e=arguments[1];this._op=t,this._geometryFactory=e};xs.prototype.filterCoveredNodeToPoint=function(t){var e=t.getCoordinate();if(!this._op.isCoveredByLA(e)){var r=this._geometryFactory.createPoint(e);this._resultPointList.add(r)}},xs.prototype.extractNonCoveredResultNodes=function(t){for(var e=this,r=this._op.getGraph().getNodes().iterator();r.hasNext();){var i=r.next();if(!i.isInResult()&&!i.isIncidentEdgeInResult()&&(i.getEdges().getDegree()===0||t===at.INTERSECTION)){var s=i.getLabel();at.isResultOfOp(s,t)&&e.filterCoveredNodeToPoint(i)}}},xs.prototype.build=function(t){return this.extractNonCoveredResultNodes(t),this._resultPointList},xs.prototype.interfaces_=function(){return[]},xs.prototype.getClass=function(){return xs};var Re=function(){this._inputGeom=null,this._factory=null,this._pruneEmptyGeometry=!0,this._preserveGeometryCollectionType=!0,this._preserveCollections=!1,this._preserveType=!1};Re.prototype.transformPoint=function(t,e){return this._factory.createPoint(this.transformCoordinates(t.getCoordinateSequence(),t))},Re.prototype.transformPolygon=function(t,e){var r=this,i=!0,s=this.transformLinearRing(t.getExteriorRing(),t);(s===null||!(s instanceof yn)||s.isEmpty())&&(i=!1);for(var o=new z,a=0;a<t.getNumInteriorRing();a++){var u=r.transformLinearRing(t.getInteriorRingN(a),t);u===null||u.isEmpty()||(u instanceof yn||(i=!1),o.add(u))}if(i)return this._factory.createPolygon(s,o.toArray([]));var l=new z;return s!==null&&l.add(s),l.addAll(o),this._factory.buildGeometry(l)},Re.prototype.createCoordinateSequence=function(t){return this._factory.getCoordinateSequenceFactory().create(t)},Re.prototype.getInputGeometry=function(){return this._inputGeom},Re.prototype.transformMultiLineString=function(t,e){for(var r=this,i=new z,s=0;s<t.getNumGeometries();s++){var o=r.transformLineString(t.getGeometryN(s),t);o!==null&&(o.isEmpty()||i.add(o))}return this._factory.buildGeometry(i)},Re.prototype.transformCoordinates=function(t,e){return this.copy(t)},Re.prototype.transformLineString=function(t,e){return this._factory.createLineString(this.transformCoordinates(t.getCoordinateSequence(),t))},Re.prototype.transformMultiPoint=function(t,e){for(var r=this,i=new z,s=0;s<t.getNumGeometries();s++){var o=r.transformPoint(t.getGeometryN(s),t);o!==null&&(o.isEmpty()||i.add(o))}return this._factory.buildGeometry(i)},Re.prototype.transformMultiPolygon=function(t,e){for(var r=this,i=new z,s=0;s<t.getNumGeometries();s++){var o=r.transformPolygon(t.getGeometryN(s),t);o!==null&&(o.isEmpty()||i.add(o))}return this._factory.buildGeometry(i)},Re.prototype.copy=function(t){return t.copy()},Re.prototype.transformGeometryCollection=function(t,e){for(var r=this,i=new z,s=0;s<t.getNumGeometries();s++){var o=r.transform(t.getGeometryN(s));o!==null&&(r._pruneEmptyGeometry&&o.isEmpty()||i.add(o))}return this._preserveGeometryCollectionType?this._factory.createGeometryCollection(ft.toGeometryArray(i)):this._factory.buildGeometry(i)},Re.prototype.transform=function(t){if(this._inputGeom=t,this._factory=t.getFactory(),t instanceof Ue)return this.transformPoint(t,null);if(t instanceof mo)return this.transformMultiPoint(t,null);if(t instanceof yn)return this.transformLinearRing(t,null);if(t instanceof Gt)return this.transformLineString(t,null);if(t instanceof Ui)return this.transformMultiLineString(t,null);if(t instanceof $t)return this.transformPolygon(t,null);if(t instanceof _n)return this.transformMultiPolygon(t,null);if(t instanceof Ee)return this.transformGeometryCollection(t,null);throw new Ft("Unknown Geometry subtype: "+t.getClass().getName())},Re.prototype.transformLinearRing=function(t,e){var r=this.transformCoordinates(t.getCoordinateSequence(),t);if(r===null)return this._factory.createLinearRing(null);var i=r.size();return i>0&&i<4&&!this._preserveType?this._factory.createLineString(r):this._factory.createLinearRing(r)},Re.prototype.interfaces_=function(){return[]},Re.prototype.getClass=function(){return Re};var Nn=function n(){if(this._snapTolerance=0,this._srcPts=null,this._seg=new Z,this._allowSnappingToSourceVertices=!1,this._isClosed=!1,arguments[0]instanceof Gt&&typeof arguments[1]=="number"){var t=arguments[0],e=arguments[1];n.call(this,t.getCoordinates(),e)}else if(arguments[0]instanceof Array&&typeof arguments[1]=="number"){var r=arguments[0],i=arguments[1];this._srcPts=r,this._isClosed=n.isClosed(r),this._snapTolerance=i}};Nn.prototype.snapVertices=function(t,e){for(var r=this,i=this._isClosed?t.size()-1:t.size(),s=0;s<i;s++){var o=t.get(s),a=r.findSnapForVertex(o,e);a!==null&&(t.set(s,new D(a)),s===0&&r._isClosed&&t.set(t.size()-1,new D(a)))}},Nn.prototype.findSnapForVertex=function(t,e){for(var r=this,i=0;i<e.length;i++){if(t.equals2D(e[i]))return null;if(t.distance(e[i])<r._snapTolerance)return e[i]}return null},Nn.prototype.snapTo=function(t){var e=new Ea(this._srcPts);this.snapVertices(e,t),this.snapSegments(e,t);var r=e.toCoordinateArray();return r},Nn.prototype.snapSegments=function(t,e){var r=this;if(e.length===0)return null;var i=e.length;e[0].equals2D(e[e.length-1])&&(i=e.length-1);for(var s=0;s<i;s++){var o=e[s],a=r.findSegmentIndexToSnap(o,t);a>=0&&t.add(a+1,new D(o),!1)}},Nn.prototype.findSegmentIndexToSnap=function(t,e){for(var r=this,i=it.MAX_VALUE,s=-1,o=0;o<e.size()-1;o++){if(r._seg.p0=e.get(o),r._seg.p1=e.get(o+1),r._seg.p0.equals2D(t)||r._seg.p1.equals2D(t)){if(r._allowSnappingToSourceVertices)continue;return-1}var a=r._seg.distance(t);a<r._snapTolerance&&a<i&&(i=a,s=o)}return s},Nn.prototype.setAllowSnappingToSourceVertices=function(t){this._allowSnappingToSourceVertices=t},Nn.prototype.interfaces_=function(){return[]},Nn.prototype.getClass=function(){return Nn},Nn.isClosed=function(t){return t.length<=1?!1:t[0].equals2D(t[t.length-1])};var Ht=function(t){this._srcGeom=t||null},nd={SNAP_PRECISION_FACTOR:{configurable:!0}};Ht.prototype.snapTo=function(t,e){var r=this.extractTargetCoordinates(t),i=new id(e,r);return i.transform(this._srcGeom)},Ht.prototype.snapToSelf=function(t,e){var r=this.extractTargetCoordinates(this._srcGeom),i=new id(t,r,!0),s=i.transform(this._srcGeom),o=s;return e&&et(o,gi)&&(o=s.buffer(0)),o},Ht.prototype.computeSnapTolerance=function(t){var e=this.computeMinimumSegmentLength(t),r=e/10;return r},Ht.prototype.extractTargetCoordinates=function(t){for(var e=new Gr,r=t.getCoordinates(),i=0;i<r.length;i++)e.add(r[i]);return e.toArray(new Array(0).fill(null))},Ht.prototype.computeMinimumSegmentLength=function(t){for(var e=it.MAX_VALUE,r=0;r<t.length-1;r++){var i=t[r].distance(t[r+1]);i<e&&(e=i)}return e},Ht.prototype.interfaces_=function(){return[]},Ht.prototype.getClass=function(){return Ht},Ht.snap=function(t,e,r){var i=new Array(2).fill(null),s=new Ht(t);i[0]=s.snapTo(e,r);var o=new Ht(e);return i[1]=o.snapTo(i[0],r),i},Ht.computeOverlaySnapTolerance=function(){if(arguments.length===1){var t=arguments[0],e=Ht.computeSizeBasedSnapTolerance(t),r=t.getPrecisionModel();if(r.getType()===Ct.FIXED){var i=1/r.getScale()*2/1.415;i>e&&(e=i)}return e}else if(arguments.length===2){var s=arguments[0],o=arguments[1];return Math.min(Ht.computeOverlaySnapTolerance(s),Ht.computeOverlaySnapTolerance(o))}},Ht.computeSizeBasedSnapTolerance=function(t){var e=t.getEnvelopeInternal(),r=Math.min(e.getHeight(),e.getWidth()),i=r*Ht.SNAP_PRECISION_FACTOR;return i},Ht.snapToSelf=function(t,e,r){var i=new Ht(t);return i.snapToSelf(e,r)},nd.SNAP_PRECISION_FACTOR.get=function(){return 1e-9},Object.defineProperties(Ht,nd);var id=function(n){function t(e,r,i){n.call(this),this._snapTolerance=e||null,this._snapPts=r||null,this._isSelfSnap=i!==void 0?i:!1}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.snapLine=function(r,i){var s=new Nn(r,this._snapTolerance);return s.setAllowSnappingToSourceVertices(this._isSelfSnap),s.snapTo(i)},t.prototype.transformCoordinates=function(r,i){var s=r.toCoordinateArray(),o=this.snapLine(s,this._snapPts);return this._factory.getCoordinateSequenceFactory().create(o)},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t}(Re),be=function(){this._isFirst=!0,this._commonMantissaBitsCount=53,this._commonBits=0,this._commonSignExp=null};be.prototype.getCommon=function(){return it.longBitsToDouble(this._commonBits)},be.prototype.add=function(t){var e=it.doubleToLongBits(t);if(this._isFirst)return this._commonBits=e,this._commonSignExp=be.signExpBits(this._commonBits),this._isFirst=!1,null;var r=be.signExpBits(e);if(r!==this._commonSignExp)return this._commonBits=0,null;this._commonMantissaBitsCount=be.numCommonMostSigMantissaBits(this._commonBits,e),this._commonBits=be.zeroLowerBits(this._commonBits,64-(12+this._commonMantissaBitsCount))},be.prototype.toString=function(){if(arguments.length===1){var t=arguments[0],e=it.longBitsToDouble(t),r=it.toBinaryString(t),i="0000000000000000000000000000000000000000000000000000000000000000"+r,s=i.substring(i.length-64),o=s.substring(0,1)+" "+s.substring(1,12)+"(exp) "+s.substring(12)+" [ "+e+" ]";return o}},be.prototype.interfaces_=function(){return[]},be.prototype.getClass=function(){return be},be.getBit=function(t,e){var r=1<<e;return(t&r)!==0?1:0},be.signExpBits=function(t){return t>>52},be.zeroLowerBits=function(t,e){var r=(1<<e)-1,i=~r,s=t&i;return s},be.numCommonMostSigMantissaBits=function(t,e){for(var r=0,i=52;i>=0;i--){if(be.getBit(t,i)!==be.getBit(e,i))return r;r++}return 52};var Ci=function(){this._commonCoord=null,this._ccFilter=new Ls},Gl={CommonCoordinateFilter:{configurable:!0},Translater:{configurable:!0}};Ci.prototype.addCommonBits=function(t){var e=new Ii(this._commonCoord);t.apply(e),t.geometryChanged()},Ci.prototype.removeCommonBits=function(t){if(this._commonCoord.x===0&&this._commonCoord.y===0)return t;var e=new D(this._commonCoord);e.x=-e.x,e.y=-e.y;var r=new Ii(e);return t.apply(r),t.geometryChanged(),t},Ci.prototype.getCommonCoordinate=function(){return this._commonCoord},Ci.prototype.add=function(t){t.apply(this._ccFilter),this._commonCoord=this._ccFilter.getCommonCoordinate()},Ci.prototype.interfaces_=function(){return[]},Ci.prototype.getClass=function(){return Ci},Gl.CommonCoordinateFilter.get=function(){return Ls},Gl.Translater.get=function(){return Ii},Object.defineProperties(Ci,Gl);var Ls=function(){this._commonBitsX=new be,this._commonBitsY=new be};Ls.prototype.filter=function(t){this._commonBitsX.add(t.x),this._commonBitsY.add(t.y)},Ls.prototype.getCommonCoordinate=function(){return new D(this._commonBitsX.getCommon(),this._commonBitsY.getCommon())},Ls.prototype.interfaces_=function(){return[vn]},Ls.prototype.getClass=function(){return Ls};var Ii=function(){this.trans=null;var t=arguments[0];this.trans=t};Ii.prototype.filter=function(t,e){var r=t.getOrdinate(e,0)+this.trans.x,i=t.getOrdinate(e,1)+this.trans.y;t.setOrdinate(e,0,r),t.setOrdinate(e,1,i)},Ii.prototype.isDone=function(){return!1},Ii.prototype.isGeometryChanged=function(){return!0},Ii.prototype.interfaces_=function(){return[Or]},Ii.prototype.getClass=function(){return Ii};var se=function(t,e){this._geom=new Array(2).fill(null),this._snapTolerance=null,this._cbr=null,this._geom[0]=t,this._geom[1]=e,this.computeSnapTolerance()};se.prototype.selfSnap=function(t){var e=new Ht(t),r=e.snapTo(t,this._snapTolerance);return r},se.prototype.removeCommonBits=function(t){this._cbr=new Ci,this._cbr.add(t[0]),this._cbr.add(t[1]);var e=new Array(2).fill(null);return e[0]=this._cbr.removeCommonBits(t[0].copy()),e[1]=this._cbr.removeCommonBits(t[1].copy()),e},se.prototype.prepareResult=function(t){return this._cbr.addCommonBits(t),t},se.prototype.getResultGeometry=function(t){var e=this.snap(this._geom),r=at.overlayOp(e[0],e[1],t);return this.prepareResult(r)},se.prototype.checkValid=function(t){t.isValid()||ue.out.println("Snapped geometry is invalid")},se.prototype.computeSnapTolerance=function(){this._snapTolerance=Ht.computeOverlaySnapTolerance(this._geom[0],this._geom[1])},se.prototype.snap=function(t){var e=this.removeCommonBits(t),r=Ht.snap(e[0],e[1],this._snapTolerance);return r},se.prototype.interfaces_=function(){return[]},se.prototype.getClass=function(){return se},se.overlayOp=function(t,e,r){var i=new se(t,e);return i.getResultGeometry(r)},se.union=function(t,e){return se.overlayOp(t,e,at.UNION)},se.intersection=function(t,e){return se.overlayOp(t,e,at.INTERSECTION)},se.symDifference=function(t,e){return se.overlayOp(t,e,at.SYMDIFFERENCE)},se.difference=function(t,e){return se.overlayOp(t,e,at.DIFFERENCE)};var Te=function(t,e){this._geom=new Array(2).fill(null),this._geom[0]=t,this._geom[1]=e};Te.prototype.getResultGeometry=function(t){var e=null,r=!1,i=null;try{e=at.overlayOp(this._geom[0],this._geom[1],t);var s=!0;s&&(r=!0)}catch(o){if(o instanceof Wn)i=o;else throw o}finally{}if(!r)try{e=se.overlayOp(this._geom[0],this._geom[1],t)}catch(o){throw o instanceof Wn?i:o}finally{}return e},Te.prototype.interfaces_=function(){return[]},Te.prototype.getClass=function(){return Te},Te.overlayOp=function(t,e,r){var i=new Te(t,e);return i.getResultGeometry(r)},Te.union=function(t,e){return Te.overlayOp(t,e,at.UNION)},Te.intersection=function(t,e){return Te.overlayOp(t,e,at.INTERSECTION)},Te.symDifference=function(t,e){return Te.overlayOp(t,e,at.SYMDIFFERENCE)},Te.difference=function(t,e){return Te.overlayOp(t,e,at.DIFFERENCE)};var Fa=function(){this.mce=null,this.chainIndex=null;var t=arguments[0],e=arguments[1];this.mce=t,this.chainIndex=e};Fa.prototype.computeIntersections=function(t,e){this.mce.computeIntersectsForChain(this.chainIndex,t.mce,t.chainIndex,e)},Fa.prototype.interfaces_=function(){return[]},Fa.prototype.getClass=function(){return Fa};var Xe=function n(){if(this._label=null,this._xValue=null,this._eventType=null,this._insertEvent=null,this._deleteEventIndex=null,this._obj=null,arguments.length===2){var t=arguments[0],e=arguments[1];this._eventType=n.DELETE,this._xValue=t,this._insertEvent=e}else if(arguments.length===3){var r=arguments[0],i=arguments[1],s=arguments[2];this._eventType=n.INSERT,this._label=r,this._xValue=i,this._obj=s}},Wl={INSERT:{configurable:!0},DELETE:{configurable:!0}};Xe.prototype.isDelete=function(){return this._eventType===Xe.DELETE},Xe.prototype.setDeleteEventIndex=function(t){this._deleteEventIndex=t},Xe.prototype.getObject=function(){return this._obj},Xe.prototype.compareTo=function(t){var e=t;return this._xValue<e._xValue?-1:this._xValue>e._xValue?1:this._eventType<e._eventType?-1:this._eventType>e._eventType?1:0},Xe.prototype.getInsertEvent=function(){return this._insertEvent},Xe.prototype.isInsert=function(){return this._eventType===Xe.INSERT},Xe.prototype.isSameLabel=function(t){return this._label===null?!1:this._label===t._label},Xe.prototype.getDeleteEventIndex=function(){return this._deleteEventIndex},Xe.prototype.interfaces_=function(){return[ur]},Xe.prototype.getClass=function(){return Xe},Wl.INSERT.get=function(){return 1},Wl.DELETE.get=function(){return 2},Object.defineProperties(Xe,Wl);var Du=function(){};Du.prototype.interfaces_=function(){return[]},Du.prototype.getClass=function(){return Du};var pe=function(){this._hasIntersection=!1,this._hasProper=!1,this._hasProperInterior=!1,this._properIntersectionPoint=null,this._li=null,this._includeProper=null,this._recordIsolated=null,this._isSelfIntersection=null,this._numIntersections=0,this.numTests=0,this._bdyNodes=null,this._isDone=!1,this._isDoneWhenProperInt=!1;var t=arguments[0],e=arguments[1],r=arguments[2];this._li=t,this._includeProper=e,this._recordIsolated=r};pe.prototype.isTrivialIntersection=function(t,e,r,i){if(t===r&&this._li.getIntersectionNum()===1){if(pe.isAdjacentSegments(e,i))return!0;if(t.isClosed()){var s=t.getNumPoints()-1;if(e===0&&i===s||i===0&&e===s)return!0}}return!1},pe.prototype.getProperIntersectionPoint=function(){return this._properIntersectionPoint},pe.prototype.setIsDoneIfProperInt=function(t){this._isDoneWhenProperInt=t},pe.prototype.hasProperInteriorIntersection=function(){return this._hasProperInterior},pe.prototype.isBoundaryPointInternal=function(t,e){for(var r=e.iterator();r.hasNext();){var i=r.next(),s=i.getCoordinate();if(t.isIntersection(s))return!0}return!1},pe.prototype.hasProperIntersection=function(){return this._hasProper},pe.prototype.hasIntersection=function(){return this._hasIntersection},pe.prototype.isDone=function(){return this._isDone},pe.prototype.isBoundaryPoint=function(t,e){return e===null?!1:!!(this.isBoundaryPointInternal(t,e[0])||this.isBoundaryPointInternal(t,e[1]))},pe.prototype.setBoundaryNodes=function(t,e){this._bdyNodes=new Array(2).fill(null),this._bdyNodes[0]=t,this._bdyNodes[1]=e},pe.prototype.addIntersections=function(t,e,r,i){if(t===r&&e===i)return null;this.numTests++;var s=t.getCoordinates()[e],o=t.getCoordinates()[e+1],a=r.getCoordinates()[i],u=r.getCoordinates()[i+1];this._li.computeIntersection(s,o,a,u),this._li.hasIntersection()&&(this._recordIsolated&&(t.setIsolated(!1),r.setIsolated(!1)),this._numIntersections++,this.isTrivialIntersection(t,e,r,i)||(this._hasIntersection=!0,(this._includeProper||!this._li.isProper())&&(t.addIntersections(this._li,e,0),r.addIntersections(this._li,i,1)),this._li.isProper()&&(this._properIntersectionPoint=this._li.getIntersection(0).copy(),this._hasProper=!0,this._isDoneWhenProperInt&&(this._isDone=!0),this.isBoundaryPoint(this._li,this._bdyNodes)||(this._hasProperInterior=!0))))},pe.prototype.interfaces_=function(){return[]},pe.prototype.getClass=function(){return pe},pe.isAdjacentSegments=function(t,e){return Math.abs(t-e)===1};var sv=function(n){function t(){n.call(this),this.events=new z,this.nOverlaps=null}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.prepareEvents=function(){var r=this;Mr.sort(this.events);for(var i=0;i<this.events.size();i++){var s=r.events.get(i);s.isDelete()&&s.getInsertEvent().setDeleteEventIndex(i)}},t.prototype.computeIntersections=function(){var r=this;if(arguments.length===1){var i=arguments[0];this.nOverlaps=0,this.prepareEvents();for(var s=0;s<this.events.size();s++){var o=r.events.get(s);if(o.isInsert()&&r.processOverlaps(s,o.getDeleteEventIndex(),o,i),i.isDone())break}}else if(arguments.length===3){if(arguments[2]instanceof pe&&et(arguments[0],br)&&et(arguments[1],br)){var a=arguments[0],u=arguments[1],l=arguments[2];this.addEdges(a,a),this.addEdges(u,u),this.computeIntersections(l)}else if(typeof arguments[2]=="boolean"&&et(arguments[0],br)&&arguments[1]instanceof pe){var c=arguments[0],f=arguments[1],p=arguments[2];p?this.addEdges(c,null):this.addEdges(c),this.computeIntersections(f)}}},t.prototype.addEdge=function(r,i){for(var s=this,o=r.getMonotoneChainEdge(),a=o.getStartIndexes(),u=0;u<a.length-1;u++){var l=new Fa(o,u),c=new Xe(i,o.getMinX(u),l);s.events.add(c),s.events.add(new Xe(o.getMaxX(u),c))}},t.prototype.processOverlaps=function(r,i,s,o){for(var a=this,u=s.getObject(),l=r;l<i;l++){var c=a.events.get(l);if(c.isInsert()){var f=c.getObject();s.isSameLabel(c)||(u.computeIntersections(f,o),a.nOverlaps++)}}},t.prototype.addEdges=function(){var r=this;if(arguments.length===1)for(var i=arguments[0],s=i.iterator();s.hasNext();){var o=s.next();r.addEdge(o,o)}else if(arguments.length===2)for(var a=arguments[0],u=arguments[1],l=a.iterator();l.hasNext();){var c=l.next();r.addEdge(c,u)}},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t}(Du),bn=function(){this._min=it.POSITIVE_INFINITY,this._max=it.NEGATIVE_INFINITY},sd={NodeComparator:{configurable:!0}};bn.prototype.getMin=function(){return this._min},bn.prototype.intersects=function(t,e){return!(this._min>e||this._max<t)},bn.prototype.getMax=function(){return this._max},bn.prototype.toString=function(){return Nr.toLineString(new D(this._min,0),new D(this._max,0))},bn.prototype.interfaces_=function(){return[]},bn.prototype.getClass=function(){return bn},sd.NodeComparator.get=function(){return ka},Object.defineProperties(bn,sd);var ka=function(){};ka.prototype.compare=function(t,e){var r=t,i=e,s=(r._min+r._max)/2,o=(i._min+i._max)/2;return s<o?-1:s>o?1:0},ka.prototype.interfaces_=function(){return[io]},ka.prototype.getClass=function(){return ka};var ov=function(n){function t(){n.call(this),this._item=null;var e=arguments[0],r=arguments[1],i=arguments[2];this._min=e,this._max=r,this._item=i}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.query=function(r,i,s){if(!this.intersects(r,i))return null;s.visitItem(this._item)},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t}(bn),av=function(n){function t(){n.call(this),this._node1=null,this._node2=null;var e=arguments[0],r=arguments[1];this._node1=e,this._node2=r,this.buildExtent(this._node1,this._node2)}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.buildExtent=function(r,i){this._min=Math.min(r._min,i._min),this._max=Math.max(r._max,i._max)},t.prototype.query=function(r,i,s){if(!this.intersects(r,i))return null;this._node1!==null&&this._node1.query(r,i,s),this._node2!==null&&this._node2.query(r,i,s)},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t}(bn),Tn=function(){this._leaves=new z,this._root=null,this._level=0};Tn.prototype.buildTree=function(){var t=this;Mr.sort(this._leaves,new bn.NodeComparator);for(var e=this._leaves,r=null,i=new z;;){if(t.buildLevel(e,i),i.size()===1)return i.get(0);r=e,e=i,i=r}},Tn.prototype.insert=function(t,e,r){if(this._root!==null)throw new Error("Index cannot be added to once it has been queried");this._leaves.add(new ov(t,e,r))},Tn.prototype.query=function(t,e,r){this.init(),this._root.query(t,e,r)},Tn.prototype.buildRoot=function(){if(this._root!==null)return null;this._root=this.buildTree()},Tn.prototype.printNode=function(t){ue.out.println(Nr.toLineString(new D(t._min,this._level),new D(t._max,this._level)))},Tn.prototype.init=function(){if(this._root!==null)return null;this.buildRoot()},Tn.prototype.buildLevel=function(t,e){this._level++,e.clear();for(var r=0;r<t.size();r+=2){var i=t.get(r),s=r+1<t.size()?t.get(r):null;if(s===null)e.add(i);else{var o=new av(t.get(r),t.get(r+1));e.add(o)}}},Tn.prototype.interfaces_=function(){return[]},Tn.prototype.getClass=function(){return Tn};var Co=function(){this._items=new z};Co.prototype.visitItem=function(t){this._items.add(t)},Co.prototype.getItems=function(){return this._items},Co.prototype.interfaces_=function(){return[mi]},Co.prototype.getClass=function(){return Co};var Io=function(){this._index=null;var t=arguments[0];if(!et(t,gi))throw new Ft("Argument must be Polygonal");this._index=new Ji(t)},ql={SegmentVisitor:{configurable:!0},IntervalIndexedGeometry:{configurable:!0}};Io.prototype.locate=function(t){var e=new Ur(t),r=new Po(e);return this._index.query(t.y,t.y,r),e.getLocation()},Io.prototype.interfaces_=function(){return[wo]},Io.prototype.getClass=function(){return Io},ql.SegmentVisitor.get=function(){return Po},ql.IntervalIndexedGeometry.get=function(){return Ji},Object.defineProperties(Io,ql);var Po=function(){this._counter=null;var t=arguments[0];this._counter=t};Po.prototype.visitItem=function(t){var e=t;this._counter.countSegment(e.getCoordinate(0),e.getCoordinate(1))},Po.prototype.interfaces_=function(){return[mi]},Po.prototype.getClass=function(){return Po};var Ji=function(){this._index=new Tn;var t=arguments[0];this.init(t)};Ji.prototype.init=function(t){for(var e=this,r=he.getLines(t),i=r.iterator();i.hasNext();){var s=i.next(),o=s.getCoordinates();e.addLine(o)}},Ji.prototype.addLine=function(t){for(var e=this,r=1;r<t.length;r++){var i=new Z(t[r-1],t[r]),s=Math.min(i.p0.y,i.p1.y),o=Math.max(i.p0.y,i.p1.y);e._index.insert(s,o,i)}},Ji.prototype.query=function(){if(arguments.length===2){var t=arguments[0],e=arguments[1],r=new Co;return this._index.query(t,e,r),r.getItems()}else if(arguments.length===3){var i=arguments[0],s=arguments[1],o=arguments[2];this._index.query(i,s,o)}},Ji.prototype.interfaces_=function(){return[]},Ji.prototype.getClass=function(){return Ji};var Va=function(n){function t(){if(n.call(this),this._parentGeom=null,this._lineEdgeMap=new Uf,this._boundaryNodeRule=null,this._useBoundaryDeterminationRule=!0,this._argIndex=null,this._boundaryNodes=null,this._hasTooFewPoints=!1,this._invalidPoint=null,this._areaPtLocator=null,this._ptLocator=new Lr,arguments.length===2){var e=arguments[0],r=arguments[1],i=cr.OGC_SFS_BOUNDARY_RULE;this._argIndex=e,this._parentGeom=r,this._boundaryNodeRule=i,r!==null&&this.add(r)}else if(arguments.length===3){var s=arguments[0],o=arguments[1],a=arguments[2];this._argIndex=s,this._parentGeom=o,this._boundaryNodeRule=a,o!==null&&this.add(o)}}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.insertBoundaryPoint=function(r,i){var s=this._nodes.addNode(i),o=s.getLabel(),a=1,u=R.NONE;u=o.getLocation(r,V.ON),u===R.BOUNDARY&&a++;var l=t.determineBoundary(this._boundaryNodeRule,a);o.setLocation(r,l)},t.prototype.computeSelfNodes=function(){if(arguments.length===2){var r=arguments[0],i=arguments[1];return this.computeSelfNodes(r,i,!1)}else if(arguments.length===3){var s=arguments[0],o=arguments[1],a=arguments[2],u=new pe(s,!0,!1);u.setIsDoneIfProperInt(a);var l=this.createEdgeSetIntersector(),c=this._parentGeom instanceof yn||this._parentGeom instanceof $t||this._parentGeom instanceof _n,f=o||!c;return l.computeIntersections(this._edges,u,f),this.addSelfIntersectionNodes(this._argIndex),u}},t.prototype.computeSplitEdges=function(r){for(var i=this._edges.iterator();i.hasNext();){var s=i.next();s.eiList.addSplitEdges(r)}},t.prototype.computeEdgeIntersections=function(r,i,s){var o=new pe(i,s,!0);o.setBoundaryNodes(this.getBoundaryNodes(),r.getBoundaryNodes());var a=this.createEdgeSetIntersector();return a.computeIntersections(this._edges,r._edges,o),o},t.prototype.getGeometry=function(){return this._parentGeom},t.prototype.getBoundaryNodeRule=function(){return this._boundaryNodeRule},t.prototype.hasTooFewPoints=function(){return this._hasTooFewPoints},t.prototype.addPoint=function(){if(arguments[0]instanceof Ue){var r=arguments[0],i=r.getCoordinate();this.insertPoint(this._argIndex,i,R.INTERIOR)}else if(arguments[0]instanceof D){var s=arguments[0];this.insertPoint(this._argIndex,s,R.INTERIOR)}},t.prototype.addPolygon=function(r){var i=this;this.addPolygonRing(r.getExteriorRing(),R.EXTERIOR,R.INTERIOR);for(var s=0;s<r.getNumInteriorRing();s++){var o=r.getInteriorRingN(s);i.addPolygonRing(o,R.INTERIOR,R.EXTERIOR)}},t.prototype.addEdge=function(r){this.insertEdge(r);var i=r.getCoordinates();this.insertPoint(this._argIndex,i[0],R.BOUNDARY),this.insertPoint(this._argIndex,i[i.length-1],R.BOUNDARY)},t.prototype.addLineString=function(r){var i=ht.removeRepeatedPoints(r.getCoordinates());if(i.length<2)return this._hasTooFewPoints=!0,this._invalidPoint=i[0],null;var s=new Ou(i,new bt(this._argIndex,R.INTERIOR));this._lineEdgeMap.put(r,s),this.insertEdge(s),ut.isTrue(i.length>=2,"found LineString with single point"),this.insertBoundaryPoint(this._argIndex,i[0]),this.insertBoundaryPoint(this._argIndex,i[i.length-1])},t.prototype.getInvalidPoint=function(){return this._invalidPoint},t.prototype.getBoundaryPoints=function(){for(var r=this.getBoundaryNodes(),i=new Array(r.size()).fill(null),s=0,o=r.iterator();o.hasNext();){var a=o.next();i[s++]=a.getCoordinate().copy()}return i},t.prototype.getBoundaryNodes=function(){return this._boundaryNodes===null&&(this._boundaryNodes=this._nodes.getBoundaryNodes(this._argIndex)),this._boundaryNodes},t.prototype.addSelfIntersectionNode=function(r,i,s){if(this.isBoundaryNode(r,i))return null;s===R.BOUNDARY&&this._useBoundaryDeterminationRule?this.insertBoundaryPoint(r,i):this.insertPoint(r,i,s)},t.prototype.addPolygonRing=function(r,i,s){if(r.isEmpty())return null;var o=ht.removeRepeatedPoints(r.getCoordinates());if(o.length<4)return this._hasTooFewPoints=!0,this._invalidPoint=o[0],null;var a=i,u=s;G.isCCW(o)&&(a=s,u=i);var l=new Ou(o,new bt(this._argIndex,R.BOUNDARY,a,u));this._lineEdgeMap.put(r,l),this.insertEdge(l),this.insertPoint(this._argIndex,o[0],R.BOUNDARY)},t.prototype.insertPoint=function(r,i,s){var o=this._nodes.addNode(i),a=o.getLabel();a===null?o._label=new bt(r,s):a.setLocation(r,s)},t.prototype.createEdgeSetIntersector=function(){return new sv},t.prototype.addSelfIntersectionNodes=function(r){for(var i=this,s=this._edges.iterator();s.hasNext();)for(var o=s.next(),a=o.getLabel().getLocation(r),u=o.eiList.iterator();u.hasNext();){var l=u.next();i.addSelfIntersectionNode(r,l.coord,a)}},t.prototype.add=function(){if(arguments.length===1){var r=arguments[0];if(r.isEmpty())return null;if(r instanceof _n&&(this._useBoundaryDeterminationRule=!1),r instanceof $t)this.addPolygon(r);else if(r instanceof Gt)this.addLineString(r);else if(r instanceof Ue)this.addPoint(r);else if(r instanceof mo)this.addCollection(r);else if(r instanceof Ui)this.addCollection(r);else if(r instanceof _n)this.addCollection(r);else if(r instanceof Ee)this.addCollection(r);else throw new Error(r.getClass().getName())}else return n.prototype.add.apply(this,arguments)},t.prototype.addCollection=function(r){for(var i=this,s=0;s<r.getNumGeometries();s++){var o=r.getGeometryN(s);i.add(o)}},t.prototype.locate=function(r){return et(this._parentGeom,gi)&&this._parentGeom.getNumGeometries()>50?(this._areaPtLocator===null&&(this._areaPtLocator=new Io(this._parentGeom)),this._areaPtLocator.locate(r)):this._ptLocator.locate(r,this._parentGeom)},t.prototype.findEdge=function(){if(arguments.length===1){var r=arguments[0];return this._lineEdgeMap.get(r)}else return n.prototype.findEdge.apply(this,arguments)},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t.determineBoundary=function(r,i){return r.isInBoundary(i)?R.BOUNDARY:R.INTERIOR},t}(Ut),No=function(){if(this._li=new ki,this._resultPrecisionModel=null,this._arg=null,arguments.length===1){var t=arguments[0];this.setComputationPrecision(t.getPrecisionModel()),this._arg=new Array(1).fill(null),this._arg[0]=new Va(0,t)}else if(arguments.length===2){var e=arguments[0],r=arguments[1],i=cr.OGC_SFS_BOUNDARY_RULE;e.getPrecisionModel().compareTo(r.getPrecisionModel())>=0?this.setComputationPrecision(e.getPrecisionModel()):this.setComputationPrecision(r.getPrecisionModel()),this._arg=new Array(2).fill(null),this._arg[0]=new Va(0,e,i),this._arg[1]=new Va(1,r,i)}else if(arguments.length===3){var s=arguments[0],o=arguments[1],a=arguments[2];s.getPrecisionModel().compareTo(o.getPrecisionModel())>=0?this.setComputationPrecision(s.getPrecisionModel()):this.setComputationPrecision(o.getPrecisionModel()),this._arg=new Array(2).fill(null),this._arg[0]=new Va(0,s,a),this._arg[1]=new Va(1,o,a)}};No.prototype.getArgGeometry=function(t){return this._arg[t].getGeometry()},No.prototype.setComputationPrecision=function(t){this._resultPrecisionModel=t,this._li.setPrecisionModel(this._resultPrecisionModel)},No.prototype.interfaces_=function(){return[]},No.prototype.getClass=function(){return No};var Zi=function(){};Zi.prototype.interfaces_=function(){return[]},Zi.prototype.getClass=function(){return Zi},Zi.map=function(){if(arguments[0]instanceof tt&&et(arguments[1],Zi.MapOp)){for(var t=arguments[0],e=arguments[1],r=new z,i=0;i<t.getNumGeometries();i++){var s=e.map(t.getGeometryN(i));s!==null&&r.add(s)}return t.getFactory().buildGeometry(r)}else if(et(arguments[0],Bt)&&et(arguments[1],Zi.MapOp)){for(var o=arguments[0],a=arguments[1],u=new z,l=o.iterator();l.hasNext();){var c=l.next(),f=a.map(c);f!==null&&u.add(f)}return u}},Zi.MapOp=function(){};var at=function(n){function t(){var e=arguments[0],r=arguments[1];n.call(this,e,r),this._ptLocator=new Lr,this._geomFact=null,this._resultGeom=null,this._graph=null,this._edgeList=new xr,this._resultPolyList=new z,this._resultLineList=new z,this._resultPointList=new z,this._graph=new Ut(new Qf),this._geomFact=e.getFactory()}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.insertUniqueEdge=function(r){var i=this._edgeList.findEqualEdge(r);if(i!==null){var s=i.getLabel(),o=r.getLabel();i.isPointwiseEqual(r)||(o=new bt(r.getLabel()),o.flip());var a=i.getDepth();a.isNull()&&a.add(s),a.add(o),s.merge(o)}else this._edgeList.add(r)},t.prototype.getGraph=function(){return this._graph},t.prototype.cancelDuplicateResultEdges=function(){for(var r=this._graph.getEdgeEnds().iterator();r.hasNext();){var i=r.next(),s=i.getSym();i.isInResult()&&s.isInResult()&&(i.setInResult(!1),s.setInResult(!1))}},t.prototype.isCoveredByLA=function(r){return!!(this.isCovered(r,this._resultLineList)||this.isCovered(r,this._resultPolyList))},t.prototype.computeGeometry=function(r,i,s,o){var a=new z;return a.addAll(r),a.addAll(i),a.addAll(s),a.isEmpty()?t.createEmptyResult(o,this._arg[0].getGeometry(),this._arg[1].getGeometry(),this._geomFact):this._geomFact.buildGeometry(a)},t.prototype.mergeSymLabels=function(){for(var r=this._graph.getNodes().iterator();r.hasNext();){var i=r.next();i.getEdges().mergeSymLabels()}},t.prototype.isCovered=function(r,i){for(var s=this,o=i.iterator();o.hasNext();){var a=o.next(),u=s._ptLocator.locate(r,a);if(u!==R.EXTERIOR)return!0}return!1},t.prototype.replaceCollapsedEdges=function(){for(var r=new z,i=this._edgeList.iterator();i.hasNext();){var s=i.next();s.isCollapsed()&&(i.remove(),r.add(s.getCollapsedEdge()))}this._edgeList.addAll(r)},t.prototype.updateNodeLabelling=function(){for(var r=this._graph.getNodes().iterator();r.hasNext();){var i=r.next(),s=i.getEdges().getLabel();i.getLabel().merge(s)}},t.prototype.getResultGeometry=function(r){return this.computeOverlay(r),this._resultGeom},t.prototype.insertUniqueEdges=function(r){for(var i=this,s=r.iterator();s.hasNext();){var o=s.next();i.insertUniqueEdge(o)}},t.prototype.computeOverlay=function(r){this.copyPoints(0),this.copyPoints(1),this._arg[0].computeSelfNodes(this._li,!1),this._arg[1].computeSelfNodes(this._li,!1),this._arg[0].computeEdgeIntersections(this._arg[1],this._li,!0);var i=new z;this._arg[0].computeSplitEdges(i),this._arg[1].computeSplitEdges(i),this.insertUniqueEdges(i),this.computeLabelsFromDepths(),this.replaceCollapsedEdges(),Hi.checkValid(this._edgeList.getEdges()),this._graph.addEdges(this._edgeList.getEdges()),this.computeLabelling(),this.labelIncompleteNodes(),this.findResultAreaEdges(r),this.cancelDuplicateResultEdges();var s=new Ge(this._geomFact);s.add(this._graph),this._resultPolyList=s.getPolygons();var o=new jr(this,this._geomFact,this._ptLocator);this._resultLineList=o.build(r);var a=new xs(this,this._geomFact,this._ptLocator);this._resultPointList=a.build(r),this._resultGeom=this.computeGeometry(this._resultPointList,this._resultLineList,this._resultPolyList,r)},t.prototype.labelIncompleteNode=function(r,i){var s=this._ptLocator.locate(r.getCoordinate(),this._arg[i].getGeometry());r.getLabel().setLocation(i,s)},t.prototype.copyPoints=function(r){for(var i=this,s=this._arg[r].getNodeIterator();s.hasNext();){var o=s.next(),a=i._graph.addNode(o.getCoordinate());a.setLabel(r,o.getLabel().getLocation(r))}},t.prototype.findResultAreaEdges=function(r){for(var i=this._graph.getEdgeEnds().iterator();i.hasNext();){var s=i.next(),o=s.getLabel();o.isArea()&&!s.isInteriorAreaEdge()&&t.isResultOfOp(o.getLocation(0,V.RIGHT),o.getLocation(1,V.RIGHT),r)&&s.setInResult(!0)}},t.prototype.computeLabelsFromDepths=function(){for(var r=this._edgeList.iterator();r.hasNext();){var i=r.next(),s=i.getLabel(),o=i.getDepth();if(!o.isNull()){o.normalize();for(var a=0;a<2;a++)!s.isNull(a)&&s.isArea()&&!o.isNull(a)&&(o.getDelta(a)===0?s.toLine(a):(ut.isTrue(!o.isNull(a,V.LEFT),"depth of LEFT side has not been initialized"),s.setLocation(a,V.LEFT,o.getLocation(a,V.LEFT)),ut.isTrue(!o.isNull(a,V.RIGHT),"depth of RIGHT side has not been initialized"),s.setLocation(a,V.RIGHT,o.getLocation(a,V.RIGHT))))}}},t.prototype.computeLabelling=function(){for(var r=this,i=this._graph.getNodes().iterator();i.hasNext();){var s=i.next();s.getEdges().computeLabelling(r._arg)}this.mergeSymLabels(),this.updateNodeLabelling()},t.prototype.labelIncompleteNodes=function(){for(var r=this,i=this._graph.getNodes().iterator();i.hasNext();){var s=i.next(),o=s.getLabel();s.isIsolated()&&(o.isNull(0)?r.labelIncompleteNode(s,0):r.labelIncompleteNode(s,1)),s.getEdges().updateLabelling(o)}},t.prototype.isCoveredByA=function(r){return!!this.isCovered(r,this._resultPolyList)},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t}(No);at.overlayOp=function(n,t,e){var r=new at(n,t),i=r.getResultGeometry(e);return i},at.intersection=function(n,t){if(n.isEmpty()||t.isEmpty())return at.createEmptyResult(at.INTERSECTION,n,t,n.getFactory());if(n.isGeometryCollection()){var e=t;return Ms.map(n,{interfaces_:function(){return[Zi.MapOp]},map:function(r){return r.intersection(e)}})}return n.checkNotGeometryCollection(n),n.checkNotGeometryCollection(t),Te.overlayOp(n,t,at.INTERSECTION)},at.symDifference=function(n,t){if(n.isEmpty()||t.isEmpty()){if(n.isEmpty()&&t.isEmpty())return at.createEmptyResult(at.SYMDIFFERENCE,n,t,n.getFactory());if(n.isEmpty())return t.copy();if(t.isEmpty())return n.copy()}return n.checkNotGeometryCollection(n),n.checkNotGeometryCollection(t),Te.overlayOp(n,t,at.SYMDIFFERENCE)},at.resultDimension=function(n,t,e){var r=t.getDimension(),i=e.getDimension(),s=-1;switch(n){case at.INTERSECTION:s=Math.min(r,i);break;case at.UNION:s=Math.max(r,i);break;case at.DIFFERENCE:s=r;break;case at.SYMDIFFERENCE:s=Math.max(r,i);break}return s},at.createEmptyResult=function(n,t,e,r){var i=null;switch(at.resultDimension(n,t,e)){case-1:i=r.createGeometryCollection(new Array(0).fill(null));break;case 0:i=r.createPoint();break;case 1:i=r.createLineString();break;case 2:i=r.createPolygon();break}return i},at.difference=function(n,t){return n.isEmpty()?at.createEmptyResult(at.DIFFERENCE,n,t,n.getFactory()):t.isEmpty()?n.copy():(n.checkNotGeometryCollection(n),n.checkNotGeometryCollection(t),Te.overlayOp(n,t,at.DIFFERENCE))},at.isResultOfOp=function(){if(arguments.length===2){var n=arguments[0],t=arguments[1],e=n.getLocation(0),r=n.getLocation(1);return at.isResultOfOp(e,r,t)}else if(arguments.length===3){var i=arguments[0],s=arguments[1],o=arguments[2];switch(i===R.BOUNDARY&&(i=R.INTERIOR),s===R.BOUNDARY&&(s=R.INTERIOR),o){case at.INTERSECTION:return i===R.INTERIOR&&s===R.INTERIOR;case at.UNION:return i===R.INTERIOR||s===R.INTERIOR;case at.DIFFERENCE:return i===R.INTERIOR&&s!==R.INTERIOR;case at.SYMDIFFERENCE:return i===R.INTERIOR&&s!==R.INTERIOR||i!==R.INTERIOR&&s===R.INTERIOR}return!1}},at.INTERSECTION=1,at.UNION=2,at.DIFFERENCE=3,at.SYMDIFFERENCE=4;var Pi=function(){this._g=null,this._boundaryDistanceTolerance=null,this._linework=null,this._ptLocator=new Lr,this._seg=new Z;var t=arguments[0],e=arguments[1];this._g=t,this._boundaryDistanceTolerance=e,this._linework=this.extractLinework(t)};Pi.prototype.isWithinToleranceOfBoundary=function(t){for(var e=this,r=0;r<this._linework.getNumGeometries();r++)for(var i=e._linework.getGeometryN(r),s=i.getCoordinateSequence(),o=0;o<s.size()-1;o++){s.getCoordinate(o,e._seg.p0),s.getCoordinate(o+1,e._seg.p1);var a=e._seg.distance(t);if(a<=e._boundaryDistanceTolerance)return!0}return!1},Pi.prototype.getLocation=function(t){return this.isWithinToleranceOfBoundary(t)?R.BOUNDARY:this._ptLocator.locate(t,this._g)},Pi.prototype.extractLinework=function(t){var e=new bo;t.apply(e);var r=e.getLinework(),i=ft.toLineStringArray(r);return t.getFactory().createMultiLineString(i)},Pi.prototype.interfaces_=function(){return[]},Pi.prototype.getClass=function(){return Pi};var bo=function(){this._linework=null,this._linework=new z};bo.prototype.getLinework=function(){return this._linework},bo.prototype.filter=function(t){var e=this;if(t instanceof $t){var r=t;this._linework.add(r.getExteriorRing());for(var i=0;i<r.getNumInteriorRing();i++)e._linework.add(r.getInteriorRingN(i))}},bo.prototype.interfaces_=function(){return[Wr]},bo.prototype.getClass=function(){return bo};var Ki=function(){this._g=null,this._doLeft=!0,this._doRight=!0;var t=arguments[0];this._g=t};Ki.prototype.extractPoints=function(t,e,r){for(var i=this,s=t.getCoordinates(),o=0;o<s.length-1;o++)i.computeOffsetPoints(s[o],s[o+1],e,r)},Ki.prototype.setSidesToGenerate=function(t,e){this._doLeft=t,this._doRight=e},Ki.prototype.getPoints=function(t){for(var e=this,r=new z,i=he.getLines(this._g),s=i.iterator();s.hasNext();){var o=s.next();e.extractPoints(o,t,r)}return r},Ki.prototype.computeOffsetPoints=function(t,e,r,i){var s=e.x-t.x,o=e.y-t.y,a=Math.sqrt(s*s+o*o),u=r*s/a,l=r*o/a,c=(e.x+t.x)/2,f=(e.y+t.y)/2;if(this._doLeft){var p=new D(c-l,f+u);i.add(p)}if(this._doRight){var v=new D(c+l,f-u);i.add(v)}},Ki.prototype.interfaces_=function(){return[]},Ki.prototype.getClass=function(){return Ki};var ir=function n(){this._geom=null,this._locFinder=null,this._location=new Array(3).fill(null),this._invalidLocation=null,this._boundaryDistanceTolerance=n.TOLERANCE,this._testCoords=new z;var t=arguments[0],e=arguments[1],r=arguments[2];this._boundaryDistanceTolerance=n.computeBoundaryDistanceTolerance(t,e),this._geom=[t,e,r],this._locFinder=[new Pi(this._geom[0],this._boundaryDistanceTolerance),new Pi(this._geom[1],this._boundaryDistanceTolerance),new Pi(this._geom[2],this._boundaryDistanceTolerance)]},od={TOLERANCE:{configurable:!0}};ir.prototype.reportResult=function(t,e,r){ue.out.println("Overlay result invalid - A:"+R.toLocationSymbol(e[0])+" B:"+R.toLocationSymbol(e[1])+" expected:"+(r?"i":"e")+" actual:"+R.toLocationSymbol(e[2]))},ir.prototype.isValid=function(t){this.addTestPts(this._geom[0]),this.addTestPts(this._geom[1]);var e=this.checkValid(t);return e},ir.prototype.checkValid=function(){var t=this;if(arguments.length===1){for(var e=arguments[0],r=0;r<this._testCoords.size();r++){var i=t._testCoords.get(r);if(!t.checkValid(e,i))return t._invalidLocation=i,!1}return!0}else if(arguments.length===2){var s=arguments[0],o=arguments[1];return this._location[0]=this._locFinder[0].getLocation(o),this._location[1]=this._locFinder[1].getLocation(o),this._location[2]=this._locFinder[2].getLocation(o),ir.hasLocation(this._location,R.BOUNDARY)?!0:this.isValidResult(s,this._location)}},ir.prototype.addTestPts=function(t){var e=new Ki(t);this._testCoords.addAll(e.getPoints(5*this._boundaryDistanceTolerance))},ir.prototype.isValidResult=function(t,e){var r=at.isResultOfOp(e[0],e[1],t),i=e[2]===R.INTERIOR,s=!(r^i);return s||this.reportResult(t,e,r),s},ir.prototype.getInvalidLocation=function(){return this._invalidLocation},ir.prototype.interfaces_=function(){return[]},ir.prototype.getClass=function(){return ir},ir.hasLocation=function(t,e){for(var r=0;r<3;r++)if(t[r]===e)return!0;return!1},ir.computeBoundaryDistanceTolerance=function(t,e){return Math.min(Ht.computeSizeBasedSnapTolerance(t),Ht.computeSizeBasedSnapTolerance(e))},ir.isValid=function(t,e,r,i){var s=new ir(t,e,i);return s.isValid(r)},od.TOLERANCE.get=function(){return 1e-6},Object.defineProperties(ir,od);var sr=function n(t){this._geomFactory=null,this._skipEmpty=!1,this._inputGeoms=null,this._geomFactory=n.extractFactory(t),this._inputGeoms=t};sr.prototype.extractElements=function(t,e){var r=this;if(t===null)return null;for(var i=0;i<t.getNumGeometries();i++){var s=t.getGeometryN(i);r._skipEmpty&&s.isEmpty()||e.add(s)}},sr.prototype.combine=function(){for(var t=this,e=new z,r=this._inputGeoms.iterator();r.hasNext();){var i=r.next();t.extractElements(i,e)}return e.size()===0?this._geomFactory!==null?this._geomFactory.createGeometryCollection(null):null:this._geomFactory.buildGeometry(e)},sr.prototype.interfaces_=function(){return[]},sr.prototype.getClass=function(){return sr},sr.combine=function(){if(arguments.length===1){var t=arguments[0],e=new sr(t);return e.combine()}else if(arguments.length===2){var r=arguments[0],i=arguments[1],s=new sr(sr.createList(r,i));return s.combine()}else if(arguments.length===3){var o=arguments[0],a=arguments[1],u=arguments[2],l=new sr(sr.createList(o,a,u));return l.combine()}},sr.extractFactory=function(t){return t.isEmpty()?null:t.iterator().next().getFactory()},sr.createList=function(){if(arguments.length===2){var t=arguments[0],e=arguments[1],r=new z;return r.add(t),r.add(e),r}else if(arguments.length===3){var i=arguments[0],s=arguments[1],o=arguments[2],a=new z;return a.add(i),a.add(s),a.add(o),a}};var Kt=function(){this._inputPolys=null,this._geomFactory=null;var t=arguments[0];this._inputPolys=t,this._inputPolys===null&&(this._inputPolys=new z)},ad={STRTREE_NODE_CAPACITY:{configurable:!0}};Kt.prototype.reduceToGeometries=function(t){for(var e=this,r=new z,i=t.iterator();i.hasNext();){var s=i.next(),o=null;et(s,br)?o=e.unionTree(s):s instanceof tt&&(o=s),r.add(o)}return r},Kt.prototype.extractByEnvelope=function(t,e,r){for(var i=new z,s=0;s<e.getNumGeometries();s++){var o=e.getGeometryN(s);o.getEnvelopeInternal().intersects(t)?i.add(o):r.add(o)}return this._geomFactory.buildGeometry(i)},Kt.prototype.unionOptimized=function(t,e){var r=t.getEnvelopeInternal(),i=e.getEnvelopeInternal();if(!r.intersects(i)){var s=sr.combine(t,e);return s}if(t.getNumGeometries()<=1&&e.getNumGeometries()<=1)return this.unionActual(t,e);var o=r.intersection(i);return this.unionUsingEnvelopeIntersection(t,e,o)},Kt.prototype.union=function(){if(this._inputPolys===null)throw new Error("union() method cannot be called twice");if(this._inputPolys.isEmpty())return null;this._geomFactory=this._inputPolys.iterator().next().getFactory();for(var t=new Xf(Kt.STRTREE_NODE_CAPACITY),e=this._inputPolys.iterator();e.hasNext();){var r=e.next();t.insert(r.getEnvelopeInternal(),r)}this._inputPolys=null;var i=t.itemsTree(),s=this.unionTree(i);return s},Kt.prototype.binaryUnion=function(){if(arguments.length===1){var t=arguments[0];return this.binaryUnion(t,0,t.size())}else if(arguments.length===3){var e=arguments[0],r=arguments[1],i=arguments[2];if(i-r<=1){var s=Kt.getGeometry(e,r);return this.unionSafe(s,null)}else{if(i-r===2)return this.unionSafe(Kt.getGeometry(e,r),Kt.getGeometry(e,r+1));var o=Math.trunc((i+r)/2),a=this.binaryUnion(e,r,o),u=this.binaryUnion(e,o,i);return this.unionSafe(a,u)}}},Kt.prototype.repeatedUnion=function(t){for(var e=null,r=t.iterator();r.hasNext();){var i=r.next();e===null?e=i.copy():e=e.union(i)}return e},Kt.prototype.unionSafe=function(t,e){return t===null&&e===null?null:t===null?e.copy():e===null?t.copy():this.unionOptimized(t,e)},Kt.prototype.unionActual=function(t,e){return Kt.restrictToPolygons(t.union(e))},Kt.prototype.unionTree=function(t){var e=this.reduceToGeometries(t),r=this.binaryUnion(e);return r},Kt.prototype.unionUsingEnvelopeIntersection=function(t,e,r){var i=new z,s=this.extractByEnvelope(r,t,i),o=this.extractByEnvelope(r,e,i),a=this.unionActual(s,o);i.add(a);var u=sr.combine(i);return u},Kt.prototype.bufferUnion=function(){if(arguments.length===1){var t=arguments[0],e=t.get(0).getFactory(),r=e.buildGeometry(t),i=r.buffer(0);return i}else if(arguments.length===2){var s=arguments[0],o=arguments[1],a=s.getFactory(),u=a.createGeometryCollection([s,o]),l=u.buffer(0);return l}},Kt.prototype.interfaces_=function(){return[]},Kt.prototype.getClass=function(){return Kt},Kt.restrictToPolygons=function(t){if(et(t,gi))return t;var e=$n.getPolygons(t);return e.size()===1?e.get(0):t.getFactory().createMultiPolygon(ft.toPolygonArray(e))},Kt.getGeometry=function(t,e){return e>=t.size()?null:t.get(e)},Kt.union=function(t){var e=new Kt(t);return e.union()},ad.STRTREE_NODE_CAPACITY.get=function(){return 4},Object.defineProperties(Kt,ad);var Mu=function(){};Mu.prototype.interfaces_=function(){return[]},Mu.prototype.getClass=function(){return Mu},Mu.union=function(t,e){if(t.isEmpty()||e.isEmpty()){if(t.isEmpty()&&e.isEmpty())return at.createEmptyResult(at.UNION,t,e,t.getFactory());if(t.isEmpty())return e.copy();if(e.isEmpty())return t.copy()}return t.checkNotGeometryCollection(t),t.checkNotGeometryCollection(e),Te.overlayOp(t,e,at.UNION)};function Qi(){return new xu}function xu(){this.reset()}xu.prototype={constructor:xu,reset:function(){this.s=this.t=0},add:function(n){ud(Lu,n,this.t),ud(this,Lu.s,this.s),this.s?this.t+=Lu.t:this.s=Lu.t},valueOf:function(){return this.s}};var Lu=new xu;function ud(n,t,e){var r=n.s=t+e,i=r-t,s=r-i;n.t=t-s+(e-i)}var Qt=1e-6,Dt=Math.PI,jn=Dt/2,ld=Dt/4,ti=Dt*2,Bi=180/Dt,tn=Dt/180,Oe=Math.abs,uv=Math.atan,To=Math.atan2,te=Math.cos,ee=Math.sin,Oo=Math.sqrt;function cd(n){return n>1?0:n<-1?Dt:Math.acos(n)}function As(n){return n>1?jn:n<-1?-jn:Math.asin(n)}function za(){}function Au(n,t){n&&fd.hasOwnProperty(n.type)&&fd[n.type](n,t)}var hd={Feature:function(n,t){Au(n.geometry,t)},FeatureCollection:function(n,t){for(var e=n.features,r=-1,i=e.length;++r<i;)Au(e[r].geometry,t)}},fd={Sphere:function(n,t){t.sphere()},Point:function(n,t){n=n.coordinates,t.point(n[0],n[1],n[2])},MultiPoint:function(n,t){for(var e=n.coordinates,r=-1,i=e.length;++r<i;)n=e[r],t.point(n[0],n[1],n[2])},LineString:function(n,t){Xl(n.coordinates,t,0)},MultiLineString:function(n,t){for(var e=n.coordinates,r=-1,i=e.length;++r<i;)Xl(e[r],t,0)},Polygon:function(n,t){dd(n.coordinates,t)},MultiPolygon:function(n,t){for(var e=n.coordinates,r=-1,i=e.length;++r<i;)dd(e[r],t)},GeometryCollection:function(n,t){for(var e=n.geometries,r=-1,i=e.length;++r<i;)Au(e[r],t)}};function Xl(n,t,e){var r=-1,i=n.length-e,s;for(t.lineStart();++r<i;)s=n[r],t.point(s[0],s[1],s[2]);t.lineEnd()}function dd(n,t){var e=-1,r=n.length;for(t.polygonStart();++e<r;)Xl(n[e],t,1);t.polygonEnd()}function lv(n,t){n&&hd.hasOwnProperty(n.type)?hd[n.type](n,t):Au(n,t)}Qi(),Qi();function Yl(n){return[To(n[1],n[0]),As(n[2])]}function Do(n){var t=n[0],e=n[1],r=te(e);return[r*te(t),r*ee(t),ee(e)]}function Ru(n,t){return n[0]*t[0]+n[1]*t[1]+n[2]*t[2]}function Fu(n,t){return[n[1]*t[2]-n[2]*t[1],n[2]*t[0]-n[0]*t[2],n[0]*t[1]-n[1]*t[0]]}function Hl(n,t){n[0]+=t[0],n[1]+=t[1],n[2]+=t[2]}function ku(n,t){return[n[0]*t,n[1]*t,n[2]*t]}function Jl(n){var t=Oo(n[0]*n[0]+n[1]*n[1]+n[2]*n[2]);n[0]/=t,n[1]/=t,n[2]/=t}Qi();function pd(n,t){function e(r,i){return r=n(r,i),t(r[0],r[1])}return n.invert&&t.invert&&(e.invert=function(r,i){return r=t.invert(r,i),r&&n.invert(r[0],r[1])}),e}function Zl(n,t){return[n>Dt?n-ti:n<-Dt?n+ti:n,t]}Zl.invert=Zl;function cv(n,t,e){return(n%=ti)?t||e?pd(md(n),vd(t,e)):md(n):t||e?vd(t,e):Zl}function gd(n){return function(t,e){return t+=n,[t>Dt?t-ti:t<-Dt?t+ti:t,e]}}function md(n){var t=gd(n);return t.invert=gd(-n),t}function vd(n,t){var e=te(n),r=ee(n),i=te(t),s=ee(t);function o(a,u){var l=te(u),c=te(a)*l,f=ee(a)*l,p=ee(u),v=p*e+c*r;return[To(f*i-v*s,c*e-p*r),As(v*i+f*s)]}return o.invert=function(a,u){var l=te(u),c=te(a)*l,f=ee(a)*l,p=ee(u),v=p*i-f*s;return[To(f*i+p*s,c*e+v*r),As(v*e-c*r)]},o}function hv(n,t,e,r,i,s){if(e){var o=te(t),a=ee(t),u=r*e;i==null?(i=t+r*ti,s=t-u/2):(i=yd(o,i),s=yd(o,s),(r>0?i<s:i>s)&&(i+=r*ti));for(var l,c=i;r>0?c>s:c<s;c-=u)l=Yl([o,-a*te(c),-a*ee(c)]),n.point(l[0],l[1])}}function yd(n,t){t=Do(t),t[0]-=n,Jl(t);var e=cd(-t[1]);return((-t[2]<0?-e:e)+ti-Qt)%ti}function _d(){var n=[],t;return{point:function(e,r){t.push([e,r])},lineStart:function(){n.push(t=[])},lineEnd:za,rejoin:function(){n.length>1&&n.push(n.pop().concat(n.shift()))},result:function(){var e=n;return n=[],t=null,e}}}function fv(n,t,e,r,i,s){var o=n[0],a=n[1],u=t[0],l=t[1],c=0,f=1,p=u-o,v=l-a,w;if(w=e-o,!(!p&&w>0)){if(w/=p,p<0){if(w<c)return;w<f&&(f=w)}else if(p>0){if(w>f)return;w>c&&(c=w)}if(w=i-o,!(!p&&w<0)){if(w/=p,p<0){if(w>f)return;w>c&&(c=w)}else if(p>0){if(w<c)return;w<f&&(f=w)}if(w=r-a,!(!v&&w>0)){if(w/=v,v<0){if(w<c)return;w<f&&(f=w)}else if(v>0){if(w>f)return;w>c&&(c=w)}if(w=s-a,!(!v&&w<0)){if(w/=v,v<0){if(w>f)return;w>c&&(c=w)}else if(v>0){if(w<c)return;w<f&&(f=w)}return c>0&&(n[0]=o+c*p,n[1]=a+c*v),f<1&&(t[0]=o+f*p,t[1]=a+f*v),!0}}}}}function Vu(n,t){return Oe(n[0]-t[0])<Qt&&Oe(n[1]-t[1])<Qt}function zu(n,t,e,r){this.x=n,this.z=t,this.o=e,this.e=r,this.v=!1,this.n=this.p=null}function wd(n,t,e,r,i){var s=[],o=[],a,u;if(n.forEach(function(w){if(!((I=w.length-1)<=0)){var I,P=w[0],M=w[I],m;if(Vu(P,M)){for(i.lineStart(),a=0;a<I;++a)i.point((P=w[a])[0],P[1]);i.lineEnd();return}s.push(m=new zu(P,w,null,!0)),o.push(m.o=new zu(P,null,m,!1)),s.push(m=new zu(M,w,null,!1)),o.push(m.o=new zu(M,null,m,!0))}}),!!s.length){for(o.sort(t),Ed(s),Ed(o),a=0,u=o.length;a<u;++a)o[a].e=e=!e;for(var l=s[0],c,f;;){for(var p=l,v=!0;p.v;)if((p=p.n)===l)return;c=p.z,i.lineStart();do{if(p.v=p.o.v=!0,p.e){if(v)for(a=0,u=c.length;a<u;++a)i.point((f=c[a])[0],f[1]);else r(p.x,p.n.x,1,i);p=p.n}else{if(v)for(c=p.p.z,a=c.length-1;a>=0;--a)i.point((f=c[a])[0],f[1]);else r(p.x,p.p.x,-1,i);p=p.p}p=p.o,c=p.z,v=!v}while(!p.v);i.lineEnd()}}}function Ed(n){if(t=n.length){for(var t,e=0,r=n[0],i;++e<t;)r.n=i=n[e],i.p=r,r=i;r.n=i=n[0],i.p=r}}function Sd(n,t){return n<t?-1:n>t?1:n>=t?0:NaN}function dv(n){return n.length===1&&(n=pv(n)),{left:function(t,e,r,i){for(r==null&&(r=0),i==null&&(i=t.length);r<i;){var s=r+i>>>1;n(t[s],e)<0?r=s+1:i=s}return r},right:function(t,e,r,i){for(r==null&&(r=0),i==null&&(i=t.length);r<i;){var s=r+i>>>1;n(t[s],e)>0?i=s:r=s+1}return r}}}function pv(n){return function(t,e){return Sd(n(t),e)}}dv(Sd);function Cd(n){for(var t=n.length,e,r=-1,i=0,s,o;++r<t;)i+=n[r].length;for(s=new Array(i);--t>=0;)for(o=n[t],e=o.length;--e>=0;)s[--i]=o[e];return s}var Uu=1e9,Gu=-1e9;function gv(n,t,e,r){function i(l,c){return n<=l&&l<=e&&t<=c&&c<=r}function s(l,c,f,p){var v=0,w=0;if(l==null||(v=o(l,f))!==(w=o(c,f))||u(l,c)<0^f>0)do p.point(v===0||v===3?n:e,v>1?r:t);while((v=(v+f+4)%4)!==w);else p.point(c[0],c[1])}function o(l,c){return Oe(l[0]-n)<Qt?c>0?0:3:Oe(l[0]-e)<Qt?c>0?2:1:Oe(l[1]-t)<Qt?c>0?1:0:c>0?3:2}function a(l,c){return u(l.x,c.x)}function u(l,c){var f=o(l,1),p=o(c,1);return f!==p?f-p:f===0?c[1]-l[1]:f===1?l[0]-c[0]:f===2?l[1]-c[1]:c[0]-l[0]}return function(l){var c=l,f=_d(),p,v,w,I,P,M,m,_,g,y,E,S={point:N,lineStart:O,lineEnd:A,polygonStart:x,polygonEnd:b};function N(X,U){i(X,U)&&c.point(X,U)}function T(){for(var X=0,U=0,K=v.length;U<K;++U)for(var st=v[U],lt=1,q=st.length,Y=st[0],H,dt,Tt=Y[0],wt=Y[1];lt<q;++lt)H=Tt,dt=wt,Y=st[lt],Tt=Y[0],wt=Y[1],dt<=r?wt>r&&(Tt-H)*(r-dt)>(wt-dt)*(n-H)&&++X:wt<=r&&(Tt-H)*(r-dt)<(wt-dt)*(n-H)&&--X;return X}function x(){c=f,p=[],v=[],E=!0}function b(){var X=T(),U=E&&X,K=(p=Cd(p)).length;(U||K)&&(l.polygonStart(),U&&(l.lineStart(),s(null,null,1,l),l.lineEnd()),K&&wd(p,a,X,s,l),l.polygonEnd()),c=l,p=v=w=null}function O(){S.point=F,v&&v.push(w=[]),y=!0,g=!1,m=_=NaN}function A(){p&&(F(I,P),M&&g&&f.rejoin(),p.push(f.result())),S.point=N,g&&c.lineEnd()}function F(X,U){var K=i(X,U);if(v&&w.push([X,U]),y)I=X,P=U,M=K,y=!1,K&&(c.lineStart(),c.point(X,U));else if(K&&g)c.point(X,U);else{var st=[m=Math.max(Gu,Math.min(Uu,m)),_=Math.max(Gu,Math.min(Uu,_))],lt=[X=Math.max(Gu,Math.min(Uu,X)),U=Math.max(Gu,Math.min(Uu,U))];fv(st,lt,n,t,e,r)?(g||(c.lineStart(),c.point(st[0],st[1])),c.point(lt[0],lt[1]),K||c.lineEnd(),E=!1):K&&(c.lineStart(),c.point(X,U),E=!1)}m=X,_=U,g=K}return S}}var Kl=Qi();function mv(n,t){var e=t[0],r=t[1],i=[ee(e),-te(e),0],s=0,o=0;Kl.reset();for(var a=0,u=n.length;a<u;++a)if(c=(l=n[a]).length)for(var l,c,f=l[c-1],p=f[0],v=f[1]/2+ld,w=ee(v),I=te(v),P=0;P<c;++P,p=m,w=g,I=y,f=M){var M=l[P],m=M[0],_=M[1]/2+ld,g=ee(_),y=te(_),E=m-p,S=E>=0?1:-1,N=S*E,T=N>Dt,x=w*g;if(Kl.add(To(x*S*ee(N),I*y+x*te(N))),s+=T?E+S*ti:E,T^p>=e^m>=e){var b=Fu(Do(f),Do(M));Jl(b);var O=Fu(i,b);Jl(O);var A=(T^E>=0?-1:1)*As(O[2]);(r>A||r===A&&(b[0]||b[1]))&&(o+=T^E>=0?1:-1)}}return(s<-1e-6||s<Qt&&Kl<-1e-6)^o&1}Qi();function Id(n){return n}Qi(),Qi();var Mo=1/0,Wu=Mo,Ua=-Mo,qu=Ua,Pd={point:vv,lineStart:za,lineEnd:za,polygonStart:za,polygonEnd:za,result:function(){var n=[[Mo,Wu],[Ua,qu]];return Ua=qu=-(Wu=Mo=1/0),n}};function vv(n,t){n<Mo&&(Mo=n),n>Ua&&(Ua=n),t<Wu&&(Wu=t),t>qu&&(qu=t)}Qi();function Nd(n,t,e,r){return function(i,s){var o=t(s),a=i.invert(r[0],r[1]),u=_d(),l=t(u),c=!1,f,p,v,w={point:I,lineStart:M,lineEnd:m,polygonStart:function(){w.point=_,w.lineStart=g,w.lineEnd=y,p=[],f=[]},polygonEnd:function(){w.point=I,w.lineStart=M,w.lineEnd=m,p=Cd(p);var E=mv(f,a);p.length?(c||(s.polygonStart(),c=!0),wd(p,_v,E,e,s)):E&&(c||(s.polygonStart(),c=!0),s.lineStart(),e(null,null,1,s),s.lineEnd()),c&&(s.polygonEnd(),c=!1),p=f=null},sphere:function(){s.polygonStart(),s.lineStart(),e(null,null,1,s),s.lineEnd(),s.polygonEnd()}};function I(E,S){var N=i(E,S);n(E=N[0],S=N[1])&&s.point(E,S)}function P(E,S){var N=i(E,S);o.point(N[0],N[1])}function M(){w.point=P,o.lineStart()}function m(){w.point=I,o.lineEnd()}function _(E,S){v.push([E,S]);var N=i(E,S);l.point(N[0],N[1])}function g(){l.lineStart(),v=[]}function y(){_(v[0][0],v[0][1]),l.lineEnd();var E=l.clean(),S=u.result(),N,T=S.length,x,b,O;if(v.pop(),f.push(v),v=null,!!T){if(E&1){if(b=S[0],(x=b.length-1)>0){for(c||(s.polygonStart(),c=!0),s.lineStart(),N=0;N<x;++N)s.point((O=b[N])[0],O[1]);s.lineEnd()}return}T>1&&E&2&&S.push(S.pop().concat(S.shift())),p.push(S.filter(yv))}}return w}}function yv(n){return n.length>1}function _v(n,t){return((n=n.x)[0]<0?n[1]-jn-Qt:jn-n[1])-((t=t.x)[0]<0?t[1]-jn-Qt:jn-t[1])}const bd=Nd(function(){return!0},wv,Sv,[-Dt,-jn]);function wv(n){var t=NaN,e=NaN,r=NaN,i;return{lineStart:function(){n.lineStart(),i=1},point:function(s,o){var a=s>0?Dt:-Dt,u=Oe(s-t);Oe(u-Dt)<Qt?(n.point(t,e=(e+o)/2>0?jn:-jn),n.point(r,e),n.lineEnd(),n.lineStart(),n.point(a,e),n.point(s,e),i=0):r!==a&&u>=Dt&&(Oe(t-r)<Qt&&(t-=r*Qt),Oe(s-a)<Qt&&(s-=a*Qt),e=Ev(t,e,s,o),n.point(r,e),n.lineEnd(),n.lineStart(),n.point(a,e),i=0),n.point(t=s,e=o),r=a},lineEnd:function(){n.lineEnd(),t=e=NaN},clean:function(){return 2-i}}}function Ev(n,t,e,r){var i,s,o=ee(n-e);return Oe(o)>Qt?uv((ee(t)*(s=te(r))*ee(e)-ee(r)*(i=te(t))*ee(n))/(i*s*o)):(t+r)/2}function Sv(n,t,e,r){var i;if(n==null)i=e*jn,r.point(-Dt,i),r.point(0,i),r.point(Dt,i),r.point(Dt,0),r.point(Dt,-i),r.point(0,-i),r.point(-Dt,-i),r.point(-Dt,0),r.point(-Dt,i);else if(Oe(n[0]-t[0])>Qt){var s=n[0]<t[0]?Dt:-Dt;i=e*s/2,r.point(-s,i),r.point(0,i),r.point(s,i)}else r.point(t[0],t[1])}function Cv(n,t){var e=te(n),r=e>0,i=Oe(e)>Qt;function s(c,f,p,v){hv(v,n,t,p,c,f)}function o(c,f){return te(c)*te(f)>e}function a(c){var f,p,v,w,I;return{lineStart:function(){w=v=!1,I=1},point:function(P,M){var m=[P,M],_,g=o(P,M),y=r?g?0:l(P,M):g?l(P+(P<0?Dt:-Dt),M):0;if(!f&&(w=v=g)&&c.lineStart(),g!==v&&(_=u(f,m),(!_||Vu(f,_)||Vu(m,_))&&(m[0]+=Qt,m[1]+=Qt,g=o(m[0],m[1]))),g!==v)I=0,g?(c.lineStart(),_=u(m,f),c.point(_[0],_[1])):(_=u(f,m),c.point(_[0],_[1]),c.lineEnd()),f=_;else if(i&&f&&r^g){var E;!(y&p)&&(E=u(m,f,!0))&&(I=0,r?(c.lineStart(),c.point(E[0][0],E[0][1]),c.point(E[1][0],E[1][1]),c.lineEnd()):(c.point(E[1][0],E[1][1]),c.lineEnd(),c.lineStart(),c.point(E[0][0],E[0][1])))}g&&(!f||!Vu(f,m))&&c.point(m[0],m[1]),f=m,v=g,p=y},lineEnd:function(){v&&c.lineEnd(),f=null},clean:function(){return I|(w&&v)<<1}}}function u(c,f,p){var v=Do(c),w=Do(f),I=[1,0,0],P=Fu(v,w),M=Ru(P,P),m=P[0],_=M-m*m;if(!_)return!p&&c;var g=e*M/_,y=-e*m/_,E=Fu(I,P),S=ku(I,g),N=ku(P,y);Hl(S,N);var T=E,x=Ru(S,T),b=Ru(T,T),O=x*x-b*(Ru(S,S)-1);if(!(O<0)){var A=Oo(O),F=ku(T,(-x-A)/b);if(Hl(F,S),F=Yl(F),!p)return F;var X=c[0],U=f[0],K=c[1],st=f[1],lt;U<X&&(lt=X,X=U,U=lt);var q=U-X,Y=Oe(q-Dt)<Qt,H=Y||q<Qt;if(!Y&&st<K&&(lt=K,K=st,st=lt),H?Y?K+st>0^F[1]<(Oe(F[0]-X)<Qt?K:st):K<=F[1]&&F[1]<=st:q>Dt^(X<=F[0]&&F[0]<=U)){var dt=ku(T,(-x+A)/b);return Hl(dt,S),[F,Yl(dt)]}}}function l(c,f){var p=r?n:Dt-n,v=0;return c<-p?v|=1:c>p&&(v|=2),f<-p?v|=4:f>p&&(v|=8),v}return Nd(o,a,s,r?[0,-n]:[-Dt,n-Dt])}function Td(n){return function(t){var e=new Ql;for(var r in n)e[r]=n[r];return e.stream=t,e}}function Ql(){}Ql.prototype={constructor:Ql,point:function(n,t){this.stream.point(n,t)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}};function Od(n,t,e){var r=t[1][0]-t[0][0],i=t[1][1]-t[0][1],s=n.clipExtent&&n.clipExtent();n.scale(150).translate([0,0]),s!=null&&n.clipExtent(null),lv(e,n.stream(Pd));var o=Pd.result(),a=Math.min(r/(o[1][0]-o[0][0]),i/(o[1][1]-o[0][1])),u=+t[0][0]+(r-a*(o[1][0]+o[0][0]))/2,l=+t[0][1]+(i-a*(o[1][1]+o[0][1]))/2;return s!=null&&n.clipExtent(s),n.scale(a*150).translate([u,l])}function Iv(n,t,e){return Od(n,[[0,0],t],e)}var Dd=16,Pv=te(30*tn);function Md(n,t){return+t?bv(n,t):Nv(n)}function Nv(n){return Td({point:function(t,e){t=n(t,e),this.stream.point(t[0],t[1])}})}function bv(n,t){function e(r,i,s,o,a,u,l,c,f,p,v,w,I,P){var M=l-r,m=c-i,_=M*M+m*m;if(_>4*t&&I--){var g=o+p,y=a+v,E=u+w,S=Oo(g*g+y*y+E*E),N=As(E/=S),T=Oe(Oe(E)-1)<Qt||Oe(s-f)<Qt?(s+f)/2:To(y,g),x=n(T,N),b=x[0],O=x[1],A=b-r,F=O-i,X=m*A-M*F;(X*X/_>t||Oe((M*A+m*F)/_-.5)>.3||o*p+a*v+u*w<Pv)&&(e(r,i,s,o,a,u,b,O,T,g/=S,y/=S,E,I,P),P.point(b,O),e(b,O,T,g,y,E,l,c,f,p,v,w,I,P))}}return function(r){var i,s,o,a,u,l,c,f,p,v,w,I,P={point:M,lineStart:m,lineEnd:g,polygonStart:function(){r.polygonStart(),P.lineStart=y},polygonEnd:function(){r.polygonEnd(),P.lineStart=m}};function M(N,T){N=n(N,T),r.point(N[0],N[1])}function m(){f=NaN,P.point=_,r.lineStart()}function _(N,T){var x=Do([N,T]),b=n(N,T);e(f,p,c,v,w,I,f=b[0],p=b[1],c=N,v=x[0],w=x[1],I=x[2],Dd,r),r.point(f,p)}function g(){P.point=M,r.lineEnd()}function y(){m(),P.point=E,P.lineEnd=S}function E(N,T){_(i=N,T),s=f,o=p,a=v,u=w,l=I,P.point=_}function S(){e(f,p,c,v,w,I,s,o,i,a,u,l,Dd,r),P.lineEnd=g,g()}return P}}var Tv=Td({point:function(n,t){this.stream.point(n*tn,t*tn)}});function Ov(n){return Dv(function(){return n})()}function Dv(n){var t,e=150,r=480,i=250,s,o,a=0,u=0,l=0,c=0,f=0,p,v,w=null,I=bd,P=null,M,m,_,g=Id,y=.5,E=Md(b,y),S,N;function T(F){return F=v(F[0]*tn,F[1]*tn),[F[0]*e+s,o-F[1]*e]}function x(F){return F=v.invert((F[0]-s)/e,(o-F[1])/e),F&&[F[0]*Bi,F[1]*Bi]}function b(F,X){return F=t(F,X),[F[0]*e+s,o-F[1]*e]}T.stream=function(F){return S&&N===F?S:S=Tv(I(p,E(g(N=F))))},T.clipAngle=function(F){return arguments.length?(I=+F?Cv(w=F*tn,6*tn):(w=null,bd),A()):w*Bi},T.clipExtent=function(F){return arguments.length?(g=F==null?(P=M=m=_=null,Id):gv(P=+F[0][0],M=+F[0][1],m=+F[1][0],_=+F[1][1]),A()):P==null?null:[[P,M],[m,_]]},T.scale=function(F){return arguments.length?(e=+F,O()):e},T.translate=function(F){return arguments.length?(r=+F[0],i=+F[1],O()):[r,i]},T.center=function(F){return arguments.length?(a=F[0]%360*tn,u=F[1]%360*tn,O()):[a*Bi,u*Bi]},T.rotate=function(F){return arguments.length?(l=F[0]%360*tn,c=F[1]%360*tn,f=F.length>2?F[2]%360*tn:0,O()):[l*Bi,c*Bi,f*Bi]},T.precision=function(F){return arguments.length?(E=Md(b,y=F*F),A()):Oo(y)},T.fitExtent=function(F,X){return Od(T,F,X)},T.fitSize=function(F,X){return Iv(T,F,X)};function O(){v=pd(p=cv(l,c,f),t);var F=t(a,u);return s=r-F[0]*e,o=i+F[1]*e,A()}function A(){return S=N=null,T}return function(){return t=n.apply(this,arguments),T.invert=t.invert&&x,O()}}function xd(n){return function(t,e){var r=te(t),i=te(e),s=n(r*i);return[s*i*ee(t),s*ee(e)]}}function Ld(n){return function(t,e){var r=Oo(t*t+e*e),i=n(r),s=ee(i),o=te(i);return[To(t*s,r*o),As(r&&e*s/r)]}}var Mv=xd(function(n){return Oo(2/(1+n))});Mv.invert=Ld(function(n){return 2*As(n/2)});var Ad=xd(function(n){return(n=cd(n))&&n/ee(n)});Ad.invert=Ld(function(n){return n});function xv(){return Ov(Ad).scale(79.4188).clipAngle(180-.001)}function Rd(n,t){return[n,t]}Rd.invert=Rd;function Lv(n,t,e){e=e||{};var r=e.units||"kilometers",i=e.steps||8;if(!n)throw new Error("geojson is required");if(typeof e!="object")throw new Error("options must be an object");if(typeof i!="number")throw new Error("steps must be an number");if(t===void 0)throw new Error("radius is required");if(i<=0)throw new Error("steps must be greater than 0");var s=[];switch(n.type){case"GeometryCollection":return lu(n,function(o){var a=Xu(o,t,r,i);a&&s.push(a)}),eo(s);case"FeatureCollection":return uu(n,function(o){var a=Xu(o,t,r,i);a&&uu(a,function(u){u&&s.push(u)})}),eo(s)}return Xu(n,t,r,i)}function Xu(n,t,e,r){var i=n.properties||{},s=n.type==="Feature"?n.geometry:n;if(s.type==="GeometryCollection"){var o=[];return lu(n,function(I){var P=Xu(I,t,e,r);P&&o.push(P)}),eo(o)}var a=Av(s),u={type:s.type,coordinates:kd(s.coordinates,a)},l=new Al,c=l.read(u),f=pl(gl(t,e),"meters"),p=ce.bufferOp(c,f,r),v=new Wf;if(p=v.write(p),!Fd(p.coordinates)){var w={type:p.type,coordinates:Vd(p.coordinates,a)};return fn(w,i)}}function Fd(n){return Array.isArray(n[0])?Fd(n[0]):isNaN(n[0])}function kd(n,t){return typeof n[0]!="object"?t(n):n.map(function(e){return kd(e,t)})}function Vd(n,t){return typeof n[0]!="object"?t.invert(n):n.map(function(e){return Vd(e,t)})}function Av(n){var t=Xm(n).geometry.coordinates,e=[-t[0],-t[1]];return xv().rotate(e).scale(De)}function Rv(n,t,e){e===void 0&&(e={});for(var r=e.steps||64,i=e.properties?e.properties:!Array.isArray(n)&&n.type==="Feature"&&n.properties?n.properties:{},s=[],o=0;o<r;o++)s.push(ro(n,t,o*-360/r,e).geometry.coordinates);return s.push(s[0]),Be([s],i)}/**
7
7
  * splaytree v3.1.2
8
8
  * Fast Splay tree for Node and browser
9
9
  *
@@ -23,8 +23,8 @@ ${l.map(h=>`${h.id} ${h.typeName}
23
23
 
24
24
  See the Apache Version 2.0 License for specific language governing permissions
25
25
  and limitations under the License.
26
- ***************************************************************************** */function Lv(n,e){var t={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},r,i,s,o;return o={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function a(u){return function(h){return l([u,h])}}function l(u){if(r)throw new TypeError("Generator is already executing.");for(;t;)try{if(r=1,i&&(s=u[0]&2?i.return:u[0]?i.throw||((s=i.return)&&s.call(i),0):i.next)&&!(s=s.call(i,u[1])).done)return s;switch(i=0,s&&(u=[u[0]&2,s.value]),u[0]){case 0:case 1:s=u;break;case 4:return t.label++,{value:u[1],done:!1};case 5:t.label++,i=u[1],u=[0];continue;case 7:u=t.ops.pop(),t.trys.pop();continue;default:if(s=t.trys,!(s=s.length>0&&s[s.length-1])&&(u[0]===6||u[0]===2)){t=0;continue}if(u[0]===3&&(!s||u[1]>s[0]&&u[1]<s[3])){t.label=u[1];break}if(u[0]===6&&t.label<s[1]){t.label=s[1],s=u;break}if(s&&t.label<s[2]){t.label=s[2],t.ops.push(u);break}s[2]&&t.ops.pop(),t.trys.pop();continue}u=e.call(n,t)}catch(h){u=[6,h],i=0}finally{r=s=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}}var Ts=function(){function n(e,t){this.next=null,this.key=e,this.data=t,this.left=null,this.right=null}return n}();function Av(n,e){return n>e?1:n<e?-1:0}function Ds(n,e,t){for(var r=new Ts(null,null),i=r,s=r;;){var o=t(n,e.key);if(o<0){if(e.left===null)break;if(t(n,e.left.key)<0){var a=e.left;if(e.left=a.right,a.right=e,e=a,e.left===null)break}s.left=e,s=e,e=e.left}else if(o>0){if(e.right===null)break;if(t(n,e.right.key)>0){var a=e.right;if(e.right=a.left,a.left=e,e=a,e.right===null)break}i.right=e,i=e,e=e.right}else break}return i.right=e.left,s.left=e.right,e.left=r.right,e.right=r.left,e}function lh(n,e,t,r){var i=new Ts(n,e);if(t===null)return i.left=i.right=null,i;t=Ds(n,t,r);var s=r(n,t.key);return s<0?(i.left=t.left,i.right=t,t.left=null):s>=0&&(i.right=t.right,i.left=t,t.right=null),i}function xd(n,e,t){var r=null,i=null;if(e){e=Ds(n,e,t);var s=t(e.key,n);s===0?(r=e.left,i=e.right):s<0?(i=e.right,e.right=null,r=e):(r=e.left,e.left=null,i=e)}return{left:r,right:i}}function Rv(n,e,t){return e===null?n:(n===null||(e=Ds(n.key,e,t),e.left=n),e)}function uh(n,e,t,r,i){if(n){r(""+e+(t?"└── ":"├── ")+i(n)+`
27
- `);var s=e+(t?" ":"│ ");n.left&&uh(n.left,s,!1,r,i),n.right&&uh(n.right,s,!0,r,i)}}var ch=function(){function n(e){e===void 0&&(e=Av),this._root=null,this._size=0,this._comparator=e}return n.prototype.insert=function(e,t){return this._size++,this._root=lh(e,t,this._root,this._comparator)},n.prototype.add=function(e,t){var r=new Ts(e,t);this._root===null&&(r.left=r.right=null,this._size++,this._root=r);var i=this._comparator,s=Ds(e,this._root,i),o=i(e,s.key);return o===0?this._root=s:(o<0?(r.left=s.left,r.right=s,s.left=null):o>0&&(r.right=s.right,r.left=s,s.right=null),this._size++,this._root=r),this._root},n.prototype.remove=function(e){this._root=this._remove(e,this._root,this._comparator)},n.prototype._remove=function(e,t,r){var i;if(t===null)return null;t=Ds(e,t,r);var s=r(e,t.key);return s===0?(t.left===null?i=t.right:(i=Ds(e,t.left,r),i.right=t.right),this._size--,i):t},n.prototype.pop=function(){var e=this._root;if(e){for(;e.left;)e=e.left;return this._root=Ds(e.key,this._root,this._comparator),this._root=this._remove(e.key,this._root,this._comparator),{key:e.key,data:e.data}}return null},n.prototype.findStatic=function(e){for(var t=this._root,r=this._comparator;t;){var i=r(e,t.key);if(i===0)return t;i<0?t=t.left:t=t.right}return null},n.prototype.find=function(e){return this._root&&(this._root=Ds(e,this._root,this._comparator),this._comparator(e,this._root.key)!==0)?null:this._root},n.prototype.contains=function(e){for(var t=this._root,r=this._comparator;t;){var i=r(e,t.key);if(i===0)return!0;i<0?t=t.left:t=t.right}return!1},n.prototype.forEach=function(e,t){for(var r=this._root,i=[],s=!1;!s;)r!==null?(i.push(r),r=r.left):i.length!==0?(r=i.pop(),e.call(t,r),r=r.right):s=!0;return this},n.prototype.range=function(e,t,r,i){for(var s=[],o=this._comparator,a=this._root,l;s.length!==0||a;)if(a)s.push(a),a=a.left;else{if(a=s.pop(),l=o(a.key,t),l>0)break;if(o(a.key,e)>=0&&r.call(i,a))return this;a=a.right}return this},n.prototype.keys=function(){var e=[];return this.forEach(function(t){var r=t.key;return e.push(r)}),e},n.prototype.values=function(){var e=[];return this.forEach(function(t){var r=t.data;return e.push(r)}),e},n.prototype.min=function(){return this._root?this.minNode(this._root).key:null},n.prototype.max=function(){return this._root?this.maxNode(this._root).key:null},n.prototype.minNode=function(e){if(e===void 0&&(e=this._root),e)for(;e.left;)e=e.left;return e},n.prototype.maxNode=function(e){if(e===void 0&&(e=this._root),e)for(;e.right;)e=e.right;return e},n.prototype.at=function(e){for(var t=this._root,r=!1,i=0,s=[];!r;)if(t)s.push(t),t=t.left;else if(s.length>0){if(t=s.pop(),i===e)return t;i++,t=t.right}else r=!0;return null},n.prototype.next=function(e){var t=this._root,r=null;if(e.right){for(r=e.right;r.left;)r=r.left;return r}for(var i=this._comparator;t;){var s=i(e.key,t.key);if(s===0)break;s<0?(r=t,t=t.left):t=t.right}return r},n.prototype.prev=function(e){var t=this._root,r=null;if(e.left!==null){for(r=e.left;r.right;)r=r.right;return r}for(var i=this._comparator;t;){var s=i(e.key,t.key);if(s===0)break;s<0?t=t.left:(r=t,t=t.right)}return r},n.prototype.clear=function(){return this._root=null,this._size=0,this},n.prototype.toList=function(){return kv(this._root)},n.prototype.load=function(e,t,r){t===void 0&&(t=[]),r===void 0&&(r=!1);var i=e.length,s=this._comparator;if(r&&dh(e,t,0,i-1,s),this._root===null)this._root=hh(e,t,0,i),this._size=i;else{var o=Vv(this.toList(),Fv(e,t),s);i=this._size+i,this._root=fh({head:o},0,i)}return this},n.prototype.isEmpty=function(){return this._root===null},Object.defineProperty(n.prototype,"size",{get:function(){return this._size},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"root",{get:function(){return this._root},enumerable:!0,configurable:!0}),n.prototype.toString=function(e){e===void 0&&(e=function(r){return String(r.key)});var t=[];return uh(this._root,"",!0,function(r){return t.push(r)},e),t.join("")},n.prototype.update=function(e,t,r){var i=this._comparator,s=xd(e,this._root,i),o=s.left,a=s.right;i(e,t)<0?a=lh(t,r,a,i):o=lh(t,r,o,i),this._root=Rv(o,a,i)},n.prototype.split=function(e){return xd(e,this._root,this._comparator)},n.prototype[Symbol.iterator]=function(){var e,t,r;return Lv(this,function(i){switch(i.label){case 0:e=this._root,t=[],r=!1,i.label=1;case 1:return r?[3,6]:e===null?[3,2]:(t.push(e),e=e.left,[3,5]);case 2:return t.length===0?[3,4]:(e=t.pop(),[4,e]);case 3:return i.sent(),e=e.right,[3,5];case 4:r=!0,i.label=5;case 5:return[3,1];case 6:return[2]}})},n}();function hh(n,e,t,r){var i=r-t;if(i>0){var s=t+Math.floor(i/2),o=n[s],a=e[s],l=new Ts(o,a);return l.left=hh(n,e,t,s),l.right=hh(n,e,s+1,r),l}return null}function Fv(n,e){for(var t=new Ts(null,null),r=t,i=0;i<n.length;i++)r=r.next=new Ts(n[i],e[i]);return r.next=null,t.next}function kv(n){for(var e=n,t=[],r=!1,i=new Ts(null,null),s=i;!r;)e?(t.push(e),e=e.left):t.length>0?(e=s=s.next=t.pop(),e=e.right):r=!0;return s.next=null,i.next}function fh(n,e,t){var r=t-e;if(r>0){var i=e+Math.floor(r/2),s=fh(n,e,i),o=n.head;return o.left=s,n.head=n.head.next,o.right=fh(n,i+1,t),o}return null}function Vv(n,e,t){for(var r=new Ts(null,null),i=r,s=n,o=e;s!==null&&o!==null;)t(s.key,o.key)<0?(i.next=s,s=s.next):(i.next=o,o=o.next),i=i.next;return s!==null?i.next=s:o!==null&&(i.next=o),r.next}function dh(n,e,t,r,i){if(!(t>=r)){for(var s=n[t+r>>1],o=t-1,a=r+1;;){do o++;while(i(n[o],s)<0);do a--;while(i(n[a],s)>0);if(o>=a)break;var l=n[o];n[o]=n[a],n[a]=l,l=e[o],e[o]=e[a],e[a]=l}dh(n,e,t,a,i),dh(n,e,a+1,r,i)}}const Yi=11102230246251565e-32,ir=134217729,zv=(3+8*Yi)*Yi;function ph(n,e,t,r,i){let s,o,a,l,u=e[0],h=r[0],f=0,p=0;h>u==h>-u?(s=u,u=e[++f]):(s=h,h=r[++p]);let v=0;if(f<n&&p<t)for(h>u==h>-u?(o=u+s,a=s-(o-u),u=e[++f]):(o=h+s,a=s-(o-h),h=r[++p]),s=o,a!==0&&(i[v++]=a);f<n&&p<t;)h>u==h>-u?(o=s+u,l=o-s,a=s-(o-l)+(u-l),u=e[++f]):(o=s+h,l=o-s,a=s-(o-l)+(h-l),h=r[++p]),s=o,a!==0&&(i[v++]=a);for(;f<n;)o=s+u,l=o-s,a=s-(o-l)+(u-l),u=e[++f],s=o,a!==0&&(i[v++]=a);for(;p<t;)o=s+h,l=o-s,a=s-(o-l)+(h-l),h=r[++p],s=o,a!==0&&(i[v++]=a);return(s!==0||v===0)&&(i[v++]=s),v}function Uv(n,e){let t=e[0];for(let r=1;r<n;r++)t+=e[r];return t}function hu(n){return new Float64Array(n)}const Gv=(3+16*Yi)*Yi,Wv=(2+12*Yi)*Yi,qv=(9+64*Yi)*Yi*Yi,Ol=hu(4),Ld=hu(8),Ad=hu(12),Rd=hu(16),mr=hu(4);function Xv(n,e,t,r,i,s,o){let a,l,u,h,f,p,v,w,I,T,L,m,_,g,y,E,C,D;const b=n-i,x=t-i,N=e-s,O=r-s;g=b*O,p=ir*b,v=p-(p-b),w=b-v,p=ir*O,I=p-(p-O),T=O-I,y=w*T-(g-v*I-w*I-v*T),E=N*x,p=ir*N,v=p-(p-N),w=N-v,p=ir*x,I=p-(p-x),T=x-I,C=w*T-(E-v*I-w*I-v*T),L=y-C,f=y-L,Ol[0]=y-(L+f)+(f-C),m=g+L,f=m-g,_=g-(m-f)+(L-f),L=_-E,f=_-L,Ol[1]=_-(L+f)+(f-E),D=m+L,f=D-m,Ol[2]=m-(D-f)+(L-f),Ol[3]=D;let A=Uv(4,Ol),k=Wv*o;if(A>=k||-A>=k||(f=n-b,a=n-(b+f)+(f-i),f=t-x,u=t-(x+f)+(f-i),f=e-N,l=e-(N+f)+(f-s),f=r-O,h=r-(O+f)+(f-s),a===0&&l===0&&u===0&&h===0)||(k=qv*o+zv*Math.abs(A),A+=b*h+O*a-(N*u+x*l),A>=k||-A>=k))return A;g=a*O,p=ir*a,v=p-(p-a),w=a-v,p=ir*O,I=p-(p-O),T=O-I,y=w*T-(g-v*I-w*I-v*T),E=l*x,p=ir*l,v=p-(p-l),w=l-v,p=ir*x,I=p-(p-x),T=x-I,C=w*T-(E-v*I-w*I-v*T),L=y-C,f=y-L,mr[0]=y-(L+f)+(f-C),m=g+L,f=m-g,_=g-(m-f)+(L-f),L=_-E,f=_-L,mr[1]=_-(L+f)+(f-E),D=m+L,f=D-m,mr[2]=m-(D-f)+(L-f),mr[3]=D;const B=ph(4,Ol,4,mr,Ld);g=b*h,p=ir*b,v=p-(p-b),w=b-v,p=ir*h,I=p-(p-h),T=h-I,y=w*T-(g-v*I-w*I-v*T),E=N*u,p=ir*N,v=p-(p-N),w=N-v,p=ir*u,I=p-(p-u),T=u-I,C=w*T-(E-v*I-w*I-v*T),L=y-C,f=y-L,mr[0]=y-(L+f)+(f-C),m=g+L,f=m-g,_=g-(m-f)+(L-f),L=_-E,f=_-L,mr[1]=_-(L+f)+(f-E),D=m+L,f=D-m,mr[2]=m-(D-f)+(L-f),mr[3]=D;const X=ph(B,Ld,4,mr,Ad);g=a*h,p=ir*a,v=p-(p-a),w=a-v,p=ir*h,I=p-(p-h),T=h-I,y=w*T-(g-v*I-w*I-v*T),E=l*u,p=ir*l,v=p-(p-l),w=l-v,p=ir*u,I=p-(p-u),T=u-I,C=w*T-(E-v*I-w*I-v*T),L=y-C,f=y-L,mr[0]=y-(L+f)+(f-C),m=g+L,f=m-g,_=g-(m-f)+(L-f),L=_-E,f=_-L,mr[1]=_-(L+f)+(f-E),D=m+L,f=D-m,mr[2]=m-(D-f)+(L-f),mr[3]=D;const ne=ph(X,Ad,4,mr,Rd);return Rd[ne-1]}function Hv(n,e,t,r,i,s){const o=(e-s)*(t-i),a=(n-i)*(r-s),l=o-a,u=Math.abs(o+a);return Math.abs(l)>=Gv*u?l:-Xv(n,e,t,r,i,s,u)}const fu=(n,e)=>n.ll.x<=e.x&&e.x<=n.ur.x&&n.ll.y<=e.y&&e.y<=n.ur.y,gh=(n,e)=>{if(e.ur.x<n.ll.x||n.ur.x<e.ll.x||e.ur.y<n.ll.y||n.ur.y<e.ll.y)return null;const t=n.ll.x<e.ll.x?e.ll.x:n.ll.x,r=n.ur.x<e.ur.x?n.ur.x:e.ur.x,i=n.ll.y<e.ll.y?e.ll.y:n.ll.y,s=n.ur.y<e.ur.y?n.ur.y:e.ur.y;return{ll:{x:t,y:i},ur:{x:r,y:s}}};let Ns=Number.EPSILON;Ns===void 0&&(Ns=Math.pow(2,-52));const Yv=Ns*Ns,Fd=(n,e)=>{if(-Ns<n&&n<Ns&&-Ns<e&&e<Ns)return 0;const t=n-e;return t*t<Yv*n*e?0:n<e?-1:1};class Jv{constructor(){this.reset()}reset(){this.xRounder=new kd,this.yRounder=new kd}round(e,t){return{x:this.xRounder.round(e),y:this.yRounder.round(t)}}}class kd{constructor(){this.tree=new ch,this.round(0)}round(e){const t=this.tree.add(e),r=this.tree.prev(t);if(r!==null&&Fd(t.key,r.key)===0)return this.tree.remove(e),r.key;const i=this.tree.next(t);return i!==null&&Fd(t.key,i.key)===0?(this.tree.remove(e),i.key):e}}const du=new Jv,ac=(n,e)=>n.x*e.y-n.y*e.x,Vd=(n,e)=>n.x*e.x+n.y*e.y,zd=(n,e,t)=>{const r=Hv(n.x,n.y,e.x,e.y,t.x,t.y);return r>0?-1:r<0?1:0},lc=n=>Math.sqrt(Vd(n,n)),Zv=(n,e,t)=>{const r={x:e.x-n.x,y:e.y-n.y},i={x:t.x-n.x,y:t.y-n.y};return ac(i,r)/lc(i)/lc(r)},Kv=(n,e,t)=>{const r={x:e.x-n.x,y:e.y-n.y},i={x:t.x-n.x,y:t.y-n.y};return Vd(i,r)/lc(i)/lc(r)},Ud=(n,e,t)=>e.y===0?null:{x:n.x+e.x/e.y*(t-n.y),y:t},Gd=(n,e,t)=>e.x===0?null:{x:t,y:n.y+e.y/e.x*(t-n.x)},Qv=(n,e,t,r)=>{if(e.x===0)return Gd(t,r,n.x);if(r.x===0)return Gd(n,e,t.x);if(e.y===0)return Ud(t,r,n.y);if(r.y===0)return Ud(n,e,t.y);const i=ac(e,r);if(i==0)return null;const s={x:t.x-n.x,y:t.y-n.y},o=ac(s,e)/i,a=ac(s,r)/i,l=n.x+a*e.x,u=t.x+o*r.x,h=n.y+a*e.y,f=t.y+o*r.y,p=(l+u)/2,v=(h+f)/2;return{x:p,y:v}};class Pn{static compare(e,t){const r=Pn.comparePoints(e.point,t.point);return r!==0?r:(e.point!==t.point&&e.link(t),e.isLeft!==t.isLeft?e.isLeft?1:-1:bs.compare(e.segment,t.segment))}static comparePoints(e,t){return e.x<t.x?-1:e.x>t.x?1:e.y<t.y?-1:e.y>t.y?1:0}constructor(e,t){e.events===void 0?e.events=[this]:e.events.push(this),this.point=e,this.isLeft=t}link(e){if(e.point===this.point)throw new Error("Tried to link already linked events");const t=e.point.events;for(let r=0,i=t.length;r<i;r++){const s=t[r];this.point.events.push(s),s.point=this.point}this.checkForConsuming()}checkForConsuming(){const e=this.point.events.length;for(let t=0;t<e;t++){const r=this.point.events[t];if(r.segment.consumedBy===void 0)for(let i=t+1;i<e;i++){const s=this.point.events[i];s.consumedBy===void 0&&r.otherSE.point.events===s.otherSE.point.events&&r.segment.consume(s.segment)}}}getAvailableLinkedEvents(){const e=[];for(let t=0,r=this.point.events.length;t<r;t++){const i=this.point.events[t];i!==this&&!i.segment.ringOut&&i.segment.isInResult()&&e.push(i)}return e}getLeftmostComparator(e){const t=new Map,r=i=>{const s=i.otherSE;t.set(i,{sine:Zv(this.point,e.point,s.point),cosine:Kv(this.point,e.point,s.point)})};return(i,s)=>{t.has(i)||r(i),t.has(s)||r(s);const{sine:o,cosine:a}=t.get(i),{sine:l,cosine:u}=t.get(s);return o>=0&&l>=0?a<u?1:a>u?-1:0:o<0&&l<0?a<u?-1:a>u?1:0:l<o?-1:l>o?1:0}}}let Bv=0;class bs{static compare(e,t){const r=e.leftSE.point.x,i=t.leftSE.point.x,s=e.rightSE.point.x,o=t.rightSE.point.x;if(o<r)return 1;if(s<i)return-1;const a=e.leftSE.point.y,l=t.leftSE.point.y,u=e.rightSE.point.y,h=t.rightSE.point.y;if(r<i){if(l<a&&l<u)return 1;if(l>a&&l>u)return-1;const f=e.comparePoint(t.leftSE.point);if(f<0)return 1;if(f>0)return-1;const p=t.comparePoint(e.rightSE.point);return p!==0?p:-1}if(r>i){if(a<l&&a<h)return-1;if(a>l&&a>h)return 1;const f=t.comparePoint(e.leftSE.point);if(f!==0)return f;const p=e.comparePoint(t.rightSE.point);return p<0?1:p>0?-1:1}if(a<l)return-1;if(a>l)return 1;if(s<o){const f=t.comparePoint(e.rightSE.point);if(f!==0)return f}if(s>o){const f=e.comparePoint(t.rightSE.point);if(f<0)return 1;if(f>0)return-1}if(s!==o){const f=u-a,p=s-r,v=h-l,w=o-i;if(f>p&&v<w)return 1;if(f<p&&v>w)return-1}return s>o?1:s<o||u<h?-1:u>h?1:e.id<t.id?-1:e.id>t.id?1:0}constructor(e,t,r,i){this.id=++Bv,this.leftSE=e,e.segment=this,e.otherSE=t,this.rightSE=t,t.segment=this,t.otherSE=e,this.rings=r,this.windings=i}static fromRing(e,t,r){let i,s,o;const a=Pn.comparePoints(e,t);if(a<0)i=e,s=t,o=1;else if(a>0)i=t,s=e,o=-1;else throw new Error(`Tried to create degenerate segment at [${e.x}, ${e.y}]`);const l=new Pn(i,!0),u=new Pn(s,!1);return new bs(l,u,[r],[o])}replaceRightSE(e){this.rightSE=e,this.rightSE.segment=this,this.rightSE.otherSE=this.leftSE,this.leftSE.otherSE=this.rightSE}bbox(){const e=this.leftSE.point.y,t=this.rightSE.point.y;return{ll:{x:this.leftSE.point.x,y:e<t?e:t},ur:{x:this.rightSE.point.x,y:e>t?e:t}}}vector(){return{x:this.rightSE.point.x-this.leftSE.point.x,y:this.rightSE.point.y-this.leftSE.point.y}}isAnEndpoint(e){return e.x===this.leftSE.point.x&&e.y===this.leftSE.point.y||e.x===this.rightSE.point.x&&e.y===this.rightSE.point.y}comparePoint(e){if(this.isAnEndpoint(e))return 0;const t=this.leftSE.point,r=this.rightSE.point,i=this.vector();if(t.x===r.x)return e.x===t.x?0:e.x<t.x?1:-1;const s=(e.y-t.y)/i.y,o=t.x+s*i.x;if(e.x===o)return 0;const a=(e.x-t.x)/i.x,l=t.y+a*i.y;return e.y===l?0:e.y<l?-1:1}getIntersection(e){const t=this.bbox(),r=e.bbox(),i=gh(t,r);if(i===null)return null;const s=this.leftSE.point,o=this.rightSE.point,a=e.leftSE.point,l=e.rightSE.point,u=fu(t,a)&&this.comparePoint(a)===0,h=fu(r,s)&&e.comparePoint(s)===0,f=fu(t,l)&&this.comparePoint(l)===0,p=fu(r,o)&&e.comparePoint(o)===0;if(h&&u)return p&&!f?o:!p&&f?l:null;if(h)return f&&s.x===l.x&&s.y===l.y?null:s;if(u)return p&&o.x===a.x&&o.y===a.y?null:a;if(p&&f)return null;if(p)return o;if(f)return l;const v=Qv(s,this.vector(),a,e.vector());return v===null||!fu(i,v)?null:du.round(v.x,v.y)}split(e){const t=[],r=e.events!==void 0,i=new Pn(e,!0),s=new Pn(e,!1),o=this.rightSE;this.replaceRightSE(s),t.push(s),t.push(i);const a=new bs(i,o,this.rings.slice(),this.windings.slice());return Pn.comparePoints(a.leftSE.point,a.rightSE.point)>0&&a.swapEvents(),Pn.comparePoints(this.leftSE.point,this.rightSE.point)>0&&this.swapEvents(),r&&(i.checkForConsuming(),s.checkForConsuming()),t}swapEvents(){const e=this.rightSE;this.rightSE=this.leftSE,this.leftSE=e,this.leftSE.isLeft=!0,this.rightSE.isLeft=!1;for(let t=0,r=this.windings.length;t<r;t++)this.windings[t]*=-1}consume(e){let t=this,r=e;for(;t.consumedBy;)t=t.consumedBy;for(;r.consumedBy;)r=r.consumedBy;const i=bs.compare(t,r);if(i!==0){if(i>0){const s=t;t=r,r=s}if(t.prev===r){const s=t;t=r,r=s}for(let s=0,o=r.rings.length;s<o;s++){const a=r.rings[s],l=r.windings[s],u=t.rings.indexOf(a);u===-1?(t.rings.push(a),t.windings.push(l)):t.windings[u]+=l}r.rings=null,r.windings=null,r.consumedBy=t,r.leftSE.consumedBy=t.leftSE,r.rightSE.consumedBy=t.rightSE}}prevInResult(){return this._prevInResult!==void 0?this._prevInResult:(this.prev?this.prev.isInResult()?this._prevInResult=this.prev:this._prevInResult=this.prev.prevInResult():this._prevInResult=null,this._prevInResult)}beforeState(){if(this._beforeState!==void 0)return this._beforeState;if(!this.prev)this._beforeState={rings:[],windings:[],multiPolys:[]};else{const e=this.prev.consumedBy||this.prev;this._beforeState=e.afterState()}return this._beforeState}afterState(){if(this._afterState!==void 0)return this._afterState;const e=this.beforeState();this._afterState={rings:e.rings.slice(0),windings:e.windings.slice(0),multiPolys:[]};const t=this._afterState.rings,r=this._afterState.windings,i=this._afterState.multiPolys;for(let a=0,l=this.rings.length;a<l;a++){const u=this.rings[a],h=this.windings[a],f=t.indexOf(u);f===-1?(t.push(u),r.push(h)):r[f]+=h}const s=[],o=[];for(let a=0,l=t.length;a<l;a++){if(r[a]===0)continue;const u=t[a],h=u.poly;if(o.indexOf(h)===-1)if(u.isExterior)s.push(h);else{o.indexOf(h)===-1&&o.push(h);const f=s.indexOf(u.poly);f!==-1&&s.splice(f,1)}}for(let a=0,l=s.length;a<l;a++){const u=s[a].multiPoly;i.indexOf(u)===-1&&i.push(u)}return this._afterState}isInResult(){if(this.consumedBy)return!1;if(this._isInResult!==void 0)return this._isInResult;const e=this.beforeState().multiPolys,t=this.afterState().multiPolys;switch(Yn.type){case"union":{const r=e.length===0,i=t.length===0;this._isInResult=r!==i;break}case"intersection":{let r,i;e.length<t.length?(r=e.length,i=t.length):(r=t.length,i=e.length),this._isInResult=i===Yn.numMultiPolys&&r<i;break}case"xor":{const r=Math.abs(e.length-t.length);this._isInResult=r%2===1;break}case"difference":{const r=i=>i.length===1&&i[0].isSubject;this._isInResult=r(e)!==r(t);break}default:throw new Error(`Unrecognized operation type found ${Yn.type}`)}return this._isInResult}}class Wd{constructor(e,t,r){if(!Array.isArray(e)||e.length===0)throw new Error("Input geometry is not a valid Polygon or MultiPolygon");if(this.poly=t,this.isExterior=r,this.segments=[],typeof e[0][0]!="number"||typeof e[0][1]!="number")throw new Error("Input geometry is not a valid Polygon or MultiPolygon");const i=du.round(e[0][0],e[0][1]);this.bbox={ll:{x:i.x,y:i.y},ur:{x:i.x,y:i.y}};let s=i;for(let o=1,a=e.length;o<a;o++){if(typeof e[o][0]!="number"||typeof e[o][1]!="number")throw new Error("Input geometry is not a valid Polygon or MultiPolygon");let l=du.round(e[o][0],e[o][1]);l.x===s.x&&l.y===s.y||(this.segments.push(bs.fromRing(s,l,this)),l.x<this.bbox.ll.x&&(this.bbox.ll.x=l.x),l.y<this.bbox.ll.y&&(this.bbox.ll.y=l.y),l.x>this.bbox.ur.x&&(this.bbox.ur.x=l.x),l.y>this.bbox.ur.y&&(this.bbox.ur.y=l.y),s=l)}(i.x!==s.x||i.y!==s.y)&&this.segments.push(bs.fromRing(s,i,this))}getSweepEvents(){const e=[];for(let t=0,r=this.segments.length;t<r;t++){const i=this.segments[t];e.push(i.leftSE),e.push(i.rightSE)}return e}}class $v{constructor(e,t){if(!Array.isArray(e))throw new Error("Input geometry is not a valid Polygon or MultiPolygon");this.exteriorRing=new Wd(e[0],this,!0),this.bbox={ll:{x:this.exteriorRing.bbox.ll.x,y:this.exteriorRing.bbox.ll.y},ur:{x:this.exteriorRing.bbox.ur.x,y:this.exteriorRing.bbox.ur.y}},this.interiorRings=[];for(let r=1,i=e.length;r<i;r++){const s=new Wd(e[r],this,!1);s.bbox.ll.x<this.bbox.ll.x&&(this.bbox.ll.x=s.bbox.ll.x),s.bbox.ll.y<this.bbox.ll.y&&(this.bbox.ll.y=s.bbox.ll.y),s.bbox.ur.x>this.bbox.ur.x&&(this.bbox.ur.x=s.bbox.ur.x),s.bbox.ur.y>this.bbox.ur.y&&(this.bbox.ur.y=s.bbox.ur.y),this.interiorRings.push(s)}this.multiPoly=t}getSweepEvents(){const e=this.exteriorRing.getSweepEvents();for(let t=0,r=this.interiorRings.length;t<r;t++){const i=this.interiorRings[t].getSweepEvents();for(let s=0,o=i.length;s<o;s++)e.push(i[s])}return e}}class qd{constructor(e,t){if(!Array.isArray(e))throw new Error("Input geometry is not a valid Polygon or MultiPolygon");try{typeof e[0][0][0]=="number"&&(e=[e])}catch{}this.polys=[],this.bbox={ll:{x:Number.POSITIVE_INFINITY,y:Number.POSITIVE_INFINITY},ur:{x:Number.NEGATIVE_INFINITY,y:Number.NEGATIVE_INFINITY}};for(let r=0,i=e.length;r<i;r++){const s=new $v(e[r],this);s.bbox.ll.x<this.bbox.ll.x&&(this.bbox.ll.x=s.bbox.ll.x),s.bbox.ll.y<this.bbox.ll.y&&(this.bbox.ll.y=s.bbox.ll.y),s.bbox.ur.x>this.bbox.ur.x&&(this.bbox.ur.x=s.bbox.ur.x),s.bbox.ur.y>this.bbox.ur.y&&(this.bbox.ur.y=s.bbox.ur.y),this.polys.push(s)}this.isSubject=t}getSweepEvents(){const e=[];for(let t=0,r=this.polys.length;t<r;t++){const i=this.polys[t].getSweepEvents();for(let s=0,o=i.length;s<o;s++)e.push(i[s])}return e}}class uc{static factory(e){const t=[];for(let r=0,i=e.length;r<i;r++){const s=e[r];if(!s.isInResult()||s.ringOut)continue;let o=null,a=s.leftSE,l=s.rightSE;const u=[a],h=a.point,f=[];for(;o=a,a=l,u.push(a),a.point!==h;)for(;;){const p=a.getAvailableLinkedEvents();if(p.length===0){const I=u[0].point,T=u[u.length-1].point;throw new Error(`Unable to complete output ring starting at [${I.x}, ${I.y}]. Last matching segment found ends at [${T.x}, ${T.y}].`)}if(p.length===1){l=p[0].otherSE;break}let v=null;for(let I=0,T=f.length;I<T;I++)if(f[I].point===a.point){v=I;break}if(v!==null){const I=f.splice(v)[0],T=u.splice(I.index);T.unshift(T[0].otherSE),t.push(new uc(T.reverse()));continue}f.push({index:u.length,point:a.point});const w=a.getLeftmostComparator(o);l=p.sort(w)[0].otherSE;break}t.push(new uc(u))}return t}constructor(e){this.events=e;for(let t=0,r=e.length;t<r;t++)e[t].segment.ringOut=this;this.poly=null}getGeom(){let e=this.events[0].point;const t=[e];for(let u=1,h=this.events.length-1;u<h;u++){const f=this.events[u].point,p=this.events[u+1].point;zd(f,e,p)!==0&&(t.push(f),e=f)}if(t.length===1)return null;const r=t[0],i=t[1];zd(r,e,i)===0&&t.shift(),t.push(t[0]);const s=this.isExteriorRing()?1:-1,o=this.isExteriorRing()?0:t.length-1,a=this.isExteriorRing()?t.length:-1,l=[];for(let u=o;u!=a;u+=s)l.push([t[u].x,t[u].y]);return l}isExteriorRing(){if(this._isExteriorRing===void 0){const e=this.enclosingRing();this._isExteriorRing=e?!e.isExteriorRing():!0}return this._isExteriorRing}enclosingRing(){return this._enclosingRing===void 0&&(this._enclosingRing=this._calcEnclosingRing()),this._enclosingRing}_calcEnclosingRing(){let e=this.events[0];for(let i=1,s=this.events.length;i<s;i++){const o=this.events[i];Pn.compare(e,o)>0&&(e=o)}let t=e.segment.prevInResult(),r=t?t.prevInResult():null;for(;;){if(!t)return null;if(!r)return t.ringOut;if(r.ringOut!==t.ringOut)return r.ringOut.enclosingRing()!==t.ringOut?t.ringOut:t.ringOut.enclosingRing();t=r.prevInResult(),r=t?t.prevInResult():null}}}class Xd{constructor(e){this.exteriorRing=e,e.poly=this,this.interiorRings=[]}addInterior(e){this.interiorRings.push(e),e.poly=this}getGeom(){const e=[this.exteriorRing.getGeom()];if(e[0]===null)return null;for(let t=0,r=this.interiorRings.length;t<r;t++){const i=this.interiorRings[t].getGeom();i!==null&&e.push(i)}return e}}class jv{constructor(e){this.rings=e,this.polys=this._composePolys(e)}getGeom(){const e=[];for(let t=0,r=this.polys.length;t<r;t++){const i=this.polys[t].getGeom();i!==null&&e.push(i)}return e}_composePolys(e){const t=[];for(let r=0,i=e.length;r<i;r++){const s=e[r];if(!s.poly)if(s.isExteriorRing())t.push(new Xd(s));else{const o=s.enclosingRing();o.poly||t.push(new Xd(o)),o.poly.addInterior(s)}}return t}}class ey{constructor(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:bs.compare;this.queue=e,this.tree=new ch(t),this.segments=[]}process(e){const t=e.segment,r=[];if(e.consumedBy)return e.isLeft?this.queue.remove(e.otherSE):this.tree.remove(t),r;const i=e.isLeft?this.tree.add(t):this.tree.find(t);if(!i)throw new Error(`Unable to find segment #${t.id} [${t.leftSE.point.x}, ${t.leftSE.point.y}] -> [${t.rightSE.point.x}, ${t.rightSE.point.y}] in SweepLine tree.`);let s=i,o=i,a,l;for(;a===void 0;)s=this.tree.prev(s),s===null?a=null:s.key.consumedBy===void 0&&(a=s.key);for(;l===void 0;)o=this.tree.next(o),o===null?l=null:o.key.consumedBy===void 0&&(l=o.key);if(e.isLeft){let u=null;if(a){const f=a.getIntersection(t);if(f!==null&&(t.isAnEndpoint(f)||(u=f),!a.isAnEndpoint(f))){const p=this._splitSafely(a,f);for(let v=0,w=p.length;v<w;v++)r.push(p[v])}}let h=null;if(l){const f=l.getIntersection(t);if(f!==null&&(t.isAnEndpoint(f)||(h=f),!l.isAnEndpoint(f))){const p=this._splitSafely(l,f);for(let v=0,w=p.length;v<w;v++)r.push(p[v])}}if(u!==null||h!==null){let f=null;u===null?f=h:h===null?f=u:f=Pn.comparePoints(u,h)<=0?u:h,this.queue.remove(t.rightSE),r.push(t.rightSE);const p=t.split(f);for(let v=0,w=p.length;v<w;v++)r.push(p[v])}r.length>0?(this.tree.remove(t),r.push(e)):(this.segments.push(t),t.prev=a)}else{if(a&&l){const u=a.getIntersection(l);if(u!==null){if(!a.isAnEndpoint(u)){const h=this._splitSafely(a,u);for(let f=0,p=h.length;f<p;f++)r.push(h[f])}if(!l.isAnEndpoint(u)){const h=this._splitSafely(l,u);for(let f=0,p=h.length;f<p;f++)r.push(h[f])}}}this.tree.remove(t)}return r}_splitSafely(e,t){this.tree.remove(e);const r=e.rightSE;this.queue.remove(r);const i=e.split(t);return i.push(r),e.consumedBy===void 0&&this.tree.add(e),i}}const Hd=typeof process<"u"&&process.env.POLYGON_CLIPPING_MAX_QUEUE_SIZE||1e6,ty=typeof process<"u"&&process.env.POLYGON_CLIPPING_MAX_SWEEPLINE_SEGMENTS||1e6;class ry{run(e,t,r){Yn.type=e,du.reset();const i=[new qd(t,!0)];for(let f=0,p=r.length;f<p;f++)i.push(new qd(r[f],!1));if(Yn.numMultiPolys=i.length,Yn.type==="difference"){const f=i[0];let p=1;for(;p<i.length;)gh(i[p].bbox,f.bbox)!==null?p++:i.splice(p,1)}if(Yn.type==="intersection")for(let f=0,p=i.length;f<p;f++){const v=i[f];for(let w=f+1,I=i.length;w<I;w++)if(gh(v.bbox,i[w].bbox)===null)return[]}const s=new ch(Pn.compare);for(let f=0,p=i.length;f<p;f++){const v=i[f].getSweepEvents();for(let w=0,I=v.length;w<I;w++)if(s.insert(v[w]),s.size>Hd)throw new Error("Infinite loop when putting segment endpoints in a priority queue (queue size too big).")}const o=new ey(s);let a=s.size,l=s.pop();for(;l;){const f=l.key;if(s.size===a){const v=f.segment;throw new Error(`Unable to pop() ${f.isLeft?"left":"right"} SweepEvent [${f.point.x}, ${f.point.y}] from segment #${v.id} [${v.leftSE.point.x}, ${v.leftSE.point.y}] -> [${v.rightSE.point.x}, ${v.rightSE.point.y}] from queue.`)}if(s.size>Hd)throw new Error("Infinite loop when passing sweep line over endpoints (queue size too big).");if(o.segments.length>ty)throw new Error("Infinite loop when passing sweep line over endpoints (too many sweep line segments).");const p=o.process(f);for(let v=0,w=p.length;v<w;v++){const I=p[v];I.consumedBy===void 0&&s.insert(I)}a=s.size,l=s.pop()}du.reset();const u=uc.factory(o.segments);return new jv(u).getGeom()}}const Yn=new ry;var mh={union:function(n){for(var e=arguments.length,t=new Array(e>1?e-1:0),r=1;r<e;r++)t[r-1]=arguments[r];return Yn.run("union",n,t)},intersection:function(n){for(var e=arguments.length,t=new Array(e>1?e-1:0),r=1;r<e;r++)t[r-1]=arguments[r];return Yn.run("intersection",n,t)},xor:function(n){for(var e=arguments.length,t=new Array(e>1?e-1:0),r=1;r<e;r++)t[r-1]=arguments[r];return Yn.run("xor",n,t)},difference:function(n){for(var e=arguments.length,t=new Array(e>1?e-1:0),r=1;r<e;r++)t[r-1]=arguments[r];return Yn.run("difference",n,t)}};function ny(n,e){var t=Wr(n),r=Wr(e),i=n.properties||{},s=mh.difference(t.coordinates,r.coordinates);return s.length===0?null:s.length===1?ar(s[0],i):Pc(s,i)}function iy(n,e,t){t===void 0&&(t={});var r=Wr(n),i=Wr(e),s=mh.intersection(r.coordinates,i.coordinates);return s.length===0?null:s.length===1?ar(s[0],t.properties):Pc(s,t.properties)}function sy(n,e,t){t===void 0&&(t={});var r=Wr(n),i=Wr(e),s=mh.union(r.coordinates,i.coordinates);return s.length===0?null:s.length===1?ar(s[0],t.properties):Pc(s,t.properties)}function Yd(n,e){(n[0][0]!==n[n.length-1][0]||n[0][1]!==n[n.length-1][1]||n[0][2]!==n[n.length-1][2])&&n.push(n[0]),(e[0][0]!==e[e.length-1][0]||e[0][1]!==e[e.length-1][1]||e[0][2]!==e[e.length-1][2])&&e.push(e[0]);const t=iy(ar([n]),ar([e]));if(t)return t.geometry.coordinates}function Jd(n,e){(n[0][0]!==n[n.length-1][0]||n[0][1]!==n[n.length-1][1]||n[0][2]!==n[n.length-1][2])&&n.push(n[0]),(e[0][0]!==e[e.length-1][0]||e[0][1]!==e[e.length-1][1]||e[0][2]!==e[e.length-1][2])&&e.push(e[0]);const t=sy(ar([n]),ar([e]));if(t)return t.geometry.coordinates}function Zd(n,e=500,t="meters"){const r=Ov(On(n),e,{units:t});if(r)return r.geometry.coordinates}function Kd(n,e){(n[0][0]!==n[n.length-1][0]||n[0][1]!==n[n.length-1][1]||n[0][2]!==n[n.length-1][2])&&n.push(n[0]),(e[0][0]!==e[e.length-1][0]||e[0][1]!==e[e.length-1][1]||e[0][2]!==e[e.length-1][2])&&e.push(e[0]);const t=ny(ar([n]),ar([e]));if(t)return t.geometry.coordinates}function Qd(n,e,t=10,r="meters"){return xv(n,e,{steps:t,units:r}).geometry.coordinates}function vh(n,e){(n[0][0]!==n[n.length-1][0]||n[0][1]!==n[n.length-1][1]||n[0][2]!==n[n.length-1][2])&&n.push(n[0]),(e[0][0]!==e[e.length-1][0]||e[0][1]!==e[e.length-1][1]||e[0][2]!==e[e.length-1][2])&&e.push(e[0]);const t=ar([n]),r=ar([e]);return Cm(t,r)?"oneBig":xm(t,r)?"twoBig":!1}function Bd(n){const e=c.min(c.objsIterator(n,["0"])),t=c.min(c.objsIterator(n,["1"])),r=c.min(c.objsIterator(n,["2"])),i=c.max(c.objsIterator(n,["0"])),s=c.max(c.objsIterator(n,["1"])),o=c.max(c.objsIterator(n,["2"]));return{minPos:[e,t,r],maxPos:[i,s,o],center:[(e+i)*.5,(t+s)*.5,(r+o)*.5]}}function oy(n){const{minPos:e,maxPos:t,center:r}=Bd(n);if(e.some(a=>!Number.isFinite(a)||t.some(l=>!Number.isFinite(l))||r.some(l=>!Number.isFinite(l)))){console.warn("geoCenterAndRadiusFromPositions error: minPos.some(e => !Number.isFinite(e) || maxPos.some(e => !Number.isFinite(e)) || center.some(e => !Number.isFinite(e))");return}const i=Lc(e,t);let s=i*.5;const o=Math.abs(e[2]-t[2]);return o!=0&&(s=Math.sqrt(i*i+o*o)*.5),{center:r,radius:s}}const $d=xh("+title=WGS 84 (long/lat) +proj=longlat +ellps=WGS84 +datum=WGS84 +units=degrees","+proj=geocent +datum=WGS84");function _i(n){return $d.forward(n)}function jd(n){return $d.inverse(n)}const ep=xh("+title=WGS 84 (long/lat) +proj=longlat +ellps=WGS84 +datum=WGS84 +units=degrees","+proj=merc +a=6378137 +b=6378137 +lat_ts=0 +lon_0=0 +x_0=0 +y_0=0 +k=1 +units=m +nadgrids=@null +wktext +no_defs +type=crs");function ay(n){const e=ep.forward([n[0],n[1]]);return[e[0],e[1],n[2]]}function ly(n){const e=ep.inverse([n[0],n[1]]);return[e[0],e[1],n[2]]}function tp(n,e){const t=_i(n),r=_i(e);return c.Vector.distance(t,r)}function pu(n,e){const t=[];do{const r=n.length;let i=0;for(let s=0;s<r-1;++s){if(e===void 0||e==="GEODESIC"){const o=Lc(n[s],n[s+1]),a=Math.abs(n[s][2]-n[s+1][2]);if(a===0)i+=o;else{const l=Math.sqrt(o*o+a*a);i+=l}}else if(e==="RHUMB"){const o=yf(n[s],n[s+1]),a=Math.abs(n[s][2]-n[s+1][2]);if(a===0)i+=o;else{const l=Math.sqrt(o*o+a*a);i+=l}}else if(e==="NONE"){const o=tp(n[s],n[s+1]);i+=o}else console.warn(`未知的arcType: ${e},导致距离无法计算!`);t.push(i)}}while(!1);return t}function yh(n){const e="__getXyzFromPostion";let t=c.getExtProp(n,e);return(!t||!c.Vector.equals(t[0],n))&&(t=[[...n],_i(n)],c.setExtProp(n,e,t)),t[1]}class rp extends c.Destroyable{constructor(){super();d(this,"_data",this.dv(c.react(void 0)))}set data(t){this._data.value=t}get data(){return this._data.value}get dataChanged(){return this._data.changed}}class np extends c.Destroyable{constructor(){super(...arguments);d(this,"_dragStartEvent",this.dv(new c.Event));d(this,"_dragOverEvent",this.dv(new c.Event));d(this,"_dragLeaveEvent",this.dv(new c.Event));d(this,"_dropEvent",this.dv(new c.Event))}dragStart(t){this._dragStartEvent.emit(t)}dragOver(t){this._dragOverEvent.emit(t)}dragLeave(t){this._dragLeaveEvent.emit(t)}drop(t){this._dropEvent.emit(t)}}function uy(n,e){e&&(Reflect.has(e,"editing")?e.editing=!0:Reflect.has(e,"positionEditing")&&(e.positionEditing=!0))}function cy(n){["Czm3DTiles","View","ESCameraView","OlView","GeoCameraController"].includes(n.typeName)||(Reflect.has(n,"editing")?n.editing=!0:Reflect.has(n,"positionEditing")&&(n.positionEditing=!0)),typeof n.execOnCreating=="function"&&n.execOnCreating()}function cc(n,e){c.getExtProp(n,"__treeItem")&&console.error("setSceneObjectTreeItem error!"),c.setExtProp(n,"__treeItem",e)}function hy(n){return c.getExtProp(n,"__treeItem")}function fy(n){if(!(n.startsWith("./")||n.startsWith("../")||n.startsWith("/")))return n;const e=document.createElement("a");e.href=n;const t=e.href;return e.remove(),t}function dy(n){try{return JSON.parse(n),!0}catch{return!1}}function py(n){return n instanceof Function?n():n}function ip(n,e){for(let t of n)if(e.includes(t))return!0;return!1}function Ji(n,e){const t=n,r=e;return t===void 0||t.length===0||r===void 0||r.length===0?!0:ip(t,r)}function gy(n){const e=setTimeout(()=>{n(),clearTimeout(e)})}function Ml(n){let e=n%360;return e=e<0?360+e:e,e}function sp(n){return Ml(n+180)-180}function hc(n,e,t){let r=Ml(n),i=Ml(e);Math.abs(r-i)>180&&(r<i?r+=360:i+=360);const s=r*(1-t)+i*t;return sp(s)}function _h(n,e,t,r){return r=r||[0,0,0],r[0]=hc(n[0],e[0],t),r[1]=hc(n[1],e[1],t),r[2]=hc(n[2],e[2],t),r}async function op(n,e,t="editing"){const r=new c.Destroyable;n.ad(r);const i=e.bind(n);let s=n.viewer;if(s||await new Promise(o=>{r.ad(n.viewerChanged.don(a=>{s=a,o()}))}),!s){console.warn("viewer is undefined!,无法绑定编辑");return}return r.ad(n[`${t}Changed`].don(()=>{var o;n[`${t}`]?i():(o=(n.combinationClass?n.getMainClass():n).editingID)!=null&&o.includes("inner")&&s&&s.stopEditing()})),r.ad(s.editingEvent.don(o=>{if(o.objectIDs.includes(n.id)&&o.type==="end"){const a=n.combinationClass?n.getMainClass():n;a.editingID&&o.editingID.includes(a.editingID)?n[`${t}`]=!1:n[`${t}`]=!a.editingID.includes("outer")}})),n[`${t}`]&&i(),r}function my(n,e){const{type:t,id:r}=n;if(t){const i=j.create(t,r);if(i)return i.json=n,i;console.warn(`cannot create sceneObject from type(${t})`)}else console.warn(`cannot create sceneObject from type(${t})`)}function ap(n){const e=n.children&&c.every(n.children,r=>{if(!(r instanceof sr))throw new Error("!(treeItem instanceof SceneTreeItem)");return!r.show})||!1,t=n.sceneTree.getSceneObjectShowFunc(n.sceneObject);return!e||t}class sr extends c.TreeItem{constructor(t,r=!1,i,s,o=!0){super(t,r,i);d(this,"_dragDrop");d(this,"_showChangedNotAffectChildren",!1);d(this,"_showChangedNotAffectParent",!1);d(this,"_type",this.dv(c.react("Unknown")));d(this,"_isExport",this.dv(c.react(!0)));const a=()=>this.tree&&this.tree.itemsChanged.emit([this]);this.dispose(this.nameChanged.disposableOn(a)),this.name=`未命名条目(${this.id})`,this.extras=s,this._isExport.value=o;let l;const u=()=>{l&&(l(),l=void 0)};this.dispose(u),this.dispose(this.sceneObjectChanged.disposableOn(h=>{u(),h&&(l=c.bind([this,"name"],[h,"name"]))})),this.dispose(this.showChanged.disposableOn(h=>{if(t.setSceneObjectShowFunc(this.sceneObject,h),this.tree&&this.tree.forceRedraw(),this.children&&!this._showChangedNotAffectChildren)for(let f of this.children)f instanceof sr&&(f._showChangedNotAffectParent=!0,f.show=h,f._showChangedNotAffectParent=!1);this.parent&&this.parent instanceof sr&&!this._showChangedNotAffectParent&&(this.parent._showChangedNotAffectChildren=!0,this.parent.show=ap(this.parent),this.parent._showChangedNotAffectChildren=!1)})),this.dv(new c.ObjResettingWithEvent(this.sceneObjectChanged,()=>{if(!this.sceneObject)return;const h=new c.Destroyable;if("show"in this.sceneObject&&"showChanged"in this.sceneObject&&this.sceneObject.showChanged instanceof Event){const f=()=>{this.show=t.getSceneObjectShowFunc(this.sceneObject)};f(),h.dispose(this.sceneObject.showChanged.disposableOn(f))}else if("enabled"in this.sceneObject&&"enabledChanged"in this.sceneObject&&this.sceneObject.enabledChanged instanceof Event){const f=()=>{this.show=t.getSceneObjectShowFunc(this.sceneObject)};f(),h.dispose(this.sceneObject.enabledChanged.disposableOn(f))}return h})),this.childrenChangedEvent.disposableOn(()=>{const h=ap(this);this._showChangedNotAffectChildren=!0,this.show=h,this._showChangedNotAffectChildren=!1});{const h=()=>{let f="Unknown";this.sceneObject?f=this.sceneObject.typeName:this.children&&(f="Folder"),this._type.value=f};this.dispose(this.sceneObjectChanged.disposableOn(h)),this.dispose(this.childrenResetedEvent.disposableOn(h)),h()}}get dragDrop(){return this._dragDrop||(this._dragDrop=this.dv(this.sceneTree.createTreeItemDragDropFunc(this))),this._dragDrop}get type(){return this._type.value}get typeChanged(){return this._type.changed}get isExport(){return this._isExport.value}get isExportChanged(){return this._isExport.changed}set isExport(t){this._isExport.value=t}get sceneTree(){return this.tree}get jsonStr(){return JSON.stringify(this.json,void 0," ")}set jsonStr(t){try{this.json=JSON.parse(t)}catch(r){console.error(`sceneTreeItem.jsonStr error ${r}`,r)}}get json(){const t=this.children&&[...this.children].filter(r=>r.isExport).map(r=>r.json);return{name:this.name,show:this.show?void 0:!1,collapsed:this.uiTreeObject.collapsed?!0:void 0,sceneObj:this.sceneObject&&this.sceneObject.json,children:t,extras:this.extras}}set json(t){if(t.name!==void 0&&(this.name=t.name),this.extras=t.extras,this._showChangedNotAffectChildren=!0,this._showChangedNotAffectParent=!0,this.show=t.show??!0,this._showChangedNotAffectChildren=!1,this._showChangedNotAffectParent=!1,this.uiTreeObject.collapsed=t.collapsed??!1,this.sceneObject=void 0,t.sceneObj&&(this.sceneObject=this.sceneTree.createSceneObjectFunc(t.sceneObj,this)),!!t.children){if(this.resetChildren(!0),!this.children)throw new Error("resetChildren(true) cannot get children!");for(let r of t.children){const i=new sr(this.tree,!0);i.json=r,this.children.push(i)}}}clone(){try{const t=new sr(this.sceneTree,!!this.children,void 0,this.extras,this.isExport);return t.json=this.json,t.name=this.sceneTree.getSceneTreeItemCloneNameFunc(this),t}catch(t){console.error(`SceneTreeItem.clone error: ${t}`,t)}}insertNewTreeItem(t,r){if(t==="FolderInnerOrAfter"||t==="FolderInnerOrBefore"||t==="FolderInner"){if(r&&r.tree!==this.tree)return console.warn("newTreeItem.tree !== this.tree"),!1;do{if(!this.children||t.includes("Or")&&this.sceneObject)break;return r&&this.children.push(r),!0}while(!1);if(t==="FolderInner")return!1;if(t==="FolderInnerOrAfter")return super.insertNewTreeItem("After",r);if(t==="FolderInnerOrBefore")return super.insertNewTreeItem("Before",r);throw new Error("should not be here!")}else return super.insertNewTreeItem(t,r)}}(n=>{n.createDefaultProps=()=>({name:"未命名条目",nameEditing:!1,sceneObject:void 0,show:!0,extras:c.reactJsonWithUndefined(void 0)})})(sr||(sr={})),c.extendClassProps(sr.prototype,sr.createDefaultProps);function lp(n,e,t){let{offsetY:r}=e;if(!e.target||!("clientTop"in e.target))return"none";r+=2,r+=e.target.clientTop;let i="none";return n.children?r<=t*.3?i="before":r>=t*.7?!n.uiTreeObject.collapsed&&n.children.length>0?i="inner":i="after":i="inner":r<=t*.5?i="before":i="after",i}class up extends np{constructor(e){super(),this._treeItem=e;const{dragStartDataManager:t}=this._treeItem.sceneTree;let r="none";const i=this.disposeVar(c.createTimeoutWithStartValues(()=>{this._treeItem.uiTreeObject.moveToPositionMode=r,console.log(`uiTreeObject.moveToPositionMode = lastDragMode(${r});`)},200));function s(o){r!==o&&(r=o,i.restart())}this.dispose(this._dragStartEvent.disposableOn(o=>{t.data={type:"UITreeA",value:this._treeItem}})),this.dispose(this._dragOverEvent.disposableOn(o=>{if(o.dataTransfer){o.preventDefault();do{const a=t;if(!(a.data&&a.data.type==="UITreeA"&&a.data.value!==void 0))break;const l=a.data.value,u=this._treeItem,{tree:h}=u;if(!h)break;const f=[...h.selectedItems];~f.indexOf(l)||f.push(l);const p=lp(u,o,h.itemDivHeight);if(p==="none"||!c.Tree.canMoveToTreeItems(f,u,p))break;o.dataTransfer.dropEffect="move",s(p);return}while(!1);o.dataTransfer.dropEffect="none",s("none")}})),this.dispose(this._dropEvent.disposableOn(o=>{const a=t;if(!(a.data&&a.data.type==="UITreeA"&&a.data.value!==void 0))return;const l=a.data.value,u=this._treeItem,{tree:h}=u;if(!h)return;const f=[...h.selectedItems];~f.indexOf(l)||f.push(l);const p=lp(u,o,h.itemDivHeight);p!=="none"&&c.Tree.canMoveToTreeItems(f,u,p)&&(c.Tree.moveToTreeItems(f,u,p),a.data=void 0,s("none"))})),this.dispose(this._dragLeaveEvent.disposableOn(()=>{r="none",i.restart()}))}}function vy(n){if(!(n instanceof sr))throw new Error("defaultCreateTreeItemDragDrop !(treeItem instanceof SceneTreeItem)");return new up(n)}function yy(n){let e=!1;do{if(!n)break;"show"in n?e=n.show??!0:"enabled"in n&&(e=n.enabled??!0)}while(!1);return e}function _y(n,e){n&&("show"in n?n.show=e:"enabled"in n&&(n.enabled=e))}const wy=["EnvironmentVariables","ScriptsLoader","SceneScript","ScriptLoader"];function Ey(n){const e=[],{root:t={}}=n,r=[t];for(;r.length>0;){const i=r.pop();if(!i)throw new Error("!todo");if(i.children){for(let s of i.children)if(s.children&&r.unshift(s),s.sceneObj){const{type:o=void 0}=s.sceneObj;o||(console.warn("sceneObjJson has no type! treeItem.sceneObj: "),console.warn(s.sceneObj)),o&&wy.includes(o)&&e.push(s.sceneObj)}}}return e}async function Sy(n,e){const t=Ey(n);let r=0;const i=t.length;for(let s of t)if(++r,e){const o=r/i;e(o,r,i)}}class cp extends c.Destroyable{constructor(t,r){super();d(this,"treeItemContexMenuCallback");this._sceneTree=t,this._projectManager=r}get sceneTree(){return this._sceneTree}}class Cy extends c.Destroyable{constructor(t){super();d(this,"_jsonLoadingEvent",this.disposeVar(new c.Event));d(this,"_setJsonProcessing",this.disposeVar(c.createProcessingFromAsyncFunc(async(t,r)=>{this._jsonLoadingEvent.emit({type:"init"}),this._jsonLoadingEvent.emit({type:"loading"}),r&&await t.promise(this._sceneTree.preloadFunc(r)),this._setJson(r),this._jsonLoadingEvent.emit({type:"loaded"})})));this._sceneTree=t,this._setJsonProcessing.errorFunc=r=>{this._jsonLoadingEvent.emit({type:"error",error:r})}}get jsonLoadingEvent(){return this._jsonLoadingEvent}_setJson(t){try{this._sceneTree.setJson(t||{})}catch(r){console.error(`json数据装配时发生错误!error: ${r}`)}}get json(){return this._sceneTree.getJson()}set json(t){this._setJsonProcessing.restart(new c.CancelError("JSON重新赋值!"),t)}get jsonStr(){return JSON.stringify(this.json,void 0," ")}set jsonStr(t){this.json=JSON.parse(t)}}function Py(n){return n.name+"_clone"}function wh(n,e,t){if(n instanceof sr)return n.insertNewTreeItem(e,t);{const r={FolderInnerOrAfter:"InnerOrAfter",FolderInnerOrBefore:"InnerOrBefore",FolderInner:"Inner",InnerOrAfter:"InnerOrAfter",InnerOrBefore:"InnerOrBefore",Inner:"Inner",After:"After",Before:"Before"};return n.insertNewTreeItem(r[e],t)}}function Iy(n){[n,...n.getDescendants()].forEach(e=>e.destroy())}const Mr=class Mr extends c.Tree{constructor(t,r,i,s){super(i);d(this,"_jsonLoading",this.disposeVar(new Cy(this)));d(this,"createSceneObjectFunc",Mr.defaultCreateSceneObjectFunc);d(this,"createTreeItemDragDropFunc",Mr.defaultCreateTreeItemDragDropFunc);d(this,"preloadFunc",Mr.defaultPreload);d(this,"getSceneObjectShowFunc",Mr.defaultGetSceneObjectShow);d(this,"setSceneObjectShowFunc",Mr.defaultSetSceneObjectShow);d(this,"getSceneTreeItemCloneNameFunc",Mr.defaultGetSceneTreeItemCloneNameFunc);d(this,"debug",!1);d(this,"_contextMenu",this.disposeVar(new cp(this,this.projectManager)));d(this,"_showPropUiOnSelecting",this.disposeVar(c.react(!0)));this._name=t,this._dragStartDataManager=r,this._projectManager=s,this.dispose(this.selectedItems.changedEvent.disposableOn(()=>{var a,l;window.lssn=this.lastSelectedItem,window.lsso=(a=this.lastSelectedItem)==null?void 0:a.sceneObject,this.debug&&console.log(((l=this.lastSelectedItem)==null?void 0:l.sceneObject)??"select null")}));const{sceneObjectsManager:o}=this._projectManager;this.dispose(this.itemsDeleted.disposableOn(a=>{for(let l of a){const u=l,{sceneObject:h}=u;h&&o.deleteSceneObject(h)&&h.destroy()&&cc(h,void 0);for(let f of u.getDescendants()){const{sceneObject:p}=f;p&&o.deleteSceneObject(p)&&p.destroy()&&cc(p,void 0)}Iy(l)}})),this.dispose(this.itemsAdded.disposableOn(a=>{for(let l of a){const u=l;u.sceneObject&&o.addSceneObject(u.sceneObject)&&cc(u.sceneObject,u)}})),this.dispose(this.selectedItems.changedEvent.disposableOn(()=>{if(!this.showPropUiOnSelecting)return;this._projectManager.propUiTreeManager.sceneObject=void 0;const{lastSelectedItem:a}=this;a&&(this._projectManager.propUiTreeManager.sceneObject=a.sceneObject)}))}get json(){return this._jsonLoading.json}set json(t){this._jsonLoading.json=t}get jsonStr(){return this._jsonLoading.jsonStr}set jsonStr(t){this._jsonLoading.jsonStr=t}get jsonLoadingEvent(){return this._jsonLoading.jsonLoadingEvent}get name(){return this._name}get projectManager(){return this._projectManager}get contextMenu(){return this._contextMenu}get showPropUiOnSelecting(){return this._showPropUiOnSelecting.value}set showPropUiOnSelecting(t){this._showPropUiOnSelecting.value=t}get showPropUiOnSelectingChanged(){return this._showPropUiOnSelecting.changed}get sceneUiTree(){return this.uiTree}getTreeItemFromSceneObjId(t){const r=this.getDescendants();let i;for(let s of r)if(s.sceneObject&&s.sceneObject.id===t){i=s;break}return i}get dragStartDataManager(){return this._dragStartDataManager}getJson(){return{root:{children:[...this.children].filter(t=>t.isExport).map(t=>t.json)}}}setJson(t){var i;t.root=t.root||{};const r=t.root.children??[];this.root.resetChildren(!0);for(let s of r){const o=new sr(this,!0);o.json=s,(i=this.root.children)==null||i.push(o)}}testAddNewTreeItem(t,r){const i=t||this.lastSelectedItem||this.root;return i?wh(i,r):!1}addNewTreeItem(t,r,i,s){const o=t||this.lastSelectedItem||this.root;if(o&&wh(o,r)){const a=new sr(this,i);if(a.sceneObject=s,!wh(o,r,a))throw new Error("currentTreeItem.insertNewTreeItem return false!");return a}}createSceneObjectTreeItem(t,r,i,s){const o=s??"FolderInnerOrAfter";if(!this.testAddNewTreeItem(i,o)){console.warn(`cannot addNewTreeItem! currentTreeItem(${i?i.id:"root"})`);return}const a=j.create(t,r);return a?this.addNewTreeItem(i,s??"FolderInnerOrAfter",!0,a):void 0}createGroupTreeItem(t,r,i,s){const o=s??"FolderInnerOrAfter";if(!this.testAddNewTreeItem(i,o)){console.warn(`cannot addNewTreeItem! currentTreeItem(${i?i.id:"root"})`);return}const a=this.addNewTreeItem(i,s??"FolderInnerOrAfter",!0);if(!a){console.warn("addNewTreeItem error!");return}return a.name=t??"未命名组节点",a}createSceneObjectTreeItemFromClass(t,r,i,s){const o=s??"FolderInnerOrAfter";if(!this.testAddNewTreeItem(i,o))return;const a=j.createFromClass(t,r);return a?this.addNewTreeItem(i,o,!0,a):void 0}createSceneObjectTreeItemFromJson(t,r,i){const s=i??"FolderInnerOrAfter";if(!this.testAddNewTreeItem(r,s))return;const o=j.createFromJson(t);return console.log(o),o?this.addNewTreeItem(r,i??"FolderInnerOrAfter",!0,o):void 0}destroySceneObjectTreeItem(t){if(t===this.root){console.warn("cannot destroy root! please use function destroyAllSceneObjectTreeItems!");return}t.detachFromParent()}destroyAllSceneObjectTreeItems(){if(!this.root.children)return;const t=[...this.root.children];for(let r of t)this.destroySceneObjectTreeItem(r)}};d(Mr,"defaultCreateSceneObjectFunc",my),d(Mr,"defaultCreateTreeItemDragDropFunc",vy),d(Mr,"defaultPreload",Sy),d(Mr,"defaultGetSceneObjectShow",yy),d(Mr,"defaultSetSceneObjectShow",_y),d(Mr,"defaultGetSceneTreeItemCloneNameFunc",Py);let gu=Mr;const Eh={saturation:.35,brightness:1.4,gamma:.8,atmosphereScatteringIntensity:5,groundColor:[0,.09411764705882353,.3137254901960784,1]};class hp extends c.Tree{constructor(e){super(e)}get propUiTree(){return this.uiTree}}class Sh extends c.TreeItem{constructor(e,t,r){super(e,t),this._property=r}get property(){return this._property}}class Ch extends Sh{constructor(e,t){super(e,!1,t)}}class Ph extends Sh{constructor(e,t){super(e,!0,t)}get groupChildren(){return this.children}}function fp(n,e){const t=new hp(e),r=n.getProperties("chinese"),i=[];for(let s of r)if(s instanceof z){const o=new Ph(t,s);o.d(()=>s.destroy()),t.children.push(o),i.push(o)}else{const o=new Ch(t,s);t.children.push(o),o.d(()=>s.destroy())}for(;i.length>0;){const s=i.pop();if(!s)throw new Error("should not be here!");const o=s;if(!(o.property instanceof z))throw new Error("!(treeItem.property instanceof GroupProperty)");for(let a of o.property.children)if(a instanceof z){const l=new Ph(t,a);l.d(()=>a.destroy()),o.groupChildren.push(l),i.push(l)}else{const l=new Ch(t,a);o.groupChildren.push(l),l.d(()=>a.destroy())}}return t.d(()=>{t.itemChildrenChanged.reset(),t.itemChildrenToChange.reset();const s=[...t.getDescendants()];s.forEach(o=>{o.children&&(o.children.length=0),o.destroy()}),s.length=0}),t}class xl extends c.Destroyable{constructor(t){super();d(this,"_propTreeReact",this.dv(c.react(void 0)));this.d(()=>this._propTreeReact.value=void 0),this.dv(new c.ObjResettingWithEvent(this.sceneObjectChanged,r=>{if(!r)return;const i=new c.Destroyable;return i.d(r.toDestroyEvent.don(()=>{this.sceneObject=void 0})),i})),this.d(this.sceneObjectChanged.don(r=>{this._propTreeReact.value=void 0,!(!r||!(r instanceof j))&&(this._propTreeReact.value=fp(r,t))}))}get propTree(){return this._propTreeReact.value}get propTreeChanged(){return this._propTreeReact.changed}}(n=>{n.createDefaultProps=()=>({sceneObject:void 0})})(xl||(xl={})),c.extendClassProps(xl.prototype,xl.createDefaultProps);function Ty(n,e,t,r=!0){r&&t(),n.dispose(e.disposableOn(t))}class Dy extends c.Destroyable{constructor(t,r,i,s){super();d(this,"_sceneObjectId",this.dv(new c.SceneObjectWithId));this._id=t,this._startTimeStamp=r,this._duration=i,this._parent=s,this._sceneObjectId.id=this._id;const o=()=>{if(!this.player)return;const{currentTime:a=0}=this._parent,l=a-this._startTimeStamp;this.player.currentTime=c.clamp(l,0,this._duration)*(this.player.speed??1)};o(),this.d(this._parent.currentTimeChanged.don(o)),this.d(this.playerChanged.don(o))}get player(){return this._sceneObjectId.sceneObject instanceof Jn?this._sceneObjectId.sceneObject:void 0}get playerChanged(){return this._sceneObjectId.sceneObjectChanged}}const Ny=`
26
+ ***************************************************************************** */function Fv(n,t){var e={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},r,i,s,o;return o={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function a(l){return function(c){return u([l,c])}}function u(l){if(r)throw new TypeError("Generator is already executing.");for(;e;)try{if(r=1,i&&(s=l[0]&2?i.return:l[0]?i.throw||((s=i.return)&&s.call(i),0):i.next)&&!(s=s.call(i,l[1])).done)return s;switch(i=0,s&&(l=[l[0]&2,s.value]),l[0]){case 0:case 1:s=l;break;case 4:return e.label++,{value:l[1],done:!1};case 5:e.label++,i=l[1],l=[0];continue;case 7:l=e.ops.pop(),e.trys.pop();continue;default:if(s=e.trys,!(s=s.length>0&&s[s.length-1])&&(l[0]===6||l[0]===2)){e=0;continue}if(l[0]===3&&(!s||l[1]>s[0]&&l[1]<s[3])){e.label=l[1];break}if(l[0]===6&&e.label<s[1]){e.label=s[1],s=l;break}if(s&&e.label<s[2]){e.label=s[2],e.ops.push(l);break}s[2]&&e.ops.pop(),e.trys.pop();continue}l=t.call(n,e)}catch(c){l=[6,c],i=0}finally{r=s=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}}var $i=function(){function n(t,e){this.next=null,this.key=t,this.data=e,this.left=null,this.right=null}return n}();function kv(n,t){return n>t?1:n<t?-1:0}function ji(n,t,e){for(var r=new $i(null,null),i=r,s=r;;){var o=e(n,t.key);if(o<0){if(t.left===null)break;if(e(n,t.left.key)<0){var a=t.left;if(t.left=a.right,a.right=t,t=a,t.left===null)break}s.left=t,s=t,t=t.left}else if(o>0){if(t.right===null)break;if(e(n,t.right.key)>0){var a=t.right;if(t.right=a.left,a.left=t,t=a,t.right===null)break}i.right=t,i=t,t=t.right}else break}return i.right=t.left,s.left=t.right,t.left=r.right,t.right=r.left,t}function Bl(n,t,e,r){var i=new $i(n,t);if(e===null)return i.left=i.right=null,i;e=ji(n,e,r);var s=r(n,e.key);return s<0?(i.left=e.left,i.right=e,e.left=null):s>=0&&(i.right=e.right,i.left=e,e.right=null),i}function zd(n,t,e){var r=null,i=null;if(t){t=ji(n,t,e);var s=e(t.key,n);s===0?(r=t.left,i=t.right):s<0?(i=t.right,t.right=null,r=t):(r=t.left,t.left=null,i=t)}return{left:r,right:i}}function Vv(n,t,e){return t===null?n:(n===null||(t=ji(n.key,t,e),t.left=n),t)}function $l(n,t,e,r,i){if(n){r(""+t+(e?"└── ":"├── ")+i(n)+`
27
+ `);var s=t+(e?" ":"│ ");n.left&&$l(n.left,s,!1,r,i),n.right&&$l(n.right,s,!0,r,i)}}var jl=function(){function n(t){t===void 0&&(t=kv),this._root=null,this._size=0,this._comparator=t}return n.prototype.insert=function(t,e){return this._size++,this._root=Bl(t,e,this._root,this._comparator)},n.prototype.add=function(t,e){var r=new $i(t,e);this._root===null&&(r.left=r.right=null,this._size++,this._root=r);var i=this._comparator,s=ji(t,this._root,i),o=i(t,s.key);return o===0?this._root=s:(o<0?(r.left=s.left,r.right=s,s.left=null):o>0&&(r.right=s.right,r.left=s,s.right=null),this._size++,this._root=r),this._root},n.prototype.remove=function(t){this._root=this._remove(t,this._root,this._comparator)},n.prototype._remove=function(t,e,r){var i;if(e===null)return null;e=ji(t,e,r);var s=r(t,e.key);return s===0?(e.left===null?i=e.right:(i=ji(t,e.left,r),i.right=e.right),this._size--,i):e},n.prototype.pop=function(){var t=this._root;if(t){for(;t.left;)t=t.left;return this._root=ji(t.key,this._root,this._comparator),this._root=this._remove(t.key,this._root,this._comparator),{key:t.key,data:t.data}}return null},n.prototype.findStatic=function(t){for(var e=this._root,r=this._comparator;e;){var i=r(t,e.key);if(i===0)return e;i<0?e=e.left:e=e.right}return null},n.prototype.find=function(t){return this._root&&(this._root=ji(t,this._root,this._comparator),this._comparator(t,this._root.key)!==0)?null:this._root},n.prototype.contains=function(t){for(var e=this._root,r=this._comparator;e;){var i=r(t,e.key);if(i===0)return!0;i<0?e=e.left:e=e.right}return!1},n.prototype.forEach=function(t,e){for(var r=this._root,i=[],s=!1;!s;)r!==null?(i.push(r),r=r.left):i.length!==0?(r=i.pop(),t.call(e,r),r=r.right):s=!0;return this},n.prototype.range=function(t,e,r,i){for(var s=[],o=this._comparator,a=this._root,u;s.length!==0||a;)if(a)s.push(a),a=a.left;else{if(a=s.pop(),u=o(a.key,e),u>0)break;if(o(a.key,t)>=0&&r.call(i,a))return this;a=a.right}return this},n.prototype.keys=function(){var t=[];return this.forEach(function(e){var r=e.key;return t.push(r)}),t},n.prototype.values=function(){var t=[];return this.forEach(function(e){var r=e.data;return t.push(r)}),t},n.prototype.min=function(){return this._root?this.minNode(this._root).key:null},n.prototype.max=function(){return this._root?this.maxNode(this._root).key:null},n.prototype.minNode=function(t){if(t===void 0&&(t=this._root),t)for(;t.left;)t=t.left;return t},n.prototype.maxNode=function(t){if(t===void 0&&(t=this._root),t)for(;t.right;)t=t.right;return t},n.prototype.at=function(t){for(var e=this._root,r=!1,i=0,s=[];!r;)if(e)s.push(e),e=e.left;else if(s.length>0){if(e=s.pop(),i===t)return e;i++,e=e.right}else r=!0;return null},n.prototype.next=function(t){var e=this._root,r=null;if(t.right){for(r=t.right;r.left;)r=r.left;return r}for(var i=this._comparator;e;){var s=i(t.key,e.key);if(s===0)break;s<0?(r=e,e=e.left):e=e.right}return r},n.prototype.prev=function(t){var e=this._root,r=null;if(t.left!==null){for(r=t.left;r.right;)r=r.right;return r}for(var i=this._comparator;e;){var s=i(t.key,e.key);if(s===0)break;s<0?e=e.left:(r=e,e=e.right)}return r},n.prototype.clear=function(){return this._root=null,this._size=0,this},n.prototype.toList=function(){return Uv(this._root)},n.prototype.load=function(t,e,r){e===void 0&&(e=[]),r===void 0&&(r=!1);var i=t.length,s=this._comparator;if(r&&rc(t,e,0,i-1,s),this._root===null)this._root=tc(t,e,0,i),this._size=i;else{var o=Gv(this.toList(),zv(t,e),s);i=this._size+i,this._root=ec({head:o},0,i)}return this},n.prototype.isEmpty=function(){return this._root===null},Object.defineProperty(n.prototype,"size",{get:function(){return this._size},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"root",{get:function(){return this._root},enumerable:!0,configurable:!0}),n.prototype.toString=function(t){t===void 0&&(t=function(r){return String(r.key)});var e=[];return $l(this._root,"",!0,function(r){return e.push(r)},t),e.join("")},n.prototype.update=function(t,e,r){var i=this._comparator,s=zd(t,this._root,i),o=s.left,a=s.right;i(t,e)<0?a=Bl(e,r,a,i):o=Bl(e,r,o,i),this._root=Vv(o,a,i)},n.prototype.split=function(t){return zd(t,this._root,this._comparator)},n.prototype[Symbol.iterator]=function(){var t,e,r;return Fv(this,function(i){switch(i.label){case 0:t=this._root,e=[],r=!1,i.label=1;case 1:return r?[3,6]:t===null?[3,2]:(e.push(t),t=t.left,[3,5]);case 2:return e.length===0?[3,4]:(t=e.pop(),[4,t]);case 3:return i.sent(),t=t.right,[3,5];case 4:r=!0,i.label=5;case 5:return[3,1];case 6:return[2]}})},n}();function tc(n,t,e,r){var i=r-e;if(i>0){var s=e+Math.floor(i/2),o=n[s],a=t[s],u=new $i(o,a);return u.left=tc(n,t,e,s),u.right=tc(n,t,s+1,r),u}return null}function zv(n,t){for(var e=new $i(null,null),r=e,i=0;i<n.length;i++)r=r.next=new $i(n[i],t[i]);return r.next=null,e.next}function Uv(n){for(var t=n,e=[],r=!1,i=new $i(null,null),s=i;!r;)t?(e.push(t),t=t.left):e.length>0?(t=s=s.next=e.pop(),t=t.right):r=!0;return s.next=null,i.next}function ec(n,t,e){var r=e-t;if(r>0){var i=t+Math.floor(r/2),s=ec(n,t,i),o=n.head;return o.left=s,n.head=n.head.next,o.right=ec(n,i+1,e),o}return null}function Gv(n,t,e){for(var r=new $i(null,null),i=r,s=n,o=t;s!==null&&o!==null;)e(s.key,o.key)<0?(i.next=s,s=s.next):(i.next=o,o=o.next),i=i.next;return s!==null?i.next=s:o!==null&&(i.next=o),r.next}function rc(n,t,e,r,i){if(!(e>=r)){for(var s=n[e+r>>1],o=e-1,a=r+1;;){do o++;while(i(n[o],s)<0);do a--;while(i(n[a],s)>0);if(o>=a)break;var u=n[o];n[o]=n[a],n[a]=u,u=t[o],t[o]=t[a],t[a]=u}rc(n,t,e,a,i),rc(n,t,a+1,r,i)}}const Ni=11102230246251565e-32,Ye=134217729,Wv=(3+8*Ni)*Ni;function nc(n,t,e,r,i){let s,o,a,u,l=t[0],c=r[0],f=0,p=0;c>l==c>-l?(s=l,l=t[++f]):(s=c,c=r[++p]);let v=0;if(f<n&&p<e)for(c>l==c>-l?(o=l+s,a=s-(o-l),l=t[++f]):(o=c+s,a=s-(o-c),c=r[++p]),s=o,a!==0&&(i[v++]=a);f<n&&p<e;)c>l==c>-l?(o=s+l,u=o-s,a=s-(o-u)+(l-u),l=t[++f]):(o=s+c,u=o-s,a=s-(o-u)+(c-u),c=r[++p]),s=o,a!==0&&(i[v++]=a);for(;f<n;)o=s+l,u=o-s,a=s-(o-u)+(l-u),l=t[++f],s=o,a!==0&&(i[v++]=a);for(;p<e;)o=s+c,u=o-s,a=s-(o-u)+(c-u),c=r[++p],s=o,a!==0&&(i[v++]=a);return(s!==0||v===0)&&(i[v++]=s),v}function qv(n,t){let e=t[0];for(let r=1;r<n;r++)e+=t[r];return e}function Ga(n){return new Float64Array(n)}const Xv=(3+16*Ni)*Ni,Yv=(2+12*Ni)*Ni,Hv=(9+64*Ni)*Ni*Ni,xo=Ga(4),Ud=Ga(8),Gd=Ga(12),Wd=Ga(16),or=Ga(4);function Jv(n,t,e,r,i,s,o){let a,u,l,c,f,p,v,w,I,P,M,m,_,g,y,E,S,N;const T=n-i,x=e-i,b=t-s,O=r-s;g=T*O,p=Ye*T,v=p-(p-T),w=T-v,p=Ye*O,I=p-(p-O),P=O-I,y=w*P-(g-v*I-w*I-v*P),E=b*x,p=Ye*b,v=p-(p-b),w=b-v,p=Ye*x,I=p-(p-x),P=x-I,S=w*P-(E-v*I-w*I-v*P),M=y-S,f=y-M,xo[0]=y-(M+f)+(f-S),m=g+M,f=m-g,_=g-(m-f)+(M-f),M=_-E,f=_-M,xo[1]=_-(M+f)+(f-E),N=m+M,f=N-m,xo[2]=m-(N-f)+(M-f),xo[3]=N;let A=qv(4,xo),F=Yv*o;if(A>=F||-A>=F||(f=n-T,a=n-(T+f)+(f-i),f=e-x,l=e-(x+f)+(f-i),f=t-b,u=t-(b+f)+(f-s),f=r-O,c=r-(O+f)+(f-s),a===0&&u===0&&l===0&&c===0)||(F=Hv*o+Wv*Math.abs(A),A+=T*c+O*a-(b*l+x*u),A>=F||-A>=F))return A;g=a*O,p=Ye*a,v=p-(p-a),w=a-v,p=Ye*O,I=p-(p-O),P=O-I,y=w*P-(g-v*I-w*I-v*P),E=u*x,p=Ye*u,v=p-(p-u),w=u-v,p=Ye*x,I=p-(p-x),P=x-I,S=w*P-(E-v*I-w*I-v*P),M=y-S,f=y-M,or[0]=y-(M+f)+(f-S),m=g+M,f=m-g,_=g-(m-f)+(M-f),M=_-E,f=_-M,or[1]=_-(M+f)+(f-E),N=m+M,f=N-m,or[2]=m-(N-f)+(M-f),or[3]=N;const X=nc(4,xo,4,or,Ud);g=T*c,p=Ye*T,v=p-(p-T),w=T-v,p=Ye*c,I=p-(p-c),P=c-I,y=w*P-(g-v*I-w*I-v*P),E=b*l,p=Ye*b,v=p-(p-b),w=b-v,p=Ye*l,I=p-(p-l),P=l-I,S=w*P-(E-v*I-w*I-v*P),M=y-S,f=y-M,or[0]=y-(M+f)+(f-S),m=g+M,f=m-g,_=g-(m-f)+(M-f),M=_-E,f=_-M,or[1]=_-(M+f)+(f-E),N=m+M,f=N-m,or[2]=m-(N-f)+(M-f),or[3]=N;const U=nc(X,Ud,4,or,Gd);g=a*c,p=Ye*a,v=p-(p-a),w=a-v,p=Ye*c,I=p-(p-c),P=c-I,y=w*P-(g-v*I-w*I-v*P),E=u*l,p=Ye*u,v=p-(p-u),w=u-v,p=Ye*l,I=p-(p-l),P=l-I,S=w*P-(E-v*I-w*I-v*P),M=y-S,f=y-M,or[0]=y-(M+f)+(f-S),m=g+M,f=m-g,_=g-(m-f)+(M-f),M=_-E,f=_-M,or[1]=_-(M+f)+(f-E),N=m+M,f=N-m,or[2]=m-(N-f)+(M-f),or[3]=N;const K=nc(U,Gd,4,or,Wd);return Wd[K-1]}function Zv(n,t,e,r,i,s){const o=(t-s)*(e-i),a=(n-i)*(r-s),u=o-a,l=Math.abs(o+a);return Math.abs(u)>=Xv*l?u:-Jv(n,t,e,r,i,s,l)}const Wa=(n,t)=>n.ll.x<=t.x&&t.x<=n.ur.x&&n.ll.y<=t.y&&t.y<=n.ur.y,ic=(n,t)=>{if(t.ur.x<n.ll.x||n.ur.x<t.ll.x||t.ur.y<n.ll.y||n.ur.y<t.ll.y)return null;const e=n.ll.x<t.ll.x?t.ll.x:n.ll.x,r=n.ur.x<t.ur.x?n.ur.x:t.ur.x,i=n.ll.y<t.ll.y?t.ll.y:n.ll.y,s=n.ur.y<t.ur.y?n.ur.y:t.ur.y;return{ll:{x:e,y:i},ur:{x:r,y:s}}};let ts=Number.EPSILON;ts===void 0&&(ts=Math.pow(2,-52));const Kv=ts*ts,qd=(n,t)=>{if(-ts<n&&n<ts&&-ts<t&&t<ts)return 0;const e=n-t;return e*e<Kv*n*t?0:n<t?-1:1};class Qv{constructor(){this.reset()}reset(){this.xRounder=new Xd,this.yRounder=new Xd}round(t,e){return{x:this.xRounder.round(t),y:this.yRounder.round(e)}}}class Xd{constructor(){this.tree=new jl,this.round(0)}round(t){const e=this.tree.add(t),r=this.tree.prev(e);if(r!==null&&qd(e.key,r.key)===0)return this.tree.remove(t),r.key;const i=this.tree.next(e);return i!==null&&qd(e.key,i.key)===0?(this.tree.remove(t),i.key):t}}const qa=new Qv,Yu=(n,t)=>n.x*t.y-n.y*t.x,Yd=(n,t)=>n.x*t.x+n.y*t.y,Hd=(n,t,e)=>{const r=Zv(n.x,n.y,t.x,t.y,e.x,e.y);return r>0?-1:r<0?1:0},Hu=n=>Math.sqrt(Yd(n,n)),Bv=(n,t,e)=>{const r={x:t.x-n.x,y:t.y-n.y},i={x:e.x-n.x,y:e.y-n.y};return Yu(i,r)/Hu(i)/Hu(r)},$v=(n,t,e)=>{const r={x:t.x-n.x,y:t.y-n.y},i={x:e.x-n.x,y:e.y-n.y};return Yd(i,r)/Hu(i)/Hu(r)},Jd=(n,t,e)=>t.y===0?null:{x:n.x+t.x/t.y*(e-n.y),y:e},Zd=(n,t,e)=>t.x===0?null:{x:e,y:n.y+t.y/t.x*(e-n.x)},jv=(n,t,e,r)=>{if(t.x===0)return Zd(e,r,n.x);if(r.x===0)return Zd(n,t,e.x);if(t.y===0)return Jd(e,r,n.y);if(r.y===0)return Jd(n,t,e.y);const i=Yu(t,r);if(i==0)return null;const s={x:e.x-n.x,y:e.y-n.y},o=Yu(s,t)/i,a=Yu(s,r)/i,u=n.x+a*t.x,l=e.x+o*r.x,c=n.y+a*t.y,f=e.y+o*r.y,p=(u+l)/2,v=(c+f)/2;return{x:p,y:v}};class en{static compare(t,e){const r=en.comparePoints(t.point,e.point);return r!==0?r:(t.point!==e.point&&t.link(e),t.isLeft!==e.isLeft?t.isLeft?1:-1:es.compare(t.segment,e.segment))}static comparePoints(t,e){return t.x<e.x?-1:t.x>e.x?1:t.y<e.y?-1:t.y>e.y?1:0}constructor(t,e){t.events===void 0?t.events=[this]:t.events.push(this),this.point=t,this.isLeft=e}link(t){if(t.point===this.point)throw new Error("Tried to link already linked events");const e=t.point.events;for(let r=0,i=e.length;r<i;r++){const s=e[r];this.point.events.push(s),s.point=this.point}this.checkForConsuming()}checkForConsuming(){const t=this.point.events.length;for(let e=0;e<t;e++){const r=this.point.events[e];if(r.segment.consumedBy===void 0)for(let i=e+1;i<t;i++){const s=this.point.events[i];s.consumedBy===void 0&&r.otherSE.point.events===s.otherSE.point.events&&r.segment.consume(s.segment)}}}getAvailableLinkedEvents(){const t=[];for(let e=0,r=this.point.events.length;e<r;e++){const i=this.point.events[e];i!==this&&!i.segment.ringOut&&i.segment.isInResult()&&t.push(i)}return t}getLeftmostComparator(t){const e=new Map,r=i=>{const s=i.otherSE;e.set(i,{sine:Bv(this.point,t.point,s.point),cosine:$v(this.point,t.point,s.point)})};return(i,s)=>{e.has(i)||r(i),e.has(s)||r(s);const{sine:o,cosine:a}=e.get(i),{sine:u,cosine:l}=e.get(s);return o>=0&&u>=0?a<l?1:a>l?-1:0:o<0&&u<0?a<l?-1:a>l?1:0:u<o?-1:u>o?1:0}}}let ty=0;class es{static compare(t,e){const r=t.leftSE.point.x,i=e.leftSE.point.x,s=t.rightSE.point.x,o=e.rightSE.point.x;if(o<r)return 1;if(s<i)return-1;const a=t.leftSE.point.y,u=e.leftSE.point.y,l=t.rightSE.point.y,c=e.rightSE.point.y;if(r<i){if(u<a&&u<l)return 1;if(u>a&&u>l)return-1;const f=t.comparePoint(e.leftSE.point);if(f<0)return 1;if(f>0)return-1;const p=e.comparePoint(t.rightSE.point);return p!==0?p:-1}if(r>i){if(a<u&&a<c)return-1;if(a>u&&a>c)return 1;const f=e.comparePoint(t.leftSE.point);if(f!==0)return f;const p=t.comparePoint(e.rightSE.point);return p<0?1:p>0?-1:1}if(a<u)return-1;if(a>u)return 1;if(s<o){const f=e.comparePoint(t.rightSE.point);if(f!==0)return f}if(s>o){const f=t.comparePoint(e.rightSE.point);if(f<0)return 1;if(f>0)return-1}if(s!==o){const f=l-a,p=s-r,v=c-u,w=o-i;if(f>p&&v<w)return 1;if(f<p&&v>w)return-1}return s>o?1:s<o||l<c?-1:l>c?1:t.id<e.id?-1:t.id>e.id?1:0}constructor(t,e,r,i){this.id=++ty,this.leftSE=t,t.segment=this,t.otherSE=e,this.rightSE=e,e.segment=this,e.otherSE=t,this.rings=r,this.windings=i}static fromRing(t,e,r){let i,s,o;const a=en.comparePoints(t,e);if(a<0)i=t,s=e,o=1;else if(a>0)i=e,s=t,o=-1;else throw new Error(`Tried to create degenerate segment at [${t.x}, ${t.y}]`);const u=new en(i,!0),l=new en(s,!1);return new es(u,l,[r],[o])}replaceRightSE(t){this.rightSE=t,this.rightSE.segment=this,this.rightSE.otherSE=this.leftSE,this.leftSE.otherSE=this.rightSE}bbox(){const t=this.leftSE.point.y,e=this.rightSE.point.y;return{ll:{x:this.leftSE.point.x,y:t<e?t:e},ur:{x:this.rightSE.point.x,y:t>e?t:e}}}vector(){return{x:this.rightSE.point.x-this.leftSE.point.x,y:this.rightSE.point.y-this.leftSE.point.y}}isAnEndpoint(t){return t.x===this.leftSE.point.x&&t.y===this.leftSE.point.y||t.x===this.rightSE.point.x&&t.y===this.rightSE.point.y}comparePoint(t){if(this.isAnEndpoint(t))return 0;const e=this.leftSE.point,r=this.rightSE.point,i=this.vector();if(e.x===r.x)return t.x===e.x?0:t.x<e.x?1:-1;const s=(t.y-e.y)/i.y,o=e.x+s*i.x;if(t.x===o)return 0;const a=(t.x-e.x)/i.x,u=e.y+a*i.y;return t.y===u?0:t.y<u?-1:1}getIntersection(t){const e=this.bbox(),r=t.bbox(),i=ic(e,r);if(i===null)return null;const s=this.leftSE.point,o=this.rightSE.point,a=t.leftSE.point,u=t.rightSE.point,l=Wa(e,a)&&this.comparePoint(a)===0,c=Wa(r,s)&&t.comparePoint(s)===0,f=Wa(e,u)&&this.comparePoint(u)===0,p=Wa(r,o)&&t.comparePoint(o)===0;if(c&&l)return p&&!f?o:!p&&f?u:null;if(c)return f&&s.x===u.x&&s.y===u.y?null:s;if(l)return p&&o.x===a.x&&o.y===a.y?null:a;if(p&&f)return null;if(p)return o;if(f)return u;const v=jv(s,this.vector(),a,t.vector());return v===null||!Wa(i,v)?null:qa.round(v.x,v.y)}split(t){const e=[],r=t.events!==void 0,i=new en(t,!0),s=new en(t,!1),o=this.rightSE;this.replaceRightSE(s),e.push(s),e.push(i);const a=new es(i,o,this.rings.slice(),this.windings.slice());return en.comparePoints(a.leftSE.point,a.rightSE.point)>0&&a.swapEvents(),en.comparePoints(this.leftSE.point,this.rightSE.point)>0&&this.swapEvents(),r&&(i.checkForConsuming(),s.checkForConsuming()),e}swapEvents(){const t=this.rightSE;this.rightSE=this.leftSE,this.leftSE=t,this.leftSE.isLeft=!0,this.rightSE.isLeft=!1;for(let e=0,r=this.windings.length;e<r;e++)this.windings[e]*=-1}consume(t){let e=this,r=t;for(;e.consumedBy;)e=e.consumedBy;for(;r.consumedBy;)r=r.consumedBy;const i=es.compare(e,r);if(i!==0){if(i>0){const s=e;e=r,r=s}if(e.prev===r){const s=e;e=r,r=s}for(let s=0,o=r.rings.length;s<o;s++){const a=r.rings[s],u=r.windings[s],l=e.rings.indexOf(a);l===-1?(e.rings.push(a),e.windings.push(u)):e.windings[l]+=u}r.rings=null,r.windings=null,r.consumedBy=e,r.leftSE.consumedBy=e.leftSE,r.rightSE.consumedBy=e.rightSE}}prevInResult(){return this._prevInResult!==void 0?this._prevInResult:(this.prev?this.prev.isInResult()?this._prevInResult=this.prev:this._prevInResult=this.prev.prevInResult():this._prevInResult=null,this._prevInResult)}beforeState(){if(this._beforeState!==void 0)return this._beforeState;if(!this.prev)this._beforeState={rings:[],windings:[],multiPolys:[]};else{const t=this.prev.consumedBy||this.prev;this._beforeState=t.afterState()}return this._beforeState}afterState(){if(this._afterState!==void 0)return this._afterState;const t=this.beforeState();this._afterState={rings:t.rings.slice(0),windings:t.windings.slice(0),multiPolys:[]};const e=this._afterState.rings,r=this._afterState.windings,i=this._afterState.multiPolys;for(let a=0,u=this.rings.length;a<u;a++){const l=this.rings[a],c=this.windings[a],f=e.indexOf(l);f===-1?(e.push(l),r.push(c)):r[f]+=c}const s=[],o=[];for(let a=0,u=e.length;a<u;a++){if(r[a]===0)continue;const l=e[a],c=l.poly;if(o.indexOf(c)===-1)if(l.isExterior)s.push(c);else{o.indexOf(c)===-1&&o.push(c);const f=s.indexOf(l.poly);f!==-1&&s.splice(f,1)}}for(let a=0,u=s.length;a<u;a++){const l=s[a].multiPoly;i.indexOf(l)===-1&&i.push(l)}return this._afterState}isInResult(){if(this.consumedBy)return!1;if(this._isInResult!==void 0)return this._isInResult;const t=this.beforeState().multiPolys,e=this.afterState().multiPolys;switch(On.type){case"union":{const r=t.length===0,i=e.length===0;this._isInResult=r!==i;break}case"intersection":{let r,i;t.length<e.length?(r=t.length,i=e.length):(r=e.length,i=t.length),this._isInResult=i===On.numMultiPolys&&r<i;break}case"xor":{const r=Math.abs(t.length-e.length);this._isInResult=r%2===1;break}case"difference":{const r=i=>i.length===1&&i[0].isSubject;this._isInResult=r(t)!==r(e);break}default:throw new Error(`Unrecognized operation type found ${On.type}`)}return this._isInResult}}class Kd{constructor(t,e,r){if(!Array.isArray(t)||t.length===0)throw new Error("Input geometry is not a valid Polygon or MultiPolygon");if(this.poly=e,this.isExterior=r,this.segments=[],typeof t[0][0]!="number"||typeof t[0][1]!="number")throw new Error("Input geometry is not a valid Polygon or MultiPolygon");const i=qa.round(t[0][0],t[0][1]);this.bbox={ll:{x:i.x,y:i.y},ur:{x:i.x,y:i.y}};let s=i;for(let o=1,a=t.length;o<a;o++){if(typeof t[o][0]!="number"||typeof t[o][1]!="number")throw new Error("Input geometry is not a valid Polygon or MultiPolygon");let u=qa.round(t[o][0],t[o][1]);u.x===s.x&&u.y===s.y||(this.segments.push(es.fromRing(s,u,this)),u.x<this.bbox.ll.x&&(this.bbox.ll.x=u.x),u.y<this.bbox.ll.y&&(this.bbox.ll.y=u.y),u.x>this.bbox.ur.x&&(this.bbox.ur.x=u.x),u.y>this.bbox.ur.y&&(this.bbox.ur.y=u.y),s=u)}(i.x!==s.x||i.y!==s.y)&&this.segments.push(es.fromRing(s,i,this))}getSweepEvents(){const t=[];for(let e=0,r=this.segments.length;e<r;e++){const i=this.segments[e];t.push(i.leftSE),t.push(i.rightSE)}return t}}class ey{constructor(t,e){if(!Array.isArray(t))throw new Error("Input geometry is not a valid Polygon or MultiPolygon");this.exteriorRing=new Kd(t[0],this,!0),this.bbox={ll:{x:this.exteriorRing.bbox.ll.x,y:this.exteriorRing.bbox.ll.y},ur:{x:this.exteriorRing.bbox.ur.x,y:this.exteriorRing.bbox.ur.y}},this.interiorRings=[];for(let r=1,i=t.length;r<i;r++){const s=new Kd(t[r],this,!1);s.bbox.ll.x<this.bbox.ll.x&&(this.bbox.ll.x=s.bbox.ll.x),s.bbox.ll.y<this.bbox.ll.y&&(this.bbox.ll.y=s.bbox.ll.y),s.bbox.ur.x>this.bbox.ur.x&&(this.bbox.ur.x=s.bbox.ur.x),s.bbox.ur.y>this.bbox.ur.y&&(this.bbox.ur.y=s.bbox.ur.y),this.interiorRings.push(s)}this.multiPoly=e}getSweepEvents(){const t=this.exteriorRing.getSweepEvents();for(let e=0,r=this.interiorRings.length;e<r;e++){const i=this.interiorRings[e].getSweepEvents();for(let s=0,o=i.length;s<o;s++)t.push(i[s])}return t}}class Qd{constructor(t,e){if(!Array.isArray(t))throw new Error("Input geometry is not a valid Polygon or MultiPolygon");try{typeof t[0][0][0]=="number"&&(t=[t])}catch{}this.polys=[],this.bbox={ll:{x:Number.POSITIVE_INFINITY,y:Number.POSITIVE_INFINITY},ur:{x:Number.NEGATIVE_INFINITY,y:Number.NEGATIVE_INFINITY}};for(let r=0,i=t.length;r<i;r++){const s=new ey(t[r],this);s.bbox.ll.x<this.bbox.ll.x&&(this.bbox.ll.x=s.bbox.ll.x),s.bbox.ll.y<this.bbox.ll.y&&(this.bbox.ll.y=s.bbox.ll.y),s.bbox.ur.x>this.bbox.ur.x&&(this.bbox.ur.x=s.bbox.ur.x),s.bbox.ur.y>this.bbox.ur.y&&(this.bbox.ur.y=s.bbox.ur.y),this.polys.push(s)}this.isSubject=e}getSweepEvents(){const t=[];for(let e=0,r=this.polys.length;e<r;e++){const i=this.polys[e].getSweepEvents();for(let s=0,o=i.length;s<o;s++)t.push(i[s])}return t}}class Ju{static factory(t){const e=[];for(let r=0,i=t.length;r<i;r++){const s=t[r];if(!s.isInResult()||s.ringOut)continue;let o=null,a=s.leftSE,u=s.rightSE;const l=[a],c=a.point,f=[];for(;o=a,a=u,l.push(a),a.point!==c;)for(;;){const p=a.getAvailableLinkedEvents();if(p.length===0){const I=l[0].point,P=l[l.length-1].point;throw new Error(`Unable to complete output ring starting at [${I.x}, ${I.y}]. Last matching segment found ends at [${P.x}, ${P.y}].`)}if(p.length===1){u=p[0].otherSE;break}let v=null;for(let I=0,P=f.length;I<P;I++)if(f[I].point===a.point){v=I;break}if(v!==null){const I=f.splice(v)[0],P=l.splice(I.index);P.unshift(P[0].otherSE),e.push(new Ju(P.reverse()));continue}f.push({index:l.length,point:a.point});const w=a.getLeftmostComparator(o);u=p.sort(w)[0].otherSE;break}e.push(new Ju(l))}return e}constructor(t){this.events=t;for(let e=0,r=t.length;e<r;e++)t[e].segment.ringOut=this;this.poly=null}getGeom(){let t=this.events[0].point;const e=[t];for(let l=1,c=this.events.length-1;l<c;l++){const f=this.events[l].point,p=this.events[l+1].point;Hd(f,t,p)!==0&&(e.push(f),t=f)}if(e.length===1)return null;const r=e[0],i=e[1];Hd(r,t,i)===0&&e.shift(),e.push(e[0]);const s=this.isExteriorRing()?1:-1,o=this.isExteriorRing()?0:e.length-1,a=this.isExteriorRing()?e.length:-1,u=[];for(let l=o;l!=a;l+=s)u.push([e[l].x,e[l].y]);return u}isExteriorRing(){if(this._isExteriorRing===void 0){const t=this.enclosingRing();this._isExteriorRing=t?!t.isExteriorRing():!0}return this._isExteriorRing}enclosingRing(){return this._enclosingRing===void 0&&(this._enclosingRing=this._calcEnclosingRing()),this._enclosingRing}_calcEnclosingRing(){let t=this.events[0];for(let i=1,s=this.events.length;i<s;i++){const o=this.events[i];en.compare(t,o)>0&&(t=o)}let e=t.segment.prevInResult(),r=e?e.prevInResult():null;for(;;){if(!e)return null;if(!r)return e.ringOut;if(r.ringOut!==e.ringOut)return r.ringOut.enclosingRing()!==e.ringOut?e.ringOut:e.ringOut.enclosingRing();e=r.prevInResult(),r=e?e.prevInResult():null}}}class Bd{constructor(t){this.exteriorRing=t,t.poly=this,this.interiorRings=[]}addInterior(t){this.interiorRings.push(t),t.poly=this}getGeom(){const t=[this.exteriorRing.getGeom()];if(t[0]===null)return null;for(let e=0,r=this.interiorRings.length;e<r;e++){const i=this.interiorRings[e].getGeom();i!==null&&t.push(i)}return t}}class ry{constructor(t){this.rings=t,this.polys=this._composePolys(t)}getGeom(){const t=[];for(let e=0,r=this.polys.length;e<r;e++){const i=this.polys[e].getGeom();i!==null&&t.push(i)}return t}_composePolys(t){const e=[];for(let r=0,i=t.length;r<i;r++){const s=t[r];if(!s.poly)if(s.isExteriorRing())e.push(new Bd(s));else{const o=s.enclosingRing();o.poly||e.push(new Bd(o)),o.poly.addInterior(s)}}return e}}class ny{constructor(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:es.compare;this.queue=t,this.tree=new jl(e),this.segments=[]}process(t){const e=t.segment,r=[];if(t.consumedBy)return t.isLeft?this.queue.remove(t.otherSE):this.tree.remove(e),r;const i=t.isLeft?this.tree.add(e):this.tree.find(e);if(!i)throw new Error(`Unable to find segment #${e.id} [${e.leftSE.point.x}, ${e.leftSE.point.y}] -> [${e.rightSE.point.x}, ${e.rightSE.point.y}] in SweepLine tree.`);let s=i,o=i,a,u;for(;a===void 0;)s=this.tree.prev(s),s===null?a=null:s.key.consumedBy===void 0&&(a=s.key);for(;u===void 0;)o=this.tree.next(o),o===null?u=null:o.key.consumedBy===void 0&&(u=o.key);if(t.isLeft){let l=null;if(a){const f=a.getIntersection(e);if(f!==null&&(e.isAnEndpoint(f)||(l=f),!a.isAnEndpoint(f))){const p=this._splitSafely(a,f);for(let v=0,w=p.length;v<w;v++)r.push(p[v])}}let c=null;if(u){const f=u.getIntersection(e);if(f!==null&&(e.isAnEndpoint(f)||(c=f),!u.isAnEndpoint(f))){const p=this._splitSafely(u,f);for(let v=0,w=p.length;v<w;v++)r.push(p[v])}}if(l!==null||c!==null){let f=null;l===null?f=c:c===null?f=l:f=en.comparePoints(l,c)<=0?l:c,this.queue.remove(e.rightSE),r.push(e.rightSE);const p=e.split(f);for(let v=0,w=p.length;v<w;v++)r.push(p[v])}r.length>0?(this.tree.remove(e),r.push(t)):(this.segments.push(e),e.prev=a)}else{if(a&&u){const l=a.getIntersection(u);if(l!==null){if(!a.isAnEndpoint(l)){const c=this._splitSafely(a,l);for(let f=0,p=c.length;f<p;f++)r.push(c[f])}if(!u.isAnEndpoint(l)){const c=this._splitSafely(u,l);for(let f=0,p=c.length;f<p;f++)r.push(c[f])}}}this.tree.remove(e)}return r}_splitSafely(t,e){this.tree.remove(t);const r=t.rightSE;this.queue.remove(r);const i=t.split(e);return i.push(r),t.consumedBy===void 0&&this.tree.add(t),i}}const $d=typeof process<"u"&&process.env.POLYGON_CLIPPING_MAX_QUEUE_SIZE||1e6,iy=typeof process<"u"&&process.env.POLYGON_CLIPPING_MAX_SWEEPLINE_SEGMENTS||1e6;class sy{run(t,e,r){On.type=t,qa.reset();const i=[new Qd(e,!0)];for(let f=0,p=r.length;f<p;f++)i.push(new Qd(r[f],!1));if(On.numMultiPolys=i.length,On.type==="difference"){const f=i[0];let p=1;for(;p<i.length;)ic(i[p].bbox,f.bbox)!==null?p++:i.splice(p,1)}if(On.type==="intersection")for(let f=0,p=i.length;f<p;f++){const v=i[f];for(let w=f+1,I=i.length;w<I;w++)if(ic(v.bbox,i[w].bbox)===null)return[]}const s=new jl(en.compare);for(let f=0,p=i.length;f<p;f++){const v=i[f].getSweepEvents();for(let w=0,I=v.length;w<I;w++)if(s.insert(v[w]),s.size>$d)throw new Error("Infinite loop when putting segment endpoints in a priority queue (queue size too big).")}const o=new ny(s);let a=s.size,u=s.pop();for(;u;){const f=u.key;if(s.size===a){const v=f.segment;throw new Error(`Unable to pop() ${f.isLeft?"left":"right"} SweepEvent [${f.point.x}, ${f.point.y}] from segment #${v.id} [${v.leftSE.point.x}, ${v.leftSE.point.y}] -> [${v.rightSE.point.x}, ${v.rightSE.point.y}] from queue.`)}if(s.size>$d)throw new Error("Infinite loop when passing sweep line over endpoints (queue size too big).");if(o.segments.length>iy)throw new Error("Infinite loop when passing sweep line over endpoints (too many sweep line segments).");const p=o.process(f);for(let v=0,w=p.length;v<w;v++){const I=p[v];I.consumedBy===void 0&&s.insert(I)}a=s.size,u=s.pop()}qa.reset();const l=Ju.factory(o.segments);return new ry(l).getGeom()}}const On=new sy;var sc={union:function(n){for(var t=arguments.length,e=new Array(t>1?t-1:0),r=1;r<t;r++)e[r-1]=arguments[r];return On.run("union",n,e)},intersection:function(n){for(var t=arguments.length,e=new Array(t>1?t-1:0),r=1;r<t;r++)e[r-1]=arguments[r];return On.run("intersection",n,e)},xor:function(n){for(var t=arguments.length,e=new Array(t>1?t-1:0),r=1;r<t;r++)e[r-1]=arguments[r];return On.run("xor",n,e)},difference:function(n){for(var t=arguments.length,e=new Array(t>1?t-1:0),r=1;r<t;r++)e[r-1]=arguments[r];return On.run("difference",n,e)}};function oy(n,t){var e=Cr(n),r=Cr(t),i=n.properties||{},s=sc.difference(e.coordinates,r.coordinates);return s.length===0?null:s.length===1?Be(s[0],i):dl(s,i)}function ay(n,t,e){e===void 0&&(e={});var r=Cr(n),i=Cr(t),s=sc.intersection(r.coordinates,i.coordinates);return s.length===0?null:s.length===1?Be(s[0],e.properties):dl(s,e.properties)}function uy(n,t,e){e===void 0&&(e={});var r=Cr(n),i=Cr(t),s=sc.union(r.coordinates,i.coordinates);return s.length===0?null:s.length===1?Be(s[0],e.properties):dl(s,e.properties)}function jd(n,t){(n[0][0]!==n[n.length-1][0]||n[0][1]!==n[n.length-1][1]||n[0][2]!==n[n.length-1][2])&&n.push(n[0]),(t[0][0]!==t[t.length-1][0]||t[0][1]!==t[t.length-1][1]||t[0][2]!==t[t.length-1][2])&&t.push(t[0]);const e=ay(Be([n]),Be([t]));if(e)return e.geometry.coordinates}function tp(n,t){(n[0][0]!==n[n.length-1][0]||n[0][1]!==n[n.length-1][1]||n[0][2]!==n[n.length-1][2])&&n.push(n[0]),(t[0][0]!==t[t.length-1][0]||t[0][1]!==t[t.length-1][1]||t[0][2]!==t[t.length-1][2])&&t.push(t[0]);const e=uy(Be([n]),Be([t]));if(e)return e.geometry.coordinates}function ep(n,t=500,e="meters"){const r=Lv(dn(n),t,{units:e});if(r)return r.geometry.coordinates}function rp(n,t){(n[0][0]!==n[n.length-1][0]||n[0][1]!==n[n.length-1][1]||n[0][2]!==n[n.length-1][2])&&n.push(n[0]),(t[0][0]!==t[t.length-1][0]||t[0][1]!==t[t.length-1][1]||t[0][2]!==t[t.length-1][2])&&t.push(t[0]);const e=oy(Be([n]),Be([t]));if(e)return e.geometry.coordinates}function np(n,t,e=10,r="meters"){return Rv(n,t,{steps:e,units:r}).geometry.coordinates}function oc(n,t){(n[0][0]!==n[n.length-1][0]||n[0][1]!==n[n.length-1][1]||n[0][2]!==n[n.length-1][2])&&n.push(n[0]),(t[0][0]!==t[t.length-1][0]||t[0][1]!==t[t.length-1][1]||t[0][2]!==t[t.length-1][2])&&t.push(t[0]);const e=Be([n]),r=Be([t]);return Nm(e,r)?"oneBig":Rm(e,r)?"twoBig":!1}function ip(n){const t=h.min(h.objsIterator(n,["0"])),e=h.min(h.objsIterator(n,["1"])),r=h.min(h.objsIterator(n,["2"])),i=h.max(h.objsIterator(n,["0"])),s=h.max(h.objsIterator(n,["1"])),o=h.max(h.objsIterator(n,["2"]));return{minPos:[t,e,r],maxPos:[i,s,o],center:[(t+i)*.5,(e+s)*.5,(r+o)*.5]}}function ly(n){const{minPos:t,maxPos:e,center:r}=ip(n);if(t.some(a=>!Number.isFinite(a)||e.some(u=>!Number.isFinite(u))||r.some(u=>!Number.isFinite(u)))){console.warn("geoCenterAndRadiusFromPositions error: minPos.some(e => !Number.isFinite(e) || maxPos.some(e => !Number.isFinite(e)) || center.some(e => !Number.isFinite(e))");return}const i=Sl(t,e);let s=i*.5;const o=Math.abs(t[2]-e[2]);return o!=0&&(s=Math.sqrt(i*i+o*o)*.5),{center:r,radius:s}}const sp=Vh("+title=WGS 84 (long/lat) +proj=longlat +ellps=WGS84 +datum=WGS84 +units=degrees","+proj=geocent +datum=WGS84");function ei(n){return sp.forward(n)}function op(n){return sp.inverse(n)}const ap=Vh("+title=WGS 84 (long/lat) +proj=longlat +ellps=WGS84 +datum=WGS84 +units=degrees","+proj=merc +a=6378137 +b=6378137 +lat_ts=0 +lon_0=0 +x_0=0 +y_0=0 +k=1 +units=m +nadgrids=@null +wktext +no_defs +type=crs");function cy(n){const t=ap.forward([n[0],n[1]]);return[t[0],t[1],n[2]]}function hy(n){const t=ap.inverse([n[0],n[1]]);return[t[0],t[1],n[2]]}function up(n,t){const e=ei(n),r=ei(t);return h.Vector.distance(e,r)}function Xa(n,t){const e=[],r=n.length;let i=0;for(let s=0;s<r-1;++s){if(t===void 0||t==="GEODESIC"){const o=Sl(n[s],n[s+1]),a=Math.abs(n[s][2]-n[s+1][2]);if(a===0)i+=o;else{const u=Math.sqrt(o*o+a*a);i+=u}}else if(t==="RHUMB"){const o=Pf(n[s],n[s+1]),a=Math.abs(n[s][2]-n[s+1][2]);if(a===0)i+=o;else{const u=Math.sqrt(o*o+a*a);i+=u}}else if(t==="NONE"){const o=up(n[s],n[s+1]);i+=o}else console.warn(`未知的arcType: ${t},导致距离无法计算!`);e.push(i)}return e}function ac(n){const t="__getXyzFromPostion";let e=h.getExtProp(n,t);return(!e||!h.Vector.equals(e[0],n))&&(e=[[...n],ei(n)],h.setExtProp(n,t,e)),e[1]}class lp extends h.Destroyable{constructor(){super();d(this,"_data",this.dv(h.react(void 0)))}set data(e){this._data.value=e}get data(){return this._data.value}get dataChanged(){return this._data.changed}}class cp extends h.Destroyable{constructor(){super(...arguments);d(this,"_dragStartEvent",this.dv(new h.Event));d(this,"_dragOverEvent",this.dv(new h.Event));d(this,"_dragLeaveEvent",this.dv(new h.Event));d(this,"_dropEvent",this.dv(new h.Event))}dragStart(e){this._dragStartEvent.emit(e)}dragOver(e){this._dragOverEvent.emit(e)}dragLeave(e){this._dragLeaveEvent.emit(e)}drop(e){this._dropEvent.emit(e)}}function fy(n,t){t&&(Reflect.has(t,"editing")?t.editing=!0:Reflect.has(t,"positionEditing")&&(t.positionEditing=!0))}function dy(n){["Czm3DTiles","View","ESCameraView","OlView","GeoCameraController"].includes(n.typeName)||(Reflect.has(n,"editing")?n.editing=!0:Reflect.has(n,"positionEditing")&&(n.positionEditing=!0)),typeof n.execOnCreating=="function"&&n.execOnCreating()}function Zu(n,t){h.getExtProp(n,"__treeItem")&&console.error("setSceneObjectTreeItem error!"),h.setExtProp(n,"__treeItem",t)}function py(n){return h.getExtProp(n,"__treeItem")}function gy(n){if(!(n.startsWith("./")||n.startsWith("../")||n.startsWith("/")))return n;const t=document.createElement("a");t.href=n;const e=t.href;return t.remove(),e}function my(n){try{return JSON.parse(n),!0}catch{return!1}}function vy(n){return n instanceof Function?n():n}function hp(n,t){for(let e of n)if(t.includes(e))return!0;return!1}function bi(n,t){const e=n,r=t;return e===void 0||e.length===0||r===void 0||r.length===0?!0:hp(e,r)}function yy(n){const t=setTimeout(()=>{n(),clearTimeout(t)})}function Lo(n){let t=n%360;return t=t<0?360+t:t,t}function fp(n){return Lo(n+180)-180}function Ku(n,t,e){let r=Lo(n),i=Lo(t);Math.abs(r-i)>180&&(r<i?r+=360:i+=360);const s=r*(1-e)+i*e;return fp(s)}function uc(n,t,e,r){return r=r||[0,0,0],r[0]=Ku(n[0],t[0],e),r[1]=Ku(n[1],t[1],e),r[2]=Ku(n[2],t[2],e),r}function dp(n,t,e="editing"){const r=new h.Destroyable;n.ad(r);const i=t.bind(n);return r.ad(new h.ObjResettingWithEvent(n.activeViewerChanged,()=>{const s=new h.Destroyable;let o=n.activeViewer;return o?(s.ad(n[`${e}Changed`].don(()=>{var a;n[`${e}`]?i():(a=n.mainClass.editingID)!=null&&a.includes("inner")&&n.activeViewer&&n.activeViewer.stopEditing()})),s.ad(o.editingEvent.don(a=>{if(a.objectIDs.includes(n.id)&&a.type==="end"){const u=n.mainClass;u.editingID&&a.editingID.includes(u.editingID)?n[`${e}`]=!1:n[`${e}`]=!u.editingID.includes("outer")}}))):s.ad(n[`${e}Changed`].don(()=>{n[`${e}`]=!1})),s})),n[`${e}`]&&i(),r}function _y(n,t){const{type:e,id:r}=n;if(e){const i=$.create(e,r);if(i)return i.json=n,i;console.warn(`cannot create sceneObject from type(${e})`)}else console.warn(`cannot create sceneObject from type(${e})`)}function pp(n){const t=n.children&&h.every(n.children,r=>{if(!(r instanceof He))throw new Error("!(treeItem instanceof SceneTreeItem)");return!r.show})||!1,e=n.sceneTree.getSceneObjectShowFunc(n.sceneObject);return!t||e}class He extends h.TreeItem{constructor(e,r=!1,i,s,o=!0){super(e,r,i);d(this,"_dragDrop");d(this,"_showChangedNotAffectChildren",!1);d(this,"_showChangedNotAffectParent",!1);d(this,"_type",this.dv(h.react("Unknown")));d(this,"_isExport",this.dv(h.react(!0)));const a=()=>this.tree&&this.tree.itemsChanged.emit([this]);this.dispose(this.nameChanged.disposableOn(a)),this.name=`未命名条目(${this.id})`,this.extras=s,this._isExport.value=o;let u;const l=()=>{u&&(u(),u=void 0)};this.dispose(l),this.dispose(this.sceneObjectChanged.disposableOn(c=>{l(),c&&(u=h.bind([this,"name"],[c,"name"]))})),this.dispose(this.showChanged.disposableOn(c=>{if(e.setSceneObjectShowFunc(this.sceneObject,c),this.tree&&this.tree.forceRedraw(),this.children&&!this._showChangedNotAffectChildren)for(let f of this.children)f instanceof He&&(f._showChangedNotAffectParent=!0,f.show=c,f._showChangedNotAffectParent=!1);this.parent&&this.parent instanceof He&&!this._showChangedNotAffectParent&&(this.parent._showChangedNotAffectChildren=!0,this.parent.show=pp(this.parent),this.parent._showChangedNotAffectChildren=!1)})),this.dv(new h.ObjResettingWithEvent(this.sceneObjectChanged,()=>{if(!this.sceneObject)return;const c=new h.Destroyable;if("show"in this.sceneObject&&"showChanged"in this.sceneObject&&this.sceneObject.showChanged instanceof Event){const f=()=>{this.show=e.getSceneObjectShowFunc(this.sceneObject)};f(),c.dispose(this.sceneObject.showChanged.disposableOn(f))}else if("enabled"in this.sceneObject&&"enabledChanged"in this.sceneObject&&this.sceneObject.enabledChanged instanceof Event){const f=()=>{this.show=e.getSceneObjectShowFunc(this.sceneObject)};f(),c.dispose(this.sceneObject.enabledChanged.disposableOn(f))}return c})),this.childrenChangedEvent.disposableOn(()=>{const c=pp(this);this._showChangedNotAffectChildren=!0,this.show=c,this._showChangedNotAffectChildren=!1});{const c=()=>{let f="Unknown";this.sceneObject?f=this.sceneObject.typeName:this.children&&(f="Folder"),this._type.value=f};this.dispose(this.sceneObjectChanged.disposableOn(c)),this.dispose(this.childrenResetedEvent.disposableOn(c)),c()}}get dragDrop(){return this._dragDrop||(this._dragDrop=this.dv(this.sceneTree.createTreeItemDragDropFunc(this))),this._dragDrop}get type(){return this._type.value}get typeChanged(){return this._type.changed}get isExport(){return this._isExport.value}get isExportChanged(){return this._isExport.changed}set isExport(e){this._isExport.value=e}get sceneTree(){return this.tree}get jsonStr(){return JSON.stringify(this.json,void 0," ")}set jsonStr(e){try{this.json=JSON.parse(e)}catch(r){console.error(`sceneTreeItem.jsonStr error ${r}`,r)}}get json(){const e=this.children&&[...this.children].filter(r=>r.isExport).map(r=>r.json);return{name:this.name,show:this.show?void 0:!1,collapsed:this.uiTreeObject.collapsed?!0:void 0,sceneObj:this.sceneObject&&this.sceneObject.json,children:e,extras:this.extras}}set json(e){if(e.name!==void 0&&(this.name=e.name),this.extras=e.extras,this._showChangedNotAffectChildren=!0,this._showChangedNotAffectParent=!0,this.show=e.show??!0,this._showChangedNotAffectChildren=!1,this._showChangedNotAffectParent=!1,this.uiTreeObject.collapsed=e.collapsed??!1,this.sceneObject=void 0,e.sceneObj&&(this.sceneObject=this.sceneTree.createSceneObjectFunc(e.sceneObj,this)),!!e.children){if(this.resetChildren(!0),!this.children)throw new Error("resetChildren(true) cannot get children!");for(let r of e.children){const i=new He(this.tree,!0);i.json=r,this.children.push(i)}}}clone(){try{const e=new He(this.sceneTree,!!this.children,void 0,this.extras,this.isExport);return e.json=this.json,e.name=this.sceneTree.getSceneTreeItemCloneNameFunc(this),e}catch(e){console.error(`SceneTreeItem.clone error: ${e}`,e)}}insertNewTreeItem(e,r){if(e==="FolderInnerOrAfter"||e==="FolderInnerOrBefore"||e==="FolderInner"){if(r&&r.tree!==this.tree)return console.warn("newTreeItem.tree !== this.tree"),!1;if(this.children&&!(e.includes("Or")&&this.sceneObject))return r&&this.children.push(r),!0;if(e==="FolderInner")return!1;if(e==="FolderInnerOrAfter")return super.insertNewTreeItem("After",r);if(e==="FolderInnerOrBefore")return super.insertNewTreeItem("Before",r);throw new Error("should not be here!")}else return super.insertNewTreeItem(e,r)}}(n=>{n.createDefaultProps=()=>({name:"未命名条目",nameEditing:!1,sceneObject:void 0,show:!0,extras:h.reactJsonWithUndefined(void 0)})})(He||(He={})),h.extendClassProps(He.prototype,He.createDefaultProps);function gp(n,t,e){let{offsetY:r}=t;if(!t.target||!("clientTop"in t.target))return"none";r+=2,r+=t.target.clientTop;let i="none";return n.children?r<=e*.3?i="before":r>=e*.7?!n.uiTreeObject.collapsed&&n.children.length>0?i="inner":i="after":i="inner":r<=e*.5?i="before":i="after",i}class mp extends cp{constructor(t){super(),this._treeItem=t;const{dragStartDataManager:e}=this._treeItem.sceneTree;let r="none";const i=this.disposeVar(h.createTimeoutWithStartValues(()=>{this._treeItem.uiTreeObject.moveToPositionMode=r,console.log(`uiTreeObject.moveToPositionMode = lastDragMode(${r});`)},200));function s(o){r!==o&&(r=o,i.restart())}this.dispose(this._dragStartEvent.disposableOn(o=>{e.data={type:"UITreeA",value:this._treeItem}})),this.dispose(this._dragOverEvent.disposableOn(o=>{if(!o.dataTransfer)return;o.preventDefault();const a=e;if(a.data&&a.data.type==="UITreeA"&&a.data.value!==void 0){const u=a.data.value,l=this._treeItem,{tree:c}=l;if(c){const f=[...c.selectedItems];~f.indexOf(u)||f.push(u);const p=gp(l,o,c.itemDivHeight);if(p!=="none"&&h.Tree.canMoveToTreeItems(f,l,p)){o.dataTransfer.dropEffect="move",s(p);return}}}o.dataTransfer.dropEffect="none",s("none")})),this.dispose(this._dropEvent.disposableOn(o=>{const a=e;if(!(a.data&&a.data.type==="UITreeA"&&a.data.value!==void 0))return;const u=a.data.value,l=this._treeItem,{tree:c}=l;if(!c)return;const f=[...c.selectedItems];~f.indexOf(u)||f.push(u);const p=gp(l,o,c.itemDivHeight);p!=="none"&&h.Tree.canMoveToTreeItems(f,l,p)&&(h.Tree.moveToTreeItems(f,l,p),a.data=void 0,s("none"))})),this.dispose(this._dragLeaveEvent.disposableOn(()=>{r="none",i.restart()}))}}function wy(n){if(!(n instanceof He))throw new Error("defaultCreateTreeItemDragDrop !(treeItem instanceof SceneTreeItem)");return new mp(n)}function Ey(n){let t=!1;return n&&("show"in n?t=n.show??!0:"enabled"in n&&(t=n.enabled??!0)),t}function Sy(n,t){n&&("show"in n?n.show=t:"enabled"in n&&(n.enabled=t))}const Cy=["EnvironmentVariables","ScriptsLoader","SceneScript","ScriptLoader"];function Iy(n){const t=[],{root:e={}}=n,r=[e];for(;r.length>0;){const i=r.pop();if(!i)throw new Error("!todo");if(i.children){for(let s of i.children)if(s.children&&r.unshift(s),s.sceneObj){const{type:o=void 0}=s.sceneObj;o||(console.warn("sceneObjJson has no type! treeItem.sceneObj: "),console.warn(s.sceneObj)),o&&Cy.includes(o)&&t.push(s.sceneObj)}}}return t}async function Py(n,t){const e=Iy(n);let r=0;const i=e.length;for(let s of e)if(++r,t){const o=r/i;t(o,r,i)}}class vp extends h.Destroyable{constructor(e,r){super();d(this,"treeItemContexMenuCallback");this._sceneTree=e,this._projectManager=r}get sceneTree(){return this._sceneTree}}class Ny extends h.Destroyable{constructor(e){super();d(this,"_jsonLoadingEvent",this.disposeVar(new h.Event));d(this,"_setJsonProcessing",this.disposeVar(h.createProcessingFromAsyncFunc(async(e,r)=>{this._jsonLoadingEvent.emit({type:"init"}),this._jsonLoadingEvent.emit({type:"loading"}),r&&await e.promise(this._sceneTree.preloadFunc(r)),this._setJson(r),this._jsonLoadingEvent.emit({type:"loaded"})})));this._sceneTree=e,this._setJsonProcessing.errorFunc=r=>{this._jsonLoadingEvent.emit({type:"error",error:r})}}get jsonLoadingEvent(){return this._jsonLoadingEvent}_setJson(e){try{this._sceneTree.setJson(e||{})}catch(r){console.error(`json数据装配时发生错误!error: ${r}`)}}get json(){return this._sceneTree.getJson()}set json(e){this._setJsonProcessing.restart(new h.CancelError("JSON重新赋值!"),e)}get jsonStr(){return JSON.stringify(this.json,void 0," ")}set jsonStr(e){this.json=JSON.parse(e)}}function by(n){return n.name+"_clone"}function lc(n,t,e){if(n instanceof He)return n.insertNewTreeItem(t,e);{const r={FolderInnerOrAfter:"InnerOrAfter",FolderInnerOrBefore:"InnerOrBefore",FolderInner:"Inner",InnerOrAfter:"InnerOrAfter",InnerOrBefore:"InnerOrBefore",Inner:"Inner",After:"After",Before:"Before"};return n.insertNewTreeItem(r[t],e)}}function Ty(n){[n,...n.getDescendants()].forEach(t=>t.destroy())}const vr=class vr extends h.Tree{constructor(e,r,i,s){super(i);d(this,"_jsonLoading",this.disposeVar(new Ny(this)));d(this,"createSceneObjectFunc",vr.defaultCreateSceneObjectFunc);d(this,"createTreeItemDragDropFunc",vr.defaultCreateTreeItemDragDropFunc);d(this,"preloadFunc",vr.defaultPreload);d(this,"getSceneObjectShowFunc",vr.defaultGetSceneObjectShow);d(this,"setSceneObjectShowFunc",vr.defaultSetSceneObjectShow);d(this,"getSceneTreeItemCloneNameFunc",vr.defaultGetSceneTreeItemCloneNameFunc);d(this,"debug",!1);d(this,"_contextMenu",this.disposeVar(new vp(this,this.projectManager)));d(this,"_showPropUiOnSelecting",this.disposeVar(h.react(!0)));this._name=e,this._dragStartDataManager=r,this._projectManager=s,this.dispose(this.selectedItems.changedEvent.disposableOn(()=>{var a,u;window.lssn=this.lastSelectedItem,window.lsso=(a=this.lastSelectedItem)==null?void 0:a.sceneObject,this.debug&&console.log(((u=this.lastSelectedItem)==null?void 0:u.sceneObject)??"select null")}));const{sceneObjectsManager:o}=this._projectManager;this.dispose(this.itemsDeleted.disposableOn(a=>{for(let u of a){const l=u,{sceneObject:c}=l;c&&o.deleteSceneObject(c)&&c.destroy()&&Zu(c,void 0);for(let f of l.getDescendants()){const{sceneObject:p}=f;p&&o.deleteSceneObject(p)&&p.destroy()&&Zu(p,void 0)}Ty(u)}})),this.dispose(this.itemsAdded.disposableOn(a=>{for(let u of a){const l=u;l.sceneObject&&o.addSceneObject(l.sceneObject)&&Zu(l.sceneObject,l)}})),this.dispose(this.selectedItems.changedEvent.disposableOn(()=>{if(!this.showPropUiOnSelecting)return;this._projectManager.propUiTreeManager.sceneObject=void 0;const{lastSelectedItem:a}=this;a&&(this._projectManager.propUiTreeManager.sceneObject=a.sceneObject)}))}get json(){return this._jsonLoading.json}set json(e){this._jsonLoading.json=e}get jsonStr(){return this._jsonLoading.jsonStr}set jsonStr(e){this._jsonLoading.jsonStr=e}get jsonLoadingEvent(){return this._jsonLoading.jsonLoadingEvent}get name(){return this._name}get projectManager(){return this._projectManager}get contextMenu(){return this._contextMenu}get showPropUiOnSelecting(){return this._showPropUiOnSelecting.value}set showPropUiOnSelecting(e){this._showPropUiOnSelecting.value=e}get showPropUiOnSelectingChanged(){return this._showPropUiOnSelecting.changed}get sceneUiTree(){return this.uiTree}getTreeItemFromSceneObjId(e){const r=this.getDescendants();let i;for(let s of r)if(s.sceneObject&&s.sceneObject.id===e){i=s;break}return i}get dragStartDataManager(){return this._dragStartDataManager}getJson(){return{root:{children:[...this.children].filter(e=>e.isExport).map(e=>e.json)}}}setJson(e){var i;e.root=e.root||{};const r=e.root.children??[];this.root.resetChildren(!0);for(let s of r){const o=new He(this,!0);o.json=s,(i=this.root.children)==null||i.push(o)}}testAddNewTreeItem(e,r){const i=e||this.lastSelectedItem||this.root;return i?lc(i,r):!1}addNewTreeItem(e,r,i,s){const o=e||this.lastSelectedItem||this.root;if(o&&lc(o,r)){const a=new He(this,i);if(a.sceneObject=s,!lc(o,r,a))throw new Error("currentTreeItem.insertNewTreeItem return false!");return a}}createSceneObjectTreeItem(e,r,i,s){const o=s??"FolderInnerOrAfter";if(!this.testAddNewTreeItem(i,o)){console.warn(`cannot addNewTreeItem! currentTreeItem(${i?i.id:"root"})`);return}const a=$.create(e,r);return a?this.addNewTreeItem(i,s??"FolderInnerOrAfter",!0,a):void 0}createGroupTreeItem(e,r,i,s){const o=s??"FolderInnerOrAfter";if(!this.testAddNewTreeItem(i,o)){console.warn(`cannot addNewTreeItem! currentTreeItem(${i?i.id:"root"})`);return}const a=this.addNewTreeItem(i,s??"FolderInnerOrAfter",!0);if(!a){console.warn("addNewTreeItem error!");return}return a.name=e??"未命名组节点",a}createSceneObjectTreeItemFromClass(e,r,i,s){const o=s??"FolderInnerOrAfter";if(!this.testAddNewTreeItem(i,o))return;const a=$.createFromClass(e,r);return a?this.addNewTreeItem(i,o,!0,a):void 0}createSceneObjectTreeItemFromJson(e,r,i){const s=i??"FolderInnerOrAfter";if(!this.testAddNewTreeItem(r,s))return;const o=$.createFromJson(e);return console.log(o),o?this.addNewTreeItem(r,i??"FolderInnerOrAfter",!0,o):void 0}destroySceneObjectTreeItem(e){if(e===this.root){console.warn("cannot destroy root! please use function destroyAllSceneObjectTreeItems!");return}e.detachFromParent()}destroyAllSceneObjectTreeItems(){if(!this.root.children)return;const e=[...this.root.children];for(let r of e)this.destroySceneObjectTreeItem(r)}};d(vr,"defaultCreateSceneObjectFunc",_y),d(vr,"defaultCreateTreeItemDragDropFunc",wy),d(vr,"defaultPreload",Py),d(vr,"defaultGetSceneObjectShow",Ey),d(vr,"defaultSetSceneObjectShow",Sy),d(vr,"defaultGetSceneTreeItemCloneNameFunc",by);let Ya=vr;const cc={saturation:.35,brightness:1.4,gamma:.8,atmosphereScatteringIntensity:5,groundColor:[0,.09411764705882353,.3137254901960784,1]};class yp extends h.Tree{constructor(t){super(t)}get propUiTree(){return this.uiTree}}class hc extends h.TreeItem{constructor(t,e,r){super(t,e),this._property=r}get property(){return this._property}}class fc extends hc{constructor(t,e){super(t,!1,e)}}class dc extends hc{constructor(t,e){super(t,!0,e)}get groupChildren(){return this.children}}function _p(n,t){const e=new yp(t),r=n.getProperties("chinese"),i=[];for(let s of r)if(s instanceof rt){const o=new dc(e,s);o.d(()=>s.destroy()),e.children.push(o),i.push(o)}else{const o=new fc(e,s);e.children.push(o),o.d(()=>s.destroy())}for(;i.length>0;){const s=i.pop();if(!s)throw new Error("should not be here!");const o=s;if(!(o.property instanceof rt))throw new Error("!(treeItem.property instanceof GroupProperty)");for(let a of o.property.children)if(a instanceof rt){const u=new dc(e,a);u.d(()=>a.destroy()),o.groupChildren.push(u),i.push(u)}else{const u=new fc(e,a);o.groupChildren.push(u),u.d(()=>a.destroy())}}return e.d(()=>{e.itemChildrenChanged.reset(),e.itemChildrenToChange.reset();const s=[...e.getDescendants()];s.forEach(o=>{o.children&&(o.children.length=0),o.destroy()}),s.length=0}),e}class Ao extends h.Destroyable{constructor(e){super();d(this,"_propTreeReact",this.dv(h.react(void 0)));this.d(()=>this._propTreeReact.value=void 0),this.dv(new h.ObjResettingWithEvent(this.sceneObjectChanged,r=>{if(!r)return;const i=new h.Destroyable;return i.d(r.toDestroyEvent.don(()=>{this.sceneObject=void 0})),i})),this.d(this.sceneObjectChanged.don(r=>{this._propTreeReact.value=void 0,!(!r||!(r instanceof $))&&(this._propTreeReact.value=_p(r,e))}))}get propTree(){return this._propTreeReact.value}get propTreeChanged(){return this._propTreeReact.changed}}(n=>{n.createDefaultProps=()=>({sceneObject:void 0})})(Ao||(Ao={})),h.extendClassProps(Ao.prototype,Ao.createDefaultProps);function Oy(n,t,e,r=!0){r&&e(),n.dispose(t.disposableOn(e))}class Dy extends h.Destroyable{constructor(e,r,i,s){super();d(this,"_sceneObjectId",this.dv(new h.SceneObjectWithId));this._id=e,this._startTimeStamp=r,this._duration=i,this._parent=s,this._sceneObjectId.id=this._id;const o=()=>{if(!this.player)return;const{currentTime:a=0}=this._parent,u=a-this._startTimeStamp;this.player.currentTime=h.clamp(u,0,this._duration)*(this.player.speed??1)};o(),this.d(this._parent.currentTimeChanged.don(o)),this.d(this.playerChanged.don(o))}get player(){return this._sceneObjectId.sceneObject instanceof Dn?this._sceneObjectId.sceneObject:void 0}get playerChanged(){return this._sceneObjectId.sceneObjectChanged}}const My=`
28
28
  用来配置子播放器,它是一个数组形式,数组的每个元素仍然是一个数组,形式是[子播放器的ID, 起始时间, 持续时间]。
29
29
  注意时间的单位是毫秒。
30
30
  示例如下:
@@ -42,10 +42,10 @@ ${l.map(h=>`${h.id} ${h.typeName}
42
42
  ]
43
43
  ]
44
44
  \`\`\`
45
- `,Yt=class Yt extends c.Destroyable{constructor(){super();d(this,"_ratio",this.dv(c.react(0)));d(this,"_subPlayers",this.dv(new c.ObservableArray));const t=this.dv(new c.Player);{const o=()=>{t.loop=this.loop??Yt.defaults.loop};o(),this.d(this.loopChanged.don(o))}{const o=()=>{(this.loop??Yt.defaults.loop)!==t.loop&&(this.loop=t.loop)};o(),this.d(t.loopChangedEvent.don(o))}{const o=()=>{t.currentTime=this.currentTime??Yt.defaults.currentTime};o(),this.d(this.currentTimeChanged.don(o))}{const o=()=>{(this.currentTime??Yt.defaults.currentTime)!==t.currentTime&&(this.currentTime=t.currentTime)};o(),this.d(t.currentTimeChangedEvent.don(o))}{const o=()=>{t.duration=this.duration??Yt.defaults.duration};o(),this.d(this.durationChanged.don(o))}{const o=()=>{(this.duration??Yt.defaults.duration)!==t.duration&&(this.duration=t.duration)};o(),this.d(t.durationChangedEvent.don(o))}{const o=()=>{t.speed=this.speed??Yt.defaults.speed};o(),this.d(this.speedChanged.don(o))}{const o=()=>{(this.speed??Yt.defaults.speed)!==t.speed&&(this.speed=t.speed)};o(),this.d(t.speedChangedEvent.don(o))}{const o=()=>{t.playing=this.playing??Yt.defaults.playing};o(),this.d(this.playingChanged.don(o))}{const o=()=>{(this.playing??Yt.defaults.playing)!==t.playing&&(this.playing=t.playing)};o(),this.d(t.playingChangedEvent.don(o))}const r=()=>{const o=this.duration??Yt.defaults.duration;o>0&&(this._ratio.value=(this.currentTime??Yt.defaults.currentTime)/o)};r();const i=this.dv(c.createNextAnimateFrameEvent(this.currentTimeChanged,this.durationChanged));this.d(i.don(r)),this.d(()=>{const{length:o}=this._subPlayers;for(let a=0;a<o;++a)this._subPlayers.get(a).destroy();this._subPlayers.length=0});const s=()=>{for(let a of this._subPlayers)a.destroy();if(this._subPlayers.length=0,!this.channels)return;const o=this.channels.map(a=>{const[l,u,h]=a;return new Dy(l,u,h,this)});this._subPlayers.splice(0,0,...o)};s(),this.d(this.channelsChanged.don(s))}get ratio(){return this._ratio.value}set ratio(t){Math.abs(this._ratio.value-t)<.001||(this.currentTime=(this.duration??Yt.defaults.duration)*t)}get ratioChanged(){return this._ratio.changed}};d(Yt,"defaults",{loop:!1,currentTime:0,duration:3e3,speed:1,playing:!1,channels:!0,ratio:0}),d(Yt,"channelsReadMe",Ny);let Jn=Yt;(n=>{n.createDefaultProps=()=>({loop:!1,currentTime:0,duration:3e3,speed:1,playing:!1,channels:c.reactDeepArrayWithUndefined(void 0,(e,t)=>e==null?void 0:e.every((r,i)=>r===t[i]),e=>[...e])})})(Jn||(Jn={})),c.extendClassProps(Jn.prototype,Jn.createDefaultProps);class Ih extends c.Destroyable{constructor(t){super();d(this,"_sceneObject",this.dv(c.react(void 0)));this._id=t,this.d(()=>{this._sceneObject.value=void 0});const r=j.getSceneObjById(this._id);r&&(this._sceneObject.value=r),this.d(j.context.sceneObjCreatedEvent.don(i=>{i.id===this._id&&(this._sceneObject.value=i)})),this.d(j.context.sceneObjToDestroyEvent.don(i=>{i.id===this._id&&(this._sceneObject.value=void 0)}))}get sceneObject(){return this._sceneObject.value}get sceneObjectChanged(){return this._sceneObject.changed}get id(){return this._id}}class by extends c.Destroyable{constructor(t,r){super();d(this,"_sofi");this._id=t,this._sofi=this.dv(new Ih(this._id));{const i=()=>{r.sceneObject=this._sofi.sceneObject};i(),this.d(this._sofi.sceneObjectChanged.don(i))}}}class Oy extends c.Destroyable{constructor(){super();d(this,"_id",this.dv(c.react(void 0)));d(this,"_sceneObject",this.dv(c.react(void 0)));d(this,"_resetting",this.dv(new c.ObjResettingWithEvent(this.idChanged,()=>{const{id:t}=this;if(t===void 0||t===""){this.sceneObject=void 0;return}return new by(t,this)})))}get id(){return this._id.value}get idChanged(){return this._id.changed}set id(t){this._id.value=t}get sceneObject(){return this._sceneObject.value}get sceneObjectChanged(){return this._sceneObject.changed}set sceneObject(t){this._sceneObject.value=t}get resetting(){return this._resetting}}class My extends c.Destroyable{constructor(e,t,r,i){super(),this.disposeVar(new c.ObjResettingWithEvent(e.sceneObjectChanged,()=>{let s;i.debug&&console.log("正在获取Event事件...");do{const o=e.sceneObject;if(!o||!t)break;const a=t.split(".");if(a.length===0){i.debug&&console.warn("propNames.length === 0");break}let l=c.pluckProperty(o,!1,...a);if((!l||!(l instanceof c.Event))&&(a[a.length-1]=a[a.length-1]+"Changed",i.debug&&console.warn(`event未能获取,那么将属性名的最后一项加上Changed(${a[a.length-1]})再试试!`),l=c.pluckProperty(o,!1,...a),i.debug&&l&&console.warn("event仍然获取不到!")),!l){i.debug&&console.warn(`cannot get changed from ${o.id}-${o.name}-${o.ref}-${t}`);break}if(!(l instanceof c.Event)){i.debug&&console.warn(`the prop is not event from ${o.id}-${o.name}-${o.ref}-${t}`);break}s=l,i.debug&&console.log(`Event获取成功 propChangedName: ${t}`,s)}while(!1);if(s){const o=new c.Destroyable;return o.d(s.dwon(()=>r.emit())),o}else{i.debug&&console.log(`未获取到Event!propChangedName: ${t}`);return}}))}}let xy=class extends c.Destroyable{constructor(t,r,i){super();d(this,"_doEvalEvent",this.dv(new c.Event));const s=this._doEvalEvent,o=this.disposeVar(c.createNextAnimateFrameEvent(s)),a=t.map(([l,u])=>{const h=new Ih(l),f=u&&new My(h,u,s,r)||void 0;return[h,f]});this.d(()=>{a.forEach(([l,u])=>{u==null||u.destroy(),l.destroy()}),a.length=0}),this.d(s.don(()=>{const{evalMode:l="NextAnimateFrame",evalOnlyWhenObjsAllExist:u=!0}=r;if(l==="Immediate"){const h=a.map(([f])=>f.sceneObject);(!u||h.every(f=>f!==void 0))&&i(h)}})),this.d(o.don(()=>{const{evalMode:l="NextAnimateFrame",evalOnlyWhenObjsAllExist:u=!0}=r;if(l==="NextAnimateFrame"){const h=a.map(([f])=>f.sceneObject);(!u||h.every(f=>f!==void 0))&&i(h)}}))}forceExecute(){this._doEvalEvent.emit()}};const dp=Object.freeze(Object.defineProperty({__proto__:null,WatcherObjects:xy},Symbol.toStringTag,{value:"Module"})),{WatcherObjects:Ly}=dp;class mu extends c.Destroyable{constructor(){super();d(this,"_evalFunc");d(this,"_forceExecute",new c.Event);const t=this.dv(c.react(void 0)),r=()=>{try{t.value=this.evalFuncStr&&Function('"use strict";return ('+this.evalFuncStr+")")(),this.debug&&console.log("evalFunc成功构建",t.value)}catch(o){console.error(`evalFunc get error! ${o}`),t.value=void 0}};r(),this.dispose(this.evalFuncStrChanged.disposableOn(r));const i=o=>{this.enabled&&(this.debug&&console.log("执行evalFunc..."),this._evalFunc&&this._evalFunc(o),t.value&&t.value(o))},s=this.disposeVar(new c.ObjResettingWithEvent(this.objIdAndPropChangedNamesChanged,()=>{if(this.objIdAndPropChangedNames.length>0)return this.debug&&console.log("监视对象发生变化,重新创建WatcherObjects"),new Ly(this.objIdAndPropChangedNames,this,i)}));this.dispose(this._forceExecute.disposableOn(()=>{var o;(o=s.obj)==null||o.forceExecute()}))}get evalFunc(){return this._evalFunc}set evalFunc(t){this._evalFunc=t}forceExecute(){this._forceExecute.emit()}}(n=>{n.createDefaultProps=()=>({enabled:!1,objIdAndPropChangedNames:c.reactDeepArray([],(e,t)=>e[0]===t[0]&&e[1]===t[1],e=>[e[0],e[1]]),evalFuncStr:"",evalMode:"NextAnimateFrame",evalOnlyWhenObjsAllExist:!0,debug:!1,name:"未命名场景对象",ref:void 0,extras:c.reactJson(void 0),devTags:c.reactArrayWithUndefined(void 0),execOnceFuncStr:void 0,updateFuncStr:void 0,toDestroyFuncStr:void 0})})(mu||(mu={})),c.extendClassProps(mu.prototype,mu.createDefaultProps);function Ay(n,e,t){var i;((i=e.viewer)==null?void 0:i.getEngineObject(e))?t.call(n):n.dispose(e.createdEvent.don(()=>t.call(n)))}const Ge=class Ge extends j{constructor(t){super(t);d(this,"_editing",this.dv(c.react(!1)));d(this,"editingID");d(this,"editingBindMode","singlePoint");d(this,"_deprecated",[]);d(this,"_flyInEvent",this.dv(new c.Event));d(this,"_flyToEvent",this.dv(new c.Event));d(this,"_flyOverEvent",this.disposeVar(new c.Event));d(this,"_pickedEvent",this.dv(new c.Event));d(this,"_calcFlyToParamEvent",this.dv(new c.Event));d(this,"_calcFlyInParamEvent",this.dv(new c.Event));d(this,"useCalcFlyToParamInESObjectWithLocation",!1);op(this,this.updateEditing)}supportEditingModes(){return this.constructor.supportEditingModes}get editing(){return this._editing.value}set editing(t){this._editing.value=t}get editingChanged(){return this._editing.changed}updateEditing(){}_deprecatedWarning(){const t=this._deprecated;for(let r=0;r<t.length;r++){const i=t[r];typeof i=="string"?Reflect.has(this,i+"Changed")&&this.d(this[i+"Changed"].don(()=>{console.warn(`注意:${this.typeName} 的 ${i} 属性下版本将会被移除!`)})):Object.keys(i).forEach(s=>{Reflect.has(this,s+"Changed")&&this.d(this[s+"Changed"].don(a=>{const l=i[s];typeof l=="string"?console.warn(`注意:${this.typeName} 的 ${s} 属性下版本将会被移除!`):Object.keys(l).forEach(u=>{a===u&&console.warn(`注意:${this.typeName} 的 ${s} 属性值 ${u} 下版本将会被移除,推荐使用属性值 ${l[u]}`)})}))})}}get flyInEvent(){return this._flyInEvent}flyIn(t=1){this._flyInEvent.emit(t,Ge._lastFlyInId)}get flyToEvent(){return this._flyToEvent}flyTo(t=1){this._flyToEvent.emit(t,Ge._lastFlyToId)}get flyOverEvent(){return this._flyOverEvent}get pickedEvent(){return this._pickedEvent}get calcFlyToParamEvent(){return this._calcFlyToParamEvent}calcFlyToParam(){this._calcFlyToParamEvent.emit()}get calcFlyInParamEvent(){return this._calcFlyInParamEvent}calcFlyInParam(){this._calcFlyInParamEvent.emit()}emptyFlyToParam(){this.flyToParam=void 0}emptyFlyInParam(){this.flyInParam=void 0}async getBoundSphere(t){return await t.getBoundSphere(this.id)}getESProperties(){const t={...super.getESProperties()};return{...t,defaultMenu:"general",general:[...t.general,new Z("唯一标识","id",!1,!0,[this,"id"]),new Z("名称","name",!0,!1,[this,"name"]),new F("是否显示","show",!1,!1,[this,"show"],Ge.defaults.show),new F("开启碰撞","collision",!1,!1,[this,"collision"],Ge.defaults.collision),new F("允许拾取","allowPicking",!1,!1,[this,"allowPicking"],Ge.defaults.allowPicking),new ie("保存观察视角","保存当前flyToParam",[],()=>this.calcFlyToParam(),[]),new ie("清空飞向参数","清空飞向参数",[],()=>this.emptyFlyToParam(),[]),new ie("清空飞入参数","清空飞入参数",[],()=>this.emptyFlyInParam(),[]),new ie("保存飞入参数","保存飞入参数flyInParam",[],()=>this.calcFlyInParam(),[])]}}getProperties(t){return[...super.getProperties(t),new z("ESVisualObject","ESVisualObject",[new F("是否显示","是否显示.",!1,!1,[this,"show"],Ge.defaults.show),new F("是否开启碰撞监测","collision,是否开启碰撞监测.",!1,!1,[this,"collision"],Ge.defaults.collision),new F("是否允许拾取","是否允许被鼠标点击拾取.",!1,!1,[this,"allowPicking"],Ge.defaults.allowPicking),new z("飞行定位","飞向参数",[new ie("飞向","飞向",["number"],r=>this.flyTo(r),[1]),new U("flyToParam","flyToParam",!0,!1,[this,"flyToParam"],Ge.defaults.flyToParam),new ie("获取当前参数","获取当前flyToParam",[],()=>this.calcFlyToParam(),[]),new S("flyToDistance","flyToDistance",!0,!1,[this,"flyToDistance"],Ge.defaults.flyToParam.distance),new S("flyToHeading","flyToHeading",!0,!1,[this,"flyToHeading"],Ge.defaults.flyToParam.heading),new S("flyToPitch","flyToPitch",!0,!1,[this,"flyToPitch"],Ge.defaults.flyToParam.pitch),new S("flyToFlyDuration","flyToFlyDuration",!0,!1,[this,"flyToFlyDuration"],Ge.defaults.flyToParam.flyDuration),new S("flyToHDelta","flyToHDelta",!0,!1,[this,"flyToHDelta"],Ge.defaults.flyToParam.hDelta),new S("flyToPDelta","flyToPDelta",!0,!1,[this,"flyToPDelta"],Ge.defaults.flyToParam.pDelta)]),new z("飞入定位","飞入参数",[new ie("飞入","飞入",["number"],r=>this.flyIn(r),[1]),new U("flyInParam","flyInParam",!0,!1,[this,"flyInParam"],Ge.defaults.flyInParam),new ie("获取当前相机参数","获取当前相机参数",[],()=>this.calcFlyInParam(),[])])])]}get flyToDistance(){return this.flyToParam&&this.flyToParam.distance}get flyToHeading(){return this.flyToParam&&this.flyToParam.heading}get flyToPitch(){return this.flyToParam&&this.flyToParam.pitch}get flyToFlyDuration(){return this.flyToParam&&this.flyToParam.flyDuration}get flyToHDelta(){return this.flyToParam&&this.flyToParam.hDelta}get flyToPDelta(){return this.flyToParam&&this.flyToParam.pDelta}get flyToDistanceChanged(){return this.flyToParamChanged}get flyToHeadingChanged(){return this.flyToParamChanged}get flyToPitchChanged(){return this.flyToParamChanged}get flyToFlyDurationChanged(){return this.flyToParamChanged}get flyToHDeltaChanged(){return this.flyToParamChanged}get flyToPDeltaChanged(){return this.flyToParamChanged}set flyToDistance(t){this.flyToParam=t!==void 0?{...this.flyToParam??Ge.defaults.flyToParam,distance:t}:void 0}set flyToHeading(t){this.flyToParam=t!==void 0?{...this.flyToParam??Ge.defaults.flyToParam,heading:t}:void 0}set flyToPitch(t){this.flyToParam=t!==void 0?{...this.flyToParam??Ge.defaults.flyToParam,pitch:t}:void 0}set flyToFlyDuration(t){this.flyToParam=t!==void 0?{...this.flyToParam??Ge.defaults.flyToParam,flyDuration:t}:void 0}set flyToHDelta(t){this.flyToParam=t!==void 0?{...this.flyToParam??Ge.defaults.flyToParam,hDelta:t}:void 0}set flyToPDelta(t){this.flyToParam=t!==void 0?{...this.flyToParam??Ge.defaults.flyToParam,pDelta:t}:void 0}};d(Ge,"supportEditingModes",[]),d(Ge,"_lastFlyInId",0),d(Ge,"_lastFlyToId",0),d(Ge,"defaults",{...j.defaults,show:!0,collision:!0,allowPicking:!1,flyToParam:{distance:0,heading:0,pitch:0,flyDuration:1,hDelta:0,pDelta:0},flyInParam:{position:[0,0,0],rotation:[0,0,0],flyDuration:1}});let ve=Ge;(n=>{n.createDefaultProps=()=>({...j.createDefaultProps(),show:!0,collision:!0,allowPicking:!1,flyToParam:c.reactJsonWithUndefined(void 0),flyInParam:c.reactJsonWithUndefined(void 0)})})(ve||(ve={})),c.extendClassProps(ve.prototype,ve.createDefaultProps);function pp(n){let e=0;function t(r,i){i++,e=Math.max(i,e),r.forEach(s=>{Array.isArray(s)&&t(s,i)})}return t(n,0),e}const $i=class $i extends ve{constructor(t){super(t);d(this,"editingBindMode","lineString");d(this,"_area",this.dv(c.react(0)));d(this,"_perimeter",this.dv(c.react(0)));const r=()=>{this._updateArea(),this._updatePerimeter()};r(),this.d(this.pointsChanged.don(r))}updateEditing(){var r;const t=[];this.editingBindMode=="doublePoints"?t.push(se.DoublePointsAppend,se.DoublePointsModify):this.editingBindMode=="lineString"?t.push(se.LineStringAppend,se.LineStringInsert,se.Translation):this.editingBindMode=="circular"?(t.push(se.CircularAppend,se.CircularInsert,se.Translation),this.supportEditingModes().includes(se.HeightModify)&&t.push(se.HeightModify)):this.editingBindMode=="visibility"?t.push(se.VisibilityAppend,se.VisibilityModify):this.editingBindMode=="scatter"&&t.push(se.ScatterAppend,se.ScatterModify),(r=this.viewer)==null||r.startEditing(this,t,{callSource:"inner"})}get area(){return this._area.value}get areaChanged(){return this._area.changed}get perimeter(){return this._perimeter.value}get perimeterChanged(){return this._perimeter.changed}_updateArea(){this._area.value=this.getArea()??0}_updatePerimeter(){this._perimeter.value=this.getPerimeter()??0}getArea(){if(this.points&&this.points.length>=3)return Oc([...this.points])}getDistance(){if(this.points&&this.points.length>=2){const t=pu(this.points,"GEODESIC");return t[t.length-1]}else return}getPerimeter(){if(this.points&&this.points.length>=3){const t=[...this.points,this.points[0]],r=pu(t,"GEODESIC");return r[r.length-1]}else return}getIntersect(t){if(this.points&&this.points.length>=3&&t.length>=3){const r=Yd(this.points,t);if(!r)return;const i=r[0][0][0];if(Array.isArray(i)){const s=[...r],o=[];return s.forEach(a=>{const l=a[0].map(u=>[...u,0]);o.push(l)}),o}else return[[...r][0].map(a=>[...a,0])]}else return}getUnion(t){if(this.points&&this.points.length>=3&&t.length>=3){const r=Jd(this.points,t);if(!r)return;const i=r[0][0][0];if(Array.isArray(i)){const s=[...r],o=[];return s.forEach(a=>{const l=a[0].map(u=>[...u,0]);o.push(l)}),o}else return[[...r][0].map(a=>[...a,0])]}else return}getDifference(t){if(this.points&&this.points.length>=3&&t.length>=3){let r=[...t];const i=t[0],s=t[t.length-1];i[0]===s[0]&&i[1]===s[1]&&i[2]===s[2]||r.push(i);const o=Kd([...this.points,this.points[0]],[...r]);if(!o)return{status:"undefined",positions:void 0};const a=[...o];if(pp(a)===3){const l=a.map(p=>p.map(v=>[...v,0]));if(l.length<=1)return{status:"notIncluded",positions:l};const u=l[0],h=l[1];return vh([...u],[...h])==="oneBig"?{status:"included",positions:l}:{status:"notIncluded",positions:l}}else if(pp(a)===4){const u=[...a.map(f=>f.map(p=>p.map(v=>[...v,0])))],h=[];return u.forEach(f=>{h.push(f[0])}),{status:"notIncluded",positions:h}}else return{status:"undefined",positions:void 0}}else return{status:"undefined",positions:void 0}}getBuffer(t=500,r){if(this.points&&this.points.length>=2){const i=Zd(this.points,t,r);return i?[i[0].map(s=>[...s,0])]:void 0}else return}geoPolygonOverlap(t){if(this.points&&this.points.length>=3&&t.length>=3){const r=vh(this.points,t);return r==="oneBig"?!0:r==="twoBig"?!1:void 0}else return}getESProperties(){const t={...super.getESProperties()};return{...t,defaultMenu:"style",coordinate:[...t.coordinate,new F("编辑","编辑",!1,!1,[this,"editing"],!1),new U("位置数组","位置数组(经纬高数组)",!0,!1,[this,"points"],$i.defaults.points)],style:[...t.style,new z("点样式","点样式集合",[]),new F("开启","开启点样式",!1,!1,[this,"pointed"],!1),new S("点大小","点大小(pointSize)",!1,!1,[this,"pointSize"],1),new H("点类型","点类型(pointSizeType)",!1,!1,[this,"pointSizeType"],[["screen","screen"],["world","world"]],"screen"),new J("点颜色","点颜色(pointColor)",!1,!1,[this,"pointColor"],[1,1,1,1]),new J("轮廓颜色","轮廓颜色(pointOutlineColor)",!1,!1,[this,"pointOutlineColor"],$i.defaults.pointStyle.outlineColor),new S("轮廓宽度","轮廓宽度(pointOutlineWidth)",!1,!1,[this,"pointOutlineWidth"],$i.defaults.pointStyle.outlineWidth),new z("线样式","线样式集合",[]),new F("开启","开启线样式",!1,!1,[this,"stroked"],!0),new F("贴地","是否贴地",!1,!1,[this,"strokeGround"],!1),new S("线宽","线宽(strokeWidth)",!1,!1,[this,"strokeWidth"],1),new H("线类型","线类型(strokeWidthType)",!1,!1,[this,"strokeWidthType"],[["screen","screen"],["world","world"]],"screen"),new J("线颜色","线颜色(strokeColor)",!1,!1,[this,"strokeColor"],[1,1,1,1]),new z("面样式","面样式集合",[]),new F("开启","开启填充样式",!1,!1,[this,"filled"],!1),new F("贴地","是否贴地",!1,!1,[this,"fillGround"],!1),new J("填充颜色","填充颜色(fillColor)",!1,!1,[this,"fillColor"],[1,1,1,1])]}}getProperties(t){return[...super.getProperties(t),new z("ESGeoVector","ESGeoVector",[new F("是否编辑","是否编辑",!1,!1,[this,"editing"]),new U("位置数组","位置数组(经纬高数组)",!1,!1,[this,"points"]),new z("点样式","点样式",[new F("开启点样式","开启点样式",!1,!1,[this,"pointed"]),new S("点大小","点大小(pointSize)",!1,!1,[this,"pointSize"]),new H("点类型","点类型(pointSizeType)",!1,!1,[this,"pointSizeType"],[["screen","screen"],["world","world"]]),new J("点颜色","点颜色(pointColor)",!1,!1,[this,"pointColor"]),new J("轮廓颜色","轮廓颜色(pointOutlineColor)",!1,!1,[this,"pointOutlineColor"],$i.defaults.pointStyle.outlineColor),new S("轮廓宽度","轮廓宽度(pointOutlineWidth)",!1,!1,[this,"pointOutlineWidth"],$i.defaults.pointStyle.outlineWidth),new Z("点材质","点材质(pointMaterial)",!1,!1,[this,"pointMaterial"]),new U("点材质参数","点材质参数(pointMaterialParams)",!1,!1,[this,"pointMaterialParams"])]),new z("线样式","线样式",[new F("开启线样式","开启线样式",!1,!1,[this,"stroked"]),new S("线宽","线宽(strokeWidth)",!1,!1,[this,"strokeWidth"]),new H("线类型","线类型(strokeWidthType)",!1,!1,[this,"strokeWidthType"],[["screen","screen"],["world","world"]]),new J("线颜色","线颜色(strokeColor)",!1,!1,[this,"strokeColor"]),new Z("线材质","线材质(strokeMaterial)",!1,!1,[this,"strokeMaterial"]),new U("线材质参数","线材质参数(strokeMaterialParams)",!1,!1,[this,"strokeMaterialParams"]),new F("是否贴地","是否贴地",!1,!1,[this,"strokeGround"])]),new z("填充样式","填充样式",[new F("开启填充样式","开启填充样式",!1,!1,[this,"filled"]),new J("填充颜色","填充颜色(fillColor)",!1,!1,[this,"fillColor"]),new Z("面材质","面材质(fillMaterial)",!1,!1,[this,"fillMaterial"]),new U("面材质参数","面材质参数(fillMaterialParams)",!1,!1,[this,"fillMaterialParams"]),new F("是否贴地","是否贴地",!1,!1,[this,"fillGround"])])])]}get pointSize(){return this.pointStyle.size}set pointSize(t){this.pointStyle={...this.pointStyle,size:t}}get pointSizeChanged(){return this.pointStyleChanged}get pointSizeType(){return this.pointStyle.sizeType}set pointSizeType(t){this.pointStyle={...this.pointStyle,sizeType:t}}get pointSizeTypeChanged(){return this.pointStyleChanged}get pointColor(){return this.pointStyle.color}set pointColor(t){this.pointStyle={...this.pointStyle,color:[...t]}}get pointColorChanged(){return this.pointStyleChanged}get pointOutlineColor(){return this.pointStyle.outlineColor}set pointOutlineColor(t){this.pointStyle={...this.pointStyle,outlineColor:[...t]}}get pointOutlineColorChanged(){return this.pointStyleChanged}get pointOutlineWidth(){return this.pointStyle.outlineWidth}set pointOutlineWidth(t){this.pointStyle={...this.pointStyle,outlineWidth:t}}get pointOutlineWidthChanged(){return this.pointStyleChanged}get pointMaterial(){return this.pointStyle.material}set pointMaterial(t){this.pointStyle={...this.pointStyle,material:t}}get pointMaterialChanged(){return this.pointStyleChanged}get pointMaterialParams(){return this.pointStyle.materialParams}set pointMaterialParams(t){this.pointStyle={...this.pointStyle,materialParams:t}}get pointMaterialParamsChanged(){return this.pointStyleChanged}get strokeWidth(){return this.strokeStyle.width}set strokeWidth(t){this.strokeStyle={...this.strokeStyle,width:t}}get strokeWidthChanged(){return this.strokeStyleChanged}get strokeWidthType(){return this.strokeStyle.widthType}set strokeWidthType(t){this.strokeStyle={...this.strokeStyle,widthType:t}}get strokeWidthTypeChanged(){return this.strokeStyleChanged}get strokeColor(){return this.strokeStyle.color}set strokeColor(t){this.strokeStyle={...this.strokeStyle,color:[...t]}}get strokeColorChanged(){return this.strokeStyleChanged}get strokeMaterial(){return this.strokeStyle.material}set strokeMaterial(t){this.strokeStyle={...this.strokeStyle,material:t}}get strokeMaterialChanged(){return this.strokeStyleChanged}get strokeMaterialParams(){return this.strokeStyle.materialParams}set strokeMaterialParams(t){this.strokeStyle={...this.strokeStyle,materialParams:t}}get strokeMaterialParamsChanged(){return this.strokeStyleChanged}get strokeGround(){return this.strokeStyle.ground}set strokeGround(t){this.strokeStyle={...this.strokeStyle,ground:t}}get strokeGroundChanged(){return this.strokeStyleChanged}get fillColor(){return this.fillStyle.color}set fillColor(t){this.fillStyle={...this.fillStyle,color:[...t]}}get fillColorChanged(){return this.fillStyleChanged}get fillMaterial(){return this.fillStyle.material}set fillMaterial(t){this.fillStyle={...this.fillStyle,material:t}}get fillMaterialChanged(){return this.fillStyleChanged}get fillMaterialParams(){return this.fillStyle.materialParams}set fillMaterialParams(t){this.fillStyle={...this.fillStyle,materialParams:t}}get fillMaterialParamsChanged(){return this.fillStyleChanged}get fillGround(){return this.fillStyle.ground}set fillGround(t){this.fillStyle={...this.fillStyle,ground:t}}get fillGroundChanged(){return this.fillStyleChanged}};d($i,"supportEditingModes",[...ve.supportEditingModes,se.Translation]),d($i,"defaults",{...ve.defaults,points:[],pointStyle:{size:10,sizeType:"screen",color:[1,1,1,1],material:"",materialParams:{},outlineColor:[1,0,0,1],outlineWidth:2},strokeStyle:{width:1,widthType:"screen",color:[1,1,1,1],material:"",materialParams:{},ground:!1},fillStyle:{color:[1,1,1,1],material:"",materialParams:{},ground:!1},pointed:!1,stroked:!1,filled:!1});let le=$i;(n=>{n.createDefaultProps=()=>({...ve.createDefaultProps(),pointed:!1,pointStyle:c.reactJson(n.defaults.pointStyle),stroked:!1,strokeStyle:c.reactJson(n.defaults.strokeStyle),filled:!1,fillStyle:c.reactJson(n.defaults.fillStyle),points:c.reactPositions(void 0)})})(le||(le={})),c.extendClassProps(le.prototype,le.createDefaultProps);class q extends ve{constructor(){super(...arguments);d(this,"_statusDis",this.dv(c.react(!0)));d(this,"_smoothMoveEvent",this.dv(new c.Event));d(this,"_smoothMoveWithRotationEvent",this.dv(new c.Event));d(this,"_smoothMoveOnGroundEvent",this.dv(new c.Event));d(this,"_smoothMoveWithRotationOnGroundEvent",this.dv(new c.Event));d(this,"_automaticLandingEvent",this.dv(new c.Event));d(this,"_smoothMoveKeepPitchEvent",this.dv(new c.Event));d(this,"_smoothMoveRelativelyEvent",this.dv(new c.Event));d(this,"_smoothMoveRelativelyWithRotationEvent",this.dv(new c.Event));d(this,"useCalcFlyToParamInESObjectWithLocation",!0)}updateEditing(){var r;const t=[];this.editingBindMode=="singlePoint"?(t.push(se.Place,se.Translation),["ESLocationMeasurement"].includes(this.typeName)||t.push(se.Rotation),["ESClippingPlane","ESLocationMeasurement","ESLocalRectangle","ESBoxClipping"].includes(this.typeName)||t.push(se.Scale)):this.editingBindMode=="doublePoints"&&t.push(se.DoublePointsAppend,se.DoublePointsModify),(r=this.viewer)==null||r.startEditing(this,t,{callSource:"inner"})}get statusDis(){return this._statusDis.value}get statusDisChanged(){return this._statusDis.changed}get smoothMoveEvent(){return this._smoothMoveEvent}smoothMove(t,r){this._smoothMoveEvent.emit(t,r)}get smoothMoveWithRotationEvent(){return this._smoothMoveWithRotationEvent}smoothMoveWithRotation(t,r,i){this._smoothMoveWithRotationEvent.emit(t,r,i)}get smoothMoveOnGroundEvent(){return this._smoothMoveOnGroundEvent}smoothMoveOnGround(t,r,i,s){this._smoothMoveOnGroundEvent.emit(t,r,i,s)}get smoothMoveWithRotationOnGroundEvent(){return this._smoothMoveWithRotationOnGroundEvent}smoothMoveWithRotationOnGround(t,r,i,s,o){this._smoothMoveWithRotationOnGroundEvent.emit(t,r,i,s,o)}get automaticLandingEvent(){return this._automaticLandingEvent}automaticLanding(){const t=this.collision;this.collision=!1,setTimeout(()=>{this._automaticLandingEvent.emit(t)},100)}get smoothMoveKeepPitchEvent(){return this._smoothMoveKeepPitchEvent}smoothMoveKeepPitch(t,r){this._smoothMoveKeepPitchEvent.emit(t,r)}get smoothMoveRelativelyEvent(){return this._smoothMoveRelativelyEvent}smoothMoveRelatively(t,r){this._smoothMoveRelativelyEvent.emit(t,r)}get smoothMoveRelativelyWithRotationEvent(){return this._smoothMoveRelativelyWithRotationEvent}smoothMoveRelativelyWithRotation(t,r,i){this._smoothMoveRelativelyWithRotationEvent.emit(t,r,i)}getESProperties(){const t={...super.getESProperties()};return{...t,defaultMenu:"basic",location:[...t.location,new F("是否编辑","是否编辑",!1,!1,[this,"editing"]),new ie("自动落地","自动落地",[],()=>this.automaticLanding(),[]),new Nn("位置数组","经度,纬度,高度,度为单位",!1,!1,[this,"position"],[0,0,0]),new Su("姿态数组","偏航角,俯仰角,翻转角,度为单位",!1,!1,[this,"rotation"],[0,0,0]),new It("缩放","缩放",!1,!1,[this,"scale"],[1,1,1]),new S("最小可见距离","单位米",!1,!1,[this,"minVisibleDistance"],0),new S("最大可见距离","单位米",!1,!1,[this,"maxVisibleDistance"],0)]}}getProperties(t){return[...super.getProperties(t),new z("位置姿态对象","位置姿态对象ESObjectWithLocation",[new ie("平滑移动","smoothMove",["numbers","number"],(r,i)=>this.smoothMove(r,i),[[0,0,0],0]),new ie("固定方向平滑移动","smoothMoveKeepPitch",["numbers","number"],(r,i)=>this.smoothMoveKeepPitch(r,i),[[0,0,0],0]),new ie("平滑偏移","smoothMoveWithRotation",["numbers","numbers","number"],(r,i,s)=>this.smoothMoveWithRotation(r,i,s),[[0,0,0],[0,0,0],0]),new ie("贴地平滑移动","smoothMoveOnGround",["number","number","number","string"],(r,i,s,o)=>this.smoothMoveOnGround(r,i,s,o),[0,0,0,""]),new ie("贴地平滑偏移","smoothMoveWithRotationOnGround",["numbers","number","number","number","string"],(r,i,s,o,a)=>this.smoothMoveWithRotationOnGround(r,i,s,o,a),[[0,0,0],0,0,0,""]),new ie("smoothMoveRelatively","smoothMoveRelatively",["numbers","number"],(r,i)=>this.smoothMoveRelatively(r,i),[[0,0,0],0]),new ie("smoothMoveRelativelyWithRotation","smoothMoveRelativelyWithRotation",["numbers","numbers","number"],(r,i,s)=>this.smoothMoveRelativelyWithRotation(r,i,s),[[0,0,0],[0,0,0],0]),new Nn("位置数组","经度,纬度,高度,度为单位",!1,!1,[this,"position"]),new Su("姿态数组","偏航角,俯仰角,翻转角,度为单位",!1,!1,[this,"rotation"]),new It("缩放","缩放",!1,!1,[this,"scale"]),new F("是否编辑","是否开启编辑状态",!0,!1,[this,"editing"],!1),new S("最小可见距离","单位米",!1,!1,[this,"minVisibleDistance"]),new S("最大可见距离","单位米",!1,!1,[this,"maxVisibleDistance"]),new F("是否应用距离显隐","是否应用距离显隐",!1,!1,[this,"enableVisibleDistance"])])]}get pointSize(){return this.pointStyle.size}set pointSize(t){this.pointStyle={...this.pointStyle,size:t}}get pointSizeChanged(){return this.pointStyleChanged}get pointSizeType(){return this.pointStyle.sizeType}set pointSizeType(t){this.pointStyle={...this.pointStyle,sizeType:t}}get pointSizeTypeChanged(){return this.pointStyleChanged}get pointColor(){return this.pointStyle.color}set pointColor(t){this.pointStyle={...this.pointStyle,color:[...t]}}get pointColorChanged(){return this.pointStyleChanged}get pointMaterial(){return this.pointStyle.material}set pointMaterial(t){this.pointStyle={...this.pointStyle,material:t}}get pointMaterialChanged(){return this.pointStyleChanged}get pointMaterialParams(){return this.pointStyle.materialParams}set pointMaterialParams(t){this.pointStyle={...this.pointStyle,materialParams:t}}get pointMaterialParamsChanged(){return this.pointStyleChanged}}d(q,"supportEditingModes",[...ve.supportEditingModes,se.Place,se.Translation,se.Rotation,se.Scale,se.DoublePointsAppend,se.DoublePointsModify]),d(q,"defaults",{...ve.defaults,pointStyle:{size:1,sizeType:"screen",color:[1,1,1,1],material:"",materialParams:{}},pointed:!1}),(n=>{n.createDefaultProps=()=>({...ve.createDefaultProps(),pointed:!1,pointStyle:c.reactJson(n.defaults.pointStyle),position:c.reactArray([0,0,0]),rotation:c.reactArray([0,0,0]),scale:c.reactArray([1,1,1]),minVisibleDistance:c.react(0),maxVisibleDistance:c.react(0)})})(q||(q={})),c.extendClassProps(q.prototype,q.createDefaultProps);class Zn extends q{getESProperties(){const e={...super.getESProperties()};return{...e,style:[...e.style,new z("点样式","点样式集合",[]),new F("开启点样式","开启点样式",!1,!1,[this,"pointed"],!1),new S("点大小","点大小(pointSize)",!1,!1,[this,"pointSize"],1),new H("点类型","点类型(pointSizeType)",!1,!1,[this,"pointSizeType"],[["screen","screen"],["world","world"]],"screen"),new J("点颜色","点颜色(pointColor)",!1,!1,[this,"pointColor"],[1,1,1,1]),new z("线样式","线样式集合",[]),new F("开启线样式","开启线样式",!1,!1,[this,"stroked"],!1),new F("是否贴地(线)","是否贴地(线)",!1,!1,[this,"strokeGround"],!1),new S("线宽","线宽(strokeWidth)",!1,!1,[this,"strokeWidth"],1),new H("线类型","线类型(strokeWidthType)",!1,!1,[this,"strokeWidthType"],[["screen","screen"],["world","world"]],"screen"),new J("线颜色","线颜色(strokeColor)",!1,!1,[this,"strokeColor"],[1,1,1,1]),new z("面样式","面样式集合",[]),new F("开启填充样式","开启填充样式",!1,!1,[this,"filled"],!1),new F("是否贴地","是否贴地",!1,!1,[this,"fillGround"],!1),new J("填充颜色","填充颜色(fillColor)",!1,!1,[this,"fillColor"],[1,1,1,1])]}}getProperties(e){return[...super.getProperties(e),new z("ESLocalVector","ESLocalVector",[new U("点样式","点样式(pointMaterialParams)",!1,!1,[this,"pointStyle"]),new U("线样式","线样式(strokeMaterialParams)",!1,!1,[this,"strokeStyle"]),new U("填充样式","填充样式(fillMaterialParams)",!1,!1,[this,"fillStyle"]),new z("点样式","点样式",[new F("开启点样式","开启点样式",!1,!1,[this,"pointed"]),new S("点大小","点大小(pointSize)",!1,!1,[this,"pointSize"]),new H("点类型","点类型(pointSizeType)",!1,!1,[this,"pointSizeType"],[["screen","screen"],["world","world"]]),new J("点颜色","点颜色(pointColor)",!1,!1,[this,"pointColor"]),new Z("点材质","点材质(pointMaterial)",!1,!1,[this,"pointMaterial"]),new U("点材质参数","点材质参数(pointMaterialParams)",!1,!1,[this,"pointMaterialParams"])]),new z("线样式","线样式",[new F("开启线样式","开启线样式",!1,!1,[this,"stroked"]),new S("线宽","线宽(strokeWidth)",!1,!1,[this,"strokeWidth"]),new H("线类型","线类型(strokeWidthType)",!1,!1,[this,"strokeWidthType"],[["screen","screen"],["world","world"]]),new J("线颜色","线颜色(strokeColor)",!1,!1,[this,"strokeColor"]),new Z("线材质","线材质(strokeMaterial)",!1,!1,[this,"strokeMaterial"]),new U("线材质参数","线材质参数(strokeMaterialParams)",!1,!1,[this,"strokeMaterialParams"]),new F("是否贴地(线)","是否贴地(线)",!1,!1,[this,"strokeGround"],!1)]),new z("填充样式","填充样式",[new F("开启填充样式","开启填充样式",!1,!1,[this,"filled"]),new J("填充颜色","填充颜色(fillColor)",!1,!1,[this,"fillColor"]),new Z("面材质","面材质(fillMaterial)",!1,!1,[this,"fillMaterial"]),new U("面材质参数","面材质参数(fillMaterialParams)",!1,!1,[this,"fillMaterialParams"]),new F("是否贴地","是否贴地",!1,!1,[this,"fillGround"])])])]}get pointSize(){return this.pointStyle.size}set pointSize(e){this.pointStyle={...this.pointStyle,size:e}}get pointSizeChanged(){return this.pointStyleChanged}get pointSizeType(){return this.pointStyle.sizeType}set pointSizeType(e){this.pointStyle={...this.pointStyle,sizeType:e}}get pointSizeTypeChanged(){return this.pointStyleChanged}get pointColor(){return this.pointStyle.color}set pointColor(e){this.pointStyle={...this.pointStyle,color:[...e]}}get pointColorChanged(){return this.pointStyleChanged}get pointMaterial(){return this.pointStyle.material}set pointMaterial(e){this.pointStyle={...this.pointStyle,material:e}}get pointMaterialChanged(){return this.pointStyleChanged}get pointMaterialParams(){return this.pointStyle.materialParams}set pointMaterialParams(e){this.pointStyle={...this.pointStyle,materialParams:e}}get pointMaterialParamsChanged(){return this.pointStyleChanged}get strokeWidth(){return this.strokeStyle.width}set strokeWidth(e){this.strokeStyle={...this.strokeStyle,width:e}}get strokeWidthChanged(){return this.strokeStyleChanged}get strokeWidthType(){return this.strokeStyle.widthType}set strokeWidthType(e){this.strokeStyle={...this.strokeStyle,widthType:e}}get strokeWidthTypeChanged(){return this.strokeStyleChanged}get strokeColor(){return this.strokeStyle.color}set strokeColor(e){this.strokeStyle={...this.strokeStyle,color:[...e]}}get strokeColorChanged(){return this.strokeStyleChanged}get strokeMaterial(){return this.strokeStyle.material}set strokeMaterial(e){this.strokeStyle={...this.strokeStyle,material:e}}get strokeMaterialChanged(){return this.strokeStyleChanged}get strokeMaterialParams(){return this.strokeStyle.materialParams}set strokeMaterialParams(e){this.strokeStyle={...this.strokeStyle,materialParams:e}}get strokeMaterialParamsChanged(){return this.strokeStyleChanged}get strokeGround(){return this.strokeStyle.ground}set strokeGround(e){this.strokeStyle={...this.strokeStyle,ground:e}}get strokeGroundChanged(){return this.strokeStyleChanged}get fillColor(){return this.fillStyle.color}set fillColor(e){this.fillStyle={...this.fillStyle,color:[...e]}}get fillColorChanged(){return this.fillStyleChanged}get fillMaterial(){return this.fillStyle.material}set fillMaterial(e){this.fillStyle={...this.fillStyle,material:e}}get fillMaterialChanged(){return this.fillStyleChanged}get fillMaterialParams(){return this.fillStyle.materialParams}set fillMaterialParams(e){this.fillStyle={...this.fillStyle,materialParams:e}}get fillMaterialParamsChanged(){return this.fillStyleChanged}get fillGround(){return this.fillStyle.ground}set fillGround(e){this.fillStyle={...this.fillStyle,ground:e}}get fillGroundChanged(){return this.fillStyleChanged}}d(Zn,"defaults",{...q.defaults,pointStyle:{size:1,sizeType:"screen",color:[1,1,1,1],material:"",materialParams:{}},strokeStyle:{width:1,widthType:"screen",color:[1,1,1,1],material:"",materialParams:{},ground:!1},fillStyle:{color:[1,1,1,1],material:"",materialParams:{},ground:!1},pointed:!1,stroked:!1,filled:!1}),(n=>{n.createDefaultProps=()=>({...q.createDefaultProps(),pointed:!1,pointStyle:c.reactJson(n.defaults.pointStyle),stroked:!1,strokeStyle:c.reactJson(n.defaults.strokeStyle),filled:!1,fillStyle:c.reactJson(n.defaults.fillStyle)})})(Zn||(Zn={})),c.extendClassProps(Zn.prototype,Zn.createDefaultProps);class vr extends Zn{getESProperties(){return{...super.getESProperties()}}getProperties(e){return[...super.getProperties(e)]}}d(vr,"defaults",{...Zn.defaults}),(n=>{n.createDefaultProps=()=>({...Zn.createDefaultProps()})})(vr||(vr={})),c.extendClassProps(vr.prototype,vr.createDefaultProps);const gp=[["固定朝向",0],["面向屏幕旋转",1],["绕自身Z轴旋转",2]],mp=[["单面不透明",0],["双面不透明",1],["单面遮罩",2],["双面遮罩",3],["单面透明",4],["双面透明",5],["单面未遮挡透明",6],["双面未遮挡透明",7]];class ft extends q{constructor(){super(...arguments);d(this,"_widgetEvent",this.dv(new c.Event))}get widgetEvent(){return this._widgetEvent}getESProperties(){const t={...super.getESProperties()};return{...t,basic:[...t.basic,new F("屏幕渲染","是否开启屏幕渲染模式",!1,!1,[this,"screenRender"],!0),new F("尺寸自适应","尺寸是否根据内容自动计算",!1,!1,[this,"sizeByContent"],!0),new ze("尺寸大小","尺寸自适应关闭才会生效",!1,!1,[this,"size"],[100,100]),new ze("偏移比例","偏移比例(anchor)",!1,!1,[this,"anchor"],[.5,1]),new ze("像素偏移","像素偏移(offset)",!1,!1,[this,"offset"],[0,0]),new H("渲染模式","八种渲染模式(0~7),当Widget中透明度只有(0,1)两种时可以选择2",!1,!1,[this,"renderMode"],mp,0),new H("漫游旋转类型","三种漫游旋转类型(0,1,2)",!1,!1,[this,"rotationType"],gp,1),new Z("绑定对象","actorTag",!1,!1,[this,"actorTag"]),new Z("插槽名称","socketName",!1,!1,[this,"socketName"]),new It("位置偏移","positionOffset(米)",!1,!1,[this,"positionOffset"]),new It("相对姿态","rotationOffset(米)",!1,!1,[this,"rotationOffset"])]}}getProperties(t){return[...super.getProperties(t),new z("标签属性","标签对象ESLabel的属性",[new F("屏幕渲染","是否开启屏幕渲染模式",!1,!1,[this,"screenRender"],!0),new F("尺寸自适应","尺寸是否根据内容自动计算",!1,!1,[this,"sizeByContent"],!0),new ze("尺寸大小","尺寸自适应关闭才会生效",!1,!1,[this,"size"],[100,100]),new ze("偏移比例","偏移比例(anchor)",!1,!1,[this,"anchor"],[.5,1]),new ze("像素偏移","像素偏移(offset)",!1,!1,[this,"offset"],[0,0]),new H("渲染模式","八种渲染模式(0~7),当Widget中透明度只有(0,1)两种时可以选择2",!1,!1,[this,"renderMode"],mp,0),new H("漫游旋转类型","三种漫游旋转类型(0,1,2)",!1,!1,[this,"rotationType"],gp,1),new S("排序","zOrder排序",!1,!1,[this,"zOrder"],0)])]}}d(ft,"defaults",{...q.defaults,screenRender:!0,size:[100,100],anchor:[.5,.5],sizeByContent:!0,renderMode:0,rotationType:1}),(n=>{n.createDefaultProps=()=>({...q.createDefaultProps(),screenRender:!0,size:c.reactArray([100,100]),anchor:c.reactArray([.5,1]),offset:c.reactArray([0,0]),sizeByContent:!0,renderMode:0,rotationType:1,zOrder:0,actorTag:"",socketName:"",positionOffset:c.reactArray([0,0,0]),rotationOffset:c.reactArray([0,0,0])})})(ft||(ft={})),c.extendClassProps(ft.prototype,ft.createDefaultProps);const yr=class yr extends ve{constructor(t){super(t);d(this,"_refreshTilesetEvent",this.dv(new c.Event));d(this,"_tilesetReadyEvent",this.dv(new c.Event));d(this,"_supportEdit",this.dv(c.react(!0)));d(this,"_highlightFeatureEvent",this.dv(new c.Event));d(this,"_highlightFeatureAndFlyToEvent",this.dv(new c.Event));d(this,"_strokeFeatureEvent",this.disposeVar(new c.Event));d(this,"_getFeatureTableEvent",this.dv(new c.Event));d(this,"_featureTableResultEvent",this.dv(new c.Event));d(this,"_getMaterialNameListEvent",this.disposeVar(new c.Event));d(this,"_setFeatureStyleEvent",this.dv(new c.Event));d(this,"_setFeatureColorEvent",this.dv(new c.Event));d(this,"_setFeatureVisableEvent",this.dv(new c.Event));d(this,"_resetFeatureStyleEvent",this.dv(new c.Event));d(this,"setMaterialInfoEvent",this.ad(new c.Event));d(this,"_setMaterialEvent",this.disposeVar(new c.Event));d(this,"_clippingPlanesId",this.dv(c.react("")));d(this,"_clippingPlaneIds",this.dv(c.react([])));d(this,"_flattenedPlaneId",this.dv(c.react("")));d(this,"_flattenedPlaneEnabled",this.dv(c.react(!1)));d(this,"_clippingPlaneId",this.dv(c.react("")));d(this,"_excavateId",this.dv(c.reactArray([])))}get typeName(){return"ES3DTileset"}get defaultProps(){return yr.createDefaultProps()}updateEditing(){var t;(t=this.viewer)==null||t.startEditing(this,[se.Translation,se.Rotation],{callSource:"inner"})}get refreshTilesetEvent(){return this._refreshTilesetEvent}refreshTileset(){this._refreshTilesetEvent.emit()}get tilesetReady(){return this._tilesetReadyEvent}get supportEdit(){return this._supportEdit.value}set supportEdit(t){this._supportEdit.value=t}get supportEditChanged(){return this._supportEdit.changed}get highlightFeatureEvent(){return this._highlightFeatureEvent}highlightFeature(t,r){this._highlightFeatureEvent.emit(t,r)}get highlightFeatureAndFlyToEvent(){return this._highlightFeatureAndFlyToEvent}highlightFeatureAndFlyTo(t,r,i,s){this._highlightFeatureAndFlyToEvent.emit(t,r,i,s)}get strokeFeatureEvent(){return this._strokeFeatureEvent}strokeFeature(t,r=[1,0,0,1]){this._strokeFeatureEvent.emit(t,r)}get getFeatureTableEvent(){return this._getFeatureTableEvent}getFeatureTable(){return Promise.race([new Promise(t=>{const r=this.d(this._featureTableResultEvent.donce(t));this._getFeatureTableEvent.emit(),setTimeout(()=>{r(),t(void 0)},2e3)})])}get getMaterialNameListEvent(){return this._getMaterialNameListEvent}getMaterialNameList(){return new Promise(t=>{const r=new c.Destroyable;r.d(this.getMaterialNameListEvent.don(i=>{i!=="start"&&(r.destroy(),t(i))})),this.getMaterialNameListEvent.emit("start"),setTimeout(()=>{r.isDestroyed()||(r.destroy(),t(void 0))},2e3)})}get setFeatureStyleEvent(){return this._setFeatureStyleEvent}setFeatureStyle(t){this._setFeatureStyleEvent.emit(t)}get setFeatureColorEvent(){return this._setFeatureColorEvent}setFeatureColor(t,r){this._setFeatureColorEvent.emit(t,typeof r=="string"?JSON.parse(r):r)}get setFeatureVisableEvent(){return this._setFeatureVisableEvent}setFeatureVisable(t,r){this._setFeatureVisableEvent.emit(t,typeof r=="string"?JSON.parse(r):r)}get resetFeatureStyleEvent(){return this._resetFeatureStyleEvent}resetFeatureStyle(){this._resetFeatureStyleEvent.emit()}get setMaterialEvent(){return this._setMaterialEvent}setMaterial(t){return new Promise(r=>{const i=new c.Destroyable;i.ad(this.setMaterialInfoEvent.donce(s=>{i.destroy(),r(s)})),this._setMaterialEvent.emit(t)})}get clippingPlanesId(){return this._clippingPlanesId.value}set clippingPlanesId(t){this._clippingPlanesId.value=t}get clippingPlanesIdChanged(){return this._clippingPlanesId.changed}get clippingPlaneIds(){return this._clippingPlaneIds.value}set clippingPlaneIds(t){this._clippingPlaneIds.value=t}get clippingPlaneIdsChanged(){return this._clippingPlaneIds.changed}get flattenedPlaneId(){return this._flattenedPlaneId.value}set flattenedPlaneId(t){this._flattenedPlaneId.value=t}get flattenedPlaneIdChanged(){return this._flattenedPlaneId.changed}get flattenedPlaneEnabled(){return this._flattenedPlaneEnabled.value}set flattenedPlaneEnabled(t){this._flattenedPlaneEnabled.value=t}get flattenedPlaneEnabledChanged(){return this._flattenedPlaneEnabled.changed}get clippingPlaneId(){return this._clippingPlaneId.value}set clippingPlaneId(t){this._clippingPlaneId.value=t}get clippingPlaneIdChanged(){return this._clippingPlaneId.changed}get excavateId(){return this._excavateId.value}set excavateId(t){this._excavateId.value=t}get excavateIdChanged(){return this._excavateId.changed}setLight122(){this.czmEnvironmentMapManager={...Eh}}getESProperties(){const t={...super.getESProperties()};return{...t,defaultMenu:"dataSource",basic:[...t.basic,new Me("精度","精度.",!1,!1,[this,"maximumScreenSpaceError"],1,[0,256],16),new H("材质模式","materialMode",!0,!1,[this,"materialMode"],yr.defaults.materialModes,"normal"),new H("颜色模式","颜色混合模式",!1,!1,[this,"colorBlendMode"],[["默认","HIGHLIGHT"],["替换","REPLACE"],["混合","MIX"]],"HIGHLIGHT"),new U("materialOverrideMap","材质替换",!1,!1,[this,"materialOverrideMap"],yr.defaults.materialOverrideMap)],dataSource:[...t.dataSource,new U("服务地址","服务地址",!0,!1,[this,"url"],yr.defaults.url)],coordinate:[...t.coordinate,new F("编辑","编辑",!0,!1,[this,"editing"],!1),new It("偏移","偏移量",!0,!1,[this,"offset"],[0,0,0]),new Su("旋转","旋转",!1,!1,[this,"rotation"],[0,0,0])]}}getProperties(t){return[...super.getProperties(t),new z("ES3DTileset","ES3DTileset",[new U("服务地址","服务地址",!1,!1,[this,"url"],yr.defaults.url),new H("materialMode","materialMode",!1,!1,[this,"materialMode"],yr.defaults.materialModes),new U("materialParams","materialParams",!1,!1,[this,"materialParams"],yr.defaults.materialParams),new S("maximumScreenSpaceError","显示精度,maximumScreenSpaceError",!1,!1,[this,"maximumScreenSpaceError"]),new F("编辑","编辑",!1,!1,[this,"editing"],!1),new Nn("offset","offset",!0,!1,[this,"offset"]),new Nn("rotation","rotation",!1,!1,[this,"rotation"]),new Me("精度","精度.",!1,!1,[this,"maximumScreenSpaceError"],1,[0,256],16),new ie("highlightFeature","highlightFeature",["string","string"],(r,i)=>this.highlightFeature(r,i),["","rgba(255,0,0,1)"]),new ie("setFeatureColor","setFeatureColor",["string","string"],(r,i)=>this.setFeatureColor(r,i),["",""]),new ie("setFeatureVisable","setFeatureVisable",["string","string"],(r,i)=>this.setFeatureVisable(r,i),["",""]),new ie("resetFeatureStyle","resetFeatureStyle",[],()=>this.resetFeatureStyle(),[]),new z("ue","ue",[new ie("refreshTileset","refreshTileset",[],()=>this.refreshTileset(),[]),new Z("actorTag","actorTag",!1,!1,[this,"actorTag"]),new F("是否高亮","是否高亮.",!1,!1,[this,"highlight"]),new J("highlightColor"," highlightColor.",!1,!1,[this,"highlightColor"]),new S("highlightID","highlightID",!1,!1,[this,"highlightID"]),new U("materialOverrideMap","材质替换",!1,!1,[this,"materialOverrideMap"],yr.defaults.materialOverrideMap)]),new z("czm","czm",[new z("可视化","可视化",[new ze("czmImageBasedLightingFactor","反射强度 ,imageBasedLightingFactor",!1,!1,[this,"czmImageBasedLightingFactor"]),new S("czmAtmosphereScatteringIntensity","大气散射强度 ,atmosphereScatteringIntensity",!1,!1,[this,"czmAtmosphereScatteringIntensity"]),new U("czmEnvironmentMapManager","动态环境贴图管理器",!1,!1,[this,"czmEnvironmentMapManager"]),new S("czmMaximumMemoryUsage","最大内存,maximumMemoryUsage",!1,!1,[this,"czmMaximumMemoryUsage"])]),new z("常用","常用",[new H("czmClassificationType","Determines whether terrain, 3D Tiles or both will be classified by this tileset. See Cesium3DTileset#czmClassificationType for details about restrictions and limitations.",!0,!1,[this,"czmClassificationType"],[["NONE","NONE"],["TERRAIN","TERRAIN"],["CESIUM_3D_TILE","CESIUM_3D_TILE"],["BOTH","BOTH"]]),new U("czmStyle","czmStyle",!1,!1,[this,"czmStyleJson"]),new F("czmBackFaceCulling","czmBackFaceCulling",!1,!1,[this,"czmBackFaceCulling"]),new F("czmSkipLevelOfDetail","czmSkipLevelOfDetail",!1,!1,[this,"czmSkipLevelOfDetail"]),new H("colorBlendMode","颜色混合模式",!1,!1,[this,"colorBlendMode"],[["HIGHLIGHT","HIGHLIGHT"],["REPLACE","REPLACE"],["MIX","MIX"]],"HIGHLIGHT"),new S("cacheBytes","最大缓存占用,超过的会自动卸载,但是视野范围内能看见的保留。单位字节。Cesium1.110(含)以后的版本起作用。",!1,!1,[this,"cacheBytes"],512*1024*1024)]),new z("调试信息","调试信息",[new F("czmDebugShowBoundingVolume","For debugging only.When true, renders the bounding volume for each tile.",!1,!1,[this,"czmDebugShowBoundingVolume"]),new F("czmDebugShowContentBoundingVolume","czmDebugShowContentBoundingVolume.",!1,!1,[this,"czmDebugShowContentBoundingVolume"])]),new z("clippingPlanes","clippingPlanes",[new F("clippingPlaneEnabled","clippingPlaneEnabled",!1,!1,[this,"clippingPlaneEnabled"]),new F("unionClippingRegions","unionClippingRegions",!1,!1,[this,"unionClippingRegions"]),new J("clippingPlaneEdgeColor","clippingPlaneEdgeColor",!1,!1,[this,"clippingPlaneEdgeColor"]),new S("clippingPlaneEdgeWidth","clippingPlaneEdgeWidth",!1,!1,[this,"clippingPlaneEdgeWidth"])])])])]}};d(yr,"type",yr.register("ES3DTileset",yr,{chsName:"3DTileset",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"3DTileset"})),d(yr,"supportEditingModes",[...ve.supportEditingModes,se.Translation,se.Rotation]),d(yr,"defaults",{...ve.defaults,url:"",actorTag:"",materialMode:"normal",materialModes:[["常规","normal"],["科技感","technology"]],offset:[0,0,0],materialParams:{baseColor:[0,.5,1]},cacheBytes:512*1024*1024,materialOverrideMap:{},featureIdLabel:0,splitDirection:"NONE",splitDirectionEnum:[["LEFT","LEFT"],["NONE","NONE"],["RIGHT","RIGHT"]]});let Pt=yr;(n=>{n.createDefaultProps=()=>({...ve.createDefaultProps(),url:"",actorTag:"",materialMode:"normal",highlight:!1,maximumScreenSpaceError:16,highlightID:0,highlightColor:c.reactArray([1,0,0,1]),offset:c.reactArrayWithUndefined(void 0),rotation:c.reactArray([0,0,0]),czmImageBasedLightingFactor:c.reactArray([1,1]),czmEnvironmentMapManager:c.reactJsonWithUndefined(void 0),czmLuminanceAtZenith:2,czmAtmosphereScatteringIntensity:2,czmMaximumMemoryUsage:512,czmClassificationType:"NONE",czmStyleJson:c.reactJson({}),czmBackFaceCulling:!0,czmDebugShowBoundingVolume:!1,czmDebugShowContentBoundingVolume:!1,czmSkipLevelOfDetail:!1,cacheBytes:512*1024*1024,colorBlendMode:"HIGHLIGHT",clippingPlaneEnabled:!0,unionClippingRegions:!0,clippingPlaneEdgeColor:c.reactArray([1,1,1,1]),clippingPlaneEdgeWidth:2,materialParams:{baseColor:[0,.5,1]},allowPicking:!0,materialOverrideMap:c.reactJsonWithUndefined(void 0),featureIdLabel:0,splitDirection:"NONE"})})(Pt||(Pt={})),c.extendClassProps(Pt.prototype,Pt.createDefaultProps);const ji=class ji extends q{constructor(t){super(t);d(this,"_isFlyInCreated",this.dv(c.react(!1)));d(this,"_readyEvent",this.dv(new c.Event));this.collision=!1,this.d(this.createdEvent.don(()=>{setTimeout(()=>{if((this.editing??!1)||!this.position){const i=this.dv(c.createNextAnimateFrameEvent(this.positionChanged,this.editingChanged));this.d(i.donce(()=>{this.editing||!this.position||this.isFlyInCreated&&this.flyTo()}))}else{if(!this.isFlyInCreated)return;this.flyTo()}},1e3)}))}get typeName(){return"ESAlarm"}get defaultProps(){return ji.createDefaultProps()}get isFlyInCreated(){return this._isFlyInCreated.value}set isFlyInCreated(t){this._isFlyInCreated.value=t}get isFlyInCreatedChanged(){return this._isFlyInCreated.changed}get readyEvent(){return this._readyEvent}getESProperties(){const t={...super.getESProperties()};return{...t,basic:[...t.basic,new H("模式","mode",!1,!1,[this,"mode"],ji.defaults.modes,"cylinder"),new S("半径","radius",!1,!1,[this,"radius"],10)]}}getProperties(t){return[...super.getProperties(t),new z("通用","通用",[new H("mode","mode",!1,!1,[this,"mode"],ji.defaults.modes),new S("半径","radius",!1,!1,[this,"radius"])])]}};d(ji,"type",ji.register("ESAlarm",ji,{chsName:"报警",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"警告类"})),d(ji,"defaults",{...q.defaults,modes:[["柱状警告","cylinder"],["圆形警告","circle"]],radius:10,czmAnimations:[{index:0,loop:"REPEAT",animationTime:"(duration) => Date.now() / 1000 / duration * 2"}]});let ho=ji;(n=>{n.createDefaultProps=()=>({...q.createDefaultProps(),mode:"cylinder",radius:10})})(ho||(ho={})),c.extendClassProps(ho.prototype,ho.createDefaultProps);const Qn=class Qn extends q{get typeName(){return"ESApertureEffect"}get defaultProps(){return Qn.createDefaultProps()}constructor(e){super(e),this.collision=!1}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new S("半径","radius",!1,!1,[this,"radius"],1),new H("模式","mode",!1,!1,[this,"mode"],Qn.defaults.modes,Qn.defaults.mode)]}}getProperties(e){return[...super.getProperties(e),new S("半径","radius",!1,!1,[this,"radius"]),new H("模式","mode",!1,!1,[this,"mode"],Qn.defaults.modes,Qn.defaults.mode)]}};d(Qn,"type",Qn.register("ESApertureEffect",Qn,{chsName:"光圈特效",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"光圈特效"})),d(Qn,"defaults",{...q.defaults,radius:1,mode:"scan",modes:[["扫描","scan"],["扩散","diffuse"]]});let fo=Qn;(n=>{n.createDefaultProps=()=>({...q.createDefaultProps(),radius:1,mode:"scan"})})(fo||(fo={})),c.extendClassProps(fo.prototype,fo.createDefaultProps);const en=class en extends le{constructor(t){super(t);d(this,"editingBindMode","circular");this.collision=en.defaults.collision,this.filled=en.defaults.filled,this.stroked=en.defaults.stroked,this.fillStyle=en.defaults.fillStyle,this.strokeStyle=en.defaults.strokeStyle}get typeName(){return"ESGeoPolygon"}get defaultProps(){return en.createDefaultProps()}getESProperties(){const t={...super.getESProperties()};return{...t,coordinate:[...t.coordinate,new S("面积","面积",!1,!0,[this,"area"]),new S("周长","周长",!1,!0,[this,"perimeter"])]}}getProperties(t){return[...super.getProperties(t),new z("ESGeoPolygon","ESGeoPolygon",[new S("面积","面积",!1,!0,[this,"area"]),new S("周长","周长",!1,!0,[this,"perimeter"])])]}};d(en,"type",en.register("ESGeoPolygon",en,{chsName:"地理多边形",tags:["ESObjects"],description:"地理多边形"})),d(en,"supportEditingModes",[...le.supportEditingModes,se.CircularAppend,se.CircularInsert]),d(en,"defaults",{...le.defaults,fillStyle:{color:[1,1,1,.5],material:"",materialParams:{},ground:!1},strokeStyle:{width:1,widthType:"screen",color:[1,1,1,1],material:"",materialParams:{},ground:!1},filled:!0,stroked:!1,collision:!1});let _e=en;(n=>{n.createDefaultProps=()=>({...le.createDefaultProps()})})(_e||(_e={})),c.extendClassProps(_e.prototype,_e.createDefaultProps);const Bn=class Bn extends _e{get typeName(){return"ESAreaMeasurement"}get defaultProps(){return Bn.createDefaultProps()}get fillMaterial(){return this.fillStyle.material}set fillMaterial(e){this.fillStyle={...this.fillStyle,material:e}}get fillMaterialParams(){return this.fillStyle?this.fillStyle.materialParams:Bn.defaults.fillStyle.materialParams}set fillMaterialParams(e){this.fillStyle={...this.fillStyle??Bn.defaults.fillStyle,materialParams:e??Bn.defaults.fillStyle.materialParams}}constructor(e){super(e),this.fillStyle.ground=!0,this.strokeStyle.width=2}getProperties(e){return[...super.getProperties(e)]}};d(Bn,"type",Bn.register("ESAreaMeasurement",Bn,{chsName:"面积测量",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"面积测量"})),d(Bn,"defaults",{..._e.defaults,fillStyle:{color:[1,1,1,1],material:"Material'/EarthSDKForUE/M_ES_Material.M_ES_Material'",materialParams:{Opacity:.4},ground:!1},unitsMode:[["平方米_平方千米","SquareMeter_SquareKilometer"],["亩_公顷","MU_Hectare"],["周长米_周长千米","PerimeterMeter_PerimeterKilometer"]]}),d(Bn,"createDefaultProps",()=>({..._e.createDefaultProps(),stroked:!0,filled:!0,units:c.reactArray(["SquareMeter_SquareKilometer","MU_Hectare","PerimeterMeter_PerimeterKilometer"])}));let vu=Bn;c.extendClassProps(vu.prototype,vu.createDefaultProps);const Na=class Na extends q{get typeName(){return"ESBlastParticleSystem"}get defaultProps(){return Na.createDefaultProps()}constructor(e){super(e)}getESProperties(){return{...{...super.getESProperties()},defaultMenu:"general"}}getProperties(e){return[...super.getProperties(e),new z("通用","通用",[new z("czm","czm",[new Vl("图片","The URI, HTMLImageElement, or HTMLCanvasElement to use for the billboard.",!1,!1,[this,"image"]),new It("偏移","translation",!1,!1,[this,"translation"])])])]}};d(Na,"type",Na.register("ESBlastParticleSystem",Na,{chsName:"粒子爆炸",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"粒子爆炸"})),d(Na,"defaults",{...q.defaults,image:"${earthsdk3-assets-script-dir}/assets/img/smoke.png",translation:[0,0,0]});let po=Na;(n=>{n.createDefaultProps=()=>({...q.createDefaultProps(),image:"${earthsdk3-assets-script-dir}/assets/img/smoke.png",positionEditing:void 0,translation:c.reactArray([0,0,0])})})(po||(po={})),c.extendClassProps(po.prototype,po.createDefaultProps);const Jt=class Jt extends q{get typeName(){return"ESBoxClipping"}get defaultProps(){return{...Jt.createDefaultProps()}}constructor(e){super(e)}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new F("反转","reverse",!1,!1,[this,"reverse"],Jt.defaults.reverse),new It("尺寸","长宽高",!1,!1,[this,"size"],Jt.defaults.size),new J("边框颜色","edgeColor",!1,!1,[this,"edgeColor"],Jt.defaults.edgeColor),new S("边框宽度","edgeWidth",!1,!1,[this,"edgeWidth"],Jt.defaults.edgeWidth),new Z("瓦片图层","targetID",!1,!1,[this,"targetID"],Jt.defaults.targetID)]}}getProperties(e){return[...super.getProperties(e),new z("通用","通用",[new F("reverse","reverse",!1,!1,[this,"reverse"],Jt.defaults.reverse),new J("edgeColor","edgeColor",!1,!1,[this,"edgeColor"],Jt.defaults.edgeColor),new S("edgeWidth","edgeWidth",!1,!1,[this,"edgeWidth"],Jt.defaults.edgeWidth),new It("尺寸","长宽高",!1,!1,[this,"size"],Jt.defaults.size),new Z("targetID","targetID",!1,!1,[this,"targetID"],Jt.defaults.targetID)])]}};d(Jt,"type",Jt.register("ESBoxClipping",Jt,{chsName:"体剖切",tags:["ESObjects","_ES_Impl_Cesium"],description:"体剖切,体裁剪,体裁切,盒裁切"})),d(Jt,"defaults",{...q.defaults,reverse:!1,edgeColor:[1,1,1,1],edgeWidth:1,size:[10,10,10],targetID:""});let go=Jt;(n=>{n.createDefaultProps=()=>({...q.createDefaultProps(),reverse:!1,edgeColor:c.reactArray([1,1,1,1]),edgeWidth:2,size:c.reactArray([10,10,10]),targetID:""})})(go||(go={})),c.extendClassProps(go.prototype,go.createDefaultProps);const es=class es extends q{constructor(){super(...arguments);d(this,"_thumbnail",this.dv(c.react("")));d(this,"_duration",this.dv(c.react(1)));d(this,"_resetWithCurrentCameraEvent",this.dv(new c.Event));d(this,"_captureEvent",this.dv(new c.Event))}get typeName(){return"ESCameraView"}get defaultProps(){return es.createDefaultProps()}get thumbnail(){return this._thumbnail.value}set thumbnail(t){this._thumbnail.value=t}get thumbnailChanged(){return this._thumbnail.changed}get duration(){return this._duration.value}set duration(t){this._duration.value=t}get durationChanged(){return this._duration.changed}flyIn(t=1,r="default"){this.flyInEvent.emit(t,-1,r)}get resetWithCurrentCameraEvent(){return this._resetWithCurrentCameraEvent}resetWithCurrentCamera(){this._resetWithCurrentCameraEvent.emit()}get captureEvent(){return this._captureEvent}capture(t,r){this._captureEvent.emit(t,r)}execOnCreating(){this.resetWithCurrentCamera()}async initByCurrent(){this.resetWithCurrentCamera()}getProperties(t){return[...super.getProperties(t),new z("ESCameraView","ESCameraView",[new ie("设置为当前视角","resetWithCurrentCamera",[],()=>this.resetWithCurrentCamera(),[]),new ie("获取缩略图","获取缩略图",["number","number"],(r,i)=>this.capture(r,i),[es.defaults.thumbnailWidth,es.defaults.thumbnailHeight]),new Z("缩略图","缩略图",!0,!1,[this,"thumbnail"]),new S("飞行时间","飞行时间(秒)",!0,!1,[this,"duration"])])]}};d(es,"type",es.register("ESCameraView",es,{chsName:"视角",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"视角"})),d(es,"defaults",{...q.defaults,thumbnailWidth:64,thumbnailHeight:64,duration:1,thumbnail:""});let Os=es;(n=>{n.createDefaultProps=()=>({...q.createDefaultProps()})})(Os||(Os={})),c.extendClassProps(Os.prototype,Os.createDefaultProps);class fc extends c.Destroyable{constructor(t,r,i){super();d(this,"_view",this.dv(new Os));if(this.d(t.components.disposableAdd(this._view)),this._view.name=(i==null?void 0:i.name)??`视角${t.views.length+1}`,r){const a=this._view,l=r;a.duration=l.duration??1,a.position=l.position,a.rotation=l.rotation??[0,0,0],a.thumbnail=l.thumbnail??"",a.name=l.name}else{const a=(i==null?void 0:i.size)??[64,64];this.d(c.nextAnimateFrame(()=>{this._view.resetWithCurrentCamera(),this._view.capture(a[0],a[1])}))}const s=this._view,o=this.dv(c.createNextAnimateFrameEvent(s.durationChanged,s.positionChanged,s.rotationChanged,s.thumbnailChanged,s.nameChanged));this.d(o.don(()=>t.emitViewsWarpper()))}get view(){return this._view}get viewInfo(){const t=this._view;return{duration:t.duration,position:t.position,rotation:t.rotation,thumbnail:t.thumbnail,name:t.name}}}const _r=class _r extends j{constructor(t){super(t);d(this,"_currentViewIndex",this.dv(c.react(-1)));d(this,"_viewWrappers",this.dv(new c.ObservableArray));d(this,"_currentViewWrapper",this.dv(c.react(void 0)));d(this,"_container",this.dv(c.react(void 0)));this.initProcessing();{const r=()=>{if(!this._currentViewWrapper.value)return;this._viewWrappers.indexOf(this._currentViewWrapper.value)===-1&&(this._currentViewWrapper.value=void 0)};r(),this.d(this._viewWrappers.changedEvent.don(r))}{const r=()=>{const i=this._currentViewWrapper.value;this._currentViewIndex.value=i?this._getIndex(i):-1};r(),this.d(this._viewWrappers.changedEvent.don(r)),this.d(this._currentViewWrapper.changed.don(r))}this.d(()=>{this.clearAllViews()})}get typeName(){return"ESCameraViewCollection"}get defaultProps(){return _r.createDefaultProps()}get json(){return{...this._innerGetJson(),views:this.views}}set json(t){this._innerSetJson(t),this.views=t.views}get currentViewIndex(){return this._currentViewIndex.value}get currentViewIndexChanged(){return this._currentViewIndex.changed}emitViewsWarpper(){this._viewWrappers.changedEvent.emit(this._viewWrappers)}get container(){return this._container.value}get containerChanged(){return this._container.changed}set container(t){this._container.value=t}get views(){return qh(this._viewWrappers,t=>t.viewInfo)}get viewsChanged(){return this._viewWrappers.changedEvent}set views(t){if(t.length===this._viewWrappers.length){const r=this._viewWrappers;if(t.every((i,s)=>{const o=r.get(s).view;return i.duration===o.duration&&Cc(i.position,o.position)&&Cc(i.rotation,o.rotation)&&i.thumbnail===o.thumbnail&&i.name===o.name}))return}this.clearAllViews();for(let r of t)this._viewWrappers.push(new fc(this,r))}_getIndex(t){return this._viewWrappers.indexOf(t)}clearAllViews(){for(let t of this._viewWrappers)t.destroy();this._viewWrappers.length=0}add(t=`视角${this.views.length+1}`,r=[64,64]){this._viewWrappers.push(new fc(this,void 0,{name:t,size:r}))}update(t,r,i=[64,64]){if(t>=this._viewWrappers.length||t<0)return console.warn("index >= this._viewWrappers.length || index < 0"),!1;const s=this._viewWrappers.get(t);return r&&(s.view.name=r),s.view.resetWithCurrentCamera(),s.view.capture(i[0],i[1]),!0}addView(){this._viewWrappers.push(new fc(this))}insertView(t){if(this._viewWrappers.length+1<=t||t<0){console.error("this._views.length <= index || index < 0");return}this._viewWrappers.splice(t,0,new fc(this))}setCurrentView(t){if(t>=this._viewWrappers.length||t<0)return console.warn("index >= this._viewWrappers.length || index < 0"),!1;const r=this._viewWrappers.get(t);return this._currentViewWrapper.value=r,!0}resetView(t){if(t>=this._viewWrappers.length||t<0){console.warn("index >= this._viewWrappers.length || index < 0");return}const r=this._viewWrappers.get(t);r.view.resetWithCurrentCamera(),r.view.capture()}resetViewName(t,r){if(t>=this._viewWrappers.length||t<0){console.warn("index >= this._viewWrappers.length || index < 0");return}const i=this._viewWrappers.get(t);i.view.name=r}updateView(t,r){if(t>=this._viewWrappers.length||t<0)return console.warn("index >= this._viewWrappers.length || index < 0"),!1;const i=this._viewWrappers.get(t);return i.view.position=r.position,i.view.rotation=r.rotation??[0,0,0],i.view.duration=r.duration??1,i.view.thumbnail=r.thumbnail??"",i.view.name=r.name??"",!0}flyToView(t){if(this.setCurrentView(t)){if(!this._currentViewWrapper.value)throw new Error("this._currentViewWrapper.value");const r=this._currentViewWrapper.value.view.duration;this._currentViewWrapper.value.view.flyIn(r,this.flyMode??_r.defaults.flyMode)}}flyToPrevView(){const t=this._currentViewWrapper.value;if(!t)return this.flyToView(0),!0;const r=this._getIndex(t);return this.loop??_r.defaults.loop?(this.flyToView((this._viewWrappers.length+r-1)%this._viewWrappers.length),!0):r-1<0?!1:(this.flyToView(r-1),!0)}moveToPreView(){const t=this._currentViewWrapper.value;if(!t)return;const r=this._getIndex(t);if(r===0)return;const i=this._viewWrappers.splice(r-1,1,t)[0];this._viewWrappers.set(r,i)}moveToNextView(){const t=this._currentViewWrapper.value;if(!t)return;const r=this._getIndex(t);if(r===this._viewWrappers.length-1)return;const i=this._viewWrappers.splice(r+1,1,t)[0];this._viewWrappers.set(r,i)}flyToNextView(){const t=this._currentViewWrapper.value;if(!t)return this.flyToView(0),!0;const r=this._getIndex(t);return this.loop??_r.defaults.loop?(this.flyToView((r+1)%this._viewWrappers.length),!0):r+1>this._viewWrappers.length-1?!1:(this.flyToView(r+1),!0)}stop(){this._currentViewWrapper.value=void 0,this.playing=!1}deleteView(t){if(t<0||t>=this._viewWrappers.length){console.warn("index < 0 || index >= this._viewWrappers.length");return}this._viewWrappers.get(t).destroy(),this._viewWrappers.splice(t,1)}deleteCurrentView(){const t=this._currentViewWrapper.value;if(!t){console.warn("!this._currentViewWrapper.value");return}const r=this._getIndex(t);if(r===-1){console.warn("index === -1");return}this.deleteView(r)}transitionImageUrl(t){return j.context.getStrFromEnv(t)}_flyStep(t){var o;if(!this.flyToNextView())return this.playing=!1,Promise.resolve();const r=this.intervalTime??_r.defaults.intervalTime,s=((((o=this._currentViewWrapper.value)==null?void 0:o.viewInfo.duration)??0)+r)*1e3;return t.promise(c.sleep(s)).then(()=>this._flyStep(t))}initProcessing(){const t=this.dv(c.createProcessingFromAsyncFunc(async i=>this._flyStep(i))),r=()=>{this.playing?t.restart():t.cancel()};r(),this.d(this.playingChanged.don(r))}getProperties(t){return[...super.getProperties(t),new z("ESCameraViewCollection","ESCameraViewCollection",[new H("飞行模式","flyMode",!1,!1,[this,"flyMode"],_r.defaults.flyModes,_r.defaults.flyMode),new ie("添加视角","添加视角",[],()=>this.addView(),[]),new ie("插入视角","插入视角",["number"],r=>this.insertView(r),[0]),new ie("清空所有视角","清空所有视角",[],()=>this.clearAllViews(),[]),new ie("当前位置插入视角","当前位置插入视角",[],()=>this.insertView(this.currentViewIndex+1),[]),new ie("上一个视角","上一个视角",[],()=>this.flyToPrevView(),[]),new ie("下一个视角","下一个视角",[],()=>this.flyToNextView(),[]),new ie("当前视角移动到上一个视角","当前视角移动到上一个视角",[],()=>this.moveToPreView(),[]),new ie("当前视角移动到下一个视角","当前视角移动到下一个视角",[],()=>this.moveToNextView(),[]),new ie("飞入指定视角","飞入指定视角",["number"],r=>this.flyToView(r),[0]),new ie("设置当前视角","设置当前视角",["number"],r=>this.setCurrentView(r),[0]),new ie("删除当前视角","删除当前视角",[],()=>this.deleteCurrentView(),[]),new ie("删除指定视角","删除指定视角",["number"],r=>this.deleteView(r),[0]),new ie("重置视角","重置视角",["number"],r=>this.resetView(r),[0]),new S("当前序号","当前序号",!1,!0,[this,"currentViewIndex"]),new zh("播放","播放",[this,"playing"],()=>this.stop(),[this,"loop"],_r.defaults),new F("是否播放","是否播放.",!1,!1,[this,"playing"]),new ie("停止","停止",[],()=>this.stop(),[]),new F("是否循环","是否循环.",!1,!1,[this,"loop"]),new S("间隔时间","间隔时间(s)",!1,!1,[this,"intervalTime"]),new U("视角集合","类型为ESJViewInfo[]",!0,!1,[this,"views"],_r.defaults.views)])]}};d(_r,"type",_r.register("ESCameraViewCollection",_r,{chsName:"视角集合",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"视角集合"})),d(_r,"defaults",{...j.defaults,loop:!0,playing:!1,intervalTime:5,duration:1,views:[],flyMode:"default",flyModes:[["默认","default"],["直线飞行","uniform"]]});let Ms=_r;(n=>{n.createDefaultProps=()=>({...j.createDefaultProps(),playing:!1,loop:!0,intervalTime:5,flyMode:"default"})})(Ms||(Ms={})),c.extendClassProps(Ms.prototype,Ms.createDefaultProps);const ba=class ba extends q{constructor(t){super(t);d(this,"editingBindMode","doublePoints")}get typeName(){return"ESCameraVisibleRange"}get defaultProps(){return ba.createDefaultProps()}getESProperties(){const t={...super.getESProperties()};return{...t,basic:[...t.basic,new S("宽高比","aspectRatio",!1,!1,[this,"aspectRatio"],1.77778),new S("横向夹角","fov",!1,!1,[this,"fov"],90),new S("视野长度","far",!1,!1,[this,"far"],100),new S("近面距离","near",!1,!1,[this,"near"],5)]}}getProperties(t){return[...super.getProperties(t),new S("横向夹角","fov",!1,!1,[this,"fov"]),new S("宽高比","aspectRatio",!1,!1,[this,"aspectRatio"]),new S("视野长度","far",!1,!1,[this,"far"]),new S("近面距离","near",!1,!1,[this,"near"])]}};d(ba,"type",ba.register("ESCameraVisibleRange",ba,{chsName:"摄像头可视域",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"摄像头可视域"})),d(ba,"defaults",{...q.defaults,fov:90,aspectRatio:1.77778,far:100,near:5,collision:!1});let mo=ba;(n=>{n.createDefaultProps=()=>({...q.createDefaultProps(),fov:90,aspectRatio:1.77778,far:100,near:5,collision:!1})})(mo||(mo={})),c.extendClassProps(mo.prototype,mo.createDefaultProps);const ts=class ts extends q{get typeName(){return"ESCar"}get defaultProps(){return ts.createDefaultProps()}constructor(e){super(e)}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new H("模式","mode",!1,!1,[this,"mode"],ts.defaults.modeEnum,"policeCar")]}}getProperties(e){return[...super.getProperties(e),new z("通用","通用",[new H("mode","mode",!1,!1,[this,"mode"],ts.defaults.modeEnum)])]}};d(ts,"type",ts.register("ESCar",ts,{chsName:"车辆",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"警车等基础车辆模型"})),d(ts,"defaults",{...q.defaults,modeEnum:[["警车","policeCar"]],mode:"policeCar"});let vo=ts;(n=>{n.createDefaultProps=()=>({...q.createDefaultProps(),mode:"policeCar",allowPicking:!0})})(vo||(vo={})),c.extendClassProps(vo.prototype,vo.createDefaultProps);const Fs=class Fs extends le{constructor(t){super(t);d(this,"editingBindMode","circular");this.fillGround=!0}get typeName(){return"ESClassification"}get defaultProps(){return Fs.createDefaultProps()}getESProperties(){const t={...super.getESProperties()};return{...t,basic:[...t.basic,new S("高度","高度",!1,!1,[this,"height"],10)],coordinate:[...t.coordinate,new S("面积","面积",!1,!0,[this,"area"]),new S("周长","周长",!1,!0,[this,"perimeter"])]}}getProperties(t){return[...super.getProperties(t),new z("通用","通用",[new S("高度","高度",!1,!1,[this,"height"])])]}};d(Fs,"type",Fs.register("ESClassification",Fs,{chsName:"倾斜单体化",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"平尾箭头"})),d(Fs,"supportEditingModes",[...le.supportEditingModes,se.CircularAppend,se.CircularInsert,se.HeightModify]),d(Fs,"defaults",{...le.defaults,fillStyle:{material:"",materialParams:{},ground:!0,color:[1,1,1,1]},filled:!0});let xs=Fs;(n=>{n.createDefaultProps=()=>({...le.createDefaultProps(),height:10,filled:!0})})(xs||(xs={})),c.extendClassProps(xs.prototype,xs.createDefaultProps);const Oa=class Oa extends q{get typeName(){return"ESClippingPlane"}get defaultProps(){return Oa.createDefaultProps()}constructor(e){super(e)}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new F("显示箭头","显示箭头",!1,!1,[this,"showArrow"],!0),new J("线框颜色","edgeColor",!1,!1,[this,"edgeColor"],[1,1,1,1]),new S("线框宽度","edgetWidth",!1,!1,[this,"edgetWidth"],2),new S("裁剪宽度","width",!1,!1,[this,"width"],200),new S("裁剪高度","height",!1,!1,[this,"height"],200),new Z("瓦片图层","targetID",!1,!1,[this,"targetID"],"")]}}getProperties(e){return[...super.getProperties(e),new z("通用","通用",[new z("czm","czm",[new F("显示箭头","显示箭头",!1,!1,[this,"showArrow"]),new J("edgeColor","edgeColor",!1,!1,[this,"edgeColor"]),new S("edgetWidth","edgetWidth",!1,!1,[this,"edgetWidth"]),new S("width","width",!1,!1,[this,"width"]),new S("height","height",!1,!1,[this,"height"]),new Z("targetID","targetID",!1,!1,[this,"targetID"])])])]}};d(Oa,"type",Oa.register("ESClippingPlane",Oa,{chsName:"裁切",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"ESClippingPlane"})),d(Oa,"defaults",{...q.defaults});let yo=Oa;(n=>{n.createDefaultProps=()=>({...q.createDefaultProps(),showArrow:!0,edgeColor:c.reactArray([1,1,1,1]),edgetWidth:2,width:200,height:200,targetID:""})})(yo||(yo={})),c.extendClassProps(yo.prototype,yo.createDefaultProps);class Ry extends c.Destroyable{constructor(e,t,r){super();const i=document.createElement("div");i.setAttribute("xe2-div",`ESCustomDiv(${t.id})(viewer: ${r.id}) container`);{const l=()=>{const h=` ${t.cssText}
46
- ${t.cssAllInitial?"all: initial;":""}
47
- ${t.show?"":"display: none"}
48
- `;i.style.cssText=h};l();const u=this.dv(c.createNextAnimateFrameEvent(t.cssAllInitialChanged,t.cssTextChanged,t.showChanged));this.d(u.don(l))}e.appendChild(i),this.d(()=>e.removeChild(i));const s=this.dv(c.createNextAnimateFrameEvent(t.instanceClassChanged,t.containerChanged,t.shadowDomChanged)),o=this.dv(new c.ObjResettingWithEvent(s,()=>{const{instanceClass:l,container:u}=t;if(!l||u)return;let h=i;if(i.firstElementChild&&i.removeChild(i.firstElementChild),t.shadowDom){const f=i.appendChild(document.createElement("div"));f.setAttribute("xe2-div",`ESCustomDiv(${t.id})(viewer: ${r.id}) container shadowDiv`),h=f.attachShadow({mode:"open"}).appendChild(document.createElement("div")),h.setAttribute("xe2-div",`ESCustomDiv(${t.id})(viewer: ${r.id}) container shadowDiv div`)}return new l(h,t,r)})),{_updateEvent:a}=t;this.d(a.don(l=>{if(o.obj)try{l(o.obj,t,r)}catch(u){console.error(`ESCustomDiv update error! ${u}`)}}))}}const vp=`class MyDiv {
45
+ `,Fe=class Fe extends h.Destroyable{constructor(){super();d(this,"_ratio",this.dv(h.react(0)));d(this,"_subPlayers",this.dv(new h.ObservableArray));const e=this.dv(new h.Player);{const o=()=>{e.loop=this.loop??Fe.defaults.loop};o(),this.d(this.loopChanged.don(o))}{const o=()=>{(this.loop??Fe.defaults.loop)!==e.loop&&(this.loop=e.loop)};o(),this.d(e.loopChangedEvent.don(o))}{const o=()=>{e.currentTime=this.currentTime??Fe.defaults.currentTime};o(),this.d(this.currentTimeChanged.don(o))}{const o=()=>{(this.currentTime??Fe.defaults.currentTime)!==e.currentTime&&(this.currentTime=e.currentTime)};o(),this.d(e.currentTimeChangedEvent.don(o))}{const o=()=>{e.duration=this.duration??Fe.defaults.duration};o(),this.d(this.durationChanged.don(o))}{const o=()=>{(this.duration??Fe.defaults.duration)!==e.duration&&(this.duration=e.duration)};o(),this.d(e.durationChangedEvent.don(o))}{const o=()=>{e.speed=this.speed??Fe.defaults.speed};o(),this.d(this.speedChanged.don(o))}{const o=()=>{(this.speed??Fe.defaults.speed)!==e.speed&&(this.speed=e.speed)};o(),this.d(e.speedChangedEvent.don(o))}{const o=()=>{e.playing=this.playing??Fe.defaults.playing};o(),this.d(this.playingChanged.don(o))}{const o=()=>{(this.playing??Fe.defaults.playing)!==e.playing&&(this.playing=e.playing)};o(),this.d(e.playingChangedEvent.don(o))}const r=()=>{const o=this.duration??Fe.defaults.duration;o>0&&(this._ratio.value=(this.currentTime??Fe.defaults.currentTime)/o)};r();const i=this.dv(h.createNextAnimateFrameEvent(this.currentTimeChanged,this.durationChanged));this.d(i.don(r)),this.d(()=>{const{length:o}=this._subPlayers;for(let a=0;a<o;++a)this._subPlayers.get(a).destroy();this._subPlayers.length=0});const s=()=>{for(let a of this._subPlayers)a.destroy();if(this._subPlayers.length=0,!this.channels)return;const o=this.channels.map(a=>{const[u,l,c]=a;return new Dy(u,l,c,this)});this._subPlayers.splice(0,0,...o)};s(),this.d(this.channelsChanged.don(s))}get ratio(){return this._ratio.value}set ratio(e){Math.abs(this._ratio.value-e)<.001||(this.currentTime=(this.duration??Fe.defaults.duration)*e)}get ratioChanged(){return this._ratio.changed}};d(Fe,"defaults",{loop:!1,currentTime:0,duration:3e3,speed:1,playing:!1,channels:!0,ratio:0}),d(Fe,"channelsReadMe",My);let Dn=Fe;(n=>{n.createDefaultProps=()=>({loop:!1,currentTime:0,duration:3e3,speed:1,playing:!1,channels:h.reactDeepArrayWithUndefined(void 0,(t,e)=>t==null?void 0:t.every((r,i)=>r===e[i]),t=>[...t])})})(Dn||(Dn={})),h.extendClassProps(Dn.prototype,Dn.createDefaultProps);class pc extends h.Destroyable{constructor(e){super();d(this,"_sceneObject",this.dv(h.react(void 0)));this._id=e,this.d(()=>{this._sceneObject.value=void 0});const r=$.getSceneObjById(this._id);r&&(this._sceneObject.value=r),this.d($.context.sceneObjCreatedEvent.don(i=>{i.id===this._id&&(this._sceneObject.value=i)})),this.d($.context.sceneObjToDestroyEvent.don(i=>{i.id===this._id&&(this._sceneObject.value=void 0)}))}get sceneObject(){return this._sceneObject.value}get sceneObjectChanged(){return this._sceneObject.changed}get id(){return this._id}}class xy extends h.Destroyable{constructor(e,r){super();d(this,"_sofi");this._id=e,this._sofi=this.dv(new pc(this._id));{const i=()=>{r.sceneObject=this._sofi.sceneObject};i(),this.d(this._sofi.sceneObjectChanged.don(i))}}}class Ly extends h.Destroyable{constructor(){super();d(this,"_id",this.dv(h.react(void 0)));d(this,"_sceneObject",this.dv(h.react(void 0)));d(this,"_resetting",this.dv(new h.ObjResettingWithEvent(this.idChanged,()=>{const{id:e}=this;if(e===void 0||e===""){this.sceneObject=void 0;return}return new xy(e,this)})))}get id(){return this._id.value}get idChanged(){return this._id.changed}set id(e){this._id.value=e}get sceneObject(){return this._sceneObject.value}get sceneObjectChanged(){return this._sceneObject.changed}set sceneObject(e){this._sceneObject.value=e}get resetting(){return this._resetting}}class Ay extends h.Destroyable{constructor(t,e,r,i){super(),this.disposeVar(new h.ObjResettingWithEvent(t.sceneObjectChanged,()=>{let s;i.debug&&console.log("正在获取Event事件...");const o=t.sceneObject;if(o&&e){const a=e.split(".");if(a.length===0)i.debug&&console.warn("propNames.length === 0");else{let u=h.pluckProperty(o,!1,...a);(!u||!(u instanceof h.Event))&&(a[a.length-1]=a[a.length-1]+"Changed",i.debug&&console.warn(`event未能获取,那么将属性名的最后一项加上Changed(${a[a.length-1]})再试试!`),u=h.pluckProperty(o,!1,...a),i.debug&&u&&console.warn("event仍然获取不到!")),u?u instanceof h.Event?(s=u,i.debug&&console.log(`Event获取成功 propChangedName: ${e}`,s)):i.debug&&console.warn(`the prop is not event from ${o.id}-${o.name}-${o.ref}-${e}`):i.debug&&console.warn(`cannot get changed from ${o.id}-${o.name}-${o.ref}-${e}`)}}if(s){const a=new h.Destroyable;return a.d(s.dwon(()=>r.emit())),a}else{i.debug&&console.log(`未获取到Event!propChangedName: ${e}`);return}}))}}let Ry=class extends h.Destroyable{constructor(e,r,i){super();d(this,"_doEvalEvent",this.dv(new h.Event));const s=this._doEvalEvent,o=this.disposeVar(h.createNextAnimateFrameEvent(s)),a=e.map(([u,l])=>{const c=new pc(u),f=l&&new Ay(c,l,s,r)||void 0;return[c,f]});this.d(()=>{a.forEach(([u,l])=>{l==null||l.destroy(),u.destroy()}),a.length=0}),this.d(s.don(()=>{const{evalMode:u="NextAnimateFrame",evalOnlyWhenObjsAllExist:l=!0}=r;if(u==="Immediate"){const c=a.map(([f])=>f.sceneObject);(!l||c.every(f=>f!==void 0))&&i(c)}})),this.d(o.don(()=>{const{evalMode:u="NextAnimateFrame",evalOnlyWhenObjsAllExist:l=!0}=r;if(u==="NextAnimateFrame"){const c=a.map(([f])=>f.sceneObject);(!l||c.every(f=>f!==void 0))&&i(c)}}))}forceExecute(){this._doEvalEvent.emit()}};const wp=Object.freeze(Object.defineProperty({__proto__:null,WatcherObjects:Ry},Symbol.toStringTag,{value:"Module"})),{WatcherObjects:Fy}=wp;class Ha extends h.Destroyable{constructor(){super();d(this,"_evalFunc");d(this,"_forceExecute",new h.Event);const e=this.dv(h.react(void 0)),r=()=>{try{e.value=this.evalFuncStr&&Function('"use strict";return ('+this.evalFuncStr+")")(),this.debug&&console.log("evalFunc成功构建",e.value)}catch(o){console.error(`evalFunc get error! ${o}`),e.value=void 0}};r(),this.dispose(this.evalFuncStrChanged.disposableOn(r));const i=o=>{this.enabled&&(this.debug&&console.log("执行evalFunc..."),this._evalFunc&&this._evalFunc(o),e.value&&e.value(o))},s=this.disposeVar(new h.ObjResettingWithEvent(this.objIdAndPropChangedNamesChanged,()=>{if(this.objIdAndPropChangedNames.length>0)return this.debug&&console.log("监视对象发生变化,重新创建WatcherObjects"),new Fy(this.objIdAndPropChangedNames,this,i)}));this.dispose(this._forceExecute.disposableOn(()=>{var o;(o=s.obj)==null||o.forceExecute()}))}get evalFunc(){return this._evalFunc}set evalFunc(e){this._evalFunc=e}forceExecute(){this._forceExecute.emit()}}(n=>{n.createDefaultProps=()=>({enabled:!1,objIdAndPropChangedNames:h.reactDeepArray([],(t,e)=>t[0]===e[0]&&t[1]===e[1],t=>[t[0],t[1]]),evalFuncStr:"",evalMode:"NextAnimateFrame",evalOnlyWhenObjsAllExist:!0,debug:!1,name:"未命名场景对象",ref:void 0,extras:h.reactJson(void 0),devTags:h.reactArrayWithUndefined(void 0),execOnceFuncStr:void 0,updateFuncStr:void 0,toDestroyFuncStr:void 0})})(Ha||(Ha={})),h.extendClassProps(Ha.prototype,Ha.createDefaultProps);function ky(n,t,e){var i;((i=t.attachedViewers.values().toArray()[0])==null?void 0:i.getEngineObject(t))?e.call(n):n.dispose(t.createdEvent.don(()=>e.call(n)))}function Ep(n){let t=0;function e(r,i){i++,t=Math.max(i,t),r.forEach(s=>{Array.isArray(s)&&e(s,i)})}return e(n,0),t}const ri=class ri extends Rt{constructor(e){super(e);d(this,"editingBindMode","lineString");d(this,"_area",this.dv(h.react(0)));d(this,"_perimeter",this.dv(h.react(0)));const r=()=>{this._updateArea(),this._updatePerimeter()};r(),this.d(this.pointsChanged.don(r))}updateEditing(){var r;const e=[];this.editingBindMode=="doublePoints"?e.push(B.DoublePointsAppend,B.DoublePointsModify):this.editingBindMode=="lineString"?e.push(B.LineStringAppend,B.LineStringInsert,B.Translation):this.editingBindMode=="circular"?(e.push(B.CircularAppend,B.CircularInsert,B.Translation),this.supportEditingModes().includes(B.HeightModify)&&e.push(B.HeightModify)):this.editingBindMode=="visibility"?e.push(B.VisibilityAppend,B.VisibilityModify):this.editingBindMode=="scatter"&&e.push(B.ScatterAppend,B.ScatterModify),(r=this.activeViewer)==null||r.startEditing(this,e,{callSource:"inner"})}get area(){return this._area.value}get areaChanged(){return this._area.changed}get perimeter(){return this._perimeter.value}get perimeterChanged(){return this._perimeter.changed}_updateArea(){this._area.value=this.getArea()??0}_updatePerimeter(){this._perimeter.value=this.getPerimeter()??0}getArea(){if(this.points&&this.points.length>=3)return _l([...this.points])}getDistance(){if(this.points&&this.points.length>=2){const e=Xa(this.points,"GEODESIC");return e[e.length-1]}else return}getPerimeter(){if(this.points&&this.points.length>=3){const e=[...this.points,this.points[0]],r=Xa(e,"GEODESIC");return r[r.length-1]}else return}getIntersect(e){if(this.points&&this.points.length>=3&&e.length>=3){const r=jd(this.points,e);if(!r)return;const i=r[0][0][0];if(Array.isArray(i)){const s=[...r],o=[];return s.forEach(a=>{const u=a[0].map(l=>[...l,0]);o.push(u)}),o}else return[[...r][0].map(a=>[...a,0])]}else return}getUnion(e){if(this.points&&this.points.length>=3&&e.length>=3){const r=tp(this.points,e);if(!r)return;const i=r[0][0][0];if(Array.isArray(i)){const s=[...r],o=[];return s.forEach(a=>{const u=a[0].map(l=>[...l,0]);o.push(u)}),o}else return[[...r][0].map(a=>[...a,0])]}else return}getDifference(e){if(this.points&&this.points.length>=3&&e.length>=3){let r=[...e];const i=e[0],s=e[e.length-1];i[0]===s[0]&&i[1]===s[1]&&i[2]===s[2]||r.push(i);const o=rp([...this.points,this.points[0]],[...r]);if(!o)return{status:"undefined",positions:void 0};const a=[...o];if(Ep(a)===3){const u=a.map(p=>p.map(v=>[...v,0]));if(u.length<=1)return{status:"notIncluded",positions:u};const l=u[0],c=u[1];return oc([...l],[...c])==="oneBig"?{status:"included",positions:u}:{status:"notIncluded",positions:u}}else if(Ep(a)===4){const l=[...a.map(f=>f.map(p=>p.map(v=>[...v,0])))],c=[];return l.forEach(f=>{c.push(f[0])}),{status:"notIncluded",positions:c}}else return{status:"undefined",positions:void 0}}else return{status:"undefined",positions:void 0}}getBuffer(e=500,r){if(this.points&&this.points.length>=2){const i=ep(this.points,e,r);return i?[i[0].map(s=>[...s,0])]:void 0}else return}geoPolygonOverlap(e){if(this.points&&this.points.length>=3&&e.length>=3){const r=oc(this.points,e);return r==="oneBig"?!0:r==="twoBig"?!1:void 0}else return}getESProperties(){const e={...super.getESProperties()};return{...e,defaultMenu:"style",coordinate:[...e.coordinate,new W([this,"editing"],"编辑",!1),new Q([this,"points"],"位置数组",ri.defaults.points,void 0,!0)],style:[...e.style,new rt([],"点样式"),new W([this,"pointed"],"开启",!1),new L([this,"pointSize"],"点大小",1),new pt([this,"pointSizeType"],[["screen","screen"],["world","world"]],"点类型","screen"),new _t([this,"pointColor"],"点颜色",[1,1,1,1]),new _t([this,"pointOutlineColor"],"轮廓颜色",ri.defaults.pointStyle.outlineColor),new L([this,"pointOutlineWidth"],"轮廓宽度",ri.defaults.pointStyle.outlineWidth),new rt([],"线样式"),new W([this,"stroked"],"开启线样式",!0),new W([this,"strokeGround"],"贴地",!1),new L([this,"strokeWidth"],"线宽",1),new pt([this,"strokeWidthType"],[["screen","screen"],["world","world"]],"线类型","screen"),new _t([this,"strokeColor"],"线颜色",[1,1,1,1]),new rt([],"面样式"),new W([this,"filled"],"开启",!1),new W([this,"fillGround"],"贴地",!1),new _t([this,"fillColor"],"填充颜色",[1,1,1,1])],more:[...e.more,new rt([],"点样式集合"),new ot([this,"pointMaterial"],"点材质"),new Q([this,"pointMaterialParams"],"点材质参数"),new rt([],"线样式集合"),new ot([this,"strokeMaterial"],"线材质"),new Q([this,"strokeMaterialParams"],"线材质参数"),new rt([],"面样式集合"),new ot([this,"fillMaterial"],"面材质"),new Q([this,"fillMaterialParams"],"面材质参数")]}}get pointSize(){return this.pointStyle.size}set pointSize(e){this.pointStyle={...this.pointStyle,size:e}}get pointSizeChanged(){return this.pointStyleChanged}get pointSizeType(){return this.pointStyle.sizeType}set pointSizeType(e){this.pointStyle={...this.pointStyle,sizeType:e}}get pointSizeTypeChanged(){return this.pointStyleChanged}get pointColor(){return this.pointStyle.color}set pointColor(e){this.pointStyle={...this.pointStyle,color:[...e]}}get pointColorChanged(){return this.pointStyleChanged}get pointOutlineColor(){return this.pointStyle.outlineColor}set pointOutlineColor(e){this.pointStyle={...this.pointStyle,outlineColor:[...e]}}get pointOutlineColorChanged(){return this.pointStyleChanged}get pointOutlineWidth(){return this.pointStyle.outlineWidth}set pointOutlineWidth(e){this.pointStyle={...this.pointStyle,outlineWidth:e}}get pointOutlineWidthChanged(){return this.pointStyleChanged}get pointMaterial(){return this.pointStyle.material}set pointMaterial(e){this.pointStyle={...this.pointStyle,material:e}}get pointMaterialChanged(){return this.pointStyleChanged}get pointMaterialParams(){return this.pointStyle.materialParams}set pointMaterialParams(e){this.pointStyle={...this.pointStyle,materialParams:e}}get pointMaterialParamsChanged(){return this.pointStyleChanged}get strokeWidth(){return this.strokeStyle.width}set strokeWidth(e){this.strokeStyle={...this.strokeStyle,width:e}}get strokeWidthChanged(){return this.strokeStyleChanged}get strokeWidthType(){return this.strokeStyle.widthType}set strokeWidthType(e){this.strokeStyle={...this.strokeStyle,widthType:e}}get strokeWidthTypeChanged(){return this.strokeStyleChanged}get strokeColor(){return this.strokeStyle.color}set strokeColor(e){this.strokeStyle={...this.strokeStyle,color:[...e]}}get strokeColorChanged(){return this.strokeStyleChanged}get strokeMaterial(){return this.strokeStyle.material}set strokeMaterial(e){this.strokeStyle={...this.strokeStyle,material:e}}get strokeMaterialChanged(){return this.strokeStyleChanged}get strokeMaterialParams(){return this.strokeStyle.materialParams}set strokeMaterialParams(e){this.strokeStyle={...this.strokeStyle,materialParams:e}}get strokeMaterialParamsChanged(){return this.strokeStyleChanged}get strokeGround(){return this.strokeStyle.ground}set strokeGround(e){this.strokeStyle={...this.strokeStyle,ground:e}}get strokeGroundChanged(){return this.strokeStyleChanged}get fillColor(){return this.fillStyle.color}set fillColor(e){this.fillStyle={...this.fillStyle,color:[...e]}}get fillColorChanged(){return this.fillStyleChanged}get fillMaterial(){return this.fillStyle.material}set fillMaterial(e){this.fillStyle={...this.fillStyle,material:e}}get fillMaterialChanged(){return this.fillStyleChanged}get fillMaterialParams(){return this.fillStyle.materialParams}set fillMaterialParams(e){this.fillStyle={...this.fillStyle,materialParams:e}}get fillMaterialParamsChanged(){return this.fillStyleChanged}get fillGround(){return this.fillStyle.ground}set fillGround(e){this.fillStyle={...this.fillStyle,ground:e}}get fillGroundChanged(){return this.fillStyleChanged}};d(ri,"createDefaultProps",()=>({...Rt.createDefaultProps(),pointed:!1,pointStyle:h.reactJson({size:10,sizeType:"screen",color:[1,1,1,1],material:"",materialParams:{},outlineColor:[1,0,0,1],outlineWidth:2}),stroked:!1,strokeStyle:h.reactJson({width:1,widthType:"screen",color:[1,1,1,1],material:"",materialParams:{},ground:!1}),filled:!1,fillStyle:h.reactJson({color:[1,1,1,1],material:"",materialParams:{},ground:!1}),points:h.reactPositions(void 0)})),d(ri,"type",ri.register("ESGeoVector",ri,{chsName:"地理矢量",tags:["ESObjects"],description:"地理矢量"})),d(ri,"supportEditingModes",[...Rt.supportEditingModes,B.Translation]);let yt=ri;const Rs=class Rs extends Rt{constructor(){super(...arguments);d(this,"_statusDis",this.dv(h.react(!0)));d(this,"_smoothMoveEvent",this.dv(new h.Event));d(this,"_smoothMoveWithRotationEvent",this.dv(new h.Event));d(this,"_smoothMoveOnGroundEvent",this.dv(new h.Event));d(this,"_smoothMoveWithRotationOnGroundEvent",this.dv(new h.Event));d(this,"_automaticLandingEvent",this.dv(new h.Event));d(this,"_smoothMoveKeepPitchEvent",this.dv(new h.Event));d(this,"_smoothMoveRelativelyEvent",this.dv(new h.Event));d(this,"_smoothMoveRelativelyWithRotationEvent",this.dv(new h.Event));d(this,"useCalcFlyToParamInESObjectWithLocation",!0)}updateEditing(){var r;const e=[];this.editingBindMode=="singlePoint"?(e.push(B.Place,B.Translation),["ESLocationMeasurement"].includes(this.typeName)||e.push(B.Rotation),["ESClippingPlane","ESLocationMeasurement","ESLocalRectangle","ESBoxClipping"].includes(this.typeName)||e.push(B.Scale)):this.editingBindMode=="doublePoints"&&e.push(B.DoublePointsAppend,B.DoublePointsModify),(r=this.activeViewer)==null||r.startEditing(this,e,{callSource:"inner"})}get statusDis(){return this._statusDis.value}get statusDisChanged(){return this._statusDis.changed}get smoothMoveEvent(){return this._smoothMoveEvent}smoothMove(e,r){this._smoothMoveEvent.emit(e,r)}get smoothMoveWithRotationEvent(){return this._smoothMoveWithRotationEvent}smoothMoveWithRotation(e,r,i){this._smoothMoveWithRotationEvent.emit(e,r,i)}get smoothMoveOnGroundEvent(){return this._smoothMoveOnGroundEvent}smoothMoveOnGround(e,r,i,s){this._smoothMoveOnGroundEvent.emit(e,r,i,s)}get smoothMoveWithRotationOnGroundEvent(){return this._smoothMoveWithRotationOnGroundEvent}smoothMoveWithRotationOnGround(e,r,i,s,o){this._smoothMoveWithRotationOnGroundEvent.emit(e,r,i,s,o)}get automaticLandingEvent(){return this._automaticLandingEvent}automaticLanding(){const e=this.collision;this.collision=!1,setTimeout(()=>{this._automaticLandingEvent.emit(e)},100)}get smoothMoveKeepPitchEvent(){return this._smoothMoveKeepPitchEvent}smoothMoveKeepPitch(e,r){this._smoothMoveKeepPitchEvent.emit(e,r)}get smoothMoveRelativelyEvent(){return this._smoothMoveRelativelyEvent}smoothMoveRelatively(e,r){this._smoothMoveRelativelyEvent.emit(e,r)}get smoothMoveRelativelyWithRotationEvent(){return this._smoothMoveRelativelyWithRotationEvent}smoothMoveRelativelyWithRotation(e,r,i){this._smoothMoveRelativelyWithRotationEvent.emit(e,r,i)}getESProperties(){const e={...super.getESProperties()};return{...e,defaultMenu:"basic",location:[...e.location,new W([this,"editing"],"是否编辑"),new nt([],()=>this.automaticLanding(),[],"自动落地"),new to([this,"position"],"位置数组",[0,0,0]),new cl([this,"rotation"],"姿态数组",[0,0,0]),new Ve([this,"scale"],"缩放",[1,1,1]),new L([this,"minVisibleDistance"],"最小可见距离",0),new L([this,"maxVisibleDistance"],"最大可见距离",0)],more:[...e.more,new nt(["numbers","number"],(r,i)=>this.smoothMove(r,i),[[0,0,0],0],"平滑移动","smoothMove"),new nt(["numbers","number"],(r,i)=>this.smoothMoveKeepPitch(r,i),[[0,0,0],0],"固定方向平滑移动","smoothMoveKeepPitch"),new nt(["numbers","numbers","number"],(r,i,s)=>this.smoothMoveWithRotation(r,i,s),[[0,0,0],[0,0,0],0],"平滑偏移","smoothMoveWithRotation"),new nt(["number","number","number","string"],(r,i,s,o)=>this.smoothMoveOnGround(r,i,s,o),[0,0,0,""],"贴地平滑移动","smoothMoveOnGround"),new nt(["numbers","number","number","number","string"],(r,i,s,o,a)=>this.smoothMoveWithRotationOnGround(r,i,s,o,a),[[0,0,0],0,0,0,""],"贴地平滑偏移","smoothMoveWithRotationOnGround"),new nt(["numbers","number"],(r,i)=>this.smoothMoveRelatively(r,i),[[0,0,0],0],"smoothMoveRelatively","smoothMoveRelatively"),new nt(["numbers","numbers","number"],(r,i,s)=>this.smoothMoveRelativelyWithRotation(r,i,s),[[0,0,0],[0,0,0],0],"smoothMoveRelativelyWithRotation","smoothMoveRelativelyWithRotation"),new W([this,"enableVisibleDistance"],"是否应用距离显隐")]}}get pointSize(){return this.pointStyle.size}set pointSize(e){this.pointStyle={...this.pointStyle,size:e}}get pointSizeChanged(){return this.pointStyleChanged}get pointSizeType(){return this.pointStyle.sizeType}set pointSizeType(e){this.pointStyle={...this.pointStyle,sizeType:e}}get pointSizeTypeChanged(){return this.pointStyleChanged}get pointColor(){return this.pointStyle.color}set pointColor(e){this.pointStyle={...this.pointStyle,color:[...e]}}get pointColorChanged(){return this.pointStyleChanged}get pointMaterial(){return this.pointStyle.material}set pointMaterial(e){this.pointStyle={...this.pointStyle,material:e}}get pointMaterialChanged(){return this.pointStyleChanged}get pointMaterialParams(){return this.pointStyle.materialParams}set pointMaterialParams(e){this.pointStyle={...this.pointStyle,materialParams:e}}get pointMaterialParamsChanged(){return this.pointStyleChanged}};d(Rs,"createDefaultProps",()=>({...Rt.createDefaultProps(),pointed:!1,pointStyle:h.reactJson({size:1,sizeType:"screen",color:[1,1,1,1],material:"",materialParams:{},outlineColor:[1,0,0,1],outlineWidth:2}),position:h.reactArray([0,0,0]),rotation:h.reactArray([0,0,0]),scale:h.reactArray([1,1,1]),minVisibleDistance:h.react(0),maxVisibleDistance:h.react(0)})),d(Rs,"type",Rs.register("ESObjectWithLocation",Rs,{chsName:"对象位置",tags:["ESObjects"],description:"对象位置"})),d(Rs,"supportEditingModes",[...Rt.supportEditingModes,B.Place,B.Translation,B.Rotation,B.Scale,B.DoublePointsAppend,B.DoublePointsModify]);let j=Rs;const Vo=class Vo extends j{getESProperties(){const t={...super.getESProperties()};return{...t,style:[...t.style,new rt([],"点样式集合"),new W([this,"pointed"],"开启点样式",!1),new L([this,"pointSize"],"点大小",1),new pt([this,"pointSizeType"],[["screen","screen"],["world","world"]],"点类型","screen"),new _t([this,"pointColor"],"点颜色",[1,1,1,1]),new rt([],"线样式集合"),new W([this,"stroked"],"开启线样式",!1),new W([this,"strokeGround"],"是否贴地(线)",!1),new L([this,"strokeWidth"],"线宽",1),new pt([this,"strokeWidthType"],[["screen","screen"],["world","world"]],"线类型","screen"),new _t([this,"strokeColor"],"线颜色",[1,1,1,1]),new rt([],"面样式集合"),new W([this,"filled"],"开启填充样式",!1),new W([this,"fillGround"],"是否贴地",!1),new _t([this,"fillColor"],"填充颜色",[1,1,1,1])],more:[...t.more,new rt([],"点样式"),new ot([this,"pointMaterial"],"点材质",""),new Q([this,"pointMaterialParams"],"点材质参数",{}),new rt([],"线样式"),new ot([this,"strokeMaterial"],"线材质",""),new Q([this,"strokeMaterialParams"],"线材质参数",{}),new rt([],"填充样式"),new ot([this,"fillMaterial"],"面材质",""),new Q([this,"fillMaterialParams"],"面材质参数",{})]}}get strokeWidth(){return this.strokeStyle.width}set strokeWidth(t){this.strokeStyle={...this.strokeStyle,width:t}}get strokeWidthChanged(){return this.strokeStyleChanged}get strokeWidthType(){return this.strokeStyle.widthType}set strokeWidthType(t){this.strokeStyle={...this.strokeStyle,widthType:t}}get strokeWidthTypeChanged(){return this.strokeStyleChanged}get strokeColor(){return this.strokeStyle.color}set strokeColor(t){this.strokeStyle={...this.strokeStyle,color:[...t]}}get strokeColorChanged(){return this.strokeStyleChanged}get strokeMaterial(){return this.strokeStyle.material}set strokeMaterial(t){this.strokeStyle={...this.strokeStyle,material:t}}get strokeMaterialChanged(){return this.strokeStyleChanged}get strokeMaterialParams(){return this.strokeStyle.materialParams}set strokeMaterialParams(t){this.strokeStyle={...this.strokeStyle,materialParams:t}}get strokeMaterialParamsChanged(){return this.strokeStyleChanged}get strokeGround(){return this.strokeStyle.ground}set strokeGround(t){this.strokeStyle={...this.strokeStyle,ground:t}}get strokeGroundChanged(){return this.strokeStyleChanged}get fillColor(){return this.fillStyle.color}set fillColor(t){this.fillStyle={...this.fillStyle,color:[...t]}}get fillColorChanged(){return this.fillStyleChanged}get fillMaterial(){return this.fillStyle.material}set fillMaterial(t){this.fillStyle={...this.fillStyle,material:t}}get fillMaterialChanged(){return this.fillStyleChanged}get fillMaterialParams(){return this.fillStyle.materialParams}set fillMaterialParams(t){this.fillStyle={...this.fillStyle,materialParams:t}}get fillMaterialParamsChanged(){return this.fillStyleChanged}get fillGround(){return this.fillStyle.ground}set fillGround(t){this.fillStyle={...this.fillStyle,ground:t}}get fillGroundChanged(){return this.fillStyleChanged}};d(Vo,"createDefaultProps",()=>({...j.createDefaultProps(),pointed:!1,pointStyle:h.reactJson({size:1,sizeType:"screen",color:[1,1,1,1],material:"",materialParams:{},outlineColor:[1,0,0,1],outlineWidth:1}),stroked:!1,strokeStyle:h.reactJson({width:1,widthType:"screen",color:[1,1,1,1],material:"",materialParams:{},ground:!1}),filled:!1,fillStyle:h.reactJson({color:[1,1,1,1],material:"",materialParams:{},ground:!1})})),d(Vo,"type",Vo.register("ESLocalVector",Vo,{chsName:"本地矢量",tags:["ESObjects"],description:"本地矢量对象"}));let Ro=Vo;const eu=class eu extends Ro{};d(eu,"type",eu.register("ESLocalVector2D",eu,{chsName:"本地矢量2D",tags:["ESObjects"],description:"本地矢量2D对象"}));let Ti=eu;const Vy=[["固定朝向",0],["面向屏幕旋转",1],["绕自身Z轴旋转",2]],zy=[["单面不透明",0],["双面不透明",1],["单面遮罩",2],["双面遮罩",3],["单面透明",4],["双面透明",5],["单面未遮挡透明",6],["双面未遮挡透明",7]],zo=class zo extends j{constructor(){super(...arguments);d(this,"_widgetEvent",this.dv(new h.Event))}get widgetEvent(){return this._widgetEvent}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new W([this,"screenRender"],"屏幕渲染",!0),new W([this,"sizeByContent"],"尺寸自适应",!0),new ge([this,"size"],"尺寸大小",[100,100]),new ge([this,"anchor"],"偏移比例",[.5,1]),new ge([this,"offset"],"像素偏移",[0,0]),new pt([this,"renderMode"],zy,"渲染模式",0),new pt([this,"rotationType"],Vy,"漫游旋转类型",1),new ot([this,"actorTag"],"绑定对象"),new ot([this,"socketName"],"插槽名称"),new Ve([this,"positionOffset"],"位置偏移"),new Ve([this,"rotationOffset"],"相对姿态")],more:[...e.more,new L([this,"zOrder"],"排序",0)]}}};d(zo,"createDefaultProps",()=>({...j.createDefaultProps(),screenRender:!0,size:h.reactArray([100,100]),anchor:h.reactArray([.5,1]),offset:h.reactArray([0,0]),sizeByContent:!0,renderMode:0,rotationType:1,zOrder:0,actorTag:"",socketName:"",positionOffset:h.reactArray([0,0,0]),rotationOffset:h.reactArray([0,0,0])})),d(zo,"type",zo.register("ESLabel",zo,{chsName:"标签",tags:["ESObjects"],description:"标签对象"}));let Rr=zo;const Uo=class Uo extends ${constructor(t){super(t)}};d(Uo,"createDefaultProps",()=>({...$.createDefaultProps(),show:!0,fillStyle:h.reactJson({color:[1,1,1,1],material:"",materialParams:{},ground:!1})})),d(Uo,"type",Uo.register("ESTestObject",Uo,{chsName:"测试",tags:["ESObjects"],description:""}));let gc=Uo;const ni=class ni extends Rt{constructor(e){super(e);d(this,"_refreshTilesetEvent",this.dv(new h.Event));d(this,"_tilesetReadyEvent",this.dv(new h.Event));d(this,"_supportEdit",this.dv(h.react(!0)));d(this,"_highlightFeatureEvent",this.dv(new h.Event));d(this,"_highlightFeatureAndFlyToEvent",this.dv(new h.Event));d(this,"_strokeFeatureEvent",this.disposeVar(new h.Event));d(this,"_getFeatureTableEvent",this.dv(new h.Event));d(this,"_featureTableResultEvent",this.dv(new h.Event));d(this,"_getMaterialNameListEvent",this.disposeVar(new h.Event));d(this,"_setFeatureStyleEvent",this.dv(new h.Event));d(this,"_setFeatureColorEvent",this.dv(new h.Event));d(this,"_setFeatureVisableEvent",this.dv(new h.Event));d(this,"_resetFeatureStyleEvent",this.dv(new h.Event));d(this,"setMaterialInfoEvent",this.ad(new h.Event));d(this,"_setMaterialEvent",this.disposeVar(new h.Event));d(this,"_clippingPlanesId",this.dv(h.react("")));d(this,"_clippingPlaneIds",this.dv(h.react([])));d(this,"_flattenedPlaneId",this.dv(h.react("")));d(this,"_flattenedPlaneEnabled",this.dv(h.react(!1)));d(this,"_clippingPlaneId",this.dv(h.react("")));d(this,"_excavateId",this.dv(h.reactArray([])))}updateEditing(){var e;(e=this.activeViewer)==null||e.startEditing(this,[B.Translation,B.Rotation],{callSource:"inner"})}get refreshTilesetEvent(){return this._refreshTilesetEvent}refreshTileset(){this._refreshTilesetEvent.emit()}get tilesetReady(){return this._tilesetReadyEvent}get supportEdit(){return this._supportEdit.value}set supportEdit(e){this._supportEdit.value=e}get supportEditChanged(){return this._supportEdit.changed}get highlightFeatureEvent(){return this._highlightFeatureEvent}highlightFeature(e,r){this._highlightFeatureEvent.emit(e,r)}get highlightFeatureAndFlyToEvent(){return this._highlightFeatureAndFlyToEvent}highlightFeatureAndFlyTo(e,r,i,s){this._highlightFeatureAndFlyToEvent.emit(e,r,i,s)}get strokeFeatureEvent(){return this._strokeFeatureEvent}strokeFeature(e,r=[1,0,0,1]){this._strokeFeatureEvent.emit(e,r)}get getFeatureTableEvent(){return this._getFeatureTableEvent}getFeatureTable(){return Promise.race([new Promise(e=>{const r=this.d(this._featureTableResultEvent.donce(e));this._getFeatureTableEvent.emit(),setTimeout(()=>{r(),e(void 0)},2e3)})])}get getMaterialNameListEvent(){return this._getMaterialNameListEvent}getMaterialNameList(){return new Promise(e=>{const r=new h.Destroyable;r.d(this.getMaterialNameListEvent.don(i=>{i!=="start"&&(r.destroy(),e(i))})),this.getMaterialNameListEvent.emit("start"),setTimeout(()=>{r.isDestroyed()||(r.destroy(),e(void 0))},2e3)})}get setFeatureStyleEvent(){return this._setFeatureStyleEvent}setFeatureStyle(e){this._setFeatureStyleEvent.emit(e)}get setFeatureColorEvent(){return this._setFeatureColorEvent}setFeatureColor(e,r){this._setFeatureColorEvent.emit(e,typeof r=="string"?JSON.parse(r):r)}get setFeatureVisableEvent(){return this._setFeatureVisableEvent}setFeatureVisable(e,r){this._setFeatureVisableEvent.emit(e,typeof r=="string"?JSON.parse(r):r)}get resetFeatureStyleEvent(){return this._resetFeatureStyleEvent}resetFeatureStyle(){this._resetFeatureStyleEvent.emit()}get setMaterialEvent(){return this._setMaterialEvent}setMaterial(e){return new Promise(r=>{const i=new h.Destroyable;i.ad(this.setMaterialInfoEvent.donce(s=>{i.destroy(),r(s)})),this._setMaterialEvent.emit(e)})}get clippingPlanesId(){return this._clippingPlanesId.value}set clippingPlanesId(e){this._clippingPlanesId.value=e}get clippingPlanesIdChanged(){return this._clippingPlanesId.changed}get clippingPlaneIds(){return this._clippingPlaneIds.value}set clippingPlaneIds(e){this._clippingPlaneIds.value=e}get clippingPlaneIdsChanged(){return this._clippingPlaneIds.changed}get flattenedPlaneId(){return this._flattenedPlaneId.value}set flattenedPlaneId(e){this._flattenedPlaneId.value=e}get flattenedPlaneIdChanged(){return this._flattenedPlaneId.changed}get flattenedPlaneEnabled(){return this._flattenedPlaneEnabled.value}set flattenedPlaneEnabled(e){this._flattenedPlaneEnabled.value=e}get flattenedPlaneEnabledChanged(){return this._flattenedPlaneEnabled.changed}get clippingPlaneId(){return this._clippingPlaneId.value}set clippingPlaneId(e){this._clippingPlaneId.value=e}get clippingPlaneIdChanged(){return this._clippingPlaneId.changed}get excavateId(){return this._excavateId.value}set excavateId(e){this._excavateId.value=e}get excavateIdChanged(){return this._excavateId.changed}setLight122(){this.czmEnvironmentMapManager={...cc}}getESProperties(){const e={...super.getESProperties()};return{...e,defaultMenu:"dataSource",basic:[...e.basic,new we([this,"maximumScreenSpaceError"],1,[0,256],"精度",16),new pt([this,"materialMode"],[["常规","normal"],["科技感","technology"]],"材质模式","normal",!0),new pt([this,"colorBlendMode"],[["默认","HIGHLIGHT"],["替换","REPLACE"],["混合","MIX"]],"颜色模式","HIGHLIGHT"),new Q([this,"materialOverrideMap"],"材质替换",ni.defaults.materialOverrideMap)],dataSource:[...e.dataSource,new Q([this,"url"],"服务地址",ni.defaults.url,void 0,!0)],coordinate:[...e.coordinate,new W([this,"editing"],"编辑",!1,!0),new Ve([this,"offset"],"偏移量",[0,0,0],!0),new cl([this,"rotation"],"旋转",[0,0,0])],more:[...e.more,new Q([this,"materialParams"],"materialParams",ni.defaults.materialParams),new nt(["string","string"],(r,i)=>this.highlightFeature(r,i),["","rgba(255,0,0,1)"],"highlightFeature"),new nt(["string","string"],(r,i)=>this.setFeatureColor(r,i),["",""],"setFeatureColor"),new nt(["string","string"],(r,i)=>this.setFeatureVisable(r,i),["",""],"setFeatureVisable"),new nt([],()=>this.resetFeatureStyle(),[],"resetFeatureStyle"),new rt([],"ue"),new nt([],()=>this.refreshTileset(),[],"refreshTileset"),new ot([this,"actorTag"]),new W([this,"highlight"],"是否高亮"),new _t([this,"highlightColor"]),new L([this,"highlightID"]),new rt([],"czm"),new rt([],"可视化"),new ge([this,"czmImageBasedLightingFactor"],"反射强度"),new L([this,"czmAtmosphereScatteringIntensity"],"大气散射强度"),new Q([this,"czmEnvironmentMapManager"],"动态环境贴图管理器"),new L([this,"czmMaximumMemoryUsage"],"最大内存"),new rt([],"常用"),new pt([this,"czmClassificationType"],[["NONE","NONE"],["TERRAIN","TERRAIN"],["CESIUM_3D_TILE","CESIUM_3D_TILE"],["BOTH","BOTH"]],"czmClassificationType","NONE",!0),new Q([this,"czmStyleJson"],"czmStyle"),new W([this,"czmBackFaceCulling"]),new W([this,"czmSkipLevelOfDetail"]),new L([this,"cacheBytes"],"最大缓存",512*1024*1024),new rt([],"调试信息"),new W([this,"czmDebugShowBoundingVolume"]),new W([this,"czmDebugShowContentBoundingVolume"]),new rt([],"clippingPlanes"),new W([this,"clippingPlaneEnabled"]),new W([this,"unionClippingRegions"]),new _t([this,"clippingPlaneEdgeColor"]),new L([this,"clippingPlaneEdgeWidth"])]}}};d(ni,"createDefaultProps",()=>({...Rt.createDefaultProps(),url:"",actorTag:"",materialMode:"normal",highlight:!1,maximumScreenSpaceError:16,highlightID:0,highlightColor:h.reactArray([1,0,0,1]),offset:h.reactArrayWithUndefined([0,0,0]),rotation:h.reactArray([0,0,0]),czmImageBasedLightingFactor:h.reactArray([1,1]),czmEnvironmentMapManager:h.reactJsonWithUndefined(void 0),czmLuminanceAtZenith:2,czmAtmosphereScatteringIntensity:2,czmMaximumMemoryUsage:512,czmClassificationType:"NONE",czmStyleJson:h.reactJson({}),czmBackFaceCulling:!0,czmDebugShowBoundingVolume:!1,czmDebugShowContentBoundingVolume:!1,czmSkipLevelOfDetail:!1,cacheBytes:512*1024*1024,colorBlendMode:"HIGHLIGHT",clippingPlaneEnabled:!0,unionClippingRegions:!0,clippingPlaneEdgeColor:h.reactArray([1,1,1,1]),clippingPlaneEdgeWidth:2,materialParams:{baseColor:[0,.5,1]},allowPicking:!0,materialOverrideMap:h.reactJsonWithUndefined({}),featureIdLabel:0,splitDirection:"NONE"})),d(ni,"type",ni.register("ES3DTileset",ni,{chsName:"3DTileset",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"3DTileset"})),d(ni,"supportEditingModes",[...Rt.supportEditingModes,B.Translation,B.Rotation]);let rn=ni;const Go=class Go extends j{constructor(e){super(e);d(this,"_isFlyInCreated",this.dv(h.react(!1)));d(this,"_readyEvent",this.dv(new h.Event));this.collision=!1,this.d(this.createdEvent.don(()=>{setTimeout(()=>{if((this.editing??!1)||!this.position){const i=this.dv(h.createNextAnimateFrameEvent(this.positionChanged,this.editingChanged));this.d(i.donce(()=>{this.editing||!this.position||this.isFlyInCreated&&this.flyTo()}))}else{if(!this.isFlyInCreated)return;this.flyTo()}},1e3)}))}get isFlyInCreated(){return this._isFlyInCreated.value}set isFlyInCreated(e){this._isFlyInCreated.value=e}get isFlyInCreatedChanged(){return this._isFlyInCreated.changed}get readyEvent(){return this._readyEvent}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new pt([this,"mode"],[["柱状警告","cylinder"],["圆形警告","circle"]],"模式","cylinder"),new L([this,"radius"],"半径",10)]}}};d(Go,"createDefaultProps",()=>({...j.createDefaultProps(),mode:"cylinder",radius:10})),d(Go,"type",Go.register("ESAlarm",Go,{chsName:"报警",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"警告类"}));let mc=Go;const Fs=class Fs extends j{constructor(t){super(t)}getESProperties(){const t={...super.getESProperties()};return{...t,basic:[...t.basic,new L([this,"radius"],"半径",1),new pt([this,"mode"],[["扫描","scan"],["扩散","diffuse"]],"模式",Fs.defaults.mode)]}}};d(Fs,"createDefaultProps",()=>({...j.createDefaultProps(),radius:1,mode:"scan",collision:!1})),d(Fs,"type",Fs.register("ESApertureEffect",Fs,{chsName:"光圈特效",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"光圈特效"}));let vc=Fs;const ks=class ks extends yt{constructor(e){super(e);d(this,"editingBindMode","circular")}getESProperties(){const e={...super.getESProperties()};return{...e,coordinate:[...e.coordinate,new L([this,"area"],"面积",0,!1,!0),new L([this,"perimeter"],"周长",0,!1,!0)]}}};d(ks,"createDefaultProps",()=>({...yt.createDefaultProps(),fillStyle:h.reactJson({color:[1,1,1,.5],material:"",materialParams:{},ground:!1}),strokeStyle:h.reactJson({width:1,widthType:"screen",color:[1,1,1,1],material:"",materialParams:{},ground:!1}),filled:!0,stroked:!1,collision:!1})),d(ks,"type",ks.register("ESGeoPolygon",ks,{chsName:"地理多边形",tags:["ESObjects"],description:"地理多边形"})),d(ks,"supportEditingModes",[...yt.supportEditingModes,B.CircularAppend,B.CircularInsert]);let kt=ks;const Oi=class Oi extends kt{get fillMaterial(){return this.fillStyle.material}set fillMaterial(t){this.fillStyle={...this.fillStyle,material:t}}get fillMaterialParams(){return this.fillStyle?this.fillStyle.materialParams:Oi.defaults.fillStyle.materialParams}set fillMaterialParams(t){this.fillStyle={...this.fillStyle??Oi.defaults.fillStyle,materialParams:t??Oi.defaults.fillStyle.materialParams}}constructor(t){super(t)}};d(Oi,"createDefaultProps",()=>({...kt.createDefaultProps(),stroked:!0,filled:!0,units:h.reactArray(["SquareMeter_SquareKilometer","MU_Hectare","PerimeterMeter_PerimeterKilometer"]),fillStyle:h.reactJson({color:[1,1,1,1],material:"Material'/EarthSDKForUE/M_ES_Material.M_ES_Material'",materialParams:{Opacity:.4},ground:!0}),strokeStyle:h.reactJson({width:2,widthType:"screen",color:[1,1,1,1],material:"",materialParams:{},ground:!1})})),d(Oi,"type",Oi.register("ESAreaMeasurement",Oi,{chsName:"面积测量",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE","_ES_Impl_Ol"],description:"面积测量"}));let yc=Oi;const Wo=class Wo extends j{constructor(t){super(t)}getESProperties(){const t={...super.getESProperties()};return{...t,defaultMenu:"general",more:[...t.more,new rt([],"czm"),new pa([this,"image"],"图片"),new Ve([this,"translation"],"偏移")]}}};d(Wo,"createDefaultProps",()=>({...j.createDefaultProps(),image:"${earthsdk3-assets-script-dir}/assets/img/smoke.png",translation:h.reactArray([0,0,0])})),d(Wo,"type",Wo.register("ESBlastParticleSystem",Wo,{chsName:"粒子爆炸",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"粒子爆炸"}));let _c=Wo;const xn=class xn extends j{constructor(t){super(t)}getESProperties(){const t={...super.getESProperties()};return{...t,basic:[...t.basic,new W([this,"reverse"],"反转",xn.defaults.reverse),new Ve([this,"size"],"尺寸",xn.defaults.size),new _t([this,"edgeColor"],"边框颜色",xn.defaults.edgeColor),new L([this,"edgeWidth"],"边框宽度",xn.defaults.edgeWidth),new ot([this,"targetID"],"瓦片图层",xn.defaults.targetID)]}}};d(xn,"createDefaultProps",()=>({...j.createDefaultProps(),reverse:!1,edgeColor:h.reactArray([1,1,1,1]),edgeWidth:2,size:h.reactArray([10,10,10]),targetID:""})),d(xn,"type",xn.register("ESBoxClipping",xn,{chsName:"体剖切",tags:["ESObjects","_ES_Impl_Cesium"],description:"体剖切,体裁剪,体裁切,盒裁切"}));let wc=xn;const ru=class ru extends j{constructor(){super(...arguments);d(this,"_thumbnail",this.dv(h.react("")));d(this,"_duration",this.dv(h.react(1)));d(this,"_resetWithCurrentCameraEvent",this.dv(new h.Event));d(this,"_captureEvent",this.dv(new h.Event))}get thumbnail(){return this._thumbnail.value}set thumbnail(e){this._thumbnail.value=e}get thumbnailChanged(){return this._thumbnail.changed}get duration(){return this._duration.value}set duration(e){this._duration.value=e}get durationChanged(){return this._duration.changed}flyIn(e=1,r="default"){this.flyInEvent.emit(e,-1,r)}get resetWithCurrentCameraEvent(){return this._resetWithCurrentCameraEvent}resetWithCurrentCamera(){this._resetWithCurrentCameraEvent.emit()}get captureEvent(){return this._captureEvent}capture(e,r){this._captureEvent.emit(e,r)}execOnCreating(){this.resetWithCurrentCamera()}async initByCurrent(){this.resetWithCurrentCamera()}getESProperties(){const e={...super.getESProperties()};return{...e,more:[...e.more,new rt([],"ESCameraView"),new nt([],()=>this.resetWithCurrentCamera(),[],"设置为当前视角"),new nt(["number","number"],(r,i)=>this.capture(r,i),[64,64],"获取缩略图"),new ot([this,"thumbnail"],"缩略图","",!0),new L([this,"duration"],"飞行时间",1,!0)]}}};d(ru,"type",ru.register("ESCameraView",ru,{chsName:"视角",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"视角"}));let Qu=ru;class Bu extends h.Destroyable{constructor(e,r,i){super();d(this,"_view",this.dv(new Qu));if(this.d(e.components.disposableAdd(this._view)),this._view.name=(i==null?void 0:i.name)??`视角${e.views.length+1}`,r){const a=this._view,u=r;a.duration=u.duration??1,a.position=u.position,a.rotation=u.rotation??[0,0,0],a.thumbnail=u.thumbnail??"",a.name=u.name}else{const a=(i==null?void 0:i.size)??[64,64];this.d(h.nextAnimateFrame(()=>{this._view.resetWithCurrentCamera(),this._view.capture(a[0],a[1])}))}const s=this._view,o=this.dv(h.createNextAnimateFrameEvent(s.durationChanged,s.positionChanged,s.rotationChanged,s.thumbnailChanged,s.nameChanged));this.d(o.don(()=>e.emitViewsWarpper()))}get view(){return this._view}get viewInfo(){const e=this._view;return{duration:e.duration,position:e.position,rotation:e.rotation,thumbnail:e.thumbnail,name:e.name}}}const sn=class sn extends ${constructor(e){super(e);d(this,"_currentViewIndex",this.dv(h.react(-1)));d(this,"_viewWrappers",this.dv(new h.ObservableArray));d(this,"_currentViewWrapper",this.dv(h.react(void 0)));d(this,"_container",this.dv(h.react(void 0)));this.initProcessing();{const r=()=>{if(!this._currentViewWrapper.value)return;this._viewWrappers.indexOf(this._currentViewWrapper.value)===-1&&(this._currentViewWrapper.value=void 0)};r(),this.d(this._viewWrappers.changedEvent.don(r))}{const r=()=>{const i=this._currentViewWrapper.value;this._currentViewIndex.value=i?this._getIndex(i):-1};r(),this.d(this._viewWrappers.changedEvent.don(r)),this.d(this._currentViewWrapper.changed.don(r))}this.d(()=>{this.clearAllViews()})}get json(){return{...this._innerGetJson(),views:this.views}}set json(e){this._innerSetJson(e),this.views=e.views}get currentViewIndex(){return this._currentViewIndex.value}get currentViewIndexChanged(){return this._currentViewIndex.changed}emitViewsWarpper(){this._viewWrappers.changedEvent.emit(this._viewWrappers)}get container(){return this._container.value}get containerChanged(){return this._container.changed}set container(e){this._container.value=e}get views(){return Qh(this._viewWrappers,e=>e.viewInfo)}get viewsChanged(){return this._viewWrappers.changedEvent}set views(e){if(e.length===this._viewWrappers.length){const r=this._viewWrappers;if(e.every((i,s)=>{const o=r.get(s).view;return i.duration===o.duration&&fl(i.position,o.position)&&fl(i.rotation,o.rotation)&&i.thumbnail===o.thumbnail&&i.name===o.name}))return}this.clearAllViews();for(let r of e)this._viewWrappers.push(new Bu(this,r))}_getIndex(e){return this._viewWrappers.indexOf(e)}clearAllViews(){for(let e of this._viewWrappers)e.destroy();this._viewWrappers.length=0}add(e=`视角${this.views.length+1}`,r=[64,64]){this._viewWrappers.push(new Bu(this,void 0,{name:e,size:r}))}update(e,r,i=[64,64]){if(e>=this._viewWrappers.length||e<0)return console.warn("index >= this._viewWrappers.length || index < 0"),!1;const s=this._viewWrappers.get(e);return r&&(s.view.name=r),s.view.resetWithCurrentCamera(),s.view.capture(i[0],i[1]),!0}addView(){this._viewWrappers.push(new Bu(this))}insertView(e){if(this._viewWrappers.length+1<=e||e<0){console.error("this._views.length <= index || index < 0");return}this._viewWrappers.splice(e,0,new Bu(this))}setCurrentView(e){if(e>=this._viewWrappers.length||e<0)return console.warn("index >= this._viewWrappers.length || index < 0"),!1;const r=this._viewWrappers.get(e);return this._currentViewWrapper.value=r,!0}resetView(e){if(e>=this._viewWrappers.length||e<0){console.warn("index >= this._viewWrappers.length || index < 0");return}const r=this._viewWrappers.get(e);r.view.resetWithCurrentCamera(),r.view.capture()}resetViewName(e,r){if(e>=this._viewWrappers.length||e<0){console.warn("index >= this._viewWrappers.length || index < 0");return}const i=this._viewWrappers.get(e);i.view.name=r}updateView(e,r){if(e>=this._viewWrappers.length||e<0)return console.warn("index >= this._viewWrappers.length || index < 0"),!1;const i=this._viewWrappers.get(e);return i.view.position=r.position,i.view.rotation=r.rotation??[0,0,0],i.view.duration=r.duration??1,i.view.thumbnail=r.thumbnail??"",i.view.name=r.name??"",!0}flyToView(e){if(this.setCurrentView(e)){if(!this._currentViewWrapper.value)throw new Error("this._currentViewWrapper.value");const r=this._currentViewWrapper.value.view.duration;this._currentViewWrapper.value.view.flyIn(r,this.flyMode??sn.defaults.flyMode)}}flyToPrevView(){const e=this._currentViewWrapper.value;if(!e)return this.flyToView(0),!0;const r=this._getIndex(e);return this.loop??sn.defaults.loop?(this.flyToView((this._viewWrappers.length+r-1)%this._viewWrappers.length),!0):r-1<0?!1:(this.flyToView(r-1),!0)}moveToPreView(){const e=this._currentViewWrapper.value;if(!e)return;const r=this._getIndex(e);if(r===0)return;const i=this._viewWrappers.splice(r-1,1,e)[0];this._viewWrappers.set(r,i)}moveToNextView(){const e=this._currentViewWrapper.value;if(!e)return;const r=this._getIndex(e);if(r===this._viewWrappers.length-1)return;const i=this._viewWrappers.splice(r+1,1,e)[0];this._viewWrappers.set(r,i)}flyToNextView(){const e=this._currentViewWrapper.value;if(!e)return this.flyToView(0),!0;const r=this._getIndex(e);return this.loop??sn.defaults.loop?(this.flyToView((r+1)%this._viewWrappers.length),!0):r+1>this._viewWrappers.length-1?!1:(this.flyToView(r+1),!0)}stop(){this._currentViewWrapper.value=void 0,this.playing=!1}deleteView(e){if(e<0||e>=this._viewWrappers.length){console.warn("index < 0 || index >= this._viewWrappers.length");return}this._viewWrappers.get(e).destroy(),this._viewWrappers.splice(e,1)}deleteCurrentView(){const e=this._currentViewWrapper.value;if(!e){console.warn("!this._currentViewWrapper.value");return}const r=this._getIndex(e);if(r===-1){console.warn("index === -1");return}this.deleteView(r)}transitionImageUrl(e){return $.context.getStrFromEnv(e)}_flyStep(e){var o;if(!this.flyToNextView())return this.playing=!1,Promise.resolve();const r=this.intervalTime??sn.defaults.intervalTime,s=((((o=this._currentViewWrapper.value)==null?void 0:o.viewInfo.duration)??0)+r)*1e3;return e.promise(h.sleep(s)).then(()=>this._flyStep(e))}initProcessing(){const e=this.dv(h.createProcessingFromAsyncFunc(async i=>this._flyStep(i))),r=()=>{this.playing?e.restart():e.cancel()};r(),this.d(this.playingChanged.don(r))}getESProperties(){const e={...super.getESProperties()};return{...e,more:[...e.more,new pt([this,"flyMode"],[["默认","default"],["直线飞行","uniform"]],"飞行模式",sn.defaults.flyMode),new nt([],()=>this.addView(),[],"添加视角"),new nt(["number"],r=>this.insertView(r),[0],"插入视角"),new nt([],()=>this.clearAllViews(),[],"清空所有视角"),new nt([],()=>this.insertView(this.currentViewIndex+1),[],"当前位置插入视角"),new nt([],()=>this.flyToPrevView(),[],"上一个视角"),new nt([],()=>this.flyToNextView(),[],"下一个视角"),new nt([],()=>this.moveToPreView(),[],"当前视角移动到上一个视角"),new nt([],()=>this.moveToNextView(),[],"当前视角移动到下一个视角"),new nt(["number"],r=>this.flyToView(r),[0],"飞入指定视角"),new nt(["number"],r=>this.setCurrentView(r),[0],"设置当前视角"),new nt([],()=>this.deleteCurrentView(),[],"删除当前视角"),new nt(["number"],r=>this.deleteView(r),[0],"删除指定视角"),new nt(["number"],r=>this.resetView(r),[0],"重置视角"),new L([this,"currentViewIndex"],"当前序号",-1,!1,!0),new Yh([this,"playing"],()=>this.stop(),[this,"loop"],"播放",sn.defaults),new W([this,"playing"],"是否播放"),new nt([],()=>this.stop(),[],"停止"),new W([this,"loop"],"是否循环"),new L([this,"intervalTime"],"间隔时间"),new Q([this,"views"],"视角集合",[],void 0,!0)]}}};d(sn,"createDefaultProps",()=>({...$.createDefaultProps(),playing:!1,loop:!0,intervalTime:5,flyMode:"default"})),d(sn,"type",sn.register("ESCameraViewCollection",sn,{chsName:"视角集合",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"视角集合"}));let $u=sn;const qo=class qo extends j{constructor(e){super(e);d(this,"editingBindMode","doublePoints")}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new L([this,"aspectRatio"],"宽高比",1.77778),new L([this,"fov"],"横向夹角",90),new L([this,"far"],"视野长度",100),new L([this,"near"],"近面距离",5)]}}};d(qo,"createDefaultProps",()=>({...j.createDefaultProps(),fov:90,aspectRatio:1.77778,far:100,near:5,collision:!1})),d(qo,"type",qo.register("ESCameraVisibleRange",qo,{chsName:"摄像头可视域",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"摄像头可视域"}));let Ec=qo;const Xo=class Xo extends j{constructor(t){super(t)}getESProperties(){const t={...super.getESProperties()};return{...t,basic:[...t.basic,new pt([this,"mode"],[["警车","policeCar"]],"模式","policeCar")]}}};d(Xo,"createDefaultProps",()=>({...j.createDefaultProps(),mode:"policeCar",allowPicking:!0})),d(Xo,"type",Xo.register("ESCar",Xo,{chsName:"车辆",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"警车等基础车辆模型"}));let Sc=Xo;const Vs=class Vs extends yt{constructor(e){super(e);d(this,"editingBindMode","circular")}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new L([this,"height"],"高度",10)],coordinate:[...e.coordinate,new L([this,"area"],"面积",0,!1,!0),new L([this,"perimeter"],"周长",0,!1,!0)]}}};d(Vs,"createDefaultProps",()=>({...yt.createDefaultProps(),height:10,filled:!0,fillStyle:h.reactJson({material:"",materialParams:{},ground:!0,color:[1,1,1,1]})})),d(Vs,"type",Vs.register("ESClassification",Vs,{chsName:"倾斜单体化",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"平尾箭头"})),d(Vs,"supportEditingModes",[...yt.supportEditingModes,B.CircularAppend,B.CircularInsert,B.HeightModify]);let ju=Vs;const Yo=class Yo extends j{constructor(t){super(t)}getESProperties(){const t={...super.getESProperties()};return{...t,basic:[...t.basic,new W([this,"showArrow"],"显示箭头",!0),new _t([this,"edgeColor"],"线框颜色",[1,1,1,1]),new L([this,"edgetWidth"],"线框宽度",2),new L([this,"width"],"裁剪宽度",200),new L([this,"height"],"裁剪高度",200),new ot([this,"targetID"],"瓦片图层","")]}}};d(Yo,"createDefaultProps",()=>({...j.createDefaultProps(),showArrow:!0,edgeColor:h.reactArray([1,1,1,1]),edgetWidth:2,width:200,height:200,targetID:""})),d(Yo,"type",Yo.register("ESClippingPlane",Yo,{chsName:"裁切",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"ESClippingPlane"}));let Cc=Yo;class Uy extends h.Destroyable{constructor(t,e,r){super();const i=document.createElement("div");i.setAttribute("xe2-div",`ESCustomDiv(${e.id})(viewer: ${r.id}) container`);{const u=()=>{const c=` ${e.cssText}
46
+ ${e.cssAllInitial?"all: initial;":""}
47
+ ${e.show?"":"display: none"}
48
+ `;i.style.cssText=c};u();const l=this.dv(h.createNextAnimateFrameEvent(e.cssAllInitialChanged,e.cssTextChanged,e.showChanged));this.d(l.don(u))}t.appendChild(i),this.d(()=>t.removeChild(i));const s=this.dv(h.createNextAnimateFrameEvent(e.instanceClassChanged,e.containerChanged,e.shadowDomChanged)),o=this.dv(new h.ObjResettingWithEvent(s,()=>{const{instanceClass:u,container:l}=e;if(!u||l)return;let c=i;if(i.firstElementChild&&i.removeChild(i.firstElementChild),e.shadowDom){const f=i.appendChild(document.createElement("div"));f.setAttribute("xe2-div",`ESCustomDiv(${e.id})(viewer: ${r.id}) container shadowDiv`),c=f.attachShadow({mode:"open"}).appendChild(document.createElement("div")),c.setAttribute("xe2-div",`ESCustomDiv(${e.id})(viewer: ${r.id}) container shadowDiv div`)}return new u(c,e,r)})),{_updateEvent:a}=e;this.d(a.don(u=>{if(o.obj)try{u(o.obj,e,r)}catch(l){console.error(`ESCustomDiv update error! ${l}`)}}))}}const Sp=`class MyDiv {
49
49
  // subContainer是外部视口的div容器,可以在这里创建自己需要的DOM元素
50
50
  // customDiv指向当前的CustomDiv场景对象
51
51
  // viewer指定当前的视口
@@ -83,11 +83,11 @@ ${l.map(h=>`${h.id} ${h.typeName}
83
83
  destroy() {
84
84
  this._container.removeChild(this._div);
85
85
  }
86
- }`,Fy=`示例代码:
86
+ }`,Gy=`示例代码:
87
87
  \`\`\`
88
- ${vp}
88
+ ${Sp}
89
89
  \`\`\`
90
- `,tn=class tn extends j{constructor(t){super(t);d(this,"_updateEvent",this.dv(new c.Event));d(this,"_instanceClassReact",this.dv(c.react(void 0)));d(this,"_innerHtmlMounted",this.dv(new c.Event));d(this,"_container",this.dv(c.react(void 0)));this.registerAttachedObjectForContainer((i,s)=>new Ry(s,this,i));{const i=()=>{try{this.instanceClass=this.instanceClassStr&&Function(`"use strict";return (${this.instanceClassStr})`)()}catch{this.instanceClass=void 0}};i(),this.d(this.instanceClassStrChanged.don(i))}{const i=()=>{if(this.innerHTML===void 0){this.instanceClassStr=void 0;return}const s=`class MyDiv {
90
+ `,on=class on extends ${constructor(e){super(e);d(this,"_updateEvent",this.dv(new h.Event));d(this,"_instanceClassReact",this.dv(h.react(void 0)));d(this,"_innerHtmlMounted",this.dv(new h.Event));d(this,"_container",this.dv(h.react(void 0)));this.registerAttachedObjectForContainer((i,s)=>new Uy(s,this,i));{const i=()=>{try{this.instanceClass=this.instanceClassStr&&Function(`"use strict";return (${this.instanceClassStr})`)()}catch{this.instanceClass=void 0}};i(),this.d(this.instanceClassStrChanged.don(i))}{const i=()=>{if(this.innerHTML===void 0){this.instanceClassStr=void 0;return}const s=`class MyDiv {
91
91
  // subContainer是外部视口的div容器,可以在这里创建自己需要的DOM元素
92
92
  // customDiv指向当前的CustomDiv场景对象
93
93
  // viewer指定当前的视口
@@ -108,13 +108,13 @@ ${vp}
108
108
  }`;this.instanceClassStr=s};i(),this.d(this.innerHTMLChanged.don(i))}const r=document.createElement("div");r.setAttribute("xe2-div",`ESCustomDiv(${this.id}) container`);{const i=()=>{const o=` ${this.cssText};
109
109
  ${this.cssAllInitial?"all: initial;":""}
110
110
  ${this.show?"":"display: none;"}
111
- `;r.style.cssText=o};i();const s=this.dv(c.createNextAnimateFrameEvent(this.cssAllInitialChanged,this.cssTextChanged,this.showChanged));this.d(s.don(i))}{const i=()=>{if(this.containerId===void 0||this.containerId==="")this.container=void 0;else{const s=document.getElementById(this.containerId);s instanceof HTMLElement?this.container=s:(this.container=void 0,console.warn(`Div from containerId(${this.containerId}) is not HTMLDivElement!`))}};i(),this.d(this.containerIdChanged.don(i))}{class i extends c.Destroyable{constructor(o){super(),o.appendChild(r),this.d(()=>o.removeChild(r))}}this.dv(new c.ObjResettingWithEvent(this.containerChanged,()=>{if(this.container)return new i(this.container)}))}{const i=this.dv(c.createNextAnimateFrameEvent(this.containerChanged,this.instanceClassChanged,this.shadowDomChanged));this.dv(new c.ObjResettingWithEvent(i,()=>{if(!this.container||!this.instanceClass)return;let s=r;if(r.firstElementChild&&r.removeChild(r.firstElementChild),this.shadowDom){const o=r.appendChild(document.createElement("div"));o.setAttribute("xe2-div","ESCustomDiv container shadowDiv"),s=o.attachShadow({mode:"open"}).appendChild(document.createElement("div")),s.setAttribute("xe2-div","ESCustomDiv container shadowDiv div")}return new this.instanceClass(s,this,void 0)}))}}get typeName(){return"ESCustomDiv"}get defaultProps(){return tn.createDefaultProps()}update(t){this._updateEvent.emit(t)}get instanceClass(){return this._instanceClassReact.value}set instanceClass(t){this._instanceClassReact.value=t}get instanceClassChanged(){return this._instanceClassReact.changed}get innerHtmlMounted(){return this._innerHtmlMounted}get container(){return this._container.value}get containerChanged(){return this._container.changed}set container(t){this._container.value=t}getProperties(t){const r=i=>{i||alert("evalFuncStr为空,无法执行!");try{const s=i&&Function(`"use strict";return (${i})`)();this.update(s)}catch(s){alert(`updateDivFunc error: ${s}`)}};return[...super.getProperties(t),new z("ESCustomDiv","ESCustomDiv",[new F("显示","显示",!1,!1,[this,"show"]),new ni("实例类","实例类",!0,!1,[this,"instanceClassStr"],vp,Fy),new ni("innerHTML","注意设置此属性设置此属性会自动更新instanceClassStr变量",!0,!1,[this,"innerHTML"],tn.defaultInnerHTML,tn.innerHTMLReadMe),new ie("强制更新","强制更新",["string"],r,["(divClass, dom, viewer) => divClass.update && divClass.update()"]),new F("允许拾取","是否允许拾取",!0,!1,[this,"allowPicking"]),new Z("容器ID","容器的ID,如果设置,CustomDiv将自动放入容器,否则放入各个视口中。",!0,!1,[this,"containerId"],tn.defaults.containerId),new F("shadowDom","shadowDom",!1,!1,[this,"shadowDom"]),new F("cssAllInitial","cssAllInitial",!1,!1,[this,"cssAllInitial"]),new Z("cssText","cssText",!1,!1,[this,"cssText"])])]}};d(tn,"type",tn.register("ESCustomDiv",tn,{chsName:"ESCustomDiv",tags:["ESObjects"],description:"自定义div"})),d(tn,"defaults",{...j.defaults,show:!0,containerId:""}),d(tn,"defaultInnerHTML",`<!-- z-index样式需要设置,否则可能导致看不到!-->
112
- <div style="width: 300px; height: 50px; z-index: 100; position: absolute; left: 10px; top: 10px; background: rgba(120, 120, 0, 0.7); color: white; font-size: 30px; line-height: 50px; border: 1px solid white;">Hello world!</div>
113
- `),d(tn,"innerHTMLReadMe",`示例代码:
114
- \`\`\`
115
- ${tn.defaultInnerHTML}
116
- \`\`\`
117
- `);let Ls=tn;(n=>{n.createDefaultProps=()=>({...j.createDefaultProps(),show:!0,instanceClassStr:void 0,innerHTML:void 0,allowPicking:void 0,containerId:void 0,shadowDom:!1,cssAllInitial:!1,cssText:""})})(Ls||(Ls={})),c.extendClassProps(Ls.prototype,Ls.createDefaultProps);const Pi=class Pi extends q{constructor(t){super(t);d(this,"_maxTime",this.dv(c.react(Pi.defaults.maxTime)))}get typeName(){return"ESDataMesh"}get defaultProps(){return Pi.createDefaultProps()}get maxTime(){return this._maxTime.value}get maxTimeChanged(){return this._maxTime.changed}getProperties(t){return[...super.getProperties(t),new z("通用","通用",[new U("url","url",!1,!1,[this,"url"]),new S("maxTime","maxTime",!0,!0,[this,"maxTime"],Pi.defaults.maxTime),new S("currentTime","currentTime",!1,!1,[this,"currentTime"]),new S("minPropValue","minPropValue",!1,!1,[this,"minPropValue"]),new S("maxPropValue","maxPropValue",!1,!1,[this,"maxPropValue"]),new U("colorStops","colorStops",!0,!1,[this,"colorStops"],Pi.defaults.colorStops)])]}};d(Pi,"type",Pi.register("ESDataMesh",Pi,{chsName:"数值面着色",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"数值面着色"})),d(Pi,"defaults",{...q.defaults,url:"http://114.242.26.126:6003/ESDataMesh/water-assets2/",maxTime:23,currentTime:0,minPropValue:0,maxPropValue:1,colorStops:[{ratio:0,rgba:[0,0,1,1]},{ratio:.2,rgba:[0,1,0,1]},{ratio:.8,rgba:[1,1,0,1]},{ratio:1,rgba:[1,0,0,1]}]});let _o=Pi;(n=>{n.createDefaultProps=()=>({...q.createDefaultProps(),url:"http://114.242.26.126:6003/ESDataMesh/water-assets2/",currentTime:0,minPropValue:0,maxPropValue:1,colorStops:c.reactJsonWithUndefined(void 0)})})(_o||(_o={})),c.extendClassProps(_o.prototype,_o.createDefaultProps);const ks=class ks extends le{constructor(t){super(t);d(this,"_distance",this.dv(c.react(0)));d(this,"editingBindMode","lineString");const r=()=>{this._distance.value=this.getDistance()??0};r(),this.d(this.pointsChanged.don(r))}get typeName(){return"ESGeoLineString"}get defaultProps(){return ks.createDefaultProps()}get distance(){return this._distance.value}get distanceChanged(){return this._distance.changed}getESProperties(){const t={...super.getESProperties()};return{...t,coordinate:[...t.coordinate,new S("长度","距离",!1,!0,[this,"distance"])],style:[new z("点样式","点样式集合",[]),new F("开启","开启点样式",!1,!1,[this,"pointed"],!1),new S("点大小","点大小(pointSize)",!1,!1,[this,"pointSize"],1),new H("点类型","点类型(pointSizeType)",!1,!1,[this,"pointSizeType"],[["screen","screen"],["world","world"]],"screen"),new J("点颜色","点颜色(pointColor)",!1,!1,[this,"pointColor"],[1,1,1,1]),new z("线样式","线样式集合",[]),new F("开启","开启线样式",!1,!1,[this,"stroked"],!0),new F("贴地","是否贴地(线)",!1,!1,[this,"strokeGround"]),new S("线宽","线宽(strokeWidth)",!1,!1,[this,"strokeWidth"],1),new H("线类型","线类型(strokeWidthType)",!1,!1,[this,"strokeWidthType"],[["screen","screen"],["world","world"]],"screen"),new J("线颜色","线颜色(strokeColor)",!1,!1,[this,"strokeColor"],[1,1,1,1])]}}getProperties(t){return[...super.getProperties(t),new z("计算","计算",[new S("距离","距离",!1,!0,[this,"distance"])])]}};d(ks,"type",ks.register("ESGeoLineString",ks,{chsName:"地理折线",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"地理折线"})),d(ks,"supportEditingModes",[...le.supportEditingModes,se.LineStringAppend,se.LineStringInsert]),d(ks,"defaults",{...le.defaults,strokeStyle:{width:1,widthType:"screen",color:[1,1,1,1],material:"",materialParams:{},ground:!1},stroked:!0});let Or=ks;(n=>{n.createDefaultProps=()=>({...le.createDefaultProps(),stroked:!0,strokeStyle:c.reactJson(n.defaults.strokeStyle)})})(Or||(Or={})),c.extendClassProps(Or.prototype,Or.createDefaultProps);const Ma=class Ma extends Or{get typeName(){return"ESDistanceMeasurement"}get defaultProps(){return Ma.createDefaultProps()}get strokeColor(){return this.strokeStyle.color}set strokeColor(e){this.strokeStyle={...this.strokeStyle,color:[...e]}}constructor(e){super(e)}getProperties(e){return[...super.getProperties(e)]}};d(Ma,"type",Ma.register("ESDistanceMeasurement",Ma,{chsName:"距离测量",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"距离测量"})),d(Ma,"defaults",{...Or.defaults,strokeStyle:{width:2,widthType:"screen",color:[1,1,1,1],material:"",materialParams:{},ground:!1}});let wo=Ma;(n=>{n.createDefaultProps=()=>({...Or.createDefaultProps(),strokeStyle:c.reactJson(n.defaults.strokeStyle)})})(wo||(wo={})),c.extendClassProps(wo.prototype,wo.createDefaultProps);const rs=class rs extends _e{get typeName(){return"ESExcavate"}get defaultProps(){return rs.createDefaultProps()}constructor(e){super(e),this.filled=!1}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new H("模式","mode",!1,!1,[this,"mode"],rs.defaults.modes,"in"),new Z("瓦片图层","targetID",!1,!1,[this,"targetID"],"")],style:[new z("点样式","点样式集合",[]),new F("开启","开启点样式",!1,!1,[this,"pointed"],!1),new S("点大小","点大小(pointSize)",!1,!1,[this,"pointSize"],1),new H("点类型","点类型(pointSizeType)",!1,!1,[this,"pointSizeType"],[["screen","screen"],["world","world"]],"screen"),new J("点颜色","点颜色(pointColor)",!1,!1,[this,"pointColor"],[1,1,1,1]),new z("线样式","线样式集合",[]),new F("开启","开启线样式",!1,!1,[this,"stroked"],!0),new S("线宽","线宽(strokeWidth)",!1,!1,[this,"strokeWidth"],1),new H("线类型","线类型(strokeWidthType)",!1,!1,[this,"strokeWidthType"],[["screen","screen"],["world","world"]],"screen"),new J("线颜色","线颜色(strokeColor)",!1,!1,[this,"strokeColor"],[1,1,1,1]),new F("是否贴地","是否贴地(线)",!1,!1,[this,"strokeGround"],!1),new z("面样式","面样式集合",[]),new F("开启","开启填充样式",!1,!1,[this,"filled"],!0),new J("填充颜色","填充颜色(fillColor)",!1,!1,[this,"fillColor"],[1,1,1,1]),new F("是否贴地","是否贴地",!1,!1,[this,"fillGround"],!1)]}}getProperties(e){return[...super.getProperties(e),new z("通用","通用",[new H("模式","mode",!1,!1,[this,"mode"],rs.defaults.modes),new Z("目标ID","targetID",!1,!1,[this,"targetID"])])]}};d(rs,"type",rs.register("ESExcavate",rs,{chsName:"挖坑",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"挖坑"})),d(rs,"defaults",{..._e.defaults,stroked:!1,ground:!0,modes:[["向内","in"],["向外","out"]],targetID:"",filled:!1});let Zi=rs;(n=>{n.createDefaultProps=()=>({..._e.createDefaultProps(),mode:"in",targetID:"",filled:!1})})(Zi||(Zi={})),c.extendClassProps(Zi.prototype,Zi.createDefaultProps);const xa=class xa extends q{get typeName(){return"ESFireParticleSystem"}get defaultProps(){return xa.createDefaultProps()}constructor(e){super(e)}getESProperties(){return{...{...super.getESProperties()},defaultMenu:"general"}}getProperties(e){return[...super.getProperties(e),new z("通用","通用",[new z("czm","czm",[new Vl("图片","The URI, HTMLImageElement, or HTMLCanvasElement to use for the billboard.",!1,!1,[this,"image"]),new It("偏移","translation",!1,!1,[this,"translation"])])])]}};d(xa,"type",xa.register("ESFireParticleSystem",xa,{chsName:"粒子烟火",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"粒子烟火"})),d(xa,"defaults",{...q.defaults,image:"${earthsdk3-assets-script-dir}/assets/img/smoke.png",translation:[0,0,0]});let Eo=xa;(n=>{n.createDefaultProps=()=>({...q.createDefaultProps(),image:"",translation:c.reactArray([0,0,0])})})(Eo||(Eo={})),c.extendClassProps(Eo.prototype,Eo.createDefaultProps);const ns=class ns extends ve{get typeName(){return"ESForestTileset"}get defaultProps(){return ns.createDefaultProps()}constructor(e){super(e)}getProperties(e){return[...super.getProperties(e),new z("通用","通用",[new U("路径","路径",!0,!1,[this,"url"]),new U("treeTypes","类型为 { name: string, mesh: string, cullingDistance: number, scale: number }[]",!0,!1,[this,"treeTypes"],[]),new U("xiaoBanWidget","类型为 { class: string, pivot: [number,number], space: number }",!0,!1,[this,"xiaoBanWidget"],ns.defaults.xiaoBanWidgetDefault,ns.defaults.XiaoBanWidgetSampleValue),new Z("youShiSZ","youShiSZ",!1,!1,[this,"youShiSZ"]),new Z("diLei","diLei",!1,!1,[this,"diLei"]),new Z("senLinLB","senLinLB",!1,!1,[this,"senLinLB"]),new Z("labelMaterial","labelMaterial",!1,!1,[this,"labelMaterial"]),new S("heightOffset","heightOffset",!1,!1,[this,"heightOffset"])])]}};d(ns,"type",ns.register("ESForestTileset",ns,{chsName:"森林切片图层",tags:["ESObjects","_ES_Impl_UE"],description:"ESForestTileset"})),d(ns,"defaults",{...ve.defaults,url:"",treeTypes:[],xiaoBanWidgetDefault:{class:"WidgetBlueprint'/ESFoliage/ESDefaultXiaoBan.ESDefaultXiaoBan",pivot:[.5,1],space:1},youShiSZ:"StringTable'/ESFoliage/You_Shi_SZ.You_Shi_SZ'",diLei:"StringTable'/ESFoliage/Di_Lei.Di_Lei'",senLinLB:"StringTable'/ESFoliage/Sen_Lin_LB.Sen_Lin_LB'",labelMaterial:"Material'/ESFoliage/ES3DWidgetMaterial.ES3DWidgetMaterial'",heightOffset:40,XiaoBanWidgetSampleValue:`
111
+ `;r.style.cssText=o};i();const s=this.dv(h.createNextAnimateFrameEvent(this.cssAllInitialChanged,this.cssTextChanged,this.showChanged));this.d(s.don(i))}{const i=()=>{if(this.containerId===void 0||this.containerId==="")this.container=void 0;else{const s=document.getElementById(this.containerId);s instanceof HTMLElement?this.container=s:(this.container=void 0,console.warn(`Div from containerId(${this.containerId}) is not HTMLDivElement!`))}};i(),this.d(this.containerIdChanged.don(i))}{class i extends h.Destroyable{constructor(o){super(),o.appendChild(r),this.d(()=>o.removeChild(r))}}this.dv(new h.ObjResettingWithEvent(this.containerChanged,()=>{if(this.container)return new i(this.container)}))}{const i=this.dv(h.createNextAnimateFrameEvent(this.containerChanged,this.instanceClassChanged,this.shadowDomChanged));this.dv(new h.ObjResettingWithEvent(i,()=>{if(!this.container||!this.instanceClass)return;let s=r;if(r.firstElementChild&&r.removeChild(r.firstElementChild),this.shadowDom){const o=r.appendChild(document.createElement("div"));o.setAttribute("xe2-div","ESCustomDiv container shadowDiv"),s=o.attachShadow({mode:"open"}).appendChild(document.createElement("div")),s.setAttribute("xe2-div","ESCustomDiv container shadowDiv div")}return new this.instanceClass(s,this,void 0)}))}}update(e){this._updateEvent.emit(e)}get instanceClass(){return this._instanceClassReact.value}set instanceClass(e){this._instanceClassReact.value=e}get instanceClassChanged(){return this._instanceClassReact.changed}get innerHtmlMounted(){return this._innerHtmlMounted}get container(){return this._container.value}get containerChanged(){return this._container.changed}set container(e){this._container.value=e}getESProperties(){const e={...super.getESProperties()},r=i=>{i||alert("evalFuncStr为空,无法执行!");try{const s=i&&Function(`"use strict";return (${i})`)();this.update(s)}catch(s){alert(`updateDivFunc error: ${s}`)}};return{...e,more:[...e.more,new rt([new W([this,"show"],"显示"),new Fi([this,"instanceClassStr"],"实例类",Sp,Gy,!0),new Fi([this,"innerHTML"],"innerHTML",on.defaultInnerHTML,on.innerHTMLReadMe,!0),new nt(["string"],r,["(divClass, dom, viewer) => divClass.update && divClass.update()"],"强制更新"),new W([this,"allowPicking"],"允许拾取",!0),new ot([this,"containerId"],"容器ID",on.defaults.containerId,!0),new W([this,"shadowDom"],"shadowDom"),new W([this,"cssAllInitial"],"cssAllInitial"),new ot([this,"cssText"],"cssText")],"ESCustomDiv")]}}};d(on,"createDefaultProps",()=>({...$.createDefaultProps(),show:!0,instanceClassStr:void 0,innerHTML:void 0,allowPicking:void 0,containerId:"",shadowDom:!1,cssAllInitial:!1,cssText:""})),d(on,"type",on.register("ESCustomDiv",on,{chsName:"ESCustomDiv",tags:["ESObjects"],description:"自定义div"})),d(on,"defaultInnerHTML",` <!-- z-index样式需要设置,否则可能导致看不到!-->
112
+ <div style="width: 300px; height: 50px; z-index: 100; position: absolute; left: 10px; top: 10px; background: rgba(120, 120, 0, 0.7); color: white; font-size: 30px; line-height: 50px; border: 1px solid white;">Hello world!</div>
113
+ `),d(on,"innerHTMLReadMe",` 示例代码:
114
+ \`\`\`
115
+ ${on.defaultInnerHTML}
116
+ \`\`\`
117
+ `);let tl=on;const zs=class zs extends j{constructor(e){super(e);d(this,"_maxTime",this.dv(h.react(23)))}get maxTime(){return this._maxTime.value}get maxTimeChanged(){return this._maxTime.changed}getESProperties(){const e={...super.getESProperties()};return{...e,more:[...e.more,new Q([this,"url"]),new L([this,"maxTime"],"maxTime",23,!0,!0),new L([this,"currentTime"]),new L([this,"minPropValue"]),new L([this,"maxPropValue"]),new Q([this,"colorStops"],"colorStops",zs.defaults.colorStops,void 0,!0)]}}};d(zs,"createDefaultProps",()=>({...j.createDefaultProps(),url:"http://114.242.26.126:6003/ESDataMesh/water-assets2/",currentTime:0,minPropValue:0,maxPropValue:1,colorStops:h.reactJsonWithUndefined([{ratio:0,rgba:[0,0,1,1]},{ratio:.2,rgba:[0,1,0,1]},{ratio:.8,rgba:[1,1,0,1]},{ratio:1,rgba:[1,0,0,1]}])})),d(zs,"type",zs.register("ESDataMesh",zs,{chsName:"数值面着色",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"数值面着色"}));let Ic=zs;const Us=class Us extends yt{constructor(e){super(e);d(this,"_distance",this.dv(h.react(0)));d(this,"editingBindMode","lineString");const r=()=>{this._distance.value=this.getDistance()??0};r(),this.d(this.pointsChanged.don(r))}get distance(){return this._distance.value}get distanceChanged(){return this._distance.changed}getESProperties(){const e={...super.getESProperties()};return{...e,coordinate:[...e.coordinate,new L([this,"distance"],"长度",0,!1,!0)]}}};d(Us,"createDefaultProps",()=>({...yt.createDefaultProps(),stroked:!0,strokeStyle:h.reactJson({width:1,widthType:"screen",color:[1,1,1,1],material:"",materialParams:{},ground:!1})})),d(Us,"type",Us.register("ESGeoLineString",Us,{chsName:"地理折线",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"地理折线"})),d(Us,"supportEditingModes",[...yt.supportEditingModes,B.LineStringAppend,B.LineStringInsert]);let rs=Us;const Ho=class Ho extends rs{constructor(t){super(t)}};d(Ho,"createDefaultProps",()=>({...rs.createDefaultProps(),strokeStyle:h.reactJson({width:2,widthType:"screen",color:[1,1,1,1],material:"",materialParams:{},ground:!1})})),d(Ho,"type",Ho.register("ESDistanceMeasurement",Ho,{chsName:"距离测量",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE","_ES_Impl_Ol"],description:"距离测量"}));let Pc=Ho;const ss=class ss extends kt{constructor(t){super(t)}getESProperties(){const t={...super.getESProperties()};return{...t,basic:[...t.basic,new pt([this,"mode"],ss.modes,"模式","in"),new ot([this,"targetID"],"瓦片图层","")]}}};d(ss,"createDefaultProps",()=>({...kt.createDefaultProps(),mode:"in",targetID:"",filled:!1})),d(ss,"type",ss.register("ESExcavate",ss,{chsName:"挖坑",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"挖坑"})),d(ss,"modes",[["向内","in"],["向外","out"]]);let Ja=ss;const Jo=class Jo extends j{constructor(t){super(t)}getESProperties(){const t={...super.getESProperties()};return{...t,defaultMenu:"general",more:[...t.more,new pa([this,"image"],"图片"),new Ve([this,"translation"],"偏移")]}}};d(Jo,"createDefaultProps",()=>({...j.createDefaultProps(),image:"${earthsdk3-assets-script-dir}/assets/img/smoke.png",translation:h.reactArray([0,0,0])})),d(Jo,"type",Jo.register("ESFireParticleSystem",Jo,{chsName:"粒子烟火",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"粒子烟火"}));let Nc=Jo;const Wy=`
118
118
  ## 参数类型为 ESTreeType
119
119
  \`\`\`js
120
120
  type ESJVector2D = [number, number]
@@ -124,17 +124,7 @@ ${tn.defaultInnerHTML}
124
124
  space: number
125
125
  }
126
126
  \`\`\`
127
- `,TreeTypeSampleValue:`
128
- ## 参数类型为 ESTreeType[]
129
- \`\`\`js
130
- type ESTreeType = {
131
- name: string,
132
- mesh: string,
133
- cullingDistance: number,
134
- scale: number
135
- }
136
- \`\`\`
137
- `});let So=ns;(n=>{n.createDefaultProps=()=>({...ve.createDefaultProps(),url:"",treeTypes:c.reactJsonWithUndefined(void 0),xiaoBanWidget:c.reactJsonWithUndefined(void 0),youShiSZ:"StringTable'/ESFoliage/You_Shi_SZ.You_Shi_SZ'",diLei:"StringTable'/ESFoliage/Di_Lei.Di_Lei'",senLinLB:"StringTable'/ESFoliage/Sen_Lin_LB.Sen_Lin_LB'",labelMaterial:"Material'/ESFoliage/ES3DWidgetMaterial.ES3DWidgetMaterial'",heightOffset:40})})(So||(So={})),c.extendClassProps(So.prototype,So.createDefaultProps);const yp=`class MyDiv {
127
+ `,Gs=class Gs extends Rt{constructor(t){super(t)}getESProperties(){const t={...super.getESProperties()};return{...t,more:[...t.more,new Q([this,"url"],"路径",!0),new Q([this,"treeTypes"],"treeTypes",[],void 0,!0),new Q([this,"xiaoBanWidget"],"xiaoBanWidget",Gs.defaults.xiaoBanWidget,Wy,!0),new ot([this,"youShiSZ"]),new ot([this,"diLei"]),new ot([this,"senLinLB"]),new ot([this,"labelMaterial"]),new L([this,"heightOffset"])]}}};d(Gs,"createDefaultProps",()=>({...Rt.createDefaultProps(),url:"",treeTypes:h.reactJsonWithUndefined([]),xiaoBanWidget:h.reactJsonWithUndefined({class:"WidgetBlueprint'/ESFoliage/ESDefaultXiaoBan.ESDefaultXiaoBan",pivot:[.5,1],space:1}),youShiSZ:"StringTable'/ESFoliage/You_Shi_SZ.You_Shi_SZ'",diLei:"StringTable'/ESFoliage/Di_Lei.Di_Lei'",senLinLB:"StringTable'/ESFoliage/Sen_Lin_LB.Sen_Lin_LB'",labelMaterial:"Material'/ESFoliage/ES3DWidgetMaterial.ES3DWidgetMaterial'",heightOffset:40})),d(Gs,"type",Gs.register("ESForestTileset",Gs,{chsName:"森林切片图层",tags:["ESObjects","_ES_Impl_UE"],description:"ESForestTileset"}));let bc=Gs;const Cp=`class MyDiv {
138
128
  // container是Poi的div
139
129
  // geoCustomDivPoi指向当前的GeoCustomDivPoi场景对象
140
130
  // viewer指定当前的视口
@@ -165,16 +155,16 @@ ${tn.defaultInnerHTML}
165
155
  destroy() {
166
156
  this._container.removeChild(this._div);
167
157
  }
168
- }`,ky=`示例代码:
158
+ }`,qy=`示例代码:
169
159
  \`\`\`
170
- ${yp}
160
+ ${Cp}
171
161
  \`\`\`
172
- `,Th=`<div style="width: 300px; height: 50px; background: rgba(120, 120, 0, 0.7); color: white; font-size: 30px; line-height: 50px; border: 1px solid white;">Hello world!</div>
173
- `,Vy=`示例代码:
162
+ `,Ip=`<div style="width: 300px; height: 50px; background: rgba(120, 120, 0, 0.7); color: white; font-size: 30px; line-height: 50px; border: 1px solid white;">Hello world!</div>
163
+ `,Xy=`示例代码:
174
164
  \`\`\`
175
- ${Th}
165
+ ${Ip}
176
166
  \`\`\`
177
- `,dt=class dt extends q{constructor(t){super(t);d(this,"combinationClass",!0);d(this,"_widgetEvent",this.dv(new c.Event));d(this,"_echartsFunReact",this.dv(c.react(void 0)));d(this,"_instanceClassReact",this.dv(c.react(void 0)));const r=()=>{try{this.instanceClass=this.instanceClassStr&&Function(`"use strict";return (${this.instanceClassStr})`)()}catch{this.instanceClass=void 0}};r(),this.d(this.instanceClassStrChanged.don(r));{const i=()=>{if(this.innerHTML===void 0){this.instanceClassStr=void 0;return}const s=`class MyDiv {
167
+ `,Ln=class Ln extends j{constructor(e){super(e);d(this,"_widgetEvent",this.dv(new h.Event));d(this,"_echartsFunReact",this.dv(h.react(void 0)));d(this,"_instanceClassReact",this.dv(h.react(void 0)));const r=()=>{try{this.instanceClass=this.instanceClassStr&&Function(`"use strict";return (${this.instanceClassStr})`)()}catch{this.instanceClass=void 0}};r(),this.d(this.instanceClassStrChanged.don(r));{const i=()=>{if(this.innerHTML===void 0){this.instanceClassStr=void 0;return}const s=`class MyDiv {
178
168
  // container是Poi的div
179
169
  // geoCustomDivPoi指向当前的GeoCustomDivPoi场景对象
180
170
  // viewer指定当前的视口
@@ -190,7 +180,7 @@ ${Th}
190
180
  destroy() {
191
181
  this._container.removeChild(this._div);
192
182
  }
193
- }`;this.instanceClassStr=s};i(),this.d(this.innerHTMLChanged.don(i))}}get typeName(){return"ESGeoDiv"}get defaultProps(){return dt.createDefaultProps()}get widgetEvent(){return this._widgetEvent}get echartsFun(){return this._echartsFunReact.value}set echartsFun(t){this._echartsFunReact.value=t}get echartsFunChanged(){return this._echartsFunReact.changed}get instanceClass(){return this._instanceClassReact.value}set instanceClass(t){this._instanceClassReact.value=t}get instanceClassChanged(){return this._instanceClassReact.changed}getESProperties(){const t={...super.getESProperties()};return{...t,basic:[...t.basic,new S("透明度","透明度",!0,!1,[this,"opacity"],dt.defaults.opacity),new S("zOrder","zOrder",!0,!1,[this,"zOrder"],dt.defaults.zOrder),new ze("偏移比例","偏移比例.",!0,!1,[this,"anchor"],dt.defaults.anchor),new ni("innerHTML","注意设置此属性设置此属性会自动更新instanceClassStr变量",!0,!1,[this,"innerHTML"],dt.defaults.innerHTML,dt.defaults.innerHTMLReadMe),new ni("实例类","实例类",!0,!1,[this,"instanceClassStr"],dt.defaults.instanceClassStr,dt.defaults.instanceClassStrReadMe),new F("renderInUE","是否在UE中渲染",!0,!1,[this,"renderInUE"])]}}getProperties(t){return[...super.getProperties(t),new z("通用","通用",[new ze("偏移比例","偏移比例.",!0,!1,[this,"anchor"],dt.defaults.anchor),new S("透明度","透明度",!0,!1,[this,"opacity"],dt.defaults.opacity),new ni("innerHTML","注意设置此属性设置此属性会自动更新instanceClassStr变量",!0,!1,[this,"innerHTML"],dt.defaults.innerHTML,dt.defaults.innerHTMLReadMe),new ni("实例类","实例类",!0,!1,[this,"instanceClassStr"],dt.defaults.instanceClassStr,dt.defaults.instanceClassStrReadMe),new S("zOrder","zOrder",!0,!1,[this,"zOrder"],dt.defaults.zOrder)]),new z("UE特有","UE特有属性",[new F("renderInUE","是否在UE中渲染",!0,!1,[this,"renderInUE"])])]}};d(dt,"type",dt.register("ESGeoDiv",dt,{chsName:"ESGeoDiv",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"ESGeoDiv"})),d(dt,"defaults",{...q.defaults,opacity:1,anchor:[.5,1],instanceClassStr:yp,instanceClassStrReadMe:ky,innerHTML:Th,innerHTMLReadMe:Vy,zOrder:0,renderInUE:!1});let Co=dt;(n=>{n.createDefaultProps=()=>({...q.createDefaultProps(),opacity:1,anchor:c.reactArray([.5,1]),instanceClassStr:void 0,innerHTML:Th,zOrder:0,renderInUE:void 0})})(Co||(Co={})),c.extendClassProps(Co.prototype,Co.createDefaultProps);const Vs=class Vs extends le{constructor(t){super(t);d(this,"editingBindMode","doublePoints");this.collision=!1,this.stroked=!0,this.filled=!0,this.fillStyle={color:[1,1,1,.5],material:"",materialParams:{},ground:!1}}get typeName(){return"ESGeoRectangle"}get defaultProps(){return Vs.createDefaultProps()}toPolygon(){if(this.points&&this.points.length>=2){const t=[...this.points][0],r=[...this.points][1];return[t,[t[0],r[1],t[2]],r,[r[0],t[1],r[2]]]}else return}_updateArea(){if(this.points&&this.points.length>=2){const t=[...this.points],r=t[0],i=t[1],s=[r,[r[0],i[1],r[2]],i,[i[0],r[1],i[2]]];this._area.value=Oc(s)}else this._area.value=0}_updatePerimeter(){if(this.points&&this.points.length>=2){const t=[...this.points],r=t[0],i=t[1],s=[r,[r[0],i[1],r[2]],i,[i[0],r[1],i[2]]],o=[...s,s[0]],a=pu(o,"GEODESIC"),l=a[a.length-1];this._perimeter.value=l}else this._perimeter.value=0}getESProperties(){const t=super.getESProperties();return{...t,coordinate:[...t.coordinate,new S("面积","面积",!1,!0,[this,"area"]),new S("周长","周长",!1,!0,[this,"perimeter"])]}}getProperties(t){return[...super.getProperties(t),new z("计算","计算",[new S("面积","面积",!1,!0,[this,"area"]),new S("周长","周长",!1,!0,[this,"perimeter"])])]}};d(Vs,"type",Vs.register("ESGeoRectangle",Vs,{chsName:"矩形",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"矩形"})),d(Vs,"supportEditingModes",[...le.supportEditingModes,se.DoublePointsAppend,se.DoublePointsModify]),d(Vs,"defaults",{...le.defaults});let Po=Vs;(n=>{n.createDefaultProps=()=>({...le.createDefaultProps()})})(Po||(Po={})),c.extendClassProps(Po.prototype,Po.createDefaultProps);const Dh={translationX:0,translationY:0,translationZ:0,rotationHeading:0,rotationPitch:0,rotationRoll:0,scaleX:1,scaleY:1,scaleZ:1},Ii=class Ii extends q{constructor(t){super(t);d(this,"_nodeTransformations",this.dv(c.react(void 0)));d(this,"_czmModelReadyEvent",this.dv(new c.Event));d(this,"_setNodePositionEvent",this.dv(new c.Event));d(this,"_setNodeRotationEvent",this.dv(new c.Event));d(this,"_setNodeScaleEvent",this.dv(new c.Event));d(this,"_printDebugInfoEvent",this.dv(new c.Event));d(this,"setMaterialInfoEvent",this.ad(new c.Event));d(this,"_setMaterialEvent",this.disposeVar(new c.Event))}get typeName(){return"ESGltfModel"}get defaultProps(){return Ii.createDefaultProps()}get nodeTransformations(){return this._nodeTransformations.value}set nodeTransformations(t){this._nodeTransformations.value=t}get nodeTransformationsChanged(){return this._nodeTransformations.changed}get czmModelReadyEvent(){return this._czmModelReadyEvent}deleteNodeTransformation(t){if(!this.nodeTransformations||!this.nodeTransformations[t])return;const r={...this.nodeTransformations};delete r[t],this.nodeTransformations=r}get setNodePositionEvent(){return this._setNodePositionEvent}setNodePosition(t,r){this._setNodePositionEvent.emit(t,r),this._nodeTransformations.value||(this._nodeTransformations.value={});const i=this._nodeTransformations.value[t]??{...Dh};if(r.some(s=>!Number.isFinite(s))){console.error(`setNodePosition error: ${t} ${r}`);return}this._nodeTransformations.value={...this.nodeTransformations,[t]:{...i,translationX:r[0],translationY:r[1],translationZ:r[2]}}}get setNodeRotationEvent(){return this._setNodeRotationEvent}setNodeRotation(t,r){this._setNodeRotationEvent.emit(t,r),this._nodeTransformations.value||(this._nodeTransformations.value={});const i=this._nodeTransformations.value[t]??{...Dh};if(r.some(s=>!Number.isFinite(s))){console.error(`setNodeRotation error: ${t} ${r}`);return}this._nodeTransformations.value={...this.nodeTransformations,[t]:{...i,rotationHeading:r[0],rotationPitch:r[1],rotationRoll:r[2]}}}get setNodeScaleEvent(){return this._setNodeScaleEvent}setNodeScale(t,r){this._setNodeScaleEvent.emit(t,r),this._nodeTransformations.value||(this._nodeTransformations.value={});const i=this._nodeTransformations.value[t]??{...Dh};if(r.some(s=>!Number.isFinite(s)||s<0)){console.error(`setNodeScale error: !Number.isFinite(e) || e < 0 ${t} ${r}`);return}this._nodeTransformations.value={...this.nodeTransformations,[t]:{...i,scaleX:r[0],scaleY:r[1],scaleZ:r[2]}}}getNodePosition(t){if(!this.nodeTransformations)return;const r=this.nodeTransformations[t];if(r)return[r.translationX,r.translationY,r.translationZ]}getNodeRotation(t){if(!this.nodeTransformations)return;const r=this.nodeTransformations[t];if(r)return[r.rotationHeading,r.rotationPitch,r.rotationRoll]}getNodeScale(t){if(!this.nodeTransformations)return;const r=this.nodeTransformations[t];if(r)return[r.scaleX,r.scaleY,r.scaleZ]}get printDebugInfoEvent(){return this._printDebugInfoEvent}printDebugInfo(){this._printDebugInfoEvent.emit()}get setMaterialEvent(){return this._setMaterialEvent}setMaterial(t){return new Promise(r=>{const i=new c.Destroyable;i.ad(this.setMaterialInfoEvent.donce(s=>{i.destroy(),r(s)})),this._setMaterialEvent.emit(t)})}setLight122(){this.czmEnvironmentMapManager={...Eh}}getESProperties(){const t={...super.getESProperties()};return{...t,defaultMenu:"dataSource",dataSource:[...t.dataSource,new U("模型路径","模型路径地址",!0,!1,[this,"url"],Ii.defaults.url),new U("实例化矩阵","实例化矩阵",!0,!1,[this,"instances"],Ii.defaults.instances)]}}getProperties(t){return[...super.getProperties(t),new z("通用","通用",[new U("模型路径","模型路径地址",!1,!1,[this,"url"]),new z("czm","czm",[new ze("czmImageBasedLightingFactor","反射强度 ,imageBasedLightingFactor",!1,!1,[this,"czmImageBasedLightingFactor"]),new S("czmAtmosphereScatteringIntensity","大气散射强度 ,atmosphereScatteringIntensity",!1,!1,[this,"czmAtmosphereScatteringIntensity"]),new U("czmEnvironmentMapManager","动态环境贴图管理器",!1,!1,[this,"czmEnvironmentMapManager"]),new ie("控制台输出模型信息","控制台输出模型信息",[],()=>this.printDebugInfo(),[]),new S("最大缩放比例","最大缩放值",!0,!1,[this,"czmMaximumScale"]),new S("统一缩放值","统一缩放值",!1,!1,[this,"czmNativeScale"]),new S("最小像素尺寸","最小像素尺寸,若为0表示不使用最小像素尺寸。",!1,!1,[this,"czmMinimumPixelSize"]),new J("颜色"," A Property specifying the color.",!1,!1,[this,"czmColor"]),new U("实例化矩阵","实例化矩阵",!0,!1,[this,"instances"],Ii.defaults.instances)])])]}};d(Ii,"type",Ii.register("ESGltfModel",Ii,{chsName:"模型",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"gltf模型"})),d(Ii,"defaults",{...q.defaults,url:"${earthsdk3-assets-script-dir}/assets/glb/building.glb",instances:[]});let Io=Ii;(n=>{n.createDefaultProps=()=>({...q.createDefaultProps(),url:n.defaults.url,czmMaximumScale:void 0,czmMinimumPixelSize:0,czmNativeScale:1,czmColor:c.reactArray([1,1,1,1]),allowPicking:!0,instances:c.reactArrayWithUndefined(void 0),czmImageBasedLightingFactor:c.reactArray([1,1]),czmAtmosphereScatteringIntensity:2,czmEnvironmentMapManager:c.reactJsonWithUndefined(void 0)})})(Io||(Io={})),c.extendClassProps(Io.prototype,Io.createDefaultProps);const rn=class rn extends q{constructor(t){super(t);d(this,"_aiMoveToEvent",this.dv(new c.Event));d(this,"_stopAIMoveEvent",this.dv(new c.Event))}get typeName(){return"ESHuman"}get defaultProps(){return rn.createDefaultProps()}get aiMoveToEvent(){return this._aiMoveToEvent}aiMoveTo(t,r){this._aiMoveToEvent.emit(t,r)}get stopAIMoveEvent(){return this._stopAIMoveEvent}stopAIMove(){this._stopAIMoveEvent.emit()}getESProperties(){const t={...super.getESProperties()};return{...t,basic:[...t.basic,new H("模式","mode",!0,!1,[this,"mode"],rn.defaults.modes,rn.defaults.mode),new H("动画","animation",!0,!1,[this,"animation"],rn.defaults.animations,rn.defaults.animation)]}}getProperties(t){return[...super.getProperties(t),new z("通用","通用",[new ie("自动寻路","aiMoveTo",["numbers","number"],(r,i)=>this.aiMoveTo(r,i),[[0,0,0],0]),new ie("stopAIMove","stopAIMove",[],()=>this.stopAIMove(),[]),new H("mode","mode",!1,!1,[this,"mode"],rn.defaults.modes),new H("动画","animation",!1,!1,[this,"animation"],rn.defaults.animations)])]}};d(rn,"type",rn.register("ESHuman",rn,{chsName:"人员",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"工人 警察 路人"})),d(rn,"defaults",{...q.defaults,modes:[["工人","worker"],["警察","police"],["路人","pedestrian"],["陌生人","stranger"],["男士","suitMan"],["女士","suitWoman"]],mode:"worker",animations:[["站立","standing"],["行走","walking"],["奔跑","running"]],animation:"standing",czmAnimationsStand:[{index:0,name:"Stand",loop:"REPEAT",animationTime:"(duration) => Date.now() / 1000 / duration"}],czmAnimationsWalk:[{index:2,name:"Walk",loop:"REPEAT",animationTime:"(duration) => Date.now() / 1000 / duration"}],czmAnimationsRun:[{index:1,name:"Run",loop:"REPEAT",animationTime:"(duration) => Date.now() / 1000 / duration"}]});let wi=rn;(n=>{n.createDefaultProps=()=>({...q.createDefaultProps(),mode:"worker",animation:"standing",allowPicking:!0})})(wi||(wi={})),c.extendClassProps(wi.prototype,wi.createDefaultProps);const Ti=class Ti extends ft{get typeName(){return"ESImageLabel"}get defaultProps(){return Ti.createDefaultProps()}constructor(e){super(e),this.anchor=Ti.defaults.anchor,this.renderMode=Ti.defaults.renderMode}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new U("图片路径","图片路径",!1,!1,[this,"url"],Ti.defaults.url),new F("悬浮放大","是否开启悬浮放大",!1,!1,[this,"isHoverZoom"])]}}getProperties(e){return[...super.getProperties(e),new z("通用","通用",[new U("图片路径","图片路径",!1,!1,[this,"url"]),new F("悬浮放大","是否开启悬浮放大",!1,!1,[this,"isHoverZoom"])])]}};d(Ti,"type",Ti.register("ESImageLabel",Ti,{chsName:"图片标签",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"基础图片标签。"})),d(Ti,"defaults",{...ft.defaults,url:"inner://CameraBlue.png",anchor:[.5,1],renderMode:4,isHoverZoom:!1});let To=Ti;(n=>{n.createDefaultProps=()=>({...ft.createDefaultProps(),url:"inner://CameraBlue.png",isHoverZoom:!1})})(To||(To={})),c.extendClassProps(To.prototype,To.createDefaultProps);const _p=`
183
+ }`;this.instanceClassStr=s};i(),this.d(this.innerHTMLChanged.don(i))}}get widgetEvent(){return this._widgetEvent}get echartsFun(){return this._echartsFunReact.value}set echartsFun(e){this._echartsFunReact.value=e}get echartsFunChanged(){return this._echartsFunReact.changed}get instanceClass(){return this._instanceClassReact.value}set instanceClass(e){this._instanceClassReact.value=e}get instanceClassChanged(){return this._instanceClassReact.changed}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new L([this,"opacity"],"透明度",Ln.defaults.opacity,!0),new L([this,"zOrder"],"zOrder",Ln.defaults.zOrder,!0),new ge([this,"anchor"],"偏移比例",Ln.defaults.anchor,!0),new Fi([this,"innerHTML"],"innerHTML",Ln.defaults.innerHTML,Xy,!0),new Fi([this,"instanceClassStr"],"实例类",Ln.defaults.instanceClassStr,qy,!0),new W([this,"renderInUE"],"是否在UE中渲染",!0,!1)]}}};d(Ln,"createDefaultProps",()=>({...j.createDefaultProps(),opacity:1,anchor:h.reactArray([.5,1]),instanceClassStr:Cp,innerHTML:Ip,zOrder:0,renderInUE:!1})),d(Ln,"type",Ln.register("ESGeoDiv",Ln,{chsName:"ESGeoDiv",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"ESGeoDiv"}));let Tc=Ln;const Ws=class Ws extends yt{constructor(e){super(e);d(this,"editingBindMode","doublePoints")}toPolygon(){if(this.points&&this.points.length>=2){const e=[...this.points][0],r=[...this.points][1];return[e,[e[0],r[1],e[2]],r,[r[0],e[1],r[2]]]}else return}_updateArea(){if(this.points&&this.points.length>=2){const e=[...this.points],r=e[0],i=e[1],s=[r,[r[0],i[1],r[2]],i,[i[0],r[1],i[2]]];this._area.value=_l(s)}else this._area.value=0}_updatePerimeter(){if(this.points&&this.points.length>=2){const e=[...this.points],r=e[0],i=e[1],s=[r,[r[0],i[1],r[2]],i,[i[0],r[1],i[2]]],o=[...s,s[0]],a=Xa(o,"GEODESIC"),u=a[a.length-1];this._perimeter.value=u}else this._perimeter.value=0}getESProperties(){const e=super.getESProperties();return{...e,coordinate:[...e.coordinate,new L([this,"area"],"面积",0,!1,!0),new L([this,"perimeter"],"周长",0,!1,!0)]}}};d(Ws,"createDefaultProps",()=>({...yt.createDefaultProps(),collision:!1,stroked:!0,filled:!0,fillStyle:h.reactJson({color:[1,1,1,.5],material:"",materialParams:{},ground:!1})})),d(Ws,"type",Ws.register("ESGeoRectangle",Ws,{chsName:"矩形",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"矩形"})),d(Ws,"supportEditingModes",[...yt.supportEditingModes,B.DoublePointsAppend,B.DoublePointsModify]);let Oc=Ws;const Dc={translationX:0,translationY:0,translationZ:0,rotationHeading:0,rotationPitch:0,rotationRoll:0,scaleX:1,scaleY:1,scaleZ:1},os=class os extends j{constructor(e){super(e);d(this,"_nodeTransformations",this.dv(h.react(void 0)));d(this,"_czmModelReadyEvent",this.dv(new h.Event));d(this,"_setNodePositionEvent",this.dv(new h.Event));d(this,"_setNodeRotationEvent",this.dv(new h.Event));d(this,"_setNodeScaleEvent",this.dv(new h.Event));d(this,"_printDebugInfoEvent",this.dv(new h.Event));d(this,"setMaterialInfoEvent",this.ad(new h.Event));d(this,"_setMaterialEvent",this.disposeVar(new h.Event))}get nodeTransformations(){return this._nodeTransformations.value}set nodeTransformations(e){this._nodeTransformations.value=e}get nodeTransformationsChanged(){return this._nodeTransformations.changed}get czmModelReadyEvent(){return this._czmModelReadyEvent}deleteNodeTransformation(e){if(!this.nodeTransformations||!this.nodeTransformations[e])return;const r={...this.nodeTransformations};delete r[e],this.nodeTransformations=r}get setNodePositionEvent(){return this._setNodePositionEvent}setNodePosition(e,r){this._setNodePositionEvent.emit(e,r),this._nodeTransformations.value||(this._nodeTransformations.value={});const i=this._nodeTransformations.value[e]??{...Dc};if(r.some(s=>!Number.isFinite(s))){console.error(`setNodePosition error: ${e} ${r}`);return}this._nodeTransformations.value={...this.nodeTransformations,[e]:{...i,translationX:r[0],translationY:r[1],translationZ:r[2]}}}get setNodeRotationEvent(){return this._setNodeRotationEvent}setNodeRotation(e,r){this._setNodeRotationEvent.emit(e,r),this._nodeTransformations.value||(this._nodeTransformations.value={});const i=this._nodeTransformations.value[e]??{...Dc};if(r.some(s=>!Number.isFinite(s))){console.error(`setNodeRotation error: ${e} ${r}`);return}this._nodeTransformations.value={...this.nodeTransformations,[e]:{...i,rotationHeading:r[0],rotationPitch:r[1],rotationRoll:r[2]}}}get setNodeScaleEvent(){return this._setNodeScaleEvent}setNodeScale(e,r){this._setNodeScaleEvent.emit(e,r),this._nodeTransformations.value||(this._nodeTransformations.value={});const i=this._nodeTransformations.value[e]??{...Dc};if(r.some(s=>!Number.isFinite(s)||s<0)){console.error(`setNodeScale error: !Number.isFinite(e) || e < 0 ${e} ${r}`);return}this._nodeTransformations.value={...this.nodeTransformations,[e]:{...i,scaleX:r[0],scaleY:r[1],scaleZ:r[2]}}}getNodePosition(e){if(!this.nodeTransformations)return;const r=this.nodeTransformations[e];if(r)return[r.translationX,r.translationY,r.translationZ]}getNodeRotation(e){if(!this.nodeTransformations)return;const r=this.nodeTransformations[e];if(r)return[r.rotationHeading,r.rotationPitch,r.rotationRoll]}getNodeScale(e){if(!this.nodeTransformations)return;const r=this.nodeTransformations[e];if(r)return[r.scaleX,r.scaleY,r.scaleZ]}get printDebugInfoEvent(){return this._printDebugInfoEvent}printDebugInfo(){this._printDebugInfoEvent.emit()}get setMaterialEvent(){return this._setMaterialEvent}setMaterial(e){return new Promise(r=>{const i=new h.Destroyable;i.ad(this.setMaterialInfoEvent.donce(s=>{i.destroy(),r(s)})),this._setMaterialEvent.emit(e)})}setLight122(){this.czmEnvironmentMapManager={...cc}}getESProperties(){const e={...super.getESProperties()};return{...e,defaultMenu:"dataSource",dataSource:[...e.dataSource,new Q([this,"url"],"模型路径",os.defaults.url,void 0,!0),new Q([this,"instances"],"实例化矩阵",os.defaults.instances,void 0,!0)],more:[...e.more,new ge([this,"czmImageBasedLightingFactor"]),new L([this,"czmAtmosphereScatteringIntensity"]),new Q([this,"czmEnvironmentMapManager"]),new nt([],()=>this.printDebugInfo(),[],"控制台输出模型信息"),new L([this,"czmMaximumScale"],"最大缩放比例",void 0,!0),new L([this,"czmNativeScale"],"统一缩放值"),new L([this,"czmMinimumPixelSize"],"最小像素尺寸"),new _t([this,"czmColor"],"颜色")]}}};d(os,"createDefaultProps",()=>({...j.createDefaultProps(),url:"${earthsdk3-assets-script-dir}/assets/glb/building.glb",czmMaximumScale:void 0,czmMinimumPixelSize:0,czmNativeScale:1,czmColor:h.reactArray([1,1,1,1]),allowPicking:!0,instances:h.reactArrayWithUndefined([]),czmImageBasedLightingFactor:h.reactArray([1,1]),czmAtmosphereScatteringIntensity:2,czmEnvironmentMapManager:h.reactJsonWithUndefined(void 0)})),d(os,"type",os.register("ESGltfModel",os,{chsName:"模型",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"gltf模型"}));let Mc=os;const an=class an extends j{constructor(e){super(e);d(this,"_aiMoveToEvent",this.dv(new h.Event));d(this,"_stopAIMoveEvent",this.dv(new h.Event))}get aiMoveToEvent(){return this._aiMoveToEvent}aiMoveTo(e,r){this._aiMoveToEvent.emit(e,r)}get stopAIMoveEvent(){return this._stopAIMoveEvent}stopAIMove(){this._stopAIMoveEvent.emit()}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new pt([this,"mode"],an.modes,"模式",an.defaults.mode,!0),new pt([this,"animation"],an.animations,"动画",an.defaults.animation,!0)],more:[...e.more,new nt(["numbers","number"],(r,i)=>this.aiMoveTo(r,i),[[0,0,0],0],"自动寻路"),new nt([],()=>this.stopAIMove(),[],"停止自动寻路")]}}};d(an,"createDefaultProps",()=>({...j.createDefaultProps(),mode:"worker",animation:"standing",allowPicking:!0})),d(an,"type",an.register("ESHuman",an,{chsName:"人员",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"工人 警察 路人"})),d(an,"modes",[["工人","worker"],["警察","police"],["路人","pedestrian"],["陌生人","stranger"],["男士","suitMan"],["女士","suitWoman"]]),d(an,"animations",[["站立","standing"],["行走","walking"],["奔跑","running"]]);let Fo=an;const qs=class qs extends Rr{constructor(t){super(t)}getESProperties(){const t={...super.getESProperties()};return{...t,basic:[...t.basic,new Q([this,"url"],"图片路径",qs.defaults.url),new W([this,"isHoverZoom"],"悬浮放大")]}}};d(qs,"createDefaultProps",()=>({...Rr.createDefaultProps(),url:"inner://CameraBlue.png",isHoverZoom:!1,renderMode:4})),d(qs,"type",qs.register("ESImageLabel",qs,{chsName:"图片标签",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE","_ES_Impl_Ol"],description:"基础图片标签。"}));let xc=qs;const ii=class ii extends Rt{constructor(t){super(t),this.ad(h.bind([this,"czmSplitDirection"],[this,"splitDirection"])),this.ad(h.bind([this,"czmAlpha"],[this,"opacity"]))}getESProperties(){const t={...super.getESProperties()};return{...t,defaultMenu:"dataSource",basic:[...t.basic,new L([this,"zIndex"],"层级序号",ii.defaults.zIndex)],dataSource:[...t.dataSource,new Q([this,"url"],"影像服务地址"),new hn([this,"rectangle"],"矩形范围",ii.defaults.rectangle,!0),new we([this,"maximumLevel"],1,[1,24],"最大级别",ii.defaults.maximumLevel,!0),new Q([this,"options"],"options",ii.defaults.options,void 0,!0),new ot([this,"targetID"],"targetID"),new we([this,"opacity"],.01,[0,1],"opacity",1)],more:[...t.more,new rt([],"通用"),new L([this,"height"],"高度"),new ot([this,"actorTag"]),new ot([this,"componentTag"]),new L([this,"minimumLevel"]),new rt([],"图像"),new L([this,"czmAlpha"],"透明度"),new L([this,"czmBrightness"],"亮度"),new L([this,"czmContrast"],"对比度"),new L([this,"czmHue"],"色相"),new L([this,"czmSaturation"],"饱和度"),new L([this,"czmGamma"],"伽马值")]}}};d(ii,"createDefaultProps",()=>({...Rt.createDefaultProps(),url:"",rectangle:h.reactJsonWithUndefined([-180,-90,180,90]),options:h.reactJsonWithUndefined(void 0),zIndex:0,actorTag:"",componentTag:"",maximumLevel:22,minimumLevel:0,targetID:"",czmSplitDirection:"NONE",czmAlpha:1,czmBrightness:1,czmContrast:1,czmHue:0,czmSaturation:1,czmGamma:1,opacity:1,splitDirection:"NONE"})),d(ii,"type",ii.register("ESImageryLayer",ii,{chsName:"影像图层",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE","_ES_Impl_Ol"],description:"影像图层"}));let Lc=ii;const Yy=`
194
184
  # 声明文件
195
185
  ### options 类型
196
186
  \`\`\`javascript
@@ -296,14 +286,14 @@ export type ESJTimeIntervalCollectionJsonType = {
296
286
  };
297
287
 
298
288
  \`\`\`
299
- `,Tn=class Tn extends ve{get typeName(){return"ESImageryLayer"}get defaultProps(){return Tn.createDefaultProps()}constructor(e){super(e),this.ad(c.bind([this,"czmSplitDirection"],[this,"splitDirection"])),this.ad(c.bind([this,"czmAlpha"],[this,"opacity"]))}getESProperties(){const e={...super.getESProperties()};return{...e,defaultMenu:"dataSource",basic:[...e.basic,new S("层级序号","层级序号",!1,!1,[this,"zIndex"],Tn.defaults.zIndex)],dataSource:[...e.dataSource,new U("影像服务地址","影像服务地址",!1,!1,[this,"url"]),new or("矩形范围","西南东北",!0,!1,[this,"rectangle"],Tn.defaults.rectangle),new Me("最大级别","最大级别.",!0,!1,[this,"maximumLevel"],1,[1,24],Tn.defaults.maximumLevel),new U("options","options",!0,!1,[this,"options"],Tn.defaults.options),new Z("targetID","targetID",!1,!1,[this,"targetID"],""),new Me("opacity","opacity",!1,!1,[this,"opacity"],.01,[0,1],1)]}}getProperties(e){return[...super.getProperties(e),new z("ESImageryLayer","ESImageryLayer",[new U("影像服务地址","影像服务地址",!1,!1,[this,"url"]),new z("通用","通用",[new or("矩形范围","西南东北",!0,!1,[this,"rectangle"],Tn.defaults.rectangle),new S("高度","A numeric Property specifying the height.",!1,!1,[this,"height"]),new S("zIndex","层级",!1,!1,[this,"zIndex"]),new Z("actorTag","actorTag",!1,!1,[this,"actorTag"]),new Z("componentTag","componentTag",!1,!1,[this,"componentTag"]),new S("minimumLevel","minimumLevel",!1,!1,[this,"minimumLevel"]),new S("maximumLevel","maximumLevel",!1,!1,[this,"maximumLevel"]),new U("options","options",!0,!1,[this,"options"],{},_p),new Z("targetID","targetID",!1,!1,[this,"targetID"]),new Me("opacity","opacity",!1,!1,[this,"opacity"],.01,[0,1],1)]),new z("czm","czm",[new S("透明度","透明度,The alpha blending value of this layer, from 0.0 to 1.0.",!1,!1,[this,"czmAlpha"]),new S("亮度","亮度,The brightness of this layer. 1.0 uses the unmodified imagery color.",!1,!1,[this,"czmBrightness"]),new S("对比度","对比度,The contrast of this layer. 1.0 uses the unmodified imagery color.",!1,!1,[this,"czmContrast"]),new S("色相","色相,The hue of this layer. 0.0 uses the unmodified imagery color. ",!1,!1,[this,"czmHue"]),new S("饱和度","饱和度,The saturation of this layer. 1.0 uses the unmodified imagery color. ",!1,!1,[this,"czmSaturation"]),new S("伽马值","伽马,The gamma correction to apply to this layer. 1.0 uses the unmodified imagery color.",!1,!1,[this,"czmGamma"])]),new z("ol","ol",[new S("透明度","透明度,The alpha blending value of this layer, from 0.0 to 1.0.",!1,!1,[this,"olAlpha"]),new S("亮度","亮度,The brightness of this layer. 1.0 uses the unmodified imagery color.",!1,!1,[this,"olBrightness"]),new S("对比度","对比度,The contrast of this layer. 1.0 uses the unmodified imagery color.",!1,!1,[this,"olContrast"]),new S("色相","色相,The hue of this layer. 0.0 uses the unmodified imagery color. ",!1,!1,[this,"olHue"]),new S("饱和度","饱和度,The saturation of this layer. 1.0 uses the unmodified imagery color. ",!1,!1,[this,"olSaturation"]),new S("伽马值","伽马,The gamma correction to apply to this layer. 1.0 uses the unmodified imagery color.",!1,!1,[this,"olGamma"])])])]}};d(Tn,"type",Tn.register("ESImageryLayer",Tn,{chsName:"影像图层",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE","_ES_Impl_Ol"],description:"影像图层"})),d(Tn,"defaults",{...ve.defaults,url:"",rectangle:[-180,-90,180,90],options:{},zIndex:0,actorTag:"",componentTag:"",minimumLevel:0,maximumLevel:22,targetID:"",opacity:1,splitDirection:"NONE",splitDirectionEnum:[["LEFT","LEFT"],["NONE","NONE"],["RIGHT","RIGHT"]],czmAlpha:1,czmBrightness:1,czmContrast:1,czmHue:0,czmSaturation:1,czmGamma:1,czmSubdomains:[],olAlpha:1,olBrightness:1,olContrast:1,olHue:0,olSaturation:1,olGamma:1,olSubdomains:[]});let Do=Tn;(n=>{n.createDefaultProps=()=>({...ve.createDefaultProps(),url:"",rectangle:c.reactJsonWithUndefined(void 0),options:c.reactJsonWithUndefined(void 0),zIndex:0,actorTag:"",componentTag:"",maximumLevel:22,minimumLevel:0,targetID:"",czmSplitDirection:"NONE",czmAlpha:1,czmBrightness:1,czmContrast:1,czmHue:0,czmSaturation:1,czmGamma:1,opacity:1,splitDirection:"NONE",olAlpha:1,olBrightness:1,olContrast:1,olHue:0,olSaturation:1,olGamma:1})})(Do||(Do={})),c.extendClassProps(Do.prototype,Do.createDefaultProps);const xr=class xr extends q{get typeName(){return"ESLocalSkyBox"}get defaultProps(){return xr.createDefaultProps()}constructor(e){super(e),this.collision=!1,this.allowPicking=!1}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new S("尺寸","圆直径或包围盒边长",!1,!1,[this,"size"],xr.defaults.size),new F("自动跟随","是否跟随相机",!1,!1,[this,"autoFollow"],xr.defaults.autoFollow),new H("mode","模式",!1,!1,[this,"mode"],xr.defaults.modes,"blueSky")]}}getProperties(e){return[...super.getProperties(e),new z("通用","通用",[new S("size","圆直径或包围盒边长",!1,!1,[this,"size"],xr.defaults.size),new F("autoFollow","是否跟随相机(自动跟随效果为渐变,会在5000米左右消失)",!1,!1,[this,"autoFollow"],xr.defaults.autoFollow),new S("autoOpacityFactor","自动消失系数",!1,!1,[this,"autoOpacityFactor"],xr.defaults.autoOpacityFactor),new H("mode","模式",!1,!1,[this,"mode"],xr.defaults.modes)])]}};d(xr,"type",xr.register("ESLocalSkyBox",xr,{chsName:"局部天空盒",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"效果类"})),d(xr,"defaults",{...q.defaults,size:1e4,autoFollow:!0,autoOpacityFactor:2,modes:[["baiyun","baiyun"],["blueSky","blueSky"],["clearSky","clearSky"],["dream","dream"],["starrySky","starrySky"],["sunnySky","sunnySky"],["sunSets","sunSets"]]});let No=xr;(n=>{n.createDefaultProps=()=>({...q.createDefaultProps(),size:1e4,autoFollow:!0,autoOpacityFactor:2,mode:"blueSky"})})(No||(No={})),c.extendClassProps(No.prototype,No.createDefaultProps);const La=class La extends q{constructor(t){super(t);d(this,"_location",this.disposeVar(c.react(void 0)));{const r=()=>{this.location=this.position};r(),this.ad(this.positionChanged.don(r))}}get typeName(){return"ESLocationMeasurement"}get defaultProps(){return La.createDefaultProps()}get location(){return this._location.value}set location(t){this._location.value=t}get locationChanged(){return this._location.changed}getProperties(t){return[...super.getProperties(t)]}};d(La,"type",La.register("ESLocationMeasurement",La,{chsName:"位置测量点",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"位置测量点"})),d(La,"defaults",{...q.defaults});let bo=La;(n=>{n.createDefaultProps=()=>({...q.createDefaultProps()})})(bo||(bo={})),c.extendClassProps(bo.prototype,bo.createDefaultProps);const Ot=class Ot extends q{constructor(t){super(t);d(this,"_player",this.dv(new Jn));{const r=Ot.defaults;this.d(c.bind([this._player,"loop"],[this,"playingLoop"],i=>i??r.playingLoop,i=>i??r.playingLoop)),this.d(c.bind([this._player,"currentTime"],[this,"currentTime"],i=>i??r.currentTime,i=>i??r.currentTime)),this.d(c.bind([this._player,"duration"],[this,"duration"],i=>i??r.duration,i=>i??r.duration)),this.d(c.bind([this._player,"playing"],[this,"playing"],i=>i??r.playing,i=>i??r.playing)),this.d(c.bind([this._player,"speed"],[this,"playingSpeed"],i=>i??r.playingSpeed,i=>i??r.playingSpeed))}}get typeName(){return"ESParticleSystemPrimitive"}get defaultProps(){return Ot.createDefaultProps()}get player(){return this._player}get ratio(){return this._player.ratio}set ratio(t){this._player.ratio=t}get ratioChanged(){return this._player.ratioChanged}getProperties(t){return[...super.getProperties(t),new z("通用","通用",[new ie("飞入","飞入",["number"],r=>this.flyTo(r),[1e3]),new ni("更新回调函数","The callback function to be called each frame to update a particle.",!0,!1,[this,"updateCallback"]),new S("发射率","emissionRate,The number of particles to emit per second.",!0,!1,[this,"emissionRate"],5),new F("是否循环","loop,Whether the particle system should loop its bursts when it is complete.",!0,!1,[this,"loop"],!0),new S("等级","scale,Sets the scale to apply to the image of the particle for the duration of its particleLife.",!0,!1,[this,"particleScale"],1),new S("初始等级","startScale,The initial scale to apply to the image of the particle at the beginning of its life.",!0,!1,[this,"startScale"]),new S("结束等级","endScale,The final scale to apply to the image of the particle at the end of its life.",!0,!1,[this,"endScale"],Ot.defaults.endScale),new J("颜色","Sets the color of a particle for the duration of its particleLife.",!0,!1,[this,"color"]),new J("初始颜色","The color of the particle at the beginning of its life.",!0,!1,[this,"startColor"]),new J("结束颜色","The color of the particle at the end of its life.",!0,!1,[this,"endColor"]),new F("尺寸单位为米","Sets if the size of particles is in meters or pixels. true to size the particles in meters; otherwise, the size is in pixels.",!0,!1,[this,"sizeInMeters"]),new S("速度","speed,If set, overrides the minimumSpeed and maximumSpeed inputs with this value.",!0,!1,[this,"speed"],1),new S("最小速度","minimumSpeed,Sets the minimum bound in meters per second above which a particles actual speed will be randomly chosen.",!0,!1,[this,"minimumSpeed"]),new S("最大速度","maximumSpeed,Sets the maximum bound in meters per second below which a particles actual speed will be randomly chosen.",!0,!1,[this,"maximumSpeed"]),new S("生命周期","lifetime,How long the particle system will emit particles, in seconds.",!0,!1,[this,"lifetime"],Number.MAX_VALUE),new S("粒子生命周期","particleLife,If set, overrides the minimumParticleLife and maximumParticleLife inputs with this value.",!0,!1,[this,"particleLife"],Ot.defaults.particleLife),new S("最小粒子生命周期","minimumParticleLife,Sets the minimum bound in seconds for the possible duration of a particles life above which a particles actual life will be randomly chosen.",!0,!1,[this,"minimumParticleLife"]),new S("最大粒子生命周期","maximumParticleLife,Sets the maximum bound in seconds for the possible duration of a particles life below which a particles actual life will be randomly chosen.",!0,!1,[this,"maximumParticleLife"]),new S("块数量","mass,Sets the minimum and maximum mass of particles in kilograms.",!0,!1,[this,"mass"],1),new S("最小块数量","minimumMass,Sets the minimum bound for the mass of a particle in kilograms. A particles actual mass will be chosen as a random amount above this value.",!0,!1,[this,"minimumMass"]),new S("最大块数量","maximumMass,Sets the maximum mass of particles in kilograms. A particles actual mass will be chosen as a random amount below this value.",!0,!1,[this,"maximumMass"]),new ze("图片尺寸","imageSize",!0,!1,[this,"imageSize"],Ot.defaults.imageSize),new ze("最小图片尺寸","minimumImageSize",!0,!1,[this,"minimumImageSize"]),new ze("最大图片尺寸","maximumImageSize",!0,!1,[this,"maximumImageSize"]),new Vl("图片","The URI, HTMLImageElement, or HTMLCanvasElement to use for the billboard.",!0,!1,[this,"image"],Ot.defaults.image),new It("偏移","translation",!0,!1,[this,"translation"],[0,0,0]),new wc("bursts","bursts",!0,!1,[this,"bursts"]),new U("emitter","emitter",!1,!1,[this,"emitter"],Ot.defaults.emitter)]),new z("播放器","播放器",[new S("播放比率","播放比率(0-1)",!0,!1,[this,"ratio"],Ot.defaults.ratio),new Eu("播放器","播放器",[this,"playing"],[this,"ratio"],[this,"playingLoop"]),new F("是否循环","是否循环.",!0,!1,[this,"playingLoop"],Ot.defaults.playingLoop),new S("当前时间","当前时间",!0,!1,[this,"currentTime"],Ot.defaults.currentTime),new S("过渡时间","过渡时间",!0,!1,[this,"duration"],Ot.defaults.duration),new F("是否播放","是否播放.",!0,!1,[this,"playing"],Ot.defaults.playing),new S("播放速度","播放速度.",!0,!1,[this,"playingSpeed"],Ot.defaults.playingSpeed)])]}};d(Ot,"type",Ot.register("ESParticleSystemPrimitive",Ot,{chsName:"粒子",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"通过Cesium的Primitive API 实现的粒子特效。"})),d(Ot,"defaults",{...q.defaults,playingLoop:!0,currentTime:0,playerCurrentTime:0,duration:6e3,playingSpeed:1,playing:!0,ratio:0,particleLife:.5,endScale:4,imageSize:[20,20],image:"${earthsdk3-assets-script-dir}/assets/img/smoke.png",emitter:{type:"CircleEmitter",radius:.5}});let Oo=Ot;(n=>{n.createDefaultProps=()=>({...q.createDefaultProps(),emitter:c.reactJsonWithUndefined(void 0),bursts:c.reactArrayCollectionWithUndefined(void 0),translation:c.reactArrayWithUndefined(void 0),positionEditing:void 0,image:void 0,imageSize:c.reactArrayWithUndefined(void 0),minimumImageSize:c.reactArrayWithUndefined(void 0),maximumImageSize:c.reactArrayWithUndefined(void 0),updateCallback:void 0,emissionRate:void 0,loop:void 0,particleScale:void 0,startScale:void 0,endScale:void 0,color:c.reactArrayWithUndefined(void 0),startColor:c.reactArrayWithUndefined(void 0),endColor:c.reactArrayWithUndefined(void 0),sizeInMeters:void 0,speed:void 0,minimumSpeed:void 0,maximumSpeed:void 0,lifetime:void 0,particleLife:void 0,minimumParticleLife:void 0,maximumParticleLife:void 0,mass:void 0,minimumMass:void 0,maximumMass:void 0,playingLoop:void 0,currentTime:void 0,duration:void 0,playingSpeed:void 0,playing:void 0})})(Oo||(Oo={})),c.extendClassProps(Oo.prototype,Oo.createDefaultProps);const Lr=class Lr extends ft{constructor(t){super(t);d(this,"initialStyle",this.ad(c.reactJsonWithUndefined(void 0)));d(this,"_getInitialStyleEvent",this.disposeVar(new c.Event))}get typeName(){return"ESPoi2D"}get defaultProps(){return Lr.createDefaultProps()}get getInitialStyleEvent(){return this._getInitialStyleEvent}getInitialStyle(){return Promise.race([new Promise(t=>{const r=this.d(this.initialStyle.changed.disposableOnce(t));this.getInitialStyleEvent.emit(),setTimeout(()=>{r(),t(void 0)},2e3)})])}getESProperties(){const t={...super.getESProperties()};return{...t,basic:[...t.basic,new H("模式","mode",!1,!1,[this,"mode"],Lr.defaults.modes,Lr.defaults.mode),new U("样式","style",!1,!1,[this,"style"],Lr.defaults.style),new F("自动锚点对齐","autoAnchor",!1,!1,[this,"autoAnchor"],Lr.defaults.autoAnchor)]}}getProperties(t){return[...super.getProperties(t),new z("通用","通用",[new H("模式","mode",!1,!1,[this,"mode"],Lr.defaults.modes),new U("样式","style",!1,!1,[this,"style"],Lr.defaults.style),new F("自动锚点对齐","autoAnchor",!1,!1,[this,"autoAnchor"],Lr.defaults.autoAnchor)])]}};d(Lr,"type",Lr.register("ESPoi2D",Lr,{chsName:"ESPoi2D",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"三角形,菱形"})),d(Lr,"defaults",{...ft.defaults,modes:[["自定义","Custom"],["SquareH01","SquareH01"],["SquareH02","SquareH02"],["SquareV01","SquareV01"],["SquareV02","SquareV02"],["SquareV03","SquareV03"],["SquareV04","SquareV04"],["Flag01","Flag01"],["Flag02","Flag02"],["Linear01","Linear01"],["Linear02","Linear02"],["Linear03","Linear03"],["CircularH01","CircularH01"],["CircularH02","CircularH02"],["CircularV01","CircularV01"],["CircularV02","CircularV02"],["CircularV03","CircularV03"],["CircularV04","CircularV04"],["CircularV05","CircularV05"],["P3D01","P3D01"],["P3D02","P3D02"],["P3D03","P3D03"],["P3D04","P3D04"],["P3D05","P3D05"],["P3D06","P3D06"],["P3D07","P3D07"],["Diamond01","Diamond01"],["Diamond02","Diamond02"],["Stranger","Stranger"],["ManNormal","ManNormal"],["ManAbnormal","ManAbnormal"],["WomanNormal","WomanNormal"],["WomanAbnormal","WomanAbnormal"],["Camera","Camera"]],mode:"SquareH01",style:{fontSize:16,imageSize:[60,60],textBackgroundColor:[1,1,1,0],textBackgroundSize:[120,30],textColor:[1,1,1,1],textOffset:[10,2],textBoxOffset:[40,0],textBoxAlign:"start",textBoxShow:!0,textBoxMode:"default"},autoAnchor:!0});let Ei=Lr;(n=>{n.createDefaultProps=()=>({...ft.createDefaultProps(),mode:"SquareH01",style:c.reactJson({}),autoAnchor:!0})})(Ei||(Ei={})),c.extendClassProps(Ei.prototype,Ei.createDefaultProps);const $n=class $n extends q{get typeName(){return"ESPoi3D"}get defaultProps(){return $n.createDefaultProps()}constructor(e){super(e)}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new H("模式","mode",!1,!1,[this,"mode"],$n.defaults.modes),new U("样式","style",!1,!1,[this,"style"],$n.defaults.style)]}}getProperties(e){return[...super.getProperties(e),new z("通用","通用",[new H("模式","mode",!1,!1,[this,"mode"],$n.defaults.modes),new U("样式","style",!1,!1,[this,"style"],$n.defaults.style)])]}};d($n,"type",$n.register("ESPoi3D",$n,{chsName:"ESPoi3D",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"三角形,菱形"})),d($n,"defaults",{...q.defaults,modes:[["三角形","triangle"],["菱形","diamond"]],mode:"triangle",style:{UI_Color:[.09803921568627451,.40784313725490196,.8,1],FX_Color:[.09803921568627451,.40784313725490196,.8,1]}});let Mo=$n;(n=>{n.createDefaultProps=()=>({...q.createDefaultProps(),mode:"triangle",style:c.reactJson(n.defaults.style)})})(Mo||(Mo={})),c.extendClassProps(Mo.prototype,Mo.createDefaultProps);const Aa=class Aa extends _e{constructor(t){super(t);d(this,"_czmFlattenedPlaneId",this.dv(c.react("")));this.filled=!1}get typeName(){return"ESPolygonFlattenedPlane"}get defaultProps(){return Aa.createDefaultProps()}get czmFlattenedPlaneId(){return this._czmFlattenedPlaneId.value}set czmFlattenedPlaneId(t){this._czmFlattenedPlaneId.value=t}get czmFlattenedPlaneIdChanged(){return this._czmFlattenedPlaneId.changed}getESProperties(){const t={...super.getESProperties()};return{...t,basic:[...t.basic,new Z("瓦片图层","targetID",!1,!1,[this,"targetID"],"")]}}getProperties(t){return[...super.getProperties(t),new z("通用","通用",[new Z("瓦片图层","targetID",!1,!1,[this,"targetID"])])]}};d(Aa,"type",Aa.register("ESPolygonFlattenedPlane",Aa,{chsName:"压平",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"ESPolygonFlattenedPlane"})),d(Aa,"defaults",{..._e.defaults});let xo=Aa;(n=>{n.createDefaultProps=()=>({..._e.createDefaultProps(),targetID:""})})(xo||(xo={})),c.extendClassProps(xo.prototype,xo.createDefaultProps);const wp=async(n,e,t)=>{const{viewer:r}=n;if(!r){console.error("AddTrees: ueViewer.viewer is undefined");return}const i=await r.callUeFunc({f:"AddTrees",p:{id:e,TreeParams:t}});return i.error&&console.error("AddTrees:",i.error),i},Ep=async(n,e)=>{const{viewer:t}=n;if(!t){console.error("RemoveAllTrees: ueViewer.viewer is undefined");return}const r=await t.callUeFunc({f:"RemoveAllTrees",p:{id:e}});return r.error&&console.error("RemoveAllTrees:",r.error),r},Sp=async(n,e,t)=>{const{viewer:r}=n;if(!r){console.error("UpdateTreeParams: ueViewer.viewer is undefined");return}const i=await r.callUeFunc({f:"UpdateTreeParams",p:{id:e,TreeParams:t}});return i.error&&console.error("UpdateTreeParams:",i.error),i},Cp=async(n,e,t,r)=>{const{viewer:i}=n;if(!i){console.error("CutDownTrees: ueViewer.viewer is undefined");return}const s=await i.callUeFunc({f:"CutDownTrees",p:{id:e,TreeIds:t,TimeLength:r}});return s.error&&console.error("CutDownTrees:",s.error),s},Pp=async(n,e,t,r,i)=>{const{viewer:s}=n;if(!s){console.error("GrowthSimulation: ueViewer.viewer is undefined");return}const o=await s.callUeFunc({f:"GrowthSimulation",p:{id:e,ToParams:t,SwitchTime:i,TimeLength:r}});return o.error&&console.error("GrowthSimulation:",o.error),o},Ra=class Ra extends ve{constructor(t){super(t);d(this,"_addTreesEvent",this.dv(new c.Event));d(this,"_removeAllTreesEvent",this.dv(new c.Event));d(this,"_updateTreeParamsEvent",this.dv(new c.Event));d(this,"_cutDownTreesEvent",this.dv(new c.Event));d(this,"_growthSimulationEvent",this.dv(new c.Event))}get typeName(){return"ESSeparateFoliage"}get defaultProps(){return Ra.createDefaultProps()}async addTreesCallFunc(t,r){return await wp(t,this.id,r)}async updateTreeParamsCallFunc(t,r){return await Sp(t,this.id,r)}async cutDownTreesCallFunc(t,r,i){return await Cp(t,this.id,r,i)}async removeAllTreesCallFunc(t){return await Ep(t,this.id)}async growthSimulationCallFunc(t,r,i,s){return await Pp(t,this.id,r,i,s)}async getIdByComponentNameAndHitItem(t,r,i){return await t.getIdByComponentNameAndHitItem(this.id,r,i)}get addTreesEvent(){return this._addTreesEvent}addTrees(t){this._addTreesEvent.emit(t)}get removeAllTreesEvent(){return this._removeAllTreesEvent}removeAllTrees(){this._removeAllTreesEvent.emit()}get updateTreeParamsEvent(){return this._updateTreeParamsEvent}updateTreeParams(t){this._updateTreeParamsEvent.emit(t)}get cutDownTreesEvent(){return this._cutDownTreesEvent}cutDownTrees(t,r){this._cutDownTreesEvent.emit(t,r)}get growthSimulationEvent(){return this._growthSimulationEvent}growthSimulation(t,r,i){this._growthSimulationEvent.emit(t,r,i)}getProperties(t){return[...super.getProperties(t),new z("通用","通用",[new U("treeTypes","类型为 { name: string, meshPath: string }[]",!0,!1,[this,"treeTypes"],[],"{ name: string, meshPath: string }[]"),new S("树桩id","树桩id",!1,!1,[this,"stumpId"]),new S("动画间隔时间","动画间隔时间",!1,!1,[this,"intervalTime"]),new S("切换间隔时间","切换间隔时间",!1,!1,[this,"switchIntervalTime"])])]}};d(Ra,"type",Ra.register("ESSeparateFoliage",Ra,{chsName:"单体控制森林",tags:["ESObjects","_ES_Impl_UE"],description:"ESSeparateFoliage"})),d(Ra,"defaults",{...ve.defaults,treeTypes:[],stumpId:-1,intervalTime:.1,switchIntervalTime:.5});let Lo=Ra;(n=>{n.createDefaultProps=()=>({...ve.createDefaultProps(),treeTypes:c.reactJsonWithUndefined(void 0),stumpId:-1,intervalTime:.1,switchIntervalTime:.5})})(Lo||(Lo={})),c.extendClassProps(Lo.prototype,Lo.createDefaultProps);function dc(n,e,t){const r="buffer"in n,i=r?n.buffer:n;r&&(e+=n.byteOffset);const s=new Array(t),o=new DataView(i);for(let a=0;a<t;++a){const l=o.getUint8(e+a);s[a]=String.fromCharCode(l)}return s.join("")}function pc(n,e){const t="buffer"in n,r=t?n.buffer:n;return t&&(e+=n.byteOffset),new DataView(r).getUint32(e,!0)}function Ip(n,e,t){const r="buffer"in n,i=r?n.buffer:n;if(r&&(e+=n.byteOffset),e+t>i.byteLength){console.error("byteOffset + length > buffer.byteLength");return}return new Uint8Array(i,e,t)}function zy(n,e,t){const r="buffer"in n,i=r?n.buffer:n;if(r&&(e+=n.byteOffset),e+t*2>i.byteLength){console.error("byteOffset + length * 4 > buffer.byteLength");return}return new Uint16Array(i,e,t)}function Uy(n,e,t){const r="buffer"in n,i=r?n.buffer:n;if(r&&(e+=n.byteOffset),e+t*4>i.byteLength){console.error("byteOffset + length * 4 > buffer.byteLength");return}return new Uint32Array(i,e,t)}function Gy(n,e,t){const r="buffer"in n,i=r?n.buffer:n;if(r&&(e+=n.byteOffset),e+t*4>i.byteLength){console.error("byteOffset + length * 4 > buffer.byteLength");return}return new Float32Array(i,e,t)}function Tp(n){if(dc(n,0,4)!=="glTF"){console.error("Not a glTF file");return}const t=pc(n,4);if(t!==2){console.error("Unsupported glTF version");return}const r=pc(n,8);if(r!==n.byteLength){console.error("Invalid glTF length");return}const i=pc(n,12);if(i+12+4>r){console.error("Invalid glTF chunk length");return}if(dc(n,16,4)!=="JSON"){console.error("Invalid glTF chunk type");return}const o=dc(n,20,i),a={version:t,length:r,gltfJson:o};do{if(20+i>=n.byteLength)break;const l=pc(n,20+i);if(dc(n,20+i+4,4)!=="BIN\0"){console.error("Invalid glTF chunk type");return}const h=Ip(n,20+i+8,l);a.gltfBinary=h}while(!1);return a}window.parseGlb=Tp;function Dp(n){const e=Tp(n);if(e===void 0||!e.gltfBinary)return;const t=JSON.parse(e.gltfJson);return t.nodes.map(r=>{var i=t.meshes[r.mesh],s=i.primitives[0].attributes.POSITION,o=i.primitives[0].indices,a=t.accessors[s],l=t.bufferViews[a.bufferView];if(!e.gltfBinary)throw new Error("!glbParseResult.gltfBinary");const u=Gy(e.gltfBinary,l.byteOffset??0,l.byteLength/4);var h=t.accessors[o],f=t.bufferViews[h.bufferView];if(!e.gltfBinary)throw new Error("!glbParseResult.gltfBinary");let p;return h.componentType===5121?p=Ip(e.gltfBinary,f.byteOffset??0,f.byteLength/1):h.componentType===5123?p=zy(e.gltfBinary,f.byteOffset??0,f.byteLength/2):h.componentType===5125&&(p=Uy(e.gltfBinary,f.byteOffset??0,f.byteLength/4)),{name:r.name,posBuffer:u,indicesBuffer:p}})}window.parseWaterGlb=Dp;const Ve=class Ve extends q{constructor(t){super(t);d(this,"_submergingData");d(this,"_allMoments",[]);d(this,"readyEvent",this.dv(new c.Event));{const r=()=>{this.url!=""&&fetch(this.url).then(i=>{i.status==200&&i.ok&&i.arrayBuffer().then(s=>{this._submergingData=Dp(s);const o=this._submergingData.map(a=>Date.parse(a.name)).sort();this._allMoments=o,this.currentTime==0&&(this.currentTime=o[0]),this.readyEvent.emit()})}).catch(i=>{console.log(i)})};r(),this.d(this.urlChanged.don(()=>{r()}))}}get typeName(){return"ESSubmergingAnalysis"}get defaultProps(){return Ve.createDefaultProps()}get getSubmergingData(){return this._submergingData}getAllMoments(){return this._allMoments}getESProperties(){const t={...super.getESProperties()};return{...t,basic:[...t.basic,new Z("Url地址","url",!1,!1,[this,"url"],Ve.defaults.url),new Me("振幅","控制水波振幅的数值",!1,!1,[this,"amplitude"],.01,[0,1],Ve.defaults.amplitude),new S("频率","控制波数的数值(次/千米)",!1,!1,[this,"frequency"],Ve.defaults.frequency),new S("当前时间","currentTime",!1,!1,[this,"currentTime"],Ve.defaults.currentTime),new U("材质参数","materialParams",!1,!1,[this,"materialParams"],Ve.defaults.materialParams),new H("水域类型","当为custom是其他控制效果的参数生效,否则不生效,使用对应水域类型的预定效果",!1,!1,[this,"waterType"],Ve.defaults.waterTypes,"river"),new J("水的底色","waterColor",!1,!1,[this,"waterColor"],Ve.defaults.waterColor),new Me("波动频率","控制水波纹扰动的速率",!1,!1,[this,"waveVelocity"],.01,[0,1],Ve.defaults.waveVelocity),new S("水流速度","控制水流速度,单位 米/秒",!1,!1,[this,"flowSpeed"],Ve.defaults.flowSpeed),new Me("镜面反射强度","控制镜面反射强度的数值",!1,!1,[this,"specularIntensity"],.01,[0,1],Ve.defaults.specularIntensity),new Me("水体浑浊度","控制水体的浑浊程度,数值越大,浑浊程度越大,取值范围0-10。",!1,!1,[this,"murkiness"],.01,[0,10],Ve.defaults.murkiness)]}}getProperties(t){return[...super.getProperties(t),new z("通用","通用",[new Z("模型Url地址","url",!1,!1,[this,"url"],Ve.defaults.url),new S("当前时间","currentTime",!1,!1,[this,"currentTime"],Ve.defaults.currentTime),new U("材质参数","materialParams",!1,!1,[this,"materialParams"],Ve.defaults.materialParams),new H("水域类型","当为custom是其他控制效果的参数生效,否则不生效,使用对应水域类型的预定效果",!1,!1,[this,"waterType"],Ve.defaults.waterTypes),new J("水的底色","waterColor",!1,!1,[this,"waterColor"],Ve.defaults.waterColor),new S("频率","控制波数的数值(次/千米)",!1,!1,[this,"frequency"],Ve.defaults.frequency),new Me("波动频率","控制水波纹扰动的速率",!1,!1,[this,"waveVelocity"],.01,[0,1],Ve.defaults.waveVelocity),new Me("振幅","控制水波振幅的数值",!1,!1,[this,"amplitude"],.01,[0,1],Ve.defaults.amplitude),new Me("镜面反射强度","控制镜面反射强度的数值",!1,!1,[this,"specularIntensity"],.01,[0,1],Ve.defaults.specularIntensity),new Me("水体浑浊度","控制水体的浑浊程度,数值越大,浑浊程度越大,取值范围0-10。",!1,!1,[this,"murkiness"],.01,[0,10],Ve.defaults.murkiness),new S("水流速度","控制水流速度,单位 米/秒",!1,!1,[this,"flowSpeed"],Ve.defaults.flowSpeed)])]}};d(Ve,"type",Ve.register("ESSubmergingAnalysis",Ve,{chsName:"淹没分析",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"ESSubmergingAnalysis"})),d(Ve,"defaults",{...q.defaults,url:"",currentTime:0,materialParams:{},waterColor:[.1497,.165,.0031,1],frequency:1e3,waveVelocity:.5,amplitude:.1,specularIntensity:.8,waterTypes:[["river","river"],["ocean","ocean"],["lake","lake"],["custom","custom"]],waterType:"river",flowSpeed:0,murkiness:5});let Ao=Ve;(n=>{n.createDefaultProps=()=>({...q.createDefaultProps(),allowPicking:!0,url:"",currentTime:0,materialParams:c.reactJson({}),waterColor:[.1497,.165,.0031,1],frequency:1e3,waveVelocity:.5,amplitude:.1,specularIntensity:.8,waterType:"river",flowSpeed:0,murkiness:5})})(Ao||(Ao={})),c.extendClassProps(Ao.prototype,Ao.createDefaultProps);const zs=class zs extends _e{constructor(t){super(t);d(this,"_startEvent",this.dv(new c.Event));d(this,"_stopEvent",this.dv(new c.Event));this.filled=!1,this.stroked=!1}get typeName(){return"ESSunshineAnalysis"}get defaultProps(){return zs.createDefaultProps()}get startEvent(){return this._startEvent}start(){this._startEvent.emit()}get stopEvent(){return this._stopEvent}stop(){this._stopEvent.emit()}getProperties(t){return[...super.getProperties(t),new J("起始颜色","起始颜色",!1,!1,[this,"startColor"]),new J("结束颜色","结束颜色",!1,!1,[this,"endColor"]),new S("计算进度","计算进度",!0,!0,[this,"progress"]),new S("高度","高度m",!1,!1,[this,"extrudedHeight"]),new S("底面高度","底面高度",!1,!1,[this,"height"]),new S("采样间距","采样间距m",!1,!1,[this,"sampleDistance"]),new S("起始时间","startTime,时间戳",!1,!1,[this,"startTime"]),new S("结束时间","endTime,时间戳",!1,!1,[this,"endTime"]),new S("时间跨度","时间跨度,默认1小时时间戳",!1,!1,[this,"spanTime"]),new ie("开始分析","开始分析",[],()=>this.start(),[]),new ie("结束分析","结束分析",[],()=>this.stop(),[])]}};d(zs,"type",zs.register("ESSunshineAnalysis",zs,{chsName:"日照分析",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"日照分析"})),d(zs,"supportEditingModes",[..._e.supportEditingModes,se.HeightModify]),d(zs,"defaults",{..._e.defaults});let Ro=zs;(n=>{n.createDefaultProps=()=>({..._e.createDefaultProps(),extrudedHeight:30,height:0,sampleDistance:10,startColor:c.reactArray([1,1,0,1]),endColor:c.reactArray([1,0,0,1]),startTime:0,endTime:36e6,spanTime:1,progress:0})})(Ro||(Ro={})),c.extendClassProps(Ro.prototype,Ro.createDefaultProps);const wr=class wr extends ve{constructor(t){super(t);d(this,"_activateEvent",this.disposeVar(new c.Event));d(this,"activate",!1)}get typeName(){return"ESTerrainLayer"}get defaultProps(){return wr.createDefaultProps()}get activateEvent(){return this._activateEvent}getESProperties(){const t={...super.getESProperties()},r=[new S("层级序号","层级序号",!1,!1,[this,"zIndex"],wr.defaults.zIndex),new H("渲染模式","renderMode",!1,!1,[this,"renderMode"],wr.defaults.renderModes,"default"),new S("透明度","opacity",!1,!1,[this,"opacity"],wr.defaults.opacity)],i=[new U("地形服务地址","地形服务地址",!1,!1,[this,"url"],wr.defaults.url),new or("矩形范围","西南东北",!1,!1,[this,"rectangle"],wr.defaults.rectangle)];return t.basic.push(...r),t.dataSource.push(...i),t.defaultMenu="dataSource",t}getProperties(t){return[...super.getProperties(t),new z("ESTerrainLayer","ESTerrainLayer",[new U("地形服务地址","地形服务地址",!1,!1,[this,"url"]),new or("矩形范围","西南东北",!1,!1,[this,"rectangle"]),new S("层级","zIndex",!1,!1,[this,"zIndex"]),new H("渲染模式","renderMode",!1,!1,[this,"renderMode"],wr.defaults.renderModes,wr.defaults.renderMode),new S("透明度","opacity",!1,!1,[this,"opacity"],wr.defaults.opacity),new z("czm","czm",[new S("czmMinzoom","czmMinzoom",!0,!1,[this,"czmMinzoom"]),new S("czmMaxzoom","czmMaxzoom",!0,!1,[this,"czmMaxzoom"])])])]}};d(wr,"type",wr.register("ESTerrainLayer",wr,{chsName:"地形图层",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"地形图层"})),d(wr,"defaults",{...ve.defaults,show:!0,url:"http://inner.earthsdk.com/layer.json",rectangle:[-180,-90,180,90],zIndex:0,renderMode:"default",renderModes:[["使用深度检测","default"],["不使用深度检测","disableDepthTest"],["透明","transparent"]],opacity:1});let Fo=wr;(n=>{n.createDefaultProps=()=>({...ve.createDefaultProps(),url:"http://inner.earthsdk.com/layer.json",rectangle:c.reactArray([-180,-90,180,90]),zIndex:0,czmMaxzoom:void 0,czmMinzoom:void 0,renderMode:"default",opacity:1})})(Fo||(Fo={})),c.extendClassProps(Fo.prototype,Fo.createDefaultProps);const Dn=class Dn extends ft{get typeName(){return"ESTextLabel"}get defaultProps(){return Dn.createDefaultProps()}constructor(e){super(e)}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new J("文本颜色","指定文本标签的字体颜色.",!1,!1,[this,"color"],[1,1,1,1]),new S("文字大小","fontSize",!1,!1,[this,"fontSize"],14),new wu("内容","内容",!0,!1,[this,"text"],Dn.defaults.text),new J("背景颜色"," 指定文本标签的背景颜色.",!1,!1,[this,"backgroundColor"],Dn.defaults.backgroundColor),new or("内边距","上,右,下,左顺序.",!1,!1,[this,"padding"],Dn.defaults.padding),new J("边界颜色"," 边界色.",!1,!1,[this,"borderColor"]),new or("边界圆角","左上,右上,右下,左下.",!1,!1,[this,"borderRadius"]),new S("边界宽度","边界宽度",!1,!1,[this,"borderWidth"])]}}getProperties(e){return[...super.getProperties(e),new z("通用","通用",[new wu("内容","内容",!0,!1,[this,"text"],Dn.defaults.text),new J("文本颜色","指定文本标签的字体颜色.",!1,!1,[this,"color"]),new S("文字大小","fontSize",!1,!1,[this,"fontSize"]),new J("背景颜色"," 指定文本标签的背景颜色.",!1,!1,[this,"backgroundColor"]),new or("内边距","上,右,下,左顺序.",!1,!1,[this,"padding"]),new J("边界颜色"," 边界色.",!1,!1,[this,"borderColor"]),new or("边界圆角","左上,右上,右下,左下.",!1,!1,[this,"borderRadius"]),new S("边界宽度","边界宽度",!1,!1,[this,"borderWidth"])]),new z("czm","czm",[new F("文本编辑交互","文本编辑交互.",!1,!1,[this,"textEditingInteraction"]),new F("文本编辑","文本编辑.",!1,!1,[this,"textEditing"]),new S("宽度","宽度",!0,!1,[this,"width"],Dn.defaults.width),new S("透明度","透明度",!1,!1,[this,"opacity"]),new H("文字位置","文字位置",!1,!1,[this,"textAlign"],[["center","center"],["left","left"],["right","right"]]),new H("边框类型","边框类型",!1,!1,[this,"borderStyle"],[["none","none"],["hidden","hidden"],["dotted","dotted"],["dashed","dashed"],["solid","solid"],["double","double"],["groove","groove"],["ridge","ridge"],["inset","inset"],["outset","outset"]])])]}};d(Dn,"type",Dn.register("ESTextLabel",Dn,{chsName:"文本标签",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"文本标签。"})),d(Dn,"defaults",{...ft.defaults,allowTextEditing:!0,width:80,text:"请输入文字",opacity:1,backgroundColor:[0,0,0,.8],padding:[5,5,5,5],borderRadius:[6,6,6,6],borderColor:[1,1,1,1],borderWidth:0,textAlign:"left",borderStyle:"solid"});let ko=Dn;(n=>{n.createDefaultProps=()=>({...ft.createDefaultProps(),text:void 0,width:void 0,textEditing:!1,textEditingInteraction:!1,opacity:1,fontSize:14,textAlign:"left",color:c.reactArray([1,1,1,1]),backgroundColor:c.reactArray([0,0,0,.8]),padding:c.reactArray([5,5,5,5]),borderRadius:c.reactArray([6,6,6,6]),borderWidth:0,borderColor:c.reactArray([1,1,1,1]),borderStyle:"solid"})})(ko||(ko={})),c.extendClassProps(ko.prototype,ko.createDefaultProps);const Np=`
289
+ `,An=class An extends j{constructor(t){super(t)}getESProperties(){const t={...super.getESProperties()};return{...t,basic:[...t.basic,new L([this,"size"],"尺寸",An.defaults.size),new W([this,"autoFollow"],"自动跟随",An.defaults.autoFollow),new pt([this,"mode"],An.modes,"模式","blueSky")],more:[...t.more,new L([this,"autoOpacityFactor"],"自动消失系数",An.defaults.autoOpacityFactor)]}}};d(An,"createDefaultProps",()=>({...j.createDefaultProps(),size:1e4,autoFollow:!0,autoOpacityFactor:2,mode:"blueSky",collision:!1,allowPicking:!1})),d(An,"type",An.register("ESLocalSkyBox",An,{chsName:"局部天空盒",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"效果类"})),d(An,"modes",[["baiyun","baiyun"],["blueSky","blueSky"],["clearSky","clearSky"],["dream","dream"],["starrySky","starrySky"],["sunnySky","sunnySky"],["sunSets","sunSets"]]);let Ac=An;const nu=class nu extends j{constructor(e){super(e);d(this,"_location",this.disposeVar(h.react(void 0)));{const r=()=>{this.location=this.position};r(),this.ad(this.positionChanged.don(r))}}get location(){return this._location.value}set location(e){this._location.value=e}get locationChanged(){return this._location.changed}};d(nu,"type",nu.register("ESLocationMeasurement",nu,{chsName:"位置测量点",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE","_ES_Impl_Ol"],description:"位置测量点"}));let Rc=nu;const ke=class ke extends j{constructor(e){super(e);d(this,"_player",this.dv(new Dn));{const r=ke.defaults;this.d(h.bind([this._player,"loop"],[this,"playingLoop"],i=>i??r.playingLoop,i=>i??r.playingLoop)),this.d(h.bind([this._player,"currentTime"],[this,"currentTime"],i=>i??r.currentTime,i=>i??r.currentTime)),this.d(h.bind([this._player,"duration"],[this,"duration"],i=>i??r.duration,i=>i??r.duration)),this.d(h.bind([this._player,"playing"],[this,"playing"],i=>i??r.playing,i=>i??r.playing)),this.d(h.bind([this._player,"speed"],[this,"playingSpeed"],i=>i??r.playingSpeed,i=>i??r.playingSpeed))}}get player(){return this._player}get ratio(){return this._player.ratio}set ratio(e){this._player.ratio=e}get ratioChanged(){return this._player.ratioChanged}getESProperties(){const e={...super.getESProperties()};return{...e,more:[...e.more,new rt([],"通用","通用"),new nt(["number"],r=>this.flyTo(r),[1e3],"飞入"),new Fi([this,"updateCallback"],"更新回调函数",void 0,void 0,!0),new L([this,"emissionRate"],"发射率",5,!0),new W([this,"loop"],"是否循环",!0,!0),new L([this,"particleScale"],"等级",1,!0),new L([this,"startScale"],"初始等级",void 0,!0),new L([this,"endScale"],"结束等级",ke.defaults.endScale,!0),new _t([this,"color"],"颜色",void 0,!0),new _t([this,"startColor"],"初始颜色",void 0,!0),new _t([this,"endColor"],"结束颜色",void 0,!0),new W([this,"sizeInMeters"],"尺寸单位为米",void 0,!0),new L([this,"speed"],"速度",1,!0),new L([this,"minimumSpeed"],"最小速度",void 0,!0),new L([this,"maximumSpeed"],"最大速度",void 0,!0),new L([this,"lifetime"],"生命周期",Number.MAX_VALUE,!0),new L([this,"particleLife"],"粒子生命周期",ke.defaults.particleLife,!0),new L([this,"minimumParticleLife"],"最小粒子生命周期",void 0,!0),new L([this,"maximumParticleLife"],"最大粒子生命周期",void 0,!0),new L([this,"mass"],"块数量",1,!0),new L([this,"minimumMass"],"最小块数量",void 0,!0),new L([this,"maximumMass"],"最大块数量",void 0,!0),new ge([this,"imageSize"],"图片尺寸",ke.defaults.imageSize,!0),new ge([this,"minimumImageSize"],"最小图片尺寸",void 0,!0),new ge([this,"maximumImageSize"],"最大图片尺寸",void 0,!0),new pa([this,"image"],"图片",ke.defaults.image,!0),new Ve([this,"translation"],"偏移",[0,0,0],!0),new ul([this,"bursts"],"bursts",void 0,!0),new Q([this,"emitter"],"emitter",ke.defaults.emitter),new rt([],"播放器","播放器"),new L([this,"ratio"],"播放比率",0,!0),new ou([this,"playing"],[this,"ratio"],[this,"playingLoop"],"播放器"),new W([this,"playingLoop"],"是否循环",ke.defaults.playingLoop,!0),new L([this,"currentTime"],"当前时间",ke.defaults.currentTime,!0),new L([this,"duration"],"过渡时间",ke.defaults.duration,!0),new W([this,"playing"],"是否播放",ke.defaults.playing,!0),new L([this,"playingSpeed"],"播放速度",ke.defaults.playingSpeed,!0)]}}};d(ke,"createDefaultProps",()=>({...j.createDefaultProps(),emitter:h.reactJsonWithUndefined({type:"CircleEmitter",radius:.5}),bursts:h.reactArrayCollectionWithUndefined(void 0),translation:h.reactArrayWithUndefined(void 0),image:"${earthsdk3-assets-script-dir}/assets/img/smoke.png",imageSize:h.reactArrayWithUndefined([20,20]),minimumImageSize:h.reactArrayWithUndefined(void 0),maximumImageSize:h.reactArrayWithUndefined(void 0),updateCallback:void 0,emissionRate:void 0,loop:void 0,particleScale:void 0,startScale:void 0,endScale:4,color:h.reactArrayWithUndefined(void 0),startColor:h.reactArrayWithUndefined(void 0),endColor:h.reactArrayWithUndefined(void 0),sizeInMeters:void 0,speed:void 0,minimumSpeed:void 0,maximumSpeed:void 0,lifetime:void 0,particleLife:.5,minimumParticleLife:void 0,maximumParticleLife:void 0,mass:void 0,minimumMass:void 0,maximumMass:void 0,playingLoop:!0,currentTime:0,duration:6e3,playingSpeed:1,playing:!0})),d(ke,"type",ke.register("ESParticleSystemPrimitive",ke,{chsName:"粒子",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"通过Cesium的Primitive API 实现的粒子特效。"}));let Fc=ke;const Rn=class Rn extends Rr{constructor(e){super(e);d(this,"initialStyle",this.ad(h.reactJsonWithUndefined(void 0)));d(this,"_getInitialStyleEvent",this.disposeVar(new h.Event))}get getInitialStyleEvent(){return this._getInitialStyleEvent}getInitialStyle(){return Promise.race([new Promise(e=>{const r=this.d(this.initialStyle.changed.disposableOnce(e));this.getInitialStyleEvent.emit(),setTimeout(()=>{r(),e(void 0)},2e3)})])}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new pt([this,"mode"],Rn.modes,"模式",Rn.defaults.mode),new Q([this,"style"],"样式",Rn.defaults.style),new W([this,"autoAnchor"],"自动锚点对齐",Rn.defaults.autoAnchor)]}}};d(Rn,"createDefaultProps",()=>({...Rr.createDefaultProps(),mode:"SquareH01",style:h.reactJson({fontSize:16,imageSize:[60,60],textBackgroundColor:[1,1,1,0],textBackgroundSize:[120,30],textColor:[1,1,1,1],textOffset:[10,2],textBoxOffset:[40,0],textBoxAlign:"start",textBoxShow:!0,textBoxMode:"default"}),autoAnchor:!0})),d(Rn,"type",Rn.register("ESPoi2D",Rn,{chsName:"ESPoi2D",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"三角形,菱形"})),d(Rn,"modes",[["自定义","Custom"],["SquareH01","SquareH01"],["SquareH02","SquareH02"],["SquareV01","SquareV01"],["SquareV02","SquareV02"],["SquareV03","SquareV03"],["SquareV04","SquareV04"],["Flag01","Flag01"],["Flag02","Flag02"],["Linear01","Linear01"],["Linear02","Linear02"],["Linear03","Linear03"],["CircularH01","CircularH01"],["CircularH02","CircularH02"],["CircularV01","CircularV01"],["CircularV02","CircularV02"],["CircularV03","CircularV03"],["CircularV04","CircularV04"],["CircularV05","CircularV05"],["P3D01","P3D01"],["P3D02","P3D02"],["P3D03","P3D03"],["P3D04","P3D04"],["P3D05","P3D05"],["P3D06","P3D06"],["P3D07","P3D07"],["Diamond01","Diamond01"],["Diamond02","Diamond02"],["Stranger","Stranger"],["ManNormal","ManNormal"],["ManAbnormal","ManAbnormal"],["WomanNormal","WomanNormal"],["WomanAbnormal","WomanAbnormal"],["Camera","Camera"]]);let Za=Rn;const si=class si extends j{constructor(t){super(t)}getESProperties(){const t={...super.getESProperties()};return{...t,basic:[...t.basic,new pt([this,"mode"],si.modes,"模式",si.defaults.mode),new Q([this,"style"],"样式",si.defaults.style)]}}};d(si,"createDefaultProps",()=>({...j.createDefaultProps(),mode:"triangle",style:h.reactJson({UI_Color:[.09803921568627451,.40784313725490196,.8,1],FX_Color:[.09803921568627451,.40784313725490196,.8,1]})})),d(si,"type",si.register("ESPoi3D",si,{chsName:"ESPoi3D",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"三角形,菱形"})),d(si,"modes",[["三角形","triangle"],["菱形","diamond"]]);let kc=si;const Zo=class Zo extends kt{constructor(e){super(e);d(this,"_czmFlattenedPlaneId",this.dv(h.react("")))}get czmFlattenedPlaneId(){return this._czmFlattenedPlaneId.value}set czmFlattenedPlaneId(e){this._czmFlattenedPlaneId.value=e}get czmFlattenedPlaneIdChanged(){return this._czmFlattenedPlaneId.changed}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new ot([this,"targetID"],"瓦片图层","")]}}};d(Zo,"createDefaultProps",()=>({...kt.createDefaultProps(),targetID:"",filled:!1})),d(Zo,"type",Zo.register("ESPolygonFlattenedPlane",Zo,{chsName:"压平",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"ESPolygonFlattenedPlane"}));let Vc=Zo;const Pp=async(n,t,e)=>{const{viewer:r}=n;if(!r){console.error("AddTrees: ueViewer.viewer is undefined");return}const i=await r.callUeFunc({f:"AddTrees",p:{id:t,TreeParams:e}});return i.error&&console.error("AddTrees:",i.error),i},Np=async(n,t)=>{const{viewer:e}=n;if(!e){console.error("RemoveAllTrees: ueViewer.viewer is undefined");return}const r=await e.callUeFunc({f:"RemoveAllTrees",p:{id:t}});return r.error&&console.error("RemoveAllTrees:",r.error),r},bp=async(n,t,e)=>{const{viewer:r}=n;if(!r){console.error("UpdateTreeParams: ueViewer.viewer is undefined");return}const i=await r.callUeFunc({f:"UpdateTreeParams",p:{id:t,TreeParams:e}});return i.error&&console.error("UpdateTreeParams:",i.error),i},Tp=async(n,t,e,r)=>{const{viewer:i}=n;if(!i){console.error("CutDownTrees: ueViewer.viewer is undefined");return}const s=await i.callUeFunc({f:"CutDownTrees",p:{id:t,TreeIds:e,TimeLength:r}});return s.error&&console.error("CutDownTrees:",s.error),s},Op=async(n,t,e,r,i)=>{const{viewer:s}=n;if(!s){console.error("GrowthSimulation: ueViewer.viewer is undefined");return}const o=await s.callUeFunc({f:"GrowthSimulation",p:{id:t,ToParams:e,SwitchTime:i,TimeLength:r}});return o.error&&console.error("GrowthSimulation:",o.error),o},Ko=class Ko extends Rt{constructor(e){super(e);d(this,"_addTreesEvent",this.dv(new h.Event));d(this,"_removeAllTreesEvent",this.dv(new h.Event));d(this,"_updateTreeParamsEvent",this.dv(new h.Event));d(this,"_cutDownTreesEvent",this.dv(new h.Event));d(this,"_growthSimulationEvent",this.dv(new h.Event))}async addTreesCallFunc(e,r){return await Pp(e,this.id,r)}async updateTreeParamsCallFunc(e,r){return await bp(e,this.id,r)}async cutDownTreesCallFunc(e,r,i){return await Tp(e,this.id,r,i)}async removeAllTreesCallFunc(e){return await Np(e,this.id)}async growthSimulationCallFunc(e,r,i,s){return await Op(e,this.id,r,i,s)}async getIdByComponentNameAndHitItem(e,r,i){return await e.getIdByComponentNameAndHitItem(this.id,r,i)}get addTreesEvent(){return this._addTreesEvent}addTrees(e){this._addTreesEvent.emit(e)}get removeAllTreesEvent(){return this._removeAllTreesEvent}removeAllTrees(){this._removeAllTreesEvent.emit()}get updateTreeParamsEvent(){return this._updateTreeParamsEvent}updateTreeParams(e){this._updateTreeParamsEvent.emit(e)}get cutDownTreesEvent(){return this._cutDownTreesEvent}cutDownTrees(e,r){this._cutDownTreesEvent.emit(e,r)}get growthSimulationEvent(){return this._growthSimulationEvent}growthSimulation(e,r,i){this._growthSimulationEvent.emit(e,r,i)}getESProperties(){const e={...super.getESProperties()};return{...e,more:[...e.more,new rt([],"通用"),new Q([this,"treeTypes"],"treeTypes",[],"{ name: string, meshPath: string }[]",!0),new L([this,"stumpId"],"树桩id"),new L([this,"intervalTime"],"动画间隔时间"),new L([this,"switchIntervalTime"],"切换间隔时间")]}}};d(Ko,"createDefaultProps",()=>({...Rt.createDefaultProps(),treeTypes:h.reactJsonWithUndefined([]),stumpId:-1,intervalTime:.1,switchIntervalTime:.5})),d(Ko,"type",Ko.register("ESSeparateFoliage",Ko,{chsName:"单体控制森林",tags:["ESObjects","_ES_Impl_UE"],description:"ESSeparateFoliage"}));let zc=Ko;function el(n,t,e){const r="buffer"in n,i=r?n.buffer:n;r&&(t+=n.byteOffset);const s=new Array(e),o=new DataView(i);for(let a=0;a<e;++a){const u=o.getUint8(t+a);s[a]=String.fromCharCode(u)}return s.join("")}function rl(n,t){const e="buffer"in n,r=e?n.buffer:n;return e&&(t+=n.byteOffset),new DataView(r).getUint32(t,!0)}function Dp(n,t,e){const r="buffer"in n,i=r?n.buffer:n;if(r&&(t+=n.byteOffset),t+e>i.byteLength){console.error("byteOffset + length > buffer.byteLength");return}return new Uint8Array(i,t,e)}function Hy(n,t,e){const r="buffer"in n,i=r?n.buffer:n;if(r&&(t+=n.byteOffset),t+e*2>i.byteLength){console.error("byteOffset + length * 4 > buffer.byteLength");return}return new Uint16Array(i,t,e)}function Jy(n,t,e){const r="buffer"in n,i=r?n.buffer:n;if(r&&(t+=n.byteOffset),t+e*4>i.byteLength){console.error("byteOffset + length * 4 > buffer.byteLength");return}return new Uint32Array(i,t,e)}function Zy(n,t,e){const r="buffer"in n,i=r?n.buffer:n;if(r&&(t+=n.byteOffset),t+e*4>i.byteLength){console.error("byteOffset + length * 4 > buffer.byteLength");return}return new Float32Array(i,t,e)}function Mp(n){if(el(n,0,4)!=="glTF"){console.error("Not a glTF file");return}const e=rl(n,4);if(e!==2){console.error("Unsupported glTF version");return}const r=rl(n,8);if(r!==n.byteLength){console.error("Invalid glTF length");return}const i=rl(n,12);if(i+12+4>r){console.error("Invalid glTF chunk length");return}if(el(n,16,4)!=="JSON"){console.error("Invalid glTF chunk type");return}const o=el(n,20,i),a={version:e,length:r,gltfJson:o};if(20+i<n.byteLength){const u=rl(n,20+i);if(el(n,20+i+4,4)!=="BIN\0"){console.error("Invalid glTF chunk type");return}const c=Dp(n,20+i+8,u);a.gltfBinary=c}return a}window.parseGlb=Mp;function xp(n){const t=Mp(n);if(t===void 0||!t.gltfBinary)return;const e=JSON.parse(t.gltfJson);return e.nodes.map(r=>{var i=e.meshes[r.mesh],s=i.primitives[0].attributes.POSITION,o=i.primitives[0].indices,a=e.accessors[s],u=e.bufferViews[a.bufferView];if(!t.gltfBinary)throw new Error("!glbParseResult.gltfBinary");const l=Zy(t.gltfBinary,u.byteOffset??0,u.byteLength/4);var c=e.accessors[o],f=e.bufferViews[c.bufferView];if(!t.gltfBinary)throw new Error("!glbParseResult.gltfBinary");let p;return c.componentType===5121?p=Dp(t.gltfBinary,f.byteOffset??0,f.byteLength/1):c.componentType===5123?p=Hy(t.gltfBinary,f.byteOffset??0,f.byteLength/2):c.componentType===5125&&(p=Jy(t.gltfBinary,f.byteOffset??0,f.byteLength/4)),{name:r.name,posBuffer:l,indicesBuffer:p}})}window.parseWaterGlb=xp;const Je=class Je extends j{constructor(e){super(e);d(this,"_submergingData");d(this,"_allMoments",[]);d(this,"readyEvent",this.dv(new h.Event));{const r=()=>{this.url!=""&&fetch(this.url).then(i=>{i.status==200&&i.ok&&i.arrayBuffer().then(s=>{this._submergingData=xp(s);const o=this._submergingData.map(a=>Date.parse(a.name)).sort();this._allMoments=o,this.currentTime==0&&(this.currentTime=o[0]),this.readyEvent.emit()})}).catch(i=>{console.log(i)})};r(),this.d(this.urlChanged.don(()=>{r()}))}}get getSubmergingData(){return this._submergingData}getAllMoments(){return this._allMoments}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new ot([this,"url"],"Url地址",Je.defaults.url),new we([this,"amplitude"],.01,[0,1],"振幅",Je.defaults.amplitude),new L([this,"frequency"],"频率",Je.defaults.frequency),new L([this,"currentTime"],"当前时间",Je.defaults.currentTime),new Q([this,"materialParams"],"材质参数",Je.defaults.materialParams),new pt([this,"waterType"],[["river","river"],["ocean","ocean"],["lake","lake"],["custom","custom"]],"水域类型","river"),new _t([this,"waterColor"],"水的底色",Je.defaults.waterColor),new we([this,"waveVelocity"],.01,[0,1],"波动频率",Je.defaults.waveVelocity),new L([this,"flowSpeed"],"水流速度",Je.defaults.flowSpeed),new we([this,"specularIntensity"],.01,[0,1],"镜面反射强度",Je.defaults.specularIntensity),new we([this,"murkiness"],.01,[0,10],"水体浑浊度",Je.defaults.murkiness)]}}};d(Je,"createDefaultProps",()=>({...j.createDefaultProps(),allowPicking:!0,url:"",currentTime:0,materialParams:h.reactJson({}),waterColor:[.1497,.165,.0031,1],frequency:1e3,waveVelocity:.5,amplitude:.1,specularIntensity:.8,waterType:"river",flowSpeed:0,murkiness:5})),d(Je,"type",Je.register("ESSubmergingAnalysis",Je,{chsName:"淹没分析",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"ESSubmergingAnalysis"}));let Uc=Je;const Xs=class Xs extends kt{constructor(e){super(e);d(this,"_startEvent",this.dv(new h.Event));d(this,"_stopEvent",this.dv(new h.Event))}get startEvent(){return this._startEvent}start(){this._startEvent.emit()}get stopEvent(){return this._stopEvent}stop(){this._stopEvent.emit()}getESProperties(){const e={...super.getESProperties()};return{...e,more:[...e.more,new _t([this,"startColor"],"起始颜色"),new _t([this,"endColor"],"结束颜色"),new L([this,"progress"],"计算进度"),new L([this,"extrudedHeight"],"高度m"),new L([this,"height"],"底面高度"),new L([this,"sampleDistance"],"采样间距m"),new L([this,"startTime"],"起始时间,时间戳"),new L([this,"endTime"],"结束时间,时间戳"),new L([this,"spanTime"],"时间跨度,默认1小时时间戳"),new nt([],()=>this.start(),[],"开始分析"),new nt([],()=>this.stop(),[],"结束分析")]}}};d(Xs,"createDefaultProps",()=>({...kt.createDefaultProps(),extrudedHeight:30,height:0,sampleDistance:10,startColor:h.reactArray([1,1,0,1]),endColor:h.reactArray([1,0,0,1]),startTime:0,endTime:36e6,spanTime:1,progress:0,filled:!1,stroked:!1})),d(Xs,"type",Xs.register("ESSunshineAnalysis",Xs,{chsName:"日照分析",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"日照分析"})),d(Xs,"supportEditingModes",[...kt.supportEditingModes,B.HeightModify]);let Gc=Xs;const un=class un extends Rt{constructor(e){super(e);d(this,"_activateEvent",this.disposeVar(new h.Event));d(this,"activate",!1)}get activateEvent(){return this._activateEvent}getESProperties(){const e={...super.getESProperties()};return{...e,defaultMenu:"dataSource",basic:[...e.basic,new L([this,"zIndex"],"层级序号",un.defaults.zIndex),new pt([this,"renderMode"],un.renderModes,"渲染模式","default"),new L([this,"opacity"],"透明度",un.defaults.opacity)],dataSource:[...e.dataSource,new Q([this,"url"],"地形服务地址",un.defaults.url),new hn([this,"rectangle"],"矩形范围",un.defaults.rectangle)],more:[...e.more,new L([this,"czmMinzoom"],"czmMinzoom",void 0,!0),new L([this,"czmMaxzoom"],"czmMaxzoom",void 0,!0)]}}};d(un,"createDefaultProps",()=>({...Rt.createDefaultProps(),url:"http://inner.earthsdk.com/layer.json",rectangle:h.reactArray([-180,-90,180,90]),zIndex:0,czmMaxzoom:void 0,czmMinzoom:void 0,renderMode:"default",opacity:1})),d(un,"type",un.register("ESTerrainLayer",un,{chsName:"地形图层",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"地形图层"})),d(un,"renderModes",[["使用深度检测","default"],["不使用深度检测","disableDepthTest"],["透明","transparent"]]);let Wc=un;const oi=class oi extends Rr{constructor(t){super(t)}getESProperties(){const t={...super.getESProperties()};return{...t,basic:[...t.basic,new _t([this,"color"],"文本颜色",[1,1,1,1]),new L([this,"fontSize"],"文字大小",14),new ll([this,"text"],"内容",oi.defaults.text,void 0,!0),new _t([this,"backgroundColor"],"背景颜色",oi.defaults.backgroundColor),new hn([this,"padding"],"内边距",oi.defaults.padding),new _t([this,"borderColor"],"边界颜色"),new hn([this,"borderRadius"],"边界圆角"),new L([this,"borderWidth"],"边界宽度")],more:[...t.more,new rt([],"czm","czm"),new W([this,"textEditingInteraction"],"文本编辑交互"),new W([this,"textEditing"],"文本编辑"),new L([this,"width"],"宽度",oi.defaults.width,!0),new L([this,"opacity"],"透明度"),new pt([this,"textAlign"],[["center","center"],["left","left"],["right","right"]],"文字位置","left"),new pt([this,"borderStyle"],[["none","none"],["hidden","hidden"],["dotted","dotted"],["dashed","dashed"],["solid","solid"],["double","double"],["groove","groove"],["ridge","ridge"],["inset","inset"],["outset","outset"]],"边框类型")]}}};d(oi,"createDefaultProps",()=>({...Rr.createDefaultProps(),text:"请输入文字",width:80,textEditing:!1,textEditingInteraction:!1,opacity:1,fontSize:14,textAlign:"left",color:h.reactArray([1,1,1,1]),backgroundColor:h.reactArray([0,0,0,.8]),padding:h.reactArray([5,5,5,5]),borderRadius:h.reactArray([6,6,6,6]),borderWidth:0,borderColor:h.reactArray([1,1,1,1]),borderStyle:"solid"})),d(oi,"type",oi.register("ESTextLabel",oi,{chsName:"文本标签",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"文本标签。"}));let qc=oi;const Ky=`
300
290
  #### 默认值如下
301
291
  \`\`\`js
302
292
  {
303
293
  "Title": "示例",
304
294
  "Content": "这是一个示例\\n帮助你理解info的数据形式\\nnum:1\\nkey:'value'\\n"
305
295
  }
306
- \`\`\``,Ar=class Ar extends ft{constructor(t){super(t);d(this,"_callFunctionEvent",this.disposeVar(new c.Event));d(this,"_callFunctionResultEvent",this.dv(new c.Event))}get typeName(){return"ESUEWidget"}get defaultProps(){return Ar.createDefaultProps()}get __callFunctionResultEvent(){return this._callFunctionResultEvent}get callFunctionEvent(){return this._callFunctionEvent}callFunction(t,r){return new Promise(i=>{const s=new c.Destroyable,o=setTimeout(()=>{s.isDestroyed()||(s.destroy(),i(void 0))},1e4);s.d(this._callFunctionResultEvent.donce(a=>{s.isDestroyed()||(s.destroy(),i(a),clearTimeout(o))})),this._callFunctionEvent.emit(t,r)})}getESProperties(){const t={...super.getESProperties()};return{...t,basic:[...t.basic,new It("positionOffset","positionOffset(米)",!1,!1,[this,"positionOffset"],Ar.defaults.positionOffset),new It("rotationOffset","rotationOffset(米)",!1,!1,[this,"rotationOffset"],Ar.defaults.rotationOffset),new Z("actorTag","actorTag",!1,!1,[this,"actorTag"],Ar.defaults.actorTag),new Z("widgetClass","widgetClass",!1,!1,[this,"widgetClass"],Ar.defaults.widgetClass),new Z("socketName","socketName",!1,!1,[this,"socketName"],Ar.defaults.socketName),new U("info","info",!0,!1,[this,"info"],Ar.defaults.info,Np)]}}getProperties(t){return[...super.getProperties(t),new z("通用","通用",[new ie("callFunction","callFunction",["string","string"],(r,i)=>this.callFunction(r,JSON.parse(i)),["",""]),new Nn("positionOffset","positionOffset(米)",!1,!1,[this,"positionOffset"]),new Nn("rotationOffset","rotationOffset()",!1,!1,[this,"rotationOffset"]),new Z("actorTag","actorTag",!1,!1,[this,"actorTag"]),new Z("widgetClass","widgetClass",!1,!1,[this,"widgetClass"]),new Z("socketName","socketName",!1,!1,[this,"socketName"]),new U("info","info",!0,!1,[this,"info"],Ar.defaults.info,Np)])]}};d(Ar,"type",Ar.register("ESUEWidget",Ar,{chsName:"部件",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"3DTileset"})),d(Ar,"defaults",{...ft.defaults,info:{Title:"标题示例",Content:"内容示例"},widgetClass:"",socketName:"",positionOffset:[0,0,0],actorTag:"",rotationOffset:[0,0,0]});let Vo=Ar;(n=>{n.createDefaultProps=()=>({widgetClass:"",info:c.reactJsonWithUndefined(void 0),...ft.createDefaultProps()})})(Vo||(Vo={})),c.extendClassProps(Vo.prototype,Vo.createDefaultProps);const Ll=class Ll extends q{constructor(){super(...arguments);d(this,"_callFunctionEvent",this.dv(new c.Event));d(this,"_callFunctionResultEvent",this.dv(new c.Event));d(this,"_actorEvent",this.dv(new c.Event));d(this,"_lastActorStatus",this.dv(c.react("null")))}get typeName(){return"ESUnrealActor"}get defaultProps(){return Ll.createDefaultProps()}get __callFunctionResultEvent(){return this._callFunctionResultEvent}get callFunctionEvent(){return this._callFunctionEvent}callFunction(t,r){return new Promise(i=>{const s=new c.Destroyable,o=setTimeout(()=>{s.isDestroyed()||(s.destroy(),i(void 0))},1e4);s.d(this._callFunctionResultEvent.donce(a=>{s.isDestroyed()||(s.destroy(),i(a),clearTimeout(o))})),this._callFunctionEvent.emit(t,r)})}getBoundSphereWithChildren(t){return new Promise((r,i)=>{r(void 0)})}get actorEvent(){return this._actorEvent}get lastActorStatus(){return this._lastActorStatus.value}set lastActorStatus(t){this._lastActorStatus.value=t}get lastActorStatusChanged(){return this._lastActorStatus.changed}getESProperties(){const t={...super.getESProperties()};return{...t,basic:[...t.basic,new Z("actorTag","actorTag",!1,!1,[this,"actorTag"],""),new Z("actorClass","actorClass",!1,!1,[this,"actorClass"],""),new F("是否高亮","是否高亮highlight.",!1,!1,[this,"highlight"],!1)]}}getProperties(t){return[...super.getProperties(t),new ie("callFunction","callFunction",["string","string"],(r,i)=>this.callFunction(r,JSON.parse(i)),["",""]),new Z("actorTag","actorTag",!1,!1,[this,"actorTag"]),new Z("actorClass","actorClass",!1,!1,[this,"actorClass"]),new F("是否高亮","是否高亮highlight.",!1,!1,[this,"highlight"])]}};d(Ll,"type",Ll.register("ESUnrealActor",Ll,{chsName:"UnrealActor",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"UnrealActor"}));let zo=Ll;(n=>{n.createDefaultProps=()=>({...q.createDefaultProps(),actorTag:"",actorClass:"",highlight:!1,allowPicking:!0})})(zo||(zo={})),c.extendClassProps(zo.prototype,zo.createDefaultProps);const Zt=class Zt extends q{constructor(t){super(t);d(this,"editingBindMode","doublePoints");d(this,"_resetWithCameraInfoEvent",this.dv(new c.Event));this.collision=!1}get typeName(){return"ESVideoFusion"}get defaultProps(){return Zt.createDefaultProps()}get resetWithCameraInfoEvent(){return this._resetWithCameraInfoEvent}resetWithCameraInfo(){this._resetWithCameraInfoEvent.emit()}getESProperties(){const t={...super.getESProperties()};return{...t,basic:[...t.basic,new F("循环","looping",!1,!1,[this,"looping"],Zt.defaults.looping),new F("视椎体","showFrustum",!1,!1,[this,"showFrustum"],Zt.defaults.showFrustum),new S("宽高比","aspectRatio",!1,!1,[this,"aspectRatio"],Zt.defaults.aspectRatio),new S("横向夹角","fov",!1,!1,[this,"fov"],Zt.defaults.fov),new S("视野长度","far",!1,!1,[this,"far"],Zt.defaults.far),new S("近面距离","near",!1,!1,[this,"near"],Zt.defaults.near),new U("视频路径","videoStreamUrl",!1,!1,[this,"videoStreamUrl"],Zt.defaults.videoStreamUrl),new S("显示优先级","zIndex",!1,!1,[this,"zIndex"],Zt.defaults.zIndex),new H("视频类型","视频类型",!1,!1,[this,"videoStreamType"],Zt.defaults.videoStreamTypes,"video")]}}getProperties(t){return[...super.getProperties(t),new z("通用","通用",[new S("横向夹角","fov",!1,!1,[this,"fov"]),new S("宽高比","aspectRatio",!1,!1,[this,"aspectRatio"]),new S("视野长度","far",!1,!1,[this,"far"]),new S("近面距离","near",!1,!1,[this,"near"]),new U("视频路径","videoStreamUrl",!1,!1,[this,"videoStreamUrl"]),new S("显示优先级","zIndex",!1,!1,[this,"zIndex"]),new F("视椎体","showFrustum",!1,!1,[this,"showFrustum"]),new F("循环","looping",!1,!1,[this,"looping"])]),new z("czm","czm",[new H("视频类型","视频类型",!1,!1,[this,"videoStreamType"],Zt.defaults.videoStreamTypes),new ie("重置","以当前相机状态",[],()=>this.resetWithCameraInfo(),[])])]}};d(Zt,"type",Zt.register("ESVideoFusion",Zt,{chsName:"视频融合",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"视频融合"})),d(Zt,"defaults",{...q.defaults,fov:90,aspectRatio:1.77778,far:100,near:5,videoStreamUrl:"",zIndex:1,showFrustum:!0,looping:!0,videoStreamTypes:[["video","video"],["hls","hls"],["flv","flv"],["img","img"],["gif","gif"]]});let Uo=Zt;(n=>{n.createDefaultProps=()=>({...q.createDefaultProps(),fov:90,aspectRatio:1.77778,far:100,near:5,videoStreamUrl:"",zIndex:1,showFrustum:!0,looping:!0,videoStreamType:"video"})})(Uo||(Uo={})),c.extendClassProps(Uo.prototype,Uo.createDefaultProps);const nn=class nn extends q{constructor(t){super(t);d(this,"editingBindMode","doublePoints");this.collision=!1}get typeName(){return"ESViewShed"}get defaultProps(){return nn.createDefaultProps()}getESProperties(){const t={...super.getESProperties()};return{...t,basic:[...t.basic,new F("视椎体","showFrustum",!1,!1,[this,"showFrustum"],nn.defaults.showFrustum),new S("宽高比","aspectRatio",!1,!1,[this,"aspectRatio"],nn.defaults.aspectRatio),new S("横向夹角","fov",!1,!1,[this,"fov"],nn.defaults.fov),new S("近面距离","near",!1,!1,[this,"near"],nn.defaults.near),new S("视野长度","far",!1,!1,[this,"far"],nn.defaults.far),new S("显示优先级","zIndex",!1,!1,[this,"zIndex"],nn.defaults.zIndex)]}}getProperties(t){return[...super.getProperties(t),new z("通用","通用",[new S("横向夹角","fov",!1,!1,[this,"fov"]),new S("宽高比","aspectRatio",!1,!1,[this,"aspectRatio"]),new S("近面距离","near",!1,!1,[this,"near"]),new S("视野长度","far",!1,!1,[this,"far"]),new S("显示优先级","zIndex",!1,!1,[this,"zIndex"]),new F("视椎体","showFrustum",!1,!1,[this,"showFrustum"])])]}};d(nn,"type",nn.register("ESViewShed",nn,{chsName:"视域分析",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"信号传输器"})),d(nn,"defaults",{...q.defaults,fov:90,aspectRatio:1.77778,near:10,far:100,zIndex:1,showFrustum:!0});let Go=nn;(n=>{n.createDefaultProps=()=>({...q.createDefaultProps(),fov:90,aspectRatio:1.77778,near:10,far:100,zIndex:1,showFrustum:!0})})(Go||(Go={})),c.extendClassProps(Go.prototype,Go.createDefaultProps);const bp=`
296
+ \`\`\``,ln=class ln extends Rr{constructor(e){super(e);d(this,"_callFunctionEvent",this.disposeVar(new h.Event));d(this,"_callFunctionResultEvent",this.dv(new h.Event))}get __callFunctionResultEvent(){return this._callFunctionResultEvent}get callFunctionEvent(){return this._callFunctionEvent}callFunction(e,r){return new Promise(i=>{const s=new h.Destroyable,o=setTimeout(()=>{s.isDestroyed()||(s.destroy(),i(void 0))},1e4);s.d(this._callFunctionResultEvent.donce(a=>{s.isDestroyed()||(s.destroy(),i(a),clearTimeout(o))})),this._callFunctionEvent.emit(e,r)})}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new Ve([this,"positionOffset"],"positionOffset",ln.defaults.positionOffset),new Ve([this,"rotationOffset"],"rotationOffset",ln.defaults.rotationOffset),new ot([this,"actorTag"],"actorTag",ln.defaults.actorTag),new ot([this,"widgetClass"],"widgetClass",ln.defaults.widgetClass),new ot([this,"socketName"],"socketName",ln.defaults.socketName),new Q([this,"info"],"info",ln.defaults.info,Ky,!0)],more:[...e.more,new nt(["string","string"],(r,i)=>this.callFunction(r,JSON.parse(i)),["",""],"callFunction")]}}};d(ln,"createDefaultProps",()=>({...Rr.createDefaultProps(),widgetClass:"",info:h.reactJsonWithUndefined({Title:"标题示例",Content:"内容示例"})})),d(ln,"type",ln.register("ESUEWidget",ln,{chsName:"部件",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"3DTileset"}));let Xc=ln;const Qo=class Qo extends j{constructor(){super(...arguments);d(this,"_callFunctionEvent",this.dv(new h.Event));d(this,"_callFunctionResultEvent",this.dv(new h.Event));d(this,"_actorEvent",this.dv(new h.Event));d(this,"_lastActorStatus",this.dv(h.react("null")))}get __callFunctionResultEvent(){return this._callFunctionResultEvent}get callFunctionEvent(){return this._callFunctionEvent}callFunction(e,r){return new Promise(i=>{const s=new h.Destroyable,o=setTimeout(()=>{s.isDestroyed()||(s.destroy(),i(void 0))},1e4);s.d(this._callFunctionResultEvent.donce(a=>{s.isDestroyed()||(s.destroy(),i(a),clearTimeout(o))})),this._callFunctionEvent.emit(e,r)})}getBoundSphereWithChildren(e){return new Promise((r,i)=>{r(void 0)})}get actorEvent(){return this._actorEvent}get lastActorStatus(){return this._lastActorStatus.value}set lastActorStatus(e){this._lastActorStatus.value=e}get lastActorStatusChanged(){return this._lastActorStatus.changed}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new ot([this,"actorTag"],"actorTag",""),new ot([this,"actorClass"],"actorClass",""),new W([this,"highlight"],"是否高亮",!1)],more:[...e.more,new nt(["string","string"],(r,i)=>this.callFunction(r,JSON.parse(i)),["",""],"callFunction")]}}};d(Qo,"createDefaultProps",()=>({...j.createDefaultProps(),actorTag:"",actorClass:"",highlight:!1,allowPicking:!0})),d(Qo,"type",Qo.register("ESUnrealActor",Qo,{chsName:"UnrealActor",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"UnrealActor"}));let Yc=Qo;const Ze=class Ze extends j{constructor(e){super(e);d(this,"editingBindMode","doublePoints");d(this,"_resetWithCameraInfoEvent",this.dv(new h.Event));this.collision=!1}get resetWithCameraInfoEvent(){return this._resetWithCameraInfoEvent}resetWithCameraInfo(){this._resetWithCameraInfoEvent.emit()}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new W([this,"looping"],"循环",Ze.defaults.looping),new W([this,"showFrustum"],"视椎体",Ze.defaults.showFrustum),new L([this,"aspectRatio"],"宽高比",Ze.defaults.aspectRatio),new L([this,"fov"],"横向夹角",Ze.defaults.fov),new L([this,"far"],"视野长度",Ze.defaults.far),new L([this,"near"],"近面距离",Ze.defaults.near),new Q([this,"videoStreamUrl"],"视频路径",Ze.defaults.videoStreamUrl),new L([this,"zIndex"],"显示优先级",Ze.defaults.zIndex),new pt([this,"videoStreamType"],Ze.videoStreamTypes,"视频类型","video")],more:[...e.more,new nt([],()=>this.resetWithCameraInfo(),[],"以当前相机状态重置")]}}};d(Ze,"createDefaultProps",()=>({...j.createDefaultProps(),fov:90,aspectRatio:1.77778,far:100,near:5,videoStreamUrl:"",zIndex:1,showFrustum:!0,looping:!0,videoStreamType:"video"})),d(Ze,"type",Ze.register("ESVideoFusion",Ze,{chsName:"视频融合",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"视频融合"})),d(Ze,"videoStreamTypes",[["video","video"],["hls","hls"],["flv","flv"],["img","img"],["gif","gif"]]);let Hc=Ze;const cn=class cn extends j{constructor(e){super(e);d(this,"editingBindMode","doublePoints")}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new W([this,"showFrustum"],"视椎体",cn.defaults.showFrustum),new L([this,"aspectRatio"],"宽高比",cn.defaults.aspectRatio),new L([this,"fov"],"横向夹角",cn.defaults.fov),new L([this,"near"],"近面距离",cn.defaults.near),new L([this,"far"],"视野长度",cn.defaults.far),new L([this,"zIndex"],"显示优先级",cn.defaults.zIndex)]}}};d(cn,"createDefaultProps",()=>({...j.createDefaultProps(),fov:90,aspectRatio:1.77778,near:10,far:100,zIndex:1,showFrustum:!0,collision:!1})),d(cn,"type",cn.register("ESViewShed",cn,{chsName:"视域分析",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"信号传输器"}));let Jc=cn;const Qy=`
307
297
  #### 默认值如下
308
298
  \`\`\`js
309
299
  {
@@ -311,60 +301,7 @@ export type ESJTimeIntervalCollectionJsonType = {
311
301
  "Key":"Value",
312
302
  "内容": "这是一个示例\\n帮助你理解info的数据形式\\nnum:1\\nkey:'value'\\n"
313
303
  }
314
- \`\`\``,Di=class Di extends ft{get typeName(){return"ESWidget"}get defaultProps(){return Di.createDefaultProps()}constructor(e){super(e),this.anchor=[.5,1]}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new U("信息","info",!0,!1,[this,"info"],Di.defaults.info,bp)]}}getProperties(e){return[...super.getProperties(e),new z("通用","通用",[new U("信息","info",!0,!1,[this,"info"],Di.defaults.info,bp)]),new z("ue","ue",[new Nn("坐标偏移","positionOffset(米)",!1,!1,[this,"positionOffset"]),new Nn("旋转偏移","rotationOffset(米)",!1,!1,[this,"rotationOffset"]),new Z("actorTag","actorTag",!1,!1,[this,"actorTag"]),new Z("widgetClass","widgetClass",!1,!1,[this,"widgetClass"]),new Z("socketName","socketName",!1,!1,[this,"socketName"])]),new z("czm","czm",[new S("透明度","透明度",!0,!1,[this,"opacity"],Di.defaults.opacity)])]}};d(Di,"type",Di.register("ESWidget",Di,{chsName:"部件",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"ES组件"})),d(Di,"defaults",{...ft.defaults,info:{title:"标题示例",内容:"内容示例"},widgetClass:"WidgetBlueprint'/EarthSDKForUE/Widget/WBP_ES_DefaultInfo.WBP_ES_DefaultInfo'",actorTag:"",socketName:"",positionOffset:[0,0,0],rotationOffset:[0,0,0],allowTextEditing:!0,opacity:1});let Wo=Di;(n=>{n.createDefaultProps=()=>({...ft.createDefaultProps(),info:c.reactJson({title:"标题示例",内容:"内容示例"}),widgetClass:void 0,actorTag:"",socketName:"",positionOffset:c.reactArray([0,0,0]),rotationOffset:c.reactArray([0,0,0]),opacity:1})})(Wo||(Wo={})),c.extendClassProps(Wo.prototype,Wo.createDefaultProps);const Us=class Us extends le{constructor(t){super(t);d(this,"_direction",this.disposeVar(c.react(0)));d(this,"editingBindMode","doublePoints");{const r=()=>{this.direction=this.points&&this.points.length>=2?Ml(Nu(this.points[0],this.points[1])):0};r(),this.ad(this.pointsChanged.don(r))}this.stroked=!0,this.strokeStyle={width:10,widthType:"screen",color:[1,1,1,1],material:"",materialParams:{},ground:!1}}get typeName(){return"ESDirectionMeasurement"}get defaultProps(){return Us.createDefaultProps()}get strokeWidth(){return this.strokeStyle.width}set strokeWidth(t){this.strokeStyle={...this.strokeStyle,width:t}}get direction(){return this._direction.value}set direction(t){this._direction.value=t}get directionChanged(){return this._direction.changed}getProperties(t){return[...super.getProperties(t)]}};d(Us,"type",Us.register("ESDirectionMeasurement",Us,{chsName:"方位角测量",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"方位角测量"})),d(Us,"supportEditingModes",[...le.supportEditingModes,se.Rotation,se.Scale,se.DoublePointsAppend,se.DoublePointsModify]),d(Us,"defaults",{...le.defaults});let qo=Us;(n=>{n.createDefaultProps=()=>({...le.createDefaultProps()})})(qo||(qo={})),c.extendClassProps(qo.prototype,qo.createDefaultProps);const Wy={type:"FeatureCollection",features:[{type:"Feature",geometry:{type:"Point",coordinates:[116.2,39.56]},properties:{title:"swimming","marker-symbol":"swimming","marker-color":"#8F1312"}},{type:"Feature",geometry:{type:"Point",coordinates:[115.2,38.56]},properties:{title:"8","marker-symbol":"8","marker-color":"#46117E"}},{type:"Feature",geometry:{type:"Point",coordinates:[114.2,37.56]},properties:{title:"6","marker-symbol":"6","marker-color":"#713291"}}]},qy=`properties是一个包含三个属性的对象,title表示标题,marker-symbol表示点位的文字内容,marker-color表示点位颜色,properties可以删除,然后使用场景对象属性设置。
315
- \`\`\`
316
- {
317
- "type": "FeatureCollection",
318
- "features": [
319
- {
320
- "type": "Feature",
321
- "geometry": {
322
- "type": "Point",
323
- "coordinates": [
324
- 116.2,
325
- 39.56
326
- ]
327
- },
328
- "properties": {
329
- "title": "swimming",
330
- "marker-symbol": "swimming",
331
- "marker-color": "#8F1312"
332
- }
333
- },
334
- {
335
- "type": "Feature",
336
- "geometry": {
337
- "type": "Point",
338
- "coordinates": [
339
- 115.2,
340
- 38.56
341
- ],
342
- "properties": {
343
- "title": "8",
344
- "marker-symbol": "8",
345
- "marker-color": "#46117E"
346
- }
347
- }
348
- },
349
- {
350
- "type": "Feature",
351
- "geometry": {
352
- "type": "Point",
353
- "coordinates": [
354
- 114.2,
355
- 37.56
356
- ],
357
- "properties": {
358
- "title": "6",
359
- "marker-symbol": "6",
360
- "marker-color": "#713291"
361
- }
362
- }
363
- }
364
- ]
365
- }
366
- \`\`\`
367
- `,Op=`// dataSource
304
+ \`\`\``,as=class as extends Rr{constructor(t){super(t)}getESProperties(){const t={...super.getESProperties()};return{...t,basic:[...t.basic,new Q([this,"info"],"信息",as.defaults.info,Qy,!0)],more:[...t.more,new rt([],"通用","通用"),new rt([],"ue","ue"),new to([this,"positionOffset"],"坐标偏移"),new to([this,"rotationOffset"],"旋转偏移"),new ot([this,"actorTag"]),new ot([this,"widgetClass"]),new ot([this,"socketName"]),new rt([],"czm","czm"),new L([this,"opacity"],"透明度",as.defaults.opacity,!0)]}}};d(as,"createDefaultProps",()=>({...Rr.createDefaultProps(),info:h.reactJson({title:"标题示例",内容:"内容示例"}),widgetClass:"WidgetBlueprint'/EarthSDKForUE/Widget/WBP_ES_DefaultInfo.WBP_ES_DefaultInfo'",actorTag:"",socketName:"",positionOffset:h.reactArray([0,0,0]),rotationOffset:h.reactArray([0,0,0]),opacity:1})),d(as,"type",as.register("ESWidget",as,{chsName:"部件",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"ES组件"}));let Zc=as;const Ys=class Ys extends yt{constructor(e){super(e);d(this,"_direction",this.disposeVar(h.react(0)));d(this,"editingBindMode","doublePoints");{const r=()=>{this.direction=this.points&&this.points.length>=2?Lo(fu(this.points[0],this.points[1])):0};r(),this.ad(this.pointsChanged.don(r))}}get direction(){return this._direction.value}set direction(e){this._direction.value=e}get directionChanged(){return this._direction.changed}};d(Ys,"createDefaultProps",()=>({...yt.createDefaultProps(),stroked:!0,strokeStyle:h.reactJson({width:10,widthType:"screen",color:[1,1,1,1],material:"",materialParams:{},ground:!1})})),d(Ys,"type",Ys.register("ESDirectionMeasurement",Ys,{chsName:"方位角测量",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE","_ES_Impl_Ol"],description:"方位角测量"})),d(Ys,"supportEditingModes",[...yt.supportEditingModes,B.Rotation,B.Scale,B.DoublePointsAppend,B.DoublePointsModify]);let Kc=Ys;const Lp=`// dataSource
368
305
  (dataSource) => {
369
306
  if (dataSource) {
370
307
  dataSource.show = true;
@@ -390,25 +327,24 @@ export type ESJTimeIntervalCollectionJsonType = {
390
327
  }
391
328
  }
392
329
  }
393
- `,Xy=`示例代码
330
+ `,By=`示例代码
394
331
  \`\`\`
395
- ${Op}
332
+ ${Lp}
396
333
  \`\`\`
397
- `;function Mp(n){try{return JSON.parse(n),!0}catch{return!1}}const Hy="${earthsdk3-assets-script-dir}/assets/misc/2.geojson",Q=class Q extends ve{constructor(t){super(t);d(this,"_flyToFeatureEvent",this.dv(new c.Event));d(this,"_flyToFeatureIndexEvent",this.dv(new c.Event));d(this,"_features",this.disposeVar(c.reactJsonWithUndefined(void 0)));d(this,"pickedInfoType","FeatureCollection");this.ad(this.urlChanged.don(async()=>{var r;if(!this.url){this.features=void 0;return}typeof this.url=="object"?this.features=this.url:Mp(this.url)?this.features=JSON.parse(this.url):await fetch(j.context.getStrFromEnv(this.url)).then(i=>i.json()).then(i=>{this.features=i}).catch(i=>{console.warn("ESEntityCluster数据加载失败",i)}),this.pickedInfoType=((r=this.features)==null?void 0:r.type)??"FeatureCollection"})),this.ad(this.editingChanged.don(()=>{console.warn("ESGeoJson暂不支持编辑!")}))}get typeName(){return"ESGeoJson"}get defaultProps(){return Q.createDefaultProps()}get flyToFeatureEvent(){return this._flyToFeatureEvent}flyToFeature(t,r,i){this._flyToFeatureEvent.emit(t,r,i)}get flyToFeatureIndexEvent(){return this._flyToFeatureIndexEvent}flyToFeatureIndex(t,r){this._flyToFeatureIndexEvent.emit(t,r)}get features(){return this._features.value}set features(t){this._features.value=t}get featuresChanged(){return this._features.changed}getFeatures(){if(this.features)return this.features;console.log("数据未加载完成,请稍后调用此方法getFeatures()")}getESProperties(){return{defaultMenu:"style",basic:[],general:[new Z("名称","name",!0,!1,[this,"name"]),new Z("唯一标识","id",!1,!0,[this,"id"]),new F("是否显示","show",!1,!1,[this,"show"],!0),new F("开启碰撞","collision",!1,!1,[this,"collision"],!1),new F("允许拾取","allowPicking",!1,!1,[this,"allowPicking"],!1),new ie("保存观察视角","保存当前视角",[],()=>this.calcFlyInParam(),[])],dataSource:[new U("服务地址","服务地址",!0,!1,[this,"url"],Q.defaults.url),new S("要素最小可视距离","要素最小可视距离",!1,!1,[this,"minFeatureVisibleDistance"],Q.defaults.minFeatureVisibleDistance),new S("要素最大可视距离","要素最大可视距离",!1,!1,[this,"maxFeatureVisibleDistance"],Q.defaults.maxFeatureVisibleDistance),new H("高度参考","高度参考",!1,!1,[this,"heightReference"],Q.defaults.heightReferences)],location:[],coordinate:[],style:[new z("点文字样式","点样式集合",[]),new F("是否显示","是否显示",!1,!1,[this,"textShow"],Q.defaults.textShow),new ze("锚点","锚点",!1,!1,[this,"textAnchor"],Q.defaults.textAnchor),new Z("标注显示属性","要用于显示的文本属性",!1,!1,[this,"textProperty"],Q.defaults.textProperty),new Z("默认文本","默认统一显示的文本",!1,!1,[this,"textDefaultText"],Q.defaults.textDefaultText),new J("文本颜色","文本颜色",!1,!1,[this,"textColor"],Q.defaults.textColor),new J("背景颜色","背景颜色",!0,!1,[this,"textBackgroundColor"],Q.defaults.textBackgroundColor),new Z("字体样式","字体样式",!1,!1,[this,"textFontStyle"],Q.defaults.textFontStyle),new Z("字体粗细","字体粗细",!1,!1,[this,"textFontWeight"],Q.defaults.textFontWeight),new S("字体大小","字体大小",!1,!1,[this,"textFontSize"],Q.defaults.textFontSize),new ze("像素偏移","像素偏移",!1,!1,[this,"textOffset"],Q.defaults.textOffset),new z("点图片样式","图片样式集合",[]),new F("是否显示","是否显示",!1,!1,[this,"imageShow"],Q.defaults.imageShow),new ze("锚点","锚点",!1,!1,[this,"imageAnchor"],Q.defaults.imageAnchor),new U("图片地址","图片地址",!1,!1,[this,"imageUrl"],Q.defaults.imageUrl),new ze("图片大小","图片大小",!1,!1,[this,"imageSize"],Q.defaults.imageSize),new ze("像素偏移","像素偏移",!1,!1,[this,"imageOffset"],Q.defaults.imageOffset),new z("线样式","线样式集合",[]),new F("是否显示","是否显示",!1,!1,[this,"stroked"],Q.defaults.stroked),new F("贴地","贴地(线)",!1,!1,[this,"strokeGround"],Q.defaults.strokeGround),new S("线宽","线宽",!1,!1,[this,"strokeWidth"],Q.defaults.strokeWidth),new H("线宽类型","线宽类型",!1,!1,[this,"strokeWidthType"],Q.defaults.strokeWidthTypes),new J("线颜色","线颜色",!1,!1,[this,"strokeColor"],Q.defaults.strokeColor),new Z("线材质","线材质",!1,!1,[this,"strokeMaterial"],Q.defaults.strokeMaterial),new U("线材质参数","线材质参数",!1,!1,[this,"strokeMaterialParams"],Q.defaults.strokeMaterialParams),new z("面样式","面样式集合",[]),new F("是否显示","是否显示",!1,!1,[this,"filled"],Q.defaults.filled),new F("贴地","贴地(面)",!1,!1,[this,"fillGround"],Q.defaults.fillGround),new J("填充颜色","填充颜色",!1,!1,[this,"fillColor"],Q.defaults.fillColor),new Z("填充材质","填充材质",!1,!1,[this,"fillMaterial"],Q.defaults.fillMaterial),new U("填充材质参数","填充材质参数",!1,!1,[this,"fillMaterialParams"],Q.defaults.fillMaterialParams)]}}getProperties(t){return[...super.getProperties(t),new z("通用","通用",[new F("是否显示","A boolean Property specifying the visibility .",!1,!1,[this,"show"],Q.defaults.show),new F("允许拾取","是否允许拾取",!1,!1,[this,"allowPicking"],Q.defaults.allowPicking),new ie("飞入","飞入",["number"],r=>this.flyTo(r),[1]),new ie("清空飞入参数","清空飞入参数",[],()=>this.emptyFlyInParam(),[]),new ie("保存飞入参数","保存飞入参数flyInParam",[],()=>this.calcFlyInParam(),[]),new U("flyInParam","flyInParam",!0,!1,[this,"flyInParam"],Q.defaults.flyInParam)]),new z("标注文本样式","标注文本样式",[new F("是否显示","是否显示",!1,!1,[this,"textShow"],Q.defaults.textShow),new Z("标注显示属性","要用于显示的文本属性",!1,!1,[this,"textProperty"],Q.defaults.textProperty),new Z("默认文本","默认统一显示的文本",!1,!1,[this,"textDefaultText"],Q.defaults.textDefaultText),new J("文本颜色","文本颜色",!1,!1,[this,"textColor"],Q.defaults.textColor),new J("背景颜色","背景颜色",!0,!1,[this,"textBackgroundColor"],Q.defaults.textBackgroundColor),new Z("字体","字体",!1,!1,[this,"textFontFamily"],Q.defaults.textFontFamily),new Z("字体样式","字体样式",!1,!1,[this,"textFontStyle"],Q.defaults.textFontStyle),new Z("字体粗细","字体粗细",!1,!1,[this,"textFontWeight"],Q.defaults.textFontWeight),new S("字体大小","字体大小",!1,!1,[this,"textFontSize"],Q.defaults.textFontSize),new ze("锚点","锚点",!1,!1,[this,"textAnchor"],Q.defaults.textAnchor),new ze("像素偏移","像素偏移",!1,!1,[this,"textOffset"],Q.defaults.textOffset)]),new z("标注图标样式","标注图标样式",[new F("是否显示","是否显示",!1,!1,[this,"imageShow"],Q.defaults.imageShow),new U("图片地址","图片地址",!1,!1,[this,"imageUrl"],Q.defaults.imageUrl),new ze("图片大小","图片大小",!1,!1,[this,"imageSize"],Q.defaults.imageSize),new ze("锚点","锚点",!1,!1,[this,"imageAnchor"],Q.defaults.imageAnchor),new ze("像素偏移","像素偏移",!1,!1,[this,"imageOffset"],Q.defaults.imageOffset)]),new z("线样式","线样式",[new F("是否显示","是否显示",!1,!1,[this,"stroked"],Q.defaults.stroked),new S("线宽","线宽",!1,!1,[this,"strokeWidth"],Q.defaults.strokeWidth),new H("线宽类型","线宽类型",!1,!1,[this,"strokeWidthType"],Q.defaults.strokeWidthTypes),new J("线颜色","线颜色",!1,!1,[this,"strokeColor"],Q.defaults.strokeColor),new Z("线材质","线材质",!1,!1,[this,"strokeMaterial"],Q.defaults.strokeMaterial),new U("线材质参数","线材质参数",!1,!1,[this,"strokeMaterialParams"],Q.defaults.strokeMaterialParams),new F("贴地(线)","贴地(线)",!1,!1,[this,"strokeGround"],Q.defaults.strokeGround)]),new z("填充样式","填充样式",[new F("是否显示","是否显示",!1,!1,[this,"filled"],Q.defaults.filled),new J("填充颜色","填充颜色",!1,!1,[this,"fillColor"],Q.defaults.fillColor),new Z("填充材质","填充材质",!1,!1,[this,"fillMaterial"],Q.defaults.fillMaterial),new U("填充材质参数","填充材质参数",!1,!1,[this,"fillMaterialParams"],Q.defaults.fillMaterialParams),new F("贴地(面)","贴地(面)",!1,!1,[this,"fillGround"],Q.defaults.fillGround)]),new z("通用","通用",[new U("服务地址","服务地址",!0,!1,[this,"url"],Q.defaults.url),new ni("loadFnStr","loadFnStr",!0,!1,[this,"loadFuncStr"],Q.defaults.defaultLoadFuncStr,Q.defaults.defaultLoadFuncDocStr),new S("要素最小可视距离","要素最小可视距离",!1,!1,[this,"minFeatureVisibleDistance"],Q.defaults.minFeatureVisibleDistance),new S("要素最大可视距离","要素最大可视距离",!1,!1,[this,"maxFeatureVisibleDistance"],Q.defaults.maxFeatureVisibleDistance),new H("高度参考","高度参考",!1,!1,[this,"heightReference"],Q.defaults.heightReferences)])]}get strokeWidth(){return this.strokeStyle.width}set strokeWidth(t){this.strokeStyle={...this.strokeStyle,width:t}}get strokeWidthChanged(){return this.strokeStyleChanged}get strokeWidthType(){return this.strokeStyle.widthType}set strokeWidthType(t){this.strokeStyle={...this.strokeStyle,widthType:t}}get strokeWidthTypeChanged(){return this.strokeStyleChanged}get strokeColor(){return this.strokeStyle.color}set strokeColor(t){this.strokeStyle={...this.strokeStyle,color:[...t]}}get strokeColorChanged(){return this.strokeStyleChanged}get strokeMaterial(){return this.strokeStyle.material}set strokeMaterial(t){this.strokeStyle={...this.strokeStyle,material:t}}get strokeMaterialChanged(){return this.strokeStyleChanged}get strokeMaterialParams(){return this.strokeStyle.materialParams}set strokeMaterialParams(t){this.strokeStyle={...this.strokeStyle,materialParams:t}}get strokeMaterialParamsChanged(){return this.strokeStyleChanged}get strokeGround(){return this.strokeStyle.ground}set strokeGround(t){this.strokeStyle={...this.strokeStyle,ground:t}}get strokeGroundChanged(){return this.strokeStyleChanged}get fillColor(){return this.fillStyle.color}set fillColor(t){this.fillStyle={...this.fillStyle,color:[...t]}}get fillColorChanged(){return this.fillStyleChanged}get fillMaterial(){return this.fillStyle.material}set fillMaterial(t){this.fillStyle={...this.fillStyle,material:t}}get fillMaterialChanged(){return this.fillStyleChanged}get fillMaterialParams(){return this.fillStyle.materialParams}set fillMaterialParams(t){this.fillStyle={...this.fillStyle,materialParams:t}}get fillMaterialParamsChanged(){return this.fillStyleChanged}get fillGround(){return this.fillStyle.ground}set fillGround(t){this.fillStyle={...this.fillStyle,ground:t}}get fillGroundChanged(){return this.fillStyleChanged}get textProperty(){return this.textStyle.textProperty}set textProperty(t){this.textStyle={...this.textStyle,textProperty:t}}get textPropertyChanged(){return this.textStyleChanged}get textDefaultText(){return this.textStyle.defaultText}set textDefaultText(t){this.textStyle={...this.textStyle,defaultText:t}}get textDefaultTextChanged(){return this.textStyleChanged}get textColor(){return this.textStyle.color}set textColor(t){this.textStyle={...this.textStyle,color:t}}get textColorChanged(){return this.textStyleChanged}get textBackgroundColor(){return this.textStyle.backgroundColor}set textBackgroundColor(t){this.textStyle={...this.textStyle,backgroundColor:t}}get textBackgroundColorChanged(){return this.textStyleChanged}get textFontFamily(){return this.textStyle.fontFamily}set textFontFamily(t){this.textStyle={...this.textStyle,fontFamily:t}}get textFontFamilyChanged(){return this.textStyleChanged}get textFontStyle(){return this.textStyle.fontStyle}set textFontStyle(t){this.textStyle={...this.textStyle,fontStyle:t}}get textFontStyleChanged(){return this.textStyleChanged}get textFontWeight(){return this.textStyle.fontWeight}set textFontWeight(t){this.textStyle={...this.textStyle,fontWeight:t}}get textFontWeightChanged(){return this.textStyleChanged}get textFontSize(){return this.textStyle.fontSize}set textFontSize(t){this.textStyle={...this.textStyle,fontSize:t}}get textFontSizeChanged(){return this.textStyleChanged}get textAnchor(){return this.textStyle.anchor}set textAnchor(t){this.textStyle={...this.textStyle,anchor:t}}get textAnchorChanged(){return this.textStyleChanged}get textOffset(){return this.textStyle.offset}set textOffset(t){this.textStyle={...this.textStyle,offset:t}}get textOffsetChanged(){return this.textStyleChanged}get imageUrl(){return this.imageStyle.url}set imageUrl(t){this.imageStyle={...this.imageStyle,url:t}}get imageUrlChanged(){return this.imageStyleChanged}get imageSize(){return this.imageStyle.size}set imageSize(t){this.imageStyle={...this.imageStyle,size:t}}get imageSizeChanged(){return this.imageStyleChanged}get imageAnchor(){return this.imageStyle.anchor}set imageAnchor(t){this.imageStyle={...this.imageStyle,anchor:t}}get imageAnchorChanged(){return this.imageStyleChanged}get imageOffset(){return this.imageStyle.offset}set imageOffset(t){this.imageStyle={...this.imageStyle,offset:t}}get imageOffsetChanged(){return this.imageStyleChanged}};d(Q,"type",Q.register("ESGeoJson",Q,{chsName:"ESGeoJson",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"GeoJson数据加载"})),d(Q,"defaults",{...ve.defaults,show:!0,allowPicking:!0,url:Hy,defaultLoadFuncStr:Op,defaultLoadFuncDocStr:Xy,data:Wy,dataMd:qy,stroked:!0,strokeWidth:1,strokeWidthType:"world",strokeColor:[.79,.91,.06,1],strokeMaterial:"",strokeMaterialParams:{},strokeGround:!1,filled:!0,fillColor:[.79,.91,.06,.2],fillMaterial:"",fillMaterialParams:{},fillGround:!1,imageShow:!0,imageUrl:"${earthsdk3-assets-script-dir}/assets/img/location.png",imageSize:[32,32],imageAnchor:[.5,1],imageOffset:[0,0],textShow:!0,textProperty:"",textDefaultText:"默认标注",textColor:[1,1,1,1],textBackgroundColor:void 0,textFontFamily:"Arial",textFontStyle:"normal",textFontSize:16,textFontWeight:"normal",textAnchor:[0,1],textOffset:[-16,8],strokeWidthTypes:[["screen","screen"],["world","world"]],flyInParam:{position:[0,0,0],rotation:[0,0,0],flyDuration:1},minFeatureVisibleDistance:0,maxFeatureVisibleDistance:0,heightReferences:[["NONE","NONE"],["CLAMP_TO_GROUND","CLAMP_TO_GROUND"],["RELATIVE_TO_GROUND","RELATIVE_TO_GROUND"]]});let Xo=Q;(n=>{n.createDefaultProps=()=>({...ve.createDefaultProps(),show:!0,allowPicking:!0,loadFuncStr:void 0,url:void 0,stroked:!0,strokeStyle:c.reactJson({width:1,widthType:"world",color:[.79,.91,.06,1],material:"",materialParams:{},ground:!1}),filled:!0,fillStyle:c.reactJson({color:[.79,.91,.06,.2],material:"",materialParams:{},ground:!1}),imageShow:!0,imageStyle:c.reactJson({url:"${earthsdk3-assets-script-dir}/assets/img/location.png",size:[32,32],anchor:[.5,1],offset:[0,0]}),textShow:!0,textStyle:c.reactJson({textProperty:"",defaultText:"默认标注",color:[1,1,1,1],backgroundColor:void 0,fontFamily:"Arial",fontSize:16,fontStyle:"normal",fontWeight:"normal",anchor:[0,1],offset:[16,-8]}),minFeatureVisibleDistance:0,maxFeatureVisibleDistance:0,flyInParam:c.reactJsonWithUndefined(void 0),heightReference:"NONE"})})(Xo||(Xo={})),c.extendClassProps(Xo.prototype,Xo.createDefaultProps);const Gs=class Gs extends le{constructor(t){super(t);d(this,"editingBindMode","doublePoints");d(this,"_height",this.disposeVar(c.react(0)));{const r=()=>{this.height=this.points&&this.points.length>=2?this.points[1][2]-this.points[0][2]:0};r(),this.ad(this.pointsChanged.don(r))}this.stroked=!0,this.strokeStyle.width=2}get typeName(){return"ESHeightMeasurement"}get defaultProps(){return Gs.createDefaultProps()}get height(){return this._height.value}set height(t){this._height.value=t}get heightChanged(){return this._height.changed}getProperties(t){return[...super.getProperties(t)]}};d(Gs,"type",Gs.register("ESHeightMeasurement",Gs,{chsName:"高度测量",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"高度测量"})),d(Gs,"supportEditingModes",[...le.supportEditingModes,se.DoublePointsAppend,se.DoublePointsModify]),d(Gs,"defaults",{...le.defaults});let Ho=Gs;(n=>{n.createDefaultProps=()=>({...le.createDefaultProps()})})(Ho||(Ho={})),c.extendClassProps(Ho.prototype,Ho.createDefaultProps);const Fa=class Fa extends vr{constructor(t){super(t);d(this,"_area",this.dv(c.react(0)));d(this,"_perimeter",this.dv(c.react(0)));d(this,"editingBindMode","doublePoints");this.radius=1,this.filled=!0,this.stroked=!1,this.collision=!1,this.strokeColor=[1,1,1,1],this.fillColor=[1,1,1,.5];const r=()=>{this._area.value=Math.PI*this.radius*this.radius,this._perimeter.value=2*Math.PI*this.radius};r(),this.d(this.radiusChanged.don(r))}get typeName(){return"ESLocalCircle"}get defaultProps(){return{...Fa.createDefaultProps()}}get area(){return this._area.value}get areaChanged(){return this._area.changed}get perimeter(){return this._perimeter.value}get perimeterChanged(){return this._perimeter.changed}toPolygon(t=10,r){return Qd([...this.position],this.radius,t,r)[0].map(s=>[...s,this.position?this.position[2]:0])}getESProperties(){const t={...super.getESProperties()};return{...t,defaultMenu:"style",basic:[...t.basic,new S("圆半径","圆半径",!0,!1,[this,"radius"],1)],general:[...t.general],dataSource:[...t.dataSource],location:[],coordinate:[new F("是否编辑","是否编辑",!1,!1,[this,"editing"]),new S("面积","面积",!1,!0,[this,"area"]),new S("周长","周长",!1,!0,[this,"perimeter"]),new Nn("三维坐标","三维坐标",!0,!1,[this,"position"],[0,0,0])],style:[...t.style]}}getProperties(t){return[...super.getProperties(t),new z("ESLocalCircle","ESLocalCircle",[new S("圆半径","圆半径",!1,!1,[this,"radius"]),new S("面积","面积",!1,!0,[this,"area"]),new S("周长","周长",!1,!0,[this,"perimeter"])])]}};d(Fa,"type",Fa.register("ESLocalCircle",Fa,{chsName:"局部坐标圆形",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"ESLocalCircle"})),d(Fa,"defaults",{...vr.defaults,fillStyle:{color:[1,1,1,.5],material:"",materialParams:{}}});let Yo=Fa;(n=>{n.createDefaultProps=()=>({...vr.createDefaultProps(),radius:1})})(Yo||(Yo={})),c.extendClassProps(Yo.prototype,Yo.createDefaultProps);const ka=class ka extends vr{get typeName(){return"ESLocalPolygon"}get defaultProps(){return{...ka.createDefaultProps()}}constructor(e){super(e),this.filled=!0}getESProperties(){const e={...super.getESProperties()};return{...e,coordinate:[...e.coordinate,new Rh("坐标","偏移量[x,y],单位米,不含高度",!1,!1,[this,"points"],[])]}}getProperties(e){return[...super.getProperties(e),new z("ESLocalPolygon","ESLocalPolygon",[new U("位置偏移数组","偏移量[x,y],单位米,不含高度",!1,!1,[this,"points"])])]}};d(ka,"type",ka.register("ESLocalPolygon",ka,{chsName:"局部2D坐标多边形",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"ESLocalPolygon"})),d(ka,"defaults",{...vr.defaults,points:[],filled:!0});let Si=ka;(n=>{n.createDefaultProps=()=>({...vr.createDefaultProps(),points:Sc(void 0)})})(Si||(Si={})),c.extendClassProps(Si.prototype,Si.createDefaultProps);const Al=class Al extends Zn{get typeName(){return"ESLocalPolygonZ"}get defaultProps(){return{...Al.createDefaultProps()}}constructor(e){super(e),this.filled=!0}getProperties(e){return[...super.getProperties(e),new z("通用","通用",[new wc("本地位置数组","本地位置数组",!0,!1,[this,"points"])])]}};d(Al,"type",Al.register("ESLocalPolygonZ",Al,{chsName:"局部坐标多边形",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"ESLocalPolygonZ"}));let Jo=Al;(n=>{n.createDefaultProps=()=>({...Zn.createDefaultProps(),points:c.reactPositions(void 0)})})(Jo||(Jo={})),c.extendClassProps(Jo.prototype,Jo.createDefaultProps);const Va=class Va extends vr{get typeName(){return"ESLocalRectangle"}get defaultProps(){return{...Va.createDefaultProps()}}constructor(e){super(e),this.filled=!0}getProperties(e){return[...super.getProperties(e),new z("ESLocalRectangle","ESLocalRectangle",[new S("宽度","宽度",!1,!1,[this,"width"]),new S("高度","高度",!1,!1,[this,"height"])])]}};d(Va,"type",Va.register("ESLocalRectangle",Va,{chsName:"局部坐标四边形",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"ESLocalRectangle"})),d(Va,"defaults",{...vr.defaults,width:5e5,height:3e5});let Zo=Va;(n=>{n.createDefaultProps=()=>({...vr.createDefaultProps(),width:5e5,height:3e5})})(Zo||(Zo={})),c.extendClassProps(Zo.prototype,Zo.createDefaultProps);const Ni=class Ni extends le{constructor(t){super(t);d(this,"editingBindMode","lineString");d(this,"_distance",this.dv(c.react(0)));d(this,"_deprecated",[{materialMode:{blue:"multipleArrows",purple:"singleArrow"}},"show"]);d(this,"_deprecatedWarningFunc",(()=>{this._deprecatedWarning()})());this.fillColor=[1,0,.73,1];const r=()=>{if(this.points&&this.points.length>=2){const i=pu(this.points,"GEODESIC"),s=i[i.length-1];this._distance.value=s}else this._distance.value=0};r(),this.d(this.pointsChanged.don(r))}get typeName(){return"ESPipeFence"}get defaultProps(){return Ni.createDefaultProps()}get distance(){return this._distance.value}get distanceChanged(){return this._distance.changed}getESProperties(){const t={...super.getESProperties()};return{...t,defaultMenu:"basic",basic:[...t.basic,new S("高度","height",!1,!1,[this,"height"],10),new S("宽度","width",!1,!1,[this,"width"],10),new H("模式","materialMode",!1,!1,[this,"materialMode"],Ni.defaults.materialModes,"purple")],coordinate:[...t.coordinate,new S("长度","距离",!1,!0,[this,"distance"])]}}getProperties(t){return[...super.getProperties(t),new z("ESPipeFence","ESPipeFence",[new S("高度","height",!1,!1,[this,"height"]),new S("宽度","width",!1,!1,[this,"width"]),new H("materialMode","materialMode",!1,!1,[this,"materialMode"],Ni.defaults.materialModes)])]}};d(Ni,"type",Ni.register("ESPipeFence",Ni,{chsName:"管道电子围栏",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"管道电子围栏"})),d(Ni,"supportEditingModes",[...le.supportEditingModes,se.LineStringAppend,se.LineStringInsert]),d(Ni,"defaults",{...le.defaults,strokeStyle:{width:1,widthType:"screen",color:[1,1,1,1],material:"",materialParams:{}},fillStyle:{color:[1,1,1,1],material:"",materialParams:{}},filled:!0,stroked:!0,materialModes:[["单箭头","singleArrow"],["多箭头","multipleArrows"]]});let Ko=Ni;(n=>{n.createDefaultProps=()=>({...le.createDefaultProps(),height:10,width:10,materialMode:"singleArrow",filled:!0})})(Ko||(Ko={})),c.extendClassProps(Ko.prototype,Ko.createDefaultProps);const Ws=class Ws extends Pt{constructor(t){super(t);d(this,"_setLayerVisibleEvent",this.dv(new c.Event));d(this,"_setLayerColorEvent",this.dv(new c.Event))}get typeName(){return"ESPipeserTileset"}get defaultProps(){return Ws.createDefaultProps()}get setLayerVisibleEvent(){return this._setLayerVisibleEvent}setLayerVisible(t,r){this._setLayerVisibleEvent.emit(t,r)}get setLayerColorEvent(){return this._setLayerColorEvent}setLayerColor(t,r){this._setLayerColorEvent.emit(t,r)}getProperties(t){return[...super.getProperties(t),new z("ESPipeserTileset","ESPipeserTileset",[new ie("setLayerVisible","setLayerVisible",["string","string"],(r,i)=>this.setLayerVisible(r,i),["",""]),new ie("setLayerColor","setLayerColor",["string","string"],(r,i)=>this.setLayerColor(r,i),["",""]),new H("colorMode","colorMode",!0,!1,[this,"colorMode"],Ws.description.colorMode,"default")])]}};d(Ws,"type",Ws.register("ESPipeserTileset",Ws,{chsName:"PipeSer图层",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"PipeSer图层"})),d(Ws,"description",{colorMode:[["default","default"],["color","color"],["blend","blend"]]});let Qo=Ws;(n=>{n.createDefaultProps=()=>({colorMode:"default",...Pt.createDefaultProps()})})(Qo||(Qo={})),c.extendClassProps(Qo.prototype,Qo.createDefaultProps);const bi=class bi extends le{constructor(t){super(t);d(this,"editingBindMode","circular");this.filled=!0,this.collision=!1}get typeName(){return"ESPolygonFence"}get defaultProps(){return bi.createDefaultProps()}getESProperties(){const t={...super.getESProperties()};return{...t,defaultMenu:"basic",coordinate:[...t.coordinate,new S("面积","面积",!1,!0,[this,"area"]),new S("周长","周长",!1,!0,[this,"perimeter"])],basic:[...t.basic,new S("高度","height",!1,!1,[this,"height"],10),new H("模式","materialMode",!1,!1,[this,"materialMode"],bi.defaults.materialModes,"danger")]}}getProperties(t){return[...super.getProperties(t),new z("通用","通用",[new S("高度","height",!1,!1,[this,"height"]),new H("materialMode","materialMode",!1,!1,[this,"materialMode"],bi.defaults.materialModes)]),new z("计算","计算",[new S("面积","面积",!1,!0,[this,"area"]),new S("周长","周长",!1,!0,[this,"perimeter"])])]}};d(bi,"type",bi.register("ESPolygonFence",bi,{chsName:"多边形电子围栏",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"多边形电子围栏"})),d(bi,"supportEditingModes",[...le.supportEditingModes,se.CircularAppend,se.CircularInsert,se.HeightModify]),d(bi,"defaults",{...le.defaults,fillStyle:{color:[1,1,1,1],material:"",materialParams:{}},filled:!0,materialModes:[["模式一","danger"],["模式二","checkerboard"],["模式三","warning"],["模式四","cord"],["模式五","scanline"],["模式六","honeycomb"],["模式七","gradientColor"]]});let Bo=bi;(n=>{n.createDefaultProps=()=>({height:10,materialMode:"danger",...le.createDefaultProps()})})(Bo||(Bo={})),c.extendClassProps(Bo.prototype,Bo.createDefaultProps);const is=class is extends le{constructor(t){super(t);d(this,"_deprecated",["ground"]);d(this,"_deprecatedWarningFunc",(()=>{this._deprecatedWarning()})());d(this,"editingBindMode","doublePoints")}get typeName(){return"ESRectangle"}get defaultProps(){return is.createDefaultProps()}getProperties(t){return[...super.getProperties(t),new z("通用","通用",[new F("是否贴地","A boolean Property specifying the visibility.",!1,!1,[this,"ground"]),new F("轮廓线半透明","轮廓线半透明.",!1,!1,[this,"outlineTranslucent"]),new S("高度","高度",!1,!1,[this,"height"]),new S("拉伸高度","拉伸高度",!1,!1,[this,"extrudedHeight"]),new or("范围","西南东北",!0,!1,[this,"rectangle"],is.defaults.rectangle),new S("纹理旋转角度","纹理旋转角度.",!1,!1,[this,"stRotation"]),new S("旋转角度","rotation",!1,!1,[this,"rotation"]),new F("是否单点编辑","是否单点编辑.",!1,!1,[this,"pointEditing"])])]}};d(is,"type",is.register("ESRectangle",is,{chsName:"矩形",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"矩形"})),d(is,"supportEditingModes",[...le.supportEditingModes,se.DoublePointsAppend,se.DoublePointsModify]),d(is,"defaults",{...le.defaults,ground:!1,outlineTranslucent:!0,height:0,extrudedHeight:0,rectangle:void 0,stRotation:0,rotation:0,pointEditing:!1,allowPicking:!1});let $o=is;(n=>{n.createDefaultProps=()=>({...le.createDefaultProps(),ground:!1,outlineTranslucent:!0,height:0,extrudedHeight:0,rectangle:c.reactArrayWithUndefined(void 0),rotation:0,stRotation:0,pointEditing:!1,filled:!0})})($o||($o={})),c.extendClassProps($o.prototype,$o.createDefaultProps);const za=class za extends _e{get typeName(){return"ESPolygonWithHole"}get defaultProps(){return za.createDefaultProps()}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new U("裁切多边形数组","必须在内部,且没有相交,裁切的多边形数组",!0,!1,[this,"innerRings"],[])]}}getProperties(e){return[...super.getProperties(e),new z("通用","通用",[new U("裁切多边形数组","必须在内部,且没有相交,裁切的多边形数组",!0,!1,[this,"innerRings"],[])])]}};d(za,"type",za.register("ESPolygonWithHole",za,{chsName:"内部裁切多边形",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"带洞多边形"})),d(za,"defaults",{..._e.defaults,innerRings:[]});let jo=za;(n=>{n.createDefaultProps=()=>({..._e.createDefaultProps(),innerRings:c.reactPositionsSet(void 0)})})(jo||(jo={})),c.extendClassProps(jo.prototype,jo.createDefaultProps);const ss=class ss extends _e{constructor(t){super(t);d(this,"_startEvent",this.disposeVar(new c.Event));d(this,"_stopEvent",this.dv(new c.Event));d(this,"_surfaceArea",this.disposeVar(c.react(0)));this.fillStyle.ground=!0}get typeName(){return"ESSurfaceAreaMeasurement"}get defaultProps(){return ss.createDefaultProps()}get startEvent(){return this._startEvent}start(){this._startEvent.emit()}get stopEvent(){return this._stopEvent}stop(){this._stopEvent.emit()}get surfaceArea(){return this._surfaceArea.value}set surfaceArea(t){this._surfaceArea.value=t}get surfaceChanged(){return this._surfaceArea.changed}getProperties(t){return[...super.getProperties(t),new z("ESSurfaceAreaMeasurement","表面积测量",[new ie("开始计算","开始计算",[],()=>this.start(),[]),new S("插值距离","插值距离,单位米,为0时不插值",!1,!1,[this,"interpolation"],ss.defaults.interpolation),new S("偏移高度","三角面整体偏移高度,单位米",!1,!1,[this,"offsetHeight"],ss.defaults.offsetHeight)])]}};d(ss,"type",ss.register("ESSurfaceAreaMeasurement",ss,{chsName:"表面积测量",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"表面积测量"})),d(ss,"defaults",{..._e.defaults,interpolation:.5,offsetHeight:0,unitsMode:[["平方米_平方千米","SquareMeter_SquareKilometer"],["亩_公顷","MU_Hectare"]]});let ea=ss;(n=>{n.createDefaultProps=()=>({..._e.createDefaultProps(),interpolation:void 0,offsetHeight:void 0,units:c.reactArray(["SquareMeter_SquareKilometer","MU_Hectare"])})})(ea||(ea={})),c.extendClassProps(ea.prototype,ea.createDefaultProps);const os=class os extends q{get typeName(){return"ESDatasmithRuntimeModel"}get defaultProps(){return os.createDefaultProps()}constructor(e){super(e)}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new S("下载进度","下载进度",!0,!0,[this,"downloadProgress"]),new U("importOptions","导入参数",!0,!1,[this,"importOptions"],os.defaults.importOptions)],dataSource:[...e.dataSource,new U("路径","url",!1,!1,[this,"url"])]}}getProperties(e){return[...super.getProperties(e),new z("通用","通用",[new U("url","url",!1,!1,[this,"url"]),new S("下载进度","下载进度",!0,!0,[this,"downloadProgress"]),new U("importOptions","导入参数",!0,!1,[this,"importOptions"],os.defaults.importOptions)])]}};d(os,"type",os.register("ESDatasmithRuntimeModel",os,{chsName:"Datasmith Model",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"Datasmith Model"})),d(os,"defaults",{...q.defaults,url:"",importOptions:{buildCollisions:"QueryAndPhysics",buildHierarchy:"Simplified",collisionType:"CTF_UseComplexAsSimple",bImportMetaData:!0}});let ta=os;(n=>{n.createDefaultProps=()=>({...q.createDefaultProps(),url:"",importOptions:c.reactJsonWithUndefined(void 0),downloadProgress:0})})(ta||(ta={})),c.extendClassProps(ta.prototype,ta.createDefaultProps);const We=class We extends Si{get typeName(){return"ESDynamicWater"}get defaultProps(){return{...We.createDefaultProps()}}constructor(e){super(e),this.stroked=!1,this.filled=!0}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new H("水域类型","当为 custom 时其他控制效果的参数生效,否则不生效,使用对应水域类型的预定效果",!1,!1,[this,"waterType"],We.defaults.waterTypes,We.defaults.waterType),new S("频率","控制波数的数值(次/千米)",!1,!1,[this,"frequency"],We.defaults.frequency),new Me("振幅","控制水波振幅的数值",!1,!1,[this,"amplitude"],.01,[0,1],We.defaults.amplitude),new Me("流向","控制水流方向,局部坐标方向",!1,!1,[this,"flowDirection"],1,[0,360],We.defaults.flowDirection),new Me("波动频率","控制水波纹扰动的速率",!1,!1,[this,"waveVelocity"],.01,[0,1],We.defaults.waveVelocity),new Me("镜面反射强度","控制镜面反射强度的数值",!1,!1,[this,"specularIntensity"],.01,[0,1],We.defaults.specularIntensity),new Me("水体浑浊度","控制水体的浑浊程度,数值越大,浑浊程度越大,取值范围 0 - 10。",!1,!1,[this,"murkiness"],.1,[0,10],We.defaults.murkiness),new S("水流速度","控制水流速度,单位 米/秒",!1,!1,[this,"flowSpeed"],We.defaults.flowSpeed),new J("水的底色","waterColor",!1,!1,[this,"waterColor"],We.defaults.waterColor),new U("水的图片","waterImage",!1,!1,[this,"waterImage"],We.defaults.waterImage)]}}getProperties(e){return[...super.getProperties(e),new H("水域类型","当为 custom 时其他控制效果的参数生效,否则不生效,使用对应水域类型的预定效果",!1,!1,[this,"waterType"],We.defaults.waterTypes),new U("水的图片","waterImage",!1,!1,[this,"waterImage"],We.defaults.waterImage),new J("水的底色","waterColor",!1,!1,[this,"waterColor"],We.defaults.waterColor),new S("频率","控制波数的数值(次/千米)",!1,!1,[this,"frequency"],We.defaults.frequency),new Me("波动频率","控制水波纹扰动的速率",!1,!1,[this,"waveVelocity"],.01,[0,1],We.defaults.waveVelocity),new Me("振幅","控制水波振幅的数值",!1,!1,[this,"amplitude"],.01,[0,1],We.defaults.amplitude),new Me("镜面反射强度","控制镜面反射强度的数值",!1,!1,[this,"specularIntensity"],.01,[0,1],We.defaults.specularIntensity),new Me("流向","控制水流方向,局部坐标方向",!1,!1,[this,"flowDirection"],1,[0,360],We.defaults.flowDirection),new Me("水体浑浊度","控制水体的浑浊程度,数值越大,浑浊程度越大,取值范围 0 - 10。",!1,!1,[this,"murkiness"],.1,[0,10],We.defaults.murkiness),new S("水流速度","控制水流速度,单位 米/秒",!1,!1,[this,"flowSpeed"],We.defaults.flowSpeed)]}};d(We,"type",We.register("ESDynamicWater",We,{chsName:"动态水面",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"局部多边形水面"})),d(We,"defaults",{...Si.defaults,waterColor:[.1497,.165,.0031,1],frequency:1e3,waveVelocity:.5,amplitude:.1,specularIntensity:.8,waterTypes:[["river","river"],["ocean","ocean"],["lake","lake"],["custom","custom"]],waterType:"river",flowDirection:0,flowSpeed:0,waterImage:void 0,murkiness:5});let ra=We;(n=>{n.createDefaultProps=()=>({...Si.createDefaultProps(),allowPicking:!0,waterImage:c.reactJsonWithUndefined(void 0),waterColor:[.1497,.165,.0031,1],frequency:1e3,waveVelocity:.5,amplitude:.1,specularIntensity:.8,waterType:"river",flowDirection:0,flowSpeed:0,murkiness:5})})(ra||(ra={})),c.extendClassProps(ra.prototype,ra.createDefaultProps);const qe=class qe extends _e{get typeName(){return"ESGeoWater"}get defaultProps(){return qe.createDefaultProps()}constructor(e){super(e)}getESProperties(){const e={...super.getESProperties()};return{...e,defaultMenu:"basic",basic:[...e.basic,new H("水域类型","当为custom是其他控制效果的参数生效,否则不生效,使用对应水域类型的预定效果",!1,!1,[this,"waterType"],qe.defaults.waterTypes,qe.defaults.waterType),new S("频率","控制波数的数值(次/千米)",!1,!1,[this,"frequency"],qe.defaults.frequency),new Me("振幅","控制水波振幅的数值",!1,!1,[this,"amplitude"],.01,[0,1],qe.defaults.amplitude),new Me("流向","控制水流方向,局部坐标方向",!1,!1,[this,"flowDirection"],1,[0,360],qe.defaults.flowDirection),new Me("波动频率","控制水波纹扰动的速率",!1,!1,[this,"waveVelocity"],.01,[0,1],qe.defaults.waveVelocity),new Me("镜面反射强度","控制镜面反射强度的数值",!1,!1,[this,"specularIntensity"],.01,[0,1],qe.defaults.specularIntensity),new Me("水体浑浊度","控制水体的浑浊程度,数值越大,浑浊程度越大,取值范围0 - 10。",!1,!1,[this,"murkiness"],.1,[0,10],qe.defaults.murkiness),new S("水流速度","控制水流速度,单位 米/秒",!1,!1,[this,"flowSpeed"],qe.defaults.flowSpeed),new J("水的底色","waterColor",!1,!1,[this,"waterColor"],qe.defaults.waterColor),new U("水的图片","waterImage",!1,!1,[this,"waterImage"],qe.defaults.waterImage)]}}getProperties(e){return[...super.getProperties(e),new z("ESGeoWater","ESGeoWater",[new H("水域类型","当为custom是其他控制效果的参数生效,否则不生效,使用对应水域类型的预定效果",!1,!1,[this,"waterType"],qe.defaults.waterTypes),new U("水的图片","waterImage",!1,!1,[this,"waterImage"],qe.defaults.waterImage),new J("水的底色","waterColor",!1,!1,[this,"waterColor"],qe.defaults.waterColor),new S("频率","控制波数的数值(次/千米)",!1,!1,[this,"frequency"],qe.defaults.frequency),new Me("波动频率","控制水波纹扰动的速率",!1,!1,[this,"waveVelocity"],.01,[0,1],qe.defaults.waveVelocity),new Me("振幅","控制水波振幅的数值",!1,!1,[this,"amplitude"],.01,[0,1],qe.defaults.amplitude),new Me("镜面反射强度","控制镜面反射强度的数值",!1,!1,[this,"specularIntensity"],.01,[0,1],qe.defaults.specularIntensity),new Me("流向","控制水流方向,局部坐标方向",!1,!1,[this,"flowDirection"],1,[0,360],qe.defaults.flowDirection),new Me("水体浑浊度","控制水体的浑浊程度,数值越大,浑浊程度越大,取值范围0 - 10。",!1,!1,[this,"murkiness"],.1,[0,10],qe.defaults.murkiness),new S("水流速度","控制水流速度,单位 米/秒",!1,!1,[this,"flowSpeed"],qe.defaults.flowSpeed)])]}};d(qe,"type",qe.register("ESGeoWater",qe,{chsName:"地理水面",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"地理动态水面"})),d(qe,"defaults",{..._e.defaults,waterColor:[.1497,.165,.0031,.8],frequency:1e3,waveVelocity:.5,amplitude:.1,specularIntensity:.8,waterTypes:[["river","river"],["ocean","ocean"],["lake","lake"],["custom","custom"]],waterType:"river",flowDirection:0,flowSpeed:0,waterImage:{},murkiness:5});let na=qe;(n=>{n.createDefaultProps=()=>({..._e.createDefaultProps(),allowPicking:!0,waterImage:c.reactJsonWithUndefined(void 0),waterColor:[.1497,.165,.0031,1],frequency:1e3,waveVelocity:.5,amplitude:.1,specularIntensity:.8,waterType:"river",flowDirection:0,flowSpeed:0,murkiness:5})})(na||(na={})),c.extendClassProps(na.prototype,na.createDefaultProps);const Ua=class Ua extends q{get typeName(){return"ESLevelRuntimeModel"}get defaultProps(){return Ua.createDefaultProps()}constructor(e){super(e)}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new S("下载进度","下载进度",!0,!0,[this,"downloadProgress"]),new Z("levelName","levelName",!1,!1,[this,"levelName"],""),new S("levelLoadDistance","levelLoadDistance",!1,!1,[this,"levelLoadDistance"],1e3),new It("levelOffset","levelOffset",!1,!1,[this,"levelOffset"],[0,0,0])],dataSource:[...e.dataSource,new U("url","url",!1,!1,[this,"url"],"")]}}getProperties(e){return[...super.getProperties(e),new z("通用","通用",[new U("url","url",!1,!1,[this,"url"]),new Z("levelName","levelName",!1,!1,[this,"levelName"]),new S("下载进度","下载进度",!0,!0,[this,"downloadProgress"]),new S("levelLoadDistance","levelLoadDistance",!1,!1,[this,"levelLoadDistance"]),new It("levelOffset","levelOffset",!1,!1,[this,"levelOffset"])])]}};d(Ua,"type",Ua.register("ESLevelRuntimeModel",Ua,{chsName:"关卡包模型",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"关卡包模型"})),d(Ua,"defaults",{...q.defaults,url:""});let ia=Ua;(n=>{n.createDefaultProps=()=>({...q.createDefaultProps(),url:"",downloadProgress:0,levelName:"",levelOffset:c.reactArray([0,0,0]),levelLoadDistance:1e3})})(ia||(ia={})),c.extendClassProps(ia.prototype,ia.createDefaultProps);const Kt=class Kt extends Or{constructor(t){super(t);d(this,"_deprecated",[{materialMode:{blue:"multipleArrows",purple:"singleArrow"}},"show"]);d(this,"_deprecatedWarningFunc",(()=>{this._deprecatedWarning()})());this.filled=!0,this.stroked=!1,this.fillColor=[1,0,.73,1]}get typeName(){return"ESPipeline"}get defaultProps(){return Kt.createDefaultProps()}getESProperties(){const t={...super.getESProperties()};return{...t,defaultMenu:"basic",basic:[...t.basic,new S("半径","radius(米)",!1,!1,[this,"radius"],Kt.defaults.radius),new S("圆边数","sides(圆细分边)",!1,!1,[this,"sides"],Kt.defaults.sides),new S("材质速度","speed",!1,!1,[this,"speed"],Kt.defaults.speed),new H("材质模式","materialMode",!1,!1,[this,"materialMode"],Kt.defaults.materialModes),new U("材质图片和重复度","materialImage",!1,!1,[this,"materialImage"],Kt.defaults.materialImage)],style:[new z("点样式","点样式集合",[]),new F("开启","开启点样式",!1,!1,[this,"pointed"],!1),new S("点大小","点大小(pointSize)",!1,!1,[this,"pointSize"],1),new H("点类型","点类型(pointSizeType)",!1,!1,[this,"pointSizeType"],[["screen","screen"],["world","world"]],"screen"),new J("点颜色","点颜色(pointColor)",!1,!1,[this,"pointColor"],[1,1,1,1]),new z("线样式","线样式集合",[]),new F("开启线样式","开启线样式",!1,!1,[this,"stroked"],!0),new S("线宽","线宽(strokeWidth)",!1,!1,[this,"strokeWidth"],1),new H("线类型","线类型(strokeWidthType)",!1,!1,[this,"strokeWidthType"],[["screen","screen"],["world","world"]],"screen"),new J("线颜色","线颜色(strokeColor)",!1,!1,[this,"strokeColor"],[1,1,1,1]),new F("是否贴地","是否贴地(线)",!1,!1,[this,"strokeGround"],!1),new z("面样式","面样式集合",[]),new F("开启","开启填充样式",!1,!1,[this,"filled"],!1),new J("填充颜色","填充颜色(fillColor)",!1,!1,[this,"fillColor"],[1,1,1,1]),new F("是否贴地","是否贴地",!1,!1,[this,"fillGround"],!1)]}}getProperties(t){return[...super.getProperties(t),new z("通用","通用",[new S("半径","radius(米)",!1,!1,[this,"radius"],Kt.defaults.radius),new S("圆边数","sides(圆细分边)",!1,!1,[this,"sides"],Kt.defaults.sides),new U("材质图片和重复度","materialImage",!1,!1,[this,"materialImage"],Kt.defaults.materialImage),new S("材质速度","speed",!1,!1,[this,"speed"],Kt.defaults.speed),new H("材质模式","materialMode",!1,!1,[this,"materialMode"],Kt.defaults.materialModes)])]}};d(Kt,"type",Kt.register("ESPipeline",Kt,{chsName:"管线",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"ESPipeline"})),d(Kt,"defaults",{...Or.defaults,radius:10,sides:10,materialImage:{url:"",uDis:50,vDis:10},speed:1,materialModes:[["单箭头","singleArrow"],["多箭头","multipleArrows"]]});let sa=Kt;(n=>{n.createDefaultProps=()=>({...Or.createDefaultProps(),radius:10,sides:10,materialMode:"singleArrow",materialImage:c.reactJson(n.defaults.materialImage),speed:1})})(sa||(sa={})),c.extendClassProps(sa.prototype,sa.createDefaultProps);const Rr=class Rr extends le{constructor(t){super(t);d(this,"editingBindMode","visibility")}get typeName(){return"ESVisibilityAnalysis"}get defaultProps(){return Rr.createDefaultProps()}getESProperties(){const t={...super.getESProperties()};return{...t,basic:[...t.basic,new J("可视区域颜色","可视区域颜色.",!1,!1,[this,"visibleColor"],Rr.defaults.visibleColor),new J("遮挡区域颜色","遮挡区域颜色.",!1,!1,[this,"invisibleColor"],Rr.defaults.invisibleColor),new S("视点高度偏移","heightOffset",!1,!1,[this,"heightOffset"],Rr.defaults.heightOffset)]}}getProperties(t){return[...super.getProperties(t),new z("通用","通用",[new J("可视区域颜色","可视区域颜色.",!1,!1,[this,"visibleColor"],Rr.defaults.visibleColor),new J("遮挡区域颜色","遮挡区域颜色.",!1,!1,[this,"invisibleColor"],Rr.defaults.invisibleColor),new S("视点高度偏移","heightOffset",!1,!1,[this,"heightOffset"],Rr.defaults.heightOffset)])]}};d(Rr,"type",Rr.register("ESVisibilityAnalysis",Rr,{chsName:"通视分析,视线分析",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"通视分析,视线分析"})),d(Rr,"supportEditingModes",[...le.supportEditingModes,se.VisibilityAppend,se.VisibilityModify]),d(Rr,"defaults",{...le.defaults,visibleColor:[0,1,0,1],invisibleColor:[1,0,0,1],heightOffset:0});let oa=Rr;(n=>{n.createDefaultProps=()=>({...le.createDefaultProps(),visibleColor:c.reactArray([0,1,0,1]),invisibleColor:c.reactArray([1,0,0,1]),heightOffset:0})})(oa||(oa={})),c.extendClassProps(oa.prototype,oa.createDefaultProps);const Ga=class Ga extends _e{constructor(t){super(t);d(this,"_startEvent",this.dv(new c.Event));d(this,"_clearEvent",this.dv(new c.Event));d(this,"_volume",this.disposeVar(c.react(0)));this.filled=!1,this.stroked=!0,this.strokeStyle.width=2}get typeName(){return"ESVolumeMeasurement"}get defaultProps(){return Ga.createDefaultProps()}get startEvent(){return this._startEvent}start(){this._startEvent.emit()}get clearEvent(){return this._clearEvent}clear(){this._clearEvent.emit()}get volume(){return this._volume.value}set volume(t){this._volume.value=t}get volumeChanged(){return this._volume.changed}getProperties(t){return[...super.getProperties(t),new z("通用","通用",[new S("基准面高程","基准面高程",!0,!1,[this,"planeHeight"]),new S("采样间距 m","采样间距 m",!1,!1,[this,"gridWidth"]),new S("挖方","挖方 m³",!1,!0,[this,"cutVolume"]),new S("填方","填方 m³",!1,!0,[this,"fillVolume"]),new S("挖填方","挖填方 m³",!1,!0,[this,"cutAndFillVolume"]),new S("计算进度","计算进度",!1,!0,[this,"progress"]),new ie("开始分析","开始分析",[],()=>this.start(),[]),new ie("清空分析结果","清空分析结果",[],()=>this.clear(),[]),new F("是否开启深度检测","A boolean Property specifying the visibility.",!1,!1,[this,"depthTest"])])]}};d(Ga,"type",Ga.register("ESVolumeMeasurement",Ga,{chsName:"体积测量",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"体积测量"})),d(Ga,"defaults",{..._e.defaults});let aa=Ga;(n=>{n.createDefaultProps=()=>({..._e.createDefaultProps(),planeHeight:c.react(void 0),gridWidth:1,cutVolume:0,fillVolume:0,cutAndFillVolume:0,progress:0,depthTest:!1})})(aa||(aa={})),c.extendClassProps(aa.prototype,aa.createDefaultProps);const Rl=class Rl extends wi{constructor(t){super(t);d(this,"_human",this.dv(new wi));d(this,"_poi",this.dv(new Ei));d(this,"combinationClass",!0);this.mainClass=this._human,this._human.parentID=this.id,this._poi.parentID=this.id,this.d(this.components.disposableAdd(this._human)),this.d(this.components.disposableAdd(this._poi));{const{_human:r,_poi:i}=this;this.d(c.track([r,"show"],[this,"show"])),this.d(c.track([i,"show"],[this,"show"])),this.d(c.track([r,"allowPicking"],[this,"allowPicking"])),this.d(c.track([i,"allowPicking"],[this,"allowPicking"])),this.d(c.bind([r,"scale"],[this,"scale"])),this.d(c.bind([i,"scale"],[this,"scale"])),this.d(c.track([r,"collision"],[this,"collision"])),this.d(c.track([i,"collision"],[this,"collision"])),this.d(c.bind([r,"flyInParam"],[this,"flyInParam"])),this.d(c.bind([r,"flyToParam"],[this,"flyToParam"])),this.d(c.track([r,"animation"],[this,"animation"])),this.d(c.track([r,"mode"],[this,"mode"])),this.d(c.track([r,"minVisibleDistance"],[this,"minVisibleDistance"])),this.d(c.track([r,"maxVisibleDistance"],[this,"maxVisibleDistance"])),this.d(c.track([i,"name"],[this,"name"])),this.d(c.track([i,"mode"],[this,"poiMode"])),this.d(c.track([i,"autoAnchor"],[this,"autoAnchor"])),this.d(c.track([i,"screenRender"],[this,"screenRender"])),this.d(c.track([i,"size"],[this,"size"])),this.d(c.track([i,"anchor"],[this,"anchor"])),this.d(c.track([i,"sizeByContent"],[this,"sizeByContent"])),this.d(c.track([i,"renderMode"],[this,"renderMode"])),this.d(c.track([i,"rotationType"],[this,"rotationType"])),this.d(c.track([i,"zOrder"],[this,"zOrder"])),this.d(c.track([i,"minVisibleDistance"],[this,"minVisibleDistance"])),this.d(c.track([i,"maxVisibleDistance"],[this,"maxVisibleDistance"])),this.d(c.bind([r,"position"],[this,"position"])),this.d(c.bind([r,"rotation"],[this,"rotation"])),this.d(this.flyInEvent.don(s=>{r.flyIn(s)})),this.d(this.flyToEvent.don(s=>{r.flyTo(s)})),this.d(this.calcFlyToParamEvent.don(()=>{r.calcFlyToParam()})),this.d(this.calcFlyInParamEvent.don(()=>{r.calcFlyInParam()})),this.d(this.smoothMoveEvent.don((s,o)=>{r.smoothMove(s,o)})),this.d(this.smoothMoveWithRotationEvent.don((s,o,a)=>{r.smoothMoveWithRotation(s,o,a)})),this.d(this.smoothMoveOnGroundEvent.don((s,o,a,l)=>{r.smoothMoveOnGround(s,o,a,l)})),this.d(this.smoothMoveWithRotationOnGroundEvent.don((s,o,a,l,u)=>{r.smoothMoveWithRotationOnGround(s,o,a,l,u)})),this.d(this.automaticLandingEvent.don(()=>{r.automaticLanding()}))}}get typeName(){return"ESHumanPoi"}get defaultProps(){return Rl.createDefaultProps()}get human(){return this._human}get poi(){return this._poi}getESProperties(){const t={...super.getESProperties()};return{...t,basic:[...t.basic,new H("poi模式","poiMode",!1,!1,[this,"poiMode"],Ei.defaults.modes,"SquareH01"),new S("poi高度偏移","poi高度偏移",!1,!1,[this,"poiOffsetHeight"],1.8)]}}getProperties(t){return[...super.getProperties(t),new H("poi模式","poiMode",!1,!1,[this,"poiMode"],Ei.defaults.modes),new S("poi高度偏移","poi高度偏移",!1,!1,[this,"poiOffsetHeight"],1.8)]}};d(Rl,"type",Rl.register("ESHumanPoi",Rl,{chsName:"人员poi",tags:["ESObjects"],description:"ESHuman + ESPoi2D组合对象"}));let la=Rl;(n=>{n.createDefaultProps=()=>({poiOffsetHeight:1.8,poiMode:"SquareH01",style:c.reactJson({}),autoAnchor:!0,screenRender:!0,size:c.reactArray([100,100]),anchor:c.reactArray([.5,1]),sizeByContent:!0,renderMode:0,rotationType:1,zOrder:0,...wi.createDefaultProps()})})(la||(la={})),c.extendClassProps(la.prototype,la.createDefaultProps);const Qt=class Qt extends _e{get typeName(){return"ESPit"}get defaultProps(){return Qt.createDefaultProps()}constructor(e){super(e),this.collision=!1,this.allowPicking=!1,this.filled=!0}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new S("深度","坑深度(米)",!1,!1,[this,"depth"],Qt.defaults.depth),new S("插值","插值距离(米)",!1,!1,[this,"interpolation"],Qt.defaults.interpolation),new S("透明度","透明度",!1,!1,[this,"opacity"],Qt.defaults.opacity),new U("侧面图片","侧面图片",!1,!1,[this,"sideImage"],Qt.defaults.sideImage),new U("底面图片","底面图片",!1,!1,[this,"bottomImage"],Qt.defaults.bottomImage)],style:[new z("点样式","点样式集合",[]),new F("开启","开启点样式",!1,!1,[this,"pointed"],!1),new S("点大小","点大小(pointSize)",!1,!1,[this,"pointSize"],1),new H("点类型","点类型(pointSizeType)",!1,!1,[this,"pointSizeType"],[["screen","screen"],["world","world"]],"screen"),new J("点颜色","点颜色(pointColor)",!1,!1,[this,"pointColor"],[1,1,1,1]),new z("线样式","线样式集合",[]),new F("开启","开启线样式",!1,!1,[this,"stroked"],!0),new S("线宽","线宽(strokeWidth)",!1,!1,[this,"strokeWidth"],1),new H("线类型","线类型(strokeWidthType)",!1,!1,[this,"strokeWidthType"],[["screen","screen"],["world","world"]],"screen"),new J("线颜色","线颜色(strokeColor)",!1,!1,[this,"strokeColor"],[1,1,1,1]),new F("是否贴地","是否贴地(线)",!1,!1,[this,"strokeGround"],!1),new z("面样式","面样式集合",[]),new F("开启","开启填充样式",!1,!1,[this,"filled"],!0),new J("填充颜色","填充颜色(fillColor)",!1,!1,[this,"fillColor"],[1,1,1,1]),new F("是否贴地","是否贴地",!1,!1,[this,"fillGround"],!1)]}}getProperties(e){return[...super.getProperties(e),new z("通用","通用",[new S("深度","坑深度(米)",!1,!1,[this,"depth"],Qt.defaults.depth),new S("插值","插值距离(米)",!1,!1,[this,"interpolation"],Qt.defaults.interpolation),new U("侧面图片","侧面图片",!1,!1,[this,"sideImage"],Qt.defaults.sideImage),new U("底面图片","底面图片",!1,!1,[this,"bottomImage"],Qt.defaults.bottomImage),new S("opacity","透明度",!1,!1,[this,"opacity"],Qt.defaults.opacity)])]}};d(Qt,"type",Qt.register("ESPit",Qt,{chsName:"坑",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"坑"})),d(Qt,"defaults",{..._e.defaults,depth:100,sideImage:{url:j.context.getStrFromEnv("${earthsdk3-assets-script-dir}/assets/img/ESPit/side.jpg"),uDis:50,vDis:50},bottomImage:{url:j.context.getStrFromEnv("${earthsdk3-assets-script-dir}/assets/img/ESPit/bottom.jpg"),uDis:50,vDis:50},opacity:1,interpolation:50});let Ci=Qt;(n=>{n.createDefaultProps=()=>({..._e.createDefaultProps(),depth:100,sideImage:c.reactJson(n.defaults.sideImage),bottomImage:c.reactJson(n.defaults.bottomImage),opacity:1,interpolation:50})})(Ci||(Ci={})),c.extendClassProps(Ci.prototype,Ci.createDefaultProps);const Fl=class Fl extends Ci{constructor(t){super(t);d(this,"_excavate",this.dv(new Zi));d(this,"_pit",this.dv(new Ci));d(this,"combinationClass",!0);this.mainClass=this._pit,this.excavate.parentID=this.id,this._pit.parentID=this.id,this.d(this.components.disposableAdd(this._excavate)),this.d(this.components.disposableAdd(this._pit));{const{_excavate:r,_pit:i}=this;this.d(c.track([r,"show"],[this,"show"])),this.d(c.track([i,"show"],[this,"show"])),this.d(c.track([r,"allowPicking"],[this,"allowPicking"])),this.d(c.track([i,"allowPicking"],[this,"allowPicking"])),this.d(c.track([r,"collision"],[this,"collision"])),this.d(c.track([i,"collision"],[this,"collision"])),this.d(c.bind([i,"points"],[this,"points"])),this.d(c.track([r,"points"],[this,"points"])),this.d(c.track([i,"pointed"],[this,"pointed"])),this.d(c.track([r,"pointed"],[this,"pointed"])),this.d(c.track([i,"pointStyle"],[this,"pointStyle"])),this.d(c.track([r,"pointStyle"],[this,"pointStyle"])),this.d(c.track([i,"stroked"],[this,"stroked"])),this.d(c.track([r,"stroked"],[this,"stroked"])),this.d(c.track([i,"strokeStyle"],[this,"strokeStyle"])),this.d(c.track([r,"strokeStyle"],[this,"strokeStyle"])),this.d(c.track([i,"filled"],[this,"filled"])),this.d(c.track([i,"fillStyle"],[this,"fillStyle"])),this.d(c.track([r,"fillStyle"],[this,"fillStyle"])),this.d(c.track([r,"mode"],[this,"mode"])),this.d(c.track([r,"targetID"],[this,"targetID"])),this.d(c.track([i,"depth"],[this,"depth"])),this.d(c.track([i,"sideImage"],[this,"sideImage"])),this.d(c.track([i,"bottomImage"],[this,"bottomImage"])),this.d(c.track([i,"opacity"],[this,"opacity"])),this.d(c.track([i,"interpolation"],[this,"interpolation"])),this.d(c.bind([i,"flyInParam"],[this,"flyInParam"])),this.d(c.bind([i,"flyToParam"],[this,"flyToParam"])),this.d(this.flyInEvent.don(s=>{i.flyIn(s)})),this.d(this.flyToEvent.don(s=>{i.flyTo(s)})),this.d(this.calcFlyToParamEvent.don(()=>{i.calcFlyToParam()})),this.d(this.calcFlyInParamEvent.don(()=>{i.calcFlyInParam()}))}}get typeName(){return"ESHole"}get defaultProps(){return Fl.createDefaultProps()}get excavate(){return this._excavate}getESProperties(){const t={...super.getESProperties()};return{...t,basic:[...t.basic,new H("模式","mode",!1,!1,[this,"mode"],Zi.defaults.modes,"in"),new Z("瓦片图层","targetID",!1,!1,[this,"targetID"],"")]}}};d(Fl,"type",Fl.register("ESHole",Fl,{chsName:"挖坑(带材质+深度)",tags:["ESObjects"],description:"挖坑"}));let ua=Fl;(n=>{n.createDefaultProps=()=>({mode:"in",targetID:"",...Ci.createDefaultProps()})})(ua||(ua={})),c.extendClassProps(ua.prototype,ua.createDefaultProps);const Nh={layerconfigfind:"/ts/layer/config/get",layerconfigsave:"/ts/layer/config/put",featureproperty:"/ts/editor/property",featureeditormuti:"/ts/editor/update",getts:"/ts/info"},Yy=async(n,e,t,r)=>{try{const i=window.localStorage.getItem("Authorization");let s=n+`${Nh.layerconfigfind}?tileServiceName=${e}`;t&&(s+=`&earthdstoken=${encodeURIComponent(r)}`);const o={headers:{...!t&&i?{Authorization:i}:{}},mode:"cors"},l=await(await fetch(s,o)).text();return JSON.parse(l)}catch(i){console.error(i)}},Jy=async(n,e,t,r,i)=>{try{const s=window.localStorage.getItem("Authorization");let o=n+Nh.layerconfigsave;const a=i??{};t&&(o+=`?earthdstoken=${encodeURIComponent(r)}`);const l={method:"POST",headers:{"Content-Type":"application/json",...!t&&s?{Authorization:s}:{}},mode:"cors",body:JSON.stringify({tileServiceName:e,layerConfig:JSON.stringify(a)})},h=await(await fetch(o,l)).text();return JSON.parse(h)}catch(s){console.error(s)}},Zy=async(n,e,t)=>{try{const r=window.localStorage.getItem("Authorization");let i=n;e&&(i+=`?earthdstoken=${encodeURIComponent(t)}`);const s={headers:{...!e&&r?{Authorization:r}:{}},mode:"cors"},a=await(await fetch(i,s)).text(),l=JSON.parse(a);if(l.status=="ok")return l.data.port;console.error(l.status);return}catch(r){console.error(r)}},Ky=async(n,e,t,r,i)=>{try{const s={tileServiceName:e,featureId:t},o=window.localStorage.getItem("Authorization");let a=n+Nh.featureproperty;r&&(a+=`?earthdstoken=${encodeURIComponent(i)}`);const u=await(await fetch(a,{method:"post",headers:{"Content-Type":"application/json",...!r&&o?{Authorization:o}:{}},body:JSON.stringify(s),mode:"cors"})).text(),h=JSON.parse(u);if(h.status=="ok")return h.data;console.error(h.data.status);return}catch(s){console.error(s)}},Wa=class Wa extends Pt{constructor(t){super(t);d(this,"_es3DTileset",this.dv(new Pt));d(this,"_ids",this.dv(c.reactJson([])));d(this,"_useEarthDSToken",this.dv(c.react(!1)));d(this,"_earthdstoken",this.dv(c.react("")));d(this,"combinationClass",!0);d(this,"_highlightInner3DtilesetEvent",this.dv(new c.Event));d(this,"_removeHighlightInner3DtilesetEvent",this.dv(new c.Event));d(this,"_tilesetServePort",this.dv(c.react("")));this.es3DTileset.parentID=this.id,this.mainClass=this._es3DTileset;{const r=async()=>{if(typeof this.url!="string"){console.error("服务地址不合法, Init Error! 示例: http://localhost:9009/ts/info/ts01");return}this.url?this.refresh():this._es3DTileset.url=""};this.d(this.urlChanged.don(()=>{r()}))}{this.d(this.components.disposableAdd(this._es3DTileset));const r=this._es3DTileset;this.d(c.track([r,"allowPicking"],[this,"allowPicking"])),this.d(c.track([r,"collision"],[this,"collision"])),this.d(c.bind([r,"flyToParam"],[this,"flyToParam"])),this.d(c.bind([r,"flyToParam"],[this,"flyToParam"])),this.d(c.track([r,"actorTag"],[this,"actorTag"])),this.d(c.track([r,"materialMode"],[this,"materialMode"])),this.d(c.track([r,"highlight"],[this,"highlight"])),this.d(c.track([r,"maximumScreenSpaceError"],[this,"maximumScreenSpaceError"])),this.d(c.track([r,"highlightID"],[this,"highlightID"])),this.d(c.track([r,"highlightColor"],[this,"highlightColor"])),this.d(c.bind([r,"offset"],[this,"offset"])),this.d(c.bind([r,"rotation"],[this,"rotation"])),this.d(c.track([r,"czmImageBasedLightingFactor"],[this,"czmImageBasedLightingFactor"])),this.d(c.track([r,"czmLuminanceAtZenith"],[this,"czmLuminanceAtZenith"])),this.d(c.track([r,"czmMaximumMemoryUsage"],[this,"czmMaximumMemoryUsage"])),this.d(c.track([r,"czmClassificationType"],[this,"czmClassificationType"])),this.d(c.track([r,"czmStyleJson"],[this,"czmStyleJson"])),this.d(c.track([r,"czmBackFaceCulling"],[this,"czmBackFaceCulling"])),this.d(c.track([r,"czmDebugShowBoundingVolume"],[this,"czmDebugShowBoundingVolume"])),this.d(c.track([r,"czmDebugShowContentBoundingVolume"],[this,"czmDebugShowContentBoundingVolume"])),this.d(c.track([r,"czmSkipLevelOfDetail"],[this,"czmSkipLevelOfDetail"])),this.d(c.track([r,"colorBlendMode"],[this,"colorBlendMode"])),this.d(c.track([r,"cacheBytes"],[this,"cacheBytes"])),this.d(c.track([r,"clippingPlaneEnabled"],[this,"clippingPlaneEnabled"])),this.d(c.track([r,"unionClippingRegions"],[this,"unionClippingRegions"])),this.d(c.track([r,"clippingPlaneEdgeColor"],[this,"clippingPlaneEdgeColor"])),this.d(c.track([r,"clippingPlaneEdgeWidth"],[this,"clippingPlaneEdgeWidth"])),this.d(c.track([r,"materialParams"],[this,"materialParams"])),this.d(c.bind([r,"supportEdit"],[this,"supportEdit"])),this.d(c.bind([r,"clippingPlanesId"],[this,"clippingPlanesId"])),this.d(c.bind([r,"clippingPlaneIds"],[this,"clippingPlaneIds"])),this.d(c.bind([r,"flattenedPlaneId"],[this,"flattenedPlaneId"])),this.d(c.bind([r,"flattenedPlaneEnabled"],[this,"flattenedPlaneEnabled"])),this.d(c.bind([r,"clippingPlaneId"],[this,"clippingPlaneId"])),this.d(c.bind([r,"excavateId"],[this,"excavateId"]))}{const r=this._es3DTileset;this.d(this.refreshTilesetEvent.don(()=>{r.refreshTileset()})),this.d(this.highlightFeatureEvent.don((...i)=>{r.highlightFeature(...i)})),this.d(this.highlightFeatureAndFlyToEvent.don((...i)=>{r.highlightFeatureAndFlyTo(...i)})),this.d(this.setFeatureColorEvent.don((...i)=>{r.setFeatureColor(...i)})),this.d(this.setFeatureVisableEvent.don((...i)=>{r.setFeatureVisable(...i)})),this.d(this.resetFeatureStyleEvent.don((...i)=>{r.resetFeatureStyle(...i)})),this.d(this.setFeatureStyleEvent.don((...i)=>{r.setFeatureStyle(...i)})),this.d(this.flyInEvent.don((...i)=>{r.flyIn(i[0])})),this.d(this.flyToEvent.don((...i)=>{r.flyTo(i[0])})),this.d(this.calcFlyToParamEvent.don((...i)=>{r.calcFlyToParam(...i)})),this.d(this.calcFlyInParamEvent.don((...i)=>{r.calcFlyInParam(...i)}))}{const r=this._es3DTileset;this.d(r.tilesetReady.don(i=>{this.tilesetReady.emit(i)})),this.d(r.pickedEvent.don(i=>{i.assign({sceneObject:this}),this.pickedEvent.emit(i)}))}{const r=()=>{this.es3DTileset.show=this.show};r(),this.d(this.showChanged.don(()=>{r()}))}}get typeName(){return"ESRtsTileset"}get defaultProps(){return Wa.createDefaultProps()}get json(){return this._innerGetJson()}set json(t){this._innerSetJson(t)}get es3DTileset(){return this._es3DTileset}get ids(){return this._ids.value}get idsChanged(){return this._ids.changed}set ids(t){this._ids.value=t}get useEarthDSToken(){return this._useEarthDSToken.value}get useEarthDSTokenChanged(){return this._useEarthDSToken.changed}set useEarthDSToken(t){this._useEarthDSToken.value=t}get earthdstoken(){return this._earthdstoken.value}get earthdstokenChanged(){return this._earthdstoken.changed}set earthdstoken(t){this._earthdstoken.value=t}async getFeatureProperty(t){return await Ky(this.baseUrl,this.tileServiceName,t,this.useEarthDSToken,this.earthdstoken)}async getLayerConfig(){const t=await Yy(this.baseUrl,this.tileServiceName,this.useEarthDSToken,this.earthdstoken);return!t||!Array.isArray(t)?this.layerConfig=[]:this.layerConfig=t,this.layerConfig}async saveLayerConfig(){const t=this.layerConfig;return await Jy(this.baseUrl,this.tileServiceName,this.useEarthDSToken,this.earthdstoken,t)}get highlightInner3DtilesetEvent(){return this._highlightInner3DtilesetEvent}_highlightInner3Dtileset(t){this._highlightInner3DtilesetEvent.emit(t)}async highlightDSFeature(t){this._highlightInner3Dtileset(t)}get removeHighlightInner3DtilesetEvent(){return this._removeHighlightInner3DtilesetEvent}_removeHighlightInner3Dtileset(t){this._removeHighlightInner3DtilesetEvent.emit(t)}async removeHighlightDSFeature(t){this._removeHighlightInner3Dtileset(t)}async pickFeature(t,r){var a,l,u;const i=await t.pick(r),s=i.sceneObject;return!s||s.id!==this.id&&s.typeName!="ESRtsFeatureEditing"?void 0:s.typeName!="ESRtsFeatureEditing"?(this.ids=[...this.ids,(a=i==null?void 0:i.tilesetPickInfo)==null?void 0:a.id],{featureId:(l=i==null?void 0:i.tilesetPickInfo)==null?void 0:l.id,pickInnerFields:i==null?void 0:i.tilesetPickInfo}):{featureId:(u=i==null?void 0:i.sceneObject)==null?void 0:u.id,pickInnerFields:i==null?void 0:i.tilesetPickInfo}}get tilesetServePort(){return this._tilesetServePort.value}get tilesetServePortChanged(){return this._tilesetServePort.changed}set tilesetServePort(t){this._tilesetServePort.value=t}async getport(){const t=await Zy(this.url,this.useEarthDSToken,this.earthdstoken);if(t)return this.tilesetServePort=t,t;throw new Error("服务地址port获取失败!")}async refresh(){var i;if(!this.url||typeof this.url!="string")return;const t=(i=this.url.match(/\/ts\/info\/(.*)/))==null?void 0:i[1],r=+new Date;if(t){const s=this.tileServiceIp,o=await this.getport();await this.getLayerConfig(),this._es3DTileset.url=`${s}:${o}/tiles/tileset.json?t=${r}`}console.log("3dtileset url:",this._es3DTileset.url)}get baseUrl(){var t;if(this.url&&typeof this.url=="string"){const r=(t=this.url.match(/^(https?:\/\/[^\/]+)/))==null?void 0:t[1];if(!r)throw new Error("服务地址不合法,baseUrl is not found! 示例: http://localhost:9009/ts/info/ts01");return r}else throw new Error("服务地址不合法,baseUrl is not found! 示例: http://localhost:9009/ts/info/ts01")}get tileServiceName(){var t;if(this.url&&typeof this.url=="string"){const r=(t=this.url.match(/\/ts\/info\/(.*)/))==null?void 0:t[1];if(!r)throw console.log(this.url),new Error("服务地址不合法,tileServiceName is not found! 示例: http://localhost:9009/ts/info/ms01,");return r}else throw new Error("服务地址不合法,tileServiceName is not found! 示例: http://localhost:9009/ts/info/ms01")}get tileServiceIp(){var t;if(this.url&&typeof this.url=="string"){const r=(t=this.url.match(/^(https?:\/\/[^:]+)/))==null?void 0:t[1];if(!r)throw new Error("服务地址不合法,ip is not found! 示例: http://localhost:9009/ts/info/ts01");return r}else throw new Error("服务地址不合法,ip is not found! 示例: http://localhost:9009/ts/info/ts01")}getProperties(t){return[...super.getProperties(t),new z("ESRtsTileset","ESRtsTileset",[new U("图层配置","图层配置(layerConfig)",!0,!1,[this,"layerConfig"],[])])]}};d(Wa,"type",Wa.register("ESRtsTileset",Wa,{chsName:"CIMRTS实时3DTileset图层",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"实时3DTileset图层"})),d(Wa,"defaults",{...Pt.defaults,layerConfig:[]});let ca=Wa;(n=>{n.createDefaultProps=()=>({layerConfig:c.reactJsonWithUndefined(void 0),...Pt.createDefaultProps()})})(ca||(ca={})),c.extendClassProps(ca.prototype,ca.createDefaultProps);function Qy(n){return typeof n=="number"&&!isNaN(n)}const qa=class qa extends Pt{constructor(t){super(t);d(this,"combinationClass",!0)}get typeName(){return"ESRtsFeatureEditing"}get defaultProps(){return qa.createDefaultProps()}get json(){return{...this._innerGetJson(),show:this.show,materials:this.materials,changeMaterial:this.changeMaterial,props:this.props,rotation:this.rotation}}set json(t){this._innerSetJson(t)}async init(t,r){this.featureId=r;const i=await t.getFeatureProperty(r);this.uiShowprops=i.allFields.map(a=>({featureClassName:a.featureClassName,fields:a.fields.map(l=>({key:l.name,type:l.type,value:l.type!="Double"?l.value:Qy(l.value)?Number(l.value.toFixed(3)):""}))})),this.datasetName=i.datasetName,t.setFeatureVisable("id",[{value:this.featureId,visable:!1}]),this.d(()=>{t.setFeatureVisable("id",[{value:this.featureId,visable:!0}])});const s=t.tileServiceIp,o=t.tilesetServePort;if(!o)throw new Error("ESRtsFeatureEditing: port is not defined");this.url=`${s}:${o}/featuretiles/${this.featureId}/tileset.json`,this.allowPicking=!0,this.d(this.pickedEvent.don(a=>{a.assign({sceneObject:t}),t.pickedEvent.emit(a)})),this.d(()=>{this.editing=!1,t.removeHighlightDSFeature(this)})}getProperties(t){return[...super.getProperties(t)]}};d(qa,"type",qa.register("ESRtsFeatureEditing",qa,{chsName:"ESRtsFeatureEditing",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"实时3DTileset图层"})),d(qa,"defaults",{...Pt.defaults,layerConfig:{}});let ha=qa;(n=>{n.createDefaultProps=()=>({...Pt.createDefaultProps(),datasetName:void 0,featureId:void 0,materials:c.reactJson({}),changeMaterial:c.reactJsonWithUndefined(void 0),uiShowprops:c.reactJson({}),props:c.reactJson({})})})(ha||(ha={})),c.extendClassProps(ha.prototype,ha.createDefaultProps);const By=async(n,e,t)=>{try{const r=window.localStorage.getItem("Authorization");let i=n;e&&(i+=`?earthdstoken=${encodeURIComponent(t)}`);const s={headers:{...!e&&r?{Authorization:r}:{}},mode:"cors"},a=await(await fetch(i,s)).text(),l=JSON.parse(a);if(l.status=="ok")return l.data.port;console.error(l.status);return}catch(r){console.error(r)}},Xa=class Xa extends Pt{constructor(t){super(t);d(this,"_es3DTileset",this.dv(new Pt));d(this,"combinationClass",!0);d(this,"_tilesetServePort",this.dv(c.react("")));d(this,"_useEarthDSToken",this.dv(c.react(!1)));d(this,"_earthdstoken",this.dv(c.react("")));this.es3DTileset.parentID=this.id,this.mainClass=this._es3DTileset;{const r=async()=>{if(typeof this.url!="string"){console.error("服务地址不合法, Init Error! 示例: http://localhost:9009/ts/info/ms01");return}this.url?this.refresh():this._es3DTileset.url=""};this.d(this.urlChanged.don(()=>{r()}))}{this.d(this.components.disposableAdd(this._es3DTileset));const r=this._es3DTileset;this.d(c.track([r,"allowPicking"],[this,"allowPicking"])),this.d(c.track([r,"collision"],[this,"collision"])),this.d(c.bind([r,"flyToParam"],[this,"flyToParam"])),this.d(c.bind([r,"flyToParam"],[this,"flyToParam"])),this.d(c.track([r,"actorTag"],[this,"actorTag"])),this.d(c.track([r,"materialMode"],[this,"materialMode"])),this.d(c.track([r,"highlight"],[this,"highlight"])),this.d(c.track([r,"maximumScreenSpaceError"],[this,"maximumScreenSpaceError"])),this.d(c.track([r,"highlightID"],[this,"highlightID"])),this.d(c.track([r,"highlightColor"],[this,"highlightColor"])),this.d(c.bind([r,"offset"],[this,"offset"])),this.d(c.bind([r,"rotation"],[this,"rotation"])),this.d(c.track([r,"czmImageBasedLightingFactor"],[this,"czmImageBasedLightingFactor"])),this.d(c.track([r,"czmLuminanceAtZenith"],[this,"czmLuminanceAtZenith"])),this.d(c.track([r,"czmMaximumMemoryUsage"],[this,"czmMaximumMemoryUsage"])),this.d(c.track([r,"czmClassificationType"],[this,"czmClassificationType"])),this.d(c.track([r,"czmStyleJson"],[this,"czmStyleJson"])),this.d(c.track([r,"czmBackFaceCulling"],[this,"czmBackFaceCulling"])),this.d(c.track([r,"czmDebugShowBoundingVolume"],[this,"czmDebugShowBoundingVolume"])),this.d(c.track([r,"czmDebugShowContentBoundingVolume"],[this,"czmDebugShowContentBoundingVolume"])),this.d(c.track([r,"czmSkipLevelOfDetail"],[this,"czmSkipLevelOfDetail"])),this.d(c.track([r,"colorBlendMode"],[this,"colorBlendMode"])),this.d(c.track([r,"cacheBytes"],[this,"cacheBytes"])),this.d(c.track([r,"clippingPlaneEnabled"],[this,"clippingPlaneEnabled"])),this.d(c.track([r,"unionClippingRegions"],[this,"unionClippingRegions"])),this.d(c.track([r,"clippingPlaneEdgeColor"],[this,"clippingPlaneEdgeColor"])),this.d(c.track([r,"clippingPlaneEdgeWidth"],[this,"clippingPlaneEdgeWidth"])),this.d(c.track([r,"materialParams"],[this,"materialParams"])),this.d(c.bind([r,"supportEdit"],[this,"supportEdit"])),this.d(c.bind([r,"clippingPlanesId"],[this,"clippingPlanesId"])),this.d(c.bind([r,"clippingPlaneIds"],[this,"clippingPlaneIds"])),this.d(c.bind([r,"flattenedPlaneId"],[this,"flattenedPlaneId"])),this.d(c.bind([r,"flattenedPlaneEnabled"],[this,"flattenedPlaneEnabled"])),this.d(c.bind([r,"clippingPlaneId"],[this,"clippingPlaneId"])),this.d(c.bind([r,"excavateId"],[this,"excavateId"]))}{const r=this._es3DTileset;this.d(this.refreshTilesetEvent.don(()=>{r.refreshTileset()})),this.d(this.highlightFeatureEvent.don((...i)=>{r.highlightFeature(...i)})),this.d(this.highlightFeatureAndFlyToEvent.don((...i)=>{r.highlightFeatureAndFlyTo(...i)})),this.d(this.setFeatureColorEvent.don((...i)=>{r.setFeatureColor(...i)})),this.d(this.setFeatureVisableEvent.don((...i)=>{r.setFeatureVisable(...i)})),this.d(this.resetFeatureStyleEvent.don((...i)=>{r.resetFeatureStyle(...i)})),this.d(this.flyInEvent.don((...i)=>{r.flyIn(i[0])})),this.d(this.flyToEvent.don((...i)=>{r.flyTo(i[0])})),this.d(this.calcFlyToParamEvent.don((...i)=>{r.calcFlyToParam(...i)})),this.d(this.calcFlyInParamEvent.don((...i)=>{r.calcFlyInParam(...i)}))}{const r=this._es3DTileset;this.d(r.tilesetReady.don(i=>{this.tilesetReady.emit(i)})),this.d(r.pickedEvent.don(i=>{i.assign({sceneObject:this}),this.pickedEvent.emit(i)}))}{const r=()=>{this.es3DTileset.show=this.show};r(),this.d(this.showChanged.don(()=>{r()}))}}get typeName(){return"ESMsTileset"}get defaultProps(){return Xa.createDefaultProps()}get json(){return this._innerGetJson()}set json(t){this._innerSetJson(t)}get es3DTileset(){return this._es3DTileset}get tilesetServePort(){return this._tilesetServePort.value}get tilesetServePortChanged(){return this._tilesetServePort.changed}set tilesetServePort(t){this._tilesetServePort.value=t}get useEarthDSToken(){return this._useEarthDSToken.value}get useEarthDSTokenChanged(){return this._useEarthDSToken.changed}set useEarthDSToken(t){this._useEarthDSToken.value=t}get earthdstoken(){return this._earthdstoken.value}get earthdstokenChanged(){return this._earthdstoken.changed}set earthdstoken(t){this._earthdstoken.value=t}async getport(){const t=await By(this.url,this.useEarthDSToken,this.earthdstoken);if(t)return this.tilesetServePort=t,t;throw new Error("服务地址port获取失败!")}async refresh(){var i;if(!this.url||typeof this.url!="string")return;const t=(i=this.url.match(/\/ts\/info\/(.*)/))==null?void 0:i[1],r=+new Date;if(t){const s=this.tileServiceIp,o=await this.getport();this._es3DTileset.url=`${s}:${o}/tiles/tileset.json?t=${r}`}console.log("3dtileset url:",this._es3DTileset.url)}get baseUrl(){var t;if(this.url&&typeof this.url=="string"){const r=(t=this.url.match(/^(https?:\/\/[^\/]+)/))==null?void 0:t[1];if(!r)throw new Error("服务地址不合法,baseUrl is not found! 示例: http://localhost:9009/ts/info/ms01");return r}else throw new Error("服务地址不合法,baseUrl is not found! 示例: http://localhost:9009/ts/info/ms01")}get tileServiceIp(){var t;if(this.url&&typeof this.url=="string"){const r=(t=this.url.match(/^(https?:\/\/[^:]+)/))==null?void 0:t[1];if(!r)throw new Error("服务地址不合法,ip is not found! 示例: http://localhost:9009/ts/info/ms01");return r}else throw new Error("服务地址不合法,ip is not found! 示例: http://localhost:9009/ts/info/ms01")}get tileServiceName(){var t;if(this.url&&typeof this.url=="string"){const r=(t=this.url.match(/\/ts\/info\/(.*)/))==null?void 0:t[1];if(!r)throw console.log(this.url),new Error("服务地址不合法,tileServiceName is not found! 示例: http://localhost:9009/ts/info/ms01,");return r}else throw new Error("服务地址不合法,tileServiceName is not found! 示例: http://localhost:9009/ts/info/ms01")}getProperties(t){return[...super.getProperties(t)]}};d(Xa,"type",Xa.register("ESMsTileset",Xa,{chsName:"Modelser实时3DTileset图层",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"实时3DTileset图层"})),d(Xa,"defaults",{...Pt.defaults,layerConfig:{}});let fa=Xa;(n=>{n.createDefaultProps=()=>({...Pt.createDefaultProps()})})(fa||(fa={})),c.extendClassProps(fa.prototype,fa.createDefaultProps);const xp={defaultValue:[{type:"2",widget:"WidgetBlueprint'/ESFoliage/PoiSheng.PoiSheng'",povit:[.5,1],worldScale:.1,hiddenDistance:40},{type:"3",widget:"WidgetBlueprint'/ESFoliage/PoiShi.PoiShi'",povit:[.5,1],worldScale:.1,hiddenDistance:40},{type:"4",widget:"WidgetBlueprint'/ESFoliage/PoiShi.PoiShi'",povit:[.5,1],worldScale:.1,hiddenDistance:40},{type:"5",widget:"WidgetBlueprint'/ESFoliage/PoiXiang.PoiXiang'",povit:[.5,1],worldScale:.1,hiddenDistance:40},{type:"6",widget:"WidgetBlueprint'/ESFoliage/PoiCun.PoiCun'",povit:[.5,1],worldScale:.1,hiddenDistance:40}],sampleValue:`
398
- ## 参数类型为 ESPoiType[]
399
- \`\`\`js
400
- type Vector2D = [number, number]
401
-
402
- type ESPoiType = {
403
- type: string,
404
- povit: Vector2D,
405
- widget: string,
406
- worldScale: number,
407
- hiddenDistance: number
408
- }
334
+ `;function Ap(n){try{return JSON.parse(n),!0}catch{return!1}}const $y="${earthsdk3-assets-script-dir}/assets/misc/2.geojson",Nt=class Nt extends Rt{constructor(e){super(e);d(this,"_flyToFeatureEvent",this.dv(new h.Event));d(this,"_flyToFeatureIndexEvent",this.dv(new h.Event));d(this,"_features",this.disposeVar(h.reactJsonWithUndefined(void 0)));d(this,"pickedInfoType","FeatureCollection");this._updateUrl(),this.ad(this.urlChanged.don(()=>{this._updateUrl()})),this.ad(this.editingChanged.don(()=>{console.warn("ESGeoJson暂不支持编辑!")}))}get flyToFeatureEvent(){return this._flyToFeatureEvent}flyToFeature(e,r,i){this._flyToFeatureEvent.emit(e,r,i)}get flyToFeatureIndexEvent(){return this._flyToFeatureIndexEvent}flyToFeatureIndex(e,r){this._flyToFeatureIndexEvent.emit(e,r)}get features(){return this._features.value}set features(e){this._features.value=e}get featuresChanged(){return this._features.changed}getFeatures(){if(this.features)return this.features;console.log("数据未加载完成,请稍后调用此方法getFeatures()")}async _updateUrl(){var e;if(!this.url){this.features=void 0;return}typeof this.url=="object"?this.features=this.url:Ap(this.url)?this.features=JSON.parse(this.url):await fetch($.context.getStrFromEnv(this.url)).then(r=>r.json()).then(r=>{this.features=r}).catch(r=>{console.warn("ESEntityCluster数据加载失败",r)}),this.pickedInfoType=((e=this.features)==null?void 0:e.type)??"FeatureCollection"}getESProperties(){const e={...super.getESProperties()};return{...e,defaultMenu:"style",dataSource:[...e.dataSource,new Q([this,"url"],"服务地址",Nt.defaults.url),new L([this,"minFeatureVisibleDistance"],"要素最小可视距离",Nt.defaults.minFeatureVisibleDistance),new L([this,"maxFeatureVisibleDistance"],"要素最大可视距离",Nt.defaults.maxFeatureVisibleDistance),new pt([this,"heightReference"],[["NONE","NONE"],["CLAMP_TO_GROUND","CLAMP_TO_GROUND"],["RELATIVE_TO_GROUND","RELATIVE_TO_GROUND"]],"高度参考")],style:[...e.style,new rt([],"点样式集合"),new W([this,"textShow"],"是否显示",Nt.defaults.textShow),new ge([this,"textAnchor"],"锚点",Nt.defaults.anchor),new ot([this,"textProperty"],"标注显示属性",Nt.defaults.textStyle.textProperty),new ot([this,"textDefaultText"],"默认文本",Nt.defaults.textStyle.defaultText),new _t([this,"textColor"],"文本颜色",Nt.defaults.textStyle.color),new _t([this,"textBackgroundColor"],"文本背景颜色",Nt.defaults.textStyle.backgroundColor),new ot([this,"textFontStyle"],"字体样式",Nt.defaults.textStyle.fontStyle),new ot([this,"textFontWeight"],"字体粗细",Nt.defaults.textStyle.fontWeight),new L([this,"textFontSize"],"字体大小",Nt.defaults.textStyle.fontSize),new ge([this,"textOffset"],"像素偏移",Nt.defaults.textStyle.offset),new rt([],"点图片样式集合"),new W([this,"imageShow"],"是否显示",Nt.defaults.imageShow),new ge([this,"imageAnchor"],"锚点",Nt.defaults.imageStyle.anchor),new Q([this,"imageUrl"],"图片地址",Nt.defaults.imageStyle.url),new ge([this,"imageSize"],"图片大小",Nt.defaults.imageStyle.size),new ge([this,"imageOffset"],"像素偏移",Nt.defaults.imageStyle.offset),new rt([],"线样式集合"),new W([this,"stroked"],"是否显示",Nt.defaults.stroked),new W([this,"strokeGround"],"贴地",Nt.defaults.strokeStyle.ground),new L([this,"strokeWidth"],"线宽",Nt.defaults.strokeStyle.width),new pt([this,"strokeWidthType"],Nt.defaults.strokeStyle.widthTypes,"线宽类型"),new _t([this,"strokeColor"],"线颜色",Nt.defaults.strokeStyle.color),new ot([this,"strokeMaterial"],"线材质",Nt.defaults.strokeStyle.material),new Q([this,"strokeMaterialParams"],"线材质参数",Nt.defaults.strokeStyle.materialParams),new rt([],"面样式集合"),new W([this,"filled"],"是否显示",Nt.defaults.filled),new W([this,"fillGround"],"贴地",Nt.defaults.fillStyle.ground),new _t([this,"fillColor"],"填充颜色",Nt.defaults.fillStyle.color),new ot([this,"fillMaterial"],"填充材质",Nt.defaults.fillStyle.material),new Q([this,"fillMaterialParams"],"填充材质参数",Nt.defaults.fillStyle.materialParams)],more:[...e.more,new rt([],"标注文本样式"),new ot([this,"textFontFamily"],"字体",Nt.defaults.textStyle.fontFamily),new rt([],"通用"),new Fi([this,"loadFuncStr"],"loadFnStr",Lp,By,!0)]}}get strokeWidth(){return this.strokeStyle.width}set strokeWidth(e){this.strokeStyle={...this.strokeStyle,width:e}}get strokeWidthChanged(){return this.strokeStyleChanged}get strokeWidthType(){return this.strokeStyle.widthType}set strokeWidthType(e){this.strokeStyle={...this.strokeStyle,widthType:e}}get strokeWidthTypeChanged(){return this.strokeStyleChanged}get strokeColor(){return this.strokeStyle.color}set strokeColor(e){this.strokeStyle={...this.strokeStyle,color:[...e]}}get strokeColorChanged(){return this.strokeStyleChanged}get strokeMaterial(){return this.strokeStyle.material}set strokeMaterial(e){this.strokeStyle={...this.strokeStyle,material:e}}get strokeMaterialChanged(){return this.strokeStyleChanged}get strokeMaterialParams(){return this.strokeStyle.materialParams}set strokeMaterialParams(e){this.strokeStyle={...this.strokeStyle,materialParams:e}}get strokeMaterialParamsChanged(){return this.strokeStyleChanged}get strokeGround(){return this.strokeStyle.ground}set strokeGround(e){this.strokeStyle={...this.strokeStyle,ground:e}}get strokeGroundChanged(){return this.strokeStyleChanged}get fillColor(){return this.fillStyle.color}set fillColor(e){this.fillStyle={...this.fillStyle,color:[...e]}}get fillColorChanged(){return this.fillStyleChanged}get fillMaterial(){return this.fillStyle.material}set fillMaterial(e){this.fillStyle={...this.fillStyle,material:e}}get fillMaterialChanged(){return this.fillStyleChanged}get fillMaterialParams(){return this.fillStyle.materialParams}set fillMaterialParams(e){this.fillStyle={...this.fillStyle,materialParams:e}}get fillMaterialParamsChanged(){return this.fillStyleChanged}get fillGround(){return this.fillStyle.ground}set fillGround(e){this.fillStyle={...this.fillStyle,ground:e}}get fillGroundChanged(){return this.fillStyleChanged}get textProperty(){return this.textStyle.textProperty}set textProperty(e){this.textStyle={...this.textStyle,textProperty:e}}get textPropertyChanged(){return this.textStyleChanged}get textDefaultText(){return this.textStyle.defaultText}set textDefaultText(e){this.textStyle={...this.textStyle,defaultText:e}}get textDefaultTextChanged(){return this.textStyleChanged}get textColor(){return this.textStyle.color}set textColor(e){this.textStyle={...this.textStyle,color:e}}get textColorChanged(){return this.textStyleChanged}get textBackgroundColor(){return this.textStyle.backgroundColor}set textBackgroundColor(e){this.textStyle={...this.textStyle,backgroundColor:e}}get textBackgroundColorChanged(){return this.textStyleChanged}get textFontFamily(){return this.textStyle.fontFamily}set textFontFamily(e){this.textStyle={...this.textStyle,fontFamily:e}}get textFontFamilyChanged(){return this.textStyleChanged}get textFontStyle(){return this.textStyle.fontStyle}set textFontStyle(e){this.textStyle={...this.textStyle,fontStyle:e}}get textFontStyleChanged(){return this.textStyleChanged}get textFontWeight(){return this.textStyle.fontWeight}set textFontWeight(e){this.textStyle={...this.textStyle,fontWeight:e}}get textFontWeightChanged(){return this.textStyleChanged}get textFontSize(){return this.textStyle.fontSize}set textFontSize(e){this.textStyle={...this.textStyle,fontSize:e}}get textFontSizeChanged(){return this.textStyleChanged}get textAnchor(){return this.textStyle.anchor}set textAnchor(e){this.textStyle={...this.textStyle,anchor:e}}get textAnchorChanged(){return this.textStyleChanged}get textOffset(){return this.textStyle.offset}set textOffset(e){this.textStyle={...this.textStyle,offset:e}}get textOffsetChanged(){return this.textStyleChanged}get imageUrl(){return this.imageStyle.url}set imageUrl(e){this.imageStyle={...this.imageStyle,url:e}}get imageUrlChanged(){return this.imageStyleChanged}get imageSize(){return this.imageStyle.size}set imageSize(e){this.imageStyle={...this.imageStyle,size:e}}get imageSizeChanged(){return this.imageStyleChanged}get imageAnchor(){return this.imageStyle.anchor}set imageAnchor(e){this.imageStyle={...this.imageStyle,anchor:e}}get imageAnchorChanged(){return this.imageStyleChanged}get imageOffset(){return this.imageStyle.offset}set imageOffset(e){this.imageStyle={...this.imageStyle,offset:e}}get imageOffsetChanged(){return this.imageStyleChanged}};d(Nt,"createDefaultProps",()=>({...Rt.createDefaultProps(),show:!0,allowPicking:!0,loadFuncStr:void 0,url:$y,stroked:!0,strokeStyle:h.reactJson({width:1,widthType:"world",color:[.79,.91,.06,1],material:"",materialParams:{},ground:!1}),filled:!0,fillStyle:h.reactJson({color:[.79,.91,.06,.2],material:"",materialParams:{},ground:!1}),imageShow:!0,imageStyle:h.reactJson({url:"${earthsdk3-assets-script-dir}/assets/img/location.png",size:[32,32],anchor:[.5,1],offset:[0,0]}),textShow:!0,textStyle:h.reactJson({textProperty:"",defaultText:"默认标注",color:[1,1,1,1],backgroundColor:void 0,fontFamily:"Arial",fontSize:16,fontStyle:"normal",fontWeight:"normal",anchor:[0,1],offset:[16,-8]}),minFeatureVisibleDistance:0,maxFeatureVisibleDistance:0,heightReference:"NONE"})),d(Nt,"type",Nt.register("ESGeoJson",Nt,{chsName:"ESGeoJson",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"GeoJson数据加载"}));let Qc=Nt;const Hs=class Hs extends yt{constructor(e){super(e);d(this,"editingBindMode","doublePoints");d(this,"_height",this.disposeVar(h.react(0)));{const r=()=>{this.height=this.points&&this.points.length>=2?this.points[1][2]-this.points[0][2]:0};r(),this.ad(this.pointsChanged.don(r))}}get height(){return this._height.value}set height(e){this._height.value=e}get heightChanged(){return this._height.changed}};d(Hs,"createDefaultProps",()=>({...yt.createDefaultProps(),stroked:!0,strokeStyle:h.reactJson({width:2,widthType:"screen",color:[1,1,1,1],material:"",materialParams:{},ground:!1})})),d(Hs,"type",Hs.register("ESHeightMeasurement",Hs,{chsName:"高度测量",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"高度测量"})),d(Hs,"supportEditingModes",[...yt.supportEditingModes,B.DoublePointsAppend,B.DoublePointsModify]);let Bc=Hs;const Bo=class Bo extends Ti{constructor(e){super(e);d(this,"_area",this.dv(h.react(0)));d(this,"_perimeter",this.dv(h.react(0)));d(this,"editingBindMode","doublePoints");const r=()=>{this._area.value=Math.PI*this.radius*this.radius,this._perimeter.value=2*Math.PI*this.radius};r(),this.d(this.radiusChanged.don(r))}get area(){return this._area.value}get areaChanged(){return this._area.changed}get perimeter(){return this._perimeter.value}get perimeterChanged(){return this._perimeter.changed}toPolygon(e=10,r){return np([...this.position],this.radius,e,r)[0].map(s=>[...s,this.position?this.position[2]:0])}getESProperties(){const e={...super.getESProperties()};return{...e,defaultMenu:"style",basic:[...e.basic,new L([this,"radius"],"圆半径",1,!0)],coordinate:[...e.coordinate,new W([this,"editing"],"是否编辑"),new to([this,"position"],"三维坐标",[0,0,0],!0),new L([this,"area"],"面积",0,!1,!0),new L([this,"perimeter"],"周长",0,!1,!0)]}}};d(Bo,"createDefaultProps",()=>({...Ti.createDefaultProps(),radius:1,filled:!0,collision:!1,fillStyle:h.reactJson({color:[1,1,1,.5],material:"",materialParams:{},ground:!1})})),d(Bo,"type",Bo.register("ESLocalCircle",Bo,{chsName:"局部坐标圆形",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"ESLocalCircle"}));let $c=Bo;const $o=class $o extends Ti{constructor(t){super(t)}getESProperties(){const t={...super.getESProperties()};return{...t,coordinate:[...t.coordinate,new Gh([this,"points"],"坐标",[])]}}};d($o,"createDefaultProps",()=>({...Ti.createDefaultProps(),points:hl([]),filled:!0})),d($o,"type",$o.register("ESLocalPolygon",$o,{chsName:"局部2D坐标多边形",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"ESLocalPolygon"}));let Ka=$o;const jo=class jo extends Ro{constructor(t){super(t)}getESProperties(){const t={...super.getESProperties()};return{...t,coordinate:[...t.coordinate,new ul([this,"points"],"本地位置数组")]}}};d(jo,"createDefaultProps",()=>({...Ro.createDefaultProps(),points:h.reactPositions(void 0),filled:!0})),d(jo,"type",jo.register("ESLocalPolygonZ",jo,{chsName:"局部坐标多边形",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"ESLocalPolygonZ"}));let jc=jo;const ta=class ta extends Ti{constructor(t){super(t)}getESProperties(){const t={...super.getESProperties()};return{...t,basic:[...t.basic,new L([this,"width"],"宽度"),new L([this,"height"],"高度")]}}};d(ta,"createDefaultProps",()=>({...Ti.createDefaultProps(),width:5e5,height:3e5,filled:!0})),d(ta,"type",ta.register("ESLocalRectangle",ta,{chsName:"局部坐标四边形",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"ESLocalRectangle"}));let th=ta;const Di=class Di extends yt{constructor(e){super(e);d(this,"editingBindMode","lineString");d(this,"_distance",this.dv(h.react(0)));d(this,"_deprecated",[{materialMode:{blue:"multipleArrows",purple:"singleArrow"}},"show"]);d(this,"_deprecatedWarningFunc",(()=>{this._deprecatedWarning()})());const r=()=>{if(this.points&&this.points.length>=2){const i=Xa(this.points,"GEODESIC"),s=i[i.length-1];this._distance.value=s}else this._distance.value=0};r(),this.d(this.pointsChanged.don(r))}get distance(){return this._distance.value}get distanceChanged(){return this._distance.changed}getESProperties(){const e={...super.getESProperties()};return{...e,defaultMenu:"basic",basic:[...e.basic,new L([this,"height"],"高度",10),new L([this,"width"],"宽度",10),new pt([this,"materialMode"],Di.materialModes,"模式","purple")],coordinate:[...e.coordinate,new L([this,"distance"],"距离",0,!1,!0)]}}};d(Di,"createDefaultProps",()=>({...yt.createDefaultProps(),height:10,width:10,materialMode:"singleArrow",filled:!0,stroked:!0,fillStyle:h.reactJson({color:[1,0,.73,1],material:"",materialParams:{},ground:!1})})),d(Di,"type",Di.register("ESPipeFence",Di,{chsName:"管道电子围栏",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"管道电子围栏"})),d(Di,"materialModes",[["单箭头","singleArrow"],["多箭头","multipleArrows"]]),d(Di,"supportEditingModes",[...yt.supportEditingModes,B.LineStringAppend,B.LineStringInsert]);let eh=Di;const Mi=class Mi extends rn{constructor(e){super(e);d(this,"_setLayerVisibleEvent",this.dv(new h.Event));d(this,"_setLayerColorEvent",this.dv(new h.Event))}get setLayerVisibleEvent(){return this._setLayerVisibleEvent}setLayerVisible(e,r){this._setLayerVisibleEvent.emit(e,r)}get setLayerColorEvent(){return this._setLayerColorEvent}setLayerColor(e,r){this._setLayerColorEvent.emit(e,r)}getESProperties(){const e={...super.getESProperties()};return{...e,more:[...e.more,new rt([],"ESPipeserTileset"),new nt(["string","string"],(r,i)=>this.setLayerVisible(r,i),["",""],"setLayerVisible"),new nt(["string","string"],(r,i)=>this.setLayerColor(r,i),["",""],"setLayerColor"),new pt([this,"colorMode"],Mi.colorModes,"colorMode",Mi.defaults.colorMode,!0)]}}};d(Mi,"createDefaultProps",()=>({...rn.createDefaultProps(),colorMode:"default"})),d(Mi,"type",Mi.register("ESPipeserTileset",Mi,{chsName:"PipeSer图层",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"PipeSer图层"})),d(Mi,"colorModes",[["default","default"],["color","color"],["blend","blend"]]);let rh=Mi;const xi=class xi extends yt{constructor(e){super(e);d(this,"editingBindMode","circular")}getESProperties(){const e={...super.getESProperties()};return{...e,defaultMenu:"basic",coordinate:[...e.coordinate,new L([this,"area"],"面积",0,!1,!0),new L([this,"perimeter"],"周长",0,!1,!0)],basic:[...e.basic,new L([this,"height"],"高度",10),new pt([this,"materialMode"],xi.materialModes,"模式","danger")]}}};d(xi,"createDefaultProps",()=>({...yt.createDefaultProps(),height:10,materialMode:"danger",filled:!0,collision:!1})),d(xi,"type",xi.register("ESPolygonFence",xi,{chsName:"多边形电子围栏",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"多边形电子围栏"})),d(xi,"materialModes",[["模式一","danger"],["模式二","checkerboard"],["模式三","warning"],["模式四","cord"],["模式五","scanline"],["模式六","honeycomb"],["模式七","gradientColor"]]),d(xi,"supportEditingModes",[...yt.supportEditingModes,B.CircularAppend,B.CircularInsert,B.HeightModify]);let nh=xi;const us=class us extends yt{constructor(e){super(e);d(this,"_deprecated",["ground"]);d(this,"_deprecatedWarningFunc",(()=>{this._deprecatedWarning()})());d(this,"editingBindMode","doublePoints")}getESProperties(){const e={...super.getESProperties()};return{...e,more:[...e.more,new rt([],"通用","通用"),new W([this,"ground"],"是否贴地"),new W([this,"outlineTranslucent"],"轮廓线半透明"),new L([this,"height"],"高度"),new L([this,"extrudedHeight"],"拉伸高度"),new hn([this,"rectangle"],"范围",us.defaults.rectangle,!0),new L([this,"stRotation"],"纹理旋转角度"),new L([this,"rotation"],"旋转角度"),new W([this,"pointEditing"],"是否单点编辑")]}}};d(us,"createDefaultProps",()=>({...yt.createDefaultProps(),ground:!1,outlineTranslucent:!0,height:0,extrudedHeight:0,rectangle:h.reactArrayWithUndefined(void 0),rotation:0,stRotation:0,pointEditing:!1,filled:!0})),d(us,"type",us.register("ESRectangle",us,{chsName:"矩形",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"矩形"})),d(us,"supportEditingModes",[...yt.supportEditingModes,B.DoublePointsAppend,B.DoublePointsModify]);let ih=us;const ea=class ea extends kt{getESProperties(){const t={...super.getESProperties()};return{...t,basic:[...t.basic,new Q([this,"innerRings"],"裁切多边形数组",[],void 0,!0)]}}};d(ea,"createDefaultProps",()=>({...kt.createDefaultProps(),innerRings:h.reactPositionsSet([])})),d(ea,"type",ea.register("ESPolygonWithHole",ea,{chsName:"内部裁切多边形",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"带洞多边形"}));let sh=ea;const ls=class ls extends kt{constructor(e){super(e);d(this,"_startEvent",this.disposeVar(new h.Event));d(this,"_stopEvent",this.dv(new h.Event));d(this,"_surfaceArea",this.disposeVar(h.react(0)))}get startEvent(){return this._startEvent}start(){this._startEvent.emit()}get stopEvent(){return this._stopEvent}stop(){this._stopEvent.emit()}get surfaceArea(){return this._surfaceArea.value}set surfaceArea(e){this._surfaceArea.value=e}get surfaceChanged(){return this._surfaceArea.changed}getESProperties(){const e={...super.getESProperties()};return{...e,more:[...e.more,new rt([],"表面积测量","表面积测量"),new nt([],()=>this.start(),[],"开始计算"),new L([this,"interpolation"],"插值距离",ls.defaults.interpolation),new L([this,"offsetHeight"],"偏移高度",ls.defaults.offsetHeight)]}}};d(ls,"createDefaultProps",()=>({...kt.createDefaultProps(),interpolation:.5,offsetHeight:0,units:h.reactArray(["SquareMeter_SquareKilometer","MU_Hectare"]),fillStyle:h.reactJson({color:[1,1,1,.5],material:"",materialParams:{},ground:!0})})),d(ls,"type",ls.register("ESSurfaceAreaMeasurement",ls,{chsName:"表面积测量",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"表面积测量"}));let oh=ls;const cs=class cs extends j{constructor(t){super(t)}getESProperties(){const t={...super.getESProperties()};return{...t,basic:[...t.basic,new L([this,"downloadProgress"],"下载进度",cs.defaults.downloadProgress,!0,!0),new Q([this,"importOptions"],"导入参数",cs.defaults.importOptions,void 0,!0)],dataSource:[...t.dataSource,new Q([this,"url"],"路径")]}}};d(cs,"createDefaultProps",()=>({...j.createDefaultProps(),url:"",importOptions:h.reactJsonWithUndefined({buildCollisions:"QueryAndPhysics",buildHierarchy:"Simplified",collisionType:"CTF_UseComplexAsSimple",bImportMetaData:!0}),downloadProgress:0})),d(cs,"type",cs.register("ESDatasmithRuntimeModel",cs,{chsName:"Datasmith Model",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"Datasmith Model"}));let ah=cs;const Ke=class Ke extends Ka{constructor(t){super(t)}getESProperties(){const t={...super.getESProperties()};return{...t,basic:[...t.basic,new pt([this,"waterType"],[["river","river"],["ocean","ocean"],["lake","lake"],["custom","custom"]],"水域类型",Ke.defaults.waterType),new L([this,"frequency"],"频率",Ke.defaults.frequency),new we([this,"amplitude"],.01,[0,1],"振幅",Ke.defaults.amplitude),new we([this,"flowDirection"],1,[0,360],"流向",Ke.defaults.flowDirection),new we([this,"waveVelocity"],.01,[0,1],"波动频率",Ke.defaults.waveVelocity),new we([this,"specularIntensity"],.01,[0,1],"镜面反射强度",Ke.defaults.specularIntensity),new we([this,"murkiness"],.1,[0,10],"水体浑浊度",Ke.defaults.murkiness),new L([this,"flowSpeed"],"水流速度",Ke.defaults.flowSpeed),new _t([this,"waterColor"],"水的底色",Ke.defaults.waterColor),new Q([this,"waterImage"],"水的图片",Ke.defaults.waterImage)]}}};d(Ke,"createDefaultProps",()=>({...Ka.createDefaultProps(),allowPicking:!0,waterImage:h.reactJsonWithUndefined(void 0),waterColor:[.1497,.165,.0031,1],frequency:1e3,waveVelocity:.5,amplitude:.1,specularIntensity:.8,waterType:"river",flowDirection:0,flowSpeed:0,murkiness:5,stroked:!1,filled:!0})),d(Ke,"type",Ke.register("ESDynamicWater",Ke,{chsName:"动态水面",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"局部多边形水面"}));let uh=Ke;const Qe=class Qe extends kt{constructor(t){super(t)}getESProperties(){const t={...super.getESProperties()};return{...t,defaultMenu:"basic",basic:[...t.basic,new pt([this,"waterType"],[["river","river"],["ocean","ocean"],["lake","lake"],["custom","custom"]],"水域类型",Qe.defaults.waterType),new L([this,"frequency"],"频率",Qe.defaults.frequency),new we([this,"amplitude"],.01,[0,1],"振幅",Qe.defaults.amplitude),new we([this,"flowDirection"],1,[0,360],"流向",Qe.defaults.flowDirection),new we([this,"waveVelocity"],.01,[0,1],"波动频率",Qe.defaults.waveVelocity),new we([this,"specularIntensity"],.01,[0,1],"镜面反射强度",Qe.defaults.specularIntensity),new we([this,"murkiness"],.1,[0,10],"水体浑浊度",Qe.defaults.murkiness),new L([this,"flowSpeed"],"水流速度",Qe.defaults.flowSpeed),new _t([this,"waterColor"],"水的底色",Qe.defaults.waterColor),new Q([this,"waterImage"],"水的图片",Qe.defaults.waterImage)]}}};d(Qe,"createDefaultProps",()=>({...kt.createDefaultProps(),allowPicking:!0,waterImage:h.reactJsonWithUndefined({}),waterColor:[.1497,.165,.0031,1],frequency:1e3,waveVelocity:.5,amplitude:.1,specularIntensity:.8,waterType:"river",flowDirection:0,flowSpeed:0,murkiness:5})),d(Qe,"type",Qe.register("ESGeoWater",Qe,{chsName:"地理水面",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"地理动态水面"}));let lh=Qe;const Js=class Js extends j{constructor(t){super(t)}getESProperties(){const t={...super.getESProperties()};return{...t,basic:[...t.basic,new L([this,"downloadProgress"],"下载进度",Js.defaults.downloadProgress,!0,!0),new ot([this,"levelName"],"levelName",""),new L([this,"levelLoadDistance"],"levelLoadDistance",1e3),new Ve([this,"levelOffset"],"levelOffset",[0,0,0])],dataSource:[...t.dataSource,new Q([this,"url"],"url","")]}}};d(Js,"createDefaultProps",()=>({...j.createDefaultProps(),url:"",downloadProgress:0,levelName:"",levelOffset:h.reactArray([0,0,0]),levelLoadDistance:1e3})),d(Js,"type",Js.register("ESLevelRuntimeModel",Js,{chsName:"关卡包模型",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"关卡包模型"}));let ch=Js;const Fr=class Fr extends rs{constructor(e){super(e);d(this,"_deprecated",[{materialMode:{blue:"multipleArrows",purple:"singleArrow"}},"show"]);d(this,"_deprecatedWarningFunc",(()=>{this._deprecatedWarning()})())}getESProperties(){const e={...super.getESProperties()};return{...e,defaultMenu:"basic",basic:[...e.basic,new L([this,"radius"],"半径",Fr.defaults.radius),new L([this,"sides"],"圆边数",Fr.defaults.sides),new L([this,"speed"],"材质速度",Fr.defaults.speed),new pt([this,"materialMode"],Fr.materialModes,"材质模式",Fr.defaults.materialMode),new Q([this,"materialImage"],"材质图片和重复度",Fr.defaults.materialImage)]}}};d(Fr,"createDefaultProps",()=>({...rs.createDefaultProps(),radius:10,sides:10,materialMode:"singleArrow",materialImage:h.reactJson({url:"",uDis:50,vDis:10}),speed:1,filled:!0,stroked:!1,fillStyle:h.reactJson({color:[1,0,.73,1],material:"",materialParams:{},ground:!1})})),d(Fr,"type",Fr.register("ESPipeline",Fr,{chsName:"管线",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"ESPipeline"})),d(Fr,"materialModes",[["单箭头","singleArrow"],["多箭头","multipleArrows"]]);let hh=Fr;const ai=class ai extends yt{constructor(e){super(e);d(this,"editingBindMode","visibility")}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new _t([this,"visibleColor"],"可视区域颜色",ai.defaults.visibleColor),new _t([this,"invisibleColor"],"遮挡区域颜色",ai.defaults.invisibleColor),new L([this,"heightOffset"],"视点高度偏移",ai.defaults.heightOffset)]}}};d(ai,"createDefaultProps",()=>({...yt.createDefaultProps(),visibleColor:h.reactArray([0,1,0,1]),invisibleColor:h.reactArray([1,0,0,1]),heightOffset:0})),d(ai,"type",ai.register("ESVisibilityAnalysis",ai,{chsName:"通视分析,视线分析",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"通视分析,视线分析"})),d(ai,"supportEditingModes",[...yt.supportEditingModes,B.VisibilityAppend,B.VisibilityModify]);let fh=ai;const ra=class ra extends kt{constructor(e){super(e);d(this,"_startEvent",this.dv(new h.Event));d(this,"_clearEvent",this.dv(new h.Event));d(this,"_volume",this.disposeVar(h.react(0)))}get startEvent(){return this._startEvent}start(){this._startEvent.emit()}get clearEvent(){return this._clearEvent}clear(){this._clearEvent.emit()}get volume(){return this._volume.value}set volume(e){this._volume.value=e}get volumeChanged(){return this._volume.changed}getESProperties(){const e={...super.getESProperties()};return{...e,more:[...e.more,new rt([],"通用","通用"),new L([this,"planeHeight"],"基准面高程",void 0,!0),new L([this,"gridWidth"],"采样间距 m"),new L([this,"cutVolume"],"挖方",0,!1,!0),new L([this,"fillVolume"],"填方",0,!1,!0),new L([this,"cutAndFillVolume"],"挖填方",0,!1,!0),new L([this,"progress"],"计算进度",0,!1,!0),new nt([],()=>this.start(),[],"开始分析"),new nt([],()=>this.clear(),[],"清空分析结果"),new W([this,"depthTest"],"是否开启深度检测")]}}};d(ra,"createDefaultProps",()=>({...kt.createDefaultProps(),planeHeight:h.react(void 0),gridWidth:1,cutVolume:0,fillVolume:0,cutAndFillVolume:0,progress:0,depthTest:!1,filled:!1,stroked:!0,strokeStyle:h.reactJson({width:2,widthType:"screen",color:[1,1,1,1],material:"",materialParams:{},ground:!1})})),d(ra,"type",ra.register("ESVolumeMeasurement",ra,{chsName:"体积测量",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"体积测量"}));let dh=ra;const na=class na extends Fo{constructor(e){super(e);d(this,"_human",this.dv(new Fo));d(this,"_poi",this.dv(new Za));this.mainClass=this._human,this.d(this.components.disposableAdd(this._human)),this.d(this.components.disposableAdd(this._poi));{const{_human:r,_poi:i}=this;this.d(h.track([r,"show"],[this,"show"])),this.d(h.track([i,"show"],[this,"show"])),this.d(h.track([r,"allowPicking"],[this,"allowPicking"])),this.d(h.track([i,"allowPicking"],[this,"allowPicking"])),this.d(h.bind([r,"scale"],[this,"scale"])),this.d(h.bind([i,"scale"],[this,"scale"])),this.d(h.track([r,"collision"],[this,"collision"])),this.d(h.track([i,"collision"],[this,"collision"])),this.d(h.bind([r,"flyInParam"],[this,"flyInParam"])),this.d(h.bind([r,"flyToParam"],[this,"flyToParam"])),this.d(h.track([r,"animation"],[this,"animation"])),this.d(h.track([r,"mode"],[this,"mode"])),this.d(h.track([r,"minVisibleDistance"],[this,"minVisibleDistance"])),this.d(h.track([r,"maxVisibleDistance"],[this,"maxVisibleDistance"])),this.d(h.track([i,"name"],[this,"name"])),this.d(h.track([i,"mode"],[this,"poiMode"])),this.d(h.track([i,"autoAnchor"],[this,"autoAnchor"])),this.d(h.track([i,"screenRender"],[this,"screenRender"])),this.d(h.track([i,"size"],[this,"size"])),this.d(h.track([i,"anchor"],[this,"anchor"])),this.d(h.track([i,"sizeByContent"],[this,"sizeByContent"])),this.d(h.track([i,"renderMode"],[this,"renderMode"])),this.d(h.track([i,"rotationType"],[this,"rotationType"])),this.d(h.track([i,"zOrder"],[this,"zOrder"])),this.d(h.track([i,"minVisibleDistance"],[this,"minVisibleDistance"])),this.d(h.track([i,"maxVisibleDistance"],[this,"maxVisibleDistance"])),this.d(h.bind([r,"position"],[this,"position"])),this.d(h.bind([r,"rotation"],[this,"rotation"])),this.d(this.flyInEvent.don(s=>{r.flyIn(s)})),this.d(this.flyToEvent.don(s=>{r.flyTo(s)})),this.d(this.calcFlyToParamEvent.don(()=>{r.calcFlyToParam()})),this.d(this.calcFlyInParamEvent.don(()=>{r.calcFlyInParam()})),this.d(this.smoothMoveEvent.don((s,o)=>{r.smoothMove(s,o)})),this.d(this.smoothMoveWithRotationEvent.don((s,o,a)=>{r.smoothMoveWithRotation(s,o,a)})),this.d(this.smoothMoveOnGroundEvent.don((s,o,a,u)=>{r.smoothMoveOnGround(s,o,a,u)})),this.d(this.smoothMoveWithRotationOnGroundEvent.don((s,o,a,u,l)=>{r.smoothMoveWithRotationOnGround(s,o,a,u,l)})),this.d(this.automaticLandingEvent.don(()=>{r.automaticLanding()}))}}get human(){return this._human}get poi(){return this._poi}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new pt([this,"poiMode"],Za.modes,"poi模式","SquareH01"),new L([this,"poiOffsetHeight"],"poi高度偏移",1.8)]}}};d(na,"createDefaultProps",()=>({poiOffsetHeight:1.8,poiMode:"SquareH01",style:h.reactJson({}),autoAnchor:!0,screenRender:!0,size:h.reactArray([100,100]),anchor:h.reactArray([.5,1]),sizeByContent:!0,renderMode:0,rotationType:1,zOrder:0,...Fo.createDefaultProps()})),d(na,"type",na.register("ESHumanPoi",na,{chsName:"人员poi",tags:["ESObjects"],description:"ESHuman + ESPoi2D组合对象"}));let ph=na;const Fn=class Fn extends kt{constructor(t){super(t)}getESProperties(){const t={...super.getESProperties()};return{...t,basic:[...t.basic,new L([this,"depth"],"深度",Fn.defaults.depth),new L([this,"interpolation"],"插值",Fn.defaults.interpolation),new L([this,"opacity"],"透明度",Fn.defaults.opacity),new Q([this,"sideImage"],"侧面图片",Fn.defaults.sideImage),new Q([this,"bottomImage"],"底面图片",Fn.defaults.bottomImage)]}}};d(Fn,"createDefaultProps",()=>({...kt.createDefaultProps(),depth:100,sideImage:h.reactJson({url:$.context.getStrFromEnv("${earthsdk3-assets-script-dir}/assets/img/ESPit/side.jpg"),uDis:50,vDis:50}),bottomImage:h.reactJson({url:$.context.getStrFromEnv("${earthsdk3-assets-script-dir}/assets/img/ESPit/bottom.jpg"),uDis:50,vDis:50}),opacity:1,interpolation:50,collision:!1,allowPicking:!1,filled:!0})),d(Fn,"type",Fn.register("ESPit",Fn,{chsName:"坑",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"坑"}));let ko=Fn;const ia=class ia extends ko{constructor(e){super(e);d(this,"_excavate",this.dv(new Ja));d(this,"_pit",this.dv(new ko));this.mainClass=this._pit,this.d(this.components.disposableAdd(this._excavate)),this.d(this.components.disposableAdd(this._pit));{const{_excavate:r,_pit:i}=this;this.d(h.track([r,"show"],[this,"show"])),this.d(h.track([i,"show"],[this,"show"])),this.d(h.track([r,"allowPicking"],[this,"allowPicking"])),this.d(h.track([i,"allowPicking"],[this,"allowPicking"])),this.d(h.track([r,"collision"],[this,"collision"])),this.d(h.track([i,"collision"],[this,"collision"])),this.d(h.bind([i,"points"],[this,"points"])),this.d(h.track([r,"points"],[this,"points"])),this.d(h.track([i,"pointed"],[this,"pointed"])),this.d(h.track([r,"pointed"],[this,"pointed"])),this.d(h.track([i,"pointStyle"],[this,"pointStyle"])),this.d(h.track([r,"pointStyle"],[this,"pointStyle"])),this.d(h.track([i,"stroked"],[this,"stroked"])),this.d(h.track([r,"stroked"],[this,"stroked"])),this.d(h.track([i,"strokeStyle"],[this,"strokeStyle"])),this.d(h.track([r,"strokeStyle"],[this,"strokeStyle"])),this.d(h.track([i,"filled"],[this,"filled"])),this.d(h.track([i,"fillStyle"],[this,"fillStyle"])),this.d(h.track([r,"fillStyle"],[this,"fillStyle"])),this.d(h.track([r,"mode"],[this,"mode"])),this.d(h.track([r,"targetID"],[this,"targetID"])),this.d(h.track([i,"depth"],[this,"depth"])),this.d(h.track([i,"sideImage"],[this,"sideImage"])),this.d(h.track([i,"bottomImage"],[this,"bottomImage"])),this.d(h.track([i,"opacity"],[this,"opacity"])),this.d(h.track([i,"interpolation"],[this,"interpolation"])),this.d(h.bind([i,"flyInParam"],[this,"flyInParam"])),this.d(h.bind([i,"flyToParam"],[this,"flyToParam"])),this.d(this.flyInEvent.don(s=>{i.flyIn(s)})),this.d(this.flyToEvent.don(s=>{i.flyTo(s)})),this.d(this.calcFlyToParamEvent.don(()=>{i.calcFlyToParam()})),this.d(this.calcFlyInParamEvent.don(()=>{i.calcFlyInParam()}))}}get excavate(){return this._excavate}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new pt([this,"mode"],Ja.modes,"模式","in"),new ot([this,"targetID"],"瓦片图层","")]}}};d(ia,"createDefaultProps",()=>({...ko.createDefaultProps(),mode:"in",targetID:""})),d(ia,"type",ia.register("ESHole",ia,{chsName:"挖坑(带材质+深度)",tags:["ESObjects"],description:"挖坑"}));let gh=ia;const mh={layerconfigfind:"/ts/layer/config/get",layerconfigsave:"/ts/layer/config/put",featureproperty:"/ts/editor/property",featureeditormuti:"/ts/editor/update",getts:"/ts/info"},jy=async(n,t,e,r)=>{try{const i=window.localStorage.getItem("Authorization");let s=n+`${mh.layerconfigfind}?tileServiceName=${t}`;e&&(s+=`&earthdstoken=${encodeURIComponent(r)}`);const o={headers:{...!e&&i?{Authorization:i}:{}},mode:"cors"},u=await(await fetch(s,o)).text();return JSON.parse(u)}catch(i){console.error(i)}},t_=async(n,t,e,r,i)=>{try{const s=window.localStorage.getItem("Authorization");let o=n+mh.layerconfigsave;const a=i??{};e&&(o+=`?earthdstoken=${encodeURIComponent(r)}`);const u={method:"POST",headers:{"Content-Type":"application/json",...!e&&s?{Authorization:s}:{}},mode:"cors",body:JSON.stringify({tileServiceName:t,layerConfig:JSON.stringify(a)})},c=await(await fetch(o,u)).text();return JSON.parse(c)}catch(s){console.error(s)}},e_=async(n,t,e)=>{try{const r=window.localStorage.getItem("Authorization");let i=n;t&&(i+=`?earthdstoken=${encodeURIComponent(e)}`);const s={headers:{...!t&&r?{Authorization:r}:{}},mode:"cors"},a=await(await fetch(i,s)).text(),u=JSON.parse(a);if(u.status=="ok")return u.data.port;console.error(u.status);return}catch(r){console.error(r)}},r_=async(n,t,e,r,i)=>{try{const s={tileServiceName:t,featureId:e},o=window.localStorage.getItem("Authorization");let a=n+mh.featureproperty;r&&(a+=`?earthdstoken=${encodeURIComponent(i)}`);const l=await(await fetch(a,{method:"post",headers:{"Content-Type":"application/json",...!r&&o?{Authorization:o}:{}},body:JSON.stringify(s),mode:"cors"})).text(),c=JSON.parse(l);if(c.status=="ok")return c.data;console.error(c.data.status);return}catch(s){console.error(s)}},sa=class sa extends rn{constructor(e){super(e);d(this,"_es3DTileset",this.dv(new rn));d(this,"_ids",this.dv(h.reactJson([])));d(this,"_useEarthDSToken",this.dv(h.react(!1)));d(this,"_earthdstoken",this.dv(h.react("")));d(this,"_highlightInner3DtilesetEvent",this.dv(new h.Event));d(this,"_removeHighlightInner3DtilesetEvent",this.dv(new h.Event));d(this,"_tilesetServePort",this.dv(h.react("")));this.mainClass=this._es3DTileset;{const r=async()=>{if(typeof this.url!="string"){console.error("服务地址不合法, Init Error! 示例: http://localhost:9009/ts/info/ts01");return}this.url?this.refresh():this._es3DTileset.url=""};this.d(this.urlChanged.don(()=>{r()}))}{this.d(this.components.disposableAdd(this._es3DTileset));const r=this._es3DTileset;this.d(h.track([r,"allowPicking"],[this,"allowPicking"])),this.d(h.track([r,"collision"],[this,"collision"])),this.d(h.bind([r,"flyToParam"],[this,"flyToParam"])),this.d(h.bind([r,"flyToParam"],[this,"flyToParam"])),this.d(h.track([r,"actorTag"],[this,"actorTag"])),this.d(h.track([r,"materialMode"],[this,"materialMode"])),this.d(h.track([r,"highlight"],[this,"highlight"])),this.d(h.track([r,"maximumScreenSpaceError"],[this,"maximumScreenSpaceError"])),this.d(h.track([r,"highlightID"],[this,"highlightID"])),this.d(h.track([r,"highlightColor"],[this,"highlightColor"])),this.d(h.bind([r,"offset"],[this,"offset"])),this.d(h.bind([r,"rotation"],[this,"rotation"])),this.d(h.track([r,"czmImageBasedLightingFactor"],[this,"czmImageBasedLightingFactor"])),this.d(h.track([r,"czmLuminanceAtZenith"],[this,"czmLuminanceAtZenith"])),this.d(h.track([r,"czmMaximumMemoryUsage"],[this,"czmMaximumMemoryUsage"])),this.d(h.track([r,"czmClassificationType"],[this,"czmClassificationType"])),this.d(h.track([r,"czmStyleJson"],[this,"czmStyleJson"])),this.d(h.track([r,"czmBackFaceCulling"],[this,"czmBackFaceCulling"])),this.d(h.track([r,"czmDebugShowBoundingVolume"],[this,"czmDebugShowBoundingVolume"])),this.d(h.track([r,"czmDebugShowContentBoundingVolume"],[this,"czmDebugShowContentBoundingVolume"])),this.d(h.track([r,"czmSkipLevelOfDetail"],[this,"czmSkipLevelOfDetail"])),this.d(h.track([r,"colorBlendMode"],[this,"colorBlendMode"])),this.d(h.track([r,"cacheBytes"],[this,"cacheBytes"])),this.d(h.track([r,"clippingPlaneEnabled"],[this,"clippingPlaneEnabled"])),this.d(h.track([r,"unionClippingRegions"],[this,"unionClippingRegions"])),this.d(h.track([r,"clippingPlaneEdgeColor"],[this,"clippingPlaneEdgeColor"])),this.d(h.track([r,"clippingPlaneEdgeWidth"],[this,"clippingPlaneEdgeWidth"])),this.d(h.track([r,"materialParams"],[this,"materialParams"])),this.d(h.bind([r,"supportEdit"],[this,"supportEdit"])),this.d(h.bind([r,"clippingPlanesId"],[this,"clippingPlanesId"])),this.d(h.bind([r,"clippingPlaneIds"],[this,"clippingPlaneIds"])),this.d(h.bind([r,"flattenedPlaneId"],[this,"flattenedPlaneId"])),this.d(h.bind([r,"flattenedPlaneEnabled"],[this,"flattenedPlaneEnabled"])),this.d(h.bind([r,"clippingPlaneId"],[this,"clippingPlaneId"])),this.d(h.bind([r,"excavateId"],[this,"excavateId"]))}{const r=this._es3DTileset;this.d(this.refreshTilesetEvent.don(()=>{r.refreshTileset()})),this.d(this.highlightFeatureEvent.don((...i)=>{r.highlightFeature(...i)})),this.d(this.highlightFeatureAndFlyToEvent.don((...i)=>{r.highlightFeatureAndFlyTo(...i)})),this.d(this.setFeatureColorEvent.don((...i)=>{r.setFeatureColor(...i)})),this.d(this.setFeatureVisableEvent.don((...i)=>{r.setFeatureVisable(...i)})),this.d(this.resetFeatureStyleEvent.don((...i)=>{r.resetFeatureStyle(...i)})),this.d(this.setFeatureStyleEvent.don((...i)=>{r.setFeatureStyle(...i)})),this.d(this.flyInEvent.don((...i)=>{r.flyIn(i[0])})),this.d(this.flyToEvent.don((...i)=>{r.flyTo(i[0])})),this.d(this.calcFlyToParamEvent.don((...i)=>{r.calcFlyToParam(...i)})),this.d(this.calcFlyInParamEvent.don((...i)=>{r.calcFlyInParam(...i)}))}{const r=this._es3DTileset;this.d(r.tilesetReady.don(i=>{this.tilesetReady.emit(i)})),this.d(r.pickedEvent.don(i=>{i.assign({sceneObject:this}),this.pickedEvent.emit(i)}))}{const r=()=>{this.es3DTileset.show=this.show};r(),this.d(this.showChanged.don(()=>{r()}))}}get es3DTileset(){return this._es3DTileset}get ids(){return this._ids.value}get idsChanged(){return this._ids.changed}set ids(e){this._ids.value=e}get useEarthDSToken(){return this._useEarthDSToken.value}get useEarthDSTokenChanged(){return this._useEarthDSToken.changed}set useEarthDSToken(e){this._useEarthDSToken.value=e}get earthdstoken(){return this._earthdstoken.value}get earthdstokenChanged(){return this._earthdstoken.changed}set earthdstoken(e){this._earthdstoken.value=e}async getFeatureProperty(e){return await r_(this.baseUrl,this.tileServiceName,e,this.useEarthDSToken,this.earthdstoken)}async getLayerConfig(){const e=await jy(this.baseUrl,this.tileServiceName,this.useEarthDSToken,this.earthdstoken);return!e||!Array.isArray(e)?this.layerConfig=[]:this.layerConfig=e,this.layerConfig}async saveLayerConfig(){const e=this.layerConfig;return await t_(this.baseUrl,this.tileServiceName,this.useEarthDSToken,this.earthdstoken,e)}get highlightInner3DtilesetEvent(){return this._highlightInner3DtilesetEvent}_highlightInner3Dtileset(e){this._highlightInner3DtilesetEvent.emit(e)}async highlightDSFeature(e){this._highlightInner3Dtileset(e)}get removeHighlightInner3DtilesetEvent(){return this._removeHighlightInner3DtilesetEvent}_removeHighlightInner3Dtileset(e){this._removeHighlightInner3DtilesetEvent.emit(e)}async removeHighlightDSFeature(e){this._removeHighlightInner3Dtileset(e)}async pickFeature(e,r){var a,u,l;const i=await e.pick(r),s=i.sceneObject;return!s||s.id!==this.id&&s.typeName!="ESRtsFeatureEditing"?void 0:s.typeName!="ESRtsFeatureEditing"?(this.ids=[...this.ids,(a=i==null?void 0:i.tilesetPickInfo)==null?void 0:a.id],{featureId:(u=i==null?void 0:i.tilesetPickInfo)==null?void 0:u.id,pickInnerFields:i==null?void 0:i.tilesetPickInfo}):{featureId:(l=i==null?void 0:i.sceneObject)==null?void 0:l.id,pickInnerFields:i==null?void 0:i.tilesetPickInfo}}get tilesetServePort(){return this._tilesetServePort.value}get tilesetServePortChanged(){return this._tilesetServePort.changed}set tilesetServePort(e){this._tilesetServePort.value=e}async getport(){const e=await e_(this.url,this.useEarthDSToken,this.earthdstoken);if(e)return this.tilesetServePort=e,e;throw new Error("服务地址port获取失败!")}async refresh(){var i;if(!this.url||typeof this.url!="string")return;const e=(i=this.url.match(/\/ts\/info\/(.*)/))==null?void 0:i[1],r=+new Date;if(e){const s=this.tileServiceIp,o=await this.getport();await this.getLayerConfig(),this._es3DTileset.url=`${s}:${o}/tiles/tileset.json?t=${r}`}console.log("3dtileset url:",this._es3DTileset.url)}get baseUrl(){var e;if(this.url&&typeof this.url=="string"){const r=(e=this.url.match(/^(https?:\/\/[^\/]+)/))==null?void 0:e[1];if(!r)throw new Error("服务地址不合法,baseUrl is not found! 示例: http://localhost:9009/ts/info/ts01");return r}else throw new Error("服务地址不合法,baseUrl is not found! 示例: http://localhost:9009/ts/info/ts01")}get tileServiceName(){var e;if(this.url&&typeof this.url=="string"){const r=(e=this.url.match(/\/ts\/info\/(.*)/))==null?void 0:e[1];if(!r)throw console.log(this.url),new Error("服务地址不合法,tileServiceName is not found! 示例: http://localhost:9009/ts/info/ms01,");return r}else throw new Error("服务地址不合法,tileServiceName is not found! 示例: http://localhost:9009/ts/info/ms01")}get tileServiceIp(){var e;if(this.url&&typeof this.url=="string"){const r=(e=this.url.match(/^(https?:\/\/[^:]+)/))==null?void 0:e[1];if(!r)throw new Error("服务地址不合法,ip is not found! 示例: http://localhost:9009/ts/info/ts01");return r}else throw new Error("服务地址不合法,ip is not found! 示例: http://localhost:9009/ts/info/ts01")}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new Q([this,"layerConfig"],"图层配置",[],void 0,!0)]}}};d(sa,"createDefaultProps",()=>({...rn.createDefaultProps(),layerConfig:h.reactJsonWithUndefined([])})),d(sa,"type",sa.register("ESRtsTileset",sa,{chsName:"CIMRTS实时3DTileset图层",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"实时3DTileset图层"}));let vh=sa;function n_(n){return typeof n=="number"&&!isNaN(n)}const oa=class oa extends rn{get json(){return{...this._innerGetJson(),show:this.show,materials:this.materials,changeMaterial:this.changeMaterial,props:this.props,rotation:this.rotation}}set json(t){this._innerSetJson(t)}async init(t,e){this.featureId=e;const r=await t.getFeatureProperty(e);this.uiShowprops=r.allFields.map(o=>({featureClassName:o.featureClassName,fields:o.fields.map(a=>({key:a.name,type:a.type,value:a.type!="Double"?a.value:n_(a.value)?Number(a.value.toFixed(3)):""}))})),this.datasetName=r.datasetName,t.setFeatureVisable("id",[{value:this.featureId,visable:!1}]),this.d(()=>{t.setFeatureVisable("id",[{value:this.featureId,visable:!0}])});const i=t.tileServiceIp,s=t.tilesetServePort;if(!s)throw new Error("ESRtsFeatureEditing: port is not defined");this.url=`${i}:${s}/featuretiles/${this.featureId}/tileset.json`,this.allowPicking=!0,this.d(this.pickedEvent.don(o=>{o.assign({sceneObject:t}),t.pickedEvent.emit(o)})),this.d(()=>{this.editing=!1,t.removeHighlightDSFeature(this)})}constructor(t){super(t)}};d(oa,"createDefaultProps",()=>({...rn.createDefaultProps(),datasetName:void 0,featureId:void 0,materials:h.reactJson({}),changeMaterial:h.reactJsonWithUndefined(void 0),uiShowprops:h.reactJson({}),props:h.reactJson({})})),d(oa,"type",oa.register("ESRtsFeatureEditing",oa,{chsName:"ESRtsFeatureEditing",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"实时3DTileset图层"}));let yh=oa;const i_=async(n,t,e)=>{try{const r=window.localStorage.getItem("Authorization");let i=n;t&&(i+=`?earthdstoken=${encodeURIComponent(e)}`);const s={headers:{...!t&&r?{Authorization:r}:{}},mode:"cors"},a=await(await fetch(i,s)).text(),u=JSON.parse(a);if(u.status=="ok")return u.data.port;console.error(u.status);return}catch(r){console.error(r)}},iu=class iu extends rn{constructor(e){super(e);d(this,"_es3DTileset",this.dv(new rn));d(this,"_tilesetServePort",this.dv(h.react("")));d(this,"_useEarthDSToken",this.dv(h.react(!1)));d(this,"_earthdstoken",this.dv(h.react("")));this.mainClass=this._es3DTileset;{const r=async()=>{if(typeof this.url!="string"){console.error("服务地址不合法, Init Error! 示例: http://localhost:9009/ts/info/ms01");return}this.url?this.refresh():this._es3DTileset.url=""};this.d(this.urlChanged.don(()=>{r()}))}{this.d(this.components.disposableAdd(this._es3DTileset));const r=this._es3DTileset;this.d(h.track([r,"allowPicking"],[this,"allowPicking"])),this.d(h.track([r,"collision"],[this,"collision"])),this.d(h.bind([r,"flyToParam"],[this,"flyToParam"])),this.d(h.bind([r,"flyToParam"],[this,"flyToParam"])),this.d(h.track([r,"actorTag"],[this,"actorTag"])),this.d(h.track([r,"materialMode"],[this,"materialMode"])),this.d(h.track([r,"highlight"],[this,"highlight"])),this.d(h.track([r,"maximumScreenSpaceError"],[this,"maximumScreenSpaceError"])),this.d(h.track([r,"highlightID"],[this,"highlightID"])),this.d(h.track([r,"highlightColor"],[this,"highlightColor"])),this.d(h.bind([r,"offset"],[this,"offset"])),this.d(h.bind([r,"rotation"],[this,"rotation"])),this.d(h.track([r,"czmImageBasedLightingFactor"],[this,"czmImageBasedLightingFactor"])),this.d(h.track([r,"czmLuminanceAtZenith"],[this,"czmLuminanceAtZenith"])),this.d(h.track([r,"czmMaximumMemoryUsage"],[this,"czmMaximumMemoryUsage"])),this.d(h.track([r,"czmClassificationType"],[this,"czmClassificationType"])),this.d(h.track([r,"czmStyleJson"],[this,"czmStyleJson"])),this.d(h.track([r,"czmBackFaceCulling"],[this,"czmBackFaceCulling"])),this.d(h.track([r,"czmDebugShowBoundingVolume"],[this,"czmDebugShowBoundingVolume"])),this.d(h.track([r,"czmDebugShowContentBoundingVolume"],[this,"czmDebugShowContentBoundingVolume"])),this.d(h.track([r,"czmSkipLevelOfDetail"],[this,"czmSkipLevelOfDetail"])),this.d(h.track([r,"colorBlendMode"],[this,"colorBlendMode"])),this.d(h.track([r,"cacheBytes"],[this,"cacheBytes"])),this.d(h.track([r,"clippingPlaneEnabled"],[this,"clippingPlaneEnabled"])),this.d(h.track([r,"unionClippingRegions"],[this,"unionClippingRegions"])),this.d(h.track([r,"clippingPlaneEdgeColor"],[this,"clippingPlaneEdgeColor"])),this.d(h.track([r,"clippingPlaneEdgeWidth"],[this,"clippingPlaneEdgeWidth"])),this.d(h.track([r,"materialParams"],[this,"materialParams"])),this.d(h.bind([r,"supportEdit"],[this,"supportEdit"])),this.d(h.bind([r,"clippingPlanesId"],[this,"clippingPlanesId"])),this.d(h.bind([r,"clippingPlaneIds"],[this,"clippingPlaneIds"])),this.d(h.bind([r,"flattenedPlaneId"],[this,"flattenedPlaneId"])),this.d(h.bind([r,"flattenedPlaneEnabled"],[this,"flattenedPlaneEnabled"])),this.d(h.bind([r,"clippingPlaneId"],[this,"clippingPlaneId"])),this.d(h.bind([r,"excavateId"],[this,"excavateId"]))}{const r=this._es3DTileset;this.d(this.refreshTilesetEvent.don(()=>{r.refreshTileset()})),this.d(this.highlightFeatureEvent.don((...i)=>{r.highlightFeature(...i)})),this.d(this.highlightFeatureAndFlyToEvent.don((...i)=>{r.highlightFeatureAndFlyTo(...i)})),this.d(this.setFeatureColorEvent.don((...i)=>{r.setFeatureColor(...i)})),this.d(this.setFeatureVisableEvent.don((...i)=>{r.setFeatureVisable(...i)})),this.d(this.resetFeatureStyleEvent.don((...i)=>{r.resetFeatureStyle(...i)})),this.d(this.flyInEvent.don((...i)=>{r.flyIn(i[0])})),this.d(this.flyToEvent.don((...i)=>{r.flyTo(i[0])})),this.d(this.calcFlyToParamEvent.don((...i)=>{r.calcFlyToParam(...i)})),this.d(this.calcFlyInParamEvent.don((...i)=>{r.calcFlyInParam(...i)}))}{const r=this._es3DTileset;this.d(r.tilesetReady.don(i=>{this.tilesetReady.emit(i)})),this.d(r.pickedEvent.don(i=>{i.assign({sceneObject:this}),this.pickedEvent.emit(i)}))}{const r=()=>{this.es3DTileset.show=this.show};r(),this.d(this.showChanged.don(()=>{r()}))}}get es3DTileset(){return this._es3DTileset}get tilesetServePort(){return this._tilesetServePort.value}get tilesetServePortChanged(){return this._tilesetServePort.changed}set tilesetServePort(e){this._tilesetServePort.value=e}get useEarthDSToken(){return this._useEarthDSToken.value}get useEarthDSTokenChanged(){return this._useEarthDSToken.changed}set useEarthDSToken(e){this._useEarthDSToken.value=e}get earthdstoken(){return this._earthdstoken.value}get earthdstokenChanged(){return this._earthdstoken.changed}set earthdstoken(e){this._earthdstoken.value=e}async getport(){const e=await i_(this.url,this.useEarthDSToken,this.earthdstoken);if(e)return this.tilesetServePort=e,e;throw new Error("服务地址port获取失败!")}async refresh(){var i;if(!this.url||typeof this.url!="string")return;const e=(i=this.url.match(/\/ts\/info\/(.*)/))==null?void 0:i[1],r=+new Date;if(e){const s=this.tileServiceIp,o=await this.getport();this._es3DTileset.url=`${s}:${o}/tiles/tileset.json?t=${r}`}console.log("3dtileset url:",this._es3DTileset.url)}get baseUrl(){var e;if(this.url&&typeof this.url=="string"){const r=(e=this.url.match(/^(https?:\/\/[^\/]+)/))==null?void 0:e[1];if(!r)throw new Error("服务地址不合法,baseUrl is not found! 示例: http://localhost:9009/ts/info/ms01");return r}else throw new Error("服务地址不合法,baseUrl is not found! 示例: http://localhost:9009/ts/info/ms01")}get tileServiceIp(){var e;if(this.url&&typeof this.url=="string"){const r=(e=this.url.match(/^(https?:\/\/[^:]+)/))==null?void 0:e[1];if(!r)throw new Error("服务地址不合法,ip is not found! 示例: http://localhost:9009/ts/info/ms01");return r}else throw new Error("服务地址不合法,ip is not found! 示例: http://localhost:9009/ts/info/ms01")}get tileServiceName(){var e;if(this.url&&typeof this.url=="string"){const r=(e=this.url.match(/\/ts\/info\/(.*)/))==null?void 0:e[1];if(!r)throw console.log(this.url),new Error("服务地址不合法,tileServiceName is not found! 示例: http://localhost:9009/ts/info/ms01,");return r}else throw new Error("服务地址不合法,tileServiceName is not found! 示例: http://localhost:9009/ts/info/ms01")}};d(iu,"type",iu.register("ESMsTileset",iu,{chsName:"Modelser实时3DTileset图层",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"实时3DTileset图层"}));let _h=iu;const Rp={defaultValue:[{type:"2",widget:"WidgetBlueprint'/ESFoliage/PoiSheng.PoiSheng'",povit:[.5,1],worldScale:.1,hiddenDistance:40},{type:"3",widget:"WidgetBlueprint'/ESFoliage/PoiShi.PoiShi'",povit:[.5,1],worldScale:.1,hiddenDistance:40},{type:"4",widget:"WidgetBlueprint'/ESFoliage/PoiShi.PoiShi'",povit:[.5,1],worldScale:.1,hiddenDistance:40},{type:"5",widget:"WidgetBlueprint'/ESFoliage/PoiXiang.PoiXiang'",povit:[.5,1],worldScale:.1,hiddenDistance:40},{type:"6",widget:"WidgetBlueprint'/ESFoliage/PoiCun.PoiCun'",povit:[.5,1],worldScale:.1,hiddenDistance:40}],sampleValue:`
335
+ ## 参数类型为 ESPoiType[]
336
+ \`\`\`js
337
+ type Vector2D = [number, number]
409
338
 
410
- \`\`\`
411
- `},qs=class qs extends ve{get typeName(){return"ESPoiTileset"}get defaultProps(){return qs.createDefaultProps()}constructor(e){super(e)}getProperties(e){return[...super.getProperties(e),new z("通用","通用",[new U("路径","路径",!1,!1,[this,"url"]),new U("poiTypes","类型为 {type: string, povit: Vector2D, widget: string, worldScale: number, hiddenDistance: number}[]",!1,!1,[this,"poiTypes"],qs.defaults.poiTypes,xp.sampleValue),new S("heightOffset","heightOffset",!1,!1,[this,"heightOffset"])])]}};d(qs,"type",qs.register("ESPoiTileset",qs,{chsName:"ESPoiTileset",tags:["ESObjects","_ES_Impl_UE"],description:"ESPoiTileset"})),d(qs,"defaults",{...ve.defaults,poiTypes:xp.defaultValue});let da=qs;(n=>{n.createDefaultProps=()=>({...ve.createDefaultProps(),url:"",poiTypes:c.reactJsonWithUndefined(void 0),heightOffset:40})})(da||(da={})),c.extendClassProps(da.prototype,da.createDefaultProps);const Ha=class Ha extends j{get typeName(){return"ESScale"}get defaultProps(){return Ha.createDefaultProps()}getProperties(e){return[...super.getProperties(e),new z("通用","通用",[new F("是否显示","A boolean Property specifying the visibility .",!1,!1,[this,"show"]),new H("定位","放到屏幕的哪个位置",!1,!1,[this,"screenPosition"],[["left","left"],["right","right"]]),new ze("位置","位置(bottom,right/left)",!1,!1,[this,"cssPosition"])])]}};d(Ha,"type",Ha.register("ESScale",Ha,{chsName:"比例尺",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"比例尺"})),d(Ha,"defaults",{...j.defaults,show:!0,screenPosition:"right",cssPosition:[40,18]});let pa=Ha;(n=>{n.createDefaultProps=()=>({...j.createDefaultProps(),show:!0,screenPosition:"right",cssPosition:[40,30]})})(pa||(pa={})),c.extendClassProps(pa.prototype,pa.createDefaultProps);const Fr=class Fr extends _e{get typeName(){return"ESGeoExtrudedPolygon"}get defaultProps(){return Fr.createDefaultProps()}constructor(e){super(e),this.collision=!1}getESProperties(){const e={...super.getESProperties()};return{...e,coordinate:[...e.coordinate,new S("高度","高度 m",!0,!1,[this,"height"],Fr.defaults.height),new S("拉伸高度","拉伸高度 m",!0,!1,[this,"extrudedHeight"],Fr.defaults.extrudedHeight),new F("应用每个位置高度","应用每个位置高度",!0,!1,[this,"perPositionHeight"],Fr.defaults.perPositionHeight)],style:[new z("点样式","点样式集合",[]),new F("开启","开启点样式",!1,!1,[this,"pointed"],!1),new S("点大小","点大小(pointSize)",!1,!1,[this,"pointSize"],1),new H("点类型","点类型(pointSizeType)",!1,!1,[this,"pointSizeType"],[["screen","screen"],["world","world"]],"screen"),new J("点颜色","点颜色(pointColor)",!1,!1,[this,"pointColor"],[1,1,1,1]),new z("线样式","线样式集合",[]),new F("开启","开启线样式",!1,!1,[this,"stroked"],!1),new F("贴地","是否贴地",!1,!1,[this,"strokeGround"],!1),new S("线宽","线宽(strokeWidth)",!1,!1,[this,"strokeWidth"],1),new H("线类型","线类型(strokeWidthType)",!1,!1,[this,"strokeWidthType"],[["screen","screen"],["world","world"]],"screen"),new J("线颜色","线颜色(strokeColor)",!1,!1,[this,"strokeColor"],[1,1,1,1]),new z("面样式","面样式集合",[]),new F("开启","开启填充样式",!1,!1,[this,"filled"],!0),new F("贴地","是否贴地",!1,!1,[this,"fillGround"],!1),new J("填充颜色","填充颜色(fillColor)",!1,!1,[this,"fillColor"],[1,1,1,1])]}}getProperties(e){return[...super.getProperties(e),new z("通用","通用",[new S("高度","高度 m",!0,!1,[this,"height"],Fr.defaults.height),new S("拉伸高度","拉伸高度 m",!0,!1,[this,"extrudedHeight"],Fr.defaults.extrudedHeight),new F("应用每个位置高度","应用每个位置高度",!0,!1,[this,"perPositionHeight"],Fr.defaults.perPositionHeight)])]}};d(Fr,"type",Fr.register("ESGeoExtrudedPolygon",Fr,{chsName:"拉升多边形体",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"拉升多边形体"})),d(Fr,"supportEditingModes",[..._e.supportEditingModes,se.HeightModify]),d(Fr,"defaults",{..._e.defaults,height:0,extrudedHeight:10,perPositionHeight:!1});let Ki=Fr;(n=>{n.createDefaultProps=()=>({..._e.createDefaultProps(),height:0,extrudedHeight:10,perPositionHeight:!1})})(Ki||(Ki={})),c.extendClassProps(Ki.prototype,Ki.createDefaultProps);const Ya=class Ya extends _e{constructor(t){super(t);d(this,"_classification",this.dv(new xs));d(this,"_geoExtrudedPolygon",this.dv(new Ki));d(this,"combinationClass",!0);this.mainClass=this._geoExtrudedPolygon,this.classification.parentID=this.id,this.geoExtrudedPolygon.parentID=this.id,this.d(this.components.disposableAdd(this._classification)),this.d(this.components.disposableAdd(this._geoExtrudedPolygon));{const{_classification:r,_geoExtrudedPolygon:i}=this;i.perPositionHeight=!0,this.d(c.track([r,"collision"],[this,"collision"])),this.d(c.track([i,"collision"],[this,"collision"])),this.d(c.bind([i,"flyInParam"],[this,"flyInParam"])),this.d(c.bind([i,"flyToParam"],[this,"flyToParam"])),this.d(c.bind([i,"points"],[this,"points"])),this.d(c.bind([i,"extrudedHeight"],[this,"height"])),this.d(c.bind([r,"fillColor"],[this,"overheightColor"])),this.d(c.bind([i,"fillColor"],[this,"standardColor"]));{const s=()=>{const{height:a,points:l,maxHeight:u}=this;if(!l)return;const h=l.map(f=>[f[0],f[1],a]);r.points=h,r.height=u-a,u-a<=0?r.show=!1:r.show=this.show&&this.filled};s();const o=this.dv(c.createNextAnimateFrameEvent(this.heightChanged,this.pointsChanged,this.maxHeightChanged));this.d(o.don(s))}{const s=()=>{const{show:a,filled:l}=this;r.show=a&&l,i.show=a&&l};s();const o=this.dv(c.createNextAnimateFrameEvent(this.showChanged,this.filledChanged));this.d(o.don(s))}this.dispose(this.flyInEvent.don(s=>{i.flyIn(s)})),this.dispose(this.flyToEvent.don(s=>{i.flyTo(s)})),this.dispose(this.calcFlyToParamEvent.don(()=>{i.calcFlyToParam()})),this.dispose(this.calcFlyInParamEvent.don(()=>{i.calcFlyInParam()}))}}get typeName(){return"ESHeightLimitAnalysis"}get defaultProps(){return Ya.createDefaultProps()}get classification(){return this._classification}get geoExtrudedPolygon(){return this._geoExtrudedPolygon}getESProperties(){const t={...super.getESProperties()};return{...t,defaultMenu:"basic",basic:[...t.basic,new S("高度","控高的高度",!1,!1,[this,"height"],10),new S("最高高度","最高高度",!1,!1,[this,"maxHeight"],200),new J("超高颜色","超高颜色",!1,!1,[this,"overheightColor"],[1,0,0,.5]),new J("标准颜色","标准颜色",!1,!1,[this,"standardColor"],[0,1,0,.5])],style:[new z("点样式","点样式集合",[]),new F("开启","开启点样式",!1,!1,[this,"pointed"],!1),new S("点大小","点大小(pointSize)",!1,!1,[this,"pointSize"],1),new H("点类型","点类型(pointSizeType)",!1,!1,[this,"pointSizeType"],[["screen","screen"],["world","world"]],"screen"),new J("点颜色","点颜色(pointColor)",!1,!1,[this,"pointColor"],[1,1,1,1]),new z("线样式","线样式集合",[]),new F("开启","开启线样式",!1,!1,[this,"stroked"],!1),new F("贴地","是否贴地",!1,!1,[this,"strokeGround"],!1),new S("线宽","线宽(strokeWidth)",!1,!1,[this,"strokeWidth"],1),new H("线类型","线类型(strokeWidthType)",!1,!1,[this,"strokeWidthType"],[["screen","screen"],["world","world"]],"screen"),new J("线颜色","线颜色(strokeColor)",!1,!1,[this,"strokeColor"],[1,1,1,1]),new z("面样式","面样式集合",[]),new F("开启","开启填充样式",!1,!1,[this,"filled"],!0),new F("贴地","是否贴地",!1,!1,[this,"fillGround"],!1),new J("填充颜色","填充颜色(fillColor)",!1,!1,[this,"fillColor"],[1,1,1,1])]}}getProperties(t){return[...super.getProperties(t),new S("高度","控高的高度",!1,!1,[this,"height"],10),new S("最高高度","最高高度",!1,!1,[this,"maxHeight"],200),new J("超高颜色","超高颜色",!1,!1,[this,"overheightColor"],[1,0,0,.5]),new J("标准颜色","标准颜色",!1,!1,[this,"standardColor"],[0,1,0,.5])]}};d(Ya,"type",Ya.register("ESHeightLimitAnalysis",Ya,{chsName:"控高分析",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"控高分析对象"})),d(Ya,"supportEditingModes",[..._e.supportEditingModes,se.HeightModify]);let ga=Ya;(n=>{n.createDefaultProps=()=>({height:10,maxHeight:200,overheightColor:[1,0,0,.5],standardColor:[0,1,0,.5],..._e.createDefaultProps()})})(ga||(ga={})),c.extendClassProps(ga.prototype,ga.createDefaultProps);const Bt=class Bt extends ve{constructor(t){super(t);d(this,"_widgetEvent",this.dv(new c.Event));d(this,"_data",this.dv(c.react(void 0)));{const r=()=>{this.url&&(typeof this.url=="object"?this.data=this.url:Mp(this.url)?this.data=JSON.parse(this.url):fetch(j.context.getStrFromEnv(this.url)).then(i=>i.json()).then(i=>{this.data=i}).catch(i=>{console.warn("ESEntityCluster数据加载失败",i)}))};r(),this.d(this.urlChanged.don(r))}}get typeName(){return"ESEntityCluster"}get defaultProps(){return Bt.createDefaultProps()}get widgetEvent(){return this._widgetEvent}get data(){return this._data.value}set data(t){this._data.value=t}get dataChanged(){return this._data.changed}getFeatures(){if(this._data)return this._data;console.log("数据未加载完成,请稍后重试")}getESProperties(){const t={...super.getESProperties()};return{...t,basic:[...t.basic,new U("地址","数据Url地址",!1,!1,[this,"url"],Bt.defaults.url),new S("集合范围","用于扩展屏幕空间边界框的像素范围",!1,!1,[this,"pixelRange"],Bt.defaults.pixelRange),new S("最小数量","可以聚合的屏幕空间对象的最小数量",!1,!1,[this,"minimumClusterSize"],Bt.defaults.minimumClusterSize),new H("高度模式","高度获取模式",!1,!1,[this,"heightReference"],Bt.defaults.heightReferences,"None")]}}getProperties(t){return[...super.getProperties(t),new z("通用","通用",[new U("url","数据Url地址",!1,!1,[this,"url"],Bt.defaults.url),new S("pixelRange","用于扩展屏幕空间边界框的像素范围",!1,!1,[this,"pixelRange"],Bt.defaults.pixelRange),new S("minimumClusterSize","可以聚合的屏幕空间对象的最小数量",!1,!1,[this,"minimumClusterSize"],Bt.defaults.minimumClusterSize),new U("style","用于设置聚合和非聚合的显示样式",!1,!1,[this,"style"],Bt.defaults.style),new H("heightReference","高度获取模式",!1,!1,[this,"heightReference"],Bt.defaults.heightReferences)]),new z("UE","UE",[new F("perspective","是否启用透视效果,自动缩放远处标签",!1,!1,[this,"perspective"],Bt.defaults.perspective)])]}};d(Bt,"type",Bt.register("ESEntityCluster",Bt,{chsName:"Poi聚合",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"用于聚合POI标注,提高性能。"})),d(Bt,"defaults",{...ve.defaults,url:"",pixelRange:200,minimumClusterSize:2,style:{cluster:[{minValue:2,mode:"SquareV02",style:{}}],nonCluster:{mode:"SquareV03",style:{}}},heightReferences:[["None","None"],["CLAMP_TO_GROUND","CLAMP_TO_GROUND"],["CLAMP_TO_TERRAIN","CLAMP_TO_TERRAIN"]],perspective:!1});let ma=Bt;(n=>{n.createDefaultProps=()=>({...ve.createDefaultProps(),url:"",pixelRange:200,minimumClusterSize:2,style:c.reactJsonWithUndefined(void 0),heightReference:"None",perspective:!1})})(ma||(ma={})),c.extendClassProps(ma.prototype,ma.createDefaultProps);class yu extends c.Destroyable{constructor(){super();d(this,"_player",this.disposeVar(new Jn));const t=this._player;{const r=()=>{const i=(this.stopTime??0)-(this.startTime??0);t.duration=i>0?i:0};r(),this.d(this.startTimeChanged.don(r)),this.d(this.stopTimeChanged.don(r))}this.d(c.bind([t,"playing"],[this,"playing"])),this.d(c.bind([t,"loop"],[this,"loop"])),this.d(c.bind([t,"speed"],[this,"speed"])),this.d(t.currentTimeChanged.don(()=>{this.startTime!==void 0&&t.currentTime!==void 0&&(this.currentTime=t.currentTime+this.startTime)})),this.d(this.currentTimeChanged.don(()=>{if(this.currentTime===void 0||this.startTime===void 0)return;const r=this.currentTime-this.startTime;t.currentTime=c.clamp(r,0,t.duration)}))}get player(){return this._player}get ratio(){return this._player.ratio}get ratioChanged(){return this._player.ratioChanged}set ratio(t){this._player.ratio=t}}(n=>{n.createDefaultProps=()=>({...j.createDefaultProps(),currentTime:void 0,startTime:void 0,stopTime:void 0,playing:void 0,loop:void 0,speed:void 0})})(yu||(yu={})),c.extendClassProps(yu.prototype,yu.createDefaultProps);const Ja=class Ja extends j{constructor(t){super(t);d(this,"_absolutePlayer",this.dv(new yu));const r=this.absolutePlayer;this.d(c.bind([r,"currentTime"],[this,"currentTime"])),this.d(c.bind([r,"startTime"],[this,"startTime"])),this.d(c.bind([r,"stopTime"],[this,"stopTime"])),this.d(c.bind([r,"playing"],[this,"playing"])),this.d(c.bind([r,"loop"],[this,"loop"])),this.d(c.bind([r,"speed"],[this,"speed"]))}get typeName(){return"ESPlayer"}get defaultProps(){return Ja.createDefaultProps()}get absolutePlayer(){return this._absolutePlayer}get ratio(){return this._absolutePlayer.ratio}get ratioChanged(){return this._absolutePlayer.ratioChanged}set ratio(t){this._absolutePlayer.ratio=t}getProperties(t){return[...super.getProperties(t),new z("通用","通用",[new Eu("播放器","播放器",[this,"playing"],[this,"ratio"],[this,"loop"]),new ii("currentTime","currentTime",!1,!1,[this,"currentTime"]),new ii("startTime","startTime",!1,!1,[this,"startTime"]),new ii("stopTime","stopTime",!1,!1,[this,"stopTime"]),new F("playing","playing",!1,!1,[this,"playing"]),new F("loop","loop",!1,!1,[this,"loop"]),new S("speed","speed",!1,!1,[this,"speed"])])]}};d(Ja,"type",Ja.register("ESPlayer",Ja,{chsName:"ESPlayer",tags:["ESObjects","_ES_Impl_UE"],description:"ESPlayer"})),d(Ja,"defaults",{...j.defaults,currentTime:0,startTime:0,stopTime:0,playing:!1,loop:!1,speed:1});let Qi=Ja;(n=>{n.createDefaultProps=()=>({...j.createDefaultProps(),currentTime:0,startTime:0,stopTime:0,playing:!1,loop:!1,speed:1})})(Qi||(Qi={})),c.extendClassProps(Qi.prototype,Qi.createDefaultProps);function Lp(n,e=!1){const t=n.map(i=>[i[0],[...i[1]],i[2]?[...i[2]]:void 0]),r=t.length;if(r===0)return t;if(r===1)return(!t[0][2]===void 0||e)&&(t[0][2]=void 0),t;for(let i=1;i<r;++i){if(t[i][2]!==void 0&&!e)continue;const s=t[i-1][1],o=t[i][1],a=_i(s),l=_i(o),u=c.Vector.distance(a,l);if(u===0){t[i][2]=t[i-1][2];continue}const h=Nu(s,o),f=o[2]-s[2],p=Math.asin(f/u)*180/Math.PI,v=Number.isFinite(h)?h:0,w=Number.isFinite(p)?p:0;t[i][2]=[v,w,0]}return(t[0][2]===void 0||e)&&(t[0][2]=r>1?t[1][2]:void 0),t}function Ap(n,e=!1){const t=n.map(i=>[i[0],[...i[1]],i[2]?[...i[2]]:void 0]),r=t.length;if(r===0)return t;if(r===1)return(!t[0][2]===void 0||e)&&(t[0][2]=void 0),t;for(let i=r-2;i>=0;--i){if(t[i][2]!==void 0&&!e)continue;const s=t[i][1],o=t[i+1][1],a=_i(s),l=_i(o),u=c.Vector.distance(a,l);if(u===0){t[i][2]=t[i+1][2];continue}const h=Nu(s,o),f=o[2]-s[2],p=Math.asin(f/u)*180/Math.PI,v=Number.isFinite(h)?h:0,w=Number.isFinite(p)?p:0;t[i][2]=[v,w,0]}return(t[r-1][2]===void 0||e)&&(t[r-1][2]=r>1?t[r-2][2]:[0,0,0]),t}function $y(n,e=!1){const t=Lp(n,e),r=Ap(n,e);if(t.length!==r.length)throw new Error("p.length !== n.length");const i=t.length;for(let s=0;s<i;s++){const o=t[s][2],a=r[s][2];o===void 0&&a===void 0?t[s][2]=void 0:o===void 0?t[s][2]=a:a===void 0?t[s][2]=o:t[s][2]=_h(o,a,.5)}return t}function jy(n,e,t){let i;if(!n.timePosRots)return;const s=[],o=n.timePosRots.length;if(!(o<=2)){s.push(n.timePosRots[0]);for(let a=1;a<o-1;++a){const l=n.timePosRots[a-1][0],u=n.timePosRots[a][0],h=n.timePosRots[a+1][0],f=n.accumDistances[a-1],p=n.accumDistances[a],v=n.accumDistances[a+1];do{const w=p-f;if(w===0)continue;const I=w-(i??(e.length==1?e[0]:e[a-1]||e[e.length-1])*.5);let T=(I<0?0:I)/w;Number.isNaN(T)&&(T=0);const L=(1-T)*l+T*u,m=n.getCurrent(L);if(!m)break;s.push([L,m.position,m.rotation])}while(!1);t&&s.push(n.timePosRots[a]);do{const w=v-p;if(w===0)continue;let I=(e.length==1?e[0]:e[a-1]||e[e.length-1])*.5;const T=(e.length==1?e[0]:e[a]||e[e.length-1])*.5||0;I+T>w?(I=w*(I/(I+T)),i=w-I):i=void 0;let L=(I<0?0:I)/w;const m=(1-L)*u+L*h,_=n.getCurrent(m);if(!_)break;s.push([m,_.position,_.rotation])}while(!1)}s.push(n.timePosRots[o-1]),n.timePosRots=s}}function Rp(n,e){if(e<0)return[void 0,0];if(e>n.length-1)return[void 0,n.length-1];const t=[...n].slice(0,e+1).reverse().findIndex(i=>!!(i!=null&&i[2]));if(t===-1)return[void 0,0];const r=e-t;return[n[r][2],r]}function Fp(n,e){if(e<0)return[void 0,0];if(e>=n.length)return[void 0,n.length-1];const t=n.slice(e).findIndex(([,,i])=>i!==void 0),r=t===-1?n.length-1:e+t;return[n[r][2],r]}function e0(n,e,t="Lerp"){let r,i,s,o;if(n.length!==0){do{if(e<=n[0][0]){r=n[0][1],i=n[0][2],s=0,o=0;break}else if(e>=n[n.length-1][0]){const[u,h,f]=n[n.length-1];r=h,i=f,s=n.length-2,o=1;break}const l=n.findIndex(([u])=>e<=u);if(l===-1)throw new Error("nextIndex === -1");s=l-1;{const[u,h]=n[s],[f,p]=n[l],v=(e-u)/(f-u),w=yh(h),I=yh(p),T=c.Vector.lerp(w,I,v);r=jd(T),o=v}{let[u,h]=Rp(n,s),[f,p]=Fp(n,l);if(t==="Lerp")if(u&&f){if(h<0||p>=n.length)throw new Error("Invalid rotation index");const v=(e-n[h][0])/(n[p][0]-n[h][0]);i=_h(u,f,v)}else u?i=u:f?i=f:i=void 0;else t==="Prev"?u&&(i=u):t==="Next"&&f&&(i=f)}}while(!1);return{position:r,rotation:i,index:s,ratio:o}}}function t0(n){try{const e=JSON.parse(n);if(Array.isArray(e)&&e.length>0){const t=typeof e[0][0]=="number",r=Array.isArray(e[0][1])&&e[0][1].length===3;return t&&r?e:void 0}throw new Error("解析有问题")}catch{const t=n.split(/\n|\r\n/),r=[],i=t.length;for(let s=0;s<i;++s){const o=t[s],a=o.split(/[^0-9e\.\+\-]+/).filter(l=>l!=="").map(l=>+l);a.length<4?console.warn(`第${s+1}行数据无法解析成路径的数据, 原内容为: ${o}`):a.length<7?r.push([a[0],[a[1],a[2],a[3]],void 0]):r.push([a[0],[a[1],a[2],a[3]],[a[4],a[5],a[6]]])}return r}}function r0(n,e,t){const{timePosRots:r}=n;if(!r)throw new Error("!timePosRots");if(r.length===0)throw new Error("timePosRots.length === 0");e=Math.max(e,r[0][0]),t=Math.min(t,r[r.length-1][0]);const i=n.getCurrent(e),s=n.getCurrent(t);if(!i||!s)return;const o=[];i.ratio<1&&o.push([e,i.position,i.rotation]);for(let a=i.index+1;a<=s.index;++a)o.push(r[a]);return s.ratio>0&&o.push([t,s.position,s.rotation]),o}const n0=`
339
+ type ESPoiType = {
340
+ type: string,
341
+ povit: Vector2D,
342
+ widget: string,
343
+ worldScale: number,
344
+ hiddenDistance: number
345
+ }
346
+ \`\`\`
347
+ `},Zs=class Zs extends Rt{constructor(t){super(t)}getESProperties(){const t={...super.getESProperties()};return{...t,more:[...t.more,new rt([],"通用"),new Q([this,"url"],"路径"),new Q([this,"poiTypes"],Zs.defaults.poiTypes,Rp.sampleValue),new L([this,"heightOffset"])]}}};d(Zs,"createDefaultProps",()=>({...Rt.createDefaultProps(),url:"",poiTypes:h.reactJsonWithUndefined(Rp.defaultValue),heightOffset:40})),d(Zs,"type",Zs.register("ESPoiTileset",Zs,{chsName:"ESPoiTileset",tags:["ESObjects","_ES_Impl_UE"],description:"ESPoiTileset"}));let wh=Zs;const aa=class aa extends ${getESProperties(){const t={...super.getESProperties()};return{...t,more:[...t.more,new rt([],"通用","通用"),new W([this,"show"],"是否显示"),new pt([this,"screenPosition"],[["left","left"],["right","right"]],"定位","right"),new ge([this,"cssPosition"],"位置")]}}};d(aa,"createDefaultProps",()=>({...$.createDefaultProps(),show:!0,screenPosition:"right",cssPosition:[40,30]})),d(aa,"type",aa.register("ESScale",aa,{chsName:"比例尺",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"比例尺"}));let Eh=aa;const ui=class ui extends kt{constructor(t){super(t)}getESProperties(){const t={...super.getESProperties()};return{...t,coordinate:[...t.coordinate,new L([this,"height"],"高度",ui.defaults.height,!0),new L([this,"extrudedHeight"],"拉伸高度",ui.defaults.extrudedHeight,!0),new W([this,"perPositionHeight"],"应用每个位置高度",ui.defaults.perPositionHeight,!0)]}}};d(ui,"createDefaultProps",()=>({...kt.createDefaultProps(),height:0,extrudedHeight:10,perPositionHeight:!1,collision:!1})),d(ui,"type",ui.register("ESGeoExtrudedPolygon",ui,{chsName:"拉升多边形体",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"拉升多边形体"})),d(ui,"supportEditingModes",[...kt.supportEditingModes,B.HeightModify]);let Qa=ui;const Ks=class Ks extends kt{constructor(e){super(e);d(this,"_classification",this.dv(new ju));d(this,"_geoExtrudedPolygon",this.dv(new Qa));this.mainClass=this._geoExtrudedPolygon,this.d(this.components.disposableAdd(this._classification)),this.d(this.components.disposableAdd(this._geoExtrudedPolygon));{const{_classification:r,_geoExtrudedPolygon:i}=this;i.perPositionHeight=!0,this.d(h.track([r,"collision"],[this,"collision"])),this.d(h.track([i,"collision"],[this,"collision"])),this.d(h.bind([i,"flyInParam"],[this,"flyInParam"])),this.d(h.bind([i,"flyToParam"],[this,"flyToParam"])),this.d(h.bind([i,"points"],[this,"points"])),this.d(h.bind([i,"extrudedHeight"],[this,"height"])),this.d(h.bind([r,"fillColor"],[this,"overheightColor"])),this.d(h.bind([i,"fillColor"],[this,"standardColor"]));{const s=()=>{const{height:a,points:u,maxHeight:l}=this;if(!u)return;const c=u.map(f=>[f[0],f[1],a]);r.points=c,r.height=l-a,l-a<=0?r.show=!1:r.show=this.show&&this.filled};s();const o=this.dv(h.createNextAnimateFrameEvent(this.heightChanged,this.pointsChanged,this.maxHeightChanged));this.d(o.don(s))}{const s=()=>{const{show:a,filled:u}=this;r.show=a&&u,i.show=a&&u};s();const o=this.dv(h.createNextAnimateFrameEvent(this.showChanged,this.filledChanged));this.d(o.don(s))}this.dispose(this.flyInEvent.don(s=>{i.flyIn(s)})),this.dispose(this.flyToEvent.don(s=>{i.flyTo(s)})),this.dispose(this.calcFlyToParamEvent.don(()=>{i.calcFlyToParam()})),this.dispose(this.calcFlyInParamEvent.don(()=>{i.calcFlyInParam()}))}}get classification(){return this._classification}get geoExtrudedPolygon(){return this._geoExtrudedPolygon}getESProperties(){const e={...super.getESProperties()};return{...e,defaultMenu:"basic",basic:[...e.basic,new L([this,"height"],"高度",10),new L([this,"maxHeight"],"最高高度",200),new _t([this,"overheightColor"],"超高颜色",[1,0,0,.5]),new _t([this,"standardColor"],"标准颜色",[0,1,0,.5])]}}};d(Ks,"createDefaultProps",()=>({...kt.createDefaultProps(),height:10,maxHeight:200,overheightColor:[1,0,0,.5],standardColor:[0,1,0,.5]})),d(Ks,"type",Ks.register("ESHeightLimitAnalysis",Ks,{chsName:"控高分析",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"控高分析对象"})),d(Ks,"supportEditingModes",[...kt.supportEditingModes,B.HeightModify]);let Sh=Ks;const kn=class kn extends Rt{constructor(e){super(e);d(this,"_widgetEvent",this.dv(new h.Event));d(this,"_data",this.dv(h.react(void 0)));{const r=()=>{this.url&&(typeof this.url=="object"?this.data=this.url:Ap(this.url)?this.data=JSON.parse(this.url):fetch($.context.getStrFromEnv(this.url)).then(i=>i.json()).then(i=>{this.data=i}).catch(i=>{console.warn("ESEntityCluster数据加载失败",i)}))};r(),this.d(this.urlChanged.don(r))}}get widgetEvent(){return this._widgetEvent}get data(){return this._data.value}set data(e){this._data.value=e}get dataChanged(){return this._data.changed}getFeatures(){if(this._data)return this._data;console.log("数据未加载完成,请稍后重试")}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new Q([this,"url"],"地址",kn.defaults.url),new L([this,"pixelRange"],"集合范围",kn.defaults.pixelRange),new L([this,"minimumClusterSize"],"最小数量",kn.defaults.minimumClusterSize),new pt([this,"heightReference"],[["None","None"],["CLAMP_TO_GROUND","CLAMP_TO_GROUND"],["CLAMP_TO_TERRAIN","CLAMP_TO_TERRAIN"]],"高度模式","None")],more:[...e.more,new Q([this,"style"],"style",kn.defaults.style),new W([this,"perspective"],"透视效果",kn.defaults.perspective)]}}};d(kn,"createDefaultProps",()=>({...Rt.createDefaultProps(),url:"",pixelRange:200,minimumClusterSize:2,style:h.reactJsonWithUndefined({cluster:[{minValue:2,mode:"SquareV02",style:{}}],nonCluster:{mode:"SquareV03",style:{}}}),heightReference:"None",perspective:!1})),d(kn,"type",kn.register("ESEntityCluster",kn,{chsName:"Poi聚合",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"用于聚合POI标注,提高性能。"}));let Ch=kn;class Ba extends h.Destroyable{constructor(){super();d(this,"_player",this.disposeVar(new Dn));const e=this._player;{const r=()=>{const i=(this.stopTime??0)-(this.startTime??0);e.duration=i>0?i:0};r(),this.d(this.startTimeChanged.don(r)),this.d(this.stopTimeChanged.don(r))}this.d(h.bind([e,"playing"],[this,"playing"])),this.d(h.bind([e,"loop"],[this,"loop"])),this.d(h.bind([e,"speed"],[this,"speed"])),this.d(e.currentTimeChanged.don(()=>{this.startTime!==void 0&&e.currentTime!==void 0&&(this.currentTime=e.currentTime+this.startTime)})),this.d(this.currentTimeChanged.don(()=>{if(this.currentTime===void 0||this.startTime===void 0)return;const r=this.currentTime-this.startTime;e.currentTime=h.clamp(r,0,e.duration)}))}get player(){return this._player}get ratio(){return this._player.ratio}get ratioChanged(){return this._player.ratioChanged}set ratio(e){this._player.ratio=e}}(n=>{n.createDefaultProps=()=>({...$.createDefaultProps(),currentTime:void 0,startTime:void 0,stopTime:void 0,playing:void 0,loop:void 0,speed:void 0})})(Ba||(Ba={})),h.extendClassProps(Ba.prototype,Ba.createDefaultProps);const ua=class ua extends ${constructor(e){super(e);d(this,"_absolutePlayer",this.dv(new Ba));const r=this.absolutePlayer;this.d(h.bind([r,"currentTime"],[this,"currentTime"])),this.d(h.bind([r,"startTime"],[this,"startTime"])),this.d(h.bind([r,"stopTime"],[this,"stopTime"])),this.d(h.bind([r,"playing"],[this,"playing"])),this.d(h.bind([r,"loop"],[this,"loop"])),this.d(h.bind([r,"speed"],[this,"speed"]))}get absolutePlayer(){return this._absolutePlayer}get ratio(){return this._absolutePlayer.ratio}get ratioChanged(){return this._absolutePlayer.ratioChanged}set ratio(e){this._absolutePlayer.ratio=e}getESProperties(){const e={...super.getESProperties()};return{...e,more:[...e.more,new ou([this,"playing"],[this,"ratio"],[this,"loop"],"播放器"),new ps([this,"currentTime"],"currentTime"),new ps([this,"startTime"]),new ps([this,"stopTime"]),new W([this,"playing"]),new W([this,"loop"]),new L([this,"speed"])]}}};d(ua,"createDefaultProps",()=>({...$.createDefaultProps(),currentTime:0,startTime:0,stopTime:0,playing:!1,loop:!1,speed:1})),d(ua,"type",ua.register("ESPlayer",ua,{chsName:"ESPlayer",tags:["ESObjects","_ES_Impl_UE"],description:"ESPlayer"}));let $a=ua;function Fp(n,t=!1){const e=n.map(i=>[i[0],[...i[1]],i[2]?[...i[2]]:void 0]),r=e.length;if(r===0)return e;if(r===1)return(!e[0][2]===void 0||t)&&(e[0][2]=void 0),e;for(let i=1;i<r;++i){if(e[i][2]!==void 0&&!t)continue;const s=e[i-1][1],o=e[i][1],a=ei(s),u=ei(o),l=h.Vector.distance(a,u);if(l===0){e[i][2]=e[i-1][2];continue}const c=fu(s,o),f=o[2]-s[2],p=Math.asin(f/l)*180/Math.PI,v=Number.isFinite(c)?c:0,w=Number.isFinite(p)?p:0;e[i][2]=[v,w,0]}return(e[0][2]===void 0||t)&&(e[0][2]=r>1?e[1][2]:void 0),e}function kp(n,t=!1){const e=n.map(i=>[i[0],[...i[1]],i[2]?[...i[2]]:void 0]),r=e.length;if(r===0)return e;if(r===1)return(!e[0][2]===void 0||t)&&(e[0][2]=void 0),e;for(let i=r-2;i>=0;--i){if(e[i][2]!==void 0&&!t)continue;const s=e[i][1],o=e[i+1][1],a=ei(s),u=ei(o),l=h.Vector.distance(a,u);if(l===0){e[i][2]=e[i+1][2];continue}const c=fu(s,o),f=o[2]-s[2],p=Math.asin(f/l)*180/Math.PI,v=Number.isFinite(c)?c:0,w=Number.isFinite(p)?p:0;e[i][2]=[v,w,0]}return(e[r-1][2]===void 0||t)&&(e[r-1][2]=r>1?e[r-2][2]:[0,0,0]),e}function s_(n,t=!1){const e=Fp(n,t),r=kp(n,t);if(e.length!==r.length)throw new Error("p.length !== n.length");const i=e.length;for(let s=0;s<i;s++){const o=e[s][2],a=r[s][2];o===void 0&&a===void 0?e[s][2]=void 0:o===void 0?e[s][2]=a:a===void 0?e[s][2]=o:e[s][2]=uc(o,a,.5)}return e}function o_(n,t,e){let i;if(!n.timePosRots)return;const s=[],o=n.timePosRots.length;if(!(o<=2)){s.push(n.timePosRots[0]);for(let a=1;a<o-1;++a){const u=n.timePosRots[a-1][0],l=n.timePosRots[a][0],c=n.timePosRots[a+1][0],f=n.accumDistances[a-1],p=n.accumDistances[a],v=n.accumDistances[a+1],w=p-f;if(w!==0){const P=w-(i??(t.length==1?t[0]:t[a-1]||t[t.length-1])*.5);let M=(P<0?0:P)/w;Number.isNaN(M)&&(M=0);const m=(1-M)*u+M*l,_=n.getCurrent(m);_&&s.push([m,_.position,_.rotation])}e&&s.push(n.timePosRots[a]);const I=v-p;if(I!==0){let P=(t.length==1?t[0]:t[a-1]||t[t.length-1])*.5;const M=(t.length==1?t[0]:t[a]||t[t.length-1])*.5||0;P+M>I?(P=I*(P/(P+M)),i=I-P):i=void 0;let m=(P<0?0:P)/I;const _=(1-m)*l+m*c,g=n.getCurrent(_);g&&s.push([_,g.position,g.rotation])}}s.push(n.timePosRots[o-1]),n.timePosRots=s}}function Vp(n,t){if(t<0)return[void 0,0];if(t>n.length-1)return[void 0,n.length-1];const e=[...n].slice(0,t+1).reverse().findIndex(i=>!!(i!=null&&i[2]));if(e===-1)return[void 0,0];const r=t-e;return[n[r][2],r]}function zp(n,t){if(t<0)return[void 0,0];if(t>=n.length)return[void 0,n.length-1];const e=n.slice(t).findIndex(([,,i])=>i!==void 0),r=e===-1?n.length-1:t+e;return[n[r][2],r]}function a_(n,t,e="Lerp"){let r,i,s,o;if(n.length!==0){if(t<=n[0][0])r=n[0][1],i=n[0][2],s=0,o=0;else if(t>=n[n.length-1][0]){const[u,l,c]=n[n.length-1];r=l,i=c,s=n.length-2,o=1}else{const u=n.findIndex(([l])=>t<=l);if(u===-1)throw new Error("nextIndex === -1");s=u-1;{const[l,c]=n[s],[f,p]=n[u],v=(t-l)/(f-l),w=ac(c),I=ac(p),P=h.Vector.lerp(w,I,v);r=op(P),o=v}{let[l,c]=Vp(n,s),[f,p]=zp(n,u);if(e==="Lerp")if(l&&f){if(c<0||p>=n.length)throw new Error("Invalid rotation index");const v=(t-n[c][0])/(n[p][0]-n[c][0]);i=uc(l,f,v)}else l?i=l:f?i=f:i=void 0;else e==="Prev"?l&&(i=l):e==="Next"&&f&&(i=f)}}return{position:r,rotation:i,index:s,ratio:o}}}function u_(n){try{const t=JSON.parse(n);if(Array.isArray(t)&&t.length>0){const e=typeof t[0][0]=="number",r=Array.isArray(t[0][1])&&t[0][1].length===3;return e&&r?t:void 0}throw new Error("解析有问题")}catch{const e=n.split(/\n|\r\n/),r=[],i=e.length;for(let s=0;s<i;++s){const o=e[s],a=o.split(/[^0-9e\.\+\-]+/).filter(u=>u!=="").map(u=>+u);a.length<4?console.warn(`第${s+1}行数据无法解析成路径的数据, 原内容为: ${o}`):a.length<7?r.push([a[0],[a[1],a[2],a[3]],void 0]):r.push([a[0],[a[1],a[2],a[3]],[a[4],a[5],a[6]]])}return r}}function l_(n,t,e){const{timePosRots:r}=n;if(!r)throw new Error("!timePosRots");if(r.length===0)throw new Error("timePosRots.length === 0");t=Math.max(t,r[0][0]),e=Math.min(e,r[r.length-1][0]);const i=n.getCurrent(t),s=n.getCurrent(e);if(!i||!s)return;const o=[];i.ratio<1&&o.push([t,i.position,i.rotation]);for(let a=i.index+1;a<=s.index;++a)o.push(r[a]);return s.ratio>0&&o.push([e,s.position,s.rotation]),o}const c_=`
412
348
  timePosRots是一个内部包含三个元素的数组,第一个表示时间戳,单位毫秒,第二个表示经纬度,第三个表示姿态(偏航、俯仰、翻转)。示例代码如下:
413
349
  \`\`\`
414
350
  [
@@ -453,7 +389,7 @@ timePosRots是一个内部包含三个元素的数组,第一个表示时间戳
453
389
  ]
454
390
  ]
455
391
  \`\`\`
456
- `,Er=class Er extends c.Destroyable{constructor(t,r){super();d(this,"_scratchCurrentInfo",{position:[0,0,0],rotation:[0,0,0],index:0});d(this,"_currentInfo",this.disposeVar(c.react(void 0,(t,r)=>!1)));d(this,"_player");d(this,"_flyToEvent",this.disposeVar(new c.Event));d(this,"_accumDistancesChanged",this.disposeVar(new c.Event));d(this,"_accumDistancesChangedInit",this.dispose(this.timePosRotsChanged.disposableOn(()=>(this._accumDistancesDirty=!0,this._accumDistancesChanged.emit()))));d(this,"_accumDistancesDirty",!1);d(this,"_accumDistances",[]);d(this,"_getCurrentFunc",this.disposeVar(c.react(void 0)));this._player=this.disposeVar(new Jn);const i=()=>{const s=this.getCurrent(this.currentTime??0);if(s===void 0)this._currentInfo.value=void 0;else{const{index:o,position:a,rotation:l,ratio:u}=s;this._scratchCurrentInfo.index=o,this._scratchCurrentInfo.position=a,this._scratchCurrentInfo.rotation=l,this._scratchCurrentInfo.ratio=u,this._currentInfo.value=this._scratchCurrentInfo}};i(),this.currentTimeChanged.disposableOn(i),this.timePosRotsChanged.disposableOn(i),this.rotLerpModeChanged.disposableOn(i),this.dispose(c.bind([this._player,"loop"],[this,"loop"]));{const s=()=>{if(this.startTime===void 0||this.currentTime===void 0)return;const o=this.currentTime-this.startTime;(this._player.currentTime===void 0||Math.abs(o-this._player.currentTime)>.01)&&(this._player.currentTime=o)};s(),this.dispose(this.currentTimeChanged.disposableOn(s))}{const s=()=>{if(this.startTime===void 0||this._player.currentTime===void 0)return;const o=this._player.currentTime+this.startTime;(this.currentTime===void 0||Math.abs(o-this.currentTime)>.01)&&(this.currentTime=o)};s(),this.dispose(this._player.currentTimeChanged.disposableOn(s))}this.dispose(c.bind([this._player,"duration"],[this,"duration"])),this.dispose(c.bind([this._player,"playing"],[this,"playing"])),this.dispose(c.bind([this._player,"speed"],[this,"speed"]));{const s=()=>{(this.autoComputeTimeFromTimePosRots??!0)&&this.computeTimeFromTimePosRots()};s();const o=this.disposeVar(c.createNextAnimateFrameEvent(this.autoComputeTimeFromTimePosRotsChanged,this.timePosRotsChanged));this.dispose(o.disposableOn(s))}{const s=()=>{const o=this.timePosRots;if(!o)return;let a=0;const l=o.length;for(let u=0;u<l;++u){const h=o[u][0];if(h<0)console.warn("地理路径的时间戳不能小于0!");else if(h<a){console.warn(`地理路径的时间戳需要满足从小到大的数据,元素越靠后,时间越靠后!当前不满足条件的元素是index: ${u} time: ${h}`);break}}};s(),this.dispose(this.timePosRotsChanged.disposableOn(s))}{const s=this.disposeVar(c.createProcessingFromAsyncFunc(async o=>{if(!this.dataUri)return;await o.promise(c.sleep(1e3));const a=await o.promise(fetch(this.dataUri)),l=await o.promise(a.text());this.timePosRots=Er.parseData(l)}));this.dispose(this.dataUriChanged.disposableOn(()=>{s.restart()})),this.dispose(this.dataTextChanged.disposableOn(()=>{this.dataText&&(this.timePosRots=Er.parseData(this.dataText))}))}}get currentInfo(){return this._currentInfo.value}get currentInfoChanged(){return this._currentInfo.changed}get currentIndex(){return this._currentInfo.value&&this._currentInfo.value.index}get currentIndexChanged(){return this._currentInfo.changed}get currentPosition(){return this._currentInfo.value&&this._currentInfo.value.position}get currentPositionChanged(){return this._currentInfo.changed}get currentRotation(){return this._currentInfo.value&&this._currentInfo.value.rotation}get currentRotationChanged(){return this._currentInfo.changed}get player(){return this._player}get flyToEvent(){return this._flyToEvent}flyTo(t){this._flyToEvent.emit(t)}get accumDistancesChanged(){return this._accumDistancesChanged}get accumDistances(){do{if(!this._accumDistancesDirty)break;if(!this.timePosRots||this.timePosRots.length<2){this._accumDistances=[];break}const t=this.timePosRots.length;let r=0;const i=[];let s=_i(this.timePosRots[0][1]);i.push(r);for(let o=1;o<t;++o){const a=_i(this.timePosRots[o][1]),l=c.Vector.distance(a,s);s=a,r+=l,i.push(r)}this._accumDistances=i}while(!1);return this._accumDistances}get totalDistanceChanged(){return this._accumDistancesChanged}get totalDistance(){return this.accumDistances.length>0?this.accumDistances[this.accumDistances.length-1]:0}getCurrent(t){return this.getCurrentFunc?this.getCurrentFunc(t,this):this.timePosRots&&e0(this.timePosRots,t,this.rotLerpMode)}subPath(t,r){return this.timePosRots&&r0(this,t,r)}computeRotIfUndefinedUsingPrevLine(t=!1){if(!this.timePosRots){console.warn("timePosRots不存在,无法计算!");return}this.timePosRots=Er.computeRotIfUndefinedUsingPrevLine(this.timePosRots,t)}computeRotIfUndefinedUsingNextLine(t=!1){if(!this.timePosRots){console.warn("timePosRots不存在,无法计算!");return}this.timePosRots=Er.computeRotIfUndefinedUsingNextLine(this.timePosRots,t)}computeRotIfUndefinedUsingLerp(t=!1){if(!this.timePosRots){console.warn("timePosRots不存在,无法计算!");return}this.timePosRots=Er.computeRotIfUndefinedUsingLerp(this.timePosRots,t)}computeRotIfUndefined(t=!1){this.computeRotIfUndefinedUsingPrevLine(t)}addAroundPoints(t,r){jy(this,t,r)}get getCurrentFunc(){return this._getCurrentFunc.value}set getCurrentFunc(t){this._getCurrentFunc.value=t}get getCurrentFuncChanged(){return this._getCurrentFunc.changed}computeTimeFromTimePosRots(){const t=this.timePosRots;if(!t||t.length<=1){this.startTime=void 0,this.stopTime=void 0,this.duration=void 0;return}this.startTime=t[0][0],this.stopTime=t[t.length-1][0],this.duration=this.stopTime-this.startTime}get ratio(){return this.player.ratio}set ratio(t){this.player.ratio=t}get ratioChanged(){return this.player.ratioChanged}};d(Er,"computeRotIfUndefinedUsingPrevLine",Lp),d(Er,"computeRotIfUndefinedUsingNextLine",Ap),d(Er,"computeRotIfUndefinedUsingLerp",$y),d(Er,"getLeftRotation",Rp),d(Er,"getRightRotation",Fp),d(Er,"parseData",t0),d(Er,"defaults",{timePosRots:[],startTime:0,stopTime:3e3,loop:!1,duration:3e3,playing:!1,dataText:""}),d(Er,"timePosRotsMd",n0);let As=Er;(n=>{n.createDefaultProps=()=>({show:!1,currentPoiShow:!0,timePosRots:c.reactDeepArrayWithUndefined(void 0,(e,t)=>e[0]===t[0]&&e[1].every((r,i)=>r===t[1][i])&&e[2]===t[2]===void 0||e[2]!==void 0&&t[2]!==void 0&&e[2].every((r,i)=>t[2][i]),e=>[e[0],[...e[1]],e[2]&&[...e[2]]||void 0]),autoComputeTimeFromTimePosRots:!0,leadTime:0,trailTime:0,startTime:void 0,stopTime:void 0,loop:!1,currentTime:0,duration:void 0,speed:1,playing:!1,polylineShow:!0,width:1,ground:!1,color:c.reactArray([1,1,1,1]),hasDash:!1,gapColor:c.reactArray([0,0,0,0]),dashLength:16,dashPattern:255,hasArrow:!1,depthTest:!1,arcType:"GEODESIC",allowPicking:!1,dataUri:"",dataText:void 0,rotLerpMode:"Lerp",debug:!1})})(As||(As={})),c.extendClassProps(As.prototype,As.createDefaultProps);const as=class as extends Or{constructor(t){super(t);d(this,"_path");d(this,"_currentPositionChanged",this.disposeVar(new c.Event));d(this,"_currentRotationChanged",this.disposeVar(new c.Event));d(this,"_currentChanged",this.disposeVar(new c.Event));d(this,"_deprecated",[{materialMode:{blue:"multipleArrows",purple:"singleArrow"}},"show"]);d(this,"_deprecatedWarningFunc",(()=>{this._deprecatedWarning()})());this.strokeStyle={width:10,widthType:"world",color:[1,0,.73,1],material:"",materialParams:{},ground:!1},this._path=this.disposeVar(new As),this.dispose(this._path.currentInfoChanged.disposableOn(()=>this._currentPositionChanged.emit(this._path.currentPosition))),this.dispose(this._path.currentInfoChanged.disposableOn(()=>this._currentRotationChanged.emit(this.currentRotation))),this.dispose(this._path.currentInfoChanged.disposableOn(()=>this._currentChanged.emit(this.current))),this._path.show=!0,this._path.polylineShow=!1,this._path.currentPoiShow=!1;{const r=()=>{if(!this.timeStamps||!this.points){this._path.timePosRots=void 0;return}const s=this.timeStamps.length,o=this.points.length,a=Math.min(s,o),l=[];for(let u=0;u<a;++u)l.push([this.timeStamps[u],this.points[u]]);this._path.timePosRots=l,this.rotationRadius.some(u=>u>0)?(this._path.addAroundPoints(this.rotationRadius,!0),this._path.computeRotIfUndefinedUsingLerp(!0),this._path.rotLerpMode="Lerp"):(this._path.computeRotIfUndefinedUsingPrevLine(!0),this._path.rotLerpMode="Next")},i=this.disposeVar(c.createNextAnimateFrameEvent(this.timeStampsChanged,this.pointsChanged,this.rotationRadiusChanged));r(),this.dispose(i.disposableOn(r))}}get typeName(){return"ESPath"}get defaultProps(){return as.createDefaultProps()}get path(){return this._path}get currentPosition(){return this._path.currentPosition}get currentPositionChanged(){return this._currentPositionChanged}get currentRotation(){const t=this._path.currentRotation;if(t)return[Ml(t[0]-90),t[1],t[2]]}get currentRotationChanged(){return this._currentRotationChanged}get current(){return{position:this.currentPosition,rotation:this.currentRotation}}get currentChanged(){return this._currentChanged}getESProperties(){const t={...super.getESProperties()};return{...t,basic:[...t.basic,new Ec("时间序列","时间序列",!0,!1,[this,"timeStamps"],[]),new S("线条流速","速度 m/s",!1,!1,[this,"speed"],1),new H("模式","materialMode",!1,!1,[this,"materialMode"],as.defaults.materialModes,"singleArrow"),new U("拐弯半径","拐弯半径,单位米",!1,!1,[this,"rotationRadius"])]}}getProperties(t){return[...super.getProperties(t),new z("通用","通用",[new Ec("时间序列","时间序列",!0,!1,[this,"timeStamps"],[]),new It("当前位置","当前位置",!0,!0,[this,"currentPosition"]),new S("速度","速度 m/s",!1,!1,[this,"speed"]),new H("materialMode","materialMode",!1,!1,[this,"materialMode"],as.defaults.materialModes),new U("拐弯半径","拐弯半径,单位米",!1,!1,[this,"rotationRadius"],[5])])]}};d(as,"type",as.register("ESPath",as,{chsName:"ESPath",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"ESPath"})),d(as,"defaults",{...le.defaults,materialModes:[["单箭头","singleArrow"],["多箭头","multipleArrows"],["纯色","pureColor"]]});let Bi=as;(n=>{n.createDefaultProps=()=>({...le.createDefaultProps(),timeStamps:c.reactArrayWithUndefined(void 0),speed:1,materialMode:"singleArrow",stroked:!0,strokeStyle:c.reactJson({width:10,widthType:"world",color:[1,0,.73,1],material:"",materialParams:{},ground:!1}),rotationRadius:[5]})})(Bi||(Bi={})),c.extendClassProps(Bi.prototype,Bi.createDefaultProps);const ls=class ls extends q{get typeName(){return"ESGeoDivTextPoi"}get defaultProps(){return ls.createDefaultProps()}constructor(e){super(e)}getProperties(e){return[...super.getProperties(e),new z("通用","通用",[new F("文本编辑交互","文本编辑交互.",!1,!1,[this,"textEditingInteraction"]),new F("文本编辑","文本编辑.",!1,!1,[this,"textEditing"]),new S("宽度","宽度",!0,!1,[this,"width"],ls.defaults.width),new wu("内容","内容",!0,!1,[this,"text"],ls.defaults.text),new or("原点比例和偏移","原点比例和偏移.",!1,!1,[this,"originRatioAndOffset"]),new S("透明度","透明度",!1,!1,[this,"opacity"]),new S("字体大小","字体大小",!1,!1,[this,"fontSize"]),new J("字体颜色"," 字体颜色.",!1,!1,[this,"color"]),new J("背景颜色"," 背景颜色.",!1,!1,[this,"backgroundColor"]),new or("内边距","上,右,下,左顺序.",!1,!1,[this,"padding"]),new or("边框圆角","左上,右上,右下,左下.",!1,!1,[this,"borderRadius"]),new J("边框颜色"," 边框色.",!1,!1,[this,"borderColor"]),new S("边框宽度","边框宽度",!1,!1,[this,"borderWidth"]),new H("文字位置","文字位置",!1,!1,[this,"textAlign"],[["center","center"],["left","left"],["right","right"]]),new H("边框类型","边框类型",!1,!1,[this,"borderStyle"],[["none","none"],["hidden","hidden"],["dotted","dotted"],["dashed","dashed"],["solid","solid"],["double","double"],["groove","groove"],["ridge","ridge"],["inset","inset"],["outset","outset"]])])]}};d(ls,"type",ls.register("ESGeoDivTextPoi",ls,{chsName:"图标点",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"图标点"})),d(ls,"defaults",{...q.defaults,allowTextEditing:!0,width:80,text:"请输入文字",originRatioAndOffset:[.5,1,0,0],opacity:1,fontSize:14,color:[1,1,1,1],backgroundColor:[0,0,0,.8],padding:[5,5,5,5],borderRadius:[6,6,6,6],borderColor:[1,1,1,1],borderWidth:0,textAlign:"left",borderStyle:"solid"});let va=ls;(n=>{n.createDefaultProps=()=>({text:void 0,width:void 0,textEditingInteraction:!1,textEditing:!1,originRatioAndOffset:c.reactArray([.5,1,0,0]),opacity:1,fontSize:14,textAlign:"left",color:c.reactArray([1,1,1,1]),backgroundColor:c.reactArray([0,0,0,.8]),padding:c.reactArray([5,5,5,5]),borderRadius:c.reactArray([6,6,6,6]),borderWidth:0,borderColor:c.reactArray([1,1,1,1]),borderStyle:"solid",...q.createDefaultProps()})})(va||(va={})),c.extendClassProps(va.prototype,va.createDefaultProps);const kl=class kl extends q{get typeName(){return"ESCityBasePoint"}get defaultProps(){return{...kl.createDefaultProps()}}constructor(e){super(e)}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new J("颜色","颜色",!1,!1,[this,"color"],[1,1,0,1])]}}getProperties(e){return[...super.getProperties(e),new z("通用","通用",[new J("颜色","颜色",!1,!1,[this,"color"])])]}};d(kl,"type",kl.register("ESCityBasePoint",kl,{chsName:"城市基点(Czm)",tags:["ESObjects","CityObjects","_ES_Impl_Cesium"],description:"城市基点(Czm)"}));let ya=kl;(n=>{n.createDefaultProps=()=>({...q.createDefaultProps(),color:c.reactArray([1,1,0,1])})})(ya||(ya={})),c.extendClassProps(ya.prototype,ya.createDefaultProps);const i0=[{id:"document",version:"1.0"},{id:"Vehicle",availability:"2012-08-04T16:00:00Z/2012-08-04T16:14:15.251Z",billboard:{eyeOffset:{cartesian:[0,0,0]},horizontalOrigin:"CENTER",image:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAEISURBVEhLvVXBDYQwDOuojHKj8LhBbpTbpBCEkZsmIVTXq1RVQGrHiWlLmTTqPiZBlyLgy/KSZQ5JSHDQ/mCYCsC8106kDU0AdwRnvYZArWRcAl0dcYJq1hWCb3hBrumbDAVMwAC82WoRvgMnVMDBnB0nYZFTbE6BBvdUGqVqCbjBIk3PyFFR/NU7EKzru+qZsau3ryPwwCRLKYOzutZuCL6fUmWeJGzNzL/RxAMrUmASSCkkAayk2IxPlwhAAYGpsiHQjbLccfdOY5gKkCXAMi7SscAwbQpAnKyctWyUZ6z8ja3OGMepwD8asz+9FnSvbhU8uVOHFIwQsI3/p0CfhuqCSQuxLqsN6mu8SS+N42MAAAAASUVORK5CYII=",pixelOffset:{cartesian2:[0,0]},scale:.8333333333333334,show:[{interval:"2012-08-04T16:00:00Z/2012-08-04T18:00:00Z",boolean:!0}],verticalOrigin:"BOTTOM"},label:{fillColor:[{interval:"2012-08-04T16:00:00Z/2012-08-04T18:00:00Z",rgba:[255,255,0,255]}],font:"bold 10pt Segoe UI Semibold",horizontalOrigin:"LEFT",outlineColor:{rgba:[0,0,0,255]},pixelOffset:{cartesian2:[10,0]},scale:1,show:[{interval:"2012-08-04T16:00:00Z/2012-08-04T18:00:00Z",boolean:!0}],style:"FILL",text:"Vehicle",verticalOrigin:"CENTER"},path:{material:{solidColor:{color:{interval:"2012-08-04T16:00:00Z/2012-08-04T18:00:00Z",rgba:[255,255,0,255]}}},width:[{interval:"2012-08-04T16:00:00Z/2012-08-04T18:00:00Z",number:5}],show:[{interval:"2012-08-04T16:00:00Z/2012-08-04T18:00:00Z",boolean:!0}]},position:{interpolationAlgorithm:"LAGRANGE",interpolationDegree:1,epoch:"2012-08-04T16:00:00Z",cartesian:[0,-23797546637012e-7,-466533288013588e-8,362813368924173e-8,100,-237951008905552e-8,-466541964840452e-8,362818220006795e-8,200,-23795684769522e-7,-46655553441867e-7,362797083323261e-8,300,-237963893786855e-8,-466569163561896e-8,362775082085873e-8,400,-237970929834665e-8,-46658279679646e-7,362753080187124e-8,500,-237983728064915e-8,-46658477494347e-7,362742212874017e-8,600,-237962498289073e-8,-466590750853722e-8,36274841191848e-7,700,-237938612743523e-8,-466602954174431e-8,362748383297459e-8,800,-237914726777171e-8,-466615156669944e-8,36274835403492e-7,900,-237890840390057e-8,-466627358340244e-8,362748324130864e-8,1e3]}}],s0=`第一个packet代表了cesium场景(cesium时间轴的范围,当前时刻,倍速等信息)之外,其他的packet都可以理解为描述某一时间范围内的entity的行为。
392
+ `,ar=class ar extends h.Destroyable{constructor(e,r){super();d(this,"_scratchCurrentInfo",{position:[0,0,0],rotation:[0,0,0],index:0});d(this,"_currentInfo",this.disposeVar(h.react(void 0,(e,r)=>!1)));d(this,"_player");d(this,"_flyToEvent",this.disposeVar(new h.Event));d(this,"_accumDistancesChanged",this.disposeVar(new h.Event));d(this,"_accumDistancesChangedInit",this.dispose(this.timePosRotsChanged.disposableOn(()=>(this._accumDistancesDirty=!0,this._accumDistancesChanged.emit()))));d(this,"_accumDistancesDirty",!1);d(this,"_accumDistances",[]);d(this,"_getCurrentFunc",this.disposeVar(h.react(void 0)));this._player=this.disposeVar(new Dn);const i=()=>{const s=this.getCurrent(this.currentTime??0);if(s===void 0)this._currentInfo.value=void 0;else{const{index:o,position:a,rotation:u,ratio:l}=s;this._scratchCurrentInfo.index=o,this._scratchCurrentInfo.position=a,this._scratchCurrentInfo.rotation=u,this._scratchCurrentInfo.ratio=l,this._currentInfo.value=this._scratchCurrentInfo}};i(),this.currentTimeChanged.disposableOn(i),this.timePosRotsChanged.disposableOn(i),this.rotLerpModeChanged.disposableOn(i),this.dispose(h.bind([this._player,"loop"],[this,"loop"]));{const s=()=>{if(this.startTime===void 0||this.currentTime===void 0)return;const o=this.currentTime-this.startTime;(this._player.currentTime===void 0||Math.abs(o-this._player.currentTime)>.01)&&(this._player.currentTime=o)};s(),this.dispose(this.currentTimeChanged.disposableOn(s))}{const s=()=>{if(this.startTime===void 0||this._player.currentTime===void 0)return;const o=this._player.currentTime+this.startTime;(this.currentTime===void 0||Math.abs(o-this.currentTime)>.01)&&(this.currentTime=o)};s(),this.dispose(this._player.currentTimeChanged.disposableOn(s))}this.dispose(h.bind([this._player,"duration"],[this,"duration"])),this.dispose(h.bind([this._player,"playing"],[this,"playing"])),this.dispose(h.bind([this._player,"speed"],[this,"speed"]));{const s=()=>{(this.autoComputeTimeFromTimePosRots??!0)&&this.computeTimeFromTimePosRots()};s();const o=this.disposeVar(h.createNextAnimateFrameEvent(this.autoComputeTimeFromTimePosRotsChanged,this.timePosRotsChanged));this.dispose(o.disposableOn(s))}{const s=()=>{const o=this.timePosRots;if(!o)return;let a=0;const u=o.length;for(let l=0;l<u;++l){const c=o[l][0];if(c<0)console.warn("地理路径的时间戳不能小于0!");else if(c<a){console.warn(`地理路径的时间戳需要满足从小到大的数据,元素越靠后,时间越靠后!当前不满足条件的元素是index: ${l} time: ${c}`);break}}};s(),this.dispose(this.timePosRotsChanged.disposableOn(s))}{const s=this.disposeVar(h.createProcessingFromAsyncFunc(async o=>{if(!this.dataUri)return;await o.promise(h.sleep(1e3));const a=await o.promise(fetch(this.dataUri)),u=await o.promise(a.text());this.timePosRots=ar.parseData(u)}));this.dispose(this.dataUriChanged.disposableOn(()=>{s.restart()})),this.dispose(this.dataTextChanged.disposableOn(()=>{this.dataText&&(this.timePosRots=ar.parseData(this.dataText))}))}}get currentInfo(){return this._currentInfo.value}get currentInfoChanged(){return this._currentInfo.changed}get currentIndex(){return this._currentInfo.value&&this._currentInfo.value.index}get currentIndexChanged(){return this._currentInfo.changed}get currentPosition(){return this._currentInfo.value&&this._currentInfo.value.position}get currentPositionChanged(){return this._currentInfo.changed}get currentRotation(){return this._currentInfo.value&&this._currentInfo.value.rotation}get currentRotationChanged(){return this._currentInfo.changed}get player(){return this._player}get flyToEvent(){return this._flyToEvent}flyTo(e){this._flyToEvent.emit(e)}get accumDistancesChanged(){return this._accumDistancesChanged}get accumDistances(){if(this._accumDistancesDirty)return this._accumDistances;if(!this.timePosRots||this.timePosRots.length<2)return this._accumDistances=[],this._accumDistances;{const e=this.timePosRots.length;let r=0;const i=[];let s=ei(this.timePosRots[0][1]);i.push(r);for(let o=1;o<e;++o){const a=ei(this.timePosRots[o][1]),u=h.Vector.distance(a,s);s=a,r+=u,i.push(r)}this._accumDistances=i}return this._accumDistances}get totalDistanceChanged(){return this._accumDistancesChanged}get totalDistance(){return this.accumDistances.length>0?this.accumDistances[this.accumDistances.length-1]:0}getCurrent(e){return this.getCurrentFunc?this.getCurrentFunc(e,this):this.timePosRots&&a_(this.timePosRots,e,this.rotLerpMode)}subPath(e,r){return this.timePosRots&&l_(this,e,r)}computeRotIfUndefinedUsingPrevLine(e=!1){if(!this.timePosRots){console.warn("timePosRots不存在,无法计算!");return}this.timePosRots=ar.computeRotIfUndefinedUsingPrevLine(this.timePosRots,e)}computeRotIfUndefinedUsingNextLine(e=!1){if(!this.timePosRots){console.warn("timePosRots不存在,无法计算!");return}this.timePosRots=ar.computeRotIfUndefinedUsingNextLine(this.timePosRots,e)}computeRotIfUndefinedUsingLerp(e=!1){if(!this.timePosRots){console.warn("timePosRots不存在,无法计算!");return}this.timePosRots=ar.computeRotIfUndefinedUsingLerp(this.timePosRots,e)}computeRotIfUndefined(e=!1){this.computeRotIfUndefinedUsingPrevLine(e)}addAroundPoints(e,r){o_(this,e,r)}get getCurrentFunc(){return this._getCurrentFunc.value}set getCurrentFunc(e){this._getCurrentFunc.value=e}get getCurrentFuncChanged(){return this._getCurrentFunc.changed}computeTimeFromTimePosRots(){const e=this.timePosRots;if(!e||e.length<=1){this.startTime=void 0,this.stopTime=void 0,this.duration=void 0;return}this.startTime=e[0][0],this.stopTime=e[e.length-1][0],this.duration=this.stopTime-this.startTime}get ratio(){return this.player.ratio}set ratio(e){this.player.ratio=e}get ratioChanged(){return this.player.ratioChanged}};d(ar,"computeRotIfUndefinedUsingPrevLine",Fp),d(ar,"computeRotIfUndefinedUsingNextLine",kp),d(ar,"computeRotIfUndefinedUsingLerp",s_),d(ar,"getLeftRotation",Vp),d(ar,"getRightRotation",zp),d(ar,"parseData",u_),d(ar,"defaults",{timePosRots:[],startTime:0,stopTime:3e3,loop:!1,duration:3e3,playing:!1,dataText:""}),d(ar,"timePosRotsMd",c_);let ns=ar;(n=>{n.createDefaultProps=()=>({show:!1,currentPoiShow:!0,timePosRots:h.reactDeepArrayWithUndefined(void 0,(t,e)=>t[0]===e[0]&&t[1].every((r,i)=>r===e[1][i])&&t[2]===e[2]===void 0||t[2]!==void 0&&e[2]!==void 0&&t[2].every((r,i)=>e[2][i]),t=>[t[0],[...t[1]],t[2]&&[...t[2]]||void 0]),autoComputeTimeFromTimePosRots:!0,leadTime:0,trailTime:0,startTime:void 0,stopTime:void 0,loop:!1,currentTime:0,duration:void 0,speed:1,playing:!1,polylineShow:!0,width:1,ground:!1,color:h.reactArray([1,1,1,1]),hasDash:!1,gapColor:h.reactArray([0,0,0,0]),dashLength:16,dashPattern:255,hasArrow:!1,depthTest:!1,arcType:"GEODESIC",allowPicking:!1,dataUri:"",dataText:void 0,rotLerpMode:"Lerp",debug:!1})})(ns||(ns={})),h.extendClassProps(ns.prototype,ns.createDefaultProps);const la=class la extends rs{constructor(e){super(e);d(this,"_path");d(this,"_currentPositionChanged",this.disposeVar(new h.Event));d(this,"_currentRotationChanged",this.disposeVar(new h.Event));d(this,"_currentChanged",this.disposeVar(new h.Event));d(this,"_deprecated",[{materialMode:{blue:"multipleArrows",purple:"singleArrow"}},"show"]);d(this,"_deprecatedWarningFunc",(()=>{this._deprecatedWarning()})());this.strokeStyle={width:10,widthType:"world",color:[1,0,.73,1],material:"",materialParams:{},ground:!1},this._path=this.disposeVar(new ns),this.dispose(this._path.currentInfoChanged.disposableOn(()=>this._currentPositionChanged.emit(this._path.currentPosition))),this.dispose(this._path.currentInfoChanged.disposableOn(()=>this._currentRotationChanged.emit(this.currentRotation))),this.dispose(this._path.currentInfoChanged.disposableOn(()=>this._currentChanged.emit(this.current))),this._path.show=!0,this._path.polylineShow=!1,this._path.currentPoiShow=!1;{const r=()=>{if(!this.timeStamps||!this.points){this._path.timePosRots=void 0;return}const s=this.timeStamps.length,o=this.points.length,a=Math.min(s,o),u=[];for(let l=0;l<a;++l)u.push([this.timeStamps[l],this.points[l]]);this._path.timePosRots=u,this.rotationRadius.some(l=>l>0)?(this._path.addAroundPoints(this.rotationRadius,!0),this._path.computeRotIfUndefinedUsingLerp(!0),this._path.rotLerpMode="Lerp"):(this._path.computeRotIfUndefinedUsingPrevLine(!0),this._path.rotLerpMode="Next")},i=this.disposeVar(h.createNextAnimateFrameEvent(this.timeStampsChanged,this.pointsChanged,this.rotationRadiusChanged));r(),this.dispose(i.disposableOn(r))}}get path(){return this._path}get currentPosition(){return this._path.currentPosition}get currentPositionChanged(){return this._currentPositionChanged}get currentRotation(){const e=this._path.currentRotation;if(e)return[Lo(e[0]-90),e[1],e[2]]}get currentRotationChanged(){return this._currentRotationChanged}get current(){return{position:this.currentPosition,rotation:this.currentRotation}}get currentChanged(){return this._currentChanged}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new Hh([this,"timeStamps"],"时间序列",[],!0),new L([this,"speed"],"线条流速",1),new pt([this,"materialMode"],[["单箭头","singleArrow"],["多箭头","multipleArrows"],["纯色","pureColor"]],"模式","singleArrow"),new Q([this,"rotationRadius"],"拐弯半径")],more:[...e.more,new Ve([this,"currentPosition"],"当前位置",void 0,!0,!0)]}}};d(la,"createDefaultProps",()=>({...yt.createDefaultProps(),timeStamps:h.reactArrayWithUndefined(void 0),speed:1,materialMode:"singleArrow",stroked:!0,strokeStyle:h.reactJson({width:10,widthType:"world",color:[1,0,.73,1],material:"",materialParams:{},ground:!1}),rotationRadius:[5]})),d(la,"type",la.register("ESPath",la,{chsName:"ESPath",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"ESPath"}));let ja=la;const hs=class hs extends j{constructor(t){super(t)}getESProperties(){const t={...super.getESProperties()};return{...t,more:[...t.more,new rt([]),new W([this,"textEditingInteraction"],"文本编辑交互"),new W([this,"textEditing"],"文本编辑"),new L([this,"width"],"宽度",hs.defaults.width,!0),new ll([this,"text"],"内容",hs.defaults.text,void 0,!0),new hn([this,"originRatioAndOffset"],"原点比例和偏移"),new L([this,"opacity"],"透明度"),new L([this,"fontSize"],"字体大小"),new _t([this,"color"],"字体颜色"),new _t([this,"backgroundColor"],"背景颜色"),new hn([this,"padding"],"内边距"),new hn([this,"borderRadius"],"边框圆角"),new _t([this,"borderColor"],"边框颜色"),new L([this,"borderWidth"],"边框宽度"),new pt([this,"textAlign"],[["center","center"],["left","left"],["right","right"]],"文字位置"),new pt([this,"borderStyle"],[["none","none"],["hidden","hidden"],["dotted","dotted"],["dashed","dashed"],["solid","solid"],["double","double"],["groove","groove"],["ridge","ridge"],["inset","inset"],["outset","outset"]],"边框类型")]}}};d(hs,"createDefaultProps",()=>({...j.createDefaultProps(),text:"请输入文字",width:80,textEditingInteraction:!1,textEditing:!1,originRatioAndOffset:h.reactArray([.5,1,0,0]),opacity:1,fontSize:14,textAlign:"left",color:h.reactArray([1,1,1,1]),backgroundColor:h.reactArray([0,0,0,.8]),padding:h.reactArray([5,5,5,5]),borderRadius:h.reactArray([6,6,6,6]),borderWidth:0,borderColor:h.reactArray([1,1,1,1]),borderStyle:"solid"})),d(hs,"type",hs.register("ESGeoDivTextPoi",hs,{chsName:"图标点",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"图标点"}));let Ih=hs;const ca=class ca extends j{constructor(t){super(t)}getESProperties(){const t={...super.getESProperties()};return{...t,basic:[...t.basic,new _t([this,"color"],"颜色",[1,1,0,1])]}}};d(ca,"createDefaultProps",()=>({...j.createDefaultProps(),color:h.reactArray([1,1,0,1])})),d(ca,"type",ca.register("ESCityBasePoint",ca,{chsName:"城市基点(Czm)",tags:["ESObjects","CityObjects","_ES_Impl_Cesium"],description:"城市基点(Czm)"}));let Ph=ca;const h_=[{id:"document",version:"1.0"},{id:"Vehicle",availability:"2012-08-04T16:00:00Z/2012-08-04T16:14:15.251Z",billboard:{eyeOffset:{cartesian:[0,0,0]},horizontalOrigin:"CENTER",image:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAEISURBVEhLvVXBDYQwDOuojHKj8LhBbpTbpBCEkZsmIVTXq1RVQGrHiWlLmTTqPiZBlyLgy/KSZQ5JSHDQ/mCYCsC8106kDU0AdwRnvYZArWRcAl0dcYJq1hWCb3hBrumbDAVMwAC82WoRvgMnVMDBnB0nYZFTbE6BBvdUGqVqCbjBIk3PyFFR/NU7EKzru+qZsau3ryPwwCRLKYOzutZuCL6fUmWeJGzNzL/RxAMrUmASSCkkAayk2IxPlwhAAYGpsiHQjbLccfdOY5gKkCXAMi7SscAwbQpAnKyctWyUZ6z8ja3OGMepwD8asz+9FnSvbhU8uVOHFIwQsI3/p0CfhuqCSQuxLqsN6mu8SS+N42MAAAAASUVORK5CYII=",pixelOffset:{cartesian2:[0,0]},scale:.8333333333333334,show:[{interval:"2012-08-04T16:00:00Z/2012-08-04T18:00:00Z",boolean:!0}],verticalOrigin:"BOTTOM"},label:{fillColor:[{interval:"2012-08-04T16:00:00Z/2012-08-04T18:00:00Z",rgba:[255,255,0,255]}],font:"bold 10pt Segoe UI Semibold",horizontalOrigin:"LEFT",outlineColor:{rgba:[0,0,0,255]},pixelOffset:{cartesian2:[10,0]},scale:1,show:[{interval:"2012-08-04T16:00:00Z/2012-08-04T18:00:00Z",boolean:!0}],style:"FILL",text:"Vehicle",verticalOrigin:"CENTER"},path:{material:{solidColor:{color:{interval:"2012-08-04T16:00:00Z/2012-08-04T18:00:00Z",rgba:[255,255,0,255]}}},width:[{interval:"2012-08-04T16:00:00Z/2012-08-04T18:00:00Z",number:5}],show:[{interval:"2012-08-04T16:00:00Z/2012-08-04T18:00:00Z",boolean:!0}]},position:{interpolationAlgorithm:"LAGRANGE",interpolationDegree:1,epoch:"2012-08-04T16:00:00Z",cartesian:[0,-23797546637012e-7,-466533288013588e-8,362813368924173e-8,100,-237951008905552e-8,-466541964840452e-8,362818220006795e-8,200,-23795684769522e-7,-46655553441867e-7,362797083323261e-8,300,-237963893786855e-8,-466569163561896e-8,362775082085873e-8,400,-237970929834665e-8,-46658279679646e-7,362753080187124e-8,500,-237983728064915e-8,-46658477494347e-7,362742212874017e-8,600,-237962498289073e-8,-466590750853722e-8,36274841191848e-7,700,-237938612743523e-8,-466602954174431e-8,362748383297459e-8,800,-237914726777171e-8,-466615156669944e-8,36274835403492e-7,900,-237890840390057e-8,-466627358340244e-8,362748324130864e-8,1e3]}}],f_=`第一个packet代表了cesium场景(cesium时间轴的范围,当前时刻,倍速等信息)之外,其他的packet都可以理解为描述某一时间范围内的entity的行为。
457
393
  \`\`\`
458
394
  [{
459
395
  "id": "document",
@@ -508,7 +444,7 @@ timePosRots是一个内部包含三个元素的数组,第一个表示时间戳
508
444
  }
509
445
  }]
510
446
  \`\`\`
511
- `,kp=`(dataSource) => {
447
+ `,Up=`(dataSource) => {
512
448
  var entities = dataSource.entities.values;
513
449
 
514
450
  for (var i = 0; i < entities.length; i++) {
@@ -523,18 +459,18 @@ timePosRots是一个内部包含三个元素的数组,第一个表示时间戳
523
459
  }
524
460
  }
525
461
  }
526
- `,o0=`data 路径都可以使用下面回调函数
462
+ `,d_=`data 路径都可以使用下面回调函数
527
463
  \`\`\`
528
- ${kp}
464
+ ${Up}
529
465
  \`\`\`
530
466
 
531
- `,Vp=Date.now();new Date(Vp).toISOString(),new Date(Vp+24*60*60*1e3).toISOString();const pt=class pt extends j{constructor(t){super(t);d(this,"_flyToEvent",this.disposeVar(new c.Event));d(this,"_resetClockEvent",this.disposeVar(new c.Event))}get typeName(){return"ESCzml"}get defaultProps(){return pt.createDefaultProps()}get flyToEvent(){return this._flyToEvent}flyTo(t){this._flyToEvent.emit(t)}get resetClockEvent(){return this._resetClockEvent}resetClock(){this._resetClockEvent.emit()}getESProperties(){const t={...super.getESProperties()};return{...t,defaultMenu:"basic",basic:[...t.basic,new U("数据","数据",!0,!1,[this,"data"],pt.defaults.data,pt.defaults.dataMd),new U("路径","路径",!1,!1,[this,"uri"],""),new F("启用","启用",!1,!1,[this,"clockEnabled"],!1),new S("倍速","倍速.",!1,!1,[this,"multiplier"],pt.defaults.multiplier),new F("自动设置时钟","自动设置时钟",!1,!1,[this,"autoResetClock"],!0),new ii("开始时间","开始时间",!0,!1,[this,"startTime"],pt.defaults.startTime),new ii("结束时间","结束时间",!0,!1,[this,"stopTime"],pt.defaults.stopTime),new ii("当前时间","当前时间",!0,!1,[this,"currentTime"],pt.defaults.currentTime),new H("clockStep","clockStep",!1,!1,[this,"clockStep"],[["TICK_DEPENDENT","TICK_DEPENDENT"],["SYSTEM_CLOCK_MULTIPLIER","SYSTEM_CLOCK_MULTIPLIER"],["SYSTEM_CLOCK","SYSTEM_CLOCK"]],"SYSTEM_CLOCK_MULTIPLIER"),new H("clockRange","clockRange",!1,!1,[this,"clockRange"],[["UNBOUNDED","UNBOUNDED"],["CLAMPED","CLAMPED"],["LOOP_STOP","LOOP_STOP"]],"UNBOUNDED"),new F("是否启用动画","是否启用动画",!1,!1,[this,"shouldAnimate"],!1)],general:[...t.general,new Z("唯一标识","id",!1,!0,[this,"id"]),new Z("名称","name",!0,!1,[this,"name"]),new F("是否显示","show",!1,!1,[this,"show"],!0),new F("开启碰撞","collision",!1,!1,[this,"collision"],!1),new F("允许拾取","allowPicking",!1,!1,[this,"allowPicking"],!1)]}}getProperties(t){return[...super.getProperties(t),new z("通用","通用",[new F("是否显示","A boolean Property specifying the visibility .",!1,!1,[this,"show"]),new F("允许拾取","是否允许拾取",!1,!1,[this,"allowPicking"]),new ie("飞入","飞入",["number"],r=>this.flyTo(r),[1e3]),new U("数据","数据",!0,!1,[this,"data"],pt.defaults.data,pt.defaults.dataMd),new U("路径","路径",!1,!1,[this,"uri"]),new F("自动设置时钟","自动设置时钟",!1,!1,[this,"autoResetClock"]),new ie("重设时钟","根据当前加载的数据重设始终",[],()=>this.resetClock(),[]),new ni("loadFnStr","loadFnStr",!0,!1,[this,"loadFuncStr"],pt.defaults.defaultLoadFuncStr,pt.defaults.defaultLoadFuncDocStr)]),new z("时钟","时钟",[new F("启用","启用",!1,!1,[this,"clockEnabled"]),new ii("开始时间","开始时间",!0,!1,[this,"startTime"],pt.defaults.startTime),new ii("结束时间","结束时间",!0,!1,[this,"stopTime"],pt.defaults.stopTime),new ii("当前时间","当前时间",!0,!1,[this,"currentTime"],pt.defaults.currentTime),new S("倍速","倍速.",!1,!1,[this,"multiplier"],pt.defaults.multiplier),new H("clockStep","clockStep",!1,!1,[this,"clockStep"],[["TICK_DEPENDENT","TICK_DEPENDENT"],["SYSTEM_CLOCK_MULTIPLIER","SYSTEM_CLOCK_MULTIPLIER"],["SYSTEM_CLOCK","SYSTEM_CLOCK"]]),new H("clockRange","clockRange",!1,!1,[this,"clockRange"],[["UNBOUNDED","UNBOUNDED"],["CLAMPED","CLAMPED"],["LOOP_STOP","LOOP_STOP"]]),new F("是否启用动画","是否启用动画",!1,!1,[this,"shouldAnimate"])])]}};d(pt,"type",pt.register("ESCzml",pt,{chsName:"ESCzml",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"Czml数据加载"})),d(pt,"defaults",{...j.defaults,show:!0,allowPicking:!0,data:i0,dataMd:s0,autoResetClock:!0,clockEnabled:!1,startTime:()=>Date.now(),stopTime:()=>Date.now()+24*60*60*1e3,currentTime:()=>Date.now(),multiplier:1,clockStep:"SYSTEM_CLOCK_MULTIPLIER",clockRange:"UNBOUNDED",shouldAnimate:!1,uri:"${earthsdk3-assets-script-dir}/assets/misc/simple.czml",defaultLoadFuncStr:kp,defaultLoadFuncDocStr:o0});let _a=pt;(n=>{n.createDefaultProps=()=>({show:!0,uri:"",allowPicking:!1,data:c.reactJsonWithUndefined(void 0),autoResetClock:!0,clockEnabled:!1,startTime:void 0,stopTime:void 0,currentTime:void 0,multiplier:1,clockStep:"SYSTEM_CLOCK_MULTIPLIER",clockRange:"UNBOUNDED",shouldAnimate:!1,loadFuncStr:void 0,...j.createDefaultProps()})})(_a||(_a={})),c.extendClassProps(_a.prototype,_a.createDefaultProps);const Za=class Za extends j{get typeName(){return"ESNavigator"}get defaultProps(){return Za.createDefaultProps()}getProperties(e){return[...super.getProperties(e),new z("通用","通用",[new F("是否显示","A boolean Property specifying the visibility .",!1,!1,[this,"show"]),new S("尺寸","尺寸",!1,!1,[this,"cssSize"]),new ze("位置","位置(top,right)",!1,!1,[this,"cssPosition"]),new Vl("图片地址","图片地址",!1,!1,[this,"imgUrl"])])]}};d(Za,"type",Za.register("ESNavigator",Za,{chsName:"导航控件",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"导航控件"})),d(Za,"defaults",{...j.defaults,show:!0,cssPosition:[170,30],cssSize:100,imgUrl:j.context.getStrFromEnv("${earthsdk3-assets-script-dir}/assets/img/zhinanzhen.png")});let wa=Za;(n=>{n.createDefaultProps=()=>({...j.createDefaultProps(),show:!0,cssSize:100,cssPosition:[170,30],imgUrl:n.defaults.imgUrl})})(wa||(wa={})),c.extendClassProps(wa.prototype,wa.createDefaultProps);const jn=class jn extends j{get typeName(){return"ESViewerStatusBar"}get defaultProps(){return jn.createDefaultProps()}constructor(e){super(e)}getProperties(e){return[...super.getProperties(e),new z("通用","通用",[new F("是否显示","A boolean Property specifying the visibility .",!1,!1,[this,"show"],jn.defaults.show),new S("高度","height",!0,!1,[this,"height"],jn.defaults.height),new S("文字大小","fontSize",!0,!1,[this,"fontSize"],jn.defaults.fontSize),new J("背景颜色"," 背景颜色",!0,!1,[this,"bgColor"],jn.defaults.bgColor)])]}};d(jn,"type",jn.register("ESViewerStatusBar",jn,{chsName:"状态栏",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"状态栏"})),d(jn,"defaults",{...j.defaults,show:!0,height:30,fontSize:14,bgColor:[71,71,71,.8]});let Ea=jn;(n=>{n.createDefaultProps=()=>({...j.createDefaultProps(),show:!0,height:30,fontSize:14,bgColor:c.reactArray([71/255,71/255,71/255,.8])})})(Ea||(Ea={})),c.extendClassProps(Ea.prototype,Ea.createDefaultProps);const ei=class ei extends j{get typeName(){return"ESViewerStatusBarScale"}get defaultProps(){return ei.createDefaultProps()}constructor(e){super(e)}getProperties(e){return[...super.getProperties(e),new z("通用","通用",[new F("是否显示","A boolean Property specifying the visibility .",!1,!1,[this,"show"],ei.defaults.show),new S("高度","height",!0,!1,[this,"height"],ei.defaults.height),new S("文字大小","fontSize",!0,!1,[this,"fontSize"],ei.defaults.fontSize),new J("背景颜色"," 背景颜色",!0,!1,[this,"bgColor"],ei.defaults.bgColor)])]}};d(ei,"type",ei.register("ESViewerStatusBarScale",ei,{chsName:"比例尺状态栏",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"状态栏"})),d(ei,"defaults",{...j.defaults,show:!0,height:30,fontSize:14,bgColor:[71,71,71,.8]});let Sa=ei;(n=>{n.createDefaultProps=()=>({...j.createDefaultProps(),show:!0,height:30,fontSize:14,bgColor:c.reactArray([71/255,71/255,71/255,.8])})})(Sa||(Sa={})),c.extendClassProps(Sa.prototype,Sa.createDefaultProps);const Ka=class Ka extends q{get typeName(){return"ESGaussianSplatting"}get defaultProps(){return Ka.createDefaultProps()}constructor(e){super(e)}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new Z("路径","url",!0,!1,[this,"url"]),new S("进度","progress",!1,!0,[this,"progress"],0)]}}getProperties(e){return[...super.getProperties(e),new z("通用","通用",[new Z("路径","url",!0,!1,[this,"url"]),new S("进度","progress",!1,!0,[this,"progress"],0)])]}};d(Ka,"type",Ka.register("ESGaussianSplatting",Ka,{chsName:"高斯溅射模型",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"用于加载高斯溅射模型的 ES 对象"})),d(Ka,"defaults",{...q.defaults});let Ca=Ka;(n=>{n.createDefaultProps=()=>({...q.createDefaultProps(),url:"",progress:0})})(Ca||(Ca={})),c.extendClassProps(Ca.prototype,Ca.createDefaultProps);const us=class us extends q{get typeName(){return"ESStaticMesh"}get defaultProps(){return us.createDefaultProps()}constructor(e){super(e)}getESProperties(){const e={...super.getESProperties()},t=[new Z("mesh地址","mesh地址",!1,!1,[this,"mesh"],us.defaults.mesh)];return e.basic.push(...t),e}getProperties(e){return[...super.getProperties(e),new z("ESStaticMesh","ESStaticMesh",[new Z("mesh地址","mesh地址",!1,!1,[this,"mesh"],us.defaults.mesh)])]}};d(us,"type",us.register("ESStaticMesh",us,{chsName:"静态网格",tags:["ESObjects","_ES_Impl_UE"],description:"Unreal的Mesh对象"})),d(us,"defaults",{...q.defaults,mesh:"StaticMesh'/Engine/BasicShapes/Sphere.Sphere'"});let Pa=us;(n=>{n.createDefaultProps=()=>({...q.createDefaultProps(),mesh:""})})(Pa||(Pa={})),c.extendClassProps(Pa.prototype,Pa.createDefaultProps);const Qa=class Qa extends le{constructor(t){super(t);d(this,"_startEvent",this.dv(new c.Event));d(this,"_clearEvent",this.dv(new c.Event));d(this,"_eSGeoExtrudedPolygon");this._eSGeoExtrudedPolygon=this.disposeVar(new Ki),this._eSGeoExtrudedPolygon.parentID=this.id,this.ad(this.components.disposableAdd(this._eSGeoExtrudedPolygon)),this.eSGeoExtrudedPolygon.perPositionHeight=!0,this.eSGeoExtrudedPolygon.extrudedHeight=0,this.stroked=!0,this.strokeWidth=2,this.strokeColor=[1,0,0,1],this.ad(c.track([this.eSGeoExtrudedPolygon,"show"],[this,"show"])),this.ad(c.track([this.eSGeoExtrudedPolygon,"stroked"],[this,"stroked"])),this.ad(c.track([this.eSGeoExtrudedPolygon,"strokeWidth"],[this,"strokeWidth"])),this.ad(c.track([this.eSGeoExtrudedPolygon,"strokeColor"],[this,"strokeColor"])),this.ad(c.track([this.eSGeoExtrudedPolygon,"filled"],[this,"filled"])),this.ad(c.track([this.eSGeoExtrudedPolygon,"fillColor"],[this,"fillColor"])),this.ad(c.track([this.eSGeoExtrudedPolygon,"points"],[this,"points"])),this.ad(this.clearEvent.don(()=>{this.points=void 0,this.depths=void 0,this.windowPositions=void 0}))}get typeName(){return"ESSkylineAnalysis"}get defaultProps(){return Qa.createDefaultProps()}get startEvent(){return this._startEvent}start(){this._startEvent.emit()}get clearEvent(){return this._clearEvent}clear(){this._clearEvent.emit()}get eSGeoExtrudedPolygon(){return this._eSGeoExtrudedPolygon}getESProperties(){const t={...super.getESProperties()};return{...t,basic:[...t.basic,new ie("开始分析","开始分析",[],()=>this.start(),[]),new ie("清除分析","清除分析",[],()=>this.clear(),[]),new U("屏幕坐标","windowPositions",!1,!0,[this,"windowPositions"]),new U("深度值","depths",!1,!0,[this,"depths"]),new S("半径","半径",!0,!1,[this,"radius"],1e4)]}}getProperties(t){return[...super.getProperties(t),new z("通用","通用",[new ie("开始分析","开始分析",[],()=>this.start(),[]),new ie("清除分析","清除分析",[],()=>this.clear(),[]),new U("屏幕坐标","windowPositions",!1,!0,[this,"windowPositions"]),new U("深度值","depths",!1,!0,[this,"depths"]),new S("半径","半径",!0,!1,[this,"radius"],1e4)])]}};d(Qa,"type",Qa.register("ESSkylineAnalysis",Qa,{chsName:"天际线分析",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"分析类"})),d(Qa,"defaults",{...le.defaults,windowPositions:[],depths:[],radius:1e4});let Ia=Qa;(n=>{n.createDefaultProps=()=>({...le.createDefaultProps(),windowPositions:Sc(void 0),depths:c.reactArrayWithUndefined(void 0),radius:c.react(void 0)})})(Ia||(Ia={})),c.extendClassProps(Ia.prototype,Ia.createDefaultProps);const sn=class sn extends ve{get typeName(){return"ESHeatMap"}get defaultProps(){return sn.createDefaultProps()}constructor(e){super(e)}getESProperties(){const e=super.getESProperties();return{...e,basic:[...e.basic,new U("data","数据",!0,!1,[this,"data"]),new U("gradient","渐变",!0,!1,[this,"gradient"],sn.defaults.gradient),new S("radius","半径",!0,!1,[this,"radius"],sn.defaults.radius),new S("blur","模糊",!0,!1,[this,"blur"],sn.defaults.blur),new F("is3D","3D",!0,!1,[this,"is3D"])]}}getProperties(e){return[...super.getProperties(e),new z("通用","通用",[new U("data","数据",!0,!1,[this,"data"]),new U("gradient","渐变",!0,!1,[this,"gradient"],sn.defaults.gradient),new S("radius","半径",!0,!1,[this,"radius"],sn.defaults.radius),new S("blur","模糊",!0,!1,[this,"blur"],sn.defaults.blur),new F("is3D","3D",!0,!1,[this,"is3D"])])]}};d(sn,"type",sn.register("ESHeatMap",sn,{chsName:"热力图",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"用于热力图的显示"})),d(sn,"defaults",{...ve.defaults,is3D:!1,data:[],radius:10,gradient:{".5":"green",".7":"yellow",".95":"red"},blur:.85});let Ta=sn;(n=>{n.createDefaultProps=()=>({...ve.createDefaultProps(),is3D:c.react(void 0),data:c.reactPositions(void 0),gradient:c.reactJsonWithUndefined(void 0),radius:c.react(void 0),blur:c.react(void 0)})})(Ta||(Ta={})),c.extendClassProps(Ta.prototype,Ta.createDefaultProps);const Ba=class Ba extends le{constructor(t){super(t);d(this,"editingBindMode","scatter")}get typeName(){return"ESGeoPoints"}get defaultProps(){return Ba.createDefaultProps()}};d(Ba,"type",Ba.register("ESGeoPoints",Ba,{chsName:"地理点集合",tags:["ESObjects","_ES_Impl_Cesium"],description:"地图中的可视化地理点集合"})),d(Ba,"supportEditingModes",[...le.supportEditingModes,se.ScatterAppend,se.ScatterModify]);let Da=Ba;(n=>{n.createDefaultProps=()=>({...le.createDefaultProps(),pointed:!0})})(Da||(Da={})),c.extendClassProps(Da.prototype,Da.createDefaultProps);function zp(n){return typeof n=="string"?document.getElementById(n):n}function bh(n){if(!n)throw new Error("container is not defined");n.innerHTML="";const e=document.createElement("div");return e.style.cssText="width: 100%; height: 100%; margin: 0px; padding: 0px; border: none; overflow: hidden; position: relative; z-index: 0; background: rgba(0,0,0,0);",n.appendChild(e),e}class Up extends c.Destroyable{constructor(t,r){super();d(this,"_listeningSceneObjects",new Map);this._sceneObjectsMananger=t,this._createSceneObjectListeningFunc=r;const i=this._listeningSceneObjects,s=(o,a)=>{if(o)for(let l of o){const u=i.get(l);u&&(u.destroy(),i.delete(l))}if(a)for(let l of a){if(i.get(l)){console.warn(`listeningSceneObjects已存在某对象:${l.name}`,l);debugger}const h=this.createSceneObjectListeningFunc(l);h&&i.set(l,h)}};s(void 0,this._sceneObjectsMananger.sceneObjects),this.dispose(this._sceneObjectsMananger.sceneObjectsToChange.disposableOn(s)),this.dispose(()=>{for(let o of this._listeningSceneObjects.values())o.destroy();this._listeningSceneObjects.clear()})}get listeningSceneObjects(){return this._listeningSceneObjects}get createSceneObjectListeningFunc(){return this._createSceneObjectListeningFunc}}class a0 extends c.Destroyable{constructor(e){super(),this._esObjectsManager=e;{const t=this._esObjectsManager;class r extends c.Destroyable{constructor(s){super(),this._esPath=s,this.dv(new c.ObjResettingWithEvent(t.activeViewerChanged,()=>{const o=t.activeViewer;if(!o)return;class a extends c.Destroyable{constructor(u){if(super(),this._esPath=u,!o)throw new Error("!viewer");const h=()=>{const f=t.activeViewer;f&&(this._esPath.path.currentTime=f.simulationTime)};h(),this.d(o.simulationTimeChanged.don(h))}}return new a(this._esPath)}))}}this.dv(new Up(t.sceneObjectsManager,i=>{if(i instanceof Bi)return new r(i)}))}{const t=this._esObjectsManager;class r extends c.Destroyable{constructor(s){super();const o=()=>{const a=t.activeViewer;a&&(a.simulationTime=s.currentTime??0)};o(),this.d(s.currentTimeChanged.don(o))}}this.dv(new Up(t.sceneObjectsManager,i=>{if(i instanceof Qi)return new r(i)}))}}}class l0 extends c.Destroyable{constructor(e){super(),e.forEach(t=>{this.d(t.path.currentPositionChanged.don(r=>{r&&t.sceneObjects.forEach(i=>{Reflect.has(i,"position")&&(i.position=[...r])})})),this.d(t.path.currentRotationChanged.don(r=>{r&&t.sceneObjects.forEach(i=>{Reflect.has(i,"rotation")&&(i.rotation=[...r])})}))})}}class u0 extends c.Destroyable{constructor(t){super();d(this,"_player");d(this,"_channels",this.dv(c.reactArray([])));this._objectManager=t,this._player=this._objectManager.player,this.dv(new c.ObjResettingWithEvent(this.channelsChanged,()=>{if(this.channels.length===0)return;const r=[];for(let i=0;i<this.channels.length;i++){const s=this.channels[i],o=j.getSceneObjById(s.pathId);if(!o||!(o instanceof Bi))continue;const l=s.sceneObjectIds.map(u=>j.getSceneObjById(u)).filter(u=>u!==void 0);l.length!==0&&r.push({path:o,sceneObjects:l})}if(r.length!==0)return new l0(r)}))}get player(){return this._player}get channels(){return this._channels.value}get channelsChanged(){return this._channels.changed}set channels(t){this._channels.value=t}}function gc(n){if(n.data){const{type:e,value:t}=n.data;if(e==="UITreeA"&&t instanceof sr){const{sceneObject:r}=t;if(r)return r.id}}}function c0(n,e){const{property:t,customEventName:r,otherParams:i}=e,{dragstartDataMananger:s}=n;if(!(t instanceof Nn)){if(!(t instanceof Vh)){if(t instanceof Z){const[o,a]=c.getReactFuncs(t.reactVar);if(r==="ondragover"){if(console.log("ondragover"),!i)throw new Error("!otherParams");const l=i[0];if(l.preventDefault(),!l.dataTransfer)return;gc(s)?l.dataTransfer.dropEffect="move":l.dataTransfer.dropEffect="none"}else if(r==="ondrop"){if(!i)throw new Error("!otherParams");i[0].preventDefault();const u=gc(s);u!==void 0&&a(u)}}else if(t instanceof Lh){const[o,a]=c.getReactFuncs(t.reactVar);if(r==="ondragover"){if(console.log("ondragover"),!i)throw new Error("!otherParams");const l=i[0];if(l.preventDefault(),!l.dataTransfer)return;gc(s)?l.dataTransfer.dropEffect="move":l.dataTransfer.dropEffect="none"}else if(r==="ondrop"){if(!i)throw new Error("!otherParams");const l=i[0].$event,u=i[0].strinsPropDom,h=i[0].index;l.preventDefault();const f=gc(s);if(f!==void 0){u[h].firstChild.value=f;const p=new Event("input",{bubbles:!0,cancelable:!0});u[h].firstChild.dispatchEvent(p)}}}else if(t instanceof Ah){const[o,a]=c.getReactFuncs(t.reactVar)}}}}function Gp(n,e,t,r){if(t)r.currentActiveEditing=[n,e];else if(r.currentActiveEditing){const[i,s]=r.currentActiveEditing;i===n&&s===e&&(t||(r.currentActiveEditing=void 0))}}const h0=["editing","positionEditing","locationEditing","pointEditing","rotationEditing"];class f0 extends c.Destroyable{constructor(e,t){super(),this._sceneObject=e;const r=this._sceneObject;for(let i of h0){const s=i+"Changed",o=r[s];if(o){{const a=r[i];Gp(r,i,a,t)}this.dispose(o.disposableOn(a=>Gp(r,i,a,t)))}}}get sceneObject(){return this._sceneObject}}class d0 extends c.Destroyable{constructor(){super();d(this,"_currentActiveEditing",this.disposeVar(c.reactArrayWithUndefined(void 0)));d(this,"_currentActiveEditingLastChangedTime",0);this.dispose(this._currentActiveEditing.changed.disposableOn((t,r)=>{if(this._currentActiveEditingLastChangedTime=Date.now(),r){const[i,s]=r;i[s]===!0&&(i[s]=!1)}if(t){const[i,s]=t;i[s]=!0}})),j.context.sceneObjCreatedEvent.don(t=>{t.dv(new f0(t,this))})}get currentActiveEditing(){return this._currentActiveEditing.value}set currentActiveEditing(t){this._currentActiveEditing.value=t}get currentActiveEditingChanged(){return this._currentActiveEditing.changed}get currentActiveEditingLastChangedTime(){return this._currentActiveEditingLastChangedTime}}class p0 extends c.Destroyable{constructor(){super();d(this,"_sceneObjects",new Set);d(this,"_sceneObjectsToChange",this.dv(new c.Event));this.d(()=>{const t=c.length(this._sceneObjects);t!==0&&console.warn(`场景对象管理器销毁时仍然管理着${t}个场景对象!`)})}get sceneObjects(){return this._sceneObjects}get sceneObjectsToChange(){return this._sceneObjectsToChange}addSceneObject(t){return this._sceneObjects.has(t)?(console.warn(`创建失败:对象${t.typeName+":"+t.id}已经存在于场景对象管理器中!}`),!1):(this._sceneObjectsToChange.emit([],[t]),this._sceneObjects.add(t),!0)}deleteSceneObject(t){return this._sceneObjects.has(t)?(this._sceneObjectsToChange.emit([t],[]),this._sceneObjects.delete(t),!0):(console.warn(`删除失败:对象${t.typeName+":"+t.id}不存在于场景对象管理器中!}`),!1)}createSceneObject(t,r){const i=j.context.createSceneObject(t,r);return i&&this.addSceneObject(i),i}createSceneObjectFromClass(t,r){const i=j.context.createSceneObjectFromClass(t,r);return i&&this.addSceneObject(i),i}createSceneObjectFromJson(t){const r=j.context.createSceneObjectFromJson(t);return r&&this.addSceneObject(r),r}}function Wp(n,e){return n.length===e.length&&n.every((t,r)=>t===e[r])}class g0 extends c.Destroyable{constructor(e){super(),this._viewer=e,this.d(c.track([this._viewer,"currentTime"],[this._viewer,"simulationTime"]))}}class m0 extends c.Destroyable{constructor(e,t){super(),this._viewer=e,this._activeViewer=t;const r=Kn.createCommonProps(),i=[];Object.keys(r).forEach(l=>{const u=this._activeViewer[l+"Changed"];i.push(u)});const s=this.dv(c.createNextAnimateFrameEvent(...i)),o=()=>{this._viewer.status!=="Created"||this._activeViewer.status!=="Created"||Object.keys(r).forEach(l=>{this._viewer[l]=this._activeViewer[l]})};this.d(s.don(o));const a=this.dv(c.createAnimateFrame());a.restart(void 0,async()=>{if(this._viewer.status!=="Created"||this._activeViewer.status!=="Created")return;const l=this._activeViewer.getCurrentCameraInfo(),u=this._viewer.getCurrentCameraInfo();if(!l)return;const{position:h,rotation:f}=l;u&&Wp(h,u.position)&&Wp(f,u.rotation)||this._viewer.flyIn(h,f,0)}),this.d(()=>a.cancel())}}const v0=`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" preserveAspectRatio="xMidYMid" width="40" height="40" style="shape-rendering: auto; display: block; background: rgba(255, 255, 255, 0);" xmlns:xlink="http://www.w3.org/1999/xlink"><g><circle stroke-linecap="round" fill="none" stroke-dasharray="50.26548245743669 50.26548245743669" stroke="#ffffff" stroke-width="8" r="32" cy="50" cx="50">
467
+ `,tu=Date.now();new Date(tu).toISOString(),new Date(tu+24*60*60*1e3).toISOString();const Vn=class Vn extends ${constructor(e){super(e);d(this,"_flyToEvent",this.disposeVar(new h.Event));d(this,"_resetClockEvent",this.disposeVar(new h.Event))}get flyToEvent(){return this._flyToEvent}flyTo(e){this._flyToEvent.emit(e)}get resetClockEvent(){return this._resetClockEvent}resetClock(){this._resetClockEvent.emit()}getESProperties(){const e={...super.getESProperties()};return{...e,defaultMenu:"basic",basic:[...e.basic,new Q([this,"data"],Vn.defaults.data,f_,"数据",!0),new Q([this,"uri"],"路径",""),new W([this,"clockEnabled"],"启用",!1),new L([this,"multiplier"],"倍速",Vn.defaults.multiplier),new W([this,"autoResetClock"],"自动设置时钟",!0),new ps([this,"startTime"],"开始时间",Vn.defaults.startTime,!0),new ps([this,"stopTime"],"结束时间",Vn.defaults.stopTime,!0),new ps([this,"currentTime"],"当前时间",Vn.defaults.currentTime,!0),new pt([this,"clockStep"],[["TICK_DEPENDENT","TICK_DEPENDENT"],["SYSTEM_CLOCK_MULTIPLIER","SYSTEM_CLOCK_MULTIPLIER"],["SYSTEM_CLOCK","SYSTEM_CLOCK"]],"clockStep","SYSTEM_CLOCK_MULTIPLIER"),new pt([this,"clockRange"],[["UNBOUNDED","UNBOUNDED"],["CLAMPED","CLAMPED"],["LOOP_STOP","LOOP_STOP"]],"clockRange","UNBOUNDED"),new W([this,"shouldAnimate"],"是否启用动画",!1)],general:[...e.general,new W([this,"show"],"是否显示",!0),new W([this,"collision"],"开启碰撞",!1),new W([this,"allowPicking"],"允许拾取",!1)],more:[...e.more,new nt(["number"],r=>this.flyTo(r),[1e3],"飞入"),new nt([],()=>this.resetClock(),[],"重设时钟"),new Fi([this,"loadFuncStr"],"loadFnStr",Up,d_,!0)]}}};d(Vn,"createDefaultProps",()=>({show:!0,uri:"${earthsdk3-assets-script-dir}/assets/misc/simple.czml",allowPicking:!1,data:h.reactJsonWithUndefined(h_),autoResetClock:!0,clockEnabled:!1,startTime:tu,stopTime:tu+24*60*60*1e3,currentTime:tu,multiplier:1,clockStep:"SYSTEM_CLOCK_MULTIPLIER",clockRange:"UNBOUNDED",shouldAnimate:!1,loadFuncStr:void 0,...$.createDefaultProps()})),d(Vn,"type",Vn.register("ESCzml",Vn,{chsName:"ESCzml",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"Czml数据加载"}));let Nh=Vn;const ha=class ha extends ${getESProperties(){const t={...super.getESProperties()};return{...t,more:[...t.more,new rt([]),new W([this,"show"],"是否显示"),new L([this,"cssSize"],"尺寸"),new ge([this,"cssPosition"],"位置"),new pa([this,"imgUrl"],"图片地址")]}}};d(ha,"createDefaultProps",()=>({...$.createDefaultProps(),show:!0,cssSize:100,cssPosition:[170,30],imgUrl:$.context.getStrFromEnv("${earthsdk3-assets-script-dir}/assets/img/zhinanzhen.png")})),d(ha,"type",ha.register("ESNavigator",ha,{chsName:"导航控件",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"导航控件"}));let bh=ha;const li=class li extends ${constructor(t){super(t)}getESProperties(){const t={...super.getESProperties()};return{...t,more:[...t.more,new rt([],"通用","通用"),new W([this,"show"],"是否显示",li.defaults.show),new L([this,"height"],"高度",li.defaults.height,!0),new L([this,"fontSize"],"文字大小",li.defaults.fontSize,!0),new _t([this,"bgColor"],"背景颜色",li.defaults.bgColor,!0)]}}};d(li,"createDefaultProps",()=>({...$.createDefaultProps(),show:!0,height:30,fontSize:14,bgColor:h.reactArray([71/255,71/255,71/255,.8])})),d(li,"type",li.register("ESViewerStatusBar",li,{chsName:"状态栏",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"状态栏"}));let Th=li;const ci=class ci extends ${constructor(t){super(t)}getESProperties(){const t={...super.getESProperties()};return{...t,more:[...t.more,new rt([],"通用","通用"),new W([this,"show"],"是否显示",ci.defaults.show),new L([this,"height"],"高度",ci.defaults.height,!0),new L([this,"fontSize"],"文字大小",ci.defaults.fontSize,!0),new _t([this,"bgColor"],"背景颜色",ci.defaults.bgColor,!0)]}}};d(ci,"createDefaultProps",()=>({...$.createDefaultProps(),show:!0,height:30,fontSize:14,bgColor:h.reactArray([71/255,71/255,71/255,.8])})),d(ci,"type",ci.register("ESViewerStatusBarScale",ci,{chsName:"比例尺状态栏",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"状态栏"}));let Oh=ci;const fa=class fa extends j{constructor(t){super(t)}getESProperties(){const t={...super.getESProperties()};return{...t,basic:[...t.basic,new ot([this,"url"],"路径","",!0),new L([this,"progress"],"进度",0,!1,!0)]}}};d(fa,"createDefaultProps",()=>({...j.createDefaultProps(),url:"",progress:0})),d(fa,"type",fa.register("ESGaussianSplatting",fa,{chsName:"高斯溅射模型",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"用于加载高斯溅射模型的 ES 对象"}));let Dh=fa;const Qs=class Qs extends j{constructor(t){super(t)}getESProperties(){const t={...super.getESProperties()};return{...t,basic:[...t.basic,new ot([this,"mesh"],"mesh地址",Qs.defaults.mesh)]}}};d(Qs,"createDefaultProps",()=>({...j.createDefaultProps(),mesh:"StaticMesh'/Engine/BasicShapes/Sphere.Sphere'"})),d(Qs,"type",Qs.register("ESStaticMesh",Qs,{chsName:"静态网格",tags:["ESObjects","_ES_Impl_UE"],description:"Unreal的Mesh对象"}));let Mh=Qs;const da=class da extends yt{constructor(e){super(e);d(this,"_startEvent",this.dv(new h.Event));d(this,"_clearEvent",this.dv(new h.Event));d(this,"_eSGeoExtrudedPolygon");this._eSGeoExtrudedPolygon=this.disposeVar(new Qa),this.ad(this.components.disposableAdd(this._eSGeoExtrudedPolygon)),this.eSGeoExtrudedPolygon.perPositionHeight=!0,this.eSGeoExtrudedPolygon.extrudedHeight=0,this.stroked=!0,this.strokeWidth=2,this.strokeColor=[1,0,0,1],this.ad(h.track([this.eSGeoExtrudedPolygon,"show"],[this,"show"])),this.ad(h.track([this.eSGeoExtrudedPolygon,"stroked"],[this,"stroked"])),this.ad(h.track([this.eSGeoExtrudedPolygon,"strokeWidth"],[this,"strokeWidth"])),this.ad(h.track([this.eSGeoExtrudedPolygon,"strokeColor"],[this,"strokeColor"])),this.ad(h.track([this.eSGeoExtrudedPolygon,"filled"],[this,"filled"])),this.ad(h.track([this.eSGeoExtrudedPolygon,"fillColor"],[this,"fillColor"])),this.ad(h.track([this.eSGeoExtrudedPolygon,"points"],[this,"points"])),this.ad(this.clearEvent.don(()=>{this.points=void 0,this.depths=void 0,this.windowPositions=void 0}))}get startEvent(){return this._startEvent}start(){this._startEvent.emit()}get clearEvent(){return this._clearEvent}clear(){this._clearEvent.emit()}get eSGeoExtrudedPolygon(){return this._eSGeoExtrudedPolygon}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new nt([],()=>this.start(),[],"开始分析"),new nt([],()=>this.clear(),[],"清除分析"),new Q([this,"windowPositions"],"屏幕坐标",[],void 0,!1,!0),new Q([this,"depths"],"深度值",[],void 0,!1,!0),new L([this,"radius"],"半径",1e4,!0)]}}};d(da,"createDefaultProps",()=>({...yt.createDefaultProps(),windowPositions:hl([]),depths:h.reactArrayWithUndefined([]),radius:h.react(1e4)})),d(da,"type",da.register("ESSkylineAnalysis",da,{chsName:"天际线分析",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"分析类"}));let xh=da;const Li=class Li extends Rt{constructor(t){super(t)}getESProperties(){const t=super.getESProperties();return{...t,basic:[...t.basic,new Q([this,"data"],"数据",[],void 0,!0),new Q([this,"gradient"],"渐变",Li.defaults.gradient,void 0,!0),new L([this,"radius"],"半径",Li.defaults.radius,void 0,!0),new L([this,"blur"],"模糊",Li.defaults.blur,!0),new W([this,"is3D"],"is3D",!1,!0)]}}};d(Li,"createDefaultProps",()=>({...Rt.createDefaultProps(),is3D:h.react(!1),data:h.reactPositions([]),gradient:h.reactJsonWithUndefined({".5":"green",".7":"yellow",".95":"red"}),radius:h.react(10),blur:h.react(.85)})),d(Li,"type",Li.register("ESHeatMap",Li,{chsName:"热力图",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"用于热力图的显示"}));let Lh=Li;const Bs=class Bs extends yt{constructor(e){super(e);d(this,"editingBindMode","scatter")}};d(Bs,"createDefaultProps",()=>({...yt.createDefaultProps(),pointed:!0})),d(Bs,"type",Bs.register("ESGeoPoints",Bs,{chsName:"地理点集合",tags:["ESObjects","_ES_Impl_Cesium"],description:"地图中的可视化地理点集合"})),d(Bs,"supportEditingModes",[...yt.supportEditingModes,B.ScatterAppend,B.ScatterModify]);let Ah=Bs;function Gp(n){return typeof n=="string"?document.getElementById(n):n}function Rh(n){if(!n)throw new Error("container is not defined");n.innerHTML="";const t=document.createElement("div");return t.style.cssText="width: 100%; height: 100%; margin: 0px; padding: 0px; border: none; overflow: hidden; position: relative; z-index: 0; background: rgba(0,0,0,0);",n.appendChild(t),t}class Wp extends h.Destroyable{constructor(e,r){super();d(this,"_listeningSceneObjects",new Map);this._sceneObjectsMananger=e,this._createSceneObjectListeningFunc=r;const i=this._listeningSceneObjects,s=(o,a)=>{if(o)for(let u of o){const l=i.get(u);l&&(l.destroy(),i.delete(u))}if(a)for(let u of a){if(i.get(u)){console.warn(`listeningSceneObjects已存在某对象:${u.name}`,u);debugger}const c=this.createSceneObjectListeningFunc(u);c&&i.set(u,c)}};s(void 0,this._sceneObjectsMananger.sceneObjects),this.dispose(this._sceneObjectsMananger.sceneObjectsToChange.disposableOn(s)),this.dispose(()=>{for(let o of this._listeningSceneObjects.values())o.destroy();this._listeningSceneObjects.clear()})}get listeningSceneObjects(){return this._listeningSceneObjects}get createSceneObjectListeningFunc(){return this._createSceneObjectListeningFunc}}class p_ extends h.Destroyable{constructor(t){super(),this._esObjectsManager=t;{const e=this._esObjectsManager;class r extends h.Destroyable{constructor(s){super(),this._esPath=s,this.dv(new h.ObjResettingWithEvent(e.activeViewerChanged,()=>{const o=e.activeViewer;if(!o)return;class a extends h.Destroyable{constructor(l){if(super(),this._esPath=l,!o)throw new Error("!viewer");const c=()=>{const f=e.activeViewer;f&&(this._esPath.path.currentTime=f.simulationTime)};c(),this.d(o.simulationTimeChanged.don(c))}}return new a(this._esPath)}))}}this.dv(new Wp(e.sceneObjectsManager,i=>{if(i instanceof ja)return new r(i)}))}{const e=this._esObjectsManager;class r extends h.Destroyable{constructor(s){super();const o=()=>{const a=e.activeViewer;a&&(a.simulationTime=s.currentTime??0)};o(),this.d(s.currentTimeChanged.don(o))}}this.dv(new Wp(e.sceneObjectsManager,i=>{if(i instanceof $a)return new r(i)}))}}}class g_ extends h.Destroyable{constructor(t){super(),t.forEach(e=>{this.d(e.path.currentPositionChanged.don(r=>{r&&e.sceneObjects.forEach(i=>{Reflect.has(i,"position")&&(i.position=[...r])})})),this.d(e.path.currentRotationChanged.don(r=>{r&&e.sceneObjects.forEach(i=>{Reflect.has(i,"rotation")&&(i.rotation=[...r])})}))})}}class m_ extends h.Destroyable{constructor(e){super();d(this,"_player");d(this,"_channels",this.dv(h.reactArray([])));this._objectManager=e,this._player=this._objectManager.player,this.dv(new h.ObjResettingWithEvent(this.channelsChanged,()=>{if(this.channels.length===0)return;const r=[];for(let i=0;i<this.channels.length;i++){const s=this.channels[i],o=$.getSceneObjById(s.pathId);if(!o||!(o instanceof ja))continue;const u=s.sceneObjectIds.map(l=>$.getSceneObjById(l)).filter(l=>l!==void 0);u.length!==0&&r.push({path:o,sceneObjects:u})}if(r.length!==0)return new g_(r)}))}get player(){return this._player}get channels(){return this._channels.value}get channelsChanged(){return this._channels.changed}set channels(e){this._channels.value=e}}function nl(n){if(n.data){const{type:t,value:e}=n.data;if(t==="UITreeA"&&e instanceof He){const{sceneObject:r}=e;if(r)return r.id}}}function v_(n,t){const{property:e,customEventName:r,otherParams:i}=t,{dragstartDataMananger:s}=n;if(!(e instanceof to)){if(!(e instanceof Xh)){if(e instanceof ot){const[o,a]=h.getReactFuncs(e.reactVar);if(r==="ondragover"){if(console.log("ondragover"),!i)throw new Error("!otherParams");const u=i[0];if(u.preventDefault(),!u.dataTransfer)return;nl(s)?u.dataTransfer.dropEffect="move":u.dataTransfer.dropEffect="none"}else if(r==="ondrop"){if(!i)throw new Error("!otherParams");i[0].preventDefault();const l=nl(s);l!==void 0&&a(l)}}else if(e instanceof zh){const[o,a]=h.getReactFuncs(e.reactVar);if(r==="ondragover"){if(console.log("ondragover"),!i)throw new Error("!otherParams");const u=i[0];if(u.preventDefault(),!u.dataTransfer)return;nl(s)?u.dataTransfer.dropEffect="move":u.dataTransfer.dropEffect="none"}else if(r==="ondrop"){if(!i)throw new Error("!otherParams");const u=i[0].$event,l=i[0].strinsPropDom,c=i[0].index;u.preventDefault();const f=nl(s);if(f!==void 0){l[c].firstChild.value=f;const p=new Event("input",{bubbles:!0,cancelable:!0});l[c].firstChild.dispatchEvent(p)}}}else if(e instanceof Uh){const[o,a]=h.getReactFuncs(e.reactVar)}}}}function qp(n,t,e,r){if(e)r.currentActiveEditing=[n,t];else if(r.currentActiveEditing){const[i,s]=r.currentActiveEditing;i===n&&s===t&&(e||(r.currentActiveEditing=void 0))}}const y_=["editing","positionEditing","locationEditing","pointEditing","rotationEditing"];class __ extends h.Destroyable{constructor(t,e){super(),this._sceneObject=t;const r=this._sceneObject;for(let i of y_){const s=i+"Changed",o=r[s];if(o){{const a=r[i];qp(r,i,a,e)}this.dispose(o.disposableOn(a=>qp(r,i,a,e)))}}}get sceneObject(){return this._sceneObject}}class w_ extends h.Destroyable{constructor(){super();d(this,"_currentActiveEditing",this.disposeVar(h.reactArrayWithUndefined(void 0)));d(this,"_currentActiveEditingLastChangedTime",0);this.dispose(this._currentActiveEditing.changed.disposableOn((e,r)=>{if(this._currentActiveEditingLastChangedTime=Date.now(),r){const[i,s]=r;i[s]===!0&&(i[s]=!1)}if(e){const[i,s]=e;i[s]=!0}})),$.context.sceneObjCreatedEvent.don(e=>{e.dv(new __(e,this))})}get currentActiveEditing(){return this._currentActiveEditing.value}set currentActiveEditing(e){this._currentActiveEditing.value=e}get currentActiveEditingChanged(){return this._currentActiveEditing.changed}get currentActiveEditingLastChangedTime(){return this._currentActiveEditingLastChangedTime}}class E_ extends h.Destroyable{constructor(){super();d(this,"_sceneObjects",new Set);d(this,"_sceneObjectsToChange",this.dv(new h.Event));this.d(()=>{const e=h.length(this._sceneObjects);e!==0&&console.warn(`场景对象管理器销毁时仍然管理着${e}个场景对象!`)})}get sceneObjects(){return this._sceneObjects}get sceneObjectsToChange(){return this._sceneObjectsToChange}addSceneObject(e){return this._sceneObjects.has(e)?(console.warn(`创建失败:对象${e.typeName+":"+e.id}已经存在于场景对象管理器中!}`),!1):(this._sceneObjectsToChange.emit([],[e]),this._sceneObjects.add(e),!0)}deleteSceneObject(e){return this._sceneObjects.has(e)?(this._sceneObjectsToChange.emit([e],[]),this._sceneObjects.delete(e),!0):(console.warn(`删除失败:对象${e.typeName+":"+e.id}不存在于场景对象管理器中!}`),!1)}createSceneObject(e,r){const i=$.context.createSceneObject(e,r);return i&&this.addSceneObject(i),i}createSceneObjectFromClass(e,r){const i=$.context.createSceneObjectFromClass(e,r);return i&&this.addSceneObject(i),i}createSceneObjectFromJson(e){const r=$.context.createSceneObjectFromJson(e);return r&&this.addSceneObject(r),r}}function Xp(n,t){return n.length===t.length&&n.every((e,r)=>e===t[r])}class S_ extends h.Destroyable{constructor(t){super(),this._viewer=t,this.d(h.track([this._viewer,"currentTime"],[this._viewer,"simulationTime"]))}}class C_ extends h.Destroyable{constructor(t,e){super(),this._viewer=t,this._activeViewer=e;const r=Mn.createCommonProps(),i=[];Object.keys(r).forEach(u=>{const l=this._activeViewer[u+"Changed"];i.push(l)});const s=this.dv(h.createNextAnimateFrameEvent(...i)),o=()=>{this._viewer.status!=="Created"||this._activeViewer.status!=="Created"||Object.keys(r).forEach(u=>{this._viewer[u]=this._activeViewer[u]})};this.d(s.don(o));const a=this.dv(h.createAnimateFrame());a.restart(void 0,async()=>{if(this._viewer.status!=="Created"||this._activeViewer.status!=="Created")return;const u=this._activeViewer.getCurrentCameraInfo(),l=this._viewer.getCurrentCameraInfo();if(!u)return;const{position:c,rotation:f}=u;l&&Xp(c,l.position)&&Xp(f,l.rotation)||this._viewer.flyIn(c,f,0)}),this.d(()=>a.cancel())}}const I_=`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" preserveAspectRatio="xMidYMid" width="40" height="40" style="shape-rendering: auto; display: block; background: rgba(255, 255, 255, 0);" xmlns:xlink="http://www.w3.org/1999/xlink"><g><circle stroke-linecap="round" fill="none" stroke-dasharray="50.26548245743669 50.26548245743669" stroke="#ffffff" stroke-width="8" r="32" cy="50" cx="50">
532
468
  <animateTransform values="0 50 50;360 50 50" keyTimes="0;1" dur="1s" repeatCount="indefinite" type="rotate" attributeName="transform"></animateTransform>
533
469
  </circle><g></g></g></svg>
534
- `,y0='<svg t="1747028305766" class="icon" viewBox="0 0 1032 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="3881" width="40" height="40"><path d="M0.1536 547.700736c-0.205824-0.187392-0.205824-0.49152 0.008192-0.68608l80.672768-73.590784a0.63488 0.63488 0 0 1 0.7936-0.029696l263.043072 203.0336c0.667648 0.515072 1.738752 0.498688 2.393088-0.038912l609.191936-500.133888a0.605184 0.605184 0 0 1 0.768 0.022528l74.84928 67.229696a0.454656 0.454656 0 0 1-0.002048 0.685056l-685.234176 618.19904a1.14688 1.14688 0 0 1-1.518592-0.012288L0.1536 547.700736z" fill="#ffffff" p-id="3882"></path></svg>',_0='<svg t="1747028398107" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1146" width="40" height="40"><path d="M415.744006 1.033277A0.992256 0.992256 0 0 1 416.747526 0.000061h189.5045c0.569344 0 1.017856 0.45056 1.001472 1.033216l-21.227518 754.803667a1.062912 1.062912 0 0 1-1.05984 1.032192h-146.933752c-0.569344 0-1.04448-0.45056-1.059839-1.032192L415.744006 1.033277zM511.510528 1024c-52.595709 0-95.231994-39.866366-95.231994-89.043963 0-49.176573 42.636285-89.042939 95.231994-89.042938 52.594685 0 95.231994 39.866366 95.231994 89.042938 0 49.177597-42.637309 89.043963-95.231994 89.043963z" fill="#ffffff" p-id="1147"></path></svg>',$a=class $a extends c.Destroyable{constructor(e){super();const t=()=>{const r=this.dv(new Ls);this.d(c.track([r,"show"],[e,"useDefaultStatusDiv"]));{const i=()=>{r.show=(e.useDefaultStatusDiv??!0)&&e.status!=="Created"};i(),this.d(e.useDefaultStatusDivChanged.don(i)),this.d(e.statusChanged.don(i)),r.cssText="width:100%;height:100%;position:absolute;left:0px;top:0px;"}e.add(r),this.d(()=>e.delete(r)),r.instanceClass=class extends c.Destroyable{constructor(o,a,l){super();d(this,"_div",document.createElement("div"));if(this._subContainer=o,!l)return;this._subContainer.appendChild(this._div),this.d(()=>this._subContainer.removeChild(this._div));{const w=()=>{a.show?this._div.style.opacity="1":this._div.style.opacity="0"};w(),this.d(a.showChanged.don(w))}let u,h,f,p,v;this._div.style.pointerEvents="none",this._div.style.position="absolute",this._div.style.width="100%",this._div.style.height="100%",this._div.style.backgroundColor="rgba(0, 0, 0, 0.4)",this._div.style.zIndex="100",this._div.style.transition="opacity 2s",u=document.createElement("div"),this._div.appendChild(u),u.style.width="auto",u.style.position="absolute",u.style.left="50%",u.style.top="50%",u.style.transform="translate(-50%,-50%)",u.style.background="rgba(120, 120, 0, 0.7)",u.style.color="white",u.style.fontSize="10px",u.style.background="none",u.style.display="flex",u.style.justifyContent="center",u.style.alignItems="center",h=document.createElement("div"),u.appendChild(h),h.style.pointerEvents="none",h.style.display="block",h.style.width="40px",h.innerHTML=$a.defaultsSvg.loadingSvg,h.style.filter="drop-shadow(0px 0px 1px black)",f=document.createElement("div"),u.appendChild(f),f.style.pointerEvents="none",f.style.marginLeft="10px",f.style.display="flex",f.style.flexFlow="column",f.style.maxWidth="300px",p=document.createElement("div"),f.appendChild(p),p.style.fontSize="14px",p.style.fontWeight="800",p.style.marginBottom="5px",p.style.textShadow="0 0 2px black",v=document.createElement("div"),f.appendChild(v),v.style.fontWeight="400",v.style.textShadow="0 0 2px black";{const w=()=>{let T="Raw";l.status==="Raw"?T="初始状态":l.status==="Creating"?T="正在创建":l.status==="Created"?T="创建完成":l.status==="Error"?T="创建失败":l.status==="Reconnecting"&&(T="重新连接"),p.innerText=`${T}(${l.status})`,v.innerText=`${l.statusLog}`,(l.status==="Creating"||l.status==="Reconnecting")&&(h.innerHTML=$a.defaultsSvg.loadingSvg),l.status==="Created"&&(h.innerHTML=$a.defaultsSvg.successSvg),l.status==="Error"&&(h.innerHTML=$a.defaultsSvg.warnSvg)};w();const I=this.dv(c.createNextAnimateFrameEvent(l.statusLogChanged,l.statusChanged));this.d(I.don(w))}}update(){const o=255*Math.random()|0,a=255*Math.random()|0,l=255*Math.random()|0;this._div.style.background=`rgba(${o}, ${a}, ${l}, 0.8)`}}};this.d(e.containerChanged.don(()=>{t()}))}};d($a,"defaultsSvg",{loadingSvg:v0,successSvg:y0,warnSvg:_0});let Oh=$a;class w0 extends c.Destroyable{constructor(e,t,r){super(),this._subContainer=e,this._overlayContainer=t,this._viewer=r;const i=this._subContainer,s=this._overlayContainer,o=this._viewer,a=()=>{const h=o.zIndex??"";i.style.zIndex=h,s.style.zIndex=h};a(),this.d(o.zIndexChanged.don(a));const l=()=>{i.style.display=o.show??!0?"block":"none"};l(),this.d(o.showChanged.don(l));const u=()=>{i.style.opacity=`${o.opacity??1}`};u(),this.d(o.opacityChanged.don(u))}}function mc(n){let e=c.getExtProp(n,"_relativeContainer");return e||(e=document.createElement("div"),e.style.position="relative",e.style.width="100%",e.style.height="100%",e.style.padding="0",e.style.margin="0",n.appendChild(e),c.setExtProp(n,"_relativeContainer",e)),e}class E0 extends c.Destroyable{constructor(t,r){super();d(this,"_subContainer",document.createElement("div"));d(this,"_overlayContainer",document.createElement("div"));d(this,"_containerStyleController");this._container=t,this._viewer=r,this._containerStyleController=this.dv(new w0(this._subContainer,this._overlayContainer,this._viewer));const{subContainer:i,overlayContainer:s}=this;i.tabIndex=-1,i.style.outline="none",i.style.width="100%",i.style.height="100%",i.onpointerdown=()=>i.focus(),s.style.position="relative",s.setAttribute("earthsdk3","earthsdk3-overlayContainer"),i.setAttribute("earthsdk3","earthsdk3-subContainer"),mc(this._container).appendChild(i),this.d(()=>mc(this._container).removeChild(i)),mc(this._container).appendChild(s),this.d(()=>mc(this._container).removeChild(s))}get subContainer(){return this._subContainer}get overlayContainer(){return this._overlayContainer}get containerStyleController(){return this._containerStyleController}get container(){return this._container}}class S0 extends c.Destroyable{constructor(){super(...arguments);d(this,"registerObjsMap",new Map)}register(t,r){return this.registerObjsMap.has(t)&&console.warn(`register warn:${t}已经被注册,再次注册会覆盖。`),this.registerObjsMap.set(t,r),t}getViewerConstructor(t){const r=this.registerObjsMap.get(t);if(!r){console.warn(`未找到${t}类!`);return}return r}createViewer(t){const r=t.type;console.log(t);const i=this.getViewerConstructor(r);if(!i)throw new Error(`没有找到类型为${r}的Viewer构造器!`);return new i(t)}}class qp extends c.Destroyable{constructor(e,t,r=!1,i=!1){if(super(),this._viewer=e,!t)throw new Error("ViewerCustomInteraction: container is null");const s=this.dv(c.DomElementEvent.create(t,"pointerdown")),o=this.dv(c.DomElementEvent.create(t,"pointermove")),a=this.dv(c.DomElementEvent.create(t,"pointerup")),l=this.dv(c.DomElementEvent.create(t,"pointerout")),u=this.dv(c.DomElementEvent.create(t,"pointerover")),h=this.dv(new c.PointerClick),f=this.dv(new c.PointerHover),p=()=>{const g=this._viewer.hoverTime*1e3;f.delayTime=g};this.d(this._viewer.hoverTimeChanged.don(()=>{p()})),this.d(s.don(g=>h.pointerDown(g))),this.d(o.don(g=>h.pointerMove(g))),this.d(a.don(g=>h.pointerUp(g))),this.d(l.don(g=>h.pointerOut(g))),this.d(s.don(g=>f.pointerDown(g))),this.d(o.don(g=>f.pointerMove(g))),this.d(a.don(g=>f.pointerUp(g))),this.d(l.don(g=>f.pointerOut(g)));const{x:v,y:w}=t.getBoundingClientRect(),I=i?v:0,T=i?w:0;this.d(f.hoverEvent.don(g=>{const[y,E]=c.getDomEventCurrentTargetPos(g,r);this._viewer.hoverEvent.emit({screenPosition:[y+I,E+T],pointerEvent:g})})),this.d(h.clickEvent.don(g=>{const[y,E]=c.getDomEventCurrentTargetPos(g,r);this._viewer.clickEvent.emit({screenPosition:[y+I,E+T],pointerEvent:g})})),this.d(h.dbclickEvent.don(g=>{const[y,E]=c.getDomEventCurrentTargetPos(g,r);g.button===0&&this._viewer.dblclickEvent.emit({screenPosition:[y+I,E+T],pointerEvent:g})})),this.d(s.don(g=>{const[y,E]=c.getDomEventCurrentTargetPos(g,r);g.button===0&&this._viewer.pointerDownEvent.emit({screenPosition:[y+I,E+T],pointerEvent:g})})),this.d(a.don(g=>{const[y,E]=c.getDomEventCurrentTargetPos(g,r);g.button===0&&this._viewer.pointerUpEvent.emit({screenPosition:[y+I,E+T],pointerEvent:g})})),this.d(o.don(g=>{const[y,E]=c.getDomEventCurrentTargetPos(g,r);this._viewer.pointerMoveEvent.emit({screenPosition:[y+I,E+T],pointerEvent:g})})),this.d(u.don(g=>{const[y,E]=c.getDomEventCurrentTargetPos(g,r);this._viewer.pointerOverEvent.emit({screenPosition:[y+I,E+T],pointerEvent:g})})),this.d(l.don(g=>{const[y,E]=c.getDomEventCurrentTargetPos(g,r);this._viewer.pointerOutEvent.emit({screenPosition:[y+I,E+T],pointerEvent:g})}));const L=this.dv(c.DomElementEvent.create(t,"keydown"));this.d(L.don(g=>this._viewer.keyDownEvent.emit(g)));const m=this.dv(c.DomElementEvent.create(t,"keyup"));this.d(m.don(g=>this._viewer.keyUpEvent.emit(g)));const _=this.dv(c.DomElementEvent.create(t,"wheel"));this.d(_.don(g=>this._viewer.wheelEvent.emit(g)))}}class C0 extends c.Destroyable{constructor(t){super();d(this,"viewer");const r=this.viewer=t;this.ad(new c.ObjResettingWithEvent(r.rollerShutterChanged,()=>{const i=r.container;if(!i||!r.rollerShutter)return;const s=new c.Destroyable;this.viewer.splitPosition=.5;let o=this.getRollerShutterDIV();return i.appendChild(o),s.d(()=>{this.viewer.splitPosition=0,i.removeChild(o)}),s}))}getRollerShutterDIV(){let t=document.createElement("div");t.style.position="absolute",t.style.left="50%",t.style.top="0",t.style.backgroundColor="#d3d3d3",t.style.width="5px",t.style.height="100%",t.style.zIndex="9999";const r=i=>{if(!t.parentElement)return;i.preventDefault?i.preventDefault():i.returnValue=!1;const o=i.x/t.parentElement.offsetWidth;t.style.left=`${100*o}%`,this.viewer.splitPosition=o};return t.addEventListener("mouseenter",i=>{t.style.cursor="ew-resize"}),t.addEventListener("mouseleave",i=>{t.style.cursor="default"}),t.addEventListener("mousedown",i=>{t.style.cursor="ew-resize",document.addEventListener("mousemove",r)}),document.addEventListener("mouseup",i=>{t.style.cursor="default",document.removeEventListener("mousemove",r)}),t}}class P0 extends c.Destroyable{constructor(t){super();d(this,"rollerShutterAnalysis");this.rollerShutterAnalysis=this.ad(new C0(t))}}const Oi=class Oi extends c.Destroyable{constructor(t){super();d(this,"_forceRecreateEvent",this.dv(new c.Event));d(this,"_container",this.dv(c.react(void 0)));d(this,"_containerSize",this.dv(c.react(void 0)));d(this,"_editingEvent",this.disposeVar(new c.Event));d(this,"_status",this.dv(c.react("Raw")));d(this,"_statusLog",this.dv(c.react("")));d(this,"_statusContainer",this.dv(new Oh(this)));d(this,"_useCustomInteraction",this.dv(c.react(!0)));d(this,"_resetInteractionEvent",this.dv(c.createNextAnimateFrameEvent(this.containerChanged,this._useCustomInteraction.changed,this._forceRecreateEvent)));d(this,"_interactionResetting",this.dv(new c.ObjResettingWithEvent(this._resetInteractionEvent,()=>{if(!(!this.container||!this._useCustomInteraction.value))return new qp(this,this.container)})));d(this,"_viewerChanged",this.dv(new c.Event));d(this,"_containerResetEvent",this.dv(c.createNextAnimateFrameEvent(this.containerChanged,this._forceRecreateEvent)));d(this,"_containerResetting",this.dv(new c.ObjResettingWithEvent(this._containerResetEvent,()=>{if(this.container)return new E0(this.container,this)})));d(this,"_sceneObjectsMap",new Map);d(this,"_id");d(this,"_typeName");d(this,"_updateFuncReact",this.dv(c.react(void 0)));d(this,"_toDestroyFuncReact",this.dv(c.react(void 0)));d(this,"_statusInfo",Oi.defaults.statusInfo);d(this,"_navigationMode",this.dv(c.react("Map")));d(this,"_syncViewer",this.dv(c.react(void 0)));d(this,"_syncEventDon",this.dv(new c.ObjResettingWithEvent(this.syncViewerChanged,()=>{const t=this.syncViewer;if(t)return new m0(this,t)})));d(this,"_timeSyncdon",this.dv(new c.ObjResettingWithEvent(this.timeSyncChanged,()=>{if(this.timeSync)return new g0(this)})));d(this,"_hoverEvent",this.dv(new c.Event));d(this,"_pointerOverEvent",this.dv(new c.Event));d(this,"_pointerMoveEvent",this.dv(new c.Event));d(this,"_pointerDownEvent",this.dv(new c.Event));d(this,"_pointerUpEvent",this.dv(new c.Event));d(this,"_pointerOutEvent",this.dv(new c.Event));d(this,"_clickEvent",this.dv(new c.Event));d(this,"_dblclickEvent",this.dv(new c.Event));d(this,"_keyDownEvent",this.dv(new c.Event));d(this,"_keyUpEvent",this.dv(new c.Event));d(this,"_wheelEvent",this.dv(new c.Event));d(this,"_actived",this.dv(c.react(!1)));this._id=t.id??c.createGuid();const r=zp(t.container);if(r)this._container.value=bh(r),this._typeName=t.type,this._initName();else throw new Error("container is not defined");{const i=()=>{r&&(this.show??!0?r.style.display="block":r.style.display="none")};i(),this.d(this.showChanged.don(i))}{const i=this._sceneObjectsMap,s=()=>{for(let[a,l]of i.entries())if(!l&&a){const u=Hs.context.createEngineObject(a,this);u&&i.set(a,u)}},o=()=>{for(let[a,l]of i.entries())l&&!l.isDestroyed()&&l.destroy(),i.set(a,void 0)};this.d(o),this.d(this.viewerChanged.don(a=>{o(),a&&s()}))}{const i=()=>{if(this.execOnceFuncStr)try{Function(`"use strict";return (${this.execOnceFuncStr})`)()(this)}catch(s){console.warn(`execOnceFuncStr不能转成函数!或者函数执行时错误!id: ${this.id} ${this.typeName} error: ${s}`)}};i(),this.d(this.execOnceFuncStrChanged.don(i))}{const i=()=>{if(this.updateFuncStr)try{this.updateFunc=Function(`"use strict";return (${this.updateFuncStr})`)()}catch(o){console.warn(`updateFuncStr不能转成函数!或者函数执行时错误!id: ${this.id} ${this.typeName} error: ${o}`)}};i(),this.d(this.updateFuncStrChanged.don(i));let s;this.d(()=>s&&s.destroy()),this.d(this.updateFuncChanged.don(()=>{s&&s.cancel(),this.updateFunc&&(s=s||c.createAnimateFrame(),s.restart(void 0,o=>{this.updateFunc&&this.updateFunc(this,o)}))}))}{const i=()=>{try{this.toDestroyFunc=this.toDestroyFuncStr&&Function(`"use strict";return (${this.toDestroyFuncStr})`)()||void 0}catch(s){console.warn(`toDestroyFuncStr不能转成函数!或者函数执行时错误!id: ${this.id} ${this.typeName} error: ${s}`),this.toDestroyFunc=void 0}};i(),this.d(this.toDestroyFuncStrChanged.don(i)),this.d(this.toDestroyEvent.don(()=>{this.toDestroyFunc&&this.toDestroyFunc(this)}))}this.ad(new P0(this))}forceRecreate(){this._forceRecreateEvent.emit()}get container(){return this._container.value}set container(t){this._container.value=t}set containerOrId(t){if(typeof t=="string"){const r=document.getElementById(t);r&&r instanceof HTMLDivElement?this._container.value=bh(r):console.warn("containerOrId warn: !(container instanceof HTMLDivElement)")}else t instanceof HTMLDivElement?this._container.value=bh(t):console.warn("containerOrId warn: setting container failed!")}get containerChanged(){return this._container.changed}get containerSize(){return this._containerSize.value}set containerSize(t){this._containerSize.value=t}get containerSizeChanged(){return this._containerSize.changed}get editingEvent(){return this._editingEvent}get status(){return this._status.value}get statusChanged(){return this._status.changed}setStatus(t){this._status.value=t}get statusLog(){return this._statusLog.value}get statusLogChanged(){return this._statusLog.changed}setStatusLog(t){this._statusLog.value=t}get useCustomInteraction(){return this._useCustomInteraction.value}set useCustomInteraction(t){this._useCustomInteraction.value=t}get viewerChanged(){return this._viewerChanged}get containerResetEvent(){return this._containerResetEvent}get subContainer(){var t;return(t=this._containerResetting.obj)==null?void 0:t.subContainer}get subContainerChanged(){return this._containerResetting.objChanged}get overlayContainer(){var t;return(t=this._containerResetting.obj)==null?void 0:t.overlayContainer}get overlayContainerChanged(){return this._containerResetting.objChanged}get sceneObjectsMap(){return this._sceneObjectsMap}get sceneObjects(){return this._sceneObjectsMap.keys()}getEngineObject(t){return this.sceneObjectsMap.get(t)}add(...t){for(let r of t)if(!this.has(r)){j.context.addSceneObject(r);const i=Hs.context.createEngineObject(r,this);i&&this._sceneObjectsMap.set(r,i),r.viewerAttached.emit(this)}}delete(...t){for(let r of t)if(this.has(r)){const i=this._sceneObjectsMap.get(r);i&&i.destroy(),j.context.deleteSceneObject(r),this._sceneObjectsMap.delete(r),r.viewerDetached.emit(this)}}disposableAdd(...t){return this.add(...t),()=>this.delete(...t)}disAdd(...t){return this.disposableAdd(...t)}has(t){return this._sceneObjectsMap.has(t)}clearAllSceneObjects(){for(let t of this.sceneObjects)this.delete(t)}get id(){return this._id}set id(t){console.warn("ESViewer id is readonly")}get typeName(){return this._typeName}_initName(){this.name=`${this.typeName}_${(""+this.id).slice(-4)}`}get defaultProps(){return Oi.createDefaultProps()}_getJson(t=!0){const r={id:this.id,type:this.typeName};for(let i of Object.keys(this.defaultProps))if(t){let s,o=this.defaultProps[i];o instanceof c.ReactiveVariable?s=o.equals(this[i]):s=o===this[i],s||(r[i]=this[i])}else r[i]=this[i];return r}_setJson(t,r,i){if(!(t instanceof Object)||t.type&&t.type!==this.typeName){console.error(`value.type && value.type${t.type} !== this.typeName${this.typeName}`);return}t.id&&t.id!==this.id&&console.warn(`value.id === undefined || value.id${t.id} !== this.id(${this.id})`);const s=r||[];s.push("id","type");const o=Object.keys(this.defaultProps).filter(a=>!s.includes(a));for(let a of o)if(a in t)this[a]=t[a]===null?void 0:t[a];else if(!(i??!1)){let l=this.defaultProps[a];l instanceof c.ReactiveVariable&&(l=l.value),this[a]=l}}get json(){return this._getJson()}set json(t){this._setJson(t,["devTags"])}get updateFunc(){return this._updateFuncReact.value}set updateFunc(t){this._updateFuncReact.value=t}get updateFuncChanged(){return this._updateFuncReact.changed}get toDestroyFunc(){return this._toDestroyFuncReact.value}set toDestroyFunc(t){this._toDestroyFuncReact.value=t}get toDestroyFuncChanged(){return this._toDestroyFuncReact.changed}get navigationMode(){return this._navigationMode.value}get navigationModeChanged(){return this._navigationMode.changed}getNavigationMode(){return this._navigationMode.value}getEngineType(){return this._typeName}get syncViewer(){return this._syncViewer.value}set syncViewer(t){this._syncViewer.value=t}get syncViewerChanged(){return this._syncViewer.changed}syncOtherViewer(t){t&&t.syncViewer&&(t.syncViewer=void 0),t===this?this._syncViewer.value=void 0:this._syncViewer.value=t}setCurrentTime(t){try{this.currentTime=typeof t=="string"?Date.parse(t):t}catch(r){console.warn(`时间格式不正确! value: ${t} error: ${r}`)}}async getVersion(){return window.g_XE3CopyRights??{}}get hoverEvent(){return this._hoverEvent}get pointerOverEvent(){return this._pointerOverEvent}get pointerMoveEvent(){return this._pointerMoveEvent}get pointerDownEvent(){return this._pointerDownEvent}get pointerUpEvent(){return this._pointerUpEvent}get pointerOutEvent(){return this._pointerOutEvent}get clickEvent(){return this._clickEvent}get dblclickEvent(){return this._dblclickEvent}get keyDownEvent(){return this._keyDownEvent}get keyUpEvent(){return this._keyUpEvent}get wheelEvent(){return this._wheelEvent}getProperties(t){return[new z("ESViewer","ESViewer",[new ie("强制刷新","重载",[],()=>this.forceRecreate(),[]),new F("debug","debug",!0,!1,[this,"debug"],Oi.defaults.debug),new F("是否可见","是否可见",!0,!1,[this,"show"]),new H("位置点单位","lonLatFormat",!0,!1,[this,"lonLatFormat"],[["度","DECIMAL_DEGREE"],["度分","DEGREES_DECIMAL_MINUTES"],["度分秒","SEXAGESIMAL_DEGREE"]]),new F("是否开启文字避让","textAvoidance",!0,!1,[this,"textAvoidance"],!1),new Z("ionAccessToken","ionAccessToken",!1,!1,[this,"ionAccessToken"]),new S("时钟","时钟",!1,!1,[this,"currentTime"]),new F("globeShow","globeShow",!0,!1,[this,"globeShow"]),new F("atmosphere","atmosphere",!1,!1,[this,"atmosphere"])]),new S("飞行像素范围","默认飞行定位时对象包围球所占的屏幕像素大小",!1,!1,[this,"flyToBoundingSize"]),new S("编辑高度偏移","编辑时默认的高度偏移",!1,!1,[this,"editingHeightOffset"]),new z("Globe","Globe",[new U("地形着色器","可以设置地形全局坡度,坡向,高程带,等高线等",!1,!1,[this,"terrainShader"])])]}get actived(){return this._actived.value}set actived(t){this._actived.value=t}get activedChanged(){return this._actived.changed}};d(Oi,"context",new S0),d(Oi,"register",Oi.context.register.bind(Oi.context)),d(Oi,"defaults",{show:!0,debug:!1,statusInfo:{fps:0,position:[0,0,0],rotation:[0,0,0],length:0},terrainShader:{slope:{show:!1},aspect:{show:!1},elevationRamp:{show:!1,minHeight:-414,maxHeight:8777,color:[]},elevationContour:{show:!1,color:[1,0,0,1],spacing:150,width:2}},globeShow:!0,splitPosition:0});let Kn=Oi;(n=>{n.createBaseProps=()=>({name:"未命名场景对象",extras:c.reactJson(void 0),devTags:c.reactArrayWithUndefined(void 0),debug:void 0,show:void 0,opacity:void 0,zIndex:void 0,useDefaultStatusDiv:!0,execOnceFuncStr:void 0,updateFuncStr:void 0,toDestroyFuncStr:void 0}),n.createCommonProps=()=>({globeShow:!0,ionAccessToken:"",lonLatFormat:"DECIMAL_DEGREE",fov:60,textAvoidance:!1,flyToBoundingSize:256,hoverTime:2,currentTime:Date.now(),simulationTime:Date.now(),timeSync:!1,rain:0,snow:0,cloud:0,fog:0,depthOfField:0,atmosphere:!0,editingPointSize:void 0,editingPointColor:c.reactArrayWithUndefined(void 0),editingAuxiliaryPointColor:c.reactArrayWithUndefined(void 0),editingLineWidth:void 0,editingLineColor:c.reactArrayWithUndefined(void 0),editingAxisSize:void 0,editingAuxiliaryPointSize:void 0,editingHeightOffset:0,editingLineShow:!0,editingEventListening:!0,terrainShader:n.defaults.terrainShader,splitPosition:c.react(void 0),rollerShutter:!1}),n.createDefaultProps=()=>({...(0,n.createBaseProps)(),...(0,n.createCommonProps)()})})(Kn||(Kn={})),c.extendClassProps(Kn.prototype,Kn.createDefaultProps);function Xp(n,e){const t=n._lastCameraInfo;if(t){const r=e.viewerChanged.don(i=>{if(!i||!t)return;const{position:s,rotation:o}=t;e.flyIn(s,o,0),n._lastCameraInfo=void 0,r()})}}const I0=n=>{const e=Kn.createCommonProps(),t={};try{Object.keys(e).forEach(r=>{t[r]=n[r]})}catch(r){console.warn(r)}return t},Hp=(n,e)=>{const t=Kn.createCommonProps();try{Object.keys(t).forEach(r=>{n[r]=e[r]})}catch(r){console.warn(r)}};class T0 extends c.Destroyable{constructor(t){super();d(this,"_viewersChanged",this.disposeVar(new c.Event));d(this,"_viewers",new Set);d(this,"_viewersToChange",this.dv(new c.Event));this._sceneObjectsManager=t,this.d(()=>{for(const r of this._viewers)this.destroyViewer(r);this._viewers.clear()}),this.viewers.forEach(r=>{const i=this._sceneObjectsManager.sceneObjects;r.add(...i)}),this.d(()=>{const r=this._sceneObjectsManager.sceneObjects;this.viewers.forEach(i=>{i.delete(...r)})}),this.d(this._sceneObjectsManager.sceneObjectsToChange.don((r,i)=>{this.viewers.forEach(s=>{i.forEach(o=>{Ji(s.devTags,o.devTags)&&(s.has(o)?console.warn(`${s.typeName}中已存${o.typeName},检查逻辑是否有问题!`):s.add(o))}),r.forEach(o=>{Ji(s.devTags,o.devTags)&&(s.has(o)?s.delete(o):console.warn(`${s.typeName}中不存在${o.typeName},检查逻辑是否有问题!`))})}),i.length>0&&i.forEach(s=>{s.d(s.devTagsChanged.don(()=>{this.viewers.forEach(o=>{o.has(s)&&o.delete(s),console.log("sceneObjectsToChange",o.devTags,s.devTags,Ji(o.devTags,s.devTags)),Ji(o.devTags,s.devTags)&&(o.has(s)?console.warn(`${o.typeName}中已存${s.typeName},检查逻辑是否有问题!`):o.add(s))})}))})})),this.d(this.viewersChanged.don((r,i)=>{const s=this._sceneObjectsManager.sceneObjects;i.forEach(o=>{for(let a of s)Ji(o.devTags,a.devTags)&&(o.has(a)?console.warn(`${o.typeName}中已存${a.typeName},检查逻辑是否有问题!`):o.add(a))}),r.forEach(o=>{for(let a of s)Ji(o.devTags,a.devTags)&&(o.has(a)?o.delete(a):console.warn(`${o.typeName}中不存在${a.typeName},检查逻辑是否有问题!`))}),i.length>0&&i.forEach(o=>{o.d(o.devTagsChanged.don(()=>{o.clearAllSceneObjects();const a=this._sceneObjectsManager.sceneObjects;for(let l of a)console.log("viewersChanged",o.devTags,l.devTags,Ji(o.devTags,l.devTags)),Ji(o.devTags,l.devTags)&&(o.has(l)?console.warn(`${o.typeName}中已存${l.typeName},检查逻辑是否有问题!`):o.add(l))}))})}))}get viewersChanged(){return this._viewersChanged}get viewers(){return this._viewers}getViewers(){return[...this._viewers]}get viewersToChange(){return this._viewersToChange}createViewer(t){const r=Kn.context.createViewer(t);return this._viewers.add(r),this._viewersChanged.emit([],[r]),r}destroyViewer(t){return t.isDestroyed()?!0:(this._viewers.delete(t),this._viewersChanged.emit([t],[]),t.destroy(),t.isDestroyed())}}class Rs extends c.Destroyable{constructor(...t){super();d(this,"_drgm",this.dv(new rp));d(this,"_sobjm",this.dv(new p0));d(this,"_vrm",this.dv(new T0(this._sobjm)));d(this,"_sceneObjectEditingManager",this.disposeVar(new d0));d(this,"_activeViewer",this.dv(c.react(void 0)));d(this,"_syncOtherViewersToActived",this.dv(c.react(!1)));d(this,"_cmrvm",this.createSceneObjectFromClass(Ms));d(this,"_cmrvmdon",this.d(()=>this._cmrvm&&this.destroySceneObject(this._cmrvm)));d(this,"_asset",{type:"ESObjectsManager",version:"0.1.0",createdTime:"",modifiedTime:"",name:"未命名项目"});d(this,"_sceneTree",this.dv(new gu("default",this.dragstartDataMananger,24,this)));d(this,"_propUiTreeManager",this.dv(new xl(24)));d(this,"_sceneTreeMap",new Map);d(this,"_viewerCreatedEvent",this.dv(new c.Event));d(this,"_lastCameraInfo");d(this,"_lastActiveViewerJson");d(this,"syncEvent",this.dv(c.createNextAnimateFrameEvent(this.activeViewerChanged,this.syncOtherViewersToActivedChanged)));d(this,"_syncEventDon",this.d(this.syncEvent.don(()=>{const t=this.syncOtherViewersToActived;this.viewers.forEach(r=>{t?r.syncOtherViewer(this.activeViewer):r.syncOtherViewer(void 0)})})));d(this,"_player",this.createSceneObjectFromClass(Qi));d(this,"_playerdon",this.d(()=>this._player&&this.destroySceneObject(this._player)));d(this,"_esPlyarAndPathTime",this.dv(new a0(this)));d(this,"_pathAnimationManager",this.dv(new u0(this)))}static get envs(){return j.context.environmentVariables}getSceneObjectById(t){return j.getSceneObjectById(t)}getSceneObject(t){return j.getSceneObject(t)}get $refs(){return j.$refs}get dragstartDataMananger(){return this._drgm}get sceneObjectsManager(){return this._sobjm}get viewers(){return this._vrm.viewers}getViewers(){return this._vrm.getViewers()}get sceneObjectEditingManager(){return this._sceneObjectEditingManager}get activeViewer(){return this._activeViewer.value}set activeViewer(t){this._activeViewer.value=t}get activeViewerChanged(){return this._activeViewer.changed}get syncOtherViewersToActived(){return this._syncOtherViewersToActived.value}set syncOtherViewersToActived(t){this._syncOtherViewersToActived.value=t}get syncOtherViewersToActivedChanged(){return this._syncOtherViewersToActived.changed}get cameraViewsManager(){return this._cmrvm}get json(){var f;const t=this._asset.createdTime||new Date().toISOString(),r=new Date().toISOString(),i=this._asset.name||"未命名项目",o={type:"ESObjectsManager",version:this._asset.version||"0.1.0",createdTime:t,modifiedTime:r,name:i},a=this.sceneTree.json,l=this._cmrvm.views,u=[...this._vrm.viewers].map(p=>p.json),h=(f=this.activeViewer)==null?void 0:f.getCurrentCameraInfo();return{asset:o,viewers:u,sceneTree:a,viewCollection:l,lastView:h}}set json(t){try{if(!t.asset)return;if(!t.asset.type||t.asset.type!=="ESObjectsManager"){console.warn("json装配失败! asset.type 不存在或者不是'ESObjectsManager'");return}if(this._asset.createdTime=t.asset&&t.asset.createdTime||new Date().toISOString(),this._asset.modifiedTime=t.asset&&t.asset.modifiedTime||"",this._asset.name=t.asset&&t.asset.name||"未命名项目",this._asset.version=t.asset&&t.asset.version||"0.1.0",t.sceneTree&&(this.sceneTree.json=t.sceneTree),t.viewCollection&&(this._cmrvm.views=t.viewCollection),!t.viewers||!Array.isArray(t.viewers)){console.warn("viewers is not an array or does not exist !");return}if(this._vrm.viewers.size===0||t.viewers.length===0){console.warn("viewers is empty !");return}this._vrm.viewers.forEach(r=>{const i=t.viewers.find(s=>s.id===r.id);i&&(r.json=i)})}catch(r){console.error(`ESObjectsManager解析json数据时发生错误! error: ${r}`)}}get sceneTree(){return this._sceneTree}get jsonLoadingEvent(){return this._sceneTree.jsonLoadingEvent}get propUiTreeManager(){return this._propUiTreeManager}propTreeCallback(t){return c0(this,t)}getSceneTrees(){return[...this._sceneTreeMap.values()]}getSceneTree(t="default"){if(t==="default")return this._sceneTree;if(!this._sceneTreeMap.has(t)){console.warn(`id为${t}的SceneTree不存在!`);return}return this._sceneTreeMap.get(t)}createSceneTree(t,r=24){if(this._sceneTreeMap.has(t)||t==="default")console.warn(`id为${t}的SceneTree已存在!`);else{const i=this.dv(new gu(t,this.dragstartDataMananger,r,this));this._sceneTreeMap.set(t,i)}return this.getSceneTree(t)}get viewerCreatedEvent(){return this._viewerCreatedEvent}createViewer(t){const r=this._vrm.createViewer(t);this.activeViewer||(this.activeViewer=r);const i=this.d(r.viewerChanged.don(s=>{s&&(this._viewerCreatedEvent.emit(r),i())}));return r}destroyViewer(t){return this._activeViewer.value===t&&(this._activeViewer.value=void 0),this._vrm.destroyViewer(t)}switchViewer(t,r=!0,i=!0,s=!0){var u;this.activeViewer&&this.activeViewer.getNavigationMode()!=="Map"&&this.activeViewer.changeToMap(),!this._lastCameraInfo&&r&&(this._lastCameraInfo=(u=this.activeViewer)==null?void 0:u.getCurrentCameraInfo()),!this._lastActiveViewerJson&&i&&(this._lastActiveViewerJson=this.activeViewer?I0(this.activeViewer):void 0),s&&this.activeViewer&&this.destroyViewer(this.activeViewer);const o=t.id,a=o?[...this.getViewers()].find(h=>h.id===o):[...this.getViewers()].find(h=>h.typeName===t.type);if(a)if(o&&a.typeName!==t.type)console.warn(`id为${o}的viewer的typeName和option.type${t.type}不相同!,虽然id一致但是typeName不同,所以会销毁并创建新的viewer`),this.destroyViewer(a);else return console.log("ESViewer exists, will be used"),r&&Xp(this,a),i&&this._lastActiveViewerJson&&(Hp(a,this._lastActiveViewerJson),this._lastActiveViewerJson=void 0),a.container===zp(t.container)?(a.containerOrId=t.container,a.forceRecreate()):a.containerOrId=t.container,this.activeViewer=a,a;console.log("No ESViewer exists, will be created");const l=this.createViewer(t);return console.log(t),console.log(this),r&&Xp(this,l),i&&this._lastActiveViewerJson&&(Hp(l,this._lastActiveViewerJson),this._lastActiveViewerJson=void 0),this.activeViewer=l,l}switchToCesiumViewer(...t){if(typeof t[0]=="object"&&!(t[0]instanceof HTMLDivElement)){const{container:r,viewSync:i,attributeSync:s,destroy:o,id:a}=t[0];return this.switchViewer({type:"ESCesiumViewer",container:r,id:a},i??!0,s??!0,o??!0)}else if(typeof t[0]=="string"||t[0]instanceof HTMLDivElement){const r={container:t[0],viewSync:t[1]??!0,attributeSync:t[2]??!0,destroy:t[3]??!0,id:t[4]},{container:i,viewSync:s,attributeSync:o,destroy:a,id:l}=r;return this.switchViewer({type:"ESCesiumViewer",container:i,id:l},s,o,a)}}switchToUEViewer(...t){let r,i={viewSync:!0,attributeSync:!0,destroy:!0};if(typeof t[0]=="object"&&!(t[0]instanceof HTMLDivElement)&&t[0].hasOwnProperty("uri")){const{container:l,uri:u,app:h,token:f,viewSync:p,attributeSync:v,destroy:w,id:I}=t[0];r={type:"ESUeViewer",container:l,id:I,options:{uri:u,app:h,token:f}},i={viewSync:p??!0,attributeSync:v??!0,destroy:w??!0}}else if(typeof t[0]=="object"&&!(t[0]instanceof HTMLDivElement)&&t[0].hasOwnProperty("ws")){const{container:l,ws:u,esmsg:h,viewSync:f,attributeSync:p,id:v,destroy:w}=t[0];r={type:"ESUeViewer",container:l,id:v,options:{ws:u,esmsg:h}},i={viewSync:f??!0,attributeSync:p??!0,destroy:w??!0}}else if(typeof t[0]=="object"&&!(t[0]instanceof HTMLDivElement)&&t[0].hasOwnProperty("project")){const{container:l,project:u,baseUrl:h,viewSync:f,attributeSync:p,id:v,destroy:w}=t[0];r={type:"ESUeViewer",container:l,id:v,options:{project:u,baseUrl:h}},i={viewSync:f??!0,attributeSync:p??!0,destroy:w??!0}}else(typeof t[0]=="string"||t[0]instanceof HTMLDivElement)&&(typeof t[1]=="string"&&t[1].startsWith("ws")?(r={type:"ESUeViewer",container:t[0],id:t[6],options:{ws:t[1],esmsg:t[2]??void 0}},i={viewSync:t[3]??!0,attributeSync:t[4]??!0,destroy:t[5]??!0}):typeof t[1]=="string"&&t[1].startsWith("http")?(r={type:"ESUeViewer",container:t[0],id:t[7],options:{uri:t[1],app:t[2],token:t[3]??void 0}},i={viewSync:t[4]??!0,attributeSync:t[5]??!0,destroy:t[6]??!0}):(r={type:"ESUeViewer",container:t[0],id:t[6],options:{project:t[1],baseUrl:t[2]??void 0}},i={viewSync:t[3]??!0,attributeSync:t[4]??!0,destroy:t[5]??!0}));if(!r)throw new Error("参数错误");const{viewSync:s,attributeSync:o,destroy:a}=i;return this.switchViewer(r,s,o,a)}createCesiumViewer(...t){let r;if(typeof t[0]=="object"&&!(t[0]instanceof HTMLDivElement)?r={...t[0],type:"ESCesiumViewer"}:(typeof t[0]=="string"||t[0]instanceof HTMLDivElement)&&(r={container:t[0],options:t[1]??void 0,id:t[2]??void 0,type:"ESCesiumViewer"}),!r)throw new Error("参数错误");return this.createViewer(r)}createOpenLayersViewer(...t){let r;if(typeof t[0]=="object"&&!(t[0]instanceof HTMLDivElement)?r={...t[0],type:"ESOlViewer"}:(typeof t[0]=="string"||t[0]instanceof HTMLDivElement)&&(r={container:t[0],options:t[1]??void 0,id:t[2]??void 0,type:"ESOlViewer"}),!r)throw new Error("参数错误");return this.createViewer(r)}createUeViewer(...t){let r;if(typeof t[0]=="object"&&!(t[0]instanceof HTMLDivElement)?r={...t[0],type:"ESUeViewer"}:(typeof t[0]=="string"||t[0]instanceof HTMLDivElement)&&(typeof t[1]=="string"&&t[1].startsWith("ws")?r={type:"ESUeViewer",container:t[0],id:t[3]??void 0,options:{ws:t[1],esmsg:t[2]??void 0}}:typeof t[1]=="string"&&t[1].startsWith("http")?r={type:"ESUeViewer",container:t[0],id:t[4]??void 0,options:{uri:t[1],app:t[2],token:t[3]??void 0}}:r={type:"ESUeViewer",container:t[0],id:t[3]??void 0,options:{project:t[1],baseUrl:t[2]??void 0}}),!r)throw new Error("参数错误");return this.createViewer(r)}createSceneObject(t,r){return this._sobjm.createSceneObject(t,r)}createSceneObjectFromClass(t,r){return this._sobjm.createSceneObjectFromClass(t,r)}createSceneObjectFromJson(t){return this._sobjm.createSceneObjectFromJson(t)}destroySceneObject(t){const r=this._sobjm.deleteSceneObject(t);return t.destroy(),r}destroyAllSceneObjects(){const t=[...this._sobjm.sceneObjects];for(let r of t)r!=this._player&&r!=this._cmrvm&&this.destroySceneObject(r)}get player(){return this._player}get esPlyarAndPathTime(){return this._esPlyarAndPathTime}get pathAnimationManager(){return this._pathAnimationManager}}d(Rs,"getSceneObjById",j.context.getSceneObjectById.bind(j.context)),d(Rs,"getEnv",j.context.getEnv.bind(j.context)),d(Rs,"setEnv",j.context.setEnv.bind(j.context)),(n=>{n.createDefaultProps=()=>({})})(Rs||(Rs={})),c.extendClassProps(Rs.prototype,Rs.createDefaultProps);function D0(){const n=navigator.userAgent;let e="Unknown";/Windows/.test(n)?e="Windows":/Macintosh/.test(n)?e="MacOS":/Linux/.test(n)?e="Linux":/Android/.test(n)?e="Android":/iOS|iPhone|iPad|iPod/.test(n)&&(e="iOS");let t="Unknown";return/x64|x86_64|Win64|WOW64/.test(n)?t="x64":/x86|i686|Win32/.test(n)?t="x86":/arm64|aarch64/.test(n)?t="arm64":/arm/.test(n)&&(t="arm"),{os:e.toLocaleLowerCase(),arch:t.toLocaleLowerCase()}}const N0=Date.now();function Yp(n){const{os:e,arch:t}=D0(),r={version:n.version,commitdate:n.date,commitId:n.commitId,runningTime:(Date.now()-N0)/1e3/60|0,date:new Date().toLocaleString(),href:window.location.href,os:e,arch:t},s={method:"GET",headers:new Headers,redirect:"follow"},o=window.encodeURIComponent(JSON.stringify(r));fetch(`https://account.bjxbsj.cn/api/product/record?product=EarthSDKJS&content=${o}`,s).then(a=>a.text()).then(a=>console.log(a)).catch(a=>console.log("error",a))}P.copyright=void 0;try{const n="earthsdk3",e="3.4.0-beta.2",t="2025-08-14T08:11:21.000Z",r="北京西部世界科技有限公司",i="地球可视化实验室 (EarthSDK&CesiumLab) https://www.bjxbsj.cn",s="a3b0df3a552ad071e85ae0e6e20e36434c30ffab",a=((Date.now()-1755159081e3)/36e5).toFixed(1),l=`%c🌏 ${n}%c ${e}.${s.slice(0,8)}.${t} (距今${a}个小时)
470
+ `,P_='<svg t="1747028305766" class="icon" viewBox="0 0 1032 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="3881" width="40" height="40"><path d="M0.1536 547.700736c-0.205824-0.187392-0.205824-0.49152 0.008192-0.68608l80.672768-73.590784a0.63488 0.63488 0 0 1 0.7936-0.029696l263.043072 203.0336c0.667648 0.515072 1.738752 0.498688 2.393088-0.038912l609.191936-500.133888a0.605184 0.605184 0 0 1 0.768 0.022528l74.84928 67.229696a0.454656 0.454656 0 0 1-0.002048 0.685056l-685.234176 618.19904a1.14688 1.14688 0 0 1-1.518592-0.012288L0.1536 547.700736z" fill="#ffffff" p-id="3882"></path></svg>',N_='<svg t="1747028398107" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1146" width="40" height="40"><path d="M415.744006 1.033277A0.992256 0.992256 0 0 1 416.747526 0.000061h189.5045c0.569344 0 1.017856 0.45056 1.001472 1.033216l-21.227518 754.803667a1.062912 1.062912 0 0 1-1.05984 1.032192h-146.933752c-0.569344 0-1.04448-0.45056-1.059839-1.032192L415.744006 1.033277zM511.510528 1024c-52.595709 0-95.231994-39.866366-95.231994-89.043963 0-49.176573 42.636285-89.042939 95.231994-89.042938 52.594685 0 95.231994 39.866366 95.231994 89.042938 0 49.177597-42.637309 89.043963-95.231994 89.043963z" fill="#ffffff" p-id="1147"></path></svg>',$s=class $s extends h.Destroyable{constructor(t){super();const e=()=>{const r=this.dv(new tl);this.d(h.track([r,"show"],[t,"useDefaultStatusDiv"]));{const i=()=>{r.show=(t.useDefaultStatusDiv??!0)&&t.status!=="Created"};i(),this.d(t.useDefaultStatusDivChanged.don(i)),this.d(t.statusChanged.don(i)),r.cssText="width:100%;height:100%;position:absolute;left:0px;top:0px;"}t.add(r),this.d(()=>t.delete(r)),r.instanceClass=class extends h.Destroyable{constructor(o,a,u){super();d(this,"_div",document.createElement("div"));if(this._subContainer=o,!u)return;this._subContainer.appendChild(this._div),this.d(()=>this._subContainer.removeChild(this._div));{const w=()=>{a.show?this._div.style.opacity="1":this._div.style.opacity="0"};w(),this.d(a.showChanged.don(w))}let l,c,f,p,v;this._div.style.pointerEvents="none",this._div.style.position="absolute",this._div.style.width="100%",this._div.style.height="100%",this._div.style.backgroundColor="rgba(0, 0, 0, 0.4)",this._div.style.zIndex="100",this._div.style.transition="opacity 2s",l=document.createElement("div"),this._div.appendChild(l),l.style.width="auto",l.style.position="absolute",l.style.left="50%",l.style.top="50%",l.style.transform="translate(-50%,-50%)",l.style.background="rgba(120, 120, 0, 0.7)",l.style.color="white",l.style.fontSize="10px",l.style.background="none",l.style.display="flex",l.style.justifyContent="center",l.style.alignItems="center",c=document.createElement("div"),l.appendChild(c),c.style.pointerEvents="none",c.style.display="block",c.style.width="40px",c.innerHTML=$s.defaultsSvg.loadingSvg,c.style.filter="drop-shadow(0px 0px 1px black)",f=document.createElement("div"),l.appendChild(f),f.style.pointerEvents="none",f.style.marginLeft="10px",f.style.display="flex",f.style.flexFlow="column",f.style.maxWidth="300px",p=document.createElement("div"),f.appendChild(p),p.style.fontSize="14px",p.style.fontWeight="800",p.style.marginBottom="5px",p.style.textShadow="0 0 2px black",v=document.createElement("div"),f.appendChild(v),v.style.fontWeight="400",v.style.textShadow="0 0 2px black";{const w=()=>{let P="Raw";u.status==="Raw"?P="初始状态":u.status==="Creating"?P="正在创建":u.status==="Created"?P="创建完成":u.status==="Error"?P="创建失败":u.status==="Reconnecting"&&(P="重新连接"),p.innerText=`${P}(${u.status})`,v.innerText=`${u.statusLog}`,(u.status==="Creating"||u.status==="Reconnecting")&&(c.innerHTML=$s.defaultsSvg.loadingSvg),u.status==="Created"&&(c.innerHTML=$s.defaultsSvg.successSvg),u.status==="Error"&&(c.innerHTML=$s.defaultsSvg.warnSvg)};w();const I=this.dv(h.createNextAnimateFrameEvent(u.statusLogChanged,u.statusChanged));this.d(I.don(w))}}update(){const o=255*Math.random()|0,a=255*Math.random()|0,u=255*Math.random()|0;this._div.style.background=`rgba(${o}, ${a}, ${u}, 0.8)`}}};this.d(t.containerChanged.don(()=>{e()}))}};d($s,"defaultsSvg",{loadingSvg:I_,successSvg:P_,warnSvg:N_});let Fh=$s;class b_ extends h.Destroyable{constructor(t,e,r){super(),this._subContainer=t,this._overlayContainer=e,this._viewer=r;const i=this._subContainer,s=this._overlayContainer,o=this._viewer,a=()=>{const c=o.zIndex??"";i.style.zIndex=c,s.style.zIndex=c};a(),this.d(o.zIndexChanged.don(a));const u=()=>{i.style.display=o.show??!0?"block":"none"};u(),this.d(o.showChanged.don(u));const l=()=>{i.style.opacity=`${o.opacity??1}`};l(),this.d(o.opacityChanged.don(l))}}function il(n){let t=h.getExtProp(n,"_relativeContainer");return t||(t=document.createElement("div"),t.style.position="relative",t.style.width="100%",t.style.height="100%",t.style.padding="0",t.style.margin="0",n.appendChild(t),h.setExtProp(n,"_relativeContainer",t)),t}class T_ extends h.Destroyable{constructor(e,r){super();d(this,"_subContainer",document.createElement("div"));d(this,"_overlayContainer",document.createElement("div"));d(this,"_containerStyleController");this._container=e,this._viewer=r,this._containerStyleController=this.dv(new b_(this._subContainer,this._overlayContainer,this._viewer));const{subContainer:i,overlayContainer:s}=this;i.tabIndex=-1,i.style.outline="none",i.style.width="100%",i.style.height="100%",i.onpointerdown=()=>i.focus(),s.style.position="relative",s.setAttribute("earthsdk3","earthsdk3-overlayContainer"),i.setAttribute("earthsdk3","earthsdk3-subContainer"),il(this._container).appendChild(i),this.d(()=>il(this._container).removeChild(i)),il(this._container).appendChild(s),this.d(()=>il(this._container).removeChild(s))}get subContainer(){return this._subContainer}get overlayContainer(){return this._overlayContainer}get containerStyleController(){return this._containerStyleController}get container(){return this._container}}class O_ extends h.Destroyable{constructor(){super(...arguments);d(this,"registerObjsMap",new Map)}register(e,r){return this.registerObjsMap.has(e)&&console.warn(`register warn:${e}已经被注册,再次注册会覆盖。`),this.registerObjsMap.set(e,r),e}getViewerConstructor(e){const r=this.registerObjsMap.get(e);if(!r){console.warn(`未找到${e}类!`);return}return r}createViewer(e){const r=e.type;console.log(e);const i=this.getViewerConstructor(r);if(!i)throw new Error(`没有找到类型为${r}的Viewer构造器!`);return new i(e)}}class Yp extends h.Destroyable{constructor(t,e,r=!1,i=!1){if(super(),this._viewer=t,!e)throw new Error("ViewerCustomInteraction: container is null");const s=this.dv(h.DomElementEvent.create(e,"pointerdown")),o=this.dv(h.DomElementEvent.create(e,"pointermove")),a=this.dv(h.DomElementEvent.create(e,"pointerup")),u=this.dv(h.DomElementEvent.create(e,"pointerout")),l=this.dv(h.DomElementEvent.create(e,"pointerover")),c=this.dv(new h.PointerClick),f=this.dv(new h.PointerHover),p=()=>{const g=this._viewer.hoverTime*1e3;f.delayTime=g};this.d(this._viewer.hoverTimeChanged.don(()=>{p()})),this.d(s.don(g=>c.pointerDown(g))),this.d(o.don(g=>c.pointerMove(g))),this.d(a.don(g=>c.pointerUp(g))),this.d(u.don(g=>c.pointerOut(g))),this.d(s.don(g=>f.pointerDown(g))),this.d(o.don(g=>f.pointerMove(g))),this.d(a.don(g=>f.pointerUp(g))),this.d(u.don(g=>f.pointerOut(g)));const{x:v,y:w}=e.getBoundingClientRect(),I=i?v:0,P=i?w:0;this.d(f.hoverEvent.don(g=>{const[y,E]=h.getDomEventCurrentTargetPos(g,r);this._viewer.hoverEvent.emit({screenPosition:[y+I,E+P],pointerEvent:g})})),this.d(c.clickEvent.don(g=>{const[y,E]=h.getDomEventCurrentTargetPos(g,r);this._viewer.clickEvent.emit({screenPosition:[y+I,E+P],pointerEvent:g})})),this.d(c.dbclickEvent.don(g=>{const[y,E]=h.getDomEventCurrentTargetPos(g,r);g.button===0&&this._viewer.dblclickEvent.emit({screenPosition:[y+I,E+P],pointerEvent:g})})),this.d(s.don(g=>{const[y,E]=h.getDomEventCurrentTargetPos(g,r);g.button===0&&this._viewer.pointerDownEvent.emit({screenPosition:[y+I,E+P],pointerEvent:g})})),this.d(a.don(g=>{const[y,E]=h.getDomEventCurrentTargetPos(g,r);g.button===0&&this._viewer.pointerUpEvent.emit({screenPosition:[y+I,E+P],pointerEvent:g})})),this.d(o.don(g=>{const[y,E]=h.getDomEventCurrentTargetPos(g,r);this._viewer.pointerMoveEvent.emit({screenPosition:[y+I,E+P],pointerEvent:g})})),this.d(l.don(g=>{const[y,E]=h.getDomEventCurrentTargetPos(g,r);this._viewer.pointerOverEvent.emit({screenPosition:[y+I,E+P],pointerEvent:g})})),this.d(u.don(g=>{const[y,E]=h.getDomEventCurrentTargetPos(g,r);this._viewer.pointerOutEvent.emit({screenPosition:[y+I,E+P],pointerEvent:g})}));const M=this.dv(h.DomElementEvent.create(e,"keydown"));this.d(M.don(g=>this._viewer.keyDownEvent.emit(g)));const m=this.dv(h.DomElementEvent.create(e,"keyup"));this.d(m.don(g=>this._viewer.keyUpEvent.emit(g)));const _=this.dv(h.DomElementEvent.create(e,"wheel"));this.d(_.don(g=>this._viewer.wheelEvent.emit(g)))}}class D_ extends h.Destroyable{constructor(e){super();d(this,"viewer");const r=this.viewer=e;this.ad(new h.ObjResettingWithEvent(r.rollerShutterChanged,()=>{const i=r.container;if(!i||!r.rollerShutter)return;const s=new h.Destroyable;this.viewer.splitPosition=.5;let o=this.getRollerShutterDIV();return i.appendChild(o),s.d(()=>{this.viewer.splitPosition=0,i.removeChild(o)}),s}))}getRollerShutterDIV(){let e=document.createElement("div");e.style.position="absolute",e.style.left="50%",e.style.top="0",e.style.backgroundColor="#d3d3d3",e.style.width="5px",e.style.height="100%",e.style.zIndex="9999";const r=i=>{if(!e.parentElement)return;i.preventDefault?i.preventDefault():i.returnValue=!1;const o=i.x/e.parentElement.offsetWidth;e.style.left=`${100*o}%`,this.viewer.splitPosition=o};return e.addEventListener("mouseenter",i=>{e.style.cursor="ew-resize"}),e.addEventListener("mouseleave",i=>{e.style.cursor="default"}),e.addEventListener("mousedown",i=>{e.style.cursor="ew-resize",document.addEventListener("mousemove",r)}),document.addEventListener("mouseup",i=>{e.style.cursor="default",document.removeEventListener("mousemove",r)}),e}}class M_ extends h.Destroyable{constructor(e){super();d(this,"rollerShutterAnalysis");this.rollerShutterAnalysis=this.ad(new D_(e))}}const Ai=class Ai extends h.Destroyable{constructor(e){super();d(this,"_forceRecreateEvent",this.dv(new h.Event));d(this,"_container",this.dv(h.react(void 0)));d(this,"_containerSize",this.dv(h.react(void 0)));d(this,"_editingEvent",this.disposeVar(new h.Event));d(this,"_status",this.dv(h.react("Raw")));d(this,"_statusLog",this.dv(h.react("")));d(this,"_statusContainer",this.dv(new Fh(this)));d(this,"_useCustomInteraction",this.dv(h.react(!0)));d(this,"_resetInteractionEvent",this.dv(h.createNextAnimateFrameEvent(this.containerChanged,this._useCustomInteraction.changed,this._forceRecreateEvent)));d(this,"_interactionResetting",this.dv(new h.ObjResettingWithEvent(this._resetInteractionEvent,()=>{if(!(!this.container||!this._useCustomInteraction.value))return new Yp(this,this.container)})));d(this,"_viewerChanged",this.dv(new h.Event));d(this,"_containerResetEvent",this.dv(h.createNextAnimateFrameEvent(this.containerChanged,this._forceRecreateEvent)));d(this,"_containerResetting",this.dv(new h.ObjResettingWithEvent(this._containerResetEvent,()=>{if(this.container)return new T_(this.container,this)})));d(this,"_sceneObjectsMap",new Map);d(this,"_id");d(this,"_typeName");d(this,"_updateFuncReact",this.dv(h.react(void 0)));d(this,"_toDestroyFuncReact",this.dv(h.react(void 0)));d(this,"_statusInfo",Ai.defaults.statusInfo);d(this,"_navigationMode",this.dv(h.react("Map")));d(this,"_syncViewer",this.dv(h.react(void 0)));d(this,"_syncEventDon",this.dv(new h.ObjResettingWithEvent(this.syncViewerChanged,()=>{const e=this.syncViewer;if(e)return new C_(this,e)})));d(this,"_timeSyncdon",this.dv(new h.ObjResettingWithEvent(this.timeSyncChanged,()=>{if(this.timeSync)return new S_(this)})));d(this,"_hoverEvent",this.dv(new h.Event));d(this,"_pointerOverEvent",this.dv(new h.Event));d(this,"_pointerMoveEvent",this.dv(new h.Event));d(this,"_pointerDownEvent",this.dv(new h.Event));d(this,"_pointerUpEvent",this.dv(new h.Event));d(this,"_pointerOutEvent",this.dv(new h.Event));d(this,"_clickEvent",this.dv(new h.Event));d(this,"_dblclickEvent",this.dv(new h.Event));d(this,"_keyDownEvent",this.dv(new h.Event));d(this,"_keyUpEvent",this.dv(new h.Event));d(this,"_wheelEvent",this.dv(new h.Event));d(this,"_actived",this.dv(h.react(!1)));this._id=e.id??h.createGuid();const r=Gp(e.container);if(r)this._container.value=Rh(r),this._typeName=e.type,this._initName();else throw new Error("container is not defined");{const i=()=>{r&&(this.show??!0?r.style.display="block":r.style.display="none")};i(),this.d(this.showChanged.don(i))}{const i=this._sceneObjectsMap,s=()=>{for(let[a,u]of i.entries())if(!u&&a){const l=ds.context.createEngineObject(a,this);l&&i.set(a,l)}},o=()=>{for(let[a,u]of i.entries())u&&!u.isDestroyed()&&u.destroy(),i.set(a,void 0)};this.d(o),this.d(this.viewerChanged.don(a=>{o(),a&&s()}))}{const i=()=>{if(this.execOnceFuncStr)try{Function(`"use strict";return (${this.execOnceFuncStr})`)()(this)}catch(s){console.warn(`execOnceFuncStr不能转成函数!或者函数执行时错误!id: ${this.id} ${this.typeName} error: ${s}`)}};i(),this.d(this.execOnceFuncStrChanged.don(i))}{const i=()=>{if(this.updateFuncStr)try{this.updateFunc=Function(`"use strict";return (${this.updateFuncStr})`)()}catch(o){console.warn(`updateFuncStr不能转成函数!或者函数执行时错误!id: ${this.id} ${this.typeName} error: ${o}`)}};i(),this.d(this.updateFuncStrChanged.don(i));let s;this.d(()=>s&&s.destroy()),this.d(this.updateFuncChanged.don(()=>{s&&s.cancel(),this.updateFunc&&(s=s||h.createAnimateFrame(),s.restart(void 0,o=>{this.updateFunc&&this.updateFunc(this,o)}))}))}{const i=()=>{try{this.toDestroyFunc=this.toDestroyFuncStr&&Function(`"use strict";return (${this.toDestroyFuncStr})`)()||void 0}catch(s){console.warn(`toDestroyFuncStr不能转成函数!或者函数执行时错误!id: ${this.id} ${this.typeName} error: ${s}`),this.toDestroyFunc=void 0}};i(),this.d(this.toDestroyFuncStrChanged.don(i)),this.d(this.toDestroyEvent.don(()=>{this.toDestroyFunc&&this.toDestroyFunc(this)}))}this.ad(new M_(this))}forceRecreate(){this._forceRecreateEvent.emit()}get container(){return this._container.value}set container(e){this._container.value=e}set containerOrId(e){if(typeof e=="string"){const r=document.getElementById(e);r&&r instanceof HTMLDivElement?this._container.value=Rh(r):console.warn("containerOrId warn: !(container instanceof HTMLDivElement)")}else e instanceof HTMLDivElement?this._container.value=Rh(e):console.warn("containerOrId warn: setting container failed!")}get containerChanged(){return this._container.changed}get containerSize(){return this._containerSize.value}set containerSize(e){this._containerSize.value=e}get containerSizeChanged(){return this._containerSize.changed}get editingEvent(){return this._editingEvent}get status(){return this._status.value}get statusChanged(){return this._status.changed}setStatus(e){this._status.value=e}get statusLog(){return this._statusLog.value}get statusLogChanged(){return this._statusLog.changed}setStatusLog(e){this._statusLog.value=e}get useCustomInteraction(){return this._useCustomInteraction.value}set useCustomInteraction(e){this._useCustomInteraction.value=e}get viewerChanged(){return this._viewerChanged}get containerResetEvent(){return this._containerResetEvent}get subContainer(){var e;return(e=this._containerResetting.obj)==null?void 0:e.subContainer}get subContainerChanged(){return this._containerResetting.objChanged}get overlayContainer(){var e;return(e=this._containerResetting.obj)==null?void 0:e.overlayContainer}get overlayContainerChanged(){return this._containerResetting.objChanged}get sceneObjectsMap(){return this._sceneObjectsMap}get sceneObjects(){return this._sceneObjectsMap.keys()}getEngineObject(e){return this.sceneObjectsMap.get(e)}add(...e){for(let r of e)if(!this.has(r)){$.context.addSceneObject(r);const i=ds.context.createEngineObject(r,this);i&&this._sceneObjectsMap.set(r,i),r.viewerAttached.emit(this)}}delete(...e){for(let r of e)if(this.has(r)){const i=this._sceneObjectsMap.get(r);i&&i.destroy(),$.context.deleteSceneObject(r),this._sceneObjectsMap.delete(r),r.viewerDetached.emit(this)}}disposableAdd(...e){return this.add(...e),()=>this.delete(...e)}disAdd(...e){return this.disposableAdd(...e)}has(e){return this._sceneObjectsMap.has(e)}clearAllSceneObjects(){for(let e of this.sceneObjects)this.delete(e)}get id(){return this._id}set id(e){console.warn("ESViewer id is readonly")}get typeName(){return this._typeName}_initName(){this.name=`${this.typeName}_${(""+this.id).slice(-4)}`}get defaultProps(){return Ai.createDefaultProps()}_getJson(e=!0){const r={id:this.id,type:this.typeName};for(let i of Object.keys(this.defaultProps))if(e){let s,o=this.defaultProps[i];o instanceof h.ReactiveVariable?s=o.equals(this[i]):s=o===this[i],s||(r[i]=this[i])}else r[i]=this[i];return r}_setJson(e,r,i){if(!(e instanceof Object)||e.type&&e.type!==this.typeName){console.error(`value.type && value.type${e.type} !== this.typeName${this.typeName}`);return}e.id&&e.id!==this.id&&console.warn(`value.id === undefined || value.id${e.id} !== this.id(${this.id})`);const s=r||[];s.push("id","type");const o=Object.keys(this.defaultProps).filter(a=>!s.includes(a));for(let a of o)if(a in e)this[a]=e[a]===null?void 0:e[a];else if(!(i??!1)){let u=this.defaultProps[a];u instanceof h.ReactiveVariable&&(u=u.value),this[a]=u}}get json(){return this._getJson()}set json(e){this._setJson(e,["devTags"])}get updateFunc(){return this._updateFuncReact.value}set updateFunc(e){this._updateFuncReact.value=e}get updateFuncChanged(){return this._updateFuncReact.changed}get toDestroyFunc(){return this._toDestroyFuncReact.value}set toDestroyFunc(e){this._toDestroyFuncReact.value=e}get toDestroyFuncChanged(){return this._toDestroyFuncReact.changed}get navigationMode(){return this._navigationMode.value}get navigationModeChanged(){return this._navigationMode.changed}getNavigationMode(){return this._navigationMode.value}getEngineType(){return this._typeName}get syncViewer(){return this._syncViewer.value}set syncViewer(e){this._syncViewer.value=e}get syncViewerChanged(){return this._syncViewer.changed}syncOtherViewer(e){e&&e.syncViewer&&(e.syncViewer=void 0),e===this?this._syncViewer.value=void 0:this._syncViewer.value=e}setCurrentTime(e){try{this.currentTime=typeof e=="string"?Date.parse(e):e}catch(r){console.warn(`时间格式不正确! value: ${e} error: ${r}`)}}async getVersion(){return window.g_XE3CopyRights??{}}get hoverEvent(){return this._hoverEvent}get pointerOverEvent(){return this._pointerOverEvent}get pointerMoveEvent(){return this._pointerMoveEvent}get pointerDownEvent(){return this._pointerDownEvent}get pointerUpEvent(){return this._pointerUpEvent}get pointerOutEvent(){return this._pointerOutEvent}get clickEvent(){return this._clickEvent}get dblclickEvent(){return this._dblclickEvent}get keyDownEvent(){return this._keyDownEvent}get keyUpEvent(){return this._keyUpEvent}get wheelEvent(){return this._wheelEvent}get actived(){return this._actived.value}set actived(e){this._actived.value=e}get activedChanged(){return this._actived.changed}getESProperties(){return{defaultMenu:"general",basic:[],general:[],dataSource:[],location:[],coordinate:[],style:[],more:[]}}getProperties(e){const r={...this.getESProperties()},i=[];return r.general.length>0&&i.push(new rt(r.general,"general")),Object.keys(r).forEach(s=>{s!=="defaultMenu"&&s!=="general"&&r[s].length>0&&i.push(new rt(r[s],s))}),i}};d(Ai,"context",new O_),d(Ai,"register",Ai.context.register.bind(Ai.context)),d(Ai,"defaults",{show:!0,debug:!1,statusInfo:{fps:0,position:[0,0,0],rotation:[0,0,0],length:0},terrainShader:{slope:{show:!1},aspect:{show:!1},elevationRamp:{show:!1,minHeight:-414,maxHeight:8777,color:[]},elevationContour:{show:!1,color:[1,0,0,1],spacing:150,width:2}},globeShow:!0,splitPosition:0});let Mn=Ai;(n=>{n.createBaseProps=()=>({name:"未命名场景对象",extras:h.reactJson(void 0),devTags:h.reactArrayWithUndefined(void 0),debug:void 0,show:void 0,opacity:void 0,zIndex:void 0,useDefaultStatusDiv:!0,execOnceFuncStr:void 0,updateFuncStr:void 0,toDestroyFuncStr:void 0}),n.createCommonProps=()=>({globeShow:!0,ionAccessToken:"",lonLatFormat:"DECIMAL_DEGREE",fov:60,textAvoidance:!1,flyToBoundingSize:256,hoverTime:2,currentTime:Date.now(),simulationTime:Date.now(),timeSync:!1,rain:0,snow:0,cloud:0,fog:0,depthOfField:0,atmosphere:!0,editingPointSize:void 0,editingPointColor:h.reactArrayWithUndefined(void 0),editingAuxiliaryPointColor:h.reactArrayWithUndefined(void 0),editingLineWidth:void 0,editingLineColor:h.reactArrayWithUndefined(void 0),editingAxisSize:void 0,editingAuxiliaryPointSize:void 0,editingHeightOffset:0,editingLineShow:!0,editingEventListening:!0,terrainShader:n.defaults.terrainShader,splitPosition:h.react(void 0),rollerShutter:!1}),n.createDefaultProps=()=>({...(0,n.createBaseProps)(),...(0,n.createCommonProps)()})})(Mn||(Mn={})),h.extendClassProps(Mn.prototype,Mn.createDefaultProps);function Hp(n,t){const e=n._lastCameraInfo;if(e){const r=t.viewerChanged.don(i=>{if(!i||!e)return;const{position:s,rotation:o}=e;t.flyIn(s,o,0),n._lastCameraInfo=void 0,r()})}}const x_=n=>{const t=Mn.createCommonProps(),e={};try{Object.keys(t).forEach(r=>{e[r]=n[r]})}catch(r){console.warn(r)}return e},Jp=(n,t)=>{const e=Mn.createCommonProps();try{Object.keys(e).forEach(r=>{n[r]=t[r]})}catch(r){console.warn(r)}};class L_ extends h.Destroyable{constructor(e){super();d(this,"_viewersChanged",this.disposeVar(new h.Event));d(this,"_viewers",new Set);d(this,"_viewersToChange",this.dv(new h.Event));this._sceneObjectsManager=e,this.d(()=>{for(const r of this._viewers)this.destroyViewer(r);this._viewers.clear()}),this.viewers.forEach(r=>{const i=this._sceneObjectsManager.sceneObjects;r.add(...i)}),this.d(()=>{const r=this._sceneObjectsManager.sceneObjects;this.viewers.forEach(i=>{i.delete(...r)})}),this.d(this._sceneObjectsManager.sceneObjectsToChange.don((r,i)=>{this.viewers.forEach(s=>{i.forEach(o=>{bi(s.devTags,o.devTags)&&(s.has(o)?console.warn(`${s.typeName}中已存${o.typeName},检查逻辑是否有问题!`):s.add(o))}),r.forEach(o=>{bi(s.devTags,o.devTags)&&(s.has(o)?s.delete(o):console.warn(`${s.typeName}中不存在${o.typeName},检查逻辑是否有问题!`))})}),i.length>0&&i.forEach(s=>{s.d(s.devTagsChanged.don(()=>{this.viewers.forEach(o=>{o.has(s)&&o.delete(s),console.log("sceneObjectsToChange",o.devTags,s.devTags,bi(o.devTags,s.devTags)),bi(o.devTags,s.devTags)&&(o.has(s)?console.warn(`${o.typeName}中已存${s.typeName},检查逻辑是否有问题!`):o.add(s))})}))})})),this.d(this.viewersChanged.don((r,i)=>{const s=this._sceneObjectsManager.sceneObjects;i.forEach(o=>{for(let a of s)bi(o.devTags,a.devTags)&&(o.has(a)?console.warn(`${o.typeName}中已存${a.typeName},检查逻辑是否有问题!`):o.add(a))}),r.forEach(o=>{for(let a of s)bi(o.devTags,a.devTags)&&(o.has(a)?o.delete(a):console.warn(`${o.typeName}中不存在${a.typeName},检查逻辑是否有问题!`))}),i.length>0&&i.forEach(o=>{o.d(o.devTagsChanged.don(()=>{o.clearAllSceneObjects();const a=this._sceneObjectsManager.sceneObjects;for(let u of a)console.log("viewersChanged",o.devTags,u.devTags,bi(o.devTags,u.devTags)),bi(o.devTags,u.devTags)&&(o.has(u)?console.warn(`${o.typeName}中已存${u.typeName},检查逻辑是否有问题!`):o.add(u))}))})}))}get viewersChanged(){return this._viewersChanged}get viewers(){return this._viewers}getViewers(){return[...this._viewers]}get viewersToChange(){return this._viewersToChange}createViewer(e){const r=Mn.context.createViewer(e);return this._viewers.add(r),this._viewersChanged.emit([],[r]),r}destroyViewer(e){return e.isDestroyed()?!0:(this._viewers.delete(e),this._viewersChanged.emit([e],[]),e.destroy(),e.isDestroyed())}}class is extends h.Destroyable{constructor(...e){super();d(this,"_drgm",this.dv(new lp));d(this,"_sobjm",this.dv(new E_));d(this,"_vrm",this.dv(new L_(this._sobjm)));d(this,"_sceneObjectEditingManager",this.disposeVar(new w_));d(this,"_activeViewer",this.dv(h.react(void 0)));d(this,"_syncOtherViewersToActived",this.dv(h.react(!1)));d(this,"_cmrvm",this.createSceneObjectFromClass($u));d(this,"_cmrvmdon",this.d(()=>this._cmrvm&&this.destroySceneObject(this._cmrvm)));d(this,"_asset",{type:"ESObjectsManager",version:"0.1.0",createdTime:"",modifiedTime:"",name:"未命名项目"});d(this,"_sceneTree",this.dv(new Ya("default",this.dragstartDataMananger,24,this)));d(this,"_propUiTreeManager",this.dv(new Ao(24)));d(this,"_sceneTreeMap",new Map);d(this,"_viewerCreatedEvent",this.dv(new h.Event));d(this,"_lastCameraInfo");d(this,"_lastActiveViewerJson");d(this,"syncEvent",this.dv(h.createNextAnimateFrameEvent(this.activeViewerChanged,this.syncOtherViewersToActivedChanged)));d(this,"_syncEventDon",this.d(this.syncEvent.don(()=>{const e=this.syncOtherViewersToActived;this.viewers.forEach(r=>{e?r.syncOtherViewer(this.activeViewer):r.syncOtherViewer(void 0)})})));d(this,"_player",this.createSceneObjectFromClass($a));d(this,"_playerdon",this.d(()=>this._player&&this.destroySceneObject(this._player)));d(this,"_esPlyarAndPathTime",this.dv(new p_(this)));d(this,"_pathAnimationManager",this.dv(new m_(this)))}static get envs(){return $.context.environmentVariables}getSceneObjectById(e){return $.getSceneObjectById(e)}getSceneObject(e){return $.getSceneObject(e)}get $refs(){return $.$refs}get dragstartDataMananger(){return this._drgm}get sceneObjectsManager(){return this._sobjm}get viewers(){return this._vrm.viewers}getViewers(){return this._vrm.getViewers()}get sceneObjectEditingManager(){return this._sceneObjectEditingManager}get activeViewer(){return this._activeViewer.value}set activeViewer(e){this._activeViewer.value=e,this.viewers.values().forEach(r=>r.actived=r===e)}get activeViewerChanged(){return this._activeViewer.changed}get syncOtherViewersToActived(){return this._syncOtherViewersToActived.value}set syncOtherViewersToActived(e){this._syncOtherViewersToActived.value=e}get syncOtherViewersToActivedChanged(){return this._syncOtherViewersToActived.changed}get cameraViewsManager(){return this._cmrvm}get json(){var f;const e=this._asset.createdTime||new Date().toISOString(),r=new Date().toISOString(),i=this._asset.name||"未命名项目",o={type:"ESObjectsManager",version:this._asset.version||"0.1.0",createdTime:e,modifiedTime:r,name:i},a=this.sceneTree.json,u=this._cmrvm.views,l=[...this._vrm.viewers].map(p=>p.json),c=(f=this.activeViewer)==null?void 0:f.getCurrentCameraInfo();return{asset:o,viewers:l,sceneTree:a,viewCollection:u,lastView:c}}set json(e){try{if(!e.asset)return;if(!e.asset.type||e.asset.type!=="ESObjectsManager"){console.warn("json装配失败! asset.type 不存在或者不是'ESObjectsManager'");return}if(this._asset.createdTime=e.asset&&e.asset.createdTime||new Date().toISOString(),this._asset.modifiedTime=e.asset&&e.asset.modifiedTime||"",this._asset.name=e.asset&&e.asset.name||"未命名项目",this._asset.version=e.asset&&e.asset.version||"0.1.0",e.sceneTree&&(this.sceneTree.json=e.sceneTree),e.viewCollection&&(this._cmrvm.views=e.viewCollection),!e.viewers||!Array.isArray(e.viewers)){console.warn("viewers is not an array or does not exist !");return}if(this._vrm.viewers.size===0||e.viewers.length===0){console.warn("viewers is empty !");return}this._vrm.viewers.forEach(r=>{const i=e.viewers.find(s=>s.id===r.id);i&&(r.json=i)})}catch(r){console.error(`ESObjectsManager解析json数据时发生错误! error: ${r}`)}}get sceneTree(){return this._sceneTree}get jsonLoadingEvent(){return this._sceneTree.jsonLoadingEvent}get propUiTreeManager(){return this._propUiTreeManager}propTreeCallback(e){return v_(this,e)}getSceneTrees(){return[...this._sceneTreeMap.values()]}getSceneTree(e="default"){if(e==="default")return this._sceneTree;if(!this._sceneTreeMap.has(e)){console.warn(`id为${e}的SceneTree不存在!`);return}return this._sceneTreeMap.get(e)}createSceneTree(e,r=24){if(this._sceneTreeMap.has(e)||e==="default")console.warn(`id为${e}的SceneTree已存在!`);else{const i=this.dv(new Ya(e,this.dragstartDataMananger,r,this));this._sceneTreeMap.set(e,i)}return this.getSceneTree(e)}get viewerCreatedEvent(){return this._viewerCreatedEvent}createViewer(e){const r=this._vrm.createViewer(e);this.activeViewer||(this.activeViewer=r);const i=this.d(r.viewerChanged.don(s=>{s&&(this._viewerCreatedEvent.emit(r),i())}));return r}destroyViewer(e){return this._activeViewer.value===e&&(this._activeViewer.value=void 0),this._vrm.destroyViewer(e)}switchViewer(e,r=!0,i=!0,s=!0){var l;this.activeViewer&&this.activeViewer.getNavigationMode()!=="Map"&&this.activeViewer.changeToMap(),!this._lastCameraInfo&&r&&(this._lastCameraInfo=(l=this.activeViewer)==null?void 0:l.getCurrentCameraInfo()),!this._lastActiveViewerJson&&i&&(this._lastActiveViewerJson=this.activeViewer?x_(this.activeViewer):void 0),s&&this.activeViewer&&this.destroyViewer(this.activeViewer);const o=e.id,a=o?[...this.getViewers()].find(c=>c.id===o):[...this.getViewers()].find(c=>c.typeName===e.type);if(a)if(o&&a.typeName!==e.type)console.warn(`id为${o}的viewer的typeName和option.type${e.type}不相同!,虽然id一致但是typeName不同,所以会销毁并创建新的viewer`),this.destroyViewer(a);else return console.log("ESViewer exists, will be used"),r&&Hp(this,a),i&&this._lastActiveViewerJson&&(Jp(a,this._lastActiveViewerJson),this._lastActiveViewerJson=void 0),a.container===Gp(e.container)?(a.containerOrId=e.container,a.forceRecreate()):a.containerOrId=e.container,this.activeViewer=a,a;console.log("No ESViewer exists, will be created");const u=this.createViewer(e);return console.log(e),console.log(this),r&&Hp(this,u),i&&this._lastActiveViewerJson&&(Jp(u,this._lastActiveViewerJson),this._lastActiveViewerJson=void 0),this.activeViewer=u,u}switchToCesiumViewer(...e){if(typeof e[0]=="object"&&!(e[0]instanceof HTMLDivElement)){const{container:r,viewSync:i,attributeSync:s,destroy:o,id:a}=e[0];return this.switchViewer({type:"ESCesiumViewer",container:r,id:a},i??!0,s??!0,o??!0)}else if(typeof e[0]=="string"||e[0]instanceof HTMLDivElement){const r={container:e[0],viewSync:e[1]??!0,attributeSync:e[2]??!0,destroy:e[3]??!0,id:e[4]},{container:i,viewSync:s,attributeSync:o,destroy:a,id:u}=r;return this.switchViewer({type:"ESCesiumViewer",container:i,id:u},s,o,a)}}switchToUEViewer(...e){let r,i={viewSync:!0,attributeSync:!0,destroy:!0};if(typeof e[0]=="object"&&!(e[0]instanceof HTMLDivElement)&&e[0].hasOwnProperty("uri")){const{container:u,uri:l,app:c,token:f,viewSync:p,attributeSync:v,destroy:w,id:I}=e[0];r={type:"ESUeViewer",container:u,id:I,options:{uri:l,app:c,token:f}},i={viewSync:p??!0,attributeSync:v??!0,destroy:w??!0}}else if(typeof e[0]=="object"&&!(e[0]instanceof HTMLDivElement)&&e[0].hasOwnProperty("ws")){const{container:u,ws:l,esmsg:c,viewSync:f,attributeSync:p,id:v,destroy:w}=e[0];r={type:"ESUeViewer",container:u,id:v,options:{ws:l,esmsg:c}},i={viewSync:f??!0,attributeSync:p??!0,destroy:w??!0}}else if(typeof e[0]=="object"&&!(e[0]instanceof HTMLDivElement)&&e[0].hasOwnProperty("project")){const{container:u,project:l,baseUrl:c,viewSync:f,attributeSync:p,id:v,destroy:w}=e[0];r={type:"ESUeViewer",container:u,id:v,options:{project:l,baseUrl:c}},i={viewSync:f??!0,attributeSync:p??!0,destroy:w??!0}}else(typeof e[0]=="string"||e[0]instanceof HTMLDivElement)&&(typeof e[1]=="string"&&e[1].startsWith("ws")?(r={type:"ESUeViewer",container:e[0],id:e[6],options:{ws:e[1],esmsg:e[2]??void 0}},i={viewSync:e[3]??!0,attributeSync:e[4]??!0,destroy:e[5]??!0}):typeof e[1]=="string"&&e[1].startsWith("http")?(r={type:"ESUeViewer",container:e[0],id:e[7],options:{uri:e[1],app:e[2],token:e[3]??void 0}},i={viewSync:e[4]??!0,attributeSync:e[5]??!0,destroy:e[6]??!0}):(r={type:"ESUeViewer",container:e[0],id:e[6],options:{project:e[1],baseUrl:e[2]??void 0}},i={viewSync:e[3]??!0,attributeSync:e[4]??!0,destroy:e[5]??!0}));if(!r)throw new Error("参数错误");const{viewSync:s,attributeSync:o,destroy:a}=i;return this.switchViewer(r,s,o,a)}createCesiumViewer(...e){let r;if(typeof e[0]=="object"&&!(e[0]instanceof HTMLDivElement)?r={...e[0],type:"ESCesiumViewer"}:(typeof e[0]=="string"||e[0]instanceof HTMLDivElement)&&(r={container:e[0],options:e[1]??void 0,id:e[2]??void 0,type:"ESCesiumViewer"}),!r)throw new Error("参数错误");return this.createViewer(r)}createOpenLayersViewer(...e){let r;if(typeof e[0]=="object"&&!(e[0]instanceof HTMLDivElement)?r={...e[0],type:"ESOlViewer"}:(typeof e[0]=="string"||e[0]instanceof HTMLDivElement)&&(r={container:e[0],options:e[1]??void 0,id:e[2]??void 0,type:"ESOlViewer"}),!r)throw new Error("参数错误");return this.createViewer(r)}createUeViewer(...e){let r;if(typeof e[0]=="object"&&!(e[0]instanceof HTMLDivElement)?r={...e[0],type:"ESUeViewer"}:(typeof e[0]=="string"||e[0]instanceof HTMLDivElement)&&(typeof e[1]=="string"&&e[1].startsWith("ws")?r={type:"ESUeViewer",container:e[0],id:e[3]??void 0,options:{ws:e[1],esmsg:e[2]??void 0}}:typeof e[1]=="string"&&e[1].startsWith("http")?r={type:"ESUeViewer",container:e[0],id:e[4]??void 0,options:{uri:e[1],app:e[2],token:e[3]??void 0}}:r={type:"ESUeViewer",container:e[0],id:e[3]??void 0,options:{project:e[1],baseUrl:e[2]??void 0}}),!r)throw new Error("参数错误");return this.createViewer(r)}createSceneObject(e,r){return this._sobjm.createSceneObject(e,r)}createSceneObjectFromClass(e,r){return this._sobjm.createSceneObjectFromClass(e,r)}createSceneObjectFromJson(e){return this._sobjm.createSceneObjectFromJson(e)}destroySceneObject(e){const r=this._sobjm.deleteSceneObject(e);return e.destroy(),r}destroyAllSceneObjects(){const e=[...this._sobjm.sceneObjects];for(let r of e)r!=this._player&&r!=this._cmrvm&&this.destroySceneObject(r)}get player(){return this._player}get esPlyarAndPathTime(){return this._esPlyarAndPathTime}get pathAnimationManager(){return this._pathAnimationManager}}d(is,"getSceneObjById",$.context.getSceneObjectById.bind($.context)),d(is,"getEnv",$.context.getEnv.bind($.context)),d(is,"setEnv",$.context.setEnv.bind($.context)),(n=>{n.createDefaultProps=()=>({})})(is||(is={})),h.extendClassProps(is.prototype,is.createDefaultProps);function A_(){const n=navigator.userAgent;let t="Unknown";/Windows/.test(n)?t="Windows":/Macintosh/.test(n)?t="MacOS":/Linux/.test(n)?t="Linux":/Android/.test(n)?t="Android":/iOS|iPhone|iPad|iPod/.test(n)&&(t="iOS");let e="Unknown";return/x64|x86_64|Win64|WOW64/.test(n)?e="x64":/x86|i686|Win32/.test(n)?e="x86":/arm64|aarch64/.test(n)?e="arm64":/arm/.test(n)&&(e="arm"),{os:t.toLocaleLowerCase(),arch:e.toLocaleLowerCase()}}const R_=Date.now();function Zp(n){const{os:t,arch:e}=A_(),r={version:n.version,commitdate:n.date,commitId:n.commitId,runningTime:(Date.now()-R_)/1e3/60|0,date:new Date().toLocaleString(),href:window.location.href,os:t,arch:e},s={method:"GET",headers:new Headers,redirect:"follow"},o=window.encodeURIComponent(JSON.stringify(r));fetch(`https://account.bjxbsj.cn/api/product/record?product=EarthSDKJS&content=${o}`,s).then(a=>a.text()).then(a=>console.log(a)).catch(a=>console.log("error",a))}C.copyright=void 0;try{const n="earthsdk3",t="3.4.0-beta.8",e="2025-08-28T09:20:02.000Z",r="北京西部世界科技有限公司",i="地球可视化实验室 (EarthSDK&CesiumLab) https://www.bjxbsj.cn",s="27c0506b6271f81fa83b6f81a48f38960b6c87bc",a=((Date.now()-1756372802e3)/36e5).toFixed(1),u=`%c🌏 ${n}%c ${t}.${s.slice(0,8)}.${e} (距今${a}个小时)
535
471
  %c${i?i+`
536
472
  `:""}当前网站正在使用${n},此软件版权归${r}所有
537
- `;P.copyright=Object.freeze({get owner(){return"北京西部世界科技有限公司"},get ownerlink(){},get gituri(){return GITURI_&&GITURI_.replace("${commitId}","a3b0df3a552ad071e85ae0e6e20e36434c30ffab")},get info(){return l},get date(){return"2025-08-14T08:11:21.000Z"},get author(){return"suplyang"},get version(){return"3.4.0-beta.2"},get name(){return"earthsdk3"},get commitId(){return"a3b0df3a552ad071e85ae0e6e20e36434c30ffab"},print(){console.info(this.info,`
473
+ `;C.copyright=Object.freeze({get owner(){return"北京西部世界科技有限公司"},get ownerlink(){},get gituri(){return GITURI_&&GITURI_.replace("${commitId}","27c0506b6271f81fa83b6f81a48f38960b6c87bc")},get info(){return u},get date(){return"2025-08-28T09:20:02.000Z"},get author(){return"suplyang"},get version(){return"3.4.0-beta.8"},get name(){return"earthsdk3"},get commitId(){return"27c0506b6271f81fa83b6f81a48f38960b6c87bc"},print(){console.info(this.info,`
538
474
  font-size: 18px;
539
475
  font-weight: 1000;
540
476
  line-height: 1;
@@ -551,4 +487,4 @@ ${kp}
551
487
  color: rgb(0, 120, 215);
552
488
  padding-bottom: 2px;
553
489
  padding-left: 35px;
554
- `)}}),window.g_XE3CopyRights=window.g_XE3CopyRights||{},window.g_XE3CopyRights[n]=P.copyright,window.g_XE3SendProductUsageInfo=window.g_XE3SendProductUsageInfo||!0,window.g_XE3SendProductUsageInfo&&(setTimeout(()=>Yp(P.copyright),1e3*60),setInterval(()=>Yp(P.copyright),24*60*60*1e3)),window.g_earthsdk_copyright_print=window.g_earthsdk_copyright_print??!0,window.g_earthsdk_copyright_print&&P.copyright.print()}catch{console.warn("版本信息有误!")}P.BasePropTreeItem=Sh,P.Boolean2Property=lg,P.Boolean2sProperty=hg,P.Boolean3Property=ug,P.Boolean3sProperty=fg,P.Boolean4Property=cg,P.Boolean4sProperty=dg,P.BooleanProperty=F,P.BooleansProperty=eg,P.ColorProperty=J,P.ColorRgbProperty=mg,P.DashPatternProperty=vg,P.DateProperty=ii,P.DatesProperty=Ec,P.DragStartDataManager=rp,P.ES3DTileset=Pt,P.ESAlarm=ho,P.ESApertureEffect=fo,P.ESAreaMeasurement=vu,P.ESBlastParticleSystem=po,P.ESBoxClipping=go,P.ESCameraView=Os,P.ESCameraViewCollection=Ms,P.ESCameraVisibleRange=mo,P.ESCar=vo,P.ESCityBasePoint=ya,P.ESClassification=xs,P.ESClippingPlane=yo,P.ESCustomDiv=Ls,P.ESCzml=_a,P.ESDataMesh=_o,P.ESDatasmithRuntimeModel=ta,P.ESDirectionMeasurement=qo,P.ESDistanceMeasurement=wo,P.ESDynamicWater=ra,P.ESEntityCluster=ma,P.ESExcavate=Zi,P.ESFireParticleSystem=Eo,P.ESForestTileset=So,P.ESGaussianSplatting=Ca,P.ESGeoDiv=Co,P.ESGeoDivTextPoi=va,P.ESGeoExtrudedPolygon=Ki,P.ESGeoJson=Xo,P.ESGeoLineString=Or,P.ESGeoPoints=Da,P.ESGeoPolygon=_e,P.ESGeoRectangle=Po,P.ESGeoVector=le,P.ESGeoWater=na,P.ESGltfModel=Io,P.ESHeatMap=Ta,P.ESHeightLimitAnalysis=ga,P.ESHeightMeasurement=Ho,P.ESHole=ua,P.ESHuman=wi,P.ESHumanPoi=la,P.ESImageLabel=To,P.ESImageryLayer=Do,P.ESJEditingMode=se,P.ESJLonLatFormat=Uh,P.ESJPickedResult=Ig,P.ESLabel=ft,P.ESLevelRuntimeModel=ia,P.ESLocalCircle=Yo,P.ESLocalPolygon=Si,P.ESLocalPolygonZ=Jo,P.ESLocalRectangle=Zo,P.ESLocalSkyBox=No,P.ESLocalVector=Zn,P.ESLocalVector2D=vr,P.ESLocationMeasurement=bo,P.ESMsTileset=fa,P.ESNavigator=wa,P.ESObjectWithLocation=q,P.ESObjectsManager=Rs,P.ESParticleSystemPrimitive=Oo,P.ESPath=Bi,P.ESPathImpl=As,P.ESPipeFence=Ko,P.ESPipeline=sa,P.ESPipeserTileset=Qo,P.ESPit=Ci,P.ESPlayer=Qi,P.ESPoi2D=Ei,P.ESPoi3D=Mo,P.ESPoiTileset=da,P.ESPolygonFence=Bo,P.ESPolygonFlattenedPlane=xo,P.ESPolygonWithHole=jo,P.ESRectangle=$o,P.ESRtsFeatureEditing=ha,P.ESRtsTileset=ca,P.ESScale=pa,P.ESSceneObject=j,P.ESSceneObjectWithId=Oy,P.ESSeparateFoliage=Lo,P.ESSkylineAnalysis=Ia,P.ESStaticMesh=Pa,P.ESSubmergingAnalysis=Ao,P.ESSunshineAnalysis=Ro,P.ESSurfaceAreaMeasurement=ea,P.ESTerrainLayer=Fo,P.ESTextLabel=ko,P.ESUEWidget=Vo,P.ESUnrealActor=zo,P.ESVideoFusion=Uo,P.ESViewShed=Go,P.ESViewer=Kn,P.ESViewerStatusBar=Ea,P.ESViewerStatusBarScale=Sa,P.ESVisibilityAnalysis=oa,P.ESVisualObject=ve,P.ESVolumeMeasurement=aa,P.ESWidget=Wo,P.EngineObject=Hs,P.EnumProperty=H,P.EnumStringsProperty=yg,P.EvalStringProperty=ni,P.FunctionProperty=ie,P.GroupPropTreeItem=Ph,P.GroupProperty=z,P.JsonProperty=U,P.LeafPropTreeItem=Ch,P.LongStringProperty=wu,P.MaximumScreenSpaceErrorProperty=$p,P.MinmaxProperty=_g,P.NearFarScalerProperty=wg,P.NonreactiveJsonStringProperty=kh,P.Number2Property=ze,P.Number2sProperty=Rh,P.Number3Property=It,P.Number3sProperty=wc,P.Number4Property=or,P.Number4WithUndefinedProperty=og,P.Number4sProperty=ag,P.NumberProperty=S,P.NumberRangeProperty=Eg,P.NumberSliderProperty=Me,P.NumbersProperty=jp,P.ParamsProperty=Fh,P.PickedInfo=Pg,P.Player=Jn,P.PlayerProperty=Eu,P.PositionProperty=Nn,P.PositionsProperty=Vh,P.PositionsSetPropety=Cg,P.PropTree=hp,P.PropUiTreeManager=xl,P.Property=cs,P.ReactVarProperty=Ee,P.RotationProperty=Su,P.SceneObjectFromId=Ih,P.SceneTree=gu,P.SceneTreeContextMenu=cp,P.SceneTreeItem=sr,P.SceneTreeItemDragDrop=up,P.String2Property=tg,P.String2sProperty=Ah,P.String3Property=rg,P.String3sProperty=ig,P.String4Property=ng,P.String4sProperty=sg,P.StringNumberProperty=pg,P.StringNumbersProperty=gg,P.StringProperty=Z,P.StringsProperty=Lh,P.TreeItemDragDrop=np,P.UriProperty=Vl,P.ViewPlayerProperty=zh,P.ViewerCustomInteraction=qp,P.Watcher=mu,P.WatcherTools=dp,P.WithUndefinedProperty=_c,P.addTreesCallFunc=wp,P.bindCustomEditing=op,P.booleanPointInPolygon=bg,P.cartesianDistance=tp,P.clamp0_360=Ml,P.clampN180_180=sp,P.createPropTreeFromSceneObject=fp,P.cutDownTreesCallFunc=Cp,P.defaultInitSceneObjectOnCreatingFunc=cy,P.defaultLight122FromEnvironmentMapManager=Eh,P.defaultUpdateSceneObjectOnPickingFunc=uy,P.equalsN3=Cc,P.geoAlong=Lg,P.geoArea=Oc,P.geoBuffer=Zd,P.geoCenterOfMass=$g,P.geoDestination=jg,P.geoDifference=Kd,P.geoDistance=Lc,P.geoHeading=Nu,P.geoIntersect=Yd,P.geoLineIntersect=am,P.geoNearestPointOnLine=hm,P.geoPointToLineDistance=gm,P.geoPolygonFromCircle=Qd,P.geoPolygonOverlap=vh,P.geoRhumbDestination=ym,P.geoRhumbDistance=yf,P.geoRhumbHeading=wm,P.geoUnion=Jd,P.getDefaultValue=py,P.getDistancesFromPositions=pu,P.getGeoBoundingSphereFromPositions=oy,P.getMidpoint=um,P.getMinMaxCorner=Bd,P.getSceneObjectTreeItem=hy,P.getXyzFromPostion=yh,P.growthSimulationCallFunc=Pp,P.hasSameTags=ip,P.hasSameViewerTags=Ji,P.inOrderRunning=gy,P.isJSONString=dy,P.lbhToWebMerc=ay,P.lbhToXyz=_i,P.lerpAngle=hc,P.lerpRotation=_h,P.map=qh,P.optionsStr=_p,P.reactPosition2Ds=Sc,P.registerCreatedEventUpdate=Ay,P.registerEventUpdate=Ty,P.removeAllTreesCallFunc=Ep,P.rpToap=fy,P.setSceneObjectTreeItem=cc,P.updateTreeParamsCallFunc=Sp,P.webMercToLbh=ly,P.xyzToLbh=jd,Object.defineProperty(P,Symbol.toStringTag,{value:"Module"})});
490
+ `)}}),window.g_XE3CopyRights=window.g_XE3CopyRights||{},window.g_XE3CopyRights[n]=C.copyright,window.g_XE3SendProductUsageInfo=window.g_XE3SendProductUsageInfo||!0,window.g_XE3SendProductUsageInfo&&(setTimeout(()=>Zp(C.copyright),1e3*60),setInterval(()=>Zp(C.copyright),24*60*60*1e3)),window.g_earthsdk_copyright_print=window.g_earthsdk_copyright_print??!0,window.g_earthsdk_copyright_print&&C.copyright.print()}catch{console.warn("版本信息有误!")}C.BasePropTreeItem=hc,C.Boolean2Property=cg,C.Boolean2sProperty=dg,C.Boolean3Property=hg,C.Boolean3sProperty=pg,C.Boolean4Property=fg,C.Boolean4sProperty=gg,C.BooleanProperty=W,C.BooleansProperty=rg,C.ColorProperty=_t,C.ColorRgbProperty=yg,C.DashPatternProperty=_g,C.DateProperty=ps,C.DatesProperty=Hh,C.DragStartDataManager=lp,C.ES3DTileset=rn,C.ESAlarm=mc,C.ESApertureEffect=vc,C.ESAreaMeasurement=yc,C.ESBlastParticleSystem=_c,C.ESBoxClipping=wc,C.ESCameraView=Qu,C.ESCameraViewCollection=$u,C.ESCameraVisibleRange=Ec,C.ESCar=Sc,C.ESCityBasePoint=Ph,C.ESClassification=ju,C.ESClippingPlane=Cc,C.ESCustomDiv=tl,C.ESCzml=Nh,C.ESDataMesh=Ic,C.ESDatasmithRuntimeModel=ah,C.ESDirectionMeasurement=Kc,C.ESDistanceMeasurement=Pc,C.ESDynamicWater=uh,C.ESEntityCluster=Ch,C.ESExcavate=Ja,C.ESFireParticleSystem=Nc,C.ESForestTileset=bc,C.ESGaussianSplatting=Dh,C.ESGeoDiv=Tc,C.ESGeoDivTextPoi=Ih,C.ESGeoExtrudedPolygon=Qa,C.ESGeoJson=Qc,C.ESGeoLineString=rs,C.ESGeoPoints=Ah,C.ESGeoPolygon=kt,C.ESGeoRectangle=Oc,C.ESGeoVector=yt,C.ESGeoWater=lh,C.ESGltfModel=Mc,C.ESHeatMap=Lh,C.ESHeightLimitAnalysis=Sh,C.ESHeightMeasurement=Bc,C.ESHole=gh,C.ESHuman=Fo,C.ESHumanPoi=ph,C.ESImageLabel=xc,C.ESImageryLayer=Lc,C.ESJEditingMode=B,C.ESJLonLatFormat=Jh,C.ESJPickedResult=bg,C.ESLabel=Rr,C.ESLevelRuntimeModel=ch,C.ESLocalCircle=$c,C.ESLocalPolygon=Ka,C.ESLocalPolygonZ=jc,C.ESLocalRectangle=th,C.ESLocalSkyBox=Ac,C.ESLocalVector=Ro,C.ESLocalVector2D=Ti,C.ESLocationMeasurement=Rc,C.ESMsTileset=_h,C.ESNavigator=bh,C.ESObjectWithLocation=j,C.ESObjectsManager=is,C.ESParticleSystemPrimitive=Fc,C.ESPath=ja,C.ESPathImpl=ns,C.ESPipeFence=eh,C.ESPipeline=hh,C.ESPipeserTileset=rh,C.ESPit=ko,C.ESPlayer=$a,C.ESPoi2D=Za,C.ESPoi3D=kc,C.ESPoiTileset=wh,C.ESPolygonFence=nh,C.ESPolygonFlattenedPlane=Vc,C.ESPolygonWithHole=sh,C.ESRectangle=ih,C.ESRtsFeatureEditing=yh,C.ESRtsTileset=vh,C.ESScale=Eh,C.ESSceneObject=$,C.ESSceneObjectWithId=Ly,C.ESSeparateFoliage=zc,C.ESSkylineAnalysis=xh,C.ESStaticMesh=Mh,C.ESSubmergingAnalysis=Uc,C.ESSunshineAnalysis=Gc,C.ESSurfaceAreaMeasurement=oh,C.ESTerrainLayer=Wc,C.ESTestObject=gc,C.ESTextLabel=qc,C.ESUEWidget=Xc,C.ESUnrealActor=Yc,C.ESVideoFusion=Hc,C.ESViewShed=Jc,C.ESViewer=Mn,C.ESViewerStatusBar=Th,C.ESViewerStatusBarScale=Oh,C.ESVisibilityAnalysis=fh,C.ESVisualObject=Rt,C.ESVolumeMeasurement=dh,C.ESWidget=Zc,C.EngineObject=ds,C.EnumProperty=pt,C.EnumStringsProperty=wg,C.EvalStringProperty=Fi,C.FunctionProperty=nt,C.GroupPropTreeItem=dc,C.GroupProperty=rt,C.JsonProperty=Q,C.LeafPropTreeItem=fc,C.LongStringProperty=ll,C.MaximumScreenSpaceErrorProperty=tg,C.MinmaxProperty=Eg,C.NearFarScalerProperty=Sg,C.NonreactiveJsonStringProperty=qh,C.Number2Property=ge,C.Number2sProperty=Gh,C.Number3Property=Ve,C.Number3sProperty=ul,C.Number4Property=hn,C.Number4WithUndefinedProperty=ug,C.Number4sProperty=lg,C.NumberProperty=L,C.NumberRangeProperty=Cg,C.NumberSliderProperty=we,C.NumbersProperty=eg,C.ParamsProperty=Wh,C.PickedInfo=Ng,C.Player=Dn,C.PlayerProperty=ou,C.PositionProperty=to,C.PositionsProperty=Xh,C.PositionsSetPropety=Pg,C.PropTree=yp,C.PropUiTreeManager=Ao,C.Property=Ri,C.ReactVarProperty=mt,C.RotationProperty=cl,C.SceneObjectFromId=pc,C.SceneTree=Ya,C.SceneTreeContextMenu=vp,C.SceneTreeItem=He,C.SceneTreeItemDragDrop=mp,C.String2Property=ng,C.String2sProperty=Uh,C.String3Property=ig,C.String3sProperty=og,C.String4Property=sg,C.String4sProperty=ag,C.StringNumberProperty=mg,C.StringNumbersProperty=vg,C.StringProperty=ot,C.StringsProperty=zh,C.TreeItemDragDrop=cp,C.UriProperty=pa,C.ViewPlayerProperty=Yh,C.ViewerCustomInteraction=Yp,C.Watcher=Ha,C.WatcherTools=wp,C.WithUndefinedProperty=al,C.addTreesCallFunc=Pp,C.bindCustomEditing=dp,C.booleanPointInPolygon=xg,C.cartesianDistance=up,C.clamp0_360=Lo,C.clampN180_180=fp,C.createPropTreeFromSceneObject=_p,C.cutDownTreesCallFunc=Tp,C.defaultFlyInParam=Mg,C.defaultFlyToParam=gs,C.defaultInitSceneObjectOnCreatingFunc=dy,C.defaultLight122FromEnvironmentMapManager=cc,C.defaultUpdateSceneObjectOnPickingFunc=fy,C.equalsN3=fl,C.geoAlong=Fg,C.geoArea=_l,C.geoBuffer=ep,C.geoCenterOfMass=em,C.geoDestination=rm,C.geoDifference=rp,C.geoDistance=Sl,C.geoHeading=fu,C.geoIntersect=jd,C.geoLineIntersect=cm,C.geoNearestPointOnLine=pm,C.geoPointToLineDistance=ym,C.geoPolygonFromCircle=np,C.geoPolygonOverlap=oc,C.geoRhumbDestination=Em,C.geoRhumbDistance=Pf,C.geoRhumbHeading=Cm,C.geoUnion=tp,C.getDefaultValue=vy,C.getDistancesFromPositions=Xa,C.getGeoBoundingSphereFromPositions=ly,C.getMidpoint=fm,C.getMinMaxCorner=ip,C.getSceneObjectTreeItem=py,C.getXyzFromPostion=ac,C.growthSimulationCallFunc=Op,C.hasSameTags=hp,C.hasSameViewerTags=bi,C.inOrderRunning=yy,C.isJSONString=my,C.lbhToWebMerc=cy,C.lbhToXyz=ei,C.lerpAngle=Ku,C.lerpRotation=uc,C.map=Qh,C.optionsStr=Yy,C.reactPosition2Ds=hl,C.registerCreatedEventUpdate=ky,C.registerEventUpdate=Oy,C.removeAllTreesCallFunc=Np,C.rpToap=gy,C.setSceneObjectTreeItem=Zu,C.updateTreeParamsCallFunc=bp,C.webMercToLbh=hy,C.xyzToLbh=op,Object.defineProperty(C,Symbol.toStringTag,{value:"Module"})});